|
@@ -1041,6 +1041,7 @@
|
|
|
this.inputForm = {
|
|
|
reimbursementType: '1',
|
|
|
userName: '',
|
|
|
+ userId: '',
|
|
|
no: '',
|
|
|
department: '',
|
|
|
reimDate: '',
|
|
@@ -1114,7 +1115,7 @@
|
|
|
}
|
|
|
this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
|
|
|
if (this.commonJS.isNotEmpty(data)) {
|
|
|
- if (data === '报销人审核' && this.status != 'taskFormDetail') {
|
|
|
+ if ((data === '报销人审核'|| data === '报销人调整') && this.status != 'taskFormDetail') {
|
|
|
method = 'add'
|
|
|
}else {
|
|
|
method = 'view'
|
|
@@ -1540,30 +1541,30 @@
|
|
|
// throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
|
|
|
// }
|
|
|
//判定附件中xml文件数量是否小于电子发票报销行数量
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
|
|
|
- //获取电子报销行数
|
|
|
- let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
|
|
|
- if(invoiceReimbursementCount>0){
|
|
|
- //获取附件信息以xml结尾的附件数量
|
|
|
- var flag = false;
|
|
|
- var countFlag = 0;
|
|
|
-
|
|
|
- for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
|
|
|
- //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
|
|
|
- const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
|
|
|
- var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
|
|
|
- if(fileNameSuffix === "xml" ) {
|
|
|
- flag = true;
|
|
|
- countFlag ++;
|
|
|
- }
|
|
|
- }
|
|
|
- if(!flag){
|
|
|
- this.$message.error("已填写数电发票信息,请上传对应发票的xml文件!")
|
|
|
- this.loading = false
|
|
|
- throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
|
|
|
+ // //获取电子报销行数
|
|
|
+ // let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
|
|
|
+ // if(invoiceReimbursementCount>0){
|
|
|
+ // //获取附件信息以xml结尾的附件数量
|
|
|
+ // var flag = false;
|
|
|
+ // var countFlag = 0;
|
|
|
+ //
|
|
|
+ // for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
|
|
|
+ // //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
|
|
|
+ // const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
|
|
|
+ // var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
|
|
|
+ // if(fileNameSuffix === "xml" ) {
|
|
|
+ // flag = true;
|
|
|
+ // countFlag ++;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if(!flag){
|
|
|
+ // this.$message.error("已填写数电发票信息,请上传对应发票的xml文件!")
|
|
|
+ // this.loading = false
|
|
|
+ // throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
this.inputForm.fileStatus = '2'
|
|
|
this.inputForm.assignee = this.inputForm.createById
|
|
|
this.reimbursementApprovalService.saveFile(this.inputForm).then((data) => {
|
|
@@ -1593,12 +1594,12 @@
|
|
|
// 通过
|
|
|
async agreeForm (callback) {
|
|
|
this.loading = true
|
|
|
- this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
|
|
|
- if (data.fileStatus !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
|
- this.loading = false
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- } else {
|
|
|
+ // this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
|
|
|
+ // if (data.fileStatus !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
|
+ // this.loading = false
|
|
|
+ // this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ // throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ // } else {
|
|
|
this.$refs['inputForm'].validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
@@ -1620,13 +1621,13 @@
|
|
|
console.log('in',this.inputForm)
|
|
|
|
|
|
this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
|
|
|
- this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
- if(this.inputForm.invoiceReimbursementFiles<=0){
|
|
|
- this.$message.error("请上传数电发票发票xml文件!")
|
|
|
- this.loading = false
|
|
|
- throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
|
|
|
- }
|
|
|
- this.dataFiltering()
|
|
|
+ // this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
+ // if(this.inputForm.invoiceReimbursementFiles<=0){
|
|
|
+ // this.$message.error("请上传数电发票发票xml文件!")
|
|
|
+ // this.loading = false
|
|
|
+ // throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
|
|
|
+ // }
|
|
|
+ // this.dataFiltering()
|
|
|
this.inputForm.fileStatus = '2'
|
|
|
this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
|
|
|
if (this.commonJS.isNotEmpty(data)) {
|
|
@@ -1646,50 +1647,58 @@
|
|
|
this.loading = false
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
- })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
// 修改状态
|
|
|
updateStatusById (type, callback) {
|
|
|
if (type === 'reject') {
|
|
|
this.loading = true
|
|
|
- this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
|
|
|
- if (data.fileStatus !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
|
- this.loading = false
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- }
|
|
|
- if (this.$refs.invoiceReimbursementUpLoadComponent.checkProgress()) {
|
|
|
- this.loading = false
|
|
|
- throw new Error()
|
|
|
- }
|
|
|
-
|
|
|
- if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
- this.loading = false
|
|
|
- throw new Error()
|
|
|
- } else {
|
|
|
+ // this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
|
|
|
+ // if (data.fileStatus !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
|
+ // this.loading = false
|
|
|
+ // this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ // throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ // }
|
|
|
+ // if (this.$refs.invoiceReimbursementUpLoadComponent.checkProgress()) {
|
|
|
+ // this.loading = false
|
|
|
+ // throw new Error()
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
+ // this.loading = false
|
|
|
+ // throw new Error()
|
|
|
+ // } else {
|
|
|
this.inputForm.fileStatus = '4'
|
|
|
- this.reimbursementApprovalService.updateFileStatusById(this.inputForm).then(() => {
|
|
|
- this.loading = false
|
|
|
- callback()
|
|
|
+ this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
|
|
|
+ if (this.commonJS.isNotEmpty(data)) {
|
|
|
+ if (data === '财务审核') {
|
|
|
+ console.log('this.inputForm.userId', this.inputForm.userId)
|
|
|
+ this.inputForm.assignee = this.inputForm.userId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.reimbursementApprovalService.updateFileStatusById(this.inputForm).then(() => {
|
|
|
+ this.loading = false
|
|
|
+ callback(this.inputForm.assignee)
|
|
|
+ })
|
|
|
})
|
|
|
- }
|
|
|
- })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
} else if (type === 'hold') {
|
|
|
this.loading = true
|
|
|
- this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
|
|
|
- if (data.fileStatus !== '4') { // 审核状态不是“驳回”,就弹出提示
|
|
|
- this.loading = false
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- } else {
|
|
|
+ // this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
|
|
|
+ // if (data.fileStatus !== '4') { // 审核状态不是“驳回”,就弹出提示
|
|
|
+ // this.loading = false
|
|
|
+ // this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ // throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ // } else {
|
|
|
this.inputForm.fileStatus = '1'
|
|
|
this.reimbursementApprovalService.updateFileStatusById(this.inputForm).then(() => {
|
|
|
this.loading = false
|
|
|
callback()
|
|
|
})
|
|
|
- }
|
|
|
- })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
}
|
|
|
},
|
|
|
footerMethod ({ columns, data }) {
|