Browse Source

修改所属地区
工厂客户管理客户类型改为JXS
门店标签改为多选

Qukatie 2 weeks ago
parent
commit
c4e00fe15a

+ 1 - 1
src/views/dealer/store/detailsPage.vue

@@ -735,7 +735,7 @@ export default {
             for (let item in this.data) {
                 if (index != item) {
                     if (this.data[item].defaultAddres == 1) {
-                        this.$message.warning("默认地址只能唯一")
+                        this.$message.warning("开启默认地址")
                         return row.defaultAddres = 0
                     }
                 }

+ 4 - 4
src/views/fc/customer/components/index.vue

@@ -89,7 +89,7 @@ export default {
     },
     //修改时的修改按钮点击触发
     rowUpdate(row, index, done, loading) {
-      row.corpType = customerParameter.code;
+      row.corpType = 'JXS';
       typeSave(row).then(
         () => {
           this.$message({
@@ -109,7 +109,7 @@ export default {
     //新增修改时保存触发
     rowSave(row, done, loading) {
       console.log('33333333333333');
-      row.corpType = customerParameter.code;
+      row.corpType = 'JXS';
       typeSave(row).then(
         res => {
           this.$message({
@@ -127,7 +127,7 @@ export default {
     },
     //查询全部
     initData() {
-      customerList({corpType: customerParameter.code}).then(res => {
+      customerList({corpType: 'JXS'}).then(res => {
         const column = this.findObject(this.option.column, "parentId");
         column.dicData = res.data.data.records;
       });
@@ -189,7 +189,7 @@ export default {
       const {createTimeA} = this.query;
       let values = {
         ...params,
-        corpType: customerParameter.code,
+        corpType: 'JXS',
         size: this.page.pageSize,
         current: this.page.currentPage
       };

+ 4 - 4
src/views/fc/customer/detailsPage.vue

@@ -557,7 +557,7 @@ export default {
       for (let item in this.data) {
         if (index != item) {
           if (this.data[item].defaultAddres == 1) {
-            this.$message.warning("默认地址只能唯一");
+            this.$message.warning("开启默认地址");
             return (row.defaultAddres = 0);
           }
         }
@@ -601,7 +601,7 @@ export default {
       });
     },
     getAllWorkDicts() {
-      customerList({ corpType: "KH" }).then(res => {
+      customerList({ corpType: "JXS" }).then(res => {
         this.findObject(this.option4.column, "parentId").dicData = res.data.data.records;
       });
       this.findObject(this.option2.column, "belongtoarea").dicData = JSON.parse(localStorage.getItem("areaTypeTree"))
@@ -690,7 +690,7 @@ export default {
       // this.form4 = this.$options.data().form4
     },
     getCorpType() {
-      getCorpType({ corpType: "KH" }).then(res => {
+      getCorpType({ corpType: "JXS" }).then(res => {
         this.corpTypeList = res.data.data;
       });
     },
@@ -713,7 +713,7 @@ export default {
           submit({
             ...this.form,
             code: this.form.cname,
-            corpType: "KH",
+            corpType: "JXS",
             corpsAddrList: this.data,
             corpsFilesList: this.corpsFiles,
             corpsAttnList: this.contactsData,

+ 12 - 5
src/views/fc/customer/index.vue

@@ -3,7 +3,7 @@
     <basic-container v-show="show" class="page-crad">
       <el-row>
         <el-col :span="4">
-          <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;" @save="corpTypeVisible = true">
+          <avue-tree ref="tree" :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;" @save="corpTypeVisible = true">
             <template slot="addBtn">
               <el-tooltip class="item" effect="dark" content="新建分类" placement="top">
                 <i class="el-icon-setting" style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;" @click="corpTypeVisible = true"></i>
@@ -19,6 +19,7 @@
             :page.sync="page"
             :search.sync="search"
             @search-change="searchChange"
+            @search-reset="searchReset"
             @current-change="currentChange"
             @size-change="sizeChange"
             @refresh-change="refreshChange"
@@ -121,6 +122,7 @@
 </template>
 
 <script>
+// @ts-nocheck
 import detailsPage from "./detailsPage.vue";
 import {getList, getCorpType, remove, customerList, submit, delCustomer} from "@/api/fc/customerInformation";
 import corpType from "./components/index.vue";
@@ -316,7 +318,7 @@ export default {
           {
             label: "上级类型",
             prop: "parentId",
-            dicUrl: "/api/gubersail-admin/corpstype/page?corpType=KH",
+            dicUrl: "/api/gubersail-admin/corpstype/page?corpType=JXS",
             type: "tree",
             props: {
               label: "cname",
@@ -608,10 +610,10 @@ export default {
       this.onLoad(this.page, this.search);
     },
     getAllWorkDicts() {
-      getCorpType({ corpType: "KH" }).then(res => {
+      getCorpType({ corpType: "JXS" }).then(res => {
         this.treeData = res.data.data;
       });
-      customerList({ corpType: "KH" }).then(res => {
+      customerList({ corpType: "JXS" }).then(res => {
         this.findObject(this.option4.column, "parentId").dicData = res.data.data.records;
       });
       this.$refs.crud.init();
@@ -628,6 +630,11 @@ export default {
       this.onLoad(this.page, params);
       done();
     },
+    searchReset() {
+      this.$refs.tree.setCurrentKey(null);
+      this.search = this.$options.data().search;
+      this.onLoad(this.page);
+    },
     refreshChange() {
       this.onLoad(this.page, this.search);
     },
@@ -645,7 +652,7 @@ export default {
         data.endTime = data.date[1];
       }
       delete data.date;
-      data.corpType = "KH";
+      data.corpType = "JXS";
       this.loading = true;
       getList({
         current: page.currentPage,

+ 9 - 2
src/views/store/detailsPage.vue

@@ -96,6 +96,9 @@
               :remote="true"
               dataName="label"
               :disabled="option.disabled"
+              @selectChange="dicChange('label', $event)"
+              :multiple="true"
+              dataType="string"
             ></dic-select>
           </tempalte>
           <tempalte slot="brandName">
@@ -601,9 +604,10 @@ export default {
             dicData: [],
             dataType: "string",
             type: "cascader",
+            emitPath:false,
             props: {
               label: "name",
-              value: "name",
+              value: "code",
             },
             rules: [
               {
@@ -830,6 +834,9 @@ export default {
           this.form.deliveryWarehouseName = null;
         }
       }
+      if(name=='label'){
+        this.form.label=row.names
+      }
     },
     // 启用或禁用
     editEnable() {
@@ -852,7 +859,7 @@ export default {
       for (let item in this.data) {
         if (index != item) {
           if (this.data[item].defaultAddres == 1) {
-            this.$message.warning("默认地址只能唯一");
+            this.$message.warning("开启默认地址");
             return (row.defaultAddres = 0);
           }
         }

+ 11 - 8
src/views/store/index.vue

@@ -4,6 +4,7 @@
       <el-row>
         <el-col :span="4">
           <avue-tree
+            ref="tree"
             :option="treeOption"
             :data="treeData"
             @node-click="nodeClick"
@@ -29,6 +30,7 @@
             :page.sync="page"
             :search.sync="search"
             @search-change="searchChange"
+            @search-reset="searchReset"
             @current-change="currentChange"
             @size-change="sizeChange"
             @refresh-change="refreshChange"
@@ -38,7 +40,7 @@
             @search-criteria-switch="searchCriteriaSwitch"
           >
             <template slot="menuLeft">
-              <el-button type="primary" size="mini"  icon="el-icon-plus" @click.stop="newAdd()">新建客户 </el-button>
+              <el-button type="primary" size="mini" icon="el-icon-plus" @click.stop="newAdd()">新建客户 </el-button>
               <!-- <el-button type="primary" size="mini" icon="el-icon-bottom" @click="excelBox = true">导入 </el-button>
               <el-button type="primary" size="mini" icon="el-icon-top" @click="outExport">导出 </el-button>
               <el-button type="primary" size="mini" icon="el-icon-download" @click="brandBox = true">
@@ -80,11 +82,7 @@
                 @click.stop="passThrough(row, '驳回')"
                 >驳回
               </el-button> -->
-              <el-button
-                :size="size"
-                :type="type"
-                :disabled="row.enableOrNot == 1"
-                @click.stop="rowDel(row)"
+              <el-button :size="size" :type="type" :disabled="row.enableOrNot == 1" @click.stop="rowDel(row)"
                 >删除
               </el-button>
             </template>
@@ -94,7 +92,7 @@
     </basic-container>
     <details-page v-if="!show" @goBack="goBack()" :detailData="detailData" />
     <el-dialog
-      title="设置客户分类"
+      title="设置门店分类"
       v-dialogDrag
       :visible.sync="corpTypeVisible"
       class="avue-dialog"
@@ -673,7 +671,7 @@ export default {
       customerList({ corpType: "KH" }).then((res) => {
         this.findObject(this.option4.column, "parentId").dicData = res.data.data.records;
       });
-      this.$refs.crud.init();
+      // this.$refs.crud.init();
     },
     searchCriteriaSwitch(type) {
       this.$refs.crud.getTableHeight();
@@ -687,6 +685,11 @@ export default {
       this.onLoad(this.page, params);
       done();
     },
+    searchReset() {
+      this.$refs.tree.setCurrentKey(null);
+      this.search = this.$options.data().search;
+      this.onLoad(this.page);
+    },
     refreshChange() {
       this.onLoad(this.page, this.search);
     },