yangan
2025-02-10 6ebd978221c7bf469f5e1d821b4345101357ca4c
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) {