Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

2 řádky
3.5 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[476,7975,1322],{30407:function(B,x,e){"use strict";e.r(x),e.d(x,{default:function(){return D}});var i=e(39428),h=e(3182),f=e(2824),c=e(67294),E=e(30381),v=e.n(E),Z=e(78009),m=e(53779),y=e(48971);function w(u){return p.apply(this,arguments)}function p(){return p=(0,h.Z)((0,i.Z)().mark(function u(T){return(0,i.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,y.WY)("/kitchen/api/coupon/customerpage",{method:"POST",data:T}));case 1:case"end":return d.stop()}},u)})),p.apply(this,arguments)}function Y(u){return(0,y.WY)("/kitchen/api/coupon/couponlog/".concat(u),{method:"GET",data:u})}var r=e(85893),j=function(T){var I=(0,c.useRef)(),d=(0,c.useState)([]),g=(0,f.Z)(d,2),P=g[0],k=g[1],K=(0,c.useState)([]),R=(0,f.Z)(K,2),M=R[0],S=R[1],W=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u4F18\u60E0\u5377",dataIndex:"couponTitle",valueType:"textarea"},{title:"\u5BA2\u6237\u7535\u8BDD",dataIndex:"phone",valueType:"textarea"},{title:"\u5BA2\u6237Id",dataIndex:"customerId",valueType:"textarea",search:!1},{title:"\u8BA2\u5355\u53F7",dataIndex:"orderId",valueType:"textarea"},{title:"\u4F7F\u7528\u5E97\u94FA",dataIndex:"storeName",valueType:"textarea",search:!1},{title:"\u9886\u53D6\u65B9\u5F0F",key:"receiveType",dataIndex:"receiveType",valueEnum:{1:{text:"\u5C0F\u7A0B\u5E8F\u9886\u53D6"},2:{text:"\u7EBF\u4E0B\u95E8\u5E97\u626B\u7801"},3:{text:"\u81EA\u52A8\u4E0B\u53D1"},4:{text:"\u597D\u53CB\u5206\u4EAB\u9886\u53D6"},5:{text:"\u6307\u5B9A\u53D1\u653E"},6:{text:"\u53C2\u52A0\u6D3B\u52A8"}}},{title:"\u72B6\u6001",key:"state",dataIndex:"state",valueEnum:{1:{text:"\u672A\u4F7F\u7528",status:"Warning"},2:{text:"\u5DF2\u4F7F\u7528",status:"Success"},3:{text:"\u5360\u7528\u4E2D",status:"Processing"},4:{text:"\u5931\u6548",status:"Default"}}},{title:"\u9886\u53D6\u65F6\u95F4",dataIndex:"createAt",valueType:"date"},{title:"\u6709\u6548\u65F6\u95F4",hideInSearch:!0,width:200,render:function(a,t,n){return(0,r.jsxs)("span",{children:[(0,r.jsx)("div",{children:v()(t.validStartTime).format("YYYY-MM-DD")}),(0,r.jsx)("div",{children:v()(t.validEndTime).format("YYYY-MM-DD")})]})}},{title:"\u6838\u9500\u65F6\u95F4",dataIndex:"writeOffTime",valueType:"date"}],O=function(a,t){a?Y(t.id).then(function(n){n.forEach(function(s){s.key=s.id}),k(n),S([t.id])}):S([])},A=function(a){return(0,r.jsx)(m.ZP,{columns:[{title:"\u5907\u6CE8",dataIndex:"remark",key:"remark"},{title:"\u64CD\u4F5C\u7C7B\u578B",dataIndex:"orderTypeStr",key:"orderType",valueEnum:{\u9000\u5355\u53CD\u5238:{text:"\u9000\u5355\u53CD\u5238",status:"error",width:200},\u8BA2\u5355\u5B8C\u6210:{text:"\u8BA2\u5355\u5B8C\u6210",status:"Success",width:200}}},{title:"\u64CD\u4F5C\u65F6\u95F4",dataIndex:"orderTime",key:"orderTime"}],headerTitle:!1,search:!1,options:!1,dataSource:P,pagination:!1},a.id)};return(0,r.jsx)(Z.ZP,{children:(0,r.jsx)(m.ZP,{headerTitle:"\u4F18\u60E0\u5377",onExpand:O,expandedRowKeys:M,actionRef:I,rowKey:"id",search:{labelWidth:120},pagination:{pageSize:10},columns:W,expandable:{expandedRowRender:A},request:function(){var l=(0,h.Z)((0,i.Z)().mark(function a(t){var n,s;return(0,i.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return n=[],s=0,t.CustomerPhone=t.phone,o.next=5,w(t).then(function(C){n=C.data.data,s=C.data.total});case 5:return o.abrupt("return",{data:n,success:!0,total:s});case 6:case"end":return o.stop()}},a)}));return function(a){return l.apply(this,arguments)}}()})})},D=j}}]);