webpackJsonp([82],{JW3W:function(t,e){},fAFA:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=r("Xxa5"),n=r.n(a),o=r("exGp"),i=r.n(o),s=r("Ch4/"),l=r("PI0u"),c=r("P9l9"),u={components:{},props:{brandId:{type:String,default:""}},data:function(){return{yearList:[],year:"",tableList:[],loading:!1,tabelHeader:[{prop:"yearMonth",label:"月份"},{prop:"totalPerformance",label:"月指标累计"},{prop:"totalStore",label:"门店总数"},{prop:"totalComplete",label:"门店指标完善数"}],currentPage:1,pageSize:20,total:0}},watch:{brandId:function(t){t&&this.getYearList()}},methods:{handleSizeChange:function(t){this.currentPage=1,this.pageSize=t,this.apiMonthPerformanceList()},handleCurrentChange:function(t){this.currentPage=t,this.apiMonthPerformanceList()},changeYear:function(){this.currentPage=1,this.apiMonthPerformanceList()},getYearList:function(){var t=this;return i()(n.a.mark(function e(){var r,a,o;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,e.next=3,n={enterpriseId:r.brandId},Object(c.b)("/haoban-app-performance-three-web/performance/get-years",n);case 3:a=e.sent,1==(o=a.data).errorCode?(r.yearList=[],o.result&&o.result.length&&(o.result.forEach(function(t){r.yearList.push({id:t,label:t+"年"})}),r.year=o.result[0],r.apiMonthPerformanceList())):s.a.errorMsg(o);case 6:case"end":return e.stop()}var n},e,t)}))()},apiMonthPerformanceList:function(){var t=this;return i()(n.a.mark(function e(){var r,a,o;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t).loading=!0,e.next=4,n={enterpriseId:t.brandId,year:t.year},Object(c.b)("/haoban-app-performance-three-web/performance/query-month-performance",n);case 4:a=e.sent,o=a.data,r.loading=!1,1==o.errorCode&&(o.result.length&&o.result.forEach(function(t){t.totalPerformance=Object(l.c)(Number(t.totalPerformance).toFixed(2))}),r.tableList=o.result||[]);case 8:case"end":return e.stop()}var n},e,t)}))()}},mounted:function(){this.brandId&&this.getYearList()}},d={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("section",{staticClass:"common-right-wrap"},[r("div",{staticClass:"p-20"},[r("el-select",{staticClass:"m-b-23 w-123",on:{change:t.changeYear},model:{value:t.year,callback:function(e){t.year=e},expression:"year"}},[r("i",{staticClass:"el-input__icon el-icon-date",attrs:{slot:"prefix"},slot:"prefix"}),t._v(" "),t._l(t.yearList,function(t,e){return r("el-option",{key:e,attrs:{value:t.id,label:t.label}})})],2),t._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableList}},[t._l(t.tabelHeader,function(t,e){return r("el-table-column",{key:e,attrs:{label:t.label,prop:t.prop}})}),t._v(" "),t.$getButtonLimit(t.$buttonCode.monthTarget)||t.$getButtonLimit(t.$buttonCode.dayTarget)?r("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.settingStatus&&t.$getButtonLimit(t.$buttonCode.monthTarget)?r("el-button",{attrs:{"limit-code":t.$buttonCode.monthTarget,type:"text"},on:{click:function(r){return t.$router.push("/storeMonthTask?yearMonth="+e.row.yearMonth)}}},[t._v("门店月指标")]):t._e(),t._v(" "),t.$getButtonLimit(t.$buttonCode.dayTarget)?r("el-button",{attrs:{"limit-code":t.$buttonCode.dayTarget,type:"text"},on:{click:function(r){return t.$router.push("/companyDaySet?yearMonth="+e.row.yearMonth)}}},[t._v("商户日权重")]):t._e()]}}])}):t._e()],2)],1)])},staticRenderFns:[]};var p=r("VU/8")(u,d,!1,function(t){r("JW3W")},"data-v-587096fc",null);e.default=p.exports}});