From 42a54de6386b1079f0a2ce63d22c537bd9b93d60 Mon Sep 17 00:00:00 2001 From: liyu1201 <1492230202@qq.com> Date: Tue, 3 Mar 2026 23:45:45 +0800 Subject: [PATCH] 最新 --- antis-ncc-admin/.env.development | 4 ++-- antis-ncc-admin/src/views/lqKdKdjlb/Form.vue | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- 绿纤uni-app/common/config.js | 4 ++-- 绿纤uni-app/pages/consume-detail/consume-detail.vue | 36 ++++++++++++++++++++++++++++-------- 绿纤uni-app/pages/refund-detail/refund-detail.vue | 39 ++++++++++++++++++++++++++++++--------- 绿纤uni-app/pagesA/lx-detail/lx-detail.vue | 36 ++++++++++++++++++++++++++++-------- 绿纤uni-app/pagesA/lx/lx.vue | 2 +- 7 files changed, 149 insertions(+), 39 deletions(-) diff --git a/antis-ncc-admin/.env.development b/antis-ncc-admin/.env.development index 6462393..198955a 100644 --- a/antis-ncc-admin/.env.development +++ b/antis-ncc-admin/.env.development @@ -2,8 +2,8 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true # VUE_APP_BASE_API = 'https://erp.lvqianmeiye.com' -# VUE_APP_BASE_API = 'http://erp_test.lvqianmeiye.com' -VUE_APP_BASE_API = 'http://localhost:2011' +VUE_APP_BASE_API = 'http://erp_test.lvqianmeiye.com' +# VUE_APP_BASE_API = 'http://localhost:2011' # VUE_APP_BASE_API = 'http://localhost:2011' VUE_APP_IMG_API = '' VUE_APP_BASE_WSS = 'ws://192.168.110.45:2011/websocket' diff --git a/antis-ncc-admin/src/views/lqKdKdjlb/Form.vue b/antis-ncc-admin/src/views/lqKdKdjlb/Form.vue index 44d5838..0b55fd2 100644 --- a/antis-ncc-admin/src/views/lqKdKdjlb/Form.vue +++ b/antis-ncc-admin/src/views/lqKdKdjlb/Form.vue @@ -89,6 +89,35 @@ + + + +
+ 储扣明细 +
+ + + + + + + + + + + +
暂无储扣明细
+
+
@@ -144,7 +173,7 @@ export default { jksyj: undefined, kjblsyj: undefined, pxxx: undefined, - lqKdKdjlbDeductList: [], + lqKdDeductList: [], }, rules: { kdhy: [ @@ -570,6 +599,7 @@ export default { method: 'get' }).then(res => { this.dataForm = res.data; + console.error(this.dataForm.lqKdDeductList) // if (!this.dataForm.scwj) this.dataForm.scwj = []; // if (!this.dataForm.hyqz) this.dataForm.hyqz = []; @@ -667,21 +697,40 @@ export default { calculateQk() { const zdyj = parseFloat(this.dataForm.zdyj) || 0; const sfyj = parseFloat(this.dataForm.sfyj) || 0; - this.dataForm.qk = (zdyj - sfyj).toFixed(2); + // 计算所有储扣明细的总价(参考 H5 计算逻辑) + let totalDeductAmount = 0; + if (this.dataForm.lqKdDeductList && this.dataForm.lqKdDeductList.length > 0) { + this.dataForm.lqKdDeductList.forEach(deduct => { + const amount = parseFloat(deduct.amount) || 0; + totalDeductAmount += amount; + }); + } + // 欠款 = 整单业绩 - 实付业绩 - 储扣总计 + this.dataForm.qk = (zdyj - sfyj - totalDeductAmount).toFixed(2); }, - // 计算实付业绩 - 根据品项总价自动计算 + // 计算实付业绩 - 根据品项总价和储扣金额自动计算(参考 H5 calculateShifuYej) calculateSfyj() { - let totalSfyj = 0; + let totalPxPrice = 0; - // 遍历所有品项,计算总实付业绩 + // 遍历所有品项,计算总价 this.dataForm.lqKdPxmxList.forEach(px => { const actualPrice = parseFloat(px.actualPrice) || 0; - totalSfyj += actualPrice; + totalPxPrice += actualPrice; }); - // 更新实付业绩 - this.dataForm.sfyj = totalSfyj.toFixed(2); - console.log('计算实付业绩:', totalSfyj); + // 计算所有储扣明细的总价 + let totalDeductAmount = 0; + if (this.dataForm.lqKdDeductList && this.dataForm.lqKdDeductList.length > 0) { + this.dataForm.lqKdDeductList.forEach(deduct => { + const amount = parseFloat(deduct.amount) || 0; + totalDeductAmount += amount; + }); + } + + // 实付业绩 = 品项总价 - 储扣明细总价 + const sfyj = totalPxPrice - totalDeductAmount; + this.dataForm.sfyj = sfyj.toFixed(2); + console.log('计算实付业绩: 实付=', this.dataForm.sfyj, '品项总价=', totalPxPrice, '储扣总额=', totalDeductAmount); // 重新计算欠款 this.calculateQk(); diff --git a/绿纤uni-app/common/config.js b/绿纤uni-app/common/config.js index 85441a2..102b121 100644 --- a/绿纤uni-app/common/config.js +++ b/绿纤uni-app/common/config.js @@ -10,8 +10,8 @@ const ENV_CONFIG = { // 正式环境 production: { name: '正式环境', - apiBaseUrl: 'http://erp_test.lvqianmeiye.com', - // apiBaseUrl: 'https://erp.lvqianmeiye.com', + // apiBaseUrl: 'http://erp_test.lvqianmeiye.com', + apiBaseUrl: 'https://erp.lvqianmeiye.com', // apiBaseUrl: 'http://lvqian.antissoft.com', description: '生产环境服务器' } diff --git a/绿纤uni-app/pages/consume-detail/consume-detail.vue b/绿纤uni-app/pages/consume-detail/consume-detail.vue index f720a9f..0e9ca5a 100644 --- a/绿纤uni-app/pages/consume-detail/consume-detail.vue +++ b/绿纤uni-app/pages/consume-detail/consume-detail.vue @@ -242,6 +242,7 @@ export default { data() { return { + isopen:false, newuserInfo: uni.getStorageSync('newuserInfo'), baseUrl: config.getImgBaseUrl(), loading: false, @@ -258,14 +259,17 @@ computed: { // 判断耗卡日期是否在本月 isCurrentMonth() { - return true - if (!this.consumeData || !this.consumeData.hksj) return false - - const consumeDate = new Date(this.consumeData.hksj) - const currentDate = new Date() - - return consumeDate.getFullYear() === currentDate.getFullYear() && - consumeDate.getMonth() === currentDate.getMonth() + if(this.isopen) { + return this.isopen + } else{ + if (!this.consumeData || !this.consumeData.hksj) return false + + const consumeDate = new Date(this.consumeData.hksj) + const currentDate = new Date() + + return consumeDate.getFullYear() === currentDate.getFullYear() && + consumeDate.getMonth() === currentDate.getMonth() + } } }, @@ -277,10 +281,26 @@ this.initializePage(options) }, onShow() { + this.getisopen() this.loadConsumeDetail() }, methods: { + getisopen(){ + this.isopen = false + const menuData = uni.getStorageSync('appMenuData') || [] + if (Array.isArray(menuData) && menuData.length > 0) { + const rootNode = menuData.find(item => item.fullName == 'app耗卡开关按钮') + // console.error(rootNode) + if (rootNode) { + console.error('app耗卡开关按钮') + this.isopen = true + } else{ + this.isopen = false + } + } + console.error(this.isopen) + }, goToAppointment(appointmentId) { uni.navigateTo({ url: '/pages/appointment-detail/appointment-detail?id='+appointmentId diff --git a/绿纤uni-app/pages/refund-detail/refund-detail.vue b/绿纤uni-app/pages/refund-detail/refund-detail.vue index 9039a7c..1ca2742 100644 --- a/绿纤uni-app/pages/refund-detail/refund-detail.vue +++ b/绿纤uni-app/pages/refund-detail/refund-detail.vue @@ -229,6 +229,7 @@ export default { data() { return { + isopen:false, newuserInfo: uni.getStorageSync('newuserInfo'), baseUrl: config.getImgBaseUrl(), loading: false, @@ -244,14 +245,17 @@ computed: { // 判断退卡日期是否在本月 isCurrentMonth() { - return true - if (!this.refundData || !this.refundData.tksj) return false - - const refundDate = new Date(this.refundData.tksj) - const currentDate = new Date() - - return refundDate.getFullYear() === currentDate.getFullYear() && - refundDate.getMonth() === currentDate.getMonth() + if(this.isopen) { + return this.isopen + } else{ + if (!this.refundData || !this.refundData.tksj) return false + + const refundDate = new Date(this.refundData.tksj) + const currentDate = new Date() + + return refundDate.getFullYear() === currentDate.getFullYear() && + refundDate.getMonth() === currentDate.getMonth() + } } }, @@ -261,8 +265,25 @@ onLoad(options) { this.initializePage(options) }, - + onShow() { + this.getisopen() + }, methods: { + getisopen(){ + this.isopen = false + const menuData = uni.getStorageSync('appMenuData') || [] + if (Array.isArray(menuData) && menuData.length > 0) { + const rootNode = menuData.find(item => item.fullName == 'app退卡开关按钮') + // console.error(rootNode) + if (rootNode) { + console.error('app退卡开关按钮') + this.isopen = true + } else{ + this.isopen = false + } + } + console.error(this.isopen) + }, previewSignature(listfile, index) { let listfilenew = listfile.map(item => this.baseUrl + item.url) uni.previewImage({ diff --git a/绿纤uni-app/pagesA/lx-detail/lx-detail.vue b/绿纤uni-app/pagesA/lx-detail/lx-detail.vue index 1f1bec6..52c70f5 100644 --- a/绿纤uni-app/pagesA/lx-detail/lx-detail.vue +++ b/绿纤uni-app/pagesA/lx-detail/lx-detail.vue @@ -368,6 +368,7 @@ export default { data() { return { + isopen:false, newuserInfo: uni.getStorageSync('newuserInfo'), baseUrl:config.getImgBaseUrl(), loading: false, @@ -396,14 +397,17 @@ }, // 判断开单日期是否在本月 isCurrentMonth() { - return true - if (!this.lxData || !this.lxData.kdrq) return false - - const orderDate = new Date(this.lxData.kdrq) - const currentDate = new Date() - - return orderDate.getFullYear() === currentDate.getFullYear() && - orderDate.getMonth() === currentDate.getMonth() + if(this.isopen) { + return this.isopen + } else{ + if (!this.lxData || !this.lxData.kdrq) return false + + const orderDate = new Date(this.lxData.kdrq) + const currentDate = new Date() + + return orderDate.getFullYear() === currentDate.getFullYear() && + orderDate.getMonth() === currentDate.getMonth() + } } }, @@ -416,9 +420,25 @@ }, onShow() { this.loadLxDetail() + this.getisopen() }, methods: { + getisopen(){ + this.isopen = false + const menuData = uni.getStorageSync('appMenuData') || [] + if (Array.isArray(menuData) && menuData.length > 0) { + const rootNode = menuData.find(item => item.fullName == 'app开单开关按钮') + // console.error(rootNode) + if (rootNode) { + console.error('app开单开关按钮') + this.isopen = true + } else{ + this.isopen = false + } + } + console.error(this.isopen) + }, goToAppointment(appointmentId) { uni.navigateTo({ url: '/pages/appointment-detail/appointment-detail?id='+appointmentId diff --git a/绿纤uni-app/pagesA/lx/lx.vue b/绿纤uni-app/pagesA/lx/lx.vue index 80940b9..426ef8d 100644 --- a/绿纤uni-app/pagesA/lx/lx.vue +++ b/绿纤uni-app/pagesA/lx/lx.vue @@ -655,7 +655,7 @@ const rootNode = menuData.find(item => item.fullName == 'app时间选择开关按钮') // console.error(rootNode) if (rootNode) { - console.error('时间选择开关按钮') + console.error('app时间选择开关按钮') this.istime = false } } -- libgit2 0.21.4