webpackJsonp([57],{"63px":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("Dd8w"),s=n.n(i),o=(n("vAZe"),n("Au9i")),c=n("NYxO"),a={data:function(){return{title:this.$route.params.title,number:this.$route.params.number,toggleItem:{id:"0",name:"不要发票"}}},created:function(){this.fetchTypeItems(),this.fetchContentItems()},computed:s()({},Object(c.c)({getTypeIndex:"getTypeIndex",getContentIndex:"getContentIndex"}),Object(c.e)({typeItems:function(t){return t.invoice.typeItems},contentItems:function(t){return t.invoice.contentItems},title:function(t){return t.invoice.title},toggle:function(t){return t.invoice.toggle}})),methods:s()({},Object(c.d)(["saveInvoiceInfo","setInvoiceToggle"]),Object(c.b)({fetchTypeItems:"fetchInvoiceTypeItems",fetchContentItems:"fetchInvoiceContentItems"}),{goBack:function(){this.$router.go(-1)},onTypeIndexChanged:function(){this.toggle&&(this.setInvoiceToggle(!1),this.$refs.toggle.value=!1)},onContentIndexChanged:function(){this.toggle&&(this.setInvoiceToggle(!1),this.$refs.toggle.value=!1)},cancel:function(){this.toggle?this.setInvoiceToggle(!1):(this.$refs.type.currentIndex=-1,this.$refs.content.currentIndex=-1,this.setInvoiceToggle(!0),this.saveInvoiceInfo({type:null,title:"",number:"",content:null}))},submit:function(){if(!this.toggle){this.setInvoiceToggle(!1);var t=this.$refs.type.currentIndex,e=this.typeItems[t],n=this.title,i=this.number,s=this.$refs.content.currentIndex,c=this.contentItems[s];if(t<0||s<0||n.length<=0)return void Object(o.Toast)("请填写完整发票信息");this.saveInvoiceInfo({type:e,title:n,number:i,content:c})}this.goBack()}})},r={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("mt-header",{staticClass:"header",attrs:{title:"设置发票信息"}},[n("header-item",{attrs:{slot:"left",isBack:!0},on:{onclick:t.goBack},slot:"left"})],1),t._v(" "),n("flow-radio-list",{ref:"type",attrs:{title:"发票类型",items:t.typeItems,selectedIndex:t.getTypeIndex},on:{onIndexChanged:t.onTypeIndexChanged}}),t._v(" "),t._m(0),t._v(" "),n("div",{staticClass:"center-wrapper section-header"},[n("label",{staticClass:"title"},[t._v("发票抬头")]),t._v(" "),n("div",{staticClass:"input-wrapper"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.title,expression:"title"}],attrs:{placeholder:"个人"},domProps:{value:t.title},on:{input:function(e){e.target.composing||(t.title=e.target.value)}}})])]),t._v(" "),n("info-radio-list",{ref:"content",staticClass:"section-header",attrs:{title:"发票明细",items:t.contentItems,selectedIndex:t.getContentIndex},on:{onIndexChanged:t.onContentIndexChanged}}),t._v(" "),n("info-toggle-item",{ref:"toggle",staticClass:"item section-header",attrs:{item:t.toggleItem,isSelected:t.toggle},on:{onclick:t.cancel}}),t._v(" "),n("gk-button",{staticClass:"button",attrs:{type:"primary"},on:{click:t.submit}},[t._v("确认")])],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"tips-wrapper"},[e("label",{staticClass:"tips"},[this._v("怕纸质发票丢失？试试电子发票吧！")])])}]};var l=n("VU/8")(a,r,!1,function(t){n("Ct6G")},"data-v-3d5eadb6",null);e.default=l.exports},Ct6G:function(t,e){}});
//# sourceMappingURL=57.5a7846c48640d4570c04.js.map