|
@@ -226,6 +226,7 @@
|
|
import pick from 'lodash.pick'
|
|
import pick from 'lodash.pick'
|
|
import ProjectRecordsForm from '@/views/cw/projectRecords/ProjectRecordsForm'
|
|
import ProjectRecordsForm from '@/views/cw/projectRecords/ProjectRecordsForm'
|
|
import ContractNameForm from '@/views/cw/workContract/ContractNameForm'
|
|
import ContractNameForm from '@/views/cw/workContract/ContractNameForm'
|
|
|
|
+ import userService from '@/api/sys/UserService'
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -254,7 +255,8 @@
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
orders: []
|
|
orders: []
|
|
},
|
|
},
|
|
- loading: false
|
|
|
|
|
|
+ loading: false,
|
|
|
|
+ isZj:false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// reimbursementService: null,
|
|
// reimbursementService: null,
|
|
@@ -323,25 +325,48 @@
|
|
let tabTitle = `发起流程【中审-报销审批】`
|
|
let tabTitle = `发起流程【中审-报销审批】`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [中审-报销审批]`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [中审-报销审批]`
|
|
console.log(this.processDefinitionId)
|
|
console.log(this.processDefinitionId)
|
|
- 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: '/zs/reimbursement/info/InfoList'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.isZj){
|
|
|
|
+ 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: '/zs/reimbursement/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: '/zs/reimbursement/info/InfoList'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
// 修改
|
|
// 修改
|
|
edit (row) {
|
|
edit (row) {
|
|
@@ -359,29 +384,56 @@
|
|
// 读取流程表单
|
|
// 读取流程表单
|
|
let tabTitle = `发起流程【中审-报销审批】`
|
|
let tabTitle = `发起流程【中审-报销审批】`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [中审-报销审批]`
|
|
let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [中审-报销审批]`
|
|
- taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
|
|
- businessId: row.id,
|
|
|
|
- businessTable: 'zs_reimbursement_info',
|
|
|
|
- status: status
|
|
|
|
- }).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: status,
|
|
|
|
- title: tabTitle,
|
|
|
|
- formType: data.formType,
|
|
|
|
- formUrl: data.formUrl,
|
|
|
|
- formTitle: processTitle,
|
|
|
|
- businessTable: 'zs_reimbursement_info',
|
|
|
|
- businessId: row.id,
|
|
|
|
- isShow: false,
|
|
|
|
- routePath: '/zs/reimbursement/info/InfoList'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.isZj){
|
|
|
|
+ taskService.getTaskDef({ procDefId: this.processDefinitionIdSzbx,
|
|
|
|
+ businessId: row.id,
|
|
|
|
+ businessTable: 'zs_reimbursement_info',
|
|
|
|
+ status: status
|
|
|
|
+ }).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: status,
|
|
|
|
+ title: tabTitle,
|
|
|
|
+ formType: data.formType,
|
|
|
|
+ formUrl: data.formUrl,
|
|
|
|
+ formTitle: processTitle,
|
|
|
|
+ businessTable: 'zs_reimbursement_info',
|
|
|
|
+ businessId: row.id,
|
|
|
|
+ isShow: false,
|
|
|
|
+ routePath: '/zs/reimbursement/info/InfoList'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
|
|
+ businessId: row.id,
|
|
|
|
+ businessTable: 'zs_reimbursement_info',
|
|
|
|
+ status: status
|
|
|
|
+ }).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: status,
|
|
|
|
+ title: tabTitle,
|
|
|
|
+ formType: data.formType,
|
|
|
|
+ formUrl: data.formUrl,
|
|
|
|
+ formTitle: processTitle,
|
|
|
|
+ businessTable: 'zs_reimbursement_info',
|
|
|
|
+ businessId: row.id,
|
|
|
|
+ isShow: false,
|
|
|
|
+ routePath: '/zs/reimbursement/info/InfoList'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
todo (row) {
|
|
todo (row) {
|
|
let cUser = false
|
|
let cUser = false
|
|
@@ -427,6 +479,12 @@
|
|
// this.$refs.projectForm.init('view', id)
|
|
// this.$refs.projectForm.init('view', id)
|
|
this.$refs.projectRecordsForm.init('view', id)
|
|
this.$refs.projectRecordsForm.init('view', id)
|
|
},
|
|
},
|
|
|
|
+ checkIsZj(){
|
|
|
|
+ userService.isZj().then((data)=>{
|
|
|
|
+ this.isZj = data
|
|
|
|
+ console.log('this.isZj',this.isZj)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 获取数据列表
|
|
// 获取数据列表
|
|
refreshList () {
|
|
refreshList () {
|
|
this.loading = true
|
|
this.loading = true
|
|
@@ -450,6 +508,7 @@
|
|
// this.tablePage.total = data.total
|
|
// this.tablePage.total = data.total
|
|
// this.loading = false
|
|
// this.loading = false
|
|
// })
|
|
// })
|
|
|
|
+ this.checkIsZj()
|
|
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
|
|
@@ -462,6 +521,20 @@
|
|
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
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ processService.getByName('中审-所长报销-电子发票').then((data) => {
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ this.processDefinitionIdSzbxInvoice = data.id
|
|
|
|
+ this.procDefKeySzbxInvoice = data.key
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
del (id) {
|
|
del (id) {
|
|
@@ -493,13 +566,24 @@
|
|
// 流程详情
|
|
// 流程详情
|
|
detail (row) {
|
|
detail (row) {
|
|
if (!this.commonJS.isEmpty(row.type) && row.type !== '1') {
|
|
if (!this.commonJS.isEmpty(row.type) && row.type !== '1') {
|
|
- if (row.reimbursementType === '1') {
|
|
|
|
- this.procDefId = this.processDefinitionIdInvoice
|
|
|
|
- } else if (row.reimbursementType === '0') {
|
|
|
|
- {
|
|
|
|
- this.procDefId = this.processDefinitionId
|
|
|
|
|
|
+ if (this.isZj){
|
|
|
|
+ if (row.reimbursementType === '1') {
|
|
|
|
+ this.procDefId = this.processDefinitionIdSzbxInvoice
|
|
|
|
+ } else if (row.reimbursementType === '0') {
|
|
|
|
+ {
|
|
|
|
+ this.procDefId = this.processDefinitionIdSzbx
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ if (row.reimbursementType === '1') {
|
|
|
|
+ this.procDefId = this.processDefinitionIdInvoice
|
|
|
|
+ } else if (row.reimbursementType === '0') {
|
|
|
|
+ {
|
|
|
|
+ this.procDefId = this.processDefinitionId
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
procInsId: row.procInsId,
|
|
procInsId: row.procInsId,
|
|
procDefId: this.procDefId
|
|
procDefId: this.procDefId
|