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
16 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[28237],{89136:function(e,n,t){t.d(n,{Z:function(){return o}});var s=t(1565),i=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},a=t(68475),l=function(e,n){return i.createElement(a.Z,(0,s.Z)({},e,{ref:n,icon:r}))};var o=i.forwardRef(l)},7406:function(e,n,t){var s=t(82242),i=t.n(s),r=(t(59301),t(93314)),a=t(3113),l=t(37712);n.Z=function(e){var n=e.img,t=e.buttonProps,s=void 0===t?{}:t,o=e.styles,c=void 0===o?{}:o,d=e.customText,u=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,v=e.ButtonTwo,h=e.imgStyles,x=e.loading,m=void 0!==x&&x;return(0,l.jsxs)("section",{className:"tc animated fadeIn",style:i()(i()({},{color:"#999",margin:"100px auto",visibility:m?"hidden":"visible"}),c),children:[(0,l.jsx)("img",{src:n||r,style:i()(i()({},h),{},{pointerEvents:"none",userSelect:"none"})}),(0,l.jsx)("p",{className:"mt20 font14",children:d||"暂时还没有相关数据哦!"}),u&&(0,l.jsx)(a.ZP,i()(i()({className:f,onClick:p},s),{},{children:u})),v&&v]})}},60128:function(e,n,t){t.d(n,{Z:function(){return g}});var s=t(7557),i=t.n(s),r=t(41498),a=t.n(r),l=t(79800),o=t.n(l),c=t(59301),d=t(7880),u=t(43418),p=t(3113),f="infoModal___tP7wn",v="list___I1pXs",h="li____Spvj",x="btns____auS8",m="confirm___oONio",_="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,r=e.width,l=void 0===r?1e3:r,d=e.okText,g=void 0===d?"确认":d,y=e.cancelText,b=void 0===y?"取消":y,C=e.title,N=e.listLeftWidth,w=void 0===N?"auto":N,S=(0,c.useState)(!1),E=o()(S,2),k=E[0],O=E[1];return(0,j.jsx)(u.Z,{title:C,open:!!n,width:l,destroyOnClose:!0,centered:!0,onCancel:s,footer:null,children:(0,j.jsxs)("div",{className:f,children:[(0,j.jsx)("div",{className:v,children:"[object Array]"===Object.prototype.toString.call(n)&&n.map((function(e,n){return(0,j.jsxs)("div",{className:h,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:_,children:[b," "]}),(0,j.jsxs)(p.ZP,{loading:k,onClick:a()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O(!0),e.next=3,t();case 3:O(!1);case 4:case"end":return e.stop()}}),e)}))),className:m,type:"primary",children:[g," "]})]})]})})}))},77822:function(e,n,t){t.r(n),t.d(n,{default:function(){return V}});var s=t(7557),i=t.n(s),r=t(41498),a=t.n(r),l=t(79800),o=t.n(l),c=t(39647),d=t.n(c),u=t(59301),p=t(7880),f=t(56511),v=t(14491),h=t(51136),x=t(6457),m="view___YuocU",_="title___vuK4S",j="content___n0akL",g="w1___IV4Jz",y="w2___znnsF",b="w3___WJKVs",C="w4____6XEQ",N="w6___q21Tj",w="listTitle___fDKAC",S="listContent___pErAK",E="info___coPw1",k="d1____zagS",O="d2___SElFI",P="d3___tgPVi",Z="unitPrice___Ol67_",z="p___geGU3",B="l___faBqE",I="payType___pCIq4",T="price___Jrqvx",F="status___GZyP8",M="head___vTkCS",A="actionBtns___Zb_pW",L="btn___Ew8mL",D=t(90963),R=t(27065),$=t(60128),q=t(37712),Q=["user","userDetail","globalSetting","dispatch"],V=(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,Q),(0,p.useSearchParams)()),r=o()(s,1)[0],l=(0,u.useState)(!0),c=o()(l,2),V=c[0],K=c[1],U=(0,u.useState)({}),W=o()(U,2),J=W[0],G=W[1],X=(0,u.useState)(!1),Y=o()(X,2),H=Y[0],ee=Y[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=a()(i()().mark((function e(){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return K(!0),e.next=3,(0,h.ZP)("/api/invoices/".concat(r.get("id"),"/detail.json"),{method:"get"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&G((null==n?void 0:n.invoice)||{}),K(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=[{title:(0,q.jsx)("span",{children:"发票金额"}),dataIndex:"amount",render:function(e){return(0,q.jsx)("span",{style:{color:"#232B40",paddingLeft:12},children:e})}},{title:"发票类型",dataIndex:"invoice_type",render:function(e){return(0,q.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"发票内容",dataIndex:"invoice_content",render:function(e){return(0,q.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"抬头类型",dataIndex:"heading_type",render:function(e){return(0,q.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"发票抬头",dataIndex:"invoice_header",render:function(e){return(0,q.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"纳税人识别号",dataIndex:"taxpaper_number",width:120,render:function(e){return(0,q.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"申请时间",dataIndex:"created_at",width:104,render:function(e){return(0,q.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:"审核状态",dataIndex:"state",width:74,render:function(e,n){return(0,q.jsxs)("span",{children:["pending"===e&&(0,q.jsx)("span",{style:{color:"#FF9D18"},children:"审核中"}),"not_passed"===e&&(0,q.jsx)("span",{style:{color:"#E53333"},children:"未通过"}),"passed"===e&&(0,q.jsx)("span",{style:{color:"#2FA34F"},children:"已通过"})]})}},"not_passed"===(null==J?void 0:J.state)?{title:"审核意见",dataIndex:"review_advice",width:86,render:function(e){return(0,q.jsx)("span",{title:e,className:"multi_ellipsis2",style:{color:"#232B40"},children:e})}}:null,{title:(0,q.jsx)("span",{children:"操作"}),dataIndex:"action",key:"action",align:"right",width:122,render:function(e,n){return(0,q.jsxs)("span",{className:A,children:["not_passed"===n.state&&(0,q.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,q.jsx)("span",{onClick:function(){var e;return(0,x.Nd)(null,"".concat(R.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,q.jsx)("b",{onClick:se,children:"详情"})]})}}].filter((function(e){return!!e})),se=function(){var e=[["发票金额",(0,q.jsxs)("b",{className:"font16",style:{color:"#FA6400",display:"inline-block",transform:"translateY(-2px)"},children:["¥",J.amount]})],["发票类型",J.invoice_type],["发票内容",J.invoice_content],["抬头类型",J.heading_type],["发票抬头",J.invoice_header],["纳税人识别号",J.taxpaper_number||"/"],["地址",J.address||"/"],["联系电话",J.phone||"/"],["开户行",J.bank||"/"],["银行账号",J.bank_number||"/"]];ee(e)};return(0,q.jsxs)(u.Fragment,{children:[(0,q.jsx)(D._b,{dataSource:[{name:"我的"},{name:"我购买的课程",path:"/order"},{name:"开票记录",path:"/order/records"},{name:"查看发票"}]}),(0,q.jsxs)("div",{className:m,children:[(0,q.jsxs)(f.Z,{loading:V,active:!0,paragraph:{rows:5},children:[(0,q.jsxs)("div",{className:M,children:["pending"===(null==J?void 0:J.state)&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("aside",{children:[(0,q.jsx)("i",{style:{color:"#FF9D18"},className:"iconfont icon-shenhezhong font20"}),(0,q.jsx)("span",{children:"开票审核中"})]}),(0,q.jsx)("div",{children:"请耐心等待,开票完成后可直接在当前页面进行下载~"})]}),"not_passed"===(null==J?void 0:J.state)&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("aside",{children:[(0,q.jsx)("i",{style:{color:"#E53333"},className:"iconfont icon-weishezhi font20"}),(0,q.jsx)("span",{children:"审核未通过"})]}),(0,q.jsx)("div",{children:"请根据审核意见修改发票申请信息之后重新提交~"})]}),"passed"===(null==J?void 0:J.state)&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("aside",{children:[(0,q.jsx)("i",{style:{color:"#2FA34F"},className:"iconfont icon-yiwancheng4 font20"}),(0,q.jsx)("span",{children:"开票完成"})]}),(0,q.jsx)("div",{children:"可直接在发票信息右侧操作栏下载发票~"})]})]}),(0,q.jsx)("div",{className:_,children:"发票信息"}),(0,q.jsx)(v.Z,{dataSource:[J],bordered:!1,rowKey:function(e){return e.id},columns:te,pagination:!1}),(0,q.jsx)("div",{className:_,children:"关联订单信息"}),(0,q.jsxs)("div",{className:j,children:[(0,q.jsxs)("div",{className:w,children:[(0,q.jsx)("div",{style:{textAlign:"left",paddingLeft:30},className:g,children:"订单信息"}),(0,q.jsx)("div",{className:y,children:"单价(元)"}),(0,q.jsx)("div",{className:b,children:"实付金额(元)"}),(0,q.jsx)("div",{className:N,children:"支付方式"}),(0,q.jsx)("div",{className:C,children:"交易状态"})]}),null==J||null===(n=J.orders)||void 0===n?void 0:n.map((function(e,n){return(0,q.jsxs)("div",{className:S,children:[(0,q.jsxs)("div",{className:E,children:[(0,q.jsx)("a",{href:"/paths/".concat(e.subject_id),className:k,children:e.name}),(0,q.jsxs)("div",{className:O,children:[(0,q.jsxs)("span",{children:["订单编号:",e.num]}),(0,q.jsx)("span",{style:{marginLeft:22},children:e.created_at})]}),(0,q.jsxs)("div",{className:P,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,q.jsxs)("div",{className:Z,children:[(0,q.jsx)("div",{className:z,children:e.price}),(0,q.jsx)("div",{className:B,children:e.origin_price})]}),(0,q.jsx)("div",{className:T,children:e.price}),(0,q.jsx)("div",{className:I,children:null==e?void 0:e.payment_method}),(0,q.jsx)("div",{className:F,children:"unpaid"===e.state?"待支付":"expired"===e.state?"已失效":"交易完成"})]},n)}))]})]}),(0,q.jsx)(D.vr,{children:(0,q.jsx)(D.op,{onClick:function(){return p.history.push("/order/records")},className:L,children:"返回"})})]}),(0,q.jsx)($.Z,{width:504,title:"详情",visible:H,listLeftWidth:105,onCancel:function(){return ee(!1)}})]})}))},98135:function(e,n,t){t.d(n,{Z:function(){return B}});var s=t(92310),i=t.n(s),r=t(59301),a=t(36355),l=t(32441),o=t(9937);var c=e=>{const{getPrefixCls:n,direction:t}=(0,r.useContext)(a.E_),{prefixCls:s,className:c}=e,d=n("input-group",s),u=n("input"),[p,f]=(0,o.ZP)(u),v=i()(d,{[`${d}-lg`]:"large"===e.size,[`${d}-sm`]:"small"===e.size,[`${d}-compact`]:e.compact,[`${d}-rtl`]:"rtl"===t},f,c),h=(0,r.useContext)(l.aM),x=(0,r.useMemo)((()=>Object.assign(Object.assign({},h),{isFormItemInput:!1})),[h]);return p(r.createElement("span",{className:v,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},r.createElement(l.aM.Provider,{value:x},e.children)))},d=t(9432),u=t(1565),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},f=t(68475),v=function(e,n){return r.createElement(f.Z,(0,u.Z)({},e,{ref:n,icon:p}))};var h=r.forwardRef(v),x=t(89136),m=t(70521),_=t(16863),j=t(59412),g=function(e,n){var t={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&n.indexOf(s)<0&&(t[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)n.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(t[s[i]]=e[s[i]])}return t};const y=e=>e?r.createElement(x.Z,null):r.createElement(h,null),b={click:"onClick",hover:"onMouseOver"};var C=r.forwardRef(((e,n)=>{const{visibilityToggle:t=!0}=e,s="object"==typeof t&&void 0!==t.visible,[l,o]=(0,r.useState)((()=>!!s&&t.visible)),c=(0,r.useRef)(null);r.useEffect((()=>{s&&o(t.visible)}),[s,t]);const u=(0,j.Z)(c),p=()=>{const{disabled:n}=e;n||(l&&u(),o((e=>{var n;const s=!e;return"object"==typeof t&&(null===(n=t.onVisibleChange)||void 0===n||n.call(t,s)),s})))},{className:f,prefixCls:v,inputPrefixCls:h,size:x}=e,C=g(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:N}=r.useContext(a.E_),w=N("input",h),S=N("input-password",v),E=t&&(n=>{const{action:t="click",iconRender:s=y}=e,i=b[t]||"",a=s(l),o={[i]:p,className:`${n}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return r.cloneElement(r.isValidElement(a)?a:r.createElement("span",null,a),o)})(S),k=i()(S,f,{[`${S}-${x}`]:!!x}),O=Object.assign(Object.assign({},(0,m.Z)(C,["suffix","iconRender","visibilityToggle"])),{type:l?"text":"password",className:k,prefixCls:w,suffix:E});return x&&(O.size=x),r.createElement(d.Z,Object.assign({ref:(0,_.sQ)(n,c)},O))})),N=t(11013),w=t(92343),S=t(3113),E=t(19716),k=t(33234),O=function(e,n){var t={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&n.indexOf(s)<0&&(t[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)n.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(t[s[i]]=e[s[i]])}return t};var P=r.forwardRef(((e,n)=>{const{prefixCls:t,inputPrefixCls:s,className:l,size:o,suffix:c,enterButton:u=!1,addonAfter:p,loading:f,disabled:v,onSearch:h,onChange:x,onCompositionStart:m,onCompositionEnd:j}=e,g=O(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:y,direction:b}=r.useContext(a.E_),C=r.useRef(!1),P=y("input-search",t),Z=y("input",s),{compactSize:z}=(0,k.ri)(P,b),B=(0,E.Z)((e=>{var n;return null!==(n=null!=o?o:z)&&void 0!==n?n:e})),I=r.useRef(null),T=e=>{var n;document.activeElement===(null===(n=I.current)||void 0===n?void 0:n.input)&&e.preventDefault()},F=e=>{var n,t;h&&h(null===(t=null===(n=I.current)||void 0===n?void 0:n.input)||void 0===t?void 0:t.value,e,{source:"input"})},M="boolean"==typeof u?r.createElement(N.Z,null):null,A=`${P}-button`;let L;const D=u||{},R=D.type&&!0===D.type.__ANT_BUTTON;L=R||"button"===D.type?(0,w.Tm)(D,Object.assign({onMouseDown:T,onClick:e=>{var n,t;null===(t=null===(n=null==D?void 0:D.props)||void 0===n?void 0:n.onClick)||void 0===t||t.call(n,e),F(e)},key:"enterButton"},R?{className:A,size:B}:{})):r.createElement(S.ZP,{className:A,type:u?"primary":void 0,size:B,disabled:v,key:"enterButton",onMouseDown:T,onClick:F,loading:f,icon:M},u),p&&(L=[L,(0,w.Tm)(p,{key:"addonAfter"})]);const $=i()(P,{[`${P}-rtl`]:"rtl"===b,[`${P}-${B}`]:!!B,[`${P}-with-button`]:!!u},l);return r.createElement(d.Z,Object.assign({ref:(0,_.sQ)(I,n),onPressEnter:e=>{C.current||f||F(e)}},g,{size:B,onCompositionStart:e=>{C.current=!0,null==m||m(e)},onCompositionEnd:e=>{C.current=!1,null==j||j(e)},prefixCls:Z,addonAfter:L,suffix:c,onChange:e=>{e&&e.target&&"click"===e.type&&h&&h(e.target.value,e,{source:"clear"}),x&&x(e)},className:$,disabled:v}))})),Z=t(1643);const z=d.Z;z.Group=c,z.Search=P,z.TextArea=Z.Z,z.Password=C;var B=z}}]);