|
|
@@ -5,34 +5,10 @@
|
|
|
<el-button class="back-btn" @click="handleBack"> 返回 </el-button>
|
|
|
<div class="progress-container">
|
|
|
<el-steps :active="currentStep" style="max-width: 1500px" align-center>
|
|
|
- <el-step>
|
|
|
+ <el-step v-for="(item, index) in entryList" :key="index">
|
|
|
<template #title>
|
|
|
<div class="step-title-wrapper">
|
|
|
- <span class="step-title">个人实名</span>
|
|
|
- <span class="step-time">约3分钟</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-step>
|
|
|
- <el-step>
|
|
|
- <template #title>
|
|
|
- <div class="step-title-wrapper">
|
|
|
- <span class="step-title">填写信息</span>
|
|
|
- <span class="step-time">约30分钟</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-step>
|
|
|
- <el-step>
|
|
|
- <template #title>
|
|
|
- <div class="step-title-wrapper">
|
|
|
- <span class="step-title">等待审核</span>
|
|
|
- <span class="step-time">约1-3个工作日</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-step>
|
|
|
- <el-step>
|
|
|
- <template #title>
|
|
|
- <div class="step-title-wrapper">
|
|
|
- <span class="step-title">入驻成功</span>
|
|
|
+ <span class="step-title">{{ item.title }}</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-step>
|
|
|
@@ -70,94 +46,93 @@
|
|
|
<el-input v-model="step2Form.storeName" placeholder="请输入店铺名称" />
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="容纳人数" prop="capacity">
|
|
|
- <el-input-number v-model="step2Form.capacity" :min="1" :max="9999" />
|
|
|
+ <el-form-item label="容纳人数" prop="storeCapacity">
|
|
|
+ <el-input-number v-model="step2Form.storeCapacity" :min="1" :max="9999" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="门店面积" prop="storeArea">
|
|
|
<el-radio-group v-model="step2Form.storeArea">
|
|
|
- <el-radio label="小于20平米"> 小于20平米 </el-radio>
|
|
|
- <el-radio label="20-50平米"> 20-50平米 </el-radio>
|
|
|
- <el-radio label="50-100平米"> 50-100平米 </el-radio>
|
|
|
- <el-radio label="100-300平米"> 100-300平米 </el-radio>
|
|
|
- <el-radio label="300-500平米"> 300-500平米 </el-radio>
|
|
|
- <el-radio label="500-1000平米"> 500-1000平米 </el-radio>
|
|
|
- <el-radio label="大于1000平米"> 大于1000平米 </el-radio>
|
|
|
+ <el-radio label="小于20平米" value="1"> 小于20平米 </el-radio>
|
|
|
+ <el-radio label="20-50平米" value="2"> 20-50平米 </el-radio>
|
|
|
+ <el-radio label="50-100平米" value="3"> 50-100平米 </el-radio>
|
|
|
+ <el-radio label="100-300平米" value="4"> 100-300平米 </el-radio>
|
|
|
+ <el-radio label="500-1000平米" value="5"> 500-1000平米 </el-radio>
|
|
|
+ <el-radio label="大于1000平米" value="6"> 大于1000平米 </el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="所在地区" prop="location">
|
|
|
- <el-select v-model="step2Form.province" placeholder="请选择" style="width: 150px; margin-right: 10px">
|
|
|
- <el-option label="省份" value="province" />
|
|
|
- </el-select>
|
|
|
- <el-select v-model="step2Form.city" placeholder="请选择" style="width: 150px; margin-right: 10px">
|
|
|
- <el-option label="城市" value="city" />
|
|
|
- </el-select>
|
|
|
- <el-select v-model="step2Form.district" placeholder="请选择" style="width: 150px">
|
|
|
- <el-option label="区县" value="district" />
|
|
|
- </el-select>
|
|
|
+ <el-form-item label="所在地区" prop="region">
|
|
|
+ <el-cascader :props="areaProps" v-model="step2Form.region" style="width: 100%" />
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="详细地址" prop="detailedAddress">
|
|
|
- <el-input v-model="step2Form.detailedAddress" type="textarea" :rows="3" placeholder="请输入" />
|
|
|
+ <el-form-item label="详细地址" prop="storeAddress">
|
|
|
+ <el-input v-model="step2Form.storeAddress" type="textarea" :rows="3" placeholder="请输入" />
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="门店简介" prop="storeIntro">
|
|
|
- <el-input v-model="step2Form.storeIntro" type="textarea" :rows="3" placeholder="请输入" />
|
|
|
+ <el-form-item label="门店简介" prop="storeBlurb">
|
|
|
+ <el-input v-model="step2Form.storeBlurb" type="textarea" :rows="3" placeholder="请输入" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="经营板块" prop="businessSector">
|
|
|
- <el-radio-group v-model="step2Form.businessSector">
|
|
|
- <el-radio label="美食"> 美食 </el-radio>
|
|
|
- <el-radio label="酒店/民宿"> 酒店/民宿 </el-radio>
|
|
|
- <el-radio label="KTV"> KTV </el-radio>
|
|
|
- <el-radio label="洗浴汗蒸"> 洗浴汗蒸 </el-radio>
|
|
|
- <el-radio label="按摩足疗"> 按摩足疗 </el-radio>
|
|
|
- <el-radio label="丽人美发"> 丽人美发 </el-radio>
|
|
|
- <el-radio label="运动健身"> 运动健身 </el-radio>
|
|
|
- <el-radio label="医美医疗"> 医美医疗 </el-radio>
|
|
|
+ <el-radio-group v-model="step2Form.businessSector" @change="changeBusinessSector">
|
|
|
+ <el-radio
|
|
|
+ v-for="businessSection in businessSectionList"
|
|
|
+ :value="businessSection.value"
|
|
|
+ :key="businessSection.value"
|
|
|
+ >
|
|
|
+ {{ businessSection.label }}
|
|
|
+ </el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="经营种类" prop="businessType">
|
|
|
<el-checkbox-group v-model="step2Form.businessType">
|
|
|
- <el-checkbox label="小吃快餐"> 小吃快餐 </el-checkbox>
|
|
|
- <el-checkbox label="鱼鲜海鲜"> 鱼鲜海鲜 </el-checkbox>
|
|
|
- <el-checkbox label="烧烤烤串"> 烧烤烤串 </el-checkbox>
|
|
|
- <el-checkbox label="自助餐"> 自助餐 </el-checkbox>
|
|
|
- <el-checkbox label="面包蛋糕甜品"> 面包蛋糕甜品 </el-checkbox>
|
|
|
- <el-checkbox label="火锅"> 火锅 </el-checkbox>
|
|
|
- <el-checkbox label="水果生鲜"> 水果生鲜 </el-checkbox>
|
|
|
- <el-checkbox label="特色菜"> 特色菜 </el-checkbox>
|
|
|
- <el-checkbox label="中餐"> 中餐 </el-checkbox>
|
|
|
- <el-checkbox label="西餐"> 西餐 </el-checkbox>
|
|
|
- <el-checkbox label="烤肉"> 烤肉 </el-checkbox>
|
|
|
- <el-checkbox label="韩式料理"> 韩式料理 </el-checkbox>
|
|
|
- <el-checkbox label="地方菜系"> 地方菜系 </el-checkbox>
|
|
|
- <el-checkbox label="日式料理"> 日式料理 </el-checkbox>
|
|
|
- <el-checkbox label="轻食"> 轻食 </el-checkbox>
|
|
|
+ <el-checkbox
|
|
|
+ v-for="businessType in businessTypeList"
|
|
|
+ :key="businessType"
|
|
|
+ :label="businessType.label"
|
|
|
+ :value="businessType.value"
|
|
|
+ />
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
|
|
|
<!-- 右列 -->
|
|
|
<div class="form-col">
|
|
|
- <el-form-item label="门店营业状态" prop="businessStatus">
|
|
|
- <el-radio-group v-model="step2Form.businessStatus">
|
|
|
+ <el-form-item label="门店营业状态" prop="businessType">
|
|
|
+ <el-radio-group v-model="step2Form.businessType">
|
|
|
<el-radio label="正常营业"> 正常营业 </el-radio>
|
|
|
<el-radio label="暂停营业"> 暂停营业 </el-radio>
|
|
|
<el-radio label="筹建中"> 筹建中 </el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="经纬度查询" prop="coordinates">
|
|
|
- <el-input v-model="step2Form.coordinates" placeholder="请输入经纬度" />
|
|
|
+ <el-form-item label="经度" prop="storePositionLongitude">
|
|
|
+ <el-input disabled v-model="step2Form.storePositionLongitude" placeholder="请填写经度" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="纬度" prop="storePositionLatitude">
|
|
|
+ <el-input disabled v-model="step2Form.storePositionLatitude" placeholder="请填写纬度" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="经纬度查询" prop="addressName">
|
|
|
+ <el-select
|
|
|
+ v-model="step2Form.addressName"
|
|
|
+ filterable
|
|
|
+ placeholder="请输入地址进行查询"
|
|
|
+ remote
|
|
|
+ reserve-keyword
|
|
|
+ :remote-method="getLonAndLat"
|
|
|
+ @change="selectAddress"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in addressList" :key="item.id" :label="item.name" :value="item.location">
|
|
|
+ <span style="float: left">{{ item.name }}</span>
|
|
|
+ <span style="float: right; font-size: 13px; color: var(--el-text-color-secondary)">{{ item.district }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="营业执照" prop="businessLicense">
|
|
|
+ <el-form-item label="营业执照" prop="businessLicenseFiles">
|
|
|
<el-upload
|
|
|
v-model:file-list="step2Form.businessLicenseFiles"
|
|
|
- action="#"
|
|
|
+ :http-request="handleHttpUpload"
|
|
|
list-type="picture-card"
|
|
|
:limit="1"
|
|
|
:on-exceed="handleExceed"
|
|
|
@@ -169,10 +144,10 @@
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="合同图片" prop="contractImages">
|
|
|
+ <el-form-item label="合同图片" prop="contractImageFiles">
|
|
|
<el-upload
|
|
|
v-model:file-list="step2Form.contractImageFiles"
|
|
|
- action="#"
|
|
|
+ :http-request="handleHttpUpload"
|
|
|
list-type="picture-card"
|
|
|
:limit="20"
|
|
|
:on-exceed="handleExceed"
|
|
|
@@ -184,10 +159,10 @@
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="食品经营许可证" prop="foodLicense">
|
|
|
+ <el-form-item label="食品经营许可证" prop="foodLicenseFiles ">
|
|
|
<el-upload
|
|
|
v-model:file-list="step2Form.foodLicenseFiles"
|
|
|
- action="#"
|
|
|
+ :http-request="handleHttpUpload"
|
|
|
list-type="picture-card"
|
|
|
:limit="1"
|
|
|
:on-exceed="handleExceed"
|
|
|
@@ -218,10 +193,40 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
-import { ref, reactive, watch } from "vue";
|
|
|
-import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from "element-plus";
|
|
|
+import { ref, reactive, watch, onMounted } from "vue";
|
|
|
+import { ElMessage, ElMessageBox, type FormInstance, type FormRules, UploadProps, UploadRequestOptions } from "element-plus";
|
|
|
import { Plus } from "@element-plus/icons-vue";
|
|
|
|
|
|
+import { verifyIdInfo, applyStore } from "@/api/modules/homeEntry.ts";
|
|
|
+import {
|
|
|
+ getBusinessSection,
|
|
|
+ getBusinessSectionTypes,
|
|
|
+ getInputPrompt,
|
|
|
+ getDistrict,
|
|
|
+ uploadImg
|
|
|
+} from "@/api/modules/newLoginApi.ts";
|
|
|
+import { add } from "lodash";
|
|
|
+
|
|
|
+const entryList = ref([
|
|
|
+ {
|
|
|
+ title: "个人实名"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "填写信息"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "等待审核"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "入驻成功"
|
|
|
+ }
|
|
|
+]);
|
|
|
+
|
|
|
+//地址集合
|
|
|
+const addressList = ref<any[]>([]);
|
|
|
+//查询地址名称
|
|
|
+const queryAddress = ref<string>("");
|
|
|
+
|
|
|
const props = defineProps({
|
|
|
currentStep: {
|
|
|
type: Number,
|
|
|
@@ -267,18 +272,21 @@ const step1Rules: FormRules = {
|
|
|
// 第二步表单
|
|
|
const step2FormRef = ref<FormInstance>();
|
|
|
const step2Form = reactive({
|
|
|
+ region: [],
|
|
|
+ addressName: "",
|
|
|
+ storePositionLongitude: "",
|
|
|
+ storePositionLatitude: "",
|
|
|
storeName: "",
|
|
|
- capacity: 1,
|
|
|
+ storeCapacity: 1,
|
|
|
storePhone: "",
|
|
|
storeArea: "小于20平米",
|
|
|
province: "",
|
|
|
city: "",
|
|
|
district: "",
|
|
|
- detailedAddress: "",
|
|
|
- storeIntro: "",
|
|
|
- businessSector: "美食",
|
|
|
- businessType: ["小吃快餐", "火锅"],
|
|
|
- businessStatus: "正常营业",
|
|
|
+ storeAddress: "",
|
|
|
+ storeBlurb: "",
|
|
|
+ businessSector: "1",
|
|
|
+ businessType: "正常营业",
|
|
|
coordinates: "",
|
|
|
businessLicenseFiles: [],
|
|
|
contractImageFiles: [],
|
|
|
@@ -308,14 +316,113 @@ const handleBack = () => {
|
|
|
setStep(2);
|
|
|
}
|
|
|
};
|
|
|
+// 地区选择
|
|
|
+const areaProps: any = {
|
|
|
+ lazy: true,
|
|
|
+ async lazyLoad(node, resolve) {
|
|
|
+ const { level } = node;
|
|
|
+ try {
|
|
|
+ let param = { adCode: node.data.adCode ? node.data.adCode : "" };
|
|
|
+ // 调用后台接口获取数据
|
|
|
+ const response: any = await getDistrict(param as any);
|
|
|
+ // 转换数据格式
|
|
|
+ const nodes = (response?.data?.districts?.[0]?.districts || []).map((item: any) => ({
|
|
|
+ value: item.adcode,
|
|
|
+ adCode: item.adcode,
|
|
|
+ label: item.name,
|
|
|
+ leaf: level >= 2 // 假设最多三级,可以根据实际需求调整
|
|
|
+ }));
|
|
|
|
|
|
+ // 返回数据
|
|
|
+ resolve(nodes);
|
|
|
+ } catch (error) {
|
|
|
+ console.error("获取区域数据失败:", error);
|
|
|
+ resolve([]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+//经营板块
|
|
|
+const businessSectionList = ref<any[]>([]);
|
|
|
+const getBusinessSectionList = async () => {
|
|
|
+ let res: any = await getBusinessSection();
|
|
|
+ let addData: any[] = [];
|
|
|
+ (res?.data || []).forEach((element: any) => {
|
|
|
+ addData.push({ value: element.dictId, label: element.dictDetail, parentId: element.parentId });
|
|
|
+ });
|
|
|
+ businessSectionList.value = addData;
|
|
|
+};
|
|
|
+const changeBusinessSector = async (val: any) => {
|
|
|
+ getBusinessTypes(val);
|
|
|
+};
|
|
|
+
|
|
|
+//经营种类
|
|
|
+const businessTypeList = ref<any[]>([]);
|
|
|
+const getBusinessTypes = async (val: any) => {
|
|
|
+ let res: any = await getBusinessSectionTypes({ parentId: val ? val : step2Form.businessSector });
|
|
|
+ let addData1: any[] = [];
|
|
|
+ (res?.data || []).forEach((element: any) => {
|
|
|
+ addData1.push({ value: element.dictId, label: element.dictDetail });
|
|
|
+ });
|
|
|
+ businessTypeList.value = addData1;
|
|
|
+};
|
|
|
+
|
|
|
+// 经纬度查询
|
|
|
+const getLonAndLat = async (keyword: string) => {
|
|
|
+ if (keyword) {
|
|
|
+ console.log("地址查询", keyword);
|
|
|
+ let param = {
|
|
|
+ addressName: keyword
|
|
|
+ };
|
|
|
+ let res: any = await getInputPrompt(param as any);
|
|
|
+ if (res.code == "200") {
|
|
|
+ addressList.value = res?.data?.tips || [];
|
|
|
+ console.log("res", res);
|
|
|
+ } else {
|
|
|
+ ElMessage.error("新增失败!");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ addressList.value = [];
|
|
|
+ }
|
|
|
+};
|
|
|
+const selectAddress = async (param: any) => {
|
|
|
+ let locationList = step2Form.addressName.split(",");
|
|
|
+ addressList.value.forEach((item: any) => {
|
|
|
+ if (item.location == step2Form.addressName) {
|
|
|
+ queryAddress.value = item.name;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ step2Form.storePositionLongitude = locationList[0];
|
|
|
+ step2Form.storePositionLatitude = locationList[1];
|
|
|
+};
|
|
|
+//文件上传
|
|
|
+const handleHttpUpload = async (options: UploadRequestOptions) => {
|
|
|
+ let formData = new FormData();
|
|
|
+ formData.append("file", options.file);
|
|
|
+ try {
|
|
|
+ const res: any = await uploadImg(formData);
|
|
|
+ console.log(res);
|
|
|
+ } catch (error) {
|
|
|
+ options.onError(error as any);
|
|
|
+ }
|
|
|
+};
|
|
|
// 下一步
|
|
|
const handleNextStep = async () => {
|
|
|
if (!step1FormRef.value) return;
|
|
|
|
|
|
- await step1FormRef.value.validate(valid => {
|
|
|
+ await step1FormRef.value.validate(async valid => {
|
|
|
if (valid) {
|
|
|
- setStep(2);
|
|
|
+ const params = {
|
|
|
+ name: step1Form.name,
|
|
|
+ idCard: step1Form.idNumber,
|
|
|
+ appType: 1
|
|
|
+ };
|
|
|
+ const res = await verifyIdInfo(params);
|
|
|
+ if (res.code == "200") {
|
|
|
+ ElMessage.success(res.msg);
|
|
|
+ setStep(2);
|
|
|
+ getBusinessSectionList();
|
|
|
+ getBusinessTypes();
|
|
|
+ }
|
|
|
} else {
|
|
|
ElMessage.error("请完善表单信息");
|
|
|
}
|
|
|
@@ -329,7 +436,9 @@ const handlePrevStep = () => {
|
|
|
|
|
|
// 提交
|
|
|
const handleSubmit = async () => {
|
|
|
- setStep(3);
|
|
|
+ console.log(step2Form);
|
|
|
+ return;
|
|
|
+ let res = await applyStore(param);
|
|
|
return;
|
|
|
if (!step2FormRef.value) return;
|
|
|
|
|
|
@@ -373,7 +482,6 @@ const handleExceed = () => {
|
|
|
border-color: #dcdfe6;
|
|
|
}
|
|
|
.progress-container {
|
|
|
- padding: 0 100px;
|
|
|
margin-bottom: 40px;
|
|
|
:deep(.el-step__head.is-process .el-step__icon) {
|
|
|
color: #909399;
|
|
|
@@ -399,15 +507,6 @@ const handleExceed = () => {
|
|
|
font-weight: 600;
|
|
|
color: #6c8ff8;
|
|
|
}
|
|
|
- .step-time {
|
|
|
- display: inline-block;
|
|
|
- padding: 4px 12px;
|
|
|
- font-size: 12px;
|
|
|
- color: #6c8ff8;
|
|
|
- white-space: nowrap;
|
|
|
- background: #eef1ff;
|
|
|
- border-radius: 12px;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -416,7 +515,7 @@ const handleExceed = () => {
|
|
|
max-width: 800px;
|
|
|
margin: 0 auto;
|
|
|
&.step2-form {
|
|
|
- max-width: 1400px;
|
|
|
+ max-width: 100%;
|
|
|
.form-row {
|
|
|
display: flex;
|
|
|
gap: 40px;
|