瀏覽代碼

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie 3 年之前
父節點
當前提交
45405f4723

+ 0 - 2
src/util/columnSetting.js

@@ -19,7 +19,6 @@ export async function getColumnData(columnKey, mainOption) {
   return option
 }
 export async function saveColumnData(columnKey, option) {
-  console.log('111111')
   let res = await saveColumn({
     fileName: columnKey,
     jsonMessage: JSON.stringify(option)
@@ -32,7 +31,6 @@ export async function saveColumnData(columnKey, option) {
   }
 }
 export async function delColumnData(columnKey, option) {
-  console.log('111111')
   let res = await delColumn({
     fileName: columnKey
   })

+ 1 - 0
src/views/basicData/commodityCategory/index.vue

@@ -13,6 +13,7 @@
       @row-save="rowSave"
       @search-change="searchChange"
       @search-reset="searchReset"
+
       @selection-change="selectionChange"
       @current-change="currentChange"
       @size-change="sizeChange"

+ 35 - 1
src/views/basicData/customerCategory/index.vue

@@ -18,6 +18,8 @@
       @current-change="currentChange"
       @size-change="sizeChange"
       @refresh-change="refreshChange"
+      @saveColumn="saveColumn"
+      @resetColumn="resetColumn"
       @on-load="onLoad"
       @tree-load="treeLoad"
     >
@@ -61,7 +63,9 @@ export default {
       query: {}
     };
   },
-  created() {},
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(141), option);
+  },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
@@ -210,6 +214,36 @@ export default {
           this.loading = false;
         });
     },
+    async saveColumn() {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(
+        this.getColumnName(141),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(this.getColumnName(141), option);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
     //树桩列点击展开触发
     treeLoad(tree, treeNode, resolve) {
       const parentId = tree.id;

+ 125 - 13
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -229,9 +229,12 @@
         <containerTitle title="客户联系人"></containerTitle>
         <basic-container>
           <avue-crud
+            ref="crud"
             :option="customerContact"
             v-model="contactsForm"
             :data="contactsData"
+            @saveColumn="saveColumn"
+            @resetColumn="resetColumn"
             @row-save="rowSave"
             @row-update="rowUpdate"
             @row-del="rowDel"
@@ -261,9 +264,12 @@
         <containerTitle title="客户开户行"></containerTitle>
         <basic-container>
           <avue-crud
+            ref="crud2"
             :option="bankOfDeposit"
             v-model="bankOfDepositForm"
             :data="bankOfDepositData"
+            @saveColumn="saveColumn2"
+            @resetColumn="resetColumn2"
             @row-save="rowSaveBankOfDeposit"
             @row-update="rowUpdateBankOfDeposit"
             @row-del="rowDelBankOfDeposit"
@@ -272,9 +278,12 @@
         <containerTitle title="收发货地址"></containerTitle>
         <basic-container>
           <avue-crud
+            ref="crud3"
             :option="addressOption"
             v-model="addressForm"
             :data="addressData"
+            @saveColumn="saveColumn3"
+            @resetColumn="resetColumn3"
             @row-save="rowSaveAddress"
             @row-update="rowUpdateAddress"
             @row-del="rowDelAddress"
@@ -353,7 +362,7 @@ export default {
       userList: [],
       formData: {},
       formDataTwo: {},
-      creditRatingList:[],
+      creditRatingList: [],
       optionData: {
         span: 8,
         menuBtn: false,
@@ -470,9 +479,9 @@ export default {
       bankOfDepositData: [],
       dic: [],
       dicArea: [],
-      customerContact: customerContact,
+      customerContact: {},
       advantageProject: advantageProject,
-      bankOfDeposit: bankOfDeposit,
+      bankOfDeposit: {},
       contactInformation: {
         column: [
           {
@@ -812,12 +821,12 @@ export default {
           {
             label: "信用等级",
             prop: "creditRating",
-            span: 8,
+            span: 8
           },
           {
             label: "代理商编码",
             prop: "agentCode",
-            span: 8,
+            span: 8
           },
           // {
           //   label: "总返利",
@@ -854,7 +863,7 @@ export default {
         ]
       },
       paymentOption: [],
-      addressOption: addressOption,
+      addressOption: {},
       addressForm: {},
       addressData: [],
       formRow: {},
@@ -876,10 +885,22 @@ export default {
   components: {
     flowDialog
   },
-  created() {
+  async created() {
+    this.customerContact = await this.getColumnData(
+      this.getColumnName(143),
+      customerContact
+    );
+    this.bankOfDeposit = await this.getColumnData(
+      this.getColumnName(144),
+      bankOfDeposit
+    );
+    this.addressOption = await this.getColumnData(
+      this.getColumnName(145),
+      addressOption
+    );
     if (!website.tenantMode) {
       this.initData(website.tenantId);
-    }else {
+    } else {
       this.initData();
     }
     if (this.$store.getters.userInfo.tenant_id === "096359") {
@@ -1001,9 +1022,14 @@ export default {
           });
         }
       });
-      this.addressLatLng= this.addressLatLng.filter((currentValue, currentIndex, selfArr) => {
-        return selfArr.findIndex(x=>x.name === currentValue.name) === currentIndex
-      });
+      this.addressLatLng = this.addressLatLng.filter(
+        (currentValue, currentIndex, selfArr) => {
+          return (
+            selfArr.findIndex(x => x.name === currentValue.name) ===
+            currentIndex
+          );
+        }
+      );
     },
     //确认创建用户
     confirmSynchronizationTwo() {
@@ -1220,9 +1246,11 @@ export default {
                 );
               }
               this.form = res.data.data;
-              this.contactsData = res.data.data.corpsAttnList
+              this.contactsData = res.data.data.corpsAttnList;
               if (this.form.belongtoarea) {
-                this.form.belongtoarea = this.form.belongtoarea.split(",").map(item => item.split("/"));
+                this.form.belongtoarea = this.form.belongtoarea
+                  .split(",")
+                  .map(item => item.split("/"));
               }
               this.disabled = false;
             }
@@ -1235,6 +1263,90 @@ export default {
     synchronization() {
       this.dialogVisible = true;
     },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(143),
+        this.customerContact
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.customerContact = customerContact;
+      const inSave = await this.delColumnData(
+        this.getColumnName(143),
+        customerContact
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async saveColumn2() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(144),
+        this.bankOfDeposit
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud2.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud2.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn2() {
+      this.bankOfDeposit = bankOfDeposit;
+      const inSave = await this.delColumnData(
+        this.getColumnName(144),
+        bankOfDeposit
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud2.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud2.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async saveColumn3() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(145),
+        this.addressOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud3.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud3.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn3() {
+      this.addressOption = addressOption;
+      const inSave = await this.delColumnData(
+        this.getColumnName(145),
+        addressOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud3.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud3.$refs.dialogColumn.columnBox = false;
+      }
+    },
     //确认同步
     confirmSynchronization() {
       this.$refs["formData"].validate((valid, done) => {

+ 4 - 3
src/views/basicData/customerInformation/index.vue

@@ -240,7 +240,8 @@ export default {
       }
     }
   },
-  created() {
+ async created() {
+    this.option = await this.getColumnData(this.getColumnName(142), option);
     gainUser().then(res => {
       this.findObject(this.option.column, "adminProfiles").dicData =
         res.data.data;
@@ -428,7 +429,7 @@ export default {
     },
     async saveColumn() {
       const inSave = await this.saveColumnData(
-        this.getColumnName(108),
+        this.getColumnName(142),
         this.option
       );
       if (inSave) {
@@ -442,7 +443,7 @@ export default {
     },
     async resetColumn() {
       this.option = option;
-      const inSave = await this.delColumnData(this.getColumnName(108), option);
+      const inSave = await this.delColumnData(this.getColumnName(142), option);
       if (inSave) {
         this.$nextTick(() => {
           this.$refs.crud.doLayout();

+ 124 - 13
src/views/basicData/customerManagement/companyMaterial/detailsPageEdit.vue

@@ -167,9 +167,12 @@
         <containerTitle title="客户联系人"></containerTitle>
         <basic-container>
           <avue-crud
+            ref="crud"
             :option="customerContact"
             v-model="contactsForm"
             :data="contactsData"
+            @saveColumn="saveColumn"
+            @resetColumn="resetColumn"
             @row-save="rowSave"
             @row-update="rowUpdate"
             @row-del="rowDel"
@@ -189,9 +192,12 @@
         <containerTitle title="客户开户行"></containerTitle>
         <basic-container>
           <avue-crud
+            ref="crud2"
             :option="bankOfDeposit"
             v-model="bankOfDepositForm"
             :data="bankOfDepositData"
+            @saveColumn="saveColumn2"
+            @resetColumn="resetColumn2"
             @row-save="rowSaveBankOfDeposit"
             @row-update="rowUpdateBankOfDeposit"
             @row-del="rowDelBankOfDeposit"
@@ -200,9 +206,12 @@
         <containerTitle title="收发货地址"></containerTitle>
         <basic-container>
           <avue-crud
+            ref="crud3"
             :option="addressOption"
             v-model="addressForm"
             :data="addressData"
+            @saveColumn="saveColumn3"
+            @resetColumn="resetColumn3"
             @row-save="rowSaveAddress"
             @row-update="rowUpdateAddress"
             @row-del="rowDelAddress"
@@ -253,13 +262,13 @@ export default {
       dic: [],
       dicArea: [],
       props: {
-        value: 'name',
-        label: 'name',
-        multiple: true,
+        value: "name",
+        label: "name",
+        multiple: true
       },
-      customerContact: customerContact,
+      customerContact: {},
       advantageProject: advantageProject,
-      bankOfDeposit: bankOfDeposit,
+      bankOfDeposit: {},
       contactInformation: {
         column: [
           {
@@ -544,7 +553,7 @@ export default {
         ]
       },
       paymentOption: [],
-      addressOption: addressOption,
+      addressOption: {},
       addressForm: {},
       addressData: []
     };
@@ -557,7 +566,19 @@ export default {
   components: {
     flowDialog
   },
-  created() {
+  async created() {
+    this.customerContact = await this.getColumnData(
+      this.getColumnName(151),
+      customerContact
+    );
+    this.bankOfDeposit = await this.getColumnData(
+      this.getColumnName(152),
+      bankOfDeposit
+    );
+    this.addressOption = await this.getColumnData(
+      this.getColumnName(153),
+      addressOption
+    );
     corpstypeTree({ corpType: companyParameter.code }).then(res => {
       this.dic = res.data.data;
     });
@@ -577,14 +598,16 @@ export default {
         this.bankOfDepositData = this.form.corpsBankList;
         this.advantageProjectData = this.form.corpsItems;
         if (this.form.belongtoarea) {
-          this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+          this.form.belongtoarea = this.form.belongtoarea
+            .split(",")
+            .map(item => item.split("/"));
         }
         delete this.form.corpsAttnList;
         delete this.form.corpsBankList;
         delete this.form.corpsItems;
       });
     } else if (this.detailData.treeDeptId) {
-      this.$set(this.form, 'corpsTypeId', this.detailData.treeDeptId)
+      this.$set(this.form, "corpsTypeId", this.detailData.treeDeptId);
     }
     gainUser().then(res => {
       this.userList = res.data.data;
@@ -706,7 +729,9 @@ export default {
           }
           this.disabled = true;
           if (this.form.belongtoarea) {
-            this.form.belongtoarea = this.form.belongtoarea.map(e => e.join('/')).join(',')
+            this.form.belongtoarea = this.form.belongtoarea
+              .map(e => e.join("/"))
+              .join(",");
           }
           if (this.form.adminProfiles) {
             this.form.adminProfiles = this.form.adminProfiles.join(",");
@@ -725,9 +750,11 @@ export default {
                 type: "success",
                 message: this.form.id ? "修改成功!" : "新增成功!"
               });
-              this.form = res.data.data
+              this.form = res.data.data;
               if (this.form.belongtoarea) {
-                this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+                this.form.belongtoarea = this.form.belongtoarea
+                  .split(",")
+                  .map(item => item.split("/"));
               }
               this.disabled = false;
             }
@@ -738,7 +765,7 @@ export default {
       });
     },
     backToList() {
-       this.$emit("goBack");
+      this.$emit("goBack");
     },
     openFlow() {
       this.switchDialog = !this.switchDialog;
@@ -755,6 +782,90 @@ export default {
     rowUpdateAddress(row, index, done, loading) {
       done(row);
     },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(151),
+        this.customerContact
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.customerContact = customerContact;
+      const inSave = await this.delColumnData(
+        this.getColumnName(151),
+        customerContact
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async saveColumn2() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(152),
+        this.bankOfDeposit
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud2.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud2.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn2() {
+      this.bankOfDeposit = bankOfDeposit;
+      const inSave = await this.delColumnData(
+        this.getColumnName(152),
+        bankOfDeposit
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud2.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud2.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async saveColumn3() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(153),
+        this.addressOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud3.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud3.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn3() {
+      this.addressOption = addressOption;
+      const inSave = await this.delColumnData(
+        this.getColumnName(153),
+        addressOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud3.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud3.$refs.dialogColumn.columnBox = false;
+      }
+    },
     //删除收发货地址优势项目触发
     rowDelAddress(row, index, donerowDel) {
       this.$confirm("确定将选择数据删除?", {

+ 35 - 7
src/views/basicData/customerManagement/companyMaterial/index.vue

@@ -34,6 +34,8 @@
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
+              @saveColumn="saveColumn"
+              @resetColumn="resetColumn"
               @on-load="onLoad"
               @search-criteria-switch="searchCriteriaSwitch"
               @tree-load="treeLoad"
@@ -187,11 +189,11 @@ export default {
           children: "children"
         }
       },
-        page: {
+      page: {
         pageSize: 20,
         currentPage: 1,
         total: 0,
-        pageSizes: [10,20,30,40,50, 100, 200, 300, 400, 500]
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
       excelBox: false,
       excelLoading: false,
@@ -234,7 +236,8 @@ export default {
       }
     }
   },
-  created() {
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(150), option);
     gainUser().then(res => {
       this.findObject(this.option.column, "adminProfiles").dicData =
         res.data.data;
@@ -282,9 +285,9 @@ export default {
       })
         .then(() => {
           return deleteDetails({
-            id:row.id,
-            corpsTypeId:row.corpsTypeId,
-            corpType:'GS'
+            id: row.id,
+            corpsTypeId: row.corpsTypeId,
+            corpType: "GS"
           });
         })
         .then(() => {
@@ -341,7 +344,7 @@ export default {
       this.show = false;
       this.detailData = {
         treeDeptId: this.treeDeptId
-      }
+      };
     },
     editOpen(row, status) {
       this.detailData = {
@@ -405,6 +408,31 @@ export default {
       }
       this.$refs.crud.getTableHeight();
     },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(150),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(this.getColumnName(150), option);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
     //树桩列点击展开触发
     treeLoad(tree, treeNode, resolve) {
       const parentId = tree.id;

+ 44 - 13
src/views/basicData/customerManagement/companyType/index.vue

@@ -18,6 +18,8 @@
       @current-change="currentChange"
       @size-change="sizeChange"
       @refresh-change="refreshChange"
+      @saveColumn="saveColumn"
+      @resetColumn="resetColumn"
       @on-load="onLoad"
       @tree-load="treeLoad"
     >
@@ -52,16 +54,18 @@ export default {
       loading: false,
       parentId: 0,
       dataList: [],
-           page: {
+      page: {
         pageSize: 20,
         currentPage: 1,
         total: 0,
-        pageSizes: [10,20,30,40,50, 100, 200, 300, 400, 500]
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
       query: {}
     };
   },
-  created() {},
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(154), option);
+  },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
@@ -121,7 +125,7 @@ export default {
     },
     //查询全部
     initData() {
-      customerList({corpType: companyParameter.code}).then(res => {
+      customerList({ corpType: companyParameter.code }).then(res => {
         const column = this.findObject(this.option.column, "parentId");
         column.dicData = res.data.data.records;
       });
@@ -198,15 +202,42 @@ export default {
         values.createTimeA = null;
       }
       values.parentId = 0;
-      customerList(values).then(res => {
-        this.dataList = res.data.data.records;
-        this.page.total = res.data.data.total;
-        if (this.page.total || this.page.total === 0) {
-          this.option.height = window.innerHeight - 210;
-        }
-      }).finally(()=>{
-        this.loading = false;
-      })
+      customerList(values)
+        .then(res => {
+          this.dataList = res.data.data.records;
+          this.page.total = res.data.data.total;
+          if (this.page.total || this.page.total === 0) {
+            this.option.height = window.innerHeight - 210;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(154),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(this.getColumnName(154), option);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
     },
     //树桩列点击展开触发
     treeLoad(tree, treeNode, resolve) {

+ 143 - 30
src/views/basicData/customerManagement/supplierMaterial/detailsPageEdit.vue

@@ -83,17 +83,17 @@
                   </el-option>
                 </el-select>
                 <el-select
-                    v-else-if="item.prop === 'creditRating'"
-                    size="small"
-                    style="width: 100%;"
-                    v-model="form[item.prop]"
-                    placeholder=""
+                  v-else-if="item.prop === 'creditRating'"
+                  size="small"
+                  style="width: 100%;"
+                  v-model="form[item.prop]"
+                  placeholder=""
                 >
                   <el-option
-                      v-for="item in creditRatingList"
-                      :key="item.id"
-                      :label="item.dictValue"
-                      :value="item.dictValue"
+                    v-for="item in creditRatingList"
+                    :key="item.id"
+                    :label="item.dictValue"
+                    :value="item.dictValue"
                   >
                   </el-option>
                 </el-select>
@@ -187,9 +187,12 @@
         <containerTitle title="客户联系人"></containerTitle>
         <basic-container>
           <avue-crud
+            ref="crud"
             :option="customerContact"
             v-model="contactsForm"
             :data="contactsData"
+            @saveColumn="saveColumn"
+            @resetColumn="resetColumn"
             @row-save="rowSave"
             @row-update="rowUpdate"
             @row-del="rowDel"
@@ -209,9 +212,12 @@
         <containerTitle title="客户开户行"></containerTitle>
         <basic-container>
           <avue-crud
+            ref="crud2"
             :option="bankOfDeposit"
             v-model="bankOfDepositForm"
             :data="bankOfDepositData"
+            @saveColumn="saveColumn2"
+            @resetColumn="resetColumn2"
             @row-save="rowSaveBankOfDeposit"
             @row-update="rowUpdateBankOfDeposit"
             @row-del="rowDelBankOfDeposit"
@@ -220,9 +226,12 @@
         <containerTitle title="收发货地址"></containerTitle>
         <basic-container>
           <avue-crud
+            ref="crud3"
             :option="addressOption"
             v-model="addressForm"
             :data="addressData"
+            @saveColumn="saveColumn3"
+            @resetColumn="resetColumn3"
             @row-save="rowSaveAddress"
             @row-update="rowUpdateAddress"
             @row-del="rowDelAddress"
@@ -248,7 +257,7 @@ import {
   corpsfiles,
   corpsitem,
   areaTypeTree,
-  corpsAddrDelete,
+  corpsAddrDelete
 } from "@/api/basicData/customerInformation";
 import customerContact from "./configuration/customerContact.json";
 import advantageProject from "./configuration/advantageProject.json";
@@ -265,7 +274,7 @@ export default {
       form: {},
       disabled: false,
       contactsForm: {},
-      creditRatingList:[],
+      creditRatingList: [],
       advantageProjectForm: {},
       bankOfDepositForm: {},
       contactsData: [],
@@ -274,13 +283,13 @@ export default {
       dic: [],
       dicArea: [],
       props: {
-        value: 'name',
-        label: 'name',
-        multiple: true,
+        value: "name",
+        label: "name",
+        multiple: true
       },
-      customerContact: customerContact,
-      advantageProject: advantageProject,
-      bankOfDeposit: bankOfDeposit,
+      customerContact: {},
+      advantageProject:advantageProject,
+      bankOfDeposit: {},
       contactInformation: {
         column: [
           {
@@ -564,10 +573,11 @@ export default {
             mock: {
               type: "county"
             }
-          },{
+          },
+          {
             label: "信用等级",
             prop: "creditRating",
-            span: 8,
+            span: 8
           },
           {
             label: "备注",
@@ -580,12 +590,12 @@ export default {
         ]
       },
       paymentOption: [],
-      addressOption: addressOption,
+      addressOption: {},
       addressForm: {},
       addressData: []
     };
   },
-    props: {
+  props: {
     detailData: {
       type: Object
     }
@@ -593,7 +603,19 @@ export default {
   components: {
     flowDialog
   },
-  created() {
+  async created() {
+    this.customerContact = await this.getColumnData(
+      this.getColumnName(147),
+      customerContact
+    );
+    this.bankOfDeposit = await this.getColumnData(
+      this.getColumnName(148),
+      bankOfDeposit
+    );
+    this.addressOption = await this.getColumnData(
+      this.getColumnName(149),
+      addressOption
+    );
     corpstypeTree({ corpType: supplierParameter.code }).then(res => {
       this.dic = res.data.data;
     });
@@ -615,9 +637,12 @@ export default {
         this.contactsData = this.form.corpsAttnList;
         this.bankOfDepositData = this.form.corpsBankList;
         this.advantageProjectData = this.form.corpsItems;
-        this.addressData = this.form.corpsAddrList.length > 0?this.form.corpsAddrList: [];
+        this.addressData =
+          this.form.corpsAddrList.length > 0 ? this.form.corpsAddrList : [];
         if (this.form.belongtoarea) {
-          this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+          this.form.belongtoarea = this.form.belongtoarea
+            .split(",")
+            .map(item => item.split("/"));
         }
         delete this.form.corpsAttnList;
         delete this.form.corpsBankList;
@@ -625,7 +650,7 @@ export default {
         delete this.form.corpsAddrList;
       });
     } else if (this.detailData.treeDeptId) {
-      this.$set(this.form, 'corpsTypeId', this.detailData.treeDeptId)
+      this.$set(this.form, "corpsTypeId", this.detailData.treeDeptId);
     }
     gainUser().then(res => {
       this.userList = res.data.data;
@@ -748,7 +773,9 @@ export default {
           }
           this.disabled = true;
           if (this.form.belongtoarea) {
-            this.form.belongtoarea = this.form.belongtoarea.map(e => e.join('/')).join(',')
+            this.form.belongtoarea = this.form.belongtoarea
+              .map(e => e.join("/"))
+              .join(",");
           }
           if (this.form.adminProfiles) {
             this.form.adminProfiles = this.form.adminProfiles.join(",");
@@ -767,9 +794,11 @@ export default {
                 type: "success",
                 message: this.form.id ? "修改成功!" : "新增成功!"
               });
-              this.form = res.data.data
+              this.form = res.data.data;
               if (this.form.belongtoarea) {
-                this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+                this.form.belongtoarea = this.form.belongtoarea
+                  .split(",")
+                  .map(item => item.split("/"));
               }
               this.disabled = false;
             }
@@ -780,7 +809,7 @@ export default {
       });
     },
     backToList() {
-       this.$emit("goBack");
+      this.$emit("goBack");
     },
     openFlow() {
       this.switchDialog = !this.switchDialog;
@@ -797,6 +826,90 @@ export default {
     rowUpdateAddress(row, index, done, loading) {
       done(row);
     },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(147),
+        this.customerContact
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.customerContact = customerContact;
+      const inSave = await this.delColumnData(
+        this.getColumnName(147),
+        customerContact
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async saveColumn2() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(148),
+        this.bankOfDeposit
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud2.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud2.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn2() {
+      this.bankOfDeposit = bankOfDeposit;
+      const inSave = await this.delColumnData(
+        this.getColumnName(148),
+        bankOfDeposit
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud2.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud2.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async saveColumn3() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(149),
+        this.addressOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud3.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud3.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn3() {
+      this.addressOption = addressOption;
+      const inSave = await this.delColumnData(
+        this.getColumnName(149),
+        addressOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud3.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud3.$refs.dialogColumn.columnBox = false;
+      }
+    },
     //删除收发货地址优势项目触发
     rowDelAddress(row, index, donerowDel) {
       this.$confirm("确定将选择数据删除?", {
@@ -820,7 +933,7 @@ export default {
           this.addressData.splice(index, 1);
         }
       });
-    },
+    }
   }
 };
 </script>

+ 36 - 8
src/views/basicData/customerManagement/supplierMaterial/index.vue

@@ -34,6 +34,8 @@
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
+              @saveColumn="saveColumn"
+              @resetColumn="resetColumn"
               @on-load="onLoad"
               @tree-load="treeLoad"
               @search-criteria-switch="searchCriteriaSwitch"
@@ -84,7 +86,7 @@
                 <span>{{ row.belongCompany }}</span>
               </template>
             </avue-crud>
-              <report-dialog
+            <report-dialog
               :switchDialog="switchDialog"
               reportName="客户资料-客户资料"
               @onClose="onClose()"
@@ -95,7 +97,7 @@
               reportName="客户信息"
               corpType="GYS"
               @onClose="onClose()"
-             v-else
+              v-else
             ></report-dialog>
             <el-dialog
               title="导入供应商"
@@ -195,7 +197,7 @@ export default {
         pageSize: 20,
         currentPage: 1,
         total: 0,
-        pageSizes: [10,20,30,40,50, 100, 200, 300, 400, 500]
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
       excelBox: false,
       excelLoading: false,
@@ -238,7 +240,8 @@ export default {
       }
     }
   },
-  created() {
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(146), option);
     gainUser().then(res => {
       this.findObject(this.option.column, "adminProfiles").dicData =
         res.data.data;
@@ -286,9 +289,9 @@ export default {
       })
         .then(() => {
           return deleteDetails({
-            id:row.id,
-            corpsTypeId:row.corpsTypeId,
-            corpType:'GYS'
+            id: row.id,
+            corpsTypeId: row.corpsTypeId,
+            corpType: "GYS"
           });
         })
         .then(() => {
@@ -345,7 +348,7 @@ export default {
       this.show = false;
       this.detailData = {
         treeDeptId: this.treeDeptId
-      }
+      };
     },
     editOpen(row, status) {
       this.detailData = {
@@ -425,6 +428,31 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(146),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(this.getColumnName(146), option);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
     goBack() {
       this.detailData = this.$options.data().detailData;
       this.show = true;

+ 43 - 12
src/views/basicData/customerManagement/supplierType/index.vue

@@ -18,6 +18,8 @@
       @current-change="currentChange"
       @size-change="sizeChange"
       @refresh-change="refreshChange"
+      @saveColumn="saveColumn"
+      @resetColumn="resetColumn"
       @on-load="onLoad"
       @tree-load="treeLoad"
     >
@@ -56,12 +58,14 @@ export default {
         pageSize: 20,
         currentPage: 1,
         total: 0,
-        pageSizes: [10,20,30,40,50, 100, 200, 300, 400, 500]
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
       query: {}
     };
   },
-  created() {},
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(155), option);
+  },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
@@ -121,7 +125,7 @@ export default {
     },
     //查询全部
     initData() {
-      customerList({corpType: supplierParameter.code}).then(res => {
+      customerList({ corpType: supplierParameter.code }).then(res => {
         const column = this.findObject(this.option.column, "parentId");
         column.dicData = res.data.data.records;
       });
@@ -198,15 +202,42 @@ export default {
         values.createTimeA = null;
       }
       values.parentId = 0;
-      customerList(values).then(res => {
-        this.dataList = res.data.data.records;
-        this.page.total = res.data.data.total;
-        if (this.page.total || this.page.total === 0) {
-          this.option.height = window.innerHeight - 210;
-        }
-      }).finally(()=>{
-        this.loading = false;
-      })
+      customerList(values)
+        .then(res => {
+          this.dataList = res.data.data.records;
+          this.page.total = res.data.data.total;
+          if (this.page.total || this.page.total === 0) {
+            this.option.height = window.innerHeight - 210;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(155),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(this.getColumnName(155), option);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
     },
     //树桩列点击展开触发
     treeLoad(tree, treeNode, resolve) {