"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5927],{85968:function(T,D,t){var M=t(23674),m=t(62086),y=function(c){var o=(0,M.useModel)("@@initialState"),E=o.initialState,j=o.loading,A=o.error,O=o.refresh,P=o.setInitialState,C=E==null?void 0:E.authPermissionAction;if(!C)return(0,m.jsx)("span",{children:c.children});var I=C.indexOf(c.action);return I>=0?(0,m.jsx)("span",{children:c.children}):(0,m.jsx)(m.Fragment,{})};D.Z=y},33597:function(T,D,t){t.r(D);var M=t(25359),m=t.n(M),y=t(49811),R=t.n(y),c=t(57213),o=t.n(c),E=t(12342),j=t.n(E),A=t(54306),O=t.n(A),P=t(93236),C=t(23674),I=t(11776),K=t(14649),S=t(50336),L=t(87708),U=t(5726),F=t.n(U),g=t(89541),Z=t(85968),x=t(90627),n=t(62086),$=["type","defaultRender","formItemProps","fieldProps"],Y=["type","defaultRender","formItemProps","fieldProps"],G=x.Z.ShopWalletController.shopWalletItems,H=x.Z.ShopController.shopItems;D.default=function(){var N=(0,P.useRef)(),z=(0,P.useState)(),b=O()(z,2),_=b[0],V=b[1],J=(0,P.useState)([]),B=O()(J,2),Q=B[0],X=B[1],w=(0,P.useState)(null),W=O()(w,2),k=W[0],q=W[1],ee=function(a){H({username:a}).then(function(e){var l,d=e.data,u=[];d==null||(l=d.data)===null||l===void 0||l.map(function(i){i.label="".concat(i.username,"   ").concat(i.mobile),u.push(i)}),X(u)})},te=[{title:"\u8BA2\u5355\u53F7",dataIndex:"order_no",search:!1},{title:"\u6295\u8D44\u4EBA",dataIndex:"shop_id",render:function(a,e){var l,d;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{children:["\u7528\u6237\u540D\uFF1A",e==null||(l=e.shop)===null||l===void 0?void 0:l.username]}),(0,n.jsxs)("div",{children:["\u624B\u673A\u53F7\uFF1A",e==null||(d=e.shop)===null||d===void 0?void 0:d.mobile]}),(0,n.jsxs)("div",{children:["\u7B49\u7EA7\uFF1A",e==null?void 0:e.vip]})]})},renderFormItem:function(a,e,l){var d=e.type,u=e.defaultRender,i=e.formItemProps,v=e.fieldProps,r=j()(e,$);return(0,n.jsx)(I.Z,o()(o()({},v),{},{allowClear:!0,showSearch:!0,placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",style:{width:"100%"},filterOption:!1,onSearch:function(h){h&&ee(h)},fieldNames:{label:"label",value:"id"},options:Q}))}},{title:"\u7C7B\u578B",dataIndex:"type",search:!1,render:function(a,e){return _==null?void 0:_.type[e.type]}},{title:"\u6536\u76CA\u65F6\u95F4",dataIndex:"todate",search:!1},{title:"\u91D1\u989D",dataIndex:"money",search:!1},{title:"\u5F53\u524D\u91D1\u989D",dataIndex:"cur_money",search:!1},{title:"\u652F\u4ED8\u65B9\u5F0F",dataIndex:"pay_type",search:!1,render:function(a,e){return _==null?void 0:_.pay_type[e==null?void 0:e.pay_type]}},{title:"\u72B6\u6001",dataIndex:"status",search:!0,renderFormItem:function(a,e,l){var d=e.type,u=e.defaultRender,i=e.formItemProps,v=e.fieldProps,r=j()(e,Y),p=[];for(var h in _==null?void 0:_.status)_!=null&&_.status.hasOwnProperty(h)&&p.push({label:_==null?void 0:_.status[h],key:h});return(0,n.jsx)(I.Z,o()(o()({},v),{},{allowClear:!0,defaultValue:"2",style:{width:"100%"},filterOption:!1,fieldNames:{label:"label",value:"key"},options:p}))},render:function(a,e){return(0,n.jsx)(n.Fragment,{children:_==null?void 0:_.status[e==null?void 0:e.status]})}},{title:"\u5907\u6CE8",dataIndex:"note",search:!1},{title:"\u540E\u53F0\u5907\u6CE8",dataIndex:"admin_note",search:!1},{title:"\u4ED8\u6B3E\u65F6\u95F4",dataIndex:"pay_time",valueType:"dateRange",search:{transform:function(a){return{start_date:a[0],end_date:a[1]}}},render:function(a,e){return e!=null&&e.pay_time?F()((e==null?void 0:e.pay_time)*1e3).format("YYYY-MM-DD HH:mm:ss"):""}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",search:!1}];return(0,n.jsx)(S._z,{ghost:!0,children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(L.Z,{actionRef:N,rowKey:"id",search:{defaultCollapsed:!1},toolBarRender:function(){return[(0,n.jsx)(Z.Z,{action:"admin/shop_wallet/export1",children:(0,n.jsx)(K.ZP,{type:"primary",onClick:function(){window.location.href=(0,g.ix)(k,"/admin/shop_wallet/export1")},children:"\u5BFC\u51FA\u8868\u683C"})},"admin/shop_wallet/export1")]},request:function(){var s=R()(m()().mark(function a(e,l,d){var u,i,v,r,p;return m()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return e!=null&&e.status||(e.status=2),q(o()({token:""},e)),f.next=4,G(o()(o()({},e),{},{sorter:l,filter:d}));case 4:return v=f.sent,r=v.data,p=v.success,V(r==null?void 0:r.config),f.abrupt("return",{data:(r==null||(u=r.items)===null||u===void 0?void 0:u.data)||[],total:r==null||(i=r.items)===null||i===void 0?void 0:i.total,success:p});case 9:case"end":return f.stop()}},a)}));return function(a,e,l){return s.apply(this,arguments)}}(),columns:te})})})}}}]);
