您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

p__crm__coupon__customerCoupon.87b608f6.async.js 3.5 KiB

1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[476,1322],{30407:function(G,x,e){"use strict";e.r(x),e.d(x,{default:function(){return Z}});var h=e(3182),f=e(2824),E=e(94043),i=e.n(E),c=e(67294),Y=e(30381),v=e.n(Y),w=e(78009),m=e(16894),y=e(48971);function j(u){return p.apply(this,arguments)}function p(){return p=(0,h.Z)(i().mark(function u(T){return i().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 D(u){return(0,y.WY)("/kitchen/api/coupon/couponlog/".concat(u),{method:"GET",data:u})}var r=e(85893),P=function(T){var I=(0,c.useRef)(),d=(0,c.useState)([]),g=(0,f.Z)(d,2),k=g[0],K=g[1],M=(0,c.useState)([]),R=(0,f.Z)(M,2),W=R[0],S=R[1],O=[{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"}],A=function(a,t){a?D(t.id).then(function(n){n.forEach(function(o){o.key=o.id}),K(n),S([t.id])}):S([])},B=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:k,pagination:!1},a.id)};return(0,r.jsx)(w.ZP,{children:(0,r.jsx)(m.ZP,{headerTitle:"\u4F18\u60E0\u5377",onExpand:A,expandedRowKeys:W,actionRef:I,rowKey:"id",search:{labelWidth:120},pagination:{pageSize:10},columns:O,expandable:{expandedRowRender:B},request:function(){var l=(0,h.Z)(i().mark(function a(t){var n,o;return i().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return n=[],o=0,t.CustomerPhone=t.phone,s.next=5,j(t).then(function(C){n=C.data.data,o=C.data.total});case 5:return s.abrupt("return",{data:n,success:!0,total:o});case 6:case"end":return s.stop()}},a)}));return function(a){return l.apply(this,arguments)}}()})})},Z=P}}]);