master
fanfan 4 months ago
parent c3912280d9
commit 8eff76cd2a
  1. 188
      src/views/setting/payment/template/Create.vue
  2. 24
      src/views/setting/payment/template/Update.vue

@ -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: '',

@ -371,11 +371,11 @@
:rules="[{ required: true, message: '请填写APPID' }]"
>
<a-input v-model="record.config.huifu.normal.appid" autocomplete="off" />
<div class="form-item-help">
<!-- <div class="form-item-help">
<small
>微信小程序或者微信公众号的APPID需要在哪个客户端支付就填写哪个APP支付需要填写开放平台的应用APPID</small
>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
label="APPKEY"
@ -383,11 +383,11 @@
:rules="[{ required: true, message: '请填写APPKEY' }]"
>
<a-input v-model="record.config.huifu.normal.appkey" autocomplete="off" />
<div class="form-item-help">
<!-- <div class="form-item-help">
<small
>微信小程序或者微信公众号的APPID需要在哪个客户端支付就填写哪个APP支付需要填写开放平台的应用APPID</small
>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
@ -424,9 +424,9 @@
:rules="[{ required: true, message: '请填写支付密钥(网付)' }]"
>
<a-input type="password" v-model="record.config.huifu.normal.md5Secret" autocomplete="off" />
<div class="form-item-help">
<!-- <div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
</div> -->
</a-form-model-item>
</div>
@ -437,9 +437,9 @@
:rules="[{ required: true, message: '请填写APPID' }]"
>
<a-input v-model="record.config.huifu.provider.spAppid" autocomplete="off" />
<div class="form-item-help">
<!-- <div class="form-item-help">
<small>请填写微信支付服务商的AppID</small>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
label="APPKEY"
@ -447,9 +447,9 @@
:rules="[{ required: true, message: '请填写APPKEY' }]"
>
<a-input v-model="record.config.huifu.provider.syAppkey" autocomplete="off" />
<div class="form-item-help">
<!-- <div class="form-item-help">
<small>请填写微信支付服务商的AppID</small>
</div>
</div> -->
</a-form-model-item>
<a-form-model-item
label="商户编号"
@ -491,9 +491,9 @@
:rules="[{ required: true, message: '请填写支付密钥(网付)' }]"
>
<a-input type="password" v-model="record.config.huifu.normal.syMd5Secret" autocomplete="off" />
<div class="form-item-help">
<!-- <div class="form-item-help">
<small>"微信支付商户平台"" - "账户中心" - "API安全" - "设置API密钥"</small>
</div>
</div> -->
</a-form-model-item>
<!-- <a-form-model-item

Loading…
Cancel
Save