|
@@ -495,10 +495,12 @@ export default {
|
|
|
this.confirmLoading = true
|
|
|
|
|
|
// 转换为物料明细格式,格式化数字字段
|
|
|
- const importedMaterials = this.selectedMaterials.map((material) => {
|
|
|
+ /** @type {TransformedMaterialItem[]} */
|
|
|
+ const materIalList = this.selectedMaterials
|
|
|
+ const importedMaterials = materIalList.map((material) => {
|
|
|
// 验证和格式化可用数量
|
|
|
const availableQuantityValidation = validateNumber(material.availableQuantity)
|
|
|
-
|
|
|
+
|
|
|
return {
|
|
|
id: generateUniqueId(),
|
|
|
itemId: material.itemId || material.id,
|
|
@@ -511,7 +513,7 @@ export default {
|
|
|
warehouseName: material.warehouseName,
|
|
|
availableQuantity: availableQuantityValidation.isValid ? preciseRound(availableQuantityValidation.value, 4) : 0,
|
|
|
orderQuantity: 1, // 默认订单数量为1
|
|
|
- confirmQuantity: 0,
|
|
|
+ confirmQuantity: 1,
|
|
|
unitPrice: 0, // 默认单价为0,4位浮点型
|
|
|
taxRate: 0, // 默认税率为0,4位浮点型
|
|
|
taxAmount: 0, // 默认税额为0,2位小数
|