From cdc4309a35676b39abfa395315a1bd28df49f786 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期二, 25 六月 2024 10:43:57 +0800 Subject: [PATCH] feat:上磅计量更改消息提示 --- pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue | 72 ++++++++++++++++++++++++++++++++---- 1 files changed, 64 insertions(+), 8 deletions(-) diff --git a/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue b/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue index 51c1a5e..369a02b 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue @@ -1,6 +1,14 @@ <template> <!-- 鎵撳崱 --> <view class="punchTheClock"> + <view class="editIn"> + <u-button text=" 鏇存敼鍏ュ満" + type="primary" + plain + @click="rcsqClick" + shape="circle" + :disabled="coalDetailsData.status >= 3"></u-button> + </view> <!-- 鎵撳崱鎸夐挳 --> <view class="punchTheClock_container"> <view class="punchTheClock_btn" @@ -15,6 +23,8 @@ <text>鏈繘鍏ョ熆鍦哄尯鍩�</text> </view> --> </view> + + </view> </template> @@ -22,26 +32,64 @@ import { todayDate } from '@/utils/util.js'; export default { onLoad(params) { + console.log(params,'params') this.punchTheClockObj.tmcoa = params.tmId.toString(); + this.orderPlanId = params.orderPlanId; this.coalStatus = params.coalStatus; + this.yyId = params.yyId; }, data() { return { nowTime: '', coalStatus: 0, + orderPlanId:'', + yyId:null, + coalDetailsData:{}, punchTheClockObj: { tmcoa: null, latA: null, latB: null - } + }, + getYuYueDataParams: { + deptId: '', + filedId: '', + sendDate: '' + }, }; }, onShow() { + this.init(); this.getSetting(); //鑾峰彇鎺堟潈 this.getFuzzyLocation(); //鑾峰彇浣嶇疆 this.todayDate(); //褰撳墠鏃堕棿 }, methods: { + init(){ + uni.showLoading({ + title: '鍔犺浇涓�' + }); + this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => { + uni.hideLoading(); + if (res.code == 0) { + this.coalDetailsData = res.data; + console.log(res, '閫氱煡鍗曡鎯�'); + // 鑾峰彇鍏ュ満鐢宠鎿嶄綔鍚庣殑棰勭害鍒楄〃鐨勫弬鏁� + this.getYuYueDataParams.deptId = res.data.deptId; + this.getYuYueDataParams.filedId = res.data.filedId; + this.getYuYueDataParams.sendDate = res.data.sendDate; + } else { + this.$u.toast('鍔犺浇澶辫触'); + } + }) + }, + // 鍏ュ満鐢宠 + rcsqClick() { + uni.navigateTo({ + url: `/pages/driver-page/appointment/appointment?type=鍏ュ満鐢宠&takeCoalId=${this.orderPlanId}&yyId=${this.yyId}&filedId=${this.getYuYueDataParams.filedId}&deptId=${ + this.getYuYueDataParams.deptId + }&sendDate=${this.getYuYueDataParams.sendDate}` + }); + }, getSetting() { // 鑾峰彇鏉冮檺淇℃伅 wx.getSetting({ @@ -86,13 +134,14 @@ console.log(res, '绛惧埌'); if (res.code == 0) { this.$u.toast('绛惧埌鎴愬姛'); - setTimeout(() => { - uni.navigateBack({ - delta: 1 - }, - 500 - ); - }); + // 濡傛灉鏄鍒板悗鎵嶈兘鏇存敼鏃堕棿锛岀偣绛惧埌瀹屾垚灏卞埆杩斿洖涓荤晫闈簡锛屾洿鏀瑰畬鍚庡啀杩斿洖 + // setTimeout(() => { + // uni.navigateBack({ + // delta: 1 + // }, + // 500 + // ); + // }); } else { this.$u.toast(res.msg ? res.msg : '绛惧埌澶辫触'); } @@ -111,7 +160,9 @@ height: 100vh; display: flex; justify-content: center; + flex-direction: column; align-items: center; + position: relative; .punchTheClock_container { .punchTheClock_btn { @@ -141,5 +192,10 @@ } } } + .editIn{ + position: absolute; + right:10rpx; + top: 15rpx; + } } </style> \ No newline at end of file -- Gitblit v1.9.1