From db16c0207818437ddd711bcc0778667ba8d9fcc4 Mon Sep 17 00:00:00 2001
From: 展杰 <1240968267@qq.com>
Date: 星期三, 03 七月 2024 14:14:44 +0800
Subject: [PATCH] Merge branch 'master' of https://gitcode.net/csddngb/hk_pda_vue

---
 pages/inspection/inspectionInfo.vue |  107 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 81 insertions(+), 26 deletions(-)

diff --git a/pages/inspection/inspectionInfo.vue b/pages/inspection/inspectionInfo.vue
index 8510821..53a5a60 100644
--- a/pages/inspection/inspectionInfo.vue
+++ b/pages/inspection/inspectionInfo.vue
@@ -11,9 +11,25 @@
 							<label>{{item.TASK_NO}}</label>
 						</u-col>
 					</u-row>
+					<u-row customStyle="margin-bottom: 10px" v-if="item.LOT_NO">
+						<u-col span="2">
+							<label>閿�鍞崟鍙�:</label>
+						</u-col>
+						<u-col span="4">
+							<label>{{item.LOT_NO}}</label>
+						</u-col>
+					</u-row>
 					<u-row customStyle="margin-bottom: 10px">
 						<u-col span="2">
-							<label>鏈哄彴鍙�:</label>
+							<label>宸ュ崟鏁伴噺:</label>
+						</u-col>
+						<u-col span="4">
+							<label>{{item.DAA008}}</label>
+						</u-col>
+					</u-row>
+					<u-row customStyle="margin-bottom: 10px">
+						<u-col span="2">
+							<label>鏈哄彴 / 浜х嚎:</label>
 						</u-col>
 						<u-col span="4">
 							<label>{{item.MACHINE_NO}}</label>
@@ -53,20 +69,13 @@
 					</u-row>
 					<u-row customStyle="margin-bottom: 10px">
 						<u-col span="2">
-							<label>妫�楠屽憳:</label>
+							<label>妫�楠屽憳/妫�楠岀被鍨�:</label>
 						</u-col>
 						<u-col span="4">
-							<label>{{name}}</label>
+							<label>{{item.OPERATE_MAN}} / {{item.FTYPE}}</label>
 						</u-col>
 					</u-row>
-					<u-row customStyle="margin-bottom: 10px">
-						<u-col span="2">
-							<label>妫�楠岀被鍨�</label>
-						</u-col>
-						<u-col span="4">
-							<label>{{item.FTYPE}}</label>
-						</u-col>
-					</u-row>
+					<u-button text="鐢熸垚妫�楠岃祫鏂�" type="primary" :plain="true" style="width: 200px;height: 100px;position: absolute;top: 30%;right: 10%;" @click="generate()"></u-button>
 				</view>
 			</uni-card>
 		</view>
@@ -76,13 +85,14 @@
 				<!-- 琛ㄥご琛� -->
 				<uni-tr>
 					<uni-th align="center" width="60">妫�楠岄」鐩�</uni-th>
-					<uni-th align="center" width="80">妫�楠屽伐鍏�</uni-th>
+					<uni-th align="center" width="60">妫�楠屽伐鍏�</uni-th>
 					<uni-th align="center" width="140">瑙勬牸</uni-th>
-					<uni-th align="center" width="40">妫�楠屾暟閲�</uni-th>
+					<uni-th align="center" width="80" v-if="item.DEPARTMENT_NO=='HS0202'">缁勪欢鍚嶇О</uni-th>
+					<uni-th align="center" width="40">鏁伴噺</uni-th>
 					<uni-th align="center" width="60">涓婇檺鍊�</uni-th>
 					<uni-th align="center" width="60">涓嬮檺鍊�</uni-th>
-					<uni-th align="center" width="80">妫�楠屽��</uni-th>
-					<uni-th align="center" width="75">妫�楠岀粨鏋�</uni-th>
+					<uni-th align="center" width="70">妫�楠屽��</uni-th>
+					<uni-th align="center" width="78">缁撴灉</uni-th>
 					<uni-th align="center" width="80">涓嶈壇鍘熷洜</uni-th>
 					<uni-th align="center" width="80">澶囨敞</uni-th>
 				</uni-tr>
@@ -91,6 +101,7 @@
 					<uni-td>{{item.CHECK_ITEM}}</uni-td>
 					<uni-td>{{item.CHECK_TOOL}}</uni-td>
 					<uni-td>{{item.SPECIFICATION}}</uni-td>
+					<uni-td v-if="item.FTEXT_TYPE">{{item.FTEXT_TYPE}}</uni-td>
 					<uni-td>{{item.CHECK_NUM}}</uni-td>
 					<uni-td>{{item.UP_ALLOW}}</uni-td>
 					<uni-td>{{item.DOWN_ALLOW}}</uni-td>
@@ -101,15 +112,20 @@
 					</uni-td>
 					<uni-td>
 						<u-tag
-							v-if="item.UP_ALLOW && (item.VALUE <= item.UP_ALLOW && item.VALUE >= item.DOWN_ALLOW) || !item.UP_ALLOW && item.VALUE == '鍚堟牸'"
+							v-if="item.UP_ALLOW && (parseFloat(item.VALUE) <= parseFloat(item.UP_ALLOW) && parseFloat(item.VALUE) >= parseFloat(item.DOWN_ALLOW)) || (!item.UP_ALLOW && item.VALUE == '鍚堟牸')"
 							text="鍚堟牸" type="success"></u-tag>
 						<u-tag
-							v-if="item.UP_ALLOW && (item.VALUE > item.UP_ALLOW || item.VALUE < item.DOWN_ALLOW) || !item.UP_ALLOW && item.VALUE == '涓嶅悎鏍�'"
+							v-else
 							text="涓嶅悎鏍�" type="error"></u-tag>
 					</uni-td>
 					<uni-td>
-						<view class="content" @click="useOutClickSide">
+<!-- 						<view class="content" @click="useOutClickSide">
 							<easy-select ref="easySelect" size="medium" :value="item.BAD_REASON" @selectOne="selectOne($event,index)"></easy-select>
+						</view> -->
+						<view class="login">
+							<w-select style="margin-left: 20rpx;" v-model='chooseValue' defaultValue="璇烽�夋嫨" 
+							:list='list' valueName='CONTENT' keyName="ID" @change='change(index)'>
+							</w-select>
 						</view>
 					</uni-td>
 					<uni-td>
@@ -134,7 +150,9 @@
 <script>
 	import {
 		getInspectionInfo,
-		saveInspectionInfo
+		saveInspectionInfo,
+		getBadReason,
+		generateInfo
 	} from '../../api/inspection';
 	import {
 		baseUrl
@@ -146,7 +164,9 @@
 				table: [],
 				name: '',
 				remeke: '',
-				show: false
+				//show: false
+				chooseValue: "",
+				list: []
 			}
 		},
 		onLoad(option) {
@@ -154,6 +174,7 @@
 			this.item = item
 			this.getInspection(item.CHECK_NO)
 			this.name = uni.getStorageSync('userInfo').username
+			this.getBadReason()
 		},
 		onNavigationBarButtonTap(e) {
 			let that = this
@@ -205,12 +226,15 @@
 					console.log(this.table)
 				})
 			},
-			selectOne(options,index) {
-				this.table[index].BAD_REASON = options.label
-				console.log(options.label);
-			},
-			useOutClickSide() {
-				this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions()
+			// selectOne(options,index) {
+			// 	this.table[index].BAD_REASON = options.label
+			// 	console.log(options.label);
+			// },
+			// useOutClickSide() {
+			// 	this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions()
+			// },
+			change(index) {
+				this.table[index].BAD_REASON=this.chooseValue;
 			},
 			changeSwitch(item) {
 				console.log(item)
@@ -261,6 +285,37 @@
 					return
 				}
 			},
+			generate(){
+				generateInfo(this.item.CHECK_NO).then(res=>{
+					if(!res.result){
+						this.$refs.uToast.show({
+							message:res.msg,
+							type:'error'
+						})
+						return
+					}else{
+						this.$refs.uToast.show({
+							message: "鏇存柊鎴愬姛",
+							type: 'success'
+						})
+						this.table.splice(0,this.table.length)
+						this.getInspection(this.item.CHECK_NO)
+					}
+				})
+			},
+			getBadReason() {
+				getBadReason().then(res => {
+					console.log(res)
+					if(!res.result) {
+						this.$refs.uToast.show({
+							message: res.msg,
+							type: 'error'
+						})
+						return
+					}
+					this.list = res.data
+				})
+			},
 			check() {
 				for(let item of this.table) {
 					if(item.VALUE === null) {

--
Gitblit v1.9.3