Commit 886e0745 by 前端

Merge branch 'SAAS+V4.39.0-0603' into 'master'

上线合并

See merge request !12
2 parents 77457811 c4180376
......@@ -2,77 +2,100 @@ import { http } from '@/main'
// 分页查询客户信息
const getList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchant.staff.page'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchant.staff.page'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取服务中心下拉筛选 所有服务商数据
const getServiceCenterList = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.businessAssistant.serviceCenter.listByServiceMerchantId'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.businessAssistant.serviceCenter.listByServiceMerchantId'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据园区店商户号获取4s列表(包含超管权限)
const getSimpleMerchantListByPage = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.scenemerchantref.query4SRefByYqShopPageIncludeAdmin`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.scenemerchantref.query4SRefByYqShopPageIncludeAdmin`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 查询员工详情
const getMerchantInfo = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchant.staff.performanceConfig.detail'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchant.staff.performanceConfig.detail'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 新增客户
const createMerchantStaff = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchant.staff.save'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchant.staff.save'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 编辑客户
const updateMerchantStaff = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchant.staff.update'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.merchant.staff.update'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 员工申请列表
const staffAuditPage = params => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = 'dj.api.smartcarlife.staff.audit.page'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 员工审核(新增/变更/删除)
const staffAuditAdd = params => {
params.method = `scrm.api.boutique.staff.audit.add`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getList, getServiceCenterList, getSimpleMerchantListByPage, getMerchantInfo, createMerchantStaff, updateMerchantStaff }
export default { getList, getServiceCenterList, getSimpleMerchantListByPage, getMerchantInfo, createMerchantStaff, updateMerchantStaff, staffAuditPage, staffAuditAdd }
<!-- 我的员工申请弹窗 -->
<template>
<GLDialog class="apply-store"
bigTitle="我的员工申请"
mode="big"
:visible.sync="isVisible"
:before-close="handleClose"
v-loading="loading"
:hasFooter="false">
<div>
<slot name="search"></slot>
<GLTable ref="storeRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis"
slot="merchantName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.merchantName">
<span slot="reference">
{{ scope.scope.merchantName }}
</span>
</el-popover>
</div>
<div class="tb-ellipsis"
slot="merchantAddress"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.merchantAddress">
<span slot="reference">
{{ scope.scope.merchantAddress }}
</span>
</el-popover>
</div>
<div slot="brand"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.merchantBrandNameList ? scope.scope.merchantBrandNameList.join('/') : '--'">
<span slot="reference"
class="one-line-ellipsis">
{{ scope.scope.merchantBrandNameList ? scope.scope.merchantBrandNameList.join('/') : '--' }}
</span>
</el-popover>
</div>
<div class="tb-ellipsis"
slot="yqMerchantName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.yqMerchantName">
<span slot="reference">
{{ scope.scope.yqMerchantName }}
</span>
</el-popover>
</div>
<div slot="applyStatus"
slot-scope="scope"
class="flex">
<div :class="['dot', statusClass[scope.scope.reviewStatus]]"></div>
{{ reviewStatusObj[scope.scope.reviewStatus] }}
</div>
</GLTable>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'StaffApplyDialog',
data() {
return {
// 表格组件
userInfo: {},
tableSearchForm: {},
url: url,
getListApi: this.$apis.staff.staffAuditPage,
// 表格参数
tableParams: {
listName: 'list',
tableColumns: [
{
label: '服务中心名称',
prop: 'serviceMerchantName',
minWidth: 200
},
{
label: '员工姓名',
prop: 'staffName',
width: 150,
line: 1
},
{
label: '员工手机号',
prop: 'staffPhone',
width: 130
},
{
label: '新员工姓名',
prop: 'staffNameNew',
width: 150,
line: 1
},
{
label: '新员工手机号',
prop: 'staffPhoneNew',
width: 130
},
{
label: '类型',
prop: 'auditType',
formatter: (cellValue) => {
return this.baseData.auditTypeList.find(item => item.confId === cellValue.auditType)?.confValue
}
},
{
label: '申请时间',
prop: 'applyTime',
width: '180px',
formatter: cellValue => {
return cellValue.applyTime ? dayjs(cellValue.applyTime).format('YYYY/MM/DD HH:mm:ss') : '--'
}
},
{
label: '申请状态',
prop: 'auditStatus',
width: '100px',
formatter: (cellValue) => {
return this.baseData.auditStatusList.find(item => item.confId === cellValue.auditStatus)?.confValue
}
},
{
label: '说明',
prop: 'auditRemark',
width: 200,
line: 1
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
statusClass: {
1: '',
2: 'green',
3: 'red'
},
reviewStatusObj: {
1: '审核中',
2: '已通过',
3: '已驳回'
},
baseData: {
auditStatusList: [
{ confId: 0, confValue: "待审核" },
{ confId: 1, confValue: "已审核" },
{ confId: 2, confValue: "已驳回" }
],
auditTypeList: [
{ confId: 0, confValue: "变更" },
{ confId: 1, confValue: "新增" },
{ confId: 2, confValue: "删除" }
],
},
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => { }
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
.flex {
display: flex;
align-items: center;
}
.dot {
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 4px;
margin-right: 6px;
}
.green {
background: #4aca74;
}
.red {
background: #eb4e4e;
}
</style>
<template>
<div class="shop">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<h2>员工管理列表</h2>
<div>
<el-button size="small" @click="handleEditStaff('add')" type="primary" plain>新增员工</el-button>
<el-button size="small"
@click="handleEditStaff('add')"
type="primary"
plain>新增员工</el-button>
<el-button size="small"
@click="staffApply">我的员工申请</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="pointRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis" slot="staffNameKeyword" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.staffNameKeyword">
<GLTable ref="pointRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis"
slot="staffNameKeyword"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.staffNameKeyword">
<span slot="reference">
{{ scope.scope.staffNameKeyword }}
</span>
</el-popover>
</div>
<div class="tb-ellipsis" slot="merchantName" slot-scope="scope">
<el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.merchantName">
<div class="tb-ellipsis"
slot="merchantName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.merchantName">
<span slot="reference">
{{ scope.scope.merchantName }}
</span>
</el-popover>
</div>
<div slot="visibleMerchantList" slot-scope="scope">
<el-tooltip v-if="scope.scope.visibleMerchantList && scope.scope.visibleMerchantList.length > 0" placement="top" effect="light">
<div slot="visibleMerchantList"
slot-scope="scope">
<el-tooltip v-if="scope.scope.visibleMerchantList && scope.scope.visibleMerchantList.length > 0"
placement="top"
effect="light">
<div slot="content">
<div class="text-3 font-12 weight-6" style="line-height: 24px">使用门店</div>
<div class="text-3 font-12 weight-6"
style="line-height: 24px">使用门店</div>
<div class="merchant-wrap">
<div class="text-6 font-12" style="line-height: 24px" v-for="item in scope.scope.visibleMerchantList" :key="item">{{ item.merchantName }}</div>
<div class="text-6 font-12"
style="line-height: 24px"
v-for="item in scope.scope.visibleMerchantList"
:key="item">{{ item.merchantName }}</div>
</div>
</div>
<div class="use-store">
......@@ -40,14 +74,31 @@
</el-tooltip>
<span v-else>--</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<!-- <GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton> -->
<template v-if="scope.scope.auditStatus == 0">
<el-button type="text"
style="color:#909399">审核中</el-button>
</template>
<template v-else>
<el-button type="text"
@click="handleEditStaff('edit',scope.scope)">编辑</el-button>
<el-button type="text"
@click="del(scope.scope)">删除</el-button>
</template>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- <ApplyStoreDialog v-if="isApplyVisible" :isVisible="isApplyVisible" @handleClose="handleApply"></ApplyStoreDialog> -->
<!-- <InviteDialog v-if="isInviteVisible" :isVisible="isInviteVisible" :inviteInfo="inviteInfo" @handleClose="handleInviteClose"></InviteDialog> -->
<StaffApplyDialog v-if="staffApplyVisible"
:isVisible="staffApplyVisible"
@handleClose="staffApplyDialogClose" />
</div>
</template>
......@@ -56,7 +107,11 @@ import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
// import ApplyStoreDialog from './components/ApplyStoreDialog.vue'
// import InviteDialog from './components/InviteDialog.vue'
import StaffApplyDialog from './components/StaffApplyDialog.vue'
export default {
components: {
StaffApplyDialog
},
data() {
return {
size: 'small',
......@@ -122,7 +177,7 @@ export default {
tableParams: {
listName: 'list',
tableOption: {
width: '80px'
width: '120px'
},
tableColumns: [
{
......@@ -177,10 +232,11 @@ export default {
{ text: '驻店', value: 0 },
{ text: '技师', value: 1 }
]
}
},
staffApplyVisible: false
}
},
mounted() {},
mounted() { },
methods: {
getServiceCenterList() {
const params = {
......@@ -236,11 +292,54 @@ export default {
this.$router.push({
path: '/staffManage/edit',
query: {
$title: encodeURI(editType == 'add' ? '新增员工' : '编辑员工'),
obj: JSON.stringify(params)
$title: encodeURI(editType == 'add' ? '新增员工' : '编辑员工'),
obj: JSON.stringify(params)
}
})
}
},
//打开员工申请弹窗
staffApply() {
this.staffApplyVisible = !this.staffApplyVisible
},
//关闭员工申请弹窗
staffApplyDialogClose() {
this.staffApplyVisible = !this.staffApplyVisible
},
//删除
del(row) {
console.log('row', row);
var params = {}
params.merchantNo = row.merchantNo
params.merchantName = row.merchantName
params.staffName = row.staffName
params.staffPhone = row.staffPhone
params.createdSource = 5 //创建来源 1:账户中心 2:SCRM 3:生意助手 4:门店助手 5:服务商saas
params.visualType = row.visualType
params.visibleMerchantNoList = row.visibleMerchantList.map(item => {
return item.merchantNo
})
params.staffType = row.staffBusinessType
params.auditType = 2 //审核类型 0:变更 1:新增 2:删除
params.staffUuid = row.staffUuid
this.$confirm('<strong>是否确定删除?</strong> <div>删除员工将提交审核,审核通过后完成删除,删除后不可恢复。</div> ', '提示', {
dangerouslyUseHTMLString: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.staff.staffAuditAdd(params).then(res => {
this.$notify({
type: 'success',
title: res.message || '操作成功'
})
this.$refs.pointRef.refreshTable()
})
})
.catch(err => {
console.log(err)
})
},
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!