Commit 42a54de6386b1079f0a2ce63d22c537bd9b93d60

Authored by 李宇
1 parent af6a273d

最新

antis-ncc-admin/.env.development
... ... @@ -2,8 +2,8 @@
2 2  
3 3 VUE_CLI_BABEL_TRANSPILE_MODULES = true
4 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 7 # VUE_APP_BASE_API = 'http://localhost:2011'
8 8 VUE_APP_IMG_API = ''
9 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 89 </div>
90 90 </el-form-item>
91 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 121 </el-form>
93 122 </el-row>
94 123 <span slot="footer" class="dialog-footer">
... ... @@ -144,7 +173,7 @@ export default {
144 173 jksyj: undefined,
145 174 kjblsyj: undefined,
146 175 pxxx: undefined,
147   - lqKdKdjlbDeductList: [],
  176 + lqKdDeductList: [],
148 177 },
149 178 rules: {
150 179 kdhy: [
... ... @@ -570,6 +599,7 @@ export default {
570 599 method: 'get'
571 600 }).then(res => {
572 601 this.dataForm = res.data;
  602 + console.error(this.dataForm.lqKdDeductList)
573 603 // if (!this.dataForm.scwj) this.dataForm.scwj = [];
574 604 // if (!this.dataForm.hyqz) this.dataForm.hyqz = [];
575 605  
... ... @@ -667,21 +697,40 @@ export default {
667 697 calculateQk() {
668 698 const zdyj = parseFloat(this.dataForm.zdyj) || 0;
669 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 712 calculateSfyj() {
674   - let totalSfyj = 0;
  713 + let totalPxPrice = 0;
675 714  
676   - // 遍历所有品项,计算总实付业绩
  715 + // 遍历所有品项,计算总
677 716 this.dataForm.lqKdPxmxList.forEach(px => {
678 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 736 this.calculateQk();
... ...
绿纤uni-app/common/config.js
... ... @@ -10,8 +10,8 @@ const ENV_CONFIG = {
10 10 // 正式环境
11 11 production: {
12 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 15 // apiBaseUrl: 'http://lvqian.antissoft.com',
16 16 description: '生产环境服务器'
17 17 }
... ...
绿纤uni-app/pages/consume-detail/consume-detail.vue
... ... @@ -242,6 +242,7 @@
242 242 export default {
243 243 data() {
244 244 return {
  245 + isopen:false,
245 246 newuserInfo: uni.getStorageSync('newuserInfo'),
246 247 baseUrl: config.getImgBaseUrl(),
247 248 loading: false,
... ... @@ -258,14 +259,17 @@
258 259 computed: {
259 260 // 判断耗卡日期是否在本月
260 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 281 this.initializePage(options)
278 282 },
279 283 onShow() {
  284 + this.getisopen()
280 285 this.loadConsumeDetail()
281 286 },
282 287  
283 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 304 goToAppointment(appointmentId) {
285 305 uni.navigateTo({
286 306 url: '/pages/appointment-detail/appointment-detail?id='+appointmentId
... ...
绿纤uni-app/pages/refund-detail/refund-detail.vue
... ... @@ -229,6 +229,7 @@
229 229 export default {
230 230 data() {
231 231 return {
  232 + isopen:false,
232 233 newuserInfo: uni.getStorageSync('newuserInfo'),
233 234 baseUrl: config.getImgBaseUrl(),
234 235 loading: false,
... ... @@ -244,14 +245,17 @@
244 245 computed: {
245 246 // 判断退卡日期是否在本月
246 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 265 onLoad(options) {
262 266 this.initializePage(options)
263 267 },
264   -
  268 + onShow() {
  269 + this.getisopen()
  270 + },
265 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 287 previewSignature(listfile, index) {
267 288 let listfilenew = listfile.map(item => this.baseUrl + item.url)
268 289 uni.previewImage({
... ...
绿纤uni-app/pagesA/lx-detail/lx-detail.vue
... ... @@ -368,6 +368,7 @@
368 368 export default {
369 369 data() {
370 370 return {
  371 + isopen:false,
371 372 newuserInfo: uni.getStorageSync('newuserInfo'),
372 373 baseUrl:config.getImgBaseUrl(),
373 374 loading: false,
... ... @@ -396,14 +397,17 @@
396 397 },
397 398 // 判断开单日期是否在本月
398 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 420 },
417 421 onShow() {
418 422 this.loadLxDetail()
  423 + this.getisopen()
419 424 },
420 425  
421 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 442 goToAppointment(appointmentId) {
423 443 uni.navigateTo({
424 444 url: '/pages/appointment-detail/appointment-detail?id='+appointmentId
... ...
绿纤uni-app/pagesA/lx/lx.vue
... ... @@ -655,7 +655,7 @@
655 655 const rootNode = menuData.find(item => item.fullName == 'app时间选择开关按钮')
656 656 // console.error(rootNode)
657 657 if (rootNode) {
658   - console.error('时间选择开关按钮')
  658 + console.error('app时间选择开关按钮')
659 659 this.istime = false
660 660 }
661 661 }
... ...