From 8e095c1fd6164fafc7d5cfd144528a0d67afef7c Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期三, 22 三月 2023 17:31:15 +0800 Subject: [PATCH] 转发页面修改 --- pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 80 +++++++++++++++++++++++++++++---------- 1 files changed, 59 insertions(+), 21 deletions(-) diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue index 27b78fa..f914f46 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue @@ -11,7 +11,7 @@ <u-button text="鏀剧┖" type="primary" plain></u-button> <u-button text="鍛煎彨瀹㈡湇" type="primary" plain></u-button> </view> - <view class="utils_chil"><u-button text="灞曠ず鎻愮叅鍗�" @click="showCaolPickUpBill" type="primary" ></u-button></view> + <view class="utils_chil"><u-button text="灞曠ず鎻愮叅鍗�" @click="showCaolPickUpBill" type="primary"></u-button></view> <view class="utils_chil"><u-button text="涓婄璁¢噺" @click="cengZhongClick" type="primary"></u-button></view> </view> </view> @@ -30,29 +30,52 @@ return { orderPlanId: null, yyId: null, - dayRZ: [] + dayRZ: [], + coalDetailsData: {}, // 鎻愮叅鍗曡鎯� + getWeightHouseObj: { + // 鑾峰彇鎵�鍦ㄧ鎴� + deptId: '', + filedId: '', + tmId: '', + tmCode: '', + carNo: '' + } }; }, onShow() { this.init(); }, - computed:{ - userName(){ - return uni.getStorageSync('username') + computed: { + userName() { + return uni.getStorageSync('username'); }, - openid(){ - return uni.getStorageSync('openid') + openid() { + return uni.getStorageSync('openid'); } }, methods: { init() { this.coalDayPage(); + this.getTakeCoal(); + }, + // 鑾峰彇鎻愮叅鍗曡鎯� + getTakeCoal() { + this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => { + if (res.code == 0) { + this.coalDetailsData = res.data[0]; + this.getWeightHouseObj.deptId = this.coalDetailsData.deptId; + this.getWeightHouseObj.filedId = this.coalDetailsData.filedId; + this.getWeightHouseObj.tmId = this.coalDetailsData.id; + this.getWeightHouseObj.tmCode = this.coalDetailsData.code; + this.getWeightHouseObj.carNo = this.coalDetailsData.carNo; + } + }); }, // 鏃ュ織鏌ヨ coalDayPage() { - this.$reqGet('coalDayPage').then(res => { + this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => { if (res.code == 0) { - this.dayRZ = res.data.records; + this.dayRZ = res.data; } }); }, @@ -64,8 +87,19 @@ }, // 绛惧埌 arriveClick() { - this.$reqPost('arrive', { id: this.orderPlanId }, 'params').then(res => { - console.log(res, '绛惧埌'); + + // 鑾峰彇浣嶇疆淇℃伅 + // wx.getFuzzyLocation({ + // type: 'wgs84', + // success (res) { + // const latitude = res.latitude + // const longitude = res.longitude + // } + // }) + + + uni.navigateTo({ + url: `/pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock?orderPlanId=${this.orderPlanId}` }); }, // 鍏ュ満鐢宠 @@ -75,9 +109,9 @@ }); }, // 鍛煎彨瀹㈡湇 - callCustomerService(){ + callCustomerService() { wx.join1v1Chat({ - caller: { nickname:this.userName , openid: this.openid }, + caller: { nickname: this.userName, openid: this.openid }, listener: { nickname: '瀹㈡湇', openid: 'orutI5YT0yEvARVngdsTmBpisWmw' }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid backgroundType: 2, roomType: 'voice' @@ -85,13 +119,17 @@ }, // 绉伴噸 cengZhongClick() { - uni.navigateTo({ - url:`/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}` - }) + this.$reqGet('getWeighHouse', this.getWeightHouseObj).then(res => { + console.log(res, '鑾峰彇纾呮埧'); + if(res.code == 0){ + uni.navigateTo({ + url: `/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice?takeCoalId=${this.orderPlanId}&sceneId=${res.data.id}&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}` + }); + }else{ + this.$u.toast('鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�') + } + }); } - /** - * @desc 绛夊緟鍙栫叅鍗曟帴鍙� - * */ } }; </script> @@ -127,8 +165,8 @@ padding: vww(20); box-sizing: border-box; overflow-y: overlay; //琛屼负涓� auto 鐩稿悓锛屼絾鏄粴鍔ㄦ潯缁樺埗鍦ㄥ唴瀹逛箣涓婏紝鑰屼笉鏄崰鎹┖闂淬�� - .u-text{ - margin-bottom: vww(5)!important; + .u-text { + margin-bottom: vww(5) !important; } } .utilsBox { -- Gitblit v1.9.1