From fa2c9bd08d1c28e6403d9ad92614a251872bbb68 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 18 七月 2026 14:52:36 +0800
Subject: [PATCH] 银川 1.销售订单页面展示字段修改 2.客户选择弹框复用调整 3.未使用菜单整理 4.发货通知、销售退货展示字段和操作权限判断修改
---
src/views/wls/salesnotice/data.ts | 52 ++++++++++------------------------------------------
1 files changed, 10 insertions(+), 42 deletions(-)
diff --git a/src/views/wls/salesnotice/data.ts b/src/views/wls/salesnotice/data.ts
index fcadf3c..e295707 100644
--- a/src/views/wls/salesnotice/data.ts
+++ b/src/views/wls/salesnotice/data.ts
@@ -8,23 +8,22 @@
import {
DICT_TYPE,
MesAutoCodeRuleCode,
- MesWmSalesNoticeOutStatusEnum,
} from '@vben/constants';
-import { Button, Tag } from 'ant-design-vue';
+import { Button } from 'ant-design-vue';
import { z } from '#/adapter/form';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
+import CrmCustomerSelect from '#/components/crm-customer-select.vue';
import { ErpSaleOrderSelect } from '#/views/erp/sale/order/components';
-import { MdClientSelect } from '#/views/mes/md/client/components';
import { MdItemSelect } from '#/views/mes/md/item/components';
/** 琛ㄥ崟绫诲瀷 */
-export type FormType = 'create' | 'detail' | 'finish' | 'update';
+export type FormType = 'create' | 'detail' | 'update';
-/** 琛ㄥ崟澶撮儴鏄惁鍙锛堣鎯呫�佹墽琛屽嚭搴撴�侊級 */
+/** 琛ㄥ崟澶撮儴鏄惁鍙锛堣鎯呮�侊級 */
function isHeaderReadonly(formType: FormType): boolean {
- return formType === 'detail' || formType === 'finish';
+ return formType === 'detail';
}
/** 鏂板/淇敼鐨勮〃鍗� */
@@ -93,35 +92,17 @@
onChange: (item: any) => {
if (item?.customerId && formApi) {
formApi.setFieldValue('clientId', item.customerId);
- formApi.setFieldValue('clientName', item.customerName);
}
},
},
},
{
- fieldName: 'clientName',
- label: '',
- component: 'Input',
- dependencies: {
- triggerFields: [''],
- show: () => false,
- },
- },
- {
fieldName: 'clientId',
label: '瀹㈡埛',
- component: markRaw(MdClientSelect),
+ component: markRaw(CrmCustomerSelect),
componentProps: {
placeholder: '璇烽�夋嫨瀹㈡埛',
disabled: true,
- },
- dependencies: {
- triggerFields: ['clientName'],
- componentProps: (values) => ({
- placeholder: '璇烽�夋嫨瀹㈡埛',
- disabled: true,
- clientName: values.clientName as string,
- }),
},
rules: 'selectRequired',
},
@@ -196,7 +177,7 @@
},
},
{
- fieldName: 'salesOrderCode',
+ fieldName: 'saleOrderCode',
label: '閿�鍞鍗曠紪鍙�',
component: 'Input',
componentProps: {
@@ -207,7 +188,7 @@
{
fieldName: 'clientId',
label: '瀹㈡埛',
- component: markRaw(MdClientSelect),
+ component: markRaw(CrmCustomerSelect),
componentProps: {
placeholder: '璇烽�夋嫨瀹㈡埛',
},
@@ -230,7 +211,7 @@
minWidth: 150,
},
{
- field: 'salesOrderCode',
+ field: 'saleOrderCode',
title: '閿�鍞鍗曠紪鍙�',
minWidth: 140,
},
@@ -273,20 +254,7 @@
field: 'outStatus',
title: '鍑哄簱鐘舵��',
minWidth: 100,
- cellRender: {
- name: 'CellTag',
- props: {
- formatter: ({ row }: { row: MesWmSalesNoticeApi.SalesNotice }) => {
- const statusMap: Record<number, { color: string; label: string }> = {
- [MesWmSalesNoticeOutStatusEnum.NONE]: { color: 'default', label: '鏈嚭搴�' },
- [MesWmSalesNoticeOutStatusEnum.PARTIAL]: { color: 'warning', label: '閮ㄥ垎鍑哄簱' },
- [MesWmSalesNoticeOutStatusEnum.ALL]: { color: 'success', label: '鍏ㄩ儴鍑哄簱' },
- };
- const status = statusMap[row.outStatus ?? MesWmSalesNoticeOutStatusEnum.NONE];
- return { color: status?.color, label: status?.label ?? '鏈嚭搴�' };
- },
- },
- },
+ slots: { default: 'outStatus' },
},
{
title: '鎿嶄綔',
--
Gitblit v1.9.3