From 787ccc59ba89bacc075562a161ecf02bc76ebadc Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 24 七月 2026 17:15:53 +0800
Subject: [PATCH] 银川 1.采购申请添加入库状态查询条件
---
src/views/wls/salesnotice/data.ts | 65 ++++++++++++++++++++++++++------
1 files changed, 52 insertions(+), 13 deletions(-)
diff --git a/src/views/wls/salesnotice/data.ts b/src/views/wls/salesnotice/data.ts
index a0aa7ba..e295707 100644
--- a/src/views/wls/salesnotice/data.ts
+++ b/src/views/wls/salesnotice/data.ts
@@ -5,21 +5,25 @@
import { h, markRaw } from 'vue';
-import { DICT_TYPE, MesAutoCodeRuleCode } from '../../../packages/constants/src';
+import {
+ DICT_TYPE,
+ MesAutoCodeRuleCode,
+} from '@vben/constants';
import { Button } from 'ant-design-vue';
import { z } from '#/adapter/form';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
-import { MdClientSelect } from '#/views/mes/md/client/components';
+import CrmCustomerSelect from '#/components/crm-customer-select.vue';
+import { ErpSaleOrderSelect } from '#/views/erp/sale/order/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';
}
/** 鏂板/淇敼鐨勮〃鍗� */
@@ -79,19 +83,26 @@
rules: 'required',
},
{
- fieldName: 'salesOrderCode',
- label: '閿�鍞鍗曠紪鍙�',
- component: 'Input',
+ fieldName: 'saleOrderId',
+ label: '閿�鍞鍗�',
+ component: markRaw(ErpSaleOrderSelect),
componentProps: {
- placeholder: '璇疯緭鍏ラ攢鍞鍗曠紪鍙�',
+ placeholder: '璇烽�夋嫨閿�鍞鍗�',
+ // 閫夋嫨閿�鍞鍗曞悗锛岃嚜鍔ㄥ洖濉鎴蜂俊鎭�
+ onChange: (item: any) => {
+ if (item?.customerId && formApi) {
+ formApi.setFieldValue('clientId', item.customerId);
+ }
+ },
},
},
{
fieldName: 'clientId',
label: '瀹㈡埛',
- component: markRaw(MdClientSelect),
+ component: markRaw(CrmCustomerSelect),
componentProps: {
placeholder: '璇烽�夋嫨瀹㈡埛',
+ disabled: true,
},
rules: 'selectRequired',
},
@@ -166,7 +177,7 @@
},
},
{
- fieldName: 'salesOrderCode',
+ fieldName: 'saleOrderCode',
label: '閿�鍞鍗曠紪鍙�',
component: 'Input',
componentProps: {
@@ -177,7 +188,7 @@
{
fieldName: 'clientId',
label: '瀹㈡埛',
- component: markRaw(MdClientSelect),
+ component: markRaw(CrmCustomerSelect),
componentProps: {
placeholder: '璇烽�夋嫨瀹㈡埛',
},
@@ -200,7 +211,7 @@
minWidth: 150,
},
{
- field: 'salesOrderCode',
+ field: 'saleOrderCode',
title: '閿�鍞鍗曠紪鍙�',
minWidth: 140,
},
@@ -240,6 +251,12 @@
},
},
{
+ field: 'outStatus',
+ title: '鍑哄簱鐘舵��',
+ minWidth: 100,
+ slots: { default: 'outStatus' },
+ },
+ {
title: '鎿嶄綔',
width: 200,
fixed: 'right',
@@ -279,6 +296,28 @@
width: 100,
},
{
+ field: 'outCount',
+ title: '宸插嚭搴撴暟閲�',
+ width: 100,
+ formatter: ({ cellValue }: { cellValue: number }) => (cellValue || 0).toFixed(2),
+ },
+ {
+ field: 'outProgress',
+ title: '鍑哄簱杩涘害',
+ width: 120,
+ cellRender: {
+ name: 'CellText',
+ props: {
+ formatter: ({ row }: { row: MesWmSalesNoticeLineApi.SalesNoticeLine }) => {
+ const quantity = row.quantity || 0;
+ const outCount = row.outCount || 0;
+ const percent = quantity > 0 ? Math.round((outCount / quantity) * 100) : 0;
+ return `${outCount.toFixed(2)} / ${quantity.toFixed(2)} (${percent}%)`;
+ },
+ },
+ },
+ },
+ {
field: 'batchCode',
title: '鎵规鍙�',
minWidth: 120,
--
Gitblit v1.9.3