Commit 800d5780 by 张立顺

test

1 parent f1b42463
<!-- 驻店绩效-校正弹窗 -->
<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>
<div>
<GLTabs v-model="activeName"
:tabPaneList="tabPaneList"
@tab-click="handleClick"></GLTabs>
<components :is="tabName"></components>
</div>
</template>
<script>
import ResidentPerformance from "./components/residentPerformance.vue"
import TechnicianPerformance from "./components/technicianPerformance.vue"
export default {
components: {
ResidentPerformance,
TechnicianPerformance
},
data() {
return {
activeName: "1",
tabPaneList: [
{
label: "驻店绩效",
name: "1"
},
{
label: "技师绩效",
name: "2"
}
],
tabName: "ResidentPerformance"
}
},
mounted() {
},
computed: {
},
watch: {
},
methods: {
handleClick() {
let arr = {
1: "residentPerformance",
2: "technicianPerformance"
}
this.tabName = arr[+this.activeName]
console.log(this.tabName);
},
}
}
</script>
<style scoped>
</style>
<template>
<div>
<GLTabs v-model="activeName"
:tabPaneList="tabPaneList"
@tab-click="handleClick"></GLTabs>
<components :is="tabName"></components>
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<!-- <components :is="tabName"></components> -->
<ResidentPerformance v-if="tabName == 'ResidentPerformance'"></ResidentPerformance>
<TechnicianPerformance v-if="tabName == 'TechnicianPerformance'"></TechnicianPerformance>
</div>
</template>
<script>
import ResidentPerformance from "./components/residentPerformance.vue"
import TechnicianPerformance from "./components/technicianPerformance.vue"
import ResidentPerformance from './components/residentPerformance.vue'
import TechnicianPerformance from './components/technicianPerformance.vue'
export default {
components: {
ResidentPerformance,
......@@ -16,40 +16,33 @@ export default {
},
data() {
return {
activeName: "1",
activeName: '1',
tabPaneList: [
{
label: "驻店绩效",
name: "1"
label: '驻店绩效',
name: '1'
},
{
label: "技师绩效",
name: "2"
label: '技师绩效',
name: '2'
}
],
tabName: "ResidentPerformance"
tabName: 'ResidentPerformance'
}
},
mounted() {
},
computed: {
},
watch: {
},
mounted() { },
computed: {},
watch: {},
methods: {
handleClick() {
let arr = {
1: "residentPerformance",
2: "technicianPerformance"
1: 'residentPerformance',
2: 'technicianPerformance'
}
this.tabName = arr[+this.activeName]
console.log(this.tabName);
},
console.log(this.tabName)
}
}
}
</script>
<style scoped>
</style>
<style scoped></style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!