yangan
2025-01-22 a79e6ae6d20c60f813234c94461a305101e15c92
pages/loadUnload-page/orderPlanList/index.vue
@@ -1,7 +1,6 @@
<template>
<div class="loadUnPage">
    <view class="history-numbers">
               <!-- <combined-title title="历史收发单"></combined-title> -->
               <scroll-view :scroll-top="scrollTop"
                  scroll-y="true"
                  class="scroll-Y">
@@ -11,7 +10,8 @@
                     iconSize="1000"
                     text="暂无数据"
                     v-if="orderPlanList.length == 0"></u-empty>
                  <view class="collection-form">
                  <view class="collection-form"
                  >
               <!-- <view class="collection-form-item"
                  v-for="(item, index) in orderPlanList"
                  :key="index"
@@ -46,7 +46,7 @@
                  <view class="third-line">
                     <view class="time-icon">
                        <view
                           style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover">
                           style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/clock.png') no-repeat;background-size: cover">
                        </view>
                     </view>
                     <view class="send-date">{{ item.sendDate }}</view>
@@ -58,57 +58,55 @@
                  v-for="(item, index) in orderPlanList"
                  :key="index">
                  <view class="formTop">
                     <text>{{item.startTime}} ~ {{item.endTime}}</text>
                     <view style="marginRight:20rpx">
                     <!-- <text>{{item.startTime}} ~ {{item.endTime}}</text> -->
                     <!-- <view style="marginRight:20rpx">
                           <text>发运日期:{{item.sendDate}}</text>
                     </view>
                     </view> -->
                     <view>客户名称:{{ item.customerName }}</view>
                     <view>订单编号:{{ item.orderCode }}</view>
                     <view>产品:{{ $store.state.pvcIdList.includes(item.productId) ?  item.productName :item.productNames }}</view>
                     <view>包装类型:     {{proType[item.packingType]}}</view>
                     <view>计划车数:{{ item.carNum }}</view>
                     <view>领取车数:{{ item.lingNum }}</view>
                     <view v-if="$store.state.pvcIdList.includes(item.productId)">日计划总量:{{ item.pvcPlanMeasure }}</view>
                  </view>
                  <view class="formBottom">
                     <uni-table border stripe 
         emptyText="暂无更多数据">
               <uni-tr>
                  <uni-th width='120'
                  align="center">操作</uni-th>
                   <uni-th align="center" width='120'>产品</uni-th>
                   <uni-th align="center" width='120'>车牌号</uni-th>
                  <uni-th align="center" width='200'>仓库</uni-th>
                  <uni-th align="center" width='100'>皮重</uni-th>
                  <uni-th align="center" width='90'>计划量</uni-th>
                  <uni-th align="center" width='80'>实际量</uni-th>
                  <!-- <uni-th align="center" width='100'>皮重</uni-th>
                  <uni-th align="center" width='100'>毛重</uni-th>
                  <uni-th align="center" width='100'>净重</uni-th>
                  <uni-th align="center" width='100'>数量</uni-th>
                  <uni-th align="center" width='100'>数量</uni-th> -->
                   <!-- <uni-th align="center">仓库</uni-th> -->
                  <!-- <uni-th align="center">状态</uni-th> -->
                  <uni-th align="center" width='100'>状态</uni-th>
                  <uni-th align="center" width='100'>称重方式</uni-th>
                  
               </uni-tr>
               <uni-tr v-for="(subItem, index) in item.tmTaskCoalList" :key="index">
                 <uni-td align='center'>
                  <u-button   text='查看'  @click="showMore(subItem)"></u-button>
               </uni-td>
               <uni-td align="center">
                     <view>{{ subItem.productName }}</view></uni-td>
               <uni-td>
               <uni-tr v-for="(subItem, index2) in item.tmTaskCoals" :key="index2"
               >
                <uni-td align="center">
                     
                     <view>{{ subItem.carNo }}</view></uni-td>
               <uni-td>
                  <view>{{ subItem.bunkerName }}</view>
               </uni-td>
               <uni-td>
                  <view class="name" v-if="subItem.skin">{{ Number(subItem.skin).toFixed(2) || ''  }}</view>
               </uni-td>
               <uni-td>
                  <view class="name" v-if="subItem.hair"> {{  Number(subItem.hair).toFixed(2) || ''  }}</view>
               </uni-td>
                  <uni-td>
                  <view class="name" v-if="(subItem.clean || (subItem.clean && subItem.clean === 0))">{{ Number(subItem.clean).toFixed(2) || ''}}</view>
               </uni-td>
               <uni-td>
                  <view class="name">{{ subItem.productQuantity }}</view>
               </uni-td>
<!--
                <uni-td align="center">
               <view>{{ subItem.bunkerName }}</view></uni-td> -->
                 <!-- <uni-td align="center">
               <view  class="name">{{ subItem.statusView }}</view></uni-td> -->
                     <uni-td align="center">
                        <!-- subItem.planMeasure != void 0 ? subItem.planMeasure.toFixed(4) : '' -->
                     <view>{{  subItem.planMeasure}}</view></uni-td>
                     <uni-td align="center">
                        <!-- subItem.productQuantity  != void 0 ? subItem.productQuantity.toFixed(4) : '' -->
                     <view>{{subItem.productQuantity }}</view></uni-td>
                 <uni-td align="center">
            {{ subItem.statusView }}</uni-td>
            <uni-td align="right">
                     <u-tag :text="'计数'" plain v-if="subItem.isWeight==0"></u-tag>
                     <u-tag  :text="'称重'"  plain v-else-if="subItem.isWeight==1"></u-tag>
                     <u-tag :text="'称重计数'"  plain v-else-if="subItem.isWeight==2"></u-tag>
                     <u-tag v-else></u-tag></uni-td>
                
            </uni-tr>
            </uni-table>
@@ -120,7 +118,8 @@
                  <view class="white-block"></view>
               </scroll-view>
            </view>
    <tab-bar :current="1"></tab-bar>
   <u-action-sheet :actions="list" @close='showClose'  closeOnClickOverlay  :show="show"  @select="selectClick"></u-action-sheet>
    <tab-bar :current="2"></tab-bar>
    </div>  
</template>
@@ -129,7 +128,22 @@
    data() {
        return {
            orderPlanList:[],
         proType:['散装','液氯瓶装','罐装','PVC25','PVC80','PVC1150','PVc1200'],
         show:false,
         pageLoading:false,
         isYuyue :0, //入场,未入场
            scrollTop:0,
         list:[
            {
               name: '全部',
               value:0
            },
            {
               name:'未入场',
               value:1
            },
         ],
             historyCoalData: [],
            // 表格加载状态
            loading: false,
@@ -154,9 +168,21 @@
        //初始化
        init(){
         console.log('init',localStorage.getItem('bunkerIds'))
            this.$reqGet('getMyPlanListByBunkerId',{bunkerIds:localStorage.getItem('bunkerIds')}).then((res) => {
                console.log(res,'res')
                this.orderPlanList = res.data;
         uni.showLoading({ title: '加载中...' })
            this.$reqGet('getMyPlanListByBunkerIdsAndProductIds',{bunkerIds:localStorage.getItem('bunkerIds'),productIds:uni.getStorageSync('productIds') }).then((res) => {
                this.orderPlanList = res.data.map(item=>{
              item.tmTaskCoals && item.tmTaskCoals.map(el=>{
               if(el.planMeasure != void 0 && el.planMeasure != ""){
                  console.log(el,'el')
                  el.planMeasure = el.planMeasure.toFixed(4);
               }
               if(el.productQuantity != void 0 && el.productQuantity != ""){
                  el.productQuantity = el.productQuantity.toFixed(4);
               }
              })
               return item
            });
            uni.hideLoading();
            })
        },
          faYundetail(v) {
@@ -169,6 +195,18 @@
               url: `/subPages/fayunPlanDetails/fayunPlanMore/fayunPlanMore?orderPlanId=${this.orderPlanId}&id=${item.id}&orderType=${item.orderType}`
            });
         },
         todoShow(){
            this.show = true;
         },
         selectClick(item){
            console.log(item,'item')
            this.isYuyue  = item.value;
            this.init();
            this.show  = false;
         },
         showClose(){
            this.show = false;
         }
    },
    computed:{
        bunkerIds(){
@@ -185,6 +223,14 @@
</script>
<style lang="scss" scoped>
   .top{
   position: relative;
   }
   .topTag{
   position: absolute;
   left: calc(100% -  (100% - 140px));
   top: 20%;
   }
     .five-line{
    height: 50rpx;
    line-height: 24rpx;
@@ -213,22 +259,27 @@
   height: 100%;
   margin-top: 10rpx;
   display:flex;
   justify-content: center;
   align-items: center;
   // justify-content: center;
   flex-direction: column;
   .collection-form-item{
      width: 95%;
      height: 400rpx;
      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
      margin: 20rpx 0;
      .formTop{
         width: 100%;
         height: 100rpx;
          background: linear-gradient(-2deg, #ffffff 0%, #0055fe 100%);
         font-size: 40rpx;
         display: flex;
         align-items: center;
         justify-content: space-between;
         font-weight: bold;
         color: #fff;
         text-indent: 20rpx;
         height: 300rpx;
         padding: 10rpx;
         line-height:45rpx;
         padding-left: 20rpx;
          // background: linear-gradient(-2deg, #ffffff 0%, #0055fe 100%);
         // font-size: 40rpx;
         // display: flex;
         // align-items: center;
         // justify-content: space-between;
         // font-weight: bold;
         // color: #fff;
         // text-indent: 20rpx;
      }
   }
      /deep/ .uni-table{