qingyiay
2023-05-10 29658de29b2eb5292bf0c2fad7427b374b769ebc
pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -26,6 +26,7 @@
            </view>
            <view class="filter-condition"></view>
            <view class="date-information">
               <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" textSize="30" iconSize="1000" v-if="filterList.length == 0"></u-empty>
               <view class="statistics-card" v-for="(item, index) in filterList" :key="index">
                  <view class="card-top">
                     <view class="left"><combined-title :title="item.condition"></combined-title></view>
@@ -54,16 +55,20 @@
                        <view class="point-number">{{ value.clean.toFixed(2) || 0 }}</view>
                     </view>
                     <view class="second-line">
                        <view class="coal-name">{{ value.coalName }}</view>
                        <view class="black-block"></view>
                        <view class="coal-type">{{ value.orderType }}</view>
                        <view class="coal-name">
                           <view class="">{{ value.coalName }}</view>
                           <view class="black-bar"></view>
                           <view class="coal-type" v-if="value.orderType">{{ value.orderType }}</view>
                        </view>
                        <!-- <view class="black-block"><view class="black-bar"></view></view>
                        <view class="coal-type">{{ value.orderType }}</view> -->
                     </view>
                     <view class="third-line">
                        <view class="carnum-icon"><image src="https://mx.jzeg.cn:9095/appimg/image/banner/carNO.png" mode="widthFix"></image></view>
                        <view class="carnum-text">{{ value.carNo || '' }}</view>
                     </view>
                     <view class="fourth-line">
                        <view class="time-icon"><u-icon name="clock" color="#515151" size="40"></u-icon></view>
                        <view class="time-icon"><u-icon name="clock" color="#515151" size="28"></u-icon></view>
                        <view class="send-date">{{ value.sendDate }}</view>
                     </view>
                  </view>
@@ -71,110 +76,116 @@
            </view>
         </view>
         <u-popup :show="conditinonShow" mode="bottom" :closeable="true" :closeOnClickOverlay="true" @close="conditinonclose">
            <view class="filter-main">
               <view class="filter-body date-button">
                  <view class="condition-name">日期</view>
                  <view class="filter-name">
                     <u-button :text="dateselect" @click="opencalendar"></u-button>
                     <view class="filter-button ">
                        <uni-calendar
                           ref="calendar"
                           class="uni-calendar--hook"
                           :clear-date="true"
                           :date="info.date"
                           :insert="info.insert"
                           :lunar="info.lunar"
                           :startDate="info.startDate"
                           :endDate="info.endDate"
                           :range="info.range"
                           @confirm="confirm"
                        />
            <scroll-view scroll-y="true" class="scroll-Y">
               <view class="filter-main">
                  <view class="filter-body date-button">
                     <view class="condition-name">日期</view>
                     <view class="filter-name">
                        <u-button :text="dateselect" @click="opencalendar"></u-button>
                        <view class="filter-button ">
                           <uni-calendar
                              ref="calendar"
                              class="uni-calendar--hook"
                              :clear-date="true"
                              :date="info.date"
                              :insert="info.insert"
                              :lunar="info.lunar"
                              :startDate="info.startDate"
                              :endDate="info.endDate"
                              :range="info.range"
                              @confirm="confirm"
                           />
                        </view>
                     </view>
                  </view>
                  <view class="filter-body">
                     <view class="condition-name">煤种</view>
                     <view class="filter-name">
                        <view class="filter-button" v-for="(item, index) in coalList" :key="index" @click="filterCondition(0, index, item.condition)">
                           <u-button :text="item.condition" :type="item.active ? 'primary' : ''" size="small" :class="{ shadowactive: item.active }"></u-button>
                        </view>
                        <!-- <view class="toggle-button">
                        <u-button :text="coalShow < coalTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(0)" v-if="coalTotal > 3"></u-button>
                     </view> -->
                     </view>
                  </view>
                  <view class="filter-body" v-if="typeList.length !== 0">
                     <view class="condition-name">类型</view>
                     <view class="filter-name">
                        <view class="filter-button" v-for="(item, index) in typeList" :key="index" @click="filterCondition(1, index, item.condition)">
                           <u-button :text="item.condition" :type="item.active ? 'primary' : ''" size="small"></u-button>
                        </view>
                        <!-- <view class="toggle-button">
                        <u-button :text="typeShow < typeTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(1)" v-if="typeTotal > 3"></u-button>
                     </view> -->
                     </view>
                  </view>
                  <view class="filter-body" v-if="roleType !== 1">
                     <view class="condition-name">客户</view>
                     <view class="filter-name">
                        <view class="filter-button" v-for="(item, index) in customerList" :key="index" @click="filterCondition(2, index, item.condition)">
                           <u-button :text="item.condition" :type="item.active ? 'primary' : ''" size="small"></u-button>
                        </view>
                        <!-- <view class="toggle-button">
                        <u-button :text="customerShow < customerTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(2)" v-if="customerTotal > 3"></u-button>
                     </view> -->
                     </view>
                  </view>
                  <view class="filter-body" v-if="roleType == 1">
                     <view class="condition-name">货代</view>
                     <view class="filter-name">
                        <view class="filter-button" v-for="(item, index) in forwarderList" :key="index" @click="filterCondition(3, index, item.condition)">
                           <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" v-if="roleType != 3">
                     <view class="condition-name">车队</view>
                     <view class="filter-name">
                        <view class="filter-button" v-for="(item, index) in fleetList" :key="index" @click="filterCondition(4, index, item.condition)">
                           <u-button :text="item.condition" :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 class="filter-body">
                     <view class="condition-name">矿场</view>
                     <view class="filter-name">
                        <view class="filter-button" v-for="(item, index) in filedList" :key="index" @click="filterCondition(5, index, item.condition)">
                           <u-button :text="item.condition" :type="item.active ? 'primary' : ''" size="small"></u-button>
                        </view>
                        <!-- <view class="toggle-button">
                        <u-button :text="filedShow < filedTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(5)" v-if="filedTotal > 3"></u-button>
                     </view> -->
                     </view>
                  </view>
                  <view class="filter-body" v-if="roleType == 2">
                     <view class="condition-name">车牌号</view>
                     <view class="filter-name">
                        <view class="filter-button" v-for="(item, index) in carNoList" :key="index" @click="filterCondition(6, index, item.condition)">
                           <u-button :text="item.condition" :type="item.active ? 'primary' : ''" size="small" v-if="index < carNoShow"></u-button>
                        </view>
                        <!-- <view class="toggle-button">
                        <u-button :text="carNoShow < carNoTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(6)" v-if="carNoTotal > 3"></u-button>
                     </view> -->
                     </view>
                  </view>
               </view>
               <view class="filter-body">
                  <view class="condition-name">煤种</view>
                  <view class="filter-name">
                     <view class="filter-button" v-for="(item, index) in coalList" :key="index" @click="filterCondition(0, index, item.condition)">
                        <u-button :text="item.condition" :type="item.active ? 'primary' : ''" size="small" :class="{ shadowactive: item.active }"></u-button>
                     </view>
                     <!-- <view class="toggle-button">
                     <u-button :text="coalShow < coalTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(0)" v-if="coalTotal > 3"></u-button>
                  </view> -->
                  </view>
               </view>
               <view class="filter-body" v-if="typeList.length !== 0">
                  <view class="condition-name">类型</view>
                  <view class="filter-name">
                     <view class="filter-button" v-for="(item, index) in typeList" :key="index" @click="filterCondition(1, index, item.condition)">
                        <u-button :text="item.condition" :type="item.active ? 'primary' : ''" size="small"></u-button>
                     </view>
                     <!-- <view class="toggle-button">
                     <u-button :text="typeShow < typeTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(1)" v-if="typeTotal > 3"></u-button>
                  </view> -->
                  </view>
               </view>
               <view class="filter-body" v-if="roleType !== 1">
                  <view class="condition-name">客户</view>
                  <view class="filter-name">
                     <view class="filter-button" v-for="(item, index) in customerList" :key="index" @click="filterCondition(2, index, item.condition)">
                        <u-button :text="item.condition" :type="item.active ? 'primary' : ''" size="small"></u-button>
                     </view>
                     <!-- <view class="toggle-button">
                     <u-button :text="customerShow < customerTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(2)" v-if="customerTotal > 3"></u-button>
                  </view> -->
                  </view>
               </view>
               <view class="filter-body" v-if="roleType == 1">
                  <view class="condition-name">货代</view>
                  <view class="filter-name">
                     <view class="filter-button" v-for="(item, index) in forwarderList" :key="index" @click="filterCondition(3, index, item.condition)">
                        <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" v-if="roleType != 3">
                  <view class="condition-name">车队</view>
                  <view class="filter-name">
                     <view class="filter-button" v-for="(item, index) in fleetList" :key="index" @click="filterCondition(4, index, item.condition)">
                        <u-button :text="item.condition" :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 class="filter-body">
                  <view class="condition-name">矿场</view>
                  <view class="filter-name">
                     <view class="filter-button" v-for="(item, index) in filedList" :key="index" @click="filterCondition(5, index, item.condition)">
                        <u-button :text="item.condition" :type="item.active ? 'success' : ''" size="small"></u-button>
                     </view>
                     <!-- <view class="toggle-button">
                     <u-button :text="filedShow < filedTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(5)" v-if="filedTotal > 3"></u-button>
                  </view> -->
                  </view>
               </view>
               <view class="filter-body" v-if="roleType == 2">
                  <view class="condition-name">车牌号</view>
                  <view class="filter-name">
                     <view class="filter-button" v-for="(item, index) in carNoList" :key="index" @click="filterCondition(6, index, item.condition)">
                        <u-button :text="item.condition" :type="item.active ? 'primary' : ''" size="small" v-if="index < carNoShow"></u-button>
                     </view>
                     <!-- <view class="toggle-button">
                     <u-button :text="carNoShow < carNoTotal ? '查看更多' : '收起'" type="primary" size="small" @click="toggle(6)" v-if="carNoTotal > 3"></u-button>
                  </view> -->
                  </view>
               </view>
            </scroll-view>
            <view class="utils-button">
               <view class="reset-button"><u-button type="default" text="重置" :plain="true" shape="circle" @click="resetCondition"></u-button></view>
               <view class="confirm-button"><u-button type="primary" text="确定" :plain="true" shape="circle" @click="confirmCondition"></u-button></view>
            </view>
         </u-popup>
         <tab-bar :current="1"></tab-bar>
@@ -208,6 +219,8 @@
         },
         first: '',
         last: '',
         firstFilter: '',
         lastFilter: '',
         taskList: [],
         filterList: [],
         totalLength: 0,
@@ -232,7 +245,7 @@
         // 点击右箭头详情弹窗
         faYunDetailobj: {},
         modalShow: false,
         coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤场', '出煤仓']
         coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤仓', '出煤仓', '放空', '作废', '入场申请', '进入场院']
      };
   },
   onShow() {
@@ -248,6 +261,7 @@
         let d = '01';
         m = m < 10 ? '0' + m : m; //月份补 0
         this.first = [y, m, d].join('-');
         this.firstFilter = [y, m, d].join('-');
      },
      lastDate() {
         let y = new Date().getFullYear(); //获取年份
@@ -256,6 +270,7 @@
         m = m < 10 ? '0' + m : m; //月份补 0
         d = d < 10 ? '0' + d : d; //日数补 0
         this.last = [y, m, d].join('-');
         this.lastFilter = [y, m, d].join('-');
      },
      // 筛选条件
      getShipping() {
@@ -414,6 +429,34 @@
            this.totalTon = 0;
         }
      },
      // 确定筛选
      confirmCondition() {
         this.conditinonShow = false;
      },
      // 重置筛选
      resetCondition() {
         this.conditinonShow = false;
         this.first = this.dateRange.slice(0, 10);
         this.last = this.dateRange.slice(11);
         this.coalList.forEach(v => {
            v.active = false;
         });
         this.typeList.forEach(v => {
            v.active = false;
         });
         this.customerList.forEach(v => {
            v.active = false;
         });
         this.forwarderList.forEach(v => {
            v.active = false;
         });
         this.fleetList.forEach(v => {
            v.active = false;
         });
         this.filedList.forEach(v => {
            v.active = false;
         });
      },
      confirm(e) {
         console.log(e, '日期选择');
         this.first = e.range.before;
@@ -511,7 +554,7 @@
         return uni.getStorageSync('roleType');
      },
      dateRange() {
         return `日期:${this.first}-${this.last}`;
         return `${this.firstFilter}-${this.lastFilter}`;
      },
      dateselect() {
         return `${this.first}-${this.last}`;
@@ -560,6 +603,33 @@
::v-deep .toggle-button .u-button {
   width: vww(40);
}
.scroll-Y {
   height: 900rpx;
}
.utils-button {
   width: 94%;
   height: vww(30);
   margin: vww(50) auto;
   @include flex;
   .reset-button {
      /deep/ .u-button {
         border: 1px solid #c5c5c5;
         outline: none;
      }
   }
   .confirm-button {
      /deep/ .u-button {
         border: 1px solid #3b56eb;
         outline: none;
         color: #3b56eb;
      }
   }
   /deep/ .u-button {
      width: 279rpx;
      height: 60rpx;
      font-size: 28rpx;
   }
}
.white-block {
   width: 100%;
   height: vww(50);
@@ -598,7 +668,6 @@
                  width: 100%;
                  height: vww(16);
                  font-size: 40rpx;
                  font-family: Source Han Sans CN;
                  font-weight: bold;
                  color: #3b56eb;
                  text-align: center;
@@ -607,17 +676,15 @@
                  width: 96rpx;
                  height: 24rpx;
                  font-size: 24rpx;
                  font-family: Source Han Sans CN;
                  font-weight: 400;
                  color: #333333;
               }
            }
         }
         .content-title {
            width: 158rpx;
            width: 160rpx;
            height: 38rpx;
            font-size: 40rpx;
            font-family: Adobe Heiti Std;
            font-weight: normal;
            color: #ffffff;
            line-height: 69rpx;
@@ -631,8 +698,11 @@
      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;
      @include flex;
      flex-direction: column;
      overflow: hidden;
      position: relative;
      top: -170rpx;
      .data-filter {
         width: 635rpx;
         height: 68rpx;
@@ -645,7 +715,6 @@
            width: 330rpx;
            height: 40rpx;
            font-size: 28rpx;
            font-family: Source Han Sans CN;
            font-weight: 400;
            color: #494949;
         }
@@ -672,13 +741,11 @@
               @include flex;
               .left {
                  font-size: 30rpx;
                  font-family: Microsoft YaHei;
                  font-weight: 400;
                  color: #494949;
               }
               .card-top_num {
                  font-size: 40rpx;
                  font-family: CTCuHeiSJ;
                  font-weight: 400;
                  color: #6074ee;
               }
@@ -730,59 +797,59 @@
                  .point-number {
                     width: 20%;
                     font-size: 40rpx;
                     font-family: CTCuHeiSJ;
                     font-weight: 400;
                     color: #f81414;
                  }
               }
               .second-line {
                  width: 60%;
                  width: 100%;
                  height: vww(15);
                  display: flex;
                  justify-content: space-between;
                  align-items: center;
                  .coal-name {
                     width: 60%;
                     flex-grow: 1;
                     height: 30rpx;
                     font-size: 30rpx;
                     font-family: Microsoft YaHei;
                     font-weight: 300;
                     color: #515151;
                     position: relative;
                     display: flex;
                     justify-content: space-between;
                  }
                  .black-block {
                     width: 2rpx;
                     height: 30rpx;
                     background: #515151;
                  }
                  .coal-type {
                     width: 24%;
                     height: 30rpx;
                     font-size: 30rpx;
                     font-family: Microsoft YaHei;
                     font-weight: 300;
                     color: #515151;
                     align-items: center;
                     .black-bar {
                        width: 2rpx;
                        height: 30rpx;
                        background: #515151;
                        margin-left: vww(12);
                     }
                     .coal-type {
                        margin-left: vww(12);
                        min-width: vww(50);
                        height: 30rpx;
                        line-height: 30rpx;
                        font-size: 30rpx;
                        font-weight: 300;
                        color: #515151;
                     }
                  }
               }
               .third-line {
                  width: 40%;
                  height: vww(14);
                  display: flex;
                  justify-content: space-between;
                  justify-content: flex-start;
                  align-items: center;
                  .carnum-icon {
                     width: 28rpx;
                     height: 24rpx;
                     height: 28rpx;
                     margin-right: vww(10);
                     image {
                        width: 28rpx;
                        height: 24rpx;
                        height: 28rpx;
                     }
                  }
                  .carnum-text {
                     font-size: 28rpx;
                     font-family: Microsoft YaHei;
                     font-weight: 300;
                     color: #515151;
                  }
@@ -791,14 +858,18 @@
                  width: 40%;
                  height: vww(14);
                  display: flex;
                  justify-content: space-between;
                  justify-content: flex-start;
                  align-items: center;
                  .time-icon {
                     margin-right: vww(10);
                  }
               }
            }
         }
      }
   }
   .filter-main {
      height: 950rpx;
      width: 100%;
      display: flex;
      flex-direction: column;