"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5589],{85968:function(R,f,_){var D=_(23674),v=_(62086),P=function(m){var a=(0,D.useModel)("@@initialState"),h=a.initialState,A=a.loading,F=a.error,c=a.refresh,p=a.setInitialState,M=h==null?void 0:h.authPermissionAction;if(!M)return(0,v.jsx)("span",{children:m.children});var O=M.indexOf(m.action);return O>=0?(0,v.jsx)("span",{children:m.children}):(0,v.jsx)(v.Fragment,{})};f.Z=P},23898:function(R,f,_){_.r(f);var D=_(25359),v=_.n(D),P=_(49811),j=_.n(P),m=_(57213),a=_.n(m),h=_(12342),A=_.n(h),F=_(54306),c=_.n(F),p=_(93236),M=_(23674),O=_(11776),b=_(14649),T=_(50336),W=_(87708),K=_(5726),S=_.n(K),L=_(89541),U=_(85968),I=_(90627),n=_(62086),g=["type","defaultRender","formItemProps","fieldProps"],$=I.Z.ShopActivityController.shopActivityItems,Z=I.Z.ShopController.shopItems;f.default=function(){var Y=(0,p.useRef)(),G=(0,p.useState)(),C=c()(G,2),k=C[0],q=C[1],z=(0,p.useState)([]),x=c()(z,2),N=x[0],H=x[1],J=(0,p.useState)(null),y=c()(J,2),Q=y[0],V=y[1],X=function(d){Z({username:d}).then(function(e){var i,o=e.data,l=[];o==null||(i=o.data)===null||i===void 0||i.map(function(t){t.label="".concat(t.username,"   ").concat(t.mobile),l.push(t)}),H(l)})},w=[{title:"\u6D3B\u52A8\u540D\u79F0",dataIndex:"title",search:!1},{title:"\u6295\u8D44\u4EBA",dataIndex:"shop_id",render:function(d,e){var i,o;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{children:["\u7528\u6237\u540D\uFF1A",e==null||(i=e.shop)===null||i===void 0?void 0:i.username]}),(0,n.jsxs)("div",{children:["\u624B\u673A\u53F7\uFF1A",e==null||(o=e.shop)===null||o===void 0?void 0:o.mobile]}),(0,n.jsxs)("div",{children:["\u7B49\u7EA7\uFF1A",e==null?void 0:e.vip]})]})},renderFormItem:function(d,e,i){var o=e.type,l=e.defaultRender,t=e.formItemProps,r=e.fieldProps,E=A()(e,g);return(0,n.jsx)(O.Z,a()(a()({},r),{},{allowClear:!0,showSearch:!0,placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",style:{width:"100%"},filterOption:!1,onSearch:function(B){B&&X(B)},fieldNames:{label:"label",value:"id"},options:N}))}},{title:"\u65F6\u95F4",dataIndex:"m",search:!1,render:function(d,e){return(e==null?void 0:e.m)+"\u4E2A\u6708"}},{title:"\u6709\u6548\u671F",dataIndex:"type",search:!1,render:function(d,e){return e!=null&&e.valid_time?S()((e==null?void 0:e.valid_time)*1e3).format("YYYY-MM-DD"):""}},{title:"\u5BA2\u6237\u8D44\u6599",dataIndex:"type",search:!1,render:function(d,e){var i,o,l,t,r,E,u;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{children:["\u8F66\u8F86\u578B\u53F7\uFF1A",e==null||(i=e.info)===null||i===void 0?void 0:i.car_name]}),(0,n.jsxs)("div",{children:["\u8F66\u4E3B\u59D3\u540D\uFF1A",e==null||(o=e.info)===null||o===void 0?void 0:o.realname]}),(0,n.jsxs)("div",{children:["\u8F66\u724C\u53F7\u7801\uFF1A",e==null||(l=e.info)===null||l===void 0?void 0:l.plate_code]}),(0,n.jsxs)("div",{children:["\u8F66\u67B6\u53F7\u7801\uFF1A",e==null||(t=e.info)===null||t===void 0?void 0:t.car_code]}),(0,n.jsxs)("div",{children:["\u8FD8\u6B3E\u5361\u53F7\uFF1A",e==null||(r=e.info)===null||r===void 0?void 0:r.bank_num]}),(0,n.jsxs)("div",{children:["\u94F6\u884C\u540D\u79F0\uFF1A",e==null||(E=e.info)===null||E===void 0?void 0:E.bank_name]}),(0,n.jsxs)("div",{children:["\u8FD8\u6B3E\u65E5\u671F\uFF1A",e==null||(u=e.info)===null||u===void 0?void 0:u.todate]})]})}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",search:!1}];return(0,n.jsx)(T._z,{ghost:!0,children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(W.Z,{actionRef:Y,rowKey:"id",search:{defaultCollapsed:!1},toolBarRender:function(){return[(0,n.jsx)(U.Z,{action:"admin/shop_activity/export",children:(0,n.jsx)(b.ZP,{type:"primary",onClick:function(){window.location.href=(0,L.ix)(Q,"/admin/shop_activity/export")},children:"\u5BFC\u51FA\u8868\u683C"})},"admin/shop_activity/export")]},request:function(){var s=j()(v()().mark(function d(e,i,o){var l,t,r;return v()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return V(a()({token:""},e)),u.next=3,$(a()(a()({},e),{},{sorter:i,filter:o}));case 3:return l=u.sent,t=l.data,r=l.success,u.abrupt("return",{data:(t==null?void 0:t.items)||[],total:t==null?void 0:t.total,success:r});case 7:case"end":return u.stop()}},d)}));return function(d,e,i){return s.apply(this,arguments)}}(),columns:w})})})}}}]);
