|
@@ -170,7 +170,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item v-if="isBankCardno" label="卡号:" prop="bankcardno">
|
|
|
+ <el-form-item v-if="isBank" label="卡号:" prop="bankcardno">
|
|
|
<el-input v-model="form.bankcardno" placeholder="请输入银行卡号"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-else label="卡号:" >
|
|
@@ -178,7 +178,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item v-if="isBankName" label="开户人:" prop="bankname">
|
|
|
+ <el-form-item v-if="isBank" label="开户人:" prop="bankname">
|
|
|
<el-input v-model="form.bankname" placeholder="请输入开户人"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-else label="开户人:" >
|
|
@@ -206,8 +206,6 @@ export default {
|
|
|
return {
|
|
|
radio:-1,
|
|
|
isBank:false,
|
|
|
- isBankCardno:false,
|
|
|
- isBankName:false,
|
|
|
title:'选择上级合作伙伴',
|
|
|
rules: {
|
|
|
enterprisename: [
|
|
@@ -289,43 +287,6 @@ export default {
|
|
|
loading:'loading'
|
|
|
})
|
|
|
},
|
|
|
- watch:{
|
|
|
- 'form.bank':function (val){
|
|
|
- if (!val){
|
|
|
- if (!this.form.bankcardno){
|
|
|
- if (!this.form.bankname){
|
|
|
-
|
|
|
- }else {
|
|
|
- this.isBank = true
|
|
|
- this.isBankCardno = true
|
|
|
- this.isBankName = true
|
|
|
- }
|
|
|
- }else {
|
|
|
- this.isBank = true
|
|
|
- this.isBankCardno = true
|
|
|
- this.isBankName = true
|
|
|
- }
|
|
|
- }else {
|
|
|
- this.isBank = true
|
|
|
- this.isBankCardno = true
|
|
|
- this.isBankName = true
|
|
|
- }
|
|
|
- },
|
|
|
- 'form.bankcardno':function (val){
|
|
|
- if (!val){
|
|
|
- this.isBank = true
|
|
|
- this.isBankCardno = true
|
|
|
- this.isBankName = true
|
|
|
- }
|
|
|
- },
|
|
|
- 'form.bankname':function (val){
|
|
|
- if (!val){
|
|
|
- this.isBank = true
|
|
|
- this.isBankCardno = true
|
|
|
- this.isBankName = true
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
methods:{
|
|
|
onShow () {
|
|
|
this.dialogVisible = true
|
|
@@ -382,17 +343,43 @@ export default {
|
|
|
onSubmit () {
|
|
|
this.$refs['form'].validate(async (valid) => {
|
|
|
if (!valid) return false
|
|
|
- const res = await this.$api.requested({
|
|
|
- "classname": "webmanage.sale.agents.agents",
|
|
|
- "method": "insertormodify_agent",
|
|
|
- "content": this.form
|
|
|
- })
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
- this.$emit('onSuccess')
|
|
|
- // this.$refs['form'].resetFields();
|
|
|
- this.dialogVisible = false
|
|
|
- this.onClose()
|
|
|
- })
|
|
|
+ if (this.form.bankcardno || this.form.bank || this.form.bankname){
|
|
|
+ if (this.form.bankcardno && this.form.bank && this.form.bankname){
|
|
|
+ this.isBank = false
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "webmanage.sale.agents.agents",
|
|
|
+ "method": "insertormodify_agent",
|
|
|
+ "content": this.form
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ // this.$refs['form'].resetFields();
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.onClose()
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.isBank = true
|
|
|
+ this.$alert('请完善银行卡', '提示', {
|
|
|
+ showClose:false,
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ this.isBank = false
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "webmanage.sale.agents.agents",
|
|
|
+ "method": "insertormodify_agent",
|
|
|
+ "content": this.form
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ // this.$refs['form'].resetFields();
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.onClose()
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
radioChange (val) {
|