|
@@ -21,7 +21,7 @@
|
|
|
>
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="24">
|
|
|
- <a-form-model-item label="配件经销商" prop="shelfSn" >
|
|
|
+ <a-form-model-item label="配件经销商" >
|
|
|
<span>{{ form.dealerEntity?form.dealerEntity.dealerName:'--' }}</span>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
@@ -32,17 +32,17 @@
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="结算账户名" prop="bankAccount">
|
|
|
- <a-input id="userList-name" allowClear v-model.trim="form.merchantBankAccountEntity.bankAccount" placeholder="请输入结算账户名"/>
|
|
|
+ <a-input id="userList-name" allowClear v-model.trim="form.bankAccount" placeholder="请输入结算账户名"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="结算账户号" prop="bankCard">
|
|
|
- <a-input id="userList-name" allowClear v-model.trim="form.merchantBankAccountEntity.bankCard" placeholder="请输入结算账户号"/>
|
|
|
+ <a-input id="userList-name" allowClear v-model.trim="form.bankCard" placeholder="请输入结算账户号"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="开户银行" prop="bankName">
|
|
|
- <a-input id="userList-name" allowClear v-model.trim="form.merchantBankAccountEntity.bankName" placeholder="请输入开户银行"/>
|
|
|
+ <a-input id="userList-name" allowClear v-model.trim="form.bankName" placeholder="请输入开户银行"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -87,11 +87,9 @@ export default {
|
|
|
dealerEntity: {
|
|
|
dealerName: ''
|
|
|
},
|
|
|
- merchantBankAccountEntity: {
|
|
|
- bankName: '', // 开户行
|
|
|
- bankAccount: '', // 账户名
|
|
|
- bankCard: '' // 账户号
|
|
|
- },
|
|
|
+ bankName: '', // 开户行
|
|
|
+ bankAccount: '', // 账户名
|
|
|
+ bankCard: '', // 账户号
|
|
|
merchantNo: '' // 保证金金额
|
|
|
},
|
|
|
rules: {
|
|
@@ -108,11 +106,9 @@ export default {
|
|
|
dealerEntity: {
|
|
|
dealerName: ''
|
|
|
},
|
|
|
- merchantBankAccountEntity: {
|
|
|
- bankName: '', // 开户行
|
|
|
- bankAccount: '', // 账户名
|
|
|
- bankCard: '' // 账户号
|
|
|
- },
|
|
|
+ bankName: '', // 开户行
|
|
|
+ bankAccount: '', // 账户名
|
|
|
+ bankCard: '', // 账户号
|
|
|
merchantNo: '' // 保证金金额
|
|
|
}
|
|
|
this.$refs.ruleForm.resetFields()
|
|
@@ -124,6 +120,9 @@ export default {
|
|
|
merchantAccountDetail({ merchantSn: this.nowData.merchantSn, merchantType: this.nowData.merchantType }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.form = Object.assign({}, res.data)
|
|
|
+ this.form.bankName = res.data.merchantBankAccountEntity.bankName
|
|
|
+ this.form.bankAccount = res.data.merchantBankAccountEntity.bankAccount
|
|
|
+ this.form.bankCard = res.data.merchantBankAccountEntity.bankCard
|
|
|
} else {
|
|
|
}
|
|
|
this.spinning = false
|
|
@@ -134,7 +133,13 @@ export default {
|
|
|
const _this = this
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
- const params = JSON.parse(JSON.stringify(_this.form))
|
|
|
+ // const params = JSON.parse(JSON.stringify(_this.form))
|
|
|
+ const params = Object.assign({}, _this.form)
|
|
|
+ if (params.bankName && params.bankAccount && params.bankCard) {
|
|
|
+ params.merchantBankAccountEntity.bankName = params.bankName
|
|
|
+ params.merchantBankAccountEntity.bankAccount = params.bankAccount
|
|
|
+ params.merchantBankAccountEntity.bankCard = params.bankCard
|
|
|
+ }
|
|
|
params.id = _this.nowData && _this.nowData.id ? _this.nowData.id : null
|
|
|
_this.spinning = true
|
|
|
saveMerchantAccount(params).then(res => {
|
|
@@ -165,13 +170,15 @@ export default {
|
|
|
this.form = {}
|
|
|
this.close()
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
+ } else {
|
|
|
+ this.getMerchantAccountDetail()
|
|
|
}
|
|
|
},
|
|
|
nowData: {
|
|
|
handler (newValue, oldValue) {
|
|
|
if (this.isshow && newValue) {
|
|
|
if (this.nowData.id) { // 编辑
|
|
|
- this.getMerchantAccountDetail()
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
},
|