Browse Source

jxst仓库维护

cz 2 years ago
parent
commit
564e6dd872

+ 3 - 2
src/components/WDLY/process/SendPurchaseWDLY.vue

@@ -476,13 +476,13 @@ const handleChangeSupplier = (val) => {
       productIdList: ids,
     })
     .then((res) => {
-      if (Object.keys(res).length > 0) {
+      if (res && Object.keys(res).length > 0) {
         for (let i = 0; i < formData.data.purchaseDetailList.length; i++) {
           const e = formData.data.purchaseDetailList[i];
           for (const key in res) {
             if (e.bussinessId === key) {
               e.price = Number(res[key]);
-            } else e.price = null;
+            }
           }
         }
       } else {
@@ -491,6 +491,7 @@ const handleChangeSupplier = (val) => {
           e.price = 0;
         }
       }
+      console.log(formData.data.purchaseDetailList, "ad");
       handleChangeAmount();
     });
 };

+ 5 - 10
src/views/JXSK/warehouseConfig/warehouse/index.vue

@@ -439,7 +439,7 @@ const submitFormOne = () => {
             message: "操作成功",
             type: "success",
           });
-          dialogVisible.value = false;
+          dialogVisibleOne.value = false;
           loadingOne.value = false;
           getList();
         },
@@ -466,14 +466,6 @@ const getDtl = (row) => {
   });
 };
 const getDtlOne = (row) => {
-  modalType.value = "edit";
-  formData.dataOne = {
-    warehouseId: row.id,
-    name: row.name,
-    keeperId: row.keeperId,
-    warehouseLocationInfoList: [],
-  };
-  dialogVisibleOne.value = true;
   proxy
     .post("/warehouseLocationInfo/list", { warehouseId: row.id })
     .then((res) => {
@@ -487,7 +479,7 @@ const getDtlOne = (row) => {
         warehouseId: row.id,
         name: row.name,
         keeperId: row.keeperId,
-        warehouseLocationInfoList: [],
+        warehouseLocationInfoList: res,
       };
       dialogVisibleOne.value = true;
     });
@@ -529,4 +521,7 @@ const clickDelete = (index) => {
 .tenant {
   padding: 20px;
 }
+.by-form .el-form--inline .el-form-item {
+  padding-right: 0px;
+}
 </style>

+ 2 - 2
src/views/WDLY/purchaseManage/purchase/index.vue

@@ -348,8 +348,8 @@ const getDict = () => {
       }));
     });
   proxy.get("/subscribe/getDepts").then((res) => {
-    deptData.value = res;
-    selectConfig[2].data = res.map((x) => ({
+    deptData.value = res.data;
+    selectConfig[2].data = res.data.map((x) => ({
       label: x.deptName,
       value: x.deptId,
     }));