Commit f3e1acbc 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 a8908da6 e19cef5e
......@@ -9,13 +9,24 @@
:selectPopperAppendToBody="false"
class="d2-search"
>
<template slot="dateMonth">
<el-date-picker
v-model="searchForm.commitTime"
type="month"
placeholder="选择月份"
:picker-options="monthPickerOptions"
size="small"
:clearable="false"
value-format="yyyy-MM"
>
</el-date-picker>
</template>
</d2-search>
<div class="up-btns">
<el-button
:id="tableParams.btnId"
size="small"
type="primary"
@click="search"
>
查询
</el-button>
......@@ -40,7 +51,7 @@
</el-button>
</div>
<d2-table
ref="detailListTable"
ref="tableRef"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
......@@ -61,9 +72,16 @@ export default {
},
data () {
return {
monthPickerOptions: {
disabledDate: date => {
let prev = dayjs().subtract(1, 'month').valueOf(),
now = dayjs().valueOf()
return date != now && (date > now || date < prev)
}
},
searchForm: {
appealType: '',
commitTime: [dayjs().startOf('month').toDate(), dayjs().toDate()]
commitTime: dayjs().toDate()
},
searchFormSearch: {},
showFormData: [
......@@ -82,9 +100,7 @@ export default {
{
label: "提交时间",
name: "commitTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
addHtml: 'dateMonth'
}
],
getListApi: getClockSalaryList,
......@@ -104,37 +120,41 @@ export default {
minWidth: '100'
}, {
label: '适配业务',
prop: 'ruleType',
prop: 'business',
minWidth: '100'
}, {
label: '服务门店',
prop: 'updatedDate',
minWidth: '180',
formatter: (cellValue) => {
var dataHtml = ''
var dataHtml = `${cellValue.serviceMerchantName}`
return dataHtml
}
}, {
label: '申诉类型',
prop: 'supervisor',
minWidth: '150'
minWidth: '150',
formatter: (cellValue) => {
return {
1: '考勤',
2: '工资'
}[cellValue.appealType] || '--'
}
}, {
label: '申诉时间',
prop: 'createdTime',
minWidth: '150',
formatter: (cellValue) => {
return Util.dateFormate(cellValue.createdTime, 'YYYY-MM-DD HH:mm:ss')
return dayjs(cellValue.appealDate).format("YYYY-MM-DD")
}
}, {
label: '申诉说明',
prop: 'supervisor',
prop: 'appealDesc',
minWidth: '150'
}, {
label: '下次跟进时间',
label: '提交时间',
prop: 'nextFollowTime',
minWidth: '150',
formatter: (cellValue) => {
return Util.dateFormate(cellValue.nextFollowTime, 'YYYY-MM-DD HH:mm')
return dayjs(cellValue.commitTime).format("YYYY-MM-DD HH:mm:ss")
}
}
]
......@@ -149,8 +169,17 @@ export default {
beforeSearchFn () {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.commitTime.length) {
let [commitTimeStart, commitTimeEnd] = this.searchFormSearch.commitTime
if (this.searchFormSearch.commitTime) {
let nowMonth = dayjs().month(),
searchMonth = dayjs(this.searchFormSearch.commitTime).month(),
commitTimeStart = dayjs().startOf('month'),
commitTimeEnd = dayjs().toDate()
if(nowMonth != searchMonth) {
commitTimeStart = dayjs(this.searchFormSearch.commitTime).startOf('month')
commitTimeEnd = dayjs(this.searchFormSearch.commitTime).endOf('month')
}
console.log(commitTimeStart, commitTimeEnd)
// 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
......@@ -163,15 +192,17 @@ export default {
},
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.$refs.timeRef.handleReset()
this.$nextTick(() => this.search())
this.search()
},
handleExport () {
var params = this.searchForm
var params = this.searchFormSearch
exportClockSalaryList(params).then((res) => {
res && downLoadFile(res)
})
},
search () {
this.$refs.tableRef.refreshTable(false, true)
}
}
}
</script>
......@@ -197,7 +228,7 @@ export default {
}
}
.content {
padding: 0 20px;
padding: 0 20px 58px;
background: #fff;
margin-top: 14px;
.top {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!