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) { ...@@ -488,3 +488,21 @@ export function updateTmlpStaffItem(data) {
data.method = `${path2}digital.management.staff.item.update` data.method = `${path2}digital.management.staff.item.update`
return request(data, 'post') 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 \ No newline at end of file
...@@ -177,7 +177,15 @@ export const routerName = { ...@@ -177,7 +177,15 @@ export const routerName = {
parentId: "91205", parentId: "91205",
label: "提成构成", label: "提成构成",
handle: "handleSalaryDetail" handle: "handleSalaryDetail"
} },
{
authId: "9120511",
parentId: "91205",
category: "Button",
type: "default",
label: "考勤/工资申诉",
handle: "handleClockSalaryIndex"
},
], ],
component: _import("residentManage/inStoreManage/inStoreControlList") 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 \ No newline at end of file
<template> <template>
<div class="layout"> <div class="layout">
<div class="tab" <div
ref="tabbox"> class="tab"
<div :class="['tab-item', { 'item-active': windowId == -1 }]" ref="tabbox"
@click="windowId = -1"> >
<div
:class="['tab-item', { 'item-active': windowId == -1 }]"
@click="windowId = -1"
>
驻店管理 驻店管理
</div> </div>
<template v-for="(i, index) in tab"> <template v-for="(i, index) in tab">
<template> <template>
<div :key="i.id" <div
:key="i.id"
:class="['tab-item', { 'item-active': windowId == i.id }]" :class="['tab-item', { 'item-active': windowId == i.id }]"
@click="windowId = i.id" @click="windowId = i.id"
:ref="`tab-${index}`"> :ref="`tab-${index}`"
>
{{ i.text }} {{ i.text }}
<div class="close" <div
@click.stop="close(index)"> class="close"
@click.stop="close(index)"
>
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</div> </div>
</div> </div>
...@@ -22,20 +30,26 @@ ...@@ -22,20 +30,26 @@
</template> </template>
<template v-if="dropdownList.length"> <template v-if="dropdownList.length">
<div class="arrow-box"> <div class="arrow-box">
<el-dropdown trigger="click" <el-dropdown
@command="windowId = $event"> trigger="click"
@command="windowId = $event"
>
<div class="dropdown-link"> <div class="dropdown-link">
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<template v-for="(i, index) in dropdownList"> <template v-for="(i, index) in dropdownList">
<el-dropdown-item :class="{ 'dropdown-item-active': windowId == i.id }" <el-dropdown-item
:class="{ 'dropdown-item-active': windowId == i.id }"
:key="i.id" :key="i.id"
:command="i.id"> :command="i.id"
>
<div class="dropdown-item"> <div class="dropdown-item">
{{ i.text }} {{ i.text }}
<div class="close" <div
@click.stop="closeDrop(index)"> class="close"
@click.stop="closeDrop(index)"
>
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</div> </div>
</div> </div>
...@@ -47,30 +61,38 @@ ...@@ -47,30 +61,38 @@
</template> </template>
</div> </div>
<div class="content"> <div class="content">
<InStoreManageIndex v-show="windowId == -1" <InStoreManageIndex
v-show="windowId == -1"
ref="inStoreManageIndex" ref="inStoreManageIndex"
@openWindow="openWindow" /> @openWindow="openWindow"
/>
<template v-for="i in [...tab, ...dropdownList]"> <template v-for="i in [...tab, ...dropdownList]">
<staffInfo :ref="`recep-${i.id}`" <component
:ref="`page-${i.id}`"
:key="i.id" :key="i.id"
:is="i.component"
v-show="windowId == i.id" v-show="windowId == i.id"
:show="windowId == i.id"
:query-data="i.data" :query-data="i.data"
@backIndex="backIndex" /> @backIndex="backIndex"
/>
</template> </template>
</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import clockSalaryIndex from './components/clockSalaryIndex/index'
import InStoreManageIndex from "./index" import InStoreManageIndex from "./index"
import staffInfo from "./staffInfo" import staffInfo from "./staffInfo"
export default { export default {
name: "", name: "",
components: { components: {
InStoreManageIndex, InStoreManageIndex,
staffInfo staffInfo,
clockSalaryIndex
}, },
data() { data () {
return { return {
tab: [], tab: [],
dropdownList: [], dropdownList: [],
...@@ -79,37 +101,42 @@ export default { ...@@ -79,37 +101,42 @@ export default {
} }
}, },
// 在beforeDestroy钩子中移除事件监听 // 在beforeDestroy钩子中移除事件监听
beforeDestroy() { beforeDestroy () {
window.removeEventListener('popstate', this.preventBack) window.removeEventListener('popstate', this.preventBack)
}, },
// 在你的Vue组件的mounted钩子中添加事件监听 // 在你的Vue组件的mounted钩子中添加事件监听
mounted() { mounted () {
history.pushState(null, null, document.URL) history.pushState(null, null, document.URL)
window.addEventListener('popstate', this.preventBack) window.addEventListener('popstate', this.preventBack)
if (this.tabboxWidth == 0) this.tabboxWidth = this.$refs.tabbox.offsetWidth if (this.tabboxWidth == 0) this.tabboxWidth = this.$refs.tabbox.offsetWidth
}, },
methods: { methods: {
preventBack() { preventBack () {
if (this.windowId !== -1) { 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 if (recep && recep.isQualityVisible) recep.isQualityVisible = false
else this.windowId = -1 else this.windowId = -1
history.pushState(null, null, document.URL) history.pushState(null, null, document.URL)
} else this.$router.go(-1) } else this.$router.go(-1)
}, },
openWindow(data) { openWindow (data) {
const id = `${data.staffName}_${data.phoneNumber}` const id = data.pageId ? data.pageId : `${data.staffName}_${data.phoneNumber}`
const windowList = [...this.tab, ...this.dropdownList] const windowList = [...this.tab, ...this.dropdownList]
const windowItem = windowList.find((e) => e.id == id) 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) { 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 return this.windowId = id
} }
if (windowList.length == 20) return this.$message.error("最多同时打开20个tabs") if (windowList.length == 20) return this.$message.error("最多同时打开20个tabs")
const item = { const item = {
text: data.staffName || '-', text: title,
data, data,
id id,
component
} }
if (this.dropdownList.length) this.dropdownList.push(item) if (this.dropdownList.length) this.dropdownList.push(item)
else { else {
...@@ -118,7 +145,7 @@ export default { ...@@ -118,7 +145,7 @@ export default {
} }
this.windowId = id this.windowId = id
}, },
close(index) { close (index) {
this.tab.splice(index, 1) this.tab.splice(index, 1)
if (this.dropdownList.length) { if (this.dropdownList.length) {
this.tab.push(this.dropdownList[0]) this.tab.push(this.dropdownList[0])
...@@ -127,10 +154,10 @@ export default { ...@@ -127,10 +154,10 @@ export default {
this.windowId = -1 this.windowId = -1
this.checkEl() this.checkEl()
}, },
closeDrop(index) { closeDrop (index) {
this.dropdownList.splice(index, 1) this.dropdownList.splice(index, 1)
}, },
checkEl() { checkEl () {
const { tab, tabboxWidth } = this const { tab, tabboxWidth } = this
const len = tab.length - 1 const len = tab.length - 1
this.$nextTick(() => { this.$nextTick(() => {
...@@ -145,7 +172,7 @@ export default { ...@@ -145,7 +172,7 @@ export default {
}) })
}, },
backIndex() { backIndex () {
this.windowId = -1 this.windowId = -1
this.$refs['inStoreManageIndex']?.handleSearch() this.$refs['inStoreManageIndex']?.handleSearch()
} }
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
<span class="tips_text">仅展示「深圳嘀加」服务商的驻店员工,以及「广联数科」商户下员工</span> <span class="tips_text">仅展示「深圳嘀加」服务商的驻店员工,以及「广联数科」商户下员工</span>
</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="['9120511']" />
</span>
<span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120504']" /> <auth-button category="Button" :show-btn-ids="['9120504']" />
</span> </span>
<span style="display: inline-block;margin-right: 10px;"> <span style="display: inline-block;margin-right: 10px;">
...@@ -582,6 +585,16 @@ export default { ...@@ -582,6 +585,16 @@ export default {
handleHistoryPerformance(row) { handleHistoryPerformance(row) {
row.activeName = 'historyPerformance' row.activeName = 'historyPerformance'
this.$emit("openWindow", row) 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!