Browse Source

Merge pull request '收款方式设置' (#64) from 20250627_paysetting into master

Reviewed-on: #64
pull/66/head
liuyu 4 days ago
parent
commit
f5f5431f41
  1. 1
      src/assets/site/pay.svg
  2. 1
      src/assets/site/pay_trade.svg
  3. 1
      src/assets/site/setting.svg
  4. 12
      src/router/index.js
  5. 49
      src/store/index.js
  6. 13
      src/views/agent/payList.vue
  7. 360
      src/views/agent/paySetting.vue

1
src/assets/site/pay.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

1
src/assets/site/pay_trade.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="15.497314453125" height="15.498046875" viewBox="0 0 15.497314453125 15.498046875"><g><g><path d="M6.39904,11.2981L7.3987,11.2981Q7.47257,11.2981,7.54502,11.2837Q7.61747,11.2693,7.68571,11.241Q7.75396,11.2127,7.81538,11.1717Q7.8768,11.1306,7.92903,11.0784Q7.98126,11.0262,8.022300000000001,10.9648Q8.06334,10.9033,8.09161,10.8351Q8.11988,10.7669,8.13429,10.6944Q8.1487,10.62195,8.1487,10.54809Q8.1487,10.47422,8.13429,10.40177Q8.11988,10.32932,8.09161,10.26107Q8.06334,10.19283,8.022300000000001,10.13141Q7.98126,10.06999,7.92903,10.01776Q7.8768,9.96552,7.81538,9.92448Q7.75396,9.88344,7.68571,9.85518Q7.61747,9.82691,7.54502,9.8125Q7.47257,9.79809,7.3987,9.79809L5.64904,9.79809Q5.57517,9.79809,5.50272,9.8125Q5.43028,9.82691,5.36203,9.85518Q5.29378,9.88344,5.23237,9.92448Q5.17095,9.96552,5.11871,10.01776Q5.06648,10.06999,5.02544,10.13141Q4.9844,10.19283,4.95613,10.26107Q4.92787,10.32932,4.91345,10.40177Q4.89904,10.47422,4.89904,10.54809L4.89904,12.7512L1.76077,9.16458L4.89904,5.80215L4.89904,7.74863Q4.89904,7.8225,4.91345,7.89495Q4.92787,7.9674,4.95613,8.03565Q4.9844,8.10389,5.02544,8.16531Q5.06648,8.22673,5.11871,8.27896Q5.17095,8.33119,5.23237,8.37223Q5.29378,8.41327,5.36203,8.44154Q5.43028,8.469809999999999,5.50272,8.48422Q5.57517,8.49863,5.64904,8.49863L8.74829,8.49863L8.74829,11.248Q8.74829,11.3218,8.7627,11.3943Q8.77711,11.4667,8.80538,11.535Q8.83365,11.6032,8.87469,11.6646Q8.91573,11.726,8.96796,11.7783Q9.02019,11.8305,9.08161,11.8716Q9.14303,11.9126,9.21128,11.9409Q9.27952,11.9691,9.35197,11.9835Q9.42442,11.9979,9.49829,11.998Q9.64748,11.9979,9.7853,11.9409Q9.92313,11.8838,10.02862,11.7783L15.2776,6.52931Q15.3298,6.47707,15.3709,6.41565Q15.4119,6.35423,15.4402,6.28599Q15.4684,6.21774,15.4829,6.14529Q15.4973,6.07284,15.4973,5.99898Q15.4973,5.92511,15.4829,5.85266Q15.4684,5.78021,15.4402,5.71196Q15.4119,5.64372,15.3709,5.5823Q15.3298,5.52088,15.2776,5.46865L10.02862,0.21967000000000003Q9.97639,0.16743699999999995,9.91497,0.126398Q9.85355,0.08535899999999996,9.7853,0.057089999999999974Q9.71706,0.028822000000000014,9.64461,0.014410999999999952Q9.57216,0,9.49829,0Q9.42442,0,9.35197,0.014410999999999952Q9.27952,0.028822000000000014,9.21128,0.057089999999999974Q9.14303,0.08535899999999996,9.08161,0.126398Q9.0202,0.16743699999999995,8.96796,0.21967000000000003Q8.86247,0.325159,8.80538,0.462987Q8.74829,0.600816,8.74829,0.75L8.74829,4.19918L7.74863,4.19918Q7.67477,4.19918,7.60232,4.21359Q7.52987,4.228,7.46162,4.256270000000001Q7.39337,4.28454,7.33195,4.32558Q7.27054,4.36662,7.2183,4.41885Q7.16607,4.471080000000001,7.12503,4.532500000000001Q7.08399,4.59392,7.05572,4.66217Q7.02745,4.73041,7.01304,4.80286Q6.99863,4.87531,6.99863,4.94918Q6.99863,5.02305,7.01304,5.0955Q7.02745,5.16795,7.05572,5.23619Q7.08399,5.30444,7.12503,5.36586Q7.16607,5.42728,7.2183,5.47951Q7.27054,5.53174,7.33195,5.57278Q7.39337,5.61382,7.46162,5.64209Q7.52987,5.67036,7.60232,5.68477Q7.67477,5.69918,7.74863,5.69918L9.49829,5.69918Q9.57216,5.69918,9.64461,5.68477Q9.71706,5.67036,9.7853,5.64209Q9.85355,5.61382,9.91497,5.57278Q9.97639,5.53174,10.02862,5.47951Q10.08085,5.42728,10.12189,5.36586Q10.16293,5.30444,10.1912,5.23619Q10.21947,5.16795,10.23388,5.0955Q10.24829,5.02305,10.24829,4.94918L10.24829,2.56066L13.6866,5.99898L10.24829,9.43729L10.24829,7.74863Q10.24829,7.67477,10.23388,7.60232Q10.21947,7.52987,10.1912,7.46162Q10.16293,7.39337,10.12189,7.33195Q10.08085,7.27054,10.02862,7.2183Q9.97639,7.16607,9.91497,7.12503Q9.85355,7.08399,9.7853,7.05572Q9.71706,7.02745,9.64461,7.01304Q9.57216,6.99863,9.49829,6.99863L6.39904,6.99863L6.39904,3.89938Q6.39904,3.74347,6.3369,3.60047Q6.27476,3.45748,6.16078,3.35109Q6.05172,3.2493,5.91201,3.197Q5.77229,3.14469,5.6232,3.14983Q5.4741,3.15497,5.33832,3.21678Q5.20254,3.27858,5.10075,3.38765L0.20170900000000003,8.63662Q0.15456800000000004,8.68713,0.11744699999999997,8.7454Q0.08032700000000004,8.80367,0.05447599999999997,8.86774Q0.02862600000000004,8.93181,0.01491600000000004,8.99953Q0.0012050000000000116,9.06724,0.00009700000000001374,9.13632Q-0.0010120000000000129,9.2054,0.010518000000000027,9.27352Q0.022047999999999957,9.34164,0.04582900000000001,9.40651Q0.06960900000000003,9.47138,0.10484099999999996,9.53081Q0.14007199999999997,9.59024,0.18556700000000004,9.64224L5.08461,15.2411Q5.19142,15.3632,5.33913,15.4302Q5.48684,15.4973,5.64904,15.4973Q5.72291,15.4973,5.79536,15.4829Q5.86781,15.4684,5.93606,15.4402Q6.0043,15.4119,6.06572,15.3709Q6.12714,15.3298,6.17937,15.2776Q6.23161,15.2254,6.27265,15.1639Q6.31368,15.1025,6.34195,15.0343Q6.37022,14.966,6.38463,14.8936Q6.39904,14.8211,6.39904,14.7473L6.39904,11.2981Z" fill-rule="evenodd" fill="#626573" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

1
src/assets/site/setting.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.8 KiB

12
src/router/index.js

@ -134,6 +134,18 @@ const routes = [{
}
},
{
path: '/agent/paySetting',
name: '收款方式设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/paySetting.vue'),
meta: {
title: '收款方式设置',
breadcrumbParent: '收款方式' // 手动指定父级
// 如果想隐藏中间层级
// breadcrumbParent: '首页', // 跳过医生信息
// hideInBreadcrumb: true // 可选:隐藏当前项
}
},
{
path: '/franchise',
name: '加盟',
component: () => import( /* webpackChunkName: "franchise" */ '../views/Franchise.vue'),

49
src/store/index.js

@ -314,6 +314,55 @@ export default new Vuex.Store({
},
]
}
],
paySettingData:[
{
name: '支付授权',
path: '/agent/payList',
img:'site/pay.svg',
imgActive: require('@/assets/site/sitebase_active.svg'),
list: []
},
{
name: '钱款交易',
path: '/agent/payList',
img:'site/pay_trade.svg',
imgActive: require('@/assets/site/sitebase_active.svg'),
list: [
{
name: '管理证书',
desc: 'siteMessage1'
},
{
name: '平台退款',
desc: 'siteMessage2'
},
{
name: '分账管理',
desc: 'siteMessage3'
},
]
},
{
name: '支付设置',
path: '/agent/sitePersonalization',
img: 'site/setting.svg',
imgActive: require('@/assets/site/sitebase_active.svg'),
list: [
{
name: '支付客服',
desc: 'siteMessage4'
},
{
name: '启停收款方式',
desc: 'siteMessage5'
},
{
name: '移除收款方式',
desc: 'siteMessage6'
},
]
},
]
},
actions: {

13
src/views/agent/payList.vue

@ -54,7 +54,7 @@
<el-table-column label="操作" fixed="right" min-width="30px">
<template slot-scope="scope">
<div class="flex">
<el-button @click="handleClick2(scope.row)" type="text">设置</el-button>
<el-button @click="paySetting(scope.row)" type="text">设置</el-button>
</div>
</template>
</el-table-column>
@ -109,7 +109,7 @@
<el-table-column label="操作" fixed="right" min-width="30px">
<template slot-scope="scope">
<div class="flex">
<el-button @click="handleClick2(scope.row)" type="text">设置</el-button>
<el-button @click="paySetting(scope.row)" type="text">设置</el-button>
</div>
</template>
</el-table-column>
@ -161,7 +161,7 @@
<el-table-column label="操作" fixed="right" min-width="30px">
<template slot-scope="scope">
<div class="flex">
<el-button @click="handleClick2(scope.row)" type="text">设置</el-button>
<el-button @click="paySetting(scope.row)" type="text">设置</el-button>
</div>
</template>
</el-table-column>
@ -214,7 +214,7 @@
<el-table-column label="操作" fixed="right" min-width="30px">
<template slot-scope="scope">
<div class="flex">
<el-button @click="handleClick2(scope.row)" type="text">设置</el-button>
<el-button @click="paySetting(scope.row)" type="text">设置</el-button>
</div>
</template>
</el-table-column>
@ -266,7 +266,7 @@
<el-table-column label="操作" fixed="right" min-width="30px">
<template slot-scope="scope">
<div class="flex">
<el-button @click="handleClick2(scope.row)" type="text">设置</el-button>
<el-button @click="paySetting(scope.row)" type="text">设置</el-button>
</div>
</template>
</el-table-column>
@ -732,6 +732,9 @@ export default {
// ---end
handleClick(tab, event) {
console.log(tab, event);
},
paySetting(row) {
window.open('/agent/paySetting?payid='+row.payid, '_blank');
}
},

360
src/views/agent/paySetting.vue

@ -0,0 +1,360 @@
<template>
<div class="main-content12">
<!-- page content -->
<div class="site-setting-wrap min-flex-right">
<div class="siteMessage flex-common">
<h3>支付授权</h3>
<el-form>
<div class="flex-wrap">
<div class="flex-left">
<el-form>
<GuipFormItem column="column" class="mb24" label="1. 公司简称">
<span class="desc" slot="formRight">请输入公司简称便于您区分账号所属公司</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.short_name" prop="company_short_name" placeholder="6字以内">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 支付商户号(mch_id)">
<span class="desc" slot="formRight"><a href='https://pay.weixin.qq.com/' target='_blank'>微信支付平台</a>账户中心商户信息微信支付商户号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.mch_id" prop="mch_id" placeholder="请输入商户号">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="3. 微信支付秘钥">
<span class="desc" slot="formRight"><a href='https://pay.weixin.qq.com/' target='_blank'>微信支付平台</a>账号中心账户设置API安全APIv2密钥<p class="mt10">注意支付密钥不能设置为纯数字</p></span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.apiv2" prop="payinfo.apiv2" placeholder="请输入微信支付秘钥">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="4. 公众号APPID">
<span class="desc" slot="formRight"><a href='https://mp.weixin.qq.com/' target='_blank'>公众平台</a>设置与开发基本配置公众号开发信息开发者IDAPPID</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.appid" prop="payinfo.appid" placeholder="请输入公众号APPID">
</GuipInput>
</GuipFormItem>
</el-form>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<div class="preview">
<div class="preview-title">
<p>预览支付二维码</p>
</div>
<div class="preview-content">
</div>
</div>
</div>
</div>
</el-form>
</div>
</div>
<div class="register-btns">
<GuipButton type="system" :btnstyle="{ width: '144px', height: '46px' }">取消</GuipButton>
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="addPayment">保存</GuipButton>
</div>
</div>
</template>
<script>
// import GuipInput from '@/components/GuipInput.vue';
import store from '@/store';
import { mapState } from 'vuex';
import GuipFormItem from '@/components/GuipFormItem.vue';
import GuipInput from '@/components/GuipInput.vue';
// import GuipTextarea from '@/components/GuipTextarea.vue';
// import GuipRadio from '@/components/GuipRadio.vue';
// import CustomDropdown from '@/components/CustomDropdown.vue';
import GuipButton from '@/components/GuipButton.vue';
// import GroupFormBtns from '@/components/GroupFormBtns.vue';
// import {setHighActive} from '@/utils/common';
//
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 {
//
name: '',
props: [''],
components: {
// GuipRadio,
GuipFormItem,
GuipInput,
// GuipTextarea,
// CustomDropdown,
GuipButton,
// GroupFormBtns
},
data() {
return {
// AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
payinfo: [],
payType: -1,
}
},
computed: {
...mapState(['pageTitle']) // VuexshowSidebar
},
created() {
store.commit('SET_CUSTOMIZE', true);
store.commit('SET_SLIDER_MENU', 'paySettingData');
},
mounted() {
store.commit('SET_PAGETITLE', '支付授权');
this.getPayment();
},
methods: {
getPayment() {
this.$http('POST', '/agentnew/ajax_get_payinfo', {
payid: this.$route.query.payid,
},{
headers:{
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
this.payinfo = response.data
this.payType = response.data.type
})
}).catch(error => {
console.error(error, 'error')
})
},
//
addPayment() {
if (this.payType == PAY_TYPE_TAOBAO) {
window.open(this.taobaoAuthUrl, '_blank');
} else if (this.payType == PAY_TYPE_WEIXIN) {
this.$http('POST', '/agentnew/ajax_add_weixinpay', {
payid: this.$route.query.payid,
company_short_name: this.payinfo.short_name,
mch_id: this.payinfo.mch_id,
apiv2: this.payinfo.apiv2,
appid: this.payinfo.appid
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
this.getPayList();
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.payType == PAY_TYPE_ALIPAY) {
this.$http('POST', '/agentnew/ajax_add_alipay', {
company_short_name: this.company_short_name,
alipay_account: this.alipay_account,
is_pay_public: this.isPayPublic,
receive_payment_account: this.receive_payment_account,
receive_payment_name: this.receive_payment_name
}, {
headers: {
'Auth': this.token
}
}).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');
}
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.payType == PAY_TYPE_PDD) {
this.$http('POST', '/agentnew/ajax_add_pddpay', {
shop_name: this.pdd_shop_name,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
this.getPayList();
this.pdd_shop_name = ''
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.payType == PAY_TYPE_JINGDONG) {
window.open(this.jdAuthUrl, '_blank');
}
},
//
toggleDrop(e){
this.$refs.dropDomain.toggleDropdown(e)
},
changeSelectIp(item) {
//
this.selectedItem1 = { ...item };
},
//
getSiteInfo() {
const that = this
that.siteInfo = []
this.$http('POST', '/agentnew/ajax_get_site_info', {
uid: this.$route.query.uid,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
that.siteInfo = response.data
})
}).catch(error => {
console.error(error, 'error')
})
},
updateSiteInfo() {
this.$http('POST', '/agentnew/ajax_update_site_info', {
uid: this.$route.query.uid,
short_name: this.siteInfo.short_name,
company_name: this.siteInfo.company_name,
company_phone: this.siteInfo.phone_num,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
},
cancleUpdateSiteInfo() {
this.getSiteInfo();
},
changeNormalWeixin() {
},
changeSelectWeixin(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
}
this.selectedItem = { ...item };
console.log(this.selectedItem, 'this.selectedItem====');
},
//
domain_radioChange(type) {
console.log(type, '--');
},
onSwitchChange(data) {
console.log(data, '---');
},
submitForm(form) {
console.log(this.$refs[form], '-----');
this.$refs[form].validate((valid) => {
console.log(this[form], '======formxinxi');
if (valid) {
alert('提交成功!');
} else {
return false;
}
});
},
cancelClick() {
console.log('quxiao');
},
confirmClick(type) {
console.log(type, '确认');
}
}
}
</script>
<style lang="scss" scoped>
a {
text-decoration: none;
color: #006AFF;
}
.register-btns {
// height: 78px;
/* 自动布局 */
// width: 344px;
display: flex;
flex-direction: row;
justify-content: center;
background: #FFFFFF;
padding: 16px 0px;
/* 蓝色阴影_常规 */
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12);
button:nth-child(1) {
margin-right: 56px;
}
}
.preview {
background: #FAFAFA;
border-radius: 4px;
width: 100%;
height: 100%;
text-align: left;
}
.preview-title {
padding-top: 24px;
padding-left: 20px;
}
.preview-title p {
font-size: 14px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
color: #1E2226;
}
.preview-content {
margin-top: 20px;
margin-left: 20px;
background: #FFFFFF;
width: 100%;
height: 200px;
}
.siteMessage {
border-radius: 4px;
transition: all .5s;
border: 1px solid transparent;
}
.site-setting-wrap {
width: 100%;
}
</style>
Loading…
Cancel
Save