|
@@ -106,15 +106,15 @@
|
|
|
<el-radio label="筹建中"> 筹建中 </el-radio>
|
|
<el-radio label="筹建中"> 筹建中 </el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="经度" prop="storePositionLongitude">
|
|
|
|
|
|
|
+ <el-form-item label="经度" prop="storePositionLongitude" v-show="latShow">
|
|
|
<el-input disabled v-model="step2Form.storePositionLongitude" placeholder="请填写经度" clearable />
|
|
<el-input disabled v-model="step2Form.storePositionLongitude" placeholder="请填写经度" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="纬度" prop="storePositionLatitude">
|
|
|
|
|
|
|
+ <el-form-item label="纬度" prop="storePositionLatitude" v-show="latShow">
|
|
|
<el-input disabled v-model="step2Form.storePositionLatitude" placeholder="请填写纬度" clearable />
|
|
<el-input disabled v-model="step2Form.storePositionLatitude" placeholder="请填写纬度" clearable />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="经纬度查询">
|
|
|
|
|
|
|
+ <el-form-item label="经纬度查询" prop="address">
|
|
|
<el-select
|
|
<el-select
|
|
|
- v-model="address"
|
|
|
|
|
|
|
+ v-model="step2Form.address"
|
|
|
filterable
|
|
filterable
|
|
|
placeholder="请输入地址进行查询"
|
|
placeholder="请输入地址进行查询"
|
|
|
remote
|
|
remote
|
|
@@ -161,7 +161,7 @@
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="食品经营许可证" prop="foodLicenceImgList ">
|
|
|
|
|
|
|
+ <el-form-item label="食品经营许可证" prop="foodLicenceImgList">
|
|
|
<el-upload
|
|
<el-upload
|
|
|
v-model:file-list="step2Form.foodLicenceImgList"
|
|
v-model:file-list="step2Form.foodLicenceImgList"
|
|
|
:http-request="handleHttpUpload"
|
|
:http-request="handleHttpUpload"
|
|
@@ -189,7 +189,9 @@
|
|
|
<!-- 第三步: 等待审核-->
|
|
<!-- 第三步: 等待审核-->
|
|
|
<div v-if="currentStep === 3">
|
|
<div v-if="currentStep === 3">
|
|
|
<div class="button-container">
|
|
<div class="button-container">
|
|
|
- <el-button type="danger" size="large" class="register-btn" v-if="userInfo.status == 3"> 审核拒绝,重新入驻 </el-button>
|
|
|
|
|
|
|
+ <el-button type="danger" size="large" class="register-btn-red" @click="changeRefuse" v-if="storeApplicationStatus == 2">
|
|
|
|
|
+ 审核拒绝,重新入驻
|
|
|
|
|
+ </el-button>
|
|
|
<el-button type="primary" size="large" class="register-btn" v-else> 等待审核 </el-button>
|
|
<el-button type="primary" size="large" class="register-btn" v-else> 等待审核 </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -208,20 +210,15 @@ import {
|
|
|
} from "element-plus";
|
|
} from "element-plus";
|
|
|
import { Plus } from "@element-plus/icons-vue";
|
|
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 { verifyIdInfo, applyStore } from "@/api/modules/homeEntry";
|
|
|
|
|
+import { getBusinessSection, getBusinessSectionTypes, getInputPrompt, getDistrict, uploadImg } from "@/api/modules/newLoginApi";
|
|
|
import { localGet } from "@/utils/index";
|
|
import { localGet } from "@/utils/index";
|
|
|
const userInfo = localGet("geeker-user")?.userInfo || {};
|
|
const userInfo = localGet("geeker-user")?.userInfo || {};
|
|
|
-import { add } from "lodash";
|
|
|
|
|
|
|
+const latShow = ref(false);
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getBusinessSectionList();
|
|
getBusinessSectionList();
|
|
|
- getBusinessTypes();
|
|
|
|
|
|
|
+ getBusinessTypes(null);
|
|
|
|
|
+ callGetUserInfo();
|
|
|
});
|
|
});
|
|
|
const entryList = ref([
|
|
const entryList = ref([
|
|
|
{
|
|
{
|
|
@@ -245,7 +242,7 @@ const step2Rules: FormRules = {
|
|
|
storeIntro: [{ required: true, message: "请输入门店简介", trigger: "blur" }],
|
|
storeIntro: [{ required: true, message: "请输入门店简介", trigger: "blur" }],
|
|
|
businessSection: [{ required: true, message: "请选择经营板块", trigger: "change" }],
|
|
businessSection: [{ required: true, message: "请选择经营板块", trigger: "change" }],
|
|
|
businessTypes: [{ required: true, message: "请选择经营种类", trigger: "change" }],
|
|
businessTypes: [{ required: true, message: "请选择经营种类", trigger: "change" }],
|
|
|
- address: [{ required: true, message: "请输入经纬度", trigger: "change" }],
|
|
|
|
|
|
|
+ address: [{ required: true, message: "请输入经纬度", trigger: "blur" }],
|
|
|
businessLicenseAddress: [{ required: true, message: "请上传营业执照", trigger: "change" }],
|
|
businessLicenseAddress: [{ required: true, message: "请上传营业执照", trigger: "change" }],
|
|
|
contractImageList: [{ required: true, message: "请上传合同图片", trigger: "change" }],
|
|
contractImageList: [{ required: true, message: "请上传合同图片", trigger: "change" }],
|
|
|
foodLicenceImgList: [{ required: true, message: "请上传食品经营许可证", trigger: "change" }]
|
|
foodLicenceImgList: [{ required: true, message: "请上传食品经营许可证", trigger: "change" }]
|
|
@@ -255,27 +252,43 @@ const step2Rules: FormRules = {
|
|
|
const addressList = ref<any[]>([]);
|
|
const addressList = ref<any[]>([]);
|
|
|
//查询地址名称
|
|
//查询地址名称
|
|
|
const queryAddress = ref<string>("");
|
|
const queryAddress = ref<string>("");
|
|
|
-//地址名称
|
|
|
|
|
-const address = ref<string>("");
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
currentStep: {
|
|
currentStep: {
|
|
|
type: Number,
|
|
type: Number,
|
|
|
value: 0
|
|
value: 0
|
|
|
|
|
+ },
|
|
|
|
|
+ storeApplicationStatus: {
|
|
|
|
|
+ type: Number,
|
|
|
|
|
+ value: 0
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+const emit = defineEmits(["update:currentStep", "update:get-user-info"]);
|
|
|
|
|
|
|
|
-const emit = defineEmits(["update:currentStep"]);
|
|
|
|
|
|
|
+// 调用父组件的 getUserInfo 方法
|
|
|
|
|
+const callGetUserInfo = () => {
|
|
|
|
|
+ emit("update:get-user-info");
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
// 内部步骤状态,和父组件同步
|
|
// 内部步骤状态,和父组件同步
|
|
|
const currentStep = ref<number>(props.currentStep || 0);
|
|
const currentStep = ref<number>(props.currentStep || 0);
|
|
|
|
|
+const storeApplicationStatus = ref<number>(props.storeApplicationStatus || 0);
|
|
|
|
|
+console.log(storeApplicationStatus);
|
|
|
watch(
|
|
watch(
|
|
|
() => props.currentStep,
|
|
() => props.currentStep,
|
|
|
val => {
|
|
val => {
|
|
|
if (typeof val === "number") currentStep.value = val;
|
|
if (typeof val === "number") currentStep.value = val;
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
-
|
|
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => props.storeApplicationStatus,
|
|
|
|
|
+ val => {
|
|
|
|
|
+ if (typeof val === "number") storeApplicationStatus.value = val;
|
|
|
|
|
+ }
|
|
|
|
|
+);
|
|
|
|
|
+const changeRefuse = () => {
|
|
|
|
|
+ currentStep.value = 2;
|
|
|
|
|
+};
|
|
|
const setStep = (val: number) => {
|
|
const setStep = (val: number) => {
|
|
|
currentStep.value = val;
|
|
currentStep.value = val;
|
|
|
emit("update:currentStep", val);
|
|
emit("update:currentStep", val);
|
|
@@ -314,7 +327,7 @@ const step2Form = reactive({
|
|
|
administrativeRegionDistrictAdcode: "", //区
|
|
administrativeRegionDistrictAdcode: "", //区
|
|
|
storeAddress: "", //门店地址(完整地址)
|
|
storeAddress: "", //门店地址(完整地址)
|
|
|
storeBlurb: "", //门店简介
|
|
storeBlurb: "", //门店简介
|
|
|
- businessSection: "3", //经营板块
|
|
|
|
|
|
|
+ businessSection: "", //经营板块
|
|
|
businessSectionName: "KTV",
|
|
businessSectionName: "KTV",
|
|
|
businessTypes: [], //经营种类
|
|
businessTypes: [], //经营种类
|
|
|
businessTypesList: [], //经营种类集合
|
|
businessTypesList: [], //经营种类集合
|
|
@@ -325,7 +338,8 @@ const step2Form = reactive({
|
|
|
storePositionLatitude: "", //纬度
|
|
storePositionLatitude: "", //纬度
|
|
|
businessLicenseAddress: [] as UploadUserFile[], //营业执照地址
|
|
businessLicenseAddress: [] as UploadUserFile[], //营业执照地址
|
|
|
contractImageList: [] as UploadUserFile[], //合同图片集合
|
|
contractImageList: [] as UploadUserFile[], //合同图片集合
|
|
|
- foodLicenceImgList: [] as UploadUserFile[] //食品经营许可证
|
|
|
|
|
|
|
+ foodLicenceImgList: [] as UploadUserFile[], //食品经营许可证
|
|
|
|
|
+ address: ""
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 返回按钮
|
|
// 返回按钮
|
|
@@ -437,14 +451,15 @@ const getLonAndLat = async (keyword: string) => {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
const selectAddress = async (param: any) => {
|
|
const selectAddress = async (param: any) => {
|
|
|
- let locationList = address.value.split(",");
|
|
|
|
|
|
|
+ let locationList = step2Form.address.split(",");
|
|
|
addressList.value.forEach((item: any) => {
|
|
addressList.value.forEach((item: any) => {
|
|
|
- if (item.location == address.value) {
|
|
|
|
|
|
|
+ if (item.location == step2Form.address) {
|
|
|
queryAddress.value = item.name;
|
|
queryAddress.value = item.name;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
step2Form.storePositionLongitude = locationList[0];
|
|
step2Form.storePositionLongitude = locationList[0];
|
|
|
step2Form.storePositionLatitude = locationList[1];
|
|
step2Form.storePositionLatitude = locationList[1];
|
|
|
|
|
+ latShow.value = true;
|
|
|
};
|
|
};
|
|
|
//文件上传
|
|
//文件上传
|
|
|
const handleHttpUpload = async (options: UploadRequestOptions) => {
|
|
const handleHttpUpload = async (options: UploadRequestOptions) => {
|
|
@@ -484,8 +499,8 @@ const handleNextStep = async () => {
|
|
|
idCard: step1Form.idNumber,
|
|
idCard: step1Form.idNumber,
|
|
|
appType: 1
|
|
appType: 1
|
|
|
};
|
|
};
|
|
|
- const res = await verifyIdInfo(params);
|
|
|
|
|
- if (res.code == "200") {
|
|
|
|
|
|
|
+ const res: any = await verifyIdInfo(params);
|
|
|
|
|
+ if (res && res.code == 200) {
|
|
|
ElMessage.success(res.msg);
|
|
ElMessage.success(res.msg);
|
|
|
|
|
|
|
|
setStep(2);
|
|
setStep(2);
|
|
@@ -632,8 +647,8 @@ const handleSubmit = async () => {
|
|
|
})
|
|
})
|
|
|
.then(async () => {
|
|
.then(async () => {
|
|
|
try {
|
|
try {
|
|
|
- const res = await applyStore(params);
|
|
|
|
|
- if (res.code === "200") {
|
|
|
|
|
|
|
+ const res: any = await applyStore(params);
|
|
|
|
|
+ if (res && res.code == 200) {
|
|
|
setStep(3); // 跳转到等待审核步骤
|
|
setStep(3); // 跳转到等待审核步骤
|
|
|
ElMessage.success(res.msg);
|
|
ElMessage.success(res.msg);
|
|
|
} else {
|
|
} else {
|
|
@@ -748,5 +763,14 @@ const handleExceed = () => {
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
outline: none;
|
|
outline: none;
|
|
|
}
|
|
}
|
|
|
|
|
+ .register-btn-red {
|
|
|
|
|
+ width: 200px;
|
|
|
|
|
+ height: 44px;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ border: 0;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ outline: none;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|