require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageIndex/invoice/invoice"],{"749f":function(t,e,i){"use strict";i.r(e);var n=i("dc62"),r=i("fefe");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);var o=i("828b"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=s.exports},d1b6:function(t,e,i){"use strict";(function(t,e){var n=i("47a9");i("7748");n(i("3240"));var r=n(i("749f"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(r.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},dc62:function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return n}));var n={mescrollBody:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/mescroll-uni/components/mescroll-body/mescroll-body")]).then(i.bind(null,"6eb1"))},uniIcons:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(i.bind(null,"3d33"))}},r=function(){var t=this,e=t.$createElement,i=(t._self._c,t.__map(t.list,(function(e,i){var n=t.__get_orig(e),r=t.$field.findTypeName("invoiceType",e.invoiceType);return{$orig:n,g0:r}})));t.$mp.data=Object.assign({},{$root:{a0:{},l0:i}})},a=[]},df61:function(t,e,i){"use strict";(function(t){var n=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i("207f"),a=i("aa26"),o=n(i("453b")),s={mixins:[o.default],data:function(){return{list:[],type:"",menu:{},payClientId:"",payMerchantId:"",paymentIds:""}},onLoad:function(e){var i=this;this.type=parseInt(e.type),this.menu=this.title(),this.paymentIds=e.paymentIds,t.setNavigationBarTitle({title:this.menu.title}),t.$on("reloadContract",(function(){i.mescroll.resetUpScroll(!1)}))},methods:{title:function(){var t={title:"",iconClass:"icon-app-hetongguanli-hetongfapiao"};switch(this.type){case 1:t={title:"合同发票",iconClass:"icon-app-hetongguanli-hetongfapiao"};break;case 2:t={title:"常规发票",iconClass:"icon-integralrecord"};break;default:break}return t},upCallback:function(t){var e=this,i={currPage:t.num,pageSize:10,projectId:this.$store.getters.project.id,type:this.type};if(this.paymentIds)return i["paymentIds"]=this.paymentIds.split(","),this.getBillList(i);if(3===this.$store.getters.identity.id||6===this.$store.getters.identity.id)i["organizationId"]=this.$store.getters.organization.id,this.getBillList(i);else if(4===this.$store.getters.identity.id){if(this.payMerchantId)return i["payMerchantId"]=this.payMerchantId,void this.getBillList(i);(0,a.bindProjectDetail)({bindOrganizationId:this.$store.getters.organization.id,projectId:this.$store.getters.project.id,identityId:4}).then((function(t){if(200===t.code){if(0==t.data.length)return e.mescroll.endBySize(0,0);e.payMerchantId=t.data[0].merchantId,i["payMerchantId"]=e.payMerchantId,e.getBillList(i)}else e.mescroll.endErr()})).catch((function(){e.mescroll.endErr()}))}else if(1===this.$store.getters.identity.id){if(this.payClientId)return i["payClientId"]=this.payClientId,void this.getBillList(i);(0,a.bindProjectDetail)({userId:this.$store.getters.user.userId,projectId:this.$store.getters.project.id,identityId:1}).then((function(t){if(200===t.code){if(0==t.data.length)return e.mescroll.endBySize(0,0);e.payClientId=t.data[0].clientId,i["payClientId"]=e.payClientId,e.getBillList(i)}else e.mescroll.endErr()})).catch((function(){e.mescroll.endErr()}))}},getBillList:function(t){var e=this;(0,r.getInvoiceListByPage)(t).then((function(i){if(200===i.code){e.mescroll.endBySize(i.data.dataList.length,i.data.totalCount),1==t.currPage&&(e.list=[]);var n=i.data.dataList;e.list=e.list.concat(n)}else e.mescroll.endErr()})).catch((function(){e.mescroll.endErr()}))}}};e.default=s}).call(this,i("df3c")["default"])},fefe:function(t,e,i){"use strict";i.r(e);var n=i("df61"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a}},[["d1b6","common/runtime","common/vendor","pageIndex/common/vendor"]]]);