瀏覽代碼

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

lxf 1 年之前
父節點
當前提交
8e4d6e31fc

+ 43 - 2
src/views/WDLY/outInBound/waitOutBound/index.vue

@@ -385,7 +385,7 @@ const configData = [
       disabled: false,
       itemWidth: 33,
       precision: 2,
-      min: 0,
+      min: 1,
       controls: false,
     },
   ],
@@ -454,7 +454,38 @@ const openModal = () => {
 const submitForm = () => {
   byform.value.handleSubmit((valid) => {
     if (submitType.value == 4) {
-      console.log("aa");
+      const data = {
+        id: formData.data.id,
+        businessType: formData.data.businessType,
+        warehouseId: formData.data.warehouseId,
+        quantity: formData.data.quantity,
+        waitQuantity: formData.data.waitQuantity,
+      };
+      if (!(data.quantity > 0)) {
+        return ElMessage({
+          message: "出库数量不能为0!",
+          type: "info",
+        });
+      }
+      if (data.quantity > data.waitQuantity) {
+        return ElMessage({
+          message: "出库数量不能大于待出库数量!",
+          type: "info",
+        });
+      }
+      submitLoading.value = true;
+      proxy.post("/purchaseBack/backOut", data).then(
+        (res) => {
+          ElMessage({
+            message: "操作成功",
+            type: "success",
+          });
+          dialogVisible.value = false;
+          submitLoading.value = false;
+          getList();
+        },
+        (err) => (submitLoading.value = false)
+      );
     } else if (submitType.value == 5 || submitType.value == 6) {
       if (modalType.value === "add") {
         const list = formData.data.jdOrderDetailsList;
@@ -528,6 +559,16 @@ const outBound = (row) => {
   submitType.value = row.businessType;
   if (row.businessType == 4) {
     modalType.value = "other";
+    formConfig.value = configData[0];
+    formData.data = {
+      id: row.id,
+      warehouseId: "",
+      businessType: row.businessType + "",
+      businessCode: row.businessCode,
+      productName: row.productName,
+      waitQuantity: row.quantity,
+      quantity: undefined,
+    };
     dialogVisible.value = true;
   } else if (row.businessType == 5) {
     modalType.value = "add";

+ 5 - 15
src/views/WDLY/purchaseManage/alreadyPurchase/index.vue

@@ -747,20 +747,7 @@ const selectConfig = reactive([
   {
     label: "付款状态",
     prop: "payStatus",
-    data: [
-      {
-        label: "未付款",
-        value: "1",
-      },
-      {
-        label: "部分付款",
-        value: "2",
-      },
-      {
-        label: "已付款",
-        value: "3",
-      },
-    ],
+    data: paymentStatus.value,
   },
 ]);
 const config = computed(() => {
@@ -828,7 +815,10 @@ const config = computed(() => {
     {
       attrs: {
         label: "付款状态",
-        prop: "payStatus1",
+        prop: "payStatus",
+      },
+      render(status) {
+        return proxy.dictValueLabel(status, paymentStatus.value);
       },
     },
     {

+ 10 - 2
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -65,7 +65,11 @@
                 <el-table-column prop="code" label="货品编码" />
                 <el-table-column prop="name" label="货品名称" min-width="150" />
                 <el-table-column prop="spec" label="规格型号" />
-                <el-table-column prop="unit" label="单位" />
+                <el-table-column
+                  prop="unit"
+                  label="单位"
+                  :formatter="(row) => dictValueLabel(row.unit, productUnit)"
+                />
                 <el-table-column prop="price" label="供应单价" min-width="150">
                   <template #default="{ row, $index }">
                     <el-form-item
@@ -539,7 +543,11 @@ const handleRemove = (index) => {
 
 const pushGoods = (goods) => {
   const arr = goods.map((x) => ({ ...x, productInfoId: x.id, price: "" }));
-  formData.data.supplierPriceList = formData.data.supplierPriceList.concat(arr);
+  arr.forEach((item) => {
+    if (!formData.data.supplierPriceList.some((e) => e.id === item.id)) {
+      formData.data.supplierPriceList.push(item);
+    }
+  });
   openProduct.value = false;
   return ElMessage({
     message: "添加成功!",