From 7c863257d23fd7f01c84a8996677e682d9d50b07 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 30 十二月 2025 09:38:38 +0800
Subject: [PATCH] 1.海川开心-部分页面添加默认值

---
 src/views/inventoryManagement/receiptManagement/components/formDiaProduct.vue |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/views/inventoryManagement/receiptManagement/components/formDiaProduct.vue b/src/views/inventoryManagement/receiptManagement/components/formDiaProduct.vue
index 3efb818..8ac355d 100644
--- a/src/views/inventoryManagement/receiptManagement/components/formDiaProduct.vue
+++ b/src/views/inventoryManagement/receiptManagement/components/formDiaProduct.vue
@@ -79,9 +79,9 @@
 import { ref, reactive, toRefs, getCurrentInstance } from 'vue'
 import useUserStore from '@/store/modules/user'
 import {
-  addStockInCustom,
-  updateStockInCustom,
+	addStockInCustom, updateProduct
 } from "@/api/inventoryManagement/stockIn.js";
+import { getCurrentDate } from "@/utils/index.js";
 
 const userStore = useUserStore()
 const { proxy } = getCurrentInstance()
@@ -110,9 +110,6 @@
   return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 }
 
-function getCurrentDate() {
-  return formatDateTime(new Date(), false);
-}
 
 const itemTypeOptions = [
   { label: '鐗╂枡', value: '鐗╂枡' },
@@ -199,10 +196,6 @@
         proxy.$modal.msgError(`绗�${i + 1}琛屼骇鍝佹暟鎹湭濉啓瀹屾暣锛堜骇鍝佸ぇ绫汇�佽鏍煎瀷鍙枫�佸崟浣嶄负蹇呭~锛塦)
         return
       }
-      if (!product.itemType) {
-        proxy.$modal.msgError(`绗�${i + 1}琛岃閫夋嫨鐗╁搧绫诲瀷`)
-        return
-      }
       if (!product.inboundDate) {
         proxy.$modal.msgError(`绗�${i + 1}琛岃閫夋嫨鍏ュ簱鏃ユ湡`)
         return
@@ -226,12 +219,11 @@
       taxRate: Number(product.taxRate || 0),
       taxExclusiveTotalPrice: Number(product.taxExclusiveTotalPrice || 0),
 			unitPrice: Number(product.unitPrice || 0),
-			totalPrice: Number(product.totalPrice || 0),
     }));
     loading.value = true
     if (operationType.value === 'edit') {
       const editPayload = payloadList[0]
-      await updateStockInCustom(editPayload)
+      await updateProduct(editPayload)
     } else {
       await addStockInCustom(payloadList)
     }
@@ -294,7 +286,6 @@
       inboundDate: row?.inboundDate ?? row?.createTime ?? '',
       taxRate: Number(row?.taxRate ?? 0),
       unitPrice: Number(row?.unitPrice ?? 0),
-      totalPrice: Number(row?.totalPrice ?? 0),
       taxExclusiveTotalPrice: Number(row?.taxExclusiveTotalPrice ?? 0),
     }]
   }

--
Gitblit v1.9.3