Browse Source

手动入库bug

cz 1 year ago
parent
commit
49976f919a
1 changed files with 11 additions and 8 deletions
  1. 11 8
      src/views/purchase-sales/inbound-outbound/manualInbound/add.vue

+ 11 - 8
src/views/purchase-sales/inbound-outbound/manualInbound/add.vue

@@ -123,12 +123,10 @@ const formConfig = reactive([
 ]);
 const onClickLeft = () => history.back();
 const getDict = async () => {
-  await proxy
-    .post("/warehouse/page", { pageNum: 1, pageSize: 9999 })
-    .then((res) => {
-      formConfig[0].data = res.data.rows;
-    });
-  await proxy
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
+    formConfig[0].data = res.data.rows;
+  });
+  proxy
     .post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "" })
     .then((res) => {
       formOption.btnConfig.listConfig[0].data = res.data.rows;
@@ -136,8 +134,13 @@ const getDict = async () => {
     });
 };
 onMounted(async () => {
-  await getDict();
-  if (route.query.id) getDetails(route.query.id);
+  getDict();
+  if (route.query.id) {
+    formOption.hiddenSubmitBtn = true;
+    formOption.readonly = true;
+    formOption.btnConfig.isNeed = false;
+    getDetails(route.query.id);
+  }
 });
 const getDetails = (id) => {
   proxy.post("/stockJournal/detail", { id }).then((res) => {