|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method==='view'"
|
|
|
|
|
|
+ <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="formReadOnly"
|
|
label-width="100px" @submit.native.prevent>
|
|
label-width="100px" @submit.native.prevent>
|
|
|
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
|
|
@@ -46,7 +46,7 @@
|
|
|
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
报销详情
|
|
报销详情
|
|
- <el-button style="margin-left: 20px" type="primary" :disabled="method==='view'" size="mini" @click="insertEvent('detail')" plain>
|
|
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || this.formReadOnly" size="mini" @click="insertEvent('detail')" plain>
|
|
新增
|
|
新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-divider>
|
|
</el-divider>
|
|
@@ -68,6 +68,7 @@
|
|
<vxe-table-column field="userName" title="报销人" :edit-render="{}" :rules="[{required: true, message:'请选择报销人', trigger:'blur'}]">
|
|
<vxe-table-column field="userName" title="报销人" :edit-render="{}" :rules="[{required: true, message:'请选择报销人', trigger:'blur'}]">
|
|
<template v-slot:edit="scope">
|
|
<template v-slot:edit="scope">
|
|
<el-input v-model="scope.row.userName" @focus="userPullListForm(scope.$rowIndex)"></el-input>
|
|
<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>
|
|
</template>
|
|
</vxe-table-column>
|
|
</vxe-table-column>
|
|
<vxe-table-column field="deptName" title="报销部门" :edit-render="{}">
|
|
<vxe-table-column field="deptName" title="报销部门" :edit-render="{}">
|
|
@@ -120,7 +121,7 @@
|
|
|
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
专用发票信息
|
|
专用发票信息
|
|
- <el-button style="margin-left: 20px" type="primary" :disabled="method==='view'" size="mini" @click="insertEvent('amount')" plain>
|
|
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || this.formReadOnly " size="mini" @click="insertEvent('amount')" plain>
|
|
新增
|
|
新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-divider>
|
|
</el-divider>
|
|
@@ -189,6 +190,7 @@
|
|
import ProgramPageForm from '@/views/modules/finance/invoice/ProgramPageForm'
|
|
import ProgramPageForm from '@/views/modules/finance/invoice/ProgramPageForm'
|
|
import ReimbursementTypePullForm from '@/views/modules/finance/invoice/ReimbursementTypePullForm'
|
|
import ReimbursementTypePullForm from '@/views/modules/finance/invoice/ReimbursementTypePullForm'
|
|
import UserPullForm from '@/views/modules/finance/invoice/UserPullForm'
|
|
import UserPullForm from '@/views/modules/finance/invoice/UserPullForm'
|
|
|
|
+ import UserSelect from '@/components/userSelect'
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -236,7 +238,8 @@
|
|
SelectTree,
|
|
SelectTree,
|
|
ProgramPageForm,
|
|
ProgramPageForm,
|
|
ReimbursementTypePullForm,
|
|
ReimbursementTypePullForm,
|
|
- UserPullForm
|
|
|
|
|
|
+ UserPullForm,
|
|
|
|
+ UserSelect
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
name () {
|
|
name () {
|
|
@@ -284,6 +287,9 @@
|
|
this.visible = true
|
|
this.visible = true
|
|
this.loading = false
|
|
this.loading = false
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
|
+ if (this.formReadOnly === true) {
|
|
|
|
+ method = 'view'
|
|
|
|
+ }
|
|
if (method === 'edit' || method === 'view') { // 修改或者查看
|
|
if (method === 'edit' || method === 'view') { // 修改或者查看
|
|
this.loading = true
|
|
this.loading = true
|
|
this.$refs.inputForm.resetFields()
|
|
this.$refs.inputForm.resetFields()
|
|
@@ -346,6 +352,8 @@
|
|
async insertEvent (type) {
|
|
async insertEvent (type) {
|
|
if (type === 'detail') {
|
|
if (type === 'detail') {
|
|
await this.$refs.detailTable.insert().then((data) => {
|
|
await this.$refs.detailTable.insert().then((data) => {
|
|
|
|
+ data.userName = this.name
|
|
|
|
+ data.deptName = this.officeName
|
|
this.inputForm.detailInfos.push(data)
|
|
this.inputForm.detailInfos.push(data)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -369,8 +377,10 @@
|
|
this.inputForm.type = '1'
|
|
this.inputForm.type = '1'
|
|
this.reimbursementService.save(this.inputForm).then(({data}) => {
|
|
this.reimbursementService.save(this.inputForm).then(({data}) => {
|
|
callback()
|
|
callback()
|
|
|
|
+ this.$refs.inputForm.resetFields()
|
|
this.loading = false
|
|
this.loading = false
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
|
+ this.$refs.inputForm.resetFields()
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -416,11 +426,11 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.commonJS.isEmpty(this.inputForm.amountInfos)) {
|
|
|
|
- this.$message.error('至少填写一条专用发票信息')
|
|
|
|
- this.loading = false
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ // if (this.commonJS.isEmpty(this.inputForm.amountInfos)) {
|
|
|
|
+ // this.$message.error('至少填写一条专用发票信息')
|
|
|
|
+ // this.loading = false
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
this.inputForm.files = this.$refs.uploadComponent.getDataList()
|
|
this.inputForm.type = '2'
|
|
this.inputForm.type = '2'
|
|
this.reimbursementService.save(this.inputForm).then(({data}) => {
|
|
this.reimbursementService.save(this.inputForm).then(({data}) => {
|