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}`);
This diff is collapsed.
......@@ -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