Commit e3abc01a by wangzhihui

工资绩效

1 parent 190dc160
...@@ -613,7 +613,7 @@ export function getPermissionsByPhone(data) { ...@@ -613,7 +613,7 @@ export function getPermissionsByPhone(data) {
* 质检管理-平铺视图 * 质检管理-平铺视图
*/ */
export function getReclistWithPageV2(data) { export function getReclistWithPageV2(data) {
data.method = 'dj.api.mindworkplate.badge.employeeBadgeReclistWithPageV2' data.method = "dj.api.mindworkplate.badge.employeeBadgeReclistWithPageV2"
return request(data, "post") return request(data, "post")
} }
...@@ -624,3 +624,15 @@ export function exportReclistListV2(data) { ...@@ -624,3 +624,15 @@ export function exportReclistListV2(data) {
data.method = "dj.api.mindworkplate.badge.employeeBadgeReclistExportV2" data.method = "dj.api.mindworkplate.badge.employeeBadgeReclistExportV2"
return request(data, "post") return request(data, "post")
} }
//上级领导列表查询
export function getLeaderList(data = {}) {
data.method = "dj.api.smartcarlife.staffBeisenBaseInfo.leader.list"
return request(data, "post")
}
// 接口名称:驻店员工信息分页
export function staffBaseInfoPageList(data = {}) {
data.method = "dj.api.smartcarlife.staffBaseInfo.pageList"
return request(data, "post")
}
// 工资绩效
import request from "./request"
// 提成方案审批列表
export function getConfigApprovetList(data) {
data.method = `dj.staff.api.performance.config.approve.page`
return request(data)
}
// 门店提成方案列表(以门店为维度)
export function getStoreConfigList(data) {
data.method = `dj.staff.api.performance.store.config.page`
return request(data)
}
// 提成方案列表(以方案为维度)
export function getConfigList(data) {
data.method = `dj.staff.api.performance.config.page`
return request(data)
}
// 提成方案审批详情
export function getConfigApprovetDetail(data) {
data.method = `dj.staff.api.performance.config.approve.detail`
return request(data)
}
// 查询系统审批人查询人列表
export function getApproveConfig(data = {}) {
data.method = `dj.staff.api.performance.approve.config.get`
return request(data)
}
//考勤/工资申诉分页查询
export function getSalaryAppealList(data) {
data.method = `dj.api.staff.salaryappeal.page`
return request(data)
}
//查询申诉详情
export function getSalaryAppealDetail(data) {
data.method = `dj.api.staff.salaryappeal.detail`
return request(data)
}
//工资申诉去答复
export function replySalaryAppeal(data) {
data.method = `dj.api.staff.salaryappeal.reply`
return request(data)
}
...@@ -1275,10 +1275,10 @@ export const outputValue_operTypeOpt = [ ...@@ -1275,10 +1275,10 @@ export const outputValue_operTypeOpt = [
// 门店毛利额 业务类型 // 门店毛利额 业务类型
export const profit_operTypeOpt = [ export const profit_operTypeOpt = [
{ confId: 'ADD', confValue: "新增" }, { confId: "ADD", confValue: "新增" },
{ confId: 'UPDATE', confValue: "修改" }, { confId: "UPDATE", confValue: "修改" },
{ confId: 'DELETE', confValue: "删除" }, { confId: "DELETE", confValue: "删除" },
{ confId: 'IMPORT', confValue: "导入" } { confId: "IMPORT", confValue: "导入" }
] ]
// 带教管理 业务类型1 // 带教管理 业务类型1
...@@ -1821,3 +1821,20 @@ export const paymentMethodOpt = [ ...@@ -1821,3 +1821,20 @@ export const paymentMethodOpt = [
{ confId: "1", confValue: "银行转账" }, { confId: "1", confValue: "银行转账" },
{ confId: "2", confValue: "冲账" } { confId: "2", confValue: "冲账" }
] ]
export const statusList = [
{ confId: 2, confValue: "生效" },
{ confId: 1, confValue: "审批中" },
{ confId: 0, confValue: "草稿" },
{ confId: 3, confValue: "未生效" }
]
export const statusTypeOptMap = {
1: "#FDB757",
0: "#FDB757",
2: "#2CCA74",
3: "#999999"
}
export const appealTypeOpt = [
{ confId: "2", confValue: "工资申诉" },
{ confId: "1", confValue: "考勤申诉" }
]
...@@ -395,6 +395,61 @@ export const Util = { ...@@ -395,6 +395,61 @@ export const Util = {
// 检查小数点后的长度是否不超过2 // 检查小数点后的长度是否不超过2
return decimalPart.length <= 2 return decimalPart.length <= 2
},
getStatusItem(baseData, optKey, row, rowKey) {
if (!baseData || !baseData[optKey] || !row) return null
let item = baseData[optKey].find((item) => item.confId == row[rowKey])
return (item && item.confValue) || "-"
},
getStatusColor(status, optKey) {
if (status === null || status === undefined) return "#C0C4CC"
const map = (this.baseData && this.baseData[optKey]) || {}
return map[status] || "#C0C4CC"
},
getOptionsList(that, formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = that[formName].find((k) => k.name == refreshSigle)
var index = that[formName].findIndex((k) => k.name == refreshSigle)
that.$set(
that[formName][index],
"optionList",
deepClone(that.baseData[item.optionsName])
)
if (
hasAll &&
that.baseData[item.optionsName].length &&
that.baseData[item.optionsName][0][
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[that[formName][index].optionId] = ""
temp[that[formName][index].optionLabel] = "全部"
that[formName][index].optionList.unshift(temp)
}
} else {
that[formName].forEach((item, index) => {
if (item.type === "select" && that.baseData[item.optionsName]?.length) {
that.$set(
that[formName][index],
"optionList",
deepClone(that.baseData[item.optionsName])
)
if (
hasAll &&
that.baseData[item.optionsName].length &&
that.baseData[item.optionsName][0][
that[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[that[formName][index].optionId] = ""
temp[that[formName][index].optionLabel] = "全部"
that[formName][index].optionList.unshift(temp)
}
}
})
}
} }
} }
...@@ -406,3 +461,6 @@ export const deepClone = Util.deepClone ...@@ -406,3 +461,6 @@ export const deepClone = Util.deepClone
export const downLoadFile = Util.downLoadFile export const downLoadFile = Util.downLoadFile
export const returnFloat = Util.returnFloat export const returnFloat = Util.returnFloat
export const getExplorer = Util.getExplorer export const getExplorer = Util.getExplorer
export const getStatusItem = Util.getStatusItem
export const getStatusColor = Util.getStatusColor
export const getOptionsList = Util.getOptionsList
/*
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-09-01 15:41:23
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-01-19 18:15:28
* @FilePath: \dj-car-life-system\src\components\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import Vue from "vue" import Vue from "vue"
import d2Container from "./d2-container" import d2Container from "./d2-container"
...@@ -20,5 +28,6 @@ Vue.component("BaseDialog", () => import("./baseDialog/index.vue")) ...@@ -20,5 +28,6 @@ Vue.component("BaseDialog", () => import("./baseDialog/index.vue"))
Vue.component("GlsxCombiForm", () => import("./glsx-combi-form/index.vue")) Vue.component("GlsxCombiForm", () => import("./glsx-combi-form/index.vue"))
Vue.component("GLDialog", () => import("./GLDialog/index.vue")) Vue.component("GLDialog", () => import("./GLDialog/index.vue"))
Vue.component("GlskFormDialog", () => import("./glsk-form-dialog/index.vue")) Vue.component("GlskFormDialog", () => import("./glsk-form-dialog/index.vue"))
Vue.component("glsxPreview", () => import("./preview/index.vue"))
// Vue.component([authButton.name], authButton) // Vue.component([authButton.name], authButton)
Vue.component(authButton.name, authButton) Vue.component(authButton.name, authButton)
<template>
<transition name="viewer-fade">
<div
tabindex="-1"
ref="el-image-viewer__wrapper"
class="el-image-viewer__wrapper"
:style="{ 'z-index': zIndex }"
>
<div class="el-image-viewer__mask" @click="hide"></div>
<!-- CLOSE -->
<span class="el-image-viewer__btn el-image-viewer__close" @click="hide">
<i class="el-icon-circle-close"></i>
</span>
<!-- ARROW -->
<template v-if="!isSingle">
<span
class="el-image-viewer__btn el-image-viewer__prev"
:class="{ 'is-disabled': !infinite && isFirst }"
@click="prev"
>
<i class="el-icon-arrow-left" />
</span>
<span
class="el-image-viewer__btn el-image-viewer__next"
:class="{ 'is-disabled': !infinite && isLast }"
@click="next"
>
<i class="el-icon-arrow-right" />
</span>
</template>
<!-- ACTIONS -->
<div class="el-image-viewer__btn el-image-viewer__actions">
<div class="el-image-viewer__actions__inner">
<i class="el-icon-zoom-out" @click="handleActions('zoomOut')"></i>
<i class="el-icon-zoom-in" @click="handleActions('zoomIn')"></i>
<i class="el-image-viewer__actions__divider"></i>
<i :class="mode.icon" @click="toggleMode"></i>
<i class="el-image-viewer__actions__divider"></i>
<i
class="el-icon-refresh-left"
@click="handleActions('anticlocelise')"
></i>
<i
class="el-icon-refresh-right"
@click="handleActions('clocelise')"
></i>
</div>
</div>
<!-- CANVAS -->
<div class="el-image-viewer__canvas">
<img
v-for="(url, i) in urlList"
v-if="i === index"
ref="img"
class="el-image-viewer__img"
:key="url"
:src="currentImg"
:style="imgStyle"
@load="handleImgLoad"
@error="handleImgError"
@mousedown="handleMouseDown"
/>
</div>
</div>
</transition>
</template>
<script>
function rafThrottle(fn) {
let locked = false
return function (...args) {
if (locked) return
locked = true
window.requestAnimationFrame((_) => {
fn.apply(this, args)
locked = false
})
}
}
const on = (function () {
return function (element, event, handler) {
if (element && event && handler) {
element.addEventListener(event, handler, false)
}
}
})()
const off = (function () {
return function (element, event, handler) {
if (element && event) {
element.removeEventListener(event, handler, false)
}
}
})()
const isFirefox = function () {
return !!window.navigator.userAgent.match(/firefox/i)
}
const Mode = {
CONTAIN: {
name: "contain",
icon: "el-icon-full-screen"
},
ORIGINAL: {
name: "original",
icon: "el-icon-c-scale-to-original"
}
}
const mousewheelEventName = isFirefox() ? "DOMMouseScroll" : "mousewheel"
export default {
name: "elImageViewer",
props: {
urlList: {
type: Array,
default: () => []
},
zIndex: {
type: Number,
default: 2000
},
onSwitch: {
type: Function,
default: () => {}
},
onClose: {
type: Function,
default: () => {}
},
initialIndex: {
type: Number,
default: 0
}
},
data() {
return {
index: this.initialIndex,
isShow: false,
infinite: true,
loading: false,
mode: Mode.CONTAIN,
transform: {
scale: 1,
deg: 0,
offsetX: 0,
offsetY: 0,
enableTransition: false
}
}
},
computed: {
isSingle() {
return this.urlList.length <= 1
},
isFirst() {
return this.index === 0
},
isLast() {
return this.index === this.urlList.length - 1
},
currentImg() {
return this.urlList[this.index]
},
imgStyle() {
const { scale, deg, offsetX, offsetY, enableTransition } = this.transform
const style = {
transform: `scale(${scale}) rotate(${deg}deg)`,
transition: enableTransition ? "transform .3s" : "",
"margin-left": `${offsetX}px`,
"margin-top": `${offsetY}px`
}
if (this.mode === Mode.CONTAIN) {
style.maxWidth = style.maxHeight = "100%"
}
return style
}
},
watch: {
index: {
handler: function (val) {
this.reset()
this.onSwitch(val)
}
},
currentImg(val) {
this.$nextTick((_) => {
const $img = this.$refs.img[0]
if (!$img.complete) {
this.loading = true
}
})
}
},
methods: {
hide() {
console.log(888)
this.deviceSupportUninstall()
this.onClose()
},
deviceSupportInstall() {
this._keyDownHandler = rafThrottle((e) => {
const keyCode = e.keyCode
switch (keyCode) {
// ESC
case 27:
this.hide()
break
// SPACE
case 32:
this.toggleMode()
break
// LEFT_ARROW
case 37:
this.prev()
break
// UP_ARROW
case 38:
this.handleActions("zoomIn")
break
// RIGHT_ARROW
case 39:
this.next()
break
// DOWN_ARROW
case 40:
this.handleActions("zoomOut")
break
}
})
this._mouseWheelHandler = rafThrottle((e) => {
const delta = e.wheelDelta ? e.wheelDelta : -e.detail
if (delta > 0) {
this.handleActions("zoomIn", {
zoomRate: 0.015,
enableTransition: false
})
} else {
this.handleActions("zoomOut", {
zoomRate: 0.015,
enableTransition: false
})
}
})
on(document, "keydown", this._keyDownHandler)
on(document, mousewheelEventName, this._mouseWheelHandler)
},
deviceSupportUninstall() {
off(document, "keydown", this._keyDownHandler)
off(document, mousewheelEventName, this._mouseWheelHandler)
this._keyDownHandler = null
this._mouseWheelHandler = null
},
handleImgLoad(e) {
this.loading = false
},
handleImgError(e) {
this.loading = false
e.target.alt = "加载失败"
},
handleMouseDown(e) {
if (this.loading || e.button !== 0) return
const { offsetX, offsetY } = this.transform
const startX = e.pageX
const startY = e.pageY
this._dragHandler = rafThrottle((ev) => {
this.transform.offsetX = offsetX + ev.pageX - startX
this.transform.offsetY = offsetY + ev.pageY - startY
})
on(document, "mousemove", this._dragHandler)
on(document, "mouseup", (ev) => {
off(document, "mousemove", this._dragHandler)
})
e.preventDefault()
},
reset() {
this.transform = {
scale: 1,
deg: 0,
offsetX: 0,
offsetY: 0,
enableTransition: false
}
},
toggleMode() {
if (this.loading) return
const modeNames = Object.keys(Mode)
const modeValues = Object.values(Mode)
const index = modeValues.indexOf(this.mode)
const nextIndex = (index + 1) % modeNames.length
this.mode = Mode[modeNames[nextIndex]]
this.reset()
},
prev() {
if (this.isFirst && !this.infinite) return
const len = this.urlList.length
this.index = (this.index - 1 + len) % len
},
next() {
if (this.isLast && !this.infinite) return
const len = this.urlList.length
this.index = (this.index + 1) % len
},
handleActions(action, options = {}) {
if (this.loading) return
const { zoomRate, rotateDeg, enableTransition } = {
zoomRate: 0.2,
rotateDeg: 90,
enableTransition: true,
...options
}
const { transform } = this
switch (action) {
case "zoomOut":
if (transform.scale > 0.2) {
transform.scale = parseFloat(
(transform.scale - zoomRate).toFixed(3)
)
}
break
case "zoomIn":
transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3))
break
case "clocelise":
transform.deg += rotateDeg
break
case "anticlocelise":
transform.deg -= rotateDeg
break
}
transform.enableTransition = enableTransition
}
},
mounted() {
this.deviceSupportInstall()
// add tabindex then wrapper can be focusable via Javascript
// focus wrapper so arrow key can't cause inner scroll behavior underneath
this.$refs["el-image-viewer__wrapper"].focus()
}
}
</script>
...@@ -141,7 +141,7 @@ export const routerName = { ...@@ -141,7 +141,7 @@ export const routerName = {
{ {
authId: "9120507", authId: "9120507",
parentId: "91205", parentId: "91205",
label: "工资导入导出", label: "工资维护",
category: "Button", category: "Button",
type: "default", type: "default",
handle: "handleExportPerformance" handle: "handleExportPerformance"
......
...@@ -166,27 +166,27 @@ export default { ...@@ -166,27 +166,27 @@ export default {
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "mentorPhoneList" optionsName: "mentorPhoneList"
}, },
{ // {
label: "底薪", // label: "底薪",
name: "basicSalary", // name: "basicSalary",
type: "input", // type: "input",
width: "136px", // width: "136px",
inputFn: (e) => { // inputFn: (e) => {
e = e.replace(/[^\d.]/g, "") // e = e.replace(/[^\d.]/g, "")
let oldValue = `${this.infoForm["oldbasicSalary"]}` // let oldValue = `${this.infoForm["oldbasicSalary"]}`
this.$set( // this.$set(
this.infoForm, // this.infoForm,
"basicSalary", // "basicSalary",
limitPrice(e, oldValue, 6, 2, 0) // limitPrice(e, oldValue, 6, 2, 0)
) // )
this.$set( // this.$set(
this.infoForm, // this.infoForm,
"oldbasicSalary", // "oldbasicSalary",
this.infoForm["basicSalary"] // this.infoForm["basicSalary"]
) // )
}, // },
suffixSlot: "syncUnit" // suffixSlot: "syncUnit"
}, // },
// { // {
// label: '保底工资', // label: '保底工资',
// name: 'minimumSalary', // name: 'minimumSalary',
...@@ -200,27 +200,27 @@ export default { ...@@ -200,27 +200,27 @@ export default {
// }, // },
// suffixSlot: 'syncUnit' // suffixSlot: 'syncUnit'
// }, // },
{ // {
label: "绩效工资", // label: "绩效工资",
name: "performanceSalary", // name: "performanceSalary",
type: "input", // type: "input",
width: "136px", // width: "136px",
inputFn: (e) => { // inputFn: (e) => {
e = e.replace(/[^\d.]/g, "") // e = e.replace(/[^\d.]/g, "")
let oldValue = `${this.infoForm["oldperformanceSalary"]}` // let oldValue = `${this.infoForm["oldperformanceSalary"]}`
this.$set( // this.$set(
this.infoForm, // this.infoForm,
"performanceSalary", // "performanceSalary",
limitPrice(e, oldValue, 6, 2, 0) // limitPrice(e, oldValue, 6, 2, 0)
) // )
this.$set( // this.$set(
this.infoForm, // this.infoForm,
"oldperformanceSalary", // "oldperformanceSalary",
this.infoForm["performanceSalary"] // this.infoForm["performanceSalary"]
) // )
}, // },
suffixSlot: "syncUnit" // suffixSlot: "syncUnit"
}, // },
{ {
label: "业务标签", label: "业务标签",
name: "staffSceneLabel", name: "staffSceneLabel",
...@@ -264,9 +264,9 @@ export default { ...@@ -264,9 +264,9 @@ export default {
jobType: [ jobType: [
{ required: true, message: "请选择职级", trigger: ["blur", "change"] } { required: true, message: "请选择职级", trigger: ["blur", "change"] }
], ],
basicSalary: [ // basicSalary: [
{ required: true, message: "请输入基本工资", trigger: "blur" } // { required: true, message: "请输入基本工资", trigger: "blur" }
], // ],
staffSceneLabel: [ staffSceneLabel: [
{ {
required: true, required: true,
...@@ -394,8 +394,8 @@ export default { ...@@ -394,8 +394,8 @@ export default {
let obj = { let obj = {
jobType: "", jobType: "",
mentorPhone: "", mentorPhone: "",
basicSalary: "", // basicSalary: "",
performanceSalary: "", // performanceSalary: "",
merchantId: "", merchantId: "",
yqMerchantId: "" yqMerchantId: ""
} }
...@@ -581,8 +581,8 @@ export default { ...@@ -581,8 +581,8 @@ export default {
(item) => item.staffPhone == this.infoForm.mentorPhone (item) => item.staffPhone == this.infoForm.mentorPhone
)?.staffName || "", )?.staffName || "",
mentorPhone: this.infoForm.mentorPhone || "", mentorPhone: this.infoForm.mentorPhone || "",
basicSalary: this.infoForm.basicSalary, // basicSalary: this.infoForm.basicSalary,
performanceSalary: this.infoForm.performanceSalary || "", //去除保底工资 // performanceSalary: this.infoForm.performanceSalary || "", //去除保底工资
staffSceneLabel: this.infoForm.staffSceneLabel?.join(","), staffSceneLabel: this.infoForm.staffSceneLabel?.join(","),
merchantId: merchantId:
this.infoForm.merchantId == -1 ? "" : this.infoForm.merchantId, this.infoForm.merchantId == -1 ? "" : this.infoForm.merchantId,
......
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
!isEmpty(scope.row.actualBasicSalary) !isEmpty(scope.row.minimumSalary)
? `¥${scope.row.actualBasicSalary}` ? `¥${scope.row.minimumSalary}`
: "-" : "-"
}}</span> }}</span>
</template> </template>
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
!isEmpty(scope.row.actualPerformanceSalary) !isEmpty(scope.row.performanceSalary)
? `¥${scope.row.actualPerformanceSalary}` ? `¥${scope.row.performanceSalary}`
: "-" : "-"
}}</span> }}</span>
</template> </template>
...@@ -77,8 +77,8 @@ ...@@ -77,8 +77,8 @@
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
!isEmpty(scope.row.merchantCommission) !isEmpty(scope.row.commissionPrice)
? `¥${scope.row.merchantCommission}` ? `¥${scope.row.commissionPrice}`
: "-" : "-"
}}</span> }}</span>
</template> </template>
...@@ -110,15 +110,15 @@ ...@@ -110,15 +110,15 @@
<el-table-column align="center" label="递延金"> <el-table-column align="center" label="递延金">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
!isEmpty(scope.row.deferredPayment) !isEmpty(scope.row.defer)
? `${scope.row.deferredPayment > 0 ? "+" : "-"} ¥${Math.abs( ? `${scope.row.defer > 0 ? "+" : "-"} ¥${Math.abs(
scope.row.deferredPayment scope.row.defe
)}` )}`
: "-" : "-"
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center"> <!-- <el-table-column align="center">
<template slot="header"> <template slot="header">
<span>退单冲减</span> <span>退单冲减</span>
</template> </template>
...@@ -129,16 +129,16 @@ ...@@ -129,16 +129,16 @@
: "-" : "-"
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column align="center"> <el-table-column align="center">
<template slot="header"> <template slot="header">
<span>其他应发/应扣</span> <span>其他应发/应扣</span>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
!isEmpty(scope.row.otherDeduction) !isEmpty(scope.row.otherDetail)
? `${scope.row.otherDeduction < 0 ? "-" : ""} ¥${Math.abs( ? `${scope.row.otherDetail < 0 ? "-" : ""} ¥${Math.abs(
scope.row.otherDeduction scope.row.otherDetail
)}` )}`
: "-" : "-"
}}</span> }}</span>
...@@ -149,13 +149,13 @@ ...@@ -149,13 +149,13 @@
<span>合计应发工资</span> <span>合计应发工资</span>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.correct"> <span v-if="scope.row.correctSalary">
<span>{{ `¥${scope.row.correctSalary}` }}</span> <span>{{ `¥${scope.row.correctSalary}` }}</span>
<span class="change-flag">改</span> <span class="change-flag">改</span>
</span> </span>
<span v-else> <span v-else>
<span>{{ <span>{{
scope.row.correctSalary ? `¥${scope.row.correctSalary}` : "-" scope.row.salary ? `¥${scope.row.salary}` : "-"
}}</span> }}</span>
<span class="empty-flag"></span> <span class="empty-flag"></span>
</span> </span>
......
...@@ -3,8 +3,13 @@ ...@@ -3,8 +3,13 @@
<div> <div>
<d2-container> <d2-container>
<div class="header" slot="header" style="padding: 10px 20px"> <div class="header" slot="header" style="padding: 10px 20px">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth" <d2-search
:form-data="showFormData" /> ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
查询 查询
...@@ -16,7 +21,6 @@ ...@@ -16,7 +21,6 @@
<d2-table-header> <d2-table-header>
<span slot="left" class="left"> <span slot="left" class="left">
<auth-button category="Button" :show-btn-ids="['9120506']" /> <auth-button category="Button" :show-btn-ids="['9120506']" />
</span> </span>
<span style="display: inline-block; margin-right: 10px"> <span style="display: inline-block; margin-right: 10px">
<auth-button category="Button" :show-btn-ids="['9120513']" /> <auth-button category="Button" :show-btn-ids="['9120513']" />
...@@ -39,33 +43,66 @@ ...@@ -39,33 +43,66 @@
</span> </span>
<auth-button category="Button" :show-btn-ids="['9120507']" /> <auth-button category="Button" :show-btn-ids="['9120507']" />
</d2-table-header> </d2-table-header>
<span class="tips_text">仅展示「深圳嘀加」服务商的驻店员工,以及「广联数科」商户下员工</span> <span class="tips_text"
<d2-table ref="recordTable" class="inStoreTable" :get-list-api="getListApi" :search-form="searchFormSearch" >仅展示「深圳嘀加」服务商的驻店员工,以及「广联数科」商户下员工</span
:table-params="tableParams" :before-search-fn="beforeSearchFn"> >
<d2-table
ref="recordTable"
class="inStoreTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<!-- <auth-button :data="scope.scope" /> --> <!-- <auth-button :data="scope.scope" /> -->
<auth-button :data="scope.scope" :show-btn-ids="['9120505', '9120508']" /> <auth-button
:data="scope.scope"
:show-btn-ids="['9120505', '9120508']"
/>
</div> </div>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
<!-- 设备登录历史 --> <!-- 设备登录历史 -->
<login-history-dialog :login-history-visible="loginHistoryVisible" v-if="loginHistoryVisible" <login-history-dialog
@dialogClose="loginDialogClose" /> :login-history-visible="loginHistoryVisible"
v-if="loginHistoryVisible"
@dialogClose="loginDialogClose"
/>
<!-- 门店标签 --> <!-- 门店标签 -->
<flag-dialog :flag-visible="flagVisible" :info="recordInfo" v-if="flagVisible" @dialogClose="flagDialogClose" /> <flag-dialog
:flag-visible="flagVisible"
:info="recordInfo"
v-if="flagVisible"
@dialogClose="flagDialogClose"
/>
<!-- 创建员工 --> <!-- 创建员工 -->
<creat-staff-dialog :creat-staff-visible="creatStaffVisible" v-if="creatStaffVisible" <creat-staff-dialog
@dialogClose="creatStaffDialogClose" /> :creat-staff-visible="creatStaffVisible"
v-if="creatStaffVisible"
@dialogClose="creatStaffDialogClose"
/>
<!-- 工资导入导出 --> <!-- 工资导入导出 -->
<export-performance-dialog :export-performance-visible="exportVisible" v-if="exportVisible" <export-performance-dialog
@handleDownloadTemplate="handleDownloadTemplate" @dialogClose="exportDialogClose" @handleExport="handleExport" :export-performance-visible="exportVisible"
@handleImport="handleImport" /> v-if="exportVisible"
@handleDownloadTemplate="handleDownloadTemplate"
@dialogClose="exportDialogClose"
@handleExport="handleExport"
@handleImport="handleImport"
/>
<!-- 绩效工资扣减规则 --> <!-- 绩效工资扣减规则 -->
<performance-deduction-dialog :deduction-visible="deductionVisible" v-if="deductionVisible" <performance-deduction-dialog
@dialogClose="handleDeductionCloseDialog"></performance-deduction-dialog> :deduction-visible="deductionVisible"
v-if="deductionVisible"
@dialogClose="handleDeductionCloseDialog"
></performance-deduction-dialog>
<!-- 新增权限 --> <!-- 新增权限 -->
<PermissionDialog v-if="permissionVisible" :permissionVisible.sync="permissionVisible"></PermissionDialog> <PermissionDialog
v-if="permissionVisible"
:permissionVisible.sync="permissionVisible"
></PermissionDialog>
</div> </div>
</template> </template>
...@@ -78,7 +115,12 @@ import loginHistoryDialog from "./components/loginHistoryDialog" ...@@ -78,7 +115,12 @@ import loginHistoryDialog from "./components/loginHistoryDialog"
import creatStaffDialog from "./components/creatStaffDialog" import creatStaffDialog from "./components/creatStaffDialog"
import PermissionDialog from "./components/PermissionDialog" import PermissionDialog from "./components/PermissionDialog"
import exportPerformanceDialog from "./components/exportPerformanceDialog" import exportPerformanceDialog from "./components/exportPerformanceDialog"
import { getResidentListApi, importStaffSalaryApi } from "@api/resident" import {
getResidentListApi,
importStaffSalaryApi,
getLeaderList,
staffBaseInfoPageList
} from "@api/resident"
import { filterStr } from "./util.js" import { filterStr } from "./util.js"
import DeductionDialog from "./components/deductionDialog.vue" import DeductionDialog from "./components/deductionDialog.vue"
import PerformanceDeductionDialog from "./components/performanceDeductionDialog.vue" import PerformanceDeductionDialog from "./components/performanceDeductionDialog.vue"
...@@ -106,7 +148,8 @@ export default { ...@@ -106,7 +148,8 @@ export default {
hireType: "", hireType: "",
jobType: "", jobType: "",
workingStatus: "", workingStatus: "",
createdSource: "" createdSource: "",
directLeaderPhone: ""
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [ showFormData: [
...@@ -180,6 +223,26 @@ export default { ...@@ -180,6 +223,26 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "createdSourceList" optionsName: "createdSourceList"
},
{
label: "上级领导",
name: "directLeaderPhone",
type: "select",
isClear: true,
optionList: [],
optionId: "directLeaderPhone",
optionLabel: "directLeaderName",
optionsName: "directLeaderList"
},
{
label: "工资绩效",
name: "directLeaderPhone",
type: "select",
isClear: true,
optionList: [],
optionId: "directLeaderPhone",
optionLabel: "directLeaderName",
optionsName: "directLeaderList"
} }
], ],
getListApi: getResidentListApi, getListApi: getResidentListApi,
...@@ -235,8 +298,8 @@ export default { ...@@ -235,8 +298,8 @@ export default {
return cellValue.hireType == 1 return cellValue.hireType == 1
? "校招管培生" ? "校招管培生"
: cellValue.hireType == 2 : cellValue.hireType == 2
? "社会招聘" ? "社会招聘"
: "-" : "-"
} }
}, },
{ {
...@@ -268,6 +331,13 @@ export default { ...@@ -268,6 +331,13 @@ export default {
} }
}, },
{ {
label: "上级领导",
prop: "directLeaderName",
formatter: (cellValue) => {
return cellValue.directLeaderName || "-"
}
},
{
label: "创建时间", label: "创建时间",
prop: "createdDate", prop: "createdDate",
formatter: (cellValue) => { formatter: (cellValue) => {
...@@ -293,8 +363,8 @@ export default { ...@@ -293,8 +363,8 @@ export default {
return cellValue.workingStatus == 0 return cellValue.workingStatus == 0
? "在职" ? "在职"
: cellValue.workingStatus == 1 : cellValue.workingStatus == 1
? "离职" ? "离职"
: "-" : "-"
}, },
className: (cellValue) => { className: (cellValue) => {
return { return {
...@@ -306,6 +376,7 @@ export default { ...@@ -306,6 +376,7 @@ export default {
] ]
}, },
baseData: { baseData: {
directLeaderList: [],
staffSceneLabelList: [ staffSceneLabelList: [
{ {
confId: 1, confId: 1,
...@@ -376,7 +447,13 @@ export default { ...@@ -376,7 +447,13 @@ export default {
async getBaseData() { async getBaseData() {
this.getOptionsList() this.getOptionsList()
}, },
//上级领导列表查询
getLeaderList() {
getLeaderList().then((res) => {
this.baseData.directLeaderList = res.data
this.getOptionsList()
})
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
...@@ -390,7 +467,7 @@ export default { ...@@ -390,7 +467,7 @@ export default {
if ( if (
this.baseData[item.optionsName].length && this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][ this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel this.showFormData[index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
const temp = {} const temp = {}
......
<!-- 审批记录 -->
<template>
<div class="container m-t-40">
<d2-table
ref="table"
:has-num="false"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
<template slot="brand" slot-scope="scope">
<template v-if="scope.scope.brand && scope.scope.brand.length > 20">
<el-popover
placement="top"
width="300"
popper-class="brand_popver"
trigger="hover"
>
<div class="brand-box">
{{ brandFilter(scope.scope) }}
</div>
<div slot="reference">
{{ brandFilter(scope.scope, 30) }}
</div>
</el-popover>
</template>
<span v-else>{{ scope.scope.brand || "-" }}</span>
</template>
<!-- 状态 -->
<div slot="statusHtml" slot-scope="scope">
<div
class="online-status"
v-if="scope.scope.status === 0 || scope.scope.status"
>
<span
class="dot"
:style="{
background: getStatusColor(
scope && scope.scope && scope.scope.status,
'statusTypeOptMap'
)
}"
></span>
{{ getStatusItem(baseData, "statusList", scope.scope, "status") }}
</div>
<span v-else>-</span>
</div>
<div slot="auth-button" slot-scope="scope">
<!-- 编辑 -->
<span style="margin-right: 10px">
<el-button type="text" @click="handleDetail(scope.scope)"
>查看</el-button
>
</span>
</div>
</d2-table>
<detail-dialog
v-if="detailVisible"
:detailVisible="detailVisible"
:id="id"
@dialogClose="handleDetailClose"
></detail-dialog>
</div>
</template>
<script>
import {
getStoreSalaryListApi,
editStoreSalaryStatusApi,
deleteStoreSalaryApi,
copyPerformanceApi
} from "@api/resident"
import { Util, deepClone, getStatusItem, getStatusColor } from "@/common/util"
import detailDialog from "./approvalView.vue"
export default {
components: {
detailDialog
},
data() {
return {
id: "1",
detailVisible: false,
getStatusColor,
getStatusItem,
searchFormSearch: {},
getListApi: getStoreSalaryListApi,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "提成方案名称",
prop: "schemeNames",
width: "250"
},
{
label: "门店名称",
prop: "merchantName"
},
{
label: "品牌",
prop: "brand",
width: "200",
addHtml: "brand"
},
{
label: "业务",
prop: "businessType",
formatter: (cellValue) => {
return this.getStatusItem(
this.baseData,
"businessTypeOpts",
cellValue,
"businessType"
)
}
},
{
label: "状态",
prop: "status",
minWidth: 120,
addHtml: "statusHtml"
},
{
label: "提交时间",
prop: "submitDate",
formatter: (cellValue) => {
return Util.dateFormate(
cellValue.submitDate,
"YYYY-MM-DD HH:mm:ss"
)
},
width: "150px"
},
{
label: "审批时间",
prop: "approveDate",
formatter: (cellValue) => {
return Util.dateFormate(
cellValue.approveDate,
"YYYY-MM-DD HH:mm:ss"
)
},
width: "150px"
},
{
label: "生效月份",
prop: "effectiveMonth",
formatter: (cellValue) => {
// 生效月份(格式:yyyy-MM)转成2026年1月
if (!cellValue.effectiveMonth) return "-"
const [year, month] = cellValue.effectiveMonth.split("-")
return `${year}年${parseInt(month)}月`
},
width: 120
}
]
}
}
},
props: {
searchForm: {
type: Object,
default: () => {}
},
baseData: {
type: Object,
default: () => {}
}
},
mounted() {},
methods: {
handleDetailClose() {
this.detailVisible = !this.detailVisible
},
handleDetail(data) {
// console.log(data)
// this.id = data.id
this.detailVisible = !this.detailVisible
console.log(this.detailVisible)
},
keyDowmGetList() {
this.$refs.table.refreshTable(true, true)
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = {
...this.searchForm
}
resolve()
})
},
brandFilter(ele, lenght) {
if (ele.brand) {
return lenght
? ele.brand?.length > lenght
? ele.brand.substring(0, lenght) + "\u2026"
: ele.brand.substring(0, lenght)
: ele.brand
} else {
return "-"
}
},
getOptions() {
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.showFormData[index].optionList = this.baseData[item.optionsName]
}
})
},
// 编辑方案
handleToEdit(row) {
this.close({ tagName: "/performanceScheme" })
this.$router.push({
path: "/performanceScheme",
query: {
addOrEdit: "edit",
params: JSON.stringify(row)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
.container {
margin-top: 8px;
}
.brand-box {
font-size: 12px;
padding: 10px;
box-sizing: border-box;
}
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
}
</style>
<style>
.brand_popver {
height: auto !important;
max-height: 200px;
overflow: auto !important;
min-height: 0;
padding: 0 !important;
box-sizing: border-box;
}
</style>
<!-- 详情 -->
<template>
<baseDialog
:dialog-config="dialogConfig"
:config="config"
:is-show.sync="visible"
class="accountDailog"
>
<div class="sun-dialog" v-loading="loading">
<div class="approve-info">
提交后经由嘀加企微,推送到审批人<span>王强1376013790</span>,抄送人<span>于长红13652364839</span>,审批人通过方案后,方案正式生效
</div>
<template v-if="detailInfo">
<detailComp
:configData="configData"
:detailInfo="detailInfo"
></detailComp>
</template>
</div>
</baseDialog>
</template>
<script>
import { interviewResultOpt, processResultOpt } from "@/common/constants.js"
import {
getConfigApprovetDetail,
getApproveConfig
} from "@/api/salaryManagement.js"
import detailComp from "./detailComp.vue"
import { Util, deepClone, getStatusItem } from "@/common/util"
export default {
name: "approvalView",
components: {
detailComp
},
data() {
return {
detailInfo: {},
approveConfigData: [],
getStatusItem,
rules: {},
dialogConfig: {
title: "审批查看",
width: "1080px"
},
config: {
isShowFooter: false
},
loading: false,
isShow: true,
configData: [
{
infoData: [
{
title: "提成方案名称",
key: "schemeName",
col: 24
},
{
title: "生效月份",
key: "effectiveMonth",
col: 24
},
{
title: "变更、新增方案说明",
key: "interviewResult",
col: 24
},
{
title: "附图说明",
key: "description",
type: "imgList",
col: 24
},
{
title: "审批人",
key: "processorName",
col: 12
},
{
title: "审批意见",
key: "processorName",
col: 12
},
{
title: "审批人",
key: "processorName",
col: 12
},
{
title: "审批意见",
key: "processorName",
col: 12
},
{
title: "查阅人",
key: "processorName",
isHidden: false,
col: 24
},
{
title: "查阅人",
key: "processorName",
col: 24
}
]
}
],
baseData: {
interviewResultOpt,
processResultOpt
}
}
},
props: {
detailVisible: {
type: Boolean,
default: false
},
id: {
type: String,
default: ""
}
},
computed: {
visible: {
get() {
return this.detailVisible
},
set(newVal) {
this.$emit("dialogClose", { flag: newVal, attrName: "detailVisible" })
}
}
},
watch: {
detailVisible: {
handler(val) {
console.log(val)
this.getDetail()
this.getApproveConfig()
}
}
},
created() {},
mounted() {},
methods: {
getDetail() {
getConfigApprovetDetail({ id: this.id }).then((res) => {
this.detailInfo = res
})
},
getApproveConfig() {
getApproveConfig().then((res) => {
this.approveConfigData = res
})
},
handleClose() {
console.log("handleClose")
}
}
}
</script>
<style lang="scss" scoped>
@import "./detail.scss";
::v-deep .el-dialog__body {
padding: 12px 20px !important;
}
::v-deep .el-dialog__footer {
border-top: 1px solid #e5e5e5;
padding: 14px 20px !important;
}
::v-deep .el-dialog__header {
padding: 16px 20px !important;
color: #333333;
font-size: 20px;
font-weight: bold;
}
.operation-wrapper {
background: #fafafa;
padding: 0 20px;
margin-top: -20px;
.operateTitle {
color: #333333;
font-size: 16px;
padding: 13.5px 0;
font-weight: bold;
border-bottom: 1px solid #e5e5e5;
}
.list-item {
margin: 20px;
display: flex;
align-items: center;
gap: 0 40px;
color: #333333;
font-size: 14px;
.name {
width: 144px;
font-weight: 600;
}
.user {
width: 200px;
}
&:last-of-type {
padding-bottom: 20px;
}
}
}
.sun-dialog {
min-height: 200px;
.approve-info {
color: #666666;
font-size: 14px;
font-weight: 400;
span {
color: #2a58ad;
margin: 0 4px;
}
}
}
</style>
<!-- 提成方案配置 --> <!-- 提成方案配置 -->
<template> <template>
<d2-container class="rewardPool-list m-t-40"> <d2-container class="rewardPool-list m-t-40">
<d2-table <div class="d2-container-content">
ref="commissionTable" <d2-table-header>
:search-form="searchFormSearch" <span>
:table-params="tableParams" <el-button type="primary" @click="handleAdd">新增提成方案</el-button>
:get-list-api="getListApi" </span>
:before-search-fn="beforeSearchFn" </d2-table-header>
> <d2-table
<div slot="auth-button" slot-scope="scope"> ref="commissionTable"
<auth-button :data="scope.scope" :show-btn-ids="['9121209']" /> :search-form="searchFormSearch"
</div> :table-params="tableParams"
</d2-table> :get-list-api="getListApi"
>
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleParameter(scope.scope)"
>调整参数</el-button
>
</div>
</d2-table>
</div>
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { Util, deepClone } from "@/common/util" import { getStoreSalaryListApi } from "@api/resident"
import { getIncentivePoolStatisticsApi } from "@api/resident" import { Util, deepClone, getStatusItem } from "@/common/util"
import { getConfigList } from "@api/salaryManagement"
import { outputValue_businessOpt } from "@/common/constants"
export default { export default {
name: "commissionPlanList", name: "commissionPlanList",
data() { data() {
return { return {
getStatusItem,
getListApi: getStoreSalaryListApi,
tableParams: {
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "提成方案名称",
prop: "schemeName"
},
{
label: "业务",
prop: "businessType",
formatter: (cellValue) => {
return this.getStatusItem(
this.baseData,
"businessTypeOpts",
cellValue,
"businessType"
)
}
},
{
label: "应用门店数",
prop: "applicationQuantity",
formatter: (cellValue) => {
return cellValue.applicationQuantity ||
cellValue.applicationQuantity === 0
? cellValue.applicationQuantity
: "-"
}
},
{
label: "生效月份",
prop: "effectiveMonth",
formatter: (cellValue) => {
// 生效月份(格式:yyyy-MM)转成2026年1月
// 生效月份(格式:yyyy-MM)转成2026年1月
if (!cellValue.effectiveMonth) return "-"
const [year, month] = cellValue.effectiveMonth.split("-")
return `${year}年${parseInt(month)}月`
},
width: 120
},
{
label: "更新时间",
prop: "updatedDate",
formatter: (cellValue) => {
return Util.dateFormate(
cellValue.updatedDate,
"YYYY-MM-DD HH:mm:ss"
)
},
width: "150px"
}
]
},
baseData: { baseData: {
jobTypeList: deepClone(staffLevelList) businessTypeOpt: deepClone(outputValue_businessOpt)
}, },
copyShowFormData: [], searchFormSearch: {}
staticData: {}
} }
}, },
mounted() {}, mounted() {},
methods: {} methods: {
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.commissionTable.refreshTable(true, true)
},
// 新增提成方案
handleAdd() {},
//调整参数
handleParameter(data) {}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.month-class { .month-class {
width: 100% !important; width: 100% !important;
} }
.rewardPool-list {
// background: #fff;
// padding: 20px;
}
.m-t-40 { .m-t-40 {
margin-top: 40px; margin-top: 40px;
::v-deep .el-tabs__header { ::v-deep .el-tabs__header {
......
.info-wrapper {
background-color: #fff;
margin: 0 20px;
.item {
margin-bottom: 20px;
.title {
color: #333333;
font-size: 16px;
font-weight: bold;
padding: 13.5px 20px;
border-bottom: 1px solid #e5e5e5;
line-height: 23px;
box-sizing: border-box;
}
.form_div {
color: #333333;
padding: 20px;
font-size: 14px;
.edit-sub-block {
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
::v-deep .el-form-item__label {
color: #666666;
font-size: 14px;
line-height: 20px;
white-space: nowrap;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-col {
margin-bottom: 20px;
}
::v-deep .el-form-item__content {
width: calc(100% - 150px);
word-break: break-all;
line-height: 20px;
}
::v-deep el-form-item--medium .el-form-item__label {
line-height: 20px;
}
}
.unit {
margin-left: 8px;
flex-shrink: 0;
line-height: 32px;
}
.edit-sub-block-two {
.el-form-item {
margin-bottom: 0px;
}
}
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.photo-box {
display: flex;
align-items: center;
::v-deep .photo-activity {
width: 100%;
height: 100%;
object-fit: contain;
position: static !important;
border-radius: 4px;
}
::v-deep .video-poster {
position: absolute;
width: 104px;
height: 104px;
object-fit: fill;
top: 0;
right: 0;
left: 0;
bottom: 0;
border-radius: 4px;
}
::v-deep .mask {
border-radius: 4px;
}
::v-deep .pic-box {
margin-right: 16px;
.video-poster {
width: 90px;
height: 90px;
}
}
}
}
}
}
<template>
<div class="info-wrapper">
<div class="item" v-for="(item, index) in configData" :key="index">
<div class="title" v-if="item.title">{{ item.title }}</div>
<div class="detail-content">
<div class="form_div" v-if="item.infoData && item.infoData.length">
<el-form
:ref="item.childRef"
class="edit-sub-block"
label-width="150px"
:inline="true"
:model="detailInfo"
:rules="rules"
>
<el-row :gutter="20">
<template v-for="(item, key) in item.infoData">
<template v-if="item.isHidden ? !item.isHidden : true">
<el-col :span="item.col ? item.col : 12" :key="key">
<el-form-item :label="item.title + ':'" :prop="item.key">
<template v-if="item.type == 'imgList'">
<div
class="photo-box"
v-if="
detailInfo[item.key] && detailInfo[item.key].length
"
>
<glsx-preview
:image-url-arr="
detailInfo[item.key] ? detailInfo[item.key] : []
"
:videoImg="true"
:picOptions="{
...picOptions,
type: item.otherType
}"
limit="1"
></glsx-preview>
</div>
<template v-else> - </template>
</template>
<template v-else-if="item.isEdit">
<template v-if="item.type == 'input'">
<el-input
v-model="detailInfo[item.key]"
:placeholder="`请输入${item.label}`"
:maxlength="item.maxLength || ''"
size="small"
class="edit-form-item"
></el-input>
</template>
<template v-else-if="item.type == 'date'">
<el-date-picker
v-model="detailInfo[item.key]"
type="date"
:placeholder="item.label"
size="small"
class="edit-form-item"
:picker-options="item.pickerOptions"
>
</el-date-picker>
</template>
<template v-else-if="item.type == 'textarea'">
<el-input
type="textarea"
:rows="3"
placeholder="请输入"
v-model="detailInfo[item.key]"
:maxlength="item.maxLength"
class="edit-form-item"
>
</el-input>
</template>
<template v-else-if="item.type == 'select'">
<el-select
v-model="detailInfo[item.key]"
:placeholder="`请选择${item.label}`"
size="small"
class="edit-form-item"
>
<el-option
v-for="item in item.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</template>
</template>
<template v-else>
<div class="flex">
<div
v-if="item.className && item.className(detailInfo)"
:style="{
background: item.className(detailInfo)
}"
:class="'dot'"
></div>
<el-tooltip
v-if="item.hasTooltip"
effect="dark"
placement="top-start"
>
<div slot="content" class="tooltip-content">
{{
item.formatter
? item.formatter(detailInfo) || "-"
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</div>
<span :style="{ ...item.style }">
{{
item.formatter
? item.formatter(detailInfo) || "-"
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</span>
</el-tooltip>
<span v-else :style="{ ...item.style }"
>{{
item.formatter
? item.formatter(detailInfo) || "-"
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</span>
<template v-if="item.suffixText">
<div class="unit">
{{ item.suffixText }}
</div>
</template>
</div>
</template>
</el-form-item></el-col
>
</template>
</template>
</el-row>
</el-form>
</div>
</div>
<template v-if="item.subTitle">
<div v-for="signIndex in item.sign" :key="signIndex">
<div class="subtitle">{{ item.subTitle }}{{ signIndex }}</div>
<div class="detail-content">
<div class="form_div" v-if="item.subData && item.subData.length">
<el-form
class="edit-sub-block"
label-width="150px"
:inline="true"
>
<el-row :gutter="20">
<template v-for="(item, key) in item.subData">
<el-col :span="item.col ? item.col : 12" :key="key">
<el-form-item :label="item.title + ':'">
<div
v-if="item.className && item.className(detailInfo)"
:style="{
background: item.className(detailInfo)
}"
:class="'dot'"
></div>
<template>
{{
item.formatter
? item.formatter(detailInfo) || "-"
: detailInfo[item.key]
? detailInfo[item.key]
: "-"
}}
</template>
</el-form-item></el-col
>
</template>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
</div>
</div>
</template>
<script>
export default {
props: {
configData: {
type: Array,
default: () => []
},
detailInfo: {
type: Object,
default: () => {}
}
},
data() {
return {
videoStr: "?x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast",
picOptions: {
width: "90px",
height: "90px",
isClose: false
},
rules: {}
}
}
}
</script>
<style scoped lang="scss">
@import "./detail.scss";
.tooltip-content {
max-height: 300px;
overflow-y: scroll !important;
}
</style>
<!-- 门店提成方案 -->
<template>
<div class="container">
<d2-table
ref="table"
:has-num="false"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
<template slot="brand" slot-scope="scope">
<template v-if="scope.scope.brand && scope.scope.brand.length > 20">
<el-popover
placement="top"
width="300"
popper-class="brand_popver"
trigger="hover"
>
<div class="brand-box">
{{ brandFilter(scope.scope) }}
</div>
<div slot="reference">
{{ brandFilter(scope.scope, 30) }}
</div>
</el-popover>
</template>
<span v-else>{{ scope.scope.brand || "-" }}</span>
</template>
<div slot="auth-button" slot-scope="scope">
<!-- 编辑 -->
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9121202']" />
</span>
</div>
</d2-table>
</div>
</template>
<script>
import {
getStoreSalaryListApi,
editStoreSalaryStatusApi,
deleteStoreSalaryApi,
copyPerformanceApi
} from "@api/resident"
import { deepClone, getStatusItem } from "@/common/util"
export default {
data() {
return {
getStatusItem,
searchFormSearch: {},
getListApi: getStoreSalaryListApi,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "门店名称",
prop: "merchantName"
},
{
label: "品牌",
prop: "brand",
width: "200",
addHtml: "brand"
},
{
label: "提成方案名称",
prop: "schemeNames"
},
{
label: "适配业务",
prop: "businessType",
formatter: (cellValue) => {
return this.getStatusItem(
this.baseData,
"businessTypeOpts",
cellValue,
"businessType"
)
}
}
]
}
}
},
props: {
searchForm: {
type: Object,
default: () => {}
},
baseData: {
type: Object,
default: () => {}
}
},
mounted() {},
methods: {
keyDowmGetList() {
this.$refs.table.refreshTable(true, true)
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = {
...this.searchForm
}
resolve()
})
},
brandFilter(ele, lenght) {
if (ele.brand) {
return lenght
? ele.brand?.length > lenght
? ele.brand.substring(0, lenght) + "\u2026"
: ele.brand.substring(0, lenght)
: ele.brand
} else {
return "-"
}
},
getOptions() {
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.showFormData[index].optionList = this.baseData[item.optionsName]
}
})
},
// 编辑方案
handleToEdit(row) {
this.close({ tagName: "/performanceScheme" })
this.$router.push({
path: "/performanceScheme",
query: {
addOrEdit: "edit",
params: JSON.stringify(row)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.m-t-40 {
margin-top: 40px;
}
.container {
margin-top: 8px;
}
.brand-box {
font-size: 12px;
padding: 10px;
box-sizing: border-box;
}
</style>
<style>
.brand_popver {
height: auto !important;
max-height: 200px;
overflow: auto !important;
min-height: 0;
padding: 0 !important;
box-sizing: border-box;
}
</style>
<!-- 工资绩效 --> <!-- 工资绩效 -->
<template> <template>
<div class="performance-list-wrap"> <div class="performance-list-wrap">
<div class="header" slot="header" style="background: #e7eaec"> <div class="header" slot="header">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane <el-tab-pane
v-for="(item, index) in tabPaneList" v-for="(item, index) in tabPaneList"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!