290.3071afa2.async.js 8.8 KB

1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[290],{8154:function(T,v,r){"use strict";r.d(v,{Z:function(){return t}});var p=r(85893);function t(h){var s=h.title,l=h.children;return(0,p.jsxs)("div",{className:"min-h-screen min-w",children:[(0,p.jsx)("div",{className:"w-[100%] h-[80px] bg-[#FAFAFA] text-[18px] flex items-center pl-[24px] font-[400]",children:s}),(0,p.jsx)("div",{className:" min-h-[auto] m-[24px] flex flex-col gap-[24px]",children:l})]})}},83087:function(T,v,r){"use strict";r.d(v,{Z:function(){return E}});var p=r(97857),t=r.n(p),h=r(5574),s=r.n(h),l=r(56717),i=r(37476),f=r(83622),c=r(67294),o=r(85893);function E(d){var m=d.children,y=d.modalFormProps,M=d.title,D=d.initData,g=d.readOnly,O=d.modalProps,_=d.loading,a=_===void 0?!1:_,n=d.allowUpdate,u=n===void 0?!0:n,e=d.submit,P=(0,c.useState)(!0),b=s()(P,2),C=b[0],x=b[1],L=(0,c.useRef)();return(0,o.jsx)(i.Y,t()(t()({autoComplete:"nope",trigger:(0,o.jsx)(f.ZP,{type:"text",icon:(0,o.jsx)(l.Z,{})}),title:(0,o.jsxs)("div",{className:"w-[auto] pl-[0px] pr-[68px] pb-4 flex justify-between",children:[(0,o.jsx)("div",{className:"py-[4px]",children:M}),u&&(0,o.jsxs)("div",{className:"flex gap-[8px]",children:[C?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(f.ZP,{type:"primary",onClick:function(){e&&e(),x(!0)},children:"\u63D0\u4EA4"}),(0,o.jsx)(f.ZP,{type:"text",style:{display:"flex",color:C?"#1890FF":"black",backgroundColor:C?"":"#CCCCCC",alignItems:"start"},onClick:function(){x(function(R){return!R})},children:C?"\u4FEE\u6539":"\u53D6\u6D88"})]})]}),modalProps:t()({destroyOnClose:!0,centered:!0,bodyStyle:{maxHeight:"55vh",overflow:"scroll",overflowX:"hidden"},onCancel:function(){x(!0)}},O),grid:!0,readonly:g!=null?g:C,submitter:!1},y),{},{children:m}))}},78843:function(T,v,r){"use strict";r.d(v,{Z:function(){return f}});var p=r(97857),t=r.n(p),h=r(40110),s=r(55102),l=r(83622),i=r(85893);function f(c){var o=c.title,E=c.inputProps,d=c.submitFun;return(0,i.jsxs)("div",{className:"w-auto h-[130px] bg-white p-[24px] rounded-[4px] flex gap-[24px] flex-col",children:[(0,i.jsx)("div",{children:o}),(0,i.jsxs)("div",{className:"flex gap-[16px]",children:[(0,i.jsx)(s.Z,t()({prefix:(0,i.jsx)(h.Z,{className:"mr-[24px]"}),placeholder:"search...",onPressEnter:function(){d&&d()}},E)),(0,i.jsx)(l.ZP,{type:"primary",onClick:function(){d&&d()},style:{width:"48px",height:"48px",borderRadius:6,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"14px",fontWeight:400,padding:16},children:"start"})]})]})}},4710:function(T,v,r){"use strict";r.d(v,{Z:function(){return d}});var p=r(97857),t=r.n(p),h=r(15009),s=r.n(h),l=r(99289),i=r.n(l),f=r(83447),c=r(61362),o=r(27950),E=r(85893);function d(m){var y=m.props,M=m.requestFun,D=m.searchKey,g=(0,o.F)();return(0,E.jsx)("div",{className:"rounded-[4px] bg-white",children:(0,E.jsx)(c.Z,t()({search:!1,pagination:{pageSize:g.md?10:5,showSizeChanger:g.md},scroll:{x:"max-content",y:g.md?600:400},cardProps:{bodyStyle:{padding:g.md?24:12}},request:i()(s()().mark(function O(){var _;return s()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,M().then(function(u){var e=u.detail;return console.log("detail",e),{success:!0,data:e}});case 2:if(_=n.sent,!D){n.next=9;break}return console.log("searchKey",D),_.data=(0,f.Z)({dataSource:_.data,keyWord:D}),n.abrupt("return",_);case 9:return n.abrupt("return",_);case 10:case"end":return n.stop()}},O)}))},y))})}},70972:function(T,v,r){"use strict";r.d(v,{$P:function(){return D},Ay:function(){return f},Qd:function(){return M},V4:function(){return E},_j:function(){return O},fF:function(){return d},ff:function(){return m},gW:function(){return o},mV:function(){return y},pw:function(){return i},zf:function(){return c}});var p=r(15009),t=r.n(p),h=r(99289),s=r.n(h),l=r(76772),i=function(){var _=s()(t()().mark(function a(n,u){return t()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.abrupt("return",(0,l.request)("/api/v1/admin/customer/all",{method:"get",params:{pageSize:n.pageSize,current:n.current,searchKey:u}}));case 1:case"end":return P.stop()}},a)}));return function(n,u){return _.apply(this,arguments)}}(),f=function(){var _=s()(t()().mark(function a(n){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/admin/customer/refund",{method:"put",data:n}));case 1:case"end":return e.stop()}},a)}));return function(n){return _.apply(this,arguments)}}(),c=function(){var _=s()(t()().mark(function a(n){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/admin/customer/deduction",{method:"put",data:n}));case 1:case"end":return e.stop()}},a)}));return function(n){return _.apply(this,arguments)}}(),o=function(){var _=s()(t()().mark(function a(n){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/admin/customer/bind-ic-card",{method:"put",data:n}));case 1:case"end":return e.stop()}},a)}));return function(n){return _.apply(this,arguments)}}(),E=function(){var _=s()(t()().mark(function a(n){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/admin/customer/top-up",{method:"get",params:{id:n}}));case 1:case"end":return e.stop()}},a)}));return function(n){return _.apply(this,arguments)}}(),d=function(){var _=s()(t()().mark(function a(n){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(n),e.abrupt("return",(0,l.request)("/api/v1/admin/customer/transaction",{method:"get",params:{id:n}}));case 2:case"end":return e.stop()}},a)}));return function(n){return _.apply(this,arguments)}}(),m=function(){var _=s()(t()().mark(function a(n){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n.distributor_type="customer",e.abrupt("return",(0,l.request)("/api/v1/admin/coupon/record",{method:"post",data:n}));case 2:case"end":return e.stop()}},a)}));return function(n){return _.apply(this,arguments)}}(),y=function(){var _=s()(t()().mark(function a(){return t()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,l.request)("/api/v1/admin/coupon/all",{method:"get"}));case 1:case"end":return u.stop()}},a)}));return function(){return _.apply(this,arguments)}}(),M=function(){var _=s()(t()().mark(function a(n){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/admin/customer/coupon/all",{method:"get",params:{id:n}}));case 1:case"end":return e.stop()}},a)}));return function(n){return _.apply(this,arguments)}}(),D=function(){var _=s()(t()().mark(function a(n){return t()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/admin/customer/coupon/permission",{method:"put",data:n}));case 1:case"end":return e.stop()}},a)}));return function(n){return _.apply(this,arguments)}}(),g=null,O=function(){var _=s()(t()().mark(function a(n,u,e){return t()().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.abrupt("return",(0,l.request)("/api/v1/admin/customer/session",{method:"post",data:{customerId:n,title:u,body:e}}));case 1:case"end":return b.stop()}},a)}));return function(n,u,e){return _.apply(this,arguments)}}()},8215:function(T,v,r){"use strict";r.d(v,{p:function(){return o}});var p=r(15009),t=r.n(p),h=r(99289),s=r.n(h),l=r(2453),i=r(27484),f=r.n(i),c=r(84105),o=function(){var E=s()(t()().mark(function d(m){var y,M,D,g,O,_,a;return t()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return y=m.filename,M=m.data,D=m.columns,u.prev=1,g=M.map(function(e){var P={};return D.forEach(function(b){var C=b.title,x=b.dataIndex,L=b.render,j;Array.isArray(x)?j=x.reduce(function(R,I){return R==null?void 0:R[I]},e):j=e[x],L&&(j=L(j,e)),P[C]=j}),P}),O=c.P6.book_new(),_=c.P6.json_to_sheet(g),_["!cols"]=D.map(function(e){var P=e.width;return{wch:P||5}}),c.P6.book_append_sheet(O,_,"Sheet1"),a="".concat(y,"_").concat(f()().format("YYYY-MM-DD_HH-mm-ss"),".xlsx"),c.NC(O,a),l.ZP.success("\u5C0E\u51FA\u6210\u529F"),u.abrupt("return",!0);case 13:return u.prev=13,u.t0=u.catch(1),console.error("Export error:",u.t0),l.ZP.error("\u5C0E\u51FA\u5931\u6557"),u.abrupt("return",!1);case 18:case"end":return u.stop()}},d,null,[[1,13]])}));return function(m){return E.apply(this,arguments)}}()},83447:function(T,v,r){"use strict";r.d(v,{Z:function(){return p}});function p(t){var h=t.dataSource,s=t.keyWord,l=function(f,c){return f.toLowerCase().includes(c.toLowerCase())};return h.filter(function(i){var f=Object.keys(i),c=f.map(function(o){if(i[o]&&typeof i[o]=="string"&&typeof s=="string")return l(i[o],s);if(i[o]&&typeof i[o]=="number"&&typeof s=="number"){var E=i[o].toString(),d=s.toString();return l(E,d)}else if(i[o]&&typeof i[o]=="string"&&typeof s=="number"){var m=s.toString();return l(i[o],m)}else if(i[o]&&typeof i[o]=="number"&&typeof s=="string"){var y=i[o].toString();return l(y,s)}});return c.includes(!0)})}},20067:function(){}}]);