|
@@ -63,7 +63,7 @@
|
|
|
@cell-click=""
|
|
|
@edit-closed=""
|
|
|
highlight-current-row
|
|
|
- :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon:'_'}"
|
|
|
+ :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
|
|
|
:edit-rules="validRules"
|
|
|
>
|
|
|
<vxe-table-column field="userName" title="报销人" :edit-render="{}" :rules="[{required: true, message:'请选择报销人', trigger:'blur'}]">
|
|
@@ -82,14 +82,13 @@
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="projectName" title="报销项目" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
|
|
|
- <span slot="label"><span style="color: red;border-top: 20px">*</span> 报销项目</span>
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input v-model="scope.row.projectName" @focus="openProgramPageForm(scope.$rowIndex, scope.row)"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">
|
|
|
+ <vxe-table-column field="reportNumber" title="报告号" :edit-render="{}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input v-model="scope.row.reportNo" @focus="openReportNoPageForm(scope.$rowIndex, scope.row)"></el-input>
|
|
|
+ <el-input :readonly="true" v-model="scope.row.reportNumber" @focus="openReportNoPageForm(scope.$rowIndex, scope.row)"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="number" title="费用(元)" :edit-render="{}" :rules="[{required: true, message:'请输入费用', trigger:'blur'}]">
|
|
@@ -216,8 +215,11 @@
|
|
|
projectName: [
|
|
|
{required: true, message: '报销项目不能为空'}
|
|
|
],
|
|
|
- reportNo: [
|
|
|
+ reportNumber: [
|
|
|
{required: true, message: '报告号不能为空'}
|
|
|
+ ],
|
|
|
+ number: [
|
|
|
+ {required: true, message: '费用(元)不能为空'}
|
|
|
]
|
|
|
},
|
|
|
title: '',
|
|
@@ -623,12 +625,20 @@
|
|
|
},
|
|
|
// 选择报告号
|
|
|
openReportNoPageForm (rowIndex, row) {
|
|
|
- let i = this.inputForm.detailInfos.length
|
|
|
- for (let j = 0; j < i; j++) {
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].projectName)) {
|
|
|
- this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfos[j].projectName)
|
|
|
- }
|
|
|
+ if (this.commonJS.isEmpty(row.projectName)) {
|
|
|
+ this.$message.error('请选择报销项目')
|
|
|
+ return
|
|
|
}
|
|
|
+ this.indexRow = rowIndex
|
|
|
+ console.log('this.indexRow', this.indexRow)
|
|
|
+ // let i = this.inputForm.detailInfos.length
|
|
|
+ this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfos[rowIndex].projectName)
|
|
|
+ // for (let j = this.indexRow; j < i; j++) {
|
|
|
+ // if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].projectName)) {
|
|
|
+ // console.log('this.inputForm.detailInfos[j].projectName', this.inputForm.detailInfos[j].projectName)
|
|
|
+ // this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfos[j].projectName)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
},
|
|
|
openProgramPageForm (rowIndex, row) {
|
|
|
if (this.commonJS.isEmpty(row.typeName)) {
|
|
@@ -655,7 +665,7 @@
|
|
|
this.inputForm.detailInfos[this.indexRow].projectId = rows[0].id
|
|
|
this.inputForm.detailInfos[this.indexRow].projectName = rows[0].projectName
|
|
|
this.inputForm.detailInfos[this.indexRow].reportNumber = rows[0].reportNumber
|
|
|
- // this.indexRow = ''
|
|
|
+ this.indexRow = ''
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
// 报销类型下拉弹窗
|
|
@@ -664,10 +674,11 @@
|
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
|
this.$refs.cwReimbursementTypePullForm.init()
|
|
|
},
|
|
|
+ // 报销内容详情
|
|
|
getProgramForType (rows) {
|
|
|
this.inputForm.detailInfos[this.indexRow].typeId = rows.id
|
|
|
this.inputForm.detailInfos[this.indexRow].typeName = rows.name
|
|
|
- // this.indexRow = ''
|
|
|
+ this.indexRow = ''
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
// 报销人下拉弹窗
|
|
@@ -676,17 +687,16 @@
|
|
|
this.$refs.userPullForm.init()
|
|
|
},
|
|
|
getProgramForUser (rows) {
|
|
|
- console.log('rows', rows)
|
|
|
this.inputForm.detailInfos[this.indexRow].userId = rows[0].id
|
|
|
this.inputForm.detailInfos[this.indexRow].userName = rows[0].name
|
|
|
this.inputForm.detailInfos[this.indexRow].deptId = rows[0].parentId
|
|
|
this.inputForm.detailInfos[this.indexRow].deptName = rows[0].officeName
|
|
|
- // this.indexRow = ''
|
|
|
+ this.indexRow = ''
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
getWorkClientChoose2 (list) {
|
|
|
- console.log('list', list)
|
|
|
- this.inputForm.detailInfos[this.indexRow].reportNo = list.reportNo
|
|
|
+ this.inputForm.detailInfos[this.indexRow].reportNumber = list.reportNo
|
|
|
+ this.indexRow = ''
|
|
|
this.$forceUpdate()
|
|
|
}
|
|
|
}
|