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.
NewEduCoderBuild/p__User__Detail__Order__pag...

1 line
13 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[28237],{50912:function(e,n,t){t.d(n,{Z:function(){return g}});var s=t(7557),i=t.n(s),a=t(41498),r=t.n(a),l=t(79800),c=t.n(l),o=t(59301),d=t(80608),u=t(43418),p=t(3113),h="infoModal___tP7wn",m="list___I1pXs",_="li____Spvj",x="btns____auS8",f="confirm___oONio",v="cancel___TcnWk",j=t(37712),g=(0,d.connect)((function(e){return{newShixuns:e.newShixuns,globalSetting:e.globalSetting,user:e.user}}))((function(e){var n=e.visible,t=e.onOk,s=e.onCancel,a=e.width,l=void 0===a?1e3:a,d=e.okText,g=void 0===d?"确认":d,y=e.cancelText,N=void 0===y?"取消":y,S=e.title,b=e.listLeftWidth,w=void 0===b?"auto":b,E=(0,o.useState)(!1),k=c()(E,2),C=k[0],F=k[1];return(0,j.jsx)(u.Z,{title:S,open:!!n,width:l,destroyOnClose:!0,centered:!0,onCancel:s,footer:null,children:(0,j.jsxs)("div",{className:h,children:[(0,j.jsx)("div",{className:m,children:"[object Array]"===Object.prototype.toString.call(n)&&n.map((function(e,n){return(0,j.jsxs)("div",{className:_,children:[(0,j.jsx)("span",{style:{width:w},children:e[0]}),(0,j.jsx)("b",{children:e[1]})]},n)}))}),!!t&&(0,j.jsxs)("div",{className:x,children:[(0,j.jsxs)(p.ZP,{onClick:s,className:v,children:[N," "]}),(0,j.jsxs)(p.ZP,{loading:C,onClick:r()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F(!0),e.next=3,t();case 3:F(!1);case 4:case"end":return e.stop()}}),e)}))),className:f,type:"primary",children:[g," "]})]})]})})}))},331:function(e,n,t){t.r(n),t.d(n,{default:function(){return K}});var s=t(7557),i=t.n(s),a=t(41498),r=t.n(a),l=t(79800),c=t.n(l),o=t(39647),d=t.n(o),u=t(59301),p=t(80608),h=t(66999),m=t(51945),_=t(49105),x=t(27876),f="view___YuocU",v="title___vuK4S",j="content___n0akL",g="w1___IV4Jz",y="w2___znnsF",N="w3___WJKVs",S="w4____6XEQ",b="w6___q21Tj",w="listTitle___fDKAC",E="listContent___pErAK",k="info___coPw1",C="d1____zagS",F="d2___SElFI",$="d3___tgPVi",I="unitPrice___Ol67_",D="p___geGU3",T="l___faBqE",Z="payType___pCIq4",O="price___Jrqvx",z="status___GZyP8",B="head___vTkCS",P="actionBtns___Zb_pW",L="btn___Ew8mL",A=t(2753),M=t(71681),R=t(50912),W=t(37712),H=["user","userDetail","globalSetting","dispatch"],K=(0,p.connect)((function(e){return{user:e.user,userDetail:e.userDetail,globalSetting:e.globalSetting}}))((function(e){e.user,e.userDetail,e.globalSetting;var n,t=e.dispatch,s=(d()(e,H),(0,p.useSearchParams)()),a=c()(s,1)[0],l=(0,u.useState)(!0),o=c()(l,2),K=o[0],q=o[1],J=(0,u.useState)({}),V=c()(J,2),X=V[0],U=V[1],Y=(0,u.useState)(!1),G=c()(Y,2),Q=G[0],ee=G[1];(0,u.useEffect)((function(){return t({type:"globalSetting/footerToggle",payload:!1}),function(){t({type:"globalSetting/footerToggle",payload:!0})}}),[]),(0,u.useEffect)((function(){(0,x.Dk)("查看发票"),ne()}),[]);var ne=function(){var e=r()(i()().mark((function e(){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return q(!0),e.next=3,(0,_.ZP)("/api/invoices/".concat(a.get("id"),"/detail.json"),{method:"get"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&U((null==n?void 0:n.invoice)||{}),q(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=[{title:(0,W.jsx)("span",{children:"发票金额"}),dataIndex:"amount",render:function(e){return(0,W.jsx)("span",{style:{color:"#232B40",paddingLeft:12},children:e})}},{title:"发票类型",dataIndex:"invoice_type",render:function(e){return(0,W.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"发票内容",dataIndex:"invoice_content",render:function(e){return(0,W.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"抬头类型",dataIndex:"heading_type",render:function(e){return(0,W.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"发票抬头",dataIndex:"invoice_header",render:function(e){return(0,W.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"纳税人识别号",dataIndex:"taxpaper_number",width:120,render:function(e){return(0,W.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"申请时间",dataIndex:"created_at",width:104,render:function(e){return(0,W.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"审核状态",dataIndex:"state",width:74,render:function(e,n){return(0,W.jsxs)("span",{children:["pending"===e&&(0,W.jsx)("span",{style:{color:"#FF9D18"},children:"审核中"}),"not_passed"===e&&(0,W.jsx)("span",{style:{color:"#E53333"},children:"未通过"}),"passed"===e&&(0,W.jsx)("span",{style:{color:"#2FA34F"},children:"已通过"})]})}},"not_passed"===(null==X?void 0:X.state)?{title:"审核意见",dataIndex:"review_advice",width:86,render:function(e){return(0,W.jsx)("span",{title:e,className:"multi_ellipsis2",style:{color:"#232B40"},children:e})}}:null,{title:(0,W.jsx)("span",{children:"操作"}),dataIndex:"action",key:"action",align:"right",width:122,render:function(e,n){return(0,W.jsxs)("span",{className:P,children:["not_passed"===n.state&&(0,W.jsx)("span",{onClick:function(){var e,t=null==n||null===(e=n.orders)||void 0===e?void 0:e.map((function(e){return e.id}));p.history.push("/order/invoice?ids=".concat(encodeURIComponent(JSON.stringify(t))))},children:"重新申请"}),"passed"===n.state&&(0,W.jsx)("span",{onClick:function(){var e;return(0,x.Nd)(null,"".concat(M.Z.API_SERVER).concat(null==n||null===(e=n.attachment_info)||void 0===e||null===(e=e.url)||void 0===e?void 0:e.replace("disposition=inline&","")))},children:"下载发票"}),(0,W.jsx)("b",{onClick:se,children:"详情"})]})}}].filter((function(e){return!!e})),se=function(){var e=[["发票金额",(0,W.jsxs)("b",{className:"font16",style:{color:"#FA6400",display:"inline-block",transform:"translateY(-2px)"},children:["¥",X.amount]})],["发票类型",X.invoice_type],["发票内容",X.invoice_content],["抬头类型",X.heading_type],["发票抬头",X.invoice_header],["纳税人识别号",X.taxpaper_number||"/"],["地址",X.address||"/"],["联系电话",X.phone||"/"],["开户行",X.bank||"/"],["银行账号",X.bank_number||"/"]];ee(e)};return(0,W.jsxs)(u.Fragment,{children:[(0,W.jsx)(A._b,{dataSource:[{name:"我的"},{name:"我购买的课程",path:"/order"},{name:"开票记录",path:"/order/records"},{name:"查看发票"}]}),(0,W.jsxs)("div",{className:f,children:[(0,W.jsxs)(h.Z,{loading:K,active:!0,paragraph:{rows:5},children:[(0,W.jsxs)("div",{className:B,children:["pending"===(null==X?void 0:X.state)&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("aside",{children:[(0,W.jsx)("i",{style:{color:"#FF9D18"},className:"iconfont icon-shenhezhong font20"}),(0,W.jsx)("span",{children:"开票审核中"})]}),(0,W.jsx)("div",{children:"请耐心等待,开票完成后可直接在当前页面进行下载~"})]}),"not_passed"===(null==X?void 0:X.state)&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("aside",{children:[(0,W.jsx)("i",{style:{color:"#E53333"},className:"iconfont icon-weishezhi font20"}),(0,W.jsx)("span",{children:"审核未通过"})]}),(0,W.jsx)("div",{children:"请根据审核意见修改发票申请信息之后重新提交~"})]}),"passed"===(null==X?void 0:X.state)&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("aside",{children:[(0,W.jsx)("i",{style:{color:"#2FA34F"},className:"iconfont icon-yiwancheng4 font20"}),(0,W.jsx)("span",{children:"开票完成"})]}),(0,W.jsx)("div",{children:"可直接在发票信息右侧操作栏下载发票~"})]})]}),(0,W.jsx)("div",{className:v,children:"发票信息"}),(0,W.jsx)(m.Z,{dataSource:[X],bordered:!1,rowKey:function(e){return e.id},columns:te,pagination:!1}),(0,W.jsx)("div",{className:v,children:"关联订单信息"}),(0,W.jsxs)("div",{className:j,children:[(0,W.jsxs)("div",{className:w,children:[(0,W.jsx)("div",{style:{textAlign:"left",paddingLeft:30},className:g,children:"订单信息"}),(0,W.jsx)("div",{className:y,children:"单价(元)"}),(0,W.jsx)("div",{className:N,children:"实付金额(元)"}),(0,W.jsx)("div",{className:b,children:"支付方式"}),(0,W.jsx)("div",{className:S,children:"交易状态"})]}),null==X||null===(n=X.orders)||void 0===n?void 0:n.map((function(e,n){return(0,W.jsxs)("div",{className:E,children:[(0,W.jsxs)("div",{className:k,children:[(0,W.jsx)("a",{href:"/paths/".concat(e.subject_id),className:C,children:e.name}),(0,W.jsxs)("div",{className:F,children:[(0,W.jsxs)("span",{children:["订单编号:",e.num]}),(0,W.jsx)("span",{style:{marginLeft:22},children:e.created_at})]}),(0,W.jsxs)("div",{className:$,children:["课程有效期:","1"===(null==e?void 0:e.expiration)&&"永久有效","2"===(null==e?void 0:e.expiration)&&"购买后".concat(null==e?void 0:e.days,"天有效"),"3"===(null==e?void 0:e.expiration)&&"".concat(null==e?void 0:e.start_at,"到").concat(null==e?void 0:e.end_at)]})]}),(0,W.jsxs)("div",{className:I,children:[(0,W.jsx)("div",{className:D,children:e.price}),(0,W.jsx)("div",{className:T,children:e.origin_price})]}),(0,W.jsx)("div",{className:O,children:e.price}),(0,W.jsx)("div",{className:Z,children:null==e?void 0:e.payment_method}),(0,W.jsx)("div",{className:z,children:"unpaid"===e.state?"待支付":"expired"===e.state?"已失效":"交易完成"})]},n)}))]})]}),(0,W.jsx)(A.vr,{children:(0,W.jsx)(A.op,{onClick:function(){return p.history.push("/order/records")},className:L,children:"返回"})})]}),(0,W.jsx)(R.Z,{width:504,title:"详情",visible:Q,listLeftWidth:105,onCancel:function(){return ee(!1)}})]})}))},31797:function(e,n,t){t.d(n,{Z:function(){return y}});var s=t(59301),i=t(56762),a=t(92343),r=t(92310),l=t.n(r),c=t(36355),o=t(66999);var d=e=>{const{value:n,formatter:t,precision:i,decimalSeparator:a,groupSeparator:r="",prefixCls:l}=e;let c;if("function"==typeof t)c=t(n);else{const e=String(n),t=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(t&&"-"!==e){const e=t[1];let n=t[2]||"0",o=t[4]||"";n=n.replace(/\B(?=(\d{3})+(?!\d))/g,r),"number"==typeof i&&(o=o.padEnd(i,"0").slice(0,i>0?i:0)),o&&(o=`${a}${o}`),c=[s.createElement("span",{key:"int",className:`${l}-content-value-int`},e,n),o&&s.createElement("span",{key:"decimal",className:`${l}-content-value-decimal`},o)]}else c=e}return s.createElement("span",{className:`${l}-content-value`},c)},u=t(17313),p=t(83116),h=t(37613);const m=e=>{const{componentCls:n,marginXXS:t,padding:s,colorTextDescription:i,titleFontSize:a,colorTextHeading:r,contentFontSize:l,fontFamily:c}=e;return{[`${n}`]:Object.assign(Object.assign({},(0,u.Wf)(e)),{[`${n}-title`]:{marginBottom:t,color:i,fontSize:a},[`${n}-skeleton`]:{paddingTop:s},[`${n}-content`]:{color:r,fontSize:l,fontFamily:c,[`${n}-content-value`]:{display:"inline-block",direction:"ltr"},[`${n}-content-prefix, ${n}-content-suffix`]:{display:"inline-block"},[`${n}-content-prefix`]:{marginInlineEnd:t},[`${n}-content-suffix`]:{marginInlineStart:t}}})}};var _=(0,p.Z)("Statistic",(e=>{const n=(0,h.TS)(e,{});return[m(n)]}),(e=>{const{fontSizeHeading3:n,fontSize:t}=e;return{titleFontSize:t,contentFontSize:n}}));var x=e=>{const{prefixCls:n,className:t,rootClassName:i,style:a,valueStyle:r,value:u=0,title:p,valueRender:h,prefix:m,suffix:x,loading:f=!1,onMouseEnter:v,onMouseLeave:j,decimalSeparator:g=".",groupSeparator:y=","}=e,{getPrefixCls:N,direction:S,statistic:b}=s.useContext(c.E_),w=N("statistic",n),[E,k]=_(w),C=s.createElement(d,Object.assign({decimalSeparator:g,groupSeparator:y,prefixCls:w},e,{value:u})),F=l()(w,{[`${w}-rtl`]:"rtl"===S},null==b?void 0:b.className,t,i,k);return E(s.createElement("div",{className:F,style:Object.assign(Object.assign({},null==b?void 0:b.style),a),onMouseEnter:v,onMouseLeave:j},p&&s.createElement("div",{className:`${w}-title`},p),s.createElement(o.Z,{paragraph:!1,loading:f,className:`${w}-skeleton`},s.createElement("div",{style:r,className:`${w}-content`},m&&s.createElement("span",{className:`${w}-content-prefix`},m),h?h(C):C,x&&s.createElement("span",{className:`${w}-content-suffix`},x)))))};const f=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function v(e,n){const{format:t=""}=n,s=new Date(e).getTime(),i=Date.now();return function(e,n){let t=e;const s=/\[[^\]]*]/g,i=(n.match(s)||[]).map((e=>e.slice(1,-1))),a=n.replace(s,"[]"),r=f.reduce(((e,n)=>{let[s,i]=n;if(e.includes(s)){const n=Math.floor(t/i);return t-=n*i,e.replace(new RegExp(`${s}+`,"g"),(e=>{const t=e.length;return n.toString().padStart(t,"0")}))}return e}),a);let l=0;return r.replace(s,(()=>{const e=i[l];return l+=1,e}))}(Math.max(s-i,0),t)}const j=e=>{const{value:n,format:t="HH:mm:ss",onChange:r,onFinish:l}=e,c=(0,i.Z)(),o=s.useRef(null),d=()=>{const e=function(e){return new Date(e).getTime()}(n);e>=Date.now()&&(o.current=setInterval((()=>{c(),null==r||r(e-Date.now()),e<Date.now()&&(null==l||l(),o.current&&(clearInterval(o.current),o.current=null))}),33.333333333333336))};s.useEffect((()=>(d(),()=>{o.current&&(clearInterval(o.current),o.current=null)})),[n]);return s.createElement(x,Object.assign({},e,{valueRender:e=>(0,a.Tm)(e,{title:void 0}),formatter:(e,n)=>v(e,Object.assign(Object.assign({},n),{format:t}))}))};var g=s.memo(j);x.Countdown=g;var y=x}}]);