From 844dfdc256bfc567f9eaa007a7bc37dc120bffa8 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 29 七月 2026 15:06:51 +0800
Subject: [PATCH] 银川 1.新增装箱管理单,页面弹出报错,修改销售订单输入方式
---
src/views/wls/returnissue/data.ts | 60 +++++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 37 insertions(+), 23 deletions(-)
diff --git a/src/views/wls/returnissue/data.ts b/src/views/wls/returnissue/data.ts
index d25a934..4ca6336 100644
--- a/src/views/wls/returnissue/data.ts
+++ b/src/views/wls/returnissue/data.ts
@@ -18,7 +18,6 @@
import { z } from '#/adapter/form';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
-import { MdItemSelect } from '#/views/mes/md/item/components';
import { MdWorkstationSelect } from '#/views/mes/md/workstation/components';
import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components';
import { WmMaterialStockSelect } from '#/views/wls/materialstock/components';
@@ -129,7 +128,7 @@
format: 'YYYY-MM-DD HH:mm:ss',
placeholder: '璇烽�夋嫨閫�鏂欐棩鏈�',
showTime: true,
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
},
{
@@ -330,6 +329,9 @@
batchCode: stock?.batchCode,
batchId: stock?.batchId,
itemId: stock?.itemId,
+ materialDisplayName: stock
+ ? [stock.itemName, stock.specification].filter(Boolean).join(' | ')
+ : undefined,
quantity: stock?.quantity,
quantityMax: stock?.quantity,
});
@@ -376,10 +378,19 @@
},
{
fieldName: 'itemId',
+ component: 'Input',
+ dependencies: {
+ triggerFields: [''],
+ show: () => false,
+ },
+ },
+ {
+ fieldName: 'materialDisplayName',
label: '鐗╂枡',
- component: markRaw(MdItemSelect),
+ component: 'Input',
componentProps: {
disabled: true,
+ placeholder: '閫夋嫨搴撳瓨鍚庤嚜鍔ㄥ甫鍑�',
},
},
{
@@ -460,28 +471,37 @@
},
{
fieldName: 'itemId',
+ component: 'Input',
+ dependencies: {
+ triggerFields: [''],
+ show: () => false,
+ },
+ },
+ {
+ fieldName: 'materialDisplayName',
label: '鐗╂枡',
- component: markRaw(MdItemSelect),
+ component: 'Input',
componentProps: {
disabled: true,
+ placeholder: '閫夋嫨搴撳瓨鍚庤嚜鍔ㄥ甫鍑�',
},
- rules: 'selectRequired',
},
{
fieldName: 'materialStockId',
label: '搴撳瓨璁板綍',
component: markRaw(WmMaterialStockSelect),
componentProps: {
- // 閫夋嫨搴撳瓨璁板綍鍚庯紝鑷姩鍥炲~浠撳簱/搴撳尯/搴撲綅/鎵规/鏁伴噺
+ // 閫夋嫨搴撳瓨璁板綍鍚庯紝鑷姩鍥炲~鐗╂枡/鎵规/鏁伴噺锛堜笉鍐嶅甫鍏ヤ粨搴撲俊鎭級
onChange: async (stock?: MesWmMaterialStockApi.MaterialStock) => {
await formApi?.setValues({
- areaId: stock?.areaId,
batchCode: stock?.batchCode,
batchId: stock?.batchId,
- locationId: stock?.locationId,
+ itemId: stock?.itemId,
+ materialDisplayName: stock
+ ? [stock.itemName, stock.specification].filter(Boolean).join(' | ')
+ : undefined,
quantity: stock?.quantity,
quantityMax: stock?.quantity,
- warehouseId: stock?.warehouseId,
});
},
virtualFilter: 'only',
@@ -519,38 +539,32 @@
},
{
fieldName: 'warehouseId',
- label: '鍏ュ簱浠撳簱',
+ label: '涓婃灦鐩爣浠撳簱',
component: markRaw(WmWarehouseSelect),
- componentProps: {
- disabled: true,
- },
+ // componentProps: {
+ // excludeCodes: ['WIP_VIRTUAL_WAREHOUSE'],
+ // },
},
{
fieldName: 'locationId',
- label: '搴撳尯',
+ label: '涓婃灦鐩爣搴撳尯',
component: markRaw(WmWarehouseLocationSelect),
- componentProps: {
- disabled: true,
- },
dependencies: {
triggerFields: ['warehouseId'],
componentProps: (values) => ({
- disabled: true,
+ disabled: !values.warehouseId,
warehouseId: values.warehouseId,
}),
},
},
{
fieldName: 'areaId',
- label: '搴撲綅',
+ label: '涓婃灦鐩爣搴撲綅',
component: markRaw(WmWarehouseAreaSelect),
- componentProps: {
- disabled: true,
- },
dependencies: {
triggerFields: ['locationId'],
componentProps: (values) => ({
- disabled: true,
+ disabled: !values.locationId,
locationId: values.locationId,
}),
},
--
Gitblit v1.9.3