Commit 217676e8 by xiaohai

门店详情

parent 16b34686
...@@ -19,23 +19,55 @@ ...@@ -19,23 +19,55 @@
</span> </span>
</el-tree> </el-tree>
</div> </div>
<div class="search-result-container" v-if="searchResultShow"> <div class="search-result-container m-t-15" v-if="searchResultShow">
<ul class="search-result-ul" v-if="departmentList.length > 0"> <template v-if="storeFrame">
<p class="title">部门列表</p> <template v-for="(brand, index) in brandList" v-if="brand.departmentList.length > 0 || brand.storeList.length > 0 || brand.searchList.length > 0">
<li class="group-item items" v-for="(department, index) in departmentList" :key="index+'_'+department.groupId" @click="handleNodeClick(department)"> <div :key="brand.topDepartment.brandId + '_' + index">
<i class="iconfont icon-tongshi-zuzhijiagou"></i> <p class="brand-title">{{brand.topDepartment.name}}</p>
{{department.name}} <ul class="search-result-ul" v-if="brand.departmentList.length > 0">
</li> <p class="title store-frame-title">分组列表</p>
</ul> <li class="group-item items" v-for="(department, index) in brand.departmentList" :key="index+'_'+department.groupId" @click="handleNodeClick(department)">
<ul class="search-result-ul" v-if="employeeList.length > 0"> <i class="iconfont icon-tongshi-zuzhijiagou"></i>
<p class="title">人员列表</p> {{department.name}}
<li class="person-item items" v-for="(employee, index) in employeeList" :key="index+'_'+employee.employeeClerkId" @click="selectEmployee(employee)"> </li>
<i class="iconfont icon-chengyuan"></i> </ul>
{{employee.name}} <ul class="search-result-ul" v-if="brand.storeList.length > 0">
<span class="from-group">{{employee.departmentName}}</span> <p class="title store-frame-title">门店列表</p>
</li> <li class="group-item items" v-for="(store, index) in brand.storeList" :key="index+'_'+store.storeGroupId" @click="handleStoreClick(store)">
</ul> <i class="iconfont icon-tongshi-zuzhijiagou"></i>
<p class="no-data-tip" v-if="departmentList.length < 1 && employeeList.length < 1">暂无数据</p> {{store.storeName}}
</li>
</ul>
<ul class="search-result-ul" v-if="brand.searchList.length > 0">
<p class="title store-frame-title">人员列表</p>
<li class="person-item items" v-for="(employee, index) in brand.searchList" :key="index+'_'+employee.employeeClerkId" @click="selectEmployee(employee)">
<i class="iconfont icon-chengyuan"></i>
{{employee.name}}
<span class="from-group">{{employee.departmentName}}</span>
</li>
</ul>
</div>
</template>
<p class="no-data-tip" v-if="brandList.length < 1">暂无数据</p>
</template>
<template v-else>
<ul class="search-result-ul" v-if="departmentList.length > 0">
<p class="title">部门列表</p>
<li class="group-item items" v-for="(department, index) in departmentList" :key="index+'_'+department.groupId" @click="handleNodeClick(department)">
<i class="iconfont icon-tongshi-zuzhijiagou"></i>
{{department.name}}
</li>
</ul>
<ul class="search-result-ul" v-if="employeeList.length > 0">
<p class="title">人员列表</p>
<li class="person-item items" v-for="(employee, index) in employeeList" :key="index+'_'+employee.employeeClerkId" @click="selectEmployee(employee)">
<i class="iconfont icon-chengyuan"></i>
{{employee.name}}
<span class="from-group">{{employee.departmentName}}</span>
</li>
</ul>
<p class="no-data-tip" v-if="departmentList.length < 1 && employeeList.length < 1">暂无数据</p>
</template>
</div> </div>
</div> </div>
</template> </template>
...@@ -51,6 +83,10 @@ ...@@ -51,6 +83,10 @@
searchResult: { searchResult: {
type: Object, type: Object,
required: true required: true
},
storeFrame: {
type: Boolean,
default: false
} }
}, },
data() { data() {
...@@ -82,21 +118,26 @@ ...@@ -82,21 +118,26 @@
return false; return false;
} }
this.searchResultShow = true; this.searchResultShow = true;
// console.log(this.searchKey);
this.$emit("handleSearchKey", this.searchKey); this.$emit("handleSearchKey", this.searchKey);
}, },
/** /**
* 树形菜单选择 * 树形菜单选择
*/ */
handleNodeClick(obj, node) { handleNodeClick(obj, node) {
this.$emit("handleTreeSelection", obj, node, false); this.$emit("handleTreeSelection", obj, node, 'node');
}, },
/** /**
* 搜索结果中选人 * 搜索结果中选人
*/ */
selectEmployee(person) { selectEmployee(person) {
this.$emit("handleEmployeeSelection", person, true); this.$emit("handleEmployeeSelection", person, 'employee');
},
/**
* 搜索结果中选门店
*/
handleStoreClick(store) {
this.$emit("handleStoreSelection", store, 'store');
}, },
/** /**
* 按层级排序部门 * 按层级排序部门
...@@ -180,11 +221,17 @@ ...@@ -180,11 +221,17 @@
} else { } else {
return []; return [];
} }
},
brandList() {
if (this.searchResult.brandList) {
return this.searchResult.brandList;
} else {
return [];
}
} }
}, },
watch: { watch: {
treeData(newArr, old) { treeData(newArr, old) {
// console.log(old, newArr, "newarr");
this.sortGroupByLevel(newArr); this.sortGroupByLevel(newArr);
} }
} }
...@@ -238,12 +285,19 @@ ...@@ -238,12 +285,19 @@
color: #fff; color: #fff;
} }
} }
.brand-title {
padding: 15px;
color: #303133;
}
.search-result-ul { .search-result-ul {
font-size: 14px; font-size: 14px;
color: #606266; color: #606266;
.title { .title {
padding: 15px; padding: 15px;
color: #303133; color: #303133;
&.store-frame-title {
background:rgba(228,231,237,1);
}
} }
li.items { li.items {
padding: 15px; padding: 15px;
......
<template>
<div>
<div class="sf-right-button-box">
<el-select v-model="storeType" size="small">
<el-option
v-for="(type, index) in typeArr"
:key="type"
:label="type"
:value="index">
</el-option>
</el-select>
<el-select v-model="storeStatus" size="small">
<el-option label="全部状态" :value="0"></el-option>
<el-option label="正常" :value="1"></el-option>
<el-option label="停业整顿" :value="3"></el-option>
</el-select>
<el-button style="vertical-align: middle;" class="J_show-children" size="small"><el-checkbox class="m-r-10" v-model="showChildMember" @change="setChildMemberShow"></el-checkbox><a class="a-href">显示子成员</a></el-button>
</div>
<el-table
ref="clerkViewTable"
class="diy-table"
height="445"
:data="tableData">
<el-table-column
label="门店"
width="125"
>
<template slot-scope="scope">
<div>
<p class="m-b-10">{{scope.row.storeName}}</p>
<p><a class="a-href">新增门店</a></p>
</div>
</template>
</el-table-column>
<el-table-column
label="门店code"
prop="storeCode"
width="125"
></el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<ul class="diy-header">
<li class="name">姓名</li>
<li class="phone">手机号</li>
<li class="position">职位</li>
<li class="status">状态</li>
<li>操作</li>
</ul>
</template>
<template slot-scope="scope">
<ul>
<li v-for="clerk in scope.row.clerks" :key="clerk.employeeClerkId" class="clerk-obj-li">
<div class="clerk-name clerk-cell">
<el-radio :value="1" :label="clerk.isManager" @change="changeManager(scope.row, clerk)">{{clerk.name}}</el-radio>
<span class="manager" v-if="clerk.isManager == 1">店长</span>
</div>
<div class="clerk-cell clerk-phone">{{clerk.phoneNumber}}</div>
<div class="clerk-cell clerk-position">{{clerk.positionName}}</div>
<div class="clerk-cell clerk-status">
<div class="status-icon" :class="clerk.status == 1 ? 'is-active' : ''">
<i class="iconfont icon-shouji"></i>
</div>
</div>
<div class="clerk-cell clerk-handle">
<a class="a-href m-r-20">编辑</a>
<a class="a-href">删除</a>
</div>
</li>
</ul>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: "clerkView",
props: {
tableData: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
storeType: 0,
typeArr: ["全部类型", "自营", "联营", "代理(加盟)", "代销", "托管"],
storeStatus: 0,
showChildMember: false,
};
},
methods: {
setChildMemberShow() {
this.$emit("setChildMemberShow", this.showChildMember);
},
changeManager(row, clerk) {
console.log(row, clerk);
row.clerks.some(per => {
if (per.isManager == 1) {
per.isManager = 0;
}
return per.isManager == 1;
});
clerk.isManager = 1;
}
}
};
</script>
<template>
<div class="store-info">
<div class="info-cell">
<p class="title">门店信息</p>
<el-form
class="store-info-form info-form"
label-width="70px">
<el-form-item label="门店名称" prop="name">
<el-input v-model="storeInfo.name">
<template slot="suffix">{{storeInfo.name.length}}/20</template>
</el-input>
</el-form-item>
<el-form-item label="所属分组" prop="group">
<el-input v-model="storeInfo.name">
<i slot="suffix" class="el-input__icon el-icon-arrow-down"></i>
</el-input>
</el-form-item>
<el-form-item label="门店图片" prop="imageUrls">
<ul class="img-list">
<li class="img-li" v-for="(img, index) in storeInfo.imageUrls.split(',')" :key="index + '_' + img ">
<img :src="img">
</li>
<li class="img-li J_add-img">
<i class="el-icon-plus"></i>
<p class="tip">图片规格640*340像素</p>
</li>
</ul>
</el-form-item>
<el-form-item label="联系电话" prop="phoneNumber">
<el-input v-model="storeInfo.phoneNumber"></el-input>
</el-form-item>
<el-form-item label="营业时间" prop="phoneNumber">
<el-time-picker
is-range
v-model="storeInfo.operateTime"
:picker-options="{
start: '00:00',
step: '00:01',
end: '23:59'
}"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围">
</el-time-picker>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script>
export default {
name: "storeInfo",
data() {
return {
storeInfo: {
name: "",
group: "",
imageUrls: "https://www.foodnext.net/dispPageBox/getFile/GetImg.aspx?FileLocation=%2FPJ-FOODNEXT%2FFiles%2F&FileName=photo-03817-i.jpg,https://video.nextmag.com.tw/photo/2015/04/19/00bOOOPIC2b_1429452213732_209232_ver1.0.jpg,https://image.cache.storm.mg/styles/smg-800x533-fp/s3/media/image/2017/12/28/20171228-052047_U9180_M363881_1edc.jpg?itok=Swxr8yZb,https://www.yw11.com/uploads/allimg/161224/16-16122413133KM.jpg",
phoneNumber: 18758198024,
operateTime: []
}
};
}
};
</script>
<style lang="scss">
.store-info {
flex: 1;
.info-cell {
margin-bottom: 24px;
background: #fff;
padding-bottom: 24px;
>.title {
line-height: 55px;
text-indent: 32px;
border-bottom: 1px solid #E4E7ED;
}
.store-info-form {
padding: 24px 60px 0;
.el-input {
width: 500px;
}
.img-list {
display: flex;
flex-wrap: wrap;
width: 500px;
.img-li {
width:148px;
height:148px;
border-radius:6px;
margin-right: 8px;
margin-bottom: 10px;
&.J_add-img {
position: relative;
text-align: center;
line-height: 150px;
border:1px solid rgba(192,204,218,1);
font-size: 23px;
color: #909399;
.tip {
position: absolute;
font-size: 13px;
bottom: -23px;
height: 13px;
line-height: 13px;
text-align: center;
width: 100%;
}
}
img {
width: 100%;
height: 100%;
border-radius:6px;
}
}
}
}
}
}
</style>
<template>
<div>
<div class="sf-right-button-box">
<el-button type="primary">添加门店</el-button>
<a><el-button>批量导入/导出</el-button></a>
<el-button type="danger" plain @click="delStores" :disabled="disabledDel">批量删除</el-button>
<el-button class="J_show-children" size="small"><el-checkbox class="m-r-10" v-model="showChildMember" @change="setChildMemberShow"></el-checkbox><a class="a-href">显示子成员</a></el-button>
</div>
<el-table
ref="table1"
height="445"
:data="tableData"
@selection-change="selectMember"
@row-click="linkToDetail">
<el-table-column
type="selection"
width="42"
></el-table-column>
<el-table-column
label="门店"
prop="storeName"
width="140"
></el-table-column>
<el-table-column
label="代码"
prop="storeCode"
width="140"
></el-table-column>
<el-table-column
label="类型"
prop="storeType"
width="100"
>
<template slot-scope="scope">
{{typeArr[scope.row.storeType * 1 + 1]}}
</template>
</el-table-column>
<el-table-column
label="地区"
prop="areaChainName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="所属分组"
prop="departName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="操作"
width="120"
>
<template slot-scope="scope">
<a class="a-href m-r-20" @click="editStore(scope.row)">编辑</a>
<a class="a-href" @click="delStore(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: "storeView",
props: {
tableData: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
selectedList: [],
showChildMember: false, // 是否显示子成员
typeArr: ["全部类型", "自营", "联营", "代理(加盟)", "代销", "托管"],
statusArr: ["待审核", "正常", "审核失败", "停业整顿", "回收站", "删除"]
};
},
methods: {
delStores() {},
selectMember(selection) {
this.selectedList = selection;
},
setChildMemberShow() {
this.$emit("setChildMemberShow", this.showChildMember);
},
linkToDetail() {},
editStore() {},
delStore() {}
},
computed: {
disabledDel() {
return this.selectedList.length < 1 ;
}
}
};
</script>
<style lang="scss">
</style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:searchResult="searchResult" :searchResult="searchResult"
@handleEmployeeSelection="handleEmployeeSelection"> @handleEmployeeSelection="handleEmployeeSelection">
</search-menu> </search-menu>
<employee-info v-if="showEmployee" :info="selectedEmployee"></employee-info> <employee-info v-if="showEmployee == 'employee'" :info="selectedEmployee"></employee-info>
<div class="af-right-container" <div class="af-right-container"
v-loading="loading" v-loading="loading"
v-else> v-else>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
}) })
.catch(e => { .catch(e => {
console.log(e, "error"); console.log(e, "error");
}) });
}, },
/** /**
......
<template> <template>
<div class="store-estrutura-container"> <div class="store-estrutura-container">
<search-menu <search-menu
:storeFrame="true"
:treeData="menuData" :treeData="menuData"
:searchResult="searchResult" :searchResult="searchResult"
@handleSearchKey="handleSearchKey" @handleSearchKey="handleSearchKey"
@handleTreeSelection="handleTreeSelection" @handleTreeSelection="handleTreeSelection"
@handleStoreSelection="handleStoreSelection"
@handleEmployeeSelection="handleEmployeeSelection"> @handleEmployeeSelection="handleEmployeeSelection">
</search-menu> </search-menu>
<employee-info v-if="showEmployee == 'employee'" :info="selectedEmployee"></employee-info>
<store-info v-else-if="showEmployee == 'store'"></store-info>
<div class="sf-right-container" <div class="sf-right-container"
v-else
v-loading="loading"> v-loading="loading">
<div class="sf-right-header"> <div class="sf-right-header">
<span class="title-span">{{groupInfo.groupName}}{{total}}家)</span> <span class="title-span">{{groupInfo.groupName}}{{total}}家)</span>
...@@ -25,163 +30,41 @@ ...@@ -25,163 +30,41 @@
</el-radio-group> </el-radio-group>
</div> </div>
<template v-if="tableView == 1"> <template v-if="tableView == 1">
<div class="sf-right-button-box"> <store-view :tableData="storeList" @setChildMemberShow="setChildMemberShow"></store-view>
<el-button type="primary">添加门店</el-button>
<a><el-button>批量导入/导出</el-button></a>
<el-button type="danger" plain @click="delStores" :disabled="disabledDel">批量删除</el-button>
<el-button class="J_show-children" size="small"><el-checkbox class="m-r-10" v-model="showChildMember" @change="setChildMemberShow"></el-checkbox><a class="a-href">显示子成员</a></el-button>
</div>
<el-table
height="445"
:data="storeList"
@selection-change="selectMember"
@row-click="linkToDetail">
<el-table-column
type="selection"
width="42"
></el-table-column>
<el-table-column
label="门店"
prop="storeName"
width="140"
></el-table-column>
<el-table-column
label="代码"
prop="storeCode"
width="140"
></el-table-column>
<el-table-column
label="类型"
prop="storeType"
width="100"
>
<template slot-scope="scope">
{{typeArr[scope.row.storeType * 1 + 1]}}
</template>
</el-table-column>
<el-table-column
label="地区"
prop="areaChainName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="所属分组"
prop="departName"
:show-overflow-tooltip="true"
></el-table-column>
<!-- <el-table-column
label="状态"
prop="status"
width="100"
>
<template slot-scope="scope">
{{statusArr[scope.row.status]}}
</template>
</el-table-column> -->
<el-table-column
label="操作"
width="120"
>
<template slot-scope="scope">
<a class="a-href m-r-20" @click="editStore(scope.row)">编辑</a>
<a class="a-href" @click="delStore(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[20, 40, 60, 80]"
:page-size="pageSize"
:current-page="pageNumber"
layout="total, sizes, prev, pager, next"
:total="total">
</el-pagination>
</div>
</template> </template>
<template v-else> <template v-else>
<div class="sf-right-button-box"> <clerk-view :tableData="storeList" @setChildMemberShow="setChildMemberShow"></clerk-view>
<el-select v-model="storeType" size="small">
<el-option
v-for="(type, index) in typeArr"
:key="type"
:label="type"
:value="index">
</el-option>
</el-select>
<el-select v-model="storeStatus" size="small">
<el-option label="全部状态" :value="0"></el-option>
<el-option label="正常" :value="1"></el-option>
<el-option label="停业整顿" :value="3"></el-option>
</el-select>
<el-button style="vertical-align: middle;" class="J_show-children" size="small"><el-checkbox class="m-r-10" v-model="showChildMember" @change="setChildMemberShow"></el-checkbox><a class="a-href">显示子成员</a></el-button>
</div>
<el-table
height="445"
:data="storeList"
@row-click="linkToDetail">
<el-table-column
label="门店"
width="125"
>
<template slot-scope="scope">
<div>
<p class="m-b-10">{{scope.row.storeName}}</p>
<p><a class="a-href">新增门店</a></p>
</div>
</template>
</el-table-column>
<el-table-column
label="门店code"
prop="storeCode"
width="125"
></el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<ul class="diy-header">
<li class="name">姓名</li>
<li class="phone">手机号</li>
<li class="position">职位</li>
<li class="status">状态</li>
<li>操作</li>
</ul>
</template>
<template slot-scope="scope">
<ul>
<li v-for="clerk in scope.row.clerks" :key="clerk.employeeClerkId" class="clerk-obj-li">
<div class="clerk-name clerk-cell">
<el-radio :value="1" :label="clerk.isManager" @change="changeManager(scope.row, clerk)">{{clerk.name}}</el-radio>
<span class="manager" v-if="clerk.isManager == 1">店长</span>
</div>
<div class="clerk-cell clerk-phone">{{clerk.phoneNumber}}</div>
<div class="clerk-cell clerk-position">{{clerk.positionName}}</div>
<div class="clerk-cell clerk-status">
<div class="status-icon" :class="clerk.status == 1 ? 'is-active' : ''">
<i class="iconfont icon-shouji"></i>
</div>
</div>
<div class="clerk-cell clerk-handle">
<a class="a-href m-r-20">编辑</a>
<a class="a-href">删除</a>
</div>
</li>
</ul>
</template>
</el-table-column>
</el-table>
</template> </template>
<div class="pagination">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[20, 40, 60, 80]"
:page-size="pageSize"
:current-page="pageNumber"
layout="total, sizes, prev, pager, next"
:total="total">
</el-pagination>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import searchMenu from "components/contacts/searchMenu"; import searchMenu from "components/contacts/searchMenu";
import storeView from "components/contacts/storeFrame/storeView";
import clerkView from "components/contacts/storeFrame/clerkView";
import storeInfo from "components/contacts/storeFrame/storeInfo";
import employeeInfo from "components/contacts/employeeInfo";
import { getRequest, postRequest, postJsonRequest } from '@/api/api'; import { getRequest, postRequest, postJsonRequest } from '@/api/api';
export default { export default {
name: "storeEstruturaContainer", name: "storeEstruturaContainer",
components: { components: {
searchMenu searchMenu,
storeView,
clerkView,
employeeInfo,
storeInfo
}, },
data() { data() {
return { return {
...@@ -189,36 +72,62 @@ export default { ...@@ -189,36 +72,62 @@ export default {
searchResult: {}, searchResult: {},
loading: true, loading: true,
groupInfo: { groupInfo: {
groupName: "test", groupName: "",
departmentId: "0001" departmentId: ""
}, },
total: 100, total: 0,
showChildMember: false, // 是否显示子成员 showChildMember: false, // 是否显示子成员
pageSize: 20, pageSize: 20,
pageNumber: 1, pageNumber: 1,
showType: 1,
storeList: [], storeList: [],
typeArr: ["全部类型", "自营", "联营", "代理(加盟)", "代销", "托管"], tableView: 1,
statusArr: ["待审核", "正常", "审核失败", "停业整顿", "回收站", "删除"], showEmployee: 'store',
selectedList: [], selectedEmployee: {}
tableView: 2,
storeType: 0,
storeStatus: 0
}; };
}, },
methods: { methods: {
handleSearchKey() {}, handleSearchKey(keyWord) {
handleTreeSelection() {}, let params = {
handleEmployeeSelection() {}, keyWord
handleSizeChange() {}, };
handleCurrentChange() {}, getRequest("/haoban-manage-web/store/searchpage", params)
.then(res => {
this.searchResult = res.data.result || {};
})
.catch(e => {
console.log(e, "error");
});
},
/**
* 树形搜索结果选人处理
*/
handleEmployeeSelection(employee, showEmployee) {
console.log(employee, showEmployee);
this.selectedEmployee = employee;
this.showEmployee = showEmployee;
},
/**
* 树形搜索结果选门店处理
*/
handleStoreSelection(store) {
},
handleSizeChange(size) {
this.pageSize = size;
this.getStoreList();
},
handleCurrentChange(pageNumber) {
this.pageNumber = pageNumber;
this.getStoreList();
},
switchView(view) { switchView(view) {
console.log(view); this.pageSize = 20;
this.pageNumber = 1;
this.storeList = [];
this.getStoreList(); this.getStoreList();
}, },
editStore(store) {}, setChildMemberShow(show) {
delStore(store) {}, this.showChildMember = show;
setChildMemberShow() {
this.getStoreList(); this.getStoreList();
}, },
getGroupData() { getGroupData() {
...@@ -228,7 +137,6 @@ export default { ...@@ -228,7 +137,6 @@ export default {
}; };
getRequest("/haoban-manage-web/dept/deptList", params) getRequest("/haoban-manage-web/dept/deptList", params)
.then(res => { .then(res => {
console.log(res, "groupData");
_this.menuData = res.data.result || []; _this.menuData = res.data.result || [];
res.data.result.some(li => { res.data.result.some(li => {
if (li.level == 0) { if (li.level == 0) {
...@@ -245,6 +153,7 @@ export default { ...@@ -245,6 +153,7 @@ export default {
}, },
getStoreList() { getStoreList() {
let _this = this; let _this = this;
_this.loading = true;
let params = { let params = {
storeGroupId: _this.groupInfo.departmentId, storeGroupId: _this.groupInfo.departmentId,
showChild: _this.showChildMember * 1, showChild: _this.showChildMember * 1,
...@@ -256,8 +165,7 @@ export default { ...@@ -256,8 +165,7 @@ export default {
getRequest("/haoban-manage-web/store/findSimplePage", params) getRequest("/haoban-manage-web/store/findSimplePage", params)
.then(res => { .then(res => {
_this.total = res.data.result.total; _this.total = res.data.result.total;
// _this.formatList(res.data.result.list); _this.storeList = res.data.result.list || [];
_this.storeList = res.data.result.list;
_this.loading = false; _this.loading = false;
}) })
.catch(e => { .catch(e => {
...@@ -265,38 +173,19 @@ export default { ...@@ -265,38 +173,19 @@ export default {
_this.loading = false; _this.loading = false;
}); });
}, },
changeManager(row, clerk) {
console.log(row, clerk);
row.clerks.some(per => {
if (per.isManager == 1) {
per.isManager = 0;
}
return per.isManager == 1;
});
clerk.isManager = 1;
},
/** /**
* 树形菜单选择项处理 * 树形菜单选择项处理
*/ */
handleTreeSelection(obj, node) { handleTreeSelection(obj, node, showEmployee) {
console.log(obj, node, "selection"); console.log(obj, node, "selection");
this.groupInfo.departmentId = obj.groupId; this.groupInfo.departmentId = obj.groupId;
this.groupInfo.groupName = obj.name; this.groupInfo.groupName = obj.name;
this.showEmployee = showEmployee;
this.getStoreList(); this.getStoreList();
}, }
delStores() {},
selectMember(selection) {
this.selectedList = selection;
},
linkToDetail() {}
}, },
beforeMount() { beforeMount() {
this.getGroupData(); this.getGroupData();
},
computed: {
disabledDel() {
return this.selectedList.length < 1 ;
}
} }
}; };
</script> </script>
...@@ -349,56 +238,58 @@ export default { ...@@ -349,56 +238,58 @@ export default {
margin-top: 30px; margin-top: 30px;
text-align: right; text-align: right;
} }
.diy-header { .diy-table {
display: flex; .diy-header {
.name { display: flex;
width: 130px; .name {
} width: 130px;
.phone, .position { }
width: 125px; .phone, .position {
} width: 125px;
.status { }
width: 100px; .status {
} width: 100px;
}
.clerk-obj-li {
display: flex;
padding: 10px 0;
margin-bottom: 25px;
line-height: 32px;
&:last-child {
margin-bottom: 0;
}
.clerk-name {
width: 130px;
.manager {
display: inline-block;
width: 30px;
height: 15px;
line-height: 16px;
vertical-align: middle;
text-align: center;
background:rgba(247,203,39,1);
border-radius:2px;
color: #fff;
font-size: 10px;
} }
} }
.clerk-phone, .clerk-position { .clerk-obj-li {
width: 125px; display: flex;
} padding: 10px 0;
.clerk-status { margin-bottom: 25px;
width: 100px; line-height: 32px;
.status-icon { &:last-child {
width: 34px; margin-bottom: 0;
height: 32px; }
line-height: 32px; .clerk-name {
text-align: center; width: 130px;
background: #ECF5FF; .manager {
border: 1px solid #D9ECFF; display: inline-block;
border-radius: 4px; width: 30px;
&.is-active { height: 15px;
color: #409EFF; line-height: 16px;
vertical-align: middle;
text-align: center;
background:rgba(247,203,39,1);
border-radius:2px;
color: #fff;
font-size: 10px;
}
}
.clerk-phone, .clerk-position {
width: 125px;
}
.clerk-status {
width: 100px;
.status-icon {
width: 34px;
height: 32px;
line-height: 32px;
text-align: center;
background: #ECF5FF;
border: 1px solid #D9ECFF;
border-radius: 4px;
&.is-active {
color: #409EFF;
}
} }
} }
} }
......
...@@ -332,6 +332,9 @@ input:focus { ...@@ -332,6 +332,9 @@ input:focus {
.m-t-10 { .m-t-10 {
margin-top: 10px; margin-top: 10px;
} }
.m-t-15 {
margin-top: 15px;
}
.m-t-30 { .m-t-30 {
margin-top: 30px; margin-top: 30px;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment