|
@@ -176,7 +176,8 @@
|
|
|
procInsIdReturn: '',
|
|
|
processDefinitionIdReturn: '',
|
|
|
returnId: '',
|
|
|
- returnCause: ''
|
|
|
+ returnCause: '',
|
|
|
+ returnFiles: []
|
|
|
},
|
|
|
keyWatch: ''
|
|
|
}
|
|
@@ -281,7 +282,8 @@
|
|
|
procInsIdReturn: '',
|
|
|
processDefinitionIdReturn: '',
|
|
|
returnId: '',
|
|
|
- returnCause: ''
|
|
|
+ returnCause: '',
|
|
|
+ returnFiles: []
|
|
|
}
|
|
|
if (method === 'add') {
|
|
|
this.title = `新建领用类型`
|
|
@@ -297,12 +299,16 @@
|
|
|
}
|
|
|
if (this.status === 'audit' || this.status === 'taskFormDetail') {
|
|
|
method = 'view'
|
|
|
+ } else {
|
|
|
+ method = 'edit'
|
|
|
}
|
|
|
this.loading = true
|
|
|
this.$refs.inputForm.resetFields()
|
|
|
this.collectService.findByReturnId(this.inputForm.id).then(({data}) => {
|
|
|
+ this.$refs.uploadComponent.clearUpload()
|
|
|
if (this.inputForm.id !== 'false') {
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
+ this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
if (this.commonJS.isEmpty(this.inputForm.handledByOffice)) {
|
|
|
this.inputForm.handledByOffice = JSON.parse(localStorage.getItem('user')).officeDTO.id
|
|
|
}
|
|
@@ -322,7 +328,11 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.$refs.uploadComponent.newUpload('view', this.inputForm.files, 'material_collect')
|
|
|
+ console.log(this.inputForm, data)
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.returnFiles)) {
|
|
|
+ this.inputForm.returnFiles = []
|
|
|
+ }
|
|
|
+ this.$refs.uploadComponent.newUpload(method, this.inputForm.returnFiles, 'collect_return')
|
|
|
this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
this.loading = false
|
|
|
} else {
|
|
@@ -460,10 +470,10 @@
|
|
|
this.loading = false
|
|
|
return
|
|
|
}
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.files)) {
|
|
|
- this.inputForm.files = []
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.returnFiles)) {
|
|
|
+ this.inputForm.returnFiles = []
|
|
|
}
|
|
|
- this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
+ this.inputForm.returnFiles = this.$refs.uploadComponent.getDataList()
|
|
|
this.inputForm.statusReturn = '1'
|
|
|
this.collectService.saveReturn(this.inputForm).then(({data}) => {
|
|
|
callback()
|
|
@@ -484,8 +494,8 @@
|
|
|
this.loading = false
|
|
|
return
|
|
|
}
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.files)) {
|
|
|
- this.inputForm.files = []
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.returnFiles)) {
|
|
|
+ this.inputForm.returnFiles = []
|
|
|
}
|
|
|
if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
|
|
|
this.$message.error('至少填写一条领用详情信息')
|
|
@@ -517,7 +527,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
+ this.inputForm.returnFiles = this.$refs.uploadComponent.getDataList()
|
|
|
this.inputForm.statusReturn = '2'
|
|
|
this.collectService.saveReturn(this.inputForm).then(({data}) => {
|
|
|
this.inputForm.id = data.businessId
|
|
@@ -543,10 +553,10 @@
|
|
|
this.loading = false
|
|
|
return
|
|
|
}
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.files)) {
|
|
|
- this.inputForm.files = []
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.returnFiles)) {
|
|
|
+ this.inputForm.returnFiles = []
|
|
|
}
|
|
|
- this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
+ this.inputForm.returnFiles = this.$refs.uploadComponent.getDataList()
|
|
|
// this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(({data}) => {
|
|
|
// if (this.commonJS.isNotEmpty(data)) {
|
|
|
// if (data === '仓库管理员审核') {
|