"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[406],{17675:function(I,v,e){e.d(v,{Z:function(){return h}});var f=e(52319),o=e(93236),D={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},c=D,m=e(85651),l=function(E,R){return o.createElement(m.Z,(0,f.Z)({},E,{ref:R,icon:c}))},h=o.forwardRef(l)},85968:function(I,v,e){var f=e(23674),o=e(62086),D=function(m){var l=(0,f.useModel)("@@initialState"),h=l.initialState,O=l.loading,E=l.error,R=l.refresh,j=l.setInitialState,P=h==null?void 0:h.authPermissionAction;if(!P)return(0,o.jsx)("span",{children:m.children});var M=P.indexOf(m.action);return M>=0?(0,o.jsx)("span",{children:m.children}):(0,o.jsx)(o.Fragment,{})};v.Z=D},71600:function(I,v,e){e.r(v);var f=e(57213),o=e.n(f),D=e(25359),c=e.n(D),m=e(49811),l=e.n(m),h=e(54306),O=e.n(h),E=e(93236),R=e(23674),j=e(17675),P=e(89971),M=e(85594),K=e(23041),L=e(14649),U=e(61385),y=e(50336),W=e(87708),g=e(85968),B=e(90627),x=e(5726),H=e.n(x),a=e(62086),C=B.Z.DeviceController,b=C.device_profit,Z=C.deviceSetinfo,J=C.deviceCreate,F=B.Z.ShopController.shopItems;v.default=function(){var A=(0,E.useRef)(),z={id:"",shop_id:"",store_id:"",num:1},V=(0,E.useState)(z),S=O()(V,2),N=S[0],Q=S[1],$=(0,E.useState)([]),T=O()($,2),X=T[0],Y=T[1],k=function(){var i=l()(c()().mark(function n(t){var s,r,d;return c()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,Z(t);case 2:s=u.sent,r=s.success,r&&(setSetinfoFormModal(!1),(d=A.current)===null||d===void 0||d.reload());case 5:case"end":return u.stop()}},n)}));return function(t){return i.apply(this,arguments)}}(),q=function(n){F({username:n}).then(function(t){var s,r=t.data,d=[];r==null||(s=r.data)===null||s===void 0||s.map(function(_){_.label="".concat(_.username,"   ").concat(_.mobile),d.push(_)}),Y(d)})},w={name:"file",action:"https://shopapi.houyi2023.cn/admin/device_profit/import1",headers:{Authorization:"Bearer "+(0,P.LP)()},onChange:function(n){if(n.file.status!=="uploading"&&console.log(n.file,n.fileList),n.file.status==="done"){var t;M.ZP.success("".concat(n.file.name," \u5BFC\u5165\u6210\u529F")),(t=A.current)===null||t===void 0||t.reload()}else n.file.status==="error"&&M.ZP.error("".concat(n.file.name," \u4E0A\u4F20\u5931\u8D25"))}},G=[{title:"\u8BBE\u5907ID",dataIndex:"device_id",search:!1},{title:"\u8BBE\u5907\u53F7",dataIndex:"device_no",search:!1},{title:"\u6536\u76CA",dataIndex:"money",search:!1},{title:"\u6536\u76CA\u65F6\u95F4",dataIndex:"todate",search:!1},{title:"\u72B6\u6001",dataIndex:"status",search:!1},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",search:!1}];return(0,a.jsx)(y._z,{ghost:!0,children:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(W.Z,{actionRef:A,rowKey:"id",search:{defaultCollapsed:!1},toolBarRender:function(){return[(0,a.jsx)(g.Z,{action:"admin/device_profit/import1",children:(0,a.jsx)(K.Z,o()(o()({},w),{},{children:(0,a.jsx)(L.ZP,{icon:(0,a.jsx)(j.Z,{}),children:"\u5BFC\u5165\u6570\u636E"})}))},"admin/device_profit/import1")]},request:function(){var i=l()(c()().mark(function n(t,s,r){var d,_,u;return c()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,b(o()(o()({},t),{},{sorter:s,filter:r}));case 2:return d=p.sent,_=d.data,u=d.success,p.abrupt("return",{data:(_==null?void 0:_.data)||[],total:_==null?void 0:_.total,success:u});case 6:case"end":return p.stop()}},n)}));return function(n,t,s){return i.apply(this,arguments)}}(),columns:G,rowSelection:{onChange:function(n,t){setSelectedRows(n)}},tableAlertRender:function(n){var t=n.selectedRowKeys,s=n.selectedRows,r=n.onCleanSelected;return(0,a.jsxs)(U.Z,{size:24,children:[(0,a.jsxs)("span",{children:["\u5DF2\u9009 ",t.length," \u9879"]}),(0,a.jsx)("span",{children:(0,a.jsx)("a",{style:{marginInlineStart:8},onClick:r,children:"\u53D6\u6D88\u9009\u62E9"})})]})},tableAlertOptionRender:function(n){var t=n.selectedRowKeys,s=n.selectedRows,r=n.onCleanSelected;return(0,a.jsx)(U.Z,{size:16})},pagination:{showSizeChanger:!0}})})})}}}]);
