(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/invoice/invoice"],{327:function(e,t,n){"use strict";(function(e,t){var i=n(4);n(26);i(n(25));var r=i(n(328));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n(1)["default"],n(2)["createPage"])},328:function(e,t,n){"use strict";n.r(t);var i=n(329),r=n(331);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);var s,a=n(32),c=Object(a["default"])(r["default"],i["render"],i["staticRenderFns"],!1,null,null,null,!1,i["components"],s);c.options.__file="pages/invoice/invoice.vue",t["default"]=c.exports},329:function(e,t,n){"use strict";n.r(t);var i=n(330);n.d(t,"render",(function(){return i["render"]})),n.d(t,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(t,"components",(function(){return i["components"]}))},330:function(e,t,n){"use strict";var i;n.r(t),n.d(t,"render",(function(){return r})),n.d(t,"staticRenderFns",(function(){return s})),n.d(t,"recyclableRender",(function(){return o})),n.d(t,"components",(function(){return i}));try{i={mescrollBody:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/mescroll-uni/components/mescroll-body/mescroll-body")]).then(n.bind(null,468))},uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,460))}}}catch(a){if(-1===a.message.indexOf("Cannot find module")||-1===a.message.indexOf(".vue"))throw a;console.error(a.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var e=this,t=e.$createElement,n=(e._self._c,{}),i=e.__map(e.list,(function(t,n){var i=e.__get_orig(t),r=e.$field.findTypeName("invoiceType",t.invoiceType);return{$orig:i,g0:r}}));e.$mp.data=Object.assign({},{$root:{a0:n,l0:i}})},o=!1,s=[];r._withStripped=!0},331:function(e,t,n){"use strict";n.r(t);var i=n(332),r=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=r.a},332:function(e,t,n){"use strict";(function(e){var i=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(333),o=n(221),s=i(n(58)),a={mixins:[s.default],data:function(){return{list:[],type:"",menu:{},payClientId:"",payMerchantId:"",paymentIds:""}},onLoad:function(t){var n=this;this.type=parseInt(t.type),this.menu=this.title(),this.paymentIds=t.paymentIds,e.setNavigationBarTitle({title:this.menu.title}),e.$on("reloadContract",(function(){n.mescroll.resetUpScroll(!1)}))},methods:{title:function(){var e={title:"",iconClass:"icon-app-hetongguanli-hetongfapiao"};switch(this.type){case 1:e={title:"合同发票",iconClass:"icon-app-hetongguanli-hetongfapiao"};break;case 2:e={title:"常规发票",iconClass:"icon-integralrecord"};break;default:break}return e},upCallback:function(e){var t=this,n={currPage:e.num,pageSize:10,projectId:this.$store.getters.project.id,type:this.type};if(this.paymentIds)return n["paymentIds"]=this.paymentIds.split(","),this.getBillList(n);if(3===this.$store.getters.identity.id||6===this.$store.getters.identity.id)n["organizationId"]=this.$store.getters.organization.id,this.getBillList(n);else if(4===this.$store.getters.identity.id){if(this.payMerchantId)return n["payMerchantId"]=this.payMerchantId,void this.getBillList(n);(0,o.bindProjectDetail)({bindOrganizationId:this.$store.getters.organization.id,projectId:this.$store.getters.project.id,identityId:4}).then((function(e){if(200===e.code){if(0==e.data.length)return t.mescroll.endBySize(0,0);t.payMerchantId=e.data[0].merchantId,n["payMerchantId"]=t.payMerchantId,t.getBillList(n)}else t.mescroll.endErr()})).catch((function(){t.mescroll.endErr()}))}else if(1===this.$store.getters.identity.id){if(this.payClientId)return n["payClientId"]=this.payClientId,void this.getBillList(n);(0,o.bindProjectDetail)({userId:this.$store.getters.user.userId,projectId:this.$store.getters.project.id,identityId:1}).then((function(e){if(200===e.code){if(0==e.data.length)return t.mescroll.endBySize(0,0);t.payClientId=e.data[0].clientId,n["payClientId"]=t.payClientId,t.getBillList(n)}else t.mescroll.endErr()})).catch((function(){t.mescroll.endErr()}))}},getBillList:function(e){var t=this;(0,r.getInvoiceListByPage)(e).then((function(n){if(200===n.code){t.mescroll.endBySize(n.data.dataList.length,n.data.totalCount),1==e.currPage&&(t.list=[]);var i=n.data.dataList;t.list=t.list.concat(i)}else t.mescroll.endErr()})).catch((function(){t.mescroll.endErr()}))}}};t.default=a}).call(this,n(2)["default"])}},[[327,"common/runtime","common/vendor"]]]); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/invoice/invoice.js.map