Commit 89ed9100 by 张立顺

test

1 parent 3247b56e
<template>
<div class="shop">
<div class="container">
<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>
</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">
<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">
<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="content">
<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>
</div>
<div class="use-store">
<img src="@/assets/store.png" />
x {{ scope.scope.visibleMerchantList.length }}
</div>
</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>
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- <ApplyStoreDialog v-if="isApplyVisible" :isVisible="isApplyVisible" @handleClose="handleApply"></ApplyStoreDialog> -->
<!-- <InviteDialog v-if="isInviteVisible" :isVisible="isInviteVisible" :inviteInfo="inviteInfo" @handleClose="handleInviteClose"></InviteDialog> -->
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
// import ApplyStoreDialog from './components/ApplyStoreDialog.vue'
// import InviteDialog from './components/InviteDialog.vue'
export default {
data() {
return {
size: 'small',
url: url,
userInfo: {},
merchantNoList: [],
searchForm: {
staffPhoneKeyword: '',
staffNameKeyword: '',
staffType: '',
yqMerchantId: ''
},
tableSearchForm: {},
showFormData: [
{
label: '员工姓名',
name: 'staffNameKeyword',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '员工手机号',
name: 'staffPhoneKeyword',
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '员工类型',
name: 'staffType',
type: 'select',
optionList: [],
optionId: 'value',
optionLabel: 'text',
optionsName: 'staffTypeList'
},
{
label: '所属服务中心',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'yqMerchantId',
optionLabel: 'yqMerchantName',
optionsName: 'merchantList'
}
],
tableButtonList: [
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEditStaff('edit', row)
}
}
],
// 表格
getListApi: this.$apis.staff.getList,
tableParams: {
listName: 'list',
tableOption: {
width: '80px'
},
tableColumns: [
{
label: '员工姓名',
prop: 'staffName',
minWidth: 100
},
{
label: '员工类型',
prop: 'staffBusinessType',
formatter: cellValue => {
const data = this.baseData.staffTypeList.filter(item => item.value == cellValue.staffBusinessType)
return data.length > 0 ? data[0].text : '--'
},
minWidth: 120
},
{
label: '员工手机号',
prop: 'staffPhone',
minWidth: 120
},
{
label: '所属服务中心',
prop: 'merchantName',
addHtml: 'merchantName',
minWidth: 120
},
{
label: '负责门店',
prop: '',
addHtml: 'visibleMerchantList',
minWidth: 100
},
{
label: '创建时间',
prop: 'createdDate',
minWidth: 150,
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY/MM/DD') : '--'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
isApplyVisible: false,
isInviteVisible: false,
inviteInfo: {},
// 基本数据
baseData: {
merchantList: [],
staffTypeList: [
{ text: '驻店', value: 0 },
{ text: '技师', value: 1 }
]
}
}
},
mounted() {},
methods: {
getServiceCenterList() {
const params = {
partnerMerchantId: this.$globalState.session.merchantId
}
return new Promise(resolve => {
this.$apis.customer.getServiceCenterList(params).then(res => {
this.baseData.merchantList = res
resolve(res)
this.$utils.getOptionsList(this, 'showFormData')
})
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
async beforeSearchFn() {
this.merchantNoList = []
let data = await this.getServiceCenterList()
data.forEach(item => {
this.merchantNoList.push(item.yqMerchantId)
})
return new Promise(resolve => {
this.tableSearchForm = JSON.parse(JSON.stringify(this.getParams()))
this.tableSearchForm.merchantNoList = this.tableSearchForm.yqMerchantId ? [this.tableSearchForm.yqMerchantId] : this.merchantNoList
delete this.tableSearchForm.yqMerchantId
resolve()
})
},
handleSearch() {
this.$refs.pointRef.refreshTable()
},
handleReset() {
this.searchForm = {}
this.handleSearch()
},
handleApply() {
this.isApplyVisible = !this.isApplyVisible
},
handleInviteClose() {
this.isInviteVisible = !this.isInviteVisible
},
handleInvite(row) {
this.inviteInfo = row
this.handleInviteClose()
},
handleEditStaff(editType, row) {
var params = {
editType: editType,
}
editType != 'add' && (params.merchantInfo = row)
this.$router.push({
path: '/staffManage/edit',
query: {
$title: encodeURI(editType == 'add' ? '新增员工' : '编辑员工'),
obj: JSON.stringify(params)
}
})
}
}
}
</script>
<style scoped lang="scss">
.import-btn {
position: relative;
width: 116px;
height: 32px;
text-align: center;
background: #5850ff;
border-radius: 4px;
color: #ffffff;
font-size: 14px;
margin-right: 8px;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.use-store {
display: flex;
font-size: 14px;
color: #5850ff;
align-items: center;
img {
width: 14px;
height: 12.98px;
margin-right: 8px;
}
}
.table-btns {
width: 80px;
}
</style>
\ No newline at end of file \ No newline at end of file
<!-- 驻店绩效-校正弹窗 -->
<template>
<GLDialog title="校正"
mode="mid"
:visible.sync="isVisible"
:before-close="handleClose"
v-loading="loading"
@onOk="handleConfirm"
@onCancel="handleClose">
<div>
<glsx-combi-form class="edit-form-container m-r-20"
ref="editFormRef"
:labelWidth="defaultLabelWidth"
:isBlock="true"
:formRef="editChildRef"
:formObj="editForm"
:formData="editFormData"
:formRules="editRule">
</glsx-combi-form>
</div>
</GLDialog>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
name: 'ResidentCorrectionDialog',
data() {
return {
editChildRef: 'editChildRef',
editForm: {
customerUnitPrice: '',
successRate: '',
otherExpenses: '',
},
oldVal: {
customerUnitPrice: '',
successRate: '',
otherExpenses: '',
},
editRule: {
customerUnitPrice: [{ required: true, message: '请输入当月平均客单价', trigger: 'change' }],
successRate: [{ required: true, message: '请输入当月成交率', trigger: 'change' }],
otherExpenses: [{ required: true, message: '请输入其他费用', trigger: 'change' }],
},
editFormData: [
{
label: '当月平均客单价/元',
name: 'customerUnitPrice',
type: 'input',
width: '432px',
inputFn: (value, item) => {
this.handleCustomerUnitPrice(value)
}
},
{
label: '当月成交率/%',
name: 'successRate',
type: 'input',
width: '432px',
inputFn: (value, item) => {
this.handleSuccessRatee(value)
}
},
{
label: '其他费用/元',
name: 'otherExpenses',
type: 'input',
width: '432px',
inputFn: (value, item) => {
this.handleOtherExpenses(value)
}
},
],
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
methods: {
handleCustomerUnitPrice(newVal) {
this.editForm.customerUnitPrice = limitPrice(newVal, this.oldVal.customerUnitPrice, 9, 2, 0, 999999)
this.oldVal.customerUnitPrice = this.editForm.customerUnitPrice
},
handleSuccessRatee(newVal) {
this.editForm.successRate = limitPrice(newVal, this.oldVal.successRate, 6, 2, 0, 100)
this.oldVal.successRate = this.editForm.successRate
},
handleOtherExpenses(newVal) {
this.editForm.otherExpenses = limitPrice(newVal, this.oldVal.otherExpenses, 10, 2, -999999, 999999, 'burdenNumReg')
this.oldVal.otherExpenses = this.editForm.otherExpenses
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
params.id = this.recordInfo.id
console.log(params);
this.$apis.performanceManage.correctApi(params)
.then(res => {
this.$notify({
type: 'success',
title: res.message || '操作成功'
})
this.handleClose()
})
}
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
</style>
<!-- 驻店绩效-查看明细弹窗 -->
<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="customerName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.customerName">
<span slot="reference">
{{ scope.scope.customerName }}
</span>
</el-popover>
</div>
</GLTable>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'ResidentDetailDialog',
data() {
return {
// 表格组件
userInfo: {},
tableSearchForm: {},
url: url,
getListApi: this.$apis.performanceManage.getDetailApi,
// 表格参数
tableParams: {
listName: 'list',
tableColumns: [
{
label: '订单编码',
prop: 'orderCode',
width: 180
},
{
label: '支付时间',
prop: 'orderTime',
width: '180px',
formatter: cellValue => {
return cellValue.orderTime ? dayjs(cellValue.orderTime).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 120
},
{
label: '客户手机号',
prop: 'customerPhone',
width: 130
},
{
label: '订单产值',
prop: 'orderMoney',
width: 100,
formatter: cellValue => {
return cellValue.orderMoney || cellValue.orderMoney == 0 ? cellValue.orderMoney.toFixed(2) : '-'
}
},
{
label: '提成奖励',
prop: 'commissionBonus',
width: 100,
formatter: cellValue => {
return cellValue.commissionBonus || cellValue.commissionBonus == 0 ? cellValue.commissionBonus.toFixed(2) : '-'
}
},
{
label: '高客单奖励',
prop: 'highCustomerUnitBonus',
width: 120,
formatter: cellValue => {
return cellValue.highCustomerUnitBonus || cellValue.highCustomerUnitBonus == 0 ? cellValue.highCustomerUnitBonus.toFixed(2) : '-'
}
},
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => { }
},
recordInfo: {
type: Object,
default: () => { }
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
// this.tableSearchForm.staffUuid = this.recordInfo.staffUuid
// this.tableSearchForm.performanceMonth = this.recordInfo.performanceMonth
this.tableSearchForm.id = this.recordInfo.id
resolve()
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
</style>
<!-- 技师绩效-校正弹窗 -->
<template>
<GLDialog title="校正"
mode="mid"
:visible.sync="isVisible"
:before-close="handleClose"
v-loading="loading"
@onOk="handleConfirm"
@onCancel="handleClose">
<div>
<glsx-combi-form class="edit-form-container m-r-20"
ref="editFormRef"
:labelWidth="defaultLabelWidth"
:isBlock="true"
:formRef="editChildRef"
:formObj="editForm"
:formData="editFormData"
:formRules="editRule">
</glsx-combi-form>
</div>
</GLDialog>
</template>
<script>
import { limitPrice } from '@/common/format'
export default {
name: 'TechnicianCorrectionDialog',
data() {
return {
editChildRef: 'editChildRef',
editForm: {
otherExpenses: '',
},
oldVal: {
otherExpenses: '',
},
editRule: {
otherExpenses: [{ required: true, message: '请输入其他费用', trigger: 'change' }],
},
editFormData: [
{
label: '其他费用/元',
name: 'otherExpenses',
type: 'input',
width: '432px',
inputFn: (value, item) => {
this.handleOtherExpenses(value)
}
},
],
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
},
methods: {
handleOtherExpenses(newVal) {
this.editForm.otherExpenses = limitPrice(newVal, this.oldVal.otherExpenses, 10, 2, -999999, 999999, 'burdenNumReg')
this.oldVal.otherExpenses = this.editForm.otherExpenses
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
params.id = this.recordInfo.id
console.log(params);
this.$apis.performanceManage.correctApi(params)
.then(res => {
this.$notify({
type: 'success',
title: res.message || '操作成功'
})
this.handleClose()
})
}
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
</style>
<!-- 技师绩效-查看明细弹窗 -->
<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="customerName"
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.customerName">
<span slot="reference">
{{ scope.scope.customerName }}
</span>
</el-popover>
</div>
</GLTable>
</div>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'TechnicianDetailDialog',
data() {
return {
// 表格组件
userInfo: {},
tableSearchForm: {},
url: url,
getListApi: this.$apis.performanceManage.getDetailApi,
// 表格参数
tableParams: {
listName: 'list',
tableColumns: [
{
label: '订单编码',
prop: 'orderCode',
width: 180
},
{
label: '订单类型',
prop: 'upgradeFlag',
width: 100,
formatter: cellValue => {
return this.baseData.upgradeFlagList.find((item) => item.confId === cellValue.upgradeFlag).confName || "-"
}
},
{
label: '支付时间',
prop: 'orderTime',
width: '180px',
formatter: cellValue => {
return cellValue.orderTime ? dayjs(cellValue.orderTime).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 120
},
{
label: '客户手机号',
prop: 'customerPhone',
width: 130
},
{
label: '订单产值',
prop: 'orderMoney',
width: 100,
formatter: cellValue => {
return cellValue.orderMoney || cellValue.orderMoney == 0 ? cellValue.orderMoney.toFixed(2) : '-'
}
},
{
label: '施工奖励',
prop: 'constructionBonus',
width: 100,
formatter: cellValue => {
return cellValue.constructionBonus || cellValue.constructionBonus == 0 ? cellValue.constructionBonus.toFixed(2) : '-'
}
}
],
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 基本数据
baseData: {
upgradeFlagList: [{
confId: 'Y',
confName: '升级'
},
{
confId: 'N',
confName: '战败'
}]
},
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
searchForm: {
type: Object,
default: () => { }
},
recordInfo: {
type: Object,
default: () => { }
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
// this.tableSearchForm.staffUuid = this.recordInfo.staffUuid
// this.tableSearchForm.performanceMonth = this.recordInfo.performanceMonth
this.tableSearchForm.id = this.recordInfo.id
resolve()
})
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style scoped>
</style>
<template> <template>
<div class="shop">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<h2>员工管理列表</h2>
<div> <div>
<el-button size="small" @click="handleEditStaff('add')" type="primary" plain>新增员工</el-button> <GLTabs v-model="activeName"
</div> :tabPaneList="tabPaneList"
</div> @tab-click="handleClick"></GLTabs>
<components :is="tabName"></components>
<!-- 表格区域 开始 -->
<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">
<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="content">
<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>
</div>
<div class="use-store">
<img src="@/assets/store.png" />
x {{ scope.scope.visibleMerchantList.length }}
</div>
</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>
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- <ApplyStoreDialog v-if="isApplyVisible" :isVisible="isApplyVisible" @handleClose="handleApply"></ApplyStoreDialog> -->
<!-- <InviteDialog v-if="isInviteVisible" :isVisible="isInviteVisible" :inviteInfo="inviteInfo" @handleClose="handleInviteClose"></InviteDialog> -->
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import ResidentPerformance from "./components/residentPerformance.vue"
import url from '@/assets/empty.png' import TechnicianPerformance from "./components/technicianPerformance.vue"
// import ApplyStoreDialog from './components/ApplyStoreDialog.vue'
// import InviteDialog from './components/InviteDialog.vue'
export default { export default {
components: {
ResidentPerformance,
TechnicianPerformance
},
data() { data() {
return { return {
size: 'small', activeName: "1",
url: url, tabPaneList: [
userInfo: {},
merchantNoList: [],
searchForm: {
staffPhoneKeyword: '',
staffNameKeyword: '',
staffType: '',
yqMerchantId: ''
},
tableSearchForm: {},
showFormData: [
{ {
label: '员工姓名', label: "驻店绩效",
name: 'staffNameKeyword', name: "1"
type: 'input',
isClear: true,
maxlength: 50
}, },
{ {
label: '员工手机号', label: "技师绩效",
name: 'staffPhoneKeyword', name: "2"
type: 'input',
isClear: true,
maxlength: 50
},
{
label: '员工类型',
name: 'staffType',
type: 'select',
optionList: [],
optionId: 'value',
optionLabel: 'text',
optionsName: 'staffTypeList'
},
{
label: '所属服务中心',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'yqMerchantId',
optionLabel: 'yqMerchantName',
optionsName: 'merchantList'
} }
], ],
tableButtonList: [ tabName: "ResidentPerformance"
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEditStaff('edit', row)
}
} }
],
// 表格
getListApi: this.$apis.staff.getList,
tableParams: {
listName: 'list',
tableOption: {
width: '80px'
},
tableColumns: [
{
label: '员工姓名',
prop: 'staffName',
minWidth: 100
},
{
label: '员工类型',
prop: 'staffBusinessType',
formatter: cellValue => {
const data = this.baseData.staffTypeList.filter(item => item.value == cellValue.staffBusinessType)
return data.length > 0 ? data[0].text : '--'
},
minWidth: 120
},
{
label: '员工手机号',
prop: 'staffPhone',
minWidth: 120
}, },
{ mounted() {
label: '所属服务中心',
prop: 'merchantName',
addHtml: 'merchantName',
minWidth: 120
},
{
label: '负责门店',
prop: '',
addHtml: 'visibleMerchantList',
minWidth: 100
}, },
{ computed: {
label: '创建时间',
prop: 'createdDate',
minWidth: 150,
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY/MM/DD') : '--'
}
}
]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, watch: {
isApplyVisible: false,
isInviteVisible: false,
inviteInfo: {},
// 基本数据
baseData: {
merchantList: [],
staffTypeList: [
{ text: '驻店', value: 0 },
{ text: '技师', value: 1 }
]
}
}
}, },
mounted() {},
methods: { methods: {
getServiceCenterList() { handleClick() {
const params = { let arr = {
partnerMerchantId: this.$globalState.session.merchantId 1: "residentPerformance",
2: "technicianPerformance"
} }
return new Promise(resolve => { this.tabName = arr[+this.activeName]
this.$apis.customer.getServiceCenterList(params).then(res => { console.log(this.tabName);
this.baseData.merchantList = res
resolve(res)
this.$utils.getOptionsList(this, 'showFormData')
})
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
async beforeSearchFn() {
this.merchantNoList = []
let data = await this.getServiceCenterList()
data.forEach(item => {
this.merchantNoList.push(item.yqMerchantId)
})
return new Promise(resolve => {
this.tableSearchForm = JSON.parse(JSON.stringify(this.getParams()))
this.tableSearchForm.merchantNoList = this.tableSearchForm.yqMerchantId ? [this.tableSearchForm.yqMerchantId] : this.merchantNoList
delete this.tableSearchForm.yqMerchantId
resolve()
})
},
handleSearch() {
this.$refs.pointRef.refreshTable()
}, },
handleReset() {
this.searchForm = {}
this.handleSearch()
},
handleApply() {
this.isApplyVisible = !this.isApplyVisible
},
handleInviteClose() {
this.isInviteVisible = !this.isInviteVisible
},
handleInvite(row) {
this.inviteInfo = row
this.handleInviteClose()
},
handleEditStaff(editType, row) {
var params = {
editType: editType,
}
editType != 'add' && (params.merchantInfo = row)
this.$router.push({
path: '/staffManage/edit',
query: {
$title: encodeURI(editType == 'add' ? '新增员工' : '编辑员工'),
obj: JSON.stringify(params)
}
})
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped>
.import-btn {
position: relative;
width: 116px;
height: 32px;
text-align: center;
background: #5850ff;
border-radius: 4px;
color: #ffffff;
font-size: 14px;
margin-right: 8px;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.use-store {
display: flex;
font-size: 14px;
color: #5850ff;
align-items: center;
img {
width: 14px;
height: 12.98px;
margin-right: 8px;
}
}
.table-btns {
width: 80px;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!