|
@@ -390,6 +390,8 @@
|
|
|
procDefKey: '',
|
|
|
processDefinitionInvalidId: '',
|
|
|
procDefInvalidKey: '',
|
|
|
+ processDefinitionIdPreInvoice: '',
|
|
|
+ procDefKeyPreInvoice: '',
|
|
|
isAdmin: false,
|
|
|
financeInvoiceBaseDTOList:[],
|
|
|
recordType:''
|
|
@@ -541,6 +543,12 @@
|
|
|
this.procDefInvalidKey = data.key
|
|
|
}
|
|
|
})
|
|
|
+ processService.getByName('会计-预开票申请').then((data) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.processDefinitionIdPreInvoice = data.id
|
|
|
+ this.procDefKeyPreInvoice = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 当前页
|
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
@@ -621,36 +629,62 @@
|
|
|
},
|
|
|
// 发起发票申请审批
|
|
|
invoicePush (row) {
|
|
|
- // 读取流程表单
|
|
|
- let title = `发起流程【会计-发票申请】`
|
|
|
- let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[会计-发票申请]`
|
|
|
- let status = 'startAndHold'
|
|
|
- if (row.status === '3') {
|
|
|
- status = 'startAndClose'
|
|
|
- } else if (row.status === '4') {
|
|
|
- status = 'reapplyFlag'
|
|
|
- }
|
|
|
- taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
|
- businessId: row.id,
|
|
|
- businessTable: 'cw_finance_invoice'}).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,
|
|
|
- title: title,
|
|
|
- formType: data.formType,
|
|
|
- formUrl: data.formUrl,
|
|
|
- formTitle: processTitle,
|
|
|
- businessTable: 'finance_invoice',
|
|
|
- businessId: row.id,
|
|
|
- isShow: 'false',
|
|
|
- status: status,
|
|
|
- routePath: '/cw/invoice/InvoiceList'
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ // 读取流程表单
|
|
|
+ let title = `发起流程【会计-发票申请】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[会计-发票申请]`
|
|
|
+ let status = 'startAndHold'
|
|
|
+ if (row.status === '3') {
|
|
|
+ status = 'startAndClose'
|
|
|
+ } else if (row.status === '4') {
|
|
|
+ status = 'reapplyFlag'
|
|
|
+ }
|
|
|
+ if (this.commonJS.isNotEmpty(row.isPreInvoice) && row.isPreInvoice === '1'){
|
|
|
+ taskService.getTaskDef({ procDefId: this.processDefinitionIdPreInvoice,
|
|
|
+ businessId: row.id,
|
|
|
+ businessTable: 'cw_finance_invoice'}).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
+ procDefId: this.processDefinitionIdPreInvoice,
|
|
|
+ procDefKey: this.procDefKeyPreInvoice,
|
|
|
+ title: title,
|
|
|
+ formType: data.formType,
|
|
|
+ formUrl: data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'finance_invoice',
|
|
|
+ businessId: row.id,
|
|
|
+ isShow: 'false',
|
|
|
+ status: status,
|
|
|
+ routePath: '/cw/invoice/InvoiceList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ taskService.getTaskDef({ procDefId: this.processDefinitionId,
|
|
|
+ businessId: row.id,
|
|
|
+ businessTable: 'cw_finance_invoice'}).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,
|
|
|
+ title: title,
|
|
|
+ formType: data.formType,
|
|
|
+ formUrl: data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'finance_invoice',
|
|
|
+ businessId: row.id,
|
|
|
+ isShow: 'false',
|
|
|
+ status: status,
|
|
|
+ routePath: '/cw/invoice/InvoiceList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
// 发起发票作废审批
|
|
|
invoiceInvalidPush (row) {
|
|
@@ -691,23 +725,44 @@
|
|
|
if (row.status === '6' || row.status === '7' || row.status === '8' || row.status === '9') {
|
|
|
this.invoiceInvalidDetail(row)
|
|
|
} else {
|
|
|
- taskService.getTaskDef({
|
|
|
- procInsId: row.procInsId,
|
|
|
- procDefId: this.processDefinitionId
|
|
|
- }).then((data) => {
|
|
|
- this.$router.push({
|
|
|
- path: '/flowable/task/TaskFormDetail',
|
|
|
- query: {
|
|
|
- ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
- isShow: 'false',
|
|
|
- readOnly: true,
|
|
|
- title: '会计-发票申请' + '流程详情',
|
|
|
- formTitle: '会计-发票申请' + '流程详情',
|
|
|
- businessId: row.id,
|
|
|
- status: 'reback'
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ if (this.commonJS.isNotEmpty(row.isPreInvoice) && row.isPreInvoice === '1'){
|
|
|
+ taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId,
|
|
|
+ procDefId: this.processDefinitionIdPreInvoice
|
|
|
+ }).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '会计-发票申请' + '流程详情',
|
|
|
+ formTitle: '会计-发票申请' + '流程详情',
|
|
|
+ businessId: row.id,
|
|
|
+ status: 'reback'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ taskService.getTaskDef({
|
|
|
+ procInsId: row.procInsId,
|
|
|
+ procDefId: this.processDefinitionId
|
|
|
+ }).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskFormDetail',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
+ isShow: 'false',
|
|
|
+ readOnly: true,
|
|
|
+ title: '会计-发票申请' + '流程详情',
|
|
|
+ formTitle: '会计-发票申请' + '流程详情',
|
|
|
+ businessId: row.id,
|
|
|
+ status: 'reback'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
},
|