Browse Source

站点绑定收款方式优化并增加解绑功能

pull/97/head
rainbro 1 month ago
parent
commit
7698e9e893
  1. 222
      src/views/agent/siteBaseSetting.vue

222
src/views/agent/siteBaseSetting.vue

@ -73,18 +73,21 @@
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<!-- 微信 -->
<GuipFormItem column="column" class="mb24" v-if="addablePays[payTypeWeixin]">
<div slot="formLeft" class="form-top-icon">
<img src="@/assets/register/weixin.svg" style="width: 26px;height: 26px;" alt=""><span>微信收款</span>
</div>
<CustomDropdown v-if="wxpayList && wxpayList.length" slot="formDom" width="100%" v-model="bindWxpayId"
:options="wxpayList" displayKey="name" valueKey="payid"
@change="changeSelectWeixin" placeholder="请选择" @changeNormal="changeNormalWeixin">
<CustomDropdown slot="formDom" width="100%"
:options="wxpayList" :options_null="!wxpayList.length" displayKey="name" valueKey="payid"
@change="changeSelectWeixin">
<!-- 选择后显示数据 -->
<template #trigger>
<span v-if="selectWxpay">{{ selectWxpay.short_name }} {{ selectWxpay.account }}</span>
<span v-else>请选择</span>
<span v-else-if="wxpayList.length === 0">暂无收款账号稍后配置</span>
<span v-else>未绑定微信收款</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
@ -111,28 +114,6 @@
</div>
</template>
</CustomDropdown>
<CustomDropdown v-else slot="formDom" width="100%" v-model="bindWxpayId"
:options="wxpayList" displayKey="name" valueKey="payid"
@change="changeSelectWeixin" placeholder="请选择"
:options_null="options_weixin_null" @changeNormal="changeNormalWeixin">
<!-- 选择后显示数据 -->
<template #trigger>
<span v-if="selectWxpay">{{ selectWxpay.short_name }} {{ selectWxpay.account }}</span>
<span v-else>请选择</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
<b>绑定新微信收款</b>
<p class="one">需要使用您公司的微信支付</p>
<p>需在微信商户平台-产品中心开通Native支付</p>
</div>
<div class="right">
<GuipButton type="primary" size="medium" @click="goBindPay(payTypeWeixin)">前往绑定</GuipButton>
</div>
</div>
</template>
</CustomDropdown>
</GuipFormItem>
<!-- 支付宝 -->
@ -140,12 +121,12 @@
<div slot="formLeft" class="form-top-icon">
<img src="@/assets/register/zhifubao.svg" style="width: 26px;height: 26px;" alt=""><span>支付宝收款</span>
</div>
<CustomDropdown v-if="alipayList && alipayList.length" slot="formDom" width="100%" v-model="bindAlipayId"
:options="alipayList" @change="changeSelectAlipay" placeholder="请选择"
@changeNormal="changeNormalWeixin">
<CustomDropdown slot="formDom" width="100%"
:options="alipayList" :options_null="!alipayList.length" @change="changeSelectAlipay">
<template #trigger>
<span v-if="selectAlipay">{{ selectAlipay.short_name }} {{ selectAlipay.account }}</span>
<span v-else>请选择</span>
<span v-else-if="alipayList.length === 0">暂无收款账号稍后配置</span>
<span v-else>未绑定支付宝收款</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
@ -172,38 +153,22 @@
</div>
</template>
</CustomDropdown>
<CustomDropdown v-else slot="formDom" width="100%" v-model="bindAlipayId"
:options="alipayList" @change="changeSelectAlipay" placeholder="请选择"
@changeNormal="changeNormalWeixin" :options_null="options_weixin_null">
<template #trigger>
<span v-if="selectAlipay">{{ selectAlipay.short_name }} {{ selectAlipay.account }}</span>
<span v-else>请选择</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
<b>绑定新支付宝收款</b>
<p class="one">需要使用您公司的支付宝支付</p>
<p>需在支付宝商户平台-产品中心开通Native支付</p>
</div>
<div class="right">
<GuipButton type="primary" size="medium" @click="goBindPay(payTypeAlipay)">前往绑定</GuipButton>
</div>
</div>
</template>
</CustomDropdown>
</GuipFormItem>
<!-- 京东 -->
<GuipFormItem column="column" class="mb24" v-if="addablePays[payTypeJingdong]">
<div slot="formLeft" class="form-top-icon">
<img src="@/assets/register/jingdong.svg" style="width: 26px;height: 26px;" alt=""><span>京东店铺</span>
</div>
<CustomDropdown v-if="jdList && jdList.length" slot="formDom" width="100%" v-model="bindJdId"
<CustomDropdown slot="formDom" width="100%"
:options="jdList" displayKey="name" valueKey="payid"
@change="changeSelectJindong" placeholder="请选择" @changeNormal="changeNormalWeixin">
:options_null="!jdList.length"
@change="changeSelectJindong" >
<!-- 选择后显示数据 -->
<template #trigger>
<span v-if="selectJd">{{ selectJd.short_name }} {{ selectJd.account }}</span>
<span v-else>请选择</span>
<span v-else-if="jdList.length === 0">暂无收款账号稍后配置</span>
<span v-else>未绑定京东店铺</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
@ -230,42 +195,25 @@
</div>
</template>
</CustomDropdown>
<CustomDropdown v-else slot="formDom" width="100%" v-model="bindJdId"
:options="jdList" displayKey="name" valueKey="payid"
@change="changeSelectJindong" placeholder="请选择"
:options_null="options_weixin_null" @changeNormal="changeNormalWeixin">
<!-- 选择后显示数据 -->
<template #trigger>
<span v-if="selectJd">{{ selectJd.short_name }} {{ selectJd.account }}</span>
<span v-else>请选择</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
<b>绑定新京东店铺</b>
<p class="one">如未购买快乐论文检测服务服务或已过期会跳转到购买服务页面</p>
</div>
<div class="right">
<GuipButton type="primary" size="medium" @click="goBindPay(payTypeJingdong)">前往绑定</GuipButton>
</div>
</div>
</template>
</CustomDropdown>
</GuipFormItem>
</div>
<div class="flex-line"></div>
<!-- 淘宝 -->
<div class="flex-right">
<GuipFormItem column="column" class="mb24" v-if="addablePays[payTypeTaoBao]">
<div slot="formLeft" class="form-top-icon">
<img src="@/assets/register/taobao.svg" style="width: 26px;height: 26px;" alt=""><span>淘宝/天猫店铺</span>
</div>
<CustomDropdown v-if="taobaoList && taobaoList.length" slot="formDom" width="100%" v-model="bindTaobaoId"
<CustomDropdown slot="formDom" width="100%"
:options="taobaoList" displayKey="name" valueKey="payid"
@change="changeSelectTaobao" placeholder="请选择" @changeNormal="changeNormalWeixin">
:options_null="!taobaoList.length"
@change="changeSelectTaobao" >
<!-- 选择后显示数据 -->
<template #trigger>
<span v-if="selectTaobao">{{ selectTaobao.short_name }} {{ selectTaobao.account }}</span>
<span v-else>请选择</span>
<span v-else-if="!taobaoList.length">暂无收款账号稍后配置</span>
<span v-else>未绑定店铺</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
@ -292,39 +240,22 @@
</div>
</template>
</CustomDropdown>
<CustomDropdown v-else slot="formDom" width="100%" v-model="bindTaobaoId"
:options="taobaoList" displayKey="name" valueKey="payid"
@change="changeSelectTaobao" placeholder="请选择"
:options_null="options_weixin_null" @changeNormal="changeNormalWeixin">
<!-- 选择后显示数据 -->
<template #trigger>
<span v-if="selectTaobao">{{ selectTaobao.short_name }} {{ selectTaobao.account }}</span>
<span v-else>请选择</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
<b>绑定新淘宝/天猫店铺</b>
<p class="one">如未购买快乐帮手服务或已过期会跳转到购买服务页面</p>
</div>
<div class="right">
<GuipButton type="primary" size="medium" @click="goBindPay(payTypeTaoBao)">前往绑定</GuipButton>
</div>
</div>
</template>
</CustomDropdown>
</GuipFormItem>
<!-- 拼多多 -->
<GuipFormItem column="column" class="mb24" v-if="addablePays[payTypePdd]">
<div slot="formLeft" class="form-top-icon">
<img src="@/assets/register/pinduoduo.svg" style="width: 26px;height: 26px;" alt=""><span>拼多多店铺</span>
</div>
<CustomDropdown v-if="pddList && pddList.length" slot="formDom" width="100%" v-model="bindPddId"
<CustomDropdown slot="formDom" width="100%"
:options="pddList" displayKey="name" valueKey="payid"
@change="changeSelectPdd" placeholder="请选择" @changeNormal="changeNormalWeixin">
:options_null="!pddList.length"
@change="changeSelectPdd" >
<!-- 选择后显示数据 -->
<template #trigger>
<span v-if="selectPdd">{{ selectPdd.short_name }} {{ selectPdd.account }}</span>
<span v-else>请选择</span>
<span v-else-if="pddList.length === 0">暂无收款账号稍后配置</span>
<span v-else>未绑定拼多多店铺</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
@ -351,27 +282,6 @@
</div>
</template>
</CustomDropdown>
<CustomDropdown v-else slot="formDom" width="100%" v-model="bindPddId"
:options="pddList" displayKey="name" valueKey="payid"
@change="changeSelectPdd" placeholder="请选择"
:options_null="options_weixin_null" @changeNormal="changeNormalWeixin">
<!-- 选择后显示数据 -->
<template #trigger>
<span v-if="selectPdd">{{ selectPdd.short_name }} {{ selectPdd.account }}</span>
<span v-else>请选择</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
<b>绑定新拼多多店铺</b>
<p class="one">如未购买快乐帮手服务或已过期会跳转到购买服务页面</p>
</div>
<div class="right">
<GuipButton type="primary" size="medium" @click="goBindPay(payTypePdd)">前往绑定</GuipButton>
</div>
</div>
</template>
</CustomDropdown>
</GuipFormItem>
</div>
</div>
@ -478,9 +388,6 @@ export default {
domainTypes: [],
domainPrefix: '',
siteDomain: '',
options_weixin_null: {},
select_placeholder_weixin: '暂无收款账号,稍后配置',
}
},
computed: {
@ -688,63 +595,52 @@ export default {
cancleUpdateSiteInfo() {
this.getSiteInfo();
},
changeNormalWeixin() {
},
changeSelectWeixin(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
changeSelectWeixin(item) {
console.log(item, 'item')
if(this.bindWxpayId === item.payid){
this.bindWxpayId = 0
this.selectWxpay = null
return true
}
this.bindWxpayId = item.payid;
this.selectWxpay = item;
console.log(this.bindWxpayId, 'bindWxpayId');
console.log(this.selectWxpay, 'selectWxpay');
this.selectedItem = { ...item };
console.log(this.selectedItem, 'this.selectedItem====');
},
changeSelectAlipay(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
changeSelectAlipay(item) {
if(this.bindAlipayId === item.payid){
this.bindAlipayId = 0
this.selectAlipay = null
return true
}
this.bindAlipayId = item.payid;
this.selectAlipay = item;
console.log(this.bindWxpayId, 'bindWxpayId');
this.selectedItem = { ...item };
console.log(this.selectedItem, 'this.selectedItem====');
},
changeSelectTaobao(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
changeSelectTaobao(item) {
if(this.bindTaobaoId === item.payid){
this.bindTaobaoId = 0
this.selectTaobao = null
return true
}
this.bindTaobaoId = item.payid;
this.selectTaobao = item;
this.selectedItem = { ...item };
},
changeSelectJindong(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
changeSelectJindong(item) {
if(this.bindJdId === item.payid){
this.bindJdId = 0
this.selectJd = null
return true
}
this.bindJdId = item.payid;
this.selectJd = item;
this.selectedItem = { ...item };
},
changeSelectPdd(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
changeSelectPdd(item) {
if(this.bindPddId === item.payid){
this.bindPddId = 0
this.selectPdd = null
return true
}
this.bindPddId = item.payid;
this.selectPdd = item;
this.selectedItem = { ...item };
},
//
domainTypeChange(type) {

Loading…
Cancel
Save