Commit 4bcf572c authored by 姬鋆屾's avatar 姬鋆屾

pref:员工关怀添加发送短信控制,调整表格内容及新增编辑内容

parent c3db5788
...@@ -541,7 +541,8 @@ export default { ...@@ -541,7 +541,8 @@ export default {
this.form = Object.assign({}, this.form, newData); this.form = Object.assign({}, this.form, newData);
if ( if (
this.$route.name == "check/window/workman/perform/detail/list" || this.$route.name == "check/window/workman/perform/detail/list" ||
this.$route.name == "window/perform/summary/list" this.$route.name == "window/perform/summary/list" ||
this.$route.name == "staff/care/list"
) { ) {
this.form.yearmonth = timestampToTime(new Date(), 2); this.form.yearmonth = timestampToTime(new Date(), 2);
this.form.year = timestampToTime(new Date(), 2).slice(0, 4); this.form.year = timestampToTime(new Date(), 2).slice(0, 4);
...@@ -551,6 +552,9 @@ export default { ...@@ -551,6 +552,9 @@ export default {
if (this.$route.name == "staff/leave/list") { if (this.$route.name == "staff/leave/list") {
this.form.idList = ""; this.form.idList = "";
} }
if (this.$route.name == "staff/care/list") {
this.form.careType = "1";
}
this.onSubmit(); this.onSubmit();
}, },
onSubmit() { onSubmit() {
......
...@@ -30,14 +30,14 @@ ...@@ -30,14 +30,14 @@
:enumData="dict.deptId" :enumData="dict.deptId"
placeholder="请输入所属部门" placeholder="请输入所属部门"
/> />
<Field <!-- <Field
label="职位ID" label="职位ID"
prop="jobId" prop="jobId"
v-model="form.jobId" v-model="form.jobId"
type="select" type="select"
:enumData="dict.jobId" :enumData="dict.jobId"
placeholder="请输入职位ID" placeholder="请输入职位ID"
/> /> -->
<Field <Field
label="入职时间" label="入职时间"
prop="entryDate" prop="entryDate"
...@@ -52,12 +52,22 @@ ...@@ -52,12 +52,22 @@
:enumData="dict.careType" :enumData="dict.careType"
placeholder="请选择关怀类型" placeholder="请选择关怀类型"
/> />
<Field <!-- <Field label="是否发送短信" prop="isSend">
<el-switch
v-model="form.isSend"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="1"
inactive-value="0"
>
</el-switch>
</Field> -->
<!-- <Field
label="关怀内容" label="关怀内容"
prop="content" prop="content"
v-model="form.content" v-model="form.content"
type="textarea" type="textarea"
></Field> ></Field> -->
</el-row> </el-row>
<form-buttons @submit="submitForm" noCancelBtn /> <form-buttons @submit="submitForm" noCancelBtn />
...@@ -83,7 +93,6 @@ export default { ...@@ -83,7 +93,6 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
direction: "rtl", direction: "rtl",
toString: ["careType", "sendStatus"],
toDate: ["birthday", "entryDate"], toDate: ["birthday", "entryDate"],
// 表单校验 // 表单校验
rules: { rules: {
......
<template> <template>
<div class="page"> <div class="page">
<LayoutTable :data="tableData" :config="tableConfig"> <LayoutTable :data="tableData" notDel :config="tableConfig">
<!-- <el-button <!-- <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
@click="handleImport" @click="handleImport"
>导入</el-button >导入</el-button
> --> > -->
<el-button <el-button
slot="table-head-left2" slot="table-head-left2"
style="margin-left: 10px" style="margin-left: 10px"
...@@ -18,6 +19,49 @@ ...@@ -18,6 +19,49 @@
:disabled="isExport" :disabled="isExport"
>导出</el-button >导出</el-button
> >
<span slot="table-head-left2" v-if="$route.query.careType">
<span style="color: #999; font-size: 14px">是否发送短信:</span>
<el-switch
v-if="$route.query.careType == 1"
v-model="tableData.StaffCareBirthdaySend"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="1"
inactive-value="0"
@change="handleChange"
>
</el-switch>
<el-switch
v-if="$route.query.careType == 2"
v-model="tableData.StaffCareEntryDateSend"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="1"
inactive-value="0"
@change="handleChange"
>
</el-switch>
</span>
<span
slot="table-head-right2"
v-if="$route.query.careType"
style="
color: #999;
font-size: 14px;
display: flex;
align-items: center;
margin-right: 10px;
"
>{{ $route.query.year + "" + $route.query.month + ""
}}{{ $route.query.careType == 1 ? "过生日的员工" : "过入职周年的员工" }}
<span style="color: #1a7af8; font-size: 14px">
{{
`(共${
$route.query.careType == 1 ? tableData.shengri : tableData.ruzhi
}人)`
}}
</span>
</span>
</LayoutTable> </LayoutTable>
<!-- 员工关怀信息导入对话框 --> <!-- 员工关怀信息导入对话框 -->
...@@ -80,6 +124,7 @@ export default { ...@@ -80,6 +124,7 @@ export default {
created() {}, created() {},
data() { data() {
return { return {
isSend: 0,
// 用户导入参数 // 用户导入参数
upload: { upload: {
// 是否显示弹出层(员工关怀信息导入) // 是否显示弹出层(员工关怀信息导入)
...@@ -103,6 +148,17 @@ export default { ...@@ -103,6 +148,17 @@ export default {
label: "员工姓名", label: "员工姓名",
fuzzy: true, fuzzy: true,
}, },
{
name: "careType",
type: "select",
label: "关怀类型",
},
{
name: "yearmonth",
type: "month",
label: "请选择月份",
fuzzy: false,
},
], ],
columns: [ columns: [
{ type: "selection", width: 60 }, { type: "selection", width: 60 },
...@@ -112,18 +168,22 @@ export default { ...@@ -112,18 +168,22 @@ export default {
{ {
label: "入职时间", label: "入职时间",
prop: "entryDate", prop: "entryDate",
formatter: this.formatterDate, formatter: this.formatterDateOnly,
}, },
{
label: "生日时间",
prop: "birthday",
formatter: this.formatterDateOnly,
},
{ label: "关怀类型", prop: "careType", formatter: this.formatter }, { label: "关怀类型", prop: "careType", formatter: this.formatter },
{ label: "发送状态", prop: "sendStatus", formatter: this.formatter }, { label: "发送状态", prop: "sendStatus", formatter: this.formatter },
{ // {
label: "创建用户", // label: "创建用户",
prop: "createUserId", // prop: "createUserId",
formatter: this.formatter, // formatter: this.formatter,
}, // },
{ {
label: "操作", label: "操作",
width: 240, width: 240,
...@@ -131,6 +191,8 @@ export default { ...@@ -131,6 +191,8 @@ export default {
return ( return (
<table-buttons <table-buttons
noAdd noAdd
noView
noDel
row={row} row={row}
onEdit={this.toEdit} onEdit={this.toEdit}
onView={this.toView} onView={this.toView}
...@@ -144,6 +206,27 @@ export default { ...@@ -144,6 +206,27 @@ export default {
}; };
}, },
methods: { methods: {
// 是否发送短信
handleChange(val) {
this.$post("/staff/care/sendSwitch", {
paramValue: val,
paramType:
this.$route.query.careType == 1
? "StaffCareBirthdaySend"
: this.$route.query.careType == 2
? "StaffCareEntryDateSend"
: "",
})
.then((res) => {
console.log(res);
if (res.code == 1) {
this.$message.success(res.msg);
}
})
.catch((error) => {
this.$message.error(error.message);
});
},
/** 导入 */ /** 导入 */
handleImport() { handleImport() {
this.upload.title = "员工关怀信息导入"; this.upload.title = "员工关怀信息导入";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment