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