From 02f31fc889ea6ff00bb5237a1a50f712586b2aa3 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期四, 20 六月 2024 10:24:33 +0800
Subject: [PATCH] Merge branch 'develop/steels' into steels

---
 pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue | 1412 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 1,326 insertions(+), 86 deletions(-)

diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
index 6f7b9ba..9d4a538 100644
--- a/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
+++ b/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
@@ -1,10 +1,14 @@
 <!-- 鏌ョ湅鐨瘺鍑�鏄庣粏 -->
 <template>
+
 	<view class="main">
-		<u-empty mode="data"
+		<u-subsection class="tabs"  :fontSize = '30' :list="list" :current="current" @change="tabChange"></u-subsection>
+		<view v-if="current">
+			<u-empty mode="data"
 			icon="http://cdn.uviewui.com/uview/empty/data.png"
 			textSize="30"
 			iconSize="1000"
+			text="鏆傛棤鏁版嵁"
 			v-if="showWeigh.length===0"></u-empty>
 		<view class="main-block"
 			v-for="(item,i) in showWeigh"
@@ -32,6 +36,7 @@
 					<view class="num">{{ item.clean }}</view>
 				</view>
 			</view>
+				<view v-if="isShow(item) && isYanz()">
 			<view class="discount">
 				<view class="rate">
 					<view class="label-text">
@@ -41,83 +46,391 @@
 						class="count-input">
 						<u--input placeholder="璇疯緭鍏ユ墸娓�"
 							border="bottom"
+							type="digit"
 							clearable
 							v-model="item.cinderWeight"
 							@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>
-				<view class="weigh">
-					<view class="label-text">
-						鎵f福鍚庡噣閲�
+				<!-- 鍑�閲峝iv -->
+				<view class="weight-box">
+					<view class="weigh-qualified">
+					<view v-if="!unqualifiedArr(i).length">
+						
+						<view> 鎵f福鍚庡噣閲嶏細<text  class="count"> {{  cleanWeight(item) ?  cleanWeight(item)  + '鍚�' : ''}}</text></view>
 					</view>
-					<view class="count">{{ item.weight }}</view>
+				    <view v-else-if ='unqualifiedArr(i).length && item.clean' class='weigh-qualified-no'>
+						<view > 鎵f福鍚庡噣閲嶏細<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 ? el.unqualifiedWeight  + '鍚�'   : ''}}</view>
+				</view>
+				</view>
+				
 			</view>
-			<view class="notice-num">
-				<view class="num-text">
-					<u--text text="閫氱煡鏁伴噺"
+		</view>
+			<!-- 鍒ゆ柇鏄惁妫�楠岃川閲� -->
+			<view v-if="isShow(item) && isYanz()">
+				<view class="level">
+					<view style="width: 180rpx;">
+					<u--text text="渚涘簲鍟�"
 						size='32'></u--text>
+						
 				</view>
-				<view class="num-input">
-					<u--input placeholder="璇疯緭鍏ラ�氱煡鏁伴噺"
-						border="bottom"
-						clearable
-						v-model="item.num"></u--input>
+				<view style="font-size: 35rpx;">{{ coalDetailsData.customerName || '' }}</view>
 				</view>
-			</view>
-			<view class="notice-num">
-				<view class="num-text">
-					<u--text text=" 涓嶅悎鏍煎搧鍚�"
-						size='32'></u--text>
-				</view>
-				<view class="num-input">
-					<u--input placeholder="璇疯緭鍏� 涓嶅悎鏍煎搧鍚�"
-						border="bottom"
-						clearable
-						v-model="item.unqualifiedBreed"></u--input>
-				</view>
-			</view>
-			<view class="notice-num">
-				<view class="num-text">
-					<u--text text=" 涓嶅悎鏍奸噸閲�"
-						size='32'></u--text>
-				</view>
-				<view class="num-input">
-					<u--input placeholder="璇疯緭鍏ヤ笉鍚堟牸閲嶉噺"
-						border="bottom"
-						clearable
-						v-model="item.unqualifiedWeight"></u--input>
-				</view>
-			</view>
-			<view class="level"
-				v-if='!flag'>
-				<view class=""
-					style="width: 140rpx;">
+				<!-- 鐗╄祫鏄庣粏 -->
+				<view class="level" v-if="!flag">
+				<view style="width: 180rpx;">
 					<u--text text="鐗╄祫鏄庣粏"
 						size='32'></u--text>
 				</view>
-				<u-tag :text="item.breed+item.spec||item.modifygoodsName||'鏆傛棤'"
-					plain
-					@click="goodsPopoverShow(i)"
-					v-if='item.breed&&item.spec||roleType===4'></u-tag>
+		
+				<view class="tag-select"
+					@click="goodsPopoverShow(i,'goods')"
+					v-if='roleType===4'>
+					<text>
+						{{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||flag'>
-				<view style="width: 200rpx;">
-					<u--text text="鍝佸悕涓庤鏍�"
+				v-if='item.modifygoodsName ||globalShowWeigh[i].modifyProductName'>
+				<view style="width: 180rpx;">
+					<u--text text="瑙勬牸"
 						size='32'></u--text>
 				</view>
-				<view v-if="showWeighCopy[i].modifyProductName||item.breed&&item.spec">
-					<u-tag :text="!flag?showWeighCopy[i].modifyProductName:item.breed+item.spec"
-						plain
-						@click="productNamePopoverShow(i)"></u-tag>
+				<view class="tag-select"
+					@click="productNamePopoverShow(i)">
+					<!-- !flag?(globalShowWeigh[i].modifyProductName?globalShowWeigh[i].modifyProductName:item.modifygoodsName):(item.breed+'/'+item.spec) -->
+					<text>
+						{{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>
+		
+			</view>
+			<!-- <view class="unqualifiedBreed">
+				<view style="width: 180rpx;">
+					<u--text text="涓嶅悎鏍煎搧鍚�"
+						size='32'></u--text>
+				</view>
+				<view class="tag-select"
+					@click="selectunqualifiedBreed(i)">
+					<text>
+						{{!flag?(globalShowWeigh[i].unqualifiedBreed?globalShowWeigh[i].unqualifiedBreed:item.unqualifiedBreed):(item.unqualifiedBreed||"璇烽�夋嫨")}}
+					</text>
 				</view>
 			</view>
-			<view class=""
-				style="margin-top: 8rpx;">
+			<view class="notice-num">
+				<view class="num-text">
+					<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.unqualifiedWeight"
+						@input='v=>unqualifiedWeightInputHandle(v,i,item.clean)'></u--input>
+				</view>
+				<view class="num-show"
+					v-else-if="flag">
+					{{item.unqualifiedWeight}}
+				</view>
+			</view> -->
+
+			<view class="notice-num">
+				<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
+						disabled
+						style="width: 70%;"
+						v-model="item.num">
+					<template slot="suffix">
+						<text class="inp-unit">{{   item.numUnit}}</text>
+					</template>
+					</u-input>
+				</view>
+				<view class="num-show"
+					v-else-if="flag">
+					{{item.num + item.numUnit}}
+				</view>
+			</view>
+			<view class="notice-num">	
+					<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
+						disabled
+						style="width: 70%;"
+						v-model="item.weight1">
+						<template slot="suffix">
+						<text class="inp-unit">{{   item.weightUnit  }}</text>
+					</template>
+					</u-input>
+				</view>
+				<view class="num-show"
+					v-else-if="flag">
+					{{item.weight1 + item.weightUnit }}
+				</view>
+			</view>
+			<!-- 鏂板鎵g綒绉嶇被銆� 鎵g綒閲戦锛屼笉鍚堟牸鍒ゅ畾绉嶇被-->
+			<!-- <view class="notice-num">	
+					<view class="num-text"
+					style="margin-left: 10rpx;">
+					<u--text text="鎵g綒绉嶇被"
+						size='32'></u--text>
+				</view>
+				<view class="num-radio"
+				v-if='roleType===4&&!flag'
+				>
+				<u-radio-group  size='34' v-model="item.penaltyType">
+				<u-radio  :label-size="32" :name="'0'"  :label="'鏃犳墸缃�'" :disabled="disabled">鏃犳墸缃�</u-radio>
+				<u-radio  :label-size="32"  :name="'鍏朵粬鎵g綒'"  :label="'鍏朵粬鎵g綒'" :disabled="disabled">鍏朵粬鎵g綒</u-radio>
+				</u-radio-group>
+				</view>
+				<view class="num-show"
+					v-else-if="flag">
+					{{item.penaltyType == '0' ? '鏃犳墸缃�' : '鍏朵粬鎵g綒'}}
+				</view>
+			</view> -->
+			<!-- 鍗曚环 -->
+			<view class="notice-num">	
+					<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.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 + '鍏�' : ''}}
+				</view>
+			</view>
+			<!-- 鎵g綒瀹瑰櫒 -->
+			<view class="kouFa-box">
+			<!-- 瓒呭昂鎵g綒閲戦 -->
+			<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=" 瓒呭昂鎵g綒"
+						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="鍘氬害鎵g綒"
+						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="鍏朵粬鎵g綒"
+						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="num-text"
+					style="margin-left: 10rpx;">
+					<u--text text="鎵g綒绫诲瀷"
+						size='32'></u--text>
+				</view>
+				<view class="num-radio"
+				v-if='roleType===4&&!flag'
+				@click.stop="onFoucus"
+				style="height: 50rpx;"
+				>
+				 <u-checkbox-group
+					placement="row"
+					size="32"
+					:value="this.penaltyType"
+					ref="checkbox"
+					@change="(event)=>checkboxChange(event,item)"
+				>
+				<u-checkbox  :label-size="25" :name="'1'"  :label="'瓒呭昂鎵g綒'"  :value="item.penaltyAmount"   :checked="item.penaltyAmount"  :disabled="disabled">瓒呭昂鎵g綒</u-checkbox>
+				<u-checkbox  :label-size="25" :name="'2'" :label="'鍘氬害鎵g綒'"  :value="item.thickPenaltyAmount"   :checked="item.thickPenaltyAmount" :disabled="disabled">鍘氬害鎵g綒</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="'鍏朵粬鎵g綒'" :value="item.qita"   :checked="item.qita" :disabled="disabled">鍏朵粬鎵g綒</u-checkbox>
+        </u-checkbox-group> 
+				</view>
+				<view class="num-show"
+					v-else-if="flag">
+					<view>
+						<text> {{item.penaltyType == 1 ? '瓒呭昂鎵g綒' : item.penaltyType == 2 ? '鍘氬害鎵g綒' :item.penaltyType == 3 ? '瀵嗛棴鍣�' : null }} </text>
+					</view>
+					
+				</view>
+			</view> -->
+			</view>
+			<u-empty v-if=" isYanz() && !isShow(item) " icon-size="200"  text="''" >
+				<text>鏆傛湭楠岃川</text>
+			</u-empty>
+			<u-empty v-if="!isYanz()" icon-size="200"  text="''" >
+				<text>鏆傛棤鏁版嵁</text>
+			</u-empty>
+			<view style="display: flex;margin-top: 20rpx;margin-left: 20rpx;"
+				v-if="item.isImage">
+				<view style="width: 100px;"
+					v-for="(val,index) in item.inspectionJpg"
+					:key="index">
+					<u--image :showLoading="true"
+						:src="`${BaseUrl}${val}`"
+						width="80px"
+						height="80px"
+						@click="imageClick(val)"
+						>
+						<view slot="error"
+							style="font-size: 24rpx;">鍔犺浇澶辫触</view>
+					</u--image>
+				</view>
+			</view>
+			<view v-else-if='!item.isImage&&!flag'
+				style="margin: 30rpx 80rpx;">
 				<u-upload :fileList="item.fileList"
 					deletable
 					@afterRead="afterRead"
@@ -129,7 +442,123 @@
 					height="150"
 					:previewFullImage="true">
 				</u-upload>
+						</view>
+			<u--list
+			:height="0"
+			style="	margin-left: 50rpx;margin-top: 30rpx;"
+			>
+				<u--list-item
+				
+				    v-for="(el,index) in unqualifiedArr(i) "
+				    style=" box-shadow: 0px 0 0 0px #ccc;"
+					:key="index"
+					:height="0"
+				>
+					<u-cell
+						:title="(index + 1) +  '.' + '涓嶅悎鏍煎搧绫�'"
+						style="text-indent: 30RPX;"
+						@click="editItem(i,index)"
+					>
+					<text slot="value" @click.stop="deleteItem(i,index)" style="color: red;">鍒犻櫎</text>
+				</u-cell>
+		
+			<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.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>
+			</view>
+			<view>
+				<view class="notice-num">
+				<view class="num-text">
+					<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="el.unqualifiedWeight"
+						readonly
+						@input='v=>unqualifiedWeightInputHandle(v,i,item.clean)'></u--input> -->
+						<view class="num-show"
+>					{{el.unqualifiedWeight ? el.unqualifiedWeight + '鍚�':   ''}}
+				</view>
+				</view>
+				<view class="num-show"
+					v-else-if="flag">
+					{{el.unqualifiedWeight ? el.unqualifiedWeight + '鍚�':   ''}}
+				</view>
+				
+			</view>
+			<!-- <view class="notice-num">
+				<view class="num-text">
+					<u--text text="涓嶅悎鏍煎搧鍒ゅ畾"
+						size='32'></u--text>
+				</view>
+				<view class="num-input"
+					v-if='roleType===4&&!flag'>
+						<view class="num-show">
+							{{selectlist.find(item=>item.value ==el.unqualifiedType ) ? selectlist.find(item=>item.value ==el.unqualifiedType ).name : ''  }}
+				</view>
+				</view>
+				<view class="num-show"
+					v-else-if="flag">
+					{{selectlist.find(item=>item.value ==el.unqualifiedType ) ? selectlist.find(item=>item.value ==el.unqualifiedType ).name : ''  }}
+				</view>
+				
+			</view> -->
+			<view class="notice-num">
+				<view class="num-text">
+					<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="el.unqualifiedWeight"
+						readonly
+						@input='v=>unqualifiedWeightInputHandle(v,i,item.clean)'></u--input> -->
+						<view class="num-show"
+>					{{el.penaltyUnitPrice ?  el.penaltyUnitPrice + '鍏�' : ''}}
+				</view>
+				</view>
+				<view class="num-show"
+					v-else-if="flag">
+					{{el.penaltyUnitPrice ?  el.penaltyUnitPrice + '鍏�' : ''}}
+				</view>
+				
+			</view>
+			
+			</view>
+			</u--list-item>
+		</u--list>
+		<!-- 澧炲姞涓嶅悎鏍艰鐭� -->
+
+		<button  class="addBtn" v-if="isShow(item) && isYanz()" type="primary"   :plain="false"  @click="addUnqualified(i)">涓嶅悎鏍煎垽瀹�</button>
 			<!-- 鐗╄祫鏄庣粏 -->
 			<u-action-sheet :actions="goodsList"
 				:show="goodsShow"
@@ -137,7 +566,7 @@
 				:closeOnClickOverlay='true'
 				@close='goodsNameClose'
 				@select="goodsselectClick"></u-action-sheet>
-			<!-- 浜у搧鍒楄〃 -->
+			<!-- 鍝佸悕涓庤鏍� -->
 			<view class="">
 				<u-action-sheet :actions="actionsList"
 					:show="actionShow"
@@ -146,7 +575,72 @@
 					@close='productNameClose'
 					@select="selectClick"></u-action-sheet>
 			</view>
+			<!-- 涓嶅悎鏍煎搧鍚� -->
+			<view class="">
+				<u-action-sheet :actions="actionsList"
+					:show="unqualifiedShow"
+					cancelText='鍙栨秷'
+					:closeOnClickOverlay='true'
+					@close='unqualifiedClose'
+					@select="selectUnqualifiedClick"></u-action-sheet>
+			</view>
 		</view>
+		<!-- 鍘熷彂鍑哄満鏃堕棿 -->
+		<view v-if="roleType!==4">
+			<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" >
+                        <view class="demo-layout bg-purple-light" style="display: flex;">
+							<text style="font-size: 32rpx;">楠岃川璇存槑锛�</text>
+							<view style="display: inline-block;"
+							v-if='roleType===4&&!flag'
+							>
+							<u--input placeholder="璇疯緭鍏ラ獙璐ㄨ鏄�"
+									border="bottom"
+									clearable
+									v-model="qualityInstructions"></u--input>
+							</view>
+							<view class="num-show"
+								v-else-if="flag">
+								{{ qualityInstructions }}
+							</view>
+						</view>
+                    </u-col> -->
+                </u-row>
+			</view>
+			<view style="padding: 10rpx;">
+				<u-row >
+                    <u-col span="24">
+                        <view class="demo-layout bg-purple-light" >
+							<text style="font-size: 32rpx;">楠岃川澶囨敞锛�</text>
+							<view style="width: 50%;"
+							v-if='roleType===4&&!flag'
+							>
+							<u-textarea border="surround" v-model="remarks" ref="textarea" placeholder="璇疯緭鍏ラ獙璐ㄥ娉�"></u-textarea>
+							</view>
+							<view class="num-show"
+								v-else-if="flag">
+							 {{ remarks }}
+							</view>
+						</view>
+                    </u-col>
+                </u-row>
+				</view>
+			</view>
 		<view class="confirm-button"
 			v-if='roleType===4&&!flag'>
 			<u-button type="primary"
@@ -155,19 +649,186 @@
 				@click="confirmInput"
 				:loading="loading"
 				loading-text="纭"></u-button>
+		</view></view>
+		</view>
+		
+		<!-- 鐗╂枡鏄庣粏 -->
+		<view v-if="!current">
+			<view class="main-block"
+			v-for="(item,i) in goodsList"
+			:key="item.id">
+			<view class="level">
+				<view style="width: 180rpx;">
+					<u--text text="鐗╄祫鍚嶇О"
+						size='32'></u--text>
+				</view>
+				<view class="tag-select"
+					>
+					<text class="num-text">
+						{{item.breed}}
+					</text>
+				</view>
+			</view>
+			<view class="level">
+				<view style="width: 180rpx;">
+					<u--text text="鏄庣粏缂栧彿"
+						size='32'></u--text>
+				</view>
+				<view class="tag-select">
+					<text>
+						{{item.itemId}}
+					</text>
+				</view>
+			</view>
+			<view class="level">
+				<view style="width: 180rpx;">
+					<u--text text="閫氱煡鏁伴噺"
+						size='32'></u--text>
+				</view>
+				<view class="tag-select">
+					<text>
+						{{item.num}}
+					</text>
+				</view>
+			</view>
+			<view class="level">
+				<view style="width: 180rpx;">
+					<u--text text="瑙勬牸"
+						size='32'></u--text>
+				</view>
+				<view class="tag-select">
+					<text>
+						{{item.spec}}
+					</text>
+				</view>
+			</view>
+			<view class="level">
+				<view style="width: 180rpx;">
+					<u--text text="閫氱煡閲嶉噺"
+						size='32'></u--text>
+				</view>
+				<view class="tag-select">
+					<text>
+						{{item.weight}}
+					</text>
+				</view>
+			</view>
+			<!-- 鐗╄祫鏄庣粏 -->
+			<u-action-sheet :actions="goodsList"
+				:show="goodsShow"
+				cancelText='鍙栨秷'
+				:closeOnClickOverlay='true'
+				@close='goodsNameClose'
+				@select="goodsselectClick"></u-action-sheet>
+			<!-- 鍝佸悕涓庤鏍� -->
+			<view class="">
+				<u-action-sheet :actions="actionsList"
+					:show="actionShow"
+					cancelText='鍙栨秷'
+					:closeOnClickOverlay='true'
+					@close='productNameClose'
+					@select="selectClick"></u-action-sheet>
+			</view>
+			<!-- 涓嶅悎鏍煎搧鍚� -->
+			<view class="">
+				<u-action-sheet :actions="actionsList"
+					:show="unqualifiedShow"
+					cancelText='鍙栨秷'
+					:closeOnClickOverlay='true'
+					@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:[
+				{
+                    name: '瓒呭昂鎵g綒',
+                    disabled: false,
+					value:'1',
+                },
+                {
+                    name: '鍘氬害鎵g綒',
+                    disabled: false,
+					value:'2',
+                },
+                {
+                    name: '瀵嗛棴鍣�',
+                    disabled: false,
+					value:'3',
+                }
+				],
+				selectlist:[
+					{
+						value: '1',
+						name:'瓒呭昂鎵g綒',
+						fontSize:'40'
+					},
+					{
+						value: '2',
+						name:'鍘氬害鎵g綒',
+						fontSize:'40'
+
+					},
+					{
+						value: '3',
+						name:'瀵嗛棴鍣�',
+						fontSize:'40'
+					}
+				],
 				orderPlanId: "",
+				title: '绱犺儦鍕惧嫆鍑洪潚鑺憋紝绗旈攱娴撹浆娣�',
+				isWeighingType:'',
+			subTitle: '2020-05-15',
+			thumb: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
 				coalDetailsData: {},
+				list: [
+					{
+						name: '鐗╄祫鏄庣粏'
+					}, 
+					{
+						name: '绉伴噸鏄庣粏'
+					}, 
+				],
+				current: 1,
 				showWeigh: [],
+
+                cityPickerValueDefault: [0, 0, 1],
+				form:{},
 				showWeighCopy: [],
 				discountrate: "",
 				loading: false,
@@ -190,41 +851,267 @@
 				isModify: false,
 				// 涓婁紶鍥剧墖
 				fileList1: [],
-
+				BaseUrl,
+				// 涓嶅悎鏍煎搧鍚�
+				unqualifiedShow: false,
+				unqualifiedIndex: null,
+				dataForm: {},
+				// // 鍒ゆ柇鏄慨鏀瑰搧鍚嶄笌瑙勬牸杩樻槸涓嶅悎鏍煎搧鍚�
+				ModifiedOrderIndex: null,
+				willProductName: true,
+				willUnqualified: true,
+				alterProductName: false,
+				alterUnqualified: false,
+				// 瀛樺偍涓棿鎬�
+				showWeighCopyStorge: [],
+				havedSubmit: false
 			};
 		},
 		computed: {
+			...mapState(["globalShowWeigh"]),
 			roleType() {
 				return uni.getStorageSync('roleType')
 			},
+			showWeighCopyStorgeOther() {
+				return uni.getStorageSync('showWeighCopyStorgeOther')
+			},
+			isShow(){
+				 //鏄惁鏄剧ず 鏄惁宸查獙璐�
+				return function(item){
+				return	 uni.getStorageSync('roleType')!== 4 && item.iszj == 1 ? true :  uni.getStorageSync('roleType')== 4 ? true : false;
+					 // 宸茬粡楠岃川
+				}
+			},
+			//鍒ゆ柇闇�涓嶉渶瑕侀獙璐�
+			isYanz(){
+				return function(item){
+				// return	  ( this.coalDetailsData.orderType !=='澶栬喘' ||   this.coalDetailsData.weighingType !=='鍥炵') ? false : true; 
+				if(this.coalDetailsData.orderType =='澶栬喘'){
+					if(this.coalDetailsData.weighingType == '鍥炵'){
+						return true
+					}else{
+						return false
+					}
+				}else if(this.coalDetailsData.orderType =='澶栭攢'){
+					return false;
+
+				}
+					 // 宸茬粡楠岃川
+				}
+			},
+			//璁$畻涓嶅悎鏍艰鏍兼暟缁�
+			unqualifiedArr(){
+				return function(index){
+					let arr = [];
+					let temp = [];
+					let noPin = [];
+					let noPrice = [];
+					const item = this.globalShowWeigh[index];
+					if(item){
+					if(item.unqualifiedBreed){
+						arr = item.unqualifiedBreed.split(",");
+						if(item.unqualifiedWeights){
+							temp = item.unqualifiedWeights.toString().split(',');
+						}
+						if(item.unqualifiedType){
+							noPin = item.unqualifiedType.toString().split(',');
+
+						}
+						if(item.penaltyUnitPrice){
+							noPrice = item.penaltyUnitPrice.toString().split(',')
+						}
+						//  if(item.penaltyType){
+						// 	noPin = item.penaltyType.toString().split(',');
+						// }
+					  
+						 let result =  arr.length && arr.map((el,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')
+					   return result;
+						
+					}else{
+						return []
+					}
+					}
+					
+
+				}
+			},
+			cleanWeight(){
+				return function(item){
+					// 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.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);
+				}
+			}
+			
+
+
+		},
+		mounted() {
+			this.roleType === 1 ? this.GetOrderPlan() : this.getTakeCoal();
+			
 		},
 		onLoad(params) {
+			console.log(params,this.showWeighCopyStorge,this.globalShowWeigh,'params璺敱')
 			this.orderPlanId = params.orderPlanId ? params.orderPlanId : '';
 			this.flag = params.flag ? params.flag : false;
-			this.roleType === 1 ? this.GetOrderPlan() : this.getTakeCoal()
-			this.getJcProductList()
+			this.ModifiedOrderIndex = params.index
+			this.alterProductName = params.productName === "true" || false
+			this.alterUnqualified = params.unqualified === "true" || false
+			this.havedSubmit = params.havedSubmit === "true" || false;
+			console.log(this.havedSubmit,'this.havedSubmit')
+			uni.$on("handClick", res => {
+				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;
+				}
+			
+				
+			})
+		},
+		onShow(){
+			this.numAll(this.globalShowWeigh[this.indexFlag].unqualifiedWeights.split(","),this.indexFlag,this.showWeigh[this.indexFlag].clean)
+
 		},
 		methods: {
+			...mapMutations(['changeglobalShowWeigh']),
+			numAll(value, index, clean){
+				console.log(value,'valusess')
+				// 璁$畻鎵f福鍑�閲�
+				// 鍒ゆ柇鏄笉鏄湁鍑�閲嶆墠杩涜璁$畻
+				let x = new BigNumber(clean - 0)
+				// 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);
+				
+				// }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(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() {
 				uni.showLoading({
 					title: '鍔犺浇涓�'
 				});
 				this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
 					if (res.code == 0) {
+						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
 							.tmTaskCoalItems : [];
-						this.showWeigh = this.showWeigh.map(v => {
+						this.showWeigh = this.showWeigh.map((v,i) => {
+							if(!v.tempArr){
+								v.tempArr = ''
+							}else{
+								v.tempArr = JSON.parse(v.tempArr)
+							}
 							return {
 								...v,
 								modifyProductName: '',
 								modifygoodsName: '',
-								fileList: []
+								fileList: [],
+								inspectionJpg: v.inspectionJpg.split(','),
+								isImage: v.inspectionJpg,
+								unqualifiedType:v.penaltyType,
+								tempArr:v.tempArr
 							}
 						})
 						this.showWeighCopy = JSON.parse(JSON.stringify(this.showWeigh))
-						uni.hideLoading()
+						uni.setStorageSync("showWeighCopyStorge", this.showWeighCopy)
+						uni.setStorageSync('showWeighCopyStorgeOther',this.showWeighCopy)
+						// if (this.havedSubmit) {
+						// 	this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorge'))
+						// 	this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorgeOther'))
+						// } else {
+						// 	this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorgeOther'))
+						// 	this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorge'))
+						// }
+						this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorge'))
+						 	this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorgeOther'))
+						//绉伴噸鏄庣粏鏃犳暟鎹椂鏄剧ず鐗╄祫鏄庣粏
+						if(!this.coalDetailsData.tmTaskCoalItems.length){
+							this.current = 0; 
+						}
+						this.isWeighingType = res.data.weighingType //褰撳墠纾呭崟鏄惁鍥炵
 					} else {
 						this.$u.toast('鍔犺浇澶辫触')
 						uni.hideLoading()
@@ -234,12 +1121,19 @@
 						this.goodsList = r.data.map(v => {
 							return {
 								...v,
-								name: v.breed + v.spec
+								name: v.breed + '/' + v.spec
 							}
 						})
 						uni.hideLoading()
 					})
 				})
+			},
+			previewImageClose() {
+				this.previewImageShow = false;
+			},
+			previewImageOpen() {
+				this.previewImageShow = true;
+				console.log('preview open');
 			},
 			GetOrderPlan() {
 				uni.showLoading({ title: '鍔犺浇涓�...' });
@@ -268,19 +1162,52 @@
 					}
 				})
 			},
-			// 杈撳叆鎶樻墸鐜囧悗鐐瑰嚮纭
+			imageClick(imgStr){
+				console.log(imgStr,'瑙﹀彂')
+					this.previewImageSrc = imgStr;
+				
+				this.$nextTick(() => {
+					this.previewImageShow = true;
+				});
+				
+
+			},
+			// 鐐瑰嚮纭
 			confirmInput() {
-				this.loading = true
+				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(this.globalShowWeigh[i].unqualifiedWeights){
+					unqualifiedWeightAll = this.globalShowWeigh[i].unqualifiedWeights.split(",").reduce((p,n)=>{return (p - 0) + (n - 0)},0).toFixed(2)  || ''
+					}else{
+						unqualifiedWeightAll = 0;
+					}
 					return {
 						...v,
-						breed: this.showWeighCopy[i].modifyProductName ? this.showWeighCopy[i].breed : v.breed,
-						spec: this.showWeighCopy[i].modifyProductName ? this.showWeighCopy[i].spec : v.spec,
-						inspectionJpg: v.fileList.join(',')
-
+						unqualifiedBreed: this.globalShowWeigh[i].unqualifiedBreed ,
+						breed: this.globalShowWeigh[i].modifyProductName ? this.globalShowWeigh[i].breed : v.breed,
+						spec: this.globalShowWeigh[i].modifyProductName ? this.globalShowWeigh[i].spec : v.spec,
+						inspectionJpg: v.fileList.map(v => v.url.replace(BaseUrl, '')).join(','),
+						unqualifiedWeights :this.globalShowWeigh[i].unqualifiedWeights ? this.globalShowWeigh[i].unqualifiedWeights : 0,
+						unqualifiedWeight :unqualifiedWeightAll ,
+						tempArr:this.globalShowWeigh[i].tempArr ? JSON.stringify(this.globalShowWeigh[i].tempArr) : '',
+						penaltyUnitPrice:this.globalShowWeigh[i].penaltyUnitPrice,
+						
 					}
-				})
-				this.$reqPost('updateTmTaskCoalItem', this.showWeigh, 'json').then(
+				});
+				// if(flag){
+				this.loading = true;
+				params.tmTaskCoalItems = this.showWeigh;
+				console.log(params,'params')
+			
+				this.$reqPost('updateTmTaskCoalItem', params, 'json').then(
 					res => {
 						if (res.code == 0) {
 							this.loading = false
@@ -292,20 +1219,43 @@
 							}, 800)
 						} else {
 							this.loading = false
-							this.$u.toast('鎿嶄綔澶辫触')
+							this.$u.toast(res.msg ? res.msg : '鎿嶄綔澶辫触')
 						}
 					})
+				// }else{
+				// 	this.$u.toast('璇疯緭鍏ュ崟浠�')
+				// 	return 
+				// }
+				
+			},
+			// 鏍¢獙鏁版嵁鏄惁鍚堟牸 
+			checkValue(data,target){
+				if(!data.length){
+					return
+				}
+				let flag = data.find(item=>item[target] <=0);
+				console.log(flag,'flag');
+			    if(flag){
+					return false 
+				}else{
+					return true;
+				}
+
 			},
 			// 鐗╄祫鏄庣粏
 			goodsPopoverShow(index) {
-				this.goodsShow = true
-				this.goodsIndex = index
+				if (this.roleType === 4 && !this.flag) {
+					this.goodsShow = true
+					this.goodsIndex = index
+				}
+
 			},
 			goodsNameClose() {
 				this.goodsShow = false
 			},
 			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
@@ -313,12 +1263,16 @@
 				this.showWeigh[this.goodsIndex].breed = val.breed
 				this.showWeigh[this.goodsIndex].spec = val.spec
 				this.showWeigh[this.goodsIndex].weightUnit = val.weightUnit
+				this.showWeigh[this.goodsIndex].weight1 = val.weight;
 			},
-			// 浜у搧鍒楄〃
+			// 鍝佸悕涓庤鏍�
 			productNamePopoverShow(index) {
 				if (this.roleType === 4 && !this.flag) {
-					this.actionShow = true
-					this.actionIndex = index
+					// this.actionShow = true
+					// this.actionIndex = index
+					uni.navigateTo({
+						url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${index}&takeCoalId=${this.orderPlanId}&productName=${this.willProductName}&pageFlag=${false}&actionObj=${ JSON.stringify(this.showWeigh[index])}`
+					})
 				}
 			},
 			productNameClose() {
@@ -331,13 +1285,86 @@
 			},
 			// 鎶樻墸鐜囪緭鍏�
 			discountInputHandle(value, index, clean) {
-				this.showWeigh[index].cinderWeight = Number(value)
-				this.showWeigh[index].weight = (clean - (Number(value)).toFixed(2));
+				let znums;
+				if(this.globalShowWeigh[index].unqualifiedWeights){
+					znums = this.globalShowWeigh[index].unqualifiedWeights.split(',')
+				}else{
+					znums = []
+				}
+				console.log('璁$畻鍑�閲�',value, index, clean)
+				this.indexFlag  = index; // 璁板綍鏍囪瘑浣�
+				if (
+					value &&
+					value.indexOf(".") < 0 &&
+					value != ""
+			) {
+				value = parseFloat(value);
+				value = value + ""; // 鍙樺洖涓哄瓧绗︿覆
+			}else{
+				value =  value.replace(/^(-)*(\d+)\.(\d\d).*$/,"$1$2.$3");
+				this.$nextTick(()=>{
+					this.showWeigh[index].cinderWeight  = value.replace(/[^\d.]/g, "");
+				});
+			} // 濡傛灉娌℃湁灏忔暟鐐癸紝棣栦綅涓嶈兘涓虹被浼间簬 01銆�02鐨勫��
+			
+				// 濡傛灉娌℃湁鍑�閲� 锛屽垯涓嶈繘琛岃绠�
+				if(clean){
+					this.showWeigh[index].cinderWeight = (value - 0)
+					let x = new BigNumber(clean - 0)
+					let y = new BigNumber(value - 0)
+					let z =  new BigNumber(znums.reduce((p,n)=>{
+						return (p - 0) + (n - 0)
+					},0))
+					console.log(clean,value,'鎵f福');
+					if(x.minus(y).toFixed(2) <= 0){
+						this.showWeigh[index].weight = '0';
+						this.$u.toast('褰撳墠鍑�閲嶄笉鍚堟牸锛岃妫�鏌ョ毊閲嶏紝姣涢噸鏄惁鍑嗙‘')
+					}else{
+						console.log(znums.length)
+					    this.showWeigh[index].weight = x.minus(y);
+					}
+				}else{
+					this.$u.toast('褰撳墠鏃犲噣閲�')
+				}
+				
+				
+				
+			},
+			// 閫夋嫨涓嶅悎鏍煎搧鍚�
+			selectunqualifiedBreed(index) {
+				if (this.roleType === 4 && !this.flag) {
+					// this.unqualifiedShow = true
+					// this.unqualifiedIndex = index
+					uni.navigateTo({
+						url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${index}&takeCoalId=${this.orderPlanId}&unqualified=${this.willUnqualified}&type=edit`
+					})
+				}
+			},
+			unqualifiedClose() {
+				this.unqualifiedShow = false
+			},
+			selectUnqualifiedClick(val) {
+				this.showWeigh[this.unqualifiedIndex].unqualifiedBreed = val.secondCategoryName + val.spec
+			},
+			// 涓嶅悎鏍奸噸閲忚緭鍏�
+			unqualifiedWeightInputHandle(value, index, clean) {
+				// 鍒ゆ柇鏄笉鏄湁鍑�閲嶆墠杩涜璁$畻
+				let x = new BigNumber(clean - 0)
+				this.indexFlag  = index; // 璁板綍鏍囪瘑浣�
+				let y = new BigNumber(value - 0)
+				let z = new BigNumber(this.showWeigh[index].cinderWeight -  0);
+				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) ;
+					}
+				
+			
 			},
 			// 鍒犻櫎鍥剧墖
 			deletePic(event) {
 				this.showWeigh[event.name].fileList.splice(event.index, 1);
-				// this[`fileList${event.name}`].splice(event.index, 1);
 			},
 			// 鏂板鍥剧墖
 			async afterRead(event) {
@@ -374,12 +1401,139 @@
 						name: 'file',
 						formData: {},
 						success: res => {
-							this.showWeigh[num].fileList.push(JSON.parse(res.data).data.url)
 							resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
 						}
 					});
 				});
 			},
+			//鐐瑰嚮tab 鍒囨崲灞曠ず鏄庣粏
+			tabChange(val){
+				this.current = val;
+			},
+			//涓嬫媺妗嗚仛鐒︽椂闂�
+			onFoucus(val){
+				this.focusSelect = true;
+
+			},
+			closeEvent(){
+				this.focusSelect = false;
+			},
+			//澧炲姞涓嶅悎鏍艰鐭�
+			addUnqualified(i){
+				if (this.roleType === 4 && !this.flag) {
+					// this.unqualifiedShow = true
+					// this.unqualifiedIndex = index
+					this.indexFlag  = i; // 璁板綍鏍囪瘑浣�
+					uni.navigateTo({
+						url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${i}&takeCoalId=${this.orderPlanId}&unqualified=${this.willUnqualified}&type=add`
+					})
+					console.log(this.globalShowWeigh[i],'2222')
+					// this.numAll(this.globalShowWeigh[i].unqualifiedWeights.split(","),i,this.showWeigh[i].clean)
+				}
+			},
+			deleteItem(i,index){
+			  let {unqualifiedBreed,unqualifiedWeights,unqualifiedType,penaltyUnitPrice} =  this.globalShowWeigh[i];
+			  this.indexFlag  = i; // 璁板綍鏍囪瘑浣�
+			  console.log(this.globalShowWeigh[i],'index')
+			  if (this.roleType === 4 && !this.flag) {
+				if( unqualifiedBreed !== void 0 && unqualifiedWeights!== void 0 ){
+				if(unqualifiedBreed.split(',').length > 1){
+					// unqualifiedBreed = unqualifiedBreed.split(',').splice(index ,1).join(",")
+					let strArr = unqualifiedBreed.split(',');
+					strArr.splice(index ,1)
+					unqualifiedBreed = strArr.join(",")
+				}else{
+					unqualifiedBreed = '';
+				}
+
+				if(unqualifiedWeights.split(',').length > 1){
+					// unqualifiedWeights = unqualifiedWeights.split(',').splice(index,1).join(",")
+					let strArr = unqualifiedWeights.split(',');
+					 strArr.splice(index ,1)
+					unqualifiedWeights = strArr.join(",")
+				}else{
+					unqualifiedWeights = '';
+				}
+
+				// if(unqualifiedType.split(",").length > 1){
+				// 	let strArr = unqualifiedType.split(',');
+				// 	 strArr.splice(index ,1)
+				// 	 unqualifiedType = strArr.join(",")
+				// }else{
+				// 	unqualifiedType = '';
+				// }
+				if(penaltyUnitPrice.split(",").length > 1){
+					let strArr = penaltyUnitPrice.split(',');
+					 strArr.splice(index ,1)
+					 penaltyUnitPrice = strArr.join(",")
+				}else{
+					penaltyUnitPrice = '';
+				}
+				 this.globalShowWeigh[i].unqualifiedBreed = unqualifiedBreed;
+				 this.globalShowWeigh[i].unqualifiedWeights = unqualifiedWeights;
+				//  this.globalShowWeigh[i].unqualifiedType = unqualifiedType; 
+				 this.globalShowWeigh[i].penaltyUnitPrice = penaltyUnitPrice;
+				 this.globalShowWeigh[i].tempArr.splice(index,1)
+				 console.log(this.globalShowWeigh[i].unqualifiedBreed,'unqualifiedBreed')
+				 this.changeglobalShowWeigh(this.globalShowWeigh)
+
+				 }
+				 this.numAll(this.globalShowWeigh[this.indexFlag].unqualifiedWeights.split(","),this.indexFlag,this.showWeigh[this.indexFlag].clean)
+				 console.log(this.globalShowWeigh[i],'deleteItem');
+			  }
+			 
+			},
+			editItem(i,index){
+				this.indexFlag  = i; // 璁板綍鏍囪瘑浣�
+				if (this.roleType === 4 && !this.flag) {
+					// this.unqualifiedShow = true
+					// this.unqualifiedIndex = index
+					uni.navigateTo({
+						url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${i}&takeCoalId=${this.orderPlanId}&unqualified=${this.willUnqualified}&type=edit&indexTo=${index}`
+					})
+				}
+			},
+			amountChange(value,event){
+			
+				// //瓒呭昂鎵g綒
+				// 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');
+				
+				
+			}
 		},
 	}
 </script>
@@ -391,9 +1545,27 @@
 		justify-content: space-between;
 		align-items: center;
 	}
+	.weigh-qualified{
+		display: flex;
+		width: 340rpx;
+		flex-direction: row;
+		height:auto;
+
+	}
+	.weight-box{
+		display: flex;
+		margin-bottom: 20rpx;
+		flex-direction: column;
+		overflow-y: scroll;
+	}
 
 	/deep/ .u-picker {
 		height: 600rpx;
+	}
+	.addBtn{
+		width: 65%;
+		font-size: 26rpx;
+		background-color: #3c9cff;;
 	}
 
 	.main {
@@ -492,15 +1664,49 @@
 				.num-input {
 					width: 60%;
 					border-bottom: 1px solid rgb(218, 219, 222);
+					position: relative;
+				}
+				.num-radio{
+					width: 100%;
+					font-size: 100rpx;
+				}
+
+				.num-show {
+					width: 60%;
+					color: #303030
 				}
 			}
 
+			.unqualifiedBreed {
+				@extend .level;
+			}
+
 			.level {
-				width: 60%;
-				margin-top: 30rpx;
-				margin-left: 80rpx;
+				width: 89%;
+				margin: 30rpx 80rpx;
 				display: flex;
-				justify-content: space-between;
+				justify-content: flex-start;
+
+				.tag-select {
+					flex: 1;
+					margin-left: 14rpx;
+					text-align: center;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					border: 1rpx solid rgb(60, 156, 255);
+					padding: 8rpx 14rpx;
+					color: rgb(60, 156, 255);
+					font-size: 26rpx;
+
+					.tag-select_text {
+						// width: vww(180);
+						// border: 1rpx solid rgb(60, 156, 255);
+						// padding: 8rpx 14rpx;
+						// color: rgb(60, 156, 255);
+						// font-size: 26rpx;
+					}
+				}
 			}
 
 			.select-button {
@@ -526,4 +1732,38 @@
 			margin-bottom: 40rpx;
 		}
 	}
+	.tabs{
+		font-size: 20rpx!important;
+	}
+	.u-card-wrap { 
+		background-color: $u-bg-color;
+		padding: 1px;
+	}
+	
+	.u-body-item {
+		font-size: 32rpx;
+		color: #333;
+		padding: 20rpx 10rpx;
+	}
+		
+	.u-body-item image {
+		width: 120rpx;
+		flex: 0 0 120rpx;
+		height: 120rpx;
+		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>
\ No newline at end of file

--
Gitblit v1.9.1