|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6442],{97742:function(ae){ae.exports={store_config_container:"store_config_container___2LSwE",choose_store_state:"choose_store_state___36VpX",add_row_content:"add_row_content___LoP14",add_row_btn:"add_row_btn___3o2fm"}},16742:function(ae,Q,t){"use strict";t.r(Q),t.d(Q,{default:function(){return Oe}});var E=t(57338),T=t(273),$=t(57663),F=t(71577),ce=t(58024),K=t(91894),he=t(32157),U=t(7573),C=t(2824),c=t(39428),_=t(11849),q=t(34792),y=t(48086),x=t(3182),pe=t(49101),p=t(67294),ne=t(78009),k=t(85224),s=t(16894),m=t(12826),I=t(71194),a=t(50146),N=t(77883),Se=t(85986),Re=t(62999),je=t(54680),Le=t(43358),O=t(34041),$e=t(9715),g=t(71257),We=t(47673),P=t(4107),Ge=t(97742),e=t(85893),Ce=O.Z.Option,Y,Ve=function(l){var f=useState(null),i=_slicedToArray(f,2),n=i[0],d=i[1],r=useState(null),H=_slicedToArray(r,2),z=H[0],G=H[1],J=useState([]),X=_slicedToArray(J,2),b=X[0],ue=X[1],ee=useState(null),se=_slicedToArray(ee,2),le=se[0],ie=se[1],te=function(){le?l.handleOk(le):_message.error("\u8BF7\u9009\u62E9\u5E97\u94FA\u5730\u5740")},de=function(Z){if(Z&&n){n.clearOverlays();var u=b.find(function(D){return D.uid===Z});if(u){ie(u);var A=new BMapGL.Point(u.point.lng,u.point.lat);n.centerAndZoom(A,16);var R=new BMapGL.Marker(A);n.addOverlay(R);var re=new BMapGL.InfoWindow(u.address,{width:200,height:100,title:u.title,message:u.address});R.addEventListener("click",function(){n.openInfoWindow(re,A)})}}},oe=function(Z){if(Y&&(clearTimeout(Y),Y=null),n)if(z===null){var u=new BMapGL.LocalSearch(n,{onSearchComplete:function(R){R&&ue(JSON.parse(JSON.stringify(R._pois)))}});Y=setTimeout(function(){u.search(Z)},300),G(u)}else Y=setTimeout(function(){z.search(Z)},300)},V=function(){var Z=new BMapGL.Map("baidu_map_container");Z.enableScrollWheelZoom(!0),Z.setHeading(64.5),Z.setTilt(73);var u=new BMapGL.LocalCity;u.get(function(A){A&&Z.centerAndZoom(new BMapGL.Point(A.center.lng,A.center.lat),12)}),d(Z)};return useEffect(function(){V()},[]),_jsx(_Fragment,{children:_jsxs(_Modal,{width:800,title:"\u9009\u62E9\u5E97\u94FA\u5750\u6807",visible:l.isShowBaiduMap,onOk:te,onCancel:l.handleCancel,children:[_jsx(_Select,{showSearch:!0,placeholder:"\u8BF7\u8F93\u5165\u5730\u5740",onChange:de,onSearch:oe,defaultActiveFirstOption:!1,showArrow:!1,filterOption:!1,notFoundContent:null,style:{width:"100%",marginBottom:"10px"},size:"large",children:b==null?void 0:b.map(function(B){return _jsxs(Ce,{value:B.uid,children:[B.title," \u3010",B.address,"\u3011"]},B.uid)})}),_jsx("div",{id:"baidu_map_container",style:{width:"750px",height:"500px"}})]})})},Ke=null,Ee=function(l){var f=P.Z.TextArea,i=g.Z.useForm(),n=(0,C.Z)(i,1),d=n[0],r=O.Z.Option,H=O.Z.OptGroup,z=(0,p.useState)(!1),G=(0,C.Z)(z,2),J=G[0],X=G[1];return(0,e.jsx)(a.Z,{title:l.values.id?"\u7F16\u8F91\u673A\u6784":"\u65B0\u5EFA\u673A\u6784",width:640,visible:l.modalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){l.onCancel()},destroyOnClose:!0,children:(0,e.jsxs)(g.Z,{form:d,layout:"horizontal",preserve:!1,labelCol:{span:4},initialValues:l.values,onFinish:l.onFinish,children:[(0,e.jsx)(g.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(P.Z,{})}),(0,e.jsx)(g.Z.Item,{name:"code",label:"\u7EC4\u7EC7\u7F16\u7801",rules:[{required:!0,max:64}],children:(0,e.jsx)(P.Z,{placeholder:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u7F16\u7801"})}),(0,e.jsx)(g.Z.Item,{name:"name",label:"\u7EC4\u7EC7\u540D\u79F0",rules:[{required:!0,max:64}],children:(0,e.jsx)(P.Z,{placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"})}),(0,e.jsx)(g.Z.Item,{name:"pid",label:"\u4E0A\u7EA7\u540D\u79F0",rules:[{required:!0}],children:(0,e.jsx)(je.Z,{style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:l.treeDatas,placeholder:"\u8BF7\u9009\u62E9\u4E0A\u7EA7\u540D\u79F0",treeDefaultExpandAll:!0})}),(0,e.jsx)(g.Z.Item,{name:"type",label:"\u7EC4\u7EC7\u7C7B\u578B",defaultValue:l.values.type,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7EC4\u7EC7\u7C7B\u578B"}],children:(0,e.jsx)(O.Z,{placeholder:"\u8BF7\u9009\u62E9\u673A\u6784\u7C7B\u578B",children:(0,e.jsxs)(H,{children:[(0,e.jsx)(O.Z.Option,{value:0,children:"\u673A\u6784"}),(0,e.jsx)(O.Z.Option,{value:1,children:"\u914D\u9001\u4E2D\u5FC3"}),(0,e.jsx)(O.Z.Option,{value:2,children:"\u76F4\u8425\u5E97"}),(0,e.jsx)(O.Z.Option,{value:3,children:"\u52A0\u76DF\u5E97"})]})})}),(0,e.jsx)(g.Z.Item,{label:"\u5E97\u94FA\u5750\u6807",name:"store_Loc",rules:[{required:!0,max:100,pattern:/^[-\+]?\d+(\.\d+)\,[-\+]?\d+(\.\d+)$/,message:"\u7ECF\u7EAC\u5EA6\u683C\u5F0F\u4E0D\u5BF9"}],children:(0,e.jsx)(P.Z,{style:{width:"75%"},placeholder:"104.070734,30.575041"})}),(0,e.jsx)(g.Z.Item,{label:"\u5E97\u94FA\u5730\u5740",name:"store_Addr",rules:[{required:!0,max:100}],children:(0,e.jsx)(P.Z,{placeholder:"\u6210\u90FD\u5E02\u6B66\u4FAF\u533A\u6842\u6EAA\u8857\u9053\u73AF\u7403\u4E2D\u5FC3N5-9111C"})}),(0,e.jsx)(g.Z.Item,{name:"tel",label:"\u7535\u8BDD",rules:[{max:20}],children:(0,e.jsx)(P.Z,{placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"})}),(0,e.jsx)(g.Z.Item,{name:"sort",label:"\u6392\u5E8F",children:(0,e.jsx)(Se.Z,{min:1,step:1})}),(0,e.jsx)(g.Z.Item,{name:"remark",label:"\u5907\u6CE8",children:(0,e.jsx)(f,{rows:4,rules:[{max:500}]})}),(0,e.jsx)(g.Z.Item,{children:(0,e.jsx)(F.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},xe=Ee,W=t(3408),Fe=t(48971),Be=function(){var M=(0,x.Z)((0,c.Z)().mark(function l(f){var i,n;return(0,c.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return i=y.default.loading("\u6B63\u5728\u6DFB\u52A0"),r.prev=1,r.next=4,(0,W.IH)((0,_.Z)({},f));case 4:if(n=r.sent,n.succeeded){r.next=9;break}return y.default.error(n.errors),i(),r.abrupt("return",!1);case 9:return i(),y.default.success("\u6DFB\u52A0\u6210\u529F"),r.abrupt("return",!0);case 14:return r.prev=14,r.t0=r.catch(1),i(),y.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),r.abrupt("return",!1);case 19:case"end":return r.stop()}},l,null,[[1,14]])}));return function(f){return M.apply(this,arguments)}}(),Ae=function(){var M=(0,x.Z)((0,c.Z)().mark(function l(f){var i,n;return(0,c.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return i=y.default.loading("\u6B63\u5728\u914D\u7F6E"),r.prev=1,r.next=4,(0,W.eP)((0,_.Z)({},f));case 4:if(n=r.sent,n.succeeded){r.next=9;break}return y.default.error(n.errors),i(),r.abrupt("return",!1);case 9:return i(),y.default.success("\u6DFB\u52A0\u6210\u529F"),r.abrupt("return",!0);case 14:return r.prev=14,r.t0=r.catch(1),i(),y.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),r.abrupt("return",!1);case 19:case"end":return r.stop()}},l,null,[[1,14]])}));return function(f){return M.apply(this,arguments)}}(),we=function(){var M=(0,x.Z)((0,c.Z)().mark(function l(f){var i;return(0,c.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(i=y.default.loading("\u6B63\u5728\u5220\u9664"),f){d.next=3;break}return d.abrupt("return",!0);case 3:return d.prev=3,d.next=6,(0,W.mm)({key:f.map(function(r){return r.key})});case 6:return i(),y.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),d.abrupt("return",!0);case 11:return d.prev=11,d.t0=d.catch(3),i(),y.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),d.abrupt("return",!1);case 16:case"end":return d.stop()}},l,null,[[3,11]])}));return function(f){return M.apply(this,arguments)}}(),be=function(){var l=(0,p.useState)(),f=(0,C.Z)(l,2),i=f[0],n=f[1],d=(0,p.useState)(),r=(0,C.Z)(d,2),H=r[0],z=r[1],G=(0,p.useState)({}),J=(0,C.Z)(G,2),X=J[0],b=J[1],ue=(0,p.useState)(),ee=(0,C.Z)(ue,2),se=ee[0],le=ee[1],ie=(0,p.useState)(),te=(0,C.Z)(ie,2),de=te[0],oe=te[1],V=(0,p.useRef)(),B=(0,p.useState)(),Z=(0,C.Z)(B,2),u=Z[0],A=Z[1],R=(0,p.useState)(),re=(0,C.Z)(R,2),D=re[0],Me=re[1],De=(0,p.useState)(),me=(0,C.Z)(De,2),fe=me[0],ve=me[1],Te=(0,p.useState)(),Ze=(0,C.Z)(Te,2),Ie=Ze[0],Pe=Ze[1],ye=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0},{title:"\u7EC4\u7EC7\u540D\u79F0",dataIndex:"name"},{title:"\u7EC4\u7EC7\u7F16\u7801",dataIndex:"code"},{title:"\u7EC4\u7EC7\u7C7B\u578B",dataIndex:"type",valueEnum:{0:{text:"\u673A\u6784"},1:{text:"\u914D\u9001\u4E2D\u5FC3"},2:{text:"\u76F4\u8425\u5E97"},3:{text:"\u52A0\u76DF\u5E97"}}},{title:"\u7535\u8BDD",dataIndex:"tel",hideInSearch:!0},{title:"\u6392\u5E8F",dataIndex:"sort",valueType:"digit",hideInSearch:!0},{title:"\u63CF\u8FF0",dataIndex:"remark",valueType:"textarea",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"x",valueType:"option",render:function(h,o){var S=(0,e.jsx)("a",{},"primary");return o.type>=2&&(S=(0,e.jsx)("a",{onClick:function(){Fe.m8.push({pathname:"/sys/storemanage",query:{isAdd:!1,values:o.id}})},children:"\u5E97\u94FA\u7BA1\u7406"},"primary2")),[(0,e.jsxs)("a",{onClick:function(){b(o),n(!0)},children:[" ","\u4FEE\u6539"]},"primary3"),S]}}];return(0,p.useEffect)(function(){function v(){(0,W.FM)().then(function(h){ve(h.data)})}v()},[]),(0,e.jsxs)(ne.ZP,{children:[(0,e.jsx)(s.ZP,{headerTitle:"\u7EC4\u7EC7\u5217\u8868",actionRef:V,rowKey:"id",search:{labelWidth:120},tableRender:function(h,o){return(0,e.jsxs)("div",{style:{display:"flex",width:"100%"},children:[(0,e.jsx)(K.Z,{title:"\u673A\u6784\u90E8\u95E8",children:(0,e.jsx)(U.Z,{defaultExpandAll:!0,onSelect:function(j){return Pe(j[0])},treeData:fe})}),(0,e.jsx)("div",{style:{flex:1},children:o})]})},toolBarRender:function(){return[(0,e.jsxs)(F.Z,{type:"primary",onClick:function(){b({}),n(!0)},children:[(0,e.jsx)(pe.Z,{})," \u65B0\u5EFA"]},"primary1")]},params:{Pid:Ie},request:function(){var v=(0,x.Z)((0,c.Z)().mark(function h(o){var S,j;return(0,c.Z)().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return S=[],j=0,L.next=4,(0,W.lM)(o).then(function(ge){S=ge.data.data,j=ge.data.total});case 4:return L.abrupt("return",{data:S,success:!0,total:j});case 5:case"end":return L.stop()}},h)}));return function(h){return v.apply(this,arguments)}}(),columns:ye}),(D==null?void 0:D.length)>0&&(0,e.jsxs)(k.Z,{extra:(0,e.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,e.jsx)("a",{style:{fontWeight:600},children:D.length})," ","\u9879 \xA0\xA0",(0,e.jsxs)("span",{children:["\u670D\u52A1\u8C03\u7528\u6B21\u6570\u603B\u8BA1 ",D.reduce(function(v,h){return v+h.callNo},0)," \u4E07"]})]}),children:[(0,e.jsx)(F.Z,{onClick:(0,x.Z)((0,c.Z)().mark(function v(){var h,o;return(0,c.Z)().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,we(D);case 2:Me([]),(h=V.current)===null||h===void 0||(o=h.reloadAndRest)===null||o===void 0||o.call(h);case 4:case"end":return j.stop()}},v)})),children:"\u6279\u91CF\u5220\u9664"}),(0,e.jsx)(F.Z,{type:"primary",children:"\u6279\u91CF\u5BA1\u6279"})]}),i&&(0,e.jsx)(xe,{treeDatas:[{key:"0",parentId:"0",title:"\u9876\u7EA7",value:"0",children:fe}],onFinish:function(){var v=(0,x.Z)((0,c.Z)().mark(function h(o){var S;return(0,c.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(S=!1,!o.id){w.next=7;break}return w.next=4,Ae(o);case 4:S=w.sent,w.next=10;break;case 7:return w.next=9,Be(o);case 9:S=w.sent;case 10:S&&(n(!1),V.current&&((0,W.FM)().then(function(L){ve(L.data)}),V.current.reload()));case 11:case"end":return w.stop()}},h)}));return function(h){return v.apply(this,arguments)}}(),onCancel:function(){n(!1),b({})},modalVisible:i,values:X||{}}),(0,e.jsx)(T.Z,{width:600,visible:de,onClose:function(){A(void 0),oe(!1)},closable:!1,children:(u==null?void 0:u.name)&&(0,e.jsx)(m.ZP,{column:2,title:u==null?void 0:u.name,request:(0,x.Z)((0,c.Z)().mark(function v(){return(0,c.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",{data:u||{}});case 1:case"end":return o.stop()}},v)})),params:{id:u==null?void 0:u.name},columns:ye})})]})},Oe=be},3408:function(ae,Q,t){"use strict";t.d(Q,{lM:function(){return ce},IH:function(){return he},mm:function(){return _},eP:function(){return y},FM:function(){return ne}});var E=t(39428),T=t(11849),$=t(3182),F=t(48971);function ce(s,m){return K.apply(this,arguments)}function K(){return K=(0,$.Z)((0,E.Z)().mark(function s(m,I){return(0,E.Z)().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return N.abrupt("return",(0,F.WY)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,T.Z)({},m)}));case 1:case"end":return N.stop()}},s)})),K.apply(this,arguments)}function he(s){return U.apply(this,arguments)}function U(){return U=(0,$.Z)((0,E.Z)().mark(function s(m){return(0,E.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,F.WY)("/kitchen/api/sysOrg/add",{method:"POST",data:(0,T.Z)({},m)}));case 1:case"end":return a.stop()}},s)})),U.apply(this,arguments)}function C(s){return c.apply(this,arguments)}function c(){return c=_asyncToGenerator(_regeneratorRuntime().mark(function s(m){return _regeneratorRuntime().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",request("\u200B/kitchen/api\u200B/sysOrg\u200B/list",{method:"POST",data:_objectSpread({},m)}));case 1:case"end":return a.stop()}},s)})),c.apply(this,arguments)}function _(s){return q.apply(this,arguments)}function q(){return q=(0,$.Z)((0,E.Z)().mark(function s(m){return(0,E.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,F.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/delete",{method:"POST",data:(0,T.Z)({},m)}));case 1:case"end":return a.stop()}},s)})),q.apply(this,arguments)}function y(s){return x.apply(this,arguments)}function x(){return x=(0,$.Z)((0,E.Z)().mark(function s(m){return(0,E.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,F.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/edit",{method:"POST",data:(0,T.Z)({},m)}));case 1:case"end":return a.stop()}},s)})),x.apply(this,arguments)}function pe(s){return p.apply(this,arguments)}function p(){return p=_asyncToGenerator(_regeneratorRuntime().mark(function s(m){return _regeneratorRuntime().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",request("/kitchen\u200B/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},m)}));case 1:case"end":return a.stop()}},s)})),p.apply(this,arguments)}function ne(s){return k.apply(this,arguments)}function k(){return k=(0,$.Z)((0,E.Z)().mark(function s(m){return(0,E.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,F.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,T.Z)({},m)}));case 1:case"end":return a.stop()}},s)})),k.apply(this,arguments)}}}]);
|