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