chenrui 1 سال پیش
والد
کامیت
b4cd22f910
1فایلهای تغییر یافته به همراه14 افزوده شده و 8 حذف شده
  1. 14 8
      src/views/reportData/tireSalesReport/dealerList.vue

+ 14 - 8
src/views/reportData/tireSalesReport/dealerList.vue

@@ -28,11 +28,12 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客户名称">
-                  <a-input
+                  <!-- <a-input
                     id="tireSalesDealerList-dealerName"
                     v-model.trim="queryParam.dealerName"
                     allowClear
-                    placeholder="请输入客户名称" />
+                    placeholder="请输入客户名称" /> -->
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesDealerList-dealerName" @change="custChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -113,10 +114,11 @@ import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { querySaleDealercount, excelSaleOnlineExport, querybyDealerList } from '@/api/reportData'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 export default {
   name: 'TireSalesDealerList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser },
+  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList },
   data () {
     return {
       spinning: false,
@@ -133,6 +135,7 @@ export default {
         citySn: undefined,
         districtSn: undefined,
         dealerName: '',
+        dealerSn: '',
         subareaSn: undefined,
         subareaAreaSn: undefined,
         bizUserSn: undefined
@@ -168,7 +171,7 @@ export default {
         { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'dealerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户级别', dataIndex: 'dealerLevelDictValue ', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购数量', dataIndex: 'buyAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存数量', dataIndex: 'storeAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '售出数量', dataIndex: 'sellAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -188,6 +191,10 @@ export default {
     }
   },
   methods: {
+    custChange (val) {
+      this.queryParam.dealerName = val.name
+      this.queryParam.dealerSn = val.key
+    },
     // 统计
     getCount (params) {
       querySaleDealercount(params).then(res => {
@@ -214,9 +221,6 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
-    custChange (val) {
-      this.queryParam.dealerSn = val.key
-    },
     subareaChange (val) {
       this.queryParam.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
@@ -234,13 +238,15 @@ export default {
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
       this.queryParam.dealerName = ''
+      this.queryParam.dealerSn = ''
       this.queryParam.subareaSn = undefined
       this.queryParam.subareaAreaSn = undefined
       this.queryParam.bizUserSn = undefined
       this.totalData = null
+      this.$refs.areaList.clearData()
       if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
         this.$refs.subarea.clearData()
-        this.$refs.areaList.clearData()
       }
       this.$refs.table.clearTable()
     },