Commit 76eeab67 by 胡悦
2 parents f643176b bf8c5c1c
<!-- 员工管理 -->
<template>
<div class="config-employee employee-list">
<div class="container">
<div style="margin-bottom: 20px;">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">创建员工</el-button>
<glsx-combi-form v-if="userInfo.accountLevel != 4" style="float: right;" ref="showSearch" labelWidth="90px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="topSearchFormData">
<!-- <glsx-combi-form v-if="userInfo.accountLevel != 4" style="float: right;" ref="showSearch" labelWidth="90px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="topSearchFormData">
<template slot="merchantId" slot-scope="item">
<select-page :form="searchForm" width="200" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page>
</template>
</glsx-combi-form>
</glsx-combi-form> -->
</div>
<div class="container">
<div>
<glsx-combi-form ref="showSearch" labelWidth="60px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData">
<glsx-combi-form ref="showSearch" labelWidth="90px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData">
<template slot="merchantId" slot-scope="item">
<select-page :form="searchForm" width="200" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page>
</template>
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
......@@ -66,7 +69,20 @@ export default {
value: ''
}
},
topSearchFormData: [
// topSearchFormData: [
// {
// label: '商户名称',
// name: 'merchantId',
// nameLabel: 'merchantName',
// optionList: [],
// optionId: 'id',
// optionLabel: 'merchantName',
// optionsName: 'allMerchantList',
// addHtml: 'merchantId'
// }
// ],
// 搜索
searchFormData: [
{
label: '商户名称',
name: 'merchantId',
......@@ -76,15 +92,12 @@ export default {
optionLabel: 'merchantName',
optionsName: 'allMerchantList',
addHtml: 'merchantId'
}
],
// 搜索
searchFormData: [
},
{
label: '角色',
name: 'roleId',
type: 'select',
width: '200px',
width: '160px',
optionList: [],
optionId: 'id',
optionLabel: 'roleName',
......@@ -94,7 +107,7 @@ export default {
label: '状态',
name: 'status',
type: 'select',
width: '200px',
width: '110px',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
......@@ -207,7 +220,7 @@ export default {
this.userInfo = this.$globalState.session
// 门店
if (this.userInfo.accountLevel == 4) {
// this.searchFormData.splice(0, 1)
this.searchFormData.splice(0, 1)
var idx = this.tableParams.tableColumns.findIndex(item => item.prop == 'merchantName')
this.tableParams.tableColumns.splice(idx, 1)
}
......@@ -219,7 +232,7 @@ export default {
getAllMerchantList() {
this.$apis.employee.getAllMerchantListApi({}).then(res => {
this.baseData.allMerchantList = res
this.userInfo.accountLevel == 4 ? this.handleChangeMerchant(res[0].id) : this.getOptionsList('topSearchFormData', true, 'merchantId')
this.userInfo.accountLevel == 4 ? this.handleChangeMerchant(res[0].id) : this.getOptionsList('searchFormData', true, 'merchantId')
})
},
getStaffStatusList() {
......@@ -292,8 +305,7 @@ export default {
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
var id = row ? row.id : '-1'
this.$router.push('/employee/editEmployee/' + addOrEdit + '/' + id)
addOrEdit == 1 ? this.$router.push('/employee/editEmployee/' + addOrEdit) : this.$router.push('/employee/editEmployee/' + addOrEdit + '/' + row.id)
},
handleSwitchChange(val, row) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!