|
@@ -272,7 +272,8 @@
|
|
orders: []
|
|
orders: []
|
|
},
|
|
},
|
|
loading: false,
|
|
loading: false,
|
|
- isAdmin: false
|
|
|
|
|
|
+ isAdmin: false,
|
|
|
|
+ isKjsz:false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
reimbursementApprovalService: null,
|
|
reimbursementApprovalService: null,
|
|
@@ -308,7 +309,7 @@
|
|
},
|
|
},
|
|
user () {
|
|
user () {
|
|
this.create = this.$store.state.user.id
|
|
this.create = this.$store.state.user.id
|
|
- console.log('createId', this.create)
|
|
|
|
|
|
+ console.log('createId', this.$store.state.user)
|
|
return this.$store.state.user
|
|
return this.$store.state.user
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -330,33 +331,65 @@
|
|
this.isAdmin = data
|
|
this.isAdmin = data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ //查询当前用户是否是会计所长
|
|
|
|
+ checkIsKjsz(){
|
|
|
|
+ userService.isKjsz().then((data)=>{
|
|
|
|
+ this.isKjsz = data
|
|
|
|
+ console.log('this.isKjsz',this.isKjsz)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
viewContract (id) {
|
|
viewContract (id) {
|
|
this.$refs.contractNameForm.init('view', id)
|
|
this.$refs.contractNameForm.init('view', id)
|
|
},
|
|
},
|
|
// 新增
|
|
// 新增
|
|
add () {
|
|
add () {
|
|
- // 读取流程表单
|
|
|
|
- let tabTitle = `发起流程【会计-报销审批】`
|
|
|
|
- let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [会计-报销审批]`
|
|
|
|
- taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
|
|
- status: 'startAndHold'}).then((data) => {
|
|
|
|
- this.$router.push({
|
|
|
|
- path: '/flowable/task/TaskForm',
|
|
|
|
- query: {
|
|
|
|
- ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
|
- procDefId: this.processDefinitionId,
|
|
|
|
- procDefKey: this.procDefKey,
|
|
|
|
- status: 'startAndHold',
|
|
|
|
- title: tabTitle,
|
|
|
|
- formType: data.formType,
|
|
|
|
- formUrl: data.formUrl,
|
|
|
|
- formTitle: processTitle,
|
|
|
|
- businessId: 'false',
|
|
|
|
- isShow: false,
|
|
|
|
- routePath: '/cw/reimbursementApproval/info/InfoList'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ // 读取流程表单
|
|
|
|
+ let tabTitle = `发起流程【会计-报销审批】`
|
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [会计-报销审批]`
|
|
|
|
+ //当前用户是否是会计所长
|
|
|
|
+ if (this.isKjsz){
|
|
|
|
+ taskService.getTaskDef({ procDefId: this.processDefinitionIdSzbx,
|
|
|
|
+ status: 'startAndHold'}).then((data) => {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
|
+ query: {
|
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
|
+ procDefId: this.processDefinitionIdSzbx,
|
|
|
|
+ procDefKey: this.procDefKeySzbx,
|
|
|
|
+ status: 'startAndHold',
|
|
|
|
+ title: tabTitle,
|
|
|
|
+ formType: data.formType,
|
|
|
|
+ formUrl: data.formUrl,
|
|
|
|
+ formTitle: processTitle,
|
|
|
|
+ businessId: 'false',
|
|
|
|
+ isShow: false,
|
|
|
|
+ routePath: '/cw/reimbursementApproval/info/InfoList'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
|
|
+ status: 'startAndHold'}).then((data) => {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
|
+ query: {
|
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
|
+ procDefId: this.processDefinitionId,
|
|
|
|
+ procDefKey: this.procDefKey,
|
|
|
|
+ status: 'startAndHold',
|
|
|
|
+ title: tabTitle,
|
|
|
|
+ formType: data.formType,
|
|
|
|
+ formUrl: data.formUrl,
|
|
|
|
+ formTitle: processTitle,
|
|
|
|
+ businessId: 'false',
|
|
|
|
+ isShow: false,
|
|
|
|
+ routePath: '/cw/reimbursementApproval/info/InfoList'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
// 修改
|
|
// 修改
|
|
edit (row) {
|
|
edit (row) {
|
|
@@ -438,6 +471,7 @@
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
this.checkIsAdmin()
|
|
this.checkIsAdmin()
|
|
|
|
+ this.checkIsKjsz()
|
|
processService.getByName('会计-报销审批').then((data) => {
|
|
processService.getByName('会计-报销审批').then((data) => {
|
|
if (!this.commonJS.isEmpty(data.id)) {
|
|
if (!this.commonJS.isEmpty(data.id)) {
|
|
this.processDefinitionId = data.id
|
|
this.processDefinitionId = data.id
|
|
@@ -450,6 +484,15 @@
|
|
this.procDefKeyInvoice = data.key
|
|
this.procDefKeyInvoice = data.key
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ processService.getByName('会计-所长报销').then((data) => {
|
|
|
|
+ console.log('data',data)
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ this.processDefinitionIdSzbx = data.id
|
|
|
|
+ this.procDefKeySzbx = data.key
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
del (id) {
|
|
del (id) {
|
|
@@ -483,6 +526,9 @@
|
|
this.procDefId = this.processDefinitionId
|
|
this.procDefId = this.processDefinitionId
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (this.isKjsz){
|
|
|
|
+ this.procDefId = this.processDefinitionIdSzbx
|
|
|
|
+ }
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
procInsId: row.procInsId,
|
|
procInsId: row.procInsId,
|
|
procDefId: this.procDefId
|
|
procDefId: this.procDefId
|