|
@@ -68,7 +68,6 @@
|
|
|
<vxe-table-column field="userName" title="报销人" :edit-render="{}" :rules="[{required: true, message:'请选择报销人', trigger:'blur'}]">
|
|
|
<template v-slot:edit="scope">
|
|
|
<el-input v-model="scope.row.userName" @focus="userPullListForm(scope.$rowIndex)"></el-input>
|
|
|
-<!-- <UserSelect :limit='1' :name="scope.row.userName" @getValue='(value, label) => {scope.row.userId = value, scope.row.userName = label}'></UserSelect>-->
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="deptName" title="报销部门" :edit-render="{}">
|
|
@@ -83,7 +82,7 @@
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="projectName" title="报销项目" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input v-model="scope.row.projectName" @focus="openProgramPageForm(scope.$rowIndex)"></el-input>
|
|
|
+ <el-input v-model="scope.row.projectName" @focus="openProgramPageForm(scope.$rowIndex, scope.row)"></el-input>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<vxe-table-column field="reportNumber" title="报告号" :edit-render="{}">
|
|
@@ -182,6 +181,7 @@
|
|
|
|
|
|
<script>
|
|
|
import ReimbursementService from '@/api/sys/ReimbursementService'
|
|
|
+ import ReimbursementTypeService from '@/api/sys/ReimbursementTypeService'
|
|
|
import UpLoadComponent from '@/views/common/UpLoadComponent'
|
|
|
import SelectUserTree from '@/views/modules/utils/treeUserSelect'
|
|
|
import SelectTree from '@/components/treeSelect/treeSelect.vue'
|
|
@@ -190,7 +190,6 @@
|
|
|
import ProgramPageForm from '@/views/modules/finance/invoice/ProgramPageForm'
|
|
|
import ReimbursementTypePullForm from '@/views/modules/finance/invoice/ReimbursementTypePullForm'
|
|
|
import UserPullForm from '@/views/modules/finance/invoice/UserPullForm'
|
|
|
- import UserSelect from '@/components/userSelect'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -213,6 +212,7 @@
|
|
|
}
|
|
|
},
|
|
|
reimbursementService: null,
|
|
|
+ reimbursementTypeService: null,
|
|
|
userService: null,
|
|
|
created () {
|
|
|
this.reimbursementService = new ReimbursementService()
|
|
@@ -221,6 +221,7 @@
|
|
|
this.inputForm.reimDate = new Date()
|
|
|
this.inputForm.department = this.officeName
|
|
|
this.userService = new UserService()
|
|
|
+ this.reimbursementTypeService = new ReimbursementTypeService()
|
|
|
},
|
|
|
props: {
|
|
|
businessId: {
|
|
@@ -543,10 +544,24 @@
|
|
|
}
|
|
|
row.count = parseFloat(count).toFixed(2)
|
|
|
},
|
|
|
- openProgramPageForm (rowIndex) {
|
|
|
+ openProgramPageForm (rowIndex, row) {
|
|
|
+ if (this.commonJS.isEmpty(row.typeName)) {
|
|
|
+ this.$message.error('请选择报销类型')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.indexRow = rowIndex
|
|
|
- // 打开单选组件
|
|
|
- this.$refs.programPageForm.init(null, false)
|
|
|
+ this.reimbursementTypeService.findById(row.typeId).then(({data}) => {
|
|
|
+ console.log('typeInfo', data.sort)
|
|
|
+ let i = data.sort.toString()
|
|
|
+ i = i.substring(0, 1)
|
|
|
+ // 非业务报销
|
|
|
+ if (i === '2') {
|
|
|
+ this.$refs.programPageForm.init('2', false)
|
|
|
+ } else {
|
|
|
+ // 打开单选组件
|
|
|
+ this.$refs.programPageForm.init(null, false)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
getProgram (rows) {
|
|
|
this.inputForm.detailInfos[this.indexRow].projectId = rows[0].id
|