|
@@ -1,6 +1,6 @@
|
|
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
<div>
|
|
<div>
|
|
- <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="formReadOnly"
|
|
|
|
|
|
+ <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
|
|
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>
|
|
@@ -106,7 +106,7 @@
|
|
<div v-if="inputForm.sourceType === '1'">
|
|
<div v-if="inputForm.sourceType === '1'">
|
|
<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' || this.formReadOnly" size="mini" @click="insertEvent('detail')" plain>
|
|
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail'" size="mini" @click="insertEvent('detail')" plain>
|
|
新增
|
|
新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-divider>
|
|
</el-divider>
|
|
@@ -184,7 +184,7 @@
|
|
<div v-if="inputForm.sourceType === '2'">
|
|
<div v-if="inputForm.sourceType === '2'">
|
|
<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' || this.formReadOnly" size="mini" @click="insertEvent('contract_detail')" plain>
|
|
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail'" size="mini" @click="insertEvent('contract_detail')" plain>
|
|
新增
|
|
新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-divider>
|
|
</el-divider>
|
|
@@ -262,7 +262,7 @@
|
|
<div v-if="inputForm.sourceType === '3'">
|
|
<div v-if="inputForm.sourceType === '3'">
|
|
<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' || this.formReadOnly" size="mini" @click="insertEvent('report_detail')" plain>
|
|
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail'" size="mini" @click="insertEvent('report_detail')" plain>
|
|
新增
|
|
新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-divider>
|
|
</el-divider>
|
|
@@ -340,7 +340,7 @@
|
|
<div v-if="inputForm.sourceType === '4'">
|
|
<div v-if="inputForm.sourceType === '4'">
|
|
<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' || this.formReadOnly" size="mini" @click="insertEvent('others')" plain>
|
|
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail'" size="mini" @click="insertEvent('others')" plain>
|
|
新增
|
|
新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-divider>
|
|
</el-divider>
|
|
@@ -495,7 +495,7 @@
|
|
</div>
|
|
</div>
|
|
<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' || this.formReadOnly " size="mini" @click="insertEvent('amount')" plain>
|
|
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail' " size="mini" @click="insertEvent('amount')" plain>
|
|
新增
|
|
新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-divider>
|
|
</el-divider>
|
|
@@ -596,6 +596,20 @@
|
|
import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
|
|
import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
|
|
import MaterialManagementDialog from '../../../materialManagement/file/MaterialManagementDialog'
|
|
import MaterialManagementDialog from '../../../materialManagement/file/MaterialManagementDialog'
|
|
export default {
|
|
export default {
|
|
|
|
+ props: {
|
|
|
|
+ businessId: {
|
|
|
|
+ type: String,
|
|
|
|
+ default: ''
|
|
|
|
+ },
|
|
|
|
+ formReadOnly: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: false
|
|
|
|
+ },
|
|
|
|
+ status: {
|
|
|
|
+ type: String,
|
|
|
|
+ default: ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
validRules: {
|
|
validRules: {
|
|
@@ -652,7 +666,8 @@
|
|
tradeTotalPrice: '',
|
|
tradeTotalPrice: '',
|
|
purchaseId: '',
|
|
purchaseId: '',
|
|
departmentName: ''
|
|
departmentName: ''
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ keyWatch: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
ReimbursementApprovalService: null,
|
|
ReimbursementApprovalService: null,
|
|
@@ -671,16 +686,6 @@
|
|
this.commonApi = new CommonApi()
|
|
this.commonApi = new CommonApi()
|
|
this.materialManagementService = new MaterialManagementService()
|
|
this.materialManagementService = new MaterialManagementService()
|
|
},
|
|
},
|
|
- props: {
|
|
|
|
- businessId: {
|
|
|
|
- type: String,
|
|
|
|
- default: ''
|
|
|
|
- },
|
|
|
|
- formReadOnly: {
|
|
|
|
- type: Boolean,
|
|
|
|
- default: false
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
components: {
|
|
components: {
|
|
UpLoadComponent,
|
|
UpLoadComponent,
|
|
SelectUserTree,
|
|
SelectUserTree,
|
|
@@ -697,6 +702,14 @@
|
|
MaterialManagementDialog
|
|
MaterialManagementDialog
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ bus: {
|
|
|
|
+ get () {
|
|
|
|
+ return this.businessId
|
|
|
|
+ },
|
|
|
|
+ set (val) {
|
|
|
|
+ this.businessId = val
|
|
|
|
+ }
|
|
|
|
+ },
|
|
name () {
|
|
name () {
|
|
return JSON.parse(localStorage.getItem('user')).name
|
|
return JSON.parse(localStorage.getItem('user')).name
|
|
},
|
|
},
|
|
@@ -708,19 +721,24 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- 'businessId': {
|
|
|
|
|
|
+ 'keyWatch': {
|
|
handler (newVal) {
|
|
handler (newVal) {
|
|
- if (this.businessId && this.businessId !== 'false') {
|
|
|
|
- this.init('edit', this.businessId)
|
|
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.bus)) {
|
|
|
|
+ this.init('', this.bus)
|
|
} else {
|
|
} else {
|
|
- this.init('clean', '')
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.inputForm.resetFields()
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- },
|
|
|
|
- immediate: true,
|
|
|
|
- deep: false
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getKeyWatch (keyWatch) {
|
|
|
|
+ this.keyWatch = keyWatch
|
|
|
|
+ },
|
|
|
|
+ getUpload () {
|
|
|
|
+ },
|
|
init (method, id) {
|
|
init (method, id) {
|
|
this.method = method
|
|
this.method = method
|
|
this.inputForm = {
|
|
this.inputForm = {
|
|
@@ -747,9 +765,9 @@
|
|
if (method === 'add') {
|
|
if (method === 'add') {
|
|
this.title = `新建报销类型`
|
|
this.title = `新建报销类型`
|
|
} else if (method === 'edit') {
|
|
} else if (method === 'edit') {
|
|
- this.inputForm.id = id
|
|
|
|
this.title = '修改报销类型'
|
|
this.title = '修改报销类型'
|
|
}
|
|
}
|
|
|
|
+ this.inputForm.id = id
|
|
this.visible = true
|
|
this.visible = true
|
|
this.loading = false
|
|
this.loading = false
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -766,28 +784,23 @@
|
|
if (this.commonJS.isEmpty(this.inputForm.reimDate)) {
|
|
if (this.commonJS.isEmpty(this.inputForm.reimDate)) {
|
|
this.inputForm.reimDate = new Date()
|
|
this.inputForm.reimDate = new Date()
|
|
}
|
|
}
|
|
- if (this.formReadOnly === true && this.businessId !== 'false') {
|
|
|
|
|
|
+ console.log('this.status1', this.status)
|
|
|
|
+ console.log('id', this.inputForm.id)
|
|
|
|
+ if (this.status === 'audit' || this.status === 'taskFormDetail') {
|
|
|
|
+ console.log('this.status', this.status)
|
|
method = 'view'
|
|
method = 'view'
|
|
}
|
|
}
|
|
- if (method === 'edit' || method === 'view') { // 修改或者查看
|
|
|
|
- this.loading = true
|
|
|
|
- this.$refs.inputForm.resetFields()
|
|
|
|
- this.reimbursementApprovalService.findById(this.inputForm.id).then(({data}) => {
|
|
|
|
- this.inputForm = this.recover(this.inputForm, data)
|
|
|
|
- this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
|
|
|
|
- this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
|
- if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
|
|
|
|
- this.startPur(this.inputForm.purchaseId)
|
|
|
|
- }
|
|
|
|
- this.loading = false
|
|
|
|
- })
|
|
|
|
- // this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
|
|
|
|
- // this.inputForm = this.recover(this.inputForm, data)
|
|
|
|
- // this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
|
|
|
|
- // this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
|
- // this.loading = false
|
|
|
|
- // })
|
|
|
|
- }
|
|
|
|
|
|
+ this.loading = true
|
|
|
|
+ this.$refs.inputForm.resetFields()
|
|
|
|
+ this.reimbursementApprovalService.findById(this.inputForm.id).then(({data}) => {
|
|
|
|
+ this.inputForm = this.recover(this.inputForm, data)
|
|
|
|
+ this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
|
+ this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
|
|
|
|
+ this.startPur(this.inputForm.purchaseId)
|
|
|
|
+ }
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
if (method !== 'edit' && method !== 'view') {
|
|
if (method !== 'edit' && method !== 'view') {
|
|
this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
|
|
this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
|
|
}
|
|
}
|