Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

wangchao 3 years ago
parent
commit
0e69b2deed
1 changed files with 21 additions and 19 deletions
  1. 21 19
      pages/erpbusiness/edit_quality_testing.vue

+ 21 - 19
pages/erpbusiness/edit_quality_testing.vue

@@ -421,26 +421,28 @@
 			},
 			alertBtn() {
 				var that = this
-				that.gridList.flag = 2
-				this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
-					res => {
-						if (res.data.code == "200") {
-							that.gridList.flag = 1
-							that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that
-								.gridList).then(res => {
-								if (res.data.code == "200") {
-									that.$api.msg('提交成功!')
-									setTimeout(function() {
+				that.gridList.reWaterContent=that.gridList.waterContent
+				if(that.gridList.buckleMiscellaneous){
+					that.gridList.reBuckleMiscellaneous=that.gridList.buckleMiscellaneous
+				}
+				that.gridList.flag = 1
+				this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection',that.gridList).then(res => {
+					if(res.data.code=="200"){
+						that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {id:that.gridList.id,flag:2}).then(res => {
+							if(res.data.code=="200"){
+								that.$api.msg('提交成功!')
+								setTimeout(function(){
 										uni.navigateBack({})
-									}, 1000)
-								} else {
-									that.$api.msg('提交失败')
-								}
-							})
-						} else {
-							that.$api.msg('提交失败')
-						}
-					})
+								},1000)
+							}else{
+								that.$api.msg('提交失败')
+							}
+						})			
+						
+					}else{
+						that.$api.msg('提交失败')
+					}
+				})
 			},
 			waterContentChange() {
 				var that = this