|
@@ -2,53 +2,41 @@
|
|
|
<div>
|
|
|
<a-modal
|
|
|
centered
|
|
|
- wrapClassName="addGoodsShelve-modal"
|
|
|
+ wrapClassName="setSHModal-modal"
|
|
|
:footer="null"
|
|
|
:maskClosable="false"
|
|
|
title="设置结算账户"
|
|
|
v-model="isshow"
|
|
|
@cancle="close"
|
|
|
- :width="450">
|
|
|
+ :width="550">
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<a-alert :message="message" type="info" />
|
|
|
<a-form-model
|
|
|
- id="userEdit-form"
|
|
|
+ id="setSHModal-form"
|
|
|
ref="ruleForm"
|
|
|
:model="form"
|
|
|
:rules="rules"
|
|
|
- :label-col="formItemLayout.labelCol"
|
|
|
- :wrapper-col="formItemLayout.wrapperCol"
|
|
|
+ :labelCol="{span:5}"
|
|
|
+ :wrapperCol="{span:15}"
|
|
|
>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-model-item label="配件经销商" >
|
|
|
- <span>{{ form.dealerEntity?form.dealerEntity.dealerName:'--' }}</span>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-model-item label="平台商户号" prop="merchantNo" >
|
|
|
- <a-input id="userList-name" allowClear v-model.trim="form.merchantNo" placeholder="请输入平台商户号"/>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-model-item label="结算账户名" prop="bankAccount">
|
|
|
- <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.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.bankName" placeholder="请输入开户银行"/>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <a-form-model-item label="配件经销商" >
|
|
|
+ <span>{{ form.dealerEntity?form.dealerEntity.dealerName:'--' }}</span>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="平台商户号" prop="merchantNo" >
|
|
|
+ <a-input id="setSHModal-merchantNo" allowClear v-model.trim="form.merchantNo" placeholder="请输入平台商户号"/>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="结算账户名" prop="bankAccount">
|
|
|
+ <a-input id="setSHModal-bankAccount" allowClear v-model.trim="form.bankAccount" placeholder="请输入结算账户名"/>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="结算账户号" prop="bankCard">
|
|
|
+ <a-input id="setSHModal-bankCard" allowClear v-model.trim="form.bankCard" placeholder="请输入结算账户号"/>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="开户银行" prop="bankName">
|
|
|
+ <a-input id="setSHModal-bankName" allowClear v-model.trim="form.bankName" placeholder="请输入开户银行"/>
|
|
|
+ </a-form-model-item>
|
|
|
<a-form-model-item :label-col="{span: 0}" :wrapper-col="{span: 24}" style="text-align: center;">
|
|
|
- <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }">保存</a-button>
|
|
|
- <a-button :style="{ marginLeft: '8px' }" @click="close">取消</a-button>
|
|
|
+ <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }" id="setSHModal-handleSubmit">保存</a-button>
|
|
|
+ <a-button :style="{ marginLeft: '8px' }" @click="close" id="setSHModal-close">取消</a-button>
|
|
|
</a-form-model-item>
|
|
|
</a-form-model>
|
|
|
</a-spin>
|
|
@@ -59,7 +47,7 @@
|
|
|
<script>
|
|
|
import { saveMerchantAccount, merchantAccountDetail } from '@/api/merchantAccount.js'
|
|
|
export default {
|
|
|
- name: 'AddGoodsShelve',
|
|
|
+ name: 'SetSHModal',
|
|
|
props: {
|
|
|
visible: {
|
|
|
type: Boolean,
|
|
@@ -79,10 +67,6 @@ export default {
|
|
|
isshow: this.visible,
|
|
|
message: '以下结算账户信息需要与进件时填写的资料保持一直否则将无法体现成功',
|
|
|
pageInfo: null,
|
|
|
- formItemLayout: {
|
|
|
- labelCol: { span: 6 },
|
|
|
- wrapperCol: { span: 16 }
|
|
|
- },
|
|
|
form: {
|
|
|
dealerEntity: {
|
|
|
dealerName: ''
|
|
@@ -90,7 +74,7 @@ export default {
|
|
|
bankName: '', // 开户行
|
|
|
bankAccount: '', // 账户名
|
|
|
bankCard: '', // 账户号
|
|
|
- merchantNo: '' // 保证金金额
|
|
|
+ merchantNo: '' // 商户号
|
|
|
},
|
|
|
rules: {
|
|
|
merchantNo: [ { required: true, message: '请输入保证金金额', trigger: 'blur' } ],
|
|
@@ -119,10 +103,12 @@ export default {
|
|
|
this.spinning = true
|
|
|
merchantAccountDetail({ merchantSn: this.nowData.merchantSn, merchantType: this.nowData.merchantType }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- this.form = Object.assign({}, res.data)
|
|
|
+ this.form.merchantNo = res.data.merchantNo
|
|
|
+ this.form.dealerEntity.dealerName = res.data.dealerEntity.dealerName
|
|
|
this.form.bankName = res.data.merchantBankAccountEntity.bankName
|
|
|
this.form.bankAccount = res.data.merchantBankAccountEntity.bankAccount
|
|
|
this.form.bankCard = res.data.merchantBankAccountEntity.bankCard
|
|
|
+ this.pageInfo = Object.assign({}, res.data)
|
|
|
} else {
|
|
|
}
|
|
|
this.spinning = false
|
|
@@ -130,18 +116,25 @@ export default {
|
|
|
},
|
|
|
// 保存提交
|
|
|
handleSubmit () {
|
|
|
+ console.log('保存', 'handleSubmit')
|
|
|
const _this = this
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
+ console.log(valid, 'console.log(valid)')
|
|
|
if (valid) {
|
|
|
- // 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
|
|
|
+ const params = JSON.parse(JSON.stringify(_this.pageInfo))
|
|
|
+ console.log(params, 'params')
|
|
|
+ if (params) {
|
|
|
+ params.merchantBankAccountEntity.bankName = _this.form.bankName
|
|
|
+ params.merchantBankAccountEntity.bankAccount = _this.form.bankAccount
|
|
|
+ params.merchantBankAccountEntity.bankCard = _this.form.bankCard
|
|
|
+ params.dealerEntity.dealerName = _this.form.dealerEntity.dealerName
|
|
|
+ params.merchantNo = _this.form.merchantNo
|
|
|
}
|
|
|
+ console.log(params, 'params')
|
|
|
params.id = _this.nowData && _this.nowData.id ? _this.nowData.id : null
|
|
|
+ params.dealerEntity.dealerSn = _this.nowData && _this.nowData.dealerEntity ? _this.nowData.dealerEntity.dealerSn : null
|
|
|
_this.spinning = true
|
|
|
+ console.log(params, 'params')
|
|
|
saveMerchantAccount(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|
|
@@ -167,9 +160,17 @@ export default {
|
|
|
},
|
|
|
isshow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
- this.form = {}
|
|
|
- this.close()
|
|
|
+ this.form = {
|
|
|
+ dealerEntity: {
|
|
|
+ dealerName: ''
|
|
|
+ },
|
|
|
+ bankName: '', // 开户行
|
|
|
+ bankAccount: '', // 账户名
|
|
|
+ bankCard: '', // 账户号
|
|
|
+ merchantNo: '' // 保证金金额
|
|
|
+ }
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
+ this.close()
|
|
|
} else {
|
|
|
this.getMerchantAccountDetail()
|
|
|
}
|
|
@@ -188,9 +189,4 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less">
|
|
|
-.addGoodsShelve-modal{
|
|
|
- .ant-select-disabled .ant-select-selection{
|
|
|
- background-color: none !important;
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|