Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

p__order__order-report.3f466479.async.js 6.9 KiB

1 рік тому
1
  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7314,7975,1322,6353,104,3591,1278,6469,8920,8698,6653],{79030:function(N){N.exports={"data-search-card":"data-search-card___3UcPL","data-search-box":"data-search-box___3letD","search-btn-item":"search-btn-item____z28A","table-page":"table-page___32bGM","loading-card":"loading-card___3l44P"}},40258:function(N,M,e){"use strict";e.r(M),e.d(M,{default:function(){return oe}});var Te=e(14781),Q=e(36138),Ye=e(66456),U=e(15711),Re=e(58024),L=e(91894),Ne=e(57663),Z=e(71577),Me=e(62999),J=e(54680),f=e(39428),Le=e(34792),j=e(48086),D=e(3182),u=e(2824),Pe=e(20228),K=e(11382),ze=e(49111),V=e(19650),Ie=e(71153),C=e(60331),Ae=e(14965),X=e(91774),l=e(67294),b=e(78009),w=e(79030),i=e.n(w),x=e(48971),E={getOrderReportList:function(d){return(0,x.WY)("/kitchen/api/report-statistics/order-report",{method:"Post",data:d})},getOrgTree:function(){return(0,x.WY)("/kitchen/api/report-statistics/org-tree",{method:"GET"})},orderReportExport:function(d){return(0,x.WY)("/kitchen/api/report-statistics/order-report-export",{method:"Post",data:d})}},q=e(30381),h=e.n(q),_=e(15873),ee=e(90631),te=e(53667),ae=e.n(te),a=e(85893),re=X.Z.RangePicker,se=[{title:"\u4EA4\u6613\u5355\u53F7",dataIndex:"transactionId",key:"transactionId"},{title:"\u5E97\u94FA\u540D\u79F0",dataIndex:"shopName",key:"shopName"},{title:"\u539F\u4EF7\uFF08\uFFE5\uFF09",dataIndex:"orderOriginalMoney",key:"orderOriginalMoney"},{title:"\u4F18\u60E0\uFF08\uFFE5\uFF09",dataIndex:"discountMoney",key:"discountMoney"},{title:"\u5B9E\u9645\u652F\u4ED8\uFF08\uFFE5\uFF09",dataIndex:"orderRealMoney",key:"orderRealMoney"},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createdAt",key:"createdAt"},{title:"\u8BA2\u5355\u72B6\u6001",key:"orderStatus",render:function(d){var o="";switch(d.orderStatus){case 0:o="\u672A\u4ED8\u6B3E";break;case 1:o="\u5DF2\u4ED8\u6B3E";break;case-1:o="\u9000\u5355\u7533\u8BF7";break;case-2:o="\u9000\u5355\u4E2D";break;case-3:o="\u5DF2\u9000\u5355";break;case-4:o="\u53D6\u6D88\u4EA4\u6613";break;case-5:o="\u64A4\u9500\u7533\u8BF7";break}return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(C.Z,{icon:(0,a.jsx)(_.Z,{}),color:"success",children:o})})}},{title:"\u552E\u540E\u4FE1\u606F",key:"orderStatus",render:function(d){return(0,a.jsx)(a.Fragment,{children:d.isRefund?(0,a.jsx)(C.Z,{color:"error",children:"\u6709"}):(0,a.jsx)(C.Z,{color:"success",children:"\u65E0"})})}},{title:"\u64CD\u4F5C",key:"action",render:function(d,o){return(0,a.jsx)(V.Z,{size:"middle",children:(0,a.jsx)("a",{onClick:function(){x.m8.push({pathname:"/order/order-report/order-report-detail",query:{orderNumber:o.orderNumber}})},children:"\u8BE6\u60C5"})})}}],ne=function(){return(0,a.jsx)("div",{className:i()["loading-card"],children:(0,a.jsx)(K.Z,{size:"large"})})};function oe(){var v=(0,l.useState)([]),d=(0,u.Z)(v,2),o=d[0],P=d[1],de=(0,l.useState)(1),z=(0,u.Z)(de,2),O=z[0],le=z[1],ie=(0,l.useState)(10),I=(0,u.Z)(ie,2),T=I[0],ce=I[1],ue=(0,l.useState)(0),A=(0,u.Z)(ue,2),he=A[0],ve=A[1],fe=(0,l.useState)(!1),F=(0,u.Z)(fe,2),ge=F[0],g=F[1],me=(0,l.useState)(""),k=(0,u.Z)(me,2),S=k[0],B=k[1],pe=(0,l.useState)([]),G=(0,u.Z)(pe,2),ye=G[0],xe=G[1],Se=(0,l.useState)([h()(h()(new Date(Date.now()-24*60*60*1e3*7)).format("YYYY-MM-DD 00:00:00")),h()(h()(new Date(Date.now())).format("YYYY-MM-DD 23:59:59"))]),H=(0,u.Z)(Se,2),p=H[0],Ze=H[1];(0,l.useEffect)(function(){W()},[O,T]),(0,l.useEffect)(function(){De()},[]);var W=function(){var c=(0,D.Z)((0,f.Z)().mark(function s(){var t,r;return(0,f.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t={startTime:p[0],endTime:p[1],current:O,pageSize:T},S.key&&(t.shopId=S.key),g(!0),n.next=5,E.getOrderReportList(t);case 5:r=n.sent,g(!1),r.statusCode===200?(P(r.data.data),ve(r.data.total)):j.default.error(r.errors||"\u83B7\u53D6\u8BA2\u5355\u62A5\u8868\u5217\u8868\u5931\u8D25");case 8:case"end":return n.stop()}},s)}));return function(){return c.apply(this,arguments)}}(),je=function(s,t){le(s),ce(t)},De=function(){var c=(0,D.Z)((0,f.Z)().mark(function s(){var t,r;return(0,f.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return g(!0),n.next=3,E.getOrgTree();case 3:t=n.sent,g(!1),t.statusCode===200?(r=t.data,Ce(r),xe(r)):j.default.error(t.errors||"\u83B7\u53D6\u7EC4\u7EC7\u6811\u51FA\u9519");case 6:case"end":return n.stop()}},s)}));return function(){return c.apply(this,arguments)}}(),Ce=function c(s){s.forEach(function(t){t.children&&t.children.length>0?c(t.children):t.type===2||t.type===3?t.disabled=!1:t.disabled=!0})},Ee=function(){var c=(0,D.Z)((0,f.Z)().mark(function s(){var t,r,m,n,Y,R,$;return(0,f.Z)().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return t={startTime:p[0],endTime:p[1]},S.key&&(t.shopId=S.key),g(!0),y.next=5,E.orderReportExport(t);case 5:r=y.sent,g(!1),r.statusCode===200?(m={},n=new Date,Y="\u8BA2\u5355\u62A5\u8868-"+n.toLocaleString().replaceAll("/","-"),m.fileName=Y,R=[],Object.keys(r.data[0]).forEach(function(Oe){R.push(Oe)}),m.datas=[{sheetData:r.data,sheetName:Y,sheetFilter:R,sheetHeader:["ID","\u53D6\u9910\u53F7","\u7528\u6237Id","\u4F18\u60E0\u5408\u96C6","\u8BA2\u5355\u53F7\uFF08\u672C\u7CFB\u7EDF\uFF09","\u4EA4\u6613\u53F7","\u5E97\u94FAID","\u5E97\u94FA\u540D\u5B57","\u5546\u54C1\u603B\u4EF7","\u4F18\u60E0\u91D1\u989D","\u5B9E\u4ED8\u91D1\u989D","\u521B\u5EFA\u65F6\u95F4","\u652F\u4ED8\u91D1\u989D\u5F02\u5E38","\u8BA2\u5355\u652F\u4ED8\u65F6\u95F4\u5F02\u5E38","\u8BA2\u5355\u5F02\u5E38","\u552E\u540E\u91D1\u989D\u5F02\u5E38","\u552E\u540E\u65F6\u95F4\u5F02\u5E38","\u552E\u540E\u8BA2\u5355\u5F02\u5E38"]}],$=new(ae())(m),$.saveExcel()):j.default.error(r.errors||"\u5BFC\u51FA\u5931\u8D25");case 8:case"end":return y.stop()}},s)}));return function(){return c.apply(this,arguments)}}();return(0,a.jsxs)(b.ZP,{children:[ge?(0,a.jsx)(ne,{}):null,(0,a.jsx)(L.Z,{className:i()["data-search-card"],children:(0,a.jsxs)("div",{className:i()["data-search-box"],children:[(0,a.jsxs)("div",{className:i()["data-search-left"],children:[(0,a.jsx)(re,{className:i()["my-range-picker"],value:p,onChange:function(s,t){var r=[h()(h()(new Date(t[0])).format("YYYY-MM-DD 00:00:00")),h()(h()(new Date(t[1])).format("YYYY-MM-DD 23:59:59"))];Ze(r)}}),(0,a.jsx)(J.Z,{style:{width:"300px",marginLeft:"50px"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:ye,onSelect:function(s,t){console.log("node>>>",t),t.type===2||t===3?B(t):B("")},placeholder:"\u8BF7\u9009\u62E9\u7EC4\u7EC7\u67B6\u6784",treeDefaultExpandAll:!0})]}),(0,a.jsxs)("div",{className:i()["data-search-btns"],children:[(0,a.jsx)(Z.Z,{type:"primary",icon:(0,a.jsx)(ee.Z,{}),size:"middle",onClick:Ee,children:"\u4E0B\u8F7D"}),(0,a.jsx)(Z.Z,{className:i()["search-btn-item"],children:"\u91CD\u7F6E"}),(0,a.jsx)(Z.Z,{className:i()["search-btn-item"],type:"primary",onClick:W,children:"\u67E5\u8BE2"})]})]})}),(0,a.jsxs)(L.Z,{className:i()["table-card"],children:[(0,a.jsx)(U.Z,{dataSource:o,columns:se,pagination:!1}),(0,a.jsx)("div",{className:i()["table-page"],children:(0,a.jsx)(Q.Z,{current:O,pageSize:T,total:he,onChange:je})})]})]})}}}]);