zxz 1 năm trước cách đây
mục cha
commit
a54f79d1fe
1 tập tin đã thay đổi với 22 bổ sung16 xóa
  1. 22 16
      pages/erpbusiness/add_quality_testing.vue

+ 22 - 16
pages/erpbusiness/add_quality_testing.vue

@@ -1707,10 +1707,10 @@
 							console.log(res)
 							this.printId = res.data.data
 							uni.hideLoading()
-							if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
-									-1) ||
-								(this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
-									-1)) {
+							// if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
+							// 		-1) ||
+							// 	(this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
+							// 		-1)) {
 								if (res.data.code == 200) {
 									console.log("addQualityInspection")
 									this.$api.msg('提交成功')
@@ -1725,12 +1725,15 @@
 									}
 									console.log('that.gridList', this.gridList)
 									// uni.navigateBack({})
-								} else {
+								} 
+								else if(res.data.message == '货物种类与类型不符,请确认!'){
+									this.$api.msg(res.data.message)
+								}else {
 									this.$api.msg('提交失败')
 								}
-							} else {
-								this.$api.msg('货物种类与类型不符,请确认')
-							}
+							// } else {
+							// 	this.$api.msg('货物种类与类型不符,请确认')
+							// }
 						})
 					return
 				}
@@ -1741,10 +1744,10 @@
 							console.log("addQualityInspection")
 							this.printId = res.data.data
 							uni.hideLoading()
-							if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
-									-1) ||
-								(this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
-									-1)) {
+							// if ((this.gridList.goodsName.indexOf("潮粮") != -1 && this.gridList.type.indexOf("潮") !=
+							// 		-1) ||
+							// 	(this.gridList.goodsName.indexOf("潮粮") == -1 && this.gridList.type.indexOf("干") !=
+							// 		-1)) {
 								if (res.data.code == 200) {
 									this.$api.msg('提交成功')
 									this.gridList.warehouseId = this.cangid
@@ -1760,12 +1763,15 @@
 									)
 									console.log('that.gridList', this.gridList)
 									// uni.navigateBack({})
-								} else {
+								} else if(res.data.message == '货物种类与类型不符,请确认!'){
+									this.$api.msg(res.data.message)
+								}
+								else {
 									this.$api.msg('提交失败')
 								}
-							} else {
-								this.$api.msg('货物种类与类型不符,请确认')
-							}
+							// } else {
+							// 	this.$api.msg('货物种类与类型不符,请确认')
+							// }
 						})
 				}
 			},