|
@@ -64,6 +64,11 @@
|
|
</el-input>
|
|
</el-input>
|
|
</template>
|
|
</template>
|
|
</vxe-table-column>
|
|
</vxe-table-column>
|
|
|
|
+ <vxe-table-column field="isPreInvoice" align="center" title="是否预开票" :edit-render="{}">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ {{$dictUtils.getDictLabel('is_pre_invoice', scope.row.isPreInvoice, '')}}
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
<!-- <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
|
|
<!-- <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
|
|
<!-- <template v-slot:edit="scope">-->
|
|
<!-- <template v-slot:edit="scope">-->
|
|
<!-- <el-input :readonly="true" placeholder="请填写委托方" v-model="scope.row.clientName"/>-->
|
|
<!-- <el-input :readonly="true" placeholder="请填写委托方" v-model="scope.row.clientName"/>-->
|
|
@@ -784,6 +789,8 @@
|
|
import WorkClientBillingChooseRadio from '@/views/cw/workClientInfo/WorkClientBillingChooseRadio'
|
|
import WorkClientBillingChooseRadio from '@/views/cw/workClientInfo/WorkClientBillingChooseRadio'
|
|
import XEUtils from 'xe-utils'
|
|
import XEUtils from 'xe-utils'
|
|
import userService from "../../../api/sys/userService";
|
|
import userService from "../../../api/sys/userService";
|
|
|
|
+ import processService from '@/api/flowable/processService'
|
|
|
|
+ import CommonApi from '@/api/cw/common/CommonApi'
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
businessId: {
|
|
businessId: {
|
|
@@ -857,7 +864,9 @@
|
|
billingId: '',
|
|
billingId: '',
|
|
reportType: '',
|
|
reportType: '',
|
|
tenantId: '',
|
|
tenantId: '',
|
|
- actualDrawerEmailAddress: ''
|
|
|
|
|
|
+ actualDrawerEmailAddress: '',
|
|
|
|
+ procDefId: '',
|
|
|
|
+ procDefKey: '',
|
|
},
|
|
},
|
|
programRow: '',
|
|
programRow: '',
|
|
bankList: [],
|
|
bankList: [],
|
|
@@ -873,9 +882,12 @@
|
|
userName: this.$store.state.user.name,
|
|
userName: this.$store.state.user.name,
|
|
userEmail: '',
|
|
userEmail: '',
|
|
userPhone: '',
|
|
userPhone: '',
|
|
|
|
+ isPreInvoice:''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ commonApi: null,
|
|
created() {
|
|
created() {
|
|
|
|
+ this.commonApi = new CommonApi()
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
},
|
|
},
|
|
@@ -1175,16 +1187,15 @@
|
|
this.inputForm.status = '2'
|
|
this.inputForm.status = '2'
|
|
} else if (status === 'agree') {
|
|
} else if (status === 'agree') {
|
|
// 审核同意
|
|
// 审核同意
|
|
- // if (this.commonJS.isEmpty(this.inputForm.programId)){
|
|
|
|
- // if (this.$store.state.user.office.name==='总经办'){
|
|
|
|
- // this.inputForm.status= '5'
|
|
|
|
- // }else {
|
|
|
|
- // this.inputForm.status= '2'
|
|
|
|
- // }
|
|
|
|
- // }else {
|
|
|
|
- // this.inputForm.status = '5'
|
|
|
|
- // }
|
|
|
|
- this.inputForm.status = '5'
|
|
|
|
|
|
+ await this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
|
|
|
|
+ if (this.commonJS.isNotEmpty(data)) {
|
|
|
|
+ if (data === '发票管理员审核') {
|
|
|
|
+ this.inputForm.status = '5'
|
|
|
|
+ }else {
|
|
|
|
+ this.inputForm.status = '2'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
} else if (status === 'reapply') {
|
|
} else if (status === 'reapply') {
|
|
this.inputForm.status = '2'
|
|
this.inputForm.status = '2'
|
|
}
|
|
}
|
|
@@ -1273,6 +1284,22 @@
|
|
throw new Error('开票时间不可以为空')
|
|
throw new Error('开票时间不可以为空')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.isPreInvoice) && this.isPreInvoice === '1'){
|
|
|
|
+ await processService.getByName('会计-预开票申请').then((data) => {
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ this.inputForm.procDefId = data.id
|
|
|
|
+ this.inputForm.procDefKey = data.key
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ await processService.getByName('会计-发票申请').then((data) => {
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ this.inputForm.procDefId = data.id
|
|
|
|
+ this.inputForm.procDefKey = data.key
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.loading = true
|
|
this.loading = true
|
|
@@ -1359,6 +1386,10 @@
|
|
this.$message.warning('非项目,只能有一条非项目数据')
|
|
this.$message.warning('非项目,只能有一条非项目数据')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if (this.inputForm.financeInvoiceBaseDTOList[0].isPreInvoice === '1') {
|
|
|
|
+ this.$message.warning('只能有一条预开票项目')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.$refs.baseTable.insertAt({})
|
|
this.$refs.baseTable.insertAt({})
|
|
this.inputForm.financeInvoiceBaseDTOList.push({})
|
|
this.inputForm.financeInvoiceBaseDTOList.push({})
|
|
@@ -1410,37 +1441,60 @@
|
|
this.programRow = rowIndex
|
|
this.programRow = rowIndex
|
|
},
|
|
},
|
|
getProgram(rows) {
|
|
getProgram(rows) {
|
|
- rows.forEach((item, index) => {
|
|
|
|
- this.inputForm.programId = item.id
|
|
|
|
- if (index === 0) {
|
|
|
|
- let r = this.inputForm.financeInvoiceBaseDTOList[this.programRow]
|
|
|
|
- r.programName = item.projectName
|
|
|
|
- r.contractName = item.contractName
|
|
|
|
- r.programNo = item.projectNumber
|
|
|
|
- r.contractId = item.contractId
|
|
|
|
- r.programId = item.id
|
|
|
|
- r.reportNo = item.reportNo
|
|
|
|
- r.reportType = item.reportType
|
|
|
|
- this.inputForm.financeInvoiceBaseDTOList[this.programRow] = r
|
|
|
|
- this.bj1 = rows.bj1
|
|
|
|
- } else {
|
|
|
|
- let r = {
|
|
|
|
- programName: item.projectName,
|
|
|
|
- contractName: item.contractName,
|
|
|
|
- programNo: item.projectNumber,
|
|
|
|
- contractId: item.contractId,
|
|
|
|
- programId: item.id,
|
|
|
|
- reportNo: item.reportNo,
|
|
|
|
- reportType: item.reportType
|
|
|
|
|
|
+ console.log('rows',rows)
|
|
|
|
+ if(rows.length >0){
|
|
|
|
+ rows.forEach((item, index) => {
|
|
|
|
+ this.inputForm.programId = item.id
|
|
|
|
+ if (index === 0) {
|
|
|
|
+ let r = this.inputForm.financeInvoiceBaseDTOList[this.programRow]
|
|
|
|
+ r.programName = item.projectName
|
|
|
|
+ r.contractName = item.contractName
|
|
|
|
+ r.programNo = item.projectNumber
|
|
|
|
+ r.contractId = item.contractId
|
|
|
|
+ r.programId = item.id
|
|
|
|
+ r.reportNo = item.reportNo
|
|
|
|
+ r.reportType = item.reportType
|
|
|
|
+ r.isPreInvoice = item.isPreInvoice
|
|
|
|
+ this.inputForm.financeInvoiceBaseDTOList[this.programRow] = r
|
|
|
|
+ this.bj1 = rows.bj1
|
|
|
|
+ } else {
|
|
|
|
+ let r = {
|
|
|
|
+ programName: item.projectName,
|
|
|
|
+ contractName: item.contractName,
|
|
|
|
+ programNo: item.projectNumber,
|
|
|
|
+ contractId: item.contractId,
|
|
|
|
+ programId: item.id,
|
|
|
|
+ reportNo: item.reportNo,
|
|
|
|
+ reportType: item.reportType,
|
|
|
|
+ isPreInvoice : item.isPreInvoice
|
|
|
|
+ }
|
|
|
|
+ this.$refs.baseTable.insertAt(r)
|
|
|
|
+ this.inputForm.financeInvoiceBaseDTOList.push(r)
|
|
|
|
+ this.bj1 = rows.bj1
|
|
|
|
+ this.baseKey = Math.random()
|
|
|
|
+
|
|
}
|
|
}
|
|
- this.$refs.baseTable.insertAt(r)
|
|
|
|
- this.inputForm.financeInvoiceBaseDTOList.push(r)
|
|
|
|
- this.bj1 = rows.bj1
|
|
|
|
- this.baseKey = Math.random()
|
|
|
|
|
|
+ })
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ this.programRow = ''
|
|
|
|
+ }else {
|
|
|
|
+ let r = {
|
|
|
|
+ programName: rows.projectName,
|
|
|
|
+ contractName: rows.contractName,
|
|
|
|
+ programNo: rows.projectNumber,
|
|
|
|
+ contractId: rows.contractId,
|
|
|
|
+ programId: rows.id,
|
|
|
|
+ reportNo: rows.reportNo,
|
|
|
|
+ reportType: rows.reportType,
|
|
|
|
+ isPreInvoice : rows.isPreInvoice
|
|
}
|
|
}
|
|
- })
|
|
|
|
- this.$forceUpdate()
|
|
|
|
- this.programRow = ''
|
|
|
|
|
|
+ this.$refs.baseTable.insertAt(r)
|
|
|
|
+ this.inputForm.financeInvoiceBaseDTOList[0] = r
|
|
|
|
+ this.baseKey = Math.random()
|
|
|
|
+ this.isPreInvoice = rows.isPreInvoice
|
|
|
|
+ this.inputForm.programId = rows.id
|
|
|
|
+ }
|
|
|
|
+
|
|
// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
|
|
// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
|
|
},
|
|
},
|
|
openContractForm() {
|
|
openContractForm() {
|