From ee7ac8df8bce38add1f75baf876b49de94b9e00a Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期五, 16 十月 2026 17:58:33 +0800
Subject: [PATCH] feat(mes): 赋码管理绑定托盘支持未录入批次的袋码
---
src/views/wls/productsales/data.ts | 59 ++++++++++++++++++++++++++++-------------------------------
1 files changed, 28 insertions(+), 31 deletions(-)
diff --git a/src/views/wls/productsales/data.ts b/src/views/wls/productsales/data.ts
index 6e9973f..192d780 100644
--- a/src/views/wls/productsales/data.ts
+++ b/src/views/wls/productsales/data.ts
@@ -13,15 +13,16 @@
DICT_TYPE,
MesAutoCodeRuleCode,
MesWmSalesNoticeStatusEnum,
-} from '../../../packages/constants/src';
-import { getDictOptions } from '../../../packages/effects/hooks/src';
+ MesWmWarehouseTypeEnum,
+} from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
import { Button } from 'ant-design-vue';
import { z } from '#/adapter/form';
+import CrmCustomerSelect from '#/components/crm-customer-select.vue';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
import { getRangePickerDefaultProps } from '#/utils';
-import { MdClientSelect } from '#/views/mes/md/client/components';
import { MdItemSelect } from '#/views/mes/md/item/components';
import { WmMaterialStockSelect } from '#/views/wls/materialstock/components';
import {
@@ -124,26 +125,16 @@
component: markRaw(WmSalesNoticeSelect),
componentProps: {
disabled: isHeaderReadonly(formType),
- // 閫夋嫨鍙戣揣閫氱煡鍗曞悗锛岃嚜鍔ㄥ洖濉攢鍞鍗曞彿銆佸鎴枫�佹敹璐т汉淇℃伅
+ // 閫夋嫨鍙戣揣閫氱煡鍗曞悗锛岃嚜鍔ㄥ洖濉鎴枫�佹敹璐т汉淇℃伅
onChange: async (notice?: MesWmSalesNoticeApi.SalesNotice) => {
await formApi?.setValues({
clientId: notice?.clientId,
contactAddress: notice?.recipientAddress,
contactName: notice?.recipientName,
contactTelephone: notice?.recipientTelephone,
- salesOrderCode: notice?.salesOrderCode,
});
},
status: MesWmSalesNoticeStatusEnum.APPROVED,
- },
- },
- {
- fieldName: 'salesOrderCode',
- label: '閿�鍞鍗曠紪鍙�',
- component: 'Input',
- componentProps: {
- disabled: isHeaderReadonly(formType),
- placeholder: '璇疯緭鍏ラ攢鍞鍗曠紪鍙�',
},
},
{
@@ -155,14 +146,14 @@
disabled: isHeaderReadonly(formType),
format: 'YYYY-MM-DD',
placeholder: '璇烽�夋嫨鍑哄簱鏃ユ湡',
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD',
},
rules: 'required',
},
{
fieldName: 'clientId',
label: '瀹㈡埛',
- component: markRaw(MdClientSelect),
+ component: markRaw(CrmCustomerSelect),
componentProps: {
disabled: isHeaderReadonly(formType),
placeholder: '璇烽�夋嫨瀹㈡埛',
@@ -258,18 +249,9 @@
},
},
{
- fieldName: 'salesOrderCode',
- label: '閿�鍞鍗曠紪鍙�',
- component: 'Input',
- componentProps: {
- allowClear: true,
- placeholder: '璇疯緭鍏ラ攢鍞鍗曠紪鍙�',
- },
- },
- {
fieldName: 'clientId',
label: '瀹㈡埛',
- component: markRaw(MdClientSelect),
+ component: markRaw(CrmCustomerSelect),
componentProps: {
placeholder: '璇烽�夋嫨瀹㈡埛',
},
@@ -316,11 +298,6 @@
{
field: 'noticeCode',
title: '鍙戣揣閫氱煡鍗曞彿',
- minWidth: 160,
- },
- {
- field: 'salesOrderCode',
- title: '閿�鍞鍗曠紪鍙�',
minWidth: 160,
},
{
@@ -543,6 +520,23 @@
): VxeTableGridOptions<MesWmProductSalesDetailApi.ProductSalesDetail>['columns'] {
return [
{
+ field: 'itemName',
+ title: '鐗╂枡',
+ minWidth: 140,
+ },
+ {
+ field: 'batchCode',
+ title: '鎵规鍙�',
+ minWidth: 130,
+ },
+ {
+ field: 'bagCodeId',
+ title: '鎵爜鏉ユ簮',
+ minWidth: 110,
+ formatter: ({ row }) =>
+ row.bagCodeId ? `琚嬬爜 #${row.bagCodeId}${row.palletCodeId ? ` / 鎵樼洏 #${row.palletCodeId}` : ''}` : row.palletCodeId ? `鎵樼洏鐮� #${row.palletCodeId}` : '鎵嬪伐鎷h揣',
+ },
+ {
field: 'warehouseName',
title: '浠撳簱鍚嶇О',
minWidth: 100,
@@ -562,6 +556,7 @@
title: '鏁伴噺',
width: 100,
},
+ { field: 'remark', title: '琚嬬爜涓庢壂鐮佹潵婧�', minWidth: 240 },
...(stockable
? [
{
@@ -607,6 +602,8 @@
label: '閫夋嫨搴撳瓨',
component: markRaw(WmMaterialStockSelect),
componentProps: {
+ // 鍙粠鍚堟牸浠撳簱锛坱ype=20锛夐�夋嫨鍙嫞璐у簱瀛�
+ warehouseType: MesWmWarehouseTypeEnum.QUALIFIED,
// 閫夋嫨搴撳瓨璁板綍鍚庯紝鑷姩鍥炲~浠撳簱/搴撳尯/搴撲綅/鎵规/鏁伴噺
onChange: async (stock?: MesWmMaterialStockApi.MaterialStock) => {
await formApi?.setValues({
--
Gitblit v1.9.3