From 57480442a2445e49e7bf25dd52fce5cf85c262a3 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期四, 24 八月 2023 18:05:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/inspectionManagement/commissionInspection/addCommision.vue |  209 +++++++++++++++++++++++++++++-----------------------
 1 files changed, 117 insertions(+), 92 deletions(-)

diff --git a/src/views/inspectionManagement/commissionInspection/addCommision.vue b/src/views/inspectionManagement/commissionInspection/addCommision.vue
index 5c44513..46f1dbd 100644
--- a/src/views/inspectionManagement/commissionInspection/addCommision.vue
+++ b/src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -7,9 +7,14 @@
 					<div class="tableBox-header">
 						<el-button class="split" @click="dialogueFormVisible = true" type="primary" size="small"
 							style="background-color: rgb(1, 102, 226);">娣诲姞鏍峰搧</el-button>
-						<!-- <el-input v-model="searchData" class="input-form split" placeholder="鎵弿浜岀淮鐮佸綍鍏ユ牱鍝�..."
-							prefix-icon="el-icon-search" style="width: 200px;">
-						</el-input> -->
+						<!--        <el-input
+          v-model="searchData"
+          class="input-form split"
+          placeholder="鎵弿浜岀淮鐮佸綍鍏ユ牱鍝�..."
+          prefix-icon="el-icon-search"
+          style="width: 200px;"
+        >
+        </el-input>-->
 						<el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">閲嶇疆</el-button>
 					</div>
 					<el-table ref="detectionInfo" :max-height="800" :cell-style="{textAlign: 'center'}"
@@ -41,20 +46,13 @@
 							</template>
 						</el-table-column>
 					</el-table>
-					<!-- 鍒嗛〉鍣� -->
-					<div>
-						<el-pagination class="pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange"
-							:current-page="currentPage" :page-sizes="[100, 200, 300, 400]" :page-size="100"
-							layout="total, sizes, prev, pager, next, jumper" :total="400">
-						</el-pagination>
-					</div>
 				</div>
 				<div class="secondBox">
 					<el-row class="header">
 						<el-col :span="12">鍩烘湰淇℃伅</el-col>
 						<el-col :span="12" style="text-align: right;">
 							<!-- 鐐瑰嚮杩斿洖锛屽綋鍓嶉〉闈㈠�间负false -->
-							<el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">鎵撳嵃濮旀墭鍗�</el-button>
+							<!-- <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">鎵撳嵃濮旀墭鍗�</el-button> -->
 						</el-col>
 					</el-row>
 					<el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="right" label-width="100px"
@@ -138,6 +136,8 @@
 						<div class="submitBtn">
 							<el-button type="primary" size="small" @click="submitInspection"
 								style="background-color: rgb(1, 102, 226);">鎻愪氦</el-button>
+							<!-- 鐐瑰嚮杩斿洖锛屽綋鍓嶉〉闈㈠�间负false -->
+							<el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">鎵撳嵃濮旀墭鍗�</el-button>
 						</div>
 					</el-form>
 				</div>
@@ -149,19 +149,16 @@
 						<el-row :gutter="50">
 							<el-col :span="10">
 								<el-form-item label="鏍峰搧缂栧彿锛�">
-									<el-select style="width: 160px;" v-model="addPointerForm.sampleNumber" size="small"
-										placeholder="璇烽�夋嫨鏍峰搧缂栧彿">
-										<el-option v-for="options in samplecodeoptions" :value="options.value"
-											:key="options.key">{{ options.value }}</el-option>
-									</el-select>
+									<el-input style="width: 160px;" v-model="addPointerForm.sampleNumber" size="small" disabled>
+									</el-input>
 								</el-form-item>
 							</el-col>
 							<el-col :span="10">
 								<el-form-item label="鏍峰搧鍚嶇О锛�">
 									<el-select style="width: 160px;" v-model="addPointerForm.sampleName" size="small"
-										placeholder="璇烽�夋嫨鏍峰搧鍚嶇О">
-										<el-option v-for="options in sampleoptions" :value="options.value"
-											:key="options.key">{{ options.value }}</el-option>
+										placeholder="璇烽�夋嫨鏍峰搧鍚嶇О" @change="upMaterialName">
+										<el-option v-for="options in sampleoptions" :value="options.key"
+											:label="options.value"></el-option>
 									</el-select>
 								</el-form-item>
 							</el-col>
@@ -170,7 +167,7 @@
 							<el-col :span="10">
 								<el-form-item label="瑙勬牸鍨嬪彿锛�">
 									<el-select style="width: 160px;" v-model="addPointerForm.specificationsModels" size="small"
-										placeholder="璇烽�夋嫨鏍峰搧鍚嶇О">
+										placeholder="璇峰厛閫夋嫨鏍峰搧鍚嶇О">
 										<el-option v-for="options in model_spe_options" :value="options.value"
 											:key="options.key">{{ options.value }}</el-option>
 									</el-select>
@@ -226,9 +223,6 @@
 		addInspection,
 		isIfViewUUID
 	} from '@/api/inspection/commisioninspection'
-	import {
-		time
-	} from 'echarts';
 	export default {
 		data() {
 			return {
@@ -283,13 +277,7 @@
 					key: '1',
 					value: ''
 				}],
-				model_spe_options: [{
-					key: '1',
-					value: '閫夐」1'
-				}, {
-					key: '2',
-					value: '閫夐」2'
-				}],
+				model_spe_options: [],
 				sampleDeliveryMode: [{
 					key: '1',
 					value: '閫佹牱'
@@ -297,19 +285,20 @@
 					key: '2',
 					value: '涓婇棬'
 				}],
-				dialogueFormVisible: false
+				dialogueFormVisible: false,
+				showDetail: false,
+				viewId: null
 			}
 		},
 		created() {
+			this.viewId = this.$route.params.viewId
+			this.$store.commit('settings/SAVE_LINK',this.viewId)
 			this.getlink(this.$route.params.viewId)
-			console.log();
 		},
 		mounted() {
-			// this.getSampleName()
-			// this.getModelSpecification()
+			this.getSampleName()
 		},
 		methods: {
-			// 鑾峰彇閾炬帴link
 			getlink(viewId) {
 				if (viewId == null) {
 					this.$message.error('褰撳墠閾炬帴涓嶅湪鏈夋晥鏈熷唴,绯荤粺鑷姩鍏抽棴')
@@ -333,16 +322,10 @@
 						value: item.name
 					}
 				})
-				this.samplecodeoptions = res.data.map((item) => {
-					return {
-						key: item.id.toString(),
-						value: item.code
-					}
-				})
 			},
-			async getModelSpecification() {
+			async getModelSpecification(val) {
 				const res = await getModelSpecification({
-					materialId: '1'
+					materialId: val
 				})
 				this.model_spe_options = res.data.map((item) => {
 					return {
@@ -357,6 +340,7 @@
 				for (let i = 1; i < this.addPointerForm.experiment.length; i++) {
 					exper += ',' + this.addPointerForm.experiment[i]
 				}
+				// console.log(exper)
 				this.addPointerForm.experiment = exper
 				let tmp = this.addPointerForm
 				this.detectionInfo.push(tmp)
@@ -393,6 +377,31 @@
 					sampleDeliveryPhone: this.infoForm.sendertel,
 					sampleSender: this.infoForm.sender
 				})
+				//       const res = await addInspection({
+				//   completionDeadline: "2023-08-03",
+				//   contactAddress: "姹熻嫃鍗楅��",
+				//   contactNumber: "12321423432",
+				//   contacts: "灏忛粦",
+				//   entrustRemarks: "濮旀墭澶囨敞YPBH123456789YPBH123456789YPBH123456789",
+				//   entrusted: "闃块噷宸村反",
+				//   inspectionTime: "2023-08-03",
+				//   linkDetectionList: [
+				//     {
+				//       "experiment": "鍋氭ⅵ",
+				//       "remarks": "閫氳繃浜�",
+				//       "sampleName": "鍙戝姩鏈�",
+				//       "sampleNumber": "YPBH123456789",
+				//       "samplesNumber": 20,
+				//       "specificationsModels": "GGXH-AAAAA",
+				//       "unit": "鐧惧害"
+				//     }
+				//   ],
+				//   reportNumber: 23,
+				//   sampleDeliveryMode: 1,
+				//   sampleDeliveryPhone: "123456789676",
+				//   sampleSender: "灏忕櫧"
+				// })
+				// console.log(res)
 				this.infoForm.commisioncode = res.data
 				if (res.data) {
 					this.$message({
@@ -401,6 +410,7 @@
 					})
 					// 璺宠浆椤甸潰
 					this.$router.push('/inspectionManagement/commissionInspection')
+					this.showDetail = true
 				} else {
 					this.$message.error(res.message)
 				}
@@ -414,75 +424,90 @@
 			deleteRow(row) {
 				console.log(row)
 				row = null
+			},
+			upMaterialName(val){
+				console.log(val);
+				this.getModelSpecification(val)
 			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.add_commision{
-		padding: 20px;
-	}
-	
-	.firstBox {
-		.title {
-			padding: 15px 10px;
-			font-size: 18px;
-			background-color: #0166e2;
-			color: #fff;
-			border-radius: 4px;
-		}
+	.content-main {
+		padding: 20px 40px;
+		background-color: #f0f2f5;
+		width: 100%;
+		height: 100vh;
 
-		.tableBox {
-			background-color: #fff;
-			padding: 0px 20px;
-			margin: 0px -15px;
-			flex: 1;
-			background: #fff;
-			/* padding: 20px 20px 10px 20px; */
-			display: flex;
-			flex-direction: column;
+		.firstBox {
+			.title {
+				padding: 15px 10px;
+				font-size: 18px;
+				background-color: #0166e2;
+				color: #fff;
+				border-radius: 4px;
+				margin-bottom: 20px;
+			}
 
-			.tableBox-header {
-				padding: 20px 0px;
+			.tableBox {
+				background-color: #fff;
+				padding: 0px 20px;
+				flex: 1;
+				background: #fff;
+				/* padding: 20px 20px 10px 20px; */
+				display: flex;
+				flex-direction: column;
 
-				.split {
-					margin-right: 15px;
+				.tableBox-header {
+					padding: 20px 0px;
+
+					.split {
+						margin-right: 15px;
+					}
+				}
+
+				.el-table {
+					flex: 1;
+				}
+
+				>div:nth-child(3) {
+					display: flex;
+					justify-content: end;
+					margin: 10px 0;
 				}
 			}
+		}
 
-			.el-table {
-				flex: 1;
+		.secondBox {
+
+			.header {
+				display: flex;
+				justify-content: space-between;
+				padding: 10px 20px;
+				margin-top: 10px;
 			}
 
-			>div:nth-child(3) {
+			.submitBtn {
 				display: flex;
 				justify-content: end;
-				margin: 10px 0;
+				margin-right: 40px;
+				margin-top: 20px;
 			}
 		}
-	}
 
-	.secondBox {
-		margin: 0px -15px;
+		.infoForm {
+			background-color: #fff;
+			padding: 20px 50px;
 
-		.header {
-			display: flex;
-			justify-content: space-between;
-			padding: 10px 20px;
-			margin-top: 10px;
+			.formwrapper {
+				margin: 20px 0px;
+				padding-left: 30px;
+
+				.el-row {
+					margin: 10px 0px;
+				}
+			}
 		}
-
-		.submitBtn {
-			display: flex;
-			justify-content: end;
-			margin-right: 156px;
-			margin-top: 20px;
-		}
-	}
-
-	.infoForm {
-		background-color: #fff;
-		padding: 20px 50px;
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3