1

parent 4a87c057
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"files.eol": "\n", "files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib", "typescript.tsdk": "node_modules/typescript/lib",
"[vue]": { "[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "octref.vetur"
}, },
"[typescript]": { "[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
......
...@@ -13,6 +13,8 @@ export const saveBasicInfoApi = params => instance.post("/b/user/save", params); ...@@ -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 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); export const resubmitCompanyApi = params => instance.post("/company/register/resubmit", params);
...@@ -26,11 +28,8 @@ export const getInterviewListApi = params => instance.post("/job/getInterviewLis ...@@ -26,11 +28,8 @@ export const getInterviewListApi = params => instance.post("/job/getInterviewLis
// 获取公司信息及审核信息 // 获取公司信息及审核信息
export const getCompanyInfoApi = params => instance.post("/b/company/info", params); export const getCompanyInfoApi = params => instance.post("/b/company/info", params);
// 保存企业信息 // 更新企业信息
export const saveCompanyInfoApi = params => instance.post("/company/save", params); export const saveCompanyInfoApi = params => instance.post("/b/company/update", params);
//企业申诉
export const companyAppealApi = params => instance.post("/company/appeal", params);
//添加反馈信息 //添加反馈信息
export const feedbackAdd = params => instance.post("/feedback/add/business", params); export const feedbackAdd = params => instance.post("/feedback/add/business", params);
...@@ -46,6 +45,8 @@ export const ocrLicense = params => instance.postForm("/ocr/license", 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 companyCheck = params => instance.post("/b/company/check", params);
//获取用户审核或申诉信息 //获取用户审核或申诉信息
export const companyReviewInfo = params => instance.post("/b/company/review/info", params); export const companyReviewInfo = params => instance.post("/b/company/review/info", params);
//更新审核申诉
export const companyReviewUpdate = params => instance.post("/b/company/review/update", params);
//根据id获取反馈信息 //根据id获取反馈信息
export const feedbackById = params => instance.post(`/feedback/${params}`); export const feedbackById = params => instance.post(`/feedback/${params}`);
This diff is collapsed.
...@@ -4,16 +4,19 @@ ...@@ -4,16 +4,19 @@
<div class="title1">填写企业信息</div> <div class="title1">填写企业信息</div>
<div class="form"> <div class="form">
<formItem title="企业(单位)名称"> <formItem title="企业(单位)名称">
<input type="text" v-model="pinias.formData.companyName" placeholder="请填写单位名称" /> <input :disabled="true" type="text" v-model="enterpriseInformation.name" placeholder="请填写单位名称" />
</formItem> </formItem>
<formItem title="单位联系人"> <formItem title="信用代码">
<input type="text" v-model="pinias.formData.contactPerson" placeholder="请填写联系人" /> <input :disabled="true" type="text" v-model="enterpriseInformation.creditCode" placeholder="请填信用代码" />
</formItem> </formItem>
<formItem title="联系电话"> <formItem title="联系地址">
<input type="text" v-model="pinias.formData.contactPhone" placeholder="请填联系电话" /> <textarea
</formItem> auto-height
<formItem title="企业(单位)简介"> :disabled="true"
<textarea type="text" v-model="pinias.formData.companyIntro" placeholder="请输入简介" /> type="text"
v-model="enterpriseInformation.location"
placeholder="请填联系地址"
/>
</formItem> </formItem>
</div> </div>
<wd-tabbar <wd-tabbar
...@@ -31,23 +34,19 @@ ...@@ -31,23 +34,19 @@
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
import formItem from "./formItem.vue"; import formItem from "./formItem.vue";
import { getCompanyInfoApi } from "@/api/user";
import { useStore } from "./store"; import { useStore } from "./store";
const pinias = useStore(); const pinias = useStore();
const enterpriseInformation = ref({});
onLoad(options => { onLoad(options => {
pinias.setFormDataKey("articleId", options.articleId); getCompanyInfoApi().then(res => {
enterpriseInformation.value = res.data;
});
}); });
const next = () => { const next = () => {
const { companyName, contactPerson, contactPhone, companyIntro } = pinias.formData;
if (companyName && contactPerson && contactPhone && companyIntro) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/signUp/addPost" url: "/pages/signUp/addPost"
}); });
} else {
uni.showToast({
title: "请填写完整信息",
icon: "none"
});
}
}; };
</script> </script>
......
<template> <template>
<div class="page"> <div class="page">
<NavBar :showIcon="true" :showTitle="true" title="企业申诉"></NavBar> <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 class="appealing-user-name">
<view>申述人姓名</view> <view>申述人姓名</view>
<input type="text" v-model="params.realName" placeholder="请输入你的真实姓名" /> <input type="text" v-model="params.name" placeholder="请输入你的真实姓名" />
</view> </view>
<view class="appealing-content"> <view class="appealing-content">
<view>申诉内容</view> <view>申诉内容</view>
...@@ -21,7 +21,11 @@ ...@@ -21,7 +21,11 @@
<view>点击上传营业执照</view> <view>点击上传营业执照</view>
</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)" /> <image v-else src="@/static/image/businessLicense/appealingIdcard.png" @tap="chooseImage(2)" />
<view>点击上传法人身份证</view> <view>点击上传法人身份证</view>
</view> </view>
...@@ -30,8 +34,8 @@ ...@@ -30,8 +34,8 @@
<view class="t1"> (注:图片大小不超过10M) </view> <view class="t1"> (注:图片大小不超过10M) </view>
</view> </view>
<wd-tabbar <wd-tabbar
@tap="next"
v-if="status == 2" v-if="status == 2"
@tap="next"
custom-style="display: flex;justify-content: center !important;" custom-style="display: flex;justify-content: center !important;"
fixed fixed
placeholder placeholder
...@@ -46,20 +50,24 @@ ...@@ -46,20 +50,24 @@
import { ref, reactive } from "vue"; import { ref, reactive } from "vue";
import { uploadFiles } from "@/utils/fileUpload"; import { uploadFiles } from "@/utils/fileUpload";
import evn from "@/utils/config"; import evn from "@/utils/config";
import { companyAppealApi, appealInfo } from "@/api/user"; import { companyAppealApi, appealInfo, companyReviewInfo } from "@/api/user";
import _ from "lodash"; import _ from "lodash";
const name = ref(""); const name = ref("");
const params = reactive({ const params = reactive({
realName: "", name: "",
companyName: "",
licensePath: "", licensePath: "",
idCardPath: "", citizenFrontPath: "",
content: "", content: ""
companyId: 1
}); });
let status = ref(2); let status = ref(2);
onLoad(data => { onLoad(data => {
name.value = data.name; name.value = data.name;
params.companyId = data.id; params.companyName = data.name;
if (data.companyCreditCode) {
params.creditCode = data.companyCreditCode;
}
// params.companyId = data.id;
appealInfoFn(); appealInfoFn();
}); });
/* 选择图片 */ /* 选择图片 */
...@@ -73,21 +81,23 @@ const chooseImage = type => { ...@@ -73,21 +81,23 @@ const chooseImage = type => {
params.licensePath = res[0].key; params.licensePath = res[0].key;
} else { } else {
// 上传法人身份证 // 上传法人身份证
params.idCardPath = res[0].key; params.citizenFrontPath = res[0].key;
} }
} }
}); });
}; };
const appealInfoFn = () => { const appealInfoFn = () => {
appealInfo().then(res => { companyReviewInfo().then(res => {
if (res.data) { if (res.data) {
params.companyId = res.data.companyId; params.companyId = res.data.companyId;
name.value = res.data.companyName; name.value = res.data.companyName;
params.realName = res.data.realName; params.name = res.data.name;
params.content = res.data.content; params.content = res.data.content;
params.companyName = res.data.companyName;
params.licensePath = res.data.licensePath; 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; status.value = res.data.status;
} }
}); });
...@@ -95,6 +105,8 @@ const appealInfoFn = () => { ...@@ -95,6 +105,8 @@ const appealInfoFn = () => {
const submit = () => { const submit = () => {
let flag = true; let flag = true;
console.log("params", params);
_.mapValues(params, value => { _.mapValues(params, value => {
flag = !!value && flag; flag = !!value && flag;
return value; return value;
......
...@@ -47,14 +47,10 @@ ...@@ -47,14 +47,10 @@
</div> </div>
</div> </div>
</view> </view>
<!-- <view class="name" v-if="step === 1"> <view class="name" v-if="step === 2">
<view class="t1">企业信息</view> <view class="t1">账户申述</view>
<input type="text" v-model="pinias.formData.name" placeholder="请输入企业名称" /> <textarea v-model="value" placeholder="请填写申述理由" />
</view> --> </view>
<!-- <view class="name" v-if="step === 2">
<view class="t1">信用代码</view>
<input type="text" v-model="pinias.formData.creditCode" placeholder="请输入信用代码" />
</view> -->
<view class="image-upload" v-if="step === 3"> <view class="image-upload" v-if="step === 3">
<view class="t1">营业执照照片</view> <view class="t1">营业执照照片</view>
<view class="t2">注:执照信息清晰可见,照片内容真实有效,不做任何修改,大小不超过10M</view> <view class="t2">注:执照信息清晰可见,照片内容真实有效,不做任何修改,大小不超过10M</view>
...@@ -63,7 +59,8 @@ ...@@ -63,7 +59,8 @@
</view> </view>
</view> </view>
<view class="btn-wrap flex-center"> <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"> <template v-if="step === 3 && !!pinias.formData.licensePath">
<button class="reupload" @tap="showPopout = true">重新上传</button> <button class="reupload" @tap="showPopout = true">重新上传</button>
<button class="next" @tap="nextStep">下一步</button> <button class="next" @tap="nextStep">下一步</button>
...@@ -107,15 +104,14 @@ const params = reactive({ ...@@ -107,15 +104,14 @@ const params = reactive({
phone: "", phone: "",
position: "" position: ""
}); });
onLoad(() => { onLoad(({ steps }) => {
console.log(uni); step.value = steps * 1;
}); });
const step = ref(1); let step = ref(1);
const name = ref(""); const name = ref("");
const showPopout = ref(false); const showPopout = ref(false);
onShow(() => { onShow(() => {
step.value = 1;
getLoginUserApiFn(); getLoginUserApiFn();
}); });
function ocrLicenseFn(uri) { function ocrLicenseFn(uri) {
...@@ -135,10 +131,12 @@ function getLoginUserApiFn() { ...@@ -135,10 +131,12 @@ function getLoginUserApiFn() {
params.name = name; params.name = name;
params.phone = phone; params.phone = phone;
params.position = position; params.position = position;
if (step.value !== 2) {
if (name) { if (name) {
step.value = 3; step.value = 3;
} }
} }
}
}); });
} }
/** /**
...@@ -291,6 +289,25 @@ const chooseImage = sourceType => { ...@@ -291,6 +289,25 @@ const chooseImage = sourceType => {
margin-top: 16rpx; margin-top: 16rpx;
border-bottom: 2rpx solid #f3f4f8; 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 { .image-upload {
.t2 { .t2 {
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<image src="@/static/image/icon/delete2.png" @tap="show = false" /> <image src="@/static/image/icon/delete2.png" @tap="show = false" />
<view class="title">企业已存在</view> <view class="title">企业已存在</view>
<view class="info"> <view class="info">
您在注册的<text>{{ name }}</text>已在乐业观山湖认证,请核对企业名称是否正确 您在注册的<text>{{ companyName }}</text>已在乐业观山湖认证,请核对企业名称是否正确
</view> </view>
<view class="btn flex-between" @tap="navigateTo('/pages/user/businessLicense/fillIn')"> <view class="btn flex-between" @tap="navigateTo('/pages/user/businessLicense/fillIn')">
<view class="text"> <view class="text">
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
</view> </view>
<view <view
class="btn flex-between" 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="text">
<view class="t1">申述资质被冒用</view> <view class="t1">申述资质被冒用</view>
...@@ -125,7 +125,8 @@ const pinias = useDefineStore(); ...@@ -125,7 +125,8 @@ const pinias = useDefineStore();
const show = ref(false); const show = ref(false);
// console.log(pinias.formData); // console.log(pinias.formData);
const id = ref(""); const id = ref("");
const name = ref(""); const companyName = ref("");
const companyCreditCode = ref("");
const radio = ref(1); const radio = ref(1);
const navigateTo = url => { const navigateTo = url => {
uni.navigateTo({ uni.navigateTo({
...@@ -163,12 +164,12 @@ const submit = () => { ...@@ -163,12 +164,12 @@ const submit = () => {
}); });
} else { } else {
show.value = true; show.value = true;
id.value = company.data.id; // id.value = company.data.id;
name.value = company.data.name; companyCreditCode.value = creditCode
companyName.value = name;
} }
} }
}); });
return;
}; };
</script> </script>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="popup-wrapper"> <view class="popup-wrapper">
<view class="block" @click.stop=""> <view class="block" @click.stop="">
<view class="sumbit-error"> <view class="sumbit-error">
<view class="title">企业已存在</view> <view class="title">企业信息已失效</view>
<view class="info"> <view class="info">
您在注册的<text>{{ name }}</text>已在乐业观山湖认证,请核对企业名称是否正确 您在注册的<text>{{ name }}</text>已在乐业观山湖认证,请核对企业名称是否正确
</view> </view>
...@@ -26,6 +26,20 @@ ...@@ -26,6 +26,20 @@
</view> </view>
</view> </view>
</wd-overlay> </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"> <div class="user-container">
<view class="bg"></view> <view class="bg"></view>
<!-- 用户信息 --> <!-- 用户信息 -->
...@@ -37,7 +51,7 @@ ...@@ -37,7 +51,7 @@
<img v-else src="@/static/image/user/default-avatar.png" alt="" /> <img v-else src="@/static/image/user/default-avatar.png" alt="" />
</view> </view>
<view class="name"> <view class="name">
{{ userInfo.realName || "无" }} {{ userInfo.name || "无" }}
<img src="@/static/image/icon/edit.png" @click="navigateTo('/pages/user/editUserInfo/index')" alt="" /> <img src="@/static/image/icon/edit.png" @click="navigateTo('/pages/user/editUserInfo/index')" alt="" />
</view> </view>
<view class="education">{{ userInfo.position || "无" }}</view> <view class="education">{{ userInfo.position || "无" }}</view>
...@@ -67,10 +81,12 @@ import { getEnumText } from "@/utils/utils"; ...@@ -67,10 +81,12 @@ import { getEnumText } from "@/utils/utils";
import { ref, reactive } from "vue"; import { ref, reactive } from "vue";
import evn from "@/utils/config.js"; import evn from "@/utils/config.js";
const show = ref(false); const show = ref(false);
const displayExpired = ref(false);
let name = ref(""); let name = ref("");
let id = ref(""); let id = ref("");
import { removeToken } from "@/utils/token"; import { removeToken } from "@/utils/token";
const navigateTo = (url, fn) => { const navigateTo = (url, fn) => {
show.value = false;
if (fn) { if (fn) {
fn(); fn();
} }
...@@ -131,12 +147,13 @@ const appealInfoFn = () => { ...@@ -131,12 +147,13 @@ const appealInfoFn = () => {
}; };
const companyReviewInfoFn = () => { const companyReviewInfoFn = () => {
companyReviewInfo().then(res => { companyReviewInfo().then(res => {
if (res.data.status == 2) { const { reviewType, status } = res.data;
navList[0].url = "/pages/user/myCompany/index?status=3"; if (reviewType === 1) {
navList[0].subText = "审核不通过"; navList[0].url = `/pages/user/myCompany/index?status=${status === 0 ? 2 : 3}`;
} else if (res.data.status == 0) { navList[0].subText = status === 0 ? "审核中" : "审核不通过";
navList[0].subText = res.data.companyName; } else if (reviewType !== 1) {
navList[0].url = "/pages/user/myCompany/index"; navList[0].url = `/pages/user/businessLicense/appeal`;
navList[0].subText = status === 0 ? "申诉中" : "申诉不通过";
} }
}); });
}; };
...@@ -151,56 +168,42 @@ const getUserInfo = async () => { ...@@ -151,56 +168,42 @@ const getUserInfo = async () => {
} }
const { status } = userRes.data; const { status } = userRes.data;
switch (status) { switch (status) {
case 0:
uni.navigateTo({
url: `/pages/user/businessLicense/fillIn`
});
uni.hideTabBar();
break;
case 1: case 1:
navList[0].subText = userRes.data.companyName; 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; break;
case 2: case 2:
navList[0].subText = "审核中"; navList[0].subText = "审核中";
navList[0].url = "/pages/user/myCompany/index?status=2"; navList[0].url = "/pages/user/myCompany/index?status=2";
companyReviewInfoFn(); companyReviewInfoFn();
uni.hideTabBar();
break; break;
case 3: case 3:
navList[0].subText = "申诉中"; navList[0].subText = "申诉中";
navList[0].url = "/pages/user/businessLicense/appeal"; navList[0].url = "/pages/user/businessLicense/appeal";
companyReviewInfoFn(); companyReviewInfoFn();
uni.hideTabBar();
break; break;
case 4: case 4:
navList[0].subText = "企业信息失效"; navList[0].subText = "企业信息失效";
uni.hideTabBar();
show.value = true; show.value = true;
break; break;
case 5: case 5:
// 账号长时间未登录 弹窗申诉 // 账号长时间未登录 弹窗申诉
show.value = true; uni.hideTabBar();
displayExpired.value = true;
break; break;
default: default:
break; 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(() => { onShow(() => {
getUserInfo(); getUserInfo();
...@@ -271,6 +274,64 @@ onShow(() => { ...@@ -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 { .nav-bar {
.text { .text {
margin: 0 auto; margin: 0 auto;
......
...@@ -7,16 +7,30 @@ ...@@ -7,16 +7,30 @@
<img v-else src="@/static/image/temp/defaultCompany.png" alt="" @click="chooseImage" /> <img v-else src="@/static/image/temp/defaultCompany.png" alt="" @click="chooseImage" />
<div class="name">{{ companyInfo.companyName }}</div> <div class="name">{{ companyInfo.companyName }}</div>
<formItem style="margin-top: 80rpx" title="营业执照" arrow :border="false" @click="jupmLicenseInfo"> <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> </formItem>
</div> </div>
<div class="form-wrap"> <div class="form-wrap">
<!-- <formItem title="企业名称"> <formItem title="企业名称">
<input type="text" v-model="params.companyName" placeholder="请输入企业名称" /> <input
</formItem> --> type="text"
:disabled="[1].includes(companyInfo.status)"
v-model="params.companyName"
placeholder="请输入企业名称"
/>
</formItem>
<formItem title="行业分类" v-if="[1].includes(pageStatus)"> <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>
<formItem title="信用代码"> <formItem title="信用代码">
<p style="color: #77818f">{{ companyInfo.creditCode }}</p> <p style="color: #77818f">{{ companyInfo.creditCode }}</p>
...@@ -25,7 +39,7 @@ ...@@ -25,7 +39,7 @@
<wd-col-picker <wd-col-picker
v-model="cityValue" v-model="cityValue"
:columns="cityOpstion" :columns="cityOpstion"
:disabled="![1, 3].includes(pageStatus)" :disabled="![1].includes(pageStatus)"
value-key="code" value-key="code"
label-key="name" label-key="name"
:column-change="columnChangeCity" :column-change="columnChangeCity"
...@@ -39,12 +53,12 @@ ...@@ -39,12 +53,12 @@
</formItem> </formItem>
<div class="textarea-wrap" v-if="[1].includes(pageStatus)"> <div class="textarea-wrap" v-if="[1].includes(pageStatus)">
<p class="label">公司介绍</p> <p class="label">公司介绍</p>
<textarea maxlength="500" placeholder="请输入公司介绍" v-model="params.companyIntro" /> <textarea maxlength="500" placeholder="请输入公司介绍" v-model="params.introduction" />
</div> </div>
</div> </div>
</div> </div>
<wd-tabbar <wd-tabbar
v-if="[1, 3].includes(pageStatus)" v-if="[1].includes(pageStatus)"
@click="submit" @click="submit"
custom-style="display: flex;justify-content: center !important;z-index:1;" custom-style="display: flex;justify-content: center !important;z-index:1;"
fixed fixed
...@@ -60,7 +74,7 @@ ...@@ -60,7 +74,7 @@
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
import formItem from "./formItem.vue"; import formItem from "./formItem.vue";
import { getCompanyInfoApi, saveCompanyInfoApi, companyReviewInfo } from "@/api/user"; import { getCompanyInfoApi, saveCompanyInfoApi, companyReviewInfo } from "@/api/user";
import { getTreeListApi } from "@/api/common"; import { getTreeListApi, getDictDataApi } from "@/api/common";
import { uploadFiles } from "@/utils/fileUpload"; import { uploadFiles } from "@/utils/fileUpload";
import { getEnumText } from "@/utils/utils"; import { getEnumText } from "@/utils/utils";
import evn from "@/utils/config"; import evn from "@/utils/config";
...@@ -70,6 +84,7 @@ const params = reactive({ ...@@ -70,6 +84,7 @@ const params = reactive({
logoPath: "", logoPath: "",
companyName: "", companyName: "",
provinceCode: "", provinceCode: "",
industry: "",
provinceName: "", provinceName: "",
cityCode: "", cityCode: "",
cityName: "", cityName: "",
...@@ -77,7 +92,7 @@ const params = reactive({ ...@@ -77,7 +92,7 @@ const params = reactive({
districtName: "", districtName: "",
creditCode: "", creditCode: "",
location: "", location: "",
companyIntro: "" introduction: ""
}); });
const pageStatus = ref(1); const pageStatus = ref(1);
/* 调整到审核信息 */ /* 调整到审核信息 */
...@@ -107,11 +122,14 @@ function getCompanyInfoApiFn() { ...@@ -107,11 +122,14 @@ function getCompanyInfoApiFn() {
Object.keys(params).forEach(key => { Object.keys(params).forEach(key => {
params[key] = res.data[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("-"); 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() { function companyReviewInfoFn() {
...@@ -120,13 +138,23 @@ function companyReviewInfoFn() { ...@@ -120,13 +138,23 @@ function companyReviewInfoFn() {
Object.keys(params).forEach(key => { Object.keys(params).forEach(key => {
params[key] = res.data[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); auditStatus.value = await getEnumText("EnumAuditStatus", res.data.status);
}); });
} }
function handleConfirm() {}
/* 获取省市区 */ /* 获取省市区 */
const cityOpstion = ref([]); const cityOpstion = ref([]);
const columns = ref([]);
const cityValue = ref([]); const cityValue = ref([]);
const cityText = ref(""); const cityText = ref("");
...@@ -134,6 +162,9 @@ let citySelectedItems = []; ...@@ -134,6 +162,9 @@ let citySelectedItems = [];
getTreeListApi().then(res => { getTreeListApi().then(res => {
cityOpstion.value.push(res.data); cityOpstion.value.push(res.data);
}); });
getDictDataApi(["EnumIndustryCategory"]).then(res => {
columns.value = res.data.EnumIndustryCategory;
});
const columnChangeCity = ({ selectedItem, resolve, finish }) => { const columnChangeCity = ({ selectedItem, resolve, finish }) => {
if (selectedItem.children) { if (selectedItem.children) {
resolve(selectedItem.children); resolve(selectedItem.children);
...@@ -145,13 +176,12 @@ const handleConfirmCity = ({ selectedItems }) => { ...@@ -145,13 +176,12 @@ const handleConfirmCity = ({ selectedItems }) => {
cityText.value = selectedItems.map(v => v.name).join("-"); cityText.value = selectedItems.map(v => v.name).join("-");
citySelectedItems = selectedItems; citySelectedItems = selectedItems;
const [province, city, district] = selectedItems; const [province, city, district] = selectedItems;
// params.provinceCode = province.code; params.provinceCode = province.code;
// params.provinceName = province.name; params.provinceName = province.name;
// params.cityCode = city.code; params.cityCode = city.code;
// params.cityName = city.name; params.cityName = city.name;
// params.districtCode = district.code; params.districtCode = district.code;
// params.districtName = district.name; params.districtName = district.name;
params.location = selectedItems.map(v => v.name).join("-"); params.location = selectedItems.map(v => v.name).join("-");
}; };
/* 选择图片 */ /* 选择图片 */
...@@ -167,20 +197,23 @@ const chooseImage = sourceType => { ...@@ -167,20 +197,23 @@ const chooseImage = sourceType => {
}; };
/* 提交 */ /* 提交 */
const submit = () => { const submit = () => {
console.log(params); console.log("params", params);
if ( if (
validateForm(params, [ validateForm(params, [
"address", "location",
"cityCode", "cityCode",
"cityName", "cityName",
"companyIntro", "companyName",
"creditCode",
"introduction",
"districtCode", "districtCode",
"districtName", "districtName",
"id", "id",
"logoPath", "logoPath",
"nameAbbreviation",
"provinceCode", "provinceCode",
"provinceName" "provinceName",
"industry"
]) ])
) { ) {
saveCompanyInfoApi(params).then(res => { saveCompanyInfoApi(params).then(res => {
...@@ -211,6 +244,8 @@ const validateForm = (formData, requiredFields) => { ...@@ -211,6 +244,8 @@ const validateForm = (formData, requiredFields) => {
const value = formData[field]; const value = formData[field];
// 排除 0 和 "0" 的值,不作为空值校验 // 排除 0 和 "0" 的值,不作为空值校验
if (value === undefined || value === null || value === "") { if (value === undefined || value === null || value === "") {
console.log("field", field);
uni.showToast({ uni.showToast({
title: `请填写完整表单`, title: `请填写完整表单`,
icon: "none", icon: "none",
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
<div class="page"> <div class="page">
<div class="audit-message"> <div class="audit-message">
<p class="title" :style="{ background: status == 2 ? '#ff5113' : '#1F86FF' }"> <p class="title" :style="{ background: status == 2 ? '#ff5113' : '#1F86FF' }">
{{ status == 2 ? "审核拒绝" : status == 0 ? "待审核" : "通过审核" }} {{ status == 2 ? "审核拒绝" : status == 0 ? "待审核" : status == 1 ? "通过审核" : "" }}
</p> </p>
<div class="message" :style="{ background: '#FFEDE7' }" v-if="status == 2"> <div class="message" :style="{ background: '#FFEDE7' }" v-if="status == 2">
<p>拒绝原因</p> <p>拒绝原因</p>
{{ companyInfo.companyAudit.auditMessage }} {{ companyInfo.message }}
</div> </div>
</div> </div>
<view class="image-wrap"> <view class="image-wrap">
...@@ -46,41 +46,24 @@ ...@@ -46,41 +46,24 @@
</template></wd-input </template></wd-input
> >
</view> </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> <wd-tabbar
<view class="item"> v-if="[2].includes(status)"
<view class="label"> 日期 </view> @click="submit"
<wd-calendar custom-style="display: flex;justify-content: center !important;z-index:1;"
v-model="myLicenseValidityPeriod" fixed
:disabled="radio == 1 && status != 2" placeholder
:min-date="minDate" safeAreaInsetBottom
:max-date="maxDate"
use-default-slot
> >
<view :class="`content ${radio == 1 ? 'disabled' : ''}`"> <view class="foot-btn">提交</view>
{{ (myLicenseValidityPeriod && $formatTimestamp(myLicenseValidityPeriod, "YYYY-MM-DD")) || "请选择" }} </wd-tabbar>
</view>
</wd-calendar>
</view> -->
</view>
<view class="btn-wrap" v-if="status == 2">
<button class="bottom-btn" @tap="submit">提交</button>
</view>
</div> </div>
</template> </template>
<script setup> <script setup>
import evn from "@/utils/config"; import evn from "@/utils/config";
import { uploadFiles } from "@/utils/fileUpload"; 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 { ref } from "vue";
import dayjs from "dayjs"; import dayjs from "dayjs";
const radio = ref(1); const radio = ref(1);
...@@ -119,18 +102,12 @@ function getCompanyInfoApiFn() { ...@@ -119,18 +102,12 @@ function getCompanyInfoApiFn() {
companyName.value = res.data.companyName; companyName.value = res.data.companyName;
myCode.value = res.data.creditCode; myCode.value = res.data.creditCode;
myLicenseValidityPeriod.value = res.data.licenseValidityPeriod; myLicenseValidityPeriod.value = res.data.licenseValidityPeriod;
// if (res.data.licenseValidityPeriod == 4102329600000) {
// radio.value = 1;
// } else {
// radio.value = 2;
// }
}); });
} }
function companyReviewInfoFn() { function companyReviewInfoFn() {
companyReviewInfo().then(async res => { companyReviewInfo().then(res => {
companyInfo.value = res.data; companyInfo = res.data;
status.value = res.data.status; status.value = res.data.status;
myLicensePath.value = res.data.licensePath; myLicensePath.value = res.data.licensePath;
companyName.value = res.data.companyName; companyName.value = res.data.companyName;
...@@ -159,15 +136,14 @@ const handleChange = (event, type) => { ...@@ -159,15 +136,14 @@ const handleChange = (event, type) => {
} }
}; };
const submit = () => { const submit = () => {
let { companyName: name, creditCode, licenseValidityPeriod, licensePath } = companyInfo.companyAudit; let { id, location } = companyInfo;
name = companyName.value; registerCompanyApi({
if (radio.value == 1) { location,
licenseValidityPeriod = "2099-12-31"; name: companyName.value,
} else { creditCode: myCode.value,
licenseValidityPeriod = myLicenseValidityPeriod.value; licensePath: myLicensePath.value,
} id
}).then(res => {
resubmitCompanyApi({ name, creditCode: myCode.value, licenseValidityPeriod, licensePath: myLicensePath.value }).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: "提交成功", title: "提交成功",
...@@ -192,6 +168,17 @@ const submit = () => { ...@@ -192,6 +168,17 @@ const submit = () => {
flex-direction: column; flex-direction: column;
height: 100%; 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 { .audit-message {
.title { .title {
height: 80rpx; 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