2 changed files with 328 additions and 2 deletions
@ -0,0 +1,227 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div> |
|||
<div>{{ viewTitle }}</div> |
|||
</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="dataForm" :model="bankInfo" class="formadd" :rules="rules"> |
|||
<el-row style="border-top: 1px solid #e0e3eb "> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>国家</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item> |
|||
<el-input v-model="bankInfo.country" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>账户类型</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="dueBank"> |
|||
<el-select v-model="bankInfo.dueBankValue" class="addinputw" placeholder="" @change="receiptBankChange"> |
|||
<el-option v-for="item in receiptBank_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>开户银行</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="depositBank"> |
|||
<el-input v-model="bankInfo.depositBank" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>银行账号</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="bankAccount"> |
|||
<el-input v-model="bankInfo.bankAccount" maxlength="125" placeholder="" class="addinputw" clearable onkeyup="value=value.replace(/[^\d]/g,'')"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>账户名称</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="accountName"> |
|||
<el-input v-model="bankInfo.accountName" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>银行网点</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="bankingOutlets"> |
|||
<el-input v-model="bankInfo.bankingOutlets" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>开户行地址</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="bankAddress"> |
|||
<el-input v-model="bankInfo.bankAddress" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>联行号</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="paymentLines"> |
|||
<el-input v-model="bankInfo.paymentLines" maxlength="125" placeholder="" class="addinputw" clearable onkeyup="value=value.replace(/[^\d]/g,'')"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>Swiftcode(银行代码)</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="swiftCode"> |
|||
<el-input v-model="bankInfo.swiftCode" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>币种</span> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="currency"> |
|||
<el-input v-model="bankInfo.currency" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>描述</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item> |
|||
<el-input v-model="bankInfo.remarks" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { typeValues } from '@/api/cheliang/dictcommons' |
|||
|
|||
export default { |
|||
name: 'Bank', |
|||
data() { |
|||
return { |
|||
bankInfo_index: '', |
|||
viewTitle: '', |
|||
dialogStatus: '', |
|||
receiptBank_list: [], |
|||
bankInfo: { |
|||
country: '中国', |
|||
dueBankValue: '', |
|||
depositBank: '', |
|||
bankAccount: '', |
|||
accountName: '', |
|||
bankingOutlets: '', |
|||
bankAddress: '', |
|||
paymentLines: '', |
|||
swiftCode: '', |
|||
currency: '人民币', |
|||
remarks: '', |
|||
sid: '' |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
getType() { |
|||
typeValues({ type: 'accountType' }).then((res) => { |
|||
if (res.success) { |
|||
this.receiptBank_list = res.data |
|||
} |
|||
}) |
|||
}, |
|||
receiptBankChange(val) { |
|||
if (val) { |
|||
const choosetItem = this.receiptBank_list.filter((item) => item.dictValue === val) |
|||
this.bankInfo.dueBankKey = choosetItem[0].dictKey |
|||
} |
|||
}, |
|||
showAdd() { |
|||
this.bankInfo = { |
|||
country: '中国', |
|||
dueBankValue: '', |
|||
depositBank: '', |
|||
bankAccount: '', |
|||
accountName: '', |
|||
bankingOutlets: '', |
|||
bankAddress: '', |
|||
paymentLines: '', |
|||
swiftCode: '', |
|||
currency: '人民币', |
|||
remarks: '', |
|||
sid: '' |
|||
} |
|||
this.bankInfo_index = '' |
|||
this.dialogStatus = 'add' |
|||
this.viewTitle = '【新增】开户行信息' |
|||
this.getType() |
|||
}, |
|||
showEdit(bankInfo, index) { |
|||
this.dialogStatus = 'edit' |
|||
this.viewTitle = '【编辑】开户行信息' |
|||
this.bankInfo = bankInfo |
|||
this.bankInfo_index = index |
|||
this.getType() |
|||
}, |
|||
handleCreate() { |
|||
if (this.dialogStatus === 'add') { |
|||
if (JSON.stringify(this.bankInfo) !== '{}') { |
|||
this.$emit('handleBank', this.bankInfo, this.bankInfo_index) |
|||
} else { |
|||
this.$message({ showClose: true, message: '请填写开户行信息!', type: 'error' }) |
|||
} |
|||
} |
|||
if (this.dialogStatus === 'edit') { |
|||
this.$emit('handleBank', this.bankInfo, this.bankInfo_index) |
|||
} |
|||
}, |
|||
handleReturn() { |
|||
this.dialogStatus = '' |
|||
this.bankInfo = { |
|||
country: '中国', |
|||
dueBankValue: '', |
|||
depositBank: '', |
|||
bankAccount: '', |
|||
accountName: '', |
|||
bankingOutlets: '', |
|||
bankAddress: '', |
|||
paymentLines: '', |
|||
swiftCode: '', |
|||
currency: '人民币', |
|||
remarks: '', |
|||
sid: '' |
|||
} |
|||
this.bankInfo_index = '' |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
Loading…
Reference in new issue