|
- (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()<t.date())return-i(t,n);var u=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(u,a),o=t-e<0,s=n.clone().add(u+(o?-1:1),a);return+(-(u+(t-e)/(o?e-s:s-e))||0)},a:function(i){return i<0?Math.ceil(i)||0:Math.floor(i)},p:function(i){return{M:a,y:A,w:X,d:C,D:H,h:j,m:v,s:O,ms:L,Q:f}[i]||String(i||"").toLowerCase().replace(/s$/,"")},u:function(i){return i===void 0}},Z="en",U={};U[Z]=$;var P=function(i){return i instanceof B},N=function i(n,t,u){var e;if(!n)return Z;if(typeof n=="string"){var o=n.toLowerCase();U[o]&&(e=o),t&&(U[o]=t,e=o);var s=n.split("-");if(!e&&s.length>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)<this.startOf(u)},n.isBefore=function(t,u){return this.endOf(u)<D(t)},n.$g=function(t,u,e){return c.u(t)?this[u]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,u){var e=this,o=!!c.u(u)||u,s=c.p(t),l=function(b,x){var E=c.w(e.$u?Date.UTC(e.$y,x,b):new Date(e.$y,x,b),e);return o?E:E.endOf(C)},m=function(b,x){return c.w(e.toDate()[b].apply(e.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(x)),e)},p=this.$W,g=this.$M,R=this.$D,z="set"+(this.$u?"UTC":"");switch(s){case A:return o?l(1,0):l(31,11);case a:return o?l(1,g):l(0,g+1);case X:var q=this.$locale().weekStart||0,G=(p<q?p+7:p)-q;return l(o?R-G:R+(6-G),g);case C:case H:return m(z+"Hours",0);case j:return m(z+"Minutes",1);case v:return m(z+"Seconds",2);case O:return m(z+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,u){var e,o=c.p(t),s="set"+(this.$u?"UTC":""),l=(e={},e[C]=s+"Date",e[H]=s+"Date",e[a]=s+"Month",e[A]=s+"FullYear",e[j]=s+"Hours",e[v]=s+"Minutes",e[O]=s+"Seconds",e[L]=s+"Milliseconds",e)[o],m=o===C?this.$D+(u-this.$W):u;if(o===a||o===A){var p=this.clone().set(H,1);p.$d[l](m),p.init(),this.$d=p.set(H,Math.min(this.$D,p.daysInMonth())).$d}else l&&this.$d[l](m);return this.init(),this},n.set=function(t,u){return this.clone().$set(t,u)},n.get=function(t){return this[c.p(t)]()},n.add=function(t,u){var e,o=this;t=Number(t);var s=c.p(u),l=function(g){var R=D(o);return c.w(R.date(R.date()+Math.round(g*t)),o)};if(s===a)return this.set(a,this.$M+t);if(s===A)return this.set(A,this.$y+t);if(s===C)return l(1);if(s===X)return l(7);var m=(e={},e[v]=r,e[j]=S,e[O]=V,e)[s]||1,p=this.$d.getTime()+t*m;return c.w(p,this)},n.subtract=function(t,u){return this.add(-1*t,u)},n.format=function(t){var u=this,e=this.$locale();if(!this.isValid())return e.invalidDate||J;var o=t||"YYYY-MM-DDTHH:mm:ssZ",s=c.z(this),l=this.$H,m=this.$m,p=this.$M,g=e.weekdays,R=e.months,z=function(x,E,_,at){return x&&(x[E]||x(u,o))||_[E].slice(0,at)},q=function(x){return c.s(l%12||12,x,"0")},G=e.meridiem||function(x,E,_){var at=x<12?"AM":"PM";return _?at.toLowerCase():at},b={YY:String(this.$y).slice(-2),YYYY:this.$y,M:p+1,MM:c.s(p+1,2,"0"),MMM:z(e.monthsShort,p,R,3),MMMM:z(R,p),D:this.$D,DD:c.s(this.$D,2,"0"),d:String(this.$W),dd:z(e.weekdaysMin,this.$W,g,2),ddd:z(e.weekdaysShort,this.$W,g,3),dddd:g[this.$W],H:String(l),HH:c.s(l,2,"0"),h:q(1),hh:q(2),a:G(l,m,!0),A:G(l,m,!1),m:String(m),mm:c.s(m,2,"0"),s:String(this.$s),ss:c.s(this.$s,2,"0"),SSS:c.s(this.$ms,3,"0"),Z:s};return o.replace(rt,function(x,E){return E||b[x]||s.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,u,e){var o,s=c.p(u),l=D(t),m=(l.utcOffset()-this.utcOffset())*r,p=this-l,g=c.m(this,l);return g=(o={},o[A]=g/12,o[a]=g,o[f]=g/3,o[X]=(p-m)/6048e5,o[C]=(p-m)/864e5,o[j]=p/S,o[v]=p/r,o[O]=p/V,o)[s]||p,e?g:c.a(g)},n.daysInMonth=function(){return this.endOf(a).$D},n.$locale=function(){return U[this.$L]},n.locale=function(t,u){if(!t)return this.$L;var e=this.clone(),o=N(t,u,!0);return o&&(e.$L=o),e},n.clone=function(){return c.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},i}(),ut=B.prototype;return D.prototype=ut,[["$ms",L],["$s",O],["$m",v],["$H",j],["$W",C],["$M",a],["$y",A],["$D",H]].forEach(function(i){ut[i[1]]=function(n){return this.$g(n,i[0],i[1])}}),D.extend=function(i,n){return i.$i||(i(n,B,D),i.$i=!0),D},D.locale=N,D.isDayjs=P,D.unix=function(i){return D(1e3*i)},D.en=U[Z],D.Ls=U,D.p={},D})},96036:function(nt){(function(V,r){nt.exports=r()})(this,function(){"use strict";return function(V,r,S){var L=r.prototype,O=function(a){return a&&(a.indexOf?a:a.s)},v=function(a,f,A,H,J){var K=a.name?a:a.$locale(),rt=O(K[f]),$=O(K[A]),Q=rt||$.map(function(Z){return Z.slice(0,H)});if(!J)return Q;var W=K.weekStart;return Q.map(function(Z,U){return Q[(U+(W||0))%7]})},j=function(){return S.Ls[S.locale()]},C=function(a,f){return a.formats[f]||function(A){return A.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(H,J,K){return J||K.slice(1)})}(a.formats[f.toUpperCase()])},X=function(){var a=this;return{months:function(f){return f?f.format("MMMM"):v(a,"months")},monthsShort:function(f){return f?f.format("MMM"):v(a,"monthsShort","months",3)},firstDayOfWeek:function(){return a.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):v(a,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):v(a,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):v(a,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return C(a.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};L.localeData=function(){return X.bind(this)()},S.localeData=function(){var a=j();return{firstDayOfWeek:function(){return a.weekStart||0},weekdays:function(){return S.weekdays()},weekdaysShort:function(){return S.weekdaysShort()},weekdaysMin:function(){return S.weekdaysMin()},months:function(){return S.months()},monthsShort:function(){return S.monthsShort()},longDateFormat:function(f){return C(a,f)},meridiem:a.meridiem,ordinal:a.ordinal}},S.months=function(){return v(j(),"months")},S.monthsShort=function(){return v(j(),"monthsShort","months",3)},S.weekdays=function(a){return v(j(),"weekdays",null,null,a)},S.weekdaysShort=function(a){return v(j(),"weekdaysShort","weekdays",3,a)},S.weekdaysMin=function(a){return v(j(),"weekdaysMin","weekdays",2,a)}}})},72540:function(nt){(function(V,r){nt.exports=r()})(this,function(){"use strict";return function(V,r){r.prototype.weekday=function(S){var L=this.$locale().weekStart||0,O=this.$W,v=(O<L?O+7:O)-L;return this.$utils().u(S)?v:this.subtract(v,"day").add(S,"day")}}})}}]);
|