|
@@ -20,7 +20,7 @@
|
|
<employee style="width: 100%;" @change="employeeChange" ref="applyPerson" v-model="form.applyPersonSn"></employee>
|
|
<employee style="width: 100%;" @change="employeeChange" ref="applyPerson" v-model="form.applyPersonSn"></employee>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="收款事由" prop="bookReason">
|
|
<a-form-model-item label="收款事由" prop="bookReason">
|
|
- <a-input :maxLength="100" placeholder="请输入收款事由(最多100个字符)" v-model="form.bookReason"></a-input>
|
|
|
|
|
|
+ <bookReason ref="bookReason" v-model="bookReasonCode" @change="updateReason"></bookReason>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="付款方类型" prop="payerType">
|
|
<a-form-model-item label="付款方类型" prop="payerType">
|
|
<v-select
|
|
<v-select
|
|
@@ -68,11 +68,12 @@ import { commonMixin } from '@/utils/mixin'
|
|
import { VSelect, Upload } from '@/components'
|
|
import { VSelect, Upload } from '@/components'
|
|
import employee from '../../expenseManagement/expenseReimbursement/employee.js'
|
|
import employee from '../../expenseManagement/expenseReimbursement/employee.js'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
|
+import bookReason from '@/views/common/bookReason'
|
|
import { financeBookSave, financeBookFindBySn, queryLastFinishDingUser } from '@/api/financeBook.js'
|
|
import { financeBookSave, financeBookFindBySn, queryLastFinishDingUser } from '@/api/financeBook.js'
|
|
export default {
|
|
export default {
|
|
name: 'FcBaseModal',
|
|
name: 'FcBaseModal',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { VSelect, Upload, employee, dealerSubareaScopeList },
|
|
|
|
|
|
+ components: { VSelect, Upload, employee, dealerSubareaScopeList, bookReason },
|
|
props: {
|
|
props: {
|
|
show: [Boolean],
|
|
show: [Boolean],
|
|
bookSn: {
|
|
bookSn: {
|
|
@@ -95,16 +96,17 @@ export default {
|
|
attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
|
|
attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
|
|
form: {
|
|
form: {
|
|
applyPersonSn: undefined,
|
|
applyPersonSn: undefined,
|
|
- bookReason: '',
|
|
|
|
|
|
+ bookReason: undefined,
|
|
payerType: 'DEALER',
|
|
payerType: 'DEALER',
|
|
dealerSn: undefined,
|
|
dealerSn: undefined,
|
|
payerName: undefined,
|
|
payerName: undefined,
|
|
remarks: '',
|
|
remarks: '',
|
|
attachmentList: ''
|
|
attachmentList: ''
|
|
},
|
|
},
|
|
|
|
+ bookReasonCode: undefined,
|
|
rules: {
|
|
rules: {
|
|
applyPersonSn: [ { required: true, message: '请选择申请人', trigger: ['change', 'blur'] } ],
|
|
applyPersonSn: [ { required: true, message: '请选择申请人', trigger: ['change', 'blur'] } ],
|
|
- bookReason: [ { required: true, message: '请输入收款事由', trigger: ['change', 'blur'] } ],
|
|
|
|
|
|
+ bookReason: [ { required: true, message: '请选择收款事由', trigger: ['change', 'blur'] } ],
|
|
payerType: [ { required: true, message: '请选择付款方类型', trigger: ['change', 'blur'] } ],
|
|
payerType: [ { required: true, message: '请选择付款方类型', trigger: ['change', 'blur'] } ],
|
|
dealerSn: [ { required: true, message: '请选择付款方', trigger: ['change', 'blur'] } ],
|
|
dealerSn: [ { required: true, message: '请选择付款方', trigger: ['change', 'blur'] } ],
|
|
payerName: [ { required: true, message: '请输入付款方名称', trigger: ['change', 'blur'] } ]
|
|
payerName: [ { required: true, message: '请输入付款方名称', trigger: ['change', 'blur'] } ]
|
|
@@ -124,9 +126,11 @@ export default {
|
|
this.form.dealerSn = ''
|
|
this.form.dealerSn = ''
|
|
this.form.payerName = ''
|
|
this.form.payerName = ''
|
|
},
|
|
},
|
|
|
|
+ updateReason (val, record) {
|
|
|
|
+ this.form.bookReason = record.dispName
|
|
|
|
+ },
|
|
// 客户
|
|
// 客户
|
|
custChange (v) {
|
|
custChange (v) {
|
|
- console.log(v)
|
|
|
|
if (v && v.key) {
|
|
if (v && v.key) {
|
|
this.form.dealerSn = v.key
|
|
this.form.dealerSn = v.key
|
|
this.form.payerName = v.row ? v.row.dealerName : ''
|
|
this.form.payerName = v.row ? v.row.dealerName : ''
|
|
@@ -194,6 +198,10 @@ export default {
|
|
this.$refs.settleClientName.getDetail(this.form.dealerSn)
|
|
this.$refs.settleClientName.getDetail(this.form.dealerSn)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ // 回显收款事由
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.bookReasonCode = this.$refs.bookReason.getCodeByName(this.form.bookReason)
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
}
|
|
}
|
|
@@ -206,7 +214,7 @@ export default {
|
|
this.$emit('cancel')
|
|
this.$emit('cancel')
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
},
|
|
},
|
|
- async pageInit () {
|
|
|
|
|
|
+ async pageInit () {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.attachList = []
|
|
this.attachList = []
|
|
this.$refs.attachList.setFileList('')
|
|
this.$refs.attachList.setFileList('')
|
|
@@ -215,10 +223,10 @@ export default {
|
|
this.$refs.settleClientName.resetForm()
|
|
this.$refs.settleClientName.resetForm()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+ this.bookReasonCode = undefined
|
|
this.form = {
|
|
this.form = {
|
|
applyPersonSn: undefined,
|
|
applyPersonSn: undefined,
|
|
- bookReason: '',
|
|
|
|
|
|
+ bookReason: undefined,
|
|
payerType: 'DEALER',
|
|
payerType: 'DEALER',
|
|
dealerSn: undefined,
|
|
dealerSn: undefined,
|
|
payerName: undefined,
|
|
payerName: undefined,
|
|
@@ -228,7 +236,7 @@ export default {
|
|
|
|
|
|
if (this.bookSn) { // 编辑页
|
|
if (this.bookSn) { // 编辑页
|
|
this.getDetail()
|
|
this.getDetail()
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
// 最近一次审核人
|
|
// 最近一次审核人
|
|
const lastAuditInfo = await queryLastFinishDingUser().then(res => res.data)
|
|
const lastAuditInfo = await queryLastFinishDingUser().then(res => res.data)
|
|
this.form.applyPersonSn = lastAuditInfo ? lastAuditInfo.applyPersonSn : undefined
|
|
this.form.applyPersonSn = lastAuditInfo ? lastAuditInfo.applyPersonSn : undefined
|