From e4994fccfb49ebfb108ba62cbd82aea4e004f6d8 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 15 十月 2026 10:02:46 +0800
Subject: [PATCH] fix(mes/qc): 不合格品处理单的不合格物料改查 MDM 物料
---
src/views/erp/purchase/invoice/data.ts | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/src/views/erp/purchase/invoice/data.ts b/src/views/erp/purchase/invoice/data.ts
index 018c084..3d1315f 100644
--- a/src/views/erp/purchase/invoice/data.ts
+++ b/src/views/erp/purchase/invoice/data.ts
@@ -15,7 +15,7 @@
/** 鏂板/淇敼鐨勮〃鍗� */
export function useFormSchema(
- orderTotalTaxPrice?: Ref<number | undefined>,
+ orderRemainInvoicePrice?: Ref<number | undefined>,
): VbenFormSchema[] {
return [
{
@@ -30,9 +30,14 @@
fieldName: 'no',
label: '鏉ョエ缂栧彿',
component: 'Input',
+ rules: 'required',
+ dependencies: {
+ triggerFields: ['id'],
+ disabled: (values) => !!values.id,
+ },
componentProps: {
- placeholder: '淇濆瓨鏃惰嚜鍔ㄧ敓鎴�',
- disabled: true,
+ placeholder: '璇疯緭鍏ユ潵绁ㄧ紪鍙�',
+ maxLength: 32,
},
},
{
@@ -48,12 +53,12 @@
placeholder: '璇烽�夋嫨閲囪喘璁㈠崟',
onChange: (
order:
- | { supplierName?: string; totalTaxPrice?: number }
+ | { supplierName?: string; remainInvoicePrice?: number }
| undefined,
) => {
form.setFieldValue('supplierName', order?.supplierName);
- if (orderTotalTaxPrice) {
- orderTotalTaxPrice.value = order?.totalTaxPrice;
+ if (orderRemainInvoicePrice) {
+ orderRemainInvoicePrice.value = order?.remainInvoicePrice;
}
},
}),
@@ -91,8 +96,8 @@
component: 'InputNumber',
rules: 'required',
description: () =>
- orderTotalTaxPrice?.value != null
- ? `閲囪喘璁㈠崟鏈紑绁ㄩ噾棰濓細${Number(orderTotalTaxPrice.value).toFixed(2)} 鍏僠
+ orderRemainInvoicePrice?.value != null
+ ? `閲囪喘璁㈠崟鏈紑绁ㄩ噾棰濓細${Number(orderRemainInvoicePrice.value).toFixed(2)} 鍏僠
: '',
componentProps: {
class: '!w-full',
@@ -106,11 +111,11 @@
class: '!w-full',
placeholder: '璇疯緭鍏ユ潵绁ㄩ噾棰�',
min: 0,
- max: orderTotalTaxPrice?.value ?? undefined,
+ max: orderRemainInvoicePrice?.value ?? undefined,
precision: 2,
}),
rules: () => {
- const max = orderTotalTaxPrice?.value;
+ const max = orderRemainInvoicePrice?.value;
if (max != null) {
return z
.number({ message: '璇疯緭鍏ユ潵绁ㄩ噾棰�' })
@@ -144,7 +149,7 @@
maxNumber: 10,
multiple: true,
accept: ['jpg', 'jpeg', 'png', 'pdf'],
- helpText: '鏀寔jpg銆乯peg銆乸ng銆乸df鏍煎紡锛屽崟涓枃浠朵笉瓒呰繃2MB',
+ helpText: '鏀寔jpg銆乯peg銆乸ng銆乸df鏍煎紡锛屽崟涓枃浠朵笉瓒呰繃50MB',
},
formItemClass: 'md:col-span-2',
},
--
Gitblit v1.9.3