From 78caa769e452f63288743b8997f7b4c21bb06ce5 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 06 十一月 2026 19:00:38 +0800
Subject: [PATCH] feat(crm,mes): 扩展客户字段与重构批次号生成逻辑
---
src/views/wls/barcode/data.ts | 108 +++++-------------------------------------------------
1 files changed, 10 insertions(+), 98 deletions(-)
diff --git a/src/views/wls/barcode/data.ts b/src/views/wls/barcode/data.ts
index dfd288c..fa318a5 100644
--- a/src/views/wls/barcode/data.ts
+++ b/src/views/wls/barcode/data.ts
@@ -34,11 +34,7 @@
import { WmMaterialStockSelect } from '../materialstock/components';
import { WmPackageSelect } from '#/views/wls/packages/components';
-import {
- WmWarehouseAreaSelect,
- WmWarehouseLocationSelect,
- WmWarehouseSelect,
-} from '../warehouse/components';
+import { WmWarehouseSelect } from '../warehouse/components';
/** 涓氬姟瀵硅薄閫変腑鍚庡洖濉笟鍔$紪鐮併�佷笟鍔″悕绉般�佹潯鐮佸唴瀹� */
async function syncBizDetail(formApi: undefined | VbenFormApi, item: any) {
@@ -107,11 +103,16 @@
bizCode: undefined,
bizName: undefined,
content: undefined,
- locationWarehouseId: undefined,
- areaWarehouseId: undefined,
- areaLocationId: undefined,
}),
- options: getDictOptions(DICT_TYPE.MES_WM_BARCODE_BIZ_TYPE, 'number'),
+ // 涓嶅啀鏀寔鎸夊簱鍖�/搴撲綅鐢熸垚鏉$爜
+ options: getDictOptions(
+ DICT_TYPE.MES_WM_BARCODE_BIZ_TYPE,
+ 'number',
+ ).filter(
+ (item) =>
+ item.value !== BarcodeBizTypeEnum.LOCATION &&
+ item.value !== BarcodeBizTypeEnum.AREA,
+ ),
placeholder: '璇烽�夋嫨涓氬姟绫诲瀷',
},
rules: 'required',
@@ -127,95 +128,6 @@
dependencies: {
triggerFields: ['bizType'],
show: (values) => values.bizType === BarcodeBizTypeEnum.WAREHOUSE,
- },
- rules: 'required',
- },
- {
- fieldName: 'locationWarehouseId',
- label: '搴撳尯路浠撳簱',
- component: markRaw(WmWarehouseSelect),
- componentProps: {
- onChange: () =>
- formApi?.setValues({
- bizId: undefined,
- bizCode: undefined,
- bizName: undefined,
- content: undefined,
- }),
- placeholder: '璇烽�夋嫨浠撳簱',
- },
- dependencies: {
- triggerFields: ['bizType'],
- show: (values) => values.bizType === BarcodeBizTypeEnum.LOCATION,
- },
- },
- {
- fieldName: 'bizId',
- label: '搴撳尯',
- component: markRaw(WmWarehouseLocationSelect),
- dependencies: {
- triggerFields: ['bizType', 'locationWarehouseId'],
- show: (values) => values.bizType === BarcodeBizTypeEnum.LOCATION,
- componentProps: (values) => ({
- onChange: (item: any) => syncBizDetail(formApi, item),
- placeholder: '璇烽�夋嫨搴撳尯',
- warehouseId: values.locationWarehouseId,
- }),
- },
- rules: 'required',
- },
- {
- fieldName: 'areaWarehouseId',
- label: '搴撲綅路浠撳簱',
- component: markRaw(WmWarehouseSelect),
- componentProps: {
- onChange: () =>
- formApi?.setValues({
- areaLocationId: undefined,
- bizId: undefined,
- bizCode: undefined,
- bizName: undefined,
- content: undefined,
- }),
- placeholder: '璇烽�夋嫨浠撳簱',
- },
- dependencies: {
- triggerFields: ['bizType'],
- show: (values) => values.bizType === BarcodeBizTypeEnum.AREA,
- },
- },
- {
- fieldName: 'areaLocationId',
- label: '搴撲綅路搴撳尯',
- component: markRaw(WmWarehouseLocationSelect),
- dependencies: {
- triggerFields: ['bizType', 'areaWarehouseId'],
- show: (values) => values.bizType === BarcodeBizTypeEnum.AREA,
- componentProps: (values) => ({
- onChange: () =>
- formApi?.setValues({
- bizId: undefined,
- bizCode: undefined,
- bizName: undefined,
- content: undefined,
- }),
- placeholder: '璇烽�夋嫨搴撳尯',
- warehouseId: values.areaWarehouseId,
- }),
- },
- },
- {
- fieldName: 'bizId',
- label: '搴撲綅',
- component: markRaw(WmWarehouseAreaSelect),
- dependencies: {
- triggerFields: ['bizType', 'areaLocationId'],
- show: (values) => values.bizType === BarcodeBizTypeEnum.AREA,
- componentProps: (values) => ({
- locationId: values.areaLocationId,
- onChange: (item: any) => syncBizDetail(formApi, item),
- placeholder: '璇烽�夋嫨搴撲綅',
- }),
},
rules: 'required',
},
--
Gitblit v1.9.3