From e5f2bc7d785bb7e040a3d0a7469aa1daad10245b Mon Sep 17 00:00:00 2001 From: wangmeng <1620161711@qq.com> Date: Wed, 11 Feb 2026 10:38:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/background.js | 3 +- src/store/modules/order.js | 4 +- src/views/approval/approvalDetails.vue | 48 ++++++++++++-- src/views/customer/add.vue | 64 +++++++++++++----- src/views/customer/index.vue | 5 +- src/views/order/category.vue | 2 +- src/views/order/orderAddEdit.vue | 75 +++++++++++++--------- src/views/order/orderList.vue | 26 ++++++-- src/views/order/orderListFinance.vue | 3 +- src/views/order/subcategory.vue | 2 +- src/views/product/add/category.vue | 4 +- src/views/product/add/exchangeRate.vue | 7 +- src/views/product/add/productCostPrice.vue | 18 +++--- src/views/product/add/subcategory.vue | 6 +- vue.config.js | 3 +- 15 files changed, 188 insertions(+), 82 deletions(-) diff --git a/src/background.js b/src/background.js index b305a53..156120c 100644 --- a/src/background.js +++ b/src/background.js @@ -48,7 +48,7 @@ async function createWindow() { }) // 移除菜单栏(关键代码) - Menu.setApplicationMenu(null) + Menu.setApplicationMenu(null) // if (process.env.WEBPACK_DEV_SERVER_URL) { // // Load the url of the dev server if in development mode @@ -61,6 +61,7 @@ async function createWindow() { // win.loadURL(`file://${__dirname}/index.html`) // } createProtocol('app') + // win.webContents.openDevTools({ mode: 'right' }); // Load the index.html when not in development win.loadURL(`${winURL}` + '/#/') } diff --git a/src/store/modules/order.js b/src/store/modules/order.js index 1f3cb4e..28bfb8a 100644 --- a/src/store/modules/order.js +++ b/src/store/modules/order.js @@ -19,7 +19,7 @@ const order = { standardPrice: "", sellingPrice: "", splitPrice: "", - discountAmount: 0.00 // 初始化为0.00,解决优惠金额显示问题 + discountAmount: "0.00" // 初始化为0.00,解决优惠金额显示问题 }, projectList: [], isTemporaryLeave: false @@ -143,7 +143,7 @@ const order = { standardPrice: "", sellingPrice: "", splitPrice: "", - discountAmount: 0 // 保持0.00,解决优惠金额显示 + discountAmount:"0.00" // 保持0.00,解决优惠金额显示 }, projectList: [], isTemporaryLeave: false diff --git a/src/views/approval/approvalDetails.vue b/src/views/approval/approvalDetails.vue index 8ab9ee8..605ff47 100644 --- a/src/views/approval/approvalDetails.vue +++ b/src/views/approval/approvalDetails.vue @@ -199,6 +199,7 @@ {{ project.name }} + {{ project.num }} {{ project.unit }} @@ -324,7 +325,7 @@
客户来源: - {{ customerDetail.fromType || "-" }} + {{ getOriginText(customerDetail.fromType) }}
备注: @@ -345,6 +346,7 @@ import { searchData } from "@/api/customer/customer.js"; import { getCurrencyList, } from "@/api/order/orderAddEdit"; +import {getOrigin} from '@/api/customer/customer' export default { components: { basicCrumb, @@ -358,7 +360,8 @@ export default { expandProjectIndex: -1, // approveRemarks: "", // 审批意见 orderId: "", - isDisabled:"" + isDisabled: "", + originList:[], }; }, @@ -371,9 +374,34 @@ export default { this.orderId = orderId; } this.loadCurrencyList(); + this.getOriginData() }, methods: { + // 匹配客户来源文字 + getOriginText(originCode) { + if (!originCode) return "-"; + const originItem = this.originList.find(item => item.dictKey === originCode); + return originItem ? originItem.dictValue : originCode; + }, + + getOriginData(){ + getOrigin().then(res =>{ + this.originList = res.data.data || [] + }).catch(err => { + console.error('获取客户来源列表失败:', err) + this.originList = [] + }) + }, + // 格式化数值为两位小数(通用方法) +formatToTwoDecimal(num) { + // 空值/非数字处理 + if (!num || isNaN(Number(num))) { + return "0.00"; + } + // 转为数字并保留两位小数 + return Number(num).toFixed(2); +}, async getOrderDetail(orderId) { try { // 显示加载状态 @@ -383,6 +411,7 @@ export default { // 接口请求成功 if (res.data.code === 200) { this.orderData = res.data.data; // 赋值订单数据 + this.orderData.discountAmount = this.formatToTwoDecimal(this.orderData.discountAmount); if(this.$route.query.mode !== 'view' && this.orderData.targetCurrency !== 'CNY'){ this.getExchangeRateList() } @@ -561,7 +590,7 @@ calcCommissionPrice() { type: item.type, price: item.price, })), - discountAmount:this.orderData.discountAmount, + discountAmount:this.formatToTwoDecimal(this.orderData.discountAmount), }; console.log("requestData1111",requestData) // 调用后端接口 @@ -630,6 +659,11 @@ calcCommissionPrice() { font-weight: 500; } .approval-action-bar { + position: fixed !important; // 固定定位(核心) + bottom: 0; // 贴紧页面底部 + left: 0; // 贴紧左侧 + right: 0; // 贴紧右侧 + z-index: 999; // 提高层级,避免被其他元素遮挡 ::v-deep .el-input .el-input__inner { height: 3vw !important; line-height: 3vw !important; @@ -769,13 +803,17 @@ calcCommissionPrice() { justify-content: space-between; .system-code { - margin-right: 8px; + margin-right: 12px; color: #606266; font-size: $font-size-22; } .system-name { - margin-right: 8px; + margin-right: 12px; + font-weight: 500; + font-size: $font-size-22; + } + .system-num { font-weight: 500; font-size: $font-size-22; } diff --git a/src/views/customer/add.vue b/src/views/customer/add.vue index 06858fb..417853c 100644 --- a/src/views/customer/add.vue +++ b/src/views/customer/add.vue @@ -1,5 +1,5 @@