fix:过程检验关联检验表
This commit is contained in:
		
							parent
							
								
									43e5dff859
								
							
						
					
					
						commit
						fc10c2eee0
					
				|  | @ -135,388 +135,17 @@ | ||||||
| 						</el-col> | 						</el-col> | ||||||
| 					</el-row> | 					</el-row> | ||||||
| 					<el-divider style="margin-top:0"></el-divider> | 					<el-divider style="margin-top:0"></el-divider> | ||||||
| 					<!-- 尺寸检验 --> |  | ||||||
| 					<el-row v-if="mgroupName=='size'"> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="黑圈内径"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_hqnj" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="黑圈内径圆度"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_hqnjyd" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="黑圈外径"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_hqwj" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="黑圈外径圆度"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_hqwjyd" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="产品外径"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_wj" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="产品圆度"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_yd" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="产品同心度"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_txd" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="厚度"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_hd" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="准合格"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_zhg" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="圆准"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_yz" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 					</el-row> |  | ||||||
| 					<!-- 外观检验 --> |  | ||||||
| 					<el-row  v-else-if="mgroupName=='facade'"> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="脏"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_z" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="气泡"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_qp" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="水纹"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_swen" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="崩边"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_bb" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="棕边"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_zb" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="棕圈"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_zq" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="划伤"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_hs" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="麻点"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_md" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="黑圈变形"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_hqbx" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="倒角"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_dj" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									 |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="破损"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_ps" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="蓝圈"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_lq" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 					</el-row> |  | ||||||
| 					<!-- 过程检验 --> | 					<!-- 过程检验 --> | ||||||
| 					<el-row v-else> | 					<el-row> | ||||||
| 						<el-col :md="12" :sm="24"> | 						<el-col :md="12" :sm="24" v-for="item in qct_defects" :key="item.id"> | ||||||
| 							<el-form-item label="厚度"> | 							<el-form-item :label="item.defect_name"> | ||||||
| 								<el-input-number | 								<el-input-number | ||||||
|  | 									v-model="form[item.defect_name]" | ||||||
|  | 									:min="0" | ||||||
|  | 									style="width: 100%;" | ||||||
| 									controls-position="right" | 									controls-position="right" | ||||||
| 									v-model="count_notok_json.count_n_hd" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" | 									@change="handleCountChange" | ||||||
| 								></el-input-number> | 								/> | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="产品外径"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_wj" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="产品圆度"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_yd" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="产品同心度"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_txd" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="气泡"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_qp" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="水纹"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_swen" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="崩边"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_bb" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="小崩边"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_xbb" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="划伤"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_hs" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="麻点"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_md" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						 |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="破损"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_ps" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="其他"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									controls-position="right" |  | ||||||
| 									v-model="count_notok_json.count_n_qt" |  | ||||||
| 									style="width: 100%" |  | ||||||
| 									:precision="0" |  | ||||||
| 									@change="handleCountChange" |  | ||||||
| 								></el-input-number> |  | ||||||
| 							</el-form-item> | 							</el-form-item> | ||||||
| 						</el-col> | 						</el-col> | ||||||
| 					</el-row> | 					</el-row> | ||||||
|  | @ -577,36 +206,22 @@ export default { | ||||||
| 				count_sampling_ok:0, | 				count_sampling_ok:0, | ||||||
| 				count_sampling:0, | 				count_sampling:0, | ||||||
| 				count_notok: 0, | 				count_notok: 0, | ||||||
| 				count_notok_json:{} | 				ftestworkdefect:[] | ||||||
| 			}, | 			}, | ||||||
| 			count_ok_rate:100, | 			count_ok_rate:100, | ||||||
| 			count_notok_json:{ |  | ||||||
| 				//尺寸 |  | ||||||
| 				count_n_wj: 0, |  | ||||||
| 				count_n_yd: 0, |  | ||||||
| 				count_n_txd: 0, |  | ||||||
| 				count_n_hd: 0, |  | ||||||
| 				//外观和内质 |  | ||||||
| 				count_n_qp: 0, |  | ||||||
| 				count_n_swen: 0, |  | ||||||
| 				count_n_hs: 0, |  | ||||||
| 				count_n_md: 0, |  | ||||||
| 				count_n_bb:0, |  | ||||||
| 				count_n_xbb:0, |  | ||||||
| 				count_n_ps: 0, |  | ||||||
| 				count_n_qt:0, |  | ||||||
| 			}, |  | ||||||
| 			rules: { | 			rules: { | ||||||
| 				test_date: [{required: true,message: "请选择检验日期",trigger: "blur"}], | 				test_date: [{required: true,message: "请选择检验日期",trigger: "blur"}], | ||||||
| 				batch: [{required: true,message: "请选择物料批次",trigger: "blur"}], | 				batch: [{required: true,message: "请选择物料批次",trigger: "blur"}], | ||||||
| 				test_user: [{required: true,message: "请选择物料批次",trigger: "blur"}], | 				test_user: [{required: true,message: "请选择物料批次",trigger: "blur"}], | ||||||
| 			}, | 			}, | ||||||
|  | 			qct_defects:[], | ||||||
| 			options: [], | 			options: [], | ||||||
| 			userList : [], | 			userList : [], | ||||||
| 			typeOption:[ | 			typeOption:[ | ||||||
| 				{name:'全检',value:20}, | 				{name:'全检',value:20}, | ||||||
| 				{name:'抽检',value:10}, | 				{name:'抽检',value:10}, | ||||||
| 			], | 			], | ||||||
|  | 			qct:null, | ||||||
| 			initForm: {}, | 			initForm: {}, | ||||||
| 			selectionFilters: [], | 			selectionFilters: [], | ||||||
| 			batchCount:null, | 			batchCount:null, | ||||||
|  | @ -618,11 +233,10 @@ export default { | ||||||
| 		}; | 		}; | ||||||
| 	}, | 	}, | ||||||
| 	mounted() { | 	mounted() { | ||||||
| 		console.log('mgroupName',this.mgroupName); |  | ||||||
| 		this.batchCount = this.itemObj.count_cando; | 		this.batchCount = this.itemObj.count_cando; | ||||||
| 		this.form.batch = this.itemObj.batch; | 		this.form.batch = this.itemObj.batch; | ||||||
| 		this.form.wm = this.itemObj.id; | 		this.form.wm = this.itemObj.id; | ||||||
| 		this.form.count = this.itemObj.count_cando; | 		this.form.count_sampling = this.form.count_sampling_ok = this.form.count = this.itemObj.count_cando; | ||||||
| 		this.form.supplier = this.itemObj.supplier; | 		this.form.supplier = this.itemObj.supplier; | ||||||
| 		this.deptID = this.$TOOL.data.get('gx_deptID'); | 		this.deptID = this.$TOOL.data.get('gx_deptID'); | ||||||
| 		this.getUsers(); | 		this.getUsers(); | ||||||
|  | @ -630,10 +244,11 @@ export default { | ||||||
| 	}, | 	}, | ||||||
| 	methods: { | 	methods: { | ||||||
| 		//显示 | 		//显示 | ||||||
| 		open(mode = "抽检") { | 		open(mode = "") { | ||||||
| 			this.mode = mode; | 			this.mode = mode; | ||||||
| 			this.modeTitle = mode+'抽检'; | 			this.modeTitle = mode+'抽检'; | ||||||
| 			this.visible = true; | 			this.visible = true; | ||||||
|  | 			this.getdefects(); | ||||||
| 			return this; | 			return this; | ||||||
| 		}, | 		}, | ||||||
| 		getUsers(){ | 		getUsers(){ | ||||||
|  | @ -652,6 +267,20 @@ export default { | ||||||
| 				}); | 				}); | ||||||
| 			}); | 			}); | ||||||
| 		}, | 		}, | ||||||
|  | 		getdefects(){ | ||||||
|  | 			let that = this; | ||||||
|  | 			that.$API.qm.qct.list.req({page: 0, qctmat__material: that.itemObj.material,tags:'inm'}).then((res) => { | ||||||
|  | 				if(res.length>0){ | ||||||
|  | 					that.qct = res[0].id; | ||||||
|  | 					that.$API.qm.qct.item.req(res[0].id).then((res) => { | ||||||
|  | 						res.qct_defects.forEach((item) => { | ||||||
|  | 							that.form[item.defect_name] = 0; | ||||||
|  | 						}) | ||||||
|  | 						that.qct_defects=res.qct_defects; | ||||||
|  | 					}) | ||||||
|  | 				} | ||||||
|  | 			}) | ||||||
|  | 		}, | ||||||
| 		//渲染工单提交按钮 | 		//渲染工单提交按钮 | ||||||
| 		getInit() { | 		getInit() { | ||||||
| 			let that = this; | 			let that = this; | ||||||
|  | @ -661,19 +290,10 @@ export default { | ||||||
| 			}); | 			}); | ||||||
| 		}, | 		}, | ||||||
| 		handleCountChange(type){ | 		handleCountChange(type){ | ||||||
| 			this.form.count_notok =  | 			this.form.count_notok = 0; | ||||||
| 			this.count_notok_json.count_n_wj+ | 			this.qct_defects.forEach(item => { | ||||||
| 			this.count_notok_json.count_n_yd+ | 			    this.form.count_notok += this.form[item.defect_name] | ||||||
| 			this.count_notok_json.count_n_txd+ | 			}) | ||||||
| 			this.count_notok_json.count_n_hd+ |  | ||||||
| 			this.count_notok_json.count_n_qp+ |  | ||||||
| 			this.count_notok_json.count_n_swen+ |  | ||||||
| 			this.count_notok_json.count_n_hs+ |  | ||||||
| 			this.count_notok_json.count_n_bb+ |  | ||||||
| 			this.count_notok_json.count_n_xbb+ |  | ||||||
| 			this.count_notok_json.count_n_md+ |  | ||||||
| 			this.count_notok_json.count_n_ps+ |  | ||||||
| 			this.count_notok_json.count_n_qt; |  | ||||||
| 			this.handleCountNotokChange(); | 			this.handleCountNotokChange(); | ||||||
| 		}, | 		}, | ||||||
| 		handleCountNotokChange(){ | 		handleCountNotokChange(){ | ||||||
|  | @ -699,21 +319,6 @@ export default { | ||||||
| 		submitTicketCreate(id) { | 		submitTicketCreate(id) { | ||||||
| 			this.transition  = id; | 			this.transition  = id; | ||||||
| 			this.submit(); | 			this.submit(); | ||||||
| 			// let that = this; |  | ||||||
| 			// let ticket = {}; |  | ||||||
| 			// that.isSaveing = true; |  | ||||||
| 			// ticket.title = '白片抛抽检审批单'; |  | ||||||
| 			// ticket.workflow = that.initForm.workflow; |  | ||||||
| 			// ticket.ticket_data = {t_id: that.mlogItem.id}; |  | ||||||
| 			// ticket.transition = id; |  | ||||||
| 			// that.$API.wf.ticket.create.req(ticket).then((res) => { |  | ||||||
| 			// 	that.isSaveing = false; |  | ||||||
| 			// 	that.ticketDialog = false; |  | ||||||
| 			// 	that.visible = false; |  | ||||||
| 			// 	that.$message.success("提交成功"); |  | ||||||
| 			// }).catch((e) => { |  | ||||||
| 			// 	that.isSaveing = false; |  | ||||||
| 			// }); |  | ||||||
| 		}, | 		}, | ||||||
| 		//提交 | 		//提交 | ||||||
| 		submit() { | 		submit() { | ||||||
|  | @ -721,37 +326,24 @@ export default { | ||||||
| 			this.$refs.dialogForm.validate(async (valid) => { | 			this.$refs.dialogForm.validate(async (valid) => { | ||||||
| 				if (valid) { | 				if (valid) { | ||||||
| 					that.isSaveing = true; | 					that.isSaveing = true; | ||||||
| 					let count_notok =  | 					let count_notok = 0; | ||||||
| 					this.count_notok_json.count_n_wj+ | 					that.qct_defects.forEach(item => { | ||||||
| 					this.count_notok_json.count_n_yd+ | 						let obj = {}; | ||||||
| 					this.count_notok_json.count_n_txd+ | 						obj.defect = item.defect; | ||||||
| 					this.count_notok_json.count_n_hd+ | 						obj.count = that.form[item.defect_name]; | ||||||
| 					this.count_notok_json.count_n_qp+ | 						that.form.ftestworkdefect.push(obj); | ||||||
| 					this.count_notok_json.count_n_swen+ | 						count_notok += that.form[item.defect_name]; | ||||||
| 					this.count_notok_json.count_n_hs+ | 					}) | ||||||
| 					this.count_notok_json.count_n_bb+ | 					that.form.count_notok = count_notok; | ||||||
| 					this.count_notok_json.count_n_xbb+ |  | ||||||
| 					this.count_notok_json.count_n_md+ |  | ||||||
| 					this.count_notok_json.count_n_ps+ |  | ||||||
| 					this.count_notok_json.count_n_qt; |  | ||||||
| 					if(count_notok>that.form.count_notok){ |  | ||||||
| 						that.$notify.error("不合格数量有问题"); |  | ||||||
| 						that.isSaveing = false; |  | ||||||
| 					}else{ |  | ||||||
| 						if(count_notok<that.form.count_notok){ |  | ||||||
| 							that.count_notok_json.count_n_qt = that.form.count_notok-count_notok; |  | ||||||
| 						} |  | ||||||
| 					if(that.supplier!== null&&that.form.type2==10){ | 					if(that.supplier!== null&&that.form.type2==10){ | ||||||
| 						that.form.need_update_wm = false; | 						that.form.need_update_wm = false; | ||||||
| 					} | 					} | ||||||
| 						// that.form.count_ok = that.form.count-that.form.count_notok; |  | ||||||
| 					if(that.form.type2==10){//抽检 | 					if(that.form.type2==10){//抽检 | ||||||
| 						that.form.count_sampling_ok = that.form.count_sampling - that.form.count_notok; | 						that.form.count_sampling_ok = that.form.count_sampling - that.form.count_notok; | ||||||
| 					}else{//全检 | 					}else{//全检 | ||||||
| 						that.form.count_ok = that.form.count - that.form.count_notok; | 						that.form.count_ok = that.form.count - that.form.count_notok; | ||||||
| 					} | 					} | ||||||
| 						that.form.count_notok_json = that.count_notok_json; | 					that.form.qct = that.qct; | ||||||
| 						console.log('that.form',that.form) |  | ||||||
| 					that.$API.qm.ftestwork.create.req(that.form).then((res) => { | 					that.$API.qm.ftestwork.create.req(that.form).then((res) => { | ||||||
| 						if(that.mgroupName=='白片抛'){ | 						if(that.mgroupName=='白片抛'){ | ||||||
| 							let ticket = {}; | 							let ticket = {}; | ||||||
|  | @ -781,8 +373,6 @@ export default { | ||||||
| 						that.isSaveing = false; | 						that.isSaveing = false; | ||||||
| 					}) | 					}) | ||||||
| 				} | 				} | ||||||
| 					 |  | ||||||
| 				} |  | ||||||
| 			}); | 			}); | ||||||
| 		}, | 		}, | ||||||
| 		//表单注入数据 | 		//表单注入数据 | ||||||
|  |  | ||||||
|  | @ -32,7 +32,7 @@ | ||||||
| 									:min="0" | 									:min="0" | ||||||
| 									class="width-100" | 									class="width-100" | ||||||
| 									controls-position="right" | 									controls-position="right" | ||||||
| 									@change="countChanges" | 									@change="countChange" | ||||||
| 								/> | 								/> | ||||||
| 							</el-form-item> | 							</el-form-item> | ||||||
| 						</el-col> | 						</el-col> | ||||||
|  | @ -41,6 +41,7 @@ | ||||||
| 								<el-input-number | 								<el-input-number | ||||||
| 									v-model="form.count_ok" | 									v-model="form.count_ok" | ||||||
| 									:min="0" | 									:min="0" | ||||||
|  | 									:disabled="true" | ||||||
| 									class="width-100" | 									class="width-100" | ||||||
| 									controls-position="right" | 									controls-position="right" | ||||||
| 								/> | 								/> | ||||||
|  | @ -52,7 +53,29 @@ | ||||||
| 									v-model="form.count_notok" | 									v-model="form.count_notok" | ||||||
| 									:min="0" | 									:min="0" | ||||||
| 									class="width-100" | 									class="width-100" | ||||||
| 									@change="countChanges" | 									:disabled="true" | ||||||
|  | 									controls-position="right" | ||||||
|  | 								/> | ||||||
|  | 							</el-form-item> | ||||||
|  | 						</el-col> | ||||||
|  | 						<el-col :md="12" :sm="24" v-if="mgroupName=='黑化'||mgroupName=='退火'"> | ||||||
|  | 							<el-form-item label="每层数量"> | ||||||
|  | 								<el-input-number | ||||||
|  | 									v-model="count_cell" | ||||||
|  | 									:min="0" | ||||||
|  | 									class="width-100" | ||||||
|  | 									@change="countCellChanges" | ||||||
|  | 									controls-position="right" | ||||||
|  | 								/> | ||||||
|  | 							</el-form-item> | ||||||
|  | 						</el-col> | ||||||
|  | 						<el-col :md="12" :sm="24" v-if="mgroupName=='黑化'||mgroupName=='退火'"> | ||||||
|  | 							<el-form-item label="开始层数"> | ||||||
|  | 								<el-input-number | ||||||
|  | 									v-model="cell_start" | ||||||
|  | 									:min="0" | ||||||
|  | 									class="width-100" | ||||||
|  | 									@change="cellStartChanges" | ||||||
| 									controls-position="right" | 									controls-position="right" | ||||||
| 								/> | 								/> | ||||||
| 							</el-form-item> | 							</el-form-item> | ||||||
|  | @ -71,7 +94,12 @@ | ||||||
| 						</el-col> | 						</el-col> | ||||||
| 					</el-row> | 					</el-row> | ||||||
| 					<template v-if="mgroupName=='黑化'||mgroupName=='退火'"> | 					<template v-if="mgroupName=='黑化'||mgroupName=='退火'"> | ||||||
| 						<el-row style="margin-bottom:10px" v-for="(item, $index) in count_notok_json" :key="item"> | 						<el-row> | ||||||
|  | 							<el-col :span="7">层数:</el-col> | ||||||
|  | 							<el-col :span="7">抽检数:</el-col> | ||||||
|  | 							<el-col :span="7">不合格数:</el-col> | ||||||
|  | 						</el-row> | ||||||
|  | 						<el-row style="margin-bottom:10px" v-for="(item, $index) in mlogbdefect_h" :key="item"> | ||||||
| 							<el-col :span="7"> | 							<el-col :span="7"> | ||||||
| 								<el-input-number | 								<el-input-number | ||||||
| 									style="width:90%" | 									style="width:90%" | ||||||
|  | @ -85,7 +113,7 @@ | ||||||
| 							<el-col :span="7"> | 							<el-col :span="7"> | ||||||
| 								<el-input-number | 								<el-input-number | ||||||
| 									style="width:90%" | 									style="width:90%" | ||||||
| 									v-model="item.count_sampling" | 									v-model="item.count_test" | ||||||
| 									:min="0" | 									:min="0" | ||||||
| 									class="width-100" | 									class="width-100" | ||||||
| 									placeholder="抽检数" | 									placeholder="抽检数" | ||||||
|  | @ -98,7 +126,7 @@ | ||||||
| 									v-model="item.count" | 									v-model="item.count" | ||||||
| 									:min="0" | 									:min="0" | ||||||
| 									class="width-100" | 									class="width-100" | ||||||
| 									placeholder="总数" | 									placeholder="不合格数" | ||||||
| 									controls-position="right" | 									controls-position="right" | ||||||
| 								/> | 								/> | ||||||
| 							</el-col> | 							</el-col> | ||||||
|  | @ -111,121 +139,12 @@ | ||||||
| 							</el-col> | 							</el-col> | ||||||
| 						</el-row> | 						</el-row> | ||||||
| 					</template> | 					</template> | ||||||
| 					<el-row v-else> | 					<el-row  v-if="mgroupName!=='黑化'&&mgroupName!=='退火'&&qct_defects.length>0"> | ||||||
| 						<el-col :md="12" :sm="24"> | 						<el-col>不良统计</el-col> | ||||||
| 							<el-form-item label="划伤"> | 						<el-col :md="12" :sm="24" v-for="item in qct_defects" :key="item.id"> | ||||||
|  | 							<el-form-item :label="item.defect_name"> | ||||||
| 								<el-input-number | 								<el-input-number | ||||||
| 									v-model="form.count_n_hs" | 									v-model="defectform[item.defect_name]" | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="气泡"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_qp" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="水纹"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_swen" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="崩边"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_bb" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="雾面"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_wm" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="小崩边"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_xbb" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="麻点"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_md" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="线痕"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_xh" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="破损"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_ps" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 						<!-- <el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="棕圈"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_zq" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> --> |  | ||||||
| 						<el-col :md="12" :sm="24"> |  | ||||||
| 							<el-form-item label="其他"> |  | ||||||
| 								<el-input-number |  | ||||||
| 									v-model="form.count_n_qt" |  | ||||||
| 									:min="0" | 									:min="0" | ||||||
| 									class="width-100" | 									class="width-100" | ||||||
| 									controls-position="right" | 									controls-position="right" | ||||||
|  | @ -234,50 +153,6 @@ | ||||||
| 							</el-form-item> | 							</el-form-item> | ||||||
| 						</el-col> | 						</el-col> | ||||||
| 					</el-row> | 					</el-row> | ||||||
| 					 |  | ||||||
| 					<!-- <el-row> |  | ||||||
| 						<el-col :span="24"> |  | ||||||
| 							<el-form-item label="前道不良"> |  | ||||||
| 								<el-button |  | ||||||
| 									type="primary" |  | ||||||
| 									icon="el-icon-plus" |  | ||||||
| 									@click="notok_add" |  | ||||||
| 								></el-button> |  | ||||||
| 							</el-form-item> |  | ||||||
| 						</el-col> |  | ||||||
| 					</el-row> |  | ||||||
| 					<el-row style="margin-bottom:10px" v-for="(item, $index) in notokList" :key="item"> |  | ||||||
| 						<el-col :span="10"> |  | ||||||
| 							<el-select v-model="item.file"  |  | ||||||
| 							style="width:90%" |  | ||||||
| 								placeholder="请选择不合格项"> |  | ||||||
| 								<el-option |  | ||||||
| 									v-for="notok in notokOptions" |  | ||||||
| 									:key="notok.value" |  | ||||||
| 									:label="notok.name" |  | ||||||
| 									:value="notok.value" |  | ||||||
| 								> |  | ||||||
| 								</el-option> |  | ||||||
| 							</el-select> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :span="12"> |  | ||||||
| 							<el-input-number |  | ||||||
| 								style="width:90%" |  | ||||||
| 									v-model="item.value" |  | ||||||
| 									:min="0" |  | ||||||
| 									class="width-100" |  | ||||||
| 									controls-position="right" |  | ||||||
| 									@change="countChange" |  | ||||||
| 								/> |  | ||||||
| 						</el-col> |  | ||||||
| 						<el-col :span="2"> |  | ||||||
| 							<el-button |  | ||||||
| 									type="danger" |  | ||||||
| 									icon="el-icon-delete" |  | ||||||
| 									@click="notok_del( $index)" |  | ||||||
| 								></el-button> |  | ||||||
| 						</el-col> |  | ||||||
| 					</el-row> --> |  | ||||||
| 				</el-form> | 				</el-form> | ||||||
| 			</el-main> | 			</el-main> | ||||||
| 			<el-footer> | 			<el-footer> | ||||||
|  | @ -294,37 +169,16 @@ export default { | ||||||
| 	data() { | 	data() { | ||||||
| 		return { | 		return { | ||||||
| 			loading: false, | 			loading: false, | ||||||
|  | 			mlogbItem:{}, | ||||||
| 			//表单数据 | 			//表单数据 | ||||||
| 			form: { | 			form: { | ||||||
| 				batch: null, | 				batch: null, | ||||||
| 				count_real: 0, | 				count_real: 0, | ||||||
| 				count_ok: 0, | 				count_ok: 0, | ||||||
| 				count_notok: 0, | 				count_notok: 0, | ||||||
| 				count_n_hs: 0, | 				mlogbdefect:[], | ||||||
| 				count_n_qp: 0, | 				mlogbindefect:[], | ||||||
| 				count_n_swen: 0, |  | ||||||
| 				count_n_bb: 0, |  | ||||||
| 				count_n_xbb:0, |  | ||||||
| 				count_n_md: 0, |  | ||||||
| 				count_n_xh: 0, |  | ||||||
| 				count_n_ps: 0, |  | ||||||
| 				count_n_qt: 0, |  | ||||||
| 				count_n_wm: 0, |  | ||||||
| 				count_n_zq:0 |  | ||||||
| 			}, | 			}, | ||||||
| 			notokOptions:[ |  | ||||||
| 				{name:"划伤",value:'count_n_hs'}, |  | ||||||
| 				{name:"气泡",value:'count_n_qp'}, |  | ||||||
| 				{name:"水纹",value:'count_n_swen'}, |  | ||||||
| 				{name:"崩边",value:'count_n_bb'}, |  | ||||||
| 				{name:"小崩边",value:'count_n_xbb'}, |  | ||||||
| 				{name:"麻点",value:'count_n_md'}, |  | ||||||
| 				{name:"划伤",value:'count_n_xh'}, |  | ||||||
| 				{name:"破损",value:'count_n_ps'}, |  | ||||||
| 				{name:"其他",value:'count_n_qt'}, |  | ||||||
| 				{name:"雾面",value:'count_n_wm'}, |  | ||||||
| 				{name:"棕圈",value:'count_n_zq'}, |  | ||||||
| 			], |  | ||||||
| 			//验证规则 | 			//验证规则 | ||||||
| 			rules: { | 			rules: { | ||||||
| 				batch: [ | 				batch: [ | ||||||
|  | @ -342,8 +196,14 @@ export default { | ||||||
| 					}, | 					}, | ||||||
| 				], | 				], | ||||||
| 			}, | 			}, | ||||||
|  | 			defectform:{}, | ||||||
|  | 			cells:0, | ||||||
|  | 			cell_start:1, | ||||||
|  | 			count_cell:50, | ||||||
| 			options: [], | 			options: [], | ||||||
| 			count_notok_json:[], | 			material_out:'', | ||||||
|  | 			qct_defects:[], | ||||||
|  | 			mlogbdefect_h:[], | ||||||
| 			materialOptions: [], | 			materialOptions: [], | ||||||
| 			visible: false, | 			visible: false, | ||||||
| 			isSaveing: false, | 			isSaveing: false, | ||||||
|  | @ -358,33 +218,58 @@ export default { | ||||||
| 	methods: { | 	methods: { | ||||||
| 		open(data) { | 		open(data) { | ||||||
| 			this.visible = true; | 			this.visible = true; | ||||||
| 			Object.assign(this.form, data); | 			this.mlogbItem = data; | ||||||
|  | 			this.form.batch = data.batch; | ||||||
|  | 			this.form.count_real =this.form.count_ok= data.count_real; | ||||||
|  | 			this.material_out = data.material_out; | ||||||
| 			this.mgroupName = data.mgroup_name; | 			this.mgroupName = data.mgroup_name; | ||||||
| 			console.log(this.form); | 			this.cells = data.count_real/this.count_cell; | ||||||
|  | 			this.cellStartChanges(); | ||||||
|  | 			this.getdefects(); | ||||||
|  | 		}, | ||||||
|  | 		getdefects(){ | ||||||
|  | 			let that = this; | ||||||
|  | 			if(that.mlogbItem.qct!==null){ | ||||||
|  | 				that.$API.qm.qct.item.req(that.mlogbItem.qct).then((res) => { | ||||||
|  | 					res.qct_defects.forEach((item) => { | ||||||
|  | 						that.defectform[item.defect_name] = 0; | ||||||
|  | 					}) | ||||||
|  | 					that.qct_defects=res.qct_defects; | ||||||
|  | 				}) | ||||||
|  | 			} | ||||||
| 		}, | 		}, | ||||||
| 		notok_add(){ | 		notok_add(){ | ||||||
| 			this.count_notok_json.push({notok:'qt',count:null,floor:null,count_sampling:null}); | 			this.mlogbdefect_h.push({defect:'',count:null,floor:null,count_test:null}); | ||||||
| 		}, | 		}, | ||||||
| 		notok_del(index){ | 		notok_del(index){ | ||||||
| 			this.count_notok_json.splice(index, 1) | 			this.mlogbdefect_h.splice(index, 1) | ||||||
| 		}, | 		}, | ||||||
| 		countChange() { | 		countChange() { | ||||||
| 			this.form.count_notok = | 			console.log('change'); | ||||||
| 				this.form.count_n_hs + | 			let that = this; | ||||||
| 				this.form.count_n_qp + | 			that.form.count_notok = 0; | ||||||
| 				this.form.count_n_swen + | 			that.qct_defects.forEach(item => { | ||||||
| 				this.form.count_n_bb + | 				if(item.defect_okcate==30){ | ||||||
| 				this.form.count_n_xbb + | 			    	that.form.count_notok += that.defectform[item.defect_name]; | ||||||
| 				this.form.count_n_md + | 				} | ||||||
| 				this.form.count_n_xh + | 			}) | ||||||
| 				this.form.count_n_ps + | 			that.form.count_ok = that.form.count_real - that.form.count_notok; | ||||||
| 				this.form.count_n_zq + |  | ||||||
| 				this.form.count_n_qt + |  | ||||||
| 				this.form.count_n_wm; |  | ||||||
| 				this.form.count_ok = this.form.count_real - this.form.count_notok; |  | ||||||
| 		}, | 		}, | ||||||
| 		countChanges(){ | 		cellStartChanges(){ | ||||||
| 			this.form.count_ok = this.form.count_real - this.form.count_notok; | 			this.mlogbdefect_h = []; | ||||||
|  | 			for(let i=0;i<this.cells;i++){ | ||||||
|  | 				let obj = {}; | ||||||
|  | 				obj.floor=this.cell_start+i; | ||||||
|  | 				obj.count_test = this.count_cell; | ||||||
|  | 				obj.count = 0; | ||||||
|  | 				obj.defect=""; | ||||||
|  | 				this.mlogbdefect_h.push(obj) | ||||||
|  | 			} | ||||||
|  | 			console.log(this.mlogbdefect_h) | ||||||
|  | 		}, | ||||||
|  | 		countCellChanges(){ | ||||||
|  | 			this.cells = this.form.count_real/this.count_cell; | ||||||
|  | 			this.cellStartChanges(); | ||||||
| 		}, | 		}, | ||||||
| 		//表单提交方法 | 		//表单提交方法 | ||||||
| 		submit() { | 		submit() { | ||||||
|  | @ -395,31 +280,35 @@ export default { | ||||||
| 					that.form.mlog = that.mlog; | 					that.form.mlog = that.mlog; | ||||||
| 					let sum =  0; | 					let sum =  0; | ||||||
| 					if(that.mgroupName=='黑化'||that.mgroupName=='退火'){ | 					if(that.mgroupName=='黑化'||that.mgroupName=='退火'){ | ||||||
| 						let total = 0; | 						that.form.count_notok = 0; | ||||||
| 						that.count_notok_json.forEach(item => { | 						that.mlogbdefect_h.forEach(item => { | ||||||
| 							total+=item.count; | 							item.defect = that.qct_defects[0].defect; | ||||||
|  | 							that.form.count_notok =item.count; | ||||||
| 						}); | 						}); | ||||||
| 						this.form.count_notok = total; | 						that.form.count_ok = that.form.count_real -that.form.count_notok; | ||||||
| 						this.form.count_notok_json = this.count_notok_json; | 						that.form.mlogbdefect = that.mlogbdefect_h; | ||||||
|  | 
 | ||||||
| 					}else{ | 					}else{ | ||||||
| 						this.form.count_notok = | 						that.form.count_notok = 0; | ||||||
| 						this.form.count_n_hs + | 						that.qct_defects.forEach(item => { | ||||||
| 						this.form.count_n_qp + | 							if(item.defect_okcate==30){ | ||||||
| 						this.form.count_n_swen + | 								that.form.count_notok += that.defectform[item.defect_name] ; | ||||||
| 						this.form.count_n_bb + |  | ||||||
| 						this.form.count_n_xbb + |  | ||||||
| 						this.form.count_n_md + |  | ||||||
| 						this.form.count_n_xh + |  | ||||||
| 						this.form.count_n_ps + |  | ||||||
| 						this.form.count_n_zq + |  | ||||||
| 						this.form.count_n_qt + |  | ||||||
| 						this.form.count_n_wm; |  | ||||||
| 							} | 							} | ||||||
| 					sum = this.form.count_ok + this.form.count_notok; | 							let obj = {}; | ||||||
| 					if (sum - this.form.count_real == 0) { | 							obj.defect = item.defect; | ||||||
| 						that.$API.wpm.mlogb.updateOut | 							obj.count = that.defectform[item.defect_name]; | ||||||
| 							.req(that.form.id, that.form) | 							obj.mlogb = that.mlogbItem.id; | ||||||
| 							.then((res) => { | 							this.form.mlogbdefect.push(obj); | ||||||
|  | 
 | ||||||
|  | 						}) | ||||||
|  | 						that.form.count_ok = that.form.count_real -that.form.count_notok; | ||||||
|  | 					} | ||||||
|  | 					sum = that.form.count_ok + that.form.count_notok; | ||||||
|  | 					let obj_form = {}; | ||||||
|  | 					obj_form.count_real = that.form.count_real; | ||||||
|  | 					obj_form.mlogbdefect = that.form.mlogbdefect; | ||||||
|  | 					if (sum - that.form.count_real == 0) { | ||||||
|  | 						that.$API.wpm.mlogb.updateOut.req(that.mlogbItem.id, obj_form).then((res) => { | ||||||
| 							that.isSaveing = false; | 							that.isSaveing = false; | ||||||
| 							that.$emit("success"); | 							that.$emit("success"); | ||||||
| 							that.visible = false; | 							that.visible = false; | ||||||
|  | @ -429,7 +318,8 @@ export default { | ||||||
| 							that.isSaveing = false; | 							that.isSaveing = false; | ||||||
| 						}); | 						}); | ||||||
| 					} else { | 					} else { | ||||||
| 						this.$message.error("使用数量与合格数不合格数数量不对等"); | 						that.isSaveing = false; | ||||||
|  | 						that.$message.error("使用数量与合格数不合格数数量不对等"); | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			}); | 			}); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue