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.
1 line
9.1 KiB
1 line
9.1 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[28237],{61763: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),d=t(59301),o=t(33936),u=t(43418),_=t(3113),h="infoModal___tP7wn",p="list___I1pXs",x="li____Spvj",v="btns____auS8",j="confirm___oONio",f="cancel___TcnWk",m=t(37712),g=(0,o.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,o=e.okText,g=void 0===o?"确认":o,y=e.cancelText,N=void 0===y?"取消":y,w=e.title,b=e.listLeftWidth,S=void 0===b?"auto":b,k=(0,d.useState)(!1),C=c()(k,2),I=C[0],F=C[1];return(0,m.jsx)(u.Z,{title:w,open:!!n,width:l,destroyOnClose:!0,centered:!0,onCancel:s,footer:null,children:(0,m.jsxs)("div",{className:h,children:[(0,m.jsx)("div",{className:p,children:"[object Array]"===Object.prototype.toString.call(n)&&n.map((function(e,n){return(0,m.jsxs)("div",{className:x,children:[(0,m.jsx)("span",{style:{width:S},children:e[0]}),(0,m.jsx)("b",{children:e[1]})]},n)}))}),!!t&&(0,m.jsxs)("div",{className:v,children:[(0,m.jsxs)(_.ZP,{onClick:s,className:f,children:[N," "]}),(0,m.jsxs)(_.ZP,{loading:I,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:j,type:"primary",children:[g," "]})]})]})})}))},21353:function(e,n,t){t.r(n),t.d(n,{default:function(){return R}});var s=t(7557),i=t.n(s),a=t(41498),r=t.n(a),l=t(79800),c=t.n(l),d=t(39647),o=t.n(d),u=t(59301),_=t(33936),h=t(66999),p=t(51945),x=t(67444),v=t(16739),j="view___YuocU",f="title___vuK4S",m="content___n0akL",g="w1___IV4Jz",y="w2___znnsF",N="w3___WJKVs",w="w4____6XEQ",b="w6___q21Tj",S="listTitle___fDKAC",k="listContent___pErAK",C="info___coPw1",I="d1____zagS",F="d2___SElFI",E="d3___tgPVi",Z="unitPrice___Ol67_",B="p___geGU3",P="l___faBqE",T="payType___pCIq4",A="price___Jrqvx",D="status___GZyP8",L="head___vTkCS",O="actionBtns___Zb_pW",z="btn___Ew8mL",K=t(11249),W=t(84666),q=t(61763),J=t(37712),V=["user","userDetail","globalSetting","dispatch"],R=(0,_.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=(o()(e,V),(0,_.useSearchParams)()),a=c()(s,1)[0],l=(0,u.useState)(!0),d=c()(l,2),R=d[0],U=d[1],G=(0,u.useState)({}),X=c()(G,2),Y=X[0],M=X[1],Q=(0,u.useState)(!1),H=c()(Q,2),$=H[0],ee=H[1];(0,u.useEffect)((function(){return t({type:"globalSetting/footerToggle",payload:!1}),function(){t({type:"globalSetting/footerToggle",payload:!0})}}),[]),(0,u.useEffect)((function(){(0,v.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 U(!0),e.next=3,(0,x.ZP)("/api/invoices/".concat(a.get("id"),"/detail.json"),{method:"get"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&M((null==n?void 0:n.invoice)||{}),U(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=[{title:(0,J.jsx)("span",{children:"发票金额"}),dataIndex:"amount",render:function(e){return(0,J.jsx)("span",{style:{color:"#232B40",paddingLeft:12},children:e})}},{title:"发票类型",dataIndex:"invoice_type",render:function(e){return(0,J.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"发票内容",dataIndex:"invoice_content",render:function(e){return(0,J.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"抬头类型",dataIndex:"heading_type",render:function(e){return(0,J.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"发票抬头",dataIndex:"invoice_header",render:function(e){return(0,J.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"纳税人识别号",dataIndex:"taxpaper_number",width:120,render:function(e){return(0,J.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"申请时间",dataIndex:"created_at",width:104,render:function(e){return(0,J.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"审核状态",dataIndex:"state",width:74,render:function(e,n){return(0,J.jsxs)("span",{children:["pending"===e&&(0,J.jsx)("span",{style:{color:"#FF9D18"},children:"审核中"}),"not_passed"===e&&(0,J.jsx)("span",{style:{color:"#E53333"},children:"未通过"}),"passed"===e&&(0,J.jsx)("span",{style:{color:"#2FA34F"},children:"已通过"})]})}},"not_passed"===(null==Y?void 0:Y.state)?{title:"审核意见",dataIndex:"review_advice",width:86,render:function(e){return(0,J.jsx)("span",{title:e,className:"multi_ellipsis2",style:{color:"#232B40"},children:e})}}:null,{title:(0,J.jsx)("span",{children:"操作"}),dataIndex:"action",key:"action",align:"right",width:122,render:function(e,n){return(0,J.jsxs)("span",{className:O,children:["not_passed"===n.state&&(0,J.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}));_.history.push("/order/invoice?ids=".concat(encodeURIComponent(JSON.stringify(t))))},children:"重新申请"}),"passed"===n.state&&(0,J.jsx)("span",{onClick:function(){var e;return(0,v.Nd)(null,"".concat(W.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,J.jsx)("b",{onClick:se,children:"详情"})]})}}].filter((function(e){return!!e})),se=function(){var e=[["发票金额",(0,J.jsxs)("b",{className:"font16",style:{color:"#FA6400",display:"inline-block",transform:"translateY(-2px)"},children:["¥",Y.amount]})],["发票类型",Y.invoice_type],["发票内容",Y.invoice_content],["抬头类型",Y.heading_type],["发票抬头",Y.invoice_header],["纳税人识别号",Y.taxpaper_number||"/"],["地址",Y.address||"/"],["联系电话",Y.phone||"/"],["开户行",Y.bank||"/"],["银行账号",Y.bank_number||"/"]];ee(e)};return(0,J.jsxs)(u.Fragment,{children:[(0,J.jsx)(K._b,{dataSource:[{name:"我的"},{name:"我购买的课程",path:"/order"},{name:"开票记录",path:"/order/records"},{name:"查看发票"}]}),(0,J.jsxs)("div",{className:j,children:[(0,J.jsxs)(h.Z,{loading:R,active:!0,paragraph:{rows:5},children:[(0,J.jsxs)("div",{className:L,children:["pending"===(null==Y?void 0:Y.state)&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("aside",{children:[(0,J.jsx)("i",{style:{color:"#FF9D18"},className:"iconfont icon-shenhezhong font20"}),(0,J.jsx)("span",{children:"开票审核中"})]}),(0,J.jsx)("div",{children:"请耐心等待,开票完成后可直接在当前页面进行下载~"})]}),"not_passed"===(null==Y?void 0:Y.state)&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("aside",{children:[(0,J.jsx)("i",{style:{color:"#E53333"},className:"iconfont icon-weishezhi font20"}),(0,J.jsx)("span",{children:"审核未通过"})]}),(0,J.jsx)("div",{children:"请根据审核意见修改发票申请信息之后重新提交~"})]}),"passed"===(null==Y?void 0:Y.state)&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("aside",{children:[(0,J.jsx)("i",{style:{color:"#2FA34F"},className:"iconfont icon-yiwancheng4 font20"}),(0,J.jsx)("span",{children:"开票完成"})]}),(0,J.jsx)("div",{children:"可直接在发票信息右侧操作栏下载发票~"})]})]}),(0,J.jsx)("div",{className:f,children:"发票信息"}),(0,J.jsx)(p.Z,{dataSource:[Y],bordered:!1,rowKey:function(e){return e.id},columns:te,pagination:!1}),(0,J.jsx)("div",{className:f,children:"关联订单信息"}),(0,J.jsxs)("div",{className:m,children:[(0,J.jsxs)("div",{className:S,children:[(0,J.jsx)("div",{style:{textAlign:"left",paddingLeft:30},className:g,children:"订单信息"}),(0,J.jsx)("div",{className:y,children:"单价(元)"}),(0,J.jsx)("div",{className:N,children:"实付金额(元)"}),(0,J.jsx)("div",{className:b,children:"支付方式"}),(0,J.jsx)("div",{className:w,children:"交易状态"})]}),null==Y||null===(n=Y.orders)||void 0===n?void 0:n.map((function(e,n){return(0,J.jsxs)("div",{className:k,children:[(0,J.jsxs)("div",{className:C,children:[(0,J.jsx)("a",{href:"/paths/".concat(e.subject_id),className:I,children:e.name}),(0,J.jsxs)("div",{className:F,children:[(0,J.jsxs)("span",{children:["订单编号:",e.num]}),(0,J.jsx)("span",{style:{marginLeft:22},children:e.created_at})]}),(0,J.jsxs)("div",{className:E,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,J.jsxs)("div",{className:Z,children:[(0,J.jsx)("div",{className:B,children:e.price}),(0,J.jsx)("div",{className:P,children:e.origin_price})]}),(0,J.jsx)("div",{className:A,children:e.price}),(0,J.jsx)("div",{className:T,children:null==e?void 0:e.payment_method}),(0,J.jsx)("div",{className:D,children:"unpaid"===e.state?"待支付":"expired"===e.state?"已失效":"交易完成"})]},n)}))]})]}),(0,J.jsx)(K.vr,{children:(0,J.jsx)(K.op,{onClick:function(){return _.history.push("/order/records")},className:z,children:"返回"})})]}),(0,J.jsx)(q.Z,{width:504,title:"详情",visible:$,listLeftWidth:105,onCancel:function(){return ee(!1)}})]})}))}}]); |