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

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

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

Loading…
Cancel
Save