| @@ -802,7 +802,7 @@ | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
| this.uploadFiles1.map(rr => { | |||
| const params = new FormData(); | |||
| let params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| @@ -813,7 +813,7 @@ | |||
| })} | |||
| if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
| this.uploadFiles2.map(rr => { | |||
| const params = new FormData(); | |||
| let params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| @@ -824,7 +824,7 @@ | |||
| })} | |||
| if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
| this.uploadFiles3.map(rr => { | |||
| const params = new FormData(); | |||
| let params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| @@ -905,9 +905,9 @@ | |||
| this.projectForm.outId = response.data.id | |||
| this.infoForm.transferId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '1'); | |||
| if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | |||
| if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
| this.uploadFiles1.map(rr => { | |||
| const params = new FormData(); | |||
| let params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| @@ -915,9 +915,10 @@ | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| })} | |||
| if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
| this.uploadFiles2.map(rr => { | |||
| const params = new FormData(); | |||
| let params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| @@ -925,9 +926,10 @@ | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| })} | |||
| if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
| this.uploadFiles3.map(rr => { | |||
| const params = new FormData(); | |||
| let params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| @@ -935,28 +937,7 @@ | |||
| params.append("file", rr); | |||
| commonAttach(params).then((r) => { | |||
| }) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else if(this.form.capitalExpenditureType==4){ | |||
| addInfoto(this.infoForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }else{ | |||
| })} | |||
| if(this.form.capitalExpenditureType==2){ | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| @@ -977,8 +958,6 @@ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| @@ -658,7 +658,7 @@ | |||
| return; | |||
| } | |||
| } | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| @@ -703,7 +703,6 @@ | |||
| }) | |||
| }else{ | |||
| addCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles1.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", response.data.id); | |||
| @@ -819,37 +818,6 @@ | |||
| return; | |||
| } | |||
| } | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| addCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => {}) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else if(this.form.capitalExpenditureType==4){ | |||
| this.infoForm.transferId = response.data.id | |||
| addInfoto(this.infoForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }else{ | |||
| addCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles1.map(rr => { | |||
| @@ -910,7 +878,6 @@ | |||
| },2000) | |||
| } | |||
| }); | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| @@ -744,7 +744,7 @@ | |||
| return; | |||
| } | |||
| } | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '此申请单中未上传任何附件,是否确认提交?', | |||
| @@ -889,37 +889,6 @@ | |||
| return; | |||
| } | |||
| } | |||
| if(this.uploadFiles==null||this.uploadFiles.length==0){ | |||
| addCash(this.form).then((response) => { | |||
| this.chargeItme.map(res => { | |||
| res.cashId = response.data.id | |||
| addCashdetail(res).then(r => {}) | |||
| }) | |||
| if(this.form.capitalExpenditureType==2){ | |||
| this.projectForm.outId = response.data.id | |||
| this.$set(this.projectForm, "ynType", '2'); | |||
| addProjectto(this.projectForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else if(this.form.capitalExpenditureType==4){ | |||
| this.infoForm.transferId = response.data.id | |||
| addInfoto(this.infoForm).then(res => { | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| }) | |||
| }else{ | |||
| this.$toast.success('保存成功'); | |||
| setTimeout(function(){ | |||
| history.go(-1) | |||
| },2000) | |||
| } | |||
| }); | |||
| }else{ | |||
| addCash(this.form).then((response) => { | |||
| console.log(this.uploadFiles) | |||
| this.uploadFiles1.map(rr => { | |||
| @@ -980,7 +949,6 @@ | |||
| },2000) | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| payeeSelectChange(select, i) { | |||
| let obj = {}; | |||
| @@ -792,7 +792,7 @@ | |||
| if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
| this.uploadFiles1.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| params.append("fileType", "1"); | |||
| @@ -803,7 +803,7 @@ | |||
| if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
| this.uploadFiles2.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| params.append("fileType", "2"); | |||
| @@ -814,7 +814,7 @@ | |||
| if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
| this.uploadFiles3.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| params.append("fileType", "3"); | |||
| @@ -895,7 +895,7 @@ | |||
| if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){ | |||
| this.uploadFiles1.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| params.append("fileType", "1"); | |||
| @@ -906,7 +906,7 @@ | |||
| if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){ | |||
| this.uploadFiles2.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| params.append("fileType", "2"); | |||
| @@ -917,7 +917,7 @@ | |||
| if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){ | |||
| this.uploadFiles3.map(rr => { | |||
| const params = new FormData(); | |||
| params.append("tableId", this.form.id); | |||
| params.append("tableId", response.data.id); | |||
| params.append("tableName", "t_yinnong_transfer"); | |||
| params.append("bizPath", "transfer"); | |||
| params.append("fileType", "3"); | |||