Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

2 linhas
2.7 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9359,1322],{73965:function($,p,e){"use strict";e.r(p),e.d(p,{default:function(){return G}});var S=e(32059),K=e(43358),P=e(34041),f=e(3182),v=e(2824),R=e(94043),d=e.n(R),s=e(67294),Z=e(78009),A=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),E=function(){var h=(0,s.useState)(),g=(0,v.Z)(h,2),j=g[0],M=g[1],w=(0,s.useState)(),m=(0,v.Z)(w,2),D=m[0],x=m[1],F=(0,s.useRef)();(0,s.useEffect)(function(){N()},[]);var N=function(){var r=(0,f.Z)(d().mark(function t(){var n,u;return d().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})}),M(u);case 6:case"end":return a.stop()}},t)}));return function(){return r.apply(this,arguments)}}(),W=function(t){console.log(t),x(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:"\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:j,onChange:W,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)(Z.ZP,{children:(0,c.jsx)(A.ZP,{headerTitle:"\u5546\u54C1\u4F18\u60E0\u5377\u6C47\u603B\u67E5\u8BE2",actionRef:F,rowKey:"id",scroll:{x:1300},search:{labelWidth:120},onReset:function(){x("")},columns:B,request:function(){var r=(0,f.Z)(d().mark(function t(n,u,Y){var a,o,l;return d().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",D),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)}}()})})},G=E}}]);