企业管理-员工管理

This commit is contained in:
xiao-fajia 2024-08-14 11:56:08 +08:00
parent dade73dfda
commit 50fa557e40
7 changed files with 296 additions and 8 deletions

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 获取推广记录分页
export function getBasePromotionPage(params) {
return request({
url: '/base/promotion/page',
method: 'get',
params
})
}

View File

@ -96,6 +96,8 @@ export const DICT_TYPE = {
DICT_SYS_USER_SEX : 'system_user_sex',
//客户状态
DICT_CUS_INFO_STATUS : 'cus_info_status',
//推广渠道
PROMOTION_CHANNEL : 'promotion_channel',
// ------- carMain模块 -------
//车辆性质

View File

@ -0,0 +1,128 @@
<template>
<div class="app-container">
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body>
<el-descriptions class="margin-top" title="推广人信息" :column="3" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>
推广人姓名
</template>
{{ formData.oldUserName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-mobile-phone"></i>
推广人电话
</template>
{{ formData.oldUser.mobile }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="margin-top" title="被推广人信息" :column="3" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>
推广人姓名
</template>
{{ formData.newUserName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-mobile-phone"></i>
推广人电话
</template>
{{ formData.newUser.mobile }}
</el-descriptions-item>
</el-descriptions>
<el-descriptions class="margin-top" title="推广记录" :column="2" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-star-off"></i>
推广渠道
</template>
<dict-tag :type="DICT_TYPE.PROMOTION_CHANNEL" :value="formData.promotionChannel"/>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-collection"></i>
推广人推广码
</template>
{{ formData.uniqueCode }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-timer"></i>
被推广人注册时间
</template>
{{ formData.registerTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-place"></i>
推广人角色
</template>
<!-- <dict-tag :type="DICT_TYPE.USER_IDENTITY" :value="formData.identity"/>-->
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'PromotionData',
data(){
return{
//
dialogTitle: '推广记录查看',
//
dialogVisible: false,
formData:{
oldUser: {
mobile: null,
},
newUser: {
mobile: null,
},
oldUserName: null,
newUserName: null,
promotionChannel: null,
uniqueCode: null,
registerTime: null,
identity: null
},
}
},
methods:{
/** 打开弹窗 */
async open(row) {
this.reset()
this.formData = row
this.dialogVisible = true
},
/** 表单重置 */
reset() {
this.formData = {
oldUser: {
mobile: null,
},
newUser: {
mobile: null,
},
oldUserName: null,
newUserName: null,
promotionChannel: null,
uniqueCode: null,
registerTime: null,
identity: null
}
this.resetForm('formRef')
},
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,155 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="140px">
<el-form-item label="推广人姓名" prop="oldUserName">
<el-input v-model="queryParams.oldUserName" placeholder="请输入推广人姓名" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="推广人角色" prop="identity">
<el-select v-model="queryParams.identity" placeholder="请选择推广人角色" clearable size="small">
<!-- <el-option-->
<!-- v-for="dict in this.getDictDatas(DICT_TYPE.USER_IDENTITY)"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
</el-select>
</el-form-item>
<el-form-item label="推广人推广码" prop="uniqueCode">
<el-input v-model="queryParams.uniqueCode" placeholder="请输入推广人推广码" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="被推广人姓名" prop="newUserName">
<el-input v-model="queryParams.newUserName" placeholder="请输入被推广人姓名" clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="推广渠道" prop="promotionChannel">
<el-select v-model="queryParams.promotionChannel" placeholder="请选择推广渠道" clearable size="small">
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.PROMOTION_CHANNEL)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="被推广人注册时间" prop="registerTimeArray">
<el-date-picker v-model="queryParams.registerTimeArray" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="序号" align="center">
<template scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="推广人姓名" align="center" prop="oldUserName" width="180" />
<el-table-column label="推广人电话" align="center" prop="oldUser.mobile" width="180" />
<el-table-column label="推广人角色" align="center" prop="identity" width="180">
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.USER_IDENTITY" :value="scope.row.identity"/>
</template>
</el-table-column>
<el-table-column label="推广人推广码" align="center" prop="uniqueCode" width="180" />
<el-table-column label="推广渠道" align="center" prop="promotionChannel" width="180">
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.PROMOTION_CHANNEL" :value="scope.row.promotionChannel"/>
</template>
</el-table-column>
<el-table-column label="被推广人姓名" align="center" prop="newUserName" width="180" />
<el-table-column label="被推广人电话" align="center" prop="newUser.mobile" width="180" />
<el-table-column label="被推广人注册时间" align="center" prop="registerTime" width="180" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-search" @click="openForm(scope.row)"
>列表查看
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<PromotionData ref="promotionData" @success="getList" />
</div>
</template>
<script>
import * as PromotionApi from '@/api/company/promotion'
import PromotionData from '@/views/company/promotion/form/PromotionData'
export default {
name: 'Promotion',
components: {
PromotionData
},
data() {
return {
//
queryParams: {
pageNo: 1,
pageSize: 10,
oldUserName: null,
promotionChannel: null,
newUserName: null,
registerTimeArray: null,
uniqueCode: null,
identity: null
},
//
showSearch: true,
total: 0,
//
loading: true,
list:[],
}
},
created() {
this.getList()
},
methods: {
/** 查询列表 */
async getList() {
try {
this.loading = true
const res = await PromotionApi.getBasePromotionPage(this.queryParams)
this.list = res.data.records
this.total = res.data.total
} finally {
this.loading = false
}
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
/** 列表查看操作 */
openForm(row) {
this.$refs['promotionData'].open(row)
},
}
}
</script>
<style scoped>
</style>

View File

@ -264,11 +264,6 @@ export default {
},
/** 删除按钮操作 */
async handleDelete(row) {
const isChange = row.isChange
if (!isChange) {
this.$modal.msgError('该员工还有工作未交接,不可删除')
return
}
const workNo = row.workNo
const id = row.id
await this.$modal.confirm('是否确认删除员工工号为"' + workNo + '"的数据项?')

View File

@ -1,7 +1,6 @@
<template>
<div id="app-container">
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body>
<div>
<el-descriptions class="margin-top" title="交出方员工信息" :column="3" border>
<el-descriptions-item>
<template slot="label">
@ -113,7 +112,6 @@
</el-card>
</el-descriptions-item>
</el-descriptions>
</div>
</el-dialog>
</div>
</template>

View File

@ -161,7 +161,7 @@ export default {
// this.resetForm('queryForm')
this.handleQuery()
},
/** 添加/修改操作 */
/** 列表查看操作 */
openForm(row) {
this.$refs['staffChangeFormData'].open(row)
},