From bdfab89d8afbc60faeb89715a461f77e877d7f5d Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期一, 03 八月 2026 00:02:37 +0800
Subject: [PATCH] feat: 新增徐州什克金属制品有限公司配置文件
---
src/views/salesManagement/salesQuotation/index.vue | 40 +++++++++++++++++++++-------------------
1 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index 441f633..455f686 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -65,7 +65,7 @@
</el-table-column>
<el-table-column prop="totalAmount" label="鎶ヤ环閲戦" width="120">
<template #default="scope">
- 楼{{ scope.row.totalAmount.toFixed(2) }}
+ 楼{{ formatDecimal(scope.row.totalAmount) }}
</template>
</el-table-column>
<el-table-column label="鎿嶄綔" width="200" fixed="right" align="center">
@@ -185,7 +185,7 @@
</el-form-item>
</template>
</el-table-column>
- <el-table-column prop="ProductModel" label="瑙勬牸鍨嬪彿" width="200">
+ <el-table-column prop="specification" label="瑙勬牸鍨嬪彿" width="200">
<template #default="scope">
<el-form-item :prop="`products.${scope.$index}.productModelId`" class="product-table-form-item">
<el-select
@@ -215,7 +215,7 @@
<el-table-column prop="unitPrice" label="鍗曚环">
<template #default="scope">
<el-form-item :prop="`products.${scope.$index}.unitPrice`" class="product-table-form-item">
- <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="2" style="width: 100%" />
+ <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="6" :step="0.000001" style="width: 100%" />
</el-form-item>
</template>
</el-table-column>
@@ -267,7 +267,7 @@
<!-- <el-tag :type="getStatusType(currentQuotation.status)">{{ currentQuotation.status }}</el-tag>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="鎶ヤ环鎬婚" :span="2">
- <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">楼{{ currentQuotation.totalAmount?.toFixed(2) }}</span>
+ <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">楼{{ formatDecimal(currentQuotation.totalAmount) }}</span>
</el-descriptions-item>
</el-descriptions>
@@ -275,11 +275,11 @@
<h4>浜у搧鏄庣粏</h4>
<el-table :data="currentQuotation.products" border style="width: 100%">
<el-table-column prop="product" label="浜у搧鍚嶇О" />
- <el-table-column prop="ProductModel" label="瑙勬牸鍨嬪彿" />
+ <el-table-column prop="specification" label="瑙勬牸鍨嬪彿" />
<el-table-column prop="unit" label="鍗曚綅" />
<el-table-column prop="unitPrice" label="鍗曚环">
<template #default="scope">
- 楼{{ scope.row.unitPrice.toFixed(2) }}
+ 楼{{ formatDecimal(scope.row.unitPrice) }}
</template>
</el-table-column>
</el-table>
@@ -303,6 +303,7 @@
import {modelList, productTreeList} from "@/api/basicData/product.js";
import {listCustomer} from "@/api/basicData/customer.js";
import { userListNoPage } from "@/api/system/user.js";
+import { formatDecimal, roundAmount } from '@/utils/numberFormat';
// 鍝嶅簲寮忔暟鎹�
const loading = ref(false)
@@ -346,6 +347,7 @@
const baseRules = {
customer: [{ required: true, message: '璇烽�夋嫨瀹㈡埛', trigger: 'change' }],
+ customerId: [{ required: true, message: '璇烽�夋嫨瀹㈡埛', trigger: 'change' }],
salesperson: [{ required: true, message: '璇烽�夋嫨涓氬姟鍛�', trigger: 'change' }],
quotationDate: [{ required: true, message: '璇烽�夋嫨鎶ヤ环鏃ユ湡', trigger: 'change' }],
validDate: [{ required: true, message: '璇烽�夋嫨鏈夋晥鏈�', trigger: 'change' }],
@@ -458,7 +460,7 @@
row.product = '';
row.modelOptions = [];
row.productModelId = '';
- row.ProductModel = '';
+ row.specification = '';
row.unit = '';
return;
}
@@ -479,7 +481,7 @@
// 濡傛灉娓呯┖閫夋嫨锛屽垯娓呯┖鐩稿叧瀛楁
if (!value) {
row.productModelId = '';
- row.ProductModel = '';
+ row.specification = '';
row.unit = '';
return;
}
@@ -488,10 +490,10 @@
const modelOptions = row.modelOptions || [];
const index = modelOptions.findIndex((item) => item.id === value);
if (index !== -1) {
- row.ProductModel = modelOptions[index].model;
+ row.specification = modelOptions[index].model;
row.unit = modelOptions[index].unit;
} else {
- row.ProductModel = '';
+ row.specification = '';
row.unit = '';
}
};
@@ -524,7 +526,7 @@
productId: product.productId || '',
product: product.product || product.productName || '',
productModelId: product.productModelId || '',
- ProductModel: product.ProductModel || '',
+ specification: product.specification || '',
quantity: product.quantity || 0,
unit: product.unit || '',
unitPrice: product.unitPrice || 0,
@@ -570,9 +572,9 @@
const res = await modelList({ id: resolvedProductId });
modelOptions = res || [];
- // 濡傛灉杩斿洖鐨勬暟鎹病鏈� productModelId锛屼絾鏈� ProductModel 鍚嶇О锛屾牴鎹悕绉版煡鎵� ID
- if (!resolvedProductModelId && product.ProductModel) {
- const foundModel = modelOptions.find(item => item.model === product.ProductModel);
+ // 濡傛灉杩斿洖鐨勬暟鎹病鏈� productModelId锛屼絾鏈� specification 鍚嶇О锛屾牴鎹悕绉版煡鎵� ID
+ if (!resolvedProductModelId && product.specification) {
+ const foundModel = modelOptions.find(item => item.model === product.specification);
if (foundModel) {
resolvedProductModelId = foundModel.id;
}
@@ -586,7 +588,7 @@
productId: resolvedProductId,
product: productName,
productModelId: resolvedProductModelId,
- ProductModel: product.ProductModel || '',
+ specification: product.specification || '',
quantity: product.quantity || 0,
unit: product.unit || '',
unitPrice: product.unitPrice || 0,
@@ -686,11 +688,11 @@
return
}
- // 璁$畻鎵�鏈変骇鍝佺殑鍗曚环鎬诲拰
- form.totalAmount = form.products.reduce((sum, product) => {
+ // 璁$畻鎵�鏈変骇鍝佺殑鍗曚环鎬诲拰锛屼繚鐣欏叚浣嶅皬鏁�
+ form.totalAmount = roundAmount(form.products.reduce((sum, product) => {
const price = Number(product.unitPrice) || 0
return sum + price
- }, 0)
+ }, 0))
form.customer = customerOption.value.find(item => item.id === form.customerId)?.customerName || ''
if (isEdit.value) {
@@ -755,7 +757,7 @@
productId: product.productId || '',
product: product.product || product.productName || '',
productModelId: product.productModelId || '',
- ProductModel: product.ProductModel || '',
+ specification: product.specification || '',
quantity: product.quantity || 0,
unit: product.unit || '',
unitPrice: product.unitPrice || 0,
--
Gitblit v1.9.3