From 5250374a8999fd6144de64befa6fd6167ce50936 Mon Sep 17 00:00:00 2001
From: 罗媛媛 <2454262093@qq.com>
Date: 星期一, 01 四月 2024 15:25:19 +0800
Subject: [PATCH] 功能调整

---
 src/components/view/b1-inspect-order-plan.vue |   77 +++++++++++++++++++++++++++++++-------
 1 files changed, 63 insertions(+), 14 deletions(-)

diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index a16fdd5..c78d830 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -3,26 +3,26 @@
 		font-size: 20px;
 		color: #3A7BFA
 	}
-	
+
 	.search {
 		background-color: #fff;
 		height: 80px;
 		display: flex;
 		align-items: center;
 	}
-	
+
 	.search_thing {
 		display: flex;
 		align-items: center;
 		height: 50px;
 	}
-	
+
 	.search_label {
 		width: 120px;
 		font-size: 14px;
 		text-align: right;
 	}
-	
+
 	.search_input {
 		width: calc(100% - 120px);
 	}
@@ -105,7 +105,7 @@
 </style>
 <template>
 	<div class="ins-order-plan-main">
-		<div v-if="activeFace == 0" style="height: 100%;">
+		<div v-show="activeFace == 0&&state==0" style="height: 100%;">
 			<p style="font-size: 16px;padding:19.5px 0px">妫�楠屼换鍔�</p>
 			<div class="search">
 				<div class="search_thing">
@@ -150,7 +150,7 @@
 					</el-row>
 				</div>
 				<ValueTable :tableRowClassName="changeRowClass" class="value-table" ref="insOrderPlan"
-					:url="$api.insOrderPlan.selectInsOrderPlanList" :upUrl="$api.user.updateUser" :componentData="componentData"
+					:url="$api.insOrderPlan.selectInsOrderPlanList" :upUrl="$api.user.updateUser" :componentData="componentData" @handleInspection="handleInspection"
 					:key="upIndex"/>
 			</div>
 		</div>
@@ -164,11 +164,13 @@
 		<div style="width: 100%;height: 100%;" v-if="activeFace >0">
 			<Add :active="activeFace" :currentId="currentId"/>
 		</div>
+    <Inspection v-if="state==1" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory"/>
 	</div>
 </template>
 
 <script>
 	import ValueTable from '../tool/value-table.vue'
+  import Inspection from '../do/b1-inspect-order-plan/Inspection.vue'
 	import {
 		getYearAndMonthAndDays
 	} from '../../util/date'
@@ -177,6 +179,7 @@
 	export default {
 		components: {
 			ValueTable,
+      Inspection,
 			Add
 		},
 		data() {
@@ -201,22 +204,30 @@
 					showSelect: false,
 					select: false,
 					sort: false,
+					init: false,
 					do: [{
 							id: '',
 							font: '妫�楠�',
 							type: 'text',
-							method: ''
+							method: 'handleInspection',
+							disabFun: (row, index) => {
+								return row.userId == null
+							}
 						}, {
 							id: '',
 							font: '浜ゆ帴',
 							type: 'text',
-							method: ''
+							disabFun: (row, index) => {
+								return row.userId == null
+							}
 						},
 						{
 							id: '',
 							font: '澶嶆牳',
 							type: 'text',
-							method: ''
+							disabFun: (row, index) => {
+								return row.userId == null || row.insState != 4
+							}
 						}, {
 							id: '',
 							font: '璁ら',
@@ -238,6 +249,21 @@
 						},
 						insState: {
 							select: []
+						},
+						insResult: {
+							select: [{
+								value: 0,
+								label: '涓嶅悎鏍�',
+								type: 'danger'
+							},{
+								value: 1,
+								label: '鍚堟牸',
+								type: 'success'
+							},{
+								value: '',
+								label: '鏈嚭缁撴灉',
+								type: 'info'
+							}]
 						}
 					},
 					selectField: {},
@@ -247,18 +273,34 @@
 				upIndex: 0,
 				planTotal: 0,
 				insStateList: [],
+        state:0,//0:鍙拌处椤碉紝1锛氭楠岄〉闈紝榛樿涓�0
 				activeFace: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍�
-				currentId: null
+				currentId: null,
+				entityCopy: {},
+				orderId: 0,
+        currentTime: null
 			}
 		},
 		created() {
 			this.getLaboratoryDicts()
 			this.getTypeDicts()
 			this.getInsStateDicts()
+      this.currentTime = getYearAndMonthAndDays()
+		},
+		mounted() {
+			this.entityCopy = this.HaveJson(this.componentData.entity)
 		},
 		methods: {
 			changeCheckBox(val) {
 				this.componentData.entity.userId = val?0:null
+				this.refreshTable()
+			},
+			refresh() {
+				this.componentData.entity = this.HaveJson(this.entityCopy)
+				if(this.tabList.length>0){
+					this.tabIndex = 0
+					this.componentData.entity.sonLaboratory = this.tabList[0].value
+				}
 				this.refreshTable()
 			},
 			claimFun(row) {
@@ -292,10 +334,9 @@
 				row,
 				rowIndex
 			}) {
-				let currentTime = getYearAndMonthAndDays()
-				if (currentTime === row.appointed) {
+				if (this.currentTime === row.appointed) {
 					return 'highlight-warning-row-border'
-				} else if (currentTime > row.appointed) {
+				} else if (this.currentTime > row.appointed) {
 					return 'highlight-danger-row-border'
 				}
 				return ''
@@ -379,7 +420,15 @@
 			},
 			playOrder(num) {
 				this.activeFace = num
-			}
+			},
+			goback() {
+				this.state = 0
+				this.refreshTable()
+			},
+      handleInspection(row){
+        this.state = 1;
+				this.orderId = row.id
+      }
 		}
 	}
 </script>

--
Gitblit v1.9.3