新增从业人员相关页面

dev
WenShiJun 2024-03-01 18:05:17 +08:00
parent c2c9d83777
commit 37f176bd1a
8 changed files with 1225 additions and 74 deletions

2
.env
View File

@ -1,4 +1,4 @@
VITE_BASE_URL=http://192.168.0.62:8093/
VITE_BASE_URL=http://192.168.0.49:8093/
VITE_PROXY=/api/
VITE_PROXY_QAAQ=/qaaq_api/
VITE_QAAQ_URL=https://gateway.qhdsafety.com/

View File

@ -19,49 +19,22 @@ export const MENU = [
{ title: "定位管理", model: MODEL["6"] },
];
// 安全生成及电子运单管理
export const VEHICLEMENU = [
{ title: "鄂A35373", model: MODEL["1"] },
{ title: "渝B73752", model: MODEL["2"] },
{ title: "川C87376", model: MODEL["3"] },
];
export const PRACTITIONERMENU = [
{ title: "李某某", model: MODEL["1"] },
{ title: "张某某", model: MODEL["2"] },
{ title: "刘某某", model: MODEL["3"] },
{ id: "李某某", name: "1" },
{ id: "张某某", name: "2" },
{ id: "刘某某", name: "3" },
];
export const TRUCKMENU = [
{ title: "货AA35373", model: MODEL["1"] },
{ title: "货B73752", model: MODEL["2"] },
{ title: "货C87376", model: MODEL["3"] },
{ id: "货AA3537", name: "1" },
{ id: "货B73752", name: "2" },
{ id: "货C87376", name: "3" },
];
export const PERSONTYPEMENU = [
{ title: "其他", model: MODEL["1"] },
{ title: "驾驶员", model: MODEL["2"] },
{ title: "监控员", model: MODEL["3"] },
{ title: "押运员", model: MODEL["4"] },
{ title: "安全负责人", model: MODEL["5"] },
];
export const CLIENTMENU = [
{ title: "李某某", model: MODEL["1"] },
{ title: "程某某", model: MODEL["2"] },
{ title: "方某某", model: MODEL["3"] },
];
export const CONFIRMMENU = [
{ title: "薛某某", model: MODEL["1"] },
{ title: "马某某", model: MODEL["2"] },
{ title: "林某某", model: MODEL["3"] },
];
export const STARTINGMENU = [
{ title: "河北", model: MODEL["1"] },
{ title: "河南", model: MODEL["2"] },
{ title: "山东", model: MODEL["3"] },
{ title: "山西", model: MODEL["4"] },
];
export const ENDMENU = [
{ title: "广东", model: MODEL["1"] },
{ title: "广西", model: MODEL["2"] },
{ title: "湖南", model: MODEL["3"] },
{ title: "湖北", model: MODEL["4"] },
{ id: "其他", name: "1" },
{ id: "驾驶员", name: "2" },
{ id: "监控员", name: "3" },
{ id: "押运员", name: "4" },
{ id: "安全负责人", name: "5" },
];
export const CUSTOMERTYPEMENU = [
{ id: "委托方", name: "1" },
@ -71,11 +44,6 @@ export const LOCATIONTYPEMENU = [
{ id: "起运地", name: "1" },
{ id: "目的地", name: "2" },
];
export const BOROUGHMENU = [
{ title: "湖北", model: MODEL["1"] },
{ title: "湖南", model: MODEL["2"] },
{ title: "四川", model: MODEL["3"] },
];
export const PRINT_STYLE =
'<style type="text/css" media="print">\n' +

View File

@ -44,13 +44,13 @@
<el-form-item label="运输车辆" prop="TRANSPORTVEHICLE">
<el-select
v-model="data.form.TRANSPORTVEHICLE"
placeholder="请选择运输企业"
placeholder="请选择运输车辆"
>
<el-option
v-for="item in VEHICLEMENU"
:key="item.title"
:label="item.title"
:value="item.title"
v-for="item in data.OperationVehicle"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</el-form-item>
@ -63,9 +63,9 @@
>
<el-option
v-for="item in PRACTITIONERMENU"
:key="item.title"
:label="item.title"
:value="item.title"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
@ -78,9 +78,9 @@
>
<el-option
v-for="item in TRUCKMENU"
:key="item.title"
:label="item.title"
:value="item.title"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
@ -101,9 +101,9 @@
>
<el-option
v-for="item in PERSONTYPEMENU"
:key="item.title"
:label="item.title"
:value="item.title"
:key="item.id"
:label="item.id"
:value="item.name"
/>
</el-select>
</el-form-item>
@ -252,7 +252,6 @@
<script setup>
import { layoutFnGetMEETINGTYPEClassification } from "@/request/safety_production_related.js";
import {
VEHICLEMENU,
PRACTITIONERMENU,
TRUCKMENU,
PERSONTYPEMENU,
@ -268,6 +267,7 @@ 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 = {
@ -340,7 +340,14 @@ const data = reactive({
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 || [];
@ -352,9 +359,7 @@ const fnLocation = async () => {
const res = await getSecurityLocationList();
const varList = res.varList || [];
data.StartOptions = varList.filter((item) => item.LOCATIONTYPE === "1");
console.log(data.StartOptions, "1111111111111111111");
data.EndOptions = varList.filter((item) => item.LOCATIONTYPE === "2");
console.log(data.EndOptions, "22222222222222222222");
};
const fnDepartmentChange = async () => {
data.userList = [];
@ -378,6 +383,7 @@ onMounted(async () => {
await fnPerson();
await fnCustomerType();
await fnLocation();
await fnVehicle();
});
const fnPerson = async () => {
const resData = await getSecurityPerson({});

View File

@ -0,0 +1,422 @@
<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>

View File

@ -0,0 +1,155 @@
<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
:data="list"
@get-data="fnGetData"
v-model:pagination="pagination"
stripe
border
show-header
>
<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>

View File

@ -0,0 +1,422 @@
<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>

View File

@ -0,0 +1,190 @@
<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="120">
</el-table-column>
<el-table-column prop="SHIPPINGDATE" label="起止时间" width="150">
</el-table-column>
<el-table-column label="操作" width="180">
<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>
<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 router from "@/router/index.js";
import { ElMessageBox, ElMessage } from "element-plus";
import { debounce } from "throttle-debounce";
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
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>

View File

@ -32,14 +32,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="运输企业" prop="TRANSPORTATIONCOMPANY">
<el-input
v-model="data.form.TRANSPORTATIONCOMPANY"
placeholder="请输入运输企业"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="会议地点" prop="MEETING_ADDRESS">
<el-input
@ -51,8 +43,8 @@
<el-col :span="10">
<el-form-item prop="MEETING_DATE" label="会议时间">
<el-date-picker
type="daterange"
v-model="data.form.MEETING_DATE"
type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
start-placeholder="开始时间"
@ -141,9 +133,6 @@ const rules = {
MEETING_TYPE: [
{ required: true, message: "请选择会议类型", trigger: "change" },
],
TRANSPORTATIONCOMPANY: [
{ required: true, message: "请输入运输企业", trigger: "blur" },
],
MEETING_ADDRESS: [
{ required: true, message: "请输入会议地点", trigger: "blur" },
],
@ -173,7 +162,6 @@ const data = reactive({
form: {
MEETING_TITLE: "",
MEETING_TYPE: "",
TRANSPORTATIONCOMPANY: "",
MEETING_ADDRESS: "",
MEETING_DATE: "",
HOST_PERSON: "",