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 rivejä
17 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[1110],{57719:function(){},44187:function(nt,ae,n){"use strict";n.r(ae),n.d(ae,{default:function(){return It}});var m=n(39428),L=n(3182),ce=n(58024),de=n(91894),Ae=n(32157),pe=n(7573),g=n(57338),H=n(273),J=n(57663),f=n(71577),j=n(38663),Be=n(57719),We=n(13254),Fe=n(6999),Q=n(14781),Ue=n(20228),K=n(85061),Z=n(22122),E=n(96156),Ye=n(28481),at=n(90484),it=n(94184),me=n.n(it),a=n(67294),fe=n(53124),st=n(88258),lt=n(92820),ot=n(25378),ut=n(36138),ct=n(11382),Ve=n(24308),dt=n(21584),pt=n(96159),He=function(t,r){var i={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(i[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(i[e[o]]=t[e[o]]);return i},mt=function(r){var i=r.prefixCls,e=r.className,o=r.avatar,C=r.title,b=r.description,$=He(r,["prefixCls","className","avatar","title","description"]),A=(0,a.useContext)(fe.E_),B=A.getPrefixCls,x=B("list",i),R=me()("".concat(x,"-item-meta"),e),k=a.createElement("div",{className:"".concat(x,"-item-meta-content")},C&&a.createElement("h4",{className:"".concat(x,"-item-meta-title")},C),b&&a.createElement("div",{className:"".concat(x,"-item-meta-description")},b));return a.createElement("div",(0,Z.Z)({},$,{className:R}),o&&a.createElement("div",{className:"".concat(x,"-item-meta-avatar")},o),(C||b)&&k)},ft=function(r,i){var e=r.prefixCls,o=r.children,C=r.actions,b=r.extra,$=r.className,A=r.colStyle,B=He(r,["prefixCls","children","actions","extra","className","colStyle"]),x=(0,a.useContext)(ge),R=x.grid,k=x.itemLayout,d=(0,a.useContext)(fe.E_),q=d.getPrefixCls,D=function(){var N;return a.Children.forEach(o,function(F){typeof F=="string"&&(N=!0)}),N&&a.Children.count(o)>1},w=function(){return k==="vertical"?!!b:!D()},P=q("list",e),M=C&&C.length>0&&a.createElement("ul",{className:"".concat(P,"-item-action"),key:"actions"},C.map(function(O,N){return a.createElement("li",{key:"".concat(P,"-item-action-").concat(N)},O,N!==C.length-1&&a.createElement("em",{className:"".concat(P,"-item-action-split")}))})),W=R?"div":"li",_=a.createElement(W,(0,Z.Z)({},B,R?{}:{ref:i},{className:me()("".concat(P,"-item"),(0,E.Z)({},"".concat(P,"-item-no-flex"),!w()),$)}),k==="vertical"&&b?[a.createElement("div",{className:"".concat(P,"-item-main"),key:"content"},o,M),a.createElement("div",{className:"".concat(P,"-item-extra"),key:"extra"},b)]:[o,M,(0,pt.Tm)(b,{key:"extra"})]);return R?a.createElement(dt.Z,{ref:i,flex:1,style:A},_):_},Je=(0,a.forwardRef)(ft);Je.Meta=mt;var gt=Je,vt=function(t,r){var i={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(i[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(i[e[o]]=t[e[o]]);return i},ge=a.createContext({}),jt=ge.Consumer;function Qe(t){var r,i=t.pagination,e=i===void 0?!1:i,o=t.prefixCls,C=t.bordered,b=C===void 0?!1:C,$=t.split,A=$===void 0?!0:$,B=t.className,x=t.children,R=t.itemLayout,k=t.loadMore,d=t.grid,q=t.dataSource,D=q===void 0?[]:q,w=t.size,P=t.header,M=t.footer,W=t.loading,_=W===void 0?!1:W,O=t.rowKey,N=t.renderItem,F=t.locale,te=vt(t,["pagination","prefixCls","bordered","split","className","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),re=e&&(0,at.Z)(e)==="object"?e:{},Ne=a.useState(re.defaultCurrent||1),se=(0,Ye.Z)(Ne,2),je=se[0],$e=se[1],De=a.useState(re.defaultPageSize||10),ze=(0,Ye.Z)(De,2),Le=ze[0],s=ze[1],l=a.useContext(fe.E_),p=l.getPrefixCls,h=l.renderEmpty,c=l.direction,U={current:1,total:0},I=function(S){return function(V,z){$e(V),s(z),e&&e[S]&&e[S](V,z)}},G=I("onChange"),Y=I("onShowSizeChange"),ne=function(S,V){if(!N)return null;var z;return typeof O=="function"?z=O(S):O?z=S[O]:z=S.key,z||(z="list-item-".concat(V)),a.createElement(a.Fragment,{key:z},N(S,V))},qe=function(){return!!(k||e||M)},Ot=function(S,V){return a.createElement("div",{className:"".concat(S,"-empty-text")},F&&F.emptyText||V("List"))},y=p("list",o),ee=_;typeof ee=="boolean"&&(ee={spinning:ee});var Me=ee&&ee.spinning,le="";switch(w){case"large":le="lg";break;case"small":le="sm";break;default:break}var Tt=me()(y,(r={},(0,E.Z)(r,"".concat(y,"-vertical"),R==="vertical"),(0,E.Z)(r,"".concat(y,"-").concat(le),le),(0,E.Z)(r,"".concat(y,"-split"),A),(0,E.Z)(r,"".concat(y,"-bordered"),b),(0,E.Z)(r,"".concat(y,"-loading"),Me),(0,E.Z)(r,"".concat(y,"-grid"),!!d),(0,E.Z)(r,"".concat(y,"-something-after-last-item"),qe()),(0,E.Z)(r,"".concat(y,"-rtl"),c==="rtl"),r),B),T=(0,Z.Z)((0,Z.Z)((0,Z.Z)({},U),{total:D.length,current:je,pageSize:Le}),e||{}),_e=Math.ceil(T.total/T.pageSize);T.current>_e&&(T.current=_e);var et=e?a.createElement("div",{className:"".concat(y,"-pagination")},a.createElement(ut.Z,(0,Z.Z)({},T,{onChange:G,onShowSizeChange:Y}))):null,Ge=(0,K.Z)(D);e&&D.length>(T.current-1)*T.pageSize&&(Ge=(0,K.Z)(D).splice((T.current-1)*T.pageSize,T.pageSize));var kt=Object.keys(d||{}).some(function(u){return["xs","sm","md","lg","xl","xxl"].includes(u)}),tt=(0,ot.Z)(kt),oe=a.useMemo(function(){for(var u=0;u<Ve.c4.length;u+=1){var S=Ve.c4[u];if(tt[S])return S}},[tt]),wt=a.useMemo(function(){if(!!d){var u=oe&&d[oe]?d[oe]:d.column;if(u)return{width:"".concat(100/u,"%"),maxWidth:"".concat(100/u,"%")}}},[d==null?void 0:d.column,oe]),Ke=Me&&a.createElement("div",{style:{minHeight:53}});if(Ge.length>0){var rt=Ge.map(function(u,S){return ne(u,S)});Ke=d?a.createElement(lt.Z,{gutter:d.gutter},a.Children.map(rt,function(u){return a.createElement("div",{key:u==null?void 0:u.key,style:wt},u)})):a.createElement("ul",{className:"".concat(y,"-items")},rt)}else!x&&!Me&&(Ke=Ot(y,h||st.Z));var ue=T.position||"bottom",Nt=a.useMemo(function(){return{grid:d,itemLayout:R}},[JSON.stringify(d),R]);return a.createElement(ge.Provider,{value:Nt},a.createElement("div",(0,Z.Z)({className:Tt},te),(ue==="top"||ue==="both")&&et,P&&a.createElement("div",{className:"".concat(y,"-header")},P),a.createElement(ct.Z,(0,Z.Z)({},ee),Ke,x),M&&a.createElement("div",{className:"".concat(y,"-footer")},M),k||(ue==="bottom"||ue==="both")&&et))}Qe.Item=gt;var Xe=Qe,$t=n(63185),ht=n(9676),Dt=n(34792),yt=n(48086),X=n(2824),St=n(49101),Ct=n(16894),zt=n(30381),xt=n(11849),ie=n(48971);function Lt(t){return ve.apply(this,arguments)}function ve(){return ve=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/Kitchen/api/integral/add",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),ve.apply(this,arguments)}function Zt(t){return he.apply(this,arguments)}function he(){return he=(0,L.Z)((0,m.Z)().mark(function t(r){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,ie.WY)("/Kitchen/api/integral/edit",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),he.apply(this,arguments)}function Et(t){return ye.apply(this,arguments)}function ye(){return ye=(0,L.Z)((0,m.Z)().mark(function t(r){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,ie.WY)("/kitchen/api/integral/getpage",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),ye.apply(this,arguments)}function Mt(t){return Se.apply(this,arguments)}function Se(){return Se=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:debugger;return e.abrupt("return",request("/kitchen/api/integraltype/add",{method:"POST",data:r}));case 2:case"end":return e.stop()}},t)})),Se.apply(this,arguments)}function Gt(t){return Ce.apply(this,arguments)}function Ce(){return Ce=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:debugger;return e.abrupt("return",request("/kitchen/api/integraltype/edit",{method:"POST",data:r}));case 2:case"end":return e.stop()}},t)})),Ce.apply(this,arguments)}function Kt(t){return xe.apply(this,arguments)}function xe(){return xe=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/integraltype/getpage",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),xe.apply(this,arguments)}function At(t){return Ze.apply(this,arguments)}function Ze(){return Ze=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/integralrule/add",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),Ze.apply(this,arguments)}function Bt(t){return Ee.apply(this,arguments)}function Ee(){return Ee=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/api/integralrule/edit",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),Ee.apply(this,arguments)}function Wt(t){return be.apply(this,arguments)}function be(){return be=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/integralrule/edit",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),be.apply(this,arguments)}function Ft(t){return Re.apply(this,arguments)}function Re(){return Re=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/integralrule/getpage",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),Re.apply(this,arguments)}function Ut(t){return Pe.apply(this,arguments)}function Pe(){return Pe=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goods-type/goods-types",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),Pe.apply(this,arguments)}function Yt(t){return Ie.apply(this,arguments)}function Ie(){return Ie=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/goods-type/big-goods-types",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),Ie.apply(this,arguments)}function Vt(t){return Oe.apply(this,arguments)}function Oe(){return Oe=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen/api/Device/StoreDeviceTree",{data:_objectSpread({},r)}));case 1:case"end":return e.stop()}},t)})),Oe.apply(this,arguments)}function bt(t){return Te.apply(this,arguments)}function Te(){return Te=(0,L.Z)((0,m.Z)().mark(function t(r){return(0,m.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,ie.WY)("/kitchen/api/Device/StoreList",{data:(0,xt.Z)({},r)}));case 1:case"end":return e.stop()}},t)})),Te.apply(this,arguments)}function Ht(){return ke.apply(this,arguments)}function ke(){return ke=_asyncToGenerator(_regeneratorRuntime().mark(function t(){return _regeneratorRuntime().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",request("/kitchen/api/integralrule/addinteg",{}));case 1:case"end":return i.stop()}},t)})),ke.apply(this,arguments)}function Rt(){return we.apply(this,arguments)}function we(){return we=(0,L.Z)((0,m.Z)().mark(function t(){return(0,m.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,ie.WY)("/kitchen/api/integralrule/getall",{}));case 1:case"end":return i.stop()}},t)})),we.apply(this,arguments)}function Jt(t){var r="";switch(t){case 1:r="priceIds";break;case 2:r="bigIds";break;case 3:r="smallIds";break;case 4:r="countIds";break;case 5:r="personsIds";break;case 6:r="numberIds";break;default:break}return r}var v=n(85893),Pt=function(){var r=function(l,p){console.log(l[0]),re(l[0]),d(p.node.type)},i=(0,a.useState)(),e=(0,X.Z)(i,2),o=e[0],C=e[1],b=(0,a.useState)([]),$=(0,X.Z)(b,2),A=$[0],B=$[1],x=(0,a.useState)(),R=(0,X.Z)(x,2),k=R[0],d=R[1],q=(0,a.useState)([]),D=(0,X.Z)(q,2),w=D[0],P=D[1],M=(0,a.useState)(!1),W=(0,X.Z)(M,2),_=W[0],O=W[1],N=(0,a.useState)(),F=(0,X.Z)(N,2),te=F[0],re=F[1],Ne=[{title:"\u89C4\u5219id",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u95E8\u5E97\u540D\u79F0",dataIndex:"orgName"}],se=function(){O(!0)},je=function(){O(!1)};function $e(){Zt({thisRuleid:te,thisRuletype:k,orglist:w}).then(function(s){s.data==!0&&yt.default.success("\u914D\u7F6E\u6210\u529F"),re(te)})}function De(s,l,p){var h=0;for(var c in s)if(s[c][l]==p){h=c;break}s.splice(h,1)}var ze=(0,a.useRef)();(0,a.useEffect)(function(){var s={current:1,pagesize:30};bt(s).then(function(l){C(l.data)}),Rt({current:0,pagesize:0}).then(function(l){var p=[],h=[];(l.data.allCommon||[]).map(function(c,U){h.push({title:c.name,key:c.id,parentId:0,type:0,children:[]})}),p.push({title:"\u901A\u7528\u89C4\u5219",key:0,parentId:0,type:0,children:h}),(l.data.allChild||[]).map(function(c,U){var I=Le(c.typeId),G=[];c.child.map(function(Y,ne){G.push({title:Y.ruleRemark,key:Y.id,parentId:c.typeId,type:c.typeId,children:[]})}),p.push({title:I,key:c.typeId,parentId:0,type:c.typeId,children:G})}),B(p)})},[]);function Le(s){var l="\u672A\u5B9A\u4E49\u89C4\u5219";switch(s){case 1:l="\u6309\u6D88\u8D39\u91D1\u989D\u79EF\u5206\u89C4\u5219";break;case 2:l="\u6309\u5927\u7C7B\u79EF\u5206\u89C4\u5219";break;case 3:l="\u6309\u5C0F\u7C7B\u79EF\u5206\u89C4\u5219";break;case 4:l="\u6309\u6D88\u8D39\u6B21\u6570\u79EF\u5206\u89C4\u5219";break;case 5:l="\u6309\u6D88\u8D39\u4EBA\u6570\u79EF\u5206\u89C4\u5219";break;case 6:l="\u6309\u51FA\u54C1\u6570\u91CF\u79EF\u5206\u89C4\u5219";break;default:break}return l}return(0,v.jsxs)("div",{children:[(0,v.jsxs)(H.Z,{title:"\u9009\u62E9\u95E8\u5E97",placement:"right",onClose:je,visible:_,destroyOnClose:!0,children:[(0,v.jsx)(Xe,{style:{height:"80%"},children:(o||[]).map(function(s,l){return(0,v.jsx)(Xe.Item,{children:(0,v.jsx)(ht.Z,{defaultChecked:w.filter(function(p){return p.id==s.key}).length>0,onChange:function(h,c){var U=w.filter(function(I){return I.id==s.key});h.target.checked==!0&&U.length==0&&w.push({id:s.key,name:s.title}),h.target.checked==!1&&U.length>0&&De(w,"id",s.key),console.log(w)},children:(0,v.jsx)("a",{href:"#",children:s.title})},s.key)})})}),(0,v.jsx)(f.Z,{onClick:$e,children:"\u786E\u5B9A"})]}),(0,v.jsx)(Ct.ZP,{columns:Ne,search:!1,style:{width:"100%",float:"right"},tableRender:function(l,p){return(0,v.jsxs)("div",{style:{display:"flex",width:"100%"},children:[(0,v.jsx)(de.Z,{title:"\u89C4\u5219\u5217\u8868",bordered:!1,style:{width:"19%",float:"left"},children:(0,v.jsx)(pe.Z,{checkable:!1,treeData:A,onSelect:r})}),(0,v.jsx)("div",{style:{flex:1},children:p})]})},toolBarRender:function(){return[(0,v.jsxs)(f.Z,{type:"primary",onClick:se,children:[(0,v.jsx)(St.Z,{})," \u6DFB\u52A0\u95E8\u5E97"]},"primary")]},params:{ruleId:te,ruleType:k},request:function(){var s=(0,L.Z)((0,m.Z)().mark(function l(p){var h,c;return(0,m.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return h=[],c=0,I.next=4,Et(p).then(function(G){h=G.data.data,c=G.data.total;var Y=[];G.data.data.map(function(ne,qe){Y.push({id:ne.orgId,name:ne.orgName})}),P(Y)});case 4:return I.abrupt("return",{data:h,success:!0,total:c});case 5:case"end":return I.stop()}},l)}));return function(l){return s.apply(this,arguments)}}()})]})},It=Pt},34952:function(nt,ae,n){"use strict";var m=n(22122),L=n(15105),ce=n(67294),de=function(g,H){var J={};for(var f in g)Object.prototype.hasOwnProperty.call(g,f)&&H.indexOf(f)<0&&(J[f]=g[f]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var j=0,f=Object.getOwnPropertySymbols(g);j<f.length;j++)H.indexOf(f[j])<0&&Object.prototype.propertyIsEnumerable.call(g,f[j])&&(J[f[j]]=g[f[j]]);return J},Ae={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},pe=ce.forwardRef(function(g,H){var J=function(K){var Z=K.keyCode;Z===L.Z.ENTER&&K.preventDefault()},f=function(K){var Z=K.keyCode,E=g.onClick;Z===L.Z.ENTER&&E&&E()},j=g.style,Be=g.noStyle,We=g.disabled,Fe=de(g,["style","noStyle","disabled"]),Q={};return Be||(Q=(0,m.Z)({},Ae)),We&&(Q.pointerEvents="none"),Q=(0,m.Z)((0,m.Z)({},Q),j),ce.createElement("div",(0,m.Z)({role:"button",tabIndex:0,ref:H},Fe,{onKeyDown:J,onKeyUp:f,style:Q}))});ae.Z=pe}}]);