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

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[61880],{7406:function(e,n,s){var t=s(82242),a=s.n(t),i=(s(59301),s(93314)),l=s(3113),r=s(37712);n.Z=function(e){var n=e.img,s=e.buttonProps,t=void 0===s?{}:s,c=e.styles,o=void 0===c?{}:c,d=e.customText,u=e.ButtonText,m=e.ButtonClick,h=e.Buttonclass,p=e.ButtonTwo,x=e.imgStyles,f=e.loading,j=void 0!==f&&f;return(0,r.jsxs)("section",{className:"tc animated fadeIn",style:a()(a()({},{color:"#999",margin:"100px auto",visibility:j?"hidden":"visible"}),o),children:[(0,r.jsx)("img",{src:n||i,style:a()(a()({},x),{},{pointerEvents:"none",userSelect:"none"})}),(0,r.jsx)("p",{className:"mt20 font14",children:d||"暂时还没有相关数据哦!"}),u&&(0,r.jsx)(l.ZP,a()(a()({className:h,onClick:m},t),{},{children:u})),p&&p]})}},60128:function(e,n,s){s.d(n,{Z:function(){return v}});var t=s(7557),a=s.n(t),i=s(41498),l=s.n(i),r=s(79800),c=s.n(r),o=s(59301),d=s(7880),u=s(43418),m=s(3113),h="infoModal___tP7wn",p="list___I1pXs",x="li____Spvj",f="btns____auS8",j="confirm___oONio",b="cancel___TcnWk",_=s(37712),v=(0,d.connect)((function(e){return{newShixuns:e.newShixuns,globalSetting:e.globalSetting,user:e.user}}))((function(e){var n=e.visible,s=e.onOk,t=e.onCancel,i=e.width,r=void 0===i?1e3:i,d=e.okText,v=void 0===d?"确认":d,g=e.cancelText,y=void 0===g?"取消":g,Z=e.title,N=e.listLeftWidth,k=void 0===N?"auto":N,S=(0,o.useState)(!1),w=c()(S,2),C=w[0],I=w[1];return(0,_.jsx)(u.Z,{title:Z,open:!!n,width:r,destroyOnClose:!0,centered:!0,onCancel:t,footer:null,children:(0,_.jsxs)("div",{className:h,children:[(0,_.jsx)("div",{className:p,children:"[object Array]"===Object.prototype.toString.call(n)&&n.map((function(e,n){return(0,_.jsxs)("div",{className:x,children:[(0,_.jsx)("span",{style:{width:k},children:e[0]}),(0,_.jsx)("b",{children:e[1]})]},n)}))}),!!s&&(0,_.jsxs)("div",{className:f,children:[(0,_.jsxs)(m.ZP,{onClick:t,className:b,children:[y," "]}),(0,_.jsxs)(m.ZP,{loading:C,onClick:l()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,s();case 3:I(!1);case 4:case"end":return e.stop()}}),e)}))),className:j,type:"primary",children:[v," "]})]})]})})}))},35298:function(e,n,s){s.r(n),s.d(n,{default:function(){return q}});var t=s(7557),a=s.n(t),i=s(82242),l=s.n(i),r=s(41498),c=s.n(r),o=s(79800),d=s.n(o),u=s(39647),m=s.n(u),h=s(59301),p=s(7880),x=s(78241),f=s(8591),j=s(5112),b=s(98135),_=s(95237),v=s(51136),g=s(6457),y="apply___eLIPe",Z="title___wdiGf",N="btn___Fr6Ai",k="unfold___w4kDN",S="formWrap___KCtOI",w=s(60128),C=s(90963),I=s(24334),P=s(37712),T=["user","userDetail","globalSetting","dispatch"],q=(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=e.dispatch,s=(m()(e,T),(0,p.useSearchParams)()),t=d()(s,1)[0],i=JSON.parse(t.get("ids"))||[],r=x.Z.useForm(),o=d()(r,1)[0],u=(0,h.useState)(!1),q=d()(u,2),O=q[0],D=q[1],F=(0,h.useState)(!1),B=d()(F,2),A=B[0],L=B[1],W={amount:Number(I.Base64.decode(t.get("price"))),invoice_type:0,invoice_content:"*信息技术服务*培训费",heading_type:0},E=(0,h.useState)(W),G=d()(E,2),V=G[0],$=G[1];(0,h.useEffect)((function(){return n({type:"globalSetting/footerToggle",payload:!1}),function(){n({type:"globalSetting/footerToggle",payload:!0})}}),[]),(0,h.useEffect)((function(){(0,g.Dk)("发票申请")}),[]);var H=[{name:"我的"},{name:"我购买的课程",path:"/order"},{name:"待开票订单",path:"/order/invoice".concat(location.search)},{name:"开发票"}],J=function(){var e=c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,v.ZP)("/api/invoices.json",{method:"post",body:l()({order_ids:i},V)});case 2:0===e.sent.status&&(f.ZP.success("操作成功"),p.history.push("/order/records"));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,P.jsxs)(h.Fragment,{children:[(0,P.jsx)(C._b,{dataSource:H}),(0,P.jsxs)("div",{className:y,children:[(0,P.jsx)("div",{className:Z,children:"发票申请"}),(0,P.jsxs)(x.Z,{colon:!1,form:o,className:S,initialValues:W,labelCol:{span:7},wrapperCol:{span:17},onValuesChange:function(e,n){return $(l()({},n))},onFinish:function(e){var n=[["发票金额",(0,P.jsxs)("b",{className:"font16",style:{color:"#FA6400",display:"inline-block",transform:"translateY(-2px)"},children:["¥",e.amount]})],["发票类型","增值税电子普通发票"],["发票内容",e.invoice_content],["抬头类型",e.heading_type?"个人":"单位"],["发票抬头",e.invoice_header]];e.heading_type||n.push(["纳税人识别号",e.taxpaper_number]),L(n)},children:[(0,P.jsx)(x.Z.Item,{label:"发票金额",name:"amount",required:!0,children:(0,P.jsxs)("b",{className:"font16",style:{color:"#FA6400"},children:["¥",V.amount]})}),(0,P.jsx)(x.Z.Item,{label:"发票类型",name:"invoice_type",required:!0,children:(0,P.jsx)(j.ZP.Group,{children:(0,P.jsx)(j.ZP,{value:0,children:"增值税电子普通发票"})})}),(0,P.jsx)(x.Z.Item,{label:"发票内容",name:"invoice_content",required:!0,children:(0,P.jsx)("span",{className:"font14",children:V.invoice_content})}),(0,P.jsx)(x.Z.Item,{label:"抬头类型",name:"heading_type",required:!0,className:"mb20",children:(0,P.jsxs)(j.ZP.Group,{children:[(0,P.jsx)(j.ZP,{value:0,children:"单位"}),(0,P.jsx)(j.ZP,{style:{marginLeft:40},value:1,children:"个人"})]})}),(0,P.jsx)(x.Z.Item,{label:"发票抬头",name:"invoice_header",required:!0,rules:[{required:!0,message:"请填写发票抬头"},{whitespace:!0,message:"请填写发票抬头"}],className:"mb30",children:(0,P.jsx)(b.Z,{placeholder:"请填写发票抬头"})}),0===(null==V?void 0:V.heading_type)&&(0,P.jsx)(x.Z.Item,{label:"纳税人识别号",name:"taxpaper_number",required:!0,rules:[{required:!0,message:"请填写纳税人识别号"},{whitespace:!0,message:"请填写纳税人识别号"}],className:"mb30",children:(0,P.jsx)(b.Z,{placeholder:"请填写纳税人识别号"})}),(0,P.jsxs)("div",{style:{display:O?"block":"none"},children:[1===(null==V?void 0:V.heading_type)&&(0,P.jsx)(x.Z.Item,{label:"纳税人识别号",name:"taxpaper_number",className:"mb30",children:(0,P.jsx)(b.Z,{placeholder:"请填写纳税人识别号"})}),(0,P.jsx)(x.Z.Item,{label:"地址",name:"address",className:"mb30",children:(0,P.jsx)(b.Z,{placeholder:"请填写地址"})}),(0,P.jsx)(x.Z.Item,{label:"联系电话",name:"phone",className:"mb30",rules:[{pattern:/^[^\u4e00-\u9fa5]+$/,message:"请输入正确的联系电话"}],children:(0,P.jsx)(b.Z,{placeholder:"请填写联系电话"})}),(0,P.jsx)(x.Z.Item,{label:"开户行",name:"bank",className:"mb30",children:(0,P.jsx)(b.Z,{placeholder:"请填写开户行"})}),(0,P.jsx)(x.Z.Item,{label:"银行账号",name:"bank_number",className:"mb30",rules:[{pattern:/^[^\u4e00-\u9fa5]+$/,message:"请输入正确的银行账号"}],children:(0,P.jsx)(b.Z,{placeholder:"请填写银行账号"})})]})]}),(0,P.jsx)("div",{className:k,children:(0,P.jsxs)("div",{onClick:function(){return D(!O)},children:[O?"收起":"更多信息",O?(0,P.jsx)("i",{className:"iconfont icon-xialajiantou1"}):(0,P.jsx)("i",{className:"iconfont icon-xialajiantoubeifen"})]})}),(0,P.jsxs)(_.Z,{align:"middle",justify:"center",children:[(0,P.jsx)(C.op,{onClick:function(){return p.history.push("/order/invoice".concat(location.search))},style:{borderRadius:2,height:38,lineHeight:"36px",background:"#fff",boxShadow:"none",padding:"0 20px"},children:"取消"}),(0,P.jsx)("div",{onClick:function(){return o.submit()},className:N,children:"提交"})]})]}),(0,P.jsx)(w.Z,{okText:"确认提交",cancelText:"再看看",width:504,title:"确认发票主要信息",visible:A,listLeftWidth:105,onCancel:function(){return L(!1)},onOk:J})]})}))}}]);