| | |
| | | v-for="(item, index) in customerList" |
| | | :key="index" |
| | | @click="filterCondition(2, index, item.condition)"> |
| | | <u-button :text="item.condition" |
| | | <u-button :text="item.name" |
| | | :type="item.active ? 'primary' : ''" |
| | | size="small"></u-button> |
| | | </view> |
| | |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | <view class="filter-body" |
| | | <!-- <view class="filter-body" |
| | | v-if="roleType == 1"> |
| | | <view class="condition-name">承运商</view> |
| | | <view class="filter-name"> |
| | |
| | | <u-button :text="item.condition" |
| | | :type="item.active ? 'primary' : ''"></u-button> |
| | | </view> |
| | | <!-- <view class="toggle-button"> |
| | | <u-button |
| | | :text="forwarderShow < forwarderTotal ? '查看更多' : '收起'" |
| | | type="primary" |
| | | size="small" |
| | | @click="toggle(3)" |
| | | v-if="forwarderTotal > 3" |
| | | ></u-button> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | <view class="filter-body" |
| | | </view> --> |
| | | <!-- <view class="filter-body" |
| | | v-if="roleType != 3"> |
| | | <view class="condition-name">车队</view> |
| | | <view class="filter-name"> |
| | |
| | | :type="item.active ? 'primary' : ''" |
| | | size="small"></u-button> |
| | | </view> |
| | | <!-- <view class="toggle-button"> |
| | | <u-button :text="fleetShow < fleetTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(4)" v-if="fleetTotal > 3"></u-button> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <view class="filter-body" v-if="false"> |
| | | <view class="condition-name">矿场</view> |
| | | <view class="filter-name"> |
| | |
| | | this.$reqGet('getTmTaskCoalData', { startTime: this.first, endTime: this.last }).then(res => { |
| | | this.filterList = this.taskList = res.data; |
| | | if (this.filterList.length != 0) { |
| | | let customerTemp; |
| | | this.totalLength = this.filterList.map(v => v.taskCoalList.length).reduce((x, y) => x + y); |
| | | this.totalTon = this.filterList.map(v => |
| | | v.taskCoalList.reduce((prev, cur) => { |
| | |
| | | let yy = new BigNumber(y) |
| | | return xx.plus(yy).toNumber().toFixed(2) |
| | | }, new BigNumber(0)); |
| | | customerTemp = res.data.map(item=>item.taskCoalList.map(val=>{ |
| | | return { |
| | | name:val.customerName, |
| | | active:false |
| | | } |
| | | })).flat(Infinity); |
| | | console.log(customerTemp,'') |
| | | if(customerTemp.length){ |
| | | let obj = {}; |
| | | this.customerList = customerTemp.reduce(function (item, next) { |
| | | obj[next.name] ? '' : obj[next.name] = true && item.push(next) |
| | | return item |
| | | }, []) |
| | | } |
| | | } else { |
| | | this.totalLength = 0; |
| | | this.totalTon = 0; |
| | |
| | | let conditionMapping = { |
| | | 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), |
| | | customerName: this.customerList.filter(v => v.active == true).map(item => item.name), //客户筛选条件前端自己做 所以是name |
| | | xsUser2Name: this.forwarderList.filter(v => v.active == true).map(item => item.condition), |
| | | fleetName: this.fleetList.filter(v => v.active == true).map(item => item.condition), |
| | | filedName: this.filedList.filter(v => v.active == true).map(item => item.condition), |