Эх сурвалжийг харах

处理魔板页面表单组数据回显问题

lph 1 жил өмнө
parent
commit
3d67c34daf

+ 37 - 7
zkqy-ui/src/components/FormGroup/formList.vue

@@ -143,19 +143,45 @@ export default {
     //   while (new Date().getTime() < unixtime_ms + ms) {}
     //   return "";
     // },
+
+    // 主动渲染数据
+    async activeRender(val) {
+      console.log("activeRender");
+      let temp = JSON.parse(JSON.stringify(val));
+      this.formArray = await this.disableHandler(temp);
+      // this.$nextTick(() => {
+      //   console.log("表单组渲染");
+      //   // setTimeout(() => {
+      //   //   console.log("倒计时结束");
+      //   this.setDefaultValue();
+      //   // }, 5000);
+      // });
+    },
     // 设置默认值
     setDefaultValue() {
-      console.log("开始渲染默认数据");
+      console.log(
+        "开始渲染默认数据",
+        JSON.parse(JSON.stringify(this.formArray)),
+        this.$refs
+      );
       this.formArray.forEach((item) => {
-        // for (const key of Object.keys(item.template?.defaultValue || {})) {
-        //   item.template.defaultValue[toUnderline(key)] =
-        //     item.template.defaultValue[key];
-        // }
-        this.defaultValue[item.tableName] = item.template?.defaultValue || {};
+        this.defaultValue[item.tableName] = item.template.defaultValue || {};
       });
+      console.log(
+        "this.defaultValue",
+        JSON.parse(JSON.stringify(this.defaultValue))
+      );
       for (const key in this.defaultValue) {
-        this.$refs[key][0]?.setData(this.defaultValue[key]);
+        console.log(JSON.parse(JSON.stringify(this.defaultValue[key])));
+        this.$refs[key][0].setData(this.defaultValue[key]);
       }
+      // setTimeout(() => {
+      //   console.log("倒计时结束,开始赋值");
+      //   this.$refs.sale_products[0].setData(this.defaultValue["sale_products"]);
+      // }, 1000);
+      // this.$nextTick(() => {
+      //   this.$forceUpdate();
+      // });
     },
     getUUID() {
       return uuidv4();
@@ -203,6 +229,10 @@ export default {
           // });
           // item.formInfo.jsonData = disableFormItem(item.formInfo.jsonData);
         });
+        this.$nextTick(() => {
+          console.log("表单组渲染");
+          this.setDefaultValue();
+        });
         resolve(formList);
       });
     },

+ 1 - 0
zkqy-ui/src/views/system/financialManage/saleAccountsReceivableDetail.vue

@@ -939,6 +939,7 @@ export default {
               id: row.id,
               otherCollectionId: row.otherCollectionId,
               customerId: row.customerId,
+              receivedAmount: row.receivedAmount,
             };
             let res = await rejectHandler(payload);
             if (res.code == 200) {

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 389 - 355
zkqy-ui/src/views/tablelist/commonTable/listInfo.vue


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно