ccj 1 éve
szülő
commit
cd92d6a5b6
1 módosított fájl, 178 hozzáadás és 154 törlés
  1. 178 154
      pages/erpbusiness/add_quality_testing.vue

+ 178 - 154
pages/erpbusiness/add_quality_testing.vue

@@ -1794,54 +1794,61 @@
 																		}
 																	}
 																	that.gridList.warehouseInOutId =
-																		res
-																		.data.data
-																	that.$api.doRequest('post',
-																			'/qualityInspectionManagement/api/addQualityInspection',
-																			that.gridList)
-																		.then(res => {
-																			that.printId=res.data.data
-																			uni.hideLoading()
-																			if (res.data.code ==
-																				200) {
-																				that.$api.msg(
-																					'提交成功')
-																				that.gridList
-																					.warehouseId =
-																					that
-																					.cangid
-																				that.gridList
-																					.compId =
-																					uni
-																					.getStorageSync(
-																						'pcUserInfo'
-																					)
-																					.compId
-																				uni.setStorageSync(
-																					"quality_print",
-																					that
-																					.gridList)
-																				if (that.utils
-																					.getCurrectRoles(
-																						'acquisitionQuality.initial'
-																					)) {
-																					that.isShowPrint =
-																						true
+																		res.data.data
+																	if(that.gridList.warehouseInOutId){
+																		that.$api.doRequest('post',
+																				'/qualityInspectionManagement/api/addQualityInspection',
+																				that.gridList)
+																			.then(res => {
+																				that.printId=res.data.data
+																				uni.hideLoading()
+																				if (res.data.code ==
+																					200) {
+																					that.$api.msg(
+																						'提交成功')
+																					that.gridList
+																						.warehouseId =
+																						that
+																						.cangid
+																					that.gridList
+																						.compId =
+																						uni
+																						.getStorageSync(
+																							'pcUserInfo'
+																						)
+																						.compId
+																					uni.setStorageSync(
+																						"quality_print",
+																						that
+																						.gridList)
+																					if (that.utils
+																						.getCurrectRoles(
+																							'acquisitionQuality.initial'
+																						)) {
+																						that.isShowPrint =
+																							true
+																					} else {
+																						uni.navigateBack({})
+																					}
+																					uni.setStorageSync('checkcustomer',{})
+																					console.log(
+																						'that.gridList',
+																						that
+																						.gridList)
+																					// uni.navigateBack({})
 																				} else {
-																					uni.navigateBack({})
+																					that.$api.msg(
+																						'提交失败')
 																				}
-																				uni.setStorageSync('checkcustomer',{})
-																				console.log(
-																					'that.gridList',
-																					that
-																					.gridList)
-																				// uni.navigateBack({})
-																			} else {
-																				that.$api.msg(
-																					'提交失败')
-																			}
-																		})
-																		}
+																			})
+																	}
+																	else{
+																		uni.hideLoading()
+																	}
+																}
+																else{
+																	uni.hideLoading()
+																}
 																})
 																
 														}
@@ -1861,33 +1868,39 @@
 										.then(res => {
 
 											that.gridList.warehouseInOutId = res.data.data
-											that.$api.doRequest('post',
-													'/qualityInspectionManagement/api/addQualityInspection',
-													that.gridList)
-												.then(res => {
-													console.log(res)
-													that.printId=res.data.data
-													uni.hideLoading()
-													if (res.data.code == 200) {
-														that.$api.msg('提交成功')
-														that.gridList.warehouseId = that.cangid
-														that.gridList.compId = uni.getStorageSync(
-															'pcUserInfo').compId
-														uni.setStorageSync("quality_print", that
-															.gridList)
-														if (that.utils.getCurrectRoles(
-																'acquisitionQuality.initial')) {
-															that.isShowPrint = true
+											if(that.gridList.warehouseInOutId){
+												that.$api.doRequest('post',
+														'/qualityInspectionManagement/api/addQualityInspection',
+														that.gridList)
+													.then(res => {
+														console.log(res)
+														that.printId=res.data.data
+														uni.hideLoading()
+														if (res.data.code == 200) {
+															that.$api.msg('提交成功')
+															that.gridList.warehouseId = that.cangid
+															that.gridList.compId = uni.getStorageSync(
+																'pcUserInfo').compId
+															uni.setStorageSync("quality_print", that
+																.gridList)
+															if (that.utils.getCurrectRoles(
+																	'acquisitionQuality.initial')) {
+																that.isShowPrint = true
+															} else {
+																uni.navigateBack({})
+															}
+												
+															console.log('that.gridList', that.gridList)
+															// uni.navigateBack({})
 														} else {
-															uni.navigateBack({})
+															that.$api.msg('提交失败')
 														}
-
-														console.log('that.gridList', that.gridList)
-														// uni.navigateBack({})
-													} else {
-														that.$api.msg('提交失败')
-													}
-												})
+													})
+											}
+											else{
+												uni.hideLoading()
+											}
+											
 										})
 								}
 
@@ -1982,64 +1995,69 @@
 																			}
 																			that.gridList.warehouseInOutId =
 																			res.data.data
-																			that.$api.doRequest(
-																				'post',
-																				'/qualityInspectionManagement/api/addQualityInspection',
-																				that.gridList)
-																				.then(res => {
-																					that.printId=res.data.data
-																					uni.hideLoading()
-																					if (res
-																						.data
-																						.code ==
-																						200
-																					) {
-																						that.$api
-																							.msg(
-																								'提交成功'
-																							)
-																						that.gridList
-																							.warehouseId =
-																							that
-																							.cangid
-																						that.gridList
-																							.compId =
-																							uni
-																							.getStorageSync(
-																								'pcUserInfo'
-																							)
-																							.compId
-																						uni.setStorageSync(
-																							"quality_print",
-																							that
-																							.gridList
-																						)
-																						if (that
-																							.utils
-																							.getCurrectRoles(
-																								'acquisitionQuality.initial'
-																							)
+																			if(that.gridList.warehouseInOutId){
+																				that.$api.doRequest(
+																					'post',
+																					'/qualityInspectionManagement/api/addQualityInspection',
+																					that.gridList)
+																					.then(res => {
+																						that.printId=res.data.data
+																						uni.hideLoading()
+																						if (res
+																							.data
+																							.code ==
+																							200
 																						) {
-																							that.isShowPrint =
-																								true
-																						} else {
-																							uni.navigateBack({})
-																						}
-
-																						console
-																							.log(
-																								'that.gridList',
+																							that.$api
+																								.msg(
+																									'提交成功'
+																								)
+																							that.gridList
+																								.warehouseId =
+																								that
+																								.cangid
+																							that.gridList
+																								.compId =
+																								uni
+																								.getStorageSync(
+																									'pcUserInfo'
+																								)
+																								.compId
+																							uni.setStorageSync(
+																								"quality_print",
 																								that
 																								.gridList
 																							)
-																						// uni.navigateBack({})
-																					} else {
-																						that.$api
-																							.msg(
-																								'提交失败'
-																							)
-																					}
-																				})
+																							if (that
+																								.utils
+																								.getCurrectRoles(
+																									'acquisitionQuality.initial'
+																								)
+																							) {
+																								that.isShowPrint =
+																									true
+																							} else {
+																								uni.navigateBack({})
+																							}
+																				
+																							console
+																								.log(
+																									'that.gridList',
+																									that
+																									.gridList
+																								)
+																							// uni.navigateBack({})
+																						} else {
+																							that.$api
+																								.msg(
+																									'提交失败'
+																								)
+																						}
+																					})
+																			}
+																			else{
+																				uni.hideLoading()
+																			}
 																		})
 																}
 															}
@@ -2059,37 +2077,43 @@
 												.then(res => {
 
 													that.gridList.warehouseInOutId = res.data.data
-													that.$api.doRequest('post',
-															'/qualityInspectionManagement/api/addQualityInspection',
-															that.gridList)
-														.then(res => {
-															that.printId=res.data.data
-															uni.hideLoading()
-															if (res.data.code == 200) {
-																that.$api.msg('提交成功')
-																that.gridList.warehouseId =
-																	that.cangid
-																that.gridList.compId = uni
-																	.getStorageSync(
-																		'pcUserInfo').compId
-																uni.setStorageSync(
-																	"quality_print", that
-																	.gridList)
-																if (that.utils.getCurrectRoles(
-																		'acquisitionQuality.initial'
-																	)) {
-																	that.isShowPrint = true
+													
+													if(that.gridList.warehouseInOutId){
+														that.$api.doRequest('post',
+																'/qualityInspectionManagement/api/addQualityInspection',
+																that.gridList)
+															.then(res => {
+																that.printId=res.data.data
+																uni.hideLoading()
+																if (res.data.code == 200) {
+																	that.$api.msg('提交成功')
+																	that.gridList.warehouseId =
+																		that.cangid
+																	that.gridList.compId = uni
+																		.getStorageSync(
+																			'pcUserInfo').compId
+																	uni.setStorageSync(
+																		"quality_print", that
+																		.gridList)
+																	if (that.utils.getCurrectRoles(
+																			'acquisitionQuality.initial'
+																		)) {
+																		that.isShowPrint = true
+																	} else {
+																		uni.navigateBack({})
+																	}
+														
+																	console.log('that.gridList',
+																		that.gridList)
+																	// uni.navigateBack({})
 																} else {
-																	uni.navigateBack({})
+																	that.$api.msg('提交失败')
 																}
-
-																console.log('that.gridList',
-																	that.gridList)
-																// uni.navigateBack({})
-															} else {
-																that.$api.msg('提交失败')
-															}
-														})
+															})
+													}	
+													else{
+														uni.hideLoading()
+													}
 												})
 										}