chenrui 2 gadi atpakaļ
vecāks
revīzija
cd0d1c092c

+ 0 - 9
src/api/bizuser.js

@@ -107,16 +107,7 @@ export const deleteProductType = params => {
   })
 }
 
-// export const bizuserScopeSaveList = params => {
-//   return axios({
-//     url: '/bizuser/scope/saveList',
-//     data: params,
-//     method: 'post'
-//   })
-// }
-
 // 查询用户信息
-
 export const findById = params => {
   return axios({
     url: `/bizuser/findById/${params.id}`,

+ 1 - 1
src/views/dealerManagement/businessOwnerSettings/categorySet.vue

@@ -134,7 +134,7 @@ export default {
             productTypeList: [],
             productBrandList: []
           }
-          _this.dataSource.push(newData)
+          _this.dataSource.unShift(newData)
         }
         _this.spinning = false
         _this.disabled = false

+ 23 - 6
src/views/dealerManagement/dealerZoneSearch/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="经销商">
-                <a-input id="dealerZoneSearch-dealerName" v-model.trim="queryParam.dealerDTO.dealerName" allowClear placeholder="请输入经销商名称"/>
+                <dealerSearchList id="dealerZoneSearch-dealerName" placeholder="请输入经销商名称搜索" ref="indirectDealer" @change="dealerChange" />
               </a-form-item>
             </a-col>
             <a-col :md="8" :sm="24">
@@ -63,10 +63,11 @@ import { STable } from '@/components'
 import subarea from '@/views/common/subarea.js'
 import { exportExcel } from '@/libs/JGPrint.js'
 import { queryDealerWithBizuser } from '@/api/dealerRelation'
+import dealerSearchList from '@/views/common/dealerSearchList.vue'
 export default {
   name: 'DealerZoneSearch',
   mixins: [commonMixin],
-  components: { STable, subarea },
+  components: { STable, subarea, dealerSearchList },
   data () {
     return {
       spinning: false,
@@ -75,7 +76,8 @@ export default {
       queryParam: {
         subareaSn: undefined,
         subareaAreaSn: undefined,
-        dealerDTO: {
+        dealer: {
+          dealerSn: '',
           dealerName: ''
         },
         bizUserName: ''
@@ -85,7 +87,7 @@ export default {
         { title: '经销商名称', dataIndex: 'dealer.dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '所属区域', dataIndex: 'subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所属分区', dataIndex: 'subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客服', dataIndex: 'userNameKfs', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客服', dataIndex: 'userNameKfs', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售总监', dataIndex: 'userNameXszjs', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
@@ -129,11 +131,23 @@ export default {
     resetSearchForm () {
       this.queryParam.subareaSn = undefined
       this.queryParam.subareaAreaSn = undefined
-      this.queryParam.dealerDTO.dealerName = ''
+      this.queryParam.dealer.dealerSn = ''
+      this.queryParam.dealer.dealerName = ''
       this.queryParam.bizUserName = ''
+      this.$refs.indirectDealer.resetForm()
       this.$refs.subarea.clearData()
       this.$refs.table.refresh(true)
     },
+    // 选择经销商
+    dealerChange (val) {
+      if (val.row) {
+        this.queryParam.dealer.dealerSn = val.row.dealerSn
+        this.queryParam.dealer.dealerName = val.row.dealerName
+      } else {
+        this.queryParam.dealer.dealerSn = undefined
+        this.queryParam.dealer.dealerName = val.key
+      }
+    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -167,9 +181,12 @@ export default {
   }
 }
 </script>
-<style lang="less">
+<style lang="less" scoped>
   .dealerZoneSearch-wrap{
     height: 100%;
     margin-top:6px;
   }
+  /deep/.ant-select-combobox .ant-select-arrow{
+    display:inline-block !important;
+  }
 </style>