Browse Source

客户名称,合并记录

chenrui 2 years ago
parent
commit
35a2727dc2

+ 17 - 4
src/views/chainReportData/chainSalesDetailReport/list.vue

@@ -35,7 +35,7 @@
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
             <a-form-model-item label="客户名称">
-              <a-input id="chainSalesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              <custList id="chainSalesDetailReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <template v-if="advanced">
           <template v-if="advanced">
@@ -176,9 +176,10 @@ import { custTypeFindAllList } from '@/api/custType'
 import ProductType from '../../common/productType.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import ProductBrand from '../../common/productBrand.js'
 import { warehouseCascadeList } from '@/api/warehouse'
 import { warehouseCascadeList } from '@/api/warehouse'
+import custList from '@/views/common/custList.vue'
 import { reportChainSalesBillDetailList, reportChainSalesBillDetailCount, linkageGroupList } from '@/api/reportData'
 import { reportChainSalesBillDetailList, reportChainSalesBillDetailCount, linkageGroupList } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -192,7 +193,8 @@ export default {
         time: [],
         time: [],
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        salesTargetName: '',
+        buyerNameCurrent: undefined,
+        buyerSnCurrent: undefined,
         salesTargetType: undefined,
         salesTargetType: undefined,
         provinceSn: undefined, //  省
         provinceSn: undefined, //  省
         citySn: undefined, //  市
         citySn: undefined, //  市
@@ -306,6 +308,15 @@ export default {
         }
         }
       })
       })
     },
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.queryParam.tenantId = undefined
       this.queryParam.tenantId = undefined
@@ -313,7 +324,8 @@ export default {
       this.queryParam.time = []
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.citySn = undefined
@@ -331,6 +343,7 @@ export default {
       this.queryParam.salesBillNo = ''
       this.queryParam.salesBillNo = ''
       this.queryParam.salesManName = ''
       this.queryParam.salesManName = ''
       this.productType = []
       this.productType = []
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.totalData = null
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()

+ 17 - 4
src/views/chainReportData/chainSalesReport/list.vue

@@ -35,7 +35,7 @@
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
             <a-form-model-item label="客户名称">
-              <a-input id="chainSalesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+              <custList id="chainSalesReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <template v-if="advanced">
           <template v-if="advanced">
@@ -140,9 +140,10 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { getArea } from '@/api/data'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
 import { custTypeFindAllList } from '@/api/custType'
+import custList from '@/views/common/custList.vue'
 import { reportChainSalesBillList, reportChainSalesBillCount, linkageGroupList } from '@/api/reportData'
 import { reportChainSalesBillList, reportChainSalesBillCount, linkageGroupList } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -156,7 +157,8 @@ export default {
         time: [],
         time: [],
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        salesTargetName: '',
+        buyerNameCurrent: undefined,
+        buyerSnCurrent: undefined,
         salesTargetType: undefined,
         salesTargetType: undefined,
         provinceSn: undefined, //  省
         provinceSn: undefined, //  省
         citySn: undefined, //  市
         citySn: undefined, //  市
@@ -253,6 +255,15 @@ export default {
         }
         }
       })
       })
     },
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.queryParam.tenantId = undefined
       this.queryParam.tenantId = undefined
@@ -260,7 +271,8 @@ export default {
       this.queryParam.time = []
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.citySn = undefined
@@ -268,6 +280,7 @@ export default {
       this.queryParam.settleStyleSn = undefined
       this.queryParam.settleStyleSn = undefined
       this.queryParam.salesBillNo = ''
       this.queryParam.salesBillNo = ''
       this.queryParam.salesManName = ''
       this.queryParam.salesManName = ''
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.totalData = null
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()

+ 23 - 172
src/views/customerManagement/customerMerge/index.vue

@@ -7,17 +7,17 @@
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="合并时间">
               <a-form-item label="合并时间">
-                <rangeDate ref="rangeSaleDate" @change="dateSaleChange" />
+                <rangeDate ref="customerMergeDate" @change="dateSaleChange" />
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="合并前客户名称">
               <a-form-item label="合并前客户名称">
-                <a-input id="customerManagementList-customerName" v-model.trim="queryParam.customerName" allowClear placeholder="请输入合并前客户名称"/>
+                <a-input id="customerManagementList-customerName" v-model.trim="queryParam.customerNameSource" allowClear placeholder="请输入合并前客户名称"/>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="当前客户名称">
               <a-form-item label="当前客户名称">
-                <a-input id="customerManagementList-customerName" v-model.trim="queryParam.customerName" allowClear placeholder="请输入当前客户名称"/>
+                <a-input id="customerManagementList-customerName" v-model.trim="queryParam.customerNameMain" allowClear placeholder="请输入当前客户名称"/>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -46,44 +46,36 @@
 
 
 <script>
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
-import { getArea } from '@/api/data'
-import { custList, custDel, updateEnableStatus } from '@/api/customer'
-import custType from '@/views/common/custType.js'
-import { STable, VSelect } from '@/components'
+import { custMergeLogList } from '@/api/customer'
+import { STable } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 export default {
 export default {
   name: 'CustomerManagementList',
   name: 'CustomerManagementList',
-  components: { STable, VSelect, rangeDate, custType },
+  components: { STable, rangeDate },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
-      advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       tableHeight: 0,
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        saleBeginDate: '',
-        saleEndDate: '',
-        customerName: undefined, //  客户名称
-        contactName: '', //  联系人
-        provinceSn: undefined, //  省
-        citySn: undefined, //  市
-        countySn: undefined, //  区
-        dealerFlag: undefined, //  是否卫星仓客户
-        customerTypeSn: undefined //  客户类型
+        beginDate: undefined,
+        endDate: undefined,
+        customerNameSource: '',
+        customerNameMain: ''
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
-        { title: '合并时间', dataIndex: 'customerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '合并前客户名称', dataIndex: 'contactName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '合并后客户名称', dataIndex: 'contactTel', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '当前客户名称', dataIndex: 'contactMobile', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '合并时间', dataIndex: 'mergeTime', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '合并前客户名称', dataIndex: 'customerNameSource', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '合并后客户名称', dataIndex: 'customerNameTarget', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '当前客户名称', dataIndex: 'customerNameMain', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
         this.spinning = true
         this.spinning = true
-        return custList(Object.assign(parameter, this.queryParam)).then(res => {
+        return custMergeLogList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
@@ -97,164 +89,29 @@ export default {
           this.spinning = false
           this.spinning = false
           return data
           return data
         })
         })
-      },
-      addrProvinceList: [], //  省下拉
-      addrCityList: [], //  市下拉
-      addrDistrictList: [], //  区下拉
-      openModal: false, //  查看客户详情  弹框
-      itemId: '', //  当前客户id
-      openMergeModal: false, // 合并用户名称
-      customerTemp: {}// 临时客户数据
+      }
     }
     }
   },
   },
   methods: {
   methods: {
     //  时间  change
     //  时间  change
     dateSaleChange (date) {
     dateSaleChange (date) {
-      this.queryParam.saleBeginDate = date[0] ? date[0] : ''
-      this.queryParam.saleEndDate = date[1] ? date[1] : ''
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
     },
     },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
-      this.$refs.rangeSaleDate.resetDate()
-      this.queryParam.saleBeginDate = ''
-      this.queryParam.saleEndDate = ''
-      this.queryParam.customerName = undefined
-      this.queryParam.contactName = ''
-      this.queryParam.provinceSn = undefined
-      this.queryParam.citySn = undefined
-      this.queryParam.countySn = undefined
-      this.queryParam.dealerFlag = undefined
-      this.queryParam.customerTypeSn = undefined
-      this.addrCityList = []
-      this.addrDistrictList = []
+      this.$refs.customerMergeDate.resetDate()
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.customerNameSource = ''
+      this.queryParam.customerNameMain = ''
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
-    //  新增/编辑
-    handleEdit (row) {
-      if (row) { //  编辑
-        this.$router.push({ path: `/customerManagement/customerInfo/edit/${row.id}` })
-      } else { //  新增
-        this.$router.push({ path: '/customerManagement/customerInfo/add' })
-      }
-    },
-    //  删除
-    handleDel (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '删除后不可恢复,确定要进行删除吗?',
-        centered: true,
-        onOk () {
-          _this.spinning = true
-          custDel({ id: row.id }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
-        }
-      })
-    },
-    // 修改状态
-    changeFlagHandle (text, record) {
-      const _data = {
-        id: record.id,
-        flag: record.enabledFlag ? '1' : '0'
-      }
-      this.spinning = true
-      updateEnableStatus(_data).then(res => {
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-          this.spinning = false
-        } else {
-          this.$refs.table.refresh()
-          this.spinning = false
-        }
-      })
-    },
-    //  客户信息详情
-    handleDetail (row) {
-      this.itemId = row.id
-      this.openModal = true
-    },
-    // 合并客户
-    mergeCustomer (row) {
-      this.customerTemp = row
-      this.openMergeModal = true
-    },
-    closeMergeModal (flag) {
-      this.customerTemp = ''
-      this.openMergeModal = false
-      if (flag) {
-        this.$refs.table.refresh()
-      }
-    },
-    //  关闭弹框
-    closeModal () {
-      this.itemId = ''
-      this.openModal = false
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
-    // 获取城市列表
-    getCityList (val) {
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.queryParam.citySn = undefined
-      this.queryParam.countySn = undefined
-      if (val) {
-        this.getArea('city', val)
-      }
-    },
-    // 获取区县列表
-    getAreaList (val) {
-      this.addrDistrictList = []
-      this.queryParam.countySn = undefined
-      if (val) {
-        this.getArea('district', val)
-      }
-    },
-    //  省/市/区
-    getArea (leve, sn) {
-      let params
-      if (leve == 'province') {
-        params = { type: '2' }
-      } else {
-        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
-      }
-      getArea(params).then(res => {
-        if (res.status == 200) {
-          if (leve == 'province') {
-            this.addrProvinceList = res.data || []
-          } else if (leve == 'city') {
-            this.addrCityList = res.data || []
-          } else if (leve == 'district') {
-            this.addrDistrictList = res.data || []
-          }
-        } else {
-          if (leve == 'province') {
-            this.addrProvinceList = []
-          } else if (leve == 'city') {
-            this.addrCityList = []
-          } else if (leve == 'district') {
-            this.addrDistrictList = []
-          }
-        }
-      })
-    },
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
         _this.setTableH()
       })
       })
-      this.getArea('province')
     },
     },
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -262,12 +119,6 @@ export default {
     }
     }
   },
   },
   watch: {
   watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-    },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
       this.setTableH()
     }
     }

+ 12 - 4
src/views/financialManagement/ledgerRecord/list.vue

@@ -11,7 +11,7 @@
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-item label="客户名称">
             <a-form-item label="客户名称">
-              <custList ref="custSatelliteList" @change="custSatelliteChange"></custList>
+              <custList ref="custSatelliteList" :satelliteFlag="true" @change="custSatelliteChange"></custList>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="4" :sm="24">
           <a-col :md="4" :sm="24">
@@ -86,7 +86,8 @@ export default {
       // 查询参数
       // 查询参数
       queryParam: {
       queryParam: {
         customer: {
         customer: {
-          customerSn: undefined
+          customerSn: undefined,
+          customerNameCurrent: undefined
         },
         },
         dealerProduct: {
         dealerProduct: {
           name: '',
           name: '',
@@ -148,8 +149,14 @@ export default {
         }
         }
       })
       })
     },
     },
-    custSatelliteChange (val) {
-      this.queryParam.customer.customerSn = val.key
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.customer.customerSn = row.customerSn
+        this.queryParam.customer.customerNameCurrent = undefined
+      } else {
+        this.queryParam.customer.customerNameCurrent = v
+        this.queryParam.customer.customerSn = undefined
+      }
     },
     },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
@@ -157,6 +164,7 @@ export default {
       this.queryParam.beginDate = getDate.getRecentday().starttime
       this.queryParam.beginDate = getDate.getRecentday().starttime
       this.queryParam.endDate = getDate.getRecentday().endtime
       this.queryParam.endDate = getDate.getRecentday().endtime
       this.queryParam.customer.customerSn = undefined
       this.queryParam.customer.customerSn = undefined
+      this.queryParam.customer.customerNameCurrent = undefined
       this.queryParam.dealerProduct.name = ''
       this.queryParam.dealerProduct.name = ''
       this.queryParam.dealerProduct.code = ''
       this.queryParam.dealerProduct.code = ''
       this.$refs.custSatelliteList.resetForm()
       this.$refs.custSatelliteList.resetForm()

+ 10 - 10
src/views/inventoryManagement/inventoryChecking/detailModal.vue

@@ -54,21 +54,21 @@
         <a-alert type="info" style="margin-bottom:10px">
         <a-alert type="info" style="margin-bottom:10px">
           <div slot="message">
           <div slot="message">
             <div style="display: flex;justify-content: space-between;align-items: center;">
             <div style="display: flex;justify-content: space-between;align-items: center;">
-              <div>
+              <div v-if="productTotal">
                 <div>
                 <div>
-                  总款数: <strong>{{ productTotal&&(productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong> ,
-                  总数量: <strong>{{ productTotal&&(productTotal.stockQty || productTotal.stockQty==0) ? productTotal.stockQty : '--' }}</strong> ,
+                  总款数: <strong>{{ (productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong> ,
+                  总数量: <strong>{{ (productTotal.stockQty || productTotal.stockQty==0) ? productTotal.stockQty : '--' }}</strong> ,
                   <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
                   <div style="display: inline-block;" v-if="$hasPermissions('M_ShowAllCost')">
-                    总成本: <strong>{{ productTotal&&(productTotal.checkCost || productTotal.checkCost==0) ? toThousands(productTotal.checkCost) : '--' }}</strong>
+                    总成本: <strong>{{ (productTotal.checkCost || productTotal.checkCost==0) ? toThousands(productTotal.checkCost) : '--' }}</strong>
                   </div>
                   </div>
                 </div>
                 </div>
                 <div>
                 <div>
-                  盘盈总数量: <strong>{{ productTotal&&(productTotal.checkProfitQty || productTotal.checkProfitQty==0) ? productTotal.checkProfitQty : '--' }}</strong>,
-                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盘盈总成本: <strong>{{ productTotal&&(productTotal.checkProfitCost || productTotal.checkProfitCost==0) ? toThousands(productTotal.checkProfitCost) : '--' }}</strong>,</span>
-                  盘亏总数量: <strong>{{ productTotal&&productTotal.checkLossQty?productTotal.checkLossQty==0?productTotal.checkLossQty:('-'+productTotal.checkLossQty):'--' }}</strong>,
-                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盘亏总成本: <strong>{{ productTotal&&(productTotal.checkLossCost || productTotal.checkLossCost==0) ? toThousands(productTotal.checkLossCost) : '--' }}</strong>,</span>
-                  盈亏总数量: <strong>{{ productTotal&&(productTotal.totalCheckProfitLossQty || productTotal.totalCheckProfitLossQty==0) ? productTotal.totalCheckProfitLossQty : '--' }}</strong>,
-                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盈亏总成本: <strong>{{ productTotal&&(productTotal.totalCheckProfitLossCost || productTotal.totalCheckProfitLossCost==0) ? toThousands(productTotal.totalCheckProfitLossCost) : '--' }}</strong>,</span>
+                  盘盈总数量: <strong>{{ (productTotal.checkProfitQty || productTotal.checkProfitQty==0) ? productTotal.checkProfitQty : '--' }}</strong>,
+                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盘盈总成本: <strong>{{ (productTotal.checkProfitCost || productTotal.checkProfitCost==0) ? toThousands(productTotal.checkProfitCost) : '--' }}</strong>,</span>
+                  盘亏总数量: <strong>{{ (productTotal.checkLossQty||productTotal.checkLossQty==0)?productTotal.checkLossQty>0?('-'+productTotal.checkLossQty):productTotal.checkLossQty: '--' }}</strong>,
+                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盘亏总成本: <strong>{{ (productTotal.checkLossCost || productTotal.checkLossCost==0) ? toThousands(productTotal.checkLossCost) : '--' }}</strong>,</span>
+                  盈亏总数量: <strong>{{ (productTotal.totalCheckProfitLossQty || productTotal.totalCheckProfitLossQty==0) ? productTotal.totalCheckProfitLossQty : '--' }}</strong>,
+                  <span v-if="basicInfoData&&basicInfoData.state=='FINISH'">盈亏总成本: <strong>{{ (productTotal.totalCheckProfitLossCost || productTotal.totalCheckProfitLossCost==0) ? toThousands(productTotal.totalCheckProfitLossCost) : '--' }}</strong>,</span>
                 </div>
                 </div>
               </div>
               </div>
               <div>
               <div>

+ 17 - 4
src/views/reportData/customerSalesDetailsReport/list.vue

@@ -21,7 +21,7 @@
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称">
               <a-form-model-item label="客户名称">
-                <a-input id="customerSalesDetailsReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+                <custList id="customerSalesDetailsReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -79,10 +79,11 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
 import { reportCustomerSalesBillDetailList, reportCustomerSalesBillDetailCount, reportCustomerSalesBillDetailExport } from '@/api/reportData'
 import { reportCustomerSalesBillDetailList, reportCustomerSalesBillDetailCount, reportCustomerSalesBillDetailExport } from '@/api/reportData'
 export default {
 export default {
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   data () {
   data () {
     const _this = this
     const _this = this
     return {
     return {
@@ -91,7 +92,8 @@ export default {
       wrapperCol: { span: 16 },
       wrapperCol: { span: 16 },
       tableHeight: 0,
       tableHeight: 0,
       queryParam: { //  查询条件
       queryParam: { //  查询条件
-        salesTargetName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         time: [],
         time: [],
         beginDate: '',
         beginDate: '',
         endDate: ''
         endDate: ''
@@ -164,14 +166,25 @@ export default {
         }
         }
       })
       })
     },
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.$refs.rangeDate.resetDate()
       this.$refs.rangeDate.resetDate()
       this.queryParam.time = []
       this.queryParam.time = []
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
       this.totalData = null
       this.totalData = null
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()
     },
     },

+ 19 - 4
src/views/reportData/salesDetailReport/list.vue

@@ -32,7 +32,7 @@
           <template v-if="advanced">
           <template v-if="advanced">
             <a-col :md="4" :sm="24">
             <a-col :md="4" :sm="24">
               <a-form-model-item label="客户名称">
               <a-form-model-item label="客户名称">
-                <a-input id="salesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+                <custList id="salesDetailReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="4" :sm="24">
             <a-col :md="4" :sm="24">
@@ -182,9 +182,10 @@ import { custTypeFindAllList } from '@/api/custType'
 import { warehouseCascadeList } from '@/api/warehouse'
 import { warehouseCascadeList } from '@/api/warehouse'
 import ProductType from '../../common/productType.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import ProductBrand from '../../common/productBrand.js'
+import custList from '@/views/common/custList.vue'
 import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
 import { reportSalesBillDetailList, reportSalesBillDetailCount, reportSalesBillDetailExport } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -201,7 +202,8 @@ export default {
         createEndDate: '',
         createEndDate: '',
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        salesTargetName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         salesTargetType: undefined,
         salesTargetType: undefined,
         provinceSn: undefined, //  省
         provinceSn: undefined, //  省
         citySn: undefined, //  市
         citySn: undefined, //  市
@@ -323,6 +325,15 @@ export default {
         this.$message.info('请至少输入一个查询条件')
         this.$message.info('请至少输入一个查询条件')
       }
       }
     },
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
       this.$refs.rangeDate.resetDate()
@@ -337,7 +348,8 @@ export default {
       this.creatTime = []
       this.creatTime = []
       this.queryParam.createBeginDate = ''
       this.queryParam.createBeginDate = ''
       this.queryParam.createEndDate = ''
       this.queryParam.createEndDate = ''
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.citySn = undefined
@@ -359,6 +371,9 @@ export default {
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.totalData = null
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()
+      if (this.advanced) {
+        this.$refs.custSatelliteList.resetForm()
+      }
     },
     },
     // 导出
     // 导出
     handleExport () {
     handleExport () {

+ 21 - 6
src/views/reportData/salesReport/list.vue

@@ -32,7 +32,7 @@
           <template v-if="advanced">
           <template v-if="advanced">
             <a-col :md="4" :sm="24">
             <a-col :md="4" :sm="24">
               <a-form-model-item label="客户名称">
               <a-form-model-item label="客户名称">
-                <a-input id="salesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
+                <custList id="salesReportList-salesTargetName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="4" :sm="24">
             <a-col :md="4" :sm="24">
@@ -146,9 +146,10 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { getArea } from '@/api/data'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
 import { custTypeFindAllList } from '@/api/custType'
+import custList from '@/views/common/custList.vue'
 import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
 import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -164,8 +165,9 @@ export default {
         endDate: '',
         endDate: '',
         outWarehouseBeginDate: '',
         outWarehouseBeginDate: '',
         outWarehouseEndDate: '',
         outWarehouseEndDate: '',
-        salesTargetName: '',
-        salesTargetType: undefined,
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
+        salesTargetType: undefined, // 客户类型
         provinceSn: undefined, //  省
         provinceSn: undefined, //  省
         citySn: undefined, //  市
         citySn: undefined, //  市
         countySn: undefined, //  区
         countySn: undefined, //  区
@@ -277,6 +279,15 @@ export default {
         this.$message.info('请至少输入一个查询条件')
         this.$message.info('请至少输入一个查询条件')
       }
       }
     },
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
       this.$refs.rangeDate.resetDate()
@@ -292,7 +303,8 @@ export default {
       this.queryParam.createBeginDate = ''
       this.queryParam.createBeginDate = ''
       this.queryParam.createEndDate = ''
       this.queryParam.createEndDate = ''
 
 
-      this.queryParam.salesTargetName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.salesTargetType = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.citySn = undefined
@@ -303,6 +315,9 @@ export default {
       this.queryParam.salesManName = ''
       this.queryParam.salesManName = ''
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.totalData = null
+      if (this.advanced) {
+        this.$refs.custSatelliteList.resetForm()
+      }
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()
     },
     },
     // 导出
     // 导出
@@ -326,7 +341,7 @@ export default {
           _this.spinning = false
           _this.spinning = false
           _this.queryParam.showCost = undefined
           _this.queryParam.showCost = undefined
         })
         })
-      }else {
+      } else {
         this.$message.info('请至少输入一个查询条件')
         this.$message.info('请至少输入一个查询条件')
       }
       }
     },
     },

+ 17 - 4
src/views/reportData/salesReturnReport/detailList.vue

@@ -25,7 +25,7 @@
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
             <a-form-model-item label="客户名称">
-              <a-input id="salesDetailReportList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+              <custList id="salesDetailReportList-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <template v-if="advanced">
           <template v-if="advanced">
@@ -105,9 +105,10 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import ProductBrand from '../../common/productBrand.js'
+import custList from '@/views/common/custList.vue'
 import { reportSalesReturnDetailPageList, reportSalesReturnDetailTotal, reportSalesReturnDetailExport } from '@/api/reportData'
 import { reportSalesReturnDetailPageList, reportSalesReturnDetailTotal, reportSalesReturnDetailExport } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -121,7 +122,8 @@ export default {
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
         productType: undefined,
         productType: undefined,
-        buyerName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         productEntity: {
         productEntity: {
           productBrandSn: undefined, //  产品品牌
           productBrandSn: undefined, //  产品品牌
           productTypeSn1: '', //  产品一级分类
           productTypeSn1: '', //  产品一级分类
@@ -216,6 +218,15 @@ export default {
         }
         }
       })
       })
     },
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
       this.$refs.rangeDate.resetDate()
@@ -223,7 +234,9 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
       this.queryParam.salesReturnNo = ''
       this.queryParam.salesReturnNo = ''
-      this.queryParam.buyerName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
+      this.$refs.custSatelliteList.resetForm()
       this.queryParam.productEntity.productBrandSn = undefined
       this.queryParam.productEntity.productBrandSn = undefined
       this.queryParam.productEntity.productTypeSn1 = ''
       this.queryParam.productEntity.productTypeSn1 = ''
       this.queryParam.productEntity.productTypeSn2 = ''
       this.queryParam.productEntity.productTypeSn2 = ''

+ 17 - 4
src/views/reportData/salesReturnReport/list.vue

@@ -25,7 +25,7 @@
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
             <a-form-model-item label="客户名称">
-              <a-input id="salesReturnReportList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+              <custList id="salesReturnReportList-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
@@ -78,9 +78,10 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
 import { reportSalesReturnPageList, reportSalesReturnBillTotal, reportSalesReturnExport } from '@/api/reportData'
 import { reportSalesReturnPageList, reportSalesReturnBillTotal, reportSalesReturnExport } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -93,7 +94,8 @@ export default {
         time: [],
         time: [],
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        buyerName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         salesReturnNo: ''
         salesReturnNo: ''
       },
       },
       rules: {
       rules: {
@@ -178,6 +180,15 @@ export default {
         }
         }
       })
       })
     },
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
       this.$refs.rangeDate.resetDate()
@@ -185,7 +196,9 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
       this.queryParam.salesReturnNo = ''
       this.queryParam.salesReturnNo = ''
-      this.queryParam.buyerName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.totalData = null
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()

+ 19 - 4
src/views/reportData/urgentItemsOffsetReport/detailList.vue

@@ -31,7 +31,7 @@
           <template v-if="advanced">
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称">
               <a-form-model-item label="客户名称">
-                <a-input id="urgentItemsOffsetReport-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+                <custList id="urgentItemsOffsetReport-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <!-- <a-col :md="6" :sm="24">
             <!-- <a-col :md="6" :sm="24">
@@ -116,9 +116,10 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import ProductBrand from '../../common/productBrand.js'
+import custList from '@/views/common/custList.vue'
 import { reportUrgentDetailQueryPage, reportUrgentDetailQueryCount, reportUrgentDetailExport } from '@/api/reportData'
 import { reportUrgentDetailQueryPage, reportUrgentDetailQueryCount, reportUrgentDetailExport } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -131,7 +132,8 @@ export default {
         time: [],
         time: [],
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        buyerName: '',
+        buyerNameCurrent: undefined,
+        buyerSnCurrent: undefined,
         bizBillNo: '',
         bizBillNo: '',
         urgentBillNo: '',
         urgentBillNo: '',
         sourceType: undefined,
         sourceType: undefined,
@@ -223,6 +225,15 @@ export default {
         }
         }
       })
       })
     },
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
       this.$refs.rangeDate.resetDate()
@@ -230,7 +241,8 @@ export default {
       this.queryParam.beginDate = ''
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
       this.queryParam.endDate = ''
       this.queryParam.bizBillNo = ''
       this.queryParam.bizBillNo = ''
-      this.queryParam.buyerName = ''
+      this.queryParam.buyerNameCurrent = undefined
+      this.queryParam.buyerSnCurrent = undefined
       this.queryParam.urgentBillNo = ''
       this.queryParam.urgentBillNo = ''
       this.queryParam.sourceType = undefined
       this.queryParam.sourceType = undefined
       this.queryParam.productBrandSn = undefined
       this.queryParam.productBrandSn = undefined
@@ -241,6 +253,9 @@ export default {
       this.queryParam.productName = ''
       this.queryParam.productName = ''
       this.queryParam.productType = []
       this.queryParam.productType = []
       this.productType = []
       this.productType = []
+      if (this.advanced) {
+        this.$refs.custSatelliteList.resetForm()
+      }
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.totalData = null
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()

+ 20 - 7
src/views/reportData/urgentItemsOffsetReport/list.vue

@@ -30,7 +30,7 @@
           </a-col>
           </a-col>
           <a-col :md="6" :sm="24">
           <a-col :md="6" :sm="24">
             <a-form-model-item label="客户名称">
             <a-form-model-item label="客户名称">
-              <a-input id="urgentItemsOffsetReport-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+              <custList id="urgentItemsOffsetReport-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <!-- <a-col :md="6" :sm="24">
           <!-- <a-col :md="6" :sm="24">
@@ -63,7 +63,7 @@
     <!-- 合计 -->
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
       <div class="ftext" slot="message">
-        总单数:<strong>{{basiceNum?basiceNum:'--' }}</strong>;
+        总单数:<strong>{{ basiceNum?basiceNum:'--' }}</strong>;
         产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
         产品总数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
         <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
         <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
           冲减总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</strong>。
           冲减总成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</strong>。
@@ -89,9 +89,10 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
 import { reportUrgentPageList, reportUrgentQueryCount, reportUrgentExport } from '@/api/reportData'
 import { reportUrgentPageList, reportUrgentQueryCount, reportUrgentExport } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -104,7 +105,8 @@ export default {
         time: [],
         time: [],
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        buyerName: '',
+        buyerNameCurrent: undefined, // 客户名称
+        buyerSnCurrent: undefined, // 客户sn
         bizBillNo: '',
         bizBillNo: '',
         urgentBillNo: '',
         urgentBillNo: '',
         sourceType: undefined
         sourceType: undefined
@@ -113,7 +115,7 @@ export default {
         'time': [{ required: true, message: '请选择冲减时间', trigger: 'change' }]
         'time': [{ required: true, message: '请选择冲减时间', trigger: 'change' }]
       },
       },
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
-      basiceNum:null,//列表数据
+      basiceNum: null, // 列表数据
       exportLoading: false,
       exportLoading: false,
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
@@ -134,7 +136,7 @@ export default {
             this.disabled = false
             this.disabled = false
           }
           }
           this.spinning = false
           this.spinning = false
-          this.basiceNum=data.count
+          this.basiceNum = data.count
           return data
           return data
         })
         })
       },
       },
@@ -189,17 +191,28 @@ export default {
         }
         }
       })
       })
     },
     },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.buyerSnCurrent = row.customerSn
+        this.queryParam.buyerNameCurrent = undefined
+      } else {
+        this.queryParam.buyerNameCurrent = v
+        this.queryParam.buyerSnCurrent = undefined
+      }
+    },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
       this.queryParam = {
       this.queryParam = {
         time: [],
         time: [],
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        buyerName: '',
+        buyerNameCurrent: undefined,
+        buyerSnCurrent: undefined,
         bizBillNo: '',
         bizBillNo: '',
         urgentBillNo: '',
         urgentBillNo: '',
         sourceType: undefined
         sourceType: undefined
       }
       }
+      this.$refs.custSatelliteList.resetForm()
       this.$refs.rangeDate.resetDate()
       this.$refs.rangeDate.resetDate()
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
       this.totalData = null
       this.totalData = null