webpackJsonp([54],{"29DL":function(t,e){},ak3k:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=o("2eFk"),n=o("Ke24"),i=o("fPyK"),r=o("P9l9"),l=o("Ch4/"),s=o("3E4D"),d={name:"reviewed",props:{brandId:{type:String,default:function(){return""}}},data:function(){return{dialogVisible:!1,tableH:window.screen.availHeight-464-126+"px",topMenuData:[{id:"1",name:"自定义报表"}],activeId:"1",activeTab:"1",activeBrand:"1",tableData:[],multipleSelection:[]}},computed:{},methods:{changeRouter:function(t){this.$router.push(t)},setSelectTab:function(t){this.activeTab=t.tabId},handlePreview:function(t,e){var o=window.location.origin+"/office-mobile/#/defineTemplate?templateId="+e.dailyReportTemplateId;this.$refs.qrcodePreview.qrcode(o,"daily-preview"),this.dialogVisible=!0},toCustomSet:function(){this.changeRouter("/customReportSet")},handleCopy:function(t,e){this.changeRouter("/customReportCopy?templateId="+e.dailyReportTemplateId+"&type=copy")},handleEdit:function(t,e){this.changeRouter("/customReportEdit?&templateId="+e.dailyReportTemplateId+"&type=edit")},handleDelete:function(t,e){var o=this;o.$confirm("一旦删除之后，该范围的门店将无法接收该日报，是否确定删除？","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){o.deleteTemplate(t,e)}).catch(function(){})},deleteTemplate:function(t,e){var o=this;Object(r.f)("/haoban-app-daily-three-web/daily/del-define-template",{templateId:e.dailyReportTemplateId}).then(function(e){var a=e.data;if(1==a.errorCode)return s.a.showmsg("删除成功","success"),void o.tableData.splice(t,1);l.a.errorMsg(a)}).catch(function(t){o.$message.error({duration:1e3,message:t.message})})},getData:function(){var t=this;Object(r.f)("/haoban-app-daily-three-web/daily/list-define-template",{enterpriseId:t.brandId}).then(function(e){var o=e.data;if(1==o.errorCode)return t.tableData=[],void(o.result&&o.result.length&&(t.tableData=o.result));l.a.errorMsg(o)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},mounted:function(){this.brandId&&this.getData()},components:{appDetail:a.a,commonDetailTop:n.a,qrcodeDialog:i.a}},c={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"custom-set-wrap"},[o("div",{staticClass:"custom-set-content border-box"},[o("div",{staticClass:"flex flex-space-between flex-pack-center m-b-23"},[t._m(0),t._v(" "),o("div",[t.$getButtonLimit(t.$buttonCode.addCustomReport)?o("el-button",{attrs:{"limit-code":t.$buttonCode.addCustomReport,type:"primary"},on:{click:function(e){return t.toCustomSet("")}}},[t._v("新建模板")]):t._e()],1)]),t._v(" "),o("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"100%"},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[o("el-table-column",{attrs:{label:"模板名称","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.title))]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"name",label:"模板描述","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.description))]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"address",label:"门店类型","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.storeType?o("span",[t._v("自营门店")]):t._e(),t._v(" "),1==e.row.storeType?o("span",[t._v("联营门店")]):t._e(),t._v(" "),2==e.row.storeType?o("span",[t._v("代理门店")]):t._e(),t._v(" "),3==e.row.storeType?o("span",[t._v("代销门店")]):t._e(),t._v(" "),4==e.row.storeType?o("span",[t._v("托管门店")]):t._e()]}}])}),t._v(" "),t.$getButtonLimit(t.$buttonCode.copyCustomReport)||t.$getButtonLimit(t.$buttonCode.editCustomReport)||t.$getButtonLimit(t.$buttonCode.delCustomReport)?o("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.$getButtonLimit(t.$buttonCode.copyCustomReport)?o("el-button",{attrs:{"limit-code":t.$buttonCode.copyCustomReport,type:"text"},on:{click:function(o){return t.handleCopy(e.$index,e.row)}}},[t._v("复制")]):t._e(),t._v(" "),t.$getButtonLimit(t.$buttonCode.editCustomReport)?o("el-button",{attrs:{"limit-code":t.$buttonCode.editCustomReport,type:"text"},on:{click:function(o){return t.handleEdit(e.$index,e.row)}}},[t._v("编辑")]):t._e(),t._v(" "),t.$getButtonLimit(t.$buttonCode.delCustomReport)?o("el-button",{attrs:{"limit-code":t.$buttonCode.delCustomReport,type:"text"},on:{click:function(o){return t.handleDelete(e.$index,e.row)}}},[t._v("删除")]):t._e()]}}])}):t._e()],1)],1),t._v(" "),o("qrcode-dialog",{ref:"qrcodePreview",model:{value:t.dialogVisible,callback:function(e){t.dialogVisible=e},expression:"dialogVisible"}})],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"custom-set-title flex flex-pack-center"},[e("span",{staticClass:"font-14 color-909399"},[this._v("注：创建自定义日报后才能触发并下发日报")])])}]};var u=o("VU/8")(d,c,!1,function(t){o("29DL")},"data-v-aa3f75f2",null);e.default=u.exports}});