(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4126,1322],{32075:function(Y,h,e){"use strict";e.r(h),e.d(h,{default:function(){return A}});var x=e(32059),$=e(43358),P=e(34041),s=e(39428),f=e(3182),v=e(2824),l=e(67294),R=e(78009),Z=e(16894),y=e(48971),T={getPaperCouponReport:function(p){return(0,y.WY)("/kitchen/api/papercoupon/getPaperCouponReport",{method:"Post",data:p})},GetPaperCouponType:function(){return(0,y.WY)("/kitchen/api/papercoupon/getPaperCouponType",{method:"GET"})}},c=e(85893),E=function(){var p=(0,l.useState)(),g=(0,v.Z)(p,2),j=g[0],G=g[1],D=(0,l.useState)(),I=(0,v.Z)(D,2),F=I[0],C=I[1],M=(0,l.useRef)();(0,l.useEffect)(function(){W()},[]);var W=function(){var r=(0,f.Z)((0,s.Z)().mark(function t(){var n,u;return(0,s.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,T.GetPaperCouponType();case 2:n=a.sent,u=[],n.data.map(function(o){return u.push({label:o.value,value:o.key})}),G(u);case 6:case"end":return a.stop()}},t)}));return function(){return r.apply(this,arguments)}}(),w=function(t){console.log(t),C(t)},B=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u65F6\u95F4",dataIndex:"crateTimeAt",hideInSearch:!1,valueType:"dateTimeRange",hideInTable:!0,width:160},{title:"\u6807\u9898",dataIndex:"title",hideInTable:!1,hideInSearch:!0},{title:"\u7C7B\u578B",dataIndex:"cTypeName",hideInTable:!1,width:160,renderFormItem:function(){return(0,c.jsx)(P.Z,{options:j,onChange:w,allowClear:!0})}},{title:"\u91D1\u989D",dataIndex:"money",renderText:function(t){return"".concat(t,"\xA5")},hideInSearch:!1,width:160},{title:"\u6570\u91CF",dataIndex:"allcount",hideInSearch:!0,width:160}];return(0,c.jsx)(R.ZP,{children:(0,c.jsx)(Z.ZP,{headerTitle:"\u4F18\u60E0\u5377\u6C47\u603B\u67E5\u8BE2",actionRef:M,rowKey:"id",scroll:{x:1300},search:{labelWidth:120},onReset:function(){C("")},columns:B,request:function(){var r=(0,f.Z)((0,s.Z)().mark(function t(n,u,N){var a,o,d;return(0,s.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return a=[],o=0,console.log(n),d=(0,x.Z)({CTypeId:n.cTypeName,Money:n.money},"CTypeId",F),n.crateTimeAt&&(d.StartDateStr=n.crateTimeAt[0],d.EndDateStr=n.crateTimeAt[1]),i.next=7,T.getPaperCouponReport(d).then(function(S){a=S.data,o=S.data.length});case 7:return i.abrupt("return",{data:a,success:!0,total:o});case 8:case"end":return i.stop()}},t)}));return function(t,n,u){return r.apply(this,arguments)}}()})})},A=E}}]);
