From a7dc7b230fcc6abc6ee5a7bfadb90789b03d2ca8 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期一, 07 九月 2026 16:45:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0
---
src/views/wls/returnissue/data.ts | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/src/views/wls/returnissue/data.ts b/src/views/wls/returnissue/data.ts
index 4ca6336..691b573 100644
--- a/src/views/wls/returnissue/data.ts
+++ b/src/views/wls/returnissue/data.ts
@@ -1,6 +1,7 @@
锘縤mport type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesWmMaterialStockApi } from '#/api/mes/wm/materialstock';
+import type { MesWmProductIssueLineApi } from '#/api/mes/wm/productissue/line';
import type { MesWmReturnIssueApi } from '#/api/mes/wm/returnissue';
import type { MesWmReturnIssueDetailApi } from '#/api/mes/wm/returnissue/detail';
import type { MesWmReturnIssueLineApi } from '#/api/mes/wm/returnissue/line';
@@ -20,6 +21,7 @@
import { generateAutoCode } from '#/api/mes/md/autocode/record';
import { MdWorkstationSelect } from '#/views/mes/md/workstation/components';
import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components';
+import { WmProductIssueLineSelect } from '#/views/wls/productissue/components';
import { WmMaterialStockSelect } from '#/views/wls/materialstock/components';
import {
WmWarehouseAreaSelect,
@@ -316,27 +318,29 @@
}
/** 閫�鏂欏崟琛屾柊澧�/淇敼鐨勮〃鍗� */
-export function useLineFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
+export function useLineFormSchema(
+ formApi?: VbenFormApi,
+ workOrderId?: number,
+): VbenFormSchema[] {
return [
{
- fieldName: 'materialStockId',
- label: '搴撳瓨璁板綍',
- component: markRaw(WmMaterialStockSelect),
+ fieldName: 'issueLineId',
+ label: '棰嗘枡璁板綍',
+ component: markRaw(WmProductIssueLineSelect),
componentProps: {
- // 閫夋嫨搴撳瓨璁板綍鍚庯紝鑷姩鍥炲~鐗╂枡/鎵规/鏁伴噺
- onChange: async (stock?: MesWmMaterialStockApi.MaterialStock) => {
+ workOrderId,
+ onChange: async (line?: MesWmProductIssueLineApi.ProductIssueLine) => {
await formApi?.setValues({
- batchCode: stock?.batchCode,
- batchId: stock?.batchId,
- itemId: stock?.itemId,
- materialDisplayName: stock
- ? [stock.itemName, stock.specification].filter(Boolean).join(' | ')
+ batchCode: line?.batchCode,
+ batchId: line?.batchId,
+ itemId: line?.itemId,
+ materialDisplayName: line
+ ? [line.itemName, line.specification].filter(Boolean).join(' | ')
: undefined,
- quantity: stock?.quantity,
- quantityMax: stock?.quantity,
+ quantity: line?.quantity,
+ quantityMax: line?.quantity,
});
},
- virtualFilter: 'only',
},
rules: 'selectRequired',
},
@@ -390,7 +394,7 @@
component: 'Input',
componentProps: {
disabled: true,
- placeholder: '閫夋嫨搴撳瓨鍚庤嚜鍔ㄥ甫鍑�',
+ placeholder: '閫夋嫨棰嗘枡璁板綍鍚庤嚜鍔ㄥ甫鍑�',
},
},
{
@@ -399,7 +403,7 @@
component: 'Input',
componentProps: {
disabled: true,
- placeholder: '閫夋嫨搴撳瓨鍚庤嚜鍔ㄥ甫鍑�',
+ placeholder: '閫夋嫨棰嗘枡璁板綍鍚庤嚜鍔ㄥ甫鍑�',
},
},
{
--
Gitblit v1.9.3