You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
14 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6442],{97742:function(te){te.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(te,J,t){"use strict";t.r(J),t.d(J,{default:function(){return Me}});var L=t(57338),w=t(25084),pe=t(57663),y=t(71577),$=t(58024),re=t(91894),X=t(32157),ae=t(7573),g=t(2824),ne=t(11849),Q=t(34792),Z=t(48086),x=t(3182),ue=t(94043),c=t.n(ue),me=t(49101),p=t(67294),se=t(78009),K=t(85224),s=t(16894),m=t(12826),P=t(71194),a=t(50146),U=t(77883),je=t(85482),Le=t(62999),Ce=t(54680),$e=t(43358),D=t(34041),We=t(9715),j=t(86835),Ge=t(47673),T=t(4107),Ve=t(97742),e=t(85893),Ee=D.Z.Option,k,Ke=function(l){var f=useState(null),i=_slicedToArray(f,2),n=i[0],d=i[1],r=useState(null),Y=_slicedToArray(r,2),H=Y[0],G=Y[1],N=useState([]),z=_slicedToArray(N,2),b=z[0],le=z[1],_=useState(null),ie=_slicedToArray(_,2),de=ie[0],oe=ie[1],q=function(){de?l.handleOk(de):_message.error("\u8BF7\u9009\u62E9\u5E97\u94FA\u5730\u5740")},ce=function(S){if(S&&n){n.clearOverlays();var u=b.find(function(M){return M.uid===S});if(u){oe(u);var F=new BMapGL.Point(u.point.lng,u.point.lat);n.centerAndZoom(F,16);var I=new BMapGL.Marker(F);n.addOverlay(I);var ee=new BMapGL.InfoWindow(u.address,{width:200,height:100,title:u.title,message:u.address});I.addEventListener("click",function(){n.openInfoWindow(ee,F)})}}},he=function(S){if(k&&(clearTimeout(k),k=null),n)if(H===null){var u=new BMapGL.LocalSearch(n,{onSearchComplete:function(I){I&&le(JSON.parse(JSON.stringify(I._pois)))}});k=setTimeout(function(){u.search(S)},300),G(u)}else k=setTimeout(function(){H.search(S)},300)},V=function(){var S=new BMapGL.Map("baidu_map_container");S.enableScrollWheelZoom(!0),S.setHeading(64.5),S.setTilt(73);var u=new BMapGL.LocalCity;u.get(function(F){F&&S.centerAndZoom(new BMapGL.Point(F.center.lng,F.center.lat),12)}),d(S)};return useEffect(function(){V()},[]),_jsx(_Fragment,{children:_jsxs(_Modal,{width:800,title:"\u9009\u62E9\u5E97\u94FA\u5750\u6807",visible:l.isShowBaiduMap,onOk:q,onCancel:l.handleCancel,children:[_jsx(_Select,{showSearch:!0,placeholder:"\u8BF7\u8F93\u5165\u5730\u5740",onChange:ce,onSearch:he,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(Ee,{value:B.uid,children:[B.title," \u3010",B.address,"\u3011"]},B.uid)})}),_jsx("div",{id:"baidu_map_container",style:{width:"750px",height:"500px"}})]})})},Ue=null,xe=function(l){var f=T.Z.TextArea,i=j.Z.useForm(),n=(0,g.Z)(i,1),d=n[0],r=D.Z.Option,Y=D.Z.OptGroup,H=(0,p.useState)(!1),G=(0,g.Z)(H,2),N=G[0],z=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)(j.Z,{form:d,layout:"horizontal",preserve:!1,labelCol:{span:4},initialValues:l.values,onFinish:l.onFinish,children:[(0,e.jsx)(j.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(T.Z,{})}),(0,e.jsx)(j.Z.Item,{name:"code",label:"\u7EC4\u7EC7\u7F16\u7801",rules:[{required:!0,max:64}],children:(0,e.jsx)(T.Z,{placeholder:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u7F16\u7801"})}),(0,e.jsx)(j.Z.Item,{name:"name",label:"\u7EC4\u7EC7\u540D\u79F0",rules:[{required:!0,max:64}],children:(0,e.jsx)(T.Z,{placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"})}),(0,e.jsx)(j.Z.Item,{name:"pid",label:"\u4E0A\u7EA7\u540D\u79F0",rules:[{required:!0}],children:(0,e.jsx)(Ce.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)(j.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)(D.Z,{placeholder:"\u8BF7\u9009\u62E9\u673A\u6784\u7C7B\u578B",children:(0,e.jsxs)(Y,{children:[(0,e.jsx)(D.Z.Option,{value:0,children:"\u673A\u6784"}),(0,e.jsx)(D.Z.Option,{value:1,children:"\u914D\u9001\u4E2D\u5FC3"}),(0,e.jsx)(D.Z.Option,{value:2,children:"\u76F4\u8425\u5E97"}),(0,e.jsx)(D.Z.Option,{value:3,children:"\u52A0\u76DF\u5E97"})]})})}),(0,e.jsx)(j.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)(T.Z,{style:{width:"75%"},placeholder:"104.070734,30.575041"})}),(0,e.jsx)(j.Z.Item,{label:"\u5E97\u94FA\u5730\u5740",name:"store_Addr",rules:[{required:!0,max:100}],children:(0,e.jsx)(T.Z,{placeholder:"\u6210\u90FD\u5E02\u6B66\u4FAF\u533A\u6842\u6EAA\u8857\u9053\u73AF\u7403\u4E2D\u5FC3N5-9111C"})}),(0,e.jsx)(j.Z.Item,{name:"tel",label:"\u7535\u8BDD",rules:[{max:20}],children:(0,e.jsx)(T.Z,{placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"})}),(0,e.jsx)(j.Z.Item,{name:"sort",label:"\u6392\u5E8F",children:(0,e.jsx)(je.Z,{min:1,step:1})}),(0,e.jsx)(j.Z.Item,{name:"remark",label:"\u5907\u6CE8",children:(0,e.jsx)(f,{rows:4,rules:[{max:500}]})}),(0,e.jsx)(j.Z.Item,{children:(0,e.jsx)(y.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},Be=xe,W=t(3408),Fe=t(48971),Ae=function(){var O=(0,x.Z)(c().mark(function l(f){var i,n;return c().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return i=Z.default.loading("\u6B63\u5728\u6DFB\u52A0"),r.prev=1,r.next=4,(0,W.IH)((0,ne.Z)({},f));case 4:if(n=r.sent,n.succeeded){r.next=9;break}return Z.default.error(n.errors),i(),r.abrupt("return",!1);case 9:return i(),Z.default.success("\u6DFB\u52A0\u6210\u529F"),r.abrupt("return",!0);case 14:return r.prev=14,r.t0=r.catch(1),i(),Z.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 O.apply(this,arguments)}}(),be=function(){var O=(0,x.Z)(c().mark(function l(f){var i,n;return c().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return i=Z.default.loading("\u6B63\u5728\u914D\u7F6E"),r.prev=1,r.next=4,(0,W.eP)((0,ne.Z)({},f));case 4:if(n=r.sent,n.succeeded){r.next=9;break}return Z.default.error(n.errors),i(),r.abrupt("return",!1);case 9:return i(),Z.default.success("\u6DFB\u52A0\u6210\u529F"),r.abrupt("return",!0);case 14:return r.prev=14,r.t0=r.catch(1),i(),Z.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 O.apply(this,arguments)}}(),De=function(){var O=(0,x.Z)(c().mark(function l(f){var i;return c().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(i=Z.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(),Z.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(),Z.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 O.apply(this,arguments)}}(),Oe=function(){var l=(0,p.useState)(),f=(0,g.Z)(l,2),i=f[0],n=f[1],d=(0,p.useState)(),r=(0,g.Z)(d,2),Y=r[0],H=r[1],G=(0,p.useState)({}),N=(0,g.Z)(G,2),z=N[0],b=N[1],le=(0,p.useState)(),_=(0,g.Z)(le,2),ie=_[0],de=_[1],oe=(0,p.useState)(),q=(0,g.Z)(oe,2),ce=q[0],he=q[1],V=(0,p.useRef)(),B=(0,p.useState)(),S=(0,g.Z)(B,2),u=S[0],F=S[1],I=(0,p.useState)(),ee=(0,g.Z)(I,2),M=ee[0],we=ee[1],Pe=(0,p.useState)(),fe=(0,g.Z)(Pe,2),ve=fe[0],ye=fe[1],Te=(0,p.useState)(),ge=(0,g.Z)(Te,2),Ie=ge[0],Re=ge[1],Se=[{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 C=(0,e.jsx)("a",{},"primary");return o.type>=2&&(C=(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"),C]}}];return(0,p.useEffect)(function(){function v(){(0,W.FM)().then(function(h){ye(h.data)})}v()},[]),(0,e.jsxs)(se.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)(re.Z,{title:"\u673A\u6784\u90E8\u95E8",children:(0,e.jsx)(ae.Z,{defaultExpandAll:!0,onSelect:function(E){return Re(E[0])},treeData:ve})}),(0,e.jsx)("div",{style:{flex:1},children:o})]})},toolBarRender:function(){return[(0,e.jsxs)(y.Z,{type:"primary",onClick:function(){b({}),n(!0)},children:[(0,e.jsx)(me.Z,{})," \u65B0\u5EFA"]},"primary1")]},params:{Pid:Ie},request:function(){var v=(0,x.Z)(c().mark(function h(o){var C,E;return c().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return C=[],E=0,R.next=4,(0,W.lM)(o).then(function(Ze){C=Ze.data.data,E=Ze.data.total});case 4:return R.abrupt("return",{data:C,success:!0,total:E});case 5:case"end":return R.stop()}},h)}));return function(h){return v.apply(this,arguments)}}(),columns:Se}),(M==null?void 0:M.length)>0&&(0,e.jsxs)(K.Z,{extra:(0,e.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,e.jsx)("a",{style:{fontWeight:600},children:M.length})," ","\u9879 \xA0\xA0",(0,e.jsxs)("span",{children:["\u670D\u52A1\u8C03\u7528\u6B21\u6570\u603B\u8BA1 ",M.reduce(function(v,h){return v+h.callNo},0)," \u4E07"]})]}),children:[(0,e.jsx)(y.Z,{onClick:(0,x.Z)(c().mark(function v(){var h,o;return c().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,De(M);case 2:we([]),(h=V.current)===null||h===void 0||(o=h.reloadAndRest)===null||o===void 0||o.call(h);case 4:case"end":return E.stop()}},v)})),children:"\u6279\u91CF\u5220\u9664"}),(0,e.jsx)(y.Z,{type:"primary",children:"\u6279\u91CF\u5BA1\u6279"})]}),i&&(0,e.jsx)(Be,{treeDatas:[{key:"0",parentId:"0",title:"\u9876\u7EA7",value:"0",children:ve}],onFinish:function(){var v=(0,x.Z)(c().mark(function h(o){var C;return c().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(C=!1,!o.id){A.next=7;break}return A.next=4,be(o);case 4:C=A.sent,A.next=10;break;case 7:return A.next=9,Ae(o);case 9:C=A.sent;case 10:C&&(n(!1),V.current&&((0,W.FM)().then(function(R){ye(R.data)}),V.current.reload()));case 11:case"end":return A.stop()}},h)}));return function(h){return v.apply(this,arguments)}}(),onCancel:function(){n(!1),b({})},modalVisible:i,values:z||{}}),(0,e.jsx)(w.Z,{width:600,visible:ce,onClose:function(){F(void 0),he(!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)(c().mark(function v(){return c().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:Se})})]})},Me=Oe},3408:function(te,J,t){"use strict";t.d(J,{lM:function(){return re},IH:function(){return ae},mm:function(){return Z},eP:function(){return ue},FM:function(){return se}});var L=t(11849),w=t(3182),pe=t(94043),y=t.n(pe),$=t(48971);function re(s,m){return X.apply(this,arguments)}function X(){return X=(0,w.Z)(y().mark(function s(m,P){return y().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.abrupt("return",(0,$.WY)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,L.Z)({},m)}));case 1:case"end":return U.stop()}},s)})),X.apply(this,arguments)}function ae(s){return g.apply(this,arguments)}function g(){return g=(0,w.Z)(y().mark(function s(m){return y().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,$.WY)("/kitchen/api/sysOrg/add",{method:"POST",data:(0,L.Z)({},m)}));case 1:case"end":return a.stop()}},s)})),g.apply(this,arguments)}function ne(s){return Q.apply(this,arguments)}function Q(){return Q=_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)})),Q.apply(this,arguments)}function Z(s){return x.apply(this,arguments)}function x(){return x=(0,w.Z)(y().mark(function s(m){return y().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,$.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/delete",{method:"POST",data:(0,L.Z)({},m)}));case 1:case"end":return a.stop()}},s)})),x.apply(this,arguments)}function ue(s){return c.apply(this,arguments)}function c(){return c=(0,w.Z)(y().mark(function s(m){return y().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,$.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/edit",{method:"POST",data:(0,L.Z)({},m)}));case 1:case"end":return a.stop()}},s)})),c.apply(this,arguments)}function me(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 se(s){return K.apply(this,arguments)}function K(){return K=(0,w.Z)(y().mark(function s(m){return y().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,$.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,L.Z)({},m)}));case 1:case"end":return a.stop()}},s)})),K.apply(this,arguments)}}}]);