Jelajahi Sumber

Merge branch 'develop_yh12' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh12

chenrui 2 tahun lalu
induk
melakukan
7b658d41d5

+ 43 - 18
src/config/router.config.js

@@ -2808,51 +2808,76 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/supplierManagement/associatedProductDetails',
-            redirect: '/supplierManagement/associatedProductDetails/list',
-            name: 'associatedProductDetails',
+            path: '/supplierManagement/costSetting',
+            redirect: '/supplierManagement/costSetting/list',
+            name: 'costSetting',
             component: BlankLayout,
             meta: {
-              title: '关联产品明细表',
-              icon: 'build',
-              permission: 'M_associatedProductDetailsList'
+              title: '成本设置',
+              icon: 'build'
+              // permission: 'M_costSettingList'
             },
             hideChildrenInMenu: true,
             children: [
               {
                 path: 'list',
-                name: 'associatedProductDetailsList',
-                component: () => import(/* webpackChunkName: "supplierManagement" */ '@/views/supplierManagement/associatedProductDetails/list.vue'),
+                name: 'costSettingList',
+                component: () => import(/* webpackChunkName: "supplierManagement" */ '@/views/supplierManagement/costSetting/list.vue'),
                 meta: {
-                  title: '关联产品明细列表',
+                  title: '成本设置列表',
                   icon: 'build',
-                  hidden: true,
-                  permission: 'M_associatedProductDetailsList'
+                  hidden: true
+                  // permission: 'M_costSettingList'
                 }
               }
             ]
           },
           {
-            path: '/supplierManagement/supplierRecord',
-            redirect: '/supplierManagement/supplierRecord/list',
-            name: 'supplierRecord',
+            path: '/supplierManagement/costSetRecord',
+            redirect: '/supplierManagement/costSetRecord/list',
+            name: 'costSetRecord',
             component: BlankLayout,
             meta: {
               title: '成本变更记录',
               icon: 'build'
-              // permission: 'M_associatedProductDetailsList'
+              // permission: 'M_costSetRecordList'
             },
             hideChildrenInMenu: true,
             children: [
               {
                 path: 'list',
-                name: 'supplierRecordList',
-                component: () => import(/* webpackChunkName: "supplierManagement" */ '@/views/supplierManagement/supplierRecord/list.vue'),
+                name: 'costSetRecordList',
+                component: () => import(/* webpackChunkName: "supplierManagement" */ '@/views/supplierManagement/costSetRecord/list.vue'),
                 meta: {
                   title: '成本变更记录列表',
                   icon: 'build',
                   hidden: true
-                  // permission: 'M_associatedProductDetailsList'
+                  // permission: 'M_costSetRecordList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/supplierManagement/associatedProductDetails',
+            redirect: '/supplierManagement/associatedProductDetails/list',
+            name: 'associatedProductDetails',
+            component: BlankLayout,
+            meta: {
+              title: '关联产品明细表',
+              icon: 'build',
+              permission: 'M_associatedProductDetailsList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'associatedProductDetailsList',
+                component: () => import(/* webpackChunkName: "supplierManagement" */ '@/views/supplierManagement/associatedProductDetails/list.vue'),
+                meta: {
+                  title: '关联产品明细列表',
+                  icon: 'build',
+                  hidden: true,
+                  permission: 'M_associatedProductDetailsList'
                 }
               }
             ]

+ 1 - 1
src/views/allocationManagement/transferOut/list.vue

@@ -135,7 +135,7 @@
           <a-button
             size="small"
             type="link"
-            v-if="record.state == 'WAIT_AUDIT'&&record.printState=='UNABLE_PRINT' && $hasPermissions('B_tfo_yxPrint')"
+            v-if="record.state == 'WAIT_AUDIT' && record.printState!='UNABLE_PRINT' && $hasPermissions('B_tfo_yxPrint')"
             class="button-warning"
             @click="handleYxPrint(record)"
             id="allocateBillList-examine-btn">允许打印</a-button>

+ 29 - 24
src/views/allocationManagement/transferOut/printStatusModal.vue

@@ -12,26 +12,24 @@
         id="chooseCustom-form"
         ref="ruleForm"
         :model="form"
+        :rules="rules"
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol">
-        <a-form-model-item label="调拨单号:" prop="no"> <span>{{ form.no }}{{ form.printState=='UNABLE_PRINT'?'(暂不打印)':form.printStatus=='CANCEL_PRINT'?'(取消打印)':'' }}</span>
+        <a-form-model-item label="调拨单号:" prop="no">
+          <span>{{ form.no }}{{ form.printState == 'UNABLE_PRINT' ? '(暂不打印)' : form.printState == 'CANCEL_PRINT' ? '(取消打印)' : '' }}</span>
         </a-form-model-item>
-        <a-form-model-item label="调往对象:" prop="targetName"> <span>{{ form.targetName }}</span>
+        <a-form-model-item label="调往对象:" prop="targetName">
+          <span>{{ form.targetName }}</span>
         </a-form-model-item>
-        <a-form-model-item label="调拨打印:" prop="printState">
-          <a-radio-group v-model="printState">
-            <a-radio value="NO_PRINT">
-              允许打印
-            </a-radio>
-            <a-radio value="CANCEL_PRINT" v-if="form.printState=='UNABLE_PRINT'">
-              取消打印
-            </a-radio>
+        <a-form-model-item label="调拨打印:" prop="printStateInfo">
+          <a-radio-group v-model="form.printStateInfo">
+            <a-radio value="NO_PRINT">允许打印</a-radio>
+            <a-radio value="CANCEL_PRINT" v-if="form.printState == 'UNABLE_PRINT'">取消打印</a-radio>
           </a-radio-group>
         </a-form-model-item>
         <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
           <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
-          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定
-          </a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
         </a-form-model-item>
       </a-form-model>
     </a-spin>
@@ -39,9 +37,7 @@
 </template>
 
 <script>
-import {
-  updatePrintState
-} from '@/api/allocateBill.js'
+import { updatePrintState } from '@/api/allocateBill.js'
 export default {
   name: 'PrintModal',
   props: {
@@ -72,18 +68,29 @@ export default {
         no: undefined,
         payerName: undefined,
         printStatus: '',
-        allocateSn: ''
+        allocateSn: '',
+        printStateInfo: ''
       },
-      printState: ''
+      rules: { printStateInfo: [{ required: true, message: '请选择调拨打印状态', trigger: 'change' }] }
     }
   },
   methods: {
     //  保存
     handleSubmit () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.handleSave()
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    handleSave () {
       const _this = this
       const ajax_form = {
-        allocateSn: this.form.allocateSn,
-        printState: this.printState
+        allocateSn: _this.form.allocateSn,
+        printState: _this.form.printStateInfo
       }
       _this.spinning = true
       _this.confirmLoading = true
@@ -101,7 +108,7 @@ export default {
     cancel () {
       this.opened = false
       this.$emit('cancel')
-      this.printState = ''
+      this.form.printStateInfo = ''
       this.$refs.ruleForm.resetFields()
     }
   },
@@ -118,9 +125,7 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-#chooseCustom-form{
-.chooseCustom-form{
-  margin-bottom:0 !important;
-}
+.ant-form-item {
+  margin-bottom: 0px !important;
 }
 </style>

+ 2 - 2
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -87,8 +87,8 @@
         </div>
       </div>
       <div class="btn-box">
-        <a-button type="primary" class="button-error" @click="handleConfirmationFail">不通过</a-button>
-        <a-button type="primary" class="button-info" @click="handleConfirmationOk">通过</a-button>
+        <a-button type="primary" :loading="spinning" class="button-error" @click="handleConfirmationFail">不通过</a-button>
+        <a-button type="primary" :loading="spinning" class="button-info" @click="handleConfirmationOk">通过</a-button>
       </div>
     </a-modal>
   </a-card>

+ 2 - 2
src/views/productManagement/productInfo/chooseImportModal.vue

@@ -100,7 +100,7 @@ export default {
         { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '包装数', dataIndex: 'packQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '包装数单位', dataIndex: 'packQtyUnit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '是否箭冠产品', dataIndex: 'arrowFalgDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品尺寸', dataIndex: 'size', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品重量', dataIndex: 'weight', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -123,7 +123,7 @@ export default {
         { title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '包装数', dataIndex: 'packQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '包装数单位', dataIndex: 'packQtyUnit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '是否箭冠产品', dataIndex: 'arrowFalgDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品尺寸', dataIndex: 'size', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品重量', dataIndex: 'weight', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 2 - 2
src/views/salesManagement/salesCollection/detailModal.vue

@@ -12,7 +12,7 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main">
         <div class="toolsBar">
-          <!-- <div v-if="handlePlData.length">{{ handlePlData[0].settleClientName }},共 {{ handlePlData && handlePlData.length }} 个备货单,合计 {{ totalAmount }} 元,已选择 {{ chooseData.length }} 个收款单</div> -->
+          <div v-if="handlePlData.length">{{ handlePlData[0].settleClientName }},共 {{ handlePlData && handlePlData.length }} 个备货单,合计 {{ totalAmount }} 元,已选择 {{ chooseData.length }} 个收款单</div>
           <a-button type="primary" class="button-primary" @click="handleCommonOk">{{ okText }}</a-button>
         </div>
         <div>
@@ -284,7 +284,7 @@ export default {
         status: 'AUDIT_PASS'
       }
       this.orginData = []
-      this.$nextTick(()=>{
+      this.$nextTick(() => {
         this.$refs.rangeApply.resetDate()
         this.$refs.table.refresh(true)
       })

+ 6 - 6
src/views/supplierManagement/supplierRecord/list.vue → src/views/supplierManagement/costSetRecord/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-card size="small" :bordered="false" class="associatedProductList-wrap">
+  <a-card size="small" :bordered="false" class="costSetRecordList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
@@ -7,12 +7,12 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品名称">
-                <a-input id="associatedProductList-productName" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
+                <a-input id="costSetRecordList-productName" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="产品编码/原厂编码">
-                <a-input id="associatedProductList-productCode" v-model.trim="queryParam.product.queryWord" allowClear placeholder="请输入产品编码"/>
+                <a-input id="costSetRecordList-productCode" v-model.trim="queryParam.product.queryWord" allowClear placeholder="请输入产品编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -27,12 +27,12 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="供应商名称">
-                <a-input id="associatedProductList-productName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
+                <a-input id="costSetRecordList-productName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="associatedProductList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="associatedProductList-reset">重置</a-button>
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="costSetRecordList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="costSetRecordList-reset">重置</a-button>
               <a-button
                 style="margin-left: 10px"
                 type="primary"

+ 373 - 0
src/views/supplierManagement/costSetting/addProductModal.vue

@@ -0,0 +1,373 @@
+<template>
+  <a-modal
+    centered
+    class="chooseProducts-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="新增"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="900">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="products-con">
+        <div>
+          <!-- 搜索条件 -->
+          <div class="table-page-search-wrapper">
+            <a-form-model
+              ref="ruleForm"
+              class="form-model-con"
+              layout="inline"
+              :model="queryParam"
+              :rules="rules"
+              @keyup.enter.native="handleSearch"
+              :label-col="formItemLayout.labelCol"
+              :wrapper-col="formItemLayout.wrapperCol">
+              <a-row :gutter="15">
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="产品编码" prop="code">
+                    <a-input id="chooseProducts-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="产品品牌" :prop="type=='dealership'?'productBrandSn':''">
+                    <a-select
+                      placeholder="请选择产品品牌"
+                      id="chooseProducts-productBrandSn"
+                      allowClear
+                      v-model="queryParam.productBrandSn"
+                      :showSearch="true"
+                      option-filter-prop="children"
+                      :filter-option="filterOption">
+                      <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                    </a-select>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-model-item label="产品分类" :prop="type=='dealership'?'productType':''">
+                    <a-cascader
+                      @change="changeProductType"
+                      change-on-select
+                      v-model="queryParam.productType"
+                      expand-trigger="hover"
+                      :options="productTypeList"
+                      :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                      id="chooseProducts-productType"
+                      placeholder="请选择产品分类"
+                      allowClear />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                  <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chooseProducts-refresh">查询</a-button>
+                  <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chooseProducts-reset">重置</a-button>
+                </a-col>
+              </a-row>
+            </a-form-model></a-form>
+          </div>
+          <p style="font-weight: bold;">当前已选:{{ rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length }}个</p>
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.productSn"
+            rowKeyName="productSn"
+            :row-selection="{ columnWidth: 40, getCheckboxProps:record =>({props: { disabled: (this.type == 'supplier') && (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.indexOf(record.productSn) > -1) }}) }"
+            @rowSelection="rowSelectionFun"
+            :columns="columns"
+            :data="loadData"
+            :defaultLoadData="false"
+            bordered>
+          </s-table>
+        </div>
+        <!-- 按钮 -->
+        <div class="btn-con">
+          <a-button
+            type="primary"
+            id="chooseProducts-save"
+            size="large"
+            class="button-primary"
+            @click="handleSave"
+            style="padding: 0 60px;">保存</a-button>
+          <a-button
+            id="chooseProducts-cancel"
+            size="large"
+            class="button-cancel"
+            @click="isShow=false"
+            style="padding: 0 60px;margin-left: 15px;">取消</a-button>
+        </div>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+import tablePagination from '@/views/common/tablePagination.vue'
+import { productBrandQuery } from '@/api/productBrand'
+import { productTypeQuery, productTypeQueryAll } from '@/api/productType'
+import { dealerScopeValidProduct } from '@/api/dealerScope'
+import { productPricedList, productPricingList } from '@/api/product'
+export default {
+  name: 'ChooseProductsModal',
+  components: { STable, tablePagination },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    chooseData: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    type: { //  类型,经销权设置dealership,  供应商添加产品supplier
+      type: String,
+      default: ''
+    },
+    dealerSn: {
+      type: String || Number,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 20 }
+      },
+      queryParam: { //  查询条件
+        code: '', //  产品编码
+        productBrandSn: undefined, //  产品品牌
+        productType: [],
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      rules: {
+        productBrandSn: [ { required: true, message: '请选择产品品牌', trigger: 'change' } ],
+        productType: [ { required: true, message: '请选择产品分类', trigger: 'change' } ]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      loading: false, //  表格加载中
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'code', align: 'center' },
+        { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        let url = productPricedList //  获取定过价的产品
+        if (this.type == 'supplier') { //  供应商增加产品
+          url = productPricingList //  获取定价产品
+        }
+        const params = Object.assign(parameter, this.queryParam)
+        if (this.type != 'supplier' && this.type != 'dealership') { //  促销
+          params.onlineFalg = 1
+        }
+        return url(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [], //  分类下拉数据
+      rowSelectionInfo: null
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    // 查询
+    handleSearch () {
+      const _this = this
+      _this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          if (_this.type == 'dealership') { //  设置经销权时选择产品
+            // 校验产品是否被包含在品牌分类中
+            const params = []
+            if (_this.queryParam.productBrandSn) {
+              params.push({
+                dealerSn: _this.dealerSn,
+                goodsType: 'BRAND',
+                goodsSn: _this.queryParam.productBrandSn
+              })
+            }
+            if (_this.queryParam.productTypeSn1) {
+              params.push({
+                dealerSn: _this.dealerSn,
+                goodsType: 'CATEGORY',
+                goodsSn: _this.queryParam.productTypeSn1
+              })
+            }
+            if (_this.queryParam.productTypeSn2) {
+              params.push({
+                dealerSn: _this.dealerSn,
+                goodsType: 'CATEGORY',
+                goodsSn: _this.queryParam.productTypeSn2
+              })
+            }
+            if (_this.queryParam.productTypeSn3) {
+              params.push({
+                dealerSn: _this.dealerSn,
+                goodsType: 'CATEGORY',
+                goodsSn: _this.queryParam.productTypeSn3
+              })
+            }
+            dealerScopeValidProduct(params).then(res => {
+              if (res.status == 200) {
+                _this.$refs.table.refresh(true)
+              }
+            })
+          } else {
+            _this.$refs.table.refresh(true)
+          }
+        } else {
+          return false
+        }
+      })
+    },
+    // 重置数据
+    resetData () {
+      this.queryParam.code = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.queryParam.productType = []
+    },
+    //  重置
+    resetSearchForm () {
+      this.resetData()
+      this.$refs.table.clearTable()
+    },
+    // 保存
+    handleSave () {
+      const _this = this
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        this.$message.warning('请在列表勾选后再进行操作!')
+        return
+      }
+      if (this.type == 'supplier') { //  供应商增加产品
+        const arr = []
+        this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.map(item => {
+          if (_this.chooseData.indexOf(item) == -1) {
+            arr.push(item)
+          }
+        })
+        this.$emit('ok', arr)
+      } else {
+        this.$emit('ok', this.rowSelectionInfo && this.rowSelectionInfo.selectedRows)
+      }
+      this.isShow = false
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  产品品牌  列表
+    getProductBrand () {
+      productBrandQuery({}).then(res => {
+        if (res.status == 200) {
+          this.productBrandList = res.data
+        } else {
+          this.productBrandList = []
+        }
+      })
+    },
+    //  产品分类  列表
+    getProductType () {
+      if (this.type != 'supplier' && this.type != 'dealership') { //  促销
+        productTypeQueryAll({}).then(res => {
+          if (res.status == 200) {
+            this.productTypeList = res.data
+          } else {
+            this.productTypeList = []
+          }
+        })
+      } else {
+        productTypeQuery({}).then(res => {
+          if (res.status == 200) {
+            this.productTypeList = res.data
+          } else {
+            this.productTypeList = []
+          }
+        })
+      }
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.table.clearTable()
+        this.resetData()
+      } else {
+        const _this = this
+        let selectedRows = []
+        let selectedRowKeys = []
+        if (this.type == 'supplier') { //  供应商增加产品
+          selectedRows = []
+          selectedRowKeys = this.chooseData
+        } else {
+          selectedRows = this.chooseData
+          selectedRowKeys = []
+          this.chooseData.map(item => {
+            selectedRowKeys.push(item.goodsSn)
+          })
+        }
+        this.$nextTick(() => { // 页面渲染完成后的回调
+          _this.$refs.table.setTableSelected(selectedRowKeys, selectedRows) // 设置表格选中项
+        })
+        if (this.productBrandList.length == 0) {
+          this.getProductBrand()
+        }
+        if (this.productTypeList.length == 0) {
+          this.getProductType()
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseProducts-modal{
+    .products-con{
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 265 - 0
src/views/supplierManagement/costSetting/list.vue

@@ -0,0 +1,265 @@
+<template>
+  <a-card size="small" :bordered="false" class="costSetList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品名称">
+                <a-input id="costSetList-productName" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码/原厂编码">
+                <a-input id="costSetList-productCode" v-model.trim="queryParam.product.queryWord" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="品牌">
+                <ProductBrand id="associatedProduct-productBrandSn" v-model="queryParam.product.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品分类">
+                <ProductType id="associatedProduct-productType" v-model="productType" @change="changeProductType"></ProductType>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="供应商名称">
+                <a-input id="costSetList-productName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="审核状态">
+                <v-select
+                  v-model="queryParam.state"
+                  ref="state"
+                  id="costSetList-state"
+                  code="FINANCIAL_RECEIVE_STATUS"
+                  placeholder="请选择审核状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="costSetList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="costSetList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="costSetDetailList-export">导出明细</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <a-button type="primary" class="button-error" @click="newProduct=true">新增</a-button>
+          <a-button type="primary" class="button-warning" @click="handleBatchImport">批量导入</a-button>
+          <a-button type="primary" class="button-warning" @click="handleBatchAudit">批量审核</a-button>
+        </div>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :row-selection="{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: !record.id } }) }"
+        @rowSelection="rowSelectionFun"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.product&&(record.product.productTypeName2 || record.product.productTypeName3)">{{ record.product.productTypeName2 }} {{ record.product.productTypeName3 ? '>' : '' }} {{ record.product.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            @click="handleAudit(record)"
+          >审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            @click="handleCostSet(record)"
+          >设置成本</a-button>
+        </template>
+      </s-table>
+    </a-spin>
+    
+    <!-- 新增 -->
+    <addProductModal :openModal="newProduct" :chooseData="chooseProducts" @close="newProduct=false" @ok="handleProductsOk" />
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import ProductType from '@/views/common/productType.js'
+import ProductBrand from '@/views/common/productBrand.js'
+import addProductModal from './addProductModal.vue'
+import { supplierProductList } from '@/api/supplier'
+export default {
+  name: 'AssociatedProductDetailsList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, ProductBrand, ProductType, addProductModal },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        supplierName: '',
+        product: {
+          name: '', //  产品名称
+          queryWord: '', // 产品编码/原厂编码
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '' //  产品三级分类
+        }
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      productType: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return supplierProductList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      rowSelectionInfo: null,
+      newProduct: false
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品名称', dataIndex: 'product.name', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'product.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'product.productBrandName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '12%', align: 'center' },
+        { title: '供应商名称', dataIndex: 'supplierName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'creatDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核状态', dataIndex: 'supplierName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+      ]
+      if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
+        arr.splice(7, 0, { title: '成本价(¥)', dataIndex: 'cost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.supplierName = ''
+      this.queryParam.product.name = ''
+      this.queryParam.product.queryWord = ''
+      this.queryParam.product.productBrandSn = undefined
+      this.queryParam.product.productTypeSn1 = ''
+      this.queryParam.product.productTypeSn2 = ''
+      this.queryParam.product.productTypeSn3 = ''
+      this.productType = []
+      this.$refs.table.refresh(true)
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.product.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.product.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.product.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    // 新增成功
+    handleProductsOk(){
+      
+    },
+    // 批量导入
+    handleBatchImport(){
+      
+    },
+    // 批量审核
+    handleBatchAudit(){
+      
+    },
+    // 审核
+    handleAudit(){
+      
+    },
+    // 成本设置
+    handleCostSet(){
+      
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 195
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>