| @@ -163,10 +163,10 @@ Page({ | |||
| UTIL.showToastNoneIcon('请输入合同名称!'); | |||
| return false; | |||
| }else if(this.data.form.firstParty===''||this.data.form.firstParty==null){ //甲方 | |||
| UTIL.showToastNoneIcon('请输入单据编码!'); | |||
| UTIL.showToastNoneIcon('请输入甲方名称!'); | |||
| return false; | |||
| }else if(this.data.form.secondParty===''||this.data.form.secondParty==null){ //乙方 | |||
| UTIL.showToastNoneIcon('请输入备注说明!'); | |||
| UTIL.showToastNoneIcon('请输入乙方名称!'); | |||
| return false; | |||
| }else if(this.data.form.collectionPay === ''||this.data.form.collectionPay==null){//收付款类型 | |||
| UTIL.showToastNoneIcon('收付款类型不能为空!'); | |||
| @@ -178,7 +178,7 @@ Page({ | |||
| UTIL.showToastNoneIcon('合同金额不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.buildingTime === ''||this.data.form.buildingTime==null){//签订日期 | |||
| UTIL.showToastNoneIcon('合同金额不能为空!'); | |||
| UTIL.showToastNoneIcon('签订日期不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.startTime === ''||this.data.form.startTime==null){//开始日期 | |||
| UTIL.showToastNoneIcon('开始日期不能为空!'); | |||
| @@ -193,7 +193,7 @@ Page({ | |||
| UTIL.showToastNoneIcon('已结款不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.contractionStatus === ''||this.data.form.contractionStatus==null){//合同状态 | |||
| UTIL.showToastNoneIcon('单价不能为空!'); | |||
| UTIL.showToastNoneIcon('合同状态不能为空!'); | |||
| return false; | |||
| }else if(this.data.status=='0'){ | |||
| this.setData({'status':1}) | |||
| @@ -202,6 +202,7 @@ Page({ | |||
| data.method = "POST"; | |||
| UTIL.httpRequest(API.URL_POST_CONTRACTUPDATE,data,{ | |||
| success: (res) => { | |||
| this.setData({'status':0}) | |||
| if(res.code == 200){ | |||
| UTIL.showToastNoneIcon('修改成功'); | |||
| setTimeout(function(){ | |||
| @@ -222,7 +223,6 @@ Page({ | |||
| this.setData({'status':0}) | |||
| }, | |||
| complete: function (response) { | |||
| this.setData({'status':0}) | |||
| wx.hideNavigationBarLoading(); | |||
| } | |||
| }) | |||
| @@ -231,6 +231,7 @@ Page({ | |||
| data.method = "POST"; | |||
| UTIL.httpRequest(API.URL_POST_CONTRACTADD,data,{ | |||
| success: (res) => { | |||
| this.setData({'status':0}) | |||
| if(res.code == 200){ | |||
| UTIL.showToastNoneIcon('新增成功'); | |||
| setTimeout(function(){ | |||
| @@ -248,10 +249,8 @@ Page({ | |||
| } else { | |||
| showToastNoneIcon(API.MSG_FAIL_HTTP); | |||
| } | |||
| this.setData({'status':0}) | |||
| }, | |||
| complete: function (response) { | |||
| this.setData({'status':0}) | |||
| wx.hideNavigationBarLoading(); | |||
| } | |||
| }) | |||