Commit 804da921 by 张立顺

Merge branch 'dev_v4.35.0-0305' of http://192.168.3.233:8090/saas_plus/dj-car-li…

…fe-system into dev_v4.35.0-0305
2 parents de1830c3 e3ae544f
......@@ -9,13 +9,12 @@ export function getYqMerchantListBySceneApi(data) {
// 获取员工列表
export function getListApi(data) {
data.method = `${path}staff.performance.page`
// data.method = 'dj.api.life.pos.trm.list'
return request(data,'post')
}
// 获取启用商学院员工数量
// 获取启用工资绩效员工数量
export function getEnableStaffNumApi(data) {
data.method = `${path}businessSchoolEnable.number`
data.method = `${path}performanceEnable.number`
return request(data, 'post')
}
......@@ -25,9 +24,9 @@ export function importStaffApi(data) {
return request(data, "post", ["file"])
}
// 禁用启用商学院
// 禁用启用工资绩效
export function enableOrDisableApi(data) {
data.method = `${path}businessSchoolEnable.update`
data.method = `${path}performanceEnable.update`
return request(data,'post')
}
......@@ -73,8 +72,14 @@ export function getNoRelateStaffListApi(data) {
return request(data, 'post')
}
// 根据园区店商户号获取不同场景下的4S店
// 根据场景值和园区店查询服务商下的所有4s店
export function getMerchantStoreByServiceApi(data) {
data.method = "dj.api.scenemerchantref.listShopMerchantByYqMerchantId"
return request(data, "post")
}
// 根据场景值获取园区店下所有4s店
export function getMerchantStoreApi(data) {
data.method = "dj.api.scenemerchantref.query4SRefByYqShop"
return request(data, "post")
}
}
\ No newline at end of file
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 驻店管理标签明细
export function staffLabelDetail(data) {
data.method = `${path}staff.labelDetail`
return request(data, RequestMethods.POST)
}
// 分页查询驻店管理
export function staffPage(data) {
data.method = `${path}staff.page`
return request(data, RequestMethods.POST)
}
// 获取员工标签树
export function queryLabelGroupTree(data) {
data.method = `${path}staff.queryLabelGroupTree`
return request(data, RequestMethods.POST)
}
import request from "./request"
const path = "dj.api.smartcarlife."
// // 获取店面目标列表
// export function getStoreTargetListApi(data) {
// data.method = `${path}merchantTargetConfig.page`
// return request(data, 'post')
// }
// 获取店面目标列表
export function getStoreTargetListApi(data) {
data.method = "dj.smartcarlife.api.yqPartnerMerchant.ref.page"
return request(data, "post")
}
// 获取员工任务列表
export function getStaffTaskListApi(data) {
data.method = "dj.smartcarlife.api.yqPartnerMerchant.ref.page"
return request(data, "post")
}
// // 获取员工目标任务列表
// export function getStaffTaskListApi(data) {
// data.method = "dj.smartcarlife.api.yqPartnerMerchant.ref.page"
// return request(data, "post")
// }
// 新增或修改店面目标配置
export function merchantTargetConfigUpdate(data) {
......@@ -30,3 +30,28 @@ export function merchantTargetConfigGetStaffList(data) {
data.method = "dj.api.smartcarlife.merchantTargetConfig.getStaffList"
return request(data, "post")
}
// dj.api.smartcarlife.staffTargetCheck.page/1.0.0
// 分页查询驻店员工任务
// data.method = `${path}staffTargetCheck.page`
// return request(data, 'post')
// }
// 获取店面目标列表
export function getStoreTargetListApi(data) {
data.method = `${path}merchantTargetConfig.page`
return request(data, "post")
}
// 获取员工目标任务列表
export function getStaffTaskListApi(data) {
data.method = `${path}staffTargetCheck.page`
return request(data, "post")
}
// 获取员工任务详情
export function getStaffTaskDetailApi(data) {
data.method = `${path}staffTargetCheck.getTargetCheck`
return request(data, "post")
}
// dj.api.smartcarlife.merchantTargetConfig.getDetail/1.0.0
// 查看店面目标配置详情
......@@ -61,3 +61,9 @@ export function updateStaffBatch(data) {
data.method = `merchants.api.staff.updateStaffBatch`
return request(data)
}
// 查询业务负责人
export function findSellerMerchantStaffList(data) {
data.method = `${path}workbench.findSellerMerchantStaffList`
return request(data)
}
......@@ -678,8 +678,15 @@ export const applyStatus = [
// 店面配置 业务性质
export const businessNature = [
{ confId: 1, confName: "直营渠道" },
{ confId: 2, confName: "直营4S店" }
{ confId: 2, confName: "直营4S店" },
{ confId: 3, confName: "合资收购" }
]
// 店面配置 业务性质
export const businessNatureShow = {
1: "直营渠道",
2: "直营4S店",
3: "合资收购"
}
// 店面配置 门店类型
export const storeType = [
{ confId: 1, confName: "嘀加" },
......@@ -763,8 +770,8 @@ export const stockManagementModeList = [
// 转账管理-预警状态
export const warningStatus = [
{ confId: 1, confValue: "正常" },
{ confId: 2, confValue: "异常" }
{ confId: "Y", confValue: "正常" },
{ confId: "N", confValue: "异常" }
]
// 规则审核-类型
......@@ -772,6 +779,10 @@ export const ruleReview_type = [
{ confId: 1, confValue: "清分" },
{ confId: 3, confValue: "对账" }
]
export const ruleReview_type_show = {
1: "清分",
3: "对账"
}
// 规则审核-状态
export const ruleReview_status = [
......
......@@ -820,10 +820,10 @@ export const routerName = {
label: "启用工资绩效",
handle: "handleEnableOrDisable",
ruleObj: {
attr: "businessSchoolEnableFlag",
attr: "performanceFlag",
rule: {
'N': "启用工资绩效",
'Y': "禁用工资绩效"
N: "启用工资绩效",
Y: "禁用工资绩效"
}
}
},
......@@ -912,7 +912,7 @@ export const routerName = {
component: _import("systemConfig/ruleReview/examineDetail")
},
90625: {
path: '/inStoreGoalsConfig',
path: "/inStoreGoalsConfig",
name: "inStoreGoalsConfig",
meta: {
title: "驻店目标配置",
......@@ -1023,5 +1023,24 @@ export const routerName = {
activePath: "/inStoreGoalsConfig"
},
component: _import("systemConfig/inStoreGoalsConfig/employeeTasksView")
},
90629: {
path: "/inStoreManage",
name: "inStoreManage",
meta: {
title: "驻店管理",
authId: "90629",
parentId: "906",
cache: false
},
auth: [
{
authId: "9062901",
parentId: "90629",
label: "查看标签",
handle: "handleViewLabel"
}
],
component: _import("systemConfig/inStoreManage/index")
}
}
......@@ -161,7 +161,8 @@ export default {
withdrawTradeNo: '',
transferAccountsDate: '',
transferType: '',
platformMerchantId: ''
platformMerchantId: '',
warnStatus: ''
},
searchFormSearch: {},
showFormData: [{
......@@ -238,7 +239,7 @@ export default {
optionsName: 'PlatformMerchantList'
}, {
label: '预警状态',
name: 'warningStatus',
name: 'warnStatus',
type: 'select',
isClear: true,
optionList: [],
......@@ -386,18 +387,18 @@ export default {
},
{
label: '预警状态',
prop: 'status',
prop: 'warnStatus',
width: '100px',
formatter: (cellValue) => {
return this.baseData.statusList.find(item => item.confId === cellValue.status)?.confValue
return this.baseData.warningStatusList.find(item => item.confId === cellValue.warnStatus)?.confValue
}
},
{
label: '预警原因',
prop: 'status',
prop: 'warnReason',
width: '100px',
formatter: (cellValue) => {
return cellValue.transferTime ? Util.dateFormate(cellValue.transferTime, 'YYYY-MM-DD HH:mm:ss') : '--'
return cellValue.warnReason ? cellValue.warnReason : '--'
}
},
{
......@@ -523,7 +524,8 @@ export default {
withdrawTradeNo: '',
transferAccountsDate: '',
transferType: '',
platformMerchantId: ''
platformMerchantId: '',
warnStatus: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
......
......@@ -54,10 +54,14 @@
width="200" />
<el-table-column prop="merchantId"
label="商户号"
width="200" />
<el-table-column prop="merchantId"
width="120" />
<el-table-column prop="businessType"
label="业务性质"
width="200" />
width="120">
<template slot-scope="scope">
<span>{{ scope.row.businessType ? businessNatureShow[scope.row.businessType] : '' }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="outputValue" label="场景在营" width="220">
<template slot-scope="scope">
<el-select v-model="scope.row['businessScene']" class="select" multiple collapse-tags placeholder="请选择">
......@@ -221,7 +225,7 @@
<script>
import { limitPrice } from '@/common/format'
import { sceneCodeList } from '@/common/constants'
import { sceneCodeList, businessNatureShow } from '@/common/constants'
import { downLoadFile } from '@/common/util'
// import moment from 'moment'
// import orderManage from "@api/orderManage"
......@@ -274,8 +278,9 @@ export default {
},
hasPage: true,
// 分页组件配置
layout: 'sizes,total,->,prev,pager,next,jumper'
layout: 'sizes,total,->,prev,pager,next,jumper',
// outputVisible: true
businessNatureShow: businessNatureShow
}
},
computed: {
......
......@@ -103,26 +103,26 @@
<span class="item-tips">注:设置店面的驻店负责人,可配置驻店月份绩效</span>
</el-form-item>
<el-form-item label="1.1业务负责人:"
prop="residentManager">
<el-select v-model="form.businessType"
prop="boutiqueDirectorUserId">
<el-select v-model="form.shopMerchantConfig.boutiqueDirectorUserId"
placeholder="请选择"
class="el_select itd">
<el-option v-for="item in businessNature"
:key="item.confId"
:value="item.confId"
:label="item.confName" />
<el-option v-for="item in sellerMerchantStaffList"
:key="item.userId"
:label="item.userName"
:value="item.userId" />
</el-select>
<span class="item-tips">注:获取账户中心创建在广联数科下的员工,角色类型选广联销售</span>
</el-form-item>
<el-form-item label="2.1业务负责人:"
prop="residentManager">
<el-select v-model="form.businessType"
prop="quotationDirectorUserId">
<el-select v-model="form.shopMerchantConfig.quotationDirectorUserId"
placeholder="请选择"
class="el_select itd">
<el-option v-for="item in businessNature"
:key="item.confId"
:value="item.confId"
:label="item.confName" />
<el-option v-for="item in sellerMerchantStaffList"
:key="item.userId"
:label="item.userName"
:value="item.userId" />
</el-select>
</el-form-item>
<el-form-item>
......@@ -203,17 +203,37 @@
</el-form-item>
<el-form-item label="阳光激励费:"
prop="sunlightIncentiveCost">
<el-input class="rateInput_t"
v-model="form.sunlightIncentiveCost"
@input="sunlightIncentiveCost_handleInput"
placeholder="请输入比例" />&nbsp;%
<div>
<span class="rateInput_s">精品升级</span>
<el-input class="rateInput_t"
v-model="form.shopMerchantConfig.boutiqueSunshineInspiration"
@input="boutiqueSunshineInspiration_handleInput"
placeholder="请输入比例" />&nbsp;%
</div>
<div class="rateInput_d">
<span class="rateInput_s">会员权益升级</span>
<el-input class="rateInput_t"
v-model="form.shopMerchantConfig.quotationSunshineInspiration"
@input="quotationSunshineInspiration_handleInput"
placeholder="请输入比例" />&nbsp;%
</div>
</el-form-item>
<el-form-item label="市场激励费:"
prop="marketIncentiveCost">
<el-input class="rateInput_t"
v-model="form.marketIncentiveCost"
@input="marketIncentiveCost_handleInput"
placeholder="请输入比例" />&nbsp;%
<div>
<span class="rateInput_s">精品升级</span>
<el-input class="rateInput_t"
v-model="form.shopMerchantConfig.boutiqueMarketInspiration"
@input="boutiqueMarketInspiration_handleInput"
placeholder="请输入比例" />&nbsp;%
</div>
<div class="rateInput_d">
<span class="rateInput_s">会员权益升级</span>
<el-input class="rateInput_t"
v-model="form.shopMerchantConfig.quotationMarketInspiration"
@input="quotationMarketInspiration_handleInput"
placeholder="请输入比例" />&nbsp;%
</div>
</el-form-item>
<el-form-item>
<div class="btnCon">
......@@ -235,7 +255,7 @@
<script>
import { deepClone } from '@/common/util'
import { getShopSetting, listByMerchantIdAndYear, shopSetting } from '@/api/shopConfig.js'
import { getShopSetting, listByMerchantIdAndYear, shopSetting, findSellerMerchantStaffList } from '@/api/shopConfig.js'
import { serviceGetMerchantList } from '@api/merchant'
import { findMerchantStaffList } from '@api/index'
import { businessNature, sceneForShop } from '@/common/constants.js'
......@@ -265,8 +285,13 @@ export default {
currentMonthOutputValue: '',
nextMonthOutputValue: '',
serviceMerchantServiceChargeConfig: {},
sunlightIncentiveCost: '',
marketIncentiveCost: ''
shopMerchantConfig: {}
// boutiqueSunshineInspiration: '',
// quotationSunshineInspiration: '',
// boutiqueMarketInspiration: '',
// quotationMarketInspiration: '',
// boutiqueDirectorUserId: '',
// quotationDirectorUserId: ''
},
outputValueListByYear: [],
year: '',
......@@ -300,9 +325,12 @@ export default {
oldVal: {
passageServiceChargeFlag: '',
gasCardServiceChargeFlag: '',
sunlightIncentiveCost: '',
marketIncentiveCost: ''
boutiqueSunshineInspiration: '',
quotationSunshineInspiration: '',
boutiqueMarketInspiration: '',
quotationMarketInspiration: ''
},
sellerMerchantStaffList: []
}
},
......@@ -322,6 +350,7 @@ export default {
this.findMerchantStaffList()
this.getSelectList(this.info)
this.listByMerchantIdAndYear(this.year)
this.findSellerMerchantStaffList()
},
methods: {
......@@ -342,6 +371,9 @@ export default {
//未设置过时,手续费默认为打开并且费率为2
this.form.serviceMerchantServiceChargeConfig = { 'passageServiceCharge': 2, 'passageServiceChargeFlag': 'Y', 'gasCardServiceCharge': 2, 'gasCardServiceChargeFlag': 'Y' }
}
if (!this.form.shopMerchantConfig) {
this.form.shopMerchantConfig = { 'boutiqueDirectorUserId': '', 'quotationDirectorUserId': '', 'boutiqueSunshineInspiration': '', 'quotationSunshineInspiration': '', 'boutiqueMarketInspiration': '', 'quotationMarketInspiration': '' }
}
console.log(this.form)
if (this.form.list && this.form.list.length > 0) {
this.form.list = this.form.list.map(item => {
......@@ -548,6 +580,19 @@ export default {
return
}
}
let shopMerchantConfig = _params.shopMerchantConfig
_params.boutiqueDirectorUserId = shopMerchantConfig.boutiqueDirectorUserId
if (shopMerchantConfig.boutiqueDirectorUserId) {
_params.boutiqueDirectorName = this.sellerMerchantStaffList.find(item => item.userId === shopMerchantConfig.boutiqueDirectorUserId)?.userName
}
_params.quotationDirectorUserId = shopMerchantConfig.quotationDirectorUserId
if (shopMerchantConfig.quotationDirectorUserId) {
_params.quotationDirectorName = this.sellerMerchantStaffList.find(item => item.userId === shopMerchantConfig.quotationDirectorUserId)?.userName
}
_params.boutiqueSunshineInspiration = shopMerchantConfig.boutiqueSunshineInspiration
_params.quotationSunshineInspiration = shopMerchantConfig.quotationSunshineInspiration
_params.boutiqueMarketInspiration = shopMerchantConfig.boutiqueMarketInspiration
_params.quotationMarketInspiration = shopMerchantConfig.quotationMarketInspiration
console.log(_params)
shopSetting({ dataString: JSON.stringify(_params) }).then(res => {
this.notice.okTips()
......@@ -588,17 +633,36 @@ export default {
}
},
gasCardServiceCharge_handleInput(newVal) {
this.form.serviceMerchantServiceChargeConfig.gasCardServiceCharge = limitPrice(newVal, this.oldVal.gasCardServiceCharge, 3, 2, 0, 100)
this.form.shopMerchantConfig.serviceMerchantServiceChargeConfig.gasCardServiceCharge = limitPrice(newVal, this.oldVal.gasCardServiceCharge, 3, 2, 0, 100)
this.oldVal.gasCardServiceCharge = this.form.serviceMerchantServiceChargeConfig.gasCardServiceCharge
},
sunlightIncentiveCost_handleInput(newVal) {
this.form.sunlightIncentiveCost = limitPrice(newVal, this.oldVal.sunlightIncentiveCost, 3, 2, 0, 100)
this.oldVal.sunlightIncentiveCost = this.form.sunlightIncentiveCost
boutiqueSunshineInspiration_handleInput(newVal) {
this.form.shopMerchantConfig.boutiqueSunshineInspiration = limitPrice(newVal, this.oldVal.boutiqueSunshineInspiration, 3, 2, 0, 100)
this.oldVal.boutiqueSunshineInspiration = this.form.shopMerchantConfig.boutiqueSunshineInspiration
},
quotationSunshineInspiration_handleInput(newVal) {
this.form.shopMerchantConfig.quotationSunshineInspiration = limitPrice(newVal, this.oldVal.quotationSunshineInspiration, 3, 2, 0, 100)
this.oldVal.quotationSunshineInspiration = this.form.shopMerchantConfig.quotationSunshineInspiration
},
boutiqueMarketInspiration_handleInput(newVal) {
this.form.shopMerchantConfig.boutiqueMarketInspiration = limitPrice(newVal, this.oldVal.boutiqueMarketInspiration, 3, 2, 0, 100)
this.oldVal.boutiqueMarketInspiration = this.form.shopMerchantConfig.boutiqueMarketInspiration
},
quotationMarketInspiration_handleInput(newVal) {
this.form.shopMerchantConfig.quotationMarketInspiration = limitPrice(newVal, this.oldVal.quotationMarketInspiration, 3, 2, 0, 100)
this.oldVal.quotationMarketInspiration = this.form.shopMerchantConfig.quotationMarketInspiration
},
findSellerMerchantStaffList() {
findSellerMerchantStaffList({}).then((result) => {
this.sellerMerchantStaffList = result.map((item) => {
return {
userId: item.uuid,
userName: item.staffName
}
})
})
},
marketIncentiveCost_handleInput(newVal) {
this.form.marketIncentiveCost = limitPrice(newVal, this.oldVal.marketIncentiveCost, 3, 2, 0, 100)
this.oldVal.marketIncentiveCost = this.form.marketIncentiveCost
}
}
}
......@@ -855,4 +919,11 @@ export default {
.rateInput_t {
width: 150px;
}
.rateInput_s {
display: inline-block;
width: 100px;
}
.rateInput_d {
margin-top: 20px;
}
</style>
......@@ -70,7 +70,7 @@ export default {
title() {
const titleObj = {
performanceConfig: '工资绩效示例说明',
montorAdditionalBonus: '导师附加提成示例说明'
tutorBonusConfigs: '导师附加提成示例说明'
}
return titleObj[this.diffExplain]
},
......@@ -78,7 +78,7 @@ export default {
const infoObj = {
performanceConfig: `<div class='mb10'>员工A在某个月中单店完成产值20000元,按高产值奖励规则,奖励值落点区间在0-80000,则提成比例为产值4%;根据该员工的当月成交率为45%,均可单价为2000计算,则整体提成系数为0.8*0.8=0.64</div>
<div class='mb10'>汇总计算员工A在该月份获得的提成为=20000*5%*0.8*0.8=640元。</div>`,
montorAdditionalBonus: `<div class='mb10'>1、员工a入职时间为8月18日,对应0-3个月内的导师提成比例为20%,假如第一个月内员工a产生订单产值40000元,根据业绩配置该员工提成为4000元,则其关联导师的导师提成激励为4000*20%=800元,计入次月导师的月份最终工资</div>
tutorBonusConfigs: `<div class='mb10'>1、员工a入职时间为8月18日,对应0-3个月内的导师提成比例为20%,假如第一个月内员工a产生订单产值40000元,根据业绩配置该员工提成为4000元,则其关联导师的导师提成激励为4000*20%=800元,计入次月导师的月份最终工资</div>
<div class='mb10'>2、员工a到11月18日为满三个月,12月份初计算导师提成时,按11.1-11.18的学员提成20%和11.19-11.30的学员提成10%计算为该导师的11月总导师激励提成</div>
<div class='mb10'>3、删除解绑学员时不影响订单提成规则,如8月18日关联导师,8月20日解绑学员时,导师在9月初将计算8.18-8.20该学员的订单提成比例,并入导师提成激励计算到9月初发放的最终工资中。</div>
<div class='mb10'>4、按导师学员的绑定关系计算,区间月份含当月,0即为第一个月份,0-3代表前三个月,4-6代表第四到第六个月整,以此类推</div>`
......
......@@ -6,7 +6,7 @@
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index">
</el-tab-pane>
</el-tabs> -->
<components :is="tabName" :sceneType="activeName"></components>
<components :is="tabName"></components>
</div>
</div>
</template>
......
......@@ -20,9 +20,9 @@
</div>
<div slot="mentorCommission">
<el-tabs type="card" :before-leave="beforeLeave" v-model="configInfo.defaultMerchant" edit @tab-remove="removeTab">
<el-tab-pane v-for="(subItem, subIndex) in configInfo.merchantArr" :key="subItem.merchantId" :closable="configInfo.merchantArr.length > 0" :name="subItem.merchantId">
<span slot="label"><i v-if="subItem.validateErrFlag" class="el-icon-warning car-error-txt"></i>{{ subItem.merchantName }}</span>
<el-form class="commission-box" :ref="`mentor_commission${subItem.merchantId}`" :model="subItem" :rules="formRules">
<el-tab-pane v-for="(subItem, subIndex) in configInfo.merchantArr" :key="subItem.shopMerchantId" :closable="configInfo.merchantArr.length > 0" :name="subItem.shopMerchantId">
<span slot="label"><i v-if="subItem.validateErrFlag" class="el-icon-warning car-error-txt"></i>{{ subItem.shopMerchantName }}</span>
<el-form class="commission-box" :ref="`mentor_commission${subItem.shopMerchantId}`" :model="subItem" :rules="formRules">
<div class="title_text">
<span class="tips-block"
slot="label">
......@@ -34,9 +34,9 @@
<span class="tips-icon" />
</el-tooltip>
</span>
<span class="explain" @click="handleExplain('montorAdditionalBonus')">示例说明</span>
<span class="explain" @click="handleExplain('tutorBonusConfigs')">示例说明</span>
</div>
<d2-table ref="orderRef" class="award-wrap" :tableData="subItem['montorAdditionalBonusList']"
<d2-table ref="orderRef" class="award-wrap" :tableData="subItem['tutorBonusConfigs']"
:tableParams="montorTableParams" :hasPage="false">
<template slot="startMonth" slot-scope="scope">
<span v-if="scope.scope.isStartEdit">{{ scope.scope.startMonth }}</span>
......@@ -46,25 +46,25 @@
</template>
<template slot="endMonth" slot-scope="scope">
<span v-if="scope.scope.isEndEdit">--</span>
<el-form-item v-else style="margin-bottom: 0px;margin-right: 0;" :prop="`montorAdditionalBonusList.${scope.index}.endMonth`"
<el-form-item v-else style="margin-bottom: 0px;margin-right: 0;" :prop="`tutorBonusConfigs.${scope.index}.endMonth`"
:rules="checkEndValue(scope.scope)">
<el-input class="input-w-136" :disabled="pageDisabled" v-model="scope.scope.endMonth" placeholder="请输入"
@blur="handleCalculate('montorAdditionalBonus', 'endMonth', scope.index, subIndex)"></el-input>
@blur="handleCalculate('tutorBonusConfigs', 'endMonth', scope.index, subIndex)"></el-input>
</el-form-item>
</template>
<template slot="calculateValue" slot-scope="scope">
<el-form-item style="margin-bottom: 0px;margin-right: 0;" :prop="`montorAdditionalBonusList.${scope.index}.calculateValue`"
<el-form-item style="margin-bottom: 0px;margin-right: 0;" :prop="`tutorBonusConfigs.${scope.index}.calculateValue`"
:rules="formRules.calculateValue">
<el-input class="input-w-136" :disabled="pageDisabled" v-model="scope.scope.calculateValue" placeholder="请输入"
@blur="handleCalculate('montorAdditionalBonus', 'calculateValue', scope.index, subIndex)"></el-input>
@blur="handleCalculate('tutorBonusConfigs', 'calculateValue', scope.index, subIndex)"></el-input>
</el-form-item>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button :disabled="pageDisabled" @click="handleDelete(`montorAdditionalBonusList`, scope.index, subIndex)" type="text" size="small">删除</el-button>
<el-button :disabled="pageDisabled" @click="handleDelete(`tutorBonusConfigs`, scope.index, subIndex)" type="text" size="small">删除</el-button>
</div>
</d2-table>
<div class="add-txt">
<el-button icon="el-icon-plus" :disabled="pageDisabled" @click="addLine('montorAdditionalBonus', subIndex)">新增一行</el-button>
<el-button icon="el-icon-plus" :disabled="pageDisabled" @click="addLine('tutorBonusConfigs', subIndex)">新增一行</el-button>
</div>
</el-form>
</el-tab-pane>
......@@ -327,12 +327,12 @@ export default {
this.disabledMerchantArr = []
val?.forEach(v => {
// 已选的门店
this.disabledMerchantArr.push(v.merchantId)
this.disabledMerchantArr.push(v.shopMerchantId)
})
},
deep: true
},
'configInfo.performanceConfigFlag': {
'configInfo.performanceFlag': {
handler(val) {
this.pageDisabled = !val
},
......@@ -345,7 +345,7 @@ export default {
methods: {
// 切换场景默认选中的门店tab
updateData(val) {
this.configInfo = val
this.configInfo.defaultMerchant = val
this.$forceUpdate()
},
// 控制form表单显示隐藏
......@@ -395,13 +395,13 @@ export default {
removeTab(targetName) {
let merchantArr = this.configInfo?.merchantArr
let defaultMerchant = this.configInfo?.defaultMerchant
if (targetName == defaultMerchant) this.$set(this.configInfo, 'defaultMerchant', merchantArr[0]?.merchantId)
let index = merchantArr?.findIndex(val => val.merchantId == targetName)
if (targetName == defaultMerchant) this.$set(this.configInfo, 'defaultMerchant', merchantArr[0]?.shopMerchantId)
let index = merchantArr?.findIndex(val => val.shopMerchantId == targetName)
merchantArr.splice(index, 1)
},
// 删除关联的初级驻店销售
handleRelateDelete(index) {
let list = this.configInfo.studentStaffs
let list = this.titleForm.studentStaffs
this.$confirm('删除学员后,后续订单不再计入导师提成,是否确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -426,8 +426,6 @@ export default {
let idx = this.mentorStaffList.findIndex(k => k.staffUuid == e)
list[index].phoneNumber = this.mentorStaffList[idx]?.phoneNumber
list[index].staffName = this.mentorStaffList[idx]?.staffName
// 假数据
if (index == 1) list[index].associationDate = '2024-01-01'
this.$nextTick(() => {
this.$refs['title-dialog-form'].clearValidate(`studentStaffs.${index}.staffUuid`)
})
......@@ -459,8 +457,8 @@ export default {
if (valid) {
let tabListData = this.configInfo?.merchantArr
tabListData.push({
merchantId: `${this.storeForm?.merchantId}`,
merchantName: this.storeForm?.merchantName
shopMerchantId: `${this.storeForm?.merchantId}`,
shopMerchantName: this.storeForm?.merchantName
})
this.configInfo.defaultMerchant = `${this.storeForm?.merchantId}`
this.handleStoreClose()
......@@ -469,8 +467,8 @@ export default {
},
// 导师附加提成新增一行
addLine(item, index) {
!this.configInfo['merchantArr'][index][item + 'List'] ? (this.configInfo['merchantArr'][index][item + 'List'] = []) : ''
let formData = this.configInfo['merchantArr'][index][item + 'List']
!this.configInfo['merchantArr'][index][item] ? (this.configInfo['merchantArr'][index][item] = []) : ''
let formData = this.configInfo['merchantArr'][index][item]
let line = formData?.length + 1
formData.push({
startMonth: line >= 2 ? '' : 0,
......@@ -492,13 +490,12 @@ export default {
},
// 职级晋升/降级 清除数据
clearData() {
let configInfo = this.configInfo
configInfo.studentStaffs = []
configInfo.montorAdditionalBonusList = []
this.configInfo.studentStaffs = []
this.configInfo.merchantArr = []
},
// 区间值/提成比例 失去焦点
handleCalculate(item, key, index, idx) {
let formData = this.configInfo['merchantArr'][idx][item + 'List']
let formData = this.configInfo['merchantArr'][idx][item]
let max = 98
if (key == 'calculateValue') {
max = 100
......@@ -538,7 +535,7 @@ export default {
let valideResult = [] // 精品升级配置
for (var j = 0; j < configInfo.merchantArr?.length; j++) {
let subVal = configInfo.merchantArr[j]
const node = this.$refs[`mentor_commission${subVal.merchantId}`][0]
const node = this.$refs[`mentor_commission${subVal?.shopMerchantId}`]?.[0]
node?.validate(valid => {
if (valid) {
subVal.validateErrFlag = false
......
......@@ -74,8 +74,8 @@ export default {
explainDialog
},
props: {
perConfigInfo: Object,
pageDisabled: Boolean
perConfigInfo: Object, // 配置信息
pageDisabled: Boolean // 是否可编辑
},
data() {
var checkPrice = (rule, value, callback) => {
......
......@@ -67,27 +67,20 @@ export default {
label: '订单产值/元',
prop: 'orderMoney'
}, {
label: '均客单奖励',
label: '产值比例',
prop: 'averagePriceBonus'
}, {
label: '高客单奖励',
label: '成交率系数',
prop: 'customerUnitBonus'
}, {
label: '高产值奖励',
label: '均客单系数',
prop: 'outputBonus'
}, {
label: '成交率奖励',
prop: 'upgradeRateBonus'
}, {
label: '导师激励提成',
prop: 'mentorBonus'
}, {
label: '订单总提成',
prop: '',
formatter: (cellValue) => {
// 当前员工id=mentorStaffUuid 取导师奖励提成 否则就是 均客单奖励+高客单奖励+高产值奖励+成交率奖励
return cellValue?.mentorStaffUuid == this.detailInfoData?.staffUuid ? (cellValue?.mentorBonus || 0) : cellValue?.averagePriceBonus + cellValue?.customerUnitBonus + cellValue?.outputBonus + cellValue?.upgradeRateBonus
}
prop: 'orderBonus'
}]
},
searchForm: {}
......@@ -101,9 +94,6 @@ export default {
},
detailInfoData: {
type: Object
},
sceneType: {
type: String
}
},
......@@ -111,8 +101,7 @@ export default {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = {
mentorOrStudentStaffUuid: this.detailInfoData?.staffUuid,
sceneType: this.sceneType
mentorOrStudentStaffUuid: this.detailInfoData?.staffUuid
}
resolve()
})
......
......@@ -54,7 +54,7 @@
<!-- 禁/启用工资绩效 -->
<auth-button :data="scope.scope" :show-btn-ids="['9062105']" />
<!-- 业绩详情 -->
<span style="margin-right: 10px;">
<span>
<auth-button :data="scope.scope" :show-btn-ids="['9062106']" />
</span>
</div>
......@@ -127,7 +127,7 @@
</slot>
</d2-dialog>
<!-- 业绩详情 -->
<performance-detail-dialog v-if="perDetailVisible" :detail-info-data="detailInfoData" :sceneType="sceneType" :per-detail-visible="perDetailVisible" @handleConfirm="handleDetail"></performance-detail-dialog>
<performance-detail-dialog v-if="perDetailVisible" :detail-info-data="detailInfoData" :per-detail-visible="perDetailVisible" @handleConfirm="handleDetail"></performance-detail-dialog>
</d2-container>
</template>
......@@ -136,16 +136,12 @@ import { mapActions, mapState } from 'vuex'
import { getYqMerchantListBySceneApi, getListApi, getEnableStaffNumApi, enableOrDisableApi, importStaffApi } from '@api/businessSchool'
import PerformanceDetailDialog from './performanceDetailDialog.vue'
import { Util } from '@/common/util'
import _ from 'lodash'
export default {
name: 'StaffList',
components: {
PerformanceDetailDialog
},
props: {
sceneType: {
type: String
}
},
data() {
return {
beforeRangePickerOptions: {
......@@ -231,9 +227,8 @@ export default {
prop: 'scene',
width: '100',
formatter: (cellValue) => {
// return cellValue?.sceneType.map(v => {
// })
let sceneTypeLabel = { 0: '2.1', 1: '1.1' }
return cellValue?.sceneTypeList?.map(v => sceneTypeLabel[v])?.join('/') || '-'
}
}, {
label: '园区店',
......@@ -250,8 +245,7 @@ export default {
prop: 'title',
width: '160',
formatter: (cellValue) => {
let rankArr = ['初级驻店零售', '中级导师', '高级导师']
return cellValue?.title ? rankArr[cellValue?.title] : '初级驻店零售'
return cellValue?.titleList?.join('/')
}
}, {
label: '学员',
......@@ -306,8 +300,13 @@ export default {
},
mounted() {
// 获取会员权益场景 关联园区店
getYqMerchantListBySceneApi({ scene: this.sceneType }).then(res => {
this.yqMerchantList = res
getYqMerchantListBySceneApi({ scene: 0 }).then(res => {
let arr = res || []
// 获取精品升级场景 关联园区店
getYqMerchantListBySceneApi({ scene: 1 }).then(result => {
let arr2 = result || []
this.yqMerchantList = _.uniqBy(arr.concat(arr2), 'merchantId')
})
})
this.getBaseData()
},
......@@ -415,7 +414,8 @@ export default {
this.searchForm = {
staffName: '',
merchantName: '',
merchantId: ''
merchantId: '',
sceneType: ''
}
this.$refs.staffManageTable.refreshTable(true, true)
},
......@@ -428,8 +428,7 @@ export default {
this.$refs['exportFileRuleForm'].validate(valid => {
if (valid) {
var params = {
dataMonthStr: this.exportFileForm?.exportMonth ? Util.dateFormate(this.exportFileForm?.exportMonth, 'YYYY-MM') : '',
sceneType: this.sceneType
dataMonthStr: this.exportFileForm?.exportMonth ? Util.dateFormate(this.exportFileForm?.exportMonth, 'YYYY-MM') : ''
}
this.exportFileForm?.exportYqMerchantId?.forEach((val, index) => {
let merchantId = `yqMerchantIds[${index}]`
......@@ -457,10 +456,13 @@ export default {
let yqMerchantObj = { merchantName: row?.merchantName, merchantId: row.merchantNo }
let partnerMerchantArr = row?.partnerMerchantNameList.map((item, index) => item + row?.partnerMerchantIdList[index]) || []
let queryObj = {
staffUuid: row.staffUuid,
sceneType: this.sceneType,
yqMerchantObj: JSON.stringify(yqMerchantObj),
partnerMerchantArr: JSON.stringify(partnerMerchantArr)
staffUuid: row.staffUuid, // 员工Id
sceneTypeList: JSON.stringify(row.sceneTypeList), // 员工已关联场景
yqMerchantObj: JSON.stringify(yqMerchantObj), // 园区店信息
partnerMerchantArr: JSON.stringify(partnerMerchantArr), // 服务商信息
phoneNumber: row.staffPhone, // 员工手机号
staffName: row.staffName, // 员工姓名
performanceFlag: row.performanceFlag // 员工工资绩效开关
}
this.$router.push({
path: '/performanceConfig',
......@@ -475,9 +477,11 @@ export default {
let queryObj = {
staffUuid: row.staffUuid,
yqMerchantObj: JSON.stringify(yqMerchantObj),
sceneType: this.sceneType,
sceneTypeList: JSON.stringify(row?.sceneTypeList),
partnerMerchantArr: JSON.stringify(partnerMerchantArr),
businessSchoolEnableFlag: row.businessSchoolEnableFlag
phoneNumber: row.staffPhone, // 员工手机号
staffName: row.staffName, // 员工姓名
performanceFlag: row.performanceFlag
}
this.$router.push({
path: '/mentorConfig',
......@@ -491,7 +495,7 @@ export default {
},
// 禁/启用绩效配置
handleEnableOrDisable(row) {
if (row.businessSchoolEnableFlag == 'Y') {
if (row.performanceFlag == 'Y') {
this.$confirm('禁用该员工后关闭驻店工资绩效,请确认', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -506,7 +510,7 @@ export default {
// 禁用启用接口
enableOrDisableEvent(flag, staffUuid) {
// flag N禁用 Y启用
enableOrDisableApi({ staffUuid, businessSchoolEnableFlag: flag }).then(res => {
enableOrDisableApi({ staffUuid, performanceFlag: flag }).then(res => {
this.notice.okTips()
this.$refs.staffManageTable.refreshTable()
})
......
......@@ -14,7 +14,55 @@
:form-obj="viewInfo"
:form-data="viewFormData">
<div slot="inStoreTarget">
<d2-table @arraySpanMethod="arraySpanMethod" :tableData="viewInfo.tableData" :table-params="tableParams" :hasPage="false"></d2-table>
<d2-table :array-span-method="arraySpanMethod" :tableData="viewInfo.tableData" :table-params="tableParams" :hasPage="false">
<!-- 车主类型 -->
<template slot="selectCarType" slot-scope="scope">
<div v-if="scope.scope.selectCarType == 0">无</div>
<div v-if="scope.scope.selectCarType == 1">车辆价格:{{ scope.scope.minCarPrice }}-{{ scope.scope.maxCarPrice }}万</div>
<div v-if="scope.scope.selectCarType == 2">车辆类型:
<span v-for="(subItem, subIndex) in scope.scope.carList" :key="subIndex">{{ `${subItem.carBrand}-${subItem.carChildsBrandName}-${subItem.carSeriesName}` }}</span>
</div>
</template>
<!-- 主推产品套餐 -->
<template slot="selectPackageType" slot-scope="scope">
<div v-if="scope.scope.selectPackageType == 0">无</div>
<div v-if="scope.scope.selectPackageType == 1 || scope.scope.selectPackageType == 2">
<div v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.upgradeGoodsName }}</div>
</div>
</template>
<!-- 目标转化率 -->
<template slot="conversionRate" slot-scope="scope">
<div v-if="scope.scope.selectPackageType == 0">无</div>
<div v-if="scope.scope.selectPackageType == 1">{{ scope.scope.conversionRate }}</div>
<div v-if="scope.scope.selectPackageType == 2">
<div v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.conversionRate }}</div>
</div>
</template>
<!-- 目标转化率提成 -->
<template slot="conversionRatePercentage" slot-scope="scope">
<div v-if="scope.scope.selectPackageType == 0">无</div>
<div v-if="scope.scope.selectPackageType == 1">{{ scope.scope.conversionRatePercentage }}</div>
<div v-if="scope.scope.selectPackageType == 2">
<div v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.conversionRatePercentage }}</div>
</div>
</template>
<!-- 客单价 -->
<template slot="customerUnitPrice" slot-scope="scope">
<div v-if="scope.scope.selectPackageType == 0">无</div>
<div v-if="scope.scope.selectPackageType == 1">{{ scope.scope.customerUnitPrice }}</div>
<div v-if="scope.scope.selectPackageType == 2">
<div v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.customerUnitPrice }}</div>
</div>
</template>
<!-- 客单价提成 -->
<template slot="customerUnitPricePercentage" slot-scope="scope">
<div v-if="scope.scope.selectPackageType == 0">无</div>
<div v-if="scope.scope.selectPackageType == 1">{{ scope.scope.customerUnitPricePercentage }}</div>
<div v-if="scope.scope.selectPackageType == 2">
<div v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.customerUnitPricePercentage }}</div>
</div>
</template>
</d2-table>
</div>
</glsx-combi-form>
<div class="page_footer">
......@@ -35,23 +83,28 @@ export default {
viewFormData: [{
label: '门店名称',
isHide: false,
showTxt: true
name: 'merchantName',
type: 'showTxt'
}, {
label: '业务场景',
isHide: false,
showTxt: true
name: 'sceneTypeTxt',
type: 'showTxt'
}, {
label: '驻店员工',
isHide: false,
showTxt: true
name: 'staffName',
type: 'showTxt'
}, {
label: '联系方式',
isHide: false,
showTxt: true
name: 'phoneNumber',
type: 'showTxt'
}, {
label: '考核周期',
isHide: false,
showTxt: true
name: 'checkMonthPeriod',
type: 'showTxt'
}, {
label: '驻店目标',
isHide: false,
......@@ -60,34 +113,51 @@ export default {
tableParams: {
tableColumns: [{
label: '月度',
prop: 'startValue'
prop: 'checkMonth',
formatter: (cellValue) => {
return {1: '首月', 2: '次月', 3: '第三月'}[cellValue?.checkMonth]
}
}, {
label: '周期',
prop: 'startValue'
prop: 'checkPeriod',
formatter: (cellValue) => {
return {1: '上半月', 2: '下半月'}[cellValue?.checkPeriod]
}
}, {
label: '车主类型',
prop: 'startValue'
prop: 'selectCarType',
addHtml: 'selectCarType'
}, {
label: '主推产品套餐',
prop: 'startValue'
prop: 'studentNumber',
addHtml: 'selectPackageType'
}, {
label: '目标转化率',
prop: 'startValue'
prop: 'conversionRate',
addHtml: 'conversionRate'
}, {
label: '提成系数',
prop: 'startValue'
prop: 'conversionRatePercentage',
addHtml: 'conversionRatePercentage'
}, {
label: '目标客单价',
prop: 'startValue'
prop: 'customerUnitPrice',
addHtml: 'customerUnitPrice'
}, {
label: '提成系数',
prop: 'startValue'
prop: 'customerUnitPricePercentage',
addHtml: 'customerUnitPricePercentage'
}],
tableData: []
},
viewInfo: {
tableData: []
}
},
spanArr1: [],
spanIndex1: 0,
spanArr2: [],
spanIndex2: 0,
spanArr3: [],
spanIndex3: 0
}
},
mounted() {
......@@ -101,13 +171,104 @@ export default {
close: 'd2admin/page/close'
}),
getDetailInfo(routerQuery) {
getStaffTaskDetailApi({}).then(res => {
getStaffTaskDetailApi({ id: routerQuery?.id }).then(res => {
res = {
merchantName: res?.targetCofig?.merchantName,
sceneTypeTxt: ['会员权益/升级', '精品升级'][res?.targetCofig?.sceneType] || '-',
staffName: res.staffName,
phoneNumber: res.phoneNumber,
checkMonthPeriod: `${{ 1: '首月', 2: '次月', 3: '第三月' }[res?.checkMonth]}-${{ 1: '上半月', 2: '下半月' }[res?.checkPeriod]}`,
tableData: res?.taskList || []
}
this.viewInfo = res || {}
this.merge(res?.tableData)
}).catch(() => {})
},
// 合并表格
arraySpanMethod() {
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
const len = this.viewInfo?.tableData?.length
const t = 10
if (columnIndex === 0) {
// 第一列 序号
const _row_1 = this.spanArr1[rowIndex]
const _col_1 = _row_1 > 0 ? 1 : 0
return {
rowspan: _row_1,
colspan: _col_1
}
} else if (columnIndex === 1) {
// 第二列 月度
const _row_2 = this.spanArr2[rowIndex]
const _col_2 = _row_2 > 0 ? 1 : 0
return {
rowspan: _row_2,
colspan: _col_2
}
// 第三列 周期
} else if (columnIndex === 2) {
const _row_3 = this.spanArr3[rowIndex]
const _col_3 = _row_3 > 0 ? 1 : 0
return {
rowspan: _row_3,
colspan: _col_3
}
}
else if (columnIndex === t) {
const _row_6 = len
const _col_6 = 1
return {
rowspan: _row_6,
colspan: _col_6
}
} else if (rowIndex === len) {
return {
rowspan: 1,
colspan: 1
}
}
},
// 初始化合并行数组
mergeInit() {
this.spanArr1 = [] // 合并序号
this.spanIndex1 = 0 // 合并序号索引
this.spanArr2 = [] // 合并月度
this.spanIndex2 = 0 // 合并月度索引
this.spanArr3 = [] // 合并周期
this.spanIndex3 = 0 // 合并周期索引
},
// 合并表格
merge(data) {
this.mergeInit()
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
if (i === 0) {
// 第一行必须存在,以第一行为基准
this.spanArr1.push(1) // 合并序号
this.spanIndex1 = 0
this.spanArr2.push(1) // 合并月度
this.spanIndex2 = 0
this.spanArr3.push(1) // 合并周期
this.spanIndex3 = 0
} else {
// 根据月度和考核周期进行合并
if (data[i].checkMonth == data[i - 1].checkMonth && data[i].checkPeriod == data[i -1].checkPeriod) {
this.spanArr1[this.spanIndex1] += 1
this.spanArr1.push(0)
this.spanArr2[this.spanIndex2] += 1
this.spanArr2.push(0)
this.spanArr3[this.spanIndex3] += 1
this.spanArr3.push(0)
} else {
this.spanArr1.push(1)
this.spanIndex1 = i
this.spanArr2.push(1)
this.spanIndex2 = i
this.spanArr3.push(1)
this.spanIndex3 = i
}
}
}
}
},
// 返回
handleClose() {
......
......@@ -28,27 +28,19 @@
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
:array-span-method="arraySpanMethod"
@setTableFinishFun="setTableFinishFun">
<template slot="sceneType" slot-scope="scope">
<div v-if="scope.scope.sceneType == 1">精品升级</div>
<div v-if="scope.scope.sceneType == 0">会员权益/升级</div>
<div v-else>-</div>
</template>
<template slot="yqMerchantName" slot-scope="scope">
<div v-for="item in scope.scope.yqMerchantList" :key="item.merchantId">{{ item.merchantName }}</div>
<!-- <div v-if="!scope.scope.yqMerchantList.length">-</div> -->
</template>
<template slot="yqMerchantId" slot-scope="scope">
<div v-for="item in scope.scope.yqMerchantList" :key="item.merchantId">{{ item.merchantId }}</div>
<!-- <div v-if="!scope.scope.yqMerchantList.length">-</div> -->
</template>
<template slot="partnerMerchantName" slot-scope="scope">
<div v-for="item in scope.scope.partnerMerchantList" :key="item.merchantId">{{ item.merchantName }}</div>
<!-- <div v-if="!scope.scope.partnerMerchantList.length">-</div> -->
<div v-for="item in scope.scope.serviceList" :key="item.merchantId">{{ item.merchantName }}</div>
<div v-if="!scope.scope.serviceList.length">-</div>
</template>
<template slot="partnerMerchantId" slot-scope="scope">
<div v-for="item in scope.scope.partnerMerchantList" :key="item.merchantId">{{ item.merchantId }}</div>
<!-- <div v-if="!scope.scope.partnerMerchantList.length">-</div> -->
<div v-for="item in scope.scope.serviceList" :key="item.merchantId">{{ item.merchantId }}</div>
<div v-if="!scope.scope.serviceList.length">-</div>
</template>
<div slot="auth-button"
slot-scope="scope">
......@@ -76,15 +68,17 @@ export default {
// 搜索框
showFormData: [{
label: '商户名称',
name: 'merchantName',
name: 'allMerchantName',
type: 'input',
placeholder: '请输入园区店/导流方/服务商名称',
isClear: true,
keyFn: this.keyDownGetList
}, {
label: '商户号',
name: 'merchantId',
name: 'allMerchantId',
type: 'input',
inputType: 'number',
placeholder: '请输入园区店/导流方/服务商商户号',
isClear: true,
keyFn: this.keyDownGetList
}, {
......@@ -97,12 +91,12 @@ export default {
optionsName: 'sceneTypeList'
}, {
label: '配置状态',
name: 'status',
name: 'configStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'statusList'
optionsName: 'configStatusList'
}],
getListApi: getStoreTargetListApi,
// 表格参数
......@@ -133,18 +127,16 @@ export default {
addHtml: 'sceneType'
}, {
label: '关联园区店',
prop: 'yqMerchantName',
addHtml: 'yqMerchantName'
prop: 'yqMerchantName'
}, {
label: '关联园区店号',
prop: 'yqMerchantId',
addHtml: 'yqMerchantId'
prop: 'yqMerchantId'
}, {
label: '关联服务商',
prop: 'partnerMerchantName',
addHtml: 'partnerMerchantName'
}, {
label: '关联服务商号',
label: '关联服务商商户号',
prop: 'partnerMerchantId',
addHtml: 'partnerMerchantId'
}, {
......@@ -152,17 +144,16 @@ export default {
prop: 'status',
width: '80',
className: (cellValue) => {
cellValue.performanceFlag = cellValue?.performanceFlag ? cellValue?.performanceFlag : 'N'
return {
'Y': 'greenSpot',
'N': 'yellowSpot'
}[cellValue.performanceFlag]
}[cellValue.configStatus]
},
formatter: (cellValue) => {
return {
'Y': '已配置',
'N': '待配置'
}[cellValue.performanceFlag]
}[cellValue.configStatus]
}
}, {
label: '创建时间',
......@@ -180,16 +171,16 @@ export default {
}
}, {
label: '操作人',
prop: 'updateUser',
prop: 'updatedBy',
width: '80',
}]
},
// 查询条件
searchForm: {
merchantName: '',
merchantId: '',
allMerchantName: '',
allMerchantId: '',
sceneType: '',
status: ''
configStatus: ''
},
baseData: {
sceneTypeList: [{
......@@ -199,14 +190,20 @@ export default {
confId: 0,
confValue: '会员权益/升级'
}],
statusList: [{
confId: 1,
configStatusList: [{
confId: 'N',
confValue: '待配置'
}, {
confId: 2,
confId: 'Y',
confValue: '已配置'
}]
}
},
spanArr1: [],
spanIndex1: 0,
spanArr2: [],
spanIndex2: 0,
spanArr3: [],
spanIndex3: 0
}
},
mounted() {
......@@ -235,6 +232,92 @@ export default {
},
// 表格数据处理
setTableFinishFun(data) {
this.merge(data)
},
// 合并表格
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
const len = this.viewInfo?.tableData?.length
const t = 14
if (columnIndex === 0) {
// 第一列 序号
const _row_1 = this.spanArr1[rowIndex]
const _col_1 = _row_1 > 0 ? 1 : 0
return {
rowspan: _row_1,
colspan: _col_1
}
} else if (columnIndex === 1) {
// 第二列 流量方
const _row_2 = this.spanArr2[rowIndex]
const _col_2 = _row_2 > 0 ? 1 : 0
return {
rowspan: _row_2,
colspan: _col_2
}
// 第三列 流量方商户号
} else if (columnIndex === 2) {
const _row_3 = this.spanArr3[rowIndex]
const _col_3 = _row_3 > 0 ? 1 : 0
return {
rowspan: _row_3,
colspan: _col_3
}
}
else if (columnIndex === t) {
const _row_6 = len
const _col_6 = 1
return {
rowspan: _row_6,
colspan: _col_6
}
} else if (rowIndex === len) {
return {
rowspan: 1,
colspan: 1
}
}
},
// 初始化合并行数组
mergeInit() {
this.spanArr1 = [] // 合并序号
this.spanIndex1 = 0 // 合并序号索引
this.spanArr2 = [] // 合并流量方
this.spanIndex2 = 0 // 合并流量方索引
this.spanArr3 = [] // 合并流量方商户号
this.spanIndex3 = 0 // 合并流量方商户号索引
},
// 合并表格
merge(data) {
this.mergeInit()
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
if (i === 0) {
// 第一行必须存在,以第一行为基准
this.spanArr1.push(1) // 合并序号
this.spanIndex1 = 0
this.spanArr2.push(1) // 合并流量方
this.spanIndex2 = 0
this.spanArr3.push(1) // 合并流量方商户号
this.spanIndex3 = 0
} else {
if (data[i].merchantId == data[i - 1].merchantId) {
this.spanArr1[this.spanIndex1] += 1
this.spanArr1.push(0)
this.spanArr2[this.spanIndex2] += 1
this.spanArr2.push(0)
this.spanArr3[this.spanIndex3] += 1
this.spanArr3.push(0)
} else {
this.spanArr1.push(1)
this.spanIndex1 = i
this.spanArr2.push(1)
this.spanIndex2 = i
this.spanArr3.push(1)
this.spanIndex3 = i
}
}
}
}
},
// 查看详情
handleStoreView(row) {
......@@ -265,10 +348,10 @@ export default {
// 重置
handleReset() {
this.searchForm = {
merchantName: '',
merchantId: '',
allMerchantName: '',
allMerchantId: '',
sceneType: '',
status: ''
configStatus: ''
}
this.$refs.storeTargetTable.refreshTable(true, true)
}
......
<!-- 驻店管理 - 列表 -->
<template>
<div>
<!-- class="order-detail" -->
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:labelWidth="labelWidth"
:form-data="showFormData" />
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
<auth-button :data="scope.scope" />
</div>
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { sceneForShop } from '@/common/constants.js'
import { withdrawOrderRecordPage, rewithdraw } from '@api/withdrawalManage'
import { staffPage } from '@api/inStoreManage'
export default {
name: 'TransferAccountsList',
components: {
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
labelWidth: '100px',
searchForm: {
staffName: '',
phoneNumber: '',
allMerchantName: '',
sceneType: '',
allMerchantId: '',
staffLabelFlag: ''
},
searchFormSearch: {},
showFormData: [{
label: '员工姓名',
name: 'staffName',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '手机号',
name: 'phoneNumber',
type: 'input',
inputType: "number",
maxlength: '11',
isClear: true
}, {
label: '商户',
name: 'allMerchantName',
type: 'input',
maxlength: '50',
isClear: true
}, {
label: '所属业务',
name: 'sceneType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneForShop'
}, {
label: '商户号',
name: 'allMerchantId',
type: 'input',
inputType: 'number',
maxlength: '20',
isClear: true
}, {
label: '员工标签',
name: 'staffLabelFlag',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'staffLabelFlagList'
}],
getListApi: staffPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// tableOption: { width: '200px' },
tableOption: true,
tableColumns: [{
label: '姓名',
prop: 'staffName',
width: '160px'
}, {
label: '手机号',
prop: 'phoneNumber',
width: '160px'
}, {
label: '园区店',
prop: 'merchantName',
width: '160px',
formatter: (cellValue) => {
return cellValue.merchantName + ' ' + cellValue.merchantId
}
}, {
label: '所属业务',
prop: 'staffSceneLabel',
width: '160px'
}, {
label: "服务门店",
prop: "shopMerchantList",
html: true,
formatter: (cellValue) => {
if (cellValue.shopMerchantList) {
return cellValue.shopMerchantList.reduce(
(merchString, item) => {
merchString = merchString + `<p>${item.merchantName} ${item.merchantId}</p>`
return merchString
},
""
)
} else {
return ""
}
}
}, {
label: "服务商",
prop: "serviceMerchantList",
html: true,
formatter: (cellValue) => {
if (cellValue.serviceMerchantList) {
return cellValue.serviceMerchantList.reduce(
(merchString, item) => {
merchString = merchString + `<p>${item.merchantName} ${item.merchantId}</p>`
return merchString
},
""
)
} else {
return ""
}
}
}, {
label: '员工标签',
prop: 'staffLabelFlag',
formatter: (cellValue) => {
return cellValue.staffLabelFlag == 'Y' ? '有' : '无'
}
}]
},
baseData: {
sceneForShop: deepClone(sceneForShop),
staffLabelFlagList: [
{ confId: 'Y', confValue: "有" },
{ confId: 'N', confValue: "无" }
]
},
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
this.getBaseData()
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
...mapActions('d2admin/user', ['actionSetDownloadList']),
async getBaseData() {
this.getOptionsList()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleReset() {
this.searchForm = {
staffName: '',
phoneNumber: '',
allMerchantName: '',
sceneType: '',
allMerchantId: '',
staffLabelFlag: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
handleViewLabel() {
console.log('1111111111');
}
},
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
</style>
......@@ -2,15 +2,22 @@
<d2-Container>
<div class="merchant-checkdetail">
<div class="merchant-title">
<span>商户名称:我是4S点名称</span>
<span>业务场景:精品升级</span>
<span>类型:清分</span>
<span>生效时间:2024-01-01</span>
<span>商户名称:{{merchantRow.merchantName}}</span>
<span>业务场景:{{sceneList[merchantRow.sceneType]}}</span>
<span>类型:{{ruleReviewType[merchantRow.ruleType]}}</span>
<span>生效时间:{{merchantRow.effectStartDateShow}}</span>
</div>
<div class="merchant-info">
<!-- 分账 -->
<ledgerAccount v-if="merchantRow.ruleType == 1"
:items="checkDetailItem" />
<!-- 对账 -->
<reconciliation v-if="merchantRow.ruleType == 3"
:form-item="checkRecordList"
:items="checkRecordList.goodsTypeGroupReconciliationRules || []" />
</div>
<ledgerAccount :items="checkDetailItem" />
<div class="btns">
<el-button @click="handleConfirm"
size="small"
type="primary">
审核
</el-button>
......@@ -21,10 +28,10 @@
<script>
import ledgerAccount from '../merchant/merchantStep/components/ledgerAccount.vue'
import {
getDistributeRuleApi,
// getEffectRuleApi
} from "@api/merchant"
import reconciliation from '../merchant/merchantStep/components/reconciliation.vue'
import { ruleAuditDetail, ruleAuditPass } from '@api/ruleReview'
import { sceneList, ruleReview_type_show } from '@/common/constants.js'
import { Util, deepClone } from '@/common/util'
export default {
name: "ExamineDetail",
props: {},
......@@ -35,66 +42,43 @@ export default {
// 分账数据
checkDetailItem: {},
// 对账数据
// checkRecordList: {}
checkRecordList: {},
sceneList: deepClone(sceneList),
ruleReviewType: deepClone(ruleReview_type_show)
}
},
created() {
this.getRowItem()
},
mounted() {
// 分账
this.getDistributeRule()
this.getRuleAuditDetail()
},
methods: {
async init() {
// if (this.activeName == "first") {
// 分账
this.getDistributeRule()
// } else {
// 对账
// this.getEffectRule()
// }
this.getRuleAuditDetail()
},
// 分账
async getDistributeRule() {
async getRuleAuditDetail() {
const params = {
merchantId: this.merchantRow.merchantId,
sceneType: this.merchantRow.scene,
expenseCategroyRulsBuildType: 2
id: this.merchantRow.id
}
const res = await getDistributeRuleApi(params)
const res = await ruleAuditDetail(params)
console.log('res: ', res)
this.checkDetailItem = res
this.checkDetailItem = res.merchantSettleDistributeRule
this.checkRecordList = res.merchantReconciliationRule
},
// 对账
// async getEffectRule() {
// const params = {
// merchantId: this.merchantRow.merchantId,
// sceneType: this.merchantRow.scene
// }
// const res = await getEffectRuleApi(params)
// console.log(res)
// this.checkRecordList = res
// // this.checkRecordList = res?.goodsTypeGroupReconciliationRules
// // console.log('res: ', res)
// },
getRowItem() {
const params = this.$route.query?.params
if (params) {
this.merchantRow = JSON.parse(params)
if (this.merchantRow.effectDateType == 2) {
this.merchantRow.effectStartDateShow = '立即生效'
} else {
this.merchantRow.effectStartDateShow = this.merchantRow.effectStartDate ? Util.dateFormate(this.merchantRow.effectStartDate, 'YYYY-MM-DD') : '--'
}
// console.log("is.merchantRow", this.merchantRow)
}
},
// handleClick(tab) {
// // console.log(tab.name)
// this.activeName = tab.name
// this.init()
// },
// handleType(num) {
// this.activeType = num
// },
// 保存
// 审核
handleConfirm() {
this.$confirm('审核通过后,当前规则会自动应用并生效,可在商户管理-历史记录中查询。', '提示', {
confirmButtonText: '确定',
......@@ -102,9 +86,10 @@ export default {
type: 'warning',
closeOnClickModal: false
}).then(() => {
// rewithdraw({ orderCode: row.orderCode }).then(res => {
this.$router.go(-1)
// })
ruleAuditPass({ id: this.merchantRow.id }).then(res => {
this.notice.okTips()
this.$router.go(-1)
})
}).catch(err => {
console.log(err)
})
......@@ -112,7 +97,7 @@ export default {
},
components: {
ledgerAccount,
// reconciliation
reconciliation
},
computed: {}
}
......@@ -137,6 +122,9 @@ $color: #2a58ad;
align-items: center;
justify-content: space-between;
}
.merchant-info {
margin-top: 20px;
}
.type {
margin-top: 6px;
......
......@@ -38,7 +38,8 @@
<div slot="auth-button"
slot-scope="scope">
<!-- 审核 -->
<span style="margin-right: 10px;">
<span style="margin-right: 10px;"
v-if="scope.scope.auditStatus == 1">
<auth-button :data="scope.scope"
:show-btn-ids="['9062401']" />
</span>
......@@ -123,7 +124,7 @@ export default {
optionLabel: 'confValue',
optionsName: 'statusList'
}],
getListApi: withdrawOrderRecordPage,
getListApi: ruleAuditPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
......@@ -161,7 +162,7 @@ export default {
if (cellValue.effectDateType == 2) {
return '立即生效'
} else {
return cellValue.effectStartDate ? Util.dateFormate(cellValue.effectStartDate, 'YYYY-MM-DD HH:mm:ss') : '--'
return cellValue.effectStartDate ? Util.dateFormate(cellValue.effectStartDate, 'YYYY-MM-DD') : '--'
}
}
},
......@@ -182,7 +183,7 @@ export default {
prop: 'createdDate',
width: '150px',
formatter: (cellValue) => {
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss') : '--'
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm') : '--'
}
},
{
......@@ -194,7 +195,7 @@ export default {
prop: 'auditDate',
width: '150px',
formatter: (cellValue) => {
return cellValue.auditDate ? Util.dateFormate(cellValue.auditDate, 'YYYY-MM-DD HH:mm:ss') : '--'
return cellValue.auditDate ? Util.dateFormate(cellValue.auditDate, 'YYYY-MM-DD HH:mm') : '--'
}
}
]
......@@ -264,8 +265,8 @@ export default {
//审核
handleReview(row) {
row.merchantId = 44211847
row.scene = 1
// row.merchantId = 44211847
// row.scene = 1
this.$router.push({
name: "examineDetail",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!