From 4f9eb354382eda4fe5e47c12e58a40896df552d9 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期五, 05 七月 2024 17:08:34 +0800 Subject: [PATCH] fix:沧化修改测试bug --- pages/driver-page/appointment/appointment.vue | 44 ++++++++++++++++++++++++++++++++++++-------- 1 files changed, 36 insertions(+), 8 deletions(-) diff --git a/pages/driver-page/appointment/appointment.vue b/pages/driver-page/appointment/appointment.vue index 339fe4c..5ca0b01 100644 --- a/pages/driver-page/appointment/appointment.vue +++ b/pages/driver-page/appointment/appointment.vue @@ -5,7 +5,7 @@ *鎮ㄥ綋鍓嶇殑棰勭害鏃堕棿娈�<text>{{yuYueSection}}</text> </view> <combined-title - :title="yuYueData.length != 0 ? yuYueData[0].filedName + '鈥斺��' + yuYueData[0].sendDate : '鏆傛棤棰勭害鍒楄〃'"></combined-title> + :title="yuYueData.length != 0 ? yuYueData[0].filedName + '鈥斺��' + yuYueSection : '鏆傛棤棰勭害鍒楄〃'"></combined-title> <view class="appointment-table"> <uni-table border stripe @@ -23,7 +23,7 @@ <uni-td align="center">{{ item.carNum1 || '' }}</uni-td> <uni-td><u-button text="閫夋嫨" type="primary" - :disabled="item.carNum == item.carNum1" + :disabled="item.carNum == item.carNum1&&!isRCSQ" @click="yuYueBtnClick(item)"></u-button></uni-td> </uni-tr> </uni-table> @@ -58,21 +58,25 @@ yyId: '', deptId: '', filedId: '', - remark: '' }, - yuYueSection: '' + yuYueSection: '', + coalStatus: '', + tmId: "" }; }, onLoad(params) { if (params.type == '鍏ュ満鐢宠') { this.isRCSQ = true; this.rcsqData.originalYyId = params.yyId; - this.yuYueSection = params.yuYueSection + // this.yuYueSection = params.yuYueSection + this.yuYueSection = this.getNowFormatDate(); } this.yuYuePostParams.takeCoalId = params.takeCoalId; this.yuYueListParams.filedId = params.filedId; this.yuYueListParams.deptId = params.deptId; this.yuYueListParams.sendDate = params.sendDate; + this.coalStatus = params.coalStatus; + this.tmId = params.tmId }, onShow() { this.init(); @@ -124,22 +128,46 @@ } }) }, - // 鍏ュ満鐢宠 + //鑾峰彇褰撳ぉ鏃ユ湡 + //鑾峰彇褰撳墠鏃ユ湡鍑芥暟 + getNowFormatDate() { + let date = new Date(), + year = date.getFullYear(), //鑾峰彇瀹屾暣鐨勫勾浠�(4浣�) + month = date.getMonth() + 1, //鑾峰彇褰撳墠鏈堜唤(0-11,0浠h〃1鏈�) + strDate = date.getDate() // 鑾峰彇褰撳墠鏃�(1-31) + if (month < 10) month = `0${month}` // 濡傛灉鏈堜唤鏄釜浣嶆暟锛屽湪鍓嶉潰琛�0 + if (strDate < 10) strDate = `0${strDate}` // 濡傛灉鏃ユ槸涓綅鏁帮紝鍦ㄥ墠闈㈣ˉ0 + + return `${year}-${month}-${strDate}` + }, + // 鏇存崲棰勭害鏃堕棿娈� saveRCSQ(value) { this.rcsqData.yyId = value.id; this.rcsqData.deptId = value.deptId; this.rcsqData.filedId = value.filedId; this.$reqPost('saveRCSQ', this.rcsqData, 'json').then(res => { if (res.code == 0) { - this.$u.toast('鍏ュ満鐢宠鎴愬姛'); + this.$u.toast('鏇存崲棰勭害鏃堕棿娈垫垚鍔�'); let timer = setTimeout(() => { uni.switchTab({ url: '/pages/tabbar-page/index-tabbar/index-tabbar' }) }, 1500); + //濡傛灉鏈鍒� 鍏堢鍒板啀鐢宠 } else { - this.$u.toast(res.msg ? res.msg : '鍏ュ満鐢宠澶辫触锛岃绋嶅悗閲嶈瘯'); + this.$u.toast(res.msg ? res.msg : '鏇存崲棰勭害鏃堕棿娈靛け璐ワ紝璇风◢鍚庨噸璇�'); } + + // else if (res.code == 3) { + // this.$u.toast('璇峰厛绛惧埌'); + // setTimeout(() => { + // uni.navigateTo({ + // url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.yuYuePostParams.takeCoalId}&coalStatus=${ + // this.coalStatus}&tmId=${this.tmId}&yyId=${this.rcsqData.originalYyId}&filedId=${this.yuYueListParams.filedId}&deptId=${this.yuYueListParams.deptId}&sendDate=${this.yuYueListParams.sendDate}&yuYueSection=${this.yuYueSection}` + // }) + // }, 1500) + // return + // } }); } } -- Gitblit v1.9.1