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
6.9 KiB
1 line
6.9 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[61880],{50912:function(e,n,a){a.d(n,{Z:function(){return g}});var s=a(7557),t=a.n(s),i=a(41498),r=a.n(i),l=a(79800),c=a.n(l),o=a(59301),d=a(80608),u=a(43418),h=a(3113),m="infoModal___tP7wn",p="list___I1pXs",x="li____Spvj",f="btns____auS8",j="confirm___oONio",b="cancel___TcnWk",_=a(37712),g=(0,d.connect)((function(e){return{newShixuns:e.newShixuns,globalSetting:e.globalSetting,user:e.user}}))((function(e){var n=e.visible,a=e.onOk,s=e.onCancel,i=e.width,l=void 0===i?1e3:i,d=e.okText,g=void 0===d?"确认":d,v=e.cancelText,Z=void 0===v?"取消":v,y=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:y,open:!!n,width:l,destroyOnClose:!0,centered:!0,onCancel:s,footer:null,children:(0,_.jsxs)("div",{className:m,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)}))}),!!a&&(0,_.jsxs)("div",{className:f,children:[(0,_.jsxs)(h.ZP,{onClick:s,className:b,children:[Z," "]}),(0,_.jsxs)(h.ZP,{loading:C,onClick:r()(t()().mark((function e(){return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,a();case 3:I(!1);case 4:case"end":return e.stop()}}),e)}))),className:j,type:"primary",children:[g," "]})]})]})})}))},19475:function(e,n,a){a.r(n),a.d(n,{default:function(){return O}});var s=a(7557),t=a.n(s),i=a(82242),r=a.n(i),l=a(41498),c=a.n(l),o=a(79800),d=a.n(o),u=a(39647),h=a.n(u),m=a(59301),p=a(80608),x=a(78241),f=a(8591),j=a(5112),b=a(24650),_=a(95237),g=a(49105),v=a(27876),Z="apply___eLIPe",y="title___wdiGf",N="btn___Fr6Ai",k="unfold___w4kDN",S="formWrap___KCtOI",w=a(50912),C=a(2753),I=a(24334),P=a(37712),q=["user","userDetail","globalSetting","dispatch"],O=(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,a=(h()(e,q),(0,p.useSearchParams)()),s=d()(a,1)[0],i=JSON.parse(s.get("ids"))||[],l=x.Z.useForm(),o=d()(l,1)[0],u=(0,m.useState)(!1),O=d()(u,2),T=O[0],D=O[1],F=(0,m.useState)(!1),A=d()(F,2),L=A[0],W=A[1],G={amount:Number(I.Base64.decode(s.get("price"))),invoice_type:0,invoice_content:"*信息技术服务*培训费",heading_type:0},E=(0,m.useState)(G),V=d()(E,2),$=V[0],B=V[1];(0,m.useEffect)((function(){return n({type:"globalSetting/footerToggle",payload:!1}),function(){n({type:"globalSetting/footerToggle",payload:!0})}}),[]),(0,m.useEffect)((function(){(0,v.Dk)("发票申请")}),[]);var H=[{name:"我的"},{name:"我购买的课程",path:"/order"},{name:"待开票订单",path:"/order/invoice".concat(location.search)},{name:"开发票"}],J=function(){var e=c()(t()().mark((function e(){return t()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.ZP)("/api/invoices.json",{method:"post",body:r()({order_ids:i},$)});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)(m.Fragment,{children:[(0,P.jsx)(C._b,{dataSource:H}),(0,P.jsxs)("div",{className:Z,children:[(0,P.jsx)("div",{className:y,children:"发票申请"}),(0,P.jsxs)(x.Z,{colon:!1,form:o,className:S,initialValues:G,labelCol:{span:7},wrapperCol:{span:17},onValuesChange:function(e,n){return B(r()({},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]),W(n)},children:[(0,P.jsx)(x.Z.Item,{label:"发票金额",name:"amount",required:!0,children:(0,P.jsxs)("b",{className:"font16",style:{color:"#FA6400"},children:["¥",$.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:$.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==$?void 0:$.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:T?"block":"none"},children:[1===(null==$?void 0:$.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(!T)},children:[T?"收起":"更多信息",T?(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:L,listLeftWidth:105,onCancel:function(){return W(!1)},onOk:J})]})}))}}]); |