forked from php-danfu.shenzhenbenwo.com

lefengyang
2025-09-10 3c9dcaf742cfa3e3c2b0843c8752cf7713aaf1fc
1
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_invoice_list/index"],{5365:function(t,e,i){"use strict";(function(t,e){var n=i("47a9");i("2ea2");n(i("3240"));var o=n(i("bcfa"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(o.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},"609a":function(t,e,i){"use strict";i.r(e);var n=i("feb3"),o=i.n(n);for(var c in n)["default"].indexOf(c)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(c);e["default"]=o.a},"78d4":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=(t._self._c,t.$t("发票记录")),n=t.$t("抬头管理"),o=t.$t("发票"),c=t.$t("申请时间"),a=t.$t("¥"),s=t.$t("查看详情"),r=t.__map(t.orderList,(function(e,i){var n=t.__get_orig(e),o=1===e.header_type?t.$t("个人"):null,c=1!==e.header_type?t.$t("企业"):null,a=1===e.type?t.$t("普通"):null,s=1!==e.type?t.$t("专用"):null,r=e.is_invoice?t.$t("已开票"):null,l=e.is_invoice?null:t.$t("未开票");return{$orig:n,m2:o,m3:c,m4:a,m5:s,m9:r,m10:l}})),l=2===t.page&&!t.orderList.length,u=t.$t("没有发票信息哟~"),d=t.invoiceList.length,f=d?t.__map(t.invoiceList,(function(e,i){var n=t.__get_orig(e),o=(1===e.type||2===e.type&&t.specialInvoice)&&e.is_default?t.$t("默认"):null,c=(1===e.type||2===e.type&&t.specialInvoice)&&1===e.type&&1===e.header_type?t.$t("个人普通发票"):null,a=!(1===e.type||2===e.type&&t.specialInvoice)||1===e.type&&1===e.header_type||1!==e.type||2!==e.header_type?null:t.$t("企业普通发票"),s=!(1===e.type||2===e.type&&t.specialInvoice)||1===e.type&&1===e.header_type||1===e.type&&2===e.header_type?null:t.$t("企业专用发票"),r=1===e.type||2===e.type&&t.specialInvoice?t.$t("联系邮箱"):null,l=(1===e.type||2===e.type&&t.specialInvoice)&&2===e.header_type?t.$t("企业税号"):null,u=(1===e.type||2===e.type&&t.specialInvoice)&&1===e.header_type&&e.drawer_phone?t.$t("联系电话"):null,d=1===e.type||2===e.type&&t.specialInvoice?t.$t("编辑"):null,f=1===e.type||2===e.type&&t.specialInvoice?t.$t("删除"):null;return{$orig:n,m13:o,m14:c,m15:a,m16:s,m17:r,m18:l,m19:u,m20:d,m21:f}})):null,p=2===t.page&&!t.invoiceList.length,v=t.$t("没有发票信息哟~"),h=t.$t("添加新发票");t.$mp.data=Object.assign({},{$root:{m0:i,m1:n,m6:o,m7:c,m8:a,m11:s,l0:r,g0:l,m12:u,g1:d,l1:f,g2:p,m22:v,m23:h}})},o=[]},b50c:function(t,e,i){},bcfa:function(t,e,i){"use strict";i.r(e);var n=i("78d4"),o=i("609a");for(var c in o)["default"].indexOf(c)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(c);i("cf26");var a=i("828b"),s=Object(a["a"])(o["default"],n["b"],n["c"],!1,null,"1d4aa694",null,!1,n["a"],void 0);e["default"]=s.exports},cf26:function(t,e,i){"use strict";var n=i("b50c"),o=i.n(n);o.a},feb3:function(t,e,i){"use strict";(function(t){var n=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i("8f59"),c=i("a05e"),a=i("1a5b"),s=n(i("0cf0")),r=i("9ad6"),l={components:{home:function(){Promise.all([i.e("common/vendor"),i.e("components/home/index")]).then(function(){return resolve(i("05b1"))}.bind(null,i)).catch(i.oe)}},mixins:[s.default],data:function(){return{imgHost:r.HTTP_REQUEST_URL,orderList:[],invoiceList:[],nav:1,page:1,limit:30,loading:!1,finished:!1,specialInvoice:!0}},watch:{nav:{immediate:!0,handler:function(t){switch(this.page=1,t){case 1:this.orderList=[],this.getOrderList();break;case 2:this.invoiceList=[],this.getInvoiceList();break}}}},computed:(0,o.mapGetters)(["isLogin"]),onLoad:function(t){"invoice_form"===t.from&&(this.nav=2),this.getUserInfo()},methods:{getInvoiceLink:function(e){t.showLoading({title:"复制中"}),(0,a.getInvoiceLink)(e).then((function(e){t.setClipboardData({data:e.data.downloadBase64.pdfUrl,success:function(){return t.showToast({title:"链接已复制"})}})}))},getUserInfo:function(){var t=this;(0,c.getUserInfo)().then((function(e){var i=e.data.special_invoice;t.specialInvoice=i}))},navTab:function(t){this.nav!==t&&(this.nav=t)},getOrderList:function(){var e=this;t.showLoading({title:this.$t("加载中")}),(0,a.orderInvoiceList)({page:this.page,limit:this.limit}).then((function(i){var n=i.data;t.hideLoading(),e.orderList=e.orderList.concat(n),e.finished=n.length<e.limit,e.page+=1})).catch((function(e){t.showToast({title:e.msg,icon:"none"})}))},getInvoiceList:function(){var e=this;t.showLoading({title:this.$t("加载中")}),(0,c.invoiceList)({page:this.page,limit:this.limit}).then((function(i){var n=i.data;t.hideLoading(),e.invoiceList=e.invoiceList.concat(n),e.finished=n.length<e.limit,e.page+=1})).catch((function(e){t.showToast({title:e.msg,icon:"none"})}))},editInvoice:function(e){t.navigateTo({url:"/pages/users/user_invoice_form/index?id=".concat(e)})},deleteInvoice:function(e){var i=this;t.showModal({content:i.$t("删除该发票?"),confirmColor:"#E93323",success:function(t){t.confirm&&(0,c.invoiceDelete)(e).then((function(){i.$util.Tips({title:i.$t("删除成功"),icon:"success"},(function(){var t=i.invoiceList.findIndex((function(t){return t.id==e}));i.invoiceList.splice(t,1)}))})).catch((function(t){return i.$util.Tips({title:t})}))}})}}};e.default=l}).call(this,i("df3c")["default"])}},[["5365","common/runtime","common/vendor"]]]);