qingyiay
2023-12-25 aef949a659d073443e81f22686b44bd440a69a0e
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -38,6 +38,12 @@
               <view class="order-code"
                  v-if="!isSpecial">
                  订单编号:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ coalDetailsData.orderCode || '' }}</view>
               <view class="stream-view"
                  style="color: #475bfd;"
                  @click="streamView"
                  v-show="timeLineStatus===9">
                  查看实时车辆
               </view>
               <view class="weigh-item">
                  <view class="item">
                     <view class="concrete"
@@ -194,8 +200,15 @@
         </view>
      </view>
      <view class="weigh-ability">
         <view class="weigh-button">
            <u-button text="上磅计量"
               @click="cengZhongClick"
               type="primary"
               shape="circle"
               :disabled="haveInputOrigin&&!isSpecial"></u-button>
         </view>
         <view class="weigh-button"
            v-show='ablePrintInduction'>
            v-show='ablePrintInduction&&!(coalDetailsData.skin&&coalDetailsData.hair)'>
            <u-button text="打印入门证"
               @click="printBefore('in')"
               type="primary"
@@ -216,11 +229,6 @@
               @click="showCaolPickUpBill"
               type="primary"
               shape="circle"></u-button></view>
         <view class="weigh-button"><u-button text="上磅计量"
               @click="cengZhongClick"
               type="primary"
               shape="circle"
               :disabled="haveInputOrigin&&!isSpecial"></u-button></view>
      </view>
      <view class="evacuationModal">
         <u-modal :show="evacuationModalShow"
@@ -230,14 +238,14 @@
            @confirm="evacuationConfirm"
            @cancel="evacuationCancel"></u-modal>
      </view>
      <view class="completeOutSale">
      <!-- <view class="completeOutSale">
         <u-modal :show="completeOutSaleShow"
            title="确认"
            content="是否完成外销提煤单"
            :showCancelButton="true"
            @confirm="completeOutSaleConfirm"
            @cancel="completeOutSaleCancel"></u-modal>
      </view>
      </view> -->
      <view class="serviece-customer">
         <u-action-sheet :actions="list"
            @select="selectClick"
@@ -278,10 +286,10 @@
         this.orderPlanId = value.orderPlanId;
         this.yyId = value.yyId;
         this.originInfoVisible = value.orderType === '外购'
         if (value.overTmWaixiao) {
            this.overTmWaixiao = value.overTmWaixiao
            this.getWeightHouseObj.overTmWaixiao = value.overTmWaixiao
         }
         // if (value.overTmWaixiao) {
         //    this.overTmWaixiao = value.overTmWaixiao
         //    this.getWeightHouseObj.overTmWaixiao = value.overTmWaixiao
         // }
         this.fileList1 = []
         this.changeglobalIsFirstWeighing(1)
         if (this.globalIsFirstWeighing === 1) {
@@ -404,6 +412,7 @@
            timeout: '0',
            wsgShow: false,
            timeLineStatus: null,
            timeLineEqCode: '',
            originInfoNotice: '填写原发信息后可上磅计量',
            submitOriginInfoLoading: false,
            ischeckedDefault: 0,
@@ -473,6 +482,7 @@
            this.$reqGet('coalDayPage', { id: this.orderPlanId, timeout: this.timeout }).then(res => {
               if (res.code == 0) {
                  this.timeLineStatus = res.data[0].taskStatus
                  this.timeLineEqCode = res.data[0].eqCode
                  this.dayRZ = res.data.map(v => {
                     let slicedate = v.taskStatusDes.slice(0, 10);
                     if (slicedate == this.currentDate) {
@@ -516,11 +526,11 @@
                  this.orderType = this.coalDetailsData.orderType;
                  // 
                  this.isSpecial = res.data.isSpecial
                  // 判断是否完成外销订单
                  this.completeOutSale.orderType = this.coalDetailsData.orderType;
                  this.completeOutSale.deptId = this.coalDetailsData.deptId;
                  this.completeOutSale.filedId = this.coalDetailsData.filedId;
                  this.completeOutSale.clean = this.coalDetailsData.clean;
                  // // 判断是否完成外销订单
                  // this.completeOutSale.orderType = this.coalDetailsData.orderType;
                  // this.completeOutSale.deptId = this.coalDetailsData.deptId;
                  // this.completeOutSale.filedId = this.coalDetailsData.filedId;
                  // this.completeOutSale.clean = this.coalDetailsData.clean;
                  // 获取所在磅房参数赋值
                  this.getWeightHouseObj.deptId = this.coalDetailsData.deptId;
                  this.getWeightHouseObj.filedId = this.coalDetailsData.filedId;
@@ -565,28 +575,17 @@
                  this.$u.toast('加载失败');
               }
            }).then(() => {
               if (this.completeOutSale.orderType == "内购" || this.completeOutSale.orderType == "转入") {
                  if (this.completeOutSale.clean !== 0 && this.currentPageCoalStatus !== 6 && this
                     .currentPageCoalStatus !== 11 && this.currentPageCoalStatus !== 12) {
                     this.$reqGet('getTmTaskCoalOrderType', {
                        deptId: this.completeOutSale.deptId,
                        filedId: this.completeOutSale.filedId,
                        orderType: '外销'
                     }).then(res => {
                        if (res.data && res.data?.length !== 0) {
                           this.completeOutSaleShow = true
                           console.log(res, '完成外销订单');
                        }
                     })
                  }
               }
            }).then(() => {
               // 判断当前时间是否超出预约时间
               setTimeout(() => {
                  let endTime = this.coalDetailsData.yuYueSection.slice(0, 10) + ' ' + this
                     .coalDetailsData
                     .yuYueSection.slice(-5);
                  if (dayjs(this.currentTime).isAfter(endTime) && this.coalDetailsData.status <= 1) {
                  // 最大约束时间 maxRestrainTime
                  const maxRestrainTime = dayjs().subtract(this.coalDetailsData.flexibleTime,
                        'minute')
                     .format('YYYY-MM-DD HH:mm:ss');
                  console.log(maxRestrainTime, this.correctStatus);
                  if (dayjs(maxRestrainTime).isAfter(endTime) && this.correctStatus <= 1) {
                     // this.$u.toast('已超出预约时间,可点击入场申请重新入场')
                     this.timeout = '1'
                  }
@@ -599,6 +598,7 @@
               this.$reqGet('coalDayPage', { id: this.orderPlanId, timeout: this.timeout }).then(res => {
                  if (res.code == 0) {
                     this.timeLineStatus = res.data[0].taskStatus
                     this.timeLineEqCode = res.data[0].eqCode
                     this.dayRZ = res.data.map(v => {
                        let slicedate = v.taskStatusDes.slice(0, 10);
                        if (slicedate == this.currentDate) {
@@ -964,6 +964,11 @@
            } else {
               uni.$u.toast('请填写完整原发信息')
            }
         },
         streamView() {
            uni.navigateTo({
               url: `/pages/public-page/driverStream/driverStream?eqCode=${this.timeLineEqCode}`
            })
         }
      }
   };
@@ -1124,6 +1129,12 @@
               color: #7d7d7d;
            }
            .stream-view {
               height: vww(18);
               margin: vww(8);
               margin-left: 0;
            }
            .weigh-item {
               width: 100%;
               height: vww(36);