cz 1 year ago
parent
commit
6b5f310edf

+ 6 - 1
src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

@@ -735,6 +735,11 @@ const getList = async (req) => {
       loading.value = false;
     }, 200);
   });
+  proxy
+    .post("/purchase/statisticsPurchaseHead", sourceList.value.pagination)
+    .then((res) => {
+      headerData.value = res;
+    });
 };
 
 const submitForm = async () => {
@@ -867,7 +872,7 @@ const handleArrival = (row) => {
 };
 
 getDict();
-getHeaderData();
+// getHeaderData();
 if (route.query.code) {
   sourceList.value.pagination.keyword = route.query.code;
 }

+ 26 - 21
src/views/purchaseManage/purchasePayment/paymentBill/index.vue

@@ -18,7 +18,8 @@
           action: () => start(),
         },
       ]"
-      @get-list="getList">
+      @get-list="getList"
+    >
       <template #amount="{ item }">
         <div style="width: 100%">
           <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -89,7 +90,7 @@ const selectConfig = computed(() => {
     },
     {
       label: "付款状态",
-      prop: "type",
+      prop: "payStatus",
       data: payStatus.value,
     },
   ];
@@ -181,30 +182,34 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.rows && res.rows.length > 0) {
-      supplierList.value = res.rows.map((item) => {
-        return {
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
+  proxy
+    .post("/supplierInfo/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        supplierList.value = res.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/purchase/paymentBill", sourceList.value.pagination).then((message) => {
-    message.rows.forEach((x) => {
-      x.isCheck = true;
+  proxy
+    .post("/purchase/paymentBill", sourceList.value.pagination)
+    .then((message) => {
+      message.rows.forEach((x) => {
+        x.isCheck = true;
+      });
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
     });
-    sourceList.value.data = message.rows;
-    sourceList.value.pagination.total = message.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
 };
 getDict();
 getList();

+ 12 - 3
src/views/salesMange/shipmentMange/packing/index.vue

@@ -98,6 +98,7 @@
                     :precision="2"
                     :controls="false"
                     :min="0"
+                    @change='computeBomVolume'
                     onmousewheel="return false;"></el-input-number>
                 </el-form-item>
               </el-col>
@@ -110,6 +111,7 @@
                     :precision="2"
                     :controls="false"
                     :min="0"
+                    @change='computeBomVolume'
                     onmousewheel="return false;"></el-input-number>
                 </el-form-item>
               </el-col>
@@ -122,13 +124,14 @@
                     :precision="2"
                     :controls="false"
                     :min="0"
+                    @change='computeBomVolume'
                     onmousewheel="return false;"></el-input-number>
                 </el-form-item>
               </el-col>
             </el-form-item>
             <el-form-item label="体积" required>
               <el-input-number
-                v-model="boxFormData.bomVolume"
+                :model-value="boxFormData.bomVolume"
                 placeholder="请输入"
                 :precision="4"
                 :controls="false"
@@ -305,6 +308,13 @@ const sourceList = ref({
   },
 });
 
+
+const computeBomVolume = () => {
+  if(boxFormData.value.boxLong && boxFormData.value.boxWide && boxFormData.value.boxHigh) {
+    boxFormData.value.bomVolume = (boxFormData.value.boxLong * boxFormData.value.boxWide * boxFormData.value.boxHigh) / 1000000
+  }
+}
+
 const openDtlUpdata = (index) => {
   boxFormType = 'updata'
   boxIndex.value = index;
@@ -395,7 +405,7 @@ const openDtlModal = () => {
 const boxIndex = ref(0);
 
 const packDetailProductListPush = (index) => {
-  if(encasementType.value == '1') {
+  if(encasementType.value == '2') {
     boxFormData.value.packDetailGoodsList.push({
       remark:null,
       unit:null,
@@ -424,7 +434,6 @@ const submitBox = () => {
         ElMessage.error("请添加产品");
         return;
       }
-      alert('通过')
       for (let i = 0; i < boxFormData.value.packDetailProductList.length; i++) {
         const item = boxFormData.value.packDetailProductList[i];
         if (item.quantity == null) {