webpackJsonp([21],{"7SJI":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=a("bOdI"),r=a.n(o),s=a("ATfr"),l=a("P9l9"),i={name:"storeEstruturaContainer",components:{searchMenu:s.a},data:function(){return{menuData:[],searchResult:{},loading:!1,groupInfo:{groupName:"test",departmentId:"0001"},total:100,showChildMember:!1,pageSize:100,pageNumber:1,showType:1,storeList:[],typeArr:["自营","联营","代理(加盟)","代销","托管"],statusArr:["待审核","正常","审核失败","停业整顿","回收站","删除"]}},methods:(n={handleSearchKey:function(){},handleTreeSelection:function(){},handleEmployeeSelection:function(){},editStore:function(e){},delStore:function(e){},getGroupData:function(){var e=this;Object(l.a)("/haoban-manage-web/dept/deptList",{isStoreGroup:1}).then(function(t){console.log(t,"groupData"),e.menuData=t.data.result||[],t.data.result.some(function(t){return 0==t.level&&(e.groupInfo.departmentId=t.groupId,e.groupInfo.groupName=t.name),0==t.level}),e.getStoreList()}).catch(function(e){console.log(e,"error")})},getStoreList:function(){var e,t=this,a=(e={departmentId:t.groupInfo.departmentId,showChild:1*t.showChildMember,showType:t.showType,pageSize:t.pageSize},r()(e,"pageSize",t.pageNumber),r()(e,"status",1),e);Object(l.a)("/haoban-manage-web/store/findSimplePage",a).then(function(e){console.log(e,"storeList"),t.total=e.data.result.total}).catch(function(e){console.log(e,"error"),t.loading=!1})}},r()(n,"handleTreeSelection",function(e,t){console.log(e,t,"selection"),this.groupInfo.departmentId=e.groupId,this.groupInfo.groupName=e.name,this.getStoreList()}),r()(n,"delStores",function(){}),r()(n,"selectMember",function(){}),r()(n,"linkToDetail",function(){}),n),beforeMount:function(){this.getGroupData()}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"store-estrutura-container"},[a("search-menu",{attrs:{treeData:e.menuData,searchResult:e.searchResult},on:{handleSearchKey:e.handleSearchKey,handleTreeSelection:e.handleTreeSelection,handleEmployeeSelection:e.handleEmployeeSelection}}),e._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"sf-right-container"},[a("div",{staticClass:"sf-right-header"},[a("span",{staticClass:"title-span"},[e._v(e._s(e.groupInfo.groupName)+"（"+e._s(e.total)+"家）")]),e._v(" "),a("span",{staticClass:"id-span"},[e._v("部门ID： "+e._s(e.groupInfo.departmentId))]),e._v(" "),a("span",{staticClass:"handle-area"},[a("a",{staticClass:"J_add-child a-href",attrs:{href:"#/addDepartment?departmentId="+e.groupInfo.departmentId,target:"_blank"}},[e._v("添加子部门")]),e._v(" "),a("span",{staticClass:"hurdle"}),e._v(" "),a("a",{staticClass:"J_edit a-href"},[e._v("编辑")])])]),e._v(" "),a("div",{staticClass:"sf-right-button-box"},[a("el-button",{attrs:{type:"primary"}},[e._v("添加门店")]),e._v(" "),a("a",[a("el-button",[e._v("批量导入/导出")])],1),e._v(" "),a("el-button",{attrs:{type:"danger",plain:"",disabled:e.disabledDel},on:{click:e.delStores}},[e._v("批量删除")]),e._v(" "),a("el-button",{staticClass:"J_show-children"},[a("el-checkbox",{staticClass:"m-r-10",on:{change:e.setChildMemberShow},model:{value:e.showChildMember,callback:function(t){e.showChildMember=t},expression:"showChildMember"}}),a("a",{staticClass:"a-href"},[e._v("显示子成员")])],1)],1),e._v(" "),a("el-table",{attrs:{height:"495",data:e.storeList},on:{"selection-change":e.selectMember,"row-click":e.linkToDetail}},[a("el-table-column",{attrs:{type:"selection",width:"42"}}),e._v(" "),a("el-table-column",{attrs:{label:"门店",prop:"storeName"}}),e._v(" "),a("el-table-column",{attrs:{label:"代码",prop:"storeCode",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"类型",prop:"storeType",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n                    "+e._s(e.typeArr[t.row.storeType])+"\n                ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"地区",prop:"areaChainName"}}),e._v(" "),a("el-table-column",{attrs:{label:"所属分组",prop:"groupChainName"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态",prop:"status",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n                    "+e._s(e.statusArr[t.row.status])+"\n                ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("a",{staticClass:"a-href",on:{click:function(a){e.editStore(t.row)}}},[e._v("编辑")]),e._v(" "),a("a",{staticClass:"a-href",on:{click:function(a){e.delStore(t.row)}}},[e._v("删除")])]}}])})],1)],1)],1)},staticRenderFns:[]};var u=a("VU/8")(i,c,!1,function(e){a("rbxQ")},null,null);t.default=u.exports},rbxQ:function(e,t){}});
//# sourceMappingURL=21.386e96d5529cfc2a297a.js.map