| | |
| | | <view class="">{{ faYunDetailobj.clean || '' }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="body-container"> |
| | | <view class="body-container" |
| | | v-if="!isSpecial"> |
| | | <view class="container-block"> |
| | | <view class="">订单剩余量</view> |
| | | <view class="">{{ faYunDetailobj.allowance || '' }}</view> |
| | |
| | | <view class="">{{ faYunDetailobj.code || '' }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="body-container last"> |
| | | <view class="body-container last" |
| | | v-if="!isSpecial"> |
| | | <view class="container-block"> |
| | | <view class="">订单编号</view> |
| | | <view class="">{{ faYunDetailobj.orderCode || '' }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="origin-info" |
| | | v-if="faYunDetailobj.orderType == '外购' || faYunDetailobj.orderType == '内购' || faYunDetailobj.orderType == '转出'"> |
| | | <combined-title title="原发信息"></combined-title> |
| | | <view class="body-container"> |
| | | <view class="container-block"> |
| | | <view class="">皮重</view> |
| | | <view class="">{{ faYunDetailobj.skinTwo || 0 }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="body-container"> |
| | | <view class="container-block"> |
| | | <view class="">毛重</view> |
| | | <view class="">{{ faYunDetailobj.hairTwo || 0 }}</view> |
| | | </view> |
| | | </view> |
| | | <view class="body-container"> |
| | | <view class="container-block"> |
| | | <view class="">净重</view> |
| | | <view class="">{{ faYunDetailobj.cleanTwo || 0 }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- 增加电子磅单下载 --> |
| | | <!-- v-if="roleType === 3" --> |
| | | <view class="weigh-button"> <u-button text="下载电子磅单" |
| | | @click="downloadTmFile" |
| | | type="primary" |
| | | shape="circle"></u-button></view> |
| | | </view> |
| | | </view> |
| | | <!-- <view> |
| | | <combined-title title="发运详情"></combined-title> |
| | | <view class="compDetails"> |
| | | <uni-table border stripe emptyText="暂无更多数据"> |
| | | <uni-tr> |
| | | <uni-th align="left">提煤单编号</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.code || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">提煤单状态</uni-th> |
| | | <uni-td align="left">{{ coalStatus[faYunDetailobj.status] }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">车牌号</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.carNo || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">入场时间</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.inTime || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">出场时间</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.outTime || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">皮重</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.skin || 0 }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">毛重</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.hair || 0 }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">净重</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.clean || 0 }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">订单编号</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.orderCode || '' }}</uni-td> |
| | | </uni-tr> |
| | | <uni-tr> |
| | | <uni-th align="left">订单剩余量</uni-th> |
| | | <uni-td align="left">{{ faYunDetailobj.allowance || 0 }}</uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | </view> --> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | id: '', |
| | | faYunDetailobj: {}, |
| | | coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓'] |
| | | }; |
| | | }, |
| | | methods: {}, |
| | | onLoad(params) { |
| | | this.id = params.id; |
| | | }, |
| | | onShow() { |
| | | this.$reqGet('getTakeCoal', { takeCoalId: this.id }).then(res => { |
| | | if (res.code == 0) { |
| | | this.faYunDetailobj = res.data; |
| | | } else { |
| | | this.$u.toast('获取数据失败'); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | import { BaseUrl } from '@/api/publicInterface.js'; |
| | | import combinedTitle from '@/components/combined-title/combined-title.vue'; |
| | | export default { |
| | | components: { |
| | | combinedTitle |
| | | }, |
| | | data() { |
| | | return { |
| | | id: '', |
| | | faYunDetailobj: {}, |
| | | coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤仓', '出煤仓', '放空', '作废', '入场申请', |
| | | '进入场院', '异常审核中', '打印中', '打印中', '填写' |
| | | ], |
| | | isSpecial: null //1 是特殊 0不是特殊 |
| | | }; |
| | | }, |
| | | methods: { |
| | | //下载电子磅单 |
| | | downloadTmFile(){ |
| | | uni.showLoading({ |
| | | title: '加载中' |
| | | }); |
| | | this.$reqGetId('downLoadTm',this.id).then(res=>{ |
| | | console.log(res,'result') |
| | | this.$u.toast('下载成功!') |
| | | uni.hideLoading(); |
| | | const result = res.data.url; |
| | | let that = this; |
| | | const fileExtName = ".pdf"; |
| | | const randfile = new Date().getTime() +res.data.fileName; |
| | | const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`; |
| | | if(result){ |
| | | wx.downloadFile({ |
| | | url: `${BaseUrl}${result}`, |
| | | filePath:wx.env.USER_DATA_PATH+`/${randfile}`, |
| | | header: { |
| | | Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), |
| | | CLIENT_TOC: 'Y' |
| | | }, |
| | | success(res){ |
| | | const filePath = res.tempFilePath; |
| | | wx.openDocument({ |
| | | filePath: res.filePath, |
| | | showMenu: true, |
| | | fileType: 'pdf', |
| | | success: function (res) {} |
| | | }) |
| | | uni.hideLoading(); |
| | | |
| | | }, |
| | | fail(err){ |
| | | console.log(err,'下载文件失败') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | }, |
| | | onLoad(params) { |
| | | this.id = params.id; |
| | | }, |
| | | onShow() { |
| | | this.$reqGet('getTakeCoal', { takeCoalId: this.id }).then(res => { |
| | | if (res.code == 0) { |
| | | this.faYunDetailobj = res.data; |
| | | this.isSpecial = res.data.isSpecial |
| | | } else { |
| | | this.$u.toast('获取数据失败'); |
| | | } |
| | | }); |
| | | }, |
| | | computed:{ |
| | | roleType() { |
| | | return uni.getStorageSync('roleType'); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | @mixin flex { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | .main { |
| | | width: 100%; |
| | | margin-top: vww(10); |
| | | @include flex justify-content: center; |
| | | .main-body { |
| | | width: 690rpx; |
| | | height: 1062rpx; |
| | | background: #ffffff; |
| | | box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12); |
| | | border-radius: 20rpx; |
| | | @include flex flex-direction: column; |
| | | align-items: flex-start; |
| | | .body-container { |
| | | width: 100%; |
| | | height: vww(56); |
| | | border-bottom: vww(1) solid #d6d6d6; |
| | | <style scoped |
| | | lang="scss"> |
| | | @mixin flex { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | .weigh-button{ |
| | | margin-top: 30rpx; |
| | | } |
| | | .main { |
| | | width: 100%; |
| | | margin-top: vww(10); |
| | | @include flex; |
| | | flex-direction: column; |
| | | |
| | | .main-body { |
| | | width: 690rpx; |
| | | height: 1062rpx; |
| | | background: #ffffff; |
| | | box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12); |
| | | border-radius: 20rpx; |
| | | @include flex; |
| | | justify-content: center; |
| | | .container-block { |
| | | width: 96%; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | |
| | | .body-container { |
| | | width: 100%; |
| | | height: vww(56); |
| | | border-bottom: vww(1) solid #d6d6d6; |
| | | @include flex; |
| | | justify-content: center; |
| | | |
| | | .container-block { |
| | | width: 96%; |
| | | height: vww(56); |
| | | @include flex; |
| | | } |
| | | } |
| | | |
| | | .last { |
| | | border-bottom: none; |
| | | } |
| | | } |
| | | .last { |
| | | border-bottom: none; |
| | | |
| | | .origin-info { |
| | | width: 690rpx; |
| | | min-height: 300rpx; |
| | | margin-top: 20rpx; |
| | | margin-bottom: 20rpx; |
| | | background: #ffffff; |
| | | box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12); |
| | | border-radius: 20rpx; |
| | | @include flex; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | |
| | | .body-container { |
| | | width: 100%; |
| | | height: vww(56); |
| | | border-bottom: vww(1) solid #d6d6d6; |
| | | @include flex; |
| | | justify-content: center; |
| | | |
| | | .container-block { |
| | | width: 94%; |
| | | @include flex; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .uni-table { |
| | | .uni-table-tr { |
| | | padding: 0; |
| | | border: vww(1) solid #c6c6c6; |
| | | .uni-table-th { |
| | | font-size: vww(14); |
| | | height: vww(30); |
| | | line-height: vww(30); |
| | | padding: vww(5) vww(10); |
| | | color: #111111; |
| | | font-weight: 500; |
| | | background: #e2e2e2; |
| | | } |
| | | .uni-table-td { |
| | | font-size: vww(14); |
| | | font-weight: 400; |
| | | height: vww(30); |
| | | line-height: vww(30); |
| | | padding: vww(5) vww(10); |
| | | color: #111111; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |