From 0127fd119fe2a349fbfee92b375a5680e10d3275 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期四, 27 八月 2026 14:30:33 +0800
Subject: [PATCH] feat(erp): 销售订单审批接入协同办公前端支持
---
src/views/erp/sale/order/data.ts | 60 ++++++++++++++++++++++++++++--------------------------------
1 files changed, 28 insertions(+), 32 deletions(-)
diff --git a/src/views/erp/sale/order/data.ts b/src/views/erp/sale/order/data.ts
index 9aea440..ffec496 100644
--- a/src/views/erp/sale/order/data.ts
+++ b/src/views/erp/sale/order/data.ts
@@ -72,7 +72,7 @@
placeholder: '閫夋嫨璁㈠崟鏃堕棿',
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
@@ -111,23 +111,13 @@
formItemClass: 'col-span-2',
},
{
- fieldName: 'fileUrl',
+ fieldName: 'blobIds',
label: '闄勪欢',
component: 'FileUpload',
componentProps: {
- maxNumber: 1,
- maxSize: 10,
- accept: [
- 'pdf',
- 'doc',
- 'docx',
- 'xls',
- 'xlsx',
- 'txt',
- 'jpg',
- 'jpeg',
- 'png',
- ],
+ valueKey: 'id',
+ maxNumber: 10,
+ multiple: true,
showDescription: formType !== 'detail',
disabled: formType === 'detail',
},
@@ -191,14 +181,27 @@
},
{
component: 'InputNumber',
- componentProps: {
+ componentProps: (values) => ({
class: '!w-full',
placeholder: '璇疯緭鍏ユ敹鍙栬閲�',
precision: 2,
min: 0,
- },
+ max: values.totalPrice ?? undefined,
+ }),
fieldName: 'depositPrice',
label: '鏀跺彇璁㈤噾',
+ dependencies: {
+ triggerFields: ['totalPrice'],
+ rules(values) {
+ if (values.totalPrice != null) {
+ return z
+ .number()
+ .min(0, '璁㈤噾涓嶈兘灏忎簬0')
+ .max(values.totalPrice, '鏀跺彇璁㈤噾涓嶈兘澶т簬浼樻儬鍚庨噾棰�');
+ }
+ return z.number().min(0, '璁㈤噾涓嶈兘灏忎簬0').optional();
+ },
+ },
rules: z.number().min(0).optional(),
},
];
@@ -226,6 +229,7 @@
title: '搴撳瓨',
minWidth: 80,
formatter: 'formatAmount3',
+ visible: false,
},
{
field: 'productUnitName',
@@ -236,11 +240,13 @@
field: 'productUnitName2',
title: '杈呭崟浣�1',
minWidth: 80,
+ visible: false,
},
{
field: 'productUnitName3',
title: '杈呭崟浣�2',
minWidth: 80,
+ visible: false,
},
{
field: 'needProduction',
@@ -253,6 +259,7 @@
title: '澶囨敞',
minWidth: 150,
slots: { default: 'remark' },
+ visible: false,
},
{
field: 'count',
@@ -371,8 +378,10 @@
component: 'Select',
componentProps: {
options: [
- { label: '鏈鏍�', value: 10 },
+ { label: '鏈彁浜�', value: 0 },
+ { label: '瀹℃壒涓�', value: 15 },
{ label: '宸插鏍�', value: 20 },
+ { label: '宸查┏鍥�', value: 35 },
{ label: '宸蹭綔搴�', value: 30 },
],
placeholder: '璇烽�夋嫨鐘舵��',
@@ -409,24 +418,11 @@
component: 'Select',
componentProps: {
options: [
+ { label: '鏃犻渶鐢熶骇', value: -1 },
{ label: '鏈畬鎴�', value: 0 },
{ label: '宸插畬鎴�', value: 1 },
],
placeholder: '璇烽�夋嫨鐢熶骇鐘舵��',
- allowClear: true,
- },
- },
- {
- fieldName: 'returnStatus',
- label: '閫�璐х姸鎬�',
- component: 'Select',
- componentProps: {
- options: [
- { label: '鏈��璐�', value: 0 },
- { label: '閮ㄥ垎閫�璐�', value: 1 },
- { label: '鍏ㄩ儴閫�璐�', value: 2 },
- ],
- placeholder: '璇烽�夋嫨閫�璐х姸鎬�',
allowClear: true,
},
},
--
Gitblit v1.9.3