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(G,F,a){"use strict";a.r(F),a.d(F,{default:function(){return R}});var H=a(57338),b=a(273),J=a(13062),g=a(71230),N=a(89032),v=a(15746),Q=a(9715),n=a(55843),U=a(47673),i=a(4107),X=a(57663),I=a(71577),k=a(34792),f=a(48086),d=a(39428),m=a(3182),B=a(2824),j=a(67294),P=a(49101),D=a(78009),T=a(16894),x=a(48971);function z(o){return(0,x.WY)("/kitchen/api/paytemplate/getPayTemplatePageList",{method:"post",data:o})}function A(o){return(0,x.WY)("/kitchen/api/paytemplate/add",{method:"post",data:o})}function w(o){return(0,x.WY)("/kitchen/api/paytemplate/delete",{method:"post",data:o})}function S(o){return(0,x.WY)("/kitchen/api/paytemplate/update",{method:"post",data:o})}var e=a(85893),L=function(){var Z=(0,j.useRef)(),W=(0,j.useState)({}),C=(0,B.Z)(W,2),Y=C[0],K=C[1],$=(0,j.useState)(!1),E=(0,B.Z)($,2),O=E[0],y=E[1],M=function(){var c=(0,m.Z)((0,d.Z)().mark(function p(l){var t,s;return(0,d.Z)().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)}}(),V=[{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)((0,d.Z)().mark(function t(){var s;return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,M(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)((0,d.Z)().mark(function t(){var s;return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:s=[l.id],w(s).then(function(u){u.data?(f.default.success("\u5220\u9664\u6210\u529F"),Z.current.reload()):f.default.error("\u5220\u9664\u5931\u8D25")});case 2:case"end":return r.stop()}},t)})),children:"\u5220\u9664"},l.id)]}}],q=(0,x.YB)();return(0,e.jsxs)(D.ZP,{children:[(0,e.jsx)(T.ZP,{toolBarRender:function(){return(0,e.jsxs)(I.Z,{type:"primary",onClick:function(){K({}),y(!0)},children:[(0,e.jsx)(P.Z,{})," \u65B0\u5EFA"]},"primary1")},headerTitle:"\u652F\u4ED8\u914D\u7F6E",actionRef:Z,rowKey:"id",search:{labelWidth:120},request:function(){var c=(0,m.Z)((0,d.Z)().mark(function p(l){var t,s;return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return t=[],s=0,r.next=4,z(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:V,pagination:{defaultPageSize:10}}),(0,e.jsx)(b.Z,{title:"\u652F\u4ED8\u914D\u7F6E",placement:"right",size:"large",width:"900",onClose:function(){y(!1)},visible:O,destroyOnClose:!0,children:(0,e.jsxs)(n.Z,{preserve:!1,layout:"horizontal",initialValues:Y,labelCol:{span:4},onFinish:function(){var c=(0,m.Z)((0,d.Z)().mark(function p(l){return(0,d.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:l.id?S(l).then(function(h){h.data?(f.default.success("\u4FEE\u6539\u6210\u529F"),y(!1),Z.current.reload()):f.default.error("\u4FEE\u6539\u5931\u8D25")}):A(l).then(function(h){h.data?(f.default.success("\u6DFB\u52A0\u6210\u529F"),y(!1),Z.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)(g.Z,{children:[(0,e.jsxs)(v.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)(v.Z,{span:2}),(0,e.jsxs)(v.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")]})},R=L}}]);