Commit fa134b46 by cwq0219

员工

1 parent cddfea45
<!-- 基本信息 --> <!-- 基本信息 -->
<template> <template>
<div class="config-employee"> <div class="config-employee config-info">
<div class="container"> <div class="container edit-box">
<p class="edit-sub-title p-rl-20">员工基本信息</p> <p class="edit-title">员工基本信息</p>
<el-form label-width="140px" :inline="true"> <el-form label-width="140px" :inline="true" style="margin: 32px 0 12px;">
<el-form-item class="basic-info" v-for="(item, index) in detailFormData" :key="index" :label="item.label + ':'"> <el-form-item class="basic-info" isEdit="true" v-for="(item, index) in detailFormData" :key="index" :label="item.label + ':'">
<span class="txt-ellipsis" style="display: inline-block; width: 100%;" :title="info[item.name] || '-'">{{ info[item.name] || '-' }}</span> <span class="txt-ellipsis" style="display: inline-block; width: 100%; height: 28px;" :title="info[item.name] || '-'">{{ info[item.name] || '-' }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="container"> <div class="container edit-box">
<p class="edit-sub-title p-rl-20">可见下级商户</p> <p class="edit-title">可见下级商户</p>
<div class="config-mer-name"> <div class="config-mer-name">
<p class="txt-ellipsis" v-for="(item, index) in info.visibleInferiorMerName.split(',')" :key="index" :title="item">{{ item }}</p> <p class="txt-ellipsis" style="margin-bottom: 32px" v-for="(item, index) in info.visibleInferiorMerName.split(',')" :key="index" :title="item">{{ item }}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -84,10 +84,10 @@ export default { ...@@ -84,10 +84,10 @@ export default {
margin-top: 20px; margin-top: 20px;
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px; /* padding: 20px; */
} }
.config-employee .p-rl-20 { .config-employee .edit-box.container {
padding: 0 20px; padding: 26px 0 20px;
} }
.config-employee .flex { .config-employee .flex {
display: flex; display: flex;
...@@ -114,12 +114,14 @@ export default { ...@@ -114,12 +114,14 @@ export default {
} }
.config-employee .edit-title { .config-employee .edit-title {
font-size: 20px; font-size: 16px;
font-weight: bold; font-weight: 500;
color: #333333; font-family: PingFangSC-Medium, PingFang SC;
line-height: 38px; height: 28px;
height: 38px; line-height: 28px;
border-bottom: 1px solid #E7EAEC;
margin: 0 0; margin: 0 0;
padding: 0 0 17px 40px;
} }
.config-employee .edit-sub-title { .config-employee .edit-sub-title {
...@@ -147,7 +149,7 @@ export default { ...@@ -147,7 +149,7 @@ export default {
.config-employee .config-mer-name { .config-employee .config-mer-name {
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
margin: 21px 0 0 140px; margin: 32px 0 0 140px;
min-height: 36px; min-height: 36px;
} }
.config-employee .txt-ellipsis { .config-employee .txt-ellipsis {
...@@ -159,8 +161,16 @@ export default { ...@@ -159,8 +161,16 @@ export default {
.config-employee .basic-info { .config-employee .basic-info {
margin-bottom: 0; margin-bottom: 0;
width: 48%; width: 48%;
height: 22px;
line-height: 22px;
margin-bottom: 24px;
} }
.config-employee .basic-info .el-form-item__content { .config-employee .basic-info .el-form-item__content {
width: calc(100% - 140px); width: calc(100% - 140px);
} }
.config-info .el-form--inline .el-form-item__label,
.config-info .basic-info .el-form-item__content {
height: 22px;
line-height: 22px;
}
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<div class="config-employee"> <div class="config-employee">
<div class="container"> <div class="container">
<p class="edit-sub-title p-rl-20">修改记录</p> <!-- <p class="edit-sub-title p-rl-20">修改记录</p> -->
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="auth-button" slot-scope="scope"> <template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
...@@ -136,25 +136,6 @@ export default { ...@@ -136,25 +136,6 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.config-employee .edit-title {
font-size: 20px;
font-weight: bold;
color: #333333;
line-height: 38px;
height: 38px;
margin: 0 0;
}
.config-employee .edit-sub-title {
height: 48px;
line-height: 48px;
font-size: 16px;
color: #333333;
font-weight: 600;
border-bottom: 1px solid #e7eaec;
margin: 0 0;
}
.config-employee .filter-tree { .config-employee .filter-tree {
width: 360px; width: 360px;
max-height: 200px; max-height: 200px;
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
} }
} }
</script> </script>
<style scoped> <style>
.config-employee { .config-employee {
margin-bottom: 64px; margin-bottom: 64px;
} }
...@@ -92,25 +92,6 @@ export default { ...@@ -92,25 +92,6 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.config-employee .edit-title {
font-size: 20px;
font-weight: bold;
color: #333333;
line-height: 38px;
height: 38px;
margin: 0 0;
}
.config-employee .edit-sub-title {
height: 48px;
line-height: 48px;
font-size: 16px;
color: #333333;
font-weight: 600;
border-bottom: 1px solid #e7eaec;
margin: 0 0;
}
.config-employee .filter-tree { .config-employee .filter-tree {
width: 360px; width: 360px;
max-height: 200px; max-height: 200px;
...@@ -124,4 +105,11 @@ export default { ...@@ -124,4 +105,11 @@ export default {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.config-employee .el-tabs__nav-wrap:after {
opacity: 0;
}
.config-employee .el-tabs__item {
height: 20px !important;
line-height: 10px !important;
}
</style> </style>
<template> <template>
<div class="config-employee"> <div class="config-employee">
<div class="container" style="margin-top: 0"> <!-- <div class="container" style="margin-top: 0">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
</div> </div> -->
<div class="container"> <div class="container edit-box">
<p class="edit-sub-title p-rl-20">员工基本信息</p> <p class="edit-title">员工基本信息</p>
<glsx-combi-form class="p-tr-20" ref="editFormRef" labelWidth="160px" @handleImgDelete="handleImgDelete" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form ref="editFormRef" isEdit="true" style="margin: 20px 20px 0 0;" @handleImgDelete="handleImgDelete" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="merchantId" slot-scope="item"> <template slot="merchantId" slot-scope="item">
<span class="txt-ellipsis" v-if="routeInfo.addOrEdit == 2 || (routeInfo.addOrEdit == 1 && userInfo.accountLevel == 4)" :title="editForm.merchantName">{{ editForm.merchantName}}</span> <span class="txt-ellipsis" v-if="routeInfo.addOrEdit == 2 || (routeInfo.addOrEdit == 1 && userInfo.accountLevel == 4)" :title="editForm.merchantName">{{ editForm.merchantName}}</span>
<el-select v-else :style="{ width: item.scope.width }" v-model="editForm[item.scope.name]" :clearable="item.scope.isClear || false" :placeholder="'请选择' + item.scope.label" :filterable="!item.scope.noFilter" @change="handleChangeMerchant($event)"> <el-select v-else :style="{ width: item.scope.width }" v-model="editForm[item.scope.name]" :clearable="item.scope.isClear || false" :placeholder="'请选择' + item.scope.label" :filterable="!item.scope.noFilter" @change="handleChangeMerchant($event)">
...@@ -386,10 +386,10 @@ export default { ...@@ -386,10 +386,10 @@ export default {
margin-top: 20px; margin-top: 20px;
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px; /* padding: 20px; */
} }
.config-employee .p-rl-20 { .config-employee .edit-box.container {
padding: 0 20px; padding: 20px 0 20px;
} }
.config-employee .p-tr-20 { .config-employee .p-tr-20 {
padding: 20px 20px 0; padding: 20px 20px 0;
...@@ -420,15 +420,17 @@ export default { ...@@ -420,15 +420,17 @@ export default {
} }
.config-employee .edit-title { .config-employee .edit-title {
font-size: 20px; font-size: 16px;
font-weight: bold; font-weight: 500;
color: #333333; font-family: PingFangSC-Medium,PingFang SC;
line-height: 38px; height: 28px;
height: 38px; line-height: 28px;
border-bottom: 1px solid #e7eaec;
margin: 0 0; margin: 0 0;
padding: 0 0 11px 40px;
} }
.config-employee .edit-sub-title { /* .config-employee .edit-sub-title {
height: 48px; height: 48px;
line-height: 48px; line-height: 48px;
font-size: 16px; font-size: 16px;
...@@ -436,7 +438,7 @@ export default { ...@@ -436,7 +438,7 @@ export default {
font-weight: 600; font-weight: 600;
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #e7eaec;
margin: 0 0; margin: 0 0;
} } */
.config-employee .filter-tree { .config-employee .filter-tree {
width: 360px; width: 360px;
max-height: 200px; max-height: 200px;
......
...@@ -3,13 +3,16 @@ ...@@ -3,13 +3,16 @@
<div class="glsx-combi-form"> <div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :label-width="labelWidth" :rules="formRules" size="small" class="glsx-combi-form-block"> <el-form :ref="formRef" :inline="true" :model="formObj" :label-width="labelWidth" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData"> <template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :class="{ 'no-label': !item.label, isBlock: isBlock }" :label="item.label ? item.label + ':' : ''" :prop="item.name"> <el-form-item v-if="!item.isHide" :key="index" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px': '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label"> <span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'"> <el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
<span class="tips-icon"></span> <span class="tips-icon"></span>
</el-tooltip> </el-tooltip>
{{ item.label ? ':' : '' }} {{ item.label }}
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? (item.labelWidth + labelPaddingRight) + 'px' : '', 'padding-right': isEdit ? '12px' : (labelPaddingRight + 'px') }">{{ item.label }}</span>
</span> </span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot> <slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<div v-else-if="item.type === 'input'"> <div v-else-if="item.type === 'input'">
...@@ -55,8 +58,8 @@ ...@@ -55,8 +58,8 @@
<p class="photo-top-tips">{{ item.topTips }}</p> <p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled"> <div v-if="!item.isDisabled">
<div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length < item.maxPhotoNum : !formObj[item.name]" class="activity-img img-w-h"> <div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length < item.maxPhotoNum : !formObj[item.name]" class="activity-img img-w-h">
<div class="add">+</div> <div class="add" :style="{ top: item.maxPhotoNum == 1 ? '50%' : '40%' }">+</div>
<span class="number">{{ formObj[item.name].length }} / {{ item.maxPhotoNum }}</span> <span v-show="item.maxPhotoNum > 1" class="number">{{ formObj[item.name].length }} / {{ item.maxPhotoNum }}</span>
<input type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleImgChange(e, item)" /> <input type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleImgChange(e, item)" />
</div> </div>
</div> </div>
...@@ -119,9 +122,18 @@ export default { ...@@ -119,9 +122,18 @@ export default {
type: String, type: String,
default: 'formRef' default: 'formRef'
}, },
isEdit: {
type: Boolean,
default: false
},
labelWidth: { labelWidth: {
type: String, type: Number,
default: '85px' // 默认是四个字符长度
default: 56
},
labelPaddingRight: {
type: Number,
default: 15
}, },
formData: { formData: {
type: Array, type: Array,
...@@ -224,10 +236,17 @@ export default { ...@@ -224,10 +236,17 @@ export default {
/* .glsx-combi-form .el-form-item { /* .glsx-combi-form .el-form-item {
width: 65%; width: 65%;
} */ } */
.glsx-combi-form .no-label.el-form-item--small .el-form-item__content, .glsx-combi-form .no-label.el-form-item--small .el-form-item__content {
.el-form-item--small .el-form-item__label {
width: 100%; width: 100%;
} }
.glsx-combi-form .el-form-item--small.el-form-item {
margin: 0 30px 20px 0;
}
.glsx-combi-form .el-form-item--small .el-form-item__label {
padding: 0;
}
/* .glsx-combi-form .el-form-item--small .el-form-item__content { /* .glsx-combi-form .el-form-item--small .el-form-item__content {
width: calc(100% - 85px); width: calc(100% - 85px);
} */ } */
...@@ -296,6 +315,7 @@ export default { ...@@ -296,6 +315,7 @@ export default {
.glsx-combi-form .activity-img { .glsx-combi-form .activity-img {
position: relative; position: relative;
color: #999999; color: #999999;
background-color: #F7F7F7;
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
cursor: pointer; cursor: pointer;
} }
......
...@@ -6,10 +6,9 @@ ...@@ -6,10 +6,9 @@
</div> </div>
<div class="container"> <div class="container">
<div> <div>
<glsx-combi-form ref="showSearch" labelWidth="90px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData">
<!-- <template slot="merchantId" slot-scope="item"> </glsx-combi-form>
<select-page :form="searchForm" width="200" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page> <glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData2">
</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>
...@@ -82,7 +81,6 @@ export default { ...@@ -82,7 +81,6 @@ export default {
label: '角色', label: '角色',
name: 'roleId', name: 'roleId',
type: 'select', type: 'select',
width: '160px',
optionList: [], optionList: [],
optionId: 'id', optionId: 'id',
optionLabel: 'roleName', optionLabel: 'roleName',
...@@ -92,19 +90,21 @@ export default { ...@@ -92,19 +90,21 @@ export default {
label: '状态', label: '状态',
name: 'status', name: 'status',
type: 'select', type: 'select',
width: '110px',
optionList: [], optionList: [],
optionId: 'dictValue', optionId: 'dictValue',
optionLabel: 'dictLabel', optionLabel: 'dictLabel',
optionsName: 'staffStatusList' optionsName: 'staffStatusList'
}, }
],
// 搜索2
searchFormData2: [
{ {
type: 'selectInput', type: 'selectInput',
selectName: 'staffNameOrPhone', selectName: 'staffNameOrPhone',
isClear: true, isClear: true,
maxlength: 15, maxlength: 15,
inputWidth: '320px', inputWidth: '286px',
selectWidth: '120px', selectWidth: '71px',
selectOption: [ selectOption: [
{ {
label: '员工姓名', label: '员工姓名',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!