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 line
2.7 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9359,1322],{73965:function(Y,p,e){"use strict";e.r(p),e.d(p,{default:function(){return E}});var S=e(32059),$=e(43358),P=e(34041),d=e(39428),f=e(3182),v=e(2824),s=e(67294),R=e(78009),Z=e(16894),T=e(48971),y={getPaperCouponReport:function(h){return(0,T.WY)("/kitchen/api/goodscoupon/getGoodscouponReport",{method:"Post",data:h})},GetPaperCouponType:function(){return(0,T.WY)("/kitchen/api/papercoupon/getPaperCouponType",{method:"GET"})}},c=e(85893),A=function(){var h=(0,s.useState)(),I=(0,v.Z)(h,2),G=I[0],j=I[1],w=(0,s.useState)(),g=(0,v.Z)(w,2),M=g[0],x=g[1],D=(0,s.useRef)();(0,s.useEffect)(function(){F()},[]);var F=function(){var r=(0,f.Z)((0,d.Z)().mark(function t(){var n,u;return(0,d.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,y.GetPaperCouponType();case 2:n=a.sent,u=[],n.data.map(function(o){return u.push({label:o.value,value:o.key})}),j(u);case 6:case"end":return a.stop()}},t)}));return function(){return r.apply(this,arguments)}}(),N=function(t){console.log(t),x(t)},W=[{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:"\u5546\u54C1\u540D\u79F0",dataIndex:"goodsName",hideInTable:!1,hideInSearch:!0,width:160},{title:"\u4F18\u60E0\u5E73\u53F0",dataIndex:"cTypeName",hideInTable:!1,width:160,renderFormItem:function(){return(0,c.jsx)(P.Z,{options:G,onChange:N,allowClear:!0})}},{title:"\u539F\u59CB\u91D1\u989D",dataIndex:"money",renderText:function(t){return"".concat(t,"\xA5")},hideInSearch:!1,width:160},{title:"\u5E73\u53F0\u91D1\u989D",dataIndex:"soureMoney",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:"\u5546\u54C1\u4F18\u60E0\u5377\u6C47\u603B\u67E5\u8BE2",actionRef:D,rowKey:"id",scroll:{x:1300},search:{labelWidth:120},onReset:function(){x("")},columns:W,request:function(){var r=(0,f.Z)((0,d.Z)().mark(function t(n,u,B){var a,o,l;return(0,d.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return a=[],o=0,console.log(n),l=(0,S.Z)({CTypeId:n.cTypeName,Money:n.money},"CTypeId",M),n.crateTimeAt&&(l.StartDateStr=n.crateTimeAt[0],l.EndDateStr=n.crateTimeAt[1]),i.next=7,y.getPaperCouponReport(l).then(function(C){a=C.data,o=C.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)}}()})})},E=A}}]);