From 543433f64d491fe133b7a23363ff0ccacc3da07e Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 24 七月 2026 14:33:42 +0800
Subject: [PATCH] fix(upload): 修复文件上传时的请求头配置问题
---
src/views/erp/purchase/request/data.ts | 145 ++++++++++++++++++++++++++++++++++++++----------
1 files changed, 115 insertions(+), 30 deletions(-)
diff --git a/src/views/erp/purchase/request/data.ts b/src/views/erp/purchase/request/data.ts
index 34682d6..eb869d1 100644
--- a/src/views/erp/purchase/request/data.ts
+++ b/src/views/erp/purchase/request/data.ts
@@ -1,9 +1,8 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
-import { DICT_TYPE } from '../../../../packages/constants/src';
-import { getDictOptions } from '../../../../packages/effects/hooks/src';
-import { erpPriceInputFormatter } from '../../../../packages/utils/src';
+import { DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
import { getSupplierSimpleList } from '#/api/erp/purchase/supplier';
import { getSimpleUserList } from '#/api/system/user';
@@ -14,10 +13,11 @@
/** 鐘舵�佸父閲� */
export const PURCHASE_REQUEST_STATUS = {
- PENDING: 0, // 寰呭鎵�
- APPROVED: 1, // 宸插鎵�
- REJECTED: 2, // 宸叉嫆缁�
- CONVERTED: 3, // 宸茶浆璁㈠崟
+ DRAFT: 0, // 鏈彁浜わ紙鑽夌锛�
+ PROCESSING: 10, // 瀹℃壒涓�
+ APPROVED: 20, // 瀹℃牳閫氳繃
+ REJECTED: 30, // 瀹℃牳涓嶉�氳繃
+ CANCELLED: 40, // 宸插彇娑�
};
/** 琛ㄥ崟鐨勯厤缃」 */
@@ -66,14 +66,48 @@
valueField: 'id',
disabled: formType === 'detail',
},
+ rules: 'required',
},
{
- fieldName: 'reason',
+ fieldName: 'discountPercent',
+ label: '浼樻儬鐜�(%)',
+ component: 'InputNumber',
+ componentProps: {
+ placeholder: '璇疯緭鍏ヤ紭鎯犵巼',
+ min: 0,
+ max: 100,
+ precision: 2,
+ disabled: formType === 'detail',
+ },
+ },
+ {
+ fieldName: 'depositPrice',
+ label: '瀹氶噾',
+ component: 'InputNumber',
+ componentProps: {
+ placeholder: '璇疯緭鍏ュ畾閲�',
+ min: 0,
+ precision: 2,
+ disabled: formType === 'detail',
+ },
+ },
+ {
+ fieldName: 'requestReason',
label: '鐢宠鐞嗙敱',
component: 'Textarea',
componentProps: {
placeholder: '璇疯緭鍏ョ敵璇风悊鐢�',
autoSize: { minRows: 1, maxRows: 1 },
+ disabled: formType === 'detail',
+ },
+ formItemClass: 'col-span-2',
+ },
+ {
+ fieldName: 'fileUrl',
+ label: '闄勪欢',
+ component: 'FileUpload',
+ componentProps: {
+ placeholder: '璇蜂笂浼犻檮浠�',
disabled: formType === 'detail',
},
formItemClass: 'col-span-2',
@@ -111,28 +145,30 @@
slots: { default: 'productId' },
},
{
- field: 'productBarCode',
- title: '鏉$爜',
- minWidth: 120,
- },
- {
field: 'productUnitName',
title: '鍗曚綅',
minWidth: 80,
},
{
- field: 'requestCount',
- title: '鐢宠鏁伴噺',
+ field: 'count',
+ title: '鏁伴噺',
minWidth: 120,
fixed: 'right',
- slots: { default: 'requestCount' },
+ slots: { default: 'count' },
},
{
- field: 'estimatedPrice',
- title: '棰勪及鍗曚环',
+ field: 'inCount',
+ title: '鍏ュ簱鏁伴噺',
+ minWidth: 100,
+ fixed: 'right',
+ formatter: 'formatAmount6',
+ },
+ {
+ field: 'productPrice',
+ title: '鍗曚环锛堝弬鑰冧环锛�',
minWidth: 120,
fixed: 'right',
- slots: { default: 'estimatedPrice' },
+ slots: { default: 'productPrice' },
},
{
field: 'totalPrice',
@@ -142,17 +178,31 @@
formatter: 'formatAmount2',
},
{
- field: 'requiredDate',
+ field: 'taxPercent',
+ title: '绋庣巼(%)',
+ minWidth: 100,
+ fixed: 'right',
+ slots: { default: 'taxPercent' },
+ },
+ {
+ field: 'demandTime',
title: '闇�姹傛棩鏈�',
minWidth: 140,
fixed: 'right',
- slots: { default: 'requiredDate' },
+ slots: { default: 'demandTime' },
},
{
field: 'remark',
title: '澶囨敞',
minWidth: 150,
slots: { default: 'remark' },
+ },
+ {
+ field: 'qcCheckFlag',
+ title: '鏄惁璐ㄦ',
+ minWidth: 80,
+ fixed: 'right',
+ slots: { default: 'qcCheckFlag' },
},
{
title: '鎿嶄綔',
@@ -199,7 +249,7 @@
},
},
{
- fieldName: 'requesterId',
+ fieldName: 'requestUserId',
label: '鐢宠浜�',
component: 'ApiSelect',
componentProps: {
@@ -217,10 +267,11 @@
component: 'Select',
componentProps: {
options: [
- { label: '寰呭鎵�', value: 0 },
- { label: '宸插鎵�', value: 1 },
- { label: '宸叉嫆缁�', value: 2 },
- { label: '宸茶浆璁㈠崟', value: 3 },
+ { label: '鏈彁浜�', value: 0 },
+ { label: '瀹℃壒涓�', value: 10 },
+ { label: '瀹℃牳閫氳繃', value: 20 },
+ { label: '瀹℃牳涓嶉�氳繃', value: 30 },
+ { label: '宸插彇娑�', value: 40 },
],
placeholder: '璇烽�夋嫨鐘舵��',
allowClear: true,
@@ -255,15 +306,43 @@
formatter: 'formatDate',
},
{
- field: 'requesterName',
+ field: 'requestUserName',
title: '鐢宠浜�',
minWidth: 120,
},
{
- field: 'estimatedAmount',
+ field: 'requestDeptName',
+ title: '鐢宠閮ㄩ棬',
+ minWidth: 120,
+ },
+ {
+ field: 'totalCount',
+ title: '鐢宠鏁伴噺',
+ minWidth: 120,
+ formatter: 'formatAmount3',
+ },
+ {
+ field: 'totalPrice',
title: '棰勪及閲戦',
formatter: 'formatAmount2',
minWidth: 120,
+ },
+ {
+ field: 'depositPrice',
+ title: '瀹氶噾',
+ formatter: 'formatAmount2',
+ minWidth: 120,
+ },
+ {
+ field: 'productNames',
+ title: '鐢宠浜у搧',
+ minWidth: 150,
+ showOverflow: 'tooltip',
+ },
+ {
+ field: 'orderNo',
+ title: '閲囪喘璁㈠崟',
+ minWidth: 180,
},
{
field: 'status',
@@ -272,7 +351,13 @@
slots: { default: 'status' },
},
{
- field: 'reason',
+ field: 'inStatus',
+ title: '鍏ュ簱鐘舵��',
+ minWidth: 100,
+ slots: { default: 'inStatus' },
+ },
+ {
+ field: 'requestReason',
title: '鐢宠鐞嗙敱',
minWidth: 150,
showOverflow: 'tooltip',
@@ -285,7 +370,7 @@
},
{
title: '鎿嶄綔',
- width: 200,
+ width: 240,
fixed: 'right',
slots: { default: 'actions' },
},
--
Gitblit v1.9.3