| | |
| | | <view class="content-container">{{ totalTon}}</view> |
| | | <view class="content-num">发运吨数</view> |
| | | </view> |
| | | <view class="content-text"> |
| | | <view class="content-container">{{ tmNum}}</view> |
| | | <view class="content-num">发运件数</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | cur.clean=cur.clean||0 |
| | | return prev + cur.clean; |
| | | }, 0)).toFixed(2)}}吨 |
| | | {{Number(item.taskCoalList |
| | | .reduce((prev, cur) => { |
| | | cur.productQuantity=cur.productQuantity||0 |
| | | return prev + cur.productQuantity; |
| | | }, 0))}}件 |
| | | </view> |
| | | </view> |
| | | <view class="card-main" |
| | |
| | | <view class="sign">装</view> |
| | | <view class="filedname"> |
| | | <text |
| | | v-if="value.orderType == '外销' || value.orderType == '内销' || value.orderType == '转出'">{{ value.deptName || '' }}</text> |
| | | v-if="value.orderType == '外销' || value.orderType == '内销' || value.orderType == '外销退' || value.orderType == '转出'">{{ value.deptName || '' }}</text> |
| | | <text |
| | | v-else-if="value.orderType == '外购' || value.orderType == '内购' || value.orderType == '转入'">{{ value.customerName || '' }}</text> |
| | | v-else-if="value.orderType == '外购' || value.orderType == '内购' || value.orderType == '外购退' || value.orderType == '转入'">{{ value.customerName || '' }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="main-divider"></view> |
| | |
| | | <view class="sign">卸</view> |
| | | <view class="filedname"> |
| | | <text |
| | | v-if="value.orderType == '外销' || value.orderType == '内销' || value.orderType == '转出'">{{ value.customerName || '' }}</text> |
| | | v-if="value.orderType == '外销' || value.orderType == '内销' || value.orderType == '外销退' || value.orderType == '转出'">{{ value.customerName || '' }}</text> |
| | | <text |
| | | v-else-if="value.orderType == '外购' || value.orderType == '内购' || value.orderType == '转入'">{{ value.deptName || '' }}</text> |
| | | v-else-if="value.orderType == '外购' || value.orderType == '内购' || value.orderType == '外购退' || value.orderType == '转入'">{{ value.deptName || '' }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="second-line"> |
| | | <view class="coal-name"> |
| | | <view class="">{{ value.coalName }}</view> |
| | | <view class="">{{ value.productNames || value.productName }}</view> |
| | | <view class="black-bar"></view> |
| | | <view class="coal-type" |
| | | v-if="value.orderType">{{ value.orderType }}</view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="filter-body"> |
| | | <view class="condition-name">煤种</view> |
| | | <view class="condition-name">产品</view> |
| | | <view class="filter-name"> |
| | | <view class="filter-button" |
| | | v-for="(item, index) in coalList" |
| | |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | <view class="filter-body"> |
| | | <view class="filter-body" v-if="false"> |
| | | <view class="condition-name">矿场</view> |
| | | <view class="filter-name"> |
| | | <view class="filter-button" |
| | |
| | | } |
| | | }; |
| | | let conditionMapping = { |
| | | coalName: this.coalList.filter(v => v.active == true).map(item => item.condition), |
| | | productName: this.coalList.filter(v => v.active == true).map(item => item.condition), |
| | | orderType: this.typeList.filter(v => v.active == true).map(item => item.condition), |
| | | customerName: this.customerList.filter(v => v.active == true).map(item => item.condition), |
| | | xsUser2Name: this.forwarderList.filter(v => v.active == true).map(item => item.condition), |
| | |
| | | }; |
| | | |
| | | const mapping = { |
| | | coalName: validateFn('coalName'), |
| | | productName: validateFn('productName'), |
| | | orderType: validateFn('orderType'), |
| | | customerName: validateFn('customerName'), |
| | | xsUser2Name: validateFn('xsUser2Name'), |
| | |
| | | }, |
| | | // 跳转发运详情 |
| | | faYunDetail(takeCoalId) { |
| | | console.log(takeCoalId,'tackle') |
| | | uni.navigateTo({ |
| | | url: `/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails?id=${takeCoalId}` |
| | | url: `/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails?id=${takeCoalId}`, |
| | | success(res) { |
| | | console.log(res); |
| | | }, |
| | | fail(err) { |
| | | console.log(err,'跳转不过去'); |
| | | } |
| | | }); |
| | | }, |
| | | // 打开筛选条件弹窗 |
| | |
| | | }, |
| | | carNoTotal() { |
| | | return this.carNoList.length; |
| | | } |
| | | }, |
| | | //发运件数 |
| | | tmNum(){ |
| | | console.log(this.filterList,'result') |
| | | if( !this.filterList.length){ |
| | | return 0 |
| | | }else{ |
| | | const result = this.filterList.map(v => |
| | | v.taskCoalList.reduce((prev, cur) => { |
| | | let cleanvalue |
| | | if(!cur.isWeight){ |
| | | cleanvalue = Number(cur.productQuantity) || 0 |
| | | }else{ |
| | | cleanvalue = 0; |
| | | } |
| | | return cleanvalue + prev |
| | | }, 0) |
| | | ); |
| | | if(result.length){ |
| | | return result.reduce((x, y) => { |
| | | let xx = new BigNumber(x) |
| | | let yy = new BigNumber(y) |
| | | return xx.plus(yy).toNumber() |
| | | }, new BigNumber(0));; |
| | | |
| | | }else{ |
| | | return 0; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | dateselect(newV, old) { |