Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

p__stockManager__stockReports.d180d95c.async.js 4.6 KiB

1 год назад
1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6223,7975,1322],{99047:function(gt,w,t){"use strict";t.r(w),t.d(w,{default:function(){return J}});var c=t(39428),g=t(3182),Zt=t(57663),$=t(71577),l=t(2824),M=t(90631),u=t(67294),Y=t(78009),B=t(16894),F=t(53667),G=t.n(F),z=t(11849),I=t(48971);function V(s){return x.apply(this,arguments)}function x(){return x=(0,g.Z)((0,c.Z)().mark(function s(d){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,I.WY)("/kitchen/api/stock-item-application/stock-page",{method:"Post",data:d}));case 1:case"end":return e.stop()}},s)})),x.apply(this,arguments)}function b(s){return E.apply(this,arguments)}function E(){return E=(0,g.Z)((0,c.Z)().mark(function s(d){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,I.WY)("/kitchen/api/product/product-list",{method:"Post",data:d}));case 1:case"end":return e.stop()}},s)})),E.apply(this,arguments)}function H(s){return P.apply(this,arguments)}function P(){return P=(0,g.Z)((0,c.Z)().mark(function s(d){return(0,c.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,I.WY)("/kitchen/api\u200B/sysOrg\u200B/page",{method:"GET",data:d}));case 1:case"end":return e.stop()}},s)})),P.apply(this,arguments)}function K(s,d){return R.apply(this,arguments)}function R(){return R=(0,g.Z)((0,c.Z)().mark(function s(d,S){return(0,c.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.abrupt("return",(0,I.WY)("/kitchen/api/unit/uint-list",{method:"GET",params:(0,z.Z)({},d)}));case 1:case"end":return y.stop()}},s)})),R.apply(this,arguments)}var Z=t(85893),Q=function(){var d=(0,u.useState)(!1),S=(0,l.Z)(d,2),e=S[0],y=S[1],X=(0,u.useState)(!1),C=(0,l.Z)(X,2),yt=C[0],q=C[1],_=(0,u.useRef)(),tt=(0,u.useState)(),L=(0,l.Z)(tt,2),It=L[0],et=L[1],at=(0,u.useState)([]),T=(0,l.Z)(at,2),xt=T[0],nt=T[1],rt=(0,u.useState)([]),D=(0,l.Z)(rt,2),O=D[0],ut=D[1],st=(0,u.useState)(),j=(0,l.Z)(st,2),it=j[0],ot=j[1],ct=(0,u.useState)([]),A=(0,l.Z)(ct,2),Et=A[0],lt=A[1],dt=(0,u.useState)(),W=(0,l.Z)(dt,2),Pt=W[0],ht=W[1],ft=(0,u.useState)([]),N=(0,l.Z)(ft,2),Rt=N[0],pt=N[1],vt=(0,u.useState)(),U=(0,l.Z)(vt,2),kt=U[0],mt=U[1];(0,u.useEffect)(function(){var m=function(a){var p=b({current:1,pageSize:1e3}).then(function(n){var r={},v=[];n.data.data.forEach(function(f){v.push({text:f.name,id:f.id}),r[f.id]={text:f.name}}),pt(v),ht(r)})},i=function(a){var p=H({current:1,pageSize:1e3}).then(function(n){var r={},v=[];n.data.data.forEach(function(f){v.push({text:f.name,id:f.id}),r[f.id]={text:f.name}}),lt(v),ot(r)})},o=function(a){var p=K().then(function(n){var r={};n.data.forEach(function(v){r[v.id]={text:v.name}}),mt(r)})};m(),i(),o()},[]);function St(){var m=O.ReqDetailList,i={},o=[];k.map(function(a,p){p>1&&o.push(a)}),i.fileName="\u5E93\u5B58\u62A5\u8868",i.datas=[{sheetData:O.map(function(a){var p={};return k.forEach(function(n,r){r>1&&(p[n.dataIndex]=a[n.dataIndex])}),p}),sheetName:"\u5E93\u5B58\u62A5\u8868",sheetFilter:o.map(function(a){return a.dataIndex}),sheetHeader:o.map(function(a){return a.title}),columnWidths:o.map(function(){return 10})}];var h=new(G())(i);h.saveExcel()}var k=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(i,o){return(0,Z.jsx)("a",{onClick:function(){et(o),q(!0)},children:i})}},{title:"\u673A\u6784\u540D\u79F0",dataIndex:"orgId",hideInTable:!0,valueEnum:it},{title:"\u6536\u8D27\u673A\u6784",hideInSearch:!0,dataIndex:"orgName"},{title:"\u7269\u6599\u540D\u79F0",hideInSearch:!0,dataIndex:"productName"},{title:"\u5E93\u5B58\u6570\u91CF",dataIndex:"stockQty",valueType:"textarea",hideInSearch:!0},{title:"\u7269\u6599\u5355\u4F4D",hideInSearch:!0,dataIndex:"uintName"},{title:"\u7269\u6599\u7F16\u7801",dataIndex:"code",valueType:"textarea",hideInSearch:!0}];return(0,Z.jsx)(Y.ZP,{children:(0,Z.jsx)(B.ZP,{headerTitle:"\u7269\u6599\u5165\u5E93",actionRef:_,rowKey:"id",search:{labelWidth:120},columns:k,toolBarRender:function(){return[(0,Z.jsxs)($.Z,{type:"primary",onClick:function(){return St()},children:[(0,Z.jsx)(M.Z,{})," \u5BFC\u51FA"]},"primary")]},request:function(){var m=(0,g.Z)((0,c.Z)().mark(function i(o){var h,a;return(0,c.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return h=[],a=0,n.next=4,V(o).then(function(r){h=r.data.data,a=r.data.total,ut(r.data.data)});case 4:return n.abrupt("return",{data:h,success:!0,total:a});case 5:case"end":return n.stop()}},i)}));return function(i){return m.apply(this,arguments)}}(),rowSelection:{onChange:function(i,o){nt(o)}}})})},J=Q}}]);