qingyiay
2023-07-14 971e1fa03492e34e67edd6346f442d120fbe5343
pages/customer-page/customer-index/customer-index.vue
@@ -2,9 +2,9 @@
   <view class="">
      <view class="customer-index">
         <view class="customer-index-body">
            <!-- 待领取和转发提煤单 -->
            <!-- 待领取和转发通知单 -->
            <view class="wait-collection"
               style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain">
               :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/customerbanner.png)`, backgroundSize: 'contain', backgroundRepeat: 'no-repeat' }">
            </view>
            <view style="position: relative;top: -120px;">
               <u-empty mode="data"
@@ -22,7 +22,8 @@
                     <view class="dispatch-receive">
                        <view class="dispatch">{{ item.filedName||'' }}</view>
                     </view>
                     <view class="point-number">
                     <view class="point-number"
                        v-if="roleType == 1">
                        <text class="residue">{{ item.cars2||'' }}</text>
                        <text>/{{ item.carNum ||''}}</text>
                     </view>
@@ -36,17 +37,17 @@
                     </view>
                  </view>
                  <view class="third-line">
                     <view class="time-icon">
                     <!-- <view class="time-icon">
                        <view
                           style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carNO.png') no-repeat;background-size: cover">
                           :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carNO.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}">
                        </view>
                     </view>
                     <view class="car-num">{{ item.carNos||''}}</view>
                     </view> -->
                     <view class="car-num">{{ item.code||''}}</view>
                  </view>
                  <view class="third-line">
                     <view class="time-icon">
                        <view
                           style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover">
                           :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/clock.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}">
                        </view>
                     </view>
                     <view class="send-date">{{ item.sendDate }}</view>
@@ -62,18 +63,18 @@
                        v-if="item.orderType!=='外购'">
                        <view class="button-image">转发</view>
                     </view>
                     <view class="forward"
                     <!-- <view class="forward"
                        @click.stop="validateClick(index)"
                        v-if='roleType===4'>
                        <view class="button-image">验质</view>
                     </view>
                     </view> -->
                  </view>
               </view>
            </view>
            <!-- 历史提煤单 -->
            <!-- 历史通知单 -->
            <view class="history-numbers">
               <combined-title title="历史提煤单"></combined-title>
               <combined-title title="历史通知单"></combined-title>
               <scroll-view :scroll-top="scrollTop"
                  scroll-y="true"
                  class="scroll-Y"
@@ -110,14 +111,14 @@
                              v-else-if="roleType == 2">{{ item.carNumSurplus }}</view>
                        </view>
                        <view class="third-line">
                           <view class="third-line_text">提煤单个数:</view>
                           <view class="third-line_text">通知单个数:</view>
                           <view class="third-line_num">{{ item.tmCount }}</view>
                        </view>
                     </view>
                     <view class="fourth">
                        <view class="fourth-icon">
                           <view
                              style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover">
                              :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/clock.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}">
                           </view>
                        </view>
                        <view class="senddate">{{ item.sendDate }}</view>
@@ -125,7 +126,7 @@
                     <view class="fourth">
                        <view class="fourth-icon">
                           <view
                              style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;">
                              :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carnNUm.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'26rpx',height:'26rpx',lineHeight:'26rpx'}">
                           </view>
                        </view>
                        <view class="senddate">{{ item.orderCode }}</view>
@@ -161,7 +162,7 @@
</template>
<script>
   import card from '@/components/card/card.vue';
   import { onlineurl } from '@/api/request.js'
   import combinedTitle from '@/components/combined-title/combined-title.vue';
   import { customerId } from '@/utils/status';
   export default {
@@ -172,7 +173,6 @@
         }
      },
      components: {
         card,
         combinedTitle
      },
      watch: {
@@ -187,12 +187,12 @@
      computed: {
         roleType() {
            return uni.getStorageSync('roleType');
         }
         },
      },
      data() {
         return {
            orderPlanData: [],
            show: false, // 领取提煤单弹出框
            show: false, // 领取通知单弹出框
            receiveNum: null,
            getOrderNum: {
               num: '',
@@ -212,9 +212,10 @@
            showMoreData: false,
            cars2: "",
            carNum: "",
            // 剩余的提煤单数量
            // 剩余的通知单数量
            carNumSurplus: '',
            canClick: false
            canClick: false,
            onlineurl: ''
         };
      },
      onLoad() {},
@@ -225,6 +226,7 @@
         init() {
            this.GetOrderPlan();
            this.getJhOrderPlanDataPage();
            this.onlineurl = onlineurl;
         },
         // 获取发运计划列表
         GetOrderPlan() {
@@ -236,7 +238,7 @@
               }
            });
         },
         // 获取历史提煤单
         // 获取历史通知单
         getJhOrderPlanDataPage() {
            uni.showLoading({
               title: '加载中'
@@ -261,7 +263,7 @@
            this.pageCurrent++;
            this.getJhOrderPlanDataPage();
         },
         //fix 点击提煤单返回会增加重复数据
         //fix 点击通知单返回会增加重复数据
         ArrSet(Arr, id) {
            var obj = {};
            const arrays = Arr.reduce((setArr, item) => {
@@ -309,7 +311,7 @@
          */
         receiveClick(item) {
            this.show = true;
            this.getOrderNum.id = item.id; // 获取领取提煤单的id
            this.getOrderNum.id = item.id; // 获取领取通知单的id
            this.cars2 = item.cars2
            this.carNum = item.carNum
         },
@@ -322,15 +324,15 @@
            console.log('输入框', e);
            this.canClick = e > (this.carNum - this.cars2)
            if (this.canClick) {
               this.$u.toast('已超过当前日计划提煤单数量,请重新输入')
               this.$u.toast('已超过当前日计划通知单数量,请重新输入')
            }
         },
         // 提煤单详情
         // 通知单详情
         cardBodyClick(v) {
            uni
               .navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2}` });
               .navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2?v.cars2:""}` });
         },
         // 点击历史提煤单获取详情
         // 点击历史通知单获取详情
         faYundetail(v) {
            uni.navigateTo({
               url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}&coalName=${v.coalName}&deptName=${v.deptName}`
@@ -345,7 +347,7 @@
         // 验质
         validateClick(index) {
            uni
               .navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?index=${index}` });
               .navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan?index=${index}` });
         },
      }
   };
@@ -590,10 +592,17 @@
                  }
                  .car-num {
                     color: #515151;
                     white-space: nowrap;
                     overflow: hidden;
                     text-overflow: ellipsis;
                  }
                  .time-icon {
                     width: 24rpx;
                     height: 24rpx;
                     line-height: 24rpx;
                  }
               }
               .fourth-line {