From 3ef19c59f59bb1b5a43434b8d14ec12e06d505b0 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 19 三月 2024 13:07:19 +0800
Subject: [PATCH] 检验下单-下发功能更新

---
 src/components/view/b1-inspection-order.vue |   38 ++++++++++++++++++++++++--------------
 1 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue
index 4e3f189..563273b 100644
--- a/src/components/view/b1-inspection-order.vue
+++ b/src/components/view/b1-inspection-order.vue
@@ -16,13 +16,13 @@
 		align-items: center;
 		height: 50px;
 	}
-	
+
 	.search_label {
 		width: 120px;
 		font-size: 14px;
 		text-align: right;
 	}
-	
+
 	.search_input {
 		width: calc(100% - 120px);
 	}
@@ -155,7 +155,7 @@
 							</div>
 						</el-col>
 						<el-col class="search_thing" :span="22">
-							<div class="search_label"><span class="required-span">* </span>鎸囨淳浜哄憳锛�</div>
+							<div class="search_label"><span class="required-span" v-show="distributeData.type==2">* </span>鎸囨淳浜哄憳锛�</div>
 							<div class="search_input">
 								<el-select v-model="distributeData.userId" placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
 									<el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
@@ -179,8 +179,8 @@
 				</div>
 			</el-dialog>
 		</div>
-		<div style="width: 100%;height: 100%;" v-if="active == 1">
-			<Add />
+		<div style="width: 100%;height: 100%;" v-if="active >0">
+			<Add :active="active" :currentId="currentId" />
 		</div>
 	</div>
 </template>
@@ -347,7 +347,8 @@
 					},
 				],
 				tabIndex: 0,
-				active: 0
+				active: 0,//1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍�
+        currentId:null
 			}
 		},
 		mounted() {
@@ -411,12 +412,14 @@
 			},
 			// 璇︽儏
 			selectAllByOne(row) {
-				console.log(row);
-				//鎵撳紑寮规
-				this.dialogVisible = true;
-				//row = 鐐瑰嚮瀵瑰簲琛屽��
-				//澶嶅埗缁檉ormData
-				this.formData = this.HaveJson(row);
+        this.active = 2;
+				// console.log(row);
+				// //鎵撳紑寮规
+				// this.dialogVisible = true;
+				// //row = 鐐瑰嚮瀵瑰簲琛屽��
+				// //澶嶅埗缁檉ormData
+				// this.formData = this.HaveJson(row);
+        this.currentId = row.id
 			},
 			// 鏁版嵁鏌ョ湅
 			handleDataLook(row) {
@@ -427,7 +430,9 @@
 			},
 			// 瀹℃牳
 			handleVerify(row) {
-				this.verifyDialogVisible = true;
+				// this.verifyDialogVisible = true;
+        this.active = 3;
+        this.currentId = row.id
 			},
 			// 鎾ら攢
 			handlEquash(row) {
@@ -442,11 +447,16 @@
 					this.distributeData.orderId = row.id
 					this.distributeData.sampleId = row.sampleId
 					this.distributeData.appointed = res.data
+          this.distributeData.type = row.type
 				})
 			},
 			submitForm2() {
 				if(this.distributeData.appointed==null||this.distributeData.appointed==''){
 					this.$message.error('绾﹀畾鏃堕棿鏈~鍐�')
+					return
+				}
+        if(this.distributeData.type==2&&(this.distributeData.userId==null||this.distributeData.userId=='')){
+					this.$message.error('鎸囨淳浜哄憳鏈~鍐�')
 					return
 				}
 				this.upLoad = true;
@@ -501,4 +511,4 @@
 			}
 		}
 	}
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.3