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

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[212,1322],{4910:function(G,E,s){"use strict";s.r(E),s.d(E,{default:function(){return I}});var r=s(39428),p=s(3182),c=s(2824),i=s(67294),C=s(78009),k=s(16894),L=s(11849),v=s(48971);function W(h,o){return y.apply(this,arguments)}function y(){return y=(0,p.Z)((0,r.Z)().mark(function h(o,t){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,v.WY)("/kitchen/api/stockInfo/getPage",{method:"POST",data:o}));case 1:case"end":return n.stop()}},h)})),y.apply(this,arguments)}function A(h,o){return _.apply(this,arguments)}function _(){return _=(0,p.Z)((0,r.Z)().mark(function h(o,t){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,v.WY)("/kitchen/api/product-type/type-list",{method:"GET",params:(0,L.Z)({},o)}));case 1:case"end":return n.stop()}},h)})),_.apply(this,arguments)}function R(h,o){return Z.apply(this,arguments)}function Z(){return Z=(0,p.Z)((0,r.Z)().mark(function h(o,t){return(0,r.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",(0,v.WY)("/kitchen/api/unit/uint-list",{method:"GET",params:(0,L.Z)({},o)}));case 1:case"end":return n.stop()}},h)})),Z.apply(this,arguments)}var j=s(3408),S=s(85893),D=function(){var o=(0,i.useState)(!1),t=(0,c.Z)(o,2),a=t[0],n=t[1],e=(0,i.useState)(!1),w=(0,c.Z)(e,2),ae=w[0],K=w[1],x=(0,i.useRef)(),N=(0,i.useState)(),B=(0,c.Z)(N,2),ue=B[0],F=B[1],V=(0,i.useState)(),$=(0,c.Z)(V,2),se=$[0],H=$[1],Q=(0,i.useState)(),M=(0,c.Z)(Q,2),ie=M[0],z=M[1],J=(0,i.useState)([]),U=(0,c.Z)(J,2),le=U[0],X=U[1],q=(0,i.useState)([]),Y=(0,c.Z)(q,2),ee=Y[0],te=Y[1];(0,i.useEffect)(function(){var b=function(){var f=(0,p.Z)((0,r.Z)().mark(function d(T){var u,l;return(0,r.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,R();case 2:u=m.sent,l=[],u.data.length>0&&u.data.forEach(function(g){l.push({stockuint:g.id,text:g.name,value:g.id,label:g.name})}),H(l);case 6:case"end":return m.stop()}},d)}));return function(T){return f.apply(this,arguments)}}(),O=function(){var f=(0,p.Z)((0,r.Z)().mark(function d(T){var u,l;return(0,r.Z)().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,A();case 2:u=m.sent,l=[],u.data.length>0&&u.data.forEach(function(g){l.push({typeid:g.id,text:g.name,value:g.id,label:g.name})}),z(l);case 6:case"end":return m.stop()}},d)}));return function(T){return f.apply(this,arguments)}}();function P(){(0,j.FM)().then(function(f){X(f.data);var d={};T(f.data);function T(u){for(var l in u)d[u[l].value]={text:u[l].title},u[l].children&&T(u[l].children)}te(d)})}P(),b(),O()},[]);var re=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(O,P){return(0,S.jsx)("a",{onClick:function(){F(P),K(!0)},children:O})}},{title:"\u6536\u8D27\u673A\u6784",dataIndex:"orgId",hideInTable:!0,valueEnum:ee},{title:"\u6536\u8D27\u673A\u6784",hideInSearch:!0,dataIndex:"orgName"},{title:"\u7269\u6599\u540D\u79F0",hideInSearch:!0,dataIndex:"productName"},{title:"\u7269\u6599\u7F16\u7801",hideInSearch:!0,dataIndex:"code"},{title:"\u7269\u6599\u5355\u4F4D",hideInSearch:!0,dataIndex:"uintName"},{title:"\u5E93\u5B58\u6570\u91CF",hideInSearch:!0,dataIndex:"stockQty"},{title:"\u7269\u6599\u89C4\u683C",hideInSearch:!0,dataIndex:"specs"}];return(0,S.jsx)(C.ZP,{children:(0,S.jsx)(k.ZP,{headerTitle:"\u5E93\u5B58\u67E5\u8BE2",actionRef:x,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[]},request:function(){var b=(0,p.Z)((0,r.Z)().mark(function O(P){var f,d;return(0,r.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return f=[],d=0,u.next=4,W(P).then(function(l){f=l.data.data,d=l.data.total});case 4:return u.abrupt("return",{data:f,success:!0,total:d});case 5:case"end":return u.stop()}},O)}));return function(O){return b.apply(this,arguments)}}(),columns:re,rowSelection:{onChange:function(O,P){return setSelectedRows(P)}}})})},I=D},3408:function(G,E,s){"use strict";s.d(E,{lM:function(){return C},IH:function(){return L},mm:function(){return A},eP:function(){return R},FM:function(){return D},h_:function(){return h}});var r=s(39428),p=s(11849),c=s(3182),i=s(48971);function C(t,a){return k.apply(this,arguments)}function k(){return k=(0,c.Z)((0,r.Z)().mark(function t(a,n){return(0,r.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.abrupt("return",(0,i.WY)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,p.Z)({},a)}));case 1:case"end":return w.stop()}},t)})),k.apply(this,arguments)}function L(t){return v.apply(this,arguments)}function v(){return v=(0,c.Z)((0,r.Z)().mark(function t(a){return(0,r.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.WY)("/kitchen/api/sysOrg/add",{method:"POST",data:(0,p.Z)({},a)}));case 1:case"end":return e.stop()}},t)})),v.apply(this,arguments)}function W(t){return y.apply(this,arguments)}function y(){return y=_asyncToGenerator(_regeneratorRuntime().mark(function t(a){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("\u200B/kitchen/api\u200B/sysOrg\u200B/list",{method:"POST",data:_objectSpread({},a)}));case 1:case"end":return e.stop()}},t)})),y.apply(this,arguments)}function A(t){return _.apply(this,arguments)}function _(){return _=(0,c.Z)((0,r.Z)().mark(function t(a){return(0,r.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/delete",{method:"POST",data:(0,p.Z)({},a)}));case 1:case"end":return e.stop()}},t)})),_.apply(this,arguments)}function R(t){return Z.apply(this,arguments)}function Z(){return Z=(0,c.Z)((0,r.Z)().mark(function t(a){return(0,r.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/edit",{method:"POST",data:(0,p.Z)({},a)}));case 1:case"end":return e.stop()}},t)})),Z.apply(this,arguments)}function j(t){return S.apply(this,arguments)}function S(){return S=_asyncToGenerator(_regeneratorRuntime().mark(function t(a){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen\u200B/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},a)}));case 1:case"end":return e.stop()}},t)})),S.apply(this,arguments)}function D(t){return I.apply(this,arguments)}function I(){return I=(0,c.Z)((0,r.Z)().mark(function t(a){return(0,r.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,p.Z)({},a)}));case 1:case"end":return e.stop()}},t)})),I.apply(this,arguments)}function h(t){return o.apply(this,arguments)}function o(){return o=(0,c.Z)((0,r.Z)().mark(function t(a){return(0,r.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,i.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/AddAuthCode?orgid="+a,{method:"Get"}));case 1:case"end":return e.stop()}},t)})),o.apply(this,arguments)}}}]);