qingyiay
2023-10-07 21fb37c7162d5b47a14d6438870377c85fcc0b52
pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -10,7 +10,7 @@
                     <view class="content-num">发运车数</view>
                  </view>
                  <view class="content-text">
                     <view class="content-container">{{ totalTon.toFixed(2) }}</view>
                     <view class="content-container">{{ totalTon}}</view>
                     <view class="content-num">发运吨数</view>
                  </view>
               </view>
@@ -35,6 +35,7 @@
                  icon="http://cdn.uviewui.com/uview/empty/data.png"
                  textSize="30"
                  iconSize="1000"
                  text="暂无数据"
                  v-if="filterList.length == 0"></u-empty>
               <view class="statistics-card"
                  v-for="(item, index) in filterList"
@@ -42,13 +43,12 @@
                  <view class="card-top">
                     <view class="left"><combined-title :title="item.condition"></combined-title></view>
                     <view class="card-top_num">
                        {{ item.taskCoalList.length }}车{{
                           item.taskCoalList
                              .reduce((prev, cur) => {
                                 return prev + cur.clean;
                              }, 0)
                              .toFixed(2)
                        }}吨
                        {{ item.taskCoalList.length }}车
                        {{Number(item.taskCoalList
                                        .reduce((prev, cur) => {
                                            cur.clean=cur.clean||0
                                            return prev + cur.clean;
                                        }, 0)).toFixed(2)}}吨
                     </view>
                  </view>
                  <view class="card-main"
@@ -279,6 +279,7 @@
</template>
<script>
   import BigNumber from "bignumber.js"
   import combinedTitle from '@/components/combined-title/combined-title.vue';
   export default {
      components: {
@@ -330,11 +331,11 @@
            faYunDetailobj: {},
            modalShow: false,
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤仓', '出煤仓', '放空', '作废', '入场申请',
               '进入场院'
               '进入场院', '异常审核中', '返回加减吨', '超时', '打印中', '打印中'
            ]
         };
      },
      onShow() {
      onLoad() {
         this.firstDate();
         this.lastDate();
         this.getShipping();
@@ -431,10 +432,15 @@
                  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) => {
                        return cur.clean + prev;
                        const cleanvalue = cur.clean || 0
                        return cleanvalue + prev
                     }, 0)
                  );
                  this.totalTon = this.totalTon.reduce((x, y) => x + y);
                  this.totalTon = this.totalTon.reduce((x, y) => {
                     let xx = new BigNumber(x)
                     let yy = new BigNumber(y)
                     return xx.plus(yy).toNumber().toFixed(2)
                  }, new BigNumber(0));
               } else {
                  this.totalLength = 0;
                  this.totalTon = 0;
@@ -507,10 +513,15 @@
               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) => {
                     return cur.clean + prev;
                     const cleanvalue = cur.clean || 0
                     return cleanvalue + prev
                  }, 0)
               );
               this.totalTon = this.totalTon.reduce((x, y) => x + y);
               this.totalTon = this.totalTon.reduce((x, y) => {
                  let xx = new BigNumber(x)
                  let yy = new BigNumber(y)
                  return xx.plus(yy).toNumber().toFixed(2)
               }, new BigNumber(0));
            } else {
               this.totalLength = 0;
               this.totalTon = 0;