(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4741],{59668:function(nt,V,r){"use strict";r.r(V),r.d(V,{default:function(){return yt}});var S=r(71194),L=r(50146),O=r(14965),v=r(91774),j=r(88983),C=r(47933),X=r(43358),a=r(34041),f=r(47673),A=r(4107),H=r(57663),J=r(71577),K=r(62350),rt=r(24565),$=r(39428),Q=r(34792),W=r(48086),Z=r(3182),U=r(9715),P=r(55843),N=r(2824),D=r(402),c=r(56256),B=r(67294),ut=r(28790),i=r(16894),n=r(27484),t=r.n(n),u=r(72540),e=r.n(u),o=r(96036),s=r.n(o),l=r(48971),m=r(96690);function p(F){return g.apply(this,arguments)}function g(){return g=(0,Z.Z)((0,$.Z)().mark(function F(M){return(0,$.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,l.WY)((0,m.Wz)()+"/api/authorization/pagestoreauthorization",{method:"POST",data:M}));case 1:case"end":return d.stop()}},F)})),g.apply(this,arguments)}function R(F){return z.apply(this,arguments)}function z(){return z=(0,Z.Z)((0,$.Z)().mark(function F(M){return(0,$.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,l.WY)((0,m.Wz)()+"/api/authorization/addstoreauthorization?storeId="+M,{method:"POST",data:M}));case 1:case"end":return d.stop()}},F)})),z.apply(this,arguments)}function q(F){return G.apply(this,arguments)}function G(){return G=(0,Z.Z)((0,$.Z)().mark(function F(M){return(0,$.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,l.WY)((0,m.Wz)()+"/api/authorization/updatestoreauthorization?id="+M,{method:"POST",data:M}));case 1:case"end":return d.stop()}},F)})),G.apply(this,arguments)}function b(F){return x.apply(this,arguments)}function x(){return x=(0,Z.Z)((0,$.Z)().mark(function F(M){return(0,$.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,l.WY)((0,m.Wz)()+"/api/authorization/updatestoreauthtime",{method:"POST",data:M}));case 1:case"end":return d.stop()}},F)})),x.apply(this,arguments)}function E(F){return _.apply(this,arguments)}function _(){return _=(0,Z.Z)((0,$.Z)().mark(function F(M){return(0,$.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,l.WY)((0,m.Wz)()+"/api/authorization/delstoreauthorization?id="+M,{method:"POST",data:M}));case 1:case"end":return d.stop()}},F)})),_.apply(this,arguments)}function at(F){return st.apply(this,arguments)}function st(){return st=(0,Z.Z)((0,$.Z)().mark(function F(M){return(0,$.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,l.WY)((0,m.Wz)()+"/api/store/page",{method:"POST",data:M}));case 1:case"end":return d.stop()}},F)})),st.apply(this,arguments)}var y=r(85893);t().extend(e()),t().extend(s());var lt="YYYY/MM/DD",mt=c.Z.Paragraph,xt=c.Z.Text,pt=function(){var M=(0,B.useRef)(),tt=(0,B.useState)(!1),d=(0,N.Z)(tt,2),vt=d[0],it=d[1],$t=(0,B.useState)(),dt=(0,N.Z)($t,2),Ft=dt[0],ct=dt[1],St=(0,B.useState)([]),ht=(0,N.Z)(St,2),gt=ht[0],Mt=ht[1],wt=P.Z.useForm(),Dt=(0,N.Z)(wt,1),ot=Dt[0];(0,B.useEffect)(function(){function Y(){at({current:1,pageSize:9999}).then(function(w){var h=[];w.statusCode==200&&(w.data.data.forEach(function(T){h.push({id:T.id,label:T.name,value:T.id})}),Mt(h))})}Y()},[]);var Zt=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u573A\u666F",dataIndex:"storeName",valueType:"textarea",width:200},{title:"\u6388\u6743\u7801",dataIndex:"key",valueType:"textarea",search:!1,render:function(w){return(0,y.jsx)(mt,{style:{display:"inline"},copyable:!0,children:w})}},{title:"\u6709\u6548\u65E5\u671F",dataIndex:"periodValidity",valueType:"date",width:150,search:!1,render:function(w,h){var T=t()(h.periodValidity,lt).format("YYYY-MM-DD");return(0,y.jsx)("span",{children:h.periodValidity==null?"\u957F\u671F\u6709\u6548":T})}},{title:"\u4FEE\u6539\u65F6\u95F4",dataIndex:"updateAt",valueType:"textarea",width:150,search:!1},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:250,render:function(w,h){return[(0,y.jsx)(rt.Z,{type:"primary",title:"\u786E\u8BA4\u66F4\u65B0\u5417?",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,Z.Z)((0,$.Z)().mark(function T(){return(0,$.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,q(h.id).then(function(k){k.statusCode==200&&k.data?(W.default.success("\u4FEE\u6539\u6210\u529F"),M.current.reload()):W.default.error(k.errors||"\u4FEE\u6539\u5931\u8D25")});case 2:case"end":return I.stop()}},T)})),onCancel:function(){},children:(0,y.jsx)("a",{href:"#",children:"\u66F4\u65B0\u6388\u6743\u7801"})},"primary"),(0,y.jsx)("a",{href:"#",onClick:function(){ct(h);var et=h.periodValidity==null?"cqyx":"gdsj",I=h.periodValidity==null?null:t()(h.periodValidity,lt);ot.setFieldsValue({id:h.id,autho:et,periodValidity:I,storeId:h.storeId}),it(!0)},children:"\u66F4\u65B0\u6388\u6743\u65F6\u95F4"}),(0,y.jsx)(rt.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417?",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,Z.Z)((0,$.Z)().mark(function T(){return(0,$.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,E(h.id).then(function(k){k.statusCode==200&&k.data?(W.default.success("\u5220\u9664\u6210\u529F"),M.current.reload()):W.default.error(k.errors||"\u5220\u9664\u5931\u8D25")});case 2:case"end":return I.stop()}},T)})),onCancel:function(){},children:(0,y.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,y.jsxs)(ut.ZP,{host:!0,header:{title:"",breadcrumb:{}},children:[(0,y.jsx)(i.ZP,{actionRef:M,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,y.jsx)(J.Z,{type:"primary",onClick:function(){it(!0)},children:"\u6DFB\u52A0\u6388\u6743\u7801"},"primary")]},request:function(){var Y=(0,Z.Z)((0,$.Z)().mark(function w(h){var T,et;return(0,$.Z)().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return T=[],et=0,k.next=4,p(h).then(function(ft){et=ft.data.total,T=ft.data.data});case 4:return k.abrupt("return",{data:T,success:!0,total:et});case 5:case"end":return k.stop()}},w)}));return function(w){return Y.apply(this,arguments)}}(),columns:Zt}),(0,y.jsx)(L.Z,{title:"\u6388\u6743\u64CD\u4F5C",open:vt,onOk:function(){ot.submit()},onCancel:function(){it(!1)},children:(0,y.jsxs)(P.Z,{form:ot,onFinish:function(w){w.id?b(w).then(function(h){h.statusCode==200&&h.data?(W.default.success("\u4FEE\u6539\u6210\u529F"),M.current.reload(),it(!1)):W.default.error(h.errors||"\u4FEE\u6539\u5931\u8D25")}):R(w).then(function(h){h.statusCode==200&&h.data?(W.default.success("\u6DFB\u52A0\u6210\u529F"),M.current.reload(),it(!1)):W.default.error(h.errors||"\u6DFB\u52A0\u5931\u8D25")})},style:{maxWidth:600},children:[(0,y.jsx)(P.Z.Item,{name:"id",hidden:!0,children:(0,y.jsx)(A.Z,{})}),(0,y.jsx)(P.Z.Item,{name:"storeId",label:"\u573A\u666F",rules:[{required:!0}],children:(0,y.jsx)(a.Z,{style:{width:330},onChange:function(w){ct(w)},options:gt})}),(0,y.jsx)(P.Z.Item,{name:"autho",label:"\u6388\u6743\u65F6\u95F4",rules:[{required:!0}],children:(0,y.jsxs)(C.ZP.Group,{children:[(0,y.jsx)(C.ZP,{value:"cqyx",children:" \u957F\u671F\u6709\u6548 "}),(0,y.jsx)(C.ZP,{value:"gdsj",children:" \u56FA\u5B9A\u65F6\u95F4 "})]})}),(0,y.jsx)(P.Z.Item,{noStyle:!0,shouldUpdate:function(w,h){return w.autho!==h.autho},children:function(w){var h=w.getFieldValue;return h("autho")=="gdsj"?(0,y.jsx)(P.Z.Item,{name:"periodValidity",label:"\u56FA\u5B9A\u65F6\u95F4",rules:[{required:!0}],children:(0,y.jsx)(v.Z,{style:{width:"300px"}})}):null}})]})})]})},yt=pt},27484:function(nt){(function(V,r){nt.exports=r()})(this,function(){"use strict";var V=1e3,r=6e4,S=36e5,L="millisecond",O="second",v="minute",j="hour",C="day",X="week",a="month",f="quarter",A="year",H="date",J="Invalid Date",K=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,rt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var n=["th","st","nd","rd"],t=i%100;return"["+i+(n[(t-20)%10]||n[t]||n[0])+"]"}},Q=function(i,n,t){var u=String(i);return!u||u.length>=n?i:""+Array(n+1-u.length).join(t)+i},W={s:Q,z:function(i){var n=-i.utcOffset(),t=Math.abs(n),u=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+Q(u,2,"0")+":"+Q(e,2,"0")},m:function i(n,t){if(n.date()1)return i(s[0])}else{var l=n.name;U[l]=n,e=l}return!u&&e&&(Z=e),e||!u&&Z},D=function(i,n){if(P(i))return i.clone();var t=typeof n=="object"?n:{};return t.date=i,t.args=arguments,new B(t)},c=W;c.l=N,c.i=P,c.w=function(i,n){return D(i,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var B=function(){function i(t){this.$L=N(t.locale,null,!0),this.parse(t)}var n=i.prototype;return n.parse=function(t){this.$d=function(u){var e=u.date,o=u.utc;if(e===null)return new Date(NaN);if(c.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var s=e.match(K);if(s){var l=s[2]-1||0,m=(s[7]||"0").substring(0,3);return o?new Date(Date.UTC(s[1],l,s[3]||1,s[4]||0,s[5]||0,s[6]||0,m)):new Date(s[1],l,s[3]||1,s[4]||0,s[5]||0,s[6]||0,m)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return c},n.isValid=function(){return this.$d.toString()!==J},n.isSame=function(t,u){var e=D(t);return this.startOf(u)<=e&&e<=this.endOf(u)},n.isAfter=function(t,u){return D(t)