Jelajahi Sumber

处理模板页面,表单数据为undefined时对象字段丢失问题

lph 1 tahun lalu
induk
melakukan
40c139a1ca

+ 0 - 1
zkqy-ui/src/views/orderMange/index.vue

@@ -851,7 +851,6 @@ import outBoundPrint from "@/utils/print/outBoundPrint";
 import { listCustomer } from "@/api/system/customer";
 import OutStock from "@/views/orderMange/components/dialogForm/OutStock.vue";
 import { numToCapital } from "@/utils/other";
-import { async } from "@/components/updateModule/k-form-design/lib/k-form-design.common";
 
 export default {
   name: "listInfo",

+ 4 - 3
zkqy-ui/src/views/tablelist/commonTable/listInfo.vue

@@ -1444,9 +1444,10 @@ export default {
         this.$refs.addFromRef
           .getData()
           .then(async (values) => {
-            // console.log("dragForm", values);
-
-            // return;
+            for (const key of Object.keys(values)) {
+              values[key] =
+                typeof values[key] == "undefined" ? "" : values[key];
+            }
             let data = {
               basicMap: {
                 tableName: this.tableName,