ysy 1 year ago
parent
commit
7df54520bc
1 changed files with 85 additions and 6 deletions
  1. 85 6
      pages/pda/sample/inspection/index.vue

+ 85 - 6
pages/pda/sample/inspection/index.vue

@@ -21,6 +21,8 @@
 						<u-button size="small" class="u-reset-button" type="success"
 							@click="scanIt(item.workOrderId)">扫一扫</u-button>
 
+						<u-button size="small" class="u-reset-button" type="success"
+							@click="handZZCQuality">周转车质检</u-button>
 						<u-button size="small" class="u-reset-button" type="success" @click="handQuality">质检</u-button>
 					</view>
 
@@ -35,9 +37,45 @@
 			</u-list>
 		</view>
 
+
+		<SearchPopup mode="center" v-if="qualityShow">
+			<template v-slot:list>
+				<view class="popup_list">
+
+					<u-form labelPosition="left" :model="qualityForm" labelWidth="180" labelAlign="left" class="">
+						<u-form-item label="质检取样数:" borderBottom prop="num">
+							<input class="uni-input" v-model="qualityForm.num" placeholder="请输入质检取样数"></input>
+						</u-form-item>
+
+					</u-form>
+				</view>
+			</template>
+
+			<template v-slot:operate>
+				<view class="operate_box rx-bc">
+					<u-button size="small" class="u-reset-button" @click="cancel">
+						取消
+					</u-button>
+
+
+					<u-button type="success" size="small" class="u-reset-button" @click="qualityOk">
+						确定
+					</u-button>
+
+				</view>
+			</template>
+
+		</SearchPopup>
+
+
+
+
+
 		<view class="bottom-wrapper">
 			<view class="btn_box" @click="save">确认</view>
 		</view>
+
+
 	</view>
 </template>
 
@@ -58,6 +96,9 @@
 
 	import turnoverBom from "../../sample/components/turnoverBom.vue";
 
+	import SearchPopup from '../../components/searchPopup.vue'
+
+
 	export default {
 		components: {
 			workOrderBom,
@@ -65,6 +106,7 @@
 			deviceBom,
 			diagramLast,
 			turnoverBom,
+			SearchPopup
 		},
 		data() {
 			return {
@@ -73,6 +115,11 @@
 				taskId: null,
 
 				List: [],
+				qualityShow: false,
+				
+				qualityForm: {
+					num: null,
+				}
 
 			};
 		},
@@ -192,8 +239,8 @@
 					}
 				});
 			},
-			handQuality() {
-				console.log(this.List[0]);
+			handZZCQuality() {
+
 				if (this.List[0].turnover.length == 0) {
 					uni.showToast({
 						icon: "none",
@@ -246,12 +293,36 @@
 
 			},
 
-			save() {
-
-
-
+			handQuality() {
+				this.qualityShow = true
+			},
 
+			cancel() {
+				this.qualityShow = false
+			},
+			
+			qualityOk() {
+				if(!this.qualityForm.num && this.qualityForm.num < 1) {
+					uni.showToast({
+						icon: "none",
+						title: "请先输入质检取样数",
+					});
+					return false
+				}
+				let param = {
+					taskId: this.taskId,
+					workOrderId: this.id,
+					quantity: this.qualityForm.num
+				}
+				
+				qualityQy(param).then(res => {
+					this.$set(this.List[0], 'semiProductList', res)
+					this.qualityShow = false
+					this.$forceUpdate()
+				})
+			},
 
+			save() {
 				batchSave(this.List).then((res) => {
 					uni.navigateBack();
 				});
@@ -312,4 +383,12 @@
 			width: 160rpx;
 		}
 	}
+
+
+	.popup_list {
+		width: 78vw;
+		min-height: 120rpx;
+		padding: 0 32rpx;
+
+	}
 </style>