1

parent 4a87c057
......@@ -8,7 +8,7 @@
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib",
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "octref.vetur"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
......
......@@ -13,6 +13,8 @@ export const saveBasicInfoApi = params => instance.post("/b/user/save", params);
// 注册企业信息
export const registerCompanyApi = params => instance.post("/b/company/register", params);
// 企业申诉
export const companyAppealApi = params => instance.post("/b/company/appeal", params);
// 重新注册企业信息
export const resubmitCompanyApi = params => instance.post("/company/register/resubmit", params);
......@@ -26,11 +28,8 @@ export const getInterviewListApi = params => instance.post("/job/getInterviewLis
// 获取公司信息及审核信息
export const getCompanyInfoApi = params => instance.post("/b/company/info", params);
// 保存企业信息
export const saveCompanyInfoApi = params => instance.post("/company/save", params);
//企业申诉
export const companyAppealApi = params => instance.post("/company/appeal", params);
// 更新企业信息
export const saveCompanyInfoApi = params => instance.post("/b/company/update", params);
//添加反馈信息
export const feedbackAdd = params => instance.post("/feedback/add/business", params);
......@@ -46,6 +45,8 @@ export const ocrLicense = params => instance.postForm("/ocr/license", params);
export const companyCheck = params => instance.post("/b/company/check", params);
//获取用户审核或申诉信息
export const companyReviewInfo = params => instance.post("/b/company/review/info", params);
//更新审核申诉
export const companyReviewUpdate = params => instance.post("/b/company/review/update", params);
//根据id获取反馈信息
export const feedbackById = params => instance.post(`/feedback/${params}`);
<template>
<div class="page">
<NavBar :showIcon="false" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<div class="form">
<div class="from-item" v-for="(item, index) in postItem" :key="index + Math.random()">
<div class="title">
<view>添加岗位信息{{ index + 1 }}</view>
<wd-icon v-if="index > 0" @click="deleteItem(index)" name="close-outline" size="34rpx"></wd-icon>
</div>
<formItem full title="岗位名称">
<input
type="text"
@input="changeInput($event, 'jobName', index)"
v-model="item.jobName"
placeholder="请填写岗位名称"
/>
</formItem>
<formItem title="招聘人数">
<input
type="number"
@input="changeInput($event, 'recruitmentNumber', index)"
v-model="item.recruitmentNumber"
placeholder="请填写招聘的人数"
/>
</formItem>
<formItem title="年龄要求">
<wd-col-picker
v-model="age"
:columns="ageColumns"
:close-on-click-modal="false"
:column-change="changeAge"
@confirm="confirmAge"
use-default-slot
>
<view :class="`inner flex-between ${item.ageText ? '' : 'placeholder'}`" @tap="changePicker(index)">
{{ item.ageText || "请选择年龄要求" }}
<view class="arrow"></view>
</view>
</wd-col-picker>
</formItem>
<formItem title="学历要求">
<wd-picker
:columns="educationColumns"
value-key="code"
label-key="text"
v-model="item.educationRequirement"
@confirm="confirmEducation"
use-default-slot
>
<view :class="`inner flex-between ${item.educationText ? '' : 'placeholder'}`" @tap="changePicker(index)">
<view class="flex-align-center" bind:tap="onShowIdentitySelect">
{{ item.educationText || "请选择学历" }}
</view>
<view class="arrow"></view>
</view>
</wd-picker>
</formItem>
<formItem title="薪资待遇"
><view :class="`inner flex-between ${item.salaryText ? '' : 'placeholder'}`" @click="onOpen(index)">
{{ item.salaryText || "请选择月薪范围" }}
<!-- <checkbox class="checkbox" @click="onChecked" :checked="my">面议</checkbox> -->
</view>
<wd-popup
v-model="show"
position="bottom"
custom-style="height:40%;border-radius: 20rpx;z-index:999;"
@close="handleClose"
>
<view class="title-box"
><view></view>
<view class="title">薪资选择</view>
<wd-icon @click="handleClose" name="close" size="30rpx"></wd-icon>
</view>
<wd-picker-view
@change="handleConfirm"
use-default-slot
:columns="salaryColumns"
v-model="moneyValue"
></wd-picker-view>
<view style="width: 100%; display: flex; justify-content: center"
><wd-button :data-index="index" style="width: 80%" @click="handleClose" block :round="false"
>确定</wd-button
></view
>
</wd-popup>
<!-- <wd-col-picker
v-model="salary"
:columns="salaryColumns"
:column-change="changeSalary"
@confirm="confirmSalary"
use-default-slot
>
<view :class="`inner flex-between ${salaryText ? '' : 'placeholder'}`" bind:tap="onOpen">
{{ salaryText || "请选择薪资" }}
<view class="arrow"></view>
</view>
</wd-col-picker> -->
</formItem>
<formItem title="是否提供食宿" full>
<wd-radio-group shape="dot" inline v-model="item.accommodation">
<wd-radio v-for="v in EnumAccommodation" :key="v.code" :value="v.code">{{ v.text }}</wd-radio>
</wd-radio-group>
</formItem>
<formItem title="是否缴纳五险一金" full>
<wd-radio-group shape="dot" inline v-model="item.socialInsurance">
<wd-radio value="1"></wd-radio>
<wd-radio value="0"></wd-radio>
</wd-radio-group>
</formItem>
<formItem title="岗位专业(技能)要求" full>
<textarea v-model="item.skills" placeholder="请输入岗位专业(技能)要求" />
</formItem>
<!-- <formItem title="备注" full>
<input v-model="postItem.socialInsurance" placeholder="请填写" />
</formItem> -->
</div>
</div>
<NavBar :showIcon="true" :showTitle="true" title="岗位信息" backgroundBox="#FFFFFF"></NavBar>
<wd-tabs v-model="tab">
<block v-for="item in tabList" :key="item.id">
<wd-tab :title="item.name">
<view class="from-1" v-if="tab == 0"> 1</view>
<view v-else>2</view>
</wd-tab>
</block>
</wd-tabs>
<wd-tabbar
@tap="next"
v-if="tab == 0"
custom-style="display: flex;justify-content: center !important;z-index:1;"
fixed
placeholder
safeAreaInsetBottom
>
<view class="footer"> <button class="foot-btn" @click="openMask">下一步</button></view>
</wd-tabbar>
<wd-tabbar
v-else
custom-style="display: flex;justify-content: center !important;z-index:1;"
fixed
placeholder
......@@ -133,391 +35,38 @@
<script setup>
import { ref } from "vue";
import { getEumData } from "@/utils/utils";
import formItem from "./formItem.vue";
import { useStore } from "./store";
const pinias = useStore();
import { jobFairRegisterApi } from "@/api/article";
let my = ref(false);
let moneyValue = ref([]);
let currentIndex = ref(0);
const show = ref(false);
const postItem = ref([
{
jobName: "",
recruitmentNumber: 1, //身份
minAgeRequirement: 0, //最小年龄
maxAgeRequirement: 0, //最大年龄
educationRequirement: "0", //学历要求EnumEducationRequirement
minSalary: 1000, //最低薪资
maxSalary: 1000, //最高薪资
socialInsurance: "1",
ageText: null,
educationText: null,
accommodation: "0", //是否提供食宿EnumAccommodation
skills: "" //"岗位专业(技能)要求
}
const tab = ref(0);
const tabList = ref([
{ id: 213213, name: "选择已有岗位", type: 1 },
{ id: 1651651, name: "新增岗位", type: 2 }
]);
/* 年龄 */
const age = ref([]);
const ageText = ref("不限");
const ageColumns = ref([]);
const changeAge = ({ selectedItem, resolve, finish }) => {
if (selectedItem.next) {
const temp = [];
for (let i = 16; i < 50; i++) {
temp.push({
value: i + selectedItem.value,
label: i + selectedItem.value + "岁",
next: false
});
resolve(temp);
}
} else {
postItem.value[currentIndex.value].minAgeRequirement = 0;
postItem.value[currentIndex.value].maxAgeRequirement = 0;
postItem.value[currentIndex.value].ageText = "不限";
finish();
}
};
function deleteItem(index) {
postItem.value.splice(index, 1);
}
function onOpen(index) {
currentIndex.value = index;
show.value = true;
my.value = false;
}
function changePicker(index) {
currentIndex.value = index;
console.log("currentIndex.value", currentIndex.value);
}
function onChecked() {
my.value = !my.value;
// 如果勾选了面议
if (my.value) {
// postItem
salaryText.value = "";
postItem.value[currentIndex.value].minSalary = 0;
postItem.value[currentIndex.value].maxSalary = 0;
} else {
postItem.value[currentIndex.value].minSalary = "";
postItem.value[currentIndex.value].maxSalary = "";
}
}
const confirmAge = ({ value, selectedItems }) => {
const [min, max] = value;
if (max) {
postItem.value[currentIndex.value].minAgeRequirement = min;
postItem.value[currentIndex.value].maxAgeRequirement = max;
} else {
postItem.value[currentIndex.value].minAgeRequirement = 0;
postItem.value[currentIndex.value].maxAgeRequirement = 0;
postItem.value[currentIndex.value].ageText = "不限";
}
postItem.value[currentIndex.value].ageText = selectedItems.map(v => v.label).join("~");
};
function changeInput(e, type, index) {
let { value } = e.detail;
currentIndex.value = index;
postItem.value[index][type] = value;
}
const initAgeColumns = () => {
const temp = [
{
value: 0,
label: "不限",
next: false
}
];
for (let i = 16; i < 50; i++) {
temp.push({
value: i,
label: i + "岁",
next: true
});
}
ageColumns.value.push(temp);
};
initAgeColumns();
/* 学历 */
const educationColumns = ref([]);
const educationText = ref("不限");
const initEducationColumns = async () => {
educationColumns.value = await getEumData("EnumEducationRequirement");
};
const confirmEducation = ({ selectedItems }) => {
postItem.value[currentIndex.value].educationText = selectedItems.text;
};
initEducationColumns();
/* 薪水 */
const salary = ref([]);
const salaryText = ref("1K");
const salaryColumns = ref([]);
const changeSalary = ({ selectedItem, resolve, finish }) => {
if (selectedItem.next) {
const temp = [];
for (let i = 1; i < 50; i++) {
temp.push({
value: i * 1000 + selectedItem.value,
label: i * 1000 + selectedItem.value,
next: false
});
resolve(temp);
}
} else {
finish();
}
};
const initsalaryColumns = () => {
let multiple = 1000;
const temp = [];
// 生成序列
for (let i = 1; i <= 50; i++) {
const currentValue = i * multiple;
temp.push({
value: currentValue,
label: currentValue / multiple + "K",
next: true
});
}
// 确保 columns.value 是一个数组
if (!Array.isArray(salaryColumns.value)) {
salaryColumns.value = [];
}
// 清空原来的数组,以确保只包含新的数据
salaryColumns.value.length = 0;
// 将 temp 复制两次,推入 columns.value
salaryColumns.value.push([...temp], [...temp]);
};
function handleClose() {
if (moneyValue.value[1] < moneyValue.value[0]) {
xma.showToast({
title: "最高薪资不能小于最低薪资",
icon: "none"
});
return;
}
postItem.value[currentIndex.value].maxSalary = moneyValue.value[1];
postItem.value[currentIndex.value].minSalary = moneyValue.value[0];
show.value = false;
}
function changeIndex(index) {
currentIndex = index;
console.log("currentIndex", currentIndex);
}
const handleConfirm = ({ selectedItem, value }) => {
if (value[1] < value[0]) {
xma.showToast({
title: "最高薪资不能小于最低薪资",
icon: "none"
});
return;
} else {
postItem.value[currentIndex.value].maxSalary = moneyValue.value[1];
postItem.value[currentIndex.value].minSalary = moneyValue.value[0];
}
// my.value = false;
postItem.value[currentIndex.value].salaryText = value.map(num => `${num / 1000}k`).join("~");
};
initsalaryColumns();
/* 是否提供食宿 */
const EnumAccommodation = ref([]);
const initEnumAccommodation = async () => {
EnumAccommodation.value = await getEumData("EnumAccommodation");
};
initEnumAccommodation();
/* 添加 */
const addPost = () => {
/* 数据清空 */
postItem.value.push({
jobName: "",
recruitmentNumber: 1, //身份
minAgeRequirement: 0, //最小年龄
maxAgeRequirement: 0, //最大年龄
educationRequirement: "0", //学历要求EnumEducationRequirement
minSalary: 1000, //最低薪资
maxSalary: 1000, //最高薪资
socialInsurance: "1",
ageText: null,
educationText: null,
accommodation: "0", //是否提供食宿EnumAccommodation
skills: "" //"岗位专业(技能)要求
});
};
/* 提交 */
const openMask = () => {
console.log("postItem.value", postItem.value);
const result = postItem.value.every(item => {
return validateForm(item, [
"accommodation",
"educationRequirement",
"jobName",
"maxAgeRequirement",
"maxSalary",
"minAgeRequirement",
"minSalary",
"recruitmentNumber",
"skills",
"socialInsurance"
]);
});
if (!result) {
// 如果有任意一个 item 验证失败,则提示用户
uni.showToast({
title: `请填写完整`,
icon: "none",
duration: 2000
});
return false;
} else {
pinias.setFormDataKey("positionList", postItem.value);
console.log("pinias.formData", pinias.formData);
jobFairRegisterApi(pinias.formData).then(res => {
if (res.code == 200) {
postItem.value = [
{
jobName: "",
recruitmentNumber: 1, //身份
minAgeRequirement: 0, //最小年龄
maxAgeRequirement: 0, //最大年龄
educationRequirement: "0", //学历要求EnumEducationRequirement
minSalary: 1000, //最低薪资
maxSalary: 1000, //最高薪资
socialInsurance: "1",
ageText: null,
educationText: null,
accommodation: "0", //是否提供食宿EnumAccommodation
skills: "" //"岗位专业(技能)要求
}
];
pinias.resetForm();
xma.reLaunch({
url: "/pages/dynamic/index"
});
}
});
}
};
const validateForm = (formData, requiredFields) => {
for (const field of requiredFields) {
const value = formData[field];
// 排除 0 和 "0" 的值,不作为空值校验
if (value === undefined || value === null || value === "") {
uni.showToast({
title: `请填写${field}字段`,
icon: "none",
duration: 2000
});
return false;
}
}
return true;
};
</script>
<style lang="scss" scoped>
@import "./index.scss";
.form {
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: 50rpx;
}
textarea {
width: 100%;
height: 140rpx;
}
.title-box {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 32rpx;
.title {
font-weight: bold;
font-size: 32rpx;
}
}
:deep(.uni-checkbox-input) {
border-radius: 50% !important;
}
}
.foot-btn {
.footer {
display: flex;
align-items: center;
justify-content: center;
width: 296rpx;
height: 80rpx;
color: #ffffff;
background: #1f86ff;
border-radius: 12rpx;
}
.foot-btn1 {
display: flex;
align-items: center;
justify-content: center;
width: 296rpx;
height: 80rpx;
color: #1f86ff;
background: #e8f2ff;
border-radius: 12rpx;
}
.wrapper {
justify-content: space-around;
width: 100%;
height: 100%;
.block {
width: 600rpx;
height: 496rpx;
text-align: center;
background: #ffffff;
border-radius: 16rpx;
img {
width: 274rpx;
height: 192rpx;
margin-top: 50rpx;
margin-bottom: 6;
}
p {
font-size: 28rpx;
font-weight: normal;
line-height: 48rpx;
color: #000000;
}
.btn {
display: flex;
margin-top: 40rpx;
button {
width: 236rpx;
height: 80rpx;
line-height: 80rpx;
}
.b1 {
font-size: 30rpx;
font-weight: 600;
color: #1f86ff;
background: #1f86ff0f;
&::after {
border: 0;
}
}
.b2 {
font-size: 30rpx;
font-weight: 600;
color: #ffffff;
background: #1f86ff;
}
}
.foot-btn {
display: flex;
align-items: center;
justify-content: center;
width: 296rpx;
height: 80rpx;
color: #ffffff;
background: #1f86ff;
border-radius: 12rpx;
}
.foot-btn1 {
display: flex;
align-items: center;
justify-content: center;
width: 296rpx;
height: 80rpx;
color: #1f86ff;
background: #e8f2ff;
border-radius: 12rpx;
}
}
</style>
......@@ -4,16 +4,19 @@
<div class="title1">填写企业信息</div>
<div class="form">
<formItem title="企业(单位)名称">
<input type="text" v-model="pinias.formData.companyName" placeholder="请填写单位名称" />
<input :disabled="true" type="text" v-model="enterpriseInformation.name" placeholder="请填写单位名称" />
</formItem>
<formItem title="单位联系人">
<input type="text" v-model="pinias.formData.contactPerson" placeholder="请填写联系人" />
<formItem title="信用代码">
<input :disabled="true" type="text" v-model="enterpriseInformation.creditCode" placeholder="请填信用代码" />
</formItem>
<formItem title="联系电话">
<input type="text" v-model="pinias.formData.contactPhone" placeholder="请填联系电话" />
</formItem>
<formItem title="企业(单位)简介">
<textarea type="text" v-model="pinias.formData.companyIntro" placeholder="请输入简介" />
<formItem title="联系地址">
<textarea
auto-height
:disabled="true"
type="text"
v-model="enterpriseInformation.location"
placeholder="请填联系地址"
/>
</formItem>
</div>
<wd-tabbar
......@@ -31,23 +34,19 @@
<script setup>
import { ref } from "vue";
import formItem from "./formItem.vue";
import { getCompanyInfoApi } from "@/api/user";
import { useStore } from "./store";
const pinias = useStore();
const enterpriseInformation = ref({});
onLoad(options => {
pinias.setFormDataKey("articleId", options.articleId);
getCompanyInfoApi().then(res => {
enterpriseInformation.value = res.data;
});
});
const next = () => {
const { companyName, contactPerson, contactPhone, companyIntro } = pinias.formData;
if (companyName && contactPerson && contactPhone && companyIntro) {
uni.navigateTo({
url: "/pages/signUp/addPost"
});
} else {
uni.showToast({
title: "请填写完整信息",
icon: "none"
});
}
uni.navigateTo({
url: "/pages/signUp/addPost"
});
};
</script>
......
<template>
<div class="page">
<NavBar :showIcon="true" :showTitle="true" title="企业申诉"></NavBar>
<view class="appealing-name"> 申诉企业:{{ name }} </view>
<view class="appealing-name"> 申诉企业:{{ params.companyName }} </view>
<view class="appealing-user-name">
<view>申述人姓名</view>
<input type="text" v-model="params.realName" placeholder="请输入你的真实姓名" />
<input type="text" v-model="params.name" placeholder="请输入你的真实姓名" />
</view>
<view class="appealing-content">
<view>申诉内容</view>
......@@ -21,7 +21,11 @@
<view>点击上传营业执照</view>
</view>
<view>
<image v-if="params.idCardPath" :src="evn.APP_IMAGE_BASE_API + params.idCardPath" @tap="chooseImage(2)" />
<image
v-if="params.citizenFrontPath"
:src="evn.APP_IMAGE_BASE_API + params.citizenFrontPath"
@tap="chooseImage(2)"
/>
<image v-else src="@/static/image/businessLicense/appealingIdcard.png" @tap="chooseImage(2)" />
<view>点击上传法人身份证</view>
</view>
......@@ -30,8 +34,8 @@
<view class="t1"> (注:图片大小不超过10M) </view>
</view>
<wd-tabbar
@tap="next"
v-if="status == 2"
@tap="next"
custom-style="display: flex;justify-content: center !important;"
fixed
placeholder
......@@ -46,20 +50,24 @@
import { ref, reactive } from "vue";
import { uploadFiles } from "@/utils/fileUpload";
import evn from "@/utils/config";
import { companyAppealApi, appealInfo } from "@/api/user";
import { companyAppealApi, appealInfo, companyReviewInfo } from "@/api/user";
import _ from "lodash";
const name = ref("");
const params = reactive({
realName: "",
name: "",
companyName: "",
licensePath: "",
idCardPath: "",
content: "",
companyId: 1
citizenFrontPath: "",
content: ""
});
let status = ref(2);
onLoad(data => {
name.value = data.name;
params.companyId = data.id;
params.companyName = data.name;
if (data.companyCreditCode) {
params.creditCode = data.companyCreditCode;
}
// params.companyId = data.id;
appealInfoFn();
});
/* 选择图片 */
......@@ -73,21 +81,23 @@ const chooseImage = type => {
params.licensePath = res[0].key;
} else {
// 上传法人身份证
params.idCardPath = res[0].key;
params.citizenFrontPath = res[0].key;
}
}
});
};
const appealInfoFn = () => {
appealInfo().then(res => {
companyReviewInfo().then(res => {
if (res.data) {
params.companyId = res.data.companyId;
name.value = res.data.companyName;
params.realName = res.data.realName;
params.name = res.data.name;
params.content = res.data.content;
params.companyName = res.data.companyName;
params.licensePath = res.data.licensePath;
params.idCardPath = res.data.idCardPath;
params.creditCode = res.data.creditCode;
params.citizenFrontPath = res.data.citizenFrontPath;
status.value = res.data.status;
}
});
......@@ -95,6 +105,8 @@ const appealInfoFn = () => {
const submit = () => {
let flag = true;
console.log("params", params);
_.mapValues(params, value => {
flag = !!value && flag;
return value;
......
......@@ -47,14 +47,10 @@
</div>
</div>
</view>
<!-- <view class="name" v-if="step === 1">
<view class="t1">企业信息</view>
<input type="text" v-model="pinias.formData.name" placeholder="请输入企业名称" />
</view> -->
<!-- <view class="name" v-if="step === 2">
<view class="t1">信用代码</view>
<input type="text" v-model="pinias.formData.creditCode" placeholder="请输入信用代码" />
</view> -->
<view class="name" v-if="step === 2">
<view class="t1">账户申述</view>
<textarea v-model="value" placeholder="请填写申述理由" />
</view>
<view class="image-upload" v-if="step === 3">
<view class="t1">营业执照照片</view>
<view class="t2">注:执照信息清晰可见,照片内容真实有效,不做任何修改,大小不超过10M</view>
......@@ -63,7 +59,8 @@
</view>
</view>
<view class="btn-wrap flex-center">
<button v-if="step < 3" class="bottom-btn" @tap="nextStep">下一步</button>
<button v-if="step == 1" class="bottom-btn" @tap="nextStep">下一步</button>
<button v-if="step == 2" class="bottom-btn" @tap="nextStep">提交</button>
<template v-if="step === 3 && !!pinias.formData.licensePath">
<button class="reupload" @tap="showPopout = true">重新上传</button>
<button class="next" @tap="nextStep">下一步</button>
......@@ -107,15 +104,14 @@ const params = reactive({
phone: "",
position: ""
});
onLoad(() => {
console.log(uni);
onLoad(({ steps }) => {
step.value = steps * 1;
});
const step = ref(1);
let step = ref(1);
const name = ref("");
const showPopout = ref(false);
onShow(() => {
step.value = 1;
getLoginUserApiFn();
});
function ocrLicenseFn(uri) {
......@@ -135,8 +131,10 @@ function getLoginUserApiFn() {
params.name = name;
params.phone = phone;
params.position = position;
if (name) {
step.value = 3;
if (step.value !== 2) {
if (name) {
step.value = 3;
}
}
}
});
......@@ -291,6 +289,25 @@ const chooseImage = sourceType => {
margin-top: 16rpx;
border-bottom: 2rpx solid #f3f4f8;
}
textarea {
position: relative;
box-sizing: border-box;
width: 686rpx;
height: 272rpx;
padding: 32rpx;
padding-bottom: 54rpx;
margin-top: 32rpx;
background: #f2f5fb;
border-radius: 8rpx;
opacity: 1;
text {
position: absolute;
right: 20rpx;
bottom: 16rpx;
font-size: 24rpx;
color: #77818f;
}
}
}
.image-upload {
.t2 {
......
......@@ -89,7 +89,7 @@
<image src="@/static/image/icon/delete2.png" @tap="show = false" />
<view class="title">企业已存在</view>
<view class="info">
您在注册的<text>{{ name }}</text>已在乐业观山湖认证,请核对企业名称是否正确
您在注册的<text>{{ companyName }}</text>已在乐业观山湖认证,请核对企业名称是否正确
</view>
<view class="btn flex-between" @tap="navigateTo('/pages/user/businessLicense/fillIn')">
<view class="text">
......@@ -100,7 +100,7 @@
</view>
<view
class="btn flex-between"
@tap="navigateTo(`/pages/user/businessLicense/appeal?name=${name}&id=${id}`)"
@tap="navigateTo(`/pages/user/businessLicense/appeal?name=${companyName}&companyCreditCode=${companyCreditCode}`)"
>
<view class="text">
<view class="t1">申述资质被冒用</view>
......@@ -125,7 +125,8 @@ const pinias = useDefineStore();
const show = ref(false);
// console.log(pinias.formData);
const id = ref("");
const name = ref("");
const companyName = ref("");
const companyCreditCode = ref("");
const radio = ref(1);
const navigateTo = url => {
uni.navigateTo({
......@@ -163,12 +164,12 @@ const submit = () => {
});
} else {
show.value = true;
id.value = company.data.id;
name.value = company.data.name;
// id.value = company.data.id;
companyCreditCode.value = creditCode
companyName.value = name;
}
}
});
return;
};
</script>
......
......@@ -4,7 +4,7 @@
<view class="popup-wrapper">
<view class="block" @click.stop="">
<view class="sumbit-error">
<view class="title">企业已存在</view>
<view class="title">企业信息已失效</view>
<view class="info">
您在注册的<text>{{ name }}</text>已在乐业观山湖认证,请核对企业名称是否正确
</view>
......@@ -26,6 +26,20 @@
</view>
</view>
</wd-overlay>
<wd-overlay :show="displayExpired">
<view class="popup-display-expired">
<view class="sumbit-error">
<image src="@/static/image/user/displayExpired.png"></image> <view class="title">企业信息已失效</view>
<view class="txt"
>由于您超过 <text style="color: #1f86ff">1</text> 月未登录 现已将您的账号禁用 您可完成申述后继续使用</view
>
<view class="btn-box">
<view class="cancel-button btn" @tap="displayExpired = false">取消</view>
<view class="tz-btn btn" @tap="navigateTo('/pages/user/businessLicense/fillIn?steps=2')">立即申诉</view>
</view></view
>
</view>
</wd-overlay>
<div class="user-container">
<view class="bg"></view>
<!-- 用户信息 -->
......@@ -37,7 +51,7 @@
<img v-else src="@/static/image/user/default-avatar.png" alt="" />
</view>
<view class="name">
{{ userInfo.realName || "无" }}
{{ userInfo.name || "无" }}
<img src="@/static/image/icon/edit.png" @click="navigateTo('/pages/user/editUserInfo/index')" alt="" />
</view>
<view class="education">{{ userInfo.position || "无" }}</view>
......@@ -67,10 +81,12 @@ import { getEnumText } from "@/utils/utils";
import { ref, reactive } from "vue";
import evn from "@/utils/config.js";
const show = ref(false);
const displayExpired = ref(false);
let name = ref("");
let id = ref("");
import { removeToken } from "@/utils/token";
const navigateTo = (url, fn) => {
show.value = false;
if (fn) {
fn();
}
......@@ -131,12 +147,13 @@ const appealInfoFn = () => {
};
const companyReviewInfoFn = () => {
companyReviewInfo().then(res => {
if (res.data.status == 2) {
navList[0].url = "/pages/user/myCompany/index?status=3";
navList[0].subText = "审核不通过";
} else if (res.data.status == 0) {
navList[0].subText = res.data.companyName;
navList[0].url = "/pages/user/myCompany/index";
const { reviewType, status } = res.data;
if (reviewType === 1) {
navList[0].url = `/pages/user/myCompany/index?status=${status === 0 ? 2 : 3}`;
navList[0].subText = status === 0 ? "审核中" : "审核不通过";
} else if (reviewType !== 1) {
navList[0].url = `/pages/user/businessLicense/appeal`;
navList[0].subText = status === 0 ? "申诉中" : "申诉不通过";
}
});
};
......@@ -151,56 +168,42 @@ const getUserInfo = async () => {
}
const { status } = userRes.data;
switch (status) {
case 0:
uni.navigateTo({
url: `/pages/user/businessLicense/fillIn`
});
uni.hideTabBar();
break;
case 1:
navList[0].subText = userRes.data.companyName;
avList[0].url = "/pages/user/myCompany/index?status=1";
navList[0].url = "/pages/user/myCompany/index?status=1";
uni.showTabBar();
break;
case 2:
navList[0].subText = "审核中";
navList[0].url = "/pages/user/myCompany/index?status=2";
companyReviewInfoFn();
uni.hideTabBar();
break;
case 3:
navList[0].subText = "申诉中";
navList[0].url = "/pages/user/businessLicense/appeal";
companyReviewInfoFn();
uni.hideTabBar();
break;
case 4:
navList[0].subText = "企业信息失效";
uni.hideTabBar();
show.value = true;
break;
case 5:
// 账号长时间未登录 弹窗申诉
show.value = true;
uni.hideTabBar();
displayExpired.value = true;
break;
default:
break;
}
// if (status !== 1) {
// uni.hideTabBar();
// if (status == 2) {
// // 代表添加了申述信息,需要查看申述状态,调用申诉信息接口
// appealInfoFn();
// } else if (status == 3) {
// show.value = true;
// // 代表账号所关联的企业被申述解除关联
// }
// }
// if (status == 1 || status == 4) {
// show.value = false;
// const companyRes = await getCompanyInfoApi();
// if (companyRes.code == 200) {
// let type = companyRes.data.companyAudit.status;
// if (type != 1) {
// navList[0].subText = await getEnumText("EnumAuditStatus", type);
// navList[0].url = "/pages/user/myCompany/index";
// navList[0].auditStatus = type;
// uni.hideTabBar();
// } else {
// uni.showTabBar();
// }
// }
// }
};
onShow(() => {
getUserInfo();
......@@ -271,6 +274,64 @@ onShow(() => {
}
}
}
.popup-display-expired {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
.sumbit-error {
box-sizing: border-box;
width: 600rpx;
padding: 0 32rpx 32rpx;
background-color: #ffffff;
border-radius: 10rpx;
min-height: 668rpx;
display: flex;
flex-direction: column;
position: relative;
align-items: center;
image {
position: absolute;
width: 448rpx;
height: 448rpx;
}
.title {
padding: 32rpx 0;
font-size: 28rpx;
font-weight: 600;
line-height: 54rpx;
color: #1b2026;
text-align: center;
margin-top: 300rpx;
}
.txt {
width: 400rpx;
font-size: 28rpx;
font-weight: normal;
line-height: 48rpx;
}
.btn-box {
display: flex;
align-items: center;
margin-top: 40rpx;
.btn {
box-sizing: border-box;
padding: 14rpx 34rpx;
border-radius: 12rpx;
}
.cancel-button {
background: rgba(31, 134, 255, 0.1);
color: #1f86ff;
}
.tz-btn {
background: #1f86ff;
color: #fff;
margin-left: 72rpx;
}
}
}
}
.nav-bar {
.text {
margin: 0 auto;
......
......@@ -7,16 +7,30 @@
<img v-else src="@/static/image/temp/defaultCompany.png" alt="" @click="chooseImage" />
<div class="name">{{ companyInfo.companyName }}</div>
<formItem style="margin-top: 80rpx" title="营业执照" arrow :border="false" @click="jupmLicenseInfo">
<p :class="`status${companyInfo.companyAudit?.status}`">{{ auditStatus }}</p>
<p :class="`status${companyInfo?.status}`">{{ auditStatus }}</p>
</formItem>
</div>
<div class="form-wrap">
<!-- <formItem title="企业名称">
<input type="text" v-model="params.companyName" placeholder="请输入企业名称" />
</formItem> -->
<formItem title="企业名称">
<input
type="text"
:disabled="[1].includes(companyInfo.status)"
v-model="params.companyName"
placeholder="请输入企业名称"
/>
</formItem>
<formItem title="行业分类" v-if="[1].includes(pageStatus)">
<p style="color: #77818f">{{ companyInfo.industryCategory }}</p>
<wd-picker
value-key="text"
label-key="code"
use-default-slot
:columns="columns"
v-model="params.industry"
@confirm="handleConfirm"
>
<p style="color: #77818f">{{ params.industry }}</p>
</wd-picker>
</formItem>
<formItem title="信用代码">
<p style="color: #77818f">{{ companyInfo.creditCode }}</p>
......@@ -25,7 +39,7 @@
<wd-col-picker
v-model="cityValue"
:columns="cityOpstion"
:disabled="![1, 3].includes(pageStatus)"
:disabled="![1].includes(pageStatus)"
value-key="code"
label-key="name"
:column-change="columnChangeCity"
......@@ -39,12 +53,12 @@
</formItem>
<div class="textarea-wrap" v-if="[1].includes(pageStatus)">
<p class="label">公司介绍</p>
<textarea maxlength="500" placeholder="请输入公司介绍" v-model="params.companyIntro" />
<textarea maxlength="500" placeholder="请输入公司介绍" v-model="params.introduction" />
</div>
</div>
</div>
<wd-tabbar
v-if="[1, 3].includes(pageStatus)"
v-if="[1].includes(pageStatus)"
@click="submit"
custom-style="display: flex;justify-content: center !important;z-index:1;"
fixed
......@@ -60,7 +74,7 @@
import { reactive, ref } from "vue";
import formItem from "./formItem.vue";
import { getCompanyInfoApi, saveCompanyInfoApi, companyReviewInfo } from "@/api/user";
import { getTreeListApi } from "@/api/common";
import { getTreeListApi, getDictDataApi } from "@/api/common";
import { uploadFiles } from "@/utils/fileUpload";
import { getEnumText } from "@/utils/utils";
import evn from "@/utils/config";
......@@ -70,6 +84,7 @@ const params = reactive({
logoPath: "",
companyName: "",
provinceCode: "",
industry: "",
provinceName: "",
cityCode: "",
cityName: "",
......@@ -77,7 +92,7 @@ const params = reactive({
districtName: "",
creditCode: "",
location: "",
companyIntro: ""
introduction: ""
});
const pageStatus = ref(1);
/* 调整到审核信息 */
......@@ -107,11 +122,14 @@ function getCompanyInfoApiFn() {
Object.keys(params).forEach(key => {
params[key] = res.data[key];
});
const { provinceName, cityName, districtName } = res.data;
const { provinceName, cityName, districtName, name, introduction, logoPath } = res.data;
params.companyName = name;
params.introduction = introduction;
params.logoPath = logoPath;
cityText.value = [provinceName, cityName, districtName].join("-");
// 审核状态
auditStatus.value = await getEnumText("EnumAuditStatus", res.data.companyAudit.status);
auditStatus.value = await getEnumText("EnumAuditStatus", res.data.status);
});
}
function companyReviewInfoFn() {
......@@ -120,13 +138,23 @@ function companyReviewInfoFn() {
Object.keys(params).forEach(key => {
params[key] = res.data[key];
});
cityText.value = res.data.location;
const { provinceName, cityName, districtName, name, introduction, location, logoPath } = res.data;
cityText.value = location;
params.companyName = name;
params.introduction = introduction;
params.logoPath = logoPath;
cityText.value = [provinceName, cityName, districtName].join("-");
// 审核状态
auditStatus.value = await getEnumText("EnumAuditStatus", res.data.status);
});
}
function handleConfirm() {}
/* 获取省市区 */
const cityOpstion = ref([]);
const columns = ref([]);
const cityValue = ref([]);
const cityText = ref("");
......@@ -134,6 +162,9 @@ let citySelectedItems = [];
getTreeListApi().then(res => {
cityOpstion.value.push(res.data);
});
getDictDataApi(["EnumIndustryCategory"]).then(res => {
columns.value = res.data.EnumIndustryCategory;
});
const columnChangeCity = ({ selectedItem, resolve, finish }) => {
if (selectedItem.children) {
resolve(selectedItem.children);
......@@ -145,13 +176,12 @@ const handleConfirmCity = ({ selectedItems }) => {
cityText.value = selectedItems.map(v => v.name).join("-");
citySelectedItems = selectedItems;
const [province, city, district] = selectedItems;
// params.provinceCode = province.code;
// params.provinceName = province.name;
// params.cityCode = city.code;
// params.cityName = city.name;
// params.districtCode = district.code;
// params.districtName = district.name;
params.provinceCode = province.code;
params.provinceName = province.name;
params.cityCode = city.code;
params.cityName = city.name;
params.districtCode = district.code;
params.districtName = district.name;
params.location = selectedItems.map(v => v.name).join("-");
};
/* 选择图片 */
......@@ -167,20 +197,23 @@ const chooseImage = sourceType => {
};
/* 提交 */
const submit = () => {
console.log(params);
console.log("params", params);
if (
validateForm(params, [
"address",
"location",
"cityCode",
"cityName",
"companyIntro",
"companyName",
"creditCode",
"introduction",
"districtCode",
"districtName",
"id",
"logoPath",
"nameAbbreviation",
"provinceCode",
"provinceName"
"provinceName",
"industry"
])
) {
saveCompanyInfoApi(params).then(res => {
......@@ -211,6 +244,8 @@ const validateForm = (formData, requiredFields) => {
const value = formData[field];
// 排除 0 和 "0" 的值,不作为空值校验
if (value === undefined || value === null || value === "") {
console.log("field", field);
uni.showToast({
title: `请填写完整表单`,
icon: "none",
......
......@@ -3,11 +3,11 @@
<div class="page">
<div class="audit-message">
<p class="title" :style="{ background: status == 2 ? '#ff5113' : '#1F86FF' }">
{{ status == 2 ? "审核拒绝" : status == 0 ? "待审核" : "通过审核" }}
{{ status == 2 ? "审核拒绝" : status == 0 ? "待审核" : status == 1 ? "通过审核" : "" }}
</p>
<div class="message" :style="{ background: '#FFEDE7' }" v-if="status == 2">
<p>拒绝原因</p>
{{ companyInfo.companyAudit.auditMessage }}
{{ companyInfo.message }}
</div>
</div>
<view class="image-wrap">
......@@ -46,41 +46,24 @@
</template></wd-input
>
</view>
<!-- <view class="item">
<view class="label"> 有效期 </view>
<view class="content">
<wd-radio-group @change="change" v-model="radio" shape="dot" inline :disabled="status != 2">
<wd-radio :value="1">长期</wd-radio>
<wd-radio :value="2">具体时间</wd-radio>
</wd-radio-group>
</view>
</view>
<view class="item">
<view class="label"> 日期 </view>
<wd-calendar
v-model="myLicenseValidityPeriod"
:disabled="radio == 1 && status != 2"
:min-date="minDate"
:max-date="maxDate"
use-default-slot
>
<view :class="`content ${radio == 1 ? 'disabled' : ''}`">
{{ (myLicenseValidityPeriod && $formatTimestamp(myLicenseValidityPeriod, "YYYY-MM-DD")) || "请选择" }}
</view>
</wd-calendar>
</view> -->
</view>
<view class="btn-wrap" v-if="status == 2">
<button class="bottom-btn" @tap="submit">提交</button>
</view>
<wd-tabbar
v-if="[2].includes(status)"
@click="submit"
custom-style="display: flex;justify-content: center !important;z-index:1;"
fixed
placeholder
safeAreaInsetBottom
>
<view class="foot-btn">提交</view>
</wd-tabbar>
</div>
</template>
<script setup>
import evn from "@/utils/config";
import { uploadFiles } from "@/utils/fileUpload";
import { getCompanyInfoApi, resubmitCompanyApi, companyReviewInfo } from "@/api/user";
import { getCompanyInfoApi, registerCompanyApi, companyReviewInfo, companyReviewUpdate } from "@/api/user";
import { ref } from "vue";
import dayjs from "dayjs";
const radio = ref(1);
......@@ -119,18 +102,12 @@ function getCompanyInfoApiFn() {
companyName.value = res.data.companyName;
myCode.value = res.data.creditCode;
myLicenseValidityPeriod.value = res.data.licenseValidityPeriod;
// if (res.data.licenseValidityPeriod == 4102329600000) {
// radio.value = 1;
// } else {
// radio.value = 2;
// }
});
}
function companyReviewInfoFn() {
companyReviewInfo().then(async res => {
companyInfo.value = res.data;
companyReviewInfo().then(res => {
companyInfo = res.data;
status.value = res.data.status;
myLicensePath.value = res.data.licensePath;
companyName.value = res.data.companyName;
......@@ -159,15 +136,14 @@ const handleChange = (event, type) => {
}
};
const submit = () => {
let { companyName: name, creditCode, licenseValidityPeriod, licensePath } = companyInfo.companyAudit;
name = companyName.value;
if (radio.value == 1) {
licenseValidityPeriod = "2099-12-31";
} else {
licenseValidityPeriod = myLicenseValidityPeriod.value;
}
resubmitCompanyApi({ name, creditCode: myCode.value, licenseValidityPeriod, licensePath: myLicensePath.value }).then(res => {
let { id, location } = companyInfo;
registerCompanyApi({
location,
name: companyName.value,
creditCode: myCode.value,
licensePath: myLicensePath.value,
id
}).then(res => {
if (res.code == 200) {
uni.showToast({
title: "提交成功",
......@@ -192,6 +168,17 @@ const submit = () => {
flex-direction: column;
height: 100%;
}
.foot-btn {
position: fixed;
display: flex;
align-items: center;
justify-content: center;
width: 622rpx;
height: 80rpx;
color: #ffffff;
background: #1f86ff;
border-radius: 12rpx;
}
.audit-message {
.title {
height: 80rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment