|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8838],{71986:function(L,D,e){"use strict";e.r(D);var c=e(18106),m=e(95562),g=e(58024),u=e(91894),te=e(57663),P=e(71577),ae=e(47673),v=e(4107),E=e(39428),f=e(3182),l=e(2824),ne=e(14965),x=e(91774),F=e(28790),b=e(16894),i=e(67294),N=e(30381),n=e.n(N),O=e(64008),t=e(85893),w=x.Z.RangePicker,H=function(){var $=(0,i.useState)(1),B=(0,l.Z)($,2),h=B[0],k=B[1],z=(0,i.useState)(""),S=(0,l.Z)(z,2),C=S[0],p=S[1],G=(0,i.useState)(""),I=(0,l.Z)(G,2),R=I[0],y=I[1],J=(0,i.useState)(""),A=(0,l.Z)(J,2),T=A[0],U=A[1],Q=(0,i.useState)([]),W=(0,l.Z)(Q,2),V=W[0],Y=W[1],X=(0,i.useState)([n()(n()(new Date(Date.now())).format("YYYY-MM-DD 00:00:00")),n()(n()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))]),Z=(0,l.Z)(X,2),M=Z[0],j=Z[1];(0,i.useEffect)(function(){K()},[h]);var K=function(){var r=(0,f.Z)((0,E.Z)().mark(function a(){var s;return(0,E.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(s=[],h!=1){_.next=5;break}return _.next=4,O.Z.getBatchingUseSummary({batchingName:C,startTime:M[0]._i,endTime:M[1]._i,storeName:R,deviceName:T});case 4:s=_.sent;case 5:Y(s.data);case 6:case"end":return _.stop()}},a)}));return function(){return r.apply(this,arguments)}}(),q=function(){var r=(0,f.Z)((0,E.Z)().mark(function a(){var s,d,_;return(0,E.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(p(""),y(""),U(""),s=n()(new Date(Date.now())).format("YYYY-MM-DD 00:00:00"),d=n()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"),j([n()(s),n()(d)]),_=[],h!=1){o.next=11;break}return o.next=10,O.Z.getBatchingUseSummary({batchingName:"",startTime:s,endTime:d,storeName:"",deviceName:""});case 10:_=o.sent;case 11:Y(_.data);case 12:case"end":return o.stop()}},a)}));return function(){return r.apply(this,arguments)}}(),ee=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0},{title:"\u7269\u6599\u540D\u79F0",dataIndex:"batchingName",hideInSearch:!0,ellipsis:!0},{title:"\u95E8\u5E97\u540D\u79F0",dataIndex:"storeName",hideInSearch:!0,ellipsis:!0},{title:"\u8BBE\u5907\u540D\u79F0",dataIndex:"deviceName",hideInSearch:!0,ellipsis:!0},{title:"\u4F7F\u7528\u6570\u91CF",dataIndex:"useWeight",hideInSearch:!0,ellipsis:!0}];return(0,t.jsxs)(F.ZP,{header:{title:"",breadcrumb:{}},children:[(0,t.jsxs)(u.Z,{style:{marginBottom:20},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",width:"100%"},children:[(0,t.jsx)("span",{children:"\u7269\u6599\u540D\u79F0:"}),(0,t.jsx)(v.Z,{placeholder:"\u8BF7\u8F93\u5165\u7269\u6599\u540D\u79F0",style:{width:"15%",margin:10},value:C,onChange:function(a){p(a.target.value)}}),(0,t.jsx)("span",{children:"\u95E8\u5E97\u540D\u79F0:"}),(0,t.jsx)(v.Z,{placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u540D\u79F0",style:{width:"15%",margin:10},value:R,onChange:function(a){y(a.target.value)}}),(0,t.jsx)("span",{children:"\u8BBE\u5907\u540D\u79F0:"}),(0,t.jsx)(v.Z,{placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0",style:{width:"15%",margin:10},value:T,onChange:function(a){U(a.target.value)}})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",width:"100%"},children:[(0,t.jsx)("span",{children:"\u4F7F\u7528\u65F6\u95F4:"}),(0,t.jsx)(w,{showTime:!0,style:{width:"25%",margin:10},value:M,onChange:function(a,s){var d=[n()(n()(new Date(s[0])).format("YYYY-MM-DD HH:mm:ss")),n()(n()(new Date(s[1])).format("YYYY-MM-DD HH:mm:ss"))];j(d)}}),(0,t.jsx)(P.Z,{onClick:function(){q()},children:"\u91CD\u7F6E"}),(0,t.jsx)(P.Z,{type:"primary",style:{marginLeft:10},onClick:function(){K()},children:"\u67E5\u8BE2"})]})]}),(0,t.jsx)(u.Z,{children:(0,t.jsx)(m.Z,{tabPosition:"left",value:h,onChange:function(a){k(a)},items:new Array(1).fill(null).map(function(r,a){var s=String(a+1);return{label:"\u7269\u6599\u4F7F\u7528\u6C47\u603B",key:s,children:(0,t.jsx)(b.ZP,{headerTitle:"\u7269\u6599\u4F7F\u7528\u6C47\u603B",rowKey:"id",pagination:{defaultPageSize:10},search:!1,toolBarRender:!1,columns:ee,dataSource:V})}})})})]})};D.default=H},64008:function(L,D,e){"use strict";var c=e(48971),m=e(96690);D.Z={getRecipeUseDetail:function(u){return(0,c.WY)((0,m.w)()+"/api/report/getRecipeUseDetail",{method:"Post",data:u})},getRecipeUseSummary:function(u){return(0,c.WY)((0,m.w)()+"/api/report/getRecipeUseSummary",{method:"Post",data:u})},getBatchingUseSummary:function(u){return(0,c.WY)((0,m.w)()+"/api/report/getBatchingUseSummary",{method:"Post",data:u})}}}}]);
|