Commit fe9a41e3 by wangzhihui

Merge branch 'SAAS+V4.52.0-0429' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.52.0-0429
2 parents 5cb6ac9e ba17b640
......@@ -488,3 +488,21 @@ export function updateTmlpStaffItem(data) {
data.method = `${path2}digital.management.staff.item.update`
return request(data, 'post')
}
/**
* 打卡申诉列表
*/
export function getClockSalaryList(data = {}) {
data.method = 'dj.api.smartcarlife.clock.in.staff.appeal.list'
return request(data, 'post')
}
/**
* 打卡申诉列表导出
*/
export function exportClockSalaryList(data = {}) {
data.method = 'dj.api.smartcarlife.clock.in.staff.appeal.list.export'
return request(data, 'post')
}
\ No newline at end of file
......@@ -177,7 +177,15 @@ export const routerName = {
parentId: "91205",
label: "提成构成",
handle: "handleSalaryDetail"
}
},
{
authId: "9120511",
parentId: "91205",
category: "Button",
type: "default",
label: "考勤/工资申诉",
handle: "handleClockSalaryIndex"
},
],
component: _import("residentManage/inStoreManage/inStoreControlList")
},
......
<template>
<div class="layout">
<div class="header">
<d2-search
ref="showSearch"
:search-form="searchForm"
:form-data="showFormData"
label-width="100px"
:selectPopperAppendToBody="false"
class="d2-search"
>
</d2-search>
<div class="up-btns">
<el-button
:id="tableParams.btnId"
size="small"
type="primary"
@click="search"
>
查询
</el-button>
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
</div>
</div>
<div class="content">
<div class="top">
<div class="title">申诉记录</div>
<el-button
size="small"
type="primary"
@click="handleExport"
class="exprot"
>
导出
</el-button>
</div>
<d2-table
ref="detailListTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
</d2-table>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import { Util, deepClone, downLoadFile } from '@/common/util'
import { getClockSalaryList, exportClockSalaryList } from '@api/resident'
import dayjs from 'dayjs'
export default {
name: '',
components: {
},
data () {
return {
searchForm: {
appealType: '',
commitTime: [dayjs().startOf('month').toDate(), dayjs().toDate()]
},
searchFormSearch: {},
showFormData: [
{
label: '申诉类型',
name: 'appealType',
type: 'select',
optionList: [
{ value: '', name: '全部' },
{ value: 2, name: '考勤申诉' },
{ value: 3, name: '工资申诉' },
],
optionId: 'value',
optionLabel: 'name',
},
{
label: "提交时间",
name: "commitTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
}
],
getListApi: getClockSalaryList,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '姓名',
prop: 'staffName',
minWidth: '150'
}, {
label: '手机号',
prop: 'staffPhone',
minWidth: '100'
}, {
label: '适配业务',
prop: 'ruleType',
minWidth: '100'
}, {
label: '服务门店',
prop: 'updatedDate',
minWidth: '180',
formatter: (cellValue) => {
var dataHtml = ''
return dataHtml
}
}, {
label: '申诉类型',
prop: 'supervisor',
minWidth: '150'
}, {
label: '申诉时间',
prop: 'createdTime',
minWidth: '150',
formatter: (cellValue) => {
return Util.dateFormate(cellValue.createdTime, 'YYYY-MM-DD HH:mm:ss')
}
}, {
label: '申诉说明',
prop: 'supervisor',
minWidth: '150'
}, {
label: '下次跟进时间',
prop: 'nextFollowTime',
minWidth: '150',
formatter: (cellValue) => {
return Util.dateFormate(cellValue.nextFollowTime, 'YYYY-MM-DD HH:mm')
}
}
]
},
}
},
mounted () {
},
methods: {
initDate () {
},
beforeSearchFn () {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.commitTime.length) {
let [commitTimeStart, commitTimeEnd] = this.searchFormSearch.commitTime
this.searchFormSearch.commitTimeStart = `${this.formatDate(commitTimeStart)} 00:00:00`
this.searchFormSearch.commitTimeEnd = `${this.formatDate(commitTimeEnd)} 23:59:59`
delete this.searchFormSearch.commitTime
}
resolve()
})
},
formatDate (date) {
return dayjs(date).format("YYYY-MM-DD")
},
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.$refs.timeRef.handleReset()
this.$nextTick(() => this.search())
},
handleExport () {
var params = this.searchForm
exportClockSalaryList(params).then((res) => {
res && downLoadFile(res)
})
},
}
}
</script>
<style scoped lang='scss'>
.layout {
height: 100%;
padding: 0 20px;
overflow-y: auto;
.header {
background: #fff;
position: sticky;
top: 0;
z-index: 9;
}
.up-btns {
padding-bottom: 22px;
}
.d2-search {
::v-deep.el-select-dropdown,
.el-popper {
width: 300px !important;
}
}
.content {
padding: 0 20px;
background: #fff;
margin-top: 14px;
.top {
height: 52px;
color: #333333;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
.exprot {
margin-left: auto;
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="layout">
<div class="tab"
ref="tabbox">
<div :class="['tab-item', { 'item-active': windowId == -1 }]"
@click="windowId = -1">
<div
class="tab"
ref="tabbox"
>
<div
:class="['tab-item', { 'item-active': windowId == -1 }]"
@click="windowId = -1"
>
驻店管理
</div>
<template v-for="(i, index) in tab">
<template>
<div :key="i.id"
:class="['tab-item', { 'item-active': windowId == i.id }]"
@click="windowId = i.id"
:ref="`tab-${index}`">
<div
:key="i.id"
:class="['tab-item', { 'item-active': windowId == i.id }]"
@click="windowId = i.id"
:ref="`tab-${index}`"
>
{{ i.text }}
<div class="close"
@click.stop="close(index)">
<div
class="close"
@click.stop="close(index)"
>
<i class="el-icon-close"></i>
</div>
</div>
......@@ -22,20 +30,26 @@
</template>
<template v-if="dropdownList.length">
<div class="arrow-box">
<el-dropdown trigger="click"
@command="windowId = $event">
<el-dropdown
trigger="click"
@command="windowId = $event"
>
<div class="dropdown-link">
<i class="el-icon-arrow-down"></i>
</div>
<el-dropdown-menu slot="dropdown">
<template v-for="(i, index) in dropdownList">
<el-dropdown-item :class="{ 'dropdown-item-active': windowId == i.id }"
:key="i.id"
:command="i.id">
<el-dropdown-item
:class="{ 'dropdown-item-active': windowId == i.id }"
:key="i.id"
:command="i.id"
>
<div class="dropdown-item">
{{ i.text }}
<div class="close"
@click.stop="closeDrop(index)">
<div
class="close"
@click.stop="closeDrop(index)"
>
<i class="el-icon-close"></i>
</div>
</div>
......@@ -47,30 +61,38 @@
</template>
</div>
<div class="content">
<InStoreManageIndex v-show="windowId == -1"
ref="inStoreManageIndex"
@openWindow="openWindow" />
<InStoreManageIndex
v-show="windowId == -1"
ref="inStoreManageIndex"
@openWindow="openWindow"
/>
<template v-for="i in [...tab, ...dropdownList]">
<staffInfo :ref="`recep-${i.id}`"
:key="i.id"
v-show="windowId == i.id"
:query-data="i.data"
@backIndex="backIndex" />
<component
:ref="`page-${i.id}`"
:key="i.id"
:is="i.component"
v-show="windowId == i.id"
:show="windowId == i.id"
:query-data="i.data"
@backIndex="backIndex"
/>
</template>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import clockSalaryIndex from './components/clockSalaryIndex/index'
import InStoreManageIndex from "./index"
import staffInfo from "./staffInfo"
export default {
name: "",
components: {
InStoreManageIndex,
staffInfo
staffInfo,
clockSalaryIndex
},
data() {
data () {
return {
tab: [],
dropdownList: [],
......@@ -79,37 +101,42 @@ export default {
}
},
// 在beforeDestroy钩子中移除事件监听
beforeDestroy() {
beforeDestroy () {
window.removeEventListener('popstate', this.preventBack)
},
// 在你的Vue组件的mounted钩子中添加事件监听
mounted() {
mounted () {
history.pushState(null, null, document.URL)
window.addEventListener('popstate', this.preventBack)
if (this.tabboxWidth == 0) this.tabboxWidth = this.$refs.tabbox.offsetWidth
},
methods: {
preventBack() {
preventBack () {
if (this.windowId !== -1) {
const [recep] = this.$refs[`recep-${this.windowId}`]
const [recep] = this.$refs[`page-${this.windowId}`]
if (recep && recep.isQualityVisible) recep.isQualityVisible = false
else this.windowId = -1
history.pushState(null, null, document.URL)
} else this.$router.go(-1)
},
openWindow(data) {
const id = `${data.staffName}_${data.phoneNumber}`
openWindow (data) {
const id = data.pageId ? data.pageId : `${data.staffName}_${data.phoneNumber}`
const windowList = [...this.tab, ...this.dropdownList]
const windowItem = windowList.find((e) => e.id == id)
let component = 'staffInfo',
title = data.staffName || '-'
if (data.componentName) component = data.componentName
if (data.title) title = data.title
if (windowItem) {
this.$refs[`recep-${id}`]?.[0]?.setActiveName(data)
this.$refs[`page-${id}`]?.[0]?.setActiveName && this.$refs[`page-${id}`]?.[0]?.setActiveName(data)
return this.windowId = id
}
if (windowList.length == 20) return this.$message.error("最多同时打开20个tabs")
const item = {
text: data.staffName || '-',
text: title,
data,
id
id,
component
}
if (this.dropdownList.length) this.dropdownList.push(item)
else {
......@@ -118,7 +145,7 @@ export default {
}
this.windowId = id
},
close(index) {
close (index) {
this.tab.splice(index, 1)
if (this.dropdownList.length) {
this.tab.push(this.dropdownList[0])
......@@ -127,10 +154,10 @@ export default {
this.windowId = -1
this.checkEl()
},
closeDrop(index) {
closeDrop (index) {
this.dropdownList.splice(index, 1)
},
checkEl() {
checkEl () {
const { tab, tabboxWidth } = this
const len = tab.length - 1
this.$nextTick(() => {
......@@ -145,7 +172,7 @@ export default {
})
},
backIndex() {
backIndex () {
this.windowId = -1
this.$refs['inStoreManageIndex']?.handleSearch()
}
......
......@@ -26,6 +26,9 @@
<auth-button category="Button" :show-btn-ids="['9120506']" />
<span class="tips_text">仅展示「深圳嘀加」服务商的驻店员工,以及「广联数科」商户下员工</span>
</span>
<span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120511']" />
</span>
<span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120504']" />
</span>
......@@ -582,6 +585,16 @@ export default {
handleHistoryPerformance(row) {
row.activeName = 'historyPerformance'
this.$emit("openWindow", row)
},
/**
* 考勤/工资申诉
*/
handleClockSalaryIndex(){
this.$emit("openWindow", {
pageId:'clockSalaryIndex',
componentName:'clockSalaryIndex',
title:'考勤/工资申诉'
})
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!