|
@@ -31,13 +31,6 @@
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item style="margin-bottom:5px;" label="付款方类型" prop="payerType">
|
|
|
- <!-- <v-select
|
|
|
- v-model="form.payerType"
|
|
|
- showType="radio"
|
|
|
- code="PAYER_TYPE"
|
|
|
- placeholder="请选择付款方类型"
|
|
|
- @change="payerTypeChange"
|
|
|
- ></v-select> -->
|
|
|
{{ form.payerTypeDictValue }}
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
@@ -201,16 +194,27 @@
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item style="margin-bottom:5px;" label="户名" prop="bankAccount">
|
|
|
- <a-select placeholder="请选择户名" v-model="form.bankAccount" id="fcDetailModal-bankAccount" style="width: 100%" @change="handleChange">
|
|
|
- <a-select-option v-for="item in bankList" :value="item.bankAccount">
|
|
|
- {{ item.bankAccount }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
+ <SelectInput
|
|
|
+ v-model="form.bankAccount"
|
|
|
+ ref="bankList"
|
|
|
+ id="fcDetailModal-bankAccount"
|
|
|
+ code="FINANCE_BOOK_BANK_INFO"
|
|
|
+ placeholder="请选择户名"
|
|
|
+ @change="handleChange"
|
|
|
+ isTree
|
|
|
+ :isInput="false"
|
|
|
+ allowClear
|
|
|
+ ></SelectInput>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item style="margin-bottom:5px;" label="汇入银行" prop="bankName">
|
|
|
- <a-select placeholder="请选择汇入银行" id="fcDetailModal-bankName" v-model="form.bankName" style="width: 100%">
|
|
|
+ <a-select
|
|
|
+ placeholder="请选择汇入银行"
|
|
|
+ allowClear
|
|
|
+ id="fcDetailModal-bankName"
|
|
|
+ v-model="form.bankName"
|
|
|
+ style="width: 100%">
|
|
|
<a-select-option v-for="item in bankNameList" :value="item">
|
|
|
{{ item }}
|
|
|
</a-select-option>
|
|
@@ -256,7 +260,7 @@
|
|
|
<script>
|
|
|
import moment from 'moment'
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
-import { VSelect, Upload } from '@/components'
|
|
|
+import { VSelect, SelectInput, Upload } from '@/components'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
import fcDetailSxItem from './fcDetailSxItem.vue'
|
|
|
import { financeBookDetailSave, financeBookDetailQueryBySn, lastPayerAccountInfo } from '@/api/financeBook.js'
|
|
@@ -264,7 +268,7 @@ import { dealerDetailBySn } from '@/api/dealer'
|
|
|
export default {
|
|
|
name: 'FcDetailModal',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { VSelect, Upload, dealerSubareaScopeList, fcDetailSxItem },
|
|
|
+ components: { VSelect, SelectInput, Upload, dealerSubareaScopeList, fcDetailSxItem },
|
|
|
props: {
|
|
|
show: {
|
|
|
type: [Boolean],
|
|
@@ -326,41 +330,10 @@ export default {
|
|
|
},
|
|
|
useTotalAmount: '',
|
|
|
payTotalAmount: '',
|
|
|
- bankList: [
|
|
|
- {
|
|
|
- bankAccount: '张丽友',
|
|
|
- bankName: ['建设银行', '微信收款']
|
|
|
- },
|
|
|
- {
|
|
|
- bankAccount: '张丽添',
|
|
|
- bankName: ['农业银行']
|
|
|
- },
|
|
|
- {
|
|
|
- bankAccount: '东莞箭冠',
|
|
|
- bankName: ['东莞银行']
|
|
|
- },
|
|
|
- {
|
|
|
- bankAccount: '江西箭冠',
|
|
|
- bankName: ['九江银行']
|
|
|
- }
|
|
|
- ],
|
|
|
bankNameList: ['东莞银行']
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- payerTypeChange (v) {
|
|
|
- this.$refs.ruleForm.clearValidate()
|
|
|
- // 重置数据
|
|
|
- this.form.dealerSn = ''
|
|
|
- this.form.dealerCode = ''
|
|
|
- this.form.licenseName = ''
|
|
|
- this.form.payerAccountType = 'PUBLIC'
|
|
|
- this.form.bankAccount = '东莞箭冠'
|
|
|
- this.form.bankName = '东莞银行'
|
|
|
- this.bankNameList = ['东莞银行']
|
|
|
- this.form.payerAccountInfo = ''
|
|
|
- this.form.payerName = ''
|
|
|
- },
|
|
|
accountTypeChange (v) {
|
|
|
this.$refs.ruleForm.clearValidate()
|
|
|
// 已选经销商
|
|
@@ -371,21 +344,21 @@ export default {
|
|
|
this.form.licenseName = ''
|
|
|
this.form.payerAccountInfo = ''
|
|
|
}
|
|
|
+ // 公户
|
|
|
if (this.form.payerAccountType == 'PUBLIC') {
|
|
|
this.form.bankAccount = '东莞箭冠'
|
|
|
this.form.bankName = '东莞银行'
|
|
|
- this.bankNameList = ['东莞银行']
|
|
|
} else {
|
|
|
this.form.bankAccount = '张丽添'
|
|
|
this.form.bankName = '农业银行'
|
|
|
- this.bankNameList = ['农业银行']
|
|
|
}
|
|
|
+ this.getBankNameList()
|
|
|
},
|
|
|
- handleChange (v) {
|
|
|
+ // 户名改变
|
|
|
+ handleChange (v, row) {
|
|
|
if (v) {
|
|
|
this.form.bankAccount = v
|
|
|
- const row = this.bankList.find(item => item.bankAccount == v)
|
|
|
- this.bankNameList = row.bankName
|
|
|
+ this.bankNameList = row ? row.code.split(',') : []
|
|
|
this.form.bankName = undefined
|
|
|
}
|
|
|
},
|
|
@@ -481,6 +454,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 新增时设置默认值
|
|
|
setDetail (data) {
|
|
|
this.form = Object.assign(this.form, { payerTypeDictValue: data.payerTypeDictValue, payerType: data.payerType, dealerSn: data.dealerSn, payerName: data.payerName })
|
|
|
this.$nextTick(() => {
|
|
@@ -489,8 +463,8 @@ export default {
|
|
|
} else {
|
|
|
this.form.bankAccount = '张丽添'
|
|
|
this.form.bankName = '农业银行'
|
|
|
- this.bankNameList = ['农业银行']
|
|
|
}
|
|
|
+ this.getBankNameList()
|
|
|
})
|
|
|
},
|
|
|
// 详情
|
|
@@ -508,17 +482,18 @@ export default {
|
|
|
this.form.receiptDate = moment(this.form.receiptDate).format('YYYY-MM-DD')
|
|
|
this.form.payCreditFlag = this.form.payCreditFlag == 1
|
|
|
this.form.useCreditFlag = this.form.useCreditFlag == 1
|
|
|
- // 回显客户
|
|
|
- // if (this.form.dealerSn && this.form.payerType == 'DEALER') {
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs.settleClientName.getDetail(this.form.dealerSn)
|
|
|
- // })
|
|
|
- // }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getBankNameList()
|
|
|
+ })
|
|
|
}
|
|
|
this.spinning = false
|
|
|
this.confirmLoading = false
|
|
|
})
|
|
|
},
|
|
|
+ getBankNameList () {
|
|
|
+ const blist = this.$refs.bankList.list.find(item => item.dispName == this.form.bankAccount)
|
|
|
+ this.bankNameList = blist && blist.code.split(',') || []
|
|
|
+ },
|
|
|
cancel () {
|
|
|
this.opened = false
|
|
|
this.$emit('cancel')
|
|
@@ -529,7 +504,6 @@ export default {
|
|
|
this.title = '新增收款明细'
|
|
|
})
|
|
|
this.bankNameList = []
|
|
|
- this.bankNameList = ['东莞银行']
|
|
|
if (this.$refs.ruleForm) {
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
}
|