用户管理和企业管理修改

dev
zhangyanli 2024-03-12 09:15:23 +08:00
parent 3db91701d0
commit f570e9dcc6
4 changed files with 61 additions and 62 deletions

View File

@ -205,13 +205,7 @@ export const layoutFnGetProfessionalTitle = async () => {
});
return ref(resData.list);
};
// 工种
export const layoutFnGetJobType = async () => {
const resData = await getLevelsCorp({
DICTIONARIES_ID: "55484e491a5e442d839c4595380713ec",
});
return ref(resData.list);
};
// 在职情况
export const layoutFnGetEmploymentSituation = async () => {
const resData = await getLevels({
@ -423,16 +417,16 @@ export const layoutFnGetPersonnelManagementJobType = async () => {
// 年检周期
export const layoutFnGetAnnualInspectionCycle = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "8b7dea3977fd4360a3cc8112368b90ff",
});
return ref(resData.list);
const resData = await getLevels({
DICTIONARIES_ID: "8b7dea3977fd4360a3cc8112368b90ff",
});
return ref(resData.list);
};
// 保险公司
export const layoutFnGetInsuranceCompany = async () => {
const resData = await getLevels({
DICTIONARIES_ID: "660812ce620f433a815b129d65f26101",
});
return ref(resData.list);
};
const resData = await getLevels({
DICTIONARIES_ID: "660812ce620f433a815b129d65f26101",
});
return ref(resData.list);
};

View File

@ -256,7 +256,7 @@
</layout-upload>
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="12">
<el-form-item label="营业执照" prop="bus_images">
<layout-upload
v-model:file-list="data.form.bus_images"
@ -267,6 +267,17 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公章" prop="official_seal_file">
<layout-upload
v-model:file-list="data.form.official_seal_file"
accept=".jpg,.jpeg,.png"
list-type="picture-card"
:limit="1"
delete-to-server
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-divider content-position="left">安全负责人信息</el-divider>
</el-col>
@ -459,6 +470,8 @@ import {
import { addingPrefixToFile } from "@/assets/js/utils.js";
import MapDialog from "./components/map.vue";
const FILE_URL = import.meta.env.VITE_FILE_URL;
const router = useRouter();
const formRef = ref(null);
const territoryCascaderRef = ref(null);
@ -510,6 +523,9 @@ const rules = {
bus_images: [
{ required: true, message: "营业执照不能为空", trigger: "blur" },
],
official_seal_file: [
{ required: true, message: "公章不能为空", trigger: "blur" },
],
LR_MOBILE: [
{ min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
{
@ -572,6 +588,7 @@ const data = reactive({
FOURTYPE: "",
four_images: [],
bus_images: [],
official_seal_file: [],
SAFETY_NAME: "",
SAFETY_POST: "",
SAFETY_NUMBER: "",
@ -597,6 +614,11 @@ const fnGetData = async () => {
const resData = await getEnterpriseInfo();
data.form = resData.pd;
data.form.bus_images = addingPrefixToFile(resData.busImgs);
data.form.official_seal_file = [
{
url: FILE_URL + resData.pd.OFFICIAL_SEAL_PATH,
},
];
data.form.four_images = addingPrefixToFile(resData.fourImgs);
data.form.OLDFOURTYPE = resData.pd.FOURTYPE;
data.form.FOURTYPE = resData.pd.FOURTYPE || 1;
@ -639,6 +661,12 @@ const fnSubmit = debounce(
data.form.bus_images[i].raw &&
formData.append("imgFiles", data.form.bus_images[i].raw);
}
if (data.form.official_seal_file[0].raw) {
formData.append(
"OFFICIAL_SEAL_PATH",
data.form.official_seal_file[0].raw
);
}
for (let i = 0; i < data.form.four_images.length; i++) {
data.form.four_images[i].raw &&
formData.append("fourFiles", data.form.four_images[i].raw);

View File

@ -107,6 +107,17 @@
class="ml-10"
/>
</el-descriptions-item>
<el-descriptions-item label="公章" :span="2">
<img
v-for="item in data.official_seal_file"
:key="item.IMGFILES_ID"
v-viewer
:src="item.url"
width="100"
height="100"
class="ml-10"
/>
</el-descriptions-item>
</el-descriptions>
<el-divider content-position="left">安全负责人信息</el-divider>
<el-descriptions :column="2" border>
@ -203,11 +214,12 @@ import { addingPrefixToFile } from "@/assets/js/utils.js";
import { reactive } from "vue";
import { useRouter } from "vue-router";
import QrCode from "./components/qr_code.vue";
const FILE_URL = import.meta.env.VITE_FILE_URL;
const router = useRouter();
const data = reactive({
info: {},
bus_images: [],
official_seal_file: [],
four_images: [],
qrCodeDialogVisible: false,
});
@ -216,6 +228,11 @@ const fnGetData = async () => {
data.info = resData.pd;
data.bus_images = addingPrefixToFile(resData.busImgs);
data.four_images = addingPrefixToFile(resData.fourImgs);
data.official_seal_file = [
{
url: FILE_URL + resData.pd.OFFICIAL_SEAL_PATH,
},
];
};
fnGetData();
</script>

View File

@ -235,21 +235,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="性别" prop="SEX">
<el-select v-model="data.form.SEX">
<el-option
v-for="item in [
{ NAME: '男', DICTIONARIES_ID: '1' },
{ NAME: '女', DICTIONARIES_ID: '0' },
]"
: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="POLITICAL_OUTLOOK">
<el-select v-model="data.form.POLITICAL_OUTLOOK">
@ -315,15 +300,6 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工种" prop="TYPE_OF_WORK">
<layout-select-create
v-model="data.form.TYPE_OF_WORK"
:list="data.jobTypeList"
@delete-option="fnDictionaryDelete($event, 'WORK_TYPE')"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="入职日期" prop="ENTRY_DATE">
<el-date-picker
@ -438,7 +414,6 @@ import {
layoutFnGetDegreeOfEducation,
layoutFnGetDuties,
layoutFnGetEmploymentSituation,
layoutFnGetJobType,
layoutFnGetNation,
layoutFnGetPersonnelType,
layoutFnGetPoliticalLandscape,
@ -505,7 +480,7 @@ const rules = {
],
ROLE_ID: [{ required: true, message: "请选择角色", trigger: "change" }],
DEPARTMENT_ID: [{ required: true, message: "请选择部门", trigger: "change" }],
DUTIES_ID: [{ required: true, message: "请选择岗位", trigger: "change" }],
POST_ID: [{ required: true, message: "请选择岗位", trigger: "change" }],
SORT: [
{ required: true, message: "请输入排序", trigger: "blur" },
{ type: "number", message: "请输入数字类型", trigger: "blur" },
@ -521,10 +496,10 @@ const rules = {
DEGREE_OF_EDUCATION: [
{ required: true, message: "文化程度不能为空", trigger: "change" },
],
POST: [{ required: true, message: "职务不能为空", trigger: "change" }],
TYPE_OF_WORK: [
{ required: true, message: "工种不能为空", trigger: "change" },
PERSONNEL_TYPE: [
{ required: true, message: "人员类型不能为空", trigger: "change" },
],
POST: [{ required: true, message: "职务不能为空", trigger: "change" }],
ENTRY_DATE: [
{ required: true, message: "请选择入职日期", trigger: "change" },
],
@ -604,7 +579,6 @@ const data = reactive({
PERSONNEL_TYPE: "",
DUTIES: "",
TITLE: "",
TYPE_OF_WORK: "",
ENTRY_DATE: "",
WORKING_DATE: "",
INCUMBENCY: "",
@ -701,8 +675,6 @@ const fnGetLevels = async () => {
data.dutiesList = dutiesList;
const { value: professionalTitleList } = await layoutFnGetProfessionalTitle();
data.professionalTitleList = professionalTitleList;
const { value: jobTypeList } = await layoutFnGetJobType();
data.jobTypeList = jobTypeList;
const { value: employmentSituationList } =
await layoutFnGetEmploymentSituation();
data.employmentSituationList = employmentSituationList;
@ -718,9 +690,6 @@ const fnDictionaryDelete = debounce(
} else if (DICTTYPE === "JOB_TITLE") {
DICTIONARIES_ID = data.professionalTitleList[index].DICTIONARIES_ID;
msgTitle = "职称:" + data.professionalTitleList[index].NAME;
} else if (DICTTYPE === "WORK_TYPE") {
DICTIONARIES_ID = data.jobTypeList[index].DICTIONARIES_ID;
msgTitle = "工种:" + data.jobTypeList[index].NAME;
}
await ElMessageBox.confirm(
"删除此分类会同时删除其他相关已编辑过的人员信息中的分类设置,确定要删除(" +
@ -733,8 +702,6 @@ const fnDictionaryDelete = debounce(
data.dutiesList.splice(index, 1);
} else if (DICTTYPE === "JOB_TITLE") {
data.professionalTitleList.splice(index, 1);
} else if (DICTTYPE === "WORK_TYPE") {
data.jobTypeList.splice(index, 1);
}
},
{
@ -778,13 +745,6 @@ const fnSubmit = debounce(
form.letTitleType = "value";
form.letTitleValue = form.TITLE;
}
if (fnFindValueInList("jobTypeList", form.TYPE_OF_WORK)) {
form.letTypeOfWorkType = "select";
form.letTypeOfWorkValue = "";
} else {
form.letTypeOfWorkType = "value";
form.letTypeOfWorkValue = form.TYPE_OF_WORK;
}
if (data.form.faceFile?.[0]?.raw) {
const resData = await image2Base64(data.form.faceFile[0].url);