源码提交

master
曾嘉俊 2 years ago
parent 788dc1c25f
commit 0918911368

@ -164,7 +164,6 @@ module.exports = new Promise((resolve, reject) => {
~~~~~~#####~~~~~~;###~~~~~~~####~~~~~#~~~~~~~~ ~~~~~~#####~~~~~~;###~~~~~~~####~~~~~#~~~~~~~~
~~~~~~~~##~~~~~~~####~~~~~~~####~~~~~~~~~~~~~ ~~~~~~~~##~~~~~~~####~~~~~~~####~~~~~~~~~~~~~
~~~~~~~~~#~~~~~~~####~~~~~~~####~~~~~~~~~~~~~ ~~~~~~~~~#~~~~~~~####~~~~~~~####~~~~~~~~~~~~~
`, `,
`Local: http://192.168.31.35:${port}`, `Local: http://192.168.31.35:${port}`,

@ -26,7 +26,8 @@ module.exports = {
assetsPublicPath: "/", assetsPublicPath: "/",
proxyTable: { proxyTable: {
"/api": { "/api": {
target: "http://192.168.1.12:8085/", // target: "http://192.168.1.127:8084/",
target: "http://192.168.1.35:8085/",
changeOrigin: true, //允许跨域 changeOrigin: true, //允许跨域
pathRewrite: { pathRewrite: {
"^/api": "" "^/api": ""
@ -36,7 +37,7 @@ module.exports = {
hot:true, hot:true,
// Various Dev Server settingsss // Various Dev Server settingsss
host: "192.168.1.15", // can be overwritten by process.env.HOST host: "192.168.1.15", // can be overwritten by process.env.HOST
port: 3000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 4000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false, autoOpenBrowser: false,
errorOverlay: true, errorOverlay: true,
notifyOnErrors: true, notifyOnErrors: true,

@ -0,0 +1,11 @@
[0428/095632.212:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0428/095632.217:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0428/095632.397:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0428/095632.684:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0428/095911.511:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0428/095911.517:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0428/095911.557:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0428/095911.676:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0506/163040.088:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0506/163043.808:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)
[0506/163057.058:ERROR:registration_protocol_win.cc(107)] CreateFile: 系统找不到指定的文件。 (0x2)

Binary file not shown.

15487
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -53,7 +53,7 @@ export default {
$route(to, from) { $route(to, from) {
if (to != from) { if (to != from) {
this.transitionName = "slide-top"; this.transitionName = "slide-top";
document.title = this.$route.meta.title + " - 门店业务"; document.title = this.$route.meta.title + " - 临时工业务";
} }
}, },
}, },

@ -1714,11 +1714,11 @@ export function delRegionList(id) {
}); });
} }
export function getBlackList(params) { export function getBlackList(data) {
return service({ return service({
url: "/api" + `/blackList`, url: "/api" + `/blackList`,
method: "get", method: "post",
params data
}); });
} }
@ -1746,11 +1746,11 @@ export function delBlackList(params) {
}); });
} }
export function staffTemporary(params) { export function staffTemporary(data) {
return service({ return service({
url: "/api" + `/staffTemporary`, url: "/api" + `/staffTemporary/getList`,
method: "get", method: "post",
params data
}); });
} }
@ -1762,11 +1762,11 @@ export function updataStaffTemporary(data) {
}); });
} }
export function jobContentList(params) { export function jobContentList(data) {
return service({ return service({
url: "/api" + `/blackList/getJonContent`, url: "/api" + `/blackList/getJonContent`,
method: "get", method: "post",
params data
}); });
} }
export function getStaffTemporary(params) { export function getStaffTemporary(params) {
@ -1869,14 +1869,50 @@ export function delBeisenUserList(id) {
}); });
} }
// export function addStaffs(data) {
// return service({
// url: "/api" + `/demay/ssm/staff/staffAddByWeChat`,
// method: "post",
// data
// });
// }
// /clock-in-record/abnormal/page
export function abnormalPage(data) {
return service({
url: "/api" + `/clock-in-record/abnormal/page`,
method: "post",
data
});
}
export function addStaffs(data) { export function addStaffs(data) {
return service({ return service({
url: "/api" + `/demay/ssm/staff/staffAddByWeChat`, url: "/api" + `/demay/ssm/staff/staffAddByPc`,
method: "post", method: "post",
data data
}); });
} }
export function exportErrorDetail(data) {
return service({
url: "/api" + `/clock-in-record/abnormal/export`,
method: "post",
data,
responseType:'blob'
});
}
// export function addStaffs(data) {
// return service({
// url: "/api" + `/demay/ssm/staff/addStaff`,
// method: "post",
// data
// });
// }
export function addBeiSen(data) { export function addBeiSen(data) {
return service({ return service({
url: "/api" + `/staffTemporary/updateByBeiSen`, url: "/api" + `/staffTemporary/updateByBeiSen`,
@ -1909,6 +1945,63 @@ export function sendZhongkongDimissions(data) {
}); });
} }
export function updateById(data) {
return service({
url: "/api" + `/staffTemporary/updateById`,
method: "put",
data
});
}
export function delStaffTemporary(id) {
return service({
url: "/api" + `/staffTemporary/`+id,
method: "delete",
});
}
export function blackListExport(data) {
return service({
url: "/api" + `/blackList/export`,
data,
method: "post",
responseType:'blob'
});
}
export function deleteByList(data) {
return service({
url: "/api" + `/staffTemporary/deleteByList`,
data,
method: "post",
});
}
export function updateByIds(data) {
return service({
url: "/api" + `/staffTemporary/updateByIds`,
data,
method: "put",
});
}
export function staffTemporaryUpdate(params) {
return service({
url: "/api" + `/staffTemporaryUpdate`,
params,
method: "get",
});
}
export function jobContextExport(data) {
return service({
url: "/api" + `/blackList/jobContext/export`,
data,
method: "post",
responseType: "blob"
});
}

@ -1,7 +1,9 @@
<template> <template>
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="800px" append-to-body> <el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="800px" append-to-body>
<div class="flex">
<el-input class="form-width-ms" v-model="queryForm.memberName" clearable placeholder="请输入分店名字"></el-input> <el-input class="form-width-ms" v-model="queryForm.memberName" clearable placeholder="请输入分店名字"></el-input>
<el-button size="mini" type="primary" @click="getData"></el-button> <el-button size="mini" type="primary" @click="getData"></el-button>
</div>
<el-table @row-dblclick="confirms" :data="list" @row-click="rowClick" max-height="600" v-loading="listLoading" class="margin-top-xs" :element-loading-text="elementLoadingText" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)' ,color:'#eeeeee'}"> <el-table @row-dblclick="confirms" :data="list" @row-click="rowClick" max-height="600" v-loading="listLoading" class="margin-top-xs" :element-loading-text="elementLoadingText" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)' ,color:'#eeeeee'}">
<el-table-column label="选择" width="60"> <el-table-column label="选择" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
@ -69,7 +71,6 @@
this.getData(); this.getData();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
// //console.log(`: ${val}`);
this.queryForm.pageNum = val; this.queryForm.pageNum = val;
this.getData(); this.getData();
}, },

@ -713,7 +713,6 @@ export default {
this.form.paymentMoney = this.payMoney; this.form.paymentMoney = this.payMoney;
this.form.payMoney = this.payMoney; this.form.payMoney = this.payMoney;
this.multipleSelection.forEach((item) => { this.multipleSelection.forEach((item) => {
console.log(item);
let repayAccountListRequests = []; let repayAccountListRequests = [];
debtMoney += item.debtMoney; debtMoney += item.debtMoney;
item.payMoney = item.paymentMoney; item.payMoney = item.paymentMoney;
@ -841,7 +840,6 @@ export default {
}) })
} }
}, },
// //
openEditPayMoney(row, index) { openEditPayMoney(row, index) {
row.paymentMoney = row.paymentMoney * 1; row.paymentMoney = row.paymentMoney * 1;

@ -1,7 +1,7 @@
<template> <template>
<!-- 员工业绩和提成 --> <!-- 员工业绩和提成 -->
<div class="month"> <div class="month">
<div class="month_header"> <!-- <div class="month_header">
<div class="padding-left-xs" style="font-size:14px;color:#999">员工业绩和提成</div> <div class="padding-left-xs" style="font-size:14px;color:#999">员工业绩和提成</div>
<el-input clearable prefix-icon="el-icon-search" size="samll" style="width:150px;margin-right:20px" v-model="input"></el-input> <el-input clearable prefix-icon="el-icon-search" size="samll" style="width:150px;margin-right:20px" v-model="input"></el-input>
</div> </div>
@ -12,7 +12,7 @@
<el-table-column align="center" prop="achievementAmount" label="业绩"> </el-table-column> <el-table-column align="center" prop="achievementAmount" label="业绩"> </el-table-column>
<el-table-column align="center" prop="commissionAmount" label="提成"> </el-table-column> <el-table-column align="center" prop="commissionAmount" label="提成"> </el-table-column>
</el-table> </el-table>
<perform ref="perform"></perform> <perform ref="perform"></perform> -->
</div> </div>
</template> </template>

@ -242,7 +242,7 @@ export default {
listShow: true, listShow: true,
}, },
{ {
name: "临时工", name: "已入场记录",
icon: "el-icon-user", icon: "el-icon-user",
route: "/baseStaff", route: "/baseStaff",
index: "baseStaff", index: "baseStaff",
@ -250,7 +250,7 @@ export default {
id:"3003003", id:"3003003",
}, },
{ {
name: "扫码工作记录", name: "待入场记录",
icon: "el-icon-view", icon: "el-icon-view",
route: "/codeJob", route: "/codeJob",
index: "codeJob", index: "codeJob",
@ -258,10 +258,9 @@ export default {
listShow: true, listShow: true,
}, },
// { // {
// name: "", // name: "",
// icon: "el-icon-view", // icon: "el-icon-view",
// route: "/gzjl", // route: "/memberAgreement",
// index: "300200",
// number: "400", // number: "400",
// listShow: true, // listShow: true,
// }, // },
@ -281,6 +280,22 @@ export default {
number: "400", number: "400",
listShow: true, listShow: true,
}, },
{
name: "考勤异常记录",
icon: "el-icon-view",
route: "/errAttendance",
index: "errAttendance",
number: "400",
listShow: true,
},
{
name: "临时工修改记录",
icon: "el-icon-view",
route: "/updateList",
index: "updateList",
number: "400",
listShow: true,
}
] ]
}; };
}, },
@ -457,7 +472,6 @@ export default {
/deep/.custom-submenu .el-submenu__title { /deep/.custom-submenu .el-submenu__title {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
background-color: ;
} }
.el-menu-item, .el-submenu__title{ .el-menu-item, .el-submenu__title{

@ -9,17 +9,12 @@
<i :class="[isShow==true?'el-icon-s-unfold':'el-icon-s-fold']"></i> <i :class="[isShow==true?'el-icon-s-unfold':'el-icon-s-fold']"></i>
</div> </div>
<div @click='ruotes' style='cursor: pointer'> <div @click='ruotes' style='cursor: pointer'>
<span class="headertitle">临时工业务</span> <!-- <span class="headertitle">临时工业务</span> -->
<!-- <span class="headertitle">代收业务</span> --> <span class="headertitle">外援系统</span>
<span class="text-white "> <span class="text-white ">
{{storeNum}}
</span> </span>
<el-tooltip effect="dark" :content="storeName" placement="bottom">
<i class="el-icon-s-platform icon-plat-form"></i> <i class="el-icon-s-platform icon-plat-form"></i>
</el-tooltip>
<span class="text-white "> <span class="text-white ">
{{storeName}}
<!-- ({{isStoreName}}) -->
</span> </span>
</div> </div>
</div> </div>

@ -507,14 +507,12 @@ export default {
item.sourceDocNum = form.sourceDocNum; item.sourceDocNum = form.sourceDocNum;
num += item.transactionPrice * 1; num += item.transactionPrice * 1;
}); });
this.summoney = num; this.summoney = num;
res.rows[0].fileLists.forEach((item) => { res.rows[0].fileLists.forEach((item) => {
item.imageShow = false; item.imageShow = false;
item.url = partten.https + item.filePath + "/" + item.fileName; item.url = partten.https + item.filePath + "/" + item.fileName;
}); });
this.fileList = res.rows[0].fileLists; this.fileList = res.rows[0].fileLists;
//console.log(form);
} }
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {

@ -1761,7 +1761,6 @@ export default {
sumNum() { sumNum() {
let spendMoney = 0; let spendMoney = 0;
let spendNumber = 0; let spendNumber = 0;
this.rowRecList.forEach(item => { this.rowRecList.forEach(item => {
spendMoney = spendMoney =
( (
@ -1777,7 +1776,6 @@ export default {
}); });
this.recForm.collectionRechargeAmount = spendNumber.toFixed(2) * 1; this.recForm.collectionRechargeAmount = spendNumber.toFixed(2) * 1;
this.recForm.collRecAmonnt = spendMoney.toFixed(2) * 1; this.recForm.collRecAmonnt = spendMoney.toFixed(2) * 1;
this.recForm.cashAmount = this.recForm.cashAmount =
( (
this.recForm.collectionCashAmount + this.recForm.collectionCashAmount +
@ -1794,10 +1792,6 @@ export default {
this.recForm.collectionCashAmount + this.recForm.collectionCashAmount +
this.recForm.collectionIntegralAmount this.recForm.collectionIntegralAmount
).toFixed(2) * 1; ).toFixed(2) * 1;
console.log(
"🚀 ~ file: service.vue ~ line 1213 ~ sumNum ~ this.recForm",
this.recForm
);
this.recForm.collectionAmounts = spendMoney this.recForm.collectionAmounts = spendMoney
? spendMoney.toFixed(2) * 1 ? spendMoney.toFixed(2) * 1
: 0; : 0;
@ -1816,9 +1810,7 @@ export default {
}); });
} }
}); });
this.recListCopy = JSON.parse(JSON.stringify(rList)); this.recListCopy = JSON.parse(JSON.stringify(rList));
this.list.forEach(item => { this.list.forEach(item => {
if (item.index != this.editProIndex) { if (item.index != this.editProIndex) {
let recArr = this.setRecList(item); let recArr = this.setRecList(item);

@ -44,10 +44,11 @@
<el-date-picker :disabled="title=='查看'" style="min-width:50px" v-model="form.leaveDate" type="date" format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker> <el-date-picker :disabled="title=='查看'" style="min-width:50px" v-model="form.leaveDate" type="date" format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</div> </div>
</el-form-item> </el-form-item>
<!-- <el-form-item :prop="form.userState?'roleName':''" label="角色名称" v-if='title==""||title==""'> <el-form-item :prop="form.userState?'roleName':''" label="角色名称" prop="roleId">
<el-select filterable default-first-option @change="changeRole" v-model="form.roleName" clearable placeholder="请选择" :disabled="title=='查看'" style="min-width:50px"> <el-select filterable default-first-option @change="changeRole" v-model="form.roleId" clearable placeholder="请选择" style="min-width:50px">
<el-option v-for="item in roleLists" :key="item.roleName" :label="item.roleName" :value="item.id"> </el-option> <el-option v-for="item in roleLists" :key="item.roleName" :label="item.roleName" :value="item.id"> </el-option>
</el-select> --> </el-select>
</el-form-item>
<el-form-item label="简介"> <el-form-item label="简介">
<div class="form-width"> <div class="form-width">
<el-input :disabled="title=='查看'" placeholder="请输入简介" v-model="form.briefIntroduction" autocomplete="on" type="textarea" :autosize="{ minRows:2, maxRows:10}" :maxlength="300" show-word-limit></el-input> <el-input :disabled="title=='查看'" placeholder="请输入简介" v-model="form.briefIntroduction" autocomplete="on" type="textarea" :autosize="{ minRows:2, maxRows:10}" :maxlength="300" show-word-limit></el-input>
@ -105,6 +106,11 @@ export default {
message: "请选择员工性别", message: "请选择员工性别",
trigger: ["blur", "change"], trigger: ["blur", "change"],
}, },
roleId: {
required: true,
message: "请选择角色",
trigger: ["blur", "change"],
},
// mobilePhone: [ // mobilePhone: [
// { // {
// required: true, // required: true,
@ -306,12 +312,11 @@ export default {
}, },
// //
changeRole(v) { changeRole(v) {
console.log(v);
let form = { ...this.form }; let form = { ...this.form };
this.roleLists.forEach((item) => { this.roleLists.forEach((item) => {
if (v == item.roleName) { if (v == item.id) {
form.roleNum = item.roleNum; form.roleNum = item.roleNum;
form.roleId = item.id; form.roleName = item.roleName;
} }
}); });
this.form = { ...form }; this.form = { ...form };

@ -1,5 +1,5 @@
<template> <template>
<!-- 名单 --> <!-- 名单 -->
<div class="displsy-mod"> <div class="displsy-mod">
<el-table :data="list" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}"> <el-table :data="list" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
<el-table-column align="center" prop="staffName" label="员工名称" min-width="100"></el-table-column> <el-table-column align="center" prop="staffName" label="员工名称" min-width="100"></el-table-column>

@ -9,6 +9,9 @@
<el-form-item label="部门编码" prop="regionNum"> <el-form-item label="部门编码" prop="regionNum">
<el-input ref="regionName" v-model="form.regionNum" @change="handleChange" autocomplete="on" style='width:192px'></el-input> <el-input ref="regionName" v-model="form.regionNum" @change="handleChange" autocomplete="on" style='width:192px'></el-input>
</el-form-item> </el-form-item>
<el-form-item label="北森部门id" >
<el-input ref="beisenId" v-model="form.beisenId" autocomplete="on" style='width:192px'></el-input>
</el-form-item>
<el-form-item label="部门管理员:"> <el-form-item label="部门管理员:">
<el-select @change="handleOptChange" v-model="form.manageId" placeholder="请选择"> <el-select @change="handleOptChange" v-model="form.manageId" placeholder="请选择">
<el-option <el-option

@ -20,7 +20,7 @@
default-expand-all row-key="id" default-expand-all row-key="id"
:tree-props="{ children: 'regionListVoList', hasChildren: 'hasChildren' }"> :tree-props="{ children: 'regionListVoList', hasChildren: 'hasChildren' }">
<el-table-column align="center" prop="regionName" label="部门名称" show-overflow-tooltip ></el-table-column> <el-table-column align="center" prop="regionName" label="部门名称" show-overflow-tooltip ></el-table-column>
<el-table-column align="center" prop="id" label="系统唯一ID" show-overflow-tooltip ></el-table-column> <el-table-column align="center" prop="beisenId" label="北森部门id" show-overflow-tooltip ></el-table-column>
<el-table-column align="center" prop="regionNum" label="部门编码" show-overflow-tooltip ></el-table-column> <el-table-column align="center" prop="regionNum" label="部门编码" show-overflow-tooltip ></el-table-column>
<el-table-column align="center" prop="manageName" label="管理员" show-overflow-tooltip ></el-table-column> <el-table-column align="center" prop="manageName" label="管理员" show-overflow-tooltip ></el-table-column>
<el-table-column align="center" prop="mobilePhone" label="管理员手机" show-overflow-tooltip ></el-table-column> <el-table-column align="center" prop="mobilePhone" label="管理员手机" show-overflow-tooltip ></el-table-column>
@ -48,7 +48,7 @@
<script> <script>
import edit from './components/edit.vue' import edit from './components/edit.vue'
import advancedSearchselect from './components/select.vue' import advancedSearchselect from './components/select.vue'
import { storepage,getRegionList,delRegionList } from "../../../api/storeManage.js"; import { getRegionList,delRegionList } from "../../../api/storeManage.js";
import { handleTree } from "@/utils/index"; import { handleTree } from "@/utils/index";
export default { export default {
components:{ components:{

@ -0,0 +1,132 @@
<template>
<div>
<div style="display: flex;margin-bottom: 10px">
<div></div>
<div class="flex" style="margin-left: auto;align-items: center;" >
<el-select v-model="pageInfo.type" placeholder="服务类型" @change="init" clearable style="width: 150px;margin-right: 10px" >
<el-option
v-for="item in [{label:'月结',value:1},{label:'日结',value:0}]"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-date-picker
style="margin-right: 10px;width: 250px;"
v-model="date"
type="daterange"
format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
@change="init"
end-placeholder="结束日期">
</el-date-picker>
<el-input size="medium" class="form-width-ms" v-model="pageInfo.staffName" placeholder="输入要查询的员工姓名" @change="init" clearable style="margin-right:10px"></el-input >
<el-button size="mini" type="primary" @click='init'>查询</el-button>
<el-button size="mini" type="warning" @click='exportError' :loading="exportLoading">导出</el-button>
</div>
</div>
<div class="displsy-mod">
<el-table :data="list" v-loading="loading" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
<el-table-column align="center" prop="attendanceTime" label="考勤时间" >
<template slot-scope="scope">
{{ scope.row.attendanceTime.substring(0,10) }}
</template>
</el-table-column>
<el-table-column align="center" prop="staffNum" label="员工编码" ></el-table-column>
<el-table-column align="center" prop="staffName" label="员工名称" ></el-table-column>
<el-table-column align="center" prop="staffName" label="服务类型" >
<template slot-scope="scope">
{{ scope.row.type?'月结':'日结' }}
</template>
</el-table-column>
<el-table-column align="center" prop="checkTime" label="首打卡时间" ></el-table-column>
<el-table-column align="center" prop="checkEndTime" label="尾打卡时间" ></el-table-column>
<el-table-column align="center" prop="recordType" label="考勤状态" ></el-table-column>
</el-table>
<div class="block" style="margin-top:15px;">
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageInfo.pageNum" :page-sizes="[10,20,30,40,50]" :page-size="pageInfo.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</div>
</div>
</template>
<script>
import { abnormalPage,exportErrorDetail } from "../../../api/storeManage.js";
export default {
data() {
return {
list:[],
total: 0, //
pageInfo: {
page: 1,
size: 10
},
queryFome:{},
date:[],
loading:false,
exportLoading:false
}
},
created() {
this.init()
},
methods: {
exportError(){
let params = {...this.pageInfo}
try{
if(this.date.length){
params.enterStartTime = this.formatTime(this.date[0],"YYYY-MM-DD 00:00:00");
params.enterEndTime = this.formatTime(this.date[1],"YYYY-MM-DD 23:59:59" );
}
}catch(err){
params.enterStartTime = null
params.enterEndTime = null
}
params.page = 1
params.size = 9999
this.exportLoading = true
exportErrorDetail(params).then(res=>{
this.exportLoading = false
let blob = new Blob([res]);
var a = document.createElement("a");
var url = window.URL.createObjectURL(blob);
a.href = url;
a.download = "临时工异常打卡导出表.xlsx";
a.click();
window.URL.revokeObjectURL(url);
})
},
handleSizeChange(val) {
this.pageInfo.size = val
this.init();
},
handleCurrentChange(val) {
this.pageInfo.page = val
this.init();
},
init(){
let params = {...this.pageInfo}
try{
if(this.date.length){
params.enterStartTime = this.formatTime(this.date[0],"YYYY-MM-DD 00:00:00");
params.enterEndTime = this.formatTime(this.date[1],"YYYY-MM-DD 23:59:59" );
}
}catch(err){
params.enterStartTime = null
params.enterEndTime = null
}
if(!params.staffName)params.staffName = null //
this.loading = true
abnormalPage(params).then(res=>{
this.loading = false
this.list = res.pageInfo.list
this.total = res.pageInfo.total
})
}
},
}
</script>
<style scoped>
</style>

@ -18,6 +18,7 @@
<div class="displsy-mod"> <div class="displsy-mod">
<el-table :data="list" v-loading="loading" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}"> <el-table :data="list" v-loading="loading" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
<el-table-column align="center" prop="beisenUserId" label="北森系统id" min-width="100"></el-table-column> <el-table-column align="center" prop="beisenUserId" label="北森系统id" min-width="100"></el-table-column>
<el-table-column align="center" prop="staffNum" label="员工编码" min-width="100"></el-table-column>
<el-table-column align="center" prop="staffName" label="员工名称" min-width="100"></el-table-column> <el-table-column align="center" prop="staffName" label="员工名称" min-width="100"></el-table-column>
<el-table-column align="center" prop="sex" label="性别" min-width="80"></el-table-column> <el-table-column align="center" prop="sex" label="性别" min-width="80"></el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号码" min-width="120"></el-table-column> <el-table-column align="center" prop="mobilePhone" label="手机号码" min-width="120"></el-table-column>

@ -0,0 +1,81 @@
<template>
<div>
<el-dialog title="获取最新" :visible.sync="dataDialog" width="600px">
<el-form :model="form" :rules="rules" ref="form">
<el-form-item label="选择日期:" label-width="120px">
<div class="searchDiv">
<el-date-picker
v-model="form.date"
:picker-options="pickerOptions"
type="date"
placeholder="选择日期">
</el-date-picker>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="dataDialog = false"> </el-button>
<el-button type="primary" size="mini" :loading="loading" @click="confirm"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
dataDialog:false,
form:{},
rules:{
date: [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
],
},
loading:false,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now(); //
}
}
}
},
methods: {
getNextDate(dateStr) {
let date = new Date(dateStr);
date.setDate(date.getDate() + 1);
let Y = date.getFullYear();
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
return Y + '-' + M + '-' + D;
},
confirm(){
this.$refs['form'].validate(async (valid) => {
if (valid) {
this.loading = true
let params = {
starttime : this.formatTime(this.form.date,"YYYY-MM-DD 03:00:00"),
endtime : this.getNextDate(this.form.date,"YYYY-MM-DD" ) + ' 03:00:00',
}
this.$emit('handleSelectNew',params)
} else {
return false
}
})
},
formatDate(date) {
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
return Y + M + D;
},
show(){
this.form = {}
this.dataDialog = true
},
},
}
</script>
<style scoped>
</style>

@ -2,55 +2,83 @@
<div> <div>
<div class="flex" style="margin-bottom: 10px;"> <div class="flex" style="margin-bottom: 10px;">
<div class="block" style="margin-left: auto;"> <div class="block" style="margin-left: auto;">
<el-date-picker size="medium" v-model="days" @change="init" type="daterange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> <!-- :props="{ multiple: true, emitPath:false, value: 'regionNum', children: 'regionListVoList' , label: 'regionName' }" -->
<el-cascader :options="deptOptions" v-model="queryForm.deptIds" placeholder="请选择部门" @change="handleDept" :props="{ multiple: true, checkStrictly: false,emitPath:false }" clearable>
</el-cascader>
<el-date-picker size="medium" :clearable="false" v-model="days" @change="init" type="daterange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
<el-input size="medium" class="form-width-ms" v-model="queryForm.docNum" placeholder="输入要查询的员工姓名" @change="init" clearable></el-input> <el-select v-model="queryForm.type" placeholder="服务类型" @change="init" clearable style="width: 150px;">
<el-option v-for="item in [{label:'月结',value:'1'},{label:'日结',value:'0'}]" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="medium" class="form-width-ms" v-model="queryForm.staffName" placeholder="输入要查询的员工姓名" @change="init" clearable></el-input>
<!-- <el-input size="medium" class="form-width-ms" v-model="queryForm.remark" placeholder="输入要查询的外包服务商" @change="init" clearable></el-input> -->
<el-button size="mini" type="primary" @click="handleSelect"></el-button> <el-button size="mini" type="primary" @click="handleSelect"></el-button>
<el-button size="mini" type="success" @click="handleSelectNew" :loading="getNew">获取最新</el-button> <el-button size="mini" type="success" @click="handleSelectNews" :loading="getNew">获取最新</el-button>
<el-button size="mini" type="primary" @click="handleSendBs" :disabled="!mulSelect.length" :loading="bsLoad">推送北森</el-button> <el-button size="mini" type="primary" @click="handleSendBs" :disabled="!mulSelect.length" :loading="bsLoad">推送北森</el-button>
<el-button size="mini" type="warning" @click="handleJobExport" :disabled="!days.length" :loading="kqLoad">导出考勤记录</el-button>
</div> </div>
</div> </div>
<el-table v-loading="loading" @selection-change="handleSelectTab" @row-click="handleRowClick" :data="list" :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee', }" border ref="table"> <el-table v-loading="loading" @selection-change="handleSelectTab" @row-click="handleRowClick" :data="list" :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee', }" border ref="table">
<el-table-column <el-table-column type="selection" width="55"></el-table-column>
type="selection" <el-table-column align="center" prop="staffNum" label="编号"></el-table-column>
width="55"> <el-table-column align="center" prop="staffName" label="姓名"></el-table-column>
<!-- <el-table-column align="center" prop="deptNumber" label="部门编码"></el-table-column>
<el-table-column align="center" prop="deptName" label="部门名称"></el-table-column> -->
<el-table-column align="center" prop="firstDeptName" label="一级部门"></el-table-column>
<el-table-column align="center" prop="secondDeptName" label="二级部门"></el-table-column>
<el-table-column align="center" prop="threeDeptName" label="三级部门"></el-table-column>
<el-table-column align="center" prop="ruzhiTime" label="入场时间">
<template slot-scope="scope">{{ scope.row.ruzhiTime | timestampToDate }}</template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="deptNumber" label="部门编码"></el-table-column> <el-table-column align="center" prop="endTime" label="离场时间">
<el-table-column align="center" prop="deptName" label="部门名称"></el-table-column> <template slot-scope="scope">
<el-table-column align="center" prop="equipmentNum" label="设备编码"></el-table-column> {{ scope.row.endTime | timestampToDate }}
<el-table-column align="center" prop="staffName" label="员工名称"></el-table-column> </template>
<el-table-column align="center" prop="sex" label="性别"> </el-table-column>
<el-table-column align="center" prop="identityCard" label="服务类型" >
<template slot-scope='scope'> <template slot-scope='scope'>
{{ scope.row.sex?'女':'男' }} {{ scope.row.type ==0?'日结':'月结' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="identityCard" label="身份证号" min-width="100"></el-table-column> <el-table-column align="center" prop="remark" label="外包服务商" min-width="80"></el-table-column>
<el-table-column align="center" prop="mobilePhone" label="联系电话"></el-table-column> <el-table-column align="center" prop="checkTime" label="上班打卡时间" min-width="120">
<el-table-column align="center" prop="checkTime" label="打卡时间" min-width="100">
<template slot-scope='scope'> <template slot-scope='scope'>
{{ scope.row.checkTime | timestampToTime }} {{ scope.row.checkTime | timestampToTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="checkTime" label="下班打卡时间" min-width="120">
<template slot-scope='scope'>
{{ scope.row.checkEndTime | timestampToTime }}
</template>
</el-table-column>
<el-table-column align="center" prop="equipmentNum" label="设备编码"></el-table-column>
<el-table-column align="center" prop="equipmentName" label="设备名称"></el-table-column>
<el-table-column align="center" prop="status" label="状态" min-width="100"> <el-table-column align="center" prop="status" label="状态" min-width="100">
<template slot-scope='scope'> <template slot-scope='scope'>
<el-tag :type="scope.row.isBeisen?'':'warning'">{{ scope.row.isBeisen?'已推送北森':'未推送北森' }}</el-tag> <el-tag :type="scope.row.isBeisen?'':'warning'">
{{ scope.row.isBeisen?'已推送北森':'未推送北森' }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum" :page-sizes="[10,20,30,40,50]" :page-size="queryForm.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> <el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum" :page-sizes="[10,20,30,40,50]" :page-size="queryForm.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
<selectForm ref='selectForm' @init='init'></selectForm> <select-form ref='selectForm' @init='init'></select-form>
<getNew ref="getNew" @handleSelectNew="handleSelectNew"></getNew>
</div> </div>
</template> </template>
<script> <script>
import { jobContentList,getJobContext,jobSendBeisen } from "../../../api/storeManage.js"; import { jobContentList, getJobContext, jobSendBeisen, jobContextExport, getRegionList } from "../../../api/storeManage.js";
import selectForm from './select' import selectForm from './select'
import axios from "axios"; import getNew from './getNew.vue'
export default { export default {
components: { components: {
selectForm selectForm,
getNew
}, },
data() { data() {
return { return {
zhongkongDeptId: [],
deptOptions: [],
kqLoad: false,
list: [], list: [],
queryForm: { queryForm: {
pageNum: 1, pageNum: 1,
@ -67,7 +95,7 @@ export default {
}, },
filters: { filters: {
timestampToTime(timestamp) { timestampToTime(timestamp) {
timestamp = timestamp ? timestamp : null; if (!timestamp) return '--'
let date = new Date(timestamp); //10*1000131000 let date = new Date(timestamp); //10*1000131000
let Y = date.getFullYear() + '-'; let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
@ -76,12 +104,77 @@ export default {
let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'; let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds(); let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D + h + m + s; return Y + M + D + h + m + s;
},
timestampToDate(timestamp) {
if (!timestamp) return '--'
let date = new Date(timestamp); //10*1000131000
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
// let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
// let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
// let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
// return Y + M + D + h + m + s;
return Y + M + D;
} }
}, },
created() { created() {
this.getDeptInit()
this.init() this.init()
}, },
methods: { methods: {
getDeptInit() {
let params = {
storeId: sessionStorage.getItem("parentId")
}
getRegionList(params).then(res => {
if (res.code == '000000') {
this.deptOptions = this.replaceRegionListToChildren(res.data)
}
})
},
replaceRegionListToChildren(treeArray) {
if (!Array.isArray(treeArray)) {
return treeArray;
}
return treeArray.map((node) => {
const newNode = { ...node, label: node.regionName, value: node.id };
if (Array.isArray(newNode.regionListVoList) && newNode.regionListVoList.length) {
newNode.children = this.replaceRegionListToChildren(newNode.regionListVoList);
delete newNode.regionListVoList;
}
return newNode;
});
},
handleJobExport() {
let params = {
startTime: this.formatTime(this.days[0], "YYYY-MM-DD 00:00:00"),
lastTime: this.formatTime(this.days[1], "YYYY-MM-DD") + ' 23:59:59',
storeId: sessionStorage.getItem("parentId"),
}
//
let form = Object.assign(this.$refs.selectForm.searchForm, this.queryForm)
for (let k in form) {
if (form[k]) {
params[k] = form[k]
}
}
//
params.pageNum = 1,
params.pageSize = 9999,
this.kqLoad = true
jobContextExport(params).then(res => {
this.kqLoad = false
let blob = new Blob([res]);
var a = document.createElement("a");
var url = window.URL.createObjectURL(blob);
console.log(url);
a.href = url;
a.download = "临时工考勤记录导出表.xlsx";
a.click();
window.URL.revokeObjectURL(url);
})
},
handleSelectTab(row) { handleSelectTab(row) {
this.mulSelect = row; this.mulSelect = row;
}, },
@ -114,21 +207,44 @@ export default {
}) })
}); });
}, },
handleSelectNew(){ timestampToTime(timestamp) {
let params = {} timestamp = timestamp ? timestamp : null;
try{ if (!timestamp) {
if(this.days.length){ return ''
params.starttime = this.formatTime(this.days[0],"YYYY-MM-DD 00:00:00");
params.endtime = this.formatTime(this.days[1],"YYYY-MM-DD 23:59:59" );
}
}catch(err){
params.starttime = null
params.endtime = null
} }
let date = new Date(timestamp);
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D;
},
getCurrentAndTomorrowDate() {
let today = new Date();
let tomorrow = new Date(today);
tomorrow.setDate(today.getDate());
let starttime = this.formatDate(today);
let endtime = this.formatDate(tomorrow);
return { starttime, endtime };
},
formatDate(date) {
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
return Y + M + D;
},
handleSelectNews() {
this.$refs.getNew.dataDialog = true
},
handleSelectNew(params) {
this.getNew = true this.getNew = true
getJobContext(params).then(res => { getJobContext(params).then(res => {
this.getNew = false this.getNew = false
if (res.code == '000000') { if (res.code == '000000') {
this.$refs.getNew.loading = false
this.$refs.getNew.dataDialog = false
this.init() this.init()
} }
}) })
@ -141,12 +257,20 @@ export default {
const year = date.getFullYear(); const year = date.getFullYear();
const month = ("0" + (date.getMonth() + 1)).slice(-2); const month = ("0" + (date.getMonth() + 1)).slice(-2);
const day = ("0" + date.getDate()).slice(-2); const day = ("0" + date.getDate()).slice(-2);
const hour = ("0" + date.getHours()).slice(-2);
const minute = ("0" + date.getMinutes()).slice(-2);
const second = ("0" + date.getSeconds()).slice(-2);
const formattedTime = `${year}-${month}-${day}`; const formattedTime = `${year}-${month}-${day}`;
return formattedTime; return formattedTime;
}, },
getNextDate(dateStr) {
let date = new Date(dateStr);
date.setDate(date.getDate() + 1);
let Y = date.getFullYear();
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
return Y + '-' + M + '-' + D;
},
handleDept() {
this.init()
},
init(val) { init(val) {
val = val ? val : {} val = val ? val : {}
this.loading = true this.loading = true
@ -154,17 +278,17 @@ export default {
try { try {
if (this.days.length) { if (this.days.length) {
params.startTime = this.formatTime(this.days[0], "YYYY-MM-DD 00:00:00"); params.startTime = this.formatTime(this.days[0], "YYYY-MM-DD 00:00:00");
params.lastTime = this.formatTime(this.days[1],"YYYY-MM-DD 23:59:59" ); params.lastTime = this.formatTime(this.days[1], "YYYY-MM-DD") + ' 23:59:59';
} }
} catch (err) { } catch (err) {
params.startTime = null params.startTime = null
params.lastTime = null params.lastTime = null
} }
console.log(params)
params.staffName = params.staffName || null params.staffName = params.staffName || null
jobContentList(params).then(res => { jobContentList(params).then(res => {
this.loading = false this.loading = false
if (res.code == '000000') { if (res.code == '000000') {
console.log(res)
this.list = res.pageInfo.list this.list = res.pageInfo.list
this.total = res.pageInfo.total this.total = res.pageInfo.total
} }
@ -172,9 +296,11 @@ export default {
}, },
handleSizeChange(size) { handleSizeChange(size) {
this.queryForm.pageSize = size this.queryForm.pageSize = size
this.init()
}, },
handleCurrentChange(current) { handleCurrentChange(current) {
this.queryForm.current = current this.queryForm.pageNum = current
this.init()
} }
} }
}; };

@ -2,16 +2,21 @@
<div> <div>
<el-dialog title="搜索" :visible.sync="searchDialog" width="600px"> <el-dialog title="搜索" :visible.sync="searchDialog" width="600px">
<el-form :model="searchForm"> <el-form :model="searchForm">
<el-form-item label="区域:" label-width="120px"> <!-- <el-form-item label="部门:" label-width="120px">
<div class="searchDiv"> <div class="searchDiv">
<el-select v-model="searchForm.regionId" filterable placeholder="请选择"> <el-cascader
<el-option :options="deptOptions"
v-for="item in options" v-model="zhongkongDeptId"
:key="item.value" placeholder="请选择部门"
:label="item.label" @change="handleDeptChange"
:value="item.value"> :props="{ checkStrictly: true, value: 'regionNum', children: 'regionListVoList' , label: 'regionName' }"
</el-option> clearable>
</el-select> </el-cascader>
</div>
</el-form-item> -->
<el-form-item label="员工编码:" label-width="120px">
<div class="searchDiv">
<el-input size="medium" maxlength="11" v-model="searchForm.staffNum" placeholder="输入要查询的员工编码" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="手机号:" label-width="120px"> <el-form-item label="手机号:" label-width="120px">
@ -19,22 +24,22 @@
<el-input size="medium" maxlength="11" v-model="searchForm.mobilePhone" placeholder="输入要查询的设备名称" clearable></el-input> <el-input size="medium" maxlength="11" v-model="searchForm.mobilePhone" placeholder="输入要查询的设备名称" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="性别:" label-width="120px"> <!-- <el-form-item label="性别:" label-width="120px">
<div class="searchDiv"> <div class="searchDiv">
<el-radio-group v-model="searchForm.sex" fill="#f78989"> <el-radio-group v-model="searchForm.sex" fill="#f78989">
<el-radio label="0" size="medium" type="primary"></el-radio> <el-radio label="0" size="medium" type="primary"></el-radio>
<el-radio label="1" size="medium" type="primary"></el-radio> <el-radio label="1" size="medium" type="primary"></el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</el-form-item> </el-form-item> -->
<el-form-item label="打卡类型:" label-width="120px"> <!-- <el-form-item label="打卡类型:" label-width="120px">
<div class="searchDiv"> <div class="searchDiv">
<el-radio-group v-model="searchForm.type" fill="#f78989"> <el-radio-group v-model="searchForm.type" fill="#f78989">
<el-radio label="0" size="medium" type="primary">上班</el-radio> <el-radio label="0" size="medium" type="primary">上班</el-radio>
<el-radio label="1" size="medium" type="primary">下班</el-radio> <el-radio label="1" size="medium" type="primary">下班</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button> <el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button>
@ -51,27 +56,28 @@
return { return {
searchForm:{}, searchForm:{},
searchDialog:false, searchDialog:false,
options:[] deptOptions:[],
zhongkongDeptId:""
} }
}, },
created(){ created(){
this.getRegionList() this.getDeptInit()
}, },
methods: { methods: {
getRegionList(){ handleDeptChange(ids){
if(ids.length){
this.searchForm.deptNum = ids[ids.length-1]
}else{
this.searchForm.deptNum = ''
}
},
getDeptInit(){
let params = { let params = {
pageNum:1,
pageSize:999,
storeId:sessionStorage.getItem("parentId") storeId:sessionStorage.getItem("parentId")
} }
getRegionList(params).then(res=>{ getRegionList(params).then(res=>{
if(res.code == '000000'){ if(res.code == '000000'){
this.options = res.pageInfo.list.map(item=>{ this.deptOptions = res.data
return {
label:item.regionName,
value:item.id
}
})
} }
}) })
}, },

@ -1,82 +1,189 @@
<template> <template>
<div> <div>
<el-dialog title="录入临时工" :visible.sync="searchDialog" width="600px"> <el-dialog :title="title" :visible.sync="searchDialog" width="600px" :close-on-click-modal="false">
<el-form :model="searchForm"> <el-form :model="searchForm" ref="form" :rules="rules">
<el-form-item label="姓名:" label-width="120px">
<el-form-item label="人员编码:" label-width="120px" v-if="title != '录入临时工'">
<div class="searchDiv"> <div class="searchDiv">
<el-input size="medium" v-model="searchForm.staffName" placeholder="输入要姓名" clearable></el-input> <el-input size="medium" v-model="searchForm.staffNum" placeholder="输入人员编码" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="手机号:" label-width="120px">
<el-form-item label="姓名:" label-width="120px" prop="staffName">
<div class="searchDiv"> <div class="searchDiv">
<el-input size="medium" v-model="searchForm.mobilePhone" placeholder="输入要手机号" clearable></el-input> <el-input size="medium" v-model="searchForm.staffName" placeholder="输入姓名" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="身份证:" label-width="120px">
<el-form-item label="手机号:" label-width="120px" prop="mobilePhone">
<div class="searchDiv"> <div class="searchDiv">
<el-input size="medium" v-model="searchForm.identityCard" placeholder="输入要身份证" clearable></el-input> <el-input size="medium" v-model="searchForm.mobilePhone" placeholder="输入手机号" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="邮箱:" label-width="120px">
<el-form-item label="身份证:" label-width="120px" prop="identityCard">
<div class="searchDiv"> <div class="searchDiv">
<el-input size="medium" v-model="searchForm.email" placeholder="输入要邮箱" clearable></el-input> <el-input size="medium" v-model="searchForm.identityCard" placeholder="输入身份证" clearable @change="getGenderFromIdCard"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="性别:" label-width="120px">
<el-form-item label="性别:" label-width="120px" prop="sex">
<div class="searchDiv"> <div class="searchDiv">
<el-radio-group v-model="searchForm.sex" fill="#f78989"> <el-radio-group v-model="searchForm.sex" fill="#f78989">
<el-radio label="0" size="medium" type="primary"></el-radio> <el-radio :label="0" size="medium" type="primary"></el-radio>
<el-radio label="1" size="medium" type="primary"></el-radio> <el-radio :label="1" size="medium" type="primary"></el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="结算:" label-width="120px">
<el-form-item label="紧急联系人:" label-width="120px" prop="urgentName">
<div class="searchDiv"> <div class="searchDiv">
<el-radio-group v-model="searchForm.job" fill="#f78989"> <el-input size="medium" v-model="searchForm.urgentName" placeholder="输入紧急联系人" clearable></el-input>
<el-radio label="0" size="medium" type="primary">日结</el-radio> </div>
<el-radio label="1" size="medium" type="primary">月结</el-radio> </el-form-item>
<el-form-item label="紧急联系人电话:" label-width="120px" prop="urgentPhone">
<div class="searchDiv">
<el-input size="medium" v-model="searchForm.urgentPhone" placeholder="输入紧急联系人电话" clearable></el-input>
</div>
</el-form-item>
<el-form-item label="紧急联系人关系:" label-width="120px" prop="urgentRelationship">
<div class="searchDiv">
<div class="searchDiv">
<el-radio-group v-model="searchForm.urgentRelationship" fill="#f78989">
<el-radio label="配偶" size="medium" type="primary">配偶</el-radio>
<el-radio label="父母" size="medium" type="primary">父母</el-radio>
<el-radio label="子女" size="medium" type="primary">子女</el-radio>
<el-radio label="兄弟姐妹" size="medium" type="primary">兄弟姐妹</el-radio>
</el-radio-group>
</div>
</div>
</el-form-item>
<el-form-item label="状态:" label-width="120px" v-if='title != ""' prop="state">
<div class="searchDiv">
<el-radio-group v-model="searchForm.state" fill="#f78989">
<el-radio :label="0" size="medium" type="primary">正常</el-radio>
<el-radio :label="1" size="medium" type="primary">异常</el-radio>
</el-radio-group>
</div>
</el-form-item>
<el-form-item label="服务类型:" label-width="120px" :prop="title == '录入临时工'?'job':'type'">
<div class="searchDiv">
<el-radio-group v-model="searchForm.job" fill="#f78989" v-if='title == ""'>
<el-radio :label="0" size="medium" type="primary">日结</el-radio>
<el-radio :label="1" size="medium" type="primary">月结</el-radio>
</el-radio-group>
<el-radio-group v-model="searchForm.type" fill="#f78989" v-else>
<el-radio :label="0" size="medium" type="primary">日结</el-radio>
<el-radio :label="1" size="medium" type="primary">月结</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item
label="上传附件:" <el-form-item label="入场时间:" label-width="120px" prop="ruzhiTime">
:rules="[{ required: true, message: '请上传附件!', trigger: 'blur' }]" <div class="searchDiv">
prop="file" <el-date-picker
label-width="120px" v-model="searchForm.ruzhiTime"
> type="date"
placeholder="选择日期时间">
</el-date-picker>
</div>
</el-form-item>
<el-form-item label="外包服务商:" label-width="120px" prop="remark">
<div class="searchDiv">
<el-input size="medium" v-model="searchForm.remark" placeholder="输入外服务商" clearable></el-input>
</div>
</el-form-item>
<el-form-item label="上传头像:" label-width="120px">
<el-upload <el-upload
style="width:400px" style="width:400px"
action="" action="#"
v-model="searchForm.fileList" v-model="searchForm.fileList"
multiple
:http-request="uploadFile" :http-request="uploadFile"
:file-list="fileList"
list-type="picture" list-type="picture"
ref="upload" ref="upload">
>
<el-button size="mini" type="danger ">点击上传人像</el-button> <el-button size="mini" type="danger ">点击上传人像</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button> <el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button>
<el-button type="primary" size="mini" :loading="loading" @click="search()"> </el-button> <el-button type="primary" size="mini" :loading="loading" @click="search()"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { addStaffs } from "../../../api/storeManage.js"; import { addStaffs,updateById } from "../../../api/storeManage.js";
export default { export default {
data() { data() {
return { return {
fileList:[],
rules:{
staffName: [
{ required: true, message: '请输入输入姓名', trigger: 'blur' },
],
mobilePhone: [
{ required: true, message: '请输入输入手机号', trigger: 'blur' },
],
identityCard: [
{ required: true, message: '请输入输入身份证', trigger: 'blur' },
],
sex: [
{ required: true, message: '请选择性别', trigger: 'change' },
],
urgentName: [
{ required: true, message: '请输入紧急联系人', trigger: 'change' },
],
urgentPhone: [
{ required: true, message: '请输入紧急联系人电话', trigger: 'change' },
],
urgentRelationship: [
{ required: true, message: '请选择紧急联系人关系', trigger: 'change' },
],
job:[
{ required: true, message: '请选择服务类型', trigger: 'change' },
],
type:[
{ required: true, message: '请选择服务类型', trigger: 'change' },
],
ruzhiTime:[
{ required: true, message: '请选择入场时间', trigger: 'change' },
],
remark:[
{ required: true, message: '请输入输入外包服务商', trigger: 'blur' },
]
},
loading:false, loading:false,
searchForm:{ searchForm:{
storeId: sessionStorage.getItem("parentId") storeId: sessionStorage.getItem("parentId")
}, },
searchDialog:false, searchDialog:false,
title:''
} }
}, },
methods: { methods: {
getGenderFromIdCard(idCard) {
if (idCard.length == 18) {
const genderDigit = parseInt(idCard.charAt(idCard.length - 2)) % 2;
if (genderDigit === 0) {
this.$set(this.searchForm,'sex',1)
} else {
this.$set(this.searchForm,'sex',0)
}
}else{
this.$set(this.searchForm,'sex','')
}
},
fileToBase64(file) { fileToBase64(file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const reader = new FileReader(); const reader = new FileReader();
@ -91,12 +198,34 @@
}); });
}, },
uploadFile(file) { uploadFile(file) {
const isLt500K = file.file.size / 1024 ;
if (isLt500K>500) {
this.$message.error('上传的图片大小不能超过 500KB!');
this.fileList = []
}else{
this.fileToBase64(file.file).then(res=>{ this.fileToBase64(file.file).then(res=>{
this.searchForm.facesInformation = res this.searchForm.facesInformation = res
}) })
}
}, },
search(){ search(){
if(!this.searchForm.facesInformation){
return this.$alert('请上传人像照片', "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true this.loading = true
if(this.title == '录入临时工'){
this.searchForm.ruzhiTime = this.formatTime(
this.searchForm.ruzhiTime,
"YYYY-MM-DD 09:00:00"
);
addStaffs(this.searchForm).then(res=>{ addStaffs(this.searchForm).then(res=>{
this.loading = false this.loading = false
if(res.code == '000000'){ if(res.code == '000000'){
@ -113,9 +242,44 @@
}); });
} }
}) })
}else{
this.searchForm.ruzhiTime = this.formatTime(
this.searchForm.ruzhiTime,
"YYYY-MM-DD 09:00:00"
);
updateById(this.searchForm).then(res=>{
this.loading = false
if(res.code == '000000'){
this.searchDialog = false
this.$message.success({ message: '修改成功' });
this.$emit('init')
}else{
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
})
}
}
});
}, },
show(){ show(title,row){
Object.assign(this.$data, this.$options.data.call(this));
this.searchDialog = true this.searchDialog = true
this.title = title
if(title == '录入临时工'){
this.$nextTick(()=>{
this.fileList = []
this.$refs['form'].resetFields();
this.searchForm = { storeId: sessionStorage.getItem("parentId")}
})
}else{
this.searchForm = { ...row }
}
} }
}, },
} }

@ -27,11 +27,11 @@
data() { data() {
return { return {
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(date) {
const today = new Date(); const today = new Date();
const selectedDate = new Date(time.getFullYear(), time.getMonth(), time.getDate()); today.setHours(0, 0, 0, 0); //
return selectedDate.getTime() < today.getTime(); return date < today;
}, }
}, },
searchForm:{ searchForm:{
}, },

@ -4,45 +4,81 @@
<div> <div>
<el-button size="mini" type="success" @click='handleAddStaff'>手工录入</el-button> <el-button size="mini" type="success" @click='handleAddStaff'>手工录入</el-button>
</div> </div>
<div class="flex" style="margin-left: auto" > <div class="flex" style="margin-left: auto;align-items: center;">
<el-date-picker <el-date-picker
style="margin-right: 10px;width:220px" @change="init"
style="margin-right: 10px;width:200px"
v-model="date" v-model="date"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
<el-input style="margin-right: 10px;width:150px" placeholder="请输入员工姓名" v-model="queryForm.staffName"></el-input> <el-input style="margin-right: 10px;width:100px" placeholder="请输入员工姓名" v-model="queryForm.staffName" @change="init"></el-input>
<el-button size="mini" type="primary" @click='init'>查询</el-button> <el-input style="margin-right: 10px;width:100px" placeholder="请输入服务商" v-model="queryForm.remark" @change="init"></el-input>
<!-- :show-all-levels="false" -->
<el-cascader
ref='cascader'
:options="deptOptions"
style="margin-right: 10px;width:150px"
v-model="queryForm.deptIds"
:show-all-levels="false"
placeholder="请选择部门"
@change="init"
:props="{ multiple: true, checkStrictly: false,emitPath:false }"
clearable>
</el-cascader>
<el-select v-model="queryForm.type" placeholder="服务类型" style="margin-right: 10px;width:150px" @change="init" clearable >
<el-option
v-for="item in [{label:'全部',value:null},{label:'日结',value:0},{label:'月结',value:1}]"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="queryForm.isZhongkong" placeholder="是否入场" style="margin-right: 10px;width:150px" @change="init" clearable >
<el-option
v-for="item in [{label:'全部',value:null},{label:'已入场',value:1},{label:'待入场',value:0}]"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-button size="mini" @click='reset' type="warning">清空</el-button>
<!-- <el-button size="mini" type="primary" @click='init'>查询</el-button> -->
<el-button size="mini" type="primary" @click="handleSelect"></el-button> <el-button size="mini" type="primary" @click="handleSelect"></el-button>
<el-button size="mini" type="success" @click="handleSendZK" :disabled="!mulSelect.length">推送中控</el-button> <el-button size="mini" type="success" @click="handleSendZK" :disabled="!mulSelect.length">推送中控</el-button>
<el-button size="mini" type="success" @click="handleSendBs" :disabled="!mulSelect.length">推送北森</el-button> <el-button size="mini" type="success" @click="handleSendBs" :disabled="!mulSelect.length">推送北森</el-button>
<el-button size="mini" type="warning" @click="handleZkFz" :loading="fzLoading" :disabled="!mulSelect.length">中控复职</el-button> <!-- <el-button size="mini" type="warning" @click="handleZkFz" :loading="fzLoading" :disabled="!mulSelect.length">中控复职</el-button> -->
<el-button size="mini" type="danger" @click='handleLeave' :disabled="!mulSelect.length" :bsLoad='bsLoad'>中控离职</el-button> <el-button size="mini" type="danger" @click='handleLeave' :disabled="!mulSelect.length" :bsLoad='bsLoad'>中控离</el-button>
<el-button size="mini" type="danger" @click='handleLeaveBs' :disabled="!mulSelect.length">北森停用</el-button> <el-button size="mini" type="danger" @click='handleLeaveBs' :disabled="!mulSelect.length">北森停用</el-button>
<el-button size="mini" type="danger" icon="el-icon-delete" circle :disabled="!mulSelect.length" @click='handleDel'></el-button>
<el-button size="mini" type="warning" icon="el-icon-setting" circle :disabled="!mulSelect.length" @click="handleSetupShow"></el-button>
</div> </div>
</div> </div>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectTab" @row-click="handleRowClick" :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee', }" ref="table"> <el-table v-loading="loading" :data="list" @selection-change="handleSelectTab" @row-click="handleRowClick" :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee', }" ref="table">
<el-table-column <el-table-column
type="selection" type="selection"
fixed="left"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column align="center" label="北森系统ID"> <el-table-column align="center" label="北森系统ID">
<template slot-scope='scope'> <template slot-scope='scope'>
{{ scope.row.blackList.beisenUserId?scope.row.blackList.beisenUserId:'--' }} {{ scope.row.blackList?scope.row.blackList.beisenUserId?scope.row.blackList.beisenUserId:'--':'--' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="staffName" label="姓名" ></el-table-column> <el-table-column align="center" prop="staffName" label="姓名" fixed="left"></el-table-column>
<el-table-column align="center" prop="staffNum" label="人员编号" ></el-table-column> <el-table-column align="center" prop="staffNum" label="人员编号" fixed="left"></el-table-column>
<el-table-column align="center" prop="zhongkongDeptName" label="中控部门" fixed="left"></el-table-column>
<el-table-column align="center" prop="beisenDeptName" label="北森部门" fixed="left"></el-table-column>
<el-table-column align="center" prop="sex" label="性别"> <el-table-column align="center" prop="sex" label="性别">
<template slot-scope='scope'> <template slot-scope='scope'>
{{ scope.row.sex?'女':'男' }} {{ scope.row.sex?'女':'男' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号" width="100px"></el-table-column> <el-table-column align="center" prop="mobilePhone" label="手机号" width="110px"></el-table-column>
<el-table-column align="center" prop="identityCard" label="证件号" width="150px"></el-table-column> <el-table-column align="center" prop="identityCard" label="证件号" width="160px"></el-table-column>
<el-table-column align="center" prop="type" label="结算" > <el-table-column align="center" prop="type" label="服务类型">
<template slot-scope='scope'> <template slot-scope='scope'>
{{ scope.row.type ==0?'日结':'月结' }} {{ scope.row.type ==0?'日结':'月结' }}
</template> </template>
@ -52,12 +88,25 @@
{{ scope.row.state ==0?'正常':'异常' }} {{ scope.row.state ==0?'正常':'异常' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="scanTime" label="注册时间" width="135px"> <el-table-column align="center" label="推送状态" max-width="350px" min-width="250px">
<template slot-scope='scope'> <template slot-scope='scope'>
{{ scope.row.scanTime | timestampToTime }} <el-tag :type="scope.row.isBeisen==1?'':scope.row.isBeisen==2?'success':'warning'">{{ scope.row.isBeisen==1?'系统自动推送':scope.row.isBeisen==2?'已推送北森':'未推送北森' }}</el-tag>
<el-tag :type="scope.row.isZhongkong?'':'warning'">{{ scope.row.isZhongkong?'已推送中控':'未推送中控' }}</el-tag>
<el-tag type="danger" v-if='scope.row.beisenDimission && scope.row.isBeisen == 2'>{{ '北森已离场' }}</el-tag>
<el-tag type="danger" v-if='scope.row.zhongkongDimission && scope.row.isZhongkong'>{{ '中控已离场' }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="ruzhiTime" label="入场时间" min-width="100">
<template slot-scope='scope'>
{{ scope.row.ruzhiTime | timestampToTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="图像" > <el-table-column align="center" prop="remark" label="外包服务商"></el-table-column>
<el-table-column align="center" prop="sendTime" label="推送北森时间" width="150px"></el-table-column>
<el-table-column align="center" prop="beisenDimissionDate" label="操作北森时间" width="150px"></el-table-column>
<el-table-column align="center" prop="sendZhongkongTime" label="推送中控时间" width="150px"></el-table-column>
<el-table-column align="center" prop="zhongkongDimissionDate" label="操作中控时间" width="150px"></el-table-column>
<el-table-column align="center" label="图像" fixed="right">
<template slot-scope='scope'> <template slot-scope='scope'>
<el-image <el-image
style="width: 20px; height: 20px" style="width: 20px; height: 20px"
@ -66,41 +115,56 @@
</el-image> </el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="sendTime" label="推送北森时间" width="135px"></el-table-column> <el-table-column align="center" label="操作" fixed="right" min-width="100">
<el-table-column align="center" prop="beisenDimissionDate" label="操作北森时间" width="135px"></el-table-column>
<el-table-column align="center" prop="sendZhongkongTime" label="推送中控时间" width="135px"></el-table-column>
<el-table-column align="center" prop="zhongkongDimissionDate" label="操作中控时间" width="135px"></el-table-column>
<el-table-column align="center" label="状态" width="350px" fixed="right">
<template slot-scope='scope'> <template slot-scope='scope'>
<el-tag :type="scope.row.isBeisen==1?'':scope.row.isBeisen==2?'success':'warning'">{{ scope.row.isBeisen==1?'系统自动推送':scope.row.isBeisen==2?'已推送北森':'未推送北森' }}</el-tag> <el-button type="text" @click='handleUpdate(scope.row)'>修改</el-button>
<el-tag :type="scope.row.sendZhongkongId?'':'warning'">{{ scope.row.sendZhongkongId?'已推送中控':'未推送中控' }}</el-tag> <el-button type="text" @click='handleDel2(scope.row.id)' style='color:red'>删除</el-button>
<el-tag type="danger" v-if='scope.row.beisenDimission'>{{ '已离职北森' }}</el-tag>
<el-tag type="danger" v-if='scope.row.zhongkongDimission'>{{ '已离职中控' }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" label="操作" min-width="100px" fixed="right"> <!-- <el-table-column align="center" label="删除" fixed="right">
<template slot-scope='scope'> --> <template slot-scope='scope'>
<!-- <el-button type="text" style='color:red' v-if='scope.row.sendZhongkongId && !scope.row.zhongkongDimission' @click='handleLeave(scope.row)'>中控离职</el-button> --> <el-button type="text" @click='handleDel2(scope.row.id)' style='color:red'>删除</el-button>
<!-- <el-dropdown> </template>
<span class="el-dropdown-link">更多操作<i class="el-icon-arrow-down el-icon--right"></i></span> </el-table-column> -->
<el-dropdown-menu slot="dropdown" trigger="click"> <!-- <el-table-column align="center" label="修改记录" fixed="right">
<el-dropdown-item v-if='scope.row.zhongkongDimission'> <template slot-scope='scope'>
<span @click='handleRecover(scope.row)'>中控复职</span> <el-button type="text" @click="handleShow(scope.row)"></el-button>
</el-dropdown-item> </template>
<el-dropdown-item v-if="!scope.row.state&&!scope.row.sendTime" > </el-table-column> -->
<span @click='handleSendBs(scope.row)' :loading="bsLoad">推送北森</span> <!-- <el-table-column align="center" min-width="180" label="是否允许修改" fixed="right">
</el-dropdown-item> <template slot-scope='scope'>
<el-dropdown-item v-if="!scope.row.state&&!scope.row.sendZhongkongTime"> <el-switch
<span @click='handleSendZK(scope.row)' :loading="bsLoad">推送中控</span> @change='handleUpdates(scope.row)'
</el-dropdown-item> :active-value="1"
</el-dropdown-menu> :inactive-value="0"
</el-dropdown> v-model="scope.row.isUpdate"
</el-dropdown> --> active-text="允许"
<!-- </template> inactive-text="禁止">
</el-switch>
</template>
</el-table-column>
<el-table-column align="center" label="修改" fixed="right">
<template slot-scope='scope'>
<el-button type="text" @click='handleUpdate(scope.row)' v-if='scope.row.isUpdate'>修改</el-button>
</template>
</el-table-column> -->
<!-- <el-table-column align="center" label="删除" fixed="right">
<template slot-scope='scope'>
<el-button type="text" @click='handleDel(scope.row.id)' style='color:red'>删除</el-button>
</template>
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
<div class="block"> <div class="block">
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum" :page-sizes="[10,20,30,40,50]" :page-size="queryForm.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> <el-pagination
align="left"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryForm.pageNum"
:page-sizes="[10,20,30,40,50]"
:page-size="queryForm.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div> </div>
<selectForm ref="select" @init='init'></selectForm> <selectForm ref="select" @init='init'></selectForm>
<leave ref='leave' @handleZkLeave='sendZhongkongDimission'></leave> <leave ref='leave' @handleZkLeave='sendZhongkongDimission'></leave>
@ -109,28 +173,33 @@
<sendPre ref='sendPre' @init='init'></sendPre> <sendPre ref='sendPre' @init='init'></sendPre>
<addStaff ref='addStaff' @init='init'></addStaff> <addStaff ref='addStaff' @init='init'></addStaff>
<bsLeave ref='bsLeave' @init='init'></bsLeave> <bsLeave ref='bsLeave' @init='init'></bsLeave>
<mulSetup ref="mulSetup" @init='init'></mulSetup>
<updateList ref="updateList"></updateList>
</div> </div>
</template> </template>
<script> <script>
import updateList from './updateList.vue'
import addStaff from './addStaff.vue' import addStaff from './addStaff.vue'
import leave from '@/pages/qyMange/lsg/leave' import leave from '@/pages/qyMange/lsg/leave'
import selectForm from './select' import selectForm from './select'
import { staffTemporary,sendZhongkong,getBsToken,sendZhongkongDimission,sendBeisenDimission,ruzhiZhongkongDimission,delSendBeisenDimission } from "../../../api/storeManage.js"; import { staffTemporary,sendZhongkong,sendBeisenDimission,ruzhiZhongkongDimission,updateById,deleteByList,getRegionList } from "../../../api/storeManage.js"
import axios from "axios";
import sendZK from '@/pages/qyMange/lsg/sendZK' import sendZK from '@/pages/qyMange/lsg/sendZK'
import sendBs from '@/pages/qyMange/lsg/sendBs' import sendBs from '@/pages/qyMange/lsg/sendBs'
import sendPre from '@/pages/qyMange/lsg/sendPre' import sendPre from '@/pages/qyMange/lsg/sendPre'
import bsLeave from './bsLeave.vue' import bsLeave from './bsLeave.vue'
import mulSetup from './mulSetup.vue';
export default { export default {
components:{ components:{
selectForm,leave,sendZK,sendBs,sendPre,addStaff,bsLeave selectForm,leave,sendZK,sendBs,sendPre,addStaff,bsLeave,mulSetup,updateList
}, },
data() { data() {
return { return {
deptOptions:[],
fzLoading:false, fzLoading:false,
bsLoad:false, bsLoad:false,
date:[], date:[],
list: [], list: [],
deptIds:[],
queryForm:{ queryForm:{
pageNum:1, pageNum:1,
pageSize:10, pageSize:10,
@ -147,28 +216,136 @@
filters:{ filters:{
timestampToTime(timestamp) { timestampToTime(timestamp) {
timestamp = timestamp ? timestamp : null; timestamp = timestamp ? timestamp : null;
let date = new Date(timestamp);//10*1000131000 if(!timestamp){
return ''
}
let date = new Date(timestamp);
let Y = date.getFullYear() + '-'; let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '; let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'; let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'; let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds(); let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D + h + m + s; return Y + M + D;
} }
}, },
created() { created() {
this.init() this.init()
getRegionList({storeId:sessionStorage.getItem("parentId")}).then(res=>{
if(res.code == '000000'){
this.deptOptions = this.replaceRegionListToChildren(res.data)
}
})
}, },
methods:{ methods:{
replaceRegionListToChildren(treeArray) {
if (!Array.isArray(treeArray)) {
return treeArray;
}
return treeArray.map((node) => {
const newNode = { ...node,label:node.regionName,value:node.id };
if (Array.isArray(newNode.regionListVoList)&&newNode.regionListVoList.length) {
newNode.children = this.replaceRegionListToChildren(newNode.regionListVoList);
delete newNode.regionListVoList;
}
return newNode;
});
},
reset(){
this.date = []
this.queryForm = {
pageNum:1,
pageSize:10,
storeId: sessionStorage.getItem("parentId")
}
this.$refs.select.searchForm = {}
this.init()
},
handleShow(row){
this.$refs.updateList.show()
},
handleSetupShow(){
this.$refs.mulSetup.show(this.mulSelect)
},
handleDel2(id){
this.$confirm('是否删除该记录?', '删除', {
distinguishCancelAndClose: true,
confirmButtonText: '是',
cancelButtonText: '否'
}).then(res=>{
let params = {
ids:[id]
}
deleteByList(params).then(res=>{
if(res.code == '000000'){
this.$message.success({ message: '删除成功' });
this.init()
}else{
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
})
})
},
handleDel(){
this.$confirm('是否批量删除记录?', '删除', {
distinguishCancelAndClose: true,
confirmButtonText: '是',
cancelButtonText: '否'
}).then(res=>{
let params = {
ids:this.mulSelect.map( item=>item.id )
}
console.log(params)
deleteByList(params).then(res=>{
if(res.code == '000000'){
this.$message.success({ message: '删除成功' });
this.init()
}else{
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
})
})
},
handleUpdates(row){
updateById(row).then(res=>{
if(res.code == '000000'){
this.searchDialog = false
this.$message.success({ message: '修改成功' });
this.init()
}else{
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
})
},
handleSelectTab(row) { handleSelectTab(row) {
this.mulSelect = row; this.mulSelect = row;
}, },
handleRowClick(row) { handleRowClick(row) {
this.$refs.table.toggleRowSelection(row) this.$refs.table.toggleRowSelection(row)
}, },
handleUpdate(row){
this.$refs.addStaff.show('修改临时工',row)
},
handleAddStaff(){ handleAddStaff(){
this.$refs.addStaff.show() this.$refs.addStaff.show('录入临时工')
}, },
sendBeisenDimission(row){ sendBeisenDimission(row){
let params = { let params = {
@ -205,59 +382,12 @@
} }
}) })
}, },
// handleRecover(row){
// this.$confirm("?", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// cancelButtonClass: "cancelbtnFalses",
// confirmButtonClass: "confirmbtnFalses",
// type: "warning",
// }).then(() => {
// let data = {
// userpin:[row.staffNum]
// }
// axios.post(`http://${this.host}/api/v2/employee/restore/?key=${this.accessKey}`,data).then(res=>{
// this.configLoing = false
// if(res.status == 200){
// if(res.data.ret == 0){
// this.$message.success({ message: "!" });
// let params = {
// ...row,
// endType:0,
// endTime: this.formatTime(new Date(new Date().getTime() + 24*60*60*1000), "YYYY-MM-DD hh:mm:ss")
// }
// ruzhiZhongkongDimission(params).then(res=>{
// if(res.code == '000000'){
// this.init()
// }
// })
// this.init()
// }else{
// this.$alert(res.data.msg, "", {
// confirmButtonText: "",
// confirmButtonClass: "confirmbtnFalses",
// type: "warning",
// center: true,
// callback: (action) => {},
// });
// }
// }else{
// this.$alert(res.msg, "", {
// confirmButtonText: "",
// confirmButtonClass: "confirmbtnFalses",
// type: "warning",
// center: true,
// callback: (action) => {},
// });
// }
// })
// });
// },
handleSendPre(row){ handleSendPre(row){
this.$refs.sendPre.show(row) this.$refs.sendPre.show(row)
}, },
handleSendBs(){ handleSendBs(){
this.$refs.sendBs.show(this.mulSelect) let mulSelect = JSON.parse(JSON.stringify(this.mulSelect))
this.$refs.sendBs.show(mulSelect)
}, },
confirm(row){ confirm(row){
this.loading = true this.loading = true
@ -270,16 +400,6 @@
}, },
handleSendZK(){ handleSendZK(){
this.row = this.mulSelect this.row = this.mulSelect
// let params = {
// pin:row.staffNum, //
// name:row.staffName, //
// mobile:row.mobilePhone, //
// gender:row.sex?'F':'M', //
// email:row.email, //
// identitycard:row.identityCard, //
// hiredday:this.formatTime(new Date(), "YYYY-MM-DD"), //
// enrollpic:row.facesInformation.replace(/^data:image\/\w+;base64,/, ""), //
// }
let params = [] let params = []
this.mulSelect.forEach(item=>{ this.mulSelect.forEach(item=>{
params.push({ params.push({
@ -289,19 +409,41 @@
gender:item.sex?'F':'M', // gender:item.sex?'F':'M', //
email:item.email, // email:item.email, //
identitycard:item.identityCard, // identitycard:item.identityCard, //
hiredday:this.formatTime(new Date(), "YYYY-MM-DD"), // hiredday:item.ruzhiTime.substring(0,10), //
enrollpic:item.facesInformation.replace(/^data:image\/\w+;base64,/, ""), // enrollpic:item.facesInformation.replace(/^data:image\/\w+;base64,/, "") //
}) })
}) })
this.$refs.sendZK.show(params,this.mulSelect) let mulSelect = JSON.parse(JSON.stringify(this.mulSelect))
this.$refs.sendZK.show(params,mulSelect)
}, },
handleLeave(){ handleLeave(){
this.$refs.leave.show(this.mulSelect) this.$refs.leave.show(this.mulSelect)
}, },
init(val){ init(){
val = val?val:{} this.$nextTick(()=>{
let val = this.$refs.select.searchForm
delete val.date
this.loading = true this.loading = true
let params = {...this.queryForm,...val} let params = {...this.queryForm}
// try{
// if(this.deptIds.length){
// let deptIds = []
// for(let i =0;i<this.deptIds.length;i++){
// let item = this.deptIds[i]
// console.log(item)
// deptIds.push( item )
// }
// params.deptIds = deptIds
// console.log(params)
// }
// }catch(err){
// params.deptIds = null
// }
for(let k in val){
if(val[k] != undefined){
params[k] = val[k]
}
}
try{ try{
if(this.date.length){ if(this.date.length){
params.startTime = this.formatTime(this.date[0],"YYYY-MM-DD 00:00:00"); params.startTime = this.formatTime(this.date[0],"YYYY-MM-DD 00:00:00");
@ -320,24 +462,24 @@
this.total = res.pageInfo.total this.total = res.pageInfo.total
} }
}) })
})
}, },
handleSelect(){ handleSelect(){
this.$refs.select.show() this.$refs.select.show()
}, },
handleShow(row){
},
handleSizeChange(size){ handleSizeChange(size){
this.queryForm.pageSize = size this.queryForm.pageSize = size
this.init() // this.init()
this.$refs.select.search()
}, },
handleCurrentChange(current){ handleCurrentChange(current){
this.queryForm.current = current this.queryForm.pageNum = current
this.init() // this.init()
this.$refs.select.search()
} }
} }
}; };
</script> </script>
<style scoped> <style scoped>
.el-dropdown-link { .el-dropdown-link {
cursor: pointer; cursor: pointer;

@ -6,7 +6,6 @@
<el-date-picker <el-date-picker
v-model="searchForm.endTime" v-model="searchForm.endTime"
type="datetime" type="datetime"
:picker-options="pickerOptions"
style='width:200px' style='width:200px'
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -40,7 +39,6 @@
</div> </div>
</template> </template>
<script> <script>
import axios from "axios";
import { updataStaffTemporary,sendZhongkongDimission,sendZhongkongDimissions } from "../../../api/storeManage.js"; import { updataStaffTemporary,sendZhongkongDimission,sendZhongkongDimissions } from "../../../api/storeManage.js";
export default { export default {
data() { data() {

@ -0,0 +1,103 @@
<template>
<div>
<el-dialog title="批量更新" :visible.sync="searchDialog" width="500px">
<el-form :model="form" :rules="rules" ref="ruleForm">
<el-form-item label="入场日期:" label-width="120px" prop="ruzhiTime">
<div class="searchDiv">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="form.ruzhiTime"
:picker-options="pickerOptions"
type="date"
style='width:200px'
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
</el-form-item>
<el-form-item label="服务类型:" label-width="120px" prop="type">
<div class="searchDiv">
<el-radio-group v-model="form.type">
<el-radio label="0">日结</el-radio>
<el-radio label="1">月结</el-radio>
</el-radio-group>
<!-- <el-radio v-model="form.type" label="0"></el-radio>
<el-radio v-model="form.type" label="1"></el-radio> -->
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button>
<el-button type="primary" size="mini" @click="confirm" :loading="configLoing"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { updateByIds } from "../../../api/storeManage.js"
export default {
data() {
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
}
},
configLoing:false,
rules:{
type:[
{ required: true, message: '请选择劳务类型', trigger: 'change' }
],
ruzhiTime:[
{ required: true, message: '请选择人员入职时间', trigger: 'change' }
],
},
form:{},
searchDialog:false,
list:[]
}
},
methods:{
show(list){
this.searchDialog = true
this.list = list
this.$nextTick(()=>{
this.form = {}
this.$refs['ruleForm'].resetFields();
})
},
confirm(){
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
let params = {
...this.form,
ids:this.list.map(item=>item.id)
}
params.ruzhiTime = params.ruzhiTime + ' 08:00:00'
updateByIds(params).then(res=>{
if(res.code == '000000'){
this.searchDialog = false
this.$emit('init')
}else{
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {
},
});
}
})
}
});
}
}
}
</script>
<style scoped>
/deep/.el-cascader .el-input .el-input__inner{
width:192px !important;
}
</style>

@ -2,18 +2,16 @@
<div> <div>
<el-dialog title="搜索" :visible.sync="searchDialog" width="600px"> <el-dialog title="搜索" :visible.sync="searchDialog" width="600px">
<el-form :model="searchForm"> <el-form :model="searchForm">
<!-- <el-form-item label="区域:" label-width="120px"> <el-form-item label="员工编码:" label-width="120px">
<div class="searchDiv"> <div class="searchDiv">
<el-select v-model="searchForm.regionId" filterable placeholder="请选择区域"> <el-input size="medium" maxlength="11" v-model="searchForm.staffNum" placeholder="输入要查询的员工编码" clearable></el-input>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div> </div>
</el-form-item> --> </el-form-item>
<el-form-item label="身份证号:" label-width="120px">
<div class="searchDiv">
<el-input size="medium" v-model="searchForm.identityCard" placeholder="输入要查询的身份证号" clearable></el-input>
</div>
</el-form-item>
<el-form-item label="手机号:" label-width="120px"> <el-form-item label="手机号:" label-width="120px">
<div class="searchDiv"> <div class="searchDiv">
<el-input oninput="value=value.replace(/[^\d.]/g,'')" size="medium" maxlength="11" v-model="searchForm.mobilePhone" placeholder="输入要查询的手机号" clearable></el-input> <el-input oninput="value=value.replace(/[^\d.]/g,'')" size="medium" maxlength="11" v-model="searchForm.mobilePhone" placeholder="输入要查询的手机号" clearable></el-input>
@ -27,23 +25,66 @@
</el-radio-group> </el-radio-group>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="结算:" label-width="120px"> <!-- <el-form-item label="服务类型:" label-width="120px">
<div class="searchDiv"> <div class="searchDiv">
<el-radio-group v-model="searchForm.type" fill="#f78989"> <el-radio-group v-model="searchForm.type" fill="#f78989">
<el-radio label="0" size="medium" type="primary">日结</el-radio> <el-radio label="0" size="medium" type="primary">日结</el-radio>
<el-radio label="1" size="medium" type="primary">月结</el-radio> <el-radio label="1" size="medium" type="primary">月结</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</el-form-item> </el-form-item> -->
<el-form-item label="状态:" label-width="120px"> <el-form-item label="状态:" label-width="120px">
<div class="searchDiv"> <div class="searchDiv">
<el-radio-group v-model="searchForm.state" fill="#f78989"> <el-radio-group v-model="searchForm.state" fill="#f78989">
<el-radio label="0" size="medium" type="primary">正常</el-radio> <el-radio label="0" size="medium" type="primary">正常</el-radio>
<el-radio label="1" size="medium" type="primary">异常</el-radio> <el-radio label="1" size="medium" type="primary">异常</el-radio>
<el-radio label="2" size="medium" type="primary">黑名单</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</el-form-item> </el-form-item>
<!-- <el-form-item label="北森推送:" label-width="120px">
<div class="searchDiv">
<el-radio-group v-model="searchForm.isBeisen" fill="#f78989">
<el-radio label="2" size="medium" type="primary">已推送</el-radio>
<el-radio label="0" size="medium" type="primary">未推送</el-radio>
</el-radio-group>
</div>
</el-form-item>
<el-form-item label="北森状态:" label-width="120px">
<div class="searchDiv">
<el-radio-group v-model="searchForm.beisenDimission" fill="#f78989">
<el-radio label="0" size="medium" type="primary">已入职</el-radio>
<el-radio label="1" size="medium" type="primary">已离职</el-radio>
</el-radio-group>
</div>
</el-form-item> -->
<!-- <el-form-item label="中控推送:" label-width="120px">
<div class="searchDiv">
<el-radio-group v-model="searchForm.isZhongkong" fill="#f78989">
<el-radio label="1" size="medium" type="primary">已入职</el-radio>
<el-radio label="0" size="medium" type="primary">待入职</el-radio>
</el-radio-group>
</div>
</el-form-item> -->
<el-form-item label="中控状态:" label-width="120px">
<div class="searchDiv">
<el-radio-group v-model="searchForm.zhongkongDimission" fill="#f78989">
<el-radio label="0" size="medium" type="primary">已入场</el-radio>
<el-radio label="1" size="medium" type="primary">待入场</el-radio>
</el-radio-group>
</div>
</el-form-item>
<!-- <el-form-item label="部门:" label-width="120px">
<div class="searchDiv">
<el-cascader
ref='cascader'
:options="deptOptions"
v-model="searchForm.zhongkongDeptId"
placeholder="请选择部门"
:props="{ checkStrictly: true,emitPath:false }"
clearable>
</el-cascader>
</div>
</el-form-item> -->
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button> <el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button>
@ -59,13 +100,35 @@ export default {
return { return {
searchForm:{}, searchForm:{},
searchDialog:false, searchDialog:false,
options:[] options:[],
deptOptions:[]
} }
}, },
created(){ created(){
this.getRegionList() this.getRegionList()
this.getDept()
}, },
methods: { methods: {
getDept(){
getRegionList({storeId:sessionStorage.getItem("parentId")}).then(res=>{
if(res.code == '000000'){
this.deptOptions = this.replaceRegionListToChildren(res.data)
}
})
},
replaceRegionListToChildren(treeArray) {
if (!Array.isArray(treeArray)) {
return treeArray;
}
return treeArray.map((node) => {
const newNode = { ...node,label:node.regionName,value:node.id };
if (Array.isArray(newNode.regionListVoList)&&newNode.regionListVoList.length) {
newNode.children = this.replaceRegionListToChildren(newNode.regionListVoList);
delete newNode.regionListVoList;
}
return newNode;
});
},
getRegionList(){ getRegionList(){
let params = { let params = {
pageNum:1, pageNum:1,
@ -84,14 +147,7 @@ export default {
}) })
}, },
search(){ search(){
let params = {} this.$emit('init')
for(let k in this.searchForm){
if(this.searchForm[k]){
params[k] = this.searchForm[k]
}
}
delete params.date
this.$emit('init',params)
}, },
show(){ show(){
this.searchDialog = true this.searchDialog = true

@ -2,14 +2,29 @@
<div> <div>
<el-dialog title="推送北森" :visible.sync="searchDialog" width="500px"> <el-dialog title="推送北森" :visible.sync="searchDialog" width="500px">
<el-form :model="form" :rules="rules" ref="ruleForm"> <el-form :model="form" :rules="rules" ref="ruleForm">
<!-- <el-form-item label="推送时间:" label-width="120px" prop="hiredday">
<div class="searchDiv">
<el-date-picker
v-model="form.hiredday"
type="datetime"
style='width:200px'
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
</el-form-item> -->
<el-form-item label="部门:" label-width="120px" prop="oIdDepartment"> <el-form-item label="部门:" label-width="120px" prop="oIdDepartment">
<div class="searchDiv"> <div class="searchDiv">
<el-cascader <el-cascader
ref='cascader'
:options="deptOptions" :options="deptOptions"
v-model="form.oIdDepartment" v-model="form.oIdDepartment"
placeholder="请选择部门" placeholder="请选择部门"
:props="{ checkStrictly: true,emitPath:false }" :props="{ checkStrictly: true,emitPath:false }"
clearable></el-cascader> @change='deptChange'
clearable>
</el-cascader>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -21,50 +36,20 @@
</div> </div>
</template> </template>
<script> <script>
import axios from "axios";
import { getRegionList,addBeiSen } from "../../../api/storeManage.js"; import { getRegionList,addBeiSen } from "../../../api/storeManage.js";
import { handleTree } from "@/utils/index";
export default { export default {
data() { data() {
return { return {
pickerOptions: {
onPick: ({ maxDate, minDate }) => {
this.choiceDate = minDate.getTime();
if (maxDate) {
this.choiceDate = "";
}
},
disabledDate: (time) => {
const self = this;
const startDay =
(new Date(self.choiceDate).getDate() - 1) * 24 * 3600 * 1000;
const endDay =
(new Date(
new Date(self.choiceDate).getFullYear(),
new Date(self.choiceDate).getMonth() + 1,
0
).getDate() -
new Date(self.choiceDate).getDate()) *
24 *
3600 *
1000;
let minTime = self.choiceDate - startDay;
let maxTime = self.choiceDate + endDay;
return (
time.getTime() > Date.now() ||
time.getTime() < minTime ||
time.getTime() > maxTime
);
},
},
configLoing:false, configLoing:false,
rules:{ rules:{
oIdDepartment:[ oIdDepartment:[
{ required: true, message: '请选择推送部门', trigger: 'change' } { required: true, message: '请选择推送部门', trigger: 'change' }
], ],
hiredday:[
{ required: true, message: '请选择人员推送时间', trigger: 'change' }
],
}, },
form:{ form:{},
},
searchDialog:false, searchDialog:false,
deptOptions:[], deptOptions:[],
accessKey:sessionStorage.getItem("accessKey"), accessKey:sessionStorage.getItem("accessKey"),
@ -77,18 +62,43 @@
this.getDept() this.getDept()
}, },
methods: { methods: {
deptChange(){
let option = this.$refs['cascader'].getCheckedNodes()[0].data
this.params.forEach(item=>{
item.beisenDeptId = option.id
item.beisenDeptNum = option.regionNum
item.beisenDeptName = option.regionName
})
},
confirm(){ confirm(){
this.$refs['ruleForm'].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
if (valid) { if (valid) {
// let data = { ...this.params,oid:this.form.oIdDepartment } let list = this.params.filter( item=>item.blackList.type )
let data = this.params.map(item=>{ return { ...item,oid:this.form.oIdDepartment } }) if(list.length){
let nameList = list.map(item=>{
return item.staffNum
})
return this.$alert('推送名单中含有黑名单人员,分别是编号--'+nameList.join(','), "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
let data = this.params.map(item=>{ return {
...item,
oid:this.form.oIdDepartment,
sendTime:this.formatTime(item.ruzhiTime, "YYYY-MM-DD hh:mm:ss"),
beisenDimissionDate:this.formatTime(item.ruzhiTime, "YYYY-MM-DD hh:mm:ss")}
})
this.configLoing = true this.configLoing = true
addBeiSen(data).then(res=>{ addBeiSen(data).then(res=>{
this.configLoing = false this.configLoing = false
this.$emit('init')
if(res.code == '000000'){ if(res.code == '000000'){
this.$message.success({ message: "推送成功!" }); this.$message.success({ message: "推送成功!" });
this.searchDialog = false this.searchDialog = false
this.$emit('init')
}else{ }else{
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -106,13 +116,14 @@
show(row){ show(row){
this.searchDialog = true this.searchDialog = true
this.params = row this.params = row
// this.form.hiredday = new Date(row.ruzhiTime)
}, },
replaceRegionListToChildren(treeArray) { replaceRegionListToChildren(treeArray) {
if (!Array.isArray(treeArray)) { if (!Array.isArray(treeArray)) {
return treeArray; return treeArray;
} }
return treeArray.map((node) => { return treeArray.map((node) => {
const newNode = { ...node,label:node.regionName,value:node.id }; const newNode = { ...node,label:node.regionName,value:node.beisenId };
if (Array.isArray(newNode.regionListVoList)&&newNode.regionListVoList.length) { if (Array.isArray(newNode.regionListVoList)&&newNode.regionListVoList.length) {
newNode.children = this.replaceRegionListToChildren(newNode.regionListVoList); newNode.children = this.replaceRegionListToChildren(newNode.regionListVoList);
delete newNode.regionListVoList; delete newNode.regionListVoList;

@ -2,64 +2,30 @@
<div> <div>
<el-dialog title="推送中控" :visible.sync="searchDialog" width="500px"> <el-dialog title="推送中控" :visible.sync="searchDialog" width="500px">
<el-form :model="form" :rules="rules" ref="ruleForm"> <el-form :model="form" :rules="rules" ref="ruleForm">
<!-- <el-form-item label="推送时间:" label-width="120px" prop="hiredday">
<div class="searchDiv">
<el-date-picker
v-model="form.hiredday"
type="date"
style='width:200px'
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
</el-form-item> -->
<el-form-item label="部门:" label-width="120px" prop="deptnumber"> <el-form-item label="部门:" label-width="120px" prop="deptnumber">
<div class="searchDiv"> <div class="searchDiv">
<el-cascader <el-cascader
ref='cascader'
:options="deptOptions" :options="deptOptions"
v-model="form.deptnumber" v-model="form.deptnumber"
placeholder="请选择部门" placeholder="请选择部门"
:props="{ checkStrictly: true,emitPath:false }" :props="{ checkStrictly: true,emitPath:false }"
@change='deptChange'
clearable></el-cascader> clearable></el-cascader>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="上班签到:" label-width="120px" prop="inlate" filterable>
<div class="searchDiv">
<el-select v-model="form.inlate" filterable placeholder="请选择上班签到类型">
<el-option
v-for="item in inOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item label="下班签退:" label-width="120px" prop="outearly" filterable>
<div class="searchDiv">
<el-select v-model="form.outearly" filterable placeholder="请选择下班签退类型">
<el-option
v-for="item in outOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item label="雇佣类型:" label-width="120px" prop="hiretype" filterable>
<div class="searchDiv">
<el-select v-model="form.hiretype" filterable placeholder="请选择雇佣类型">
<el-option
v-for="item in hireOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item label="人员是否考勤:" label-width="120px" prop="att" filterable>
<div class="searchDiv">
<el-select v-model="form.att" filterable placeholder="请选择人员是否考勤">
<el-option
v-for="item in attOption"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button> <el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button>
@ -70,8 +36,7 @@
</template> </template>
<script> <script>
import axios from "axios"; import axios from "axios";
import { zhongkongTest,getRegionList } from "../../../api/storeManage.js"; import { getRegionList } from "../../../api/storeManage.js";
import { handleTree } from "@/utils/index";
export default { export default {
data() { data() {
return { return {
@ -83,19 +48,10 @@ export default {
], ],
inlate: [ inlate: [
{ required: true, message: '请选择上班签到类型', trigger: 'change' } { required: true, message: '请选择上班签到类型', trigger: 'change' }
],
outearly: [
{ required: true, message: '请选择下班签退类型', trigger: 'change' }
],
hiretype: [
{ required: true, message: '请选择雇佣类型', trigger: 'change' }
],
att: [
{ required: true, message: '请选择人员是否考勤', trigger: 'change' }
] ]
}, },
form:{ form:{
comverifys:15 comverifys:15,
}, },
searchDialog:false, searchDialog:false,
inOptions:[ inOptions:[
@ -162,20 +118,58 @@ export default {
this.getDept() this.getDept()
}, },
methods: { methods: {
deptChange(){
let option = this.$refs['cascader'].getCheckedNodes()[0].data
this.mulSelect.forEach(item=>{
item.zhongkongDeptId = option.id
item.zhongkongDeptNum = option.regionNum
item.zhongkongDeptName = option.regionName
})
},
handleSendZk(){ handleSendZk(){
let list = this.mulSelect.filter( item=>item.blackList.type ) //
if(list.length){
let nameList = list.map(item=>{
return item.staffNum
})
return this.$alert('推送名单中含有黑名单人员,分别是编号--'+nameList.join(','), "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
let data = [] let data = []
for(let i =0;i<this.row.length;i++){ for(let i =0;i<this.row.length;i++){
data.push({...this.row[i],...this.form}) data.push({...this.row[i],...this.form})
} }
// data.forEach(item=>{
// if(item.hiredday){
// // item.hiredday = this.formatTime(item.hiredday, "YYYY-MM-DD")
// item.hiredday = item.hiredday
// }
// })
this.mulSelect.forEach(item=>{
// item.zhongTime = this.formatTime(item.hiredday, "YYYY-MM-DD")
item.zhongTime = item.ruzhiTime.substring(0,10)
})
this.configLoing = true this.configLoing = true
axios.post(`http://${this.host}/api/v2/employee/update/?key=${this.accessKey}`,data).then(res=>{ axios.post(`http://${this.host}/api/v2/employee/update/?key=${this.accessKey}`,data).then(res=>{
this.configLoing = false this.configLoing = false
if(res.status == 200){ if(res.status == 200){
if(res.data.ret == 0){ if(res.data.ret == 0){
this.$message.success({ message: "推送成功!" }); this.$message.success({ message: "推送成功!" })
this.handleIsOne(this.mulSelect) this.handleIsOne(this.mulSelect)
}else{ }else{
this.$message.warning({ message: res.data.msg +'---' +res.data.errorlist }); // this.$message.warning({ message: res.data.msg +'---' +res.data.errorlist });
this.$alert(res.data.msg +'---' +res.data.errorlist, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
})
let list = [] let list = []
let errList = res.data.errorlist let errList = res.data.errorlist
this.mulSelect.forEach(item=>{ this.mulSelect.forEach(item=>{
@ -185,7 +179,6 @@ export default {
} }
}) })
this.mulSelect = list this.mulSelect = list
console.log(this.mulSelect)
this.handleIsOne(this.mulSelect) this.handleIsOne(this.mulSelect)
} }
}else{ }else{
@ -244,6 +237,7 @@ export default {
getRegionList({storeId:sessionStorage.getItem("parentId")}).then(res=>{ getRegionList({storeId:sessionStorage.getItem("parentId")}).then(res=>{
if(res.code == '000000'){ if(res.code == '000000'){
this.deptOptions = this.replaceRegionListToChildren(res.data) this.deptOptions = this.replaceRegionListToChildren(res.data)
console.log(this.deptOptions)
} }
}) })
}, },

@ -0,0 +1,278 @@
<template>
<div>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="60%" center
@close="close" :close-on-click-modal="false" :append-to-body="true">
<div class="head">
<div class="content flex">
<div class="role-size-color">操作人: <span class="role-size">{{ form.staffName }}</span></div>
<div class="role-size-color">操作时间: <span class="role-size">{{ form.mobilePhone }}</span></div>
</div>
</div>
<div class="body">
<div class="box">
<div class="table-header">
<span class="table-header-title"></span>
<div class='table-header-topSize'>修改前</div>
</div>
<div class="content">
<el-table :data="list" :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)',color: '#eeeeee'}">
<el-table-column align="center" prop="staffName" label="姓名"></el-table-column>
<el-table-column align="center" prop="staffNum" label="人员编号"></el-table-column>
<el-table-column align="center" prop="sex" label="性别">
<template slot-scope='scope'>
{{ scope.row.sex?'女':'男' }}
</template>
</el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号" width="110px"></el-table-column>
<el-table-column align="center" prop="identityCard" label="证件号" width="160px"></el-table-column>
<el-table-column align="center" prop="type" label="服务类型">
<template slot-scope='scope'>
{{ scope.row.type ==0?'日结':'月结' }}
</template>
</el-table-column>
<el-table-column align="center" prop="state" label="状态">
<template slot-scope='scope'>
{{ scope.row.state ==0?'正常':'异常' }}
</template>
</el-table-column>
<el-table-column align="center" prop="remark" label="外包服务商" width="150px"></el-table-column>
<el-table-column align="center" label="图像" fixed="right">
<template slot-scope='scope'>
<el-image
style="width: 20px; height: 20px"
:src="scope.row.facesInformation"
:preview-src-list="[scope.row.facesInformation]">
</el-image>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="box">
<div class="table-header">
<span class="table-header-title"></span>
<div class='table-header-topSize'>修改后</div>
</div>
<div class="content">
<el-table :data="[list.staffTemporary]" :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)',color: '#eeeeee'}">
<el-table-column align="center" prop="staffName" label="姓名"></el-table-column>
<el-table-column align="center" prop="staffNum" label="人员编号"></el-table-column>
<el-table-column align="center" prop="sex" label="性别">
<template slot-scope='scope'>
{{ scope.row.sex?'女':'男' }}
</template>
</el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号" width="110px"></el-table-column>
<el-table-column align="center" prop="identityCard" label="证件号" width="160px"></el-table-column>
<el-table-column align="center" prop="type" label="服务类型">
<template slot-scope='scope'>
{{ scope.row.type ==0?'日结':'月结' }}
</template>
</el-table-column>
<el-table-column align="center" prop="state" label="状态">
<template slot-scope='scope'>
{{ scope.row.state ==0?'正常':'异常' }}
</template>
</el-table-column>
<el-table-column align="center" prop="remark" label="外包服务商" width="150px"></el-table-column>
<el-table-column align="center" label="图像" fixed="right">
<template slot-scope='scope'>
<el-image
style="width: 20px; height: 20px"
:src="scope.row.facesInformation"
:preview-src-list="[scope.row.facesInformation]">
</el-image>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<div style="width: 100%;text-align:center;margin-top: 20px;">
<el-button size="small" @click="dialogVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
title:"修改记录",
saveLoad:false,
dialogVisible:false,
list:[]
}
},
methods: {
show(row){
this.dialogVisible = true
this.list = [...row]
console.log(this.list)
},
close(){
this.dialogVisible = false
}
},
}
</script>
<style scoped>
.role-size-color{
font-weight: 600;
color: #092553
}
.role-size{
font-weight: 600;
color: #000;
}
.head{
margin-bottom: 10px;
}
.box{
margin-bottom: 20px;
}
.body{
max-height: 500px;
overflow: auto;
}
.checkout{
width: 110px;
margin-bottom: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.myRedCheckBox{
zoom: 1.1;
}
/deep/.myRedCheckBox .checkbox__input.is-indeterminate .el-checkbox__inner{
background: #28bd9c !important;
border-color: #28bd9c !important;
z-index: 99999;
}
/deep/.myRedCheckBox .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
background: #28bd9c !important;
border-color: #28bd9c !important;
}
/deep/.myRedCheckBox .el-checkbox__input.is-checked .el-checkbox__inner, .myRedCheckBox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background: #28bd9c;
border-color: #28bd9c;
}
/deep/.myRedCheckBox .el-checkbox__label{
font-size: 14px !important;
color: #092553 !important;
}
/deep/.myRedCheckBox .el-checkbox__input.is-checked + .el-checkbox__label {
color: #092553 !important;
font-size: 14px;
}
.content{
background: rgb(242,244,248);
border-radius: 4px;
padding: 16px 28px;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.table-header-topSize{
font-size: 16px;
}
.table-header {
width: 100%;
height: 50px;
line-height: 50px;
box-sizing: border-box;
display: flex;
align-items: center;
font-family: SourceHanSansCN-Medium;
color: #092553;
font-weight: 600;
font-size: 16px;
}
.table-header-title {
border-radius: 2.5px;
width: 5px;
height: 16px;
margin-right: 15px;
background-color: #28bd9c;
}
.amount {
display: flex;
justify-content: space-between;
padding-bottom: 10px;
border-bottom: 1px solid #ccc;
margin-top: 10px;
}
.flex {
align-items: center;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.left-amout {
font-size: 14px;
color: #8994af;
width: 70px;
}
.right-amout {
font-family: SourceHanSansCN-Medium;
color: #092553;
font-weight: 600;
font-size: 16px;
}
.right {
margin-left: auto;
font-size: 16px;
color: #092553;
font-weight: 600;
}
.pay {
color: #22ab8c;
background-color: #eefaf7;
}
.Late {
background-color: #ffeded;
color: #f91515;
}
.status {
font-size: 14px;
padding: 0 5px;
height: 30px;
line-height: 30px;
border-radius: 4px
}
.center {
margin-top: 20px;
padding: 10px;
box-sizing: border-box;
}
/deep/ .el-dialog__title {
font-size: 18px;
color: #092553;
position: relative;
font-weight: 700;
}
.top {
width: 100%;
height: 40px;
line-height: 40px;
box-sizing: border-box;
background-color: #f2f4f8;
display: flex;
align-items: center;
font-family: SourceHanSansCN-Medium;
font-size: 18px;
}
.title {
font-family: SourceHanSansCN-Medium;
color: #092553;
font-weight: 600;
font-size: 16px;
}
</style>

@ -0,0 +1,142 @@
<template>
<div>
<div class="header_flex">
<div></div>
<div>
<el-date-picker
style="width:220px"
v-model="date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
<el-input v-model="pageInfo.staffNum" placeholder="请输入员工编码"></el-input>
<el-input v-model="pageInfo.staffName" placeholder="请输入员工姓名"></el-input>
<!-- <el-input v-model="pageInfo.mobilePhone" placeholder="请输入员工手机号"></el-input>
<el-input v-model="pageInfo.identityCard" placeholder="请输入员工身份证"></el-input> -->
<el-button type="primary" size="mini" @click="init"></el-button>
</div>
</div>
<el-table style="margin-top:20px" :data="list" v-loading="loading" :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)',color: '#eeeeee'}">
<el-table-column align="center" prop="staffNum" label="员工编码"></el-table-column>
<el-table-column align="center" prop="staffName" label="员工名字"></el-table-column>
<!-- <el-table-column align="center" prop="mobilePhone" label="员工手机"></el-table-column>
<el-table-column align="center" prop="identityCard" label="身份证"></el-table-column> -->
<!-- <el-table-column align="center" prop="sex" label="性别">
<template slot-scope='scope'>
{{ scope.row.sex?'女':'男' }}
</template>
</el-table-column> -->
<!-- <el-table-column align="center" prop="urgentName" label="紧急联系人"></el-table-column>
<el-table-column align="center" prop="urgentPhone" label="紧急联系人联系方式"></el-table-column>
<el-table-column align="center" prop="urgentRelationship" label="紧急联系人联系关系"></el-table-column>
<el-table-column align="center" label="图像" fixed="right">
<template slot-scope='scope'>
<el-image
style="width: 20px; height: 20px"
:src="scope.row.facesInformation"
:preview-src-list="[scope.row.facesInformation]">
</el-image>
</template>
</el-table-column> -->
<el-table-column align="center" prop="updateDate" label="修改时间" fixed="right"></el-table-column>
<el-table-column align="center" label="修改记录" fixed="right">
<template slot-scope='scope'>
<el-button type="text" @click="handleShow(scope.row)"></el-button>
</template>
</el-table-column>
<!-- <el-table-column align="center" prop="updateDate" label="修改时间" fixed="right"></el-table-column>
<el-table-column align="center" prop="updateName" label="修改人" fixed="right">
<template slot-scope='scope'>
{{ scope.row.updateName?scope.row.updateName:'本人' }}
</template>
</el-table-column> -->
</el-table>
<div class="block" style="margin-top: 10px">
<el-pagination
align="left"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageInfo.pageNum"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageInfo.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
<updateList ref="updateList"></updateList>
</div>
</template>
<script>
import { staffTemporaryUpdate } from "../../../api/storeManage.js"
import updateList from './updateList.vue';
export default {
components:{
updateList
},
data() {
return {
list:[],
pageInfo:{
pageNum:1,
pageSize:10
},
total:0,
loading:false,
date:[]
};
},
methods:{
handleShow(row){
this.$refs.updateList.show(row)
},
handleCurrentChange(current){
this.pageInfo.pageNum = current
this.init()
},
handleSizeChange(size){
this.pageInfo.pageSize = size
this.init()
},
init(){
this.loading = true
let params = { ...this.pageInfo }
try{
if(this.date.length){
params.startTime = this.formatTime(this.date[0],"YYYY-MM-DD 00:00:00");
params.endTime = this.formatTime(this.date[1],"YYYY-MM-DD 23:59:59" );
}
}catch(err){''
params.startTime = null
params.endTime = null
}
params.staffNum = params.staffNum||null
params.staffName = params.staffName||null
params.mobilePhone = params.mobilePhone||null
params.identityCard = params.identityCard||null
staffTemporaryUpdate(params).then(res=>{
console.log(res)
this.loading = false
if(res.code == '000000'){
this.list = res.pageInfo.list
this.total = res.pageInfo.total
}
})
}
},
created(){
this.init()
}
};
</script>
<style scoped>
.el-button {
margin-bottom: 10px;
}
.el-input {
width: 200px;
}
</style>

@ -0,0 +1,334 @@
<template>
<div>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="70%" center
@close="close" :close-on-click-modal="false" :append-to-body="true">
<div class="head">
<div class="content flex">
<div class="role-size-color">操作人: <span class="role-size">{{ listBefore[0].updateName?listBefore[0].updateName:listBefore[0].staffName }}</span></div>
<div class="role-size-color">操作时间: <span class="role-size">{{ listBefore[0].updateDate }}</span></div>
</div>
</div>
<div class="body">
<div class="box">
<div class="table-header">
<span class="table-header-title"></span>
<div class='table-header-topSize'>修改前</div>
</div>
<div class="content">
<el-table :data="listBefore" :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)',color: '#eeeeee'}">
<el-table-column align="center" prop="staffName" label="姓名"></el-table-column>
<el-table-column align="center" prop="staffNum" label="人员编号"></el-table-column>
<el-table-column align="center" prop="sex" label="性别">
<template slot-scope='scope'>
{{ scope.row.sex?'女':'男' }}
</template>
</el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号" width="110px"></el-table-column>
<el-table-column align="center" prop="identityCard" label="证件号" width="165px"></el-table-column>
<el-table-column align="center" prop="type" label="服务类型">
<template slot-scope='scope'>
{{ scope.row.type ==0?'日结':'月结' }}
</template>
</el-table-column>
<el-table-column align="center" prop="remark" label="外包服务商" width="150px"></el-table-column>
<el-table-column align="center" prop="urgentName" label="紧急联系人" min-width="90"></el-table-column>
<el-table-column align="center" prop="urgentPhone" label="紧急联系人电话" min-width="110"></el-table-column>
<el-table-column align="center" prop="urgentRelationship" label="紧急联系人关系"></el-table-column>
<el-table-column align="center" prop="ruzhiTime" label="入场时间" width="135px">
<template slot-scope='scope'>
{{ scope.row.ruzhiTime }}
</template>
</el-table-column>
<el-table-column align="center" label="图像" fixed="right">
<template slot-scope='scope'>
<el-image
style="width: 20px; height: 20px"
:src="scope.row.facesInformation"
:preview-src-list="[scope.row.facesInformation]">
</el-image>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="box">
<div class="table-header">
<span class="table-header-title"></span>
<div class='table-header-topSize'>修改后</div>
</div>
<div class="content">
<el-table :data="listAfter" :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)',color: '#eeeeee'}">
<el-table-column align="center" prop="staffName" label="姓名">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.staffName !=listBefore[0].staffName }">{{ scope.row.staffName }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="staffNum" label="人员编号">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.staffNum !=listBefore[0].staffNum }">{{ scope.row.staffNum }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="sex" label="性别">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.sex !=listBefore[0].sex }">{{ scope.row.sex?'女':'男' }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号" width="110px">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.mobilePhone !=listBefore[0].mobilePhone }">{{ scope.row.mobilePhone }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="identityCard" label="证件号" width="165px">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.identityCard !=listBefore[0].identityCard }">{{ scope.row.identityCard }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="type" label="服务类型">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.type !=listBefore[0].type }">{{ scope.row.type ==0?'日结':'月结' }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="remark" label="外包服务商" width="150px">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.remark !=listBefore[0].remark }">{{ scope.row.remark }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="urgentName" label="紧急联系人" min-width="90">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.urgentName !=listBefore[0].urgentName }">{{ scope.row.urgentName }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="urgentPhone" label="紧急联系人电话" min-width="110">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.urgentPhone !=listBefore[0].urgentPhone }">{{ scope.row.urgentPhone }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="urgentRelationship" label="紧急联系人关系">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.urgentRelationship !=listBefore[0].urgentRelationship }">{{ scope.row.urgentRelationship }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="ruzhiTime" label="入场时间" width="135px">
<template slot-scope='scope'>
<span :class="{ 'isUpdate':scope.row.ruzhiTime != listBefore[0].ruzhiTime }">{{ scope.row.ruzhiTime }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="图像" fixed="right">
<template slot-scope='scope'>
<el-image
style="width: 20px; height: 20px"
:src="scope.row.facesInformation"
:preview-src-list="[scope.row.facesInformation]">
</el-image>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<div style="width: 100%;text-align:center;margin-top: 20px;">
<el-button size="small" @click="dialogVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
title:"更新记录",
saveLoad:false,
dialogVisible:false,
listBefore:[{}],
listAfter:[{}]
}
},
methods: {
show(row){
this.dialogVisible = true
this.listBefore = [{...row}]
this.listAfter = [{...row.staffTemporary}]
this.listBefore[0].ruzhiTime = this.timestampToTime(this.listBefore[0].ruzhiTime)
this.listAfter[0].ruzhiTime = this.timestampToTime(this.listAfter[0].ruzhiTime )
},
timestampToTime(timestamp) {
timestamp = timestamp ? timestamp : null;
let date = new Date(timestamp);
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D;
},
close(){
this.dialogVisible = false
}
},
}
</script>
<style scoped>
.isUpdate{
display: inline-block;
font-weight: 600;
color: red;
}
.role-size-color{
font-weight: 600;
color: #092553
}
.role-size{
font-weight: 600;
color: #000;
}
.head{
margin-bottom: 10px;
}
.box{
margin-bottom: 20px;
}
.body{
max-height: 500px;
overflow: auto;
}
.checkout{
width: 110px;
margin-bottom: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.myRedCheckBox{
zoom: 1.1;
}
/deep/.myRedCheckBox .checkbox__input.is-indeterminate .el-checkbox__inner{
background: #28bd9c !important;
border-color: #28bd9c !important;
z-index: 99999;
}
/deep/.myRedCheckBox .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
background: #28bd9c !important;
border-color: #28bd9c !important;
}
/deep/.myRedCheckBox .el-checkbox__input.is-checked .el-checkbox__inner, .myRedCheckBox .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background: #28bd9c;
border-color: #28bd9c;
}
/deep/.myRedCheckBox .el-checkbox__label{
font-size: 14px !important;
color: #092553 !important;
}
/deep/.myRedCheckBox .el-checkbox__input.is-checked + .el-checkbox__label {
color: #092553 !important;
font-size: 14px;
}
.content{
background: rgb(242,244,248);
border-radius: 4px;
padding: 16px 28px;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.table-header-topSize{
font-size: 16px;
}
.table-header {
width: 100%;
height: 50px;
line-height: 50px;
box-sizing: border-box;
display: flex;
align-items: center;
font-family: SourceHanSansCN-Medium;
color: #092553;
font-weight: 600;
font-size: 16px;
}
.table-header-title {
border-radius: 2.5px;
width: 5px;
height: 16px;
margin-right: 15px;
background-color: #28bd9c;
}
.amount {
display: flex;
justify-content: space-between;
padding-bottom: 10px;
border-bottom: 1px solid #ccc;
margin-top: 10px;
}
.flex {
align-items: center;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.left-amout {
font-size: 14px;
color: #8994af;
width: 70px;
}
.right-amout {
font-family: SourceHanSansCN-Medium;
color: #092553;
font-weight: 600;
font-size: 16px;
}
.right {
margin-left: auto;
font-size: 16px;
color: #092553;
font-weight: 600;
}
.pay {
color: #22ab8c;
background-color: #eefaf7;
}
.Late {
background-color: #ffeded;
color: #f91515;
}
.status {
font-size: 14px;
padding: 0 5px;
height: 30px;
line-height: 30px;
border-radius: 4px
}
.center {
margin-top: 20px;
padding: 10px;
box-sizing: border-box;
}
/deep/ .el-dialog__title {
font-size: 18px;
color: #092553;
position: relative;
font-weight: 700;
}
.top {
width: 100%;
height: 40px;
line-height: 40px;
box-sizing: border-box;
background-color: #f2f4f8;
display: flex;
align-items: center;
font-family: SourceHanSansCN-Medium;
font-size: 18px;
}
.title {
font-family: SourceHanSansCN-Medium;
color: #092553;
font-weight: 600;
font-size: 16px;
}
</style>

@ -1,29 +1,88 @@
<template> <template>
<div class="header-main"> <div class="header-main">
<div class="header_flex tab-card-staff"> <div class="flex" style="margin-bottom:20px;justify-content: flex-end;">
<div> <div></div>
</div>
<div style="padding-top:5px"> <div style="padding-top:5px">
<!-- <el-button size="mini" type="primary" @click="(searchDialog=true)"></el-button> -->
<div class="flex" style="margin-bottom: 10px;"> <div class="flex" style="margin-bottom: 10px;">
<div class="block" style="margin-left: auto;"> <div class="block" style="margin-left: auto;">
<el-input size="medium" class="form-width-ms" v-model="searchForm.staffName" placeholder="输入要查询的员工姓名" clearable></el-input>
<el-input size="medium" class="form-width-ms" v-model="searchForm.mobilePhone" placeholder="输入要查询的联系电话" clearable></el-input> <el-date-picker
<el-button size="mini" type="primary" plain @click='handleSelect'>搜索</el-button> v-model="lastTime"
<!-- <el-button size="mini" type="info" plain @click="refresh()"></el-button> --> :disabled="isdisabled"
@change="handleDate2"
type="date"
placeholder="查询日期之间入职">
</el-date-picker>
<el-date-picker
style=";width:200px"
v-model="date"
@change="handleDate1"
:disabled="isdisabled"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
<el-cascader
style="width: 150px;"
:options="deptOptions"
v-model="searchForm.deptIds"
:disabled="isdisabled"
placeholder="请选择部门"
@change="handleSelect"
:props="{ multiple: true, checkStrictly: false,emitPath:false }"
clearable>
</el-cascader>
<el-select v-model="searchForm.isZhongkong" placeholder="是否入职" @change="handleRadio" clearable style="width: 150px;" :disabled="isdisabled">
<el-option
v-for="item in [{label:'全部',value:null},{label:'已入场',value:'0'},{label:'已离场',value:'1'}]"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="searchForm.job" placeholder="服务类型" @change="handleRadio" clearable style="width: 150px;" :disabled="isdisabled">
<el-option
v-for="item in [{label:'月结',value:'1'},{label:'日结',value:'0'}]"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="searchForm.type" placeholder="黑白名单" @change="handleRadio" clearable style="width: 150px;" :disabled="isdisabled">
<el-option
v-for="item in [{label:'全部',value:null},{label:'白名单',value:'0'},{label:'黑名单',value:'1'}]"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-input size="medium" class="form-width-ms" :disabled="isdisabled" v-model="searchForm.remark" placeholder="输入要查询的外包服务商" clearable @change="handleSelect('change')" style="width: 150px;"></el-input>
<el-input size="medium" class="form-width-ms" :disabled="isdisabled" v-model="searchForm.staffName" placeholder="输入要查询的员工姓名" clearable @change="handleSelect('change')" style="width: 150px;"></el-input>
<el-input size="medium" class="form-width-ms" :disabled="isdisabled" v-model="searchForm.mobilePhone" placeholder="输入要查询的联系电话" clearable @change="handleSelect('change')" style="width: 150px;"></el-input>
<el-button size="mini" type="primary" @click="handleExport" :loading="exportLoad">下载</el-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<whitelist ref='whitelist' :searchForm="searchForm" @updataisdisabled="updataisdisabled"></whitelist>
<!-- <div class="tab">
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick"> <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="白名单" name="whitelist"> <el-tab-pane label="白名单" name="whitelist">
<whitelist ref='whitelist'></whitelist> <whitelist ref='whitelist' :searchForm="searchForm"></whitelist>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="黑名单" name="blacklist"> <el-tab-pane label="黑名单" name="blacklist">
<blacklist ref='blacklist'></blacklist> <blacklist ref='blacklist' :searchForm="searchForm"></blacklist>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog title="搜索" :visible.sync="searchDialog"> </div> -->
<!-- <el-dialog title="搜索" :visible.sync="searchDialog">
<el-form :model="searchForm"> <el-form :model="searchForm">
<el-form-item label="入职日期搜索:" label-width="120px"> <el-form-item label="入职日期搜索:" label-width="120px">
<div class="block"> <div class="block">
@ -46,11 +105,14 @@
<el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button> <el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button>
<el-button type="primary" size="mini" @click="search(searchDialog = false) "> </el-button> <el-button type="primary" size="mini" @click="search(searchDialog = false) "> </el-button>
</span> </span>
</el-dialog> </el-dialog> -->
</div> </div>
</template> </template>
<style scoped> <style scoped>
/deep/.tab .el-tabs__item{
height: 55px;
line-height: 55px;
}
.header-main { .header-main {
position: relative; position: relative;
} }
@ -69,10 +131,15 @@ import tostore from "./components/tostore/index";
import excel from "@/components/excel"; import excel from "@/components/excel";
import blacklist from "./components/blacklist"; import blacklist from "./components/blacklist";
import whitelist from "./components/whitelist"; import whitelist from "./components/whitelist";
import { blackListExport,getRegionList } from "@/api/storeManage";
export default { export default {
components: { onjob, dimission, deactivate, excel, tostore, blacklist,whitelist }, components: { onjob, dimission, deactivate, excel, tostore, blacklist,whitelist },
data() { data() {
return { return {
isdisabled:false,
lastTime:null,
exportLoad:false,
isIncumbency:'',
activeName: "whitelist", // activeName: "whitelist", //
searchDialog: false, // searchDialog: false, //
addialogFormVisible: false, // addialogFormVisible: false, //
@ -102,21 +169,138 @@ export default {
}, },
], ],
}, },
deptOptions:[],
zhongkongDeptId:[]
}; };
}, },
created(){
this.getDeptInit()
},
methods: { methods: {
handleSelect(){ updataisdisabled(val){
this.isdisabled = val
},
handleDeptChange(ids){
this.$refs.whitelist.changePageNum(1)
this.handleSelect()
},
getDeptInit(){
let params = {
storeId:sessionStorage.getItem("parentId")
}
getRegionList(params).then(res=>{
this.rightLoad = false
if(res.code == '000000'){
this.deptOptions = this.replaceRegionListToChildren(res.data)
}
})
},
replaceRegionListToChildren(treeArray) {
if (!Array.isArray(treeArray)) {
return treeArray;
}
return treeArray.map((node) => {
const newNode = { ...node,label:node.regionName,value:node.id };
if (Array.isArray(newNode.regionListVoList)&&newNode.regionListVoList.length) {
newNode.children = this.replaceRegionListToChildren(newNode.regionListVoList);
delete newNode.regionListVoList;
}
return newNode;
});
},
handleExport(){
this.exportLoad = true
let params = {} let params = {}
for(let k in this.searchForm){ for(let k in this.searchForm){
if(this.searchForm[k]){ if(this.searchForm[k]){
params[k] = this.searchForm[k] params[k] = this.searchForm[k]
} }
} }
if(this.lastTime){
params.lastTime = this.formatTime( this.lastTime ,"YYYY-MM-DD 23:59:59" )
}
try{
if(this.date.length){
params.startTime = this.formatTime(this.date[0],"YYYY-MM-DD 00:00:00");
params.lastTime = this.formatTime(this.date[1],"YYYY-MM-DD 23:59:59" );
}
}catch(err){
params.startTime = null
params.lastTime = null
}
params.storeId = sessionStorage.getItem("parentId")
params.pageNum = 1
// params.size = 9999
params.pageSize = 9999
blackListExport(params).then(res=>{
this.exportLoad = false
let blob = new Blob([res]);
var a = document.createElement("a");
var url = window.URL.createObjectURL(blob);
a.href = url;
a.download = "临时工导出表.xlsx";
a.click();
window.URL.revokeObjectURL(url);
})
},
handleRadio(val){
this.$refs.whitelist.changePageNum(1)
// this.searchForm.isBeisen = val
// this.searchForm.isZhongkong = val
this.handleSelect()
},
//
handleDate1(date){
try{
if(date){
this.lastTime = ''
this.searchForm.startTime = this.formatTime(date[0],"YYYY-MM-DD 00:00:00");
this.searchForm.lastTime = this.formatTime(date[1],"YYYY-MM-DD 23:59:59" )
}
}catch(err){
this.date = []
}
this.handleSelect()
},
//
handleDate2(date){
try{
if(date){
this.date = []
this.searchForm.lastTime = this.formatTime( date ,"YYYY-MM-DD 23:59:59" )
delete this.searchForm.startTime
}else{
this.searchForm.lastTime = null
}
}catch(err){
this.lastTime = null
}
this.handleSelect()
},
handleSelect(change){
if(change)this.$refs.whitelist.changePageNum(1)
let params = {}
for(let k in this.searchForm){
if(this.searchForm[k]){
params[k] = this.searchForm[k]
}
}
if(this.lastTime){
params.lastTime = this.formatTime( this.lastTime ,"YYYY-MM-DD 23:59:59" )
}
try{
if(this.date.length){
params.startTime = this.formatTime(this.date[0],"YYYY-MM-DD 00:00:00");
params.lastTime = this.formatTime(this.date[1],"YYYY-MM-DD 23:59:59" );
}
}catch(err){
params.startTime = null
params.lastTime = null
}
this.$refs[this.activeName].select(params) this.$refs[this.activeName].select(params)
}, },
// //
changeDate() { changeDate() {
//console.log(this.date);
this.searchForm.startTime = this.date[0]; this.searchForm.startTime = this.date[0];
this.searchForm.endTime = this.date[1]; this.searchForm.endTime = this.date[1];
}, },
@ -137,13 +321,14 @@ export default {
}else if(this.activeName == "blacklist"){ }else if(this.activeName == "blacklist"){
this.$refs.blacklist.select(...this.searchForm); this.$refs.blacklist.select(...this.searchForm);
}else{ }else{
console.log(this.searchForm)
this.$refs.whitelist.select(this.searchForm); this.$refs.whitelist.select(this.searchForm);
} }
}, },
// //
refresh() { refresh() {
this.$router.go(0) this.isIncumbency = ''
this.searchForm = {}
this.search()
}, },
// //
handleClick(tab, event) { handleClick(tab, event) {
@ -163,16 +348,15 @@ export default {
this.$refs.tostore.show(); this.$refs.tostore.show();
} }
if (tab.name == "blacklist") { if (tab.name == "blacklist") {
this.$refs.blacklist.leave(); this.$refs.blacklist.leave(this.searchForm);
} }
if (tab.name == "whitelist") { if (tab.name == "whitelist") {
this.$refs.whitelist.leave(); this.$refs.whitelist.leave(this.searchForm);
} }
}, },
}, },
watch: { watch: {
date(newVal, oldVal) { date(newVal, oldVal) {
//console.log(newVal, oldVal);
if (newVal == null) { if (newVal == null) {
this.date = []; this.date = [];
} }

@ -1,25 +1,25 @@
<template> <template>
<!-- 黑名单 --> <!-- 黑名单 -->
<div class="displsy-mod"> <div class="displsy-mod">
<el-table :data="list" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}"> <el-table :data="list" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}" v-loading="loading">
<el-table-column align="center" prop="staffName" label="员工名称" min-width="100"></el-table-column> <el-table-column align="center" prop="staffName" label="员工名称" min-width="100"></el-table-column>
<el-table-column align="center" prop="staffNum" label="员工编码" ></el-table-column> <el-table-column align="center" prop="staffNum" label="员工编码" ></el-table-column>
<el-table-column align="center" prop="sex" label="性别" min-width="80"></el-table-column> <el-table-column align="center" prop="sex" label="性别" min-width="80"></el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号码" min-width="120"></el-table-column> <el-table-column align="center" prop="mobilePhone" label="手机号码" min-width="120"></el-table-column>
<el-table-column align="center" prop="identityCard" label="身份证号" min-width="180"></el-table-column> <el-table-column align="center" prop="identityCard" label="身份证号" min-width="180"></el-table-column>
<el-table-column align="center" prop="inputDate" label="入时间" min-width="100"></el-table-column> <el-table-column align="center" prop="inputDate" label="入时间" min-width="100"></el-table-column>
<el-table-column align="center" fixed="right" label="操作"> <el-table-column align="center" fixed="right" label="操作">
<template slot-scope="scope" fixed="right"> <template slot-scope="scope" >
<el-button size="mini" type="primary" plain @click='handleRemove(scope.row)'>白名单</el-button> <el-button size="mini" type="primary" plain @click='handleRemove(scope.row)'>白名单</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed="right" label="工作记录" > <el-table-column align="center" fixed="right" label="工作记录" >
<template slot-scope="scope" fixed="right"> <template slot-scope="scope">
<el-button size="mini" type="primary" plain @click='handleJon(scope.row)'>查看</el-button> <el-button size="mini" type="primary" plain @click='handleJon(scope.row)'>查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed="right" label="扫码记录" > <el-table-column align="center" fixed="right" label="扫码记录" >
<template slot-scope="scope" fixed="right"> <template slot-scope="scope">
<el-button size="mini" type="primary" plain @click='handleCode(scope.row)'>查看</el-button> <el-button size="mini" type="primary" plain @click='handleCode(scope.row)'>查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -42,7 +42,12 @@
jonContent, jonContent,
sendCode sendCode
}, },
props: ["notList"], props:{
searchForm:{
type:Object,
default:{}
},
},
data() { data() {
return { return {
dialogFormVisible: false, dialogFormVisible: false,
@ -55,6 +60,7 @@
type:1 type:1
}, },
queryFome:{}, queryFome:{},
loading:true
}; };
}, },
methods: { methods: {
@ -95,16 +101,19 @@
// //
handleSizeChange(val) { handleSizeChange(val) {
this.pageInfo.pageSize = val this.pageInfo.pageSize = val
this.leave(); this.leave(this.searchForm);
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageInfo.pageNum = val this.pageInfo.pageNum = val
this.leave(); this.leave(this.searchForm);
}, },
select(queryForm){ select(queryForm){
this.loading = true
getBlackList({...queryForm,...this.pageInfo}).then((res) => { getBlackList({...queryForm,...this.pageInfo}).then((res) => {
var list = []; var list = [];
this.loading = false
res.pageInfo.list.forEach((item) => { res.pageInfo.list.forEach((item) => {
item.ruzhiTime = item.ruzhiTime.substring(0,10)
if (item.sex == 1) { if (item.sex == 1) {
item.sex = "男"; item.sex = "男";
} else if (item.sex == 0) { } else if (item.sex == 0) {
@ -116,10 +125,13 @@
this.total = res.pageInfo.total; this.total = res.pageInfo.total;
}) })
}, },
leave() { leave(queryFome) {
getBlackList({...this.queryFome,...this.pageInfo}).then((res) => { this.loading = true
getBlackList({...queryFome,...this.pageInfo}).then((res) => {
this.loading = false
var list = []; var list = [];
res.pageInfo.list.forEach((item) => { res.pageInfo.list.forEach((item) => {
item.ruzhiTime = item.ruzhiTime.substring(0,10)
if (item.sex == 1) { if (item.sex == 1) {
item.sex = "男"; item.sex = "男";
} else if (item.sex == 0) { } else if (item.sex == 0) {

@ -35,6 +35,11 @@
<el-radio :label="2">收银</el-radio> <el-radio :label="2">收银</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<!-- <el-form-item :prop="form.userState?'roleName':''" label="角色名称">
<el-select filterable default-first-option @change="changeRole" v-model="form.roleName" clearable placeholder="请选择" style="min-width:50px" :disabled="!form.userState&&!title!='查看'">
<el-option v-for="item in roleLists" :key="item.roleName" :label="item.roleName" :value="item.roleName"> </el-option>
</el-select>
</el-form-item> -->
<el-form-item label=" "> <el-form-item label=" ">
<div> <div>
<el-button size="mini" type="primary" plain @click="handleClose"> </el-button> <el-button size="mini" type="primary" plain @click="handleClose"> </el-button>

@ -17,6 +17,7 @@
<el-table-column align="center" prop="deptNumber" label="部门编码"></el-table-column> <el-table-column align="center" prop="deptNumber" label="部门编码"></el-table-column>
<el-table-column align="center" prop="deptName" label="部门名称"></el-table-column> <el-table-column align="center" prop="deptName" label="部门名称"></el-table-column>
<el-table-column align="center" prop="equipmentNum" label="设备编码"></el-table-column> <el-table-column align="center" prop="equipmentNum" label="设备编码"></el-table-column>
<el-table-column align="center" prop="equipmentName" label="设备名称"></el-table-column>
<el-table-column align="center" prop="checkTime" label="签到时间"> <el-table-column align="center" prop="checkTime" label="签到时间">
<template slot-scope='scope'> <template slot-scope='scope'>
{{ scope.row.checkTime|timestampToTime }} {{ scope.row.checkTime|timestampToTime }}
@ -28,7 +29,6 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="dialogVisible = false"> </el-button> <el-button size="mini" type="primary" plain @click="dialogVisible = false"> </el-button>
</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>

@ -1,15 +1,15 @@
<template> <template>
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="60%"> <el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="70%">
<div style='margin-left:auto;display:flex'> <div style='margin-left:auto;display:flex'>
<div style='margin-left:auto;margin-bottom:10px'> <div style='margin-left:auto;margin-bottom:10px'>
<el-select v-model="queryForm.regionId" filterable placeholder="请选择"> <!-- <el-select v-model="queryForm.regionId" filterable placeholder="请选择">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select> -->
<el-date-picker <el-date-picker
style="width:220px" style="width:220px"
v-model="date" v-model="date"
@ -30,17 +30,21 @@
{{ scope.row.sex == 1?'女':'男' }} {{ scope.row.sex == 1?'女':'男' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="identityCard" label="身份证"></el-table-column> <el-table-column align="center" prop="identityCard" label="身份证" min-width="130"></el-table-column>
<el-table-column align="center" prop="jobContent" label="结算"> <el-table-column align="center" prop="jobContent" label="服务类型">
<template slot-scope='scope'> <template slot-scope='scope'>
{{ scope.row.type ==0?'日结':'月结' }} {{ scope.row.type ==0?'日结':'月结' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="扫码时间"> <el-table-column align="center" prop="remark" label="外包服务商" min-width="100"></el-table-column>
<el-table-column align="center" label="入场时间" min-width="120">
<template slot-scope='scope'> <template slot-scope='scope'>
{{ scope.row.scanTime|timestampToTime }} {{ scope.row.ruzhiTime|timestampToTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="zhongkongDeptName" label="推送中控部门" ></el-table-column>
<el-table-column align="center" prop="beisenDeptName" label="推送北森部门" ></el-table-column>
<el-table-column align="center" prop="zhongkongDimissionDate" label="离场时间" width="135px"></el-table-column>
<el-table-column align="center" label="图像"> <el-table-column align="center" label="图像">
<template slot-scope='scope'> <template slot-scope='scope'>
<el-image <el-image
@ -56,11 +60,9 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="dialogVisible = false"> </el-button> <el-button size="mini" type="primary" plain @click="dialogVisible = false"> </el-button>
</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getStaffTemporary,getRegionList } from "@/api/storeManage.js"; import { getStaffTemporary,getRegionList } from "@/api/storeManage.js";
export default { export default {
@ -116,7 +118,7 @@ export default {
}) })
}, },
show(row) { show(row) {
this.queryForm = {...row,...this.queryForm} this.queryForm = {...this.queryForm,...row}
this.dialogVisible = true this.dialogVisible = true
this.init() this.init()
}, },

@ -1,25 +1,63 @@
<template> <template>
<!-- 白名单 --> <!-- 白名单 -->
<div class="displsy-mod"> <div class="displsy-mod">
<el-table :data="list" stripe style="width: 100%" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}"> <el-table :data="list" stripe style="width: 100%" :row-class-name="tableRowClassName" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}" v-loading="loading">
<el-table-column align="center" prop="staffName" label="员工名称" ></el-table-column> <el-table-column align="center" label="类型" fixed="left" min-width="100">
<el-table-column align="center" prop="staffNum" label="员工编码" ></el-table-column> <template slot-scope="scope" >
<el-tag :type='scope.row.type==0?"":"info"'>{{ scope.row.type == 0?'白名单':'黑名单' }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="staffNum" label="员工编码" fixed="left"></el-table-column>
<el-table-column align="center" prop="staffName" label="员工名称" fixed="left"></el-table-column>
<el-table-column align="center" label="一级部门" min-width="90" prop="firstDeptName" fixed="left"></el-table-column>
<el-table-column align="center" label="二级部门" min-width="90" prop="secondDeptName" fixed="left"></el-table-column>
<el-table-column align="center" label="三级部门" prop="zhongkongDeptName" min-width="90" fixed="left"></el-table-column>
<el-table-column align="center" prop="ruzhiTime" label="入场时间" min-width="135">
<template slot-scope="scope" >{{ scope.row.ruzhiTime | timestampToTime }}</template>
</el-table-column>
<el-table-column align="center" prop="remark" label="外包服务商" width="150px"></el-table-column>
<el-table-column align="center" prop="job" label="服务类型" >
<template slot-scope="scope" >{{ scope.row.job?'月结':'日结' }}</template>
</el-table-column>
<el-table-column align="center" prop="identityCard" label="证件号码" min-width="160"></el-table-column>
<el-table-column align="center" prop="sex" label="性别" ></el-table-column> <el-table-column align="center" prop="sex" label="性别" ></el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号码" ></el-table-column> <el-table-column align="center" prop="mobilePhone" label="手机号码" min-width="110"></el-table-column>
<el-table-column align="center" prop="identityCard" label="身份证号" ></el-table-column> <el-table-column align="center" prop="urgentName" label="紧急联系人姓名" min-width="90"></el-table-column>
<el-table-column align="center" prop="inputDate" label="入职时间" ></el-table-column> <el-table-column align="center" prop="urgentPhone" label="紧急联系人电话" min-width="115"></el-table-column>
<el-table-column align="center" fixed="right" label="操作" > <el-table-column align="center" prop="urgentRelationship" label="紧急联系人关系"></el-table-column>
<template slot-scope="scope" fixed="right"> <el-table-column align="center" prop="endTime" label="离场时间" min-width="135" >
<el-button size="mini" type="info" plain @click='handleRemove(scope.row)'>黑名单</el-button> <template slot-scope="scope" >
{{ scope.row.endTime | timestampToTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed="right" label="工作记录" > <el-table-column align="center" prop="urgentRelationship" label="离场类型">
<template slot-scope="scope" fixed="right"> <template slot-scope="scope" >
{{ scope.row.leavetype==0?'自离':scope.row.leavetype==1?'辞退':scope.row.leavetype==2?'辞职':'' }}
</template>
</el-table-column>
<el-table-column align="center" prop="reason" label="离场原因" min-width="100"></el-table-column>
<el-table-column align="center" prop="blacklistReasons" label="黑名单备注" min-width="200"></el-table-column>
<el-table-column align="center" label="状态" width="350px">
<template slot-scope='scope'>
<el-tag :type="scope.row.isZhongkong?'':'warning'">{{ scope.row.isZhongkong?'已推送中控':'未推送中控' }}</el-tag>
<el-tag :type="scope.row.isBeisen!=0?'success':'warning'">{{ scope.row.isBeisen?'已推送北森':'未推送北森' }}</el-tag>
<el-tag type="danger" v-if='scope.row.beisenDimission && scope.row.isBeisen == 1'>{{ '北森已离场' }}</el-tag>
<el-tag type="danger" v-if='scope.row.zhongkongDimission && scope.row.isZhongkong '>{{ '中控已离场' }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" min-width="120" >
<template slot-scope="scope" >
<el-button size="mini" type="info" plain @click='handleRemove(scope.row)' v-if='scope.row.type == 0'>黑名单</el-button>
<el-button size="mini" type="primary" plain @click='handleRemoves(scope.row)' v-else></el-button>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="工作记录" min-width="100">
<template slot-scope="scope" >
<el-button size="mini" type="primary" plain @click='handleJon(scope.row)'>查看</el-button> <el-button size="mini" type="primary" plain @click='handleJon(scope.row)'>查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed="right" label="扫码记录" > <el-table-column align="center" fixed="right" label="扫码记录" min-width="100">
<template slot-scope="scope" fixed="right"> <template slot-scope="scope">
<el-button size="mini" type="primary" plain @click='handleCode(scope.row)'>查看</el-button> <el-button size="mini" type="primary" plain @click='handleCode(scope.row)'>查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -31,20 +69,41 @@
<sendCode ref='sendCode'></sendCode> <sendCode ref='sendCode'></sendCode>
</div> </div>
</template> </template>
<script> <script>
import { getBlackList,updateBlackList } from "../../../../api/storeManage"; import { getBlackList,updateBlackList } from "../../../../api/storeManage";
import Bus from "../Bus.js";
import jonContent from './jonContent' import jonContent from './jonContent'
import sendCode from '@/pages/storeManage/baseStaff/components/sendCode' import sendCode from '@/pages/storeManage/baseStaff/components/sendCode'
export default { export default {
props:{
searchForm:{
type:Object,
default:{}
},
},
components:{ components:{
jonContent, jonContent,
sendCode sendCode
}, },
props: ["notList"], filters:{
timestampToTime(timestamp) {
timestamp = timestamp ? timestamp : null;
if(!timestamp){
return ''
}
let date = new Date(timestamp);
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D;
},
},
data() { data() {
return { return {
queryForm:{},
loading:true,
dialogFormVisible: false, dialogFormVisible: false,
list:[], list:[],
total: 0, // total: 0, //
@ -52,21 +111,22 @@
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
storeId:sessionStorage.getItem("parentId"), storeId:sessionStorage.getItem("parentId"),
type:0 // type:0
}, },
queryFome:{}, sizeNumList:[]
}; };
}, },
methods: { methods: {
handleCode(row){ changePageNum(num){
this.$refs.sendCode.show({identityCard:row.identityCard}) this.pageInfo.pageNum = num||1
}, },
handleJon(row){ tableRowClassName({ row, rowIndex }) {
console.log(row.identityCard) // 使
this.$refs.jonContent.show({identityCard:row.identityCard}) console.log()
return 'normal-row';
}, },
handleRemove(row){ handleRemoves(row){
this.$confirm("是否将该员工移黑名单?", "提示", { this.$confirm("是否将该员工移黑名单?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
@ -83,7 +143,46 @@
inputName:row.inputName, inputName:row.inputName,
inputDate:row.inputDate, inputDate:row.inputDate,
inputId:row.inputId, inputId:row.inputId,
type:1 type:0
}
updateBlackList(params).then(res=>{
if(res.code == '000000'){
this.$message.success({ message: "成功移除黑名单" })
this.leave()
}
})
})
},
handleCode(row){
this.$refs.sendCode.show({identityCard:row.identityCard})
},
handleJon(row){
this.$refs.jonContent.show({identityCard:row.identityCard})
},
handleRemove(row){
// this.$confirm("?", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// cancelButtonClass: "cancelbtnFalses",
// confirmButtonClass: "confirmbtnFalses",
// }).
this.$prompt('请输入黑名单原因', '移入黑名单', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value })=>{
let params = {
staffName:row.staffName,
mobilePhone:row.mobilePhone,
identityCard:row.identityCard,
storeId:sessionStorage.getItem("parentId"),
sex:row.sex == '男'?'0':'1',
id:row.id,
inputName:row.inputName,
inputDate:row.inputDate,
inputId:row.inputId,
type:1,
blacklistReasons:value
} }
updateBlackList(params).then(res=>{ updateBlackList(params).then(res=>{
if(res.code == '000000'){ if(res.code == '000000'){
@ -93,38 +192,104 @@
}) })
}) })
}, },
timestampToTime(timestamp) {
let date = new Date(timestamp);
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
return Y + M + D;
},
// //
handleSizeChange(val) { handleSizeChange(val) {
this.pageInfo.pageSize = val this.pageInfo.pageSize = val
this.leave(); this.leave(this.searchForm);
// if(this.queryForm.lastTime && !this.queryForm.startTime){
// this.select(this.queryFome)
// }else{
// this.leave(this.searchForm);
// }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageInfo.pageNum = val this.pageInfo.pageNum = val
this.leave(); this.leave(this.searchForm);
// if(this.queryForm.lastTime && !this.queryForm.startTime){
// this.select(this.queryFome)
// }else{
// this.leave(this.searchForm);
// }
},
paginatedData(arr) {
const start = (this.pageInfo.pageNum - 1) * this.pageInfo.pageSize;
const end = start + this.pageInfo.pageSize;
return arr.slice(start, end);
}, },
select(queryForm){ select(queryForm){
getBlackList({...queryForm,...this.pageInfo}).then((res) => { this.loading = true
this.$emit('updataisdisabled',true)
let params = {
...queryForm,...this.pageInfo
}
// if(queryForm.lastTime && !queryForm.startTime){
// this.queryForm = queryForm
// params.pageNum = 1
// params.pageSize = 9999
// getBlackList(params).then(res=>{
// this.$emit('updataisdisabled',false)
// this.loading = false
// res.pageInfo.list.forEach((item) => {
// if (item.sex == 1) {
// item.sex = "";
// } else if (item.sex == 0) {
// item.sex = "";
// }
// });
// this.sizeNumList = res.pageInfo.list
// this.list = this.paginatedData(res.pageInfo.list)
// this.total = res.pageInfo.total;
// })
// }else{
getBlackList(params).then((res) => {
this.$emit('updataisdisabled',false)
this.loading = false
var list = []; var list = [];
res.pageInfo.list.forEach((item) => { res.pageInfo.list.forEach((item) => {
// try{
// if(queryForm.lastTime && !queryForm.startTime){
// if(item.endTime){
// let data1 = new Date( this.timestampToTime(queryForm.lastTime) )
// let data2 = new Date( this.timestampToTime(item.endTime) )
// console.log(data2.getTime(),data1.getTime(),this.timestampToTime(queryForm.lastTime),this.timestampToTime(item.endTime))
// if(( data2.getTime() >= data1.getTime()) ){ //
// item.zhongkongDimission = false
// }
// }
// }
// }catch(err){}
if (item.sex == 1) { if (item.sex == 1) {
item.sex = "男";
} else if (item.sex == 0) {
item.sex = "女"; item.sex = "女";
} else if (item.sex == 0) {
item.sex = "男";
} }
list.push(item); list.push(item);
}); });
this.list = list; this.list = list;
this.total = res.pageInfo.total; this.total = res.pageInfo.total;
}) })
// }
}, },
leave() {
getBlackList({...this.queryFome,...this.pageInfo}).then((res) => { leave(queryFome) {
var list = []; this.loading = true
this.$emit('updataisdisabled',true)
getBlackList({...queryFome,...this.pageInfo}).then((res) => {
this.$emit('updataisdisabled',false)
this.loading = false
var list = []
res.pageInfo.list.forEach((item) => { res.pageInfo.list.forEach((item) => {
if (item.sex == 1) { if (item.sex == 1) {
item.sex = "男";
} else if (item.sex == 0) {
item.sex = "女"; item.sex = "女";
} else if (item.sex == 0) {
item.sex = "男";
} }
list.push(item); list.push(item);
}); });
@ -139,6 +304,9 @@
}; };
</script> </script>
<style scoped> <style scoped>
.normal-row{
background-color: #f5f5f5;
}
.el-input { .el-input {
width: 200px; width: 200px;
} }
@ -169,4 +337,3 @@
} }
</style> </style>

@ -93,16 +93,17 @@ export default {
res.data = this.sortByKey(res.data, "id"); res.data = this.sortByKey(res.data, "id");
let list = []; let list = [];
res.data.forEach((item) => { res.data.forEach((item) => {
if (item.id > 390) { // if (item.id > 390) {
item.menuList.forEach((items) => { item.menuList.forEach((items) => {
items.powerId = items.menuId; items.powerId = items.menuId;
items.powerName = items.menuName; items.powerName = items.menuName;
}); });
item.flag = false; item.flag = false;
list.push(item); list.push(item);
} // }
}); });
this.rolepowerList = list; this.rolepowerList = list;
console.log(this.rolepowerList)
this.getPower(); this.getPower();
} else { } else {
this.$alert(res.message, "获取菜单", { this.$alert(res.message, "获取菜单", {

@ -165,6 +165,7 @@ export default {
rolePage(page) rolePage(page)
.then((res) => { .then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
console.log(res)
this.list = res.pageInfo.list; this.list = res.pageInfo.list;
this.total = res.pageInfo.total; this.total = res.pageInfo.total;
} else { } else {
@ -183,12 +184,7 @@ export default {
}, },
}, },
created() { created() {
let list = JSON.parse(sessionStorage.getItem("list")); this.getData()
list.forEach((item) => {
if (item.id == 4008101) {
this.getData();
}
});
}, },
}; };
</script> </script>

@ -41,7 +41,7 @@ const router = new VueRouter({
path: "/codeJob", path: "/codeJob",
component: () => import("../pages/qyMange/lsg"), component: () => import("../pages/qyMange/lsg"),
meta: { meta: {
title: "扫码工作记录", title: "待入场记录",
index: "codeJob" index: "codeJob"
} }
}, },
@ -69,6 +69,23 @@ const router = new VueRouter({
index: "errList" index: "errList"
} }
}, },
// errAttendance
{
path: "/errAttendance",
component: () => import("../pages/qyMange/errAttendance"),
meta: {
title: "考勤异常记录",
index: "errAttendance"
}
},
{
path: "/updateList",
component: () => import("../pages/qyMange/updateList"),
meta: {
title: "临时工修改记录",
index: "updateList"
}
},
{ {
path: "/qydaAdd", path: "/qydaAdd",
component: () => import("../pages/storeManage/baseStore/baseStore"), component: () => import("../pages/storeManage/baseStore/baseStore"),
@ -130,7 +147,7 @@ const router = new VueRouter({
component: () => component: () =>
import("../pages/storeManage/baseStaff/baseStaff.vue"), import("../pages/storeManage/baseStaff/baseStaff.vue"),
meta: { meta: {
title: "临时工", title: "已入场记录",
index: "baseStaff" index: "baseStaff"
} }
}, },

Loading…
Cancel
Save