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
72 KiB
1 line
72 KiB
9 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order_details-index","pages-users-order_confirm-index~pages-users-order_list-index"],{"02a0":function(e,t,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("d401"),i("d3b7"),i("25f0"),i("7db0"),i("ac1f"),i("00b4");var o=n(i("5530")),a=i("c6c3"),r=i("26cb"),s={props:{invoice:{type:Object,default:function(){return{invoice:!1,mer_id:0}}}},computed:(0,o.default)({},(0,r.mapGetters)(["viewColor"])),data:function(){return{id:"",receipt_title_type:"1",receipt_type:"1",drawer_phone:"",receipt_title:"",duty_paragraph:"",tel:"",address:"",bank_name:"",bank_code:"",is_default:0,email:"",isDefault:[],typeName:"增值税电子普通发票",popupType:!1,popupTitle:!1,invoiceTypeList:[{type:"1",name:"增值税电子普通发票",info:"默认发送至所提供的电子邮件"},{type:"2",name:"增值税专用发票",info:"纸质发票开出后将以邮寄形式交付"}],special_invoice:!0,invoice_func:!0,invoiceList:[],invoice_checked:"",invoice_id:"",order_id:"",news:"",cartId:"",pinkId:"",couponId:"",addressId:"",invoiceData:{},formvalidate:!1}},watch:{},onLoad:function(e){this.news=e.news,this.cartId=e.cartId,this.pinkId=e.pinkId,this.couponId=e.couponId,this.addressId=e.addressId,"false"==e.special_invoice&&this.$set(this,"special_invoice",!1)},onShow:function(){this.getInvoiceDefault(),this.popupTitle=!1},methods:{getInvoiceList:function(){var e=this;(0,a.invoice)().then((function(t){for(var i=0;i<t.data.length;i++)t.data[i].user_receipt_id=t.data[i].user_receipt_id.toString(),t.data[i].is_default&&(e.invoice_id=t.data[i].user_receipt_id);e.$set(e,"invoiceList",t.data)})).catch((function(t){e.$util.Tips({title:t})}))},getInvoiceDefault:function(){var e=this;(0,a.invoice)({is_default:1}).then((function(t){var i=t.data[0];e.typeName="1"==i.receipt_type?"增值税电子普通发票":"增值税专用发票",e.receipt_title_type=i.receipt_title_type,e.receipt_type=i.receipt_type,e.receipt_title=i.receipt_title,e.email=i.email,e.duty_paragraph=i.duty_paragraph,e.bank_name=i.bank_name,e.bank_code=i.bank_code,e.address=i.address,e.tel=i.tel,e.invoice_id=i.user_receipt_id.toString()})).catch((function(e){}))},getInvoiceDetail:function(e){var t=this;(0,a.invoiceDetail)(e).then((function(e){uni.hideLoading(),t.receipt_title_type=e.data.receipt_title_type,t.receipt_type=e.data.receipt_type,t.typeName="1"==t.receipt_type?"增值税电子普通发票":"增值税专用发票",t.receipt_title=e.data.receipt_title,t.email=e.data.email,t.duty_paragraph=e.data.duty_paragraph,t.bank_name=e.data.bank_name,t.bank_code=e.data.bank_code,t.address=e.data.address,t.tel=e.data.tel,t.is_default=e.data.is_default})).catch((function(e){uni.hideLoading(),t.$util.Tips({title:e})}))},close:function(){this.formvalidate?this.$emit("changeInvoiceClose",this.invoiceData):this.$emit("changeInvoiceClose","")},noInvoice:function(){uni.setStorage({key:"invoice_Data",data:{},success:function(){}}),this.$emit("changeInvoiceClose","")},callType:function(){this.popupType=!0},changeType:function(e){var t=this;this.receipt_type=e.detail.value,this.typeName=this.invoiceTypeList.find((function(e){return e.type==t.receipt_type})).name},closeType:function(){this.popupType=!1},callTitle:function(){this.popupTitle=!0},changeTitle:function(e){this.invoice_id=e.detail.value.toString(),this.getInvoiceDetail(e.detail.value),this.popupTitle=!1},addTitle:function(){this.popupType=!1,this.popupTitle=!1,uni.navigateTo({url:"/pages/users/user_invoice_form/index?mer_id="+this.invoice.mer_id})},closeTitle:function(){this.popupTitle=!1},changeHeader:function(e){this.receipt_title_type=e.detail.value,1==e.detail.value&&(this.receipt_type=1,this.typeName="增值税电子普通发票"),this.receipt_type},changeDefault:function(e){this.is_default=e.detail.value.length?1:0},formSubmit:function(e){var t=e.detail.value;if(!t.receipt_title_type)return this.$util.Tips({title:"请填写发票抬头"});if(!t.email)return this.$util.Tips({title:"请填写邮箱"});if(!/^\w+([
|