yangan
2023-11-10 f880863b9292a4cc4c0a484f721bb87bf42e57ed
pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue
@@ -1,11 +1,12 @@
<template>
   <view class="main">
      <view style="position: relative;top: -120px;">
      <view>
         <u-empty mode="data"
            icon="http://cdn.uviewui.com/uview/empty/data.png"
            textSize="30"
            iconSize="1000"
            v-if="!orderPlanData"></u-empty>
            text="暂无数据"
            v-if="orderPlanData.length===0"></u-empty>
      </view>
      <view class="collection-form">
         <view class="collection-form-item"
@@ -27,6 +28,11 @@
                  <view class="black-bar"></view>
                  <view class="coal-type"
                     v-if="item.orderType">{{ item.orderType||'' }}</view>
               </view>
            </view>
            <view class="second-line">
               <view class="coal-name">
                  <view class="">{{ item.orderCode ||''}}</view>
               </view>
            </view>
            <view class="third-line">
@@ -55,7 +61,7 @@
         </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"
@@ -64,13 +70,14 @@
               icon="http://cdn.uviewui.com/uview/empty/data.png"
               textSize="30"
               iconSize="1000"
               text="暂无数据"
               v-if="historyCoalData.length==0"></u-empty>
            <view class="history-information"
               v-for="(item, index) in historyCoalData"
               :key="index"
               @click="faYundetail(item)">
               <view class="first">
                  <view class="">{{ item.deptName || '' }}</view>
                  <view class="">{{ item.filedName || '' }}</view>
                  <view class=""><u-icon name="arrow-right"
                        color="#999999"
                        size="40"></u-icon></view>
@@ -81,19 +88,11 @@
               </view>
               <view class="third">
                  <view class="third-line">
                     <view class="third-line_text">领取数:</view>
                     <view class="third-line_num">{{ item.cars2 }}</view>
                  </view>
                  <view class="third-line">
                     <view class="third-line_text">剩余数:</view>
                     <view
                        :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carNO.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}">
                     </view>
                     <view class="third-line_num"
                        v-if="roleType == 1">{{ item.carNumSurplus1 }}</view>
                     <view class="third-line_num"
                        v-else-if="roleType == 2">{{ item.carNumSurplus }}</view>
                  </view>
                  <view class="third-line">
                     <view class="third-line_text">提煤单个数:</view>
                     <view class="third-line_num">{{ item.tmCount }}</view>
                        style=" color: #303030;">{{ item.carNo }}</view>
                  </view>
               </view>
               <view class="fourth">
@@ -121,12 +120,41 @@
      <view style="height: 160rpx;width: 100%;">
      </view>
      <tab-bar :current="1"></tab-bar>
      <!-- 图片预览弹出框 -->
      <view class="previewImage-container">
            <view class="previewImage-container">
               <previewImage ref="previewImage"
                  :imgs="customerTourImgList"
                  :saveBtn='false'></previewImage>
            </view>
         </view>
         <view class="noob-tour"
               v-if="roleType===4&&isFirstLogin">
               <combined-title title="操作指引"></combined-title>
               <u-cell-group>
                  <u-cell title="新手指引"
                     name='1'
                     :clickable="true"
                     @click="noobTour">
                     <u-badge type="primary"
                        value="01"
                        slot='icon'></u-badge>
                     <u-icon slot="value"
                        name="arrow-right"
                        size="30"
                        color="#b8b8b8"></u-icon>
                  </u-cell>
               </u-cell-group>
            </view>
      <tab-bar :current="0"></tab-bar>
   </view>
</template>
<script>
   import { onlineurl } from '@/api/request.js'
   import { mapState } from 'vuex'
   import { BaseUrl } from '@/api/publicInterface.js'
   import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
   export default {
      data() {
         return {
@@ -139,19 +167,31 @@
            // 是否显示更多数据
            showMoreData: false,
            total: null,
            isFirstLogin:false,
            onlineurl,
         };
      },
      components:{
         previewImage
      },
      computed: {
         ...mapState(['customerTourImgList']),
         roleType() {
            return uni.getStorageSync('roleType')
         }
      },
      mounted() {
         this.getLogOn();
      },
      onShow() {
         this.GetOrderPlan()
         this.qualityInspectionHistory()
      },
      methods: {
         init(){
            this.GetOrderPlan()
         this.qualityInspectionHistory()
         },
         GetOrderPlan() {
            uni.showLoading({ title: '加载中...' });
            this.$reqGet('qualityInspection').then(res => {
@@ -190,7 +230,7 @@
            this.pageCurrent++;
            this.qualityInspectionHistory();
         },
         //fix 点击提煤单返回会增加重复数据
         //fix 点击通知单返回会增加重复数据
         ArrSet(Arr, id) {
            var obj = {};
            const arrays = Arr.reduce((setArr, item) => {
@@ -199,11 +239,40 @@
            }, []);
            return arrays;
         },
         // 验质选择
         validateClick(item) {
            uni.navigateTo({
               url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${item.id}`
            })
         }
         },
         // 历史
         faYundetail(item) {
            uni.navigateTo({
               url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${item.id}&flag=${true}`
            })
         },
         noobTour(v) {
            this.$refs.previewImage.open('https://mx.jzeg.cn:9095/appimg/image/tour/quality/quality1.jpg')
         },
         getLogOn() {
            this.$reqGet('getUserEntity').then(res => {
               this.phone = res.data.phone
            }).then(() => {
               uni.request({
                  url: `${BaseUrl}/admin/log/getLogOnType?phone=${this.phone}`,
                  success: res => {
                     // res.data.data 为1 代表第一次登录  为0取消学习指引  为2代表存在
                     if (res.data.data === 1) {
                        this.noobTour()
                     } else if (res.data.data === 2) {
                        this.isFirstLogin = true
                     } else {
                        this.isFirstLogin = false
                     }
                  }
               });
            })
         },
      },
   }
</script>
@@ -218,7 +287,17 @@
   .main {
      width: 100%;
      margin: 0 auto;
      margin: 30px auto;
   }
   .scroll-Y {
      height: 900rpx;
      .more_text {
         color: #333;
         font-size: 24rpx;
         text-align: center;
      }
   }
   .history-numbers {