forked from integrated_whb/integrated_whb_vue
从业人员管理
parent
6c66a00624
commit
3213c25bc1
|
@ -11,6 +11,8 @@ import {
|
|||
getIndustryType,
|
||||
getPostType,
|
||||
getTrainingLevel,
|
||||
getLevelsByObject,
|
||||
getLevelCustom,
|
||||
} from "@/request/data_dictionary.js";
|
||||
import { ref } from "vue";
|
||||
|
||||
|
@ -83,10 +85,15 @@ export const layoutFnGetDegreeOfEducation = async () => {
|
|||
return ref(resData.list);
|
||||
};
|
||||
// 人员类型
|
||||
export const layoutFnGetPersonnelType = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e",
|
||||
});
|
||||
// export const layoutFnGetPersonnelType = async () => {
|
||||
// const resData = await getLevels({
|
||||
// DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e",
|
||||
// });
|
||||
// return ref(resData.list);
|
||||
// };
|
||||
// 人员类型(交通版)
|
||||
export const layoutFnGetPersonnelTypeTraffic = async (params) => {
|
||||
const resData = await getLevelsByObject(params);
|
||||
return ref(resData.list);
|
||||
};
|
||||
// 签字人员类型
|
||||
|
@ -262,3 +269,28 @@ export const layoutFnGetTestQuestionLabels = async () => {
|
|||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 准驾车型
|
||||
export const layoutFnGetDrivingModel = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "b41e247057334789b60bdf3fe6d8d6ba",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 国籍
|
||||
export const layoutFnGetNationality = async () => {
|
||||
const resData = await getLevels({
|
||||
DICTIONARIES_ID: "3b614b43e8814f51a3492f2fdbc9a415",
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
||||
// 从业资格类别
|
||||
export const layoutFnGetQualificationCertificateCategory = async () => {
|
||||
const resData = await getLevelCustom({
|
||||
DICTIONARIES_ID: "ed38fa5f78c64e6d906d2bad0d72bd63",
|
||||
LEVEL: 3,
|
||||
});
|
||||
return ref(resData.list);
|
||||
};
|
||||
|
|
|
@ -280,6 +280,20 @@ export function addingPrefixToFile(list) {
|
|||
}
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* @description 附件添加前缀
|
||||
* @param {string} filepath 附件地址
|
||||
* @return {Array} 添加完的数组
|
||||
**/
|
||||
export function addingPrefixFile(filepath) {
|
||||
const list = [];
|
||||
const FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||
const file = {};
|
||||
file.url = FILE_URL + filepath;
|
||||
file.name = getFileName(filepath);
|
||||
list.push(file);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 验证重复选择
|
||||
|
|
|
@ -10,6 +10,18 @@ export const getLevels = (params) =>
|
|||
...params,
|
||||
});
|
||||
// 获取数据字典
|
||||
export const getLevelsByObject = (params) =>
|
||||
post("/dictionaries/getDictList", {
|
||||
loading: false,
|
||||
...params,
|
||||
});
|
||||
// 获取数据字典
|
||||
export const getLevelCustom = (params) =>
|
||||
post("/dictionaries/getLevelCustom", {
|
||||
loading: false,
|
||||
...params,
|
||||
});
|
||||
// 获取数据字典
|
||||
export const getLevelsCorp = (params) =>
|
||||
post("/dictionariesCorp/getLevels", {
|
||||
loading: false,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { post, upload } from "@/request/axios.js";
|
||||
import { getLevelsByParentId } from "@/request/data_dictionary.js";
|
||||
import { getLevelsByObject, getLevelsByParentId } from "@/request/data_dictionary.js";
|
||||
import { ref } from "vue";
|
||||
|
||||
export const getSecurityNoticeList = (params) =>
|
||||
|
@ -16,6 +16,7 @@ export const addSecurityNotice = (params) =>
|
|||
upload("/securitynotice/add", params); // 添加安全通知
|
||||
export const getUserListAll = (params) => post("/user/listSelect", params);
|
||||
|
||||
// 通知等级
|
||||
export const layoutFnGetNotificationsClassification = async () => {
|
||||
const resData = await getLevelsByParentId({
|
||||
parentId: "aaecb47d95524b84904809671e48a777",
|
||||
|
@ -23,9 +24,11 @@ export const layoutFnGetNotificationsClassification = async () => {
|
|||
return ref(resData);
|
||||
};
|
||||
|
||||
// 从业类型(人员类型)
|
||||
export const layoutFnGetSIGNEDSTATUSClassification = async () => {
|
||||
const resData = await getLevelsByParentId({
|
||||
parentId: "bbecb47d95524b84904809671e48a777",
|
||||
const resData = await getLevelsByObject({
|
||||
DICTIONARIES_ID: '0b62f92b0b624aab8e89a77304a64d5e',
|
||||
BIANMA: 'TRAFFIC_EMPLOYMENT'
|
||||
});
|
||||
return ref(resData);
|
||||
};
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
import { post, upload } from "@/request/axios.js";
|
||||
|
||||
// 从业人员管理列表
|
||||
export const getPractitionerList = (params) =>
|
||||
post("/user/getPractitionerPage", params);
|
||||
|
||||
// 从业人员审核
|
||||
export const setPractitionerReview = (params) =>
|
||||
post("/user/setPractitionerReview", params);
|
||||
|
||||
// 从业人员信息
|
||||
export const getPractitionerInfo = (params) =>
|
||||
post("/user/getPractitionerInfo", params);
|
||||
|
||||
export const getPractitionerForEdit = (params) => post("/user/getPractitionerForEdit", params); // 用户管理查看
|
||||
|
||||
// 从业人员添加(需从业人员确认)
|
||||
export const setPractitionerAdd = (params) =>
|
||||
upload("/user/setPractitionerAdd", params);
|
||||
|
||||
// 从业人员修改(需从业人员确认)
|
||||
export const setPractitionerEdit = (params) =>
|
||||
upload("/user/setPractitionerEdit", params);
|
||||
|
||||
// 从业人员解聘
|
||||
export const setPractitionerDismissal = (params) =>
|
||||
post("/user/setPractitionerDismissal", params);
|
|
@ -1,422 +0,0 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="175px"
|
||||
>
|
||||
<!-- 承运信息 -->
|
||||
<el-divider content-position="left">承运信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="DEPARTMENT_ID" label="部门">
|
||||
<layout-department
|
||||
v-model="data.form.DEPARTMENT_ID"
|
||||
@update:model-value="fnDepartmentChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item v-if="!LISTMANAGER_ID" label="调度人" prop="USER_IDS">
|
||||
<el-select v-model="data.form.USER_IDS" multiple>
|
||||
<el-option
|
||||
v-for="item in data.userList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="承运日期" prop="SHIPPINGDATE">
|
||||
<el-date-picker
|
||||
v-model="data.form.SHIPPINGDATE"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运输车辆" prop="TRANSPORTVEHICLE">
|
||||
<el-select
|
||||
v-model="data.form.TRANSPORTVEHICLE"
|
||||
placeholder="请选择运输车辆"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.OperationVehicle"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="从业人员" prop="PRACTITIONER">
|
||||
<el-select
|
||||
v-model="data.form.PRACTITIONER"
|
||||
placeholder="请选择从业人员"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in PRACTITIONERMENU"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="货运挂车" prop="TRUCKCART">
|
||||
<el-select
|
||||
v-model="data.form.TRUCKCART"
|
||||
placeholder="请选择货运挂车"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in TRUCKMENU"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人员电话" prop="EMPLOYEEPHONE">
|
||||
<el-input
|
||||
v-model="data.form.EMPLOYEEPHONE"
|
||||
placeholder="请输入人员电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人员类型" prop="PRACTITIONERTYPE">
|
||||
<el-select
|
||||
v-model="data.form.PRACTITIONERTYPE"
|
||||
placeholder="请选择人员类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in PERSONTYPEMENU"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="身份证号" prop="IDENTITYID">
|
||||
<el-input
|
||||
v-model="data.form.IDENTITYID"
|
||||
placeholder="请输入身份证号"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 客户信息 -->
|
||||
<el-divider content-position="left">客户信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="委托方" prop="CLIENT">
|
||||
<el-select v-model="data.form.CLIENT" placeholder="请选择委托方">
|
||||
<el-option
|
||||
v-for="item in data.clientOptions"
|
||||
:key="item.CONTACT"
|
||||
:label="item.COMP_NAME"
|
||||
:value="item.CONTACT"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="CLIENTCONTACTPERSON">
|
||||
<el-input
|
||||
v-model="data.form.CLIENTCONTACTPERSON"
|
||||
placeholder="请输入联系人"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="CLIENTCONTACTPHONE">
|
||||
<el-input
|
||||
v-model="data.form.CLIENTCONTACTPHONE"
|
||||
placeholder="请输入联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认方" prop="CONFIRMER">
|
||||
<el-select v-model="data.form.CONFIRMER" placeholder="请选择确认方">
|
||||
<el-option
|
||||
v-for="item in data.confirmerOptions"
|
||||
:key="item.CONTACT"
|
||||
:label="item.COMP_NAME"
|
||||
:value="item.CONTACT"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="CONFIRMINGPERSON">
|
||||
<el-input
|
||||
v-model="data.form.CONFIRMINGPERSON"
|
||||
placeholder="请输入联系人"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="CONFIRMINGPHONE">
|
||||
<el-input
|
||||
v-model="data.form.CONFIRMINGPHONE"
|
||||
placeholder="请输入联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 地点信息 -->
|
||||
<el-divider content-position="left">地点信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="起运地点" prop="ORIGIN">
|
||||
<el-select v-model="data.form.ORIGIN" placeholder="请选择起运地点">
|
||||
<el-option
|
||||
v-for="item in data.StartOptions"
|
||||
:key="item.LOCATIONMANAGEMENT_ID"
|
||||
:label="item.LOCATIONNAME"
|
||||
:value="item.LOCATIONMANAGEMENT_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="起运地址" prop="SHIPPINGADDRESS">
|
||||
<el-input
|
||||
v-model="data.form.SHIPPINGADDRESS"
|
||||
placeholder="请输入起运地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="行政区域" prop="STARTADMINISTRATIVEAREA">
|
||||
<el-input
|
||||
v-model="data.form.STARTADMINISTRATIVEAREA"
|
||||
placeholder="请输入行政区域"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目的地点" prop="DESTINATION">
|
||||
<el-select
|
||||
v-model="data.form.DESTINATION"
|
||||
placeholder="请选择目的地点"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.EndOptions"
|
||||
:key="item.LOCATIONMANAGEMENT_ID"
|
||||
:label="item.LOCATIONNAME"
|
||||
:value="item.LOCATIONMANAGEMENT_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目的地址" prop="DESTINATIONADDRESS">
|
||||
<el-input
|
||||
v-model="data.form.DESTINATIONADDRESS"
|
||||
placeholder="请输入目的地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="行政区域" prop="ENDDMINISTRATIVEAREA">
|
||||
<el-input
|
||||
v-model="data.form.ENDDMINISTRATIVEAREA"
|
||||
placeholder="请输入行政区域"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
|
||||
import {
|
||||
PRACTITIONERMENU,
|
||||
TRUCKMENU,
|
||||
PERSONTYPEMENU,
|
||||
} from "@/assets/js/constant";
|
||||
import {
|
||||
addSafetyThingsChecView,
|
||||
getSecurityPerson,
|
||||
} from "@/request/waybill_registration.js";
|
||||
import { onMounted, reactive, ref, watchEffect } from "vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { getPostListAll, getUserListAll } from "@/request/data_dictionary.js";
|
||||
import { getSecurityCustomerList } from "@/request/customer_management.js";
|
||||
import { getSecurityLocationList } from "@/request/location_management.js";
|
||||
import { getOperationVehicleList } from "@/request/operation_vehicle.js";
|
||||
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
TRANSPORTATIONCOMPANY: [
|
||||
{ required: true, message: "请输入运输企业名称", trigger: "blur" },
|
||||
],
|
||||
DISPATCHER: [
|
||||
{ required: true, message: "请输入调度人姓名", trigger: "blur" },
|
||||
],
|
||||
SHIPPINGDATE: [
|
||||
{ required: true, message: "请选择承运日期", trigger: "change" },
|
||||
],
|
||||
CLIENT: [{ required: true, message: "请选择委托方名称", trigger: "change" }],
|
||||
CLIENTCONTACTPERSON: [
|
||||
{ required: true, message: "请输入联系人姓名", trigger: "blur" },
|
||||
],
|
||||
CLIENTCONTACTPHONE: [
|
||||
{ required: true, message: "请输入联系电话", trigger: "blur" },
|
||||
],
|
||||
CONFIRMER: [
|
||||
{ required: true, message: "请选择确认方名称", trigger: "change" },
|
||||
],
|
||||
ORIGIN: [{ required: true, message: "请选择起运地点", trigger: "change" }],
|
||||
SHIPPINGADDRESS: [
|
||||
{ required: true, message: "请输入起运地址", trigger: "blur" },
|
||||
],
|
||||
DESTINATION: [
|
||||
{ required: true, message: "请选择目的地点", trigger: "change" },
|
||||
],
|
||||
DESTINATIONADDRESS: [
|
||||
{ required: true, message: "请输入目的地址", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
|
||||
const relatedClassificationTempList =
|
||||
await layoutFnGetMEETINGTYPEClassification();
|
||||
const relatedClassificationList = [];
|
||||
JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => {
|
||||
relatedClassificationList.push({ name: e.id, BIANMA: e.name });
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
TRANSPORTATIONCOMPANY: "",
|
||||
DISPATCHER: "",
|
||||
DEPARTMENT_ID: "",
|
||||
POST_ID: "",
|
||||
USER_IDS: [],
|
||||
USER_ID: "",
|
||||
SHIPPINGDATE: "",
|
||||
IDENTITYID: "",
|
||||
TRUCKCART: "",
|
||||
EMPLOYEEPHONE: "",
|
||||
PRACTITIONER: "",
|
||||
TRANSPORTVEHICLE: "",
|
||||
CLIENT: "",
|
||||
CLIENTCONTACTPERSON: "",
|
||||
CLIENTCONTACTPHONE: "",
|
||||
CONFIRMER: "",
|
||||
CONFIRMINGPERSON: "",
|
||||
CONFIRMINGPHONE: "",
|
||||
ORIGIN: "",
|
||||
SHIPPINGADDRESS: "",
|
||||
STARTADMINISTRATIVEAREA: "",
|
||||
DESTINATION: "",
|
||||
DESTINATIONADDRESS: "",
|
||||
ENDDMINISTRATIVEAREA: "",
|
||||
},
|
||||
clientOptions: [], // 委托方选项
|
||||
confirmerOptions: [], // 确认方选项
|
||||
StartOptions: [], // 起始地
|
||||
EndOptions: [], // 目的地
|
||||
OperationVehicle: [], // 运输车辆
|
||||
});
|
||||
const fnVehicle = async () => {
|
||||
const res = await getOperationVehicleList();
|
||||
const varList = res.varList || [];
|
||||
data.OperationVehicle = varList.map((item) => item.PLATE_NUMBER);
|
||||
};
|
||||
|
||||
const fnCustomerType = async () => {
|
||||
const res = await getSecurityCustomerList();
|
||||
const varList = res.varList || [];
|
||||
data.clientOptions = varList.filter((item) => item.CUSTOMERTYPE === "1");
|
||||
data.confirmerOptions = varList.filter((item) => item.CUSTOMERTYPE === "2");
|
||||
};
|
||||
|
||||
const fnLocation = async () => {
|
||||
const res = await getSecurityLocationList();
|
||||
const varList = res.varList || [];
|
||||
data.StartOptions = varList.filter((item) => item.LOCATIONTYPE === "1");
|
||||
data.EndOptions = varList.filter((item) => item.LOCATIONTYPE === "2");
|
||||
};
|
||||
const fnDepartmentChange = async () => {
|
||||
data.userList = [];
|
||||
data.form.USER_IDS = [];
|
||||
data.form.USER_ID = "";
|
||||
await fnGetUser(data.form.DEPARTMENT_ID);
|
||||
};
|
||||
const fnGetPost = async (DEPARTMENT_ID) => {
|
||||
const resData = await getPostListAll({ DEPARTMENT_ID });
|
||||
data.postList = resData.postList;
|
||||
};
|
||||
const fnGetUser = async (DEPARTMENT_ID) => {
|
||||
const resData = await getUserListAll({ DEPARTMENT_ID });
|
||||
data.userList = resData.userList;
|
||||
};
|
||||
watchEffect(() => {
|
||||
if (data.form.DEPARTMENT_ID) fnGetPost(data.form.DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fnPerson();
|
||||
await fnCustomerType();
|
||||
await fnLocation();
|
||||
await fnVehicle();
|
||||
});
|
||||
const fnPerson = async () => {
|
||||
const resData = await getSecurityPerson({});
|
||||
data.unitsList = [resData.pd];
|
||||
};
|
||||
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
formData.append(key, data.form[key]);
|
||||
});
|
||||
|
||||
await addSafetyThingsChecView(formData);
|
||||
ElMessage.success("添加成功");
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
if (Array.isArray(data.form[key])) {
|
||||
data.form[key] = [];
|
||||
} else {
|
||||
data.form[key] = "";
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.flexBox {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.addBtn {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,155 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="searchNotifications"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="从业人员" prop="PERSON">
|
||||
<el-input v-model="searchForm.PERSON" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="从业类型" prop="PRACTITIONERTYPE">
|
||||
<el-select v-model="searchForm.PRACTITIONERTYPE">
|
||||
<el-option
|
||||
v-for="item in relatedClassificationList"
|
||||
:key="item.BIANMA"
|
||||
:label="item.name"
|
||||
:value="item.BIANMA"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="签收状态" prop="SIGNEDSTATUS">
|
||||
<el-select v-model="searchForm.SIGNEDSTATUS">
|
||||
<el-option label="已签收" :value="1" />
|
||||
<!-- 1代表已签收 -->
|
||||
<el-option label="未签收" :value="0" />
|
||||
<!-- 0代表未签收 -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="回复状态" prop="REPLYSTATUS">
|
||||
<el-select v-model="searchForm.REPLYSTATUS">
|
||||
<el-option label="已回复" :value="1" />
|
||||
<!-- 1代表已回复 -->
|
||||
<el-option label="未回复" :value="0" />
|
||||
<!-- 0代表未回复 -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item>
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="resetSearchForm"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
stripe
|
||||
border
|
||||
show-header
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="从业人员" prop="PERSON" />
|
||||
<el-table-column label="从业类型" prop="PRACTITIONERTYPE" />
|
||||
<el-table-column label="签收时间" prop="SIGNEDDATE">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.SIGNEDDATE">{{ row.SIGNEDDATE }}</span>
|
||||
<el-tag v-else>未签收</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="回复时间" prop="REPLYDATE">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.REPLYDATE">{{ row.REPLYDATE }}</span>
|
||||
<el-tag v-else>未回复</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="回复内容" prop="REPLYCONTENT">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.REPLYCONTENT">{{ row.REPLYCONTENT }}</span>
|
||||
<el-tag v-else>未回复</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, onMounted, ref } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import {
|
||||
getSecurityNotice,
|
||||
layoutFnGetSIGNEDSTATUSClassification,
|
||||
} from "@/request/safety_production_related.js";
|
||||
import { serialNumber } from "@/assets/js/utils";
|
||||
import useListData from "@/assets/js/useListData";
|
||||
|
||||
const route = useRoute();
|
||||
const NOTIFICATION_ID = route.query.NOTIFICATION_ID;
|
||||
|
||||
const searchForm = reactive({
|
||||
PERSON: "",
|
||||
PRACTITIONERTYPE: "",
|
||||
SIGNEDSTATUS: null,
|
||||
REPLYSTATUS: null,
|
||||
});
|
||||
|
||||
const { list, pagination, fnGetData, fnResetPagination } = useListData(
|
||||
getSecurityNotice,
|
||||
{
|
||||
searchForm,
|
||||
otherParams: { NOTIFICATION_ID },
|
||||
usePagination: true,
|
||||
}
|
||||
);
|
||||
|
||||
async function searchNotifications() {
|
||||
const params = Object.keys(searchForm).reduce((acc, key) => {
|
||||
acc[key] = searchForm[key];
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
params.NOTIFICATION_ID = NOTIFICATION_ID;
|
||||
await fnGetData(params);
|
||||
}
|
||||
|
||||
// 重置表单时,也确保重置为初始值
|
||||
function resetSearchForm() {
|
||||
Object.keys(searchForm).forEach((key) => {
|
||||
searchForm[key] = "";
|
||||
});
|
||||
fnResetPagination({ NOTIFICATION_ID });
|
||||
}
|
||||
|
||||
const relatedClassificationList = ref(null);
|
||||
|
||||
onMounted(async () => {
|
||||
const data = await layoutFnGetSIGNEDSTATUSClassification();
|
||||
relatedClassificationList.value = JSON.parse(data.value.zTreeNodes);
|
||||
});
|
||||
// onMounted(() => {
|
||||
// fnGetData({ NOTIFICATION_ID });
|
||||
// });
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -1,422 +0,0 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="data.form"
|
||||
:rules="rules"
|
||||
label-width="175px"
|
||||
>
|
||||
<!-- 承运信息 -->
|
||||
<el-divider content-position="left">承运信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="DEPARTMENT_ID" label="部门">
|
||||
<layout-department
|
||||
v-model="data.form.DEPARTMENT_ID"
|
||||
@update:model-value="fnDepartmentChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item v-if="!LISTMANAGER_ID" label="调度人" prop="USER_IDS">
|
||||
<el-select v-model="data.form.USER_IDS" multiple>
|
||||
<el-option
|
||||
v-for="item in data.userList"
|
||||
:key="item.USER_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.USER_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="承运日期" prop="SHIPPINGDATE">
|
||||
<el-date-picker
|
||||
v-model="data.form.SHIPPINGDATE"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运输车辆" prop="TRANSPORTVEHICLE">
|
||||
<el-select
|
||||
v-model="data.form.TRANSPORTVEHICLE"
|
||||
placeholder="请选择运输车辆"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.OperationVehicle"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="从业人员" prop="PRACTITIONER">
|
||||
<el-select
|
||||
v-model="data.form.PRACTITIONER"
|
||||
placeholder="请选择从业人员"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in PRACTITIONERMENU"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="货运挂车" prop="TRUCKCART">
|
||||
<el-select
|
||||
v-model="data.form.TRUCKCART"
|
||||
placeholder="请选择货运挂车"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in TRUCKMENU"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人员电话" prop="EMPLOYEEPHONE">
|
||||
<el-input
|
||||
v-model="data.form.EMPLOYEEPHONE"
|
||||
placeholder="请输入人员电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="人员类型" prop="PRACTITIONERTYPE">
|
||||
<el-select
|
||||
v-model="data.form.PRACTITIONERTYPE"
|
||||
placeholder="请选择人员类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in PERSONTYPEMENU"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="身份证号" prop="IDENTITYID">
|
||||
<el-input
|
||||
v-model="data.form.IDENTITYID"
|
||||
placeholder="请输入身份证号"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 客户信息 -->
|
||||
<el-divider content-position="left">客户信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="委托方" prop="CLIENT">
|
||||
<el-select v-model="data.form.CLIENT" placeholder="请选择委托方">
|
||||
<el-option
|
||||
v-for="item in data.clientOptions"
|
||||
:key="item.CONTACT"
|
||||
:label="item.COMP_NAME"
|
||||
:value="item.CONTACT"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="CLIENTCONTACTPERSON">
|
||||
<el-input
|
||||
v-model="data.form.CLIENTCONTACTPERSON"
|
||||
placeholder="请输入联系人"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="CLIENTCONTACTPHONE">
|
||||
<el-input
|
||||
v-model="data.form.CLIENTCONTACTPHONE"
|
||||
placeholder="请输入联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="确认方" prop="CONFIRMER">
|
||||
<el-select v-model="data.form.CONFIRMER" placeholder="请选择确认方">
|
||||
<el-option
|
||||
v-for="item in data.confirmerOptions"
|
||||
:key="item.CONTACT"
|
||||
:label="item.COMP_NAME"
|
||||
:value="item.CONTACT"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="CONFIRMINGPERSON">
|
||||
<el-input
|
||||
v-model="data.form.CONFIRMINGPERSON"
|
||||
placeholder="请输入联系人"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="CONFIRMINGPHONE">
|
||||
<el-input
|
||||
v-model="data.form.CONFIRMINGPHONE"
|
||||
placeholder="请输入联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 地点信息 -->
|
||||
<el-divider content-position="left">地点信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="起运地点" prop="ORIGIN">
|
||||
<el-select v-model="data.form.ORIGIN" placeholder="请选择起运地点">
|
||||
<el-option
|
||||
v-for="item in data.StartOptions"
|
||||
:key="item.LOCATIONMANAGEMENT_ID"
|
||||
:label="item.LOCATIONNAME"
|
||||
:value="item.LOCATIONMANAGEMENT_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="起运地址" prop="SHIPPINGADDRESS">
|
||||
<el-input
|
||||
v-model="data.form.SHIPPINGADDRESS"
|
||||
placeholder="请输入起运地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="行政区域" prop="STARTADMINISTRATIVEAREA">
|
||||
<el-input
|
||||
v-model="data.form.STARTADMINISTRATIVEAREA"
|
||||
placeholder="请输入行政区域"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目的地点" prop="DESTINATION">
|
||||
<el-select
|
||||
v-model="data.form.DESTINATION"
|
||||
placeholder="请选择目的地点"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.EndOptions"
|
||||
:key="item.LOCATIONMANAGEMENT_ID"
|
||||
:label="item.LOCATIONNAME"
|
||||
:value="item.LOCATIONMANAGEMENT_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目的地址" prop="DESTINATIONADDRESS">
|
||||
<el-input
|
||||
v-model="data.form.DESTINATIONADDRESS"
|
||||
placeholder="请输入目的地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="行政区域" prop="ENDDMINISTRATIVEAREA">
|
||||
<el-input
|
||||
v-model="data.form.ENDDMINISTRATIVEAREA"
|
||||
placeholder="请输入行政区域"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="tc mt-10">
|
||||
<el-button type="primary" @click="fnSubmit">确定</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
|
||||
import {
|
||||
PRACTITIONERMENU,
|
||||
TRUCKMENU,
|
||||
PERSONTYPEMENU,
|
||||
} from "@/assets/js/constant";
|
||||
import {
|
||||
addSafetyThingsChecView,
|
||||
getSecurityPerson,
|
||||
} from "@/request/waybill_registration.js";
|
||||
import { onMounted, reactive, ref, watchEffect } from "vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import { getPostListAll, getUserListAll } from "@/request/data_dictionary.js";
|
||||
import { getSecurityCustomerList } from "@/request/customer_management.js";
|
||||
import { getSecurityLocationList } from "@/request/location_management.js";
|
||||
import { getOperationVehicleList } from "@/request/operation_vehicle.js";
|
||||
|
||||
const formRef = ref(null);
|
||||
const rules = {
|
||||
TRANSPORTATIONCOMPANY: [
|
||||
{ required: true, message: "请输入运输企业名称", trigger: "blur" },
|
||||
],
|
||||
DISPATCHER: [
|
||||
{ required: true, message: "请输入调度人姓名", trigger: "blur" },
|
||||
],
|
||||
SHIPPINGDATE: [
|
||||
{ required: true, message: "请选择承运日期", trigger: "change" },
|
||||
],
|
||||
CLIENT: [{ required: true, message: "请选择委托方名称", trigger: "change" }],
|
||||
CLIENTCONTACTPERSON: [
|
||||
{ required: true, message: "请输入联系人姓名", trigger: "blur" },
|
||||
],
|
||||
CLIENTCONTACTPHONE: [
|
||||
{ required: true, message: "请输入联系电话", trigger: "blur" },
|
||||
],
|
||||
CONFIRMER: [
|
||||
{ required: true, message: "请选择确认方名称", trigger: "change" },
|
||||
],
|
||||
ORIGIN: [{ required: true, message: "请选择起运地点", trigger: "change" }],
|
||||
SHIPPINGADDRESS: [
|
||||
{ required: true, message: "请输入起运地址", trigger: "blur" },
|
||||
],
|
||||
DESTINATION: [
|
||||
{ required: true, message: "请选择目的地点", trigger: "change" },
|
||||
],
|
||||
DESTINATIONADDRESS: [
|
||||
{ required: true, message: "请输入目的地址", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
|
||||
const relatedClassificationTempList =
|
||||
await layoutFnGetMEETINGTYPEClassification();
|
||||
const relatedClassificationList = [];
|
||||
JSON.parse(relatedClassificationTempList.value.zTreeNodes).forEach((e) => {
|
||||
relatedClassificationList.push({ name: e.id, BIANMA: e.name });
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
TRANSPORTATIONCOMPANY: "",
|
||||
DISPATCHER: "",
|
||||
DEPARTMENT_ID: "",
|
||||
POST_ID: "",
|
||||
USER_IDS: [],
|
||||
USER_ID: "",
|
||||
SHIPPINGDATE: "",
|
||||
IDENTITYID: "",
|
||||
TRUCKCART: "",
|
||||
EMPLOYEEPHONE: "",
|
||||
PRACTITIONER: "",
|
||||
TRANSPORTVEHICLE: "",
|
||||
CLIENT: "",
|
||||
CLIENTCONTACTPERSON: "",
|
||||
CLIENTCONTACTPHONE: "",
|
||||
CONFIRMER: "",
|
||||
CONFIRMINGPERSON: "",
|
||||
CONFIRMINGPHONE: "",
|
||||
ORIGIN: "",
|
||||
SHIPPINGADDRESS: "",
|
||||
STARTADMINISTRATIVEAREA: "",
|
||||
DESTINATION: "",
|
||||
DESTINATIONADDRESS: "",
|
||||
ENDDMINISTRATIVEAREA: "",
|
||||
},
|
||||
clientOptions: [], // 委托方选项
|
||||
confirmerOptions: [], // 确认方选项
|
||||
StartOptions: [], // 起始地
|
||||
EndOptions: [], // 目的地
|
||||
OperationVehicle: [], // 运输车辆
|
||||
});
|
||||
const fnVehicle = async () => {
|
||||
const res = await getOperationVehicleList();
|
||||
const varList = res.varList || [];
|
||||
data.OperationVehicle = varList.map((item) => item.PLATE_NUMBER);
|
||||
};
|
||||
|
||||
const fnCustomerType = async () => {
|
||||
const res = await getSecurityCustomerList();
|
||||
const varList = res.varList || [];
|
||||
data.clientOptions = varList.filter((item) => item.CUSTOMERTYPE === "1");
|
||||
data.confirmerOptions = varList.filter((item) => item.CUSTOMERTYPE === "2");
|
||||
};
|
||||
|
||||
const fnLocation = async () => {
|
||||
const res = await getSecurityLocationList();
|
||||
const varList = res.varList || [];
|
||||
data.StartOptions = varList.filter((item) => item.LOCATIONTYPE === "1");
|
||||
data.EndOptions = varList.filter((item) => item.LOCATIONTYPE === "2");
|
||||
};
|
||||
const fnDepartmentChange = async () => {
|
||||
data.userList = [];
|
||||
data.form.USER_IDS = [];
|
||||
data.form.USER_ID = "";
|
||||
await fnGetUser(data.form.DEPARTMENT_ID);
|
||||
};
|
||||
const fnGetPost = async (DEPARTMENT_ID) => {
|
||||
const resData = await getPostListAll({ DEPARTMENT_ID });
|
||||
data.postList = resData.postList;
|
||||
};
|
||||
const fnGetUser = async (DEPARTMENT_ID) => {
|
||||
const resData = await getUserListAll({ DEPARTMENT_ID });
|
||||
data.userList = resData.userList;
|
||||
};
|
||||
watchEffect(() => {
|
||||
if (data.form.DEPARTMENT_ID) fnGetPost(data.form.DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await fnPerson();
|
||||
await fnCustomerType();
|
||||
await fnLocation();
|
||||
await fnVehicle();
|
||||
});
|
||||
const fnPerson = async () => {
|
||||
const resData = await getSecurityPerson({});
|
||||
data.unitsList = [resData.pd];
|
||||
};
|
||||
|
||||
const fnSubmit = async () => {
|
||||
await useFormValidate(formRef);
|
||||
const formData = new FormData();
|
||||
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
formData.append(key, data.form[key]);
|
||||
});
|
||||
|
||||
await addSafetyThingsChecView(formData);
|
||||
ElMessage.success("添加成功");
|
||||
Object.keys(data.form).forEach((key) => {
|
||||
if (Array.isArray(data.form[key])) {
|
||||
data.form[key] = [];
|
||||
} else {
|
||||
data.form[key] = "";
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.flexBox {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
|
||||
.addBtn {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,181 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车辆车牌" prop="TRANSPORTVEHICLE">
|
||||
<el-input v-model="searchForm.TRANSPORTVEHICLE" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="运单状态" prop="WAYBILLSTATUS">
|
||||
<el-select v-model="searchForm.WAYBILLSTATUS">
|
||||
<el-option label="已出发" :value="1" />
|
||||
<el-option label="未出发" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
@get-data="fnGetData"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="WAYBILLNUMBER" label="运单编号" width="150" />
|
||||
<el-table-column prop="WAYBILLSTATUS" label="运单状态" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.WAYBILLSTATUS === '0'">未出发</el-tag>
|
||||
<el-tag v-else-if="row.WAYBILLSTATUS === '1'">已出发</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="TRANSPORTVEHICLE" label="运输车辆" width="150" />
|
||||
<el-table-column prop="PRACTITIONER" label="从业人员" width="150" />
|
||||
<el-table-column prop="CLIENT" label="委托方" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="CONFIRMER" label="确认方" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="ORIGIN" label="起运地" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="DESTINATION" label="目的地" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column prop="SHIPPINGDATE" label="起止时间" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/safety_production_related/safety_meeting/meeting_info',
|
||||
query: {
|
||||
SAFETY_MEETING_ID: row.SAFETY_MEETING_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
text
|
||||
link
|
||||
@click="deleteItem(row.SAFETY_MEETING_ID)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<template #button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/electronic_waybill_management/waybill_registration/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
</el-button>
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
<edit
|
||||
v-model:visible="data.analysisDialog.visible"
|
||||
:info="data.analysisDialog.info"
|
||||
@get-data="fnResetPagination"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
|
||||
import {
|
||||
layoutFnGetNotificationsClassification,
|
||||
dateteSecurityAllNotice,
|
||||
} from "@/request/safety_production_related.js";
|
||||
import { getSecurityWaybillreList } from "@/request/waybill_registration.js";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const router = useRoute();
|
||||
const buttonJurisdiction = await useButtonJurisdiction("riskunit");
|
||||
const tableRef = ref(null);
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getSecurityWaybillreList);
|
||||
const data = reactive({
|
||||
analysisDialog: {
|
||||
visible: false,
|
||||
info: {},
|
||||
},
|
||||
});
|
||||
const fnResetPaginationTransfer = () => {
|
||||
fnResetPagination({
|
||||
DEPTIDS: searchForm.value.DEPTIDS?.join(","),
|
||||
});
|
||||
};
|
||||
const fnBatchDelete = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
// eslint-disable-next-line no-undef
|
||||
const selectionData = tableRef.value.getSelectionRows();
|
||||
if (selectionData.length === 0) {
|
||||
ElMessage.warning("请选中要删除的项");
|
||||
return;
|
||||
}
|
||||
await ElMessageBox.confirm("确定要删除选中的数据吗?", { type: "warning" });
|
||||
const DATA_IDS = selectionData
|
||||
.map((item) => item.NOTIFICATION_ID)
|
||||
.join(",");
|
||||
await dateteSecurityAllNotice({ DATA_IDS });
|
||||
ElMessage.success("删除成功");
|
||||
fnResetPaginationTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
const relatedClassificationList = ref(null);
|
||||
|
||||
onMounted(async () => {
|
||||
const data = await layoutFnGetNotificationsClassification();
|
||||
relatedClassificationList.value = JSON.parse(data.value.zTreeNodes);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -29,7 +29,7 @@
|
|||
<el-input v-model="data.form.CODE" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="市行业监管部门" prop="INDUSTRY_DEPARTMENTName">
|
||||
<el-input
|
||||
v-model="data.form.INDUSTRY_DEPARTMENTName"
|
||||
|
@ -37,7 +37,7 @@
|
|||
placeholder="请输入内容"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="属地" prop="POSSESSION">
|
||||
<layout-territory
|
||||
|
@ -47,14 +47,14 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="监管类型" prop="REGULARTYPE">
|
||||
<layout-regulatory-type
|
||||
v-model="data.form.REGULARTYPE"
|
||||
:territory="data.form.POSSESSION"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属行业" prop="INDUSTRYALL">
|
||||
<layout-industry
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门" prop="DEPARTMENT_ID">
|
||||
<layout-department
|
||||
v-model="data.form.DEPARTMENT_ID"
|
||||
|
@ -33,7 +33,7 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="岗位" prop="POST_ID">
|
||||
<el-select v-model="data.form.POST_ID">
|
||||
<el-option
|
||||
|
@ -45,16 +45,39 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="NAME">
|
||||
<el-input v-model="data.form.NAME" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人员类型" prop="PERSONNEL_TYPE">
|
||||
<el-select v-model="data.form.PERSONNEL_TYPE">
|
||||
<el-option
|
||||
v-for="item in data.personnelTypeList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="用户名" prop="USERNAME">
|
||||
<el-form-item label="身份证号" prop="USER_ID_CARD">
|
||||
<el-input
|
||||
v-model="data.form.USERNAME"
|
||||
v-model="data.form.USER_ID_CARD"
|
||||
:disabled="!!USER_ID"
|
||||
placeholder="请输入"
|
||||
@blur="fnChangeIdCard"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="手机号" prop="PHONE">
|
||||
<el-input v-model="data.form.PHONE" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="定位卡号" prop="CARDNO">
|
||||
<el-input
|
||||
v-model="data.form.CARDNO"
|
||||
|
@ -64,12 +87,7 @@
|
|||
placeholder="请输入"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="姓名" prop="NAME">
|
||||
<el-input v-model="data.form.NAME" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="24">
|
||||
<el-form-item label="性别" prop="SEX">
|
||||
<el-select v-model="data.form.SEX">
|
||||
|
@ -214,15 +232,6 @@
|
|||
</el-col>
|
||||
<el-col v-if="data.form.ISSTUDENT === 'true'" :span="12">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="身份证号" prop="USER_ID_CARD">
|
||||
<el-input
|
||||
v-model="data.form.USER_ID_CARD"
|
||||
placeholder="请输入"
|
||||
@blur="fnChangeIdCard"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="民族" prop="NATION">
|
||||
<el-select v-model="data.form.NATION">
|
||||
|
@ -270,18 +279,6 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人员类型" prop="PERSONNEL_TYPE">
|
||||
<el-select v-model="data.form.PERSONNEL_TYPE">
|
||||
<el-option
|
||||
v-for="item in data.personnelTypeList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职务" prop="DUTIES">
|
||||
<layout-select-create
|
||||
|
@ -415,14 +412,13 @@ import {
|
|||
layoutFnGetDuties,
|
||||
layoutFnGetEmploymentSituation,
|
||||
layoutFnGetNation,
|
||||
layoutFnGetPersonnelType,
|
||||
layoutFnGetPersonnelTypeTraffic,
|
||||
layoutFnGetPoliticalLandscape,
|
||||
layoutFnGetProfessionalTitle,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import {
|
||||
getVerifyDeduplicationUser,
|
||||
getVerifyDeduplicationUserIdCard,
|
||||
getVerifyDuplicateEmail,
|
||||
setUploadImg,
|
||||
|
@ -447,7 +443,7 @@ const fnHasEmail = async (rule, value, callback) => {
|
|||
callback();
|
||||
}
|
||||
};
|
||||
const fnHasUser = async (rule, value, callback) => {
|
||||
/* const fnHasUser = async (rule, value, callback) => {
|
||||
if (value) {
|
||||
const resData = await getVerifyDeduplicationUser({
|
||||
USERNAME: value,
|
||||
|
@ -458,7 +454,7 @@ const fnHasUser = async (rule, value, callback) => {
|
|||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
}; */
|
||||
const fnHasUserIdCard = async (rule, value, callback) => {
|
||||
if (value) {
|
||||
const resData = await getVerifyDeduplicationUserIdCard({
|
||||
|
@ -472,8 +468,18 @@ const fnHasUserIdCard = async (rule, value, callback) => {
|
|||
}
|
||||
};
|
||||
const rules = {
|
||||
USER_ID_CARD: [
|
||||
{ required: true, message: "身份证号不能为空", trigger: "blur" },
|
||||
{
|
||||
pattern:
|
||||
/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/,
|
||||
message: "请输入正确的身份证号",
|
||||
trigger: "blur",
|
||||
},
|
||||
{ validator: fnHasUserIdCard, trigger: "blur" },
|
||||
],
|
||||
NAME: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
|
||||
USERNAME: [
|
||||
/* USERNAME: [
|
||||
{ required: true, message: "请输入手机号码", trigger: "blur" },
|
||||
{ min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
|
||||
{
|
||||
|
@ -482,6 +488,15 @@ const rules = {
|
|||
message: "请输入正确的手机号码",
|
||||
},
|
||||
{ validator: fnHasUser, trigger: "blur" },
|
||||
], */
|
||||
PHONE: [
|
||||
{ required: true, message: "请输入手机号码", trigger: "blur" },
|
||||
{ min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
|
||||
{
|
||||
pattern:
|
||||
/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
},
|
||||
],
|
||||
EMAIL: [
|
||||
{ required: false, message: "请输入邮箱", trigger: "blur" },
|
||||
|
@ -516,14 +531,14 @@ const rules = {
|
|||
ENTRY_DATE: [
|
||||
{ required: true, message: "请选择入职日期", trigger: "change" },
|
||||
],
|
||||
CARDNO: [
|
||||
{ required: false, message: "请输入定位卡号", trigger: "blur" },
|
||||
{
|
||||
pattern: /^-?[0-9]\d*$/,
|
||||
message: "请输入正确的定位卡号",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
// CARDNO: [
|
||||
// { required: false, message: "请输入定位卡号", trigger: "blur" },
|
||||
// {
|
||||
// pattern: /^-?[0-9]\d*$/,
|
||||
// message: "请输入正确的定位卡号",
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
WORKING_DATE: [
|
||||
{ required: true, message: "请选择参加工作日期", trigger: "change" },
|
||||
],
|
||||
|
@ -532,16 +547,6 @@ const rules = {
|
|||
],
|
||||
TITLE: [{ required: true, message: "职称不能为空", trigger: "change" }],
|
||||
DUTIES: [{ required: true, message: "职务不能为空", trigger: "change" }],
|
||||
USER_ID_CARD: [
|
||||
{ required: true, message: "身份证号不能为空", trigger: "blur" },
|
||||
{
|
||||
pattern:
|
||||
/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/,
|
||||
message: "请输入正确的身份证号",
|
||||
trigger: "blur",
|
||||
},
|
||||
{ validator: fnHasUserIdCard, trigger: "blur" },
|
||||
],
|
||||
SHIFTDUTYONE: [{ required: true, message: "请选择排班", trigger: "change" }],
|
||||
SHIFTDUTYTWO: [{ required: true, message: "请选择排班", trigger: "change" }],
|
||||
periodStr: [
|
||||
|
@ -610,7 +615,7 @@ const fnGetData = async () => {
|
|||
if (!USER_ID) return;
|
||||
const resData = await getUserView({ USER_ID });
|
||||
const form = resData.pd;
|
||||
form.PASSWORD = "666666";
|
||||
form.PASSWORD = "Aa@123456";
|
||||
form.periodStr = resData.periodStr;
|
||||
form.ISSTUDENT = resData.pd.ISSTUDENT.toString();
|
||||
if (form.USERAVATARURL_CONVERT)
|
||||
|
@ -640,6 +645,12 @@ const fnGetUserScheduling = async (PARENTID, list) => {
|
|||
data[list] = resData.varList;
|
||||
};
|
||||
fnGetUserScheduling("0", "schedulingList");
|
||||
|
||||
const { value: personnelTypeList } = await layoutFnGetPersonnelTypeTraffic({
|
||||
DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e",
|
||||
BIANMA: "TRAFFIC_EMPLOYMENT_MANAGE",
|
||||
});
|
||||
data.personnelTypeList = personnelTypeList;
|
||||
const fnChangeSchedulingOne = () => {
|
||||
data.form.SHIFTDUTYTWO = "";
|
||||
data.periodList = [];
|
||||
|
@ -674,6 +685,8 @@ const fnChangeIdCard = () => {
|
|||
const { sex, date } = idCardGetDateAndGender(data.form.USER_ID_CARD);
|
||||
data.form.SEX = sex;
|
||||
data.form.DATE_OF_BIRTH = date;
|
||||
data.form.USERNAME = data.form.USER_ID_CARD;
|
||||
console.log(data.form.USERNAME);
|
||||
};
|
||||
const fnGetLevels = async () => {
|
||||
const { value: nationList } = await layoutFnGetNation();
|
||||
|
@ -683,8 +696,6 @@ const fnGetLevels = async () => {
|
|||
data.politicalLandscapeList = politicalLandscapeList;
|
||||
const { value: degreeOfEducationList } = await layoutFnGetDegreeOfEducation();
|
||||
data.degreeOfEducationList = degreeOfEducationList;
|
||||
const { value: personnelTypeList } = await layoutFnGetPersonnelType();
|
||||
data.personnelTypeList = personnelTypeList;
|
||||
const { value: dutiesList } = await layoutFnGetDuties();
|
||||
data.dutiesList = dutiesList;
|
||||
const { value: professionalTitleList } = await layoutFnGetProfessionalTitle();
|
||||
|
|
|
@ -96,8 +96,9 @@
|
|||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="USERNAME" label="用户名" />
|
||||
<el-table-column prop="USERNAME" label="用户名" width="150" />
|
||||
<el-table-column prop="NAME" label="姓名" />
|
||||
<el-table-column prop="PHONE" label="手机号" />
|
||||
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
|
||||
<el-table-column
|
||||
prop="POST_NAME"
|
||||
|
@ -135,6 +136,13 @@
|
|||
排班表
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
!(
|
||||
row.PERSONNEL_TYPE_BIANMA?.indexOf(
|
||||
'TRAFFIC_EMPLOYMENT_DRIVE'
|
||||
) >= 0
|
||||
)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
|
@ -148,7 +156,15 @@
|
|||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del && row.ISMAIN === '0'"
|
||||
v-if="
|
||||
buttonJurisdiction.del &&
|
||||
row.ISMAIN === '0' &&
|
||||
!(
|
||||
row.PERSONNEL_TYPE_BIANMA?.indexOf(
|
||||
'TRAFFIC_EMPLOYMENT_DRIVE'
|
||||
) >= 0
|
||||
)
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
|
@ -256,7 +272,7 @@ onBeforeRouteUpdate((to) => {
|
|||
const fnResetPassword = debounce(
|
||||
1000,
|
||||
async (USER_ID, NAME) => {
|
||||
await ElMessageBox.confirm(`是否将【${NAME}】重置密码为666666?`, {
|
||||
await ElMessageBox.confirm(`是否将【${NAME}】重置密码为Aa@123456?`, {
|
||||
type: "warning",
|
||||
});
|
||||
await setUserResetPassword({ USER_ID });
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,153 @@
|
|||
<template>
|
||||
<layout-card>
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="姓名">
|
||||
{{ data.info.NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="人员类型">
|
||||
{{ data.info.PERSONNEL_TYPE_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="data.info.CORPINFO_ID" label="部门">
|
||||
{{ data.info.DEPARTMENT_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="data.info.CORPINFO_ID" label="岗位">
|
||||
{{ data.info.POST_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="data.info.CORPINFO_ID" label="职务">
|
||||
{{ data.info.DUTIES_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="data.info.CORPINFO_ID" label="职称">
|
||||
{{ data.info.TITLE_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="data.info.CORPINFO_ID" label="入职时间">
|
||||
{{ data.info.ENTRY_DATE }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="生日">
|
||||
{{ data.info.DATE_OF_BIRTH }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
{{ data.info.SEX ? (data.info.SEX === "1" ? "男" : "女") : "" }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">
|
||||
{{ data.info.NATION_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="文化程度">
|
||||
{{ data.info.DEGREE_OF_EDUCATION_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="政治面貌">
|
||||
{{ data.info.POLITICAL_OUTLOOK_NAME }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="参加工作时间">
|
||||
{{ data.info.WORKING_DATE }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div v-for="(item, index) in data.certificateList" :key="index">
|
||||
<el-divider content-position="left">
|
||||
{{
|
||||
item.CERTIFICATE_CATEGORY === "1"
|
||||
? "身份证"
|
||||
: item.CERTIFICATE_CATEGORY === "2"
|
||||
? "驾驶证"
|
||||
: "道路运输从业资格证"
|
||||
}}
|
||||
</el-divider>
|
||||
<el-descriptions :column="2" border>
|
||||
<template>
|
||||
<el-descriptions-item
|
||||
:label="
|
||||
item.CERTIFICATE_CATEGORY === '1'
|
||||
? '身份证(正面)'
|
||||
: item.CERTIFICATE_CATEGORY === '2'
|
||||
? '驾驶证'
|
||||
: '道路运输从业资格证'
|
||||
"
|
||||
:span="item.CERTIFICATE_CATEGORY === '1' ? 1 : 2"
|
||||
>
|
||||
<img
|
||||
v-viewer
|
||||
:src="item.ID_PHOTO_FRONT"
|
||||
width="100"
|
||||
height="100"
|
||||
class="ml-10"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
v-if="item.CERTIFICATE_CATEGORY === '1'"
|
||||
label="身份证(背面)"
|
||||
>
|
||||
<img
|
||||
v-viewer
|
||||
:src="item.ID_PHOTO_BACK"
|
||||
width="100"
|
||||
height="100"
|
||||
class="ml-10"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item
|
||||
v-if="item.CERTIFICATE_CATEGORY === '1'"
|
||||
label="住址"
|
||||
:span="2"
|
||||
>
|
||||
{{ item.ID_ADDRESS }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="证件号码">
|
||||
{{ item.ID_NO }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
v-if="item.CERTIFICATE_CATEGORY !== '1'"
|
||||
:label="
|
||||
item.CERTIFICATE_CATEGORY === '2' ? '准驾车型' : '从业资格类别'
|
||||
"
|
||||
>
|
||||
{{ item.ALLOW_QUALIFICATION }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签发机关">
|
||||
{{ item.ID_ORGAN }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="有效期" :span="2">
|
||||
{{ item.ID_VALIDITY_START + "至" + item.ID_VALIDITY_END }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div class="tc mt-10">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="router.back"
|
||||
>
|
||||
返回
|
||||
</el-button>
|
||||
</div>
|
||||
</layout-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getPractitionerInfo } from "@/request/user_practitioner.js";
|
||||
import { reactive } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
const FILE_URL = import.meta.env.VITE_FILE_URL;
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { USER_ID } = route.query;
|
||||
const data = reactive({
|
||||
info: {},
|
||||
certificateList: [],
|
||||
});
|
||||
const fnGetData = async () => {
|
||||
if (!USER_ID) return;
|
||||
const resData = await getPractitionerInfo({ USER_ID });
|
||||
data.info = resData.pd;
|
||||
resData.certificateList.forEach((item) => {
|
||||
item.ID_PHOTO_FRONT = FILE_URL + item.ID_PHOTO_FRONT;
|
||||
if (item.ID_PHOTO_BACK) {
|
||||
item.ID_PHOTO_BACK = FILE_URL + item.ID_PHOTO_BACK;
|
||||
}
|
||||
});
|
||||
data.certificateList = resData.certificateList;
|
||||
console.log(data.certificateList);
|
||||
};
|
||||
fnGetData();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,265 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
label-width="100px"
|
||||
@submit.prevent="fnResetPagination"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="用户名/姓名"
|
||||
prop="KEYWORDS"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchForm.KEYWORDS"
|
||||
placeholder="请输入关键字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="人员类型" prop="PERSONNEL_TYPE">
|
||||
<el-select v-model="searchForm.PERSONNEL_TYPE">
|
||||
<el-option
|
||||
v-for="item in data.personnelTypeList"
|
||||
:key="item.DICTIONARIES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.DICTIONARIES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||
<el-button native-type="reset" @click="fnResetPagination">
|
||||
重置
|
||||
</el-button>
|
||||
<el-button native-type="reset" @click="fnWindow"> BI </el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<layout-card>
|
||||
<layout-table
|
||||
ref="tableRef"
|
||||
v-model:pagination="pagination"
|
||||
:data="list"
|
||||
row-key="USER_ID"
|
||||
@get-data="fnGetDataTransfer"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ serialNumber(pagination, $index) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="NAME" label="从业人员" />
|
||||
<el-table-column
|
||||
prop="PERSONNEL_TYPE_NAME"
|
||||
label="人员类型"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column prop="USER_ID_CARD" label="身份证号" />
|
||||
<el-table-column prop="PHONE" label="手机号" />
|
||||
<el-table-column label="申请类别">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.APPLY_TYPE === '1'">入职申请</span>
|
||||
<span v-else-if="row.APPLY_TYPE === '2'">企业入职</span>
|
||||
<span v-else-if="row.APPLY_TYPE === '3'">离职申请</span>
|
||||
<span v-else-if="row.APPLY_TYPE === '4'">企业解聘</span>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态">
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.APPLY_TYPE === '1' || row.APPLY_TYPE === '3'">
|
||||
<span v-if="row.APPLY_STATUS === '0'">待审核</span>
|
||||
<span v-else-if="row.APPLY_STATUS === '-1'">审核未通过</span>
|
||||
<span v-else>审核通过</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span v-if="row.APPLY_STATUS === '0'">待确认</span>
|
||||
<span v-else-if="row.APPLY_STATUS === '-1'">确认未认可</span>
|
||||
<span v-else>确认完成</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/enterprise_management/user_practitioner/details',
|
||||
query: {
|
||||
USER_ID: row.USER_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
buttonJurisdiction.edit &&
|
||||
row.APPLY_STATUS !== '0'
|
||||
"
|
||||
type="primary"
|
||||
text
|
||||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/enterprise_management/user_practitioner/edit',
|
||||
query: {
|
||||
USER_ID: row.USER_ID,
|
||||
},
|
||||
})
|
||||
"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
buttonJurisdiction.del &&
|
||||
row.APPLY_STATUS === '0' &&
|
||||
(row.APPLY_TYPE === '1' || row.APPLY_TYPE === '3')
|
||||
"
|
||||
type="danger"
|
||||
text
|
||||
link
|
||||
@click="reviewItem(row)"
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.del && row.APPLY_STATUS === '1'"
|
||||
type="danger"
|
||||
text
|
||||
link
|
||||
@click="fnDelete(row)"
|
||||
>
|
||||
解聘
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<template #button>
|
||||
<el-button
|
||||
v-if="buttonJurisdiction.add"
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: '/enterprise_management/user_practitioner/add',
|
||||
})
|
||||
"
|
||||
>
|
||||
添加
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
v-if="buttonJurisdiction.del"
|
||||
type="danger"
|
||||
@click="fnBatchDelete"
|
||||
>
|
||||
批量删除
|
||||
</el-button>-->
|
||||
</template>
|
||||
</layout-table>
|
||||
</layout-card>
|
||||
|
||||
<review
|
||||
v-model:visible="data.reviewDialog.visible"
|
||||
:form="data.reviewDialog.form"
|
||||
@get-data="fnGetDataTransfer"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { nextTick, reactive, ref } from "vue";
|
||||
import { serialNumber } from "@/assets/js/utils.js";
|
||||
import useListData from "@/assets/js/useListData.js";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import Review from "./review.vue";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||
import { useRouter } from "vue-router";
|
||||
import {
|
||||
getPractitionerList,
|
||||
setPractitionerDismissal,
|
||||
} from "@/request/user_practitioner.js";
|
||||
import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js";
|
||||
|
||||
const router = useRouter();
|
||||
const buttonJurisdiction = await useButtonJurisdiction("user");
|
||||
const tableRef = ref(null);
|
||||
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
|
||||
useListData(getPractitionerList, {
|
||||
otherParams: {
|
||||
// APPLY_TYPE: "1-3",
|
||||
},
|
||||
});
|
||||
const data = reactive({
|
||||
personnelTypeList: [],
|
||||
reviewDialog: {
|
||||
visible: false,
|
||||
form: {
|
||||
USER_ID: "",
|
||||
// 审核结果
|
||||
REVIEW_RESULT: "",
|
||||
// 审核意见
|
||||
REVIEW_COMMENTS: "",
|
||||
DEPARTMENT_ID: "",
|
||||
POST_ID: "",
|
||||
SHIFTDUTYONE: "",
|
||||
SHIFTDUTYTWO: "",
|
||||
},
|
||||
id: "",
|
||||
},
|
||||
visible: false,
|
||||
info: {},
|
||||
});
|
||||
const fnGetDataTransfer = () => {
|
||||
fnGetData({});
|
||||
};
|
||||
|
||||
const reviewItem = async (row) => {
|
||||
data.reviewDialog.visible = true;
|
||||
await nextTick();
|
||||
data.reviewDialog.form = row;
|
||||
};
|
||||
|
||||
const fnWindow = async () => {
|
||||
window.open(
|
||||
"http://60.10.47.50:9001/#/middlePage?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNzd2QiOiJMZmtmcUAxMjM0NTYiLCJleHAiOjE3MTEwMzMxMDksInVzZXIiOiJsZnlqemh6cCIsInRhcmdldCI6Imh0dHA6Ly8xOTIuMTY4LjAuNjk6ODA4Mi8jL21pZGRsZVBhZ2U_dG9rZW49ZXlKMGVYQWlPaUpLVjFRaUxDSmhiR2NpT2lKSVV6STFOaUo5LmV5SndZWE56ZDJRaU9pSTJOalkyTmpZaUxDSmxlSEFpT2pFM01UQTRPVFE1TURVc0luVnpaWElpT2lMbHU0cmxuWXJudTRfbXRZN21pb0RtbktfbHZJRGxqNUhsakxybHVwVG1nS1hsc1lBaUxDSjBZWEpuWlhRaU9pSm9kSFJ3T2k4dk5qQXVNVEF1TkRjdU5UQTZPVEF3TVM4akwySnBMMmx1WkdWNEluMC5VSlNtT1BwTjA4N1I3cGYyTDdpRDN2YkxjblQ5MFRQQmtTNm0wdHUtTFU0In0.qTqwPwlAmdqAOzyUJSt6kye5svfSBNV5fbcdhn0jey4"
|
||||
);
|
||||
};
|
||||
// 页面下拉选项字典获取
|
||||
const fnGetLevels = async () => {
|
||||
const { value: personnelTypeList } = await layoutFnGetPersonnelTypeTraffic({
|
||||
DICTIONARIES_ID: "0b62f92b0b624aab8e89a77304a64d5e",
|
||||
BIANMA: "TRAFFIC_EMPLOYMENT_DRIVE",
|
||||
});
|
||||
data.personnelTypeList = personnelTypeList;
|
||||
};
|
||||
fnGetLevels();
|
||||
const fnDelete = debounce(
|
||||
1000,
|
||||
async (row) => {
|
||||
await ElMessageBox.confirm(`确定要解聘【${row.NAME}】吗?`, {
|
||||
type: "warning",
|
||||
});
|
||||
await setPractitionerDismissal({ ...row });
|
||||
ElMessage.success("人员解聘完成");
|
||||
fnGetDataTransfer();
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,377 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:title="form.APPLY_TYPE === '1' ? '入职审核' : '离职审核'"
|
||||
:before-close="fnClose"
|
||||
>
|
||||
<el-form ref="formRef" :rules="rules" :model="form" label-width="150px">
|
||||
<el-form-item label="审核结果" prop="REVIEW_RESULT">
|
||||
<el-radio-group v-model="form.REVIEW_RESULT">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="-1">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="REVIEW_COMMENTS">
|
||||
<el-input v-model="form.REVIEW_COMMENTS" />
|
||||
</el-form-item>
|
||||
<div v-if="form.APPLY_TYPE === '1'">
|
||||
<el-divider v-if="form.REVIEW_RESULT === '1'" content-position="left">
|
||||
工作安排
|
||||
</el-divider>
|
||||
<el-form-item
|
||||
v-if="form.REVIEW_RESULT === '1'"
|
||||
label="部门"
|
||||
prop="DEPARTMENT_ID"
|
||||
>
|
||||
<layout-department
|
||||
v-model="form.DEPARTMENT_ID"
|
||||
@update:model-value="form.POST_ID = ''"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.REVIEW_RESULT === '1'"
|
||||
label="岗位"
|
||||
prop="POST_ID"
|
||||
>
|
||||
<el-select v-model="form.POST_ID">
|
||||
<el-option
|
||||
v-for="item in data.postList"
|
||||
:key="item.POST_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.POST_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-row v-if="form.REVIEW_RESULT === '1'">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="排班" prop="SHIFTDUTYONE">
|
||||
<el-select
|
||||
v-model="form.SHIFTDUTYONE"
|
||||
@change="fnChangeSchedulingOne"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.schedulingList"
|
||||
:key="item.SHIFTWORKRULES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.SHIFTWORKRULES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label-width="10px" prop="SHIFTDUTYTWO">
|
||||
<el-select
|
||||
v-model="form.SHIFTDUTYTWO"
|
||||
@change="fnChangeSchedulingTwo"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in data.schedulingList1"
|
||||
:key="item.SHIFTWORKRULES_ID"
|
||||
:label="item.NAME"
|
||||
:value="item.SHIFTWORKRULES_ID"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button @click="data.scheduleVisible = true">
|
||||
当前班状
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item
|
||||
v-if="form.REVIEW_RESULT === '1'"
|
||||
label="当前班次"
|
||||
prop="periodStr"
|
||||
>
|
||||
<el-radio-group v-model="form.periodStr" @change="fnChangePeriod">
|
||||
<el-radio-button
|
||||
v-for="(item, index) in data.periodList"
|
||||
:key="index"
|
||||
:label="item.periodStr"
|
||||
>
|
||||
{{ item.period.WORKSTATUS === "1" ? "上班" : "休班" }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.REVIEW_RESULT === '1'"
|
||||
label="部门排序"
|
||||
prop="SORT"
|
||||
>
|
||||
<el-input v-model.number="form.SORT" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.REVIEW_RESULT === '1'"
|
||||
label="职务"
|
||||
prop="DUTIES"
|
||||
>
|
||||
<layout-select-create
|
||||
v-model="form.DUTIES"
|
||||
:list="data.dutiesList"
|
||||
@delete-option="fnDictionaryDelete($event, 'POSITION')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.REVIEW_RESULT === '1'"
|
||||
label="职称"
|
||||
prop="TITLE"
|
||||
>
|
||||
<layout-select-create
|
||||
v-model="form.TITLE"
|
||||
:list="data.professionalTitleList"
|
||||
@delete-option="fnDictionaryDelete($event, 'JOB_TITLE')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.REVIEW_RESULT === '1'"
|
||||
label="入职日期"
|
||||
prop="ENTRY_DATE"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="form.ENTRY_DATE"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">取消</el-button>
|
||||
<el-button type="primary" @click="fnSubmit"> 确定 </el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<scheduling
|
||||
:id="form.SHIFTDUTYTWO"
|
||||
v-model:visible="data.scheduleVisible"
|
||||
:info="data.scheduleInfo"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, watch, watchEffect } from "vue";
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import LayoutDepartment from "@/components/department/index.vue";
|
||||
import LayoutSelectCreate from "@/components/select_create/index.vue";
|
||||
import useFormValidate from "@/assets/js/useFormValidate.js";
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import { debounce } from "throttle-debounce";
|
||||
import { getPostListAll } from "@/request/data_dictionary.js";
|
||||
import {
|
||||
getUserCurrentShiftList,
|
||||
getUserScheduling,
|
||||
setDictionaryDelete,
|
||||
} from "@/request/enterprise_management.js";
|
||||
import {
|
||||
layoutFnGetDuties,
|
||||
layoutFnGetProfessionalTitle,
|
||||
} from "@/assets/js/data_dictionary.js";
|
||||
import { setPractitionerReview } from "@/request/user_practitioner.js";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
|
||||
const { visible, form } = useVModels(props, emits);
|
||||
const formRef = ref(null);
|
||||
const data = reactive({
|
||||
postList: [],
|
||||
schedulingList: [],
|
||||
schedulingList1: [],
|
||||
periodList: [],
|
||||
dutiesList: [],
|
||||
professionalTitleList: [],
|
||||
scheduleInfo: {
|
||||
WORKSTATUS: "",
|
||||
DURATION: "",
|
||||
WORKPERIOD: "",
|
||||
},
|
||||
scheduleVisible: false,
|
||||
});
|
||||
const rules = {
|
||||
REVIEW_RESULT: [
|
||||
{ required: true, message: "审核结果不能为空", trigger: "blur" },
|
||||
],
|
||||
REVIEW_COMMENTS: [
|
||||
{ required: true, message: "审核意见不能为空", trigger: "change" },
|
||||
],
|
||||
DEPARTMENT_ID: [{ required: true, message: "请选择部门", trigger: "change" }],
|
||||
POST_ID: [{ required: true, message: "请选择岗位", trigger: "change" }],
|
||||
SHIFTDUTYONE: [{ required: true, message: "请选择排班", trigger: "change" }],
|
||||
SHIFTDUTYTWO: [{ required: true, message: "请选择排班", trigger: "change" }],
|
||||
periodStr: [
|
||||
{ required: true, message: "请选择完整的排班类型", trigger: "change" },
|
||||
],
|
||||
SORT: [
|
||||
{ required: true, message: "请输入排序", trigger: "blur" },
|
||||
{ type: "number", message: "请输入数字类型", trigger: "blur" },
|
||||
],
|
||||
INCUMBENCY: [
|
||||
{ required: true, message: "在职情况不能为空", trigger: "change" },
|
||||
],
|
||||
TITLE: [{ required: true, message: "职称不能为空", trigger: "change" }],
|
||||
DUTIES: [{ required: true, message: "职务不能为空", trigger: "change" }],
|
||||
ENTRY_DATE: [
|
||||
{ required: true, message: "请选择入职日期", trigger: "change" },
|
||||
],
|
||||
};
|
||||
watchEffect(() => {
|
||||
if (form.value.DEPARTMENT_ID) fnGetPost(form.value.DEPARTMENT_ID);
|
||||
if (form.value.SHIFTDUTYONE)
|
||||
fnGetUserScheduling(form.value.SHIFTDUTYONE, "schedulingList1");
|
||||
if (form.value.SHIFTDUTYTWO)
|
||||
fnGetUserCurrentShiftList(form.value.SHIFTDUTYTWO);
|
||||
});
|
||||
|
||||
const fnGetPost = async (DEPARTMENT_ID) => {
|
||||
const resData = await getPostListAll({ DEPARTMENT_ID });
|
||||
data.postList = resData.postList;
|
||||
};
|
||||
|
||||
const stop = watch(
|
||||
() => form.value.REVIEW_RESULT,
|
||||
(val) => {
|
||||
if (val === "1") {
|
||||
fnGetLevels();
|
||||
stop && stop();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const fnGetLevels = async () => {
|
||||
const { value: dutiesList } = await layoutFnGetDuties();
|
||||
data.dutiesList = dutiesList;
|
||||
const { value: professionalTitleList } = await layoutFnGetProfessionalTitle();
|
||||
data.professionalTitleList = professionalTitleList;
|
||||
};
|
||||
const fnGetUserScheduling = async (PARENTID, list) => {
|
||||
const resData = await getUserScheduling({ PARENTID });
|
||||
data[list] = resData.varList;
|
||||
};
|
||||
fnGetUserScheduling("0", "schedulingList");
|
||||
const fnChangeSchedulingOne = () => {
|
||||
form.SHIFTDUTYTWO = "";
|
||||
data.periodList = [];
|
||||
data.scheduleInfo = {
|
||||
WORKSTATUS: "",
|
||||
DURATION: "",
|
||||
WORKPERIOD: "",
|
||||
};
|
||||
form.periodStr = "";
|
||||
};
|
||||
const fnChangeSchedulingTwo = () => {
|
||||
data.scheduleInfo = {
|
||||
WORKSTATUS: "",
|
||||
DURATION: "",
|
||||
WORKPERIOD: "",
|
||||
};
|
||||
form.periodStr = "";
|
||||
};
|
||||
const fnGetUserCurrentShiftList = async (SHIFTWORKRULES_ID) => {
|
||||
const resData = await getUserCurrentShiftList({ SHIFTWORKRULES_ID });
|
||||
data.periodList = resData.varList;
|
||||
};
|
||||
const fnChangePeriod = (event) => {
|
||||
for (let i = 0; i < data.periodList.length; i++) {
|
||||
if (data.periodList[i].periodStr === event) {
|
||||
data.scheduleInfo = data.periodList[i].period;
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
const fnDictionaryDelete = debounce(
|
||||
1000,
|
||||
async (index, DICTTYPE) => {
|
||||
let DICTIONARIES_ID = "";
|
||||
let msgTitle = "";
|
||||
if (DICTTYPE === "POSITION") {
|
||||
DICTIONARIES_ID = data.dutiesList[index].DICTIONARIES_ID;
|
||||
msgTitle = "职务:" + data.dutiesList[index].NAME;
|
||||
} else if (DICTTYPE === "JOB_TITLE") {
|
||||
DICTIONARIES_ID = data.professionalTitleList[index].DICTIONARIES_ID;
|
||||
msgTitle = "职称:" + data.professionalTitleList[index].NAME;
|
||||
}
|
||||
await ElMessageBox.confirm(
|
||||
"删除此分类会同时删除其他相关已编辑过的人员信息中的分类设置,确定要删除(" +
|
||||
msgTitle +
|
||||
")吗?",
|
||||
{ type: "warning" }
|
||||
);
|
||||
await setDictionaryDelete({ DICTIONARIES_ID, DICTTYPE });
|
||||
if (DICTTYPE === "POSITION") {
|
||||
data.dutiesList.splice(index, 1);
|
||||
} else if (DICTTYPE === "JOB_TITLE") {
|
||||
data.professionalTitleList.splice(index, 1);
|
||||
}
|
||||
},
|
||||
{
|
||||
atBegin: true,
|
||||
}
|
||||
);
|
||||
|
||||
const fnClose = () => {
|
||||
formRef.value.resetFields();
|
||||
visible.value = false;
|
||||
};
|
||||
const fnSubmit = debounce(
|
||||
1000,
|
||||
async () => {
|
||||
await useFormValidate(formRef);
|
||||
form.value.WORKSTATUS = data.scheduleInfo.WORKSTATUS;
|
||||
form.value.DURATION = data.scheduleInfo.DURATION;
|
||||
form.value.WORKPERIOD = data.scheduleInfo.WORKPERIOD;
|
||||
if (fnFindValueInList("dutiesList", form.value.DUTIES)) {
|
||||
form.value.letDutiesType = "select";
|
||||
form.value.DUTIESValue = "";
|
||||
} else {
|
||||
form.value.letDutiesType = "value";
|
||||
form.value.DUTIESValue = form.value.DUTIES;
|
||||
}
|
||||
if (fnFindValueInList("professionalTitleList", form.value.TITLE)) {
|
||||
form.value.letTitleType = "select";
|
||||
form.value.letTitleValue = "";
|
||||
} else {
|
||||
form.value.letTitleType = "value";
|
||||
form.value.letTitleValue = form.value.TITLE;
|
||||
}
|
||||
|
||||
if (form.value.APPLY_TYPE === "1" && form.value.REVIEW_RESULT === "1")
|
||||
form.value.INCUMBENCY = "bd4d802e94354230b1bb19cfabd7f810"; // 在职:bd4d802e94354230b1bb19cfabd7f810
|
||||
else if (form.value.APPLY_TYPE === "3" && form.value.REVIEW_RESULT === "1")
|
||||
form.value.INCUMBENCY = "4dd28e91b104410b85c25a792c424172"; // 离职:4dd28e91b104410b85c25a792c424172
|
||||
// console.log(form.value);
|
||||
await setPractitionerReview({ ...form.value });
|
||||
ElMessage.success("操作成功");
|
||||
fnClose();
|
||||
emits("get-data");
|
||||
},
|
||||
{ atBegin: true }
|
||||
);
|
||||
|
||||
const fnFindValueInList = (list, value) => {
|
||||
let existence = false;
|
||||
for (let i = 0; i < data[list].length; i++) {
|
||||
if (data[list][i].DICTIONARIES_ID === value) {
|
||||
existence = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return existence;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
Loading…
Reference in New Issue