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