ソースを参照

添加成功后默认启用

web100 2 年 前
コミット
4955dd4eea

+ 13 - 1
src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue

@@ -310,7 +310,7 @@ export default {
               trigger: "blur"
             }
           ]
-        }, 
+        },
         // {
         //   label: "共享公司",
         //   prop: "sharedCompany",
@@ -565,6 +565,11 @@ export default {
     this.getAllWorkDicts()
     this.getCorpTypeCk()
   },
+  activated() {
+    this.$nextTick(() => {
+      this.$refs.crud.doLayout()
+    })
+  },
   methods: {
     // 启用或禁用
     editEnable() {
@@ -686,6 +691,7 @@ export default {
     }
     ,
     addRow() {
+      console.log('1234');
       this.data.push({ $cellEdit: true })
     }
     ,
@@ -812,6 +818,12 @@ export default {
             this.data = res.data.data.corpsAddrList
             this.corpsFiles = res.data.data.corpsFilesList
             this.getDetail(res.data.data.id);
+            //添加成功后默认启用
+            let data = this.form
+            editenable({ id: res.data.data.id, enableOrNot: data.enableOrNot ? 0 : 1  }).then(res => {
+        this.$set(this.form, 'enableOrNot', data.enableOrNot == 1 ? 0 : 1)
+              
+            })
           }).finally(() => {
             this.loadingBtn = false;
           });

+ 6 - 3
src/views/tirePartsMall/basicData/customerInformation/js/optionList.js

@@ -218,12 +218,14 @@ export const option2 = {
         trigger: "blur"
       }
     ]
-  }, {
+  }, 
+  {
     label: "地址",
     prop: "belongtoarea",
     dicData: [],
     dataType: "string",
     type: "cascader",
+    // type: "async-cascader", // 修改为 "async-cascader"
     props: {
       label: 'name',
       value: 'name'
@@ -236,8 +238,9 @@ export const option2 = {
       }
     ],
     filterable: true,
-    cell: true
-  }, {
+    cell: true,
+  }, 
+  {
     label: '详细地址',
     prop: 'detailedAddress',
     cell: true,