|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5705],{64317:function(ee,D,e){"use strict";var v=e(28991),x=e(81253),a=e(85893),T=e(22270),Z=e(67294),m=e(66758),E=e(31649),j=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],$=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],F=Z.forwardRef(function(r,A){var B=r.fieldProps,G=r.children,I=r.params,L=r.proFieldProps,N=r.mode,O=r.valueEnum,W=r.request,t=r.showSearch,w=r.options,U=(0,x.Z)(r,j),V=(0,Z.useContext)(m.Z);return(0,a.jsx)(E.Z,(0,v.Z)((0,v.Z)({valueEnum:(0,T.h)(O),request:W,params:I,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,v.Z)({options:w,mode:N,showSearch:t,getPopupContainer:V.getPopupContainer},B),ref:A,proFieldProps:L},U),{},{children:G}))}),g=Z.forwardRef(function(r,A){var B=r.fieldProps,G=r.children,I=r.params,L=r.proFieldProps,N=r.mode,O=r.valueEnum,W=r.request,t=r.options,w=(0,x.Z)(r,$),U=(0,v.Z)({options:t,mode:N||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},B),V=(0,Z.useContext)(m.Z);return(0,a.jsx)(E.Z,(0,v.Z)((0,v.Z)({valueEnum:(0,T.h)(O),request:W,params:I,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,v.Z)({getPopupContainer:V.getPopupContainer},U),ref:A,proFieldProps:L},w),{},{children:G}))}),f=F,y=g,C=f;C.SearchSelect=y,C.displayName="ProFormComponent",D.Z=C},5966:function(ee,D,e){"use strict";var v=e(28991),x=e(81253),a=e(85893),T=e(31649),Z=["fieldProps","proFieldProps"],m=["fieldProps","proFieldProps"],E="text",j=function(f){var y=f.fieldProps,C=f.proFieldProps,r=(0,x.Z)(f,Z);return(0,a.jsx)(T.Z,(0,v.Z)({valueType:E,fieldProps:y,filedConfig:{valueType:E},proFieldProps:C},r))},$=function(f){var y=f.fieldProps,C=f.proFieldProps,r=(0,x.Z)(f,m);return(0,a.jsx)(T.Z,(0,v.Z)({valueType:"password",fieldProps:y,proFieldProps:C,filedConfig:{valueType:E}},r))},F=j;F.Password=$,F.displayName="ProFormComponent",D.Z=F},76701:function(ee,D,e){"use strict";e.r(D),e.d(D,{default:function(){return ye}});var v=e(62350),x=e(24565),a=e(39428),T=e(34792),Z=e(48086),m=e(3182),E=e(57663),j=e(71577),$=e(71194),F=e(50146),g=e(2824),f=e(58024),y=e(91894),C=e(49101),r=e(67294),A=e(28790),B=e(16894),G=e(43358),I=e(34041),L=e(952),N=e(24739),O=e(28991),W=e(81253),t=e(85893),w=e(31649),U=["fieldProps","proFieldProps"],V=function(n,p){var o=n.fieldProps,M=n.proFieldProps,S=(0,W.Z)(n,U);return(0,t.jsx)(w.Z,(0,O.Z)({valueType:"digitRange",fieldProps:(0,O.Z)({},o),ref:p,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:M},S))},le=r.forwardRef(V),te=e(64317),ie=e(5966),de=function(n){var p=I.Z.Option,o=I.Z.OptGroup,M=[];return(0,t.jsx)(F.Z,{title:n.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:n.modalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){n.onCancel()},destroyOnClose:!0,children:(0,t.jsx)("div",{style:{padding:24},children:(0,t.jsx)(L.ZP,{layout:"Horizontal",onValuesChange:function(R,z){},onFinish:function(){var S=(0,m.Z)((0,a.Z)().mark(function R(z){return(0,a.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.abrupt("return",n.onFinish(z));case 1:case"end":return P.stop()}},R)}));return function(R){return S.apply(this,arguments)}}(),children:(0,t.jsxs)(N.UW,{children:[(0,t.jsx)(le,{label:"\u684C\u53F7\u8303\u56F4",placeholder:"\u8BF7\u8F93\u5165\u684C\u53F7\u8303\u56F4",name:"numbers",min:1,rules:[{required:!0}]}),(0,t.jsx)(te.Z,{label:"\u6392\u9664\u684C\u53F7",mode:"tags",placeholder:"\u8BF7\u8F93\u5165\u6392\u9664\u7684\u684C\u53F7",name:"excludeNumber",width:"md"}),(0,t.jsx)(ie.Z,{name:"code",label:"\u684C\u53F0\u7801\u524D\u7F00",placeholder:"\u8BF7\u8F93\u5165\u684C\u53F0\u7801\u524D\u7F00",rules:[{max:2}]}),(0,t.jsx)(te.Z,{label:"\u9002\u7528\u5E97\u94FA",mode:"multiple",placeholder:"\u8BF7\u9009\u62E9\u5E97\u94FA",name:"storeIds",width:"md",valueEnum:n.storeInfoList})]})})})})},ce=de,re=e(11849),Ae=e(9715),K=e(55843),Be=e(47673),H=e(4107),pe=function(n){var p={labelCol:{sm:{span:4}},wrapperCol:{}};return(0,t.jsx)(F.Z,{title:"\u4FEE\u6539",width:640,visible:n.editModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){n.onCancel()},destroyOnClose:!0,children:(0,t.jsxs)(K.Z,(0,re.Z)((0,re.Z)({},p),{},{layout:"Horizontal",preserve:!1,initialValues:n.values,onFinish:n.onFinish,children:[(0,t.jsx)(K.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(H.Z,{})}),(0,t.jsx)(K.Z.Item,{name:"desktopNumber",label:"\u684C\u9762\u7801",children:(0,t.jsx)(H.Z,{placeholder:"\u8BF7\u8F93\u5165\u684C\u9762\u7801"})}),(0,t.jsx)(K.Z.Item,{name:"code",label:"\u684C\u9762\u7801\u524D\u7F00",children:(0,t.jsx)(H.Z,{placeholder:"\u8BF7\u8F93\u5165\u684C\u9762\u7801\u524D\u7F00"})}),(0,t.jsx)(K.Z.Item,{children:(0,t.jsx)(j.Z,{disabled:n.isLook,type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})})]}))})},me=pe,k=e(48971);function he(){return Q.apply(this,arguments)}function Q(){return Q=(0,m.Z)((0,a.Z)().mark(function d(){return(0,a.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",(0,k.WY)("/storemanagement/api/shop/alllist",{method:"GET"}));case 1:case"end":return p.stop()}},d)})),Q.apply(this,arguments)}function ve(d){return J.apply(this,arguments)}function J(){return J=(0,m.Z)((0,a.Z)().mark(function d(n){return(0,a.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,k.WY)("/storemanagement/api/StoreDesktopNumber/Page",{method:"POST",data:n}));case 1:case"end":return o.stop()}},d)})),J.apply(this,arguments)}function fe(d){return X.apply(this,arguments)}function X(){return X=(0,m.Z)((0,a.Z)().mark(function d(n){return(0,a.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,k.WY)("/storemanagement/api/StoreDesktopNumber/Add",{method:"POST",data:n}));case 1:case"end":return o.stop()}},d)})),X.apply(this,arguments)}function Pe(d){return q.apply(this,arguments)}function q(){return q=(0,m.Z)((0,a.Z)().mark(function d(n){return(0,a.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,k.WY)("/storemanagement/api/StoreDesktopNumber/UpdateStoreDesktopNumber",{method:"put",data:n}));case 1:case"end":return o.stop()}},d)})),q.apply(this,arguments)}function Ze(d){return _.apply(this,arguments)}function _(){return _=(0,m.Z)((0,a.Z)().mark(function d(n){return(0,a.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",(0,k.WY)("\u200B/storemanagement/api/StoreDesktopNumber/Delete",{method:"DELETE",data:n}));case 1:case"end":return o.stop()}},d)})),_.apply(this,arguments)}var Fe=e(79361),ge=e.n(Fe),Le=y.Z.Meta,Ne="message",Ce=function(){var n=(0,r.useState)(!1),p=(0,g.Z)(n,2),o=p[0],M=p[1],S=(0,r.useState)(!1),R=(0,g.Z)(S,2),z=R[0],Y=R[1],P=(0,r.useRef)(),xe=(0,r.useState)(),ae=(0,g.Z)(xe,2),ne=ae[0],Ee=ae[1],je=(0,r.useState)(),se=(0,g.Z)(je,2),Se=se[0],be=se[1],De=(0,r.useState)([]),oe=(0,g.Z)(De,2),Te=oe[0],Ie=oe[1];(0,r.useEffect)(function(){var h=he().then(function(s){var u,i=[],c=[];(u=s.data)===null||u===void 0||u.forEach(function(l){i[l.id]={text:l.name},c.push({id:l.id,text:l.name,value:l.id,label:l.name})}),Ie(c),be(i)})},[]);var Oe=function(s){var u={title:"".concat(s.storeName," ").concat(s.desktopNumber,"\u53F7\u684C"),okText:"\u4E0B\u8F7D",cancelText:"\u53D6\u6D88",onOk:function(){Me("".concat(s.storeName," ").concat(s.desktopNumber,"\u53F7\u684C"))},content:(0,t.jsx)(y.Z,{style:{width:300,height:450,backgroundImage:"url(http://bpic.588ku.com/back_pic/05/42/90/125a6c515c035ab.jpg%21r650/fw/800)",backgroundSize:"cover"},title:(0,t.jsx)("h2",{style:{fontWeight:600},children:"".concat(s.storeName)}),headStyle:{border:"0px",textAlign:"center"},cover:(0,t.jsx)(ge(),{id:"qrCode",value:"".concat(s.host,"?storeId=").concat(s.storeId,"&number=").concat(s.desktopNumber),size:174,fgColor:"#000000",style:{margin:"auto",marginTop:"60px"}}),children:(0,t.jsx)("div",{style:{textAlign:"center"},children:(0,t.jsx)("h2",{style:{fontWeight:600},children:"".concat(s.desktopNumber,"\u53F7\u684C")})})})};F.Z.confirm(u)},Me=function(s){var u=document.getElementById("qrCode"),i=new Image;i.src=u.toDataURL("image/png");var c=document.createElement("a");c.download=s,c.style.display="none",c.href=i.src,document.body.appendChild(c),c.click(),URL.revokeObjectURL(c.href),document.body.removeChild(c)},Re=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u684C\u53F7",dataIndex:"desktopNumber",align:"center",search:!1,render:function(s){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(j.Z,{type:"primary",shape:"circle",children:s})})}},{title:"\u9002\u7528\u5E97\u94FA",align:"center",dataIndex:"storeId",valueType:"select",fieldProps:{options:Te}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",hideInForm:!0,search:!1},{title:"\u4E8C\u7EF4\u7801",dataIndex:"option",valueType:"option",fixed:"right",width:200,render:function(s,u){return[(0,t.jsx)("a",{onClick:function(){Y(!0),Ee(u)},type:"link",children:"\u4FEE\u6539"}),(0,t.jsx)(x.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",onConfirm:(0,m.Z)((0,a.Z)().mark(function i(){return(0,a.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:Ze([u.id]).then(function(b){return b.data?(Z.default.success("\u5220\u9664\u6210\u529F"),P.current.reload(),!0):(Z.default.error("\u5220\u9664\u5931\u8D25"),P.current.reload(),!1)});case 1:case"end":return l.stop()}},i)})),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,t.jsx)("a",{href:"#",children:"\u5220\u9664"})},"delete"),(0,t.jsx)("a",{onClick:function(){Oe(u)},type:"link",children:u.storeName})]}}];return(0,t.jsxs)(A.ZP,{header:{title:"",breadcrumb:{}},children:[(0,t.jsx)(B.ZP,{pagination:{pageSize:10},scroll:{x:1300},headerTitle:"\u5E97\u94FA\u7C7B\u578B",actionRef:P,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,t.jsxs)(j.Z,{type:"primary",onClick:function(){M(!0)},children:[(0,t.jsx)(C.Z,{})," \u7F16\u8F91"]},"primary")]},request:function(){var h=(0,m.Z)((0,a.Z)().mark(function s(u){var i,c;return(0,a.Z)().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return i=[],c=0,b.next=4,ve(u).then(function(ue){i=ue.data.data,c=ue.data.total});case 4:return b.abrupt("return",{data:i,success:!0,total:c});case 5:case"end":return b.stop()}},s)}));return function(s){return h.apply(this,arguments)}}(),columns:Re}),(0,t.jsx)(ce,{onFinish:function(){var h=(0,m.Z)((0,a.Z)().mark(function s(u){var i;return(0,a.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(i=!1,u.startNumber=u.numbers[0],u.endNumber=u.numbers[1],!u.id){l.next=6;break}l.next=9;break;case 6:return l.next=8,fe(u);case 8:i=l.sent;case 9:i.data&&(M(!1),P.current.reload());case 10:case"end":return l.stop()}},s)}));return function(s){return h.apply(this,arguments)}}(),onCancel:function(){M(!1)},modalVisible:o,storeInfoList:Se,values:ne||{}}),(0,t.jsx)(me,{onFinish:function(){var h=(0,m.Z)((0,a.Z)().mark(function s(u){var i;return(0,a.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:i=!1,u.id&&(i=Pe(u)),i&&(Y(!1),P.current.reload());case 3:case"end":return l.stop()}},s)}));return function(s){return h.apply(this,arguments)}}(),onCancel:function(){Y(!1)},editModalVisible:z,values:ne||{}})]})},ye=Ce}}]);
|