From 40ce9965257472d715d072647796ac91c3932d73 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期一, 18 九月 2023 17:49:00 +0800 Subject: [PATCH] 修改合卡 --- pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 137 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 116 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 26d35ac..0661bfa 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 @@ -103,6 +103,24 @@ </view> </view> <view class="weigh-ability"> + <view class="weigh-button" + v-show='ablePrintInduction'> + <u-button text="鎵撳嵃鍏ラ棬璇�" + @click="printEntryCertificate" + type="primary" + shape="circle" + :loading="enterLoading" + loadingText="鎵撳嵃涓�,璇风◢鍊�"></u-button> + </view> + <view class="weigh-button" + v-show="ablePrintOut"> + <u-button text="鎵撳嵃鍑洪棬璇�" + @click="printExitPermit" + type="primary" + shape="circle" + :loading="outLoading" + loadingText="鎵撳嵃涓�,璇风◢鍊�"></u-button> + </view> <view class="weigh-button"><u-button text="灞曠ず鎻愮叅鍗�" @click="showCaolPickUpBill" type="primary" @@ -128,6 +146,21 @@ @confirm="completeOutSaleConfirm" @cancel="completeOutSaleCancel"></u-modal> </view> + <view class="serviece-customer"> + <u-action-sheet :actions="list" + @select="selectClick" + @close='serviceClose' + title="鍛煎彨鏂瑰紡" + :show="servieceShow" + cancelText="鍙栨秷"></u-action-sheet> + </view> + <!-- 纾呮埧蹇欑鎻愮ず寮圭獥 --> + <view class=""> + <u-modal :show="wsgVisiable" + title="鎻愮ず" + :content="wsgContent" + @confirm="wsgContentConfirm"></u-modal> + </view> </view> </template> @@ -142,6 +175,8 @@ this.overTmWaixiao = value.overTmWaixiao this.getWeightHouseObj.overTmWaixiao = value.overTmWaixiao } + }, + onShow() { this.init(); }, data() { @@ -173,7 +208,8 @@ // 瀹㈡湇淇℃伅 serviceInfoObj: { openId: null, - openName: '' + openName: '', + serviecePhone: '' }, coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠', '杩涘叆鍦洪櫌', '寮傚父瀹℃牳涓�' @@ -207,8 +243,13 @@ clean: "" }, completeOutSaleShow: false, - overTmWaixiao: null - + overTmWaixiao: null, + list: [{ name: '鎵嬫満鍙�', subname: '1213456', id: 1 }, { name: '寰俊璇煶', id: 2 }], //鍛煎彨瀹㈡湇閫夐」 + servieceShow: false, + ablePrintInduction: false, //鍏ラ棬璇佹槸鍚︽樉绀� + ablePrintOut: false, //鍑洪棬璇佹槸鍚︽樉绀� + enterLoading: false, //鍏ラ棬鎸夐挳loading + outLoading: false, //鍑洪棬鎸夐挳loading }; }, onHide() { @@ -218,7 +259,7 @@ clearInterval(this.interval); }, computed: { - ...mapState(['globalweigh', 'globalinfraredStatus']), + ...mapState(['globalweigh', 'globalinfraredStatus', 'wsgVisiable', 'wsgContent']), name() { return uni.getStorageSync('name'); }, @@ -244,6 +285,7 @@ } }, methods: { + ...mapMutations(['changewsgVisiable']), init() { this.$reqGet('coalDayPage', { id: this.orderPlanId }).then(res => { if (res.code == 0) { @@ -263,7 +305,7 @@ }); this.coalDayPage(); //鑾峰彇鏃ュ織 this.getTakeCoal(); //鑾峰彇鎻愮叅鍗曡鎯� - this.getgetService(); //鑾峰彇瀹㈡湇 + }, // 鑾峰彇瀹㈡湇openid getgetService() { @@ -274,6 +316,8 @@ } else { this.serviceInfoObj.openId = res.data.openId; this.serviceInfoObj.openName = res.data.openName; + this.serviceInfoObj.serviecePhone = res.data.serviecePhone + this.$set(this.list[0], 'subname', this.serviceInfoObj.serviecePhone) uni.setStorageSync('customeropenId', this.serviceInfoObj.openId); uni.setStorageSync('customerName', this.serviceInfoObj.openName); } @@ -314,6 +358,9 @@ this.primarySkin = this.coalDetailsData.skinTwo; this.primaryHair = this.coalDetailsData.hairTwo; this.primaryClean = this.coalDetailsData.cleanTwo; + // 鍏ラ棬璇� 鍜� 鍑洪棬璇� 鏄惁鏄剧ず + this.ablePrintInduction = this.coalDetailsData.hair || this.coalDetailsData.skin + this.ablePrintOut = this.coalDetailsData.hair && this.coalDetailsData.skin } else { this.$u.toast('鍔犺浇澶辫触'); } @@ -333,6 +380,8 @@ }) } } + }).then(() => { + this.getgetService(); //鑾峰彇瀹㈡湇 }) }, // 鏃ュ織鏌ヨ @@ -378,8 +427,23 @@ }&sendDate=${this.getYuYueDataParams.sendDate}` }); }, - // 鍛煎彨瀹㈡湇 callCustomerService() { + this.servieceShow = true + }, + serviceClose() { + this.servieceShow = false + }, + selectClick(v) { + if (v.id === 2) { + this.callCustomerServiceImpl() + } else if (v.id === 1) { + wx.makePhoneCall({ + phoneNumber: this.serviceInfoObj.serviecePhone + }) + } + }, + // 鍛煎彨瀹㈡湇 + callCustomerServiceImpl() { // if (!this.serviceInfoObj.openId) { // this.$u.toast('鏃犲鏈嶄俊鎭�'); // } @@ -399,7 +463,7 @@ } else { wx.join1v1Chat({ caller: { - nickname: uni.getStorageSync('name'), + nickname: uni.getStorageSync('username'), openid: uni.getStorageSync( 'openid') }, @@ -424,14 +488,6 @@ } }); }, - calling() { - // wx.join1v1Chat({ - // caller: { nickname: this.name, openid: this.openid }, //oZjXk5RRmbroAfl1m5aZ6hRNvqh4 - // listener: { nickname: this.serviceInfoObj.openName, openid: 'orutI5YT0yEvARVngdsTmBpisWmw' }, // 杩欓噷鐨刼penid鏄痜yy鐨勶紝鍏呭綋鍥哄畾鐨勫鏈峯penid - // backgroundType: 2, - // roomType: 'voice' - // }); - }, // 绉伴噸 cengZhongClick() { this.$reqGet('getWeighHouse', this.getWeightHouseObj).then(res => { @@ -450,7 +506,7 @@ }&primaryHair=${this.primaryHair}&psrimaryClean=${this.primaryClean}&sceneInOut=${res.data.sceneInOut}&overTmWaixiao=${this.overTmWaixiao}` }); } else { - this.$u.toast('鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�'); + this.$u.toast(res.msg ? res.msg : '鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�'); } }); }, @@ -491,6 +547,42 @@ completeOutSaleCancel() { this.completeOutSaleShow = false }, + // 鎵撳嵃鍏ラ棬璇� + printEntryCertificate() { + uni.showLoading({ + title: '姝e湪鎵撳嵃涓�,璇风◢鍚�' + }) + this.enterLoading = true + this.$reqGet('printer', { type: 2, tmId: this.coalDetailsData.id }).then(res => { + uni.hideLoading() + this.enterLoading = false + console.log(res); + if (res.code === 0) { + this.$u.toast('鎵撳嵃鎴愬姛') + } else { + this.$u.toast(res.msg ? res.msg : '鎵撳嵃澶辫触') + } + }) + }, + // 鎵撳嵃鍑洪棬璇� + printExitPermit() { + uni.showLoading({ + title: '姝e湪鎵撳嵃涓�,璇风◢鍚�' + }) + this.outLoading = true + this.$reqGet('printer', { type: 3, tmId: this.coalDetailsData.id }).then(res => { + uni.hideLoading() + this.outLoading = false + if (res.code === 0) { + this.$u.toast('鎵撳嵃鎴愬姛') + } else { + this.$u.toast(res.msg ? res.msg : '鎵撳嵃澶辫触') + } + }) + }, + wsgContentConfirm() { + this.changewsgVisiable(false) + } } }; </script> @@ -519,7 +611,7 @@ ::v-deep.bill-of-lading-details { width: 100%; - height: 100vh; + height: 100%; margin: 0 auto; display: flex; flex-direction: column; @@ -678,7 +770,7 @@ } .timeLine { - height: 40%; + height: 300rpx; margin: vww(20); position: relative; top: vww(120); @@ -740,15 +832,18 @@ .weigh-ability { width: 631rpx; - height: vww(100); + height: vww(200); margin: vww(80) auto; - margin-bottom: vww(10); + margin-top: vww(100); + margin-bottom: vww(20); @include flex; flex-direction: column; + justify-content: flex-start; .weigh-button { width: 631rpx; - height: vww(89); + height: vww(40); + margin: vww(10); .u-button { font-size: 28rpx; -- Gitblit v1.9.1