"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4417],{40860:function(w,c,_){_.r(c);var b=_(90228),v=_.n(b),j=_(87999),M=_.n(j),O=_(26068),u=_.n(O),A=_(67825),R=_.n(A),I=_(48305),m=_.n(I),i=_(50959),x=_(98984),y=_(16030),C=_(35384),o=_(11527),S=["type","defaultRender","formItemProps","fieldProps"];c.default=function(){var B={shop_id:"",todate:""},T={username:"",mobile:"",code:""},W=(0,i.useState)(B),h=m()(W,2),H=h[0],J=h[1],K=(0,i.useState)(T),E=m()(K,2),Q=E[0],V=E[1],L=(0,i.useRef)(),U=(0,i.useState)([]),f=m()(U,2),G=f[0],F=f[1],g=(0,i.useState)(null),D=m()(g,2),X=D[0],$=D[1],Z=function(r){shopItems({username:r}).then(function(e){var n,a=e.data,d=[];a==null||(n=a.data)===null||n===void 0||n.map(function(t){t.label="".concat(t.username,"   ").concat(t.mobile),d.push(t)}),F(d)})},z=[{title:"\u6D3B\u52A8\u540D\u79F0",dataIndex:"title",search:!1},{title:"\u6295\u8D44\u4EBA",dataIndex:"shop_id",render:function(r,e){var n,a;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{children:["\u7528\u6237\u540D\uFF1A",e==null||(n=e.shop)===null||n===void 0?void 0:n.username]}),(0,o.jsxs)("div",{children:["\u624B\u673A\u53F7\uFF1A",e==null||(a=e.shop)===null||a===void 0?void 0:a.mobile]})]})},renderFormItem:function(r,e,n){var a=e.type,d=e.defaultRender,t=e.formItemProps,p=e.fieldProps,N=R()(e,S);return(0,o.jsx)(x.Z,u()(u()({},p),{},{allowClear:!0,showSearch:!0,placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",style:{width:"100%"},filterOption:!1,onSearch:function(P){P&&Z(P)},fieldNames:{label:"label",value:"id"},options:G}))}},{title:"\u8BA4\u9886\u65F6\u95F4",dataIndex:"todate",search:!1},{title:"\u5145\u7535\u6869",dataIndex:"device",search:!1,render:function(r,e){var n=e==null?void 0:e.device.map(function(a){return a.id});return n.join(",")}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",search:!1}];return(0,o.jsx)(y._z,{ghost:!0,children:(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(C.Z,{actionRef:L,rowKey:"id",search:{defaultCollapsed:!1},toolBarRender:function(){return[]},request:function(){var l=M()(v()().mark(function r(e,n,a){var d,t,p;return v()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return $(u()({token:""},e)),s.next=3,shopActivityItems813(u()(u()({},e),{},{sorter:n,filter:a}));case 3:return d=s.sent,t=d.data,p=d.success,s.abrupt("return",{data:(t==null?void 0:t.items)||[],total:t==null?void 0:t.total,success:p});case 7:case"end":return s.stop()}},r)}));return function(r,e,n){return l.apply(this,arguments)}}(),columns:z})})})}}}]);
