Commit c6debec2 authored by 姬鋆屾's avatar 姬鋆屾

fixed:修改员工关怀

parent f2275486
...@@ -4,35 +4,75 @@ ...@@ -4,35 +4,75 @@
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="50%"> size="50%"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field label="员工姓名" prop="staffName" v-model="form.staffId" type="select" :enumData="dict.staffId" placeholder="请输入员工姓名"/> <Field
<Field label="出生日期" prop="birthday" v-model="form.birthday" type="date" /> label="员工姓名"
<Field label="所属部门" prop="deptId" v-model="form.deptId" type="select" :enumData="dict.deptId" placeholder="请输入所属部门"/> prop="staffId"
<Field label="职位ID" prop="jobId" v-model="form.jobId" type="select" :enumData="dict.jobId" placeholder="请输入职位ID"/> v-model="form.staffId"
<Field label="入职时间" prop="entryDate" v-model="form.entryDate" type="date" /> type="select"
<Field label="关怀类型" prop="careType" v-model="form.careType" type="select" :enumData="dict.careType" placeholder="请选择关怀类型"/> :enumData="dict.staffId"
<Field label="关怀内容" prop="content" v-model="form.content" type="textarea"></Field> placeholder="请输入员工姓名"
/>
<Field
label="出生日期"
prop="birthday"
v-model="form.birthday"
type="date"
/>
<Field
label="所属部门"
prop="deptId"
v-model="form.deptId"
type="select"
:enumData="dict.deptId"
placeholder="请输入所属部门"
/>
<Field
label="职位ID"
prop="jobId"
v-model="form.jobId"
type="select"
:enumData="dict.jobId"
placeholder="请输入职位ID"
/>
<Field
label="入职时间"
prop="entryDate"
v-model="form.entryDate"
type="date"
/>
<Field
label="关怀类型"
prop="careType"
v-model="form.careType"
type="select"
:enumData="dict.careType"
placeholder="请选择关怀类型"
/>
<Field
label="关怀内容"
prop="content"
v-model="form.content"
type="textarea"
></Field>
</el-row> </el-row>
<form-buttons @submit='submitForm' noCancelBtn /> <form-buttons @submit="submitForm" noCancelBtn />
</el-form> </el-form>
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
export default { export default {
name: "StaffCareDetail", name: "StaffCareDetail",
mixins: [form], mixins: [form],
components: { components: {},
},
created() { created() {
this.changePath("staff/care") this.changePath("staff/care");
}, },
data() { data() {
return { return {
...@@ -42,53 +82,44 @@ ...@@ -42,53 +82,44 @@
title: "员工关怀信息", title: "员工关怀信息",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
direction:"rtl", direction: "rtl",
toString:[ toString: ["careType", "sendStatus"],
"careType", toDate: ["birthday", "entryDate"],
"sendStatus",
],
toDate:[
"birthday",
"entryDate",
],
// 表单校验 // 表单校验
rules: { rules: {
staffName: [ staffId: [
{required: true,message: "请输入员工姓名", trigger: "blur" }, { required: true, message: "请输入员工姓名", trigger: "blur" },
{max: 64,message: "最多只能录入64个字符",trigger: "blur",},
],
createTime: [
{required: true,message: "请选择创建时间" },
], ],
} createTime: [{ required: true, message: "请选择创建时间" }],
},
}; };
}, },
methods: { methods: {
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="staff/care/edit"; this.urls.currUrl = "staff/care/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit";
this.title = "修改员工关怀信息"; this.title = "修改员工关怀信息";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "staff/care/add"; this.urls.currUrl = "staff/care/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add";
this.title = "新增员工关怀信息"; this.title = "新增员工关怀信息";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="staff/care/view"; this.urls.currUrl = "staff/care/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view";
this.title = "员工关怀信息详细"; this.title = "员工关怀信息详细";
}, },
/**取消按钮 */ /**取消按钮 */
...@@ -108,17 +139,17 @@ ...@@ -108,17 +139,17 @@
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
staffId : null, staffId: null,
staffName : "", staffName: "",
birthday : null, birthday: null,
deptId : null, deptId: null,
deptName : "", deptName: "",
jobId : null, jobId: null,
jobName : "", jobName: "",
entryDate : null, entryDate: null,
careType : 1, careType: 1,
sendStatus : 0, sendStatus: 0,
content : "", content: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -128,5 +159,5 @@ ...@@ -128,5 +159,5 @@
} }
}, },
}, },
}; };
</script> </script>
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