From 1eba515718ec0420b8e6f3353c12179539d4c8b1 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期一, 24 八月 2026 11:32:30 +0800
Subject: [PATCH] fix 修改页面
---
src/views/crm/saleQuotation/data.ts | 103 ++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 93 insertions(+), 10 deletions(-)
diff --git a/src/views/crm/saleQuotation/data.ts b/src/views/crm/saleQuotation/data.ts
index 09cf646..109c6e4 100644
--- a/src/views/crm/saleQuotation/data.ts
+++ b/src/views/crm/saleQuotation/data.ts
@@ -1,6 +1,9 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import { DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
+
import { erpPriceMultiply } from '#/packages/utils/src';
import { z } from '#/adapter/form';
@@ -124,10 +127,11 @@
fieldName: 'quotationTime',
label: '鎶ヤ环鏃ユ湡',
component: 'DatePicker',
+ rules: 'required',
componentProps: {
showTime: false,
format: 'YYYY-MM-DD',
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD',
placeholder: '璇烽�夋嫨鎶ヤ环鏃ユ湡',
},
},
@@ -138,7 +142,7 @@
componentProps: {
showTime: false,
format: 'YYYY-MM-DD',
- valueFormat: 'x',
+ valueFormat: 'YYYY-MM-DD',
placeholder: '璇烽�夋嫨鏈夋晥鏈�',
},
},
@@ -155,6 +159,81 @@
},
},
{
+ fieldName: 'quotationType',
+ label: '鎶ヤ环绫诲瀷',
+ component: 'Select',
+ componentProps: {
+ options: getDictOptions(DICT_TYPE.CRM_QUOTATION_TYPE),
+ placeholder: '璇烽�夋嫨鎶ヤ环绫诲瀷',
+ allowClear: true,
+ },
+ },
+ {
+ fieldName: 'capacity',
+ label: '鍚堝悓瀹归噺锛坘VA锛�',
+ component: 'InputNumber',
+ componentProps: {
+ class: '!w-full',
+ min: 0,
+ precision: 2,
+ placeholder: '璇疯緭鍏ュ悎鍚屽閲�',
+ },
+ },
+ {
+ fieldName: 'maxDemand',
+ label: '鏈�澶ч渶閲忥紙kW锛�',
+ component: 'InputNumber',
+ componentProps: {
+ class: '!w-full',
+ min: 0,
+ precision: 2,
+ placeholder: '璇疯緭鍏ユ渶澶ч渶閲�',
+ },
+ },
+ {
+ fieldName: 'unitPrice',
+ label: '鐢靛害鍗曚环锛堝厓/kWh锛�',
+ component: 'InputNumber',
+ componentProps: {
+ class: '!w-full',
+ min: 0,
+ precision: 4,
+ placeholder: '璇疯緭鍏ョ數搴﹀崟浠�',
+ },
+ },
+ {
+ fieldName: 'tariffMode',
+ label: '鐢典环妯″紡',
+ component: 'Select',
+ componentProps: {
+ options: getDictOptions(DICT_TYPE.CRM_TARIFF_MODE),
+ placeholder: '璇烽�夋嫨鐢典环妯″紡',
+ allowClear: true,
+ },
+ },
+ {
+ fieldName: 'powerFactorFee',
+ label: '鍔涜皟鐢佃垂锛堝厓锛�',
+ component: 'InputNumber',
+ componentProps: {
+ class: '!w-full',
+ min: 0,
+ precision: 2,
+ placeholder: '璇疯緭鍏ュ姏璋冪數璐�',
+ },
+ },
+ {
+ fieldName: 'billingCycle',
+ label: '缁撶畻鍛ㄦ湡锛堟湀锛�',
+ component: 'InputNumber',
+ componentProps: {
+ class: '!w-full',
+ min: 1,
+ precision: 0,
+ placeholder: '璇疯緭鍏ョ粨绠楀懆鏈�',
+ },
+ },
+ {
fieldName: 'remark',
label: '澶囨敞',
component: 'Textarea',
@@ -165,7 +244,7 @@
},
{
fieldName: 'items',
- label: '鐗╂枡娓呭崟',
+ label: '浜у搧娓呭崟',
component: 'Input',
formItemClass: 'col-span-3',
},
@@ -282,6 +361,15 @@
fixed: 'left',
},
{
+ field: 'quotationType',
+ title: '鎶ヤ环绫诲瀷',
+ minWidth: 100,
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.CRM_QUOTATION_TYPE },
+ },
+ },
+ {
field: 'customerName',
title: '瀹㈡埛鍚嶇О',
minWidth: 120,
@@ -340,24 +428,19 @@
];
}
-/** 鐗╂枡鏄庣粏琛ㄦ牸鍒� */
+/** 浜у搧鏄庣粏琛ㄦ牸鍒� */
export function useItemColumns(): VxeTableGridOptions['columns'] {
return [
{ type: 'seq', title: '搴忓彿', minWidth: 50, fixed: 'left' },
{
field: 'itemId',
- title: '鐗╂枡鍚嶇О',
+ title: '浜у搧鍚嶇О',
minWidth: 200,
slots: { default: 'itemId' },
},
{
field: 'itemSpecification',
title: '瑙勬牸鍨嬪彿',
- minWidth: 120,
- },
- {
- field: 'itemBarCode',
- title: '鏉$爜',
minWidth: 120,
},
{
--
Gitblit v1.9.3