You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
6.2 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9912,1322],{60188:function(H,F,a){"use strict";a.r(F),a.d(F,{default:function(){return W}});var J=a(57338),g=a(25084),N=a(13062),b=a(71230),Q=a(89032),Z=a(15746),U=a(9715),n=a(86835),X=a(47673),i=a(4107),k=a(57663),I=a(71577),q=a(34792),f=a(48086),m=a(3182),B=a(2824),P=a(94043),d=a.n(P),j=a(67294),D=a(49101),T=a(78009),z=a(16894),x=a(48971);function A(o){return(0,x.WY)("/kitchen/api/paytemplate/getPayTemplatePageList",{method:"post",data:o})}function w(o){return(0,x.WY)("/kitchen/api/paytemplate/add",{method:"post",data:o})}function S(o){return(0,x.WY)("/kitchen/api/paytemplate/delete",{method:"post",data:o})}function L(o){return(0,x.WY)("/kitchen/api/paytemplate/update",{method:"post",data:o})}var e=a(85893),R=function(){var v=(0,j.useRef)(),Y=(0,j.useState)({}),C=(0,B.Z)(Y,2),$=C[0],K=C[1],O=(0,j.useState)(!1),E=(0,B.Z)(O,2),M=E[0],y=E[1],V=function(){var c=(0,m.Z)(d().mark(function p(l){var t,s;return d().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return t={name:l.name,id:l.id},s=[],l.payTemplateOutDtoInfo.forEach(function(u){u.payType==1?(t.wxappId=u.appId,t.wxid=u.id,t.wxKey=u.key,t.wxpId=u.pId,t.wxpayType=1,t.wxprivateKey=u.privateKey,t.wxpubLicKey=u.pubLicKey):(t.zfbappId=u.appId,t.zfbid=u.id,t.zfbKey=u.key,t.zfbpId=u.pId,t.zfbpayType=2,t.zfbprivateKey=u.privateKey,t.zfbpubLicKey=u.pubLicKey)}),r.abrupt("return",t);case 4:case"end":return r.stop()}},p)}));return function(l){return c.apply(this,arguments)}}(),G=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684key",hideInSearch:!0,hideInTable:!0},{title:"\u540D\u79F0",dataIndex:"name",valueType:"textarea"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(p,l){return[(0,e.jsx)("a",{onClick:(0,m.Z)(d().mark(function t(){var s;return d().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,V(l);case 2:s=r.sent,K(s),y(!0);case 5:case"end":return r.stop()}},t)})),children:"\u4FEE\u6539"},l.id),(0,e.jsx)("a",{onClick:(0,m.Z)(d().mark(function t(){var s;return d().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:s=[l.id],S(s).then(function(u){u.data?(f.default.success("\u5220\u9664\u6210\u529F"),v.current.reload()):f.default.error("\u5220\u9664\u5931\u8D25")});case 2:case"end":return r.stop()}},t)})),children:"\u5220\u9664"},l.id)]}}],_=(0,x.YB)();return(0,e.jsxs)(T.ZP,{children:[(0,e.jsx)(z.ZP,{toolBarRender:function(){return(0,e.jsxs)(I.Z,{type:"primary",onClick:function(){K({}),y(!0)},children:[(0,e.jsx)(D.Z,{})," \u65B0\u5EFA"]},"primary1")},headerTitle:"\u652F\u4ED8\u914D\u7F6E",actionRef:v,rowKey:"id",search:{labelWidth:120},request:function(){var c=(0,m.Z)(d().mark(function p(l){var t,s;return d().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return t=[],s=0,r.next=4,A(JSON.stringify(l)).then(function(u){t=u.data.data,s=u.data.total});case 4:return r.abrupt("return",{data:t,success:!0,total:s});case 5:case"end":return r.stop()}},p)}));return function(p){return c.apply(this,arguments)}}(),columns:G,pagination:{defaultPageSize:10}}),(0,e.jsx)(g.Z,{title:"\u652F\u4ED8\u914D\u7F6E",placement:"right",size:"large",width:"900",onClose:function(){y(!1)},visible:M,destroyOnClose:!0,children:(0,e.jsxs)(n.Z,{preserve:!1,layout:"horizontal",initialValues:$,labelCol:{span:4},onFinish:function(){var c=(0,m.Z)(d().mark(function p(l){return d().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:l.id?L(l).then(function(h){h.data?(f.default.success("\u4FEE\u6539\u6210\u529F"),y(!1),v.current.reload()):f.default.error("\u4FEE\u6539\u5931\u8D25")}):w(l).then(function(h){h.data?(f.default.success("\u6DFB\u52A0\u6210\u529F"),y(!1),v.current.reload()):f.default.error("\u6DFB\u52A0\u5931\u8D25")});case 1:case"end":return s.stop()}},p)}));return function(p){return c.apply(this,arguments)}}(),children:[(0,e.jsx)(n.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(i.Z,{})}),(0,e.jsx)(n.Z.Item,{name:"name",label:"\u540D\u79F0",rules:[{required:!0,max:20}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"})}),(0,e.jsxs)(b.Z,{children:[(0,e.jsxs)(Z.Z,{span:11,children:[(0,e.jsx)("h3",{children:"\u5FAE\u4FE1"}),(0,e.jsx)(n.Z.Item,{name:"wxid",hidden:!0,children:(0,e.jsx)(i.Z,{})}),(0,e.jsx)(n.Z.Item,{name:"wxappId",label:"AppId",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165appId"})}),(0,e.jsx)(n.Z.Item,{name:"wxpId",tooltip:"\u5FAE\u4FE1\u7684MCHid",label:"MchId",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165MchId"})}),(0,e.jsx)(n.Z.Item,{name:"wxKey",tooltip:"\u5FAE\u4FE1\u7684aAppKey",label:"AppKey",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165AppKey"})}),(0,e.jsx)(n.Z.Item,{name:"wxpubLicKey",tooltip:"\u8BC1\u4E66 ",label:"\u8BC1\u4E66",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4E66"})}),(0,e.jsx)(n.Z.Item,{name:"wxprivateKey",tooltip:"\u5BC6\u7801",label:"\u5BC6\u7801",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801"})})]}),(0,e.jsx)(Z.Z,{span:2}),(0,e.jsxs)(Z.Z,{span:11,children:[(0,e.jsx)("h3",{children:"\u652F\u4ED8\u5B9D"}),(0,e.jsx)(n.Z.Item,{name:"zfbid",hidden:!0,children:(0,e.jsx)(i.Z,{})}),(0,e.jsx)(n.Z.Item,{name:"zfbappId",label:"AppId",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165appId"})}),(0,e.jsx)(n.Z.Item,{name:"zfbpId",tooltip:"\u652F\u4ED8\u5B9D\u7684Pid",label:"PId",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165PId"})}),(0,e.jsx)(n.Z.Item,{name:"zfbKey",tooltip:"\u652F\u4ED8\u5B9D\u7684pk",label:"PK",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165PK"})}),(0,e.jsx)(n.Z.Item,{name:"zfbpubLicKey",tooltip:"\u516C\u94A5 ",label:"\u516C\u94A5",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165\u516C\u94A5"})}),(0,e.jsx)(n.Z.Item,{name:"zfbprivateKey",tooltip:"\u79C1\u94A5",label:"\u79C1\u94A5",rules:[{required:!0,max:3e3}],children:(0,e.jsx)(i.Z,{placeholder:"\u8BF7\u8F93\u5165\u79C1\u94A5"})})]})]}),(0,e.jsx)(n.Z.Item,{children:(0,e.jsx)(I.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})},"1")]})},W=R}}]);