Commit 4a0076c0 by cwq0219

员工

1 parent b83b455b
<!-- 员工管理 --> <!-- 员工管理 -->
<template> <template>
<div class="config-employee employee-list"> <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> <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"> <template slot="merchantId" slot-scope="item">
<select-page :form="searchForm" width="200" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page> <select-page :form="searchForm" width="200" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page>
</template> </template>
</glsx-combi-form> </glsx-combi-form> -->
</div> </div>
<div class="container"> <div class="container">
<div> <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"> <span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button> <el-button :size="size" type="primary" @click="handleExport">导出</el-button>
...@@ -66,7 +69,20 @@ export default { ...@@ -66,7 +69,20 @@ export default {
value: '' value: ''
} }
}, },
topSearchFormData: [ // topSearchFormData: [
// {
// label: '商户名称',
// name: 'merchantId',
// nameLabel: 'merchantName',
// optionList: [],
// optionId: 'id',
// optionLabel: 'merchantName',
// optionsName: 'allMerchantList',
// addHtml: 'merchantId'
// }
// ],
// 搜索
searchFormData: [
{ {
label: '商户名称', label: '商户名称',
name: 'merchantId', name: 'merchantId',
...@@ -76,15 +92,12 @@ export default { ...@@ -76,15 +92,12 @@ export default {
optionLabel: 'merchantName', optionLabel: 'merchantName',
optionsName: 'allMerchantList', optionsName: 'allMerchantList',
addHtml: 'merchantId' addHtml: 'merchantId'
} },
],
// 搜索
searchFormData: [
{ {
label: '角色', label: '角色',
name: 'roleId', name: 'roleId',
type: 'select', type: 'select',
width: '200px', width: '160px',
optionList: [], optionList: [],
optionId: 'id', optionId: 'id',
optionLabel: 'roleName', optionLabel: 'roleName',
...@@ -94,7 +107,7 @@ export default { ...@@ -94,7 +107,7 @@ export default {
label: '状态', label: '状态',
name: 'status', name: 'status',
type: 'select', type: 'select',
width: '200px', width: '110px',
optionList: [], optionList: [],
optionId: 'dictValue', optionId: 'dictValue',
optionLabel: 'dictLabel', optionLabel: 'dictLabel',
...@@ -207,7 +220,7 @@ export default { ...@@ -207,7 +220,7 @@ export default {
this.userInfo = this.$globalState.session this.userInfo = this.$globalState.session
// 门店 // 门店
if (this.userInfo.accountLevel == 4) { 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') var idx = this.tableParams.tableColumns.findIndex(item => item.prop == 'merchantName')
this.tableParams.tableColumns.splice(idx, 1) this.tableParams.tableColumns.splice(idx, 1)
} }
...@@ -219,7 +232,7 @@ export default { ...@@ -219,7 +232,7 @@ export default {
getAllMerchantList() { getAllMerchantList() {
this.$apis.employee.getAllMerchantListApi({}).then(res => { this.$apis.employee.getAllMerchantListApi({}).then(res => {
this.baseData.allMerchantList = 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() { getStaffStatusList() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!