qingyiay
2023-10-11 96db936c641b23897636ff6a15e31f8f87964342
pages/loadUnload-page/loadUnload-detail/loadUnload-detail.vue
@@ -43,6 +43,16 @@
                  <view class="file-name info">
                     状态:{{coalStatus[item.status]}}
                  </view>
                  <view class="info createTime">
                     入场时间:{{item.createTime}}
                  </view>
                  <view class="info code">
                     订单编号:{{item.code}}
                  </view>
                  <view class="info confirmPeople"
                     v-if="item.confirmPeople">
                     审核人:{{item.confirmPeople}}
                  </view>
               </view>
            </view>
            <view class="confirm-button">
@@ -53,7 +63,7 @@
                  @click.stop="loadOrder(item.id)"
                  :loading="loading"
                  loadingText="确认"
                  v-if='item.isPretendDischar===0'></u-button>
                  v-if='!item.ableDischar&&item.isContainLoginUser'></u-button>
            </view>
         </view>
      </view>
@@ -77,8 +87,13 @@
            loading: false,
            id: "",
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入煤仓', '出煤仓', '放空', '作废', '入场申请',
               '进入场院', '异常审核中'
               '进入场院', '异常审核中', '返回加减吨', '超时', '打印中', '打印中', '填写'
            ], // 状态
         }
      },
      computed: {
         userId() {
            return uni.getStorageSync('userId')
         }
      },
      onLoad(params) {
@@ -86,6 +101,10 @@
         this.init()
      },
      methods: {
         onPullDownRefresh() {
            this.init()
            uni.stopPullDownRefresh();
         },
         init() {
            uni.showLoading({
               title: "加载中"
@@ -93,7 +112,17 @@
            this.$reqGet('getAccordingCoalNameAll', { coalName: this.name }).then(res => {
               uni.hideLoading()
               if (res.code === 0) {
                  this.detailData = res.data
                  const errorStatusArr = [0, 1, 2, 3, 6, 11, 12, 13];
                  this.detailData = res.data.map(v => {
                     return {
                        ...v,
                        ableDischar: v.skin === v.hair || v.hair === 0 && v.skin === 0 || v
                           .isPretendDischar !== 0 || errorStatusArr.indexOf(v.status) !== -1,
                        isContainLoginUser: v.confirmPeopleId ? v.confirmPeopleId.split(',')
                           .indexOf(this.userId) === -
                           1 : true
                     }
                  })
               } else {
                  this.$u.toast('加载失败')
               }
@@ -110,7 +139,9 @@
               this.loading = false;
               if (res.code === 0) {
                  this.$u.toast('装卸成功')
                  this.init()
                  setTimeout(() => {
                     this.init()
                  }, 1000)
               } else {
                  this.$u.toast(res.msg ? res.msg : '装卸失败')
               }
@@ -132,7 +163,7 @@
      .collection-form-item {
         width: 690rpx;
         height: 380rpx;
         height: 440rpx;
         background: #ffffff;
         box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
         border-radius: 20rpx;
@@ -177,13 +208,13 @@
         .info-container {
            width: 100%;
            height: vww(100);
            height: vww(150);
            display: flex;
            justify-content: center;
            .info-block {
               width: 600rpx;
               height: vww(80);
               height: vww(120);
               display: flex;
               justify-content: center;
               flex-wrap: wrap;
@@ -206,6 +237,19 @@
               color: #515151;
               margin: vww(5);
            }
            .createTime,
            .code,
            .confirmPeople {
               width: 100%;
               margin-left: vww(9);
               display: flex;
               justify-content: flex-start;
            }
            .confirmPeople {
               margin-top: vww(24);
            }
         }