From cec91d13116154243b444fd950e59f628b355981 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期二, 18 八月 2026 11:30:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0
---
src/views/erp/purchase/order/modules/item-form.vue | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/views/erp/purchase/order/modules/item-form.vue b/src/views/erp/purchase/order/modules/item-form.vue
index 37b3d5f..009246a 100644
--- a/src/views/erp/purchase/order/modules/item-form.vue
+++ b/src/views/erp/purchase/order/modules/item-form.vue
@@ -10,11 +10,10 @@
erpPriceMultiply,
} from '@vben/utils';
-import { Input, InputNumber, Select } from 'ant-design-vue';
+import { Input, InputNumber, Select, Switch } from 'ant-design-vue';
import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import { getItemPage } from '#/api/mdm/item';
-import { getStockCount } from '#/api/erp/stock/stock';
import { useFormItemColumns } from '../data';
@@ -124,16 +123,15 @@
const newRow = {
id: undefined,
productId: undefined,
- productUnitName: undefined, // 浜у搧鍗曚綅
- productBarCode: undefined, // 浜у搧鏉$爜
+ productUnitName: undefined,
productPrice: undefined,
- stockCount: undefined,
count: 1,
totalProductPrice: undefined,
taxPercent: 0,
taxPrice: undefined,
totalPrice: undefined,
remark: undefined,
+ qcCheckFlag: false,
};
tableData.value.push(newRow);
// 閫氱煡鐖剁粍浠舵洿鏂�
@@ -159,10 +157,8 @@
}
row.productId = productId;
row.productUnitId = product.unitMeasureId;
- row.productBarCode = product.barCode;
row.productUnitName = product.unitMeasureName;
row.productName = product.name;
- row.stockCount = (await getStockCount(productId)) || 0;
row.productPrice = product.purchasePrice || 0;
row.count = row.count || 1;
handleRowChange(row);
@@ -261,6 +257,16 @@
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
<span v-else>{{ row.remark || '-' }}</span>
</template>
+ <template #qcCheckFlag="{ row }">
+ <Switch
+ v-if="!disabled"
+ v-model:checked="row.qcCheckFlag"
+ checked-children="鏄�"
+ un-checked-children="鍚�"
+ @change="handleRowChange(row)"
+ />
+ <span v-else>{{ row.qcCheckFlag ? '鏄�' : '鍚�' }}</span>
+ </template>
<template #taxPercent="{ row }">
<InputNumber
v-if="!disabled"
--
Gitblit v1.9.3