From 2c4d645aa617a737d636964a7a52a1602e717e30 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期六, 09 九月 2023 10:51:10 +0800
Subject: [PATCH] 	modified:   src/views/experiment/inspectionApplication/index.vue

---
 src/views/experiment/inspectionApplication/index.vue |   56 ++++++++++++++++++++++++--------------------------------
 1 files changed, 24 insertions(+), 32 deletions(-)

diff --git a/src/views/experiment/inspectionApplication/index.vue b/src/views/experiment/inspectionApplication/index.vue
index c977d79..1c91d27 100644
--- a/src/views/experiment/inspectionApplication/index.vue
+++ b/src/views/experiment/inspectionApplication/index.vue
@@ -167,7 +167,7 @@
 								<el-row :gutter="100">
 									<el-col :span="10">
 										<el-form-item label="濮旀墭缂栧彿">
-											<el-input style="width: 300px" type="text" disabled :value="commisionSelection.entrust_coding"
+											<el-input style="width: 300px" type="text" disabled :value="commisionSelection.entrustCoding"
 												placeholder="璇疯緭鍏ユ潵鏂欐棩鏈�" autocomplete="off" />
 										</el-form-item>
 									</el-col>
@@ -196,20 +196,20 @@
 									<el-col :span="10">
 										<el-form-item label="瑙勬牸鍨嬪彿锛�">
 											<el-input style="width: 300px" type="text" disabled :value="commisionSelection.specifications"
-												placeholder="璇疯緭鍏ュ瀷鍙疯鏍�" autocomplete="off" />
+												placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�" autocomplete="off" />
 										</el-form-item>
 									</el-col>
 									<el-col :span="10">
 										<el-form-item label="閫佽揪鏃堕棿">
-											<el-input style="width: 300px" type="text" disabled :value="commisionSelection.supplier"
-												placeholder="璇疯緭鍏ュ崟浣�" autocomplete="off" />
+											<el-input style="width: 300px" type="text" disabled :value="commisionSelection.formTime"
+												placeholder="璇疯緭鍏ラ�佽揪鏃堕棿" autocomplete="off" />
 										</el-form-item>
 									</el-col>
 								</el-row>
 								<el-row :gutter="100">
 									<el-col :span="10">
 										<el-form-item label="瀹屾垚鏈熼檺">
-											<el-input style="width: 300px" type="text" disabled :value="commisionSelection.completionDeadline"
+											<el-input style="width: 300px" type="text" disabled :value="commisionSelection.endTime"
 												placeholder="璇疯緭鍏ュ畬鎴愭湡闄�" autocomplete="off" />
 										</el-form-item>
 									</el-col>
@@ -245,7 +245,7 @@
 									<el-col :span="10">
 										<el-form-item label="瑙勬牸鍨嬪彿锛�">
 												<el-cascader style="width: 300px" v-model="finishedTable.modelandspecification" 
-												:options="specificationList" :show-all-levels="false" @change="changeSpe"
+												:options="specificationList" @change="changeSpe"
 												:props="{label:'name',value:'id',children:'children'}"></el-cascader>
 										</el-form-item>
 									</el-col>
@@ -363,11 +363,6 @@
 								</div>
 							</template>
 						</el-table-column>
-						<el-table-column label="鎿嶄綔" min-width="8%">
-							<template slot-scope="scope">
-								<el-button type="text" size="small">鍒犻櫎</el-button>
-							</template>
-						</el-table-column>
 					</el-table>
 					<span slot="footer" class="dialog-footer">
 						<el-button @click="commisionVisible = false">鍙� 娑�</el-button>
@@ -422,7 +417,7 @@
 				selectedValue: null,
 				infoForm: {},
 				commisionSelection: {
-					entrust_coding: '',
+					entrustCoding: '',
 					entrusted: '',
 					samples_number: '',
 					sample_name: '',
@@ -492,7 +487,7 @@
 					};
 					this.infoForm = {};
 					this.commisionSelection = {
-						entrust_coding: '',
+						entrustCoding: '',
 						entrusted: '',
 						samples_number: '',
 						sample_name: '',
@@ -513,15 +508,18 @@
 		},
 		methods: {
 			changeSpe(val){
+				console.log(val);
 				this.tmp.specificationsId = val[val.length-1];
-				let arr1 = this.specificationList[0].children.filter(item=>{
-					return item.id==val[1]
+				let arr1 = this.specificationList.filter(item=>{
+					return item.id==val[0]
 				});
 				let arr2 = arr1[0].children.filter(item=>{
-					return item.id = val[2]
+					return item.id = val[1]
 				})
 				let speName = arr1[0].name + "-" + arr2[0].name;
 				this.speName = speName;
+				console.log(arr1);
+				console.log(arr2);
 
 			},
 			getSpecifications(val){
@@ -537,7 +535,7 @@
 			},
 			async selectSpecificationByMaterielId(mId){
 				await getSpecificationByMaterielId({id : mId}).then(res=>{
-					this.specificationList = new Array(res.data);
+					this.specificationList = res.data.children;
 				}).catch(error => {
 					this.$message.error(error.message);
 				});
@@ -664,7 +662,7 @@
 						})
 					}
 				}
-				this.total = this.inspectionTable.length
+				this.total = this.res.data.total;
 			},
 			reset() {
 				this.countSize = 1;
@@ -686,11 +684,11 @@
 			},
 			handleCommisionSelection() {
 				this.commisionSelection = this.tmp
+				this.commisionSelection.checkdate = []
 				this.commisionVisible = false
 			},
 			handleRawMaterialSelection() {
 				this.infoForm = this.tmp
-				console.log(this.infoForm);
 				this.rawmaterialVisible = false
 			},
 			handleRadioChange() {
@@ -725,6 +723,7 @@
 								checkdate.push(item['updateTime'])
 								item['checkdate'] = checkdate // 妫�楠屾棩鏈�
 							})
+							
 							this.commisionTable = res.data
 						})
 					}
@@ -733,6 +732,7 @@
 			// 鏂板妫�楠�
 			async addInspection() {
 				let obj = {};
+				//鍘熸潗鏂�
 				if (this.type === 0) {
 					obj = {
 						endTime: this.infoForm.checkdate[1],
@@ -749,6 +749,7 @@
 						version: this.version
 					}
 				}
+				//濮旀墭
 				if (this.type === 2) {
 					obj = {
 						endTime: this.commisionSelection.checkdate[1],
@@ -765,14 +766,17 @@
 						version: this.version
 					}
 				}
+				//鎴愬搧
 				if (this.type === 1) {
 					obj = {
+						supplier:"supplier",
+						formTime: "2023-09-09",
 						endTime: this.finishedTable.checkdate[1],
 						mcode: this.finishedTable.code,
 						name: this.tmp.name,
 						num: parseInt(this.finishedTable.amount),
 						specifications: this.speName,
-						specificationId: this.finishedTable.modelandspecification[2],
+						specificationId: this.finishedTable.modelandspecification[1],
 						startTime: this.finishedTable.checkdate[0],
 						type: this.type,
 						unit: this.finishedTable.unit,
@@ -802,20 +806,8 @@
 				this.currentPage = val
 				this.selectInspectsList()
 			},
-			// 	//琛ㄥ崟鏍¢獙
-			// validateForm(infoForm){
-			// 	console.log(this.infoForm);
-
-			// 	if (infoForm.checkdate == undefined) {
-			//   		alert('璇疯緭鍏ユ楠屾椂闂�');
-			// 		return false;
-			// 	}
-			// 	// 鏍¢獙閫氳繃
-			// 	return true;
-			// },
 			//纭畾璺宠浆
 			QUEding() {
-				console.log(this.infoForm);
 				if (this.type==0 &&(this.infoForm.checkdate[0] == undefined || this.infoForm.checkdate[1] == undefined)) {
 					this.$message({
 						message: '璇烽�夋嫨妫�楠屾椂闂�',

--
Gitblit v1.9.3