Commit 42a54de6386b1079f0a2ce63d22c537bd9b93d60

Authored by 李宇
1 parent af6a273d

最新

antis-ncc-admin/.env.development
@@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
2 2
3 VUE_CLI_BABEL_TRANSPILE_MODULES = true 3 VUE_CLI_BABEL_TRANSPILE_MODULES = true
4 # VUE_APP_BASE_API = 'https://erp.lvqianmeiye.com' 4 # VUE_APP_BASE_API = 'https://erp.lvqianmeiye.com'
5 -# VUE_APP_BASE_API = 'http://erp_test.lvqianmeiye.com'  
6 -VUE_APP_BASE_API = 'http://localhost:2011' 5 +VUE_APP_BASE_API = 'http://erp_test.lvqianmeiye.com'
  6 +# VUE_APP_BASE_API = 'http://localhost:2011'
7 # VUE_APP_BASE_API = 'http://localhost:2011' 7 # VUE_APP_BASE_API = 'http://localhost:2011'
8 VUE_APP_IMG_API = '' 8 VUE_APP_IMG_API = ''
9 VUE_APP_BASE_WSS = 'ws://192.168.110.45:2011/websocket' 9 VUE_APP_BASE_WSS = 'ws://192.168.110.45:2011/websocket'
antis-ncc-admin/src/views/lqKdKdjlb/Form.vue
@@ -89,6 +89,35 @@ @@ -89,6 +89,35 @@
89 </div> 89 </div>
90 </el-form-item> 90 </el-form-item>
91 </el-col> 91 </el-col>
  92 + <!-- 储扣明细(只读展示) -->
  93 + <el-col :span="24">
  94 + <el-form-item label-width="0">
  95 + <div class="table-header">
  96 + <span class="table-title">储扣明细</span>
  97 + </div>
  98 + <el-table
  99 + v-if="dataForm.lqKdDeductList && dataForm.lqKdDeductList.length"
  100 + :data="dataForm.lqKdDeductList"
  101 + size="mini"
  102 + border
  103 + style="width: 100%;">
  104 + <el-table-column prop="itemName" label="品项名称" min-width="160" />
  105 + <el-table-column prop="deductType" label="类型" width="100" />
  106 + <el-table-column prop="projectNumber" label="数量" width="80" />
  107 + <el-table-column prop="unitPrice" label="单价" width="120">
  108 + <template slot-scope="scope">
  109 + <span>{{ Number(scope.row.unitPrice || 0).toFixed(2) }}</span>
  110 + </template>
  111 + </el-table-column>
  112 + <el-table-column prop="amount" label="金额" width="120">
  113 + <template slot-scope="scope">
  114 + <span>{{ Number(scope.row.amount || 0).toFixed(2) }}</span>
  115 + </template>
  116 + </el-table-column>
  117 + </el-table>
  118 + <div v-else style="color:#909399;font-size:12px;padding:8px 0;">暂无储扣明细</div>
  119 + </el-form-item>
  120 + </el-col>
92 </el-form> 121 </el-form>
93 </el-row> 122 </el-row>
94 <span slot="footer" class="dialog-footer"> 123 <span slot="footer" class="dialog-footer">
@@ -144,7 +173,7 @@ export default { @@ -144,7 +173,7 @@ export default {
144 jksyj: undefined, 173 jksyj: undefined,
145 kjblsyj: undefined, 174 kjblsyj: undefined,
146 pxxx: undefined, 175 pxxx: undefined,
147 - lqKdKdjlbDeductList: [], 176 + lqKdDeductList: [],
148 }, 177 },
149 rules: { 178 rules: {
150 kdhy: [ 179 kdhy: [
@@ -570,6 +599,7 @@ export default { @@ -570,6 +599,7 @@ export default {
570 method: 'get' 599 method: 'get'
571 }).then(res => { 600 }).then(res => {
572 this.dataForm = res.data; 601 this.dataForm = res.data;
  602 + console.error(this.dataForm.lqKdDeductList)
573 // if (!this.dataForm.scwj) this.dataForm.scwj = []; 603 // if (!this.dataForm.scwj) this.dataForm.scwj = [];
574 // if (!this.dataForm.hyqz) this.dataForm.hyqz = []; 604 // if (!this.dataForm.hyqz) this.dataForm.hyqz = [];
575 605
@@ -667,21 +697,40 @@ export default { @@ -667,21 +697,40 @@ export default {
667 calculateQk() { 697 calculateQk() {
668 const zdyj = parseFloat(this.dataForm.zdyj) || 0; 698 const zdyj = parseFloat(this.dataForm.zdyj) || 0;
669 const sfyj = parseFloat(this.dataForm.sfyj) || 0; 699 const sfyj = parseFloat(this.dataForm.sfyj) || 0;
670 - this.dataForm.qk = (zdyj - sfyj).toFixed(2); 700 + // 计算所有储扣明细的总价(参考 H5 计算逻辑)
  701 + let totalDeductAmount = 0;
  702 + if (this.dataForm.lqKdDeductList && this.dataForm.lqKdDeductList.length > 0) {
  703 + this.dataForm.lqKdDeductList.forEach(deduct => {
  704 + const amount = parseFloat(deduct.amount) || 0;
  705 + totalDeductAmount += amount;
  706 + });
  707 + }
  708 + // 欠款 = 整单业绩 - 实付业绩 - 储扣总计
  709 + this.dataForm.qk = (zdyj - sfyj - totalDeductAmount).toFixed(2);
671 }, 710 },
672 - // 计算实付业绩 - 根据品项总价自动计算 711 + // 计算实付业绩 - 根据品项总价和储扣金额自动计算(参考 H5 calculateShifuYej)
673 calculateSfyj() { 712 calculateSfyj() {
674 - let totalSfyj = 0; 713 + let totalPxPrice = 0;
675 714
676 - // 遍历所有品项,计算总实付业绩 715 + // 遍历所有品项,计算总
677 this.dataForm.lqKdPxmxList.forEach(px => { 716 this.dataForm.lqKdPxmxList.forEach(px => {
678 const actualPrice = parseFloat(px.actualPrice) || 0; 717 const actualPrice = parseFloat(px.actualPrice) || 0;
679 - totalSfyj += actualPrice; 718 + totalPxPrice += actualPrice;
680 }); 719 });
681 720
682 - // 更新实付业绩  
683 - this.dataForm.sfyj = totalSfyj.toFixed(2);  
684 - console.log('计算实付业绩:', totalSfyj); 721 + // 计算所有储扣明细的总价
  722 + let totalDeductAmount = 0;
  723 + if (this.dataForm.lqKdDeductList && this.dataForm.lqKdDeductList.length > 0) {
  724 + this.dataForm.lqKdDeductList.forEach(deduct => {
  725 + const amount = parseFloat(deduct.amount) || 0;
  726 + totalDeductAmount += amount;
  727 + });
  728 + }
  729 +
  730 + // 实付业绩 = 品项总价 - 储扣明细总价
  731 + const sfyj = totalPxPrice - totalDeductAmount;
  732 + this.dataForm.sfyj = sfyj.toFixed(2);
  733 + console.log('计算实付业绩: 实付=', this.dataForm.sfyj, '品项总价=', totalPxPrice, '储扣总额=', totalDeductAmount);
685 734
686 // 重新计算欠款 735 // 重新计算欠款
687 this.calculateQk(); 736 this.calculateQk();
绿纤uni-app/common/config.js
@@ -10,8 +10,8 @@ const ENV_CONFIG = { @@ -10,8 +10,8 @@ const ENV_CONFIG = {
10 // 正式环境 10 // 正式环境
11 production: { 11 production: {
12 name: '正式环境', 12 name: '正式环境',
13 - apiBaseUrl: 'http://erp_test.lvqianmeiye.com',  
14 - // apiBaseUrl: 'https://erp.lvqianmeiye.com', 13 + // apiBaseUrl: 'http://erp_test.lvqianmeiye.com',
  14 + apiBaseUrl: 'https://erp.lvqianmeiye.com',
15 // apiBaseUrl: 'http://lvqian.antissoft.com', 15 // apiBaseUrl: 'http://lvqian.antissoft.com',
16 description: '生产环境服务器' 16 description: '生产环境服务器'
17 } 17 }
绿纤uni-app/pages/consume-detail/consume-detail.vue
@@ -242,6 +242,7 @@ @@ -242,6 +242,7 @@
242 export default { 242 export default {
243 data() { 243 data() {
244 return { 244 return {
  245 + isopen:false,
245 newuserInfo: uni.getStorageSync('newuserInfo'), 246 newuserInfo: uni.getStorageSync('newuserInfo'),
246 baseUrl: config.getImgBaseUrl(), 247 baseUrl: config.getImgBaseUrl(),
247 loading: false, 248 loading: false,
@@ -258,14 +259,17 @@ @@ -258,14 +259,17 @@
258 computed: { 259 computed: {
259 // 判断耗卡日期是否在本月 260 // 判断耗卡日期是否在本月
260 isCurrentMonth() { 261 isCurrentMonth() {
261 - return true  
262 - if (!this.consumeData || !this.consumeData.hksj) return false  
263 -  
264 - const consumeDate = new Date(this.consumeData.hksj)  
265 - const currentDate = new Date()  
266 -  
267 - return consumeDate.getFullYear() === currentDate.getFullYear() &&  
268 - consumeDate.getMonth() === currentDate.getMonth() 262 + if(this.isopen) {
  263 + return this.isopen
  264 + } else{
  265 + if (!this.consumeData || !this.consumeData.hksj) return false
  266 +
  267 + const consumeDate = new Date(this.consumeData.hksj)
  268 + const currentDate = new Date()
  269 +
  270 + return consumeDate.getFullYear() === currentDate.getFullYear() &&
  271 + consumeDate.getMonth() === currentDate.getMonth()
  272 + }
269 } 273 }
270 }, 274 },
271 275
@@ -277,10 +281,26 @@ @@ -277,10 +281,26 @@
277 this.initializePage(options) 281 this.initializePage(options)
278 }, 282 },
279 onShow() { 283 onShow() {
  284 + this.getisopen()
280 this.loadConsumeDetail() 285 this.loadConsumeDetail()
281 }, 286 },
282 287
283 methods: { 288 methods: {
  289 + getisopen(){
  290 + this.isopen = false
  291 + const menuData = uni.getStorageSync('appMenuData') || []
  292 + if (Array.isArray(menuData) && menuData.length > 0) {
  293 + const rootNode = menuData.find(item => item.fullName == 'app耗卡开关按钮')
  294 + // console.error(rootNode)
  295 + if (rootNode) {
  296 + console.error('app耗卡开关按钮')
  297 + this.isopen = true
  298 + } else{
  299 + this.isopen = false
  300 + }
  301 + }
  302 + console.error(this.isopen)
  303 + },
284 goToAppointment(appointmentId) { 304 goToAppointment(appointmentId) {
285 uni.navigateTo({ 305 uni.navigateTo({
286 url: '/pages/appointment-detail/appointment-detail?id='+appointmentId 306 url: '/pages/appointment-detail/appointment-detail?id='+appointmentId
绿纤uni-app/pages/refund-detail/refund-detail.vue
@@ -229,6 +229,7 @@ @@ -229,6 +229,7 @@
229 export default { 229 export default {
230 data() { 230 data() {
231 return { 231 return {
  232 + isopen:false,
232 newuserInfo: uni.getStorageSync('newuserInfo'), 233 newuserInfo: uni.getStorageSync('newuserInfo'),
233 baseUrl: config.getImgBaseUrl(), 234 baseUrl: config.getImgBaseUrl(),
234 loading: false, 235 loading: false,
@@ -244,14 +245,17 @@ @@ -244,14 +245,17 @@
244 computed: { 245 computed: {
245 // 判断退卡日期是否在本月 246 // 判断退卡日期是否在本月
246 isCurrentMonth() { 247 isCurrentMonth() {
247 - return true  
248 - if (!this.refundData || !this.refundData.tksj) return false  
249 -  
250 - const refundDate = new Date(this.refundData.tksj)  
251 - const currentDate = new Date()  
252 -  
253 - return refundDate.getFullYear() === currentDate.getFullYear() &&  
254 - refundDate.getMonth() === currentDate.getMonth() 248 + if(this.isopen) {
  249 + return this.isopen
  250 + } else{
  251 + if (!this.refundData || !this.refundData.tksj) return false
  252 +
  253 + const refundDate = new Date(this.refundData.tksj)
  254 + const currentDate = new Date()
  255 +
  256 + return refundDate.getFullYear() === currentDate.getFullYear() &&
  257 + refundDate.getMonth() === currentDate.getMonth()
  258 + }
255 } 259 }
256 }, 260 },
257 261
@@ -261,8 +265,25 @@ @@ -261,8 +265,25 @@
261 onLoad(options) { 265 onLoad(options) {
262 this.initializePage(options) 266 this.initializePage(options)
263 }, 267 },
264 - 268 + onShow() {
  269 + this.getisopen()
  270 + },
265 methods: { 271 methods: {
  272 + getisopen(){
  273 + this.isopen = false
  274 + const menuData = uni.getStorageSync('appMenuData') || []
  275 + if (Array.isArray(menuData) && menuData.length > 0) {
  276 + const rootNode = menuData.find(item => item.fullName == 'app退卡开关按钮')
  277 + // console.error(rootNode)
  278 + if (rootNode) {
  279 + console.error('app退卡开关按钮')
  280 + this.isopen = true
  281 + } else{
  282 + this.isopen = false
  283 + }
  284 + }
  285 + console.error(this.isopen)
  286 + },
266 previewSignature(listfile, index) { 287 previewSignature(listfile, index) {
267 let listfilenew = listfile.map(item => this.baseUrl + item.url) 288 let listfilenew = listfile.map(item => this.baseUrl + item.url)
268 uni.previewImage({ 289 uni.previewImage({
绿纤uni-app/pagesA/lx-detail/lx-detail.vue
@@ -368,6 +368,7 @@ @@ -368,6 +368,7 @@
368 export default { 368 export default {
369 data() { 369 data() {
370 return { 370 return {
  371 + isopen:false,
371 newuserInfo: uni.getStorageSync('newuserInfo'), 372 newuserInfo: uni.getStorageSync('newuserInfo'),
372 baseUrl:config.getImgBaseUrl(), 373 baseUrl:config.getImgBaseUrl(),
373 loading: false, 374 loading: false,
@@ -396,14 +397,17 @@ @@ -396,14 +397,17 @@
396 }, 397 },
397 // 判断开单日期是否在本月 398 // 判断开单日期是否在本月
398 isCurrentMonth() { 399 isCurrentMonth() {
399 - return true  
400 - if (!this.lxData || !this.lxData.kdrq) return false  
401 -  
402 - const orderDate = new Date(this.lxData.kdrq)  
403 - const currentDate = new Date()  
404 -  
405 - return orderDate.getFullYear() === currentDate.getFullYear() &&  
406 - orderDate.getMonth() === currentDate.getMonth() 400 + if(this.isopen) {
  401 + return this.isopen
  402 + } else{
  403 + if (!this.lxData || !this.lxData.kdrq) return false
  404 +
  405 + const orderDate = new Date(this.lxData.kdrq)
  406 + const currentDate = new Date()
  407 +
  408 + return orderDate.getFullYear() === currentDate.getFullYear() &&
  409 + orderDate.getMonth() === currentDate.getMonth()
  410 + }
407 } 411 }
408 }, 412 },
409 413
@@ -416,9 +420,25 @@ @@ -416,9 +420,25 @@
416 }, 420 },
417 onShow() { 421 onShow() {
418 this.loadLxDetail() 422 this.loadLxDetail()
  423 + this.getisopen()
419 }, 424 },
420 425
421 methods: { 426 methods: {
  427 + getisopen(){
  428 + this.isopen = false
  429 + const menuData = uni.getStorageSync('appMenuData') || []
  430 + if (Array.isArray(menuData) && menuData.length > 0) {
  431 + const rootNode = menuData.find(item => item.fullName == 'app开单开关按钮')
  432 + // console.error(rootNode)
  433 + if (rootNode) {
  434 + console.error('app开单开关按钮')
  435 + this.isopen = true
  436 + } else{
  437 + this.isopen = false
  438 + }
  439 + }
  440 + console.error(this.isopen)
  441 + },
422 goToAppointment(appointmentId) { 442 goToAppointment(appointmentId) {
423 uni.navigateTo({ 443 uni.navigateTo({
424 url: '/pages/appointment-detail/appointment-detail?id='+appointmentId 444 url: '/pages/appointment-detail/appointment-detail?id='+appointmentId
绿纤uni-app/pagesA/lx/lx.vue
@@ -655,7 +655,7 @@ @@ -655,7 +655,7 @@
655 const rootNode = menuData.find(item => item.fullName == 'app时间选择开关按钮') 655 const rootNode = menuData.find(item => item.fullName == 'app时间选择开关按钮')
656 // console.error(rootNode) 656 // console.error(rootNode)
657 if (rootNode) { 657 if (rootNode) {
658 - console.error('时间选择开关按钮') 658 + console.error('app时间选择开关按钮')
659 this.istime = false 659 this.istime = false
660 } 660 }
661 } 661 }