Sfoglia il codice sorgente

提货人管理列表bug修改

chen 3 anni fa
parent
commit
eb7654fd51

+ 11 - 0
src/views/basic_data/dealer/dealer_deposit.vue

@@ -353,6 +353,17 @@ export default {
     },
     //取消
     async cancelFn() {
+      this.dialogForm = {
+        amount: "",
+        customerId: "",
+        customerName: "",
+        customerNumber: "",
+        endTime: "",
+
+        rate: "",
+        remark: "",
+        startTime: "",
+      };
       await this.$refs.dialogForm.resetFields();
       this.showDialog = false;
     },

+ 15 - 11
src/views/basic_data/taker/taker_car.vue

@@ -283,6 +283,7 @@ export default {
   },
   async created() {
     this.getDataList({ pageNum: 1, pageSize: 10 });
+    this.getDealerDataList({ pageNum: 1, pageSize: 10 });
   },
   methods: {
     // 筛选部分数据或者单个
@@ -304,20 +305,23 @@ export default {
     },
     //取消
     async cancelFn() {
-      this.addForm = {
-        customerId: "",
-        mobile: "",
-        carType: "",
-        volume: "",
-        carBrand: "",
-      };
-      await this.$refs.addForm.resetFields();
+      if (this.addForm.id) {
+        this.addForm = {
+          customerId: "",
+          mobile: "",
+          carType: "",
+          volume: "",
+          carBrand: "",
+        };
+      } else {
+        await this.$refs.addForm.resetFields();
+      }
       this.dialogForm = false;
     },
     //编辑
     editFn(data) {
-      this.dialogForm = true;
       this.addForm = data;
+      this.dialogForm = true;
     },
     //重置
     clearFn() {
@@ -348,7 +352,7 @@ export default {
       this.dealerList = res.data.records;
     },
     //新增
-    addDataList() {
+    async addDataList() {
       this.addForm = {
         customerId: "",
         mobile: "",
@@ -356,8 +360,8 @@ export default {
         volume: "",
         carBrand: "",
       };
+
       this.dialogForm = true;
-      this.getDealerDataList({ pageNum: 1, pageSize: 10 });
     },
     async addDataListFn() {
       await this.$refs.addForm.validate();

+ 14 - 10
src/views/basic_data/taker/taker_list.vue

@@ -415,17 +415,21 @@ export default {
 
     //取消
     cancelFn() {
-      this.addForm = {
-        customerId: "",
-        takerName: "",
-        identity: "",
-        phone: "",
+      if (this.addForm.id) {
+        this.addForm = {
+          customerId: "",
+          takerName: "",
+          identity: "",
+          phone: "",
+
+          sparePhone: "",
+          expireTime: "",
+          code: "",
+        };
+      } else {
+        this.$refs.addForm.resetFields();
+      }
 
-        sparePhone: "",
-        expireTime: "",
-        code: "",
-      };
-      this.$refs.addForm.resetFields();
       this.dialogForm = false;
     },
     //上传