From 6ebd978221c7bf469f5e1d821b4345101357ca4c Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期一, 10 二月 2025 09:32:22 +0800 Subject: [PATCH] faat:提煤单详情下磅文字修改 --- pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 46 ++++++++++++++++++++++++++++++++++++---------- 1 files changed, 36 insertions(+), 10 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 5a89d06..e37dac6 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 @@ -219,7 +219,7 @@ </view> <view class="weigh-button" v-show="ablePrintOut"> - <u-button :text=" isXiaBang ? '涓嬬' : '鎵撳嵃鍑洪棬璇�'" + <u-button :text=" isBtnShow ? '涓嬬' : '鎵撳嵃鍑洪棬璇�'" @click="printBefore('out')" type="primary" shape="circle" @@ -231,7 +231,9 @@ type="primary" shape="circle"></u-button></view> <!-- 鐢靛瓙纾呭崟涓嬭浇 --> - <view class="weigh-button"><u-button text="涓嬭浇鐢靛瓙纾呭崟" + <view class="weigh-button" + v-if="isBtnShow" + ><u-button text="涓嬭浇鐢靛瓙纾呭崟" @click="downloadFileFun" type="primary" shape="circle"></u-button></view> @@ -361,6 +363,7 @@ swiperList:[], orderPlanId: null, radioValue:'鐓ゅ満', + isBtnShow:true, currentNum:0, guideLineshow:false, yyId: null, @@ -641,7 +644,30 @@ } }, 1000) } - + //鏌ヨ褰撳墠鍗曚綅鏄惁鏈夌數瀛愭彁鐓ゅ崟鍔熻兘 + // this.$reqGet('getIsOpenTm').then(res=>{ + // console.log(res,'鏌ヨ鏌ヨ') + // }) + uni.request({ + url: `${BaseUrl}/admin/dict/type/app_tmorder_use`, + method: 'GET', + success: (res) => { + console.log(res.data.data, '鏌ヨ瀛楀吀椤�'); + let falseArr = res.data.data.map(item=>{ + return item.value + }); + if (falseArr.length){ + if(falseArr.includes(this.coalDetailsData.deptId)){ + this.isBtnShow = true; + }else{ + this.isBtnShow = false; + } + + }else{ + this.isBtnShow = false; + } + } + }) }) }, // 鏃ュ織鏌ヨ @@ -889,7 +915,7 @@ filedId: this.getWeightHouseObj.filedId, tmId: this.getWeightHouseObj.tmId, carNo: uni.getStorageSync('carNo'), - type: 3, + type: this.$store.state.ispecial.includes(this.coalDetailsData.deptId) ? 4 : 3, weighingNumber: 2, printing: uni.getStorageSync('selectedPrintStyle') } @@ -1110,12 +1136,12 @@ const result = res.data.url; let that = this; const fileExtName = ".pdf"; - const randfile = new Date().getTime() +res.data.fileExtName; + const randfile = new Date().getTime() +res.data.fileName; const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`; if(result){ wx.downloadFile({ url: `${BaseUrl}${result}`, - filePath:newPath, + filePath:wx.env.USER_DATA_PATH+`/${randfile}`, header: { Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), CLIENT_TOC: 'Y' @@ -1123,7 +1149,7 @@ success(res){ const filePath = res.tempFilePath; wx.openDocument({ - filePath: newPath, + filePath: res.filePath, showMenu: true, fileType: 'pdf', success: function (res) {} @@ -1146,9 +1172,9 @@ // wx.showModal({ // title: '鏂囦欢宸蹭繚瀛樺埌鎵嬫満鐩稿唽', // content: '浣嶄簬tencent/MicroMsg/WeiXin涓� \r\n灏嗕繚瀛樼殑鏂囦欢閲嶅懡鍚嶆敼涓篬 .pdf ]鍚庣紑鍗冲彲', - // confirmColor: '#0bc183', - // confirmText: '鐭ラ亾浜�', - // showCancel: false + // confirmText: '鐭ラ亾浜�', + // s confirmColor: '#0bc183', + // howCancel: false // }) // }, // fail(res) { -- Gitblit v1.9.1