MrShi
12 小时以前 ce06ca62a0dd65d4a8fb57126948449c804ad77e
small-program/unpackage/dist/dev/mp-weixin/shop/pages/Invoice-application/Invoice-application.js
@@ -1,2 +1,2 @@
require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["shop/pages/Invoice-application/Invoice-application"],{514:function(n,e,t){"use strict";(function(n,e){var o=t(4);t(30);o(t(25));var i=o(t(515));n.__webpack_require_UNI_MP_PLUGIN__=t,e(i.default)}).call(this,t(1)["default"],t(2)["createPage"])},515:function(n,e,t){"use strict";t.r(e);var o=t(516),i=t(518);for(var a in i)["default"].indexOf(a)<0&&function(n){t.d(e,n,(function(){return i[n]}))}(a);t(520);var r,c=t(41),s=Object(c["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"2503450a",null,!1,o["components"],r);s.options.__file="shop/pages/Invoice-application/Invoice-application.vue",e["default"]=s.exports},516:function(n,e,t){"use strict";t.r(e);var o=t(517);t.d(e,"render",(function(){return o["render"]})),t.d(e,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(e,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(e,"components",(function(){return o["components"]}))},517:function(n,e,t){"use strict";var o;t.r(e),t.d(e,"render",(function(){return i})),t.d(e,"staticRenderFns",(function(){return r})),t.d(e,"recyclableRender",(function(){return a})),t.d(e,"components",(function(){return o}));try{o={uIcon:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(t.bind(null,1116))},uPopup:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(t.bind(null,1125))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var n=this,e=n.$createElement,t=(n._self._c,"apply"!==n.currentTab?n.__map(n.historyList,(function(e,t){var o=n.__get_orig(e),i=e.actions&&e.actions.length;return{$orig:o,g0:i}})):null),o=n.__map(n.tabs,(function(e,t){var o=n.__get_orig(e),i=n.getTabIcon(e),a=i?n.getTabIcon(e):null;return{$orig:o,m0:i,m1:a}}));n._isMounted||(n.e0=function(e){n.email=""},n.e1=function(e,t){var o=arguments[arguments.length-1].currentTarget.dataset,i=o.eventParams||o["event-params"];t=i.tab;n.currentTab=t.value}),n.$mp.data=Object.assign({},{$root:{l0:t,l1:o}})},a=!1,r=[];i._withStripped=!0},518:function(n,e,t){"use strict";t.r(e);var o=t(519),i=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(a);e["default"]=i.a},519:function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={data:function(){return{currentTab:"apply",keyword:"",showEmailPopup:!1,email:"38742937@qq.com",currentYear:"近一年",tabs:[{label:"开票",value:"apply",icon:"/shop/static/icon/nav_kaipiao@2x.png",activeIcon:"/shop/static/icon/nav_kaipiao_sel@2x.png"},{label:"开票历史",value:"history",icon:"/shop/static/icon/nav_lishi@2x.png",activeIcon:"/shop/static/icon/nav_lishi_sel@2x.png"}],applyList:[{id:1,orderNo:"202607131742520001",fromAddress:"安徽省合肥市蜀山区莲花科技产业园F401",fromUser:"张海涛 18733987653",toAddress:"安徽省合肥市蜀山区尚泽大都会2栋302",toUser:"张海涛 18733987653",goodsText:"大件行李*1、中件行李*2、小件行李*3、背...",amount:"125.00"},{id:2,orderNo:"202607131742520001",fromAddress:"安徽省合肥市蜀山区莲花科技产业园F401",fromUser:"张海涛 18733987653",toAddress:"安徽省合肥市蜀山区尚泽大都会2栋302",toUser:"张海涛 18733987653",goodsText:"大件行李*1、中件行李*2、小件行李*3、背...",amount:"125.00"}],historyList:[{id:1,company:"安徽豆米科技有限公司",status:"processing",statusText:"开票中",ticketType:"电子专用发票",amount:"100.00",applyNo:"202607131742520001",invoiceNo:"20260713174252000324",applyTime:"2026-05-12 11:34:11",failReason:"",actions:[]},{id:2,company:"安徽豆米科技有限公司",status:"done",statusText:"已开票",ticketType:"电子专用发票",amount:"100.00",applyNo:"202607131742520001",invoiceNo:"20260713174252000324",applyTime:"2026-05-12 11:34:11",failReason:"",actions:[{text:"查看电子发票",primary:!1},{text:"发送至邮箱",primary:!0}]},{id:3,company:"安徽豆米科技有限公司",status:"failed",statusText:"开票失败",ticketType:"电子专用发票",amount:"100.00",applyNo:"202607131742520001",invoiceNo:"20260713174252000324",applyTime:"2026-05-12 11:34:11",failReason:"发票抬头错误",actions:[{text:"申请开票",primary:!0}]}]}},methods:{getTabIcon:function(n){return this.currentTab===n.value?n.activeIcon:n.icon},goInvoiceRequest:function(e){var t=e&&e.id?"?id=".concat(e.id):"";n.navigateTo({url:"/shop/pages/Invoice-request/Invoice-request".concat(t)})},handleAction:function(n){"发送至邮箱"!==n.text?"申请开票"===n.text&&this.goInvoiceRequest():this.showEmailPopup=!0},closeEmailPopup:function(){this.showEmailPopup=!1},confirmSendEmail:function(){this.showEmailPopup=!1}}};e.default=t}).call(this,t(2)["default"])},520:function(n,e,t){"use strict";t.r(e);var o=t(521),i=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(a);e["default"]=i.a},521:function(n,e,t){}},[[514,"common/runtime","common/vendor"]]]);
require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["shop/pages/Invoice-application/Invoice-application"],{514:function(t,e,n){"use strict";(function(t,e){var i=n(4);n(30);i(n(25));var o=i(n(515));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n(1)["default"],n(2)["createPage"])},515:function(t,e,n){"use strict";n.r(e);var i=n(516),o=n(518);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n(520);var r,s=n(41),c=Object(s["default"])(o["default"],i["render"],i["staticRenderFns"],!1,null,"2503450a",null,!1,i["components"],r);c.options.__file="shop/pages/Invoice-application/Invoice-application.vue",e["default"]=c.exports},516:function(t,e,n){"use strict";n.r(e);var i=n(517);n.d(e,"render",(function(){return i["render"]})),n.d(e,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(e,"components",(function(){return i["components"]}))},517:function(t,e,n){"use strict";var i;n.r(e),n.d(e,"render",(function(){return o})),n.d(e,"staticRenderFns",(function(){return r})),n.d(e,"recyclableRender",(function(){return a})),n.d(e,"components",(function(){return i}));try{i={uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,561))},uPopup:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(n.bind(null,570))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var t=this,e=t.$createElement,n=(t._self._c,"apply"===t.currentTab?t.__map(t.applyList,(function(e,n){var i=t.__get_orig(e),o=((e.estimatedAmount||0)/100).toFixed(2);return{$orig:i,g0:o}})):null),i="apply"!==t.currentTab?t.__map(t.historyList,(function(e,n){var i=t.__get_orig(e),o=((e.invoiceAmount||0)/100).toFixed(2),a=e.actions&&e.actions.length;return{$orig:i,g1:o,g2:a}})):null,o=t.__map(t.tabs,(function(e,n){var i=t.__get_orig(e),o=t.getTabIcon(e),a=o?t.getTabIcon(e):null;return{$orig:i,m0:o,m1:a}}));t._isMounted||(t.e0=function(e){t.email=""},t.e1=function(e,n){var i=arguments[arguments.length-1].currentTarget.dataset,o=i.eventParams||i["event-params"];n=o.tab;t.currentTab=n.value}),t.$mp.data=Object.assign({},{$root:{l0:n,l1:i,l2:o}})},a=!1,r=[];o._withStripped=!0},518:function(t,e,n){"use strict";n.r(e);var i=n(519),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},519:function(t,e,n){"use strict";(function(t){var i=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n(34)),a=i(n(18)),r=i(n(36)),s={data:function(){return{currentTab:"apply",keyword:"",showEmailPopup:!1,email:"",currentInvoiceRecordId:"",currentYear:"近一年",tabs:[{label:"开票",value:"apply",icon:"/shop/static/icon/nav_kaipiao@2x.png",activeIcon:"/shop/static/icon/nav_kaipiao_sel@2x.png"},{label:"开票历史",value:"history",icon:"/shop/static/icon/nav_lishi@2x.png",activeIcon:"/shop/static/icon/nav_lishi_sel@2x.png"}],applyList:[],page:1,capacity:10,isRequest:!0,historyPage:1,historyCapacity:10,historyIsRequest:!0,historyList:[]}},watch:{currentTab:function(){"apply"===this.currentTab?(this.page=1,this.applyList=[],this.isRequest=!0,this.getApplyList()):"history"===this.currentTab&&(this.historyPage=1,this.historyList=[],this.historyIsRequest=!0,this.getHistoryList())}},onLoad:function(){this.getApplyList()},onReachBottom:function(){"apply"===this.currentTab?this.getApplyList():"history"===this.currentTab&&this.getHistoryList()},methods:{getApplyList:function(){var t=this;return(0,r.default)(o.default.mark((function e(){var n,i;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.isRequest){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.$u.api.myOrderPage({capacity:t.capacity,page:t.page,model:{invoiceStatus:1,keyword:t.keyword}});case 4:n=e.sent,200===n.code&&(i=n.data.records||[],i.forEach((function(t){t.detailList&&t.detailList.length>0&&(t.goodsText=t.detailList.map((function(t){return t.luggageName+"*"+t.num})).join("、"))})),t.applyList=[].concat((0,a.default)(t.applyList),(0,a.default)(i)),t.page++,n.data.total<=t.applyList.length&&(t.isRequest=!1));case 6:case"end":return e.stop()}}),e)})))()},getHistoryList:function(){var t=this;return(0,r.default)(o.default.mark((function e(){var n,i;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.historyIsRequest){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.$u.api.invoicePage({page:t.historyPage,capacity:t.historyCapacity,model:{orderNo:t.keyword}});case 4:n=e.sent,200===n.code&&(i=n.data.records||[],i.forEach((function(t){1===t.status&&(t.actions=[{text:"发送至邮箱",primary:!0}])})),t.historyList=[].concat((0,a.default)(t.historyList),(0,a.default)(i)),t.historyPage++,n.data.total<=t.historyList.length&&(t.historyIsRequest=!1));case 6:case"end":return e.stop()}}),e)})))()},handleSearch:function(){this.historyPage=1,this.historyList=[],this.historyIsRequest=!0,this.getHistoryList()},getTabIcon:function(t){return this.currentTab===t.value?t.activeIcon:t.icon},goInvoiceRequest:function(e){var n=[];e&&e.id&&n.push("id=".concat(e.id)),e&&e.code&&n.push("orderNo=".concat(e.code)),e&&e.estimatedAmount&&n.push("invoiceAmount=".concat(((e.estimatedAmount||0)/100).toFixed(2)));var i=n.length?"?".concat(n.join("&")):"";t.navigateTo({url:"/shop/pages/Invoice-request/Invoice-request".concat(i)})},handleAction:function(t,e){if("发送至邮箱"===t.text)return this.currentInvoiceRecordId=e.id,void(this.showEmailPopup=!0);"申请开票"===t.text&&this.goInvoiceRequest()},closeEmailPopup:function(){this.showEmailPopup=!1},confirmSendEmail:function(){var e=this;return(0,r.default)(o.default.mark((function n(){var i;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.email){n.next=3;break}return t.showToast({title:"请输入邮箱",icon:"none"}),n.abrupt("return");case 3:return n.next=5,e.$u.api.sendEmail({email:e.email,invoiceRecordId:e.currentInvoiceRecordId});case 5:i=n.sent,200===i.code&&(t.showToast({title:"发送成功",icon:"success"}),e.showEmailPopup=!1,e.email="");case 7:case"end":return n.stop()}}),n)})))()}}};e.default=s}).call(this,n(2)["default"])},520:function(t,e,n){"use strict";n.r(e);var i=n(521),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},521:function(t,e,n){}},[[514,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/shop/pages/Invoice-application/Invoice-application.js.map