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

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