|
|
@@ -37,13 +37,13 @@
|
|
|
</div>
|
|
|
<div v-if="tenantFlag === 'pg' && inputForm.sourceType === '1'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
- 项目报销详情<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
- <!-- <el-button style="margin-left: 20px" type="primary"
|
|
|
+ 项目报销详情
|
|
|
+ <el-button v-if="insertBtn" style="margin-left: 20px" type="primary"
|
|
|
:disabled="method === 'view' || status === 'audit' || status === 'taskFormDetail'" size="default"
|
|
|
@click="insertEvent('detail')" plain>
|
|
|
新增报销单
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
+ <span style="color: red;" v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<el-form inline :disabled="false" style="display: inline-block;">
|
|
|
<el-button v-if="this.isConfirm == 1" type="primary" size="default" style="margin-left: 10px;"
|
|
|
@click="allSelect('0')">全部取消</el-button>
|
|
|
@@ -182,13 +182,13 @@
|
|
|
</div>
|
|
|
<div v-else-if="tenantFlag === 'cw' && inputForm.sourceType === '1'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
- 项目报销详情<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
- <!-- <el-button style="margin-left: 20px" type="primary"
|
|
|
+ 项目报销详情
|
|
|
+ <el-button style="margin-left: 20px" type="primary" v-if="insertBtn"
|
|
|
:disabled="method === 'view' || status === 'audit' || status === 'taskFormDetail'" size="default"
|
|
|
@click="insertEvent('detail')" plain>
|
|
|
新增报销单
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
+ <span style="color: red;" v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<el-form inline :disabled="false" style="display: inline-block;">
|
|
|
<el-button v-if="this.isConfirm == 1" type="primary" size="default" style="margin-left: 10px;"
|
|
|
@click="allSelect('0')">全部取消</el-button>
|
|
|
@@ -327,13 +327,13 @@
|
|
|
</div>
|
|
|
<div v-else-if="tenantFlag !== 'pg' && inputForm.sourceType === '1'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
- 项目报销详情<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
- <!-- <el-button size="default" style="margin-left: 20px" type="primary"
|
|
|
+ 项目报销详情
|
|
|
+ <el-button v-if="insertBtn" size="default" style="margin-left: 20px" type="primary"
|
|
|
:disabled="method === 'view' || status === 'audit' || status === 'taskFormDetail'"
|
|
|
@click="insertEvent('detail')" plain>
|
|
|
新增报销单
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
+ <span style="color: red;" v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<el-form inline :disabled="false" style="display: inline-block;">
|
|
|
<el-button v-if="this.isConfirm == 1" type="primary" size="default" style="margin-left: 10px;"
|
|
|
@click="allSelect('0')">全部取消</el-button>
|
|
|
@@ -468,7 +468,7 @@
|
|
|
<div v-if="inputForm.sourceType === '2'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
合同报销详情<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
+ v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<!-- <el-button size="default" style="margin-left: 20px" type="primary"
|
|
|
:disabled="method === 'view' || status === 'audit' || status === 'taskFormDetail'"
|
|
|
@click="insertEvent('contract_detail')" plain>
|
|
|
@@ -590,13 +590,13 @@
|
|
|
</div>
|
|
|
<div v-if="inputForm.sourceType === '3' && tenantFlag === 'cw'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
- 报告报销详情<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
- <!-- <el-button size="default" style="margin-left: 20px" type="primary"
|
|
|
+ 报告报销详情
|
|
|
+ <el-button v-if="insertBtn" size="default" style="margin-left: 20px" type="primary"
|
|
|
:disabled="method === 'view' || status === 'audit' || status === 'taskFormDetail'"
|
|
|
@click="insertEvent('report_detail')" plain>
|
|
|
新增报销单
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
+ <span style="color: red;" v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<el-form inline :disabled="false" style="display: inline-block;">
|
|
|
<el-button v-if="this.isConfirm == 1" type="primary" size="default" style="margin-left: 10px;"
|
|
|
@click="allSelect('0')">全部取消</el-button>
|
|
|
@@ -736,13 +736,13 @@
|
|
|
</div>
|
|
|
<div v-else-if="inputForm.sourceType === '3' && tenantFlag !== 'cw'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
- 报告报销详情<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
- <!-- <el-button size="default" style="margin-left: 20px" type="primary"
|
|
|
+ 报告报销详情
|
|
|
+ <el-button v-if="insertBtn" size="default" style="margin-left: 20px" type="primary"
|
|
|
:disabled="method === 'view' || status === 'audit' || status === 'taskFormDetail'"
|
|
|
@click="insertEvent('report_detail')" plain>
|
|
|
新增报销单
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
+ <span style="color: red;" v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<el-form inline :disabled="false" style="display: inline-block;">
|
|
|
<el-button v-if="this.isConfirm == 1" type="primary" size="default" style="margin-left: 10px;"
|
|
|
@click="allSelect('0')">全部取消</el-button>
|
|
|
@@ -876,13 +876,13 @@
|
|
|
|
|
|
<div v-if="inputForm.sourceType === '4'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
- 其他报销详情<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
- <!-- <el-button size="default" style="margin-left: 20px" type="primary"
|
|
|
+ 其他报销详情
|
|
|
+ <el-button v-if="insertBtn" size="default" style="margin-left: 20px" type="primary"
|
|
|
:disabled="method === 'view' || status === 'audit' || status === 'taskFormDetail'"
|
|
|
@click="insertEvent('others')" plain>
|
|
|
新增报销单
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
+ <span style="color: red;" v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<el-form inline :disabled="false" style="display: inline-block;">
|
|
|
<el-button v-if="this.isConfirm == 1" type="primary" size="default" style="margin-left: 10px;"
|
|
|
@click="allSelect('0')">全部取消</el-button>
|
|
|
@@ -1017,12 +1017,12 @@
|
|
|
</div>
|
|
|
<div v-if="inputForm.sourceType === '5'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
- 采购报销详情<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
- <!-- <el-button size="default" style="margin-left: 20px" type="primary"
|
|
|
+ 采购报销详情
|
|
|
+ <el-button v-if="insertBtn" size="default" style="margin-left: 20px" type="primary"
|
|
|
:disabled="method === 'view' || this.formReadOnly" @click="insertEvent('procured')" plain>
|
|
|
新增报销单
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
+ <span style="color: red;" v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<el-form inline :disabled="false" style="display: inline-block;">
|
|
|
<el-button v-if="this.isConfirm == 1" type="primary" size="default" style="margin-left: 10px;"
|
|
|
@click="allSelect('0')">全部取消</el-button>
|
|
|
@@ -1136,13 +1136,13 @@
|
|
|
</div>
|
|
|
<div v-if="inputForm.sourceType === '8'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
- 中审项目报销详情<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
- <!-- <el-button size="default" style="margin-left: 20px" type="primary"
|
|
|
+ 中审项目报销详情
|
|
|
+ <el-button v-if="insertBtn" size="default" style="margin-left: 20px" type="primary"
|
|
|
:disabled="method === 'view' || status === 'audit' || status === 'taskFormDetail'"
|
|
|
@click="insertEvent('zs_project_detail')" plain>
|
|
|
新增报销单
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
+ <span style="color: red;" v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<el-form inline :disabled="false" style="display: inline-block;">
|
|
|
<el-button v-if="this.isConfirm == 1" type="primary" size="default" style="margin-left: 10px;"
|
|
|
@click="allSelect('0')">全部取消</el-button>
|
|
|
@@ -1299,7 +1299,7 @@
|
|
|
<div v-if="inputForm.reimbursementType === '0'">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
专用发票信息<span style="color: red;"
|
|
|
- v-if="this.isConfirm == 4">(报销信息仅可登记一条报销单(每个报销流程仅针对一张白色或蓝色报销单)。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
+ v-if="this.isConfirm == 4">(每个报销流程仅针对一张白色或蓝色报销单。可在报销单后操作栏新增xml格式数电发票信息)</span>
|
|
|
<!-- <el-button size="default" style="margin-left: 10px" type="primary"
|
|
|
:disabled="method === 'view' || status === 'audit' || status === 'taskFormDetail'"
|
|
|
@click="insertEvent('amount')" plain>
|
|
|
@@ -1424,6 +1424,7 @@ import processService from '@/api/flowable/processService'
|
|
|
import userService from '@/api/sys/UserService'
|
|
|
import ProgramPageForm from '@/views/finance/invoice/ProgramPageForm'
|
|
|
import { set } from 'lodash'
|
|
|
+import { ElMessageBox } from 'element-plus'
|
|
|
export default {
|
|
|
props: {
|
|
|
businessId: {
|
|
|
@@ -1437,6 +1438,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ insertBtn: false,
|
|
|
status: "",
|
|
|
companyName: "",
|
|
|
isConfirm: "2",
|
|
|
@@ -1560,6 +1562,11 @@ export default {
|
|
|
isZjbry: false,
|
|
|
isDgsbxBmzr: false,
|
|
|
payment: '',
|
|
|
+ // 针对业务差旅费和业务操作奖的数据
|
|
|
+ reimbursementTypeList: [
|
|
|
+ { name: '业务差旅费', id: '69cfed65fb46460bbef3ebfa0ccfbd7b' },
|
|
|
+ { name: '业务操作奖', id: '2cf080d5bcd2416598710b741f057cfe' }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
ReimbursementService: null,
|
|
|
@@ -1585,6 +1592,15 @@ export default {
|
|
|
ProgramPageForm,
|
|
|
CwReimbursementTypePullFormCw
|
|
|
},
|
|
|
+ // inputForm.sourceType发生变化,就隐藏按钮,加一个深度监听
|
|
|
+ watch: {
|
|
|
+ 'inputForm.sourceType': {
|
|
|
+ handler(newVal, oldVal) {
|
|
|
+ this.insertBtn = false
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ },
|
|
|
+ },
|
|
|
computed: {
|
|
|
name() {
|
|
|
return this.$store.state.user.name
|
|
|
@@ -1626,39 +1642,70 @@ export default {
|
|
|
// 删除
|
|
|
removeEvent(row, rowIndex, type) {
|
|
|
this.handleTableInfo(this.inputForm.sourceType)
|
|
|
- this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(item => item.remarks != row.uniqueId)
|
|
|
- if (type === 'detail') {
|
|
|
- this.$refs.detailTable.remove(row)
|
|
|
- this.inputForm.detailInfos.splice(rowIndex, 1)
|
|
|
- }
|
|
|
- if (type === 'amount') {
|
|
|
- this.$refs.amountTable.remove(row)
|
|
|
- this.inputForm.amountInfos.splice(rowIndex, 1)
|
|
|
- }
|
|
|
- if (type === 'invoiceReimbursement') {
|
|
|
- this.$refs.invoiceReimbursementTable.remove(row)
|
|
|
- this.inputForm.invoiceReimbursements.splice(rowIndex, 1)
|
|
|
- }
|
|
|
- if (type === 'contract_detail') {
|
|
|
- this.$refs.detailTableContract.remove(row)
|
|
|
- this.inputForm.detailInfoContracts.splice(rowIndex, 1)
|
|
|
- }
|
|
|
- if (type === 'report_detail') {
|
|
|
- this.$refs.detailTableReport.remove(row)
|
|
|
- this.inputForm.detailInfoReports.splice(rowIndex, 1)
|
|
|
- }
|
|
|
- if (type === 'zs_project_detail') {
|
|
|
- this.$refs.detailTableProject.remove(row)
|
|
|
- this.inputForm.detailInfoProject.splice(rowIndex, 1)
|
|
|
- }
|
|
|
- if (type === 'others') {
|
|
|
- this.$refs.detailTableOthers.remove(row)
|
|
|
- this.inputForm.detailInfoOthers.splice(rowIndex, 1)
|
|
|
- }
|
|
|
- if (type === 'procured') {
|
|
|
- this.$refs.detailTableProcured.remove(row)
|
|
|
- this.inputForm.detailInfoProcured.splice(rowIndex, 1)
|
|
|
+ //删除第一条数据
|
|
|
+ if (rowIndex === 0 && this.tableData.length > 1) {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `是否确认删除第1张报销单?(所有报销单数据也将同步删除)`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ this.insertBtn = false
|
|
|
+ // 清空附件
|
|
|
+ this.inputForm.invoiceReimbursementFiles = []
|
|
|
+ const tableMap = {
|
|
|
+ detail: { ref: 'detailTable', data: 'detailInfos' },
|
|
|
+ amount: { ref: 'amountTable', data: 'amountInfos' },
|
|
|
+ invoiceReimbursement: { ref: 'invoiceReimbursementTable', data: 'invoiceReimbursements' },
|
|
|
+ contract_detail: { ref: 'detailTableContract', data: 'detailInfoContracts' },
|
|
|
+ report_detail: { ref: 'detailTableReport', data: 'detailInfoReports' },
|
|
|
+ zs_project_detail: { ref: 'detailTableProject', data: 'detailInfoProject' },
|
|
|
+ others: { ref: 'detailTableOthers', data: 'detailInfoOthers' },
|
|
|
+ procured: { ref: 'detailTableProcured', data: 'detailInfoProcured' },
|
|
|
+ }
|
|
|
+
|
|
|
+ const cfg = tableMap[type]
|
|
|
+ if (cfg) {
|
|
|
+ const tableRef = this.$refs[cfg.ref]
|
|
|
+ const list = this.inputForm[cfg.data]
|
|
|
+ for (let i = list.length - 1; i >= 0; i--) {
|
|
|
+ tableRef.remove(list[i])
|
|
|
+ list.splice(i, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ //删除非第一条数据
|
|
|
+ this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(
|
|
|
+ item => item.remarks !== row.uniqueId
|
|
|
+ )
|
|
|
+
|
|
|
+ const tableMap = {
|
|
|
+ detail: { ref: 'detailTable', data: 'detailInfos' },
|
|
|
+ amount: { ref: 'amountTable', data: 'amountInfos' },
|
|
|
+ invoiceReimbursement: { ref: 'invoiceReimbursementTable', data: 'invoiceReimbursements' },
|
|
|
+ contract_detail: { ref: 'detailTableContract', data: 'detailInfoContracts' },
|
|
|
+ report_detail: { ref: 'detailTableReport', data: 'detailInfoReports' },
|
|
|
+ zs_project_detail: { ref: 'detailTableProject', data: 'detailInfoProject' },
|
|
|
+ others: { ref: 'detailTableOthers', data: 'detailInfoOthers' },
|
|
|
+ procured: { ref: 'detailTableProcured', data: 'detailInfoProcured' },
|
|
|
+ }
|
|
|
+
|
|
|
+ const cfg = tableMap[type]
|
|
|
+ if (cfg) {
|
|
|
+ const tableRef = this.$refs[cfg.ref]
|
|
|
+ const list = this.inputForm[cfg.data]
|
|
|
+ tableRef.remove(row)
|
|
|
+ list.splice(rowIndex, 1)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
generateRandomId() {
|
|
|
let id = '';
|
|
|
@@ -2084,7 +2131,7 @@ export default {
|
|
|
typePullForm(rowIndex, deptName) {
|
|
|
this.indexRow = rowIndex
|
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
|
- this.$refs.cwReimbursementTypePullForm.init('2', deptName)
|
|
|
+ this.$refs.cwReimbursementTypePullForm.init('2', deptName, rowIndex)
|
|
|
|
|
|
//this.$refs.cwReimbursementTypePullForm.init('1', deptName)
|
|
|
},
|
|
|
@@ -2092,12 +2139,12 @@ export default {
|
|
|
typePullFormCw(rowIndex, deptName) {
|
|
|
this.indexRow = rowIndex
|
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
|
- this.$refs.cwReimbursementTypePullFormCw.init('1', deptName)
|
|
|
+ this.$refs.cwReimbursementTypePullFormCw.init('1', deptName, rowIndex)
|
|
|
},
|
|
|
typePullFormProject(rowIndex, deptName) {
|
|
|
this.indexRow = rowIndex
|
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
|
- this.$refs.cwReimbursementTypePullFormCwProject.init('1', deptName)
|
|
|
+ this.$refs.cwReimbursementTypePullFormCwProject.init('1', deptName, rowIndex)
|
|
|
},
|
|
|
typePullForm2(rowIndex, deptName) {
|
|
|
this.indexRow = rowIndex
|
|
|
@@ -2107,17 +2154,17 @@ export default {
|
|
|
typePullForm3(rowIndex, deptName) {
|
|
|
this.indexRow = rowIndex
|
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
|
- this.$refs.cwReimbursementTypePullForm3.init('1', deptName)
|
|
|
+ this.$refs.cwReimbursementTypePullForm3.init('1', deptName, rowIndex)
|
|
|
},
|
|
|
typePullForm4(rowIndex, deptName) {
|
|
|
this.indexRow = rowIndex
|
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
|
- this.$refs.cwReimbursementTypePullForm4.init('2', deptName)
|
|
|
+ this.$refs.cwReimbursementTypePullForm4.init('2', deptName, rowIndex)
|
|
|
},
|
|
|
typePullForm8(rowIndex, deptName) {
|
|
|
this.indexRow = rowIndex
|
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
|
- this.$refs.cwReimbursementTypePullForm8.init('2', deptName)
|
|
|
+ this.$refs.cwReimbursementTypePullForm8.init('2', deptName, rowIndex)
|
|
|
},
|
|
|
typePullForm5(rowIndex, deptName) {
|
|
|
this.indexRow = rowIndex
|
|
|
@@ -2126,22 +2173,161 @@ export default {
|
|
|
},
|
|
|
// 报销内容详情
|
|
|
getProgramForType(rows) {
|
|
|
- this.inputForm.detailInfos[this.indexRow].typeId = rows.id
|
|
|
- this.inputForm.detailInfos[this.indexRow].typeName = rows.name
|
|
|
- this.indexRow = ''
|
|
|
- this.$forceUpdate()
|
|
|
+ // this.inputForm.detailInfos[this.indexRow].typeId = rows.id
|
|
|
+ // this.inputForm.detailInfos[this.indexRow].typeName = rows.name
|
|
|
+ // this.indexRow = ''
|
|
|
+ // this.$forceUpdate()
|
|
|
+
|
|
|
+ const isSpecialType = name => ['业务差旅费', '业务操作奖'].includes(name)
|
|
|
+
|
|
|
+ const updateTypeInfo = () => {
|
|
|
+ this.inputForm.detailInfos[this.indexRow].typeId = rows.id
|
|
|
+ this.inputForm.detailInfos[this.indexRow].typeName = rows.name
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.indexRow === 0) {
|
|
|
+ const currentName = this.inputForm.detailInfos[this.indexRow].typeName
|
|
|
+ const newName = rows.name
|
|
|
+
|
|
|
+ if (isSpecialType(newName)) {
|
|
|
+ this.insertBtn = true
|
|
|
+ updateTypeInfo()
|
|
|
+ } else if (isSpecialType(currentName)) {
|
|
|
+ // 原来是特殊类型,现在切换成别的类型
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `您即将修改报销类别为 ${newName}。若确定,您本次的报销将仅保留第一张报销单及其下上传的文件。是否调整?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ this.insertBtn = false
|
|
|
+ // 只保留第一张报销单对应的文件
|
|
|
+ this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(
|
|
|
+ item => item.remarks === this.tableData[0].uniqueId
|
|
|
+ )
|
|
|
+ // 倒序删除除第一条外的 数据
|
|
|
+ for (let i = this.inputForm.detailInfos.length - 1; i > 0; i--) {
|
|
|
+ this.removeEvent(this.inputForm.detailInfos[i], i, 'detail')
|
|
|
+ }
|
|
|
+ updateTypeInfo()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 普通类型直接赋值
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 非第0行,直接更新
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
},
|
|
|
getProgramForTypeCw(rows) {
|
|
|
- this.inputForm.detailInfoReports[this.indexRow].typeId = rows.id
|
|
|
- this.inputForm.detailInfoReports[this.indexRow].typeName = rows.name
|
|
|
- this.indexRow = ''
|
|
|
- this.$forceUpdate()
|
|
|
+ const isSpecialType = name => ['业务差旅费', '业务操作奖'].includes(name)
|
|
|
+
|
|
|
+ const updateTypeInfo = () => {
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].typeId = rows.id
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].typeName = rows.name
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.indexRow === 0) {
|
|
|
+ const currentName = this.inputForm.detailInfoReports[this.indexRow].typeName
|
|
|
+ const newName = rows.name
|
|
|
+
|
|
|
+ if (isSpecialType(newName)) {
|
|
|
+ this.insertBtn = true
|
|
|
+ updateTypeInfo()
|
|
|
+ } else if (isSpecialType(currentName)) {
|
|
|
+ // 原来是特殊类型,现在切换成别的类型
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `您即将修改报销类别为 ${newName}。若确定,您本次的报销将仅保留第一张报销单及其下上传的文件。是否调整?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ this.insertBtn = false
|
|
|
+ // 只保留第一张报销单对应的文件
|
|
|
+ this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(
|
|
|
+ item => item.remarks === this.tableData[0].uniqueId
|
|
|
+ )
|
|
|
+ // 倒序删除除第一条外的 数据
|
|
|
+ for (let i = this.inputForm.detailInfoReports.length - 1; i > 0; i--) {
|
|
|
+ this.removeEvent(this.inputForm.detailInfoReports[i], i, 'report_detail')
|
|
|
+ }
|
|
|
+ updateTypeInfo()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 普通类型直接赋值
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 非第0行,直接更新
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
},
|
|
|
getProgramForTypeCwProject(rows) {
|
|
|
- this.inputForm.detailInfos[this.indexRow].typeId = rows.id
|
|
|
- this.inputForm.detailInfos[this.indexRow].typeName = rows.name
|
|
|
- this.indexRow = ''
|
|
|
- this.$forceUpdate()
|
|
|
+
|
|
|
+ const isSpecialType = name => ['业务差旅费', '业务操作奖'].includes(name)
|
|
|
+
|
|
|
+ const updateTypeInfo = () => {
|
|
|
+ this.inputForm.detailInfos[this.indexRow].typeId = rows.id
|
|
|
+ this.inputForm.detailInfos[this.indexRow].typeName = rows.name
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.indexRow === 0) {
|
|
|
+ const currentName = this.inputForm.detailInfos[this.indexRow].typeName
|
|
|
+ const newName = rows.name
|
|
|
+
|
|
|
+ if (isSpecialType(newName)) {
|
|
|
+ // 选中的就是“业务差旅费 / 业务操作奖”
|
|
|
+ this.insertBtn = true
|
|
|
+ updateTypeInfo()
|
|
|
+ } else if (isSpecialType(currentName)) {
|
|
|
+ // 原来是特殊类型,现在切换成别的类型
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `您即将修改报销类别为 ${newName}。若确定,您本次的报销将仅保留第一张报销单及其下上传的文件。是否调整?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ this.insertBtn = false
|
|
|
+ // 只保留第一张报销单对应的文件
|
|
|
+ this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(
|
|
|
+ item => item.remarks === this.tableData[0].uniqueId
|
|
|
+ )
|
|
|
+ // 倒序删除除第一条外的 数据
|
|
|
+ for (let i = this.inputForm.detailInfos.length - 1; i > 0; i--) {
|
|
|
+ this.removeEvent(this.inputForm.detailInfos[i], i, 'detail')
|
|
|
+ }
|
|
|
+ updateTypeInfo()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 普通类型直接赋值
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 非第0行,直接更新
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 针对业务差旅费和业务操作奖
|
|
|
+ typeChange(value, row, rowIndex) {
|
|
|
+ console.log(value, row, rowIndex);
|
|
|
+ console.log(value, row, rowIndex);
|
|
|
+ console.log(value, row, rowIndex);
|
|
|
},
|
|
|
getProgramForType2(rows) {
|
|
|
this.inputForm.detailInfoContracts[this.indexRow].typeId = rows.id
|
|
|
@@ -2150,16 +2336,102 @@ export default {
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
getProgramForType3(rows) {
|
|
|
- this.inputForm.detailInfoReports[this.indexRow].typeId = rows.id
|
|
|
- this.inputForm.detailInfoReports[this.indexRow].typeName = rows.name
|
|
|
- this.indexRow = ''
|
|
|
- this.$forceUpdate()
|
|
|
+ const isSpecialType = name => ['业务差旅费', '业务操作奖'].includes(name)
|
|
|
+
|
|
|
+ const updateTypeInfo = () => {
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].typeId = rows.id
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].typeName = rows.name
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.indexRow === 0) {
|
|
|
+ const currentName = this.inputForm.detailInfoReports[this.indexRow].typeName
|
|
|
+ const newName = rows.name
|
|
|
+
|
|
|
+ if (isSpecialType(newName)) {
|
|
|
+ // 选中的就是“业务差旅费 / 业务操作奖”
|
|
|
+ this.insertBtn = true
|
|
|
+ updateTypeInfo()
|
|
|
+ } else if (isSpecialType(currentName)) {
|
|
|
+ // 原来是特殊类型,现在切换成别的类型
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `您即将修改报销类别为 ${newName}。若确定,您本次的报销将仅保留第一张报销单及其下上传的文件。是否调整?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ this.insertBtn = false
|
|
|
+ // 只保留第一张报销单对应的文件
|
|
|
+ this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(
|
|
|
+ item => item.remarks === this.tableData[0].uniqueId
|
|
|
+ )
|
|
|
+ // 倒序删除除第一条外的 数据
|
|
|
+ for (let i = this.inputForm.detailInfoReports.length - 1; i > 0; i--) {
|
|
|
+ this.removeEvent(this.inputForm.detailInfoReports[i], i, 'report_detail')
|
|
|
+ }
|
|
|
+ updateTypeInfo()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 普通类型直接赋值
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 非第0行,直接更新
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
},
|
|
|
getProgramForType4(rows) {
|
|
|
- this.inputForm.detailInfoOthers[this.indexRow].typeId = rows.id
|
|
|
- this.inputForm.detailInfoOthers[this.indexRow].typeName = rows.name
|
|
|
- this.indexRow = ''
|
|
|
- this.$forceUpdate()
|
|
|
+ const isSpecialType = name => ['业务差旅费', '业务操作奖'].includes(name)
|
|
|
+
|
|
|
+ const updateTypeInfo = () => {
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].typeId = rows.id
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].typeName = rows.name
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.indexRow === 0) {
|
|
|
+ const currentName = this.inputForm.detailInfoOthers[this.indexRow].typeName
|
|
|
+ const newName = rows.name
|
|
|
+
|
|
|
+ if (isSpecialType(newName)) {
|
|
|
+ // 选中的就是“业务差旅费 / 业务操作奖”
|
|
|
+ this.insertBtn = true
|
|
|
+ updateTypeInfo()
|
|
|
+ } else if (isSpecialType(currentName)) {
|
|
|
+ // 原来是特殊类型,现在切换成别的类型
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `您即将修改报销类别为 ${newName}。若确定,您本次的报销将仅保留第一张报销单及其下上传的文件。是否调整?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ this.insertBtn = false
|
|
|
+ // 只保留第一张报销单对应的文件
|
|
|
+ this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(
|
|
|
+ item => item.remarks === this.tableData[0].uniqueId
|
|
|
+ )
|
|
|
+ // 倒序删除除第一条外的 数据
|
|
|
+ for (let i = this.inputForm.detailInfoOthers.length - 1; i > 0; i--) {
|
|
|
+ this.removeEvent(this.inputForm.detailInfoOthers[i], i, 'others')
|
|
|
+ }
|
|
|
+ updateTypeInfo()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 普通类型直接赋值
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 非第0行,直接更新
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
},
|
|
|
getProgramForType5(rows) {
|
|
|
this.inputForm.detailInfoProcured[this.indexRow].typeId = rows.id
|
|
|
@@ -2168,10 +2440,53 @@ export default {
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
getProgramForType8(rows) {
|
|
|
- this.inputForm.detailInfoProject[this.indexRow].typeId = rows.id
|
|
|
- this.inputForm.detailInfoProject[this.indexRow].typeName = rows.name
|
|
|
- this.indexRow = ''
|
|
|
- this.$forceUpdate()
|
|
|
+ const isSpecialType = name => ['业务差旅费', '业务操作奖'].includes(name)
|
|
|
+
|
|
|
+ const updateTypeInfo = () => {
|
|
|
+ this.inputForm.detailInfoProject[this.indexRow].typeId = rows.id
|
|
|
+ this.inputForm.detailInfoProject[this.indexRow].typeName = rows.name
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.indexRow === 0) {
|
|
|
+ const currentName = this.inputForm.detailInfoProject[this.indexRow].typeName
|
|
|
+ const newName = rows.name
|
|
|
+
|
|
|
+ if (isSpecialType(newName)) {
|
|
|
+ // 选中的就是“业务差旅费 / 业务操作奖”
|
|
|
+ this.insertBtn = true
|
|
|
+ updateTypeInfo()
|
|
|
+ } else if (isSpecialType(currentName)) {
|
|
|
+ // 原来是特殊类型,现在切换成别的类型
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `您即将修改报销类别为 ${newName}。若确定,您本次的报销将仅保留第一张报销单及其下上传的文件。是否调整?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ this.insertBtn = false
|
|
|
+ // 只保留第一张报销单对应的文件
|
|
|
+ this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(
|
|
|
+ item => item.remarks === this.tableData[0].uniqueId
|
|
|
+ )
|
|
|
+ // 倒序删除除第一条外的 数据
|
|
|
+ for (let i = this.inputForm.detailInfoProject.length - 1; i > 0; i--) {
|
|
|
+ this.removeEvent(this.inputForm.detailInfoProject[i], i, 'zs_project_detail')
|
|
|
+ }
|
|
|
+ updateTypeInfo()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 普通类型直接赋值
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 非第0行,直接更新
|
|
|
+ updateTypeInfo()
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 报销人下拉弹窗
|