支付模板修改

main
wangdong 4 months ago
parent 8cc0219468
commit 3f720bdee7
  1. 3
      src/common/enum/payment/Method.js
  2. 188
      src/views/setting/payment/template/Create.vue
  3. 187
      src/views/setting/payment/template/Update.vue

@ -7,5 +7,6 @@ import Enum from '../enum'
export default new Enum([
{ key: 'WECHAT', name: '微信支付', value: 'wechat' },
{ key: 'ALIPAY', name: '支付宝', value: 'alipay' },
{ key: 'BALANCE', name: '余额支付', value: 'balance' }
{ key: 'BALANCE', name: '余额支付', value: 'balance' },
{ key: 'HUIFU', name: '银联支付', value: 'huifu' }
])

@ -362,113 +362,142 @@
>
<a-radio-group v-model="record.config.huifu.mchType" @change="clearValidate()">
<a-radio value="normal">普通商户</a-radio>
<a-radio value="provider">子商户 (服务商模式)</a-radio>
<!-- <a-radio value="provider">子商户 (服务商模式)</a-radio> -->
</a-radio-group>
</a-form-model-item>
<div v-if="record.config.huifu.mchType === 'normal'" :mchType="record.config.huifu.mchType">
<a-form-model-item
label="汇付商户号"
prop="config.huifu.normal.sysId"
:rules="[{ required: true, message: '请填写汇付商户号' }]"
label="APPID"
prop="config.huifu.normal.appid"
:rules="[{ required: true, message: '请填写APPID' }]"
>
<a-input v-model="record.config.huifu.normal.sysId" autocomplete="off" />
<div class="form-item-help">
<a-input v-model="record.config.huifu.normal.appid" autocomplete="off" />
<!-- <div class="form-item-help">
<small
>微信小程序或者微信公众号的APPID需要在哪个客户端支付就填写哪个APP支付需要填写开放平台的应用APPID</small
>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
label="APPKEY"
prop="config.huifu.normal.appkey"
:rules="[{ required: true, message: '请填写APPKEY' }]"
>
<a-input v-model="record.config.huifu.normal.appkey" autocomplete="off" />
<!-- <div class="form-item-help">
<small
>微信小程序或者微信公众号的APPID需要在哪个客户端支付就填写哪个APP支付需要填写开放平台的应用APPID</small
>
</div> -->
</a-form-model-item>
<a-form-model-item
label="产品编号"
prop="config.huifu.normal.productId"
:rules="[{ required: true, message: '请填写产品编号' }]"
label="商户编号"
prop="config.huifu.normal.mid"
:rules="[{ required: true, message: '请填写商户编号' }]"
>
<a-input v-model="record.config.huifu.normal.productId" autocomplete="off" />
<a-input v-model="record.config.huifu.normal.mid" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="商户私钥"
prop="config.huifu.normal.rsaMerchPrivateKey"
:rules="[{ required: true, message: '请填写商户私钥' }]"
label="终端号"
prop="config.huifu.normal.tid"
:rules="[{ required: true, message: '请填终端号' }]"
>
<a-textarea
v-model="record.config.huifu.normal.rsaMerchPrivateKey"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
<div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
<a-input v-model="record.config.huifu.normal.tid" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="汇付公钥"
prop="config.huifu.normal.rsaHuifuPublicKey"
:rules="[{ required: true, message: '请填写汇付公钥' }]"
label="来源编号"
prop="config.huifu.normal.msgSrcId"
:rules="[{ required: true, message: '请填来源编号' }]"
>
<a-textarea
v-model="record.config.huifu.normal.rsaHuifuPublicKey"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
<div class="form-item-help">
<a-input v-model="record.config.huifu.normal.msgSrcId" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="消息来源"
prop="config.huifu.normal.msgSrc"
:rules="[{ required: true, message: '请填消息来源' }]"
>
<a-input v-model="record.config.huifu.normal.msgSrc" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="密钥(网付)"
prop="config.huifu.normal.md5Secret"
:rules="[{ required: true, message: '请填写支付密钥(网付)' }]"
>
<a-input type="password" v-model="record.config.huifu.normal.md5Secret" autocomplete="off" />
<!-- <div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
</div> -->
</a-form-model-item>
</div>
<div v-if="record.config.huifu.mchType === 'provider'" :mchType="record.config.huifu.mchType">
<a-form-model-item
label="汇付商户号"
prop="config.huifu.provider.spSysId"
:rules="[{ required: true, message: '请填写汇付商户号' }]"
label="APPID"
prop="config.huifu.provider.spAppid"
:rules="[{ required: true, message: '请填写APPID' }]"
>
<a-input v-model="record.config.huifu.provider.spAppId" autocomplete="off" />
<div class="form-item-help">
<a-input v-model="record.config.huifu.provider.spAppid" autocomplete="off" />
<!-- <div class="form-item-help">
<small>请填写微信支付服务商的AppID</small>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
label="产品编号"
prop="config.huifu.provider.spProductId"
:rules="[{ required: true, message: '请填写产品编号' }]"
label="APPKEY"
prop="config.huifu.provider.syAppkey"
:rules="[{ required: true, message: '请填写APPKEY' }]"
>
<a-input v-model="record.config.huifu.provider.spProductId" autocomplete="off" />
<div class="form-item-help">
<a-input v-model="record.config.huifu.provider.syAppkey" autocomplete="off" />
<!-- <div class="form-item-help">
<small>请填写微信支付服务商的AppID</small>
</div> -->
</a-form-model-item>
<a-form-model-item
label="商户编号"
prop="config.huifu.provider.syMid"
:rules="[{ required: true, message: '请填写商户编号' }]"
>
<a-input v-model="record.config.huifu.provider.syMid" autocomplete="off" />
<!-- <div class="form-item-help">
<small>微信支付服务商的商户号纯数字格式例如1600000109</small>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
label="商户私钥"
prop="config.huifu.provider.spRsaMerchPrivateKey"
:rules="[{ required: true, message: '请填写商户私钥' }]"
label="终端号"
prop="config.huifu.provider.syTid"
:rules="[{ required: true, message: '请填写终端号' }]"
>
<a-textarea
v-model="record.config.huifu.provider.spRsaMerchPrivateKey"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
<div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
<a-input v-model="record.config.huifu.provider.syTid" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="汇付公钥"
prop="config.huifu.provider.spRsaHuifuPublicKey"
:rules="[{ required: true, message: '请填写汇付公钥' }]"
label="来源编号"
prop="config.huifu.provider.syMsgSrcId"
:rules="[{ required: true, message: '请填写来源编号' }]"
>
<a-textarea
v-model="record.config.huifu.provider.spRsaHuifuPublicKey"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
<div class="form-item-help">
<a-input v-model="record.config.huifu.provider.syMsgSrcId" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="消息来源"
prop="config.huifu.provider.syMsgSrc"
:rules="[{ required: true, message: '请填写终端号' }]"
>
<a-input v-model="record.config.huifu.provider.syMsgSrc" autocomplete="off" />
<!-- <div class="form-item-help">
<small>微信支付服务商的商户号纯数字格式例如1600000109</small>
</div> -->
</a-form-model-item>
<a-form-model-item
label="密钥(网付)"
prop="config.huifu.provider.syMd5Secret"
:rules="[{ required: true, message: '请填写支付密钥(网付)' }]"
>
<a-input type="password" v-model="record.config.huifu.normal.syMd5Secret" autocomplete="off" />
<!-- <div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
<!-- <a-form-model-item
label="子商户私钥"
prop="config.huifu.provider.subAppId"
:rules="[{ required: true, message: '请填写子商户应用ID (AppID)' }]"
@ -497,7 +526,7 @@
<div class="form-item-help">
<small>微信支付的商户号纯数字格式例如1600000109</small>
</div>
</a-form-model-item>
</a-form-model-item> -->
</div>
</div>
<a-form-model-item :wrapperCol="{ offset: labelCol.span }">
@ -554,20 +583,25 @@ const defaultData = {
merchantPrivateKey: '',
},
[PaymentMethodEnum.HUIFU.value]: {
// normal provider
mchType: 'normal',
normal: {
sysId: '',
productId: '',
rsaMerchPrivateKey: '',
rsaHuifuPublicKey: '',
appkey: '',
mid: '',
tid: '',
msgSrcId: '',
msgSrc: '',
md5Secret: '',
},
provider: {
sysId: '',
productId: '',
rsaMerchPrivateKey: '',
rsaHuifuPublicKey: '',
// spSysId: '',
syAppkey: '',
syMid: '',
syTid: '',
syMsgSrcId: '',
syMsgSrc: '',
syMd5Secret: '',
// spAppid: '',
// spProductId: '',
// spRsaMerchPrivateKey: '',
// spRsaHuifuPublicKey: '',

@ -384,113 +384,142 @@
>
<a-radio-group v-model="record.config.huifu.mchType" @change="clearValidate()">
<a-radio value="normal">普通商户</a-radio>
<a-radio value="provider">子商户 (服务商模式)</a-radio>
<!-- <a-radio value="provider">子商户 (服务商模式)</a-radio> -->
</a-radio-group>
</a-form-model-item>
<div v-if="record.config.huifu.mchType === 'normal'" :mchType="record.config.huifu.mchType">
<a-form-model-item
label="汇付商户号"
prop="config.huifu.normal.sysId"
:rules="[{ required: true, message: '请填写汇付商户号' }]"
label="APPID"
prop="config.huifu.normal.appid"
:rules="[{ required: true, message: '请填写APPID' }]"
>
<a-input v-model="record.config.huifu.normal.sysId" autocomplete="off" />
<div class="form-item-help">
<a-input v-model="record.config.huifu.normal.appid" autocomplete="off" />
<!-- <div class="form-item-help">
<small
>微信小程序或者微信公众号的APPID需要在哪个客户端支付就填写哪个APP支付需要填写开放平台的应用APPID</small
>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
label="APPKEY"
prop="config.huifu.normal.appkey"
:rules="[{ required: true, message: '请填写APPKEY' }]"
>
<a-input v-model="record.config.huifu.normal.appkey" autocomplete="off" />
<!-- <div class="form-item-help">
<small
>微信小程序或者微信公众号的APPID需要在哪个客户端支付就填写哪个APP支付需要填写开放平台的应用APPID</small
>
</div> -->
</a-form-model-item>
<a-form-model-item
label="产品编号"
prop="config.huifu.normal.productId"
:rules="[{ required: true, message: '请填写产品编号' }]"
label="商户编号"
prop="config.huifu.normal.mid"
:rules="[{ required: true, message: '请填写商户编号' }]"
>
<a-input v-model="record.config.huifu.normal.productId" autocomplete="off" />
<a-input v-model="record.config.huifu.normal.mid" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="商户私钥"
prop="config.huifu.normal.rsaMerchPrivateKey"
:rules="[{ required: true, message: '请填写商户私钥' }]"
label="终端号"
prop="config.huifu.normal.tid"
:rules="[{ required: true, message: '请填终端号' }]"
>
<a-textarea
v-model="record.config.huifu.normal.rsaMerchPrivateKey"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
<div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
<a-input v-model="record.config.huifu.normal.tid" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="汇付公钥"
prop="config.huifu.normal.rsaHuifuPublicKey"
:rules="[{ required: true, message: '请填写汇付公钥' }]"
label="来源编号"
prop="config.huifu.normal.msgSrcId"
:rules="[{ required: true, message: '请填来源编号' }]"
>
<a-textarea
v-model="record.config.huifu.normal.rsaHuifuPublicKey"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
<div class="form-item-help">
<a-input v-model="record.config.huifu.normal.msgSrcId" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="消息来源"
prop="config.huifu.normal.msgSrc"
:rules="[{ required: true, message: '请填消息来源' }]"
>
<a-input v-model="record.config.huifu.normal.msgSrc" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="密钥(网付)"
prop="config.huifu.normal.md5Secret"
:rules="[{ required: true, message: '请填写支付密钥(网付)' }]"
>
<a-input type="password" v-model="record.config.huifu.normal.md5Secret" autocomplete="off" />
<!-- <div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
</div> -->
</a-form-model-item>
</div>
<div v-if="record.config.huifu.mchType === 'provider'" :mchType="record.config.huifu.mchType">
<a-form-model-item
label="汇付商户号"
prop="config.huifu.provider.spSysId"
:rules="[{ required: true, message: '请填写汇付商户号' }]"
label="APPID"
prop="config.huifu.provider.spAppid"
:rules="[{ required: true, message: '请填写APPID' }]"
>
<a-input v-model="record.config.huifu.provider.spAppId" autocomplete="off" />
<div class="form-item-help">
<a-input v-model="record.config.huifu.provider.spAppid" autocomplete="off" />
<!-- <div class="form-item-help">
<small>请填写微信支付服务商的AppID</small>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
label="产品编号"
prop="config.huifu.provider.spProductId"
:rules="[{ required: true, message: '请填写产品编号' }]"
label="APPKEY"
prop="config.huifu.provider.syAppkey"
:rules="[{ required: true, message: '请填写APPKEY' }]"
>
<a-input v-model="record.config.huifu.provider.spProductId" autocomplete="off" />
<div class="form-item-help">
<a-input v-model="record.config.huifu.provider.syAppkey" autocomplete="off" />
<!-- <div class="form-item-help">
<small>请填写微信支付服务商的AppID</small>
</div> -->
</a-form-model-item>
<a-form-model-item
label="商户编号"
prop="config.huifu.provider.syMid"
:rules="[{ required: true, message: '请填写商户编号' }]"
>
<a-input v-model="record.config.huifu.provider.syMid" autocomplete="off" />
<!-- <div class="form-item-help">
<small>微信支付服务商的商户号纯数字格式例如1600000109</small>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
label="商户私钥"
prop="config.huifu.provider.spRsaMerchPrivateKey"
:rules="[{ required: true, message: '请填写商户私钥' }]"
label="终端号"
prop="config.huifu.provider.syTid"
:rules="[{ required: true, message: '请填写终端号' }]"
>
<a-textarea
v-model="record.config.huifu.provider.spRsaMerchPrivateKey"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
<div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
<a-input v-model="record.config.huifu.provider.syTid" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="汇付公钥"
prop="config.huifu.provider.spRsaHuifuPublicKey"
:rules="[{ required: true, message: '请填写汇付公钥' }]"
label="来源编号"
prop="config.huifu.provider.syMsgSrcId"
:rules="[{ required: true, message: '请填写来源编号' }]"
>
<a-textarea
v-model="record.config.huifu.provider.spRsaHuifuPublicKey"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
<div class="form-item-help">
<a-input v-model="record.config.huifu.provider.syMsgSrcId" autocomplete="off" />
</a-form-model-item>
<a-form-model-item
label="消息来源"
prop="config.huifu.provider.syMsgSrc"
:rules="[{ required: true, message: '请填写终端号' }]"
>
<a-input v-model="record.config.huifu.provider.syMsgSrc" autocomplete="off" />
<!-- <div class="form-item-help">
<small>微信支付服务商的商户号纯数字格式例如1600000109</small>
</div> -->
</a-form-model-item>
<a-form-model-item
label="密钥(网付)"
prop="config.huifu.provider.syMd5Secret"
:rules="[{ required: true, message: '请填写支付密钥(网付)' }]"
>
<a-input type="password" v-model="record.config.huifu.normal.syMd5Secret" autocomplete="off" />
<!-- <div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
<!-- <a-form-model-item
label="子商户私钥"
prop="config.huifu.provider.subAppId"
:rules="[{ required: true, message: '请填写子商户应用ID (AppID)' }]"
@ -519,7 +548,7 @@
<div class="form-item-help">
<small>微信支付的商户号纯数字格式例如1600000109</small>
</div>
</a-form-model-item>
</a-form-model-item> -->
</div>
</div>
<a-form-model-item :wrapperCol="{ offset: labelCol.span }">
@ -580,16 +609,22 @@ const defaultData = {
mchType: 'normal',
normal: {
sysId: '',
productId: '',
rsaMerchPrivateKey: '',
rsaHuifuPublicKey: '',
appkey: '',
mid: '',
tid: '',
msgSrcId: '',
msgSrc: '',
md5Secret: '',
},
provider: {
sysId: '',
productId: '',
rsaMerchPrivateKey: '',
rsaHuifuPublicKey: '',
// spSysId: '',
syAppkey: '',
syMid: '',
syTid: '',
syMsgSrcId: '',
syMsgSrc: '',
syMd5Secret: '',
// spAppid: '',
// spProductId: '',
// spRsaMerchPrivateKey: '',
// spRsaHuifuPublicKey: '',

Loading…
Cancel
Save