yangan
2024-06-20 c7372dc7f495bdefb7f5e78d1c02756d637377b3
pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
@@ -52,22 +52,30 @@
                     @input='v=>discountInputHandle(v,i,item.clean)'></u--input>
               </view>
               <view v-else-if='flag'
                  class="count">{{ item.cinderWeight }}
                  class="count">{{ item.cinderWeight ?  item.cinderWeight + '吨' :"" }}
               </view>
            </view>
            <!-- 净重div -->
            <view class="weight-box">
               <view class="weigh-qualified">
               <view>
                  合格净重:
               <view v-if="!unqualifiedArr(i).length">
                  <view> 扣渣后净重:<text  class="count"> {{  cleanWeight(item) ?  cleanWeight(item)  + '吨' : ''}}</text></view>
               </view>
               <view class="count">  {{  cleanWeight(item) }}</view>
                <view v-else-if ='unqualifiedArr(i).length && item.clean' class='weigh-qualified-no'>
                  <view > 扣渣后净重:<text class="count">{{  cleanWeight(item) ?  cleanWeight(item)  + '吨' : '' }}</text></view>
                  <view >   合格净重:  <text class="count">{{ qualifiedWeight(item,i) ? qualifiedWeight(item,i) + '吨' : '' }}</text></view>
               </view>
               <view v-else-if ='unqualifiedArr(i).length && !item.clean' class='weigh-qualified-no'>
               </view>
            </view>
            <view class="weigh-qualified" v-for="el,index in unqualifiedArr(i)">
               <view>
                  不合格净重:
               </view>
               <view class="count">    {{el.unqualifiedWeight || ''}}</view>
               <view class="count">    {{el.unqualifiedWeight ? el.unqualifiedWeight  + '吨'   : ''}}</view>
            </view>
            </view>
            
@@ -83,39 +91,55 @@
            </view>
            <view style="font-size: 35rpx;">{{ coalDetailsData.customerName || '' }}</view>
            </view>
            <view class="level">
               <view style="width: 180rpx;">
               <u--text text="物料名称"
                  size='32'></u--text>
            </view>
            <view style="font-size: 35rpx;">{{ (coalDetailsData.coalName ? coalDetailsData.coalName: '') }}</view>
            </view>
            <view class="level">
            <!-- 物资明细 -->
            <view class="level" v-if="!flag">
            <view style="width: 180rpx;">
               <u--text text="物资明细"
                  size='32'></u--text>
            </view>
      
            <view class="tag-select"
               @click="goodsPopoverShow(i)"
               @click="goodsPopoverShow(i,'goods')"
               v-if='roleType===4'>
               <text>
                  {{item.breed+"/"+item.spec||item.modifygoodsName||'暂无'}}
                  {{item.newModifygoodsName || item.breed+"/"+item.spec||item.modifygoodsName||'暂无'}}
               </text>
            </view>
         </view>
            <view class="level">
               <view style="width: 180rpx;">
               <u--text text="品名"
                  size='32'></u--text>
            </view>
            <!-- (coalDetailsData.coalName ? coalDetailsData.coalName: '') -->
            <view class="tag-select"   @click="productNamePopoverShow(i)">{{ item.breed }}</view>
            </view>
         <view class="level"
            v-if='item.modifygoodsName ||globalShowWeigh[i].modifyProductName'>
            <view style="width: 180rpx;">
               <u--text text="品名与规格"
               <u--text text="规格"
                  size='32'></u--text>
            </view>
            <view class="tag-select"
               @click="productNamePopoverShow(i)">
               <!-- !flag?(globalShowWeigh[i].modifyProductName?globalShowWeigh[i].modifyProductName:item.modifygoodsName):(item.breed+'/'+item.spec) -->
               <text>
                  {{!flag?(globalShowWeigh[i].modifyProductName?globalShowWeigh[i].modifyProductName:item.modifygoodsName):(item.breed+'/'+item.spec)}}
                  {{item.spec}}
               </text>
            </view>
         </view>
         <view class="level" v-if="flag">
            <view style="width: 180rpx;">
               <u--text text="规格"
                  size='32'></u--text>
            </view>
            <view class="tag-select">
               <!-- !flag?(globalShowWeigh[i].modifyProductName?globalShowWeigh[i].modifyProductName:item.modifygoodsName):(item.breed+'/'+item.spec) -->
               <text>
                  {{item.spec}}
               </text>
            </view>
      
@@ -162,6 +186,7 @@
               <u-input placeholder="请输入通知数量"
                  border="bottom"
                  clearable
                  disabled
                  style="width: 70%;"
                  v-model="item.num">
               <template slot="suffix">
@@ -186,6 +211,7 @@
            <u-input placeholder="请输入通知重量"
                  border="bottom"
                  clearable
                  disabled
                  style="width: 70%;"
                  v-model="item.weight1">
                  <template slot="suffix">
@@ -218,66 +244,6 @@
               {{item.penaltyType == '0' ? '无扣罚' : '其他扣罚'}}
            </view>
         </view> -->
         <!-- 超尺扣罚金额 -->
         <view class="notice-num" v-if="item.penaltyType.includes('1')">
               <view class="num-text"
               style="margin-left: 10rpx;">
               <u--text text="超尺扣罚金额"
                  size='32'></u--text>
            </view>
            <view class="num-input"
            v-if='roleType===4&&!flag'
            >
            <u--input placeholder="请输入超尺扣罚金额"
                  border="bottom"
                  clearable
                  v-model="item.penaltyAmount"></u--input>
            </view>
            <view class="num-show"
               v-else-if="flag && item.penaltyType.split(',').includes('1')" >
               {{item.penaltyAmount}}
            </view>
         </view>
         <!-- 厚度扣罚金额 -->
         <view class="notice-num"  v-if="item.penaltyType.includes('2')">
               <view class="num-text"
               style="margin-left: 10rpx;">
               <u--text text="厚度扣罚金额"
                  size='32'></u--text>
            </view>
            <view class="num-input"
            v-if='roleType===4&&!flag'
            >
            <u--input placeholder="请输入厚度扣罚金额"
                  border="bottom"
                  clearable
                  v-model="item.thickPenaltyAmount"></u--input>
            </view>
            <view class="num-show"
               v-else-if="flag && item.penaltyType.split(',').includes('2')">
               {{item.thickPenaltyAmount}}
            </view>
         </view>
         <!-- 密闭器扣罚金额 -->
         <view class="notice-num" v-if="item.penaltyType.includes('3')">
               <view class="num-text"
               style="margin-left: 10rpx;">
               <u--text text="密闭器金额"
                  size='32'></u--text>
            </view>
            <view class="num-input"
            v-if='roleType===4&&!flag'
            >
            <u--input placeholder="请输入密闭器金额"
                  border="bottom"
                  clearable
                  v-model="item.obturatorPenaltyAmount"></u--input>
            </view>
            <view class="num-show"
               v-else-if="flag && item.penaltyType.split(',').includes('3')">
               {{item.obturatorPenaltyAmount}}
            </view>
         </view>
         <!-- 单价 -->
         <view class="notice-num">   
               <view class="num-text"
@@ -288,21 +254,130 @@
            <view class="num-input"
            v-if='roleType===4&&!flag'
            >
            <u--input placeholder="请输入单价"
            <u-input placeholder="请输入单价"
                  border="bottom"
                  clearable
                  v-model="item.unitPrice"></u--input>
                  v-model="item.unitPrice">
                  <template slot="suffix">
                  <text class="inp-unit">元</text>
               </template>
               </u-input>
            </view>
            <view class="num-show"
               v-else-if="flag">
               {{item.unitPrice}}
               {{item.unitPrice ? item.unitPrice + '元' : ''}}
            </view>
         </view>
         <!-- 扣罚容器 -->
         <view class="kouFa-box">
         <!-- 超尺扣罚金额 -->
         <view class="notice-num koufaBox-item">
               <view class="num-text"
               v-if="(roleType===4&&!flag) || (flag && item.oveForfeit)"
               style="margin-left: 10rpx;">
               <u--text text=" 超尺扣罚"
                  size='29'></u--text>
            </view>
            <view class="num-input"
            v-if='roleType===4&&!flag'
            >
            <u-input
            v-model="item.oveForfeit"
            placeholder="请输入"
                  border="bottom"
                  clearable
                  >
                  <template slot="suffix">
                  <text class="inp-unit">元</text>
               </template>
               </u-input>
            </view>
            <view class="num-show"
               v-else-if="flag && item.oveForfeit" >
               {{ item.oveForfeit + '元'}}
            </view>
         </view>
         <view class="notice-num koufaBox-item" >
               <view class="num-text"
               v-if="(roleType===4&&!flag) || (flag && item.thiForfeit)"
               style="margin-left: 10rpx;">
               <u--text text="厚度扣罚"
                  size='29'></u--text>
            </view>
            <view class="num-input"
            v-if='roleType===4&&!flag'
            >
            <u-input placeholder="请输入"
                  border="bottom"
                  clearable
                  v-model="item.thiForfeit">
                  <template slot="suffix">
                  <text class="inp-unit">元</text>
               </template>
               </u-input>
            </view>
            <view class="num-show"
               v-else-if="flag  && item.thiForfeit">
               {{ item.thiForfeit+ '元' }}
            </view>
         </view>
         <view class="notice-num koufaBox-item" >
               <view class="num-text"
               v-if="(roleType===4&&!flag) || (flag && item.obtForfeit)"
               style="margin-left: 10rpx;">
               <u--text text="密闭器"
                  size='29'></u--text>
            </view>
            <view class="num-input"
            v-if='roleType===4&&!flag'
            >
            <u-input placeholder="请输入"
                  border="bottom"
                  clearable
                  v-model="item.obtForfeit">
                  <template slot="suffix">
                  <text class="inp-unit">元</text>
               </template></u-input>
            </view>
            <view class="num-show"
               v-else-if="flag && item.obtForfeit">
               {{ item.obtForfeit+ '元' }}
            </view>
         </view>
         <view class="notice-num koufaBox-item">
               <view class="num-text"
               v-if="(roleType===4&&!flag) || (flag && item.othForfeit)"
               style="margin-left: 10rpx;">
               <u--text text="其他扣罚"
                  size='29'></u--text>
            </view>
            <view class="num-input"
            v-if='roleType===4&&!flag'
            >
            <u-input placeholder="请输入"
                  border="bottom"
                  clearable
                  v-model="item.othForfeit">
                  <template slot="suffix">
                  <text class="inp-unit">元</text>
               </template></u-input>
            </view>
            <view class="num-show"
               v-else-if="flag && item.othForfeit">
               {{ item.othForfeit+ '元'}}
            </view>
         </view>
         </view>
         <!--不合格判定种类  -->
         <view class="notice-num">
         <!-- <view class="notice-num">
               <view class="num-text"
               style="margin-left: 10rpx;">
               <u--text text="不合格判定"
               <u--text text="扣罚类型"
                  size='32'></u--text>
            </view>
            <view class="num-radio"
@@ -310,39 +385,27 @@
            @click.stop="onFoucus"
            style="height: 50rpx;"
            >
            <!-- <u-radio-group  size='32' v-model="item.penaltyType">
            <u-radio  :label-size="25" :name="'1'"  :label="'超尺扣罚'" :disabled="disabled">超尺扣罚</u-radio>
            <u-radio  :label-size="25" :name="'2'" :label="'厚度扣罚'" :disabled="disabled">厚度扣罚</u-radio>
            <u-radio  :label-size="25" :name="'3'" :label="'密闭器'" :disabled="disabled">密闭器</u-radio>
            </u-radio-group> -->
            <u-checkbox-group
             <u-checkbox-group
               placement="row"
               size="32"
               v-model="item.penaltyType"
               :value="this.penaltyType"
               ref="checkbox"
               @change="(event)=>checkboxChange(event,item)"
            >
               <!-- <u-checkbox
               :label-size="25"
                  :customStyle="{marginBottom: '8px',display:'flex'}"
                  v-for="(item, index) in checkboxList"
                  :key="index"
                  :label="item.name"
                  :name="item.value"
               >
            </u-checkbox> -->
            <u-checkbox  :label-size="25" :name="'1'"  :label="'超尺扣罚'" :disabled="disabled">超尺扣罚</u-checkbox>
            <u-checkbox  :label-size="25" :name="'2'" :label="'厚度扣罚'" :disabled="disabled">厚度扣罚</u-checkbox>
            <u-checkbox :label-size="25" :name="'3'" :label="'密闭器'" :disabled="disabled">密闭器</u-checkbox>
        </u-checkbox-group>
            <u-checkbox  :label-size="25" :name="'1'"  :label="'超尺扣罚'"  :value="item.penaltyAmount"   :checked="item.penaltyAmount"  :disabled="disabled">超尺扣罚</u-checkbox>
            <u-checkbox  :label-size="25" :name="'2'" :label="'厚度扣罚'"  :value="item.thickPenaltyAmount"   :checked="item.thickPenaltyAmount" :disabled="disabled">厚度扣罚</u-checkbox>
            <u-checkbox :label-size="25" :name="'3'" :label="'密闭器'"  :value="item.obturatorPenaltyAmount"   :checked="item.obturatorPenaltyAmount"  :disabled="disabled">密闭器</u-checkbox>
            <u-checkbox :label-size="25" :name="'4'" :label="'其他扣罚'" :value="item.qita"   :checked="item.qita" :disabled="disabled">其他扣罚</u-checkbox>
        </u-checkbox-group>
            </view>
            <view class="num-show"
               v-else-if="flag">
               <view v-for='el,index in item.penaltyType.split(",")'>
                  <text> {{el.penaltyType == 1 ? '超尺扣罚' : el.penaltyType == 2 ? '厚度扣罚' :el.penaltyType == 3 ? '密闭器' : null }} </text>
               <view>
                  <text> {{item.penaltyType == 1 ? '超尺扣罚' : item.penaltyType == 2 ? '厚度扣罚' :item.penaltyType == 3 ? '密闭器' : null }} </text>
               </view>
               
            </view>
         </view>
         </view> -->
         </view>
         <u-empty v-if=" isYanz() && !isShow(item) " icon-size="200"  text="''" >
            <text>暂未验质</text>
@@ -358,7 +421,9 @@
               <u--image :showLoading="true"
                  :src="`${BaseUrl}${val}`"
                  width="80px"
                  height="80px">
                  height="80px"
                  @click="imageClick(val)"
                  >
                  <view slot="error"
                     style="font-size: 24rpx;">加载失败</view>
               </u--image>
@@ -377,7 +442,7 @@
               height="150"
               :previewFullImage="true">
            </u-upload>
         </view>
                  </view>
         <u--list
         :height="0"
         style="   margin-left: 50rpx;margin-top: 30rpx;"
@@ -406,7 +471,19 @@
            <view class="tag-select">
               <text>
                  <!-- {{!flag?(globalShowWeigh[i].unqualifiedBreed?globalShowWeigh[i].unqualifiedBreed:item.unqualifiedBreed):(item.unqualifiedBreed||"请选择")}} -->
                  {{  el.unqualifiedBreed  }}
                  {{  el.unsecondClass  }}
               </text>
            </view>
         </view>
         <view class="unqualifiedBreed">
            <view style="width: 180rpx;">
               <u--text text="不合格规格"
                  size='32'></u--text>
            </view>
            <view class="tag-select">
               <text>
                  <!-- {{!flag?(globalShowWeigh[i].unqualifiedBreed?globalShowWeigh[i].unqualifiedBreed:item.unqualifiedBreed):(item.unqualifiedBreed||"请选择")}} -->
                  {{  el.unSpecifications  }}
               </text>
            </view>
         </view>
@@ -426,12 +503,12 @@
                  readonly
                  @input='v=>unqualifiedWeightInputHandle(v,i,item.clean)'></u--input> -->
                  <view class="num-show"
>               {{el.unqualifiedWeight || ''}}
>               {{el.unqualifiedWeight ? el.unqualifiedWeight + '吨':   ''}}
            </view>
            </view>
            <view class="num-show"
               v-else-if="flag">
               {{el.unqualifiedWeight || ''}}
               {{el.unqualifiedWeight ? el.unqualifiedWeight + '吨':   ''}}
            </view>
            
         </view>
@@ -466,12 +543,12 @@
                  readonly
                  @input='v=>unqualifiedWeightInputHandle(v,i,item.clean)'></u--input> -->
                  <view class="num-show"
>               {{el.penaltyUnitPrice || ''}}
>               {{el.penaltyUnitPrice ?  el.penaltyUnitPrice + '元' : ''}}
            </view>
            </view>
            <view class="num-show"
               v-else-if="flag">
               {{el.penaltyUnitPrice || ''}}
               {{el.penaltyUnitPrice ?  el.penaltyUnitPrice + '元' : ''}}
            </view>
            
         </view>
@@ -481,7 +558,7 @@
      </u--list>
      <!-- 增加不合格规矩 -->
      <button  class="addBtn" v-if="isShow(item) && isYanz()" type="primary"   :plain="false"  @click="addUnqualified(i)">添加不合格品类</button>
      <button  class="addBtn" v-if="isShow(item) && isYanz()" type="primary"   :plain="false"  @click="addUnqualified(i)">不合格判定</button>
         <!-- 物资明细 -->
         <u-action-sheet :actions="goodsList"
            :show="goodsShow"
@@ -508,12 +585,25 @@
               @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 == '外购'">
      <view style="padding: 10rpx;">
      <u-row  >
                    <u-col span="24" >
                    <!-- <u-col span="24" >
                        <view class="demo-layout bg-purple-light" style="display: flex;">
                     <text style="font-size: 32rpx;">验质说明:</text>
                     <view style="display: inline-block;"
@@ -529,7 +619,7 @@
                        {{ qualityInstructions }}
                     </view>
                  </view>
                    </u-col>
                    </u-col> -->
                </u-row>
         </view>
         <view style="padding: 10rpx;">
@@ -648,22 +738,41 @@
               @close='unqualifiedClose'
               @select="selectUnqualifiedClick"></u-action-sheet>
         </view>
      </view>
      </view>
         <!-- 图片预览弹出框 -->
         <view class="previewImage-container">
         <u-popup :show="previewImageShow"
            mode="center"
            @close="previewImageClose"
            @open="previewImageOpen">
            <u--image :src="previewImageSrc != null ? BaseUrl + previewImageSrc : ''"
               width="400px"
               height="400px"></u--image>
         </u-popup>
      </view>
   </view>
</template>
<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: '',
            penaltyType:[],
             indexFlag:0, // 下标标志位
            remarks:'',
            checkboxList:[
@@ -798,7 +907,6 @@
               let noPin = [];
               let noPrice = [];
               const item = this.globalShowWeigh[index];
               console.log(this.globalShowWeigh[index],'index')
               if(item){
               if(item.unqualifiedBreed){
                  arr = item.unqualifiedBreed.split(",");
@@ -817,7 +925,11 @@
                  // }
                 
                   let result =  arr.length && arr.map((el,index)=>{
                  let obj = {unqualifiedBreed:el,unqualifiedWeight:temp[index],unqualifiedType:noPin[index],penaltyUnitPrice:noPrice[index]}
                  const pinming = el.split("/")[0];
                  const guige = el.split("/")[1];
                  let obj = {unqualifiedBreed:el,unqualifiedWeight:temp[index],unqualifiedType:noPin[index],penaltyUnitPrice:noPrice[index],
                  unsecondClass:pinming,unSpecifications:guige
                  }
                  return obj
                  })
                  console.log(result,temp,'arr')
@@ -833,18 +945,44 @@
         },
         cleanWeight(){
            return function(item){
               console.log(item,'itemsssss')
               if(!item.weight){
                  return ''
               }else if(item.weight && !item.unqualifiedWeight){
               // if(!item.weight){
               //    return ''
               // }else if(item.weight && !item.unqualifiedWeight){
               //    return item.weight
               // }else if(item.weight && item.unqualifiedWeight){
               //    return item.weight
               // }
               if(item.weight){
                  return item.weight
               }else if(item.weight && item.unqualifiedWeight){
                  return (item.weight - (item.unqualifiedWeight - 0)).toFixed(2)
               }else{
               }else if(!item.clean){
                  return ''
               } else if(item.clean && !item.unqualifiedWeight){
                  return item.clean
               }else if(item.clean && item.cinderWeight){
                  return  new BigNumber(item.clean - 0).minus(item.cinderWeight - 0);
               }
               console.log(item,'clearnWeight')
            }
         },
         //合格净重
         qualifiedWeight(){
            return function(item,i){
               console.log(item,'itemnsssajdakdj');
               let znums;
               if(this.globalShowWeigh[i].unqualifiedWeights){
               znums = this.globalShowWeigh[i].unqualifiedWeights.split(',')
               }else{
                  znums = []
               }
               let z =  new BigNumber(znums.reduce((p,n)=>{
                  return (p - 0) + (n - 0)
               },0))
               let y = new BigNumber(item.cinderWeight)
            return new BigNumber(item.clean - 0).minus(z).minus(y);
            }
         }
      },
@@ -862,9 +1000,17 @@
         this.havedSubmit = params.havedSubmit === "true" || false;
         console.log(this.havedSubmit,'this.havedSubmit')
         uni.$on("handClick", res => {
            console.log(res.tempArr);
            this.showWeigh[res.index].tempArr = res.tempArr;
            // 清除监听
            console.log(res,'22222222222');
            if(res.pageFlag){
               //不合格的
               this.showWeigh[res.index].tempArr = res.tempArr;
            }else{
               //合格
               this.showWeigh[res.index].breed = res.data.secondClass;
               this.showWeigh[res.index].spec = res.data.specifications;
               this.showWeigh[res.index].firstClass = res.data.firstClass;
            }
            
         })
      },
@@ -882,26 +1028,39 @@
            // let y = new BigNumber(value - 0) // 因为value 是 0 所以需要循环 取减
            let z = new BigNumber(this.showWeigh[index].cinderWeight -  0);
            let y;
            if(value.filter(Boolean) .length){
                y = value.reduce((p,n)=>{
            return (p - 0) + (n - 0);
             },0);
            // if(value.filter(Boolean) .length){
            //     y = value.reduce((p,n)=>{
            // return (p - 0) + (n - 0);
             // },0);
            
            }else{
                y = 0;
            }
            // }else{
            //     y = 0;
            // }
            if(clean){
               if(x.minus(y).minus(z).toFixed(2)  <= 0){
                  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(z).toFixed(2) ;
               }
            }
            
         },
         checkboxChange(n,item) {
               if(!n.includes('1')){
                  item.penaltyAmount = ''
               }
               if(!n.includes('2')){
                  n.thickPenaltyAmount = ''
               }
               if(!n.includes('3')){
                  item.obturatorPenaltyAmount = ''
               }
               if(!n.includes('4')){
                  item.qita = ''
               }
            },
         getTakeCoal() {
@@ -913,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
@@ -923,7 +1084,6 @@
                     }else{
                        v.tempArr = JSON.parse(v.tempArr)
                     }
                     return {
                        ...v,
                        modifyProductName: '',
@@ -968,6 +1128,13 @@
               })
            })
         },
         previewImageClose() {
            this.previewImageShow = false;
         },
         previewImageOpen() {
            this.previewImageShow = true;
            console.log('preview open');
         },
         GetOrderPlan() {
            uni.showLoading({ title: '加载中...' });
            this.$reqGet('GetOrderPlan').then(res => {
@@ -995,28 +1162,28 @@
               }
            })
         },
         imageClick(imgStr){
            console.log(imgStr,'触发')
               this.previewImageSrc = imgStr;
            this.$nextTick(() => {
               this.previewImageShow = true;
            });
         },
         // 点击确认
         confirmInput() {
            let flag = true;
            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(!v.unitPrice){
                   flag = false;
               }
               if(!v.penaltyType.includes('1')){
                  v.penaltyAmount = ''
               }
               if(!v.penaltyType.includes('2')){
                  v.thickPenaltyAmount = ''
               }
               if(!v.penaltyType.includes('3')){
                  v. obturatorPenaltyAmount = ''
               }
               if(this.globalShowWeigh[i].unqualifiedWeights){
               unqualifiedWeightAll = this.globalShowWeigh[i].unqualifiedWeights.split(",").reduce((p,n)=>{return (p - 0) + (n - 0)},0).toFixed(2)  || ''
               }else{
@@ -1030,15 +1197,16 @@
                  inspectionJpg: v.fileList.map(v => v.url.replace(BaseUrl, '')).join(','),
                  unqualifiedWeights :this.globalShowWeigh[i].unqualifiedWeights ? this.globalShowWeigh[i].unqualifiedWeights : 0,
                  unqualifiedWeight :unqualifiedWeightAll ,
                  penaltyType:v.penaltyType ? v.penaltyType.join(','): '',
                  tempArr:this.globalShowWeigh[i].tempArr ? JSON.stringify(this.globalShowWeigh[i].tempArr) : '',
                  penaltyUnitPrice:this.globalShowWeigh[i].penaltyUnitPrice,
                  
               }
            });
            if(flag){
            // if(flag){
            this.loading = true;
            params.tmTaskCoalItems = this.showWeigh;
            console.log(params,'params')
            this.$reqPost('updateTmTaskCoalItem', params, 'json').then(
               res => {
                  if (res.code == 0) {
@@ -1054,10 +1222,10 @@
                     this.$u.toast(res.msg ? res.msg : '操作失败')
                  }
               })
            }else{
               this.$u.toast('请输入单价')
               return
            }
            // }else{
            //    this.$u.toast('请输入单价')
            //    return
            // }
            
         },
         // 校验数据是否合格 
@@ -1087,6 +1255,7 @@
         },
         goodsselectClick(val) {
            this.showWeigh[this.goodsIndex].modifygoodsName = val.name
            this.showWeigh[this.goodsIndex].newModifygoodsName =  val.breed + '/' +  val.breed//新增区分物资明细 与 修改后的品名 规格
            this.showWeigh[this.goodsIndex].itemId = val.itemId
            this.showWeigh[this.goodsIndex].num = val.num
            this.showWeigh[this.goodsIndex].numUnit = val.numUnit
@@ -1102,7 +1271,7 @@
               // this.actionShow = true
               // this.actionIndex = index
               uni.navigateTo({
                  url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${index}&takeCoalId=${this.orderPlanId}&productName=${this.willProductName}&pageFlag=${false}`
                  url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${index}&takeCoalId=${this.orderPlanId}&productName=${this.willProductName}&pageFlag=${false}&actionObj=${ JSON.stringify(this.showWeigh[index])}`
               })
            }
         },
@@ -1151,7 +1320,8 @@
                  this.showWeigh[index].weight = '0';
                  this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确')
               }else{
                  this.showWeigh[index].weight = x.minus(y).minus(z);
                  console.log(znums.length)
                   this.showWeigh[index].weight = x.minus(y);
               }
            }else{
               this.$u.toast('当前无净重')
@@ -1322,6 +1492,47 @@
                  url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${i}&takeCoalId=${this.orderPlanId}&unqualified=${this.willUnqualified}&type=edit&indexTo=${index}`
               })
            }
         },
         amountChange(value,event){
            // //超尺扣罚
            // if(event.penaltyAmount){
            //    console.log("触发1")
            //    if(!event.penaltyType.includes('1')){
            //       event.penaltyType.push('1')
            //       console.log("触发PUsh1")
            //    }
            // }
            // //厚度
            // if(event.thickPenaltyAmount){
            //    if(!event.penaltyType.includes('2')){
            //       event.penaltyType.push('2')
            //    }
            // }
            // //密闭器
            // if(event.obturatorPenaltyAmount){
            //    if(!event.penaltyType.includes('3')){
            //       event.penaltyType.push('3')
            //    }
            // }
            // //其他
            // if(event.qita){
            //    if(!event.penaltyType.includes('4')){
            //       event.penaltyType.push('4')
            //    }
            // }
            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');
         }
      },
   }
@@ -1336,14 +1547,13 @@
   }
   .weigh-qualified{
      display: flex;
      width: 340rpx;
      flex-direction: row;
      justify-content: space-around;
      height: 160rpx;
      height:auto;
   }
   .weight-box{
      display: flex;
      height: 160rpx;
      margin-bottom: 20rpx;
      flex-direction: column;
      overflow-y: scroll;
@@ -1457,7 +1667,7 @@
               position: relative;
            }
            .num-radio{
               width: 60%;
               width: 100%;
               font-size: 100rpx;
            }
@@ -1543,4 +1753,17 @@
      border-radius: 8rpx;
      margin-left: 12rpx;
   }
   .kouFa-box{
      display: flex;
      flex-wrap: wrap;
      .koufaBox-item{
         width: 42%!important;
         font-size: 26rpx;
         .num-text{
            width: 42%!important;
         }
      }
   }
</style>