From 544726324d346bae92c71f4461afe6a806ca1d90 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期五, 22 十二月 2023 18:49:11 +0800
Subject: [PATCH] 不合格重量改罚款

---
 pages/public-page/selectSpecifications/selectSpecifications.vue |   60 +++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 47 insertions(+), 13 deletions(-)

diff --git a/pages/public-page/selectSpecifications/selectSpecifications.vue b/pages/public-page/selectSpecifications/selectSpecifications.vue
index c455da2..5b2330a 100644
--- a/pages/public-page/selectSpecifications/selectSpecifications.vue
+++ b/pages/public-page/selectSpecifications/selectSpecifications.vue
@@ -1,7 +1,7 @@
 <template>
 	<view class="main">
 		<u--form labelPosition="top"
-			labelWidth="25%"
+			labelWidth="30%"
 			:borderBottom="false"
 			:rules="rules"
 			:errorType="'border-bottom'" 
@@ -45,15 +45,22 @@
 					@input="$u.debounce(specInputHandle, 500)"></u-input>
 			</u-form-item>
 			<!-- 鏂板涓嶅悎鏍肩О閲� -->
-			<u-form-item label="涓嶅悎鏍奸噸閲�"
+			<u-form-item label="涓嶅悎鏍肩綒娆�"
 				prop="unqualifiedWeight"
 				borderBottom>
 				<u-input v-model="dataForm.unqualifiedWeight"
-					placeholder="璇疯緭绉伴噸"
+					placeholder="璇疯緭缃氭"
 					type="digit"
 					border="bottom"
 					@change="v=>checkNum(v)"
 					@input="$u.debounce(specInputHandle, 500)"></u-input>
+			</u-form-item>
+			<u-form-item label="涓嶅悎鏍煎垽瀹�" prop="unqualifiedType">
+				<u-radio-group  size='32' v-model="dataForm.unqualifiedType">
+				<u-radio  :label-size="25" :name="'1'"  :label="'瓒呭昂鎵g綒'" :disabled="disabled">闀垮害鎵g綒</u-radio>
+				<u-radio  :label-size="25" :name="'2'" :label="'鍘氬害鎵g綒'" :disabled="disabled">鍘氬害鎵g綒</u-radio>
+				<u-radio  :label-size="25" :name="'3'" :label="'瀵嗛棴鍣�'" :disabled="disabled">瀵嗛棴鍣�</u-radio>
+				</u-radio-group>
 			</u-form-item>
 		</u--form>
 		<Transition name="slide-fade">
@@ -102,6 +109,7 @@
 					secondClass: "",
 					specifications: "",
 					unqualifiedWeight:'',
+					unqualifiedType:''
 				},
 				index: '',
 				takeCoalId: "",
@@ -142,6 +150,11 @@
 					message: '璇烽�夋嫨鍊�',
 					trigger: ['blur', 'change']
 				},
+				'unqualifiedType':{
+					required: true,
+					message: '璇烽�夋嫨鍊�',
+					trigger: ['blur', 'change']
+				}
 			},
 				// 
 				showWeighCopyStorge: []
@@ -161,7 +174,7 @@
 			this.params = params;
 			this.productName = params.productName === "true" || false
 			this.unqualified = params.unqualified === "true" || false
-			this.showWeighCopyStorge = JSON.parse(JSON.stringify(uni.getStorageSync('showWeighCopyStorge')))
+			this.showWeighCopyStorge = JSON.parse(JSON.stringify(uni.getStorageSync('showWeighCopyStorgeOther')))
 			console.log(params,'paramsparamsparams');
 			if(params.type == 'edit'){
 				this.init(params)
@@ -190,10 +203,13 @@
 				})
 			},
 			init(params){
-			 let arr =  this.globalShowWeigh[params.index];
+			 let arr =  this.showWeighCopyStorge[params.index];
+			 console.log(this.showWeighCopyStorge,'arr')
 			 let {firstClass,secondClass,specifications} = arr.tempArr[params.indexTo];
 			 Object.assign(this.dataForm,{firstClass,secondClass,specifications});
-			 this.dataForm.unqualifiedWeight = this.globalShowWeigh[params.index].unqualifiedWeights.split(',')[params.indexTo]
+			 this.dataForm.unqualifiedWeight = this.showWeighCopyStorge[params.index].unqualifiedWeights.split(',')[params.indexTo];
+			 //涓嶅悎鏍肩被鍒ゅ畾
+			 this.dataForm.unqualifiedType = this.showWeighCopyStorge[params.index].unqualifiedType.split(',')[params.indexTo];
 			},
 			//涓�绾у搧绫昏彍鍗�
 			firstClassSelect() {
@@ -262,7 +278,9 @@
 				console.log(this.globalShowWeigh,	this.$refs.uForm,'this.globalShowWeigh');
 				this.$refs.uForm.validate().then(res => {
 						// uni.$u.toast('鏍¢獙閫氳繃')
+					
 						this.showWeighCopyStorge = this.globalShowWeigh;
+						console.log(this.showWeighCopyStorge,this.index,'this.showWeighCopyStorge[this.index]');
 				if(this.params.type == 'edit'){
 					if (this.productName) {
 					this.showWeighCopyStorge[this.index].modifyProductName = this.dataForm.secondClass + '/' + this
@@ -275,19 +293,26 @@
 						.specifications;
 				 	let tempArr = 	this.showWeighCopyStorge[this.index].unqualifiedBreed.split(",")
 					 let tempWeightArr = 	this.showWeighCopyStorge[this.index].unqualifiedWeights.split(",")
+					 let noPinArr =this.showWeighCopyStorge[this.index].unqualifiedType.split(",")
 				    tempArr[this.params.indexTo] = str;
 					tempWeightArr[this.params.indexTo] = this.dataForm.unqualifiedWeight;
+					noPinArr[this.params.indexTo] = this.dataForm.unqualifiedType;
 					this.showWeighCopyStorge[this.index].unqualifiedBreed = tempArr.join(',');
 					this.showWeighCopyStorge[this.index].unqualifiedWeights = tempWeightArr.join(',');
+					this.showWeighCopyStorge[this.index].unqualifiedType = noPinArr.join(',');
 					this.showWeighCopyStorge[this.index].breed = this.dataForm.secondClass
 					this.showWeighCopyStorge[this.index].spec = this.dataForm.specifications
-
+					//濡傛灉杩欎釜  tempArr涓嶄负 绌�
+					if(this.showWeighCopyStorge[this.index].tempArr){
 					this.showWeighCopyStorge[this.index].tempArr[this.params.indexTo].firstClass = this.dataForm.firstClass;
 					this.showWeighCopyStorge[this.index].tempArr[this.params.indexTo].secondClass = this.dataForm.secondClass;
 					this.showWeighCopyStorge[this.index].tempArr[this.params.indexTo].specifications = this.dataForm.specifications;
+					}else{
+
+						
+					}
+					
 				}
-
-
 				}else{
 					if (this.productName) {
 					this.showWeighCopyStorge[this.index].modifyProductName = this.dataForm.secondClass + '/' + this
@@ -311,19 +336,27 @@
 					}else{
 						tempWeightArr =  [];
 					}
+					// 娣诲姞涓嶅悎鏍煎搧绫诲垽瀹�
+				    let noPin;
+					if(this.showWeighCopyStorge[this.index].unqualifiedType){
+						noPin = this.showWeighCopyStorge[this.index].unqualifiedType.split(",").filter(Boolean)
+					}else{
+						noPin = []
+					}
 					
 					tempWeightArr.push(this.dataForm.unqualifiedWeight);
 					tempArr.push(str);
+					noPin.push(this.dataForm.unqualifiedType)
 					this.showWeighCopyStorge[this.index].unqualifiedBreed = tempArr.join(',')
 					this.showWeighCopyStorge[this.index].unqualifiedWeights = tempWeightArr.join(',')
-					
+					this.showWeighCopyStorge[this.index].unqualifiedType = noPin.join(',') 
 					this.showWeighCopyStorge[this.index].breed = this.dataForm.secondClass
 					this.showWeighCopyStorge[this.index].spec = this.dataForm.specifications
 
 
-					// this.showWeighCopyStorge[this.index].firstClass = this.dataForm.firstClass;
-				    // this.showWeighCopyStorge[this.index].secondClass = this.dataForm.secondClass;
-				    // this.showWeighCopyStorge[this.index].specifications = this.dataForm.specifications;
+					this.showWeighCopyStorge[this.index].firstClass = this.dataForm.firstClass;
+				    this.showWeighCopyStorge[this.index].secondClass = this.dataForm.secondClass;
+				    this.showWeighCopyStorge[this.index].specifications = this.dataForm.specifications;
 
 					if(!this.showWeighCopyStorge[this.index].tempArr){
 						this.showWeighCopyStorge[this.index].tempArr = [];
@@ -346,6 +379,7 @@
 				uni.navigateBack({
 					url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?dataForm=${JSON.stringify(this.dataForm)}&orderPlanId=${this.takeCoalId}&index=${this.index}&havedSubmit=${true}`
 				})
+				uni.$emit("handClick",{data:this.dataForm,tempArr:this.showWeighCopyStorge[this.index].tempArr,index:this.index});
 					}).catch(errors => {
 						console.log(errors,'errors')
 						uni.$u.toast('鏍¢獙澶辫触')

--
Gitblit v1.9.1