webpackJsonp([18],{"0qlr":function(e,t){},ak3k:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("2eFk"),n=a("Ke24"),l=a("fPyK"),i=a("P9l9"),r=a("Ch4/"),s=a("3E4D"),c={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(e){this.$router.push(e)},setSelectTab:function(e){this.activeTab=e.tabId},handlePreview:function(e,t){var a=window.location.origin+"/office-mobile/#/defineTemplate?templateId="+t.dailyReportTemplateId;this.$refs.qrcodePreview.qrcode(a,"daily-preview"),this.dialogVisible=!0},toCustomSet:function(){this.changeRouter("/customReportSet")},handleCopy:function(e,t){this.changeRouter("/customReportSet?templateId="+t.dailyReportTemplateId+"&type=copy")},handleEdit:function(e,t){this.changeRouter("/customReportSet?&templateId="+t.dailyReportTemplateId+"&type=edit")},handleDelete:function(e,t){var a=this;a.$confirm("一旦删除之后，该范围的门店将无法接收该日报，是否确定删除？","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.deleteTemplate(e,t)}).catch(function(){})},deleteTemplate:function(e,t){var a=this;Object(i.c)("/haoban-app-daily-three-web/daily/del-define-template",{templateId:t.dailyReportTemplateId}).then(function(t){var o=t.data;if(1==o.errorCode)return s.a.showmsg("删除成功","success"),void a.tableData.splice(e,1);r.a.errorMsg(o)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})})},getData:function(){var e=this;Object(i.c)("/haoban-app-daily-three-web/daily/list-define-template",{enterpriseId:e.brandId}).then(function(t){var a=t.data;if(1==a.errorCode)return e.tableData=[],void(a.result&&a.result.length&&(e.tableData=a.result));r.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(e,t){e&&(this.activeBrand=e,this.getData())}},mounted:function(){document.documentElement.style.backgroundColor="#f0f2f5",this.$emit("showTab","32"),this.brandId&&this.getData()},destroyed:function(){document.documentElement.style.backgroundColor="#fff"},components:{appDetail:o.a,commonDetailTop:n.a,qrcodeDialog:l.a}},d={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"custom-set-wrap"},[a("div",{staticClass:"custom-set-content border-box"},[a("div",{staticClass:"flex flex-space-between flex-pack-center m-b-23"},[a("div",{staticClass:"custom-set-title flex flex-pack-center"}),e._v(" "),a("div",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.toCustomSet("")}}},[e._v("新建模板")])],1)]),e._v(" "),a("el-table",{ref:"multipleTable",staticClass:"select-table",staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"模板名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.title))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"模板描述","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.description))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"门店类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.storeType?a("span",[e._v("自营门店")]):e._e(),e._v(" "),1==t.row.storeType?a("span",[e._v("联营门店")]):e._e(),e._v(" "),2==t.row.storeType?a("span",[e._v("代理门店")]):e._e(),e._v(" "),3==t.row.storeType?a("span",[e._v("代销门店")]):e._e(),e._v(" "),4==t.row.storeType?a("span",[e._v("托管门店")]):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.handlePreview(t.$index,t.row)}}},[e._v("预览")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.handleCopy(t.$index,t.row)}}},[e._v("复制")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.handleEdit(t.$index,t.row)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){e.handleDelete(t.$index,t.row)}}},[e._v("删除")])]}}])})],1)],1),e._v(" "),a("qrcode-dialog",{ref:"qrcodePreview",model:{value:e.dialogVisible,callback:function(t){e.dialogVisible=t},expression:"dialogVisible"}})],1)},staticRenderFns:[]};var u=a("VU/8")(c,d,!1,function(e){a("0qlr")},"data-v-a26f9064",null);t.default=u.exports}});