From b8de520fa696d8a95393aa3ff544c5a6f5c36001 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期三, 30 九月 2026 15:33:41 +0800
Subject: [PATCH] 宁夏万通需求:出库单行支持主/辅单位录入;物料型号维护;考勤节假日配置时间段;设备批量删除;质检导出按筛选条件
---
src/views/wls/miscissue/data.ts | 51 ++++++++++++++++++++++++++-------------------------
1 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/src/views/wls/miscissue/data.ts b/src/views/wls/miscissue/data.ts
index 5018e10..bb784d5 100644
--- a/src/views/wls/miscissue/data.ts
+++ b/src/views/wls/miscissue/data.ts
@@ -13,6 +13,10 @@
import { generateAutoCode } from '#/api/mes/md/autocode/record';
import { getRangePickerDefaultProps } from '#/utils';
+import {
+ useLineUnitHandlers,
+ buildItemUnitSchema,
+} from '#/views/wls/utils/item-unit-convert';
import { WmMaterialStockSelect } from '#/views/wls/materialstock/components';
import {
WmWarehouseAreaSelect,
@@ -283,9 +287,24 @@
minWidth: 120,
},
{
+ field: 'itemModel',
+ title: '鐗╂枡鍨嬪彿',
+ minWidth: 120,
+ },
+ {
field: 'unitMeasureName',
- title: '鍗曚綅',
- width: 80,
+ title: '涓昏閲忓崟浣�',
+ width: 100,
+ },
+ {
+ field: 'enterUnitMeasureName',
+ title: '褰曞叆鍗曚綅',
+ width: 90,
+ },
+ {
+ field: 'enterQuantity',
+ title: '褰曞叆鏁伴噺',
+ width: 100,
},
{
field: 'quantity',
@@ -327,6 +346,7 @@
/** 鍑哄簱鍗曡鏂板/淇敼鐨勮〃鍗� */
export function useLineFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
+ const unitHandlers = useLineUnitHandlers(formApi);
return [
{
fieldName: 'itemId',
@@ -351,10 +371,11 @@
componentProps: {
// 閫夋嫨搴撳瓨鐗╄祫鍚庯紝鑷姩鍥炲~鐗╂枡銆佹壒娆″彿銆佷粨搴撲綅缃拰鏈�澶у彲鍑哄簱鏁伴噺
onChange: async (stock?: MesWmMaterialStockApi.MaterialStock) => {
+ // 鍒囨崲搴撳瓨鐗╄祫绛変簬鍒囨崲鐗╂枡锛屽厛娓呮帀涓婁竴浠藉瀷鍙蜂笌褰曞叆鍗曚綅鍙e緞
+ await unitHandlers.handleItemChange(stock?.itemId);
await formApi?.setValues({
areaId: stock?.areaId,
batchCode: stock?.batchCode,
- itemId: stock?.itemId,
locationId: stock?.locationId,
quantityMax: stock?.quantity,
warehouseId: stock?.warehouseId,
@@ -369,28 +390,8 @@
}),
},
},
- {
- fieldName: 'quantity',
- label: '鍑哄簱鏁伴噺',
- component: 'InputNumber',
- componentProps: {
- class: '!w-full',
- min: 0.01,
- placeholder: '璇疯緭鍏ュ嚭搴撴暟閲�',
- precision: 2,
- },
- rules: 'required',
- dependencies: {
- triggerFields: ['quantityMax'],
- componentProps: (values) => ({
- class: '!w-full',
- max: values.quantityMax,
- min: 0.01,
- placeholder: '璇疯緭鍏ュ嚭搴撴暟閲�',
- precision: 2,
- }),
- },
- },
+ // 鐗╂枡鍨嬪彿 / 褰曞叆鍗曚綅 / 褰曞叆鏁伴噺 / 鍑哄簱鏁伴噺锛堜富鍗曚綅鍙e緞锛�
+ ...buildItemUnitSchema(formApi),
{
fieldName: 'batchCode',
label: '鎵规鍙�',
--
Gitblit v1.9.3