yangan
2024-06-24 1777479d224819e835d3e05ec356c84e8b0f45c9
pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
@@ -585,6 +585,19 @@
               @select="selectUnqualifiedClick"></u-action-sheet>
         </view>
      </view>
      <!-- 原发出场时间 -->
      <view v-if="roleType!==3">
         <view>
            <text>货物发货地出场时间或发货磅单时间:</text>
         </view>
         <view>
            <uni-datetime-picker
            v-model="outDate"
            type="datetime"
            @change="datechange"
         />
         </view>
      </view>
      <!-- 新增 验质备注。验质说明 -->
      <view v-if=" isYanz()">
         <view v-if="coalDetailsData.orderType == '外购'">
@@ -725,6 +738,7 @@
               @close='unqualifiedClose'
               @select="selectUnqualifiedClick"></u-action-sheet>
         </view>
      
      </view>
      </view>
@@ -745,12 +759,16 @@
<script>
   import BigNumber from "bignumber.js"
   import formatDate from  '@/utils/date'
   import { BaseUrl } from '@/api/publicInterface.js';
   import { onlineurl } from '@/api/request.js'
   import { mapState, mapMutations } from "vuex"
   export default {
      data() {
         return {
            dateInpShow:false,
            outDate:'',
            dateValue:'',
            previewImageShow:false,
            qualityInstructions:"",
            previewImageSrc: '',
@@ -1023,7 +1041,7 @@
                  this.showWeigh[index].weight = '0';
                  this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确')
               }else{
                  this.showWeigh[index].weight = x.minus(z).toFixed(2) ;
                  this.showWeigh[index].weight = x.minus(z).toFixed(4);
               }
            }
            
@@ -1054,6 +1072,8 @@
                  uni.hideLoading()
                  this.coalDetailsData = res.data;
                  this.remarks  = res.data.remarks;
                  this.dateValue = res.data.startTime;
                  this.outDate = res.data.startTime;
                  this.qualityInstructions = res.data.qualityInstructions
                  this.orderCode = res.data.orderCode
                  this.showWeigh = this.coalDetailsData.tmTaskCoalItems ? this.coalDetailsData
@@ -1158,13 +1178,14 @@
            let params = {},unqualifiedWeightAll;
            params.qualityInstructions = this.qualityInstructions;
            params.remarks = this.remarks;
            params.startTime = this.dateValue;
            console.log( this.showWeigh,' this.showWeigh')
            this.showWeigh = this.showWeigh.map((v, i) => {
            console.log(this.penaltyType,this.$refs.checkbox,'123')
            // let tempArr = v.penaltyType.split(',');
             v.unqualifiedType = '';
               if(this.globalShowWeigh[i].unqualifiedWeights){
               unqualifiedWeightAll = this.globalShowWeigh[i].unqualifiedWeights.split(",").reduce((p,n)=>{return (p - 0) + (n - 0)},0).toFixed(2)  || ''
               unqualifiedWeightAll = this.globalShowWeigh[i].unqualifiedWeights.split(",").reduce((p,n)=>{return (p - 0) + (n - 0)},0).toFixed(4)  || ''
               }else{
                  unqualifiedWeightAll = 0;
               }
@@ -1280,7 +1301,7 @@
            value = parseFloat(value);
            value = value + ""; // 变回为字符串
         }else{
            value =  value.replace(/^(-)*(\d+)\.(\d\d).*$/,"$1$2.$3");
            value =  value.replace(/^(-)*(\d+)\.(\d\d\d\d).*$/,"$1$2.$3");
            this.$nextTick(()=>{
               this.showWeigh[index].cinderWeight  = value.replace(/[^\d.]/g, "");
            });
@@ -1336,7 +1357,7 @@
                  this.showWeigh[index].weight = '0';
                  this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确')
               }else{
                  this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(2) ;
                  this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(4) ;
               }
            
         
@@ -1502,6 +1523,16 @@
            // }
            console.log(event,'event')
         },
         dateInpFoucs(){
            console.log('聚焦');
            this.dateInpShow = true;
         },
         datechange(value){
            console.log('dateChange',value,formatDate.formatDate(new Date(value)) );
            this.dateValue = (formatDate.formatDate(new Date(value)) + ':' + '00');
         }
      },
   }