|
@@ -75,7 +75,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
-<!-- <UpLoadComponent ref="uploadComponent"></UpLoadComponent>-->
|
|
|
+ <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
@@ -118,6 +118,7 @@
|
|
|
isPass:'',
|
|
|
isEmploy:'',
|
|
|
isPostpone:'',
|
|
|
+ files:[]
|
|
|
},
|
|
|
baseKey: '',
|
|
|
keyWatch: '',
|
|
@@ -144,7 +145,7 @@
|
|
|
computed: {
|
|
|
bus: {
|
|
|
get () {
|
|
|
- // this.$refs.uploadComponent.setDividerName('附件')
|
|
|
+ this.$refs.uploadComponent.setDividerName('附件')
|
|
|
return this.businessId
|
|
|
},
|
|
|
set (val) {
|
|
@@ -170,7 +171,7 @@
|
|
|
'loading': {
|
|
|
handler (newVal) {
|
|
|
this.$emit('changeLoading', newVal)
|
|
|
- // this.$refs.uploadComponent.changeLoading(newVal)
|
|
|
+ this.$refs.uploadComponent.changeLoading(newVal)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -190,6 +191,7 @@
|
|
|
isPass:'',
|
|
|
isEmploy:'',
|
|
|
isPostpone:'',
|
|
|
+ files:[]
|
|
|
}
|
|
|
this.inputForm.id = id
|
|
|
this.loading = false
|
|
@@ -201,6 +203,14 @@
|
|
|
console.log('this.inputForm.id', this.inputForm.id)
|
|
|
this.entryService.queryByApplyId(this.inputForm.id).then((data)=>{
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
+ if ('5' === data.status){
|
|
|
+ this.inputForm.reason = ''
|
|
|
+ this.inputForm.files = []
|
|
|
+ this.inputForm.isPass = ''
|
|
|
+ this.inputForm.isEmploy = ''
|
|
|
+ this.inputForm.isPostpone = ''
|
|
|
+ }
|
|
|
+
|
|
|
console.log('s',this.inputForm)
|
|
|
if (this.commonJS.isEmpty(this.inputForm.createName)){
|
|
|
this.inputForm.createName = this.$store.state.user.name
|
|
@@ -211,11 +221,14 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.createTime)){
|
|
|
this.inputForm.createTime=this.moment(new Date()).format('YYYY-MM-DD')
|
|
|
}
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.files)){
|
|
|
+ this.inputForm.files=[]
|
|
|
+ }
|
|
|
if (this.status === 'audit' || this.status === 'taskFormDetail') {
|
|
|
method = 'view'
|
|
|
}
|
|
|
console.log('me',method)
|
|
|
- // this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'jyHoliday',null,null,null,null,null)
|
|
|
+ this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'regular',null,null,null,null,null)
|
|
|
this.loading = false
|
|
|
})
|
|
|
userService.isBmzr().then((data)=>{
|
|
@@ -229,20 +242,21 @@
|
|
|
this.doSubmit('save', callback)
|
|
|
},
|
|
|
startForm(callback) {
|
|
|
- this.loading = true
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.id)) {
|
|
|
- this.entryService.queryByApplyId(this.inputForm.id).then((data) => {
|
|
|
- if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
|
|
|
- this.loading = false
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- throw new Error()
|
|
|
- } else {
|
|
|
- this.doSubmit('start', callback)
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.doSubmit('start', callback)
|
|
|
- }
|
|
|
+ this.doSubmit('start', callback)
|
|
|
+ // this.loading = true
|
|
|
+ // if (this.commonJS.isNotEmpty(this.inputForm.id)) {
|
|
|
+ // this.entryService.queryByApplyId(this.inputForm.id).then((data) => {
|
|
|
+ // if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
|
|
|
+ // this.loading = false
|
|
|
+ // this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ // throw new Error()
|
|
|
+ // } else {
|
|
|
+ // this.doSubmit('start', callback)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ //
|
|
|
+ // }
|
|
|
},
|
|
|
async agreeForm(callback) {
|
|
|
console.log('进入方法')
|
|
@@ -296,6 +310,7 @@
|
|
|
}
|
|
|
} else {
|
|
|
this.inputForm.status= '2'
|
|
|
+ this.inputForm.createTime = ''
|
|
|
if (this.inputForm.isPass ==='0'){
|
|
|
this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((da)=>{
|
|
|
if (this.commonJS.isNotEmpty(da)) {
|
|
@@ -364,12 +379,17 @@
|
|
|
// 表单提交
|
|
|
async doSubmit(status, callback) {
|
|
|
this.loading = true
|
|
|
+ if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
+ this.loading = false
|
|
|
+ return
|
|
|
+ }
|
|
|
console.log('5',this.inputForm)
|
|
|
if (status === 'save') {
|
|
|
// 暂存
|
|
|
this.loading = true
|
|
|
this.inputForm.status = '1'
|
|
|
- // this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
+ this.inputForm.createTime = ''
|
|
|
+ this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
this.entryService.saveApplyForm(this.inputForm).then((data) => {
|
|
|
callback(data.businessTable, data.businessId, this.inputForm,data.isPass,data.isEmploy)
|
|
|
this.loading = false
|
|
@@ -378,7 +398,8 @@
|
|
|
})
|
|
|
return
|
|
|
} else if (status === 'start') {
|
|
|
- // this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
+ this.inputForm.createTime = ''
|
|
|
+ this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
|
// 送审 待审核
|
|
|
this.inputForm.status = '2'
|
|
|
} else if (status === 'agree') {
|