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/productissue/data.ts | 45 ++++++++++++++++++++++++++++++---------------
1 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/src/views/wls/productissue/data.ts b/src/views/wls/productissue/data.ts
index 7fd1ed3..781bd29 100644
--- a/src/views/wls/productissue/data.ts
+++ b/src/views/wls/productissue/data.ts
@@ -1,5 +1,6 @@
锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { MesMdItemApi } from '#/api/mes/md/item';
import type { MesProTaskApi } from '#/api/mes/pro/task';
import type { MesWmMaterialStockApi } from '#/api/mes/wm/materialstock';
import type { MesWmProductIssueApi } from '#/api/mes/wm/productissue';
@@ -24,6 +25,10 @@
import { ProTaskSelect } from '#/views/mes/pro/task/components';
import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components';
import { WmMaterialStockSelect } from '#/views/wls/materialstock/components';
+import {
+ buildItemUnitSchema,
+ useLineUnitHandlers,
+} from '#/views/wls/utils/item-unit-convert';
import {
WmWarehouseAreaSelect,
WmWarehouseLocationSelect,
@@ -287,9 +292,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',
@@ -310,7 +330,8 @@
}
/** 棰嗘枡鍗曡鏂板/淇敼鐨勮〃鍗� */
-export function useLineFormSchema(): VbenFormSchema[] {
+export function useLineFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
+ const unitHandlers = useLineUnitHandlers(formApi);
return [
{
fieldName: 'itemId',
@@ -318,21 +339,15 @@
component: markRaw(MdItemSelect),
componentProps: {
placeholder: '璇烽�夋嫨浜у搧鐗╂枡',
+ // 鍒囨崲鐗╂枡鍚庯紝閲嶆柊璁板綍鐗╂枡涓诲崟浣嶅苟娓呯┖鍨嬪彿銆佸綍鍏ュ崟浣嶅彛寰�
+ onChange: async (item?: MesMdItemApi.Item) => {
+ await unitHandlers.handleItemChange(item?.id);
+ },
},
rules: 'selectRequired',
},
- {
- fieldName: 'quantity',
- label: '棰嗘枡鏁伴噺',
- component: 'InputNumber',
- componentProps: {
- class: '!w-full',
- min: 0,
- placeholder: '璇疯緭鍏ラ鏂欐暟閲�',
- precision: 2,
- },
- rules: 'required',
- },
+ // 鐗╂枡鍨嬪彿 / 褰曞叆鍗曚綅 / 褰曞叆鏁伴噺 / 棰嗘枡鏁伴噺锛堢墿鏂欎富鍗曚綅鍙e緞锛�
+ ...buildItemUnitSchema(formApi, { quantityLabel: '棰嗘枡鏁伴噺' }),
{
fieldName: 'remark',
label: '澶囨敞',
--
Gitblit v1.9.3