wk
2024-09-26 98a16020cbc9b777735705e8fb72200dde1b68bd
subPages/fayunPlanDetails/fayunPlanDetails.vue
@@ -75,7 +75,12 @@
                     v-for="(item, index) in yyDailyList"
                     :key="index"
                     @click="showMore(item)">
                     <view class="arrow-icon"><u-icon name="arrow-right"
                     <view class="deleteBtn" v-if="roleType === 1 && item.status <=3">
                        <u-button  style="height:40rpx" size='mini' :color='"red"' type="primary" text="删除"
                        @tap.stop="deleteOrder(item)"
                        ></u-button>
                     </view>
                        <view class="arrow-icon" v-else><u-icon name="arrow-right"
                           size="30"
                           color="#999999"></u-icon></view>
                     <view class="divider"><u-divider></u-divider></view>
@@ -99,12 +104,22 @@
         </view>
      </view>
      <view class="white-block"></view>
      <!-- 请求退单弹窗 -->
            <view class="">
               <u-modal :show="cancelAppointShow"
                  title="退单确认"
                  showCancelButton
                  content="是否确认删除此订单"
                  @confirm="cancelAppointConfirm"
                  @cancel="cancelAppointCancel"></u-modal>
            </view>
   </view>
</template>
<script>
   import combinedTitle from '@/components/combined-title/combined-title.vue';
   export default {
       navigationStyle: 'custom',
      components: {
         combinedTitle
      },
@@ -130,13 +145,16 @@
            orderPlanDetail: {},
            pageType:false, // 页面显示dom判断条件
            coalStatus: ['领取', '预约', '签到', '入场', '称皮', '称毛', '离场', '入磅房', '出磅房', '入仓库', '出仓库', '放空', '作废', '入场申请',
               '进入场院', '异常审核中', '返回加减吨', '超时', '打印中', '打印中', '填写'
               '进入场院', '异常审核中', '返回加减吨', '超时', '打印中', '打印中', '填写', '放空确认中', '超最大毛重确认中','补打','入场检查','质检中',
               '离场检查','已打印','装卸','返回加减吨确认中'
            ],
            yyDailyList: [],
            // 领取数量
            cars2: '',
            cancelAppointShow:false,
            coalName: '',
            productName:'',
            cancelAppointId:'',
            deptName: '',
            total: 0,
            carNum: ''
@@ -170,7 +188,7 @@
                  this.yyDailyList = res.data.yyDailyList;
                  if (res.data.yyDailyList) {
                     this.total = this.yyDailyList.reduce((prev, cur) => {
                        return prev + cur.clean;
                        return Number(prev) +  Number(cur.clean);
                     }, 0);
                     console.log(this.total,'total')
                  } else {
@@ -182,13 +200,58 @@
                  uni.hideLoading();
               }
            });
         }
         },
         //客户请求退单
         deleteOrder(item){
         if (item.status >= 3 && item.status !== 24) {
               this.$u.toast('当前状态不可退单')
               return
            }
            this.cancelAppointShow = true
            this.cancelAppointId = item.id
         },
            cancelAppointConfirm() {
            this.cancelAppointShow = false
            uni.showLoading({
               title: '加载中'
            })
            this.$reqPost('cancelAppoint', { takeCoalId: this.cancelAppointId }, 'params').then(res => {
               uni.hideLoading()
               if (res.code == 0) {
                  this.$u.toast('退单成功');
               } else {
                  this.$u.toast(res.msg ? res.msg : '退单失败');
               }
            }).then(() => {
               setTimeout(() => {
                  this.GetOrderPlanDetail();
               }, 1000);
            }).catch(e => {
               uni.hideLoading()
            })
         },
            cancelAppointCancel() {
            this.cancelAppointShow = false
         },
      },
      computed:{
         roleType() {
            return uni.getStorageSync('roleType');
         },
      }
   };
</script>
<style lang="scss"
   scoped>
   .deleteBtn{
      width: 50rpx;
      height: 25rpx;
      background: red;
      position: absolute;
      right: vww(30);
      top: vww(17);
   }
   @mixin flex {
      display: flex;
      justify-content: space-between;
@@ -252,6 +315,9 @@
               font-size: 32rpx;
               font-weight: normal;
               color: #ffffff;
               white-space: nowrap;
               overflow: hidden;
               text-overflow: ellipsis;
               line-height: 69rpx;
               text-shadow: 0rpx 4rpx 0rpx #1a66fe;
            }