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.

p__sys__org.93ff6838.async.js 15 KiB

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