contract.js 3.7 KB

1
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageIndex/contract/contract"],{"585e":function(t,e,n){"use strict";n.r(e);var i=n("6e46"),r=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"]=r.a},"6e46":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("e9bc"),a=n("aa26"),c=i(n("453b")),o={mixins:[c.default],data:function(){return{list:[],type:"",menu:{},clientId:"",merchantId:""}},onLoad:function(e){var n=this;this.type=parseInt(e.type),this.menu=this.title(),t.setNavigationBarTitle({title:this.menu.title}),t.$on("reloadContract",(function(){n.mescroll.resetUpScroll(!1)}))},methods:{title:function(){var t={title:"",iconClass:"icon-hetongguanli"};switch(this.type){case 1:t={title:"合同列表",iconClass:"icon-hetongguanli"};break;case 2:t={title:"公司合同",iconClass:"icon-anli"};break;case 3:t={title:"个人合同",iconClass:"icon-gerenhetongchaxun"};break;default:break}return t},upCallback:function(t){var e=this,n={currPage:t.num,pageSize:10,projectId:this.$store.getters.project.id};if(1===this.type)n["organizationId"]=this.$store.getters.organization.id,this.getContractList(n);else if(2===this.type){if(n["statusList"]=[1,2,3,4,5],this.merchantId)return n["merchantId"]=this.merchantId,void this.getContractList(n);(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.merchantId=t.data[0].merchantId,n["merchantId"]=e.merchantId,e.getContractList(n)}else e.mescroll.endErr()})).catch((function(){e.mescroll.endErr()}))}else if(3===this.type){if(n["statusList"]=[1,2,3,4,5],this.clientId)return n["clientId"]=this.clientId,void this.getContractList(n);(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.clientId=t.data[0].clientId,n["clientId"]=e.clientId,e.getContractList(n)}else e.mescroll.endErr()})).catch((function(){e.mescroll.endErr()}))}},getContractList:function(t){var e=this;(0,r.getContractListByPage)(t).then((function(n){if(200===n.code){e.mescroll.endBySize(n.data.dataList.length,n.data.totalCount),1==t.currPage&&(e.list=[]);var i=n.data.dataList;e.list=e.list.concat(i)}else e.mescroll.endErr()})).catch((function(){e.mescroll.endErr()}))}}};e.default=o}).call(this,n("df3c")["default"])},"93ca":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var 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,"6eb1"))},uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"3d33"))}},r=function(){var t=this.$createElement;this._self._c;this.$mp.data=Object.assign({},{$root:{a0:{}}})},a=[]},aaf2:function(t,e,n){"use strict";n.r(e);var i=n("93ca"),r=n("585e");for(var a in r)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(a);var c=n("828b"),o=Object(c["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=o.exports},ef22:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("7748");i(n("3240"));var r=i(n("aaf2"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["ef22","common/runtime","common/vendor"]]]);