|
|
@ -20,7 +20,7 @@ |
|
|
|
<div> |
|
|
|
<div class="flex-common table-wrap"> |
|
|
|
<el-form> |
|
|
|
<GuipTable :border="true" :tableData="payList[3]" :loading="tableLoading"> |
|
|
|
<GuipTable :border="true" :tableData="payList[payTypeAlipay]" :loading="tableLoading"> |
|
|
|
<el-table-column prop="short_name" fixed="left" label="公司简称"></el-table-column> |
|
|
|
<el-table-column prop="account" label="账号"></el-table-column> |
|
|
|
<el-table-column prop="expires_time" label="有效期" min-width="30px"></el-table-column> |
|
|
@ -64,7 +64,7 @@ |
|
|
|
<div> |
|
|
|
<div class="flex-common table-wrap"> |
|
|
|
<el-form> |
|
|
|
<GuipTable :border="true" :tableData="payList[2]" :loading="tableLoading"> |
|
|
|
<GuipTable :border="true" :tableData="payList[payTypeWeixin]" :loading="tableLoading"> |
|
|
|
<el-table-column prop="short_name" fixed="left" label="公司简称"></el-table-column> |
|
|
|
<el-table-column prop="account" label="账号"></el-table-column> |
|
|
|
<el-table-column prop="expires_time" label="有效期" min-width="30px"></el-table-column> |
|
|
@ -108,7 +108,7 @@ |
|
|
|
<div> |
|
|
|
<div class="flex-common table-wrap"> |
|
|
|
<el-form> |
|
|
|
<GuipTable :border="true" :tableData="payList[0]" :loading="tableLoading"> |
|
|
|
<GuipTable :border="true" :tableData="payList[payTypeTaoBao]" :loading="tableLoading"> |
|
|
|
<el-table-column prop="short_name" fixed="left" label="公司简称"></el-table-column> |
|
|
|
<el-table-column prop="account" label="账号"></el-table-column> |
|
|
|
<el-table-column prop="expires_time" label="有效期" min-width="50px"> |
|
|
@ -150,7 +150,7 @@ |
|
|
|
<div> |
|
|
|
<div class="flex-common table-wrap"> |
|
|
|
<el-form> |
|
|
|
<GuipTable :border="true" :tableData="payList[11]" :loading="tableLoading"> |
|
|
|
<GuipTable :border="true" :tableData="payList[payTypePdd]" :loading="tableLoading"> |
|
|
|
<el-table-column prop="short_name" fixed="left" label="公司简称"></el-table-column> |
|
|
|
<el-table-column prop="account" label="账号"></el-table-column> |
|
|
|
<el-table-column prop="expires_time" label="有效期" min-width="50px"> |
|
|
@ -191,7 +191,7 @@ |
|
|
|
<div> |
|
|
|
<div class="flex-common table-wrap"> |
|
|
|
<el-form> |
|
|
|
<GuipTable :border="true" :tableData="payList[4]" :loading="tableLoading"> |
|
|
|
<GuipTable :border="true" :tableData="payList[payTypeJingdong]" :loading="tableLoading"> |
|
|
|
<el-table-column prop="short_name" fixed="left" label="公司简称"></el-table-column> |
|
|
|
<el-table-column prop="account" label="账号"></el-table-column> |
|
|
|
<el-table-column prop="expires_time" label="有效期" min-width="50px"> |
|
|
@ -228,7 +228,7 @@ |
|
|
|
<!-- 自定义内容 --> |
|
|
|
<div> |
|
|
|
<!-- 淘宝 --> |
|
|
|
<div class="taobaopay" v-if="addPayType==0"> |
|
|
|
<div class="taobaopay" v-if="addPayType==payTypeTaoBao"> |
|
|
|
<div class="beforeNotice"> |
|
|
|
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4> |
|
|
|
<p class="mt12 flex"> |
|
|
@ -240,7 +240,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 微信 --> |
|
|
|
<div class="weixinpay" v-else-if="addPayType==2"> |
|
|
|
<div class="weixinpay" v-else-if="addPayType==payTypeWeixin"> |
|
|
|
<div class="beforeNotice"> |
|
|
|
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4> |
|
|
|
<p class="mt12">1.申请公司微信支付。<a href="https://zhic.yuque.com/staff-chwecz/xhk8nt/ggkqm3" target="_blank"><img src="@/assets/site/form_qua_ic.svg" alt="">常见问题</a> </p> |
|
|
@ -275,7 +275,7 @@ |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<!-- 支付宝 --> |
|
|
|
<div class="alipay" v-if="addPayType==3"> |
|
|
|
<div class="alipay" v-if="addPayType==payTypeAlipay"> |
|
|
|
<el-tabs v-model="isPayPublic" @tab-click="handleClick"> |
|
|
|
<el-tab-pane label="我有公司,使用本公司支付宝" name="0"> |
|
|
|
<el-form> |
|
|
@ -309,7 +309,7 @@ |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
<!-- 拼多多 --> |
|
|
|
<div class="alipay" v-if="addPayType==11"> |
|
|
|
<div class="pddpay" v-if="addPayType==payTypePdd"> |
|
|
|
<div class="beforeNotice"> |
|
|
|
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4> |
|
|
|
<p class="mt12 flex">主账号登录并授权。<a :href="pddAuthUrl" class="flex" target="_blank"><img src="@/assets/site/form_linkActive.svg" alt="">去授权</a></p> |
|
|
@ -323,6 +323,14 @@ |
|
|
|
</GuipFormItem> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<!-- 京东 --> |
|
|
|
<div class="jdpay" v-if="addPayType==payTypeJingdong"> |
|
|
|
<div class="beforeNotice"> |
|
|
|
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4> |
|
|
|
<p class="mt12 flex">请确保使用要添加的京东主账号登录并授权</p> |
|
|
|
<p class="mt10 flex">如未购买"快乐论文检测服务"服务或已过期,会跳转到购买服务页面</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</GuipDialog> |
|
|
|
</div> |
|
|
@ -331,61 +339,80 @@ |
|
|
|
import GuipButton from '@/components/GuipButton.vue'; |
|
|
|
import GuipFormItem from '@/components/GuipFormItem.vue'; |
|
|
|
import GuipInput from '@/components/GuipInput.vue'; |
|
|
|
// import GuipRadio from '@/components/GuipRadio.vue'; |
|
|
|
// import GuipSelect from '@/components/GuipSelect.vue'; |
|
|
|
import GuipSwitch from '@/components/GuipSwitch.vue'; |
|
|
|
import GuipDialog from '@/components/GuipDialog.vue'; |
|
|
|
// import PaymentMethod from '@/components/paymentMethod.vue'; |
|
|
|
// import DomainModal from '@/components/domainModal.vue'; |
|
|
|
// import CustomDropdown from '@/components/CustomDropdown.vue'; |
|
|
|
// import SvgIcon from '@/components/SvgIcon.vue'; |
|
|
|
import GuipTable from '@/components/GuipTable.vue'; |
|
|
|
// import GuipToolTip from '@/components/GuipToolTip.vue'; |
|
|
|
|
|
|
|
// 收款方式 |
|
|
|
const PAY_TYPE_TAOBAO = 0; // 淘宝 |
|
|
|
const PAY_TYPE_WEIXIN = 2; // 微信 |
|
|
|
const PAY_TYPE_ALIPAY = 3; // 支付宝 |
|
|
|
const PAY_TYPE_JINGDONG = 4; // 京东 |
|
|
|
const PAY_TYPE_PDD = 11; // 拼多多 |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
GuipButton, |
|
|
|
GuipFormItem, |
|
|
|
GuipInput, |
|
|
|
// GuipRadio, |
|
|
|
// GuipSelect, |
|
|
|
// SvgIcon, |
|
|
|
GuipSwitch, |
|
|
|
GuipDialog, |
|
|
|
// PaymentMethod, |
|
|
|
// DomainModal, |
|
|
|
// CustomDropdown, |
|
|
|
GuipTable, |
|
|
|
// GuipToolTip |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
// 收款方式 |
|
|
|
payTypeTaoBao: PAY_TYPE_TAOBAO, |
|
|
|
payTypeWeixin: PAY_TYPE_WEIXIN, |
|
|
|
payTypeAlipay: PAY_TYPE_ALIPAY, |
|
|
|
payTypeJingdong: PAY_TYPE_JINGDONG, |
|
|
|
payTypePdd: PAY_TYPE_PDD, |
|
|
|
// AUTH |
|
|
|
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU', |
|
|
|
// 可添加的收款方式 |
|
|
|
addablePays: [], |
|
|
|
// 收款方式列表 |
|
|
|
payList: [], |
|
|
|
// 表格加载 |
|
|
|
tableLoading: false, |
|
|
|
// 添加收款方式弹框 |
|
|
|
addPayDialogVisible: false, |
|
|
|
showCancelButton: true, // 控制是否显示取消按钮 |
|
|
|
showCloseButton: true, // 控制是否显示关闭按钮 |
|
|
|
// 控制是否显示取消按钮 |
|
|
|
showCancelButton: true, |
|
|
|
// 控制是否显示关闭按钮 |
|
|
|
showCloseButton: true, |
|
|
|
// 添加收款方式弹框标题 |
|
|
|
addPayTitle: '', |
|
|
|
// 添加收款方式类型 |
|
|
|
addPayType: '', |
|
|
|
// 添加收款方式确认按钮文本 |
|
|
|
addPayconfirmText: '确定', |
|
|
|
// 淘宝授权url |
|
|
|
taobaoAuthUrl: '', |
|
|
|
|
|
|
|
// 公司简称 |
|
|
|
company_short_name: '', |
|
|
|
// 商户号 |
|
|
|
mch_id: '', |
|
|
|
// 微信支付秘钥 |
|
|
|
apiv2: '', |
|
|
|
// 公众号APPID |
|
|
|
appid: '', |
|
|
|
|
|
|
|
// 支付宝账号 |
|
|
|
alipay_account: '', |
|
|
|
// 是否存在自供货 存在自供货 则不支持支付宝代收款 |
|
|
|
isExistSelfSupplys: false, |
|
|
|
// 代收款 收款账号 |
|
|
|
receive_payment_account: '', |
|
|
|
// 代收款 收款人姓名 |
|
|
|
receive_payment_name: '', |
|
|
|
// 是否是平台支付 0平台支付 1自营支付 |
|
|
|
isPayPublic: '0', |
|
|
|
|
|
|
|
// 拼多多授权url |
|
|
|
pddAuthUrl: '', |
|
|
|
// 拼多多店铺名称 |
|
|
|
pdd_shop_name: '', |
|
|
|
// 京东授权url |
|
|
|
jdAuthUrl: '', |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -408,9 +435,22 @@ export default { |
|
|
|
this.tableLoading = false |
|
|
|
this.$nextTick(() => { |
|
|
|
this.addablePays = response.data |
|
|
|
this.taobaoAuthUrl = response.data[0].authurl |
|
|
|
this.isExistSelfSupplys = response.data[3].is_exist_self_supplys |
|
|
|
this.pddAuthUrl = response.data[11].authurl |
|
|
|
if(response.data[PAY_TYPE_TAOBAO]) { |
|
|
|
this.taobaoAuthUrl = response.data[PAY_TYPE_TAOBAO].authurl |
|
|
|
} |
|
|
|
|
|
|
|
if (response.data[PAY_TYPE_ALIPAY]) { |
|
|
|
this.isExistSelfSupplys = response.data[PAY_TYPE_ALIPAY].is_exist_self_supplys |
|
|
|
} |
|
|
|
|
|
|
|
if (response.data[PAY_TYPE_PDD]) { |
|
|
|
this.pddAuthUrl = response.data[PAY_TYPE_PDD].authurl |
|
|
|
} |
|
|
|
|
|
|
|
if (response.data[PAY_TYPE_JINGDONG]) { |
|
|
|
this.jdAuthUrl = response.data[PAY_TYPE_JINGDONG].authurl |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
@ -483,16 +523,16 @@ export default { |
|
|
|
this.addPayDialogVisible = true; |
|
|
|
this.addPayTitle = '添加' + type_desc; |
|
|
|
this.addPayType = type; |
|
|
|
if (type == 0) { |
|
|
|
if (type == PAY_TYPE_TAOBAO || type == PAY_TYPE_JINGDONG) { |
|
|
|
this.addPayconfirmText = '去授权'; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 确认按钮事件 |
|
|
|
addPayment() { |
|
|
|
if (this.addPayType == 0) { |
|
|
|
if (this.addPayType == PAY_TYPE_TAOBAO) { |
|
|
|
window.open(this.taobaoAuthUrl, '_blank'); |
|
|
|
|
|
|
|
} else if (this.addPayType == 2) { |
|
|
|
} else if (this.addPayType == PAY_TYPE_WEIXIN) { |
|
|
|
this.$http('POST', '/agentnew/ajax_add_weixinpay', { |
|
|
|
company_short_name: this.company_short_name, |
|
|
|
mch_id: this.mch_id, |
|
|
@ -515,7 +555,7 @@ export default { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
|
|
|
|
} else if (this.addPayType == 3) { |
|
|
|
} else if (this.addPayType == PAY_TYPE_ALIPAY) { |
|
|
|
this.$http('POST', '/agentnew/ajax_add_alipay', { |
|
|
|
company_short_name: this.company_short_name, |
|
|
|
alipay_account: this.alipay_account, |
|
|
@ -545,7 +585,7 @@ export default { |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
} else if (this.addPayType == 11) { |
|
|
|
} else if (this.addPayType == PAY_TYPE_PDD) { |
|
|
|
this.$http('POST', '/agentnew/ajax_add_pddpay', { |
|
|
|
shop_name: this.pdd_shop_name, |
|
|
|
}, { |
|
|
@ -555,14 +595,9 @@ export default { |
|
|
|
}).then(response => { |
|
|
|
this.$nextTick(() => { |
|
|
|
if (response.status) { |
|
|
|
if (this.isPayPublic == 1) { |
|
|
|
this.$Message.success(response.info); |
|
|
|
this.getPayList(); |
|
|
|
this.receive_payment_account = '' |
|
|
|
this.receive_payment_name = '' |
|
|
|
} else { |
|
|
|
window.open(response.data.authurl, '_blank'); |
|
|
|
} |
|
|
|
this.$Message.success(response.info); |
|
|
|
this.getPayList(); |
|
|
|
this.pdd_shop_name = '' |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$Message.error(response.info); |
|
|
@ -571,6 +606,8 @@ export default { |
|
|
|
}).catch(error => { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
} else if (this.addPayType == PAY_TYPE_JINGDONG) { |
|
|
|
window.open(this.jdAuthUrl, '_blank'); |
|
|
|
} |
|
|
|
|
|
|
|
this.addPayDialogVisible = false; |
|
|
@ -581,7 +618,6 @@ export default { |
|
|
|
}, |
|
|
|
// 关闭弹框事件 |
|
|
|
handleClose() { |
|
|
|
this.$message.info('弹框已关闭'); |
|
|
|
this.addPayDialogVisible = false; |
|
|
|
}, |
|
|
|
dialogVisibleChange(data) { |
|
|
|