change - 生成员工工资

main
yinq 4 months ago
parent 50b6559f4c
commit 7f0e54dec4

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询员工工资记录列表
export function listRecordStaffSalary(query) {
return request({
url: '/mes/record/recordStaffSalary/list',
method: 'get',
params: query
})
}
// 查询员工工资记录详细
export function getRecordStaffSalary(objId) {
return request({
url: '/mes/record/recordStaffSalary/' + objId,
method: 'get'
})
}
// 新增员工工资记录
export function addRecordStaffSalary(data) {
return request({
url: '/mes/record/recordStaffSalary',
method: 'post',
data: data
})
}
// 修改员工工资记录
export function updateRecordStaffSalary(data) {
return request({
url: '/mes/record/recordStaffSalary',
method: 'put',
data: data
})
}
// 删除员工工资记录
export function delRecordStaffSalary(objId) {
return request({
url: '/mes/record/recordStaffSalary/' + objId,
method: 'delete'
})
}
// 生成班组员工工资
export function selectTeamEmployeesWages(query) {
return request({
url: '/mes/record/recordStaffSalary/selectTeamEmployeesWages',
method: 'get',
params: query
})
}

@ -465,12 +465,7 @@ export default {
isRelease: null, isRelease: null,
workCenterCode: null, workCenterCode: null,
routingCode: null, routingCode: null,
printName: null, printName: null
isFlag: null,
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: null
}, },
// //
form: {}, form: {},
@ -513,7 +508,7 @@ export default {
}, },
created() { created() {
if (this.$route.params != null){ if (this.$route.params != null){
this.queryParams = this.$route.params this.queryParams.params = this.$route.params
} }
this.getList() this.getList()
}, },

@ -0,0 +1,505 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="身份证" prop="idCard">
<el-input
v-model="queryParams.idCard"
placeholder="请输入身份证"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="班组编号" prop="groupId">
<el-input
v-model="queryParams.groupId"
placeholder="请输入班组编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="事件日期">
<el-date-picker
v-model="daterangeEventDate"
style="width: 340px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
></el-date-picker>
</el-form-item>
<el-form-item label="薪资类别" prop="salaryCategory">
<el-input
v-model="queryParams.salaryCategory"
placeholder="请输入薪资类别"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="收入大类" prop="revenueClass">
<el-input
v-model="queryParams.revenueClass"
placeholder="请输入收入大类"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="收入金额" prop="revenueAmount">
<el-input
v-model="queryParams.revenueAmount"
placeholder="请输入收入金额"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="收入理由" prop="revenueReason">
<el-input
v-model="queryParams.revenueReason"
placeholder="请输入收入理由"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="扣罚大类" prop="fineClass">
<el-input
v-model="queryParams.fineClass"
placeholder="请输入扣罚大类"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="扣罚金额" prop="fineAmount">
<el-input
v-model="queryParams.fineAmount"
placeholder="请输入扣罚金额"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="扣罚理由" prop="fineReason">
<el-input
v-model="queryParams.fineReason"
placeholder="请输入扣罚理由"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务编号" prop="taskCode">
<el-input
v-model="queryParams.taskCode"
placeholder="请输入任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工资系数" prop="salaryCoefficient">
<el-input
v-model="queryParams.salaryCoefficient"
placeholder="请输入工资系数"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="开始日期" prop="beginDate">
<el-date-picker clearable
v-model="queryParams.beginDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择开始日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束日期" prop="endDate">
<el-date-picker clearable
v-model="queryParams.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['mes/record:recordStaffSalary:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['mes/record:recordStaffSalary:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes/record:recordStaffSalary:remove']"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes/record:recordStaffSalary:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="recordStaffSalaryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="身份证" align="center" prop="idCard" v-if="columns[1].visible"/>
<el-table-column label="班组编号" align="center" prop="groupId" v-if="columns[2].visible"/>
<el-table-column label="事件日期" align="center" prop="eventDate" width="180" v-if="columns[3].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.eventDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="薪资类别" align="center" prop="salaryCategory" v-if="columns[4].visible"/>
<el-table-column label="收入大类" align="center" prop="revenueClass" v-if="columns[5].visible"/>
<el-table-column label="收入金额" align="center" prop="revenueAmount" v-if="columns[6].visible"/>
<el-table-column label="收入理由" align="center" prop="revenueReason" v-if="columns[7].visible"/>
<el-table-column label="扣罚大类" align="center" prop="fineClass" v-if="columns[8].visible"/>
<el-table-column label="扣罚金额" align="center" prop="fineAmount" v-if="columns[9].visible"/>
<el-table-column label="扣罚理由" align="center" prop="fineReason" v-if="columns[10].visible"/>
<el-table-column label="任务编号" align="center" prop="taskCode" v-if="columns[12].visible"/>
<el-table-column label="工资系数" align="center" prop="salaryCoefficient" v-if="columns[13].visible"/>
<el-table-column label="开始日期" align="center" prop="beginDate" width="180" v-if="columns[14].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束日期" align="center" prop="endDate" width="180" v-if="columns[15].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['mes/record:recordStaffSalary:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes/record:recordStaffSalary:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改员工工资记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="身份证" prop="idCard">
<el-input v-model="form.idCard" placeholder="请输入身份证"/>
</el-form-item>
<el-form-item label="班组编号" prop="groupId">
<el-input v-model="form.groupId" placeholder="请输入班组编号"/>
</el-form-item>
<el-form-item label="事件日期" prop="eventDate">
<el-date-picker clearable
v-model="form.eventDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择事件日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="薪资类别" prop="salaryCategory">
<el-input v-model="form.salaryCategory" placeholder="请输入薪资类别"/>
</el-form-item>
<el-form-item label="收入大类" prop="revenueClass">
<el-input v-model="form.revenueClass" placeholder="请输入收入大类"/>
</el-form-item>
<el-form-item label="收入金额" prop="revenueAmount">
<el-input v-model="form.revenueAmount" placeholder="请输入收入金额"/>
</el-form-item>
<el-form-item label="收入理由" prop="revenueReason">
<el-input v-model="form.revenueReason" placeholder="请输入收入理由"/>
</el-form-item>
<el-form-item label="扣罚大类" prop="fineClass">
<el-input v-model="form.fineClass" placeholder="请输入扣罚大类"/>
</el-form-item>
<el-form-item label="扣罚金额" prop="fineAmount">
<el-input v-model="form.fineAmount" placeholder="请输入扣罚金额"/>
</el-form-item>
<el-form-item label="扣罚理由" prop="fineReason">
<el-input v-model="form.fineReason" placeholder="请输入扣罚理由"/>
</el-form-item>
<el-form-item label="任务编号" prop="taskCode">
<el-input v-model="form.taskCode" placeholder="请输入任务编号"/>
</el-form-item>
<el-form-item label="工资系数" prop="salaryCoefficient">
<el-input v-model="form.salaryCoefficient" placeholder="请输入工资系数"/>
</el-form-item>
<el-form-item label="开始日期" prop="beginDate">
<el-date-picker clearable
v-model="form.beginDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择开始日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束日期" prop="endDate">
<el-date-picker clearable
v-model="form.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择结束日期"
>
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listRecordStaffSalary,
getRecordStaffSalary,
delRecordStaffSalary,
addRecordStaffSalary,
updateRecordStaffSalary
} from '@/api/mes/record/recordStaffSalary'
export default {
name: 'RecordStaffSalary',
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
recordStaffSalaryList: [],
//
title: '',
//
open: false,
//
daterangeEventDate: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
idCard: null,
groupId: null,
eventDate: null,
salaryCategory: null,
revenueClass: null,
revenueAmount: null,
revenueReason: null,
fineClass: null,
fineAmount: null,
fineReason: null,
taskCode: null,
salaryCoefficient: null,
beginDate: null,
endDate: null
},
//
form: {},
//
rules: {
objId: [
{ required: true, message: '主键标识不能为空', trigger: 'blur' }
]
},
columns: [
{ key: 0, label: `主键标识`, visible: true },
{ key: 1, label: `身份证`, visible: true },
{ key: 2, label: `班组编号`, visible: true },
{ key: 3, label: `事件日期`, visible: true },
{ key: 4, label: `薪资类别`, visible: true },
{ key: 5, label: `收入大类`, visible: true },
{ key: 6, label: `收入金额`, visible: true },
{ key: 7, label: `收入理由`, visible: true },
{ key: 8, label: `扣罚大类`, visible: true },
{ key: 9, label: `扣罚金额`, visible: true },
{ key: 10, label: `扣罚理由`, visible: true },
{ key: 11, label: `创建时间`, visible: true },
{ key: 12, label: `任务编号`, visible: true },
{ key: 13, label: `工资系数`, visible: true },
{ key: 14, label: `开始日期`, visible: true },
{ key: 15, label: `结束日期`, visible: true }
]
}
},
created() {
this.getList()
},
methods: {
/** 查询员工工资记录列表 */
getList() {
this.loading = true
this.queryParams.params = {}
if (null != this.daterangeEventDate && '' != this.daterangeEventDate) {
this.queryParams.params['beginEventDate'] = this.daterangeEventDate[0]
this.queryParams.params['endEventDate'] = this.daterangeEventDate[1]
}
listRecordStaffSalary(this.queryParams).then(response => {
this.recordStaffSalaryList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
objId: null,
idCard: null,
groupId: null,
eventDate: null,
salaryCategory: null,
revenueClass: null,
revenueAmount: null,
revenueReason: null,
fineClass: null,
fineAmount: null,
fineReason: null,
createTime: null,
taskCode: null,
salaryCoefficient: null,
beginDate: null,
endDate: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeEventDate = []
this.resetForm('queryForm')
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加员工工资记录'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const objId = row.objId || this.ids
getRecordStaffSalary(objId).then(response => {
this.form = response.data
this.open = true
this.title = '修改员工工资记录'
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.objId != null) {
updateRecordStaffSalary(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addRecordStaffSalary(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids
this.$modal.confirm('是否确认删除员工工资记录编号为"' + objIds + '"的数据项?').then(function() {
return delRecordStaffSalary(objIds)
}).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/record/recordStaffSalary/export', {
...this.queryParams
}, `recordStaffSalary_${new Date().getTime()}.xlsx`)
}
}
}
</script>

@ -1,38 +1,40 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="班组编号" prop="teamCode"> <el-form-item label="班组名称" prop="groupId">
<el-input <el-select v-model="queryParams.groupId" placeholder="请选择班组名称" clearable>
v-model="queryParams.teamCode" <el-option
placeholder="请输入班组编号" v-for="item in teamMembersList"
clearable :key="item.teamCode"
@keyup.enter.native="handleQuery" :label="item.teamName"
/> :value="item.teamCode"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="上班打卡时间"> <el-form-item label="下单日期">
<el-date-picker <el-date-picker
v-model="daterangeStartWorkTime" v-model="daterangeOrderDate"
style="width: 340px" style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
type="datetimerange" type="daterange"
range-separator="-" range-separator="-"
start-placeholder="开始时间" start-placeholder="开始日期"
end-placeholder="结束时间" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<!-- <el-form-item label="下班打卡时间">--> <!-- <el-form-item label="下班打卡时间">-->
<!-- <el-date-picker--> <!-- <el-date-picker-->
<!-- v-model="daterangeEndWorkTime"--> <!-- v-model="daterangeEndWorkTime"-->
<!-- style="width: 340px"--> <!-- style="width: 340px"-->
<!-- value-format="yyyy-MM-dd HH:mm:ss"--> <!-- value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- type="datetimerange"--> <!-- type="datetimerange"-->
<!-- range-separator="-"--> <!-- range-separator="-"-->
<!-- start-placeholder="开始时间"--> <!-- start-placeholder="开始时间"-->
<!-- end-placeholder="结束时间"--> <!-- end-placeholder="结束时间"-->
<!-- ></el-date-picker>--> <!-- ></el-date-picker>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -45,145 +47,129 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['mes/record:recordStaffCommute:add']" >上传ERP
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['mes/record:recordStaffCommute:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes/record:recordStaffCommute:remove']"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes/record:recordStaffCommute:export']"
>导出
</el-button> </el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="recordStaffCommuteList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="recordStaffSalaryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/> <el-table-column label="序号" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="员工ID" align="center" prop="staffId" v-if="columns[1].visible"/> <el-table-column label="班组编号" align="center" prop="groupId" v-if="columns[2].visible" width="100"/>
<el-table-column label="员工名称" align="center" prop="staffName" v-if="columns[14].visible"/> <el-table-column label="班组名称" align="center" prop="teamName" v-if="columns[14].visible" width="160"/>
<el-table-column label="班组编号" align="center" prop="teamCode" v-if="columns[2].visible"/> <el-table-column label="员工名称" align="center" prop="staffName" v-if="columns[15].visible" width="100"/>
<el-table-column label="班组名称" align="center" prop="teamName" v-if="columns[15].visible"/> <el-table-column label="事件日期" align="center" prop="eventDate" width="180" v-if="columns[3].visible">
<el-table-column label="班次" align="center" prop="classes" v-if="columns[3].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.classes" :value="scope.row.classes"/> <span>{{ parseTime(scope.row.eventDate, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="上班打卡时间" align="center" prop="startWorkTime" width="180" v-if="columns[4].visible"> <el-table-column label="薪资类别" align="center" prop="salaryCategory" v-if="columns[4].visible"/>
<template slot-scope="scope"> <el-table-column label="收入大类" align="center" prop="revenueClass" v-if="columns[5].visible" width="120"/>
<span>{{ parseTime(scope.row.startWorkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <el-table-column label="收入金额" align="center" prop="revenueAmount" v-if="columns[6].visible" width="100"/>
</template> <el-table-column label="收入理由" align="center" prop="revenueReason" v-if="columns[7].visible"/>
</el-table-column> <el-table-column label="扣罚大类" align="center" prop="fineClass" v-if="columns[8].visible"/>
<el-table-column label="下班打卡时间" align="center" prop="endWorkTime" width="180" v-if="columns[5].visible"> <el-table-column label="扣罚金额" align="center" prop="fineAmount" v-if="columns[9].visible"/>
<template slot-scope="scope"> <el-table-column label="扣罚理由" align="center" prop="fineReason" v-if="columns[10].visible"/>
<span>{{ parseTime(scope.row.endWorkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <el-table-column label="任务编号" align="center" prop="taskCode" v-if="columns[12].visible" width="180"/>
</template> <el-table-column label="身份证" align="center" prop="idCard" v-if="columns[1].visible" width="180"/>
</el-table-column> <el-table-column label="工资系数" align="center" prop="salaryCoefficient" v-if="columns[13].visible"/>
<el-table-column label="在班时长率" align="center" prop="clockingRatio" v-if="columns[6].visible"/> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">-->
<el-table-column label="备注" align="center" prop="remark" v-if="columns[7].visible"/> <!-- <template slot-scope="scope">-->
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[8].visible"/> <!-- <el-button-->
<el-table-column label="机台编号" align="center" prop="machineCode" v-if="columns[13].visible"/> <!-- size="mini"-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">--> <!-- type="text"-->
<!-- <template slot-scope="scope">--> <!-- icon="el-icon-edit"-->
<!-- <el-button--> <!-- @click="handleUpdate(scope.row)"-->
<!-- size="mini"--> <!-- v-hasPermi="['mes/record:recordStaffCommute:edit']"-->
<!-- type="text"--> <!-- >修改-->
<!-- icon="el-icon-edit"--> <!-- </el-button>-->
<!-- @click="handleUpdate(scope.row)"--> <!-- <el-button-->
<!-- v-hasPermi="['mes/record:recordStaffCommute:edit']"--> <!-- size="mini"-->
<!-- >修改--> <!-- type="text"-->
<!-- </el-button>--> <!-- icon="el-icon-delete"-->
<!-- <el-button--> <!-- @click="handleDelete(scope.row)"-->
<!-- size="mini"--> <!-- v-hasPermi="['mes/record:recordStaffCommute:remove']"-->
<!-- type="text"--> <!-- >删除-->
<!-- icon="el-icon-delete"--> <!-- </el-button>-->
<!-- @click="handleDelete(scope.row)"--> <!-- </template>-->
<!-- v-hasPermi="['mes/record:recordStaffCommute:remove']"--> <!-- </el-table-column>-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table> </el-table>
<pagination <!-- <pagination-->
v-show="total>0" <!-- v-show="total>0"-->
:total="total" <!-- :total="total"-->
:page.sync="queryParams.pageNum" <!-- :page.sync="queryParams.pageNum"-->
:limit.sync="queryParams.pageSize" <!-- :limit.sync="queryParams.pageSize"-->
@pagination="getList" <!-- @pagination="getList"-->
/> <!-- />-->
<!-- 添加或修改员工上下班记录对话框 --> <!-- 添加或修改员工上下班记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="员工ID" prop="staffId"> <el-form-item label="身份证" prop="idCard">
<el-input v-model="form.staffId" placeholder="请输入员工ID"/> <el-input v-model="form.idCard" placeholder="请输入身份证"/>
</el-form-item>
<el-form-item label="班组编号" prop="groupId">
<el-input v-model="form.groupId" placeholder="请输入班组编号"/>
</el-form-item>
<el-form-item label="事件日期" prop="eventDate">
<el-date-picker clearable
v-model="form.eventDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择事件日期"
>
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="班组编号" prop="teamCode"> <el-form-item label="薪资类别" prop="salaryCategory">
<el-input v-model="form.teamCode" placeholder="请输入班组编号"/> <el-input v-model="form.salaryCategory" placeholder="请输入薪资类别"/>
</el-form-item> </el-form-item>
<el-form-item label="班次" prop="classes"> <el-form-item label="收入大类" prop="revenueClass">
<el-input v-model="form.classes" placeholder="请输入班次"/> <el-input v-model="form.revenueClass" placeholder="请输入收入大类"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="上班打卡时间" prop="startWorkTime">--> <el-form-item label="收入金额" prop="revenueAmount">
<!-- <el-date-picker clearable--> <el-input v-model="form.revenueAmount" placeholder="请输入收入金额"/>
<!-- v-model="form.startWorkTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择上班打卡时间"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="下班打卡时间" prop="endWorkTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.endWorkTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择下班打卡时间"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<el-form-item label="在班时长率" prop="clockingRatio">
<el-input v-model="form.clockingRatio" placeholder="请输入在班时长率"/>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="收入理由" prop="revenueReason">
<el-input v-model="form.remark" placeholder="请输入备注"/> <el-input v-model="form.revenueReason" placeholder="请输入收入理由"/>
</el-form-item> </el-form-item>
<el-form-item label="是否标识" prop="isFlag"> <el-form-item label="扣罚大类" prop="fineClass">
<el-input v-model="form.isFlag" placeholder="请输入是否标识"/> <el-input v-model="form.fineClass" placeholder="请输入扣罚大类"/>
</el-form-item> </el-form-item>
<el-form-item label="机台编号" prop="machineCode"> <el-form-item label="扣罚金额" prop="fineAmount">
<el-input v-model="form.machineCode" placeholder="请输入机台编号"/> <el-input v-model="form.fineAmount" placeholder="请输入扣罚金额"/>
</el-form-item>
<el-form-item label="扣罚理由" prop="fineReason">
<el-input v-model="form.fineReason" placeholder="请输入扣罚理由"/>
</el-form-item>
<el-form-item label="任务编号" prop="taskCode">
<el-input v-model="form.taskCode" placeholder="请输入任务编号"/>
</el-form-item>
<el-form-item label="工资系数" prop="salaryCoefficient">
<el-input v-model="form.salaryCoefficient" placeholder="请输入工资系数"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -196,12 +182,9 @@
<script> <script>
import { import {
listRecordStaffCommute, selectTeamEmployeesWages
getRecordStaffCommute, } from '@/api/mes/record/recordStaffSalary'
delRecordStaffCommute, import { getTeamMembers } from '@/api/mes/base/baseTeamMembers'
addRecordStaffCommute,
updateRecordStaffCommute
} from '@/api/mes/record/recordStaffCommute'
export default { export default {
name: 'TeamEmployeesWages', name: 'TeamEmployeesWages',
@ -221,19 +204,17 @@ export default {
// //
total: 0, total: 0,
// //
recordStaffCommuteList: [], recordStaffSalaryList: [],
// //
title: '', title: '',
// //
open: false, open: false,
// //
daterangeStartWorkTime: [], daterangeOrderDate: [],
// //
daterangeEndWorkTime: [], daterangeEndWorkTime: [],
// //
queryParams: { queryParams: {
pageNum: 1,
pageSize: 10,
staffId: null, staffId: null,
teamCode: null, teamCode: null,
classes: null, classes: null,
@ -255,26 +236,31 @@ export default {
] ]
}, },
columns: [ columns: [
{ key: 0, label: `主键标识`, visible: false }, { key: 0, label: `序号`, visible: true },
{ key: 1, label: `员工ID`, visible: true }, { key: 1, label: `身份证`, visible: true },
{ key: 2, label: `班组编号`, visible: true }, { key: 2, label: `班组编号`, visible: true },
{ key: 3, label: `班次`, visible: true }, { key: 3, label: `事件日期`, visible: true },
{ key: 4, label: `上班打卡时间`, visible: true }, { key: 4, label: `薪资类别`, visible: true },
{ key: 5, label: `下班打卡时间`, visible: true }, { key: 5, label: `收入大类`, visible: true },
{ key: 6, label: `在班时长率`, visible: true }, { key: 6, label: `收入金额`, visible: true },
{ key: 7, label: `备注`, visible: false }, { key: 7, label: `收入理由`, visible: true },
{ key: 8, label: `是否标识`, visible: false }, { key: 8, label: `扣罚大类`, visible: true },
{ key: 9, label: `创建人`, visible: false }, { key: 9, label: `扣罚金额`, visible: true },
{ key: 10, label: `创建时间`, visible: false }, { key: 10, label: `扣罚理由`, visible: true },
{ key: 11, label: `更新人`, visible: false }, { key: 11, label: `创建时间`, visible: true },
{ key: 12, label: `更新时间`, visible: false }, { key: 12, label: `任务编号`, visible: true },
{ key: 13, label: `机台编号`, visible: false }, { key: 13, label: `工资系数`, visible: true },
{ key: 14, label: `员工名称`, visible: true }, { key: 14, label: `班组名称`, visible: true },
{ key: 15, label: `班组名称`, visible: true }, { key: 15, label: `员工名称`, visible: true },
] ],
//
teamMembersList: []
} }
}, },
created() { created() {
getTeamMembers().then(response => {
this.teamMembersList = response.data
})
// this.getList() // this.getList()
}, },
methods: { methods: {
@ -282,14 +268,14 @@ export default {
getList() { getList() {
this.loading = true this.loading = true
this.queryParams.params = {} this.queryParams.params = {}
if (null != this.daterangeStartWorkTime && '' != this.daterangeStartWorkTime) { if (null != this.daterangeOrderDate && '' != this.daterangeOrderDate) {
this.queryParams.params['beginStartWorkTime'] = this.daterangeStartWorkTime[0] this.queryParams.params['beginOrderDate'] = this.daterangeOrderDate[0]
this.queryParams.params['endStartWorkTime'] = this.daterangeStartWorkTime[1] this.queryParams.params['endOrderDate'] = this.daterangeOrderDate[1]
} }
listRecordStaffCommute(this.queryParams).then(response => { selectTeamEmployeesWages(this.queryParams).then(response => {
this.recordStaffCommuteList = response.rows this.recordStaffSalaryList = response.data
this.total = response.total // this.total = response.total
this.loading = false this.loading = false
}) })
}, },
@ -325,10 +311,11 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.daterangeStartWorkTime = [] this.daterangeOrderDate = []
this.daterangeEndWorkTime = [] this.daterangeEndWorkTime = []
this.resetForm('queryForm') this.resetForm('queryForm')
this.handleQuery() this.recordStaffSalaryList = [];
// this.handleQuery()
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -338,9 +325,17 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() // this.reset()
this.open = true // this.open = true
this.title = '添加员工上下班记录' // this.title = ''
this.$modal.confirm('是否将员工工资上传至ERP系统').then(function() {
return null
}).then(() => {
this.recordStaffSalaryList = [];
this.$modal.msgSuccess('上传ERP成功')
}).catch(() => {
})
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {

Loading…
Cancel
Save