Quellcode durchsuchen

fix: 对接接口

lxf vor 19 Minuten
Ursprung
Commit
ea2192ed60

BIN
src/assets/img/farm/target.png


BIN
src/assets/img/home/label-icon.png


+ 7 - 0
src/router/globalRoutes.js

@@ -138,4 +138,11 @@ export default [
         meta: { showTabbar: true, keepAlive: true },
         component: () => import("@/views/old_mini/agri_file/pages/diagnosisReport.vue"),
     },
+    // 录入农服信息
+    {
+        path: "/entry_information_service",
+        name: "EntryInformationService",
+        meta: { keepAlive: true },
+        component: () => import("@/views/old_mini/entry_information_service/index.vue"),
+    },
 ];

+ 12 - 0
src/styles/common.scss

@@ -20,6 +20,18 @@ body {
     margin: 0;
     padding: 0;
     border: 0;
+
+
+}
+//滚动条的宽度
+::-webkit-scrollbar {
+    width: 6px;
+    height: 6px;
+}
+//滚动条的滑块
+::-webkit-scrollbar-thumb {
+    background-color: rgba(144, 147, 153, 0.3);
+    border-radius: 3px;
 }
 img {
     vertical-align: middle;

+ 2 - 0
src/utils/tiandituLocation.js

@@ -93,6 +93,7 @@ export function normalizeRegeoResult(payload) {
         "";
     const city = ac.city || "";
     const district = ac.county || ac.town || "";
+    const townName = ac.town || "";
     return {
         address,
         formatted_addresses: { recommend: address },
@@ -101,6 +102,7 @@ export function normalizeRegeoResult(payload) {
             province: ac.province || "",
             city,
             district,
+            townName,
             street: ac.road || ac.address || "",
         },
         ad_info: {

+ 11 - 1
src/views/old_mini/entry_information/components/selectCategory.vue

@@ -628,14 +628,22 @@ const handleVarietySearchSelect = (value) => {
     varietySearchBackup = String(variety.id);
 };
 
+/** 当前登录用户(建档本人) */
 function getUserId() {
     const id = localStorage.getItem("MINI_USER_ID");
     return id != null && id !== "" ? Number(id) : 0;
 }
 
+/**
+ * 邀请人 adminId:来自 invite_welcome paramsPage,存于 ENTRY_ADMIN_ID
+ * 无邀请时回退为当前用户
+ */
 function getAdminId() {
     const fromSession = sessionStorage.getItem(ADMIN_ID_KEY);
-    if (fromSession != null && fromSession !== "") return Number(fromSession);
+    if (fromSession != null && fromSession !== "") {
+        const n = Number(fromSession);
+        return Number.isNaN(n) ? getUserId() : n;
+    }
     return getUserId();
 }
 
@@ -654,7 +662,9 @@ function buildFarmPayload(crop, variety) {
 
     return {
         user_name: baForm.farmName || baForm.name,
+        // admin_id:邀请链路 paramsPage.adminId(ENTRY_ADMIN_ID)
         admin_id: getAdminId(),
+        // user_id:当前登录用户
         user_id: getUserId(),
         farm_location: farmLocation,
         farm_address: location?.address || "",

+ 47 - 81
src/views/old_mini/entry_information/index.vue

@@ -16,11 +16,9 @@
                 @remind="leaveCompleteToReport"
             />
             <template v-else>
-                <service-information v-if="currentStep === 1 && isServiceEntry" @next="handleNext" />
-                <ba-information v-else-if="currentStep === 1" @next="handleNext" />
+                <ba-information v-if="currentStep === 1" @next="handleNext" />
                 <select-category
                     v-else-if="currentStep === 2"
-                    :multiple="isServiceEntry"
                     @prev="handlePrev"
                     @next="handleNext"
                     @complete="handleEntryComplete"
@@ -31,18 +29,20 @@
 </template>
 
 <script setup>
-import { computed, onActivated, onMounted, ref, watch } from "vue";
+import { computed, onActivated, ref, watch } from "vue";
 import { useRoute, useRouter } from "vue-router";
 import customHeader from "@/components/customHeader.vue";
 import baInformation from "./components/baInformation.vue";
-import serviceInformation from "./components/serviceInformation.vue";
 import selectCategory from "./components/selectCategory.vue";
 import entryComplete from "./components/entryComplete.vue";
 
+// ---------------------------------------------------------------------------
+// 常量
+// ---------------------------------------------------------------------------
 const STEP_KEY = "ENTRY_INFORMATION_STEP";
-const INVITE_TYPE_KEY = "ENTRY_INVITE_TYPE";
-const CATEGORY_SESSION_KEY = "ENTRY_SELECTED_CATEGORY";
 const ADMIN_ID_KEY = "ENTRY_ADMIN_ID";
+/** 农户固定 2 步:位置 → 作物+品种 */
+const MAX_STEP = 2;
 /** 录入流程草稿键,离开完成页时一并清空 */
 const ENTRY_DRAFT_KEYS = [
     "ENTRY_INFORMATION_STEP",
@@ -53,28 +53,37 @@ const ENTRY_DRAFT_KEYS = [
     "ENTRY_CROP_DETAIL",
     "ENTRY_CROP_META",
     "ENTRY_VARIETY_EDIT_UID",
+    "ENTRY_INVITE_TYPE",
 ];
 
+// ---------------------------------------------------------------------------
+// 页面状态
+// ---------------------------------------------------------------------------
 const router = useRouter();
 const route = useRoute();
+const currentStep = ref(1);
+const showComplete = ref(false);
+const completeMeta = ref({
+    archiveReady: false,
+    locationLabel: "",
+    varietyLabel: "",
+});
 
 /** 无农场从登录页进入时隐藏返回箭头 */
 const hideBack = computed(
     () => route.query.isClose === "1" || route.query.isClose === "true"
 );
+/** 农户:位置 / 作物 / 建档完成均为深色 */
+const isDarkStep = computed(
+    () => showComplete.value || currentStep.value === 1 || currentStep.value === 2
+);
 
+// ---------------------------------------------------------------------------
+// 工具函数
+// ---------------------------------------------------------------------------
 function readStep() {
     const step = Number(sessionStorage.getItem(STEP_KEY));
-    return step >= 1 && step <= 5 ? step : 1;
-}
-
-function readInviteType() {
-    const fromQuery = route.query.inviteType;
-    if (fromQuery === "service" || fromQuery === "farmer") {
-        sessionStorage.setItem(INVITE_TYPE_KEY, fromQuery);
-        return fromQuery;
-    }
-    return sessionStorage.getItem(INVITE_TYPE_KEY) || "farmer";
+    return step >= 1 && step <= MAX_STEP ? step : 1;
 }
 
 function syncAdminIdFromQuery() {
@@ -84,59 +93,16 @@ function syncAdminIdFromQuery() {
     }
 }
 
-const currentStep = ref(readStep());
-const inviteType = ref(readInviteType());
-const isServiceEntry = computed(() => inviteType.value === "service");
-/** 农户:位置 / 作物页 / 建档完成页为深色 */
-const showComplete = ref(false);
-const completeMeta = ref({
-    archiveReady: false,
-    locationLabel: "",
-    varietyLabel: "",
-});
-const isDarkStep = computed(
-    () =>
-        showComplete.value ||
-        (!isServiceEntry.value && (currentStep.value === 1 || currentStep.value === 2))
-);
-const hasFieldSelected = ref(false);
-const hasFruitSelected = ref(false);
-const isBothCrops = computed(() => hasFieldSelected.value && hasFruitSelected.value);
-/**
- * 农户:位置 → 作物+品种(提交)→ 完成页,不再走设备步
- * 农服:保持原分步
- */
-const maxStep = computed(() => {
-    if (!isServiceEntry.value) return 2;
-    return isBothCrops.value ? 5 : 4;
-});
-
-function refreshHasField() {
-    try {
-        const list = JSON.parse(sessionStorage.getItem(CATEGORY_SESSION_KEY) || "[]");
-        const items = Array.isArray(list) ? list : [];
-        hasFieldSelected.value = items.some(
-            (item) => item?.firstCrop === "大田" || item?.majorKey === "field"
-        );
-        hasFruitSelected.value = items.some(
-            (item) => item?.firstCrop === "果树" || item?.majorKey === "fruit"
-        );
-    } catch {
-        hasFieldSelected.value = false;
-        hasFruitSelected.value = false;
-    }
+function clearEntryDraft() {
+    ENTRY_DRAFT_KEYS.forEach((key) => sessionStorage.removeItem(key));
 }
 
 function clampStep() {
-    if (currentStep.value > maxStep.value) {
-        currentStep.value = maxStep.value;
+    if (currentStep.value > MAX_STEP) {
+        currentStep.value = MAX_STEP;
     }
 }
 
-function clearEntryDraft() {
-    ENTRY_DRAFT_KEYS.forEach((key) => sessionStorage.removeItem(key));
-}
-
 /** 离开完成页 / 再次进入:回到第 1 步 */
 function resetToFirstStep() {
     clearEntryDraft();
@@ -148,11 +114,11 @@ function resetToFirstStep() {
     };
     currentStep.value = 1;
     sessionStorage.setItem(STEP_KEY, "1");
-    refreshHasField();
 }
 
 function syncEntryState() {
-    inviteType.value = readInviteType();
+    // 本页仅农户;邀请链路若误带 service,也按农户处理
+    sessionStorage.setItem("ENTRY_INVITE_TYPE", "farmer");
     syncAdminIdFromQuery();
     // keep-alive 再次进入:若仍停在完成页,强制回第一步
     if (showComplete.value) {
@@ -160,24 +126,14 @@ function syncEntryState() {
         return;
     }
     currentStep.value = readStep();
-    refreshHasField();
     clampStep();
 }
 
-// onMounted(syncEntryState);
-onActivated(syncEntryState);
-
-watch(
-    currentStep,
-    (step) => {
-        sessionStorage.setItem(STEP_KEY, String(step));
-    },
-    { immediate: true }
-);
-
+// ---------------------------------------------------------------------------
+// 事件处理
+// ---------------------------------------------------------------------------
 const handleNext = () => {
-    refreshHasField();
-    if (currentStep.value < maxStep.value) {
+    if (currentStep.value < MAX_STEP) {
         currentStep.value += 1;
     }
 };
@@ -188,7 +144,7 @@ const handlePrev = () => {
     }
 };
 
-/** 农户确认品种并提交成功 → 建档完成页 */
+/** 确认品种并提交成功 → 建档完成页 */
 const handleEntryComplete = (meta = {}) => {
     completeMeta.value = {
         archiveReady: !!meta.archiveReady,
@@ -207,6 +163,16 @@ function leaveCompleteToReport() {
     resetToFirstStep();
     router.replace("/growth_report");
 }
+
+watch(
+    currentStep,
+    (step) => {
+        sessionStorage.setItem(STEP_KEY, String(step));
+    },
+    { immediate: true }
+);
+
+onActivated(syncEntryState);
 </script>
 
 <style lang="scss" scoped>

+ 16 - 3
src/views/old_mini/entry_information/selectLocation.vue

@@ -60,12 +60,16 @@ const selectedAdcode = ref("");
 const selectedAddress = ref("");
 /** 搜索选中时带出的市+区县(county_address),建档接口用 */
 const selectedCountyAddress = ref("");
+/** 村镇级名称(逆地理 townName) */
+const selectedTownName = ref("");
 
 const selectLocationMap = new SelectLocationMap({
     iconSrc,
     onMapClick: () => {
         selectedAdcode.value = "";
         selectedAddress.value = "";
+        selectedCountyAddress.value = "";
+        selectedTownName.value = "";
     },
 });
 
@@ -85,7 +89,9 @@ function toPointWkt(coordinate) {
 }
 
 async function fetchLocationInfoByCoordinate(coordinate) {
-    if (!coordinate?.length) return { adcode: "", address: "", county_address: "" };
+    if (!coordinate?.length) {
+        return { adcode: "", address: "", county_address: "", townName: "" };
+    }
     try {
         const { result } = await fetchRegeo({ lng: coordinate[0], lat: coordinate[1] });
         const adcode = result?.ad_info?.adcode;
@@ -99,9 +105,10 @@ async function fetchLocationInfoByCoordinate(coordinate) {
             adcode: adcode != null && adcode !== "" ? String(adcode) : "",
             address: address || "",
             county_address: result?.county_address || "",
+            townName: result?.address_component?.townName || "",
         };
     } catch {
-        return { adcode: "", address: "", county_address: "" };
+        return { adcode: "", address: "", county_address: "", townName: "" };
     }
 }
 
@@ -119,11 +126,13 @@ const handleLocationChange = (payload) => {
         selectedAdcode.value = "";
         selectedAddress.value = "";
         selectedCountyAddress.value = "";
+        selectedTownName.value = "";
         return;
     }
     selectedAdcode.value = payload.adcode ? String(payload.adcode) : "";
     selectedAddress.value = payload.address || payload.pointAddress || "";
     selectedCountyAddress.value = payload.county_address || payload.city || "";
+    selectedTownName.value = payload.townName || "";
     selectLocationMap.setMapPosition(payload.coordinateArray);
 };
 
@@ -131,6 +140,7 @@ const handleLocate = () => {
     selectedAdcode.value = "";
     selectedAddress.value = "";
     selectedCountyAddress.value = "";
+    selectedTownName.value = "";
     const point =
         localStorage.getItem("MINI_USER_LOCATION_POINT") ||
         store.state.home.miniUserLocationPoint ||
@@ -151,11 +161,13 @@ const handleSubmit = async () => {
     let adcode = selectedAdcode.value;
     let address = selectedAddress.value;
     let countyAddress = selectedCountyAddress.value;
-    if (!adcode || !address || !countyAddress) {
+    let townName = selectedTownName.value;
+    if (!adcode || !address || !countyAddress || !townName) {
         const info = await fetchLocationInfoByCoordinate(coordinate);
         if (!adcode) adcode = info.adcode;
         if (!address) address = info.address;
         if (!countyAddress) countyAddress = info.county_address;
+        if (!townName) townName = info.townName;
     }
     const payload = {
         point,
@@ -163,6 +175,7 @@ const handleSubmit = async () => {
         adcode: adcode || "",
         address: address || "",
         county_address: countyAddress || "",
+        townName: townName || "",
     };
     sessionStorage.setItem(sessionKey, JSON.stringify(payload));
     router.back();

+ 471 - 0
src/views/old_mini/entry_information_service/components/serviceCategory.vue

@@ -0,0 +1,471 @@
+<template>
+    <div class="service-category">
+        <div class="service-category__content" v-loading="loading" element-loading-background="rgba(15, 15, 15, 0.55)">
+            <div class="page-header">
+                <div class="page-title">你们可以服务哪些种植品类?</div>
+                <div class="page-subtitle">为你精准匹配农户</div>
+            </div>
+
+            <div class="tab-pills">
+                <div
+                    v-for="tab in visibleTabs"
+                    :key="tab.key"
+                    class="tab-pill"
+                    :class="{ active: activeTab === tab.key }"
+                    @click="activeTab = tab.key"
+                >
+                    {{ tab.label }}
+                </div>
+            </div>
+
+            <div class="search-bar">
+                <el-icon class="search-icon"><Search /></el-icon>
+                <input
+                    v-model="searchKeyword"
+                    class="search-input"
+                    type="text"
+                    placeholder="搜索其他作物"
+                />
+            </div>
+
+            <div v-for="group in displayGroups" :key="group.name" class="crop-group">
+                <div class="group-title">
+                    <img class="title-icon" src="@/assets/img/home/label-icon.png" alt="">
+                    {{ group.name }}
+                </div>
+                <div class="chip-grid">
+                    <div
+                        v-for="item in group.items"
+                        :key="item.id"
+                        class="chip-item"
+                        :class="{ selected: selectedIds.has(String(item.id)), 'not-allowed': !isCropAllowed(item) }"
+                        @click="toggleCrop(item)"
+                    >
+                        <span class="chip-item__text">{{ item.name }}</span>
+                        <!-- <span v-if="selectedIds.has(String(item.id))" class="chip-item__check">
+                            <el-icon><Select /></el-icon>
+                        </span> -->
+                    </div>
+                </div>
+            </div>
+            <div v-if="!loading && !displayGroups.length" class="empty-tip">暂无匹配作物</div>
+        </div>
+
+        <div class="service-category__footer">
+            <div class="action-btns">
+                <div class="action-btn secondary" @click="emit('prev')">上一步</div>
+                <div class="action-btn primary" @click="handleConfirm">确认品类</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import { computed, onMounted, reactive, ref } from "vue";
+import { ElMessage } from "element-plus";
+import { Search, Select } from "@element-plus/icons-vue";
+import { fetchRegeo } from "@/utils/tiandituLocation";
+import { convertPointToArray } from "@/utils/index";
+
+// ---------------------------------------------------------------------------
+// Emits
+// ---------------------------------------------------------------------------
+const emit = defineEmits(["prev", "next"]);
+
+// ---------------------------------------------------------------------------
+// 常量
+// ---------------------------------------------------------------------------
+const SESSION = {
+    CATEGORY: "SERVICE_ENTRY_CATEGORY",
+    LOCATION: "SERVICE_ENTRY_LOCATION",
+    META: "SERVICE_ENTRY_CROP_META",
+};
+const META_KEYS = new Set(["city", "county", "county_code", "province"]);
+const FIRST_CROP_KEY_MAP = { 果树: "fruit", 大田: "field" };
+const TAB_ORDER = ["果树", "大田"];
+const DEFAULT_COUNTY_CODE = "440113";
+const DEFAULT_POINT = "POINT(113.6142086995688 23.585836479509055)";
+/** 切换顺序:果树类 → 大田类 */
+const TABS = [
+    { key: "fruit", label: "果树类", major: "果树" },
+    { key: "field", label: "大田类", major: "大田" },
+];
+
+// ---------------------------------------------------------------------------
+// 页面状态
+// ---------------------------------------------------------------------------
+const loading = ref(false);
+const activeTab = ref("fruit");
+const searchKeyword = ref("");
+const allCrops = ref([]);
+const selectedIds = reactive(new Set());
+
+// ---------------------------------------------------------------------------
+// 计算属性
+// ---------------------------------------------------------------------------
+const visibleTabs = computed(() => TABS);
+
+const displayGroups = computed(() => {
+    const tab = TABS.find((t) => t.key === activeTab.value);
+    const major = tab?.major || "果树";
+    const keyword = (searchKeyword.value || "").trim();
+    const filtered = allCrops.value.filter((item) => {
+        if (item.firstCrop !== major) return false;
+        if (!keyword) return true;
+        return item.name.includes(keyword);
+    });
+    const map = new Map();
+    filtered.forEach((crop) => {
+        const groupName = crop.groupName || "其他";
+        if (!map.has(groupName)) map.set(groupName, []);
+        map.get(groupName).push(crop);
+    });
+    return [...map.entries()].map(([name, items]) => ({ name, items }));
+});
+
+// ---------------------------------------------------------------------------
+// 工具函数
+// ---------------------------------------------------------------------------
+const isCropAllowed = (item) => String(item?.is_use ?? "0") === "1";
+
+function readJson(key) {
+    try {
+        const raw = sessionStorage.getItem(key);
+        return raw ? JSON.parse(raw) : null;
+    } catch {
+        return null;
+    }
+}
+
+function flattenCropsFromData(data) {
+    if (!data || typeof data !== "object") return [];
+    const cropKeys = Object.keys(data).filter(
+        (key) => !META_KEYS.has(key) && Array.isArray(data[key])
+    );
+    cropKeys.sort((a, b) => {
+        const ai = TAB_ORDER.indexOf(a);
+        const bi = TAB_ORDER.indexOf(b);
+        if (ai === -1 && bi === -1) return 0;
+        if (ai === -1) return 1;
+        if (bi === -1) return -1;
+        return ai - bi;
+    });
+    const list = [];
+    const seen = new Set();
+    cropKeys.forEach((firstCrop) => {
+        const majorKey = FIRST_CROP_KEY_MAP[firstCrop] || firstCrop;
+        (data[firstCrop] || []).forEach((group) => {
+            (group.items || []).forEach((crop) => {
+                const id = crop.crop_id;
+                if (id == null || seen.has(String(id))) return;
+                seen.add(String(id));
+                list.push({
+                    id,
+                    name: crop.crop_name || "",
+                    code: crop.crop_code || "",
+                    is_use: crop.is_use ?? "0",
+                    groupName: group.crop_type || "",
+                    firstCrop,
+                    majorKey,
+                });
+            });
+        });
+    });
+    return list;
+}
+
+async function fetchAdcodeByPoint(point) {
+    const coordinate = convertPointToArray(point);
+    if (!coordinate?.length) return "";
+    try {
+        const { result } = await fetchRegeo({ lng: coordinate[0], lat: coordinate[1] });
+        const adcode = result?.ad_info?.adcode;
+        return adcode != null && adcode !== "" ? String(adcode) : "";
+    } catch {
+        return "";
+    }
+}
+
+async function resolveCountyCode() {
+    const saved = readJson(SESSION.LOCATION);
+    if (saved?.adcode) return String(saved.adcode);
+    const point = saved?.point || DEFAULT_POINT;
+    const adcode = await fetchAdcodeByPoint(point);
+    return adcode || DEFAULT_COUNTY_CODE;
+}
+
+function saveSelection() {
+    const list = allCrops.value
+        .filter((item) => selectedIds.has(String(item.id)))
+        .map((item) => ({
+            id: item.id,
+            name: item.name,
+            code: item.code,
+            firstCrop: item.firstCrop,
+            majorKey: item.majorKey,
+        }));
+    sessionStorage.setItem(SESSION.CATEGORY, JSON.stringify(list));
+}
+
+function restoreSelection() {
+    const cached = readJson(SESSION.CATEGORY);
+    if (!Array.isArray(cached)) return;
+    cached.forEach((item) => {
+        if (item?.id != null) selectedIds.add(String(item.id));
+    });
+}
+
+// ---------------------------------------------------------------------------
+// 业务逻辑
+// ---------------------------------------------------------------------------
+async function fetchCrops() {
+    loading.value = true;
+    try {
+        const countyCode = await resolveCountyCode();
+        const res = await VE_API.entry.getCrops({ county_code: countyCode });
+        if (res.code !== 200) {
+            allCrops.value = [];
+            ElMessage.error(res.msg || "获取种植品类失败");
+            return;
+        }
+        const data = res.data || {};
+        sessionStorage.setItem(
+            SESSION.META,
+            JSON.stringify({
+                city: data.city || "",
+                county: data.county || "",
+                province: data.province || "",
+                county_code: data.county_code || countyCode,
+            })
+        );
+        allCrops.value = flattenCropsFromData(data);
+        restoreSelection();
+    } catch {
+        allCrops.value = [];
+        ElMessage.error("获取种植品类失败,请稍后再试");
+    } finally {
+        loading.value = false;
+    }
+}
+
+const toggleCrop = (item) => {
+    if (!isCropAllowed(item)) {
+        ElMessage.warning("该作物暂未开放");
+        return;
+    }
+    const id = String(item.id);
+    if (selectedIds.has(id)) selectedIds.delete(id);
+    else selectedIds.add(id);
+    saveSelection();
+};
+
+const handleConfirm = () => {
+    if (!selectedIds.size) {
+        ElMessage.warning("请至少选择一种作物");
+        return;
+    }
+    saveSelection();
+    emit("next");
+};
+
+onMounted(fetchCrops);
+</script>
+
+<style lang="scss" scoped>
+.service-category {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    background: #141414;
+    color: #fff;
+
+    &__content {
+        flex: 1;
+        overflow-y: auto;
+        padding: 0 16px 0;
+        min-height: 0;
+    }
+
+    &__footer {
+        flex-shrink: 0;
+        padding: 24px 24px calc(22px + env(safe-area-inset-bottom));
+    }
+
+    .page-header {
+        margin-bottom: 16px;
+
+        .page-title {
+            font-size: 20px;
+            line-height: 30px;
+        }
+
+        .page-subtitle {
+            margin-top: 2px;
+            font-size: 14px;
+            color: rgba(255, 255, 255, 0.6);
+        }
+    }
+
+    .tab-pills {
+        display: flex;
+        gap: 10px;
+        margin-bottom: 12px;
+    }
+
+    .tab-pill {
+        flex: 1;
+        height: 32px;
+        border-radius: 6px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 14px;
+        color: rgba(133, 133, 133, 1);
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.12);
+        cursor: pointer;
+        box-sizing: border-box;
+        line-height: 30px;
+
+        &.active {
+            color: #000000;
+            background: #FFD489;
+            border-color: #FFD489;
+        }
+    }
+
+    .search-bar {
+        display: flex;
+        align-items: center;
+        gap: 8px;
+        height: 44px;
+        padding: 0 12px;
+        margin-bottom: 16px;
+        border-radius: 12px;
+        background: #1c1c1c;
+        border: 1px solid rgba(255, 255, 255, 0.12);
+
+        .search-icon {
+            color: rgba(255, 255, 255, 0.45);
+        }
+
+        .search-input {
+            flex: 1;
+            border: none;
+            outline: none;
+            background: transparent;
+            color: #fff;
+            font-size: 14px;
+
+            &::placeholder {
+                color: rgba(255, 255, 255, 0.35);
+            }
+        }
+    }
+
+    .crop-group {
+        margin-bottom: 12px;
+        padding: 10px;
+        border-radius: 10px;
+        background: rgba(32, 32, 32, 1);
+        border: 1px solid rgba(255, 255, 255, 0.12);
+    }
+
+    .group-title {
+        margin-bottom: 12px;
+        font-size: 16px;
+        font-weight: 500;
+        color: #FFD489;
+        display: flex;
+        align-items: center;
+        gap: 5px;
+        .title-icon {
+            width: 14px;
+        }
+    }
+
+    .chip-grid {
+        display: grid;
+        grid-template-columns: repeat(3, 1fr);
+        gap: 10px;
+    }
+
+    .chip-item {
+        position: relative;
+        min-height: 55px;
+        box-sizing: border-box;
+        padding: 10px 8px;
+        border-radius: 8px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        text-align: center;
+        font-size: 16px;
+        font-weight: 500;
+        color: rgba(255, 255, 255, 1);
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.12);
+        cursor: pointer;
+        &.not-allowed {
+            // color: rgba(255, 255, 255, 0.5);
+            opacity: 0.4;
+        }
+
+        &.selected {
+            color: rgba(255, 212, 137, 1);
+            border-color: rgba(255, 212, 137, 1);
+            background: rgba(255, 212, 137, 0.05);
+        }
+
+        &__check {
+            position: absolute;
+            top: 4px;
+            right: 4px;
+            width: 16px;
+            height: 16px;
+            border-radius: 50%;
+            display: inline-flex;
+            align-items: center;
+            justify-content: center;
+            font-size: 10px;
+            color: rgba(255, 212, 137, 1);
+            border: 1px solid rgba(255, 212, 137, 0.8);
+        }
+    }
+
+    .empty-tip {
+        padding: 24px 0;
+        text-align: center;
+        color: rgba(255, 255, 255, 0.35);
+        font-size: 14px;
+    }
+
+    .action-btns {
+        display: flex;
+        gap: 12px;
+    }
+
+    .action-btn {
+        flex: 1;
+        height: 48px;
+        border-radius: 12px;
+        font-size: 16px;
+        font-weight: 500;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        cursor: pointer;
+
+        &.secondary {
+            background: #2a2a2a;
+            color: #fff;
+        }
+
+        &.primary {
+            background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
+            color: #1a1a1a;
+        }
+    }
+}
+</style>

+ 362 - 0
src/views/old_mini/entry_information_service/components/serviceComplete.vue

@@ -0,0 +1,362 @@
+<template>
+    <div class="service-complete">
+        <div class="service-complete__hero">
+            <img class="service-complete__badge" src="@/assets/img/farm/right-light.png" alt="" />
+            <div class="service-complete__title">入驻成功</div>
+            <div class="service-complete__subtitle">附近农场有需求时,会第一时间通知你</div>
+        </div>
+
+        <div class="service-complete__card">
+            <div class="card-head">
+                <div class="team-name">{{ display.teamName || "—" }}</div>
+                <span class="status-badge">
+                    <el-icon><Select /></el-icon>
+                    档案已建立
+                </span>
+            </div>
+
+            <div class="info-row">
+                <span class="label">团队类型</span>
+                <span class="value">{{ display.teamType || "—" }}</span>
+            </div>
+            <div class="info-row">
+                <span class="label">服务范围</span>
+                <span class="value">{{ serviceRangeText }}</span>
+            </div>
+            <div class="info-row">
+                <span class="label">服务作物</span>
+                <span class="value value--tags">
+                    <template v-if="cropView.visible.length">
+                        <span>{{ cropView.visible.join(" · ") }}</span>
+                        <span v-if="cropView.rest" class="more-tag">+{{ cropView.rest }}</span>
+                    </template>
+                    <template v-else>—</template>
+                </span>
+            </div>
+            <div class="info-row">
+                <span class="label">服务能力</span>
+                <span class="value value--tags">
+                    <template v-if="capabilityView.visible.length">
+                        <span>{{ capabilityView.visible.join(" · ") }}</span>
+                        <span v-if="capabilityView.rest" class="more-tag">+{{ capabilityView.rest }}</span>
+                    </template>
+                    <template v-else>—</template>
+                </span>
+            </div>
+        </div>
+
+        <div class="service-complete__footer">
+            <div class="action-btn ghost" @click="emit('home')">看看首页</div>
+            <div class="action-btn primary" @click="emit('home')">完成</div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import { computed, onMounted, ref } from "vue";
+
+// ---------------------------------------------------------------------------
+// Props / Emits
+// ---------------------------------------------------------------------------
+const props = defineProps({
+    summary: { type: Object, default: () => ({}) },
+});
+const emit = defineEmits(["home"]);
+
+// ---------------------------------------------------------------------------
+// 常量
+// ---------------------------------------------------------------------------
+const MAX_VISIBLE_TAGS = 3;
+
+const TEAM_TYPE_LABELS = {
+    machinery_coop: "农机专业合作社",
+    grower: "种植大户兼营",
+    family_farm: "家庭农场",
+    agri_company: "农业公司",
+    individual: "个体农机户",
+    other: "其他",
+};
+
+// ---------------------------------------------------------------------------
+// 页面状态
+// ---------------------------------------------------------------------------
+const sessionSummary = ref({});
+
+// ---------------------------------------------------------------------------
+// 工具函数
+// ---------------------------------------------------------------------------
+function readJson(key) {
+    try {
+        const raw = sessionStorage.getItem(key);
+        return raw ? JSON.parse(raw) : null;
+    } catch {
+        return null;
+    }
+}
+
+/** 从数组或「 · 」拼接字符串解析出名称列表 */
+function toNameList(listOrLabel) {
+    if (Array.isArray(listOrLabel)) {
+        return listOrLabel.map((item) => (typeof item === "string" ? item : item?.name)).filter(Boolean);
+    }
+    if (typeof listOrLabel === "string" && listOrLabel.trim()) {
+        return listOrLabel.split(/\s*[·,,]\s*/).filter(Boolean);
+    }
+    return [];
+}
+
+/** 最多展示 MAX_VISIBLE_TAGS 项,超出用 rest 表示剩余数量 */
+function truncateNames(names) {
+    const list = Array.isArray(names) ? names : [];
+    if (list.length <= MAX_VISIBLE_TAGS) {
+        return { visible: list, rest: 0 };
+    }
+    return {
+        visible: list.slice(0, MAX_VISIBLE_TAGS),
+        rest: list.length - MAX_VISIBLE_TAGS,
+    };
+}
+
+function buildFromSession() {
+    const basic = readJson("SERVICE_ENTRY_BASIC") || {};
+    const location = readJson("SERVICE_ENTRY_LOCATION") || {};
+    const category = readJson("SERVICE_ENTRY_CATEGORY") || [];
+    const equipmentRaw = readJson("SERVICE_ENTRY_EQUIPMENT");
+    const equipment = Array.isArray(equipmentRaw)
+        ? equipmentRaw
+        : [
+              ...(equipmentRaw?.merged || []),
+              ...(equipmentRaw?.field || []),
+              ...(equipmentRaw?.fruit || []),
+          ];
+    const manual = readJson("SERVICE_ENTRY_MANUAL") || [];
+
+    const crops = (Array.isArray(category) ? category : [])
+        .map((item) => item?.name)
+        .filter(Boolean);
+    const manualNames = (Array.isArray(manual) ? manual : [])
+        .map((item) => item?.name)
+        .filter(Boolean);
+    const equipmentNames = [];
+    const seenEquip = new Set();
+    equipment.forEach((item) => {
+        const name = item?.name;
+        if (!name || seenEquip.has(name)) return;
+        seenEquip.add(name);
+        equipmentNames.push(name);
+    });
+    const capabilities =
+        manualNames.length > 0 ? manualNames : equipmentNames;
+
+    return {
+        teamName: basic.teamName || "",
+        teamType:
+            basic.teamTypeLabel ||
+            TEAM_TYPE_LABELS[basic.teamType] ||
+            "",
+        // 服务范围优先展示村镇级
+        address:
+            location.townName ||
+            location.county_address ||
+            location.address ||
+            "",
+        townName: location.townName || "",
+        radiusKm: location.radiusKm ?? 30,
+        crops,
+        capabilities,
+        // 兼容旧 summary 字段
+        cropLabel: crops.join(" · "),
+        capabilityLabel: capabilities.join(" · "),
+    };
+}
+
+// ---------------------------------------------------------------------------
+// 计算属性
+// ---------------------------------------------------------------------------
+const display = computed(() => ({
+    ...sessionSummary.value,
+    ...props.summary,
+}));
+
+const cropView = computed(() =>
+    truncateNames(
+        toNameList(display.value.crops ?? display.value.cropLabel),
+    ),
+);
+
+const capabilityView = computed(() =>
+    truncateNames(
+        toNameList(display.value.capabilities ?? display.value.capabilityLabel),
+    ),
+);
+
+const serviceRangeText = computed(() => {
+    // 完成页只展示村镇级(无则回退市+区县 / 截断地址)
+    const addr =
+        display.value.townName ||
+        display.value.address ||
+        "";
+    const km = display.value.radiusKm ?? 30;
+    if (!addr) return `半径 ${km} 公里`;
+    const short = addr.length > 18 ? `${addr.slice(0, 18)}…` : addr;
+    return `${short} · ${km}公里`;
+});
+
+// ---------------------------------------------------------------------------
+// 生命周期
+// ---------------------------------------------------------------------------
+onMounted(() => {
+    sessionSummary.value = buildFromSession();
+});
+</script>
+
+<style lang="scss" scoped>
+.service-complete {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    padding: 0 16px calc(22px + env(safe-area-inset-bottom));
+    
+    background: #0b0b0b url("@/assets/img/farm/light-bg.png") no-repeat top center / 100% auto;
+    color: #fff;
+    overflow-y: auto;
+
+    &__hero {
+        position: relative;
+        padding: 12px 0 20px;
+        text-align: center;
+    }
+
+    &__badge {
+        position: absolute;
+        top: 0;
+        left: 50%;
+        transform: translateX(-50%);
+        width: 261px;
+        height: 202px;
+        object-fit: contain;
+    }
+
+    &__title {
+        padding-top: 156px;
+        font-size: 28px;
+        line-height: 32px;
+        font-family: "PangMenZhengDao";
+    }
+
+    &__subtitle {
+        margin-top: 5px;
+        font-size: 14px;
+        color: rgba(255, 255, 255, 0.6);
+    }
+
+    &__card {
+        padding: 10px;
+        border-radius: 16px;
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.1);
+    }
+
+    .card-head {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        gap: 12px;
+        margin-bottom: 12px;
+        padding-bottom: 12px;
+        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
+    }
+
+    .team-name {
+        font-size: 16px;
+        line-height: 24px;
+    }
+
+    .status-badge {
+        display: inline-flex;
+        gap: 3px;
+        align-items: center;
+        flex-shrink: 0;
+        padding: 0 6px;
+        height: 20px;
+        line-height: 20px;
+        border-radius: 4px;
+        font-size: 12px;
+        color: #7FD8A6;
+        background: #1E4A33;
+        border: 1px solid rgba(63, 160, 110, 0.4);
+    }
+
+    .info-row {
+        display: flex;
+        align-items: flex-start;
+        justify-content: space-between;
+        gap: 12px;
+        padding: 10px 0;
+        font-size: 14px;
+        line-height: 22px;
+
+        .label {
+            flex-shrink: 0;
+            color: rgba(255, 255, 255, 0.5);
+        }
+
+        .value {
+            text-align: right;
+            color: rgba(255, 255, 255, 0.92);
+
+            &--tags {
+                display: inline-flex;
+                flex-wrap: wrap;
+                align-items: center;
+                justify-content: flex-end;
+                gap: 6px;
+                max-width: 70%;
+            }
+        }
+
+        .more-tag {
+            display: inline-flex;
+            align-items: center;
+            flex-shrink: 0;
+            padding: 0 6px;
+            height: 20px;
+            border-radius: 4px;
+            font-size: 12px;
+            line-height: 20px;
+            color: rgba(255, 255, 255, 0.7);
+            background: rgba(255, 255, 255, 0.1);
+            border: 1px solid rgba(255, 255, 255, 0.12);
+        }
+    }
+
+    &__footer {
+        margin-top: auto;
+        padding-top: 28px;
+        display: flex;
+        gap: 12px;
+    }
+
+    .action-btn {
+        flex: 1;
+        height: 48px;
+        border-radius: 12px;
+        font-size: 16px;
+        font-weight: 500;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        cursor: pointer;
+
+        &.ghost {
+            background: #2a2a2a;
+            color: #fff;
+        }
+
+        &.primary {
+            background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
+            color: #1a1a1a;
+        }
+    }
+}
+</style>

+ 658 - 0
src/views/old_mini/entry_information_service/components/serviceEquipment.vue

@@ -0,0 +1,658 @@
+<template>
+    <div class="service-equipment">
+        <div class="service-equipment__content">
+            <div class="page-header">
+                <div class="page-title">你们拥有哪些农机?</div>
+                <div class="page-subtitle">让调度更精准(可多选)</div>
+            </div>
+
+            <div v-if="showScopeTabs" class="tab-pills">
+                <div
+                    v-for="tab in scopeTabs"
+                    :key="tab.key"
+                    class="tab-pill"
+                    :class="{ active: activeScope === tab.key }"
+                    @click="handleScopeChange(tab.key)"
+                >
+                    {{ tab.label }}
+                </div>
+            </div>
+
+            <div class="toolbar">
+                <div class="search-bar">
+                    <el-icon class="search-icon">
+                        <Search />
+                    </el-icon>
+                    <input
+                        v-model="searchKeyword"
+                        class="search-input"
+                        type="text"
+                        placeholder="请输入农机名称"
+                        @keyup.enter="handleSearch"
+                    />
+                </div>
+                <div class="add-btn" @click="showAddPopup = true">+ 添加农机</div>
+            </div>
+
+            <div
+                class="equipment-list"
+                v-loading="loading"
+                element-loading-background="rgba(15, 15, 15, 0.55)"
+            >
+                <div v-for="group in displayGroups" :key="group.name" class="equipment-card">
+                    <div class="section-title">
+                        <img class="title-icon" src="@/assets/img/home/label-icon.png" alt="" />
+                        <span>{{ group.name }}</span>
+                    </div>
+                    <div class="tag-group">
+                        <div
+                            v-for="item in group.items"
+                            :key="item.id"
+                            class="tag-item"
+                            :class="{ selected: selectedIds.has(String(item.id)) }"
+                            @click="toggleSelect(item)"
+                        >
+                            <span class="text">{{ item.name }}</span>
+                        </div>
+                    </div>
+                </div>
+                <div v-if="!loading && !displayGroups.length" class="empty-tip">暂无匹配农机</div>
+            </div>
+        </div>
+
+        <div class="service-equipment__footer">
+            <div class="action-btns">
+                <div class="action-btn secondary" @click="emit('prev')">上一步</div>
+                <div class="action-btn primary" @click="handleConfirm">确认</div>
+            </div>
+        </div>
+
+        <Popup v-model:show="showAddPopup" round closeable class="add-machine-popup">
+            <div class="add-machine-popup__content">
+                <div class="popup-title">添加农机</div>
+                <input v-model="newMachineName" class="popup-input" placeholder="请输入农机名称" />
+                <div class="popup-confirm" @click="handleAddConfirm">确认</div>
+            </div>
+        </Popup>
+    </div>
+</template>
+
+<script setup>
+import { computed, onMounted, reactive, ref } from "vue";
+import { ElMessage } from "element-plus";
+import { Search } from "@element-plus/icons-vue";
+import { Popup } from "vant";
+
+// ---------------------------------------------------------------------------
+// Emits
+// ---------------------------------------------------------------------------
+const emit = defineEmits(["prev", "next"]);
+
+// ---------------------------------------------------------------------------
+// 常量
+// ---------------------------------------------------------------------------
+const SESSION = {
+    EQUIPMENT: "SERVICE_ENTRY_EQUIPMENT",
+    CATEGORY: "SERVICE_ENTRY_CATEGORY",
+};
+const CUSTOM_GROUP_NAME = "我的农机";
+const CUSTOM_MACHINE_ID_START = 9000;
+/** 有两类时:大田类在前,果树类在后 */
+const SCOPE_TABS = [
+    { key: "field", label: "大田类" },
+    { key: "fruit", label: "果树类" },
+];
+
+// ---------------------------------------------------------------------------
+// 页面状态
+// ---------------------------------------------------------------------------
+const loading = ref(false);
+const searchKeyword = ref("");
+const appliedKeyword = ref("");
+const selectedIds = reactive(new Set());
+const equipmentGroups = ref([]);
+const showAddPopup = ref(false);
+const newMachineName = ref("");
+const hasField = ref(false);
+const hasFruit = ref(false);
+const activeScope = ref("field");
+let customMachineId = CUSTOM_MACHINE_ID_START;
+
+// ---------------------------------------------------------------------------
+// 计算属性
+// ---------------------------------------------------------------------------
+const showScopeTabs = computed(() => hasField.value && hasFruit.value);
+const scopeTabs = computed(() => {
+    if (!showScopeTabs.value) return [];
+    return SCOPE_TABS;
+});
+
+const allEquipmentItems = computed(() =>
+    equipmentGroups.value.flatMap((group) => group.items)
+);
+
+const displayGroups = computed(() => {
+    const keyword = appliedKeyword.value.trim();
+    if (!keyword) return equipmentGroups.value;
+    return equipmentGroups.value
+        .map((group) => ({
+            ...group,
+            items: group.items.filter((item) => item.name.includes(keyword)),
+        }))
+        .filter((group) => group.items.length);
+});
+
+// ---------------------------------------------------------------------------
+// 工具函数
+// ---------------------------------------------------------------------------
+function readJson(key) {
+    try {
+        const raw = sessionStorage.getItem(key);
+        return raw ? JSON.parse(raw) : null;
+    } catch {
+        return null;
+    }
+}
+
+function isFieldCategory(item) {
+    return item?.firstCrop === "大田" || item?.majorKey === "field";
+}
+
+function isFruitCategory(item) {
+    return item?.firstCrop === "果树" || item?.majorKey === "fruit";
+}
+
+function resolveCategoryScopes() {
+    const list = readJson(SESSION.CATEGORY);
+    const categories = Array.isArray(list) ? list : [];
+    hasField.value = categories.some(isFieldCategory);
+    hasFruit.value = categories.some(isFruitCategory);
+    if (hasField.value) activeScope.value = "field";
+    else if (hasFruit.value) activeScope.value = "fruit";
+    else activeScope.value = "field";
+}
+
+function getCurrentScope() {
+    if (showScopeTabs.value) return activeScope.value;
+    if (hasFruit.value && !hasField.value) return "fruit";
+    if (hasField.value) return "field";
+    return "field";
+}
+
+function getCategoryForScope(scope = getCurrentScope()) {
+    const list = readJson(SESSION.CATEGORY);
+    const categories = Array.isArray(list) ? list : [];
+    if (scope === "fruit") return categories.find(isFruitCategory) || null;
+    return categories.find(isFieldCategory) || categories[0] || null;
+}
+
+function mapMachinesToGroups(machines) {
+    if (!Array.isArray(machines)) return [];
+    return machines
+        .map((group) => ({
+            name: group.stage || "",
+            items: (group.items || []).map((item) => ({
+                id: item.machine_id,
+                name: item.display_name || item.machine_name || "",
+                machineName: item.machine_name || "",
+            })),
+        }))
+        .filter((group) => group.name && group.items.length);
+}
+
+function isScopedCache(cached) {
+    return cached && !Array.isArray(cached) && (cached.field || cached.fruit);
+}
+
+function getScopeList(cached, scope) {
+    if (!cached) return [];
+    if (Array.isArray(cached)) return scope === "fruit" ? [] : cached;
+    return cached[scope] || [];
+}
+
+function findGroupByItemId(itemId) {
+    return equipmentGroups.value.find((group) =>
+        group.items.some((row) => String(row.id) === String(itemId))
+    );
+}
+
+function ensureCustomGroupTop() {
+    let customGroup = equipmentGroups.value.find((g) => g.name === CUSTOM_GROUP_NAME);
+    if (!customGroup) {
+        customGroup = { name: CUSTOM_GROUP_NAME, items: [] };
+        equipmentGroups.value.unshift(customGroup);
+        return customGroup;
+    }
+    const index = equipmentGroups.value.indexOf(customGroup);
+    if (index > 0) {
+        equipmentGroups.value.splice(index, 1);
+        equipmentGroups.value.unshift(customGroup);
+    }
+    return customGroup;
+}
+
+function buildSelectedPayload() {
+    const scope = getCurrentScope();
+    return allEquipmentItems.value
+        .filter((item) => selectedIds.has(String(item.id)))
+        .map((item) => ({
+            id: item.id,
+            name: item.name,
+            custom: !!item.custom,
+            scope,
+            groupName: findGroupByItemId(item.id)?.name,
+        }));
+}
+
+function saveSelection() {
+    const selected = buildSelectedPayload();
+    if (!showScopeTabs.value) {
+        sessionStorage.setItem(SESSION.EQUIPMENT, JSON.stringify(selected));
+        return;
+    }
+    const cached = readJson(SESSION.EQUIPMENT);
+    const next = isScopedCache(cached)
+        ? { field: cached.field || [], fruit: cached.fruit || [] }
+        : { field: Array.isArray(cached) ? cached : [], fruit: [] };
+    const scope = getCurrentScope();
+    if (scope === "fruit") next.fruit = selected;
+    else next.field = selected;
+    sessionStorage.setItem(SESSION.EQUIPMENT, JSON.stringify(next));
+}
+
+function restoreSelection() {
+    selectedIds.clear();
+    const cached = readJson(SESSION.EQUIPMENT);
+    const scope = getCurrentScope();
+    const list = showScopeTabs.value
+        ? getScopeList(cached, scope)
+        : Array.isArray(cached)
+          ? cached
+          : [...(cached?.field || []), ...(cached?.fruit || [])];
+
+    list.forEach((item) => {
+        if (item?.id == null) return;
+        selectedIds.add(String(item.id));
+        if (!item.custom) return;
+        const exists = allEquipmentItems.value.some(
+            (row) => String(row.id) === String(item.id)
+        );
+        if (exists) return;
+        const group =
+            equipmentGroups.value.find((g) => g.name === item.groupName) ||
+            ensureCustomGroupTop();
+        group.items.push({ id: item.id, name: item.name, custom: true });
+        if (Number(item.id) >= customMachineId) customMachineId = Number(item.id);
+    });
+}
+
+/** 切到果树:大田已选且果树列表里同 id / 同名的默认勾上 */
+function applyFieldOverlapSelection() {
+    if (getCurrentScope() !== "fruit" || !hasField.value) return;
+    const fieldList = getScopeList(readJson(SESSION.EQUIPMENT), "field");
+    if (!fieldList.length) return;
+
+    const fieldIds = new Set(
+        fieldList.filter((item) => item?.id != null).map((item) => String(item.id))
+    );
+    const fieldNames = new Set(fieldList.map((item) => item?.name).filter(Boolean));
+
+    let changed = false;
+    allEquipmentItems.value.forEach((item) => {
+        const id = String(item.id);
+        if (selectedIds.has(id)) return;
+        const matched =
+            fieldIds.has(id) ||
+            (item.name && fieldNames.has(item.name)) ||
+            (item.machineName && fieldNames.has(item.machineName));
+        if (!matched) return;
+        selectedIds.add(id);
+        changed = true;
+    });
+    if (changed) saveSelection();
+}
+
+// ---------------------------------------------------------------------------
+// 业务逻辑
+// ---------------------------------------------------------------------------
+async function fetchEquipmentList() {
+    const category = getCategoryForScope();
+    const cropId = category?.id;
+    if (cropId == null || cropId === "") {
+        equipmentGroups.value = [];
+        ElMessage.warning("请先选择种植品类");
+        return;
+    }
+    loading.value = true;
+    try {
+        const res = await VE_API.entry.getMachines({ crop_id: cropId });
+        if (res.code === 200) {
+            equipmentGroups.value = mapMachinesToGroups(res.data?.machines);
+            restoreSelection();
+            applyFieldOverlapSelection();
+        } else {
+            equipmentGroups.value = [];
+            ElMessage.error(res.msg || "获取农机列表失败");
+        }
+    } catch {
+        equipmentGroups.value = [];
+        ElMessage.error("获取农机列表失败,请稍后再试");
+    } finally {
+        loading.value = false;
+    }
+}
+
+const handleScopeChange = async (scope) => {
+    if (scope === activeScope.value) return;
+    saveSelection();
+    activeScope.value = scope;
+    searchKeyword.value = "";
+    appliedKeyword.value = "";
+    await fetchEquipmentList();
+};
+
+const handleSearch = () => {
+    appliedKeyword.value = searchKeyword.value.trim();
+};
+
+const toggleSelect = (item) => {
+    const id = String(item.id);
+    if (selectedIds.has(id)) selectedIds.delete(id);
+    else selectedIds.add(id);
+    saveSelection();
+};
+
+const handleAddConfirm = () => {
+    const machineName = String(newMachineName.value || "").trim();
+    if (!machineName) {
+        ElMessage.warning("请输入农机名称");
+        return;
+    }
+    const exists = allEquipmentItems.value.find((item) => item.name === machineName);
+    if (exists) {
+        selectedIds.add(String(exists.id));
+        saveSelection();
+        ElMessage.success("已选中该农机");
+        showAddPopup.value = false;
+        newMachineName.value = "";
+        return;
+    }
+    const customGroup = ensureCustomGroupTop();
+    const newItem = { id: ++customMachineId, name: machineName, custom: true };
+    customGroup.items.push(newItem);
+    selectedIds.add(String(newItem.id));
+    saveSelection();
+    showAddPopup.value = false;
+    newMachineName.value = "";
+    ElMessage.success("添加成功");
+};
+
+const handleConfirm = () => {
+    saveSelection();
+    // 双类时合并写入扁平列表,方便完成页汇总
+    if (showScopeTabs.value) {
+        const cached = readJson(SESSION.EQUIPMENT);
+        const field = getScopeList(cached, "field");
+        const fruit = getScopeList(cached, "fruit");
+        const merged = [];
+        const seen = new Set();
+        [...field, ...fruit].forEach((item) => {
+            const key = item?.id != null ? String(item.id) : item?.name;
+            if (!key || seen.has(key)) return;
+            seen.add(key);
+            merged.push(item);
+        });
+        sessionStorage.setItem(
+            SESSION.EQUIPMENT,
+            JSON.stringify({ field, fruit, merged })
+        );
+    }
+    emit("next");
+};
+
+onMounted(() => {
+    resolveCategoryScopes();
+    fetchEquipmentList();
+});
+</script>
+
+<style lang="scss" scoped>
+.service-equipment {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    background: #0f0f0f;
+    color: #fff;
+
+    &__content {
+        flex: 1;
+        overflow-y: auto;
+        padding: 0 16px 0;
+        min-height: 0;
+    }
+
+    &__footer {
+        flex-shrink: 0;
+        padding: 24px 24px calc(22px + env(safe-area-inset-bottom));
+    }
+
+    .page-header {
+        margin-bottom: 16px;
+
+        .page-title {
+            font-size: 20px;
+            line-height: 30px;
+        }
+
+        .page-subtitle {
+            margin-top: 2px;
+            font-size: 14px;
+            color: rgba(255, 255, 255, 0.6);
+        }
+    }
+
+    .tab-pills {
+        display: flex;
+        gap: 10px;
+        margin-bottom: 12px;
+    }
+
+    .tab-pill {
+        flex: 1;
+        height: 32px;
+        border-radius: 6px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 14px;
+        color: rgba(133, 133, 133, 1);
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.12);
+        cursor: pointer;
+        box-sizing: border-box;
+        line-height: 30px;
+
+        &.active {
+            color: #000000;
+            background: #ffd489;
+            border-color: #ffd489;
+        }
+    }
+
+    .toolbar {
+        display: flex;
+        align-items: center;
+        gap: 10px;
+        margin-bottom: 16px;
+    }
+
+    .search-bar {
+        flex: 1;
+        display: flex;
+        align-items: center;
+        height: 40px;
+        padding: 0 10px;
+        border-radius: 12px;
+        background: #1c1c1c;
+        border: 1px solid rgba(255, 255, 255, 0.12);
+
+        .search-icon {
+            color: rgba(255, 255, 255, 0.45);
+        }
+
+        .search-input {
+            flex: 1;
+            margin-left: 6px;
+            border: none;
+            outline: none;
+            background: transparent;
+            color: #fff;
+            font-size: 14px;
+        }
+    }
+
+    .add-btn {
+        flex-shrink: 0;
+        font-size: 14px;
+        cursor: pointer;
+        height: 36px;
+        padding: 0 10px;
+        border-radius: 6px;
+        background: rgba(255, 212, 137, 0.1);
+        border: 1px solid rgba(255, 212, 137, 1);
+        color: rgba(255, 212, 137, 1);
+        box-sizing: border-box;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+    }
+
+    .equipment-card {
+        margin-bottom: 16px;
+        padding: 14px;
+        border-radius: 12px;
+        background: rgba(255, 255, 255, 0.04);
+        border: 1px solid rgba(255, 255, 255, 0.08);
+    }
+
+    .section-title {
+        display: flex;
+        align-items: center;
+        gap: 5px;
+        margin-bottom: 2px;
+        font-size: 16px;
+        color: #FFD489;
+        font-weight: 500;
+
+        .title-icon {
+            width: 14px;
+        }
+    }
+
+    .tag-group {
+        display: grid;
+        grid-template-columns: repeat(3, 1fr);
+        gap: 0 8px;
+    }
+
+    .tag-item {
+        margin-top: 10px;
+        position: relative;
+        border-radius: 6px;
+        box-sizing: border-box;
+        min-height: 40px;
+        padding: 6px 4px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        text-align: center;
+        cursor: pointer;
+        color: rgba(255, 255, 255, 1);
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.12);
+
+        &.selected {
+            color: rgba(255, 212, 137, 1);
+            border-color: rgba(255, 212, 137, 1);
+            background: rgba(255, 212, 137, 0.05);
+        }
+    }
+
+    .empty-tip {
+        padding: 24px 0;
+        text-align: center;
+        color: rgba(255, 255, 255, 0.35);
+        font-size: 14px;
+    }
+
+    .action-btns {
+        display: flex;
+        gap: 12px;
+    }
+
+    .action-btn {
+        flex: 1;
+        height: 48px;
+        border-radius: 12px;
+        font-size: 16px;
+        font-weight: 500;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        cursor: pointer;
+
+        &.secondary {
+            background: #2a2a2a;
+            color: #fff;
+        }
+
+        &.primary {
+            background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
+            color: #1a1a1a;
+        }
+    }
+}
+
+.add-machine-popup {
+    width: 90%;
+}
+
+.add-machine-popup__content {
+    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
+    background: #1a1a1a;
+    color: #fff;
+
+    .popup-title {
+        font-size: 17px;
+        font-weight: 500;
+        margin-bottom: 16px;
+    }
+
+    .popup-input {
+        width: 100%;
+        height: 44px;
+        padding: 0 12px;
+        border-radius: 10px;
+        border: 1px solid rgba(255, 255, 255, 0.2);
+        background: #0f0f0f;
+        color: #fff;
+        font-size: 15px;
+        box-sizing: border-box;
+    }
+
+    .popup-confirm {
+        margin-top: 20px;
+        height: 48px;
+        border-radius: 12px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 16px;
+        font-weight: 500;
+        color: #1a1a1a;
+        background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
+        cursor: pointer;
+    }
+}
+</style>

+ 564 - 0
src/views/old_mini/entry_information_service/components/serviceLocation.vue

@@ -0,0 +1,564 @@
+<template>
+    <div class="service-location">
+        <div class="service-location__content">
+            <div class="page-header">
+                <div class="page-title">你们从哪里出发服务?</div>
+                <div class="page-subtitle">已自动定位,拖动地图可微调</div>
+            </div>
+
+            <div class="map-card">
+                <div class="map-card__map" @click.stop="goSelectLocation" ref="previewMapRef"></div>
+                <div class="map-card__locate" @click.stop="handleRelocate">
+                    <img class="locate-crosshair__icon" src="@/assets/img/home/current.png" alt="" />
+                </div>
+                <div class="map-card__address">
+                    <el-icon size="18" color="rgba(255, 255, 255, 0.6)"><Location /></el-icon>
+                    <div class="address-text">
+                        <div class="address-name">{{ locationAddress || "定位中..." }}</div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="radius-section">
+                <div class="radius-title">服务半径</div>
+                <div class="radius-chips">
+                    <div
+                        v-for="km in RADIUS_OPTIONS"
+                        :key="km"
+                        class="radius-chip"
+                        :class="{ selected: radiusKm === km }"
+                        @click="radiusKm = km"
+                    >
+                        {{ km }}
+                        <span class="chip-unit">公里</span>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <div class="service-location__footer">
+            <div class="action-btns">
+                <div class="action-btn secondary" @click="handleRelocate">重新定位</div>
+                <div class="action-btn primary" @click="handleConfirm">就是这里</div>
+            </div>
+            <div class="search-link" @click="goSelectLocation">
+                <span class="search-link__dot" />
+                <span>位置不对?搜索地址</span>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import { nextTick, onActivated, onBeforeUnmount, onMounted, ref, watch } from "vue";
+import { useRouter } from "vue-router";
+import { useStore } from "vuex";
+import { ElMessage } from "element-plus";
+import { Location } from "@element-plus/icons-vue";
+import { convertPointToArray } from "@/utils/index";
+import { fetchRegeo } from "@/utils/tiandituLocation";
+import SelectLocationMap, { POINT_ICON } from "../../entry_information/map/selectLocationMap.js";
+
+// ---------------------------------------------------------------------------
+// Emits
+// ---------------------------------------------------------------------------
+const emit = defineEmits(["prev", "next"]);
+
+// ---------------------------------------------------------------------------
+// 常量
+// ---------------------------------------------------------------------------
+const DRAFT_KEY = "SERVICE_ENTRY_LOCATION";
+const DEFAULT_POINT = "POINT(113.6142086995688 23.585836479509055)";
+const RADIUS_OPTIONS = [10, 30, 50];
+
+// ---------------------------------------------------------------------------
+// 页面状态
+// ---------------------------------------------------------------------------
+const router = useRouter();
+const store = useStore();
+const previewMapRef = ref(null);
+const locationAddress = ref("");
+const locationPoint = ref("");
+const locationAdcode = ref("");
+const locationCountyAddress = ref("");
+/** 村镇级名称(逆地理 address_component.townName) */
+const locationTownName = ref("");
+const radiusKm = ref(30);
+let previewMap = null;
+let addressReqId = 0;
+
+// ---------------------------------------------------------------------------
+// 工具函数
+// ---------------------------------------------------------------------------
+function getDefaultPoint() {
+    return (
+        localStorage.getItem("MINI_USER_LOCATION_POINT") ||
+        store.state.home.miniUserLocationPoint ||
+        DEFAULT_POINT
+    );
+}
+
+function readJson(key) {
+    try {
+        const raw = sessionStorage.getItem(key);
+        return raw ? JSON.parse(raw) : null;
+    } catch {
+        return null;
+    }
+}
+
+function toPointWkt(coordinate) {
+    return `POINT(${Number(coordinate[0])} ${Number(coordinate[1])})`;
+}
+
+function isPendingAddress(address) {
+    return !address || address === "定位中...";
+}
+
+function saveDraft(point, coordinate, address = "", adcode = "", countyAddress = "", townName = "") {
+    const prev = readJson(DRAFT_KEY) || {};
+    const nextAddress = address || locationAddress.value || "";
+    // 空地址 / 「定位中...」不覆盖草稿里已有的正式地址
+    const resolvedAddress = isPendingAddress(nextAddress)
+        ? prev.address && !isPendingAddress(prev.address)
+            ? prev.address
+            : nextAddress
+        : nextAddress;
+    const resolvedAdcode = adcode || locationAdcode.value || prev.adcode || "";
+    const resolvedCounty =
+        countyAddress || locationCountyAddress.value || prev.county_address || "";
+    const resolvedTown =
+        townName || locationTownName.value || prev.townName || "";
+    sessionStorage.setItem(
+        DRAFT_KEY,
+        JSON.stringify({
+            point,
+            coordinate: coordinate?.length
+                ? [Number(coordinate[0]), Number(coordinate[1])]
+                : convertPointToArray(point).map(Number),
+            address: resolvedAddress,
+            adcode: resolvedAdcode,
+            county_address: resolvedCounty,
+            townName: resolvedTown,
+            radiusKm: radiusKm.value,
+        })
+    );
+}
+
+async function fetchLocationAddress(point) {
+    const coordinate = convertPointToArray(point);
+    if (!coordinate?.length) return;
+    const reqId = ++addressReqId;
+    try {
+        const { result } = await fetchRegeo({ lng: coordinate[0], lat: coordinate[1] });
+        if (reqId !== addressReqId) return;
+        const address =
+            result?.formatted_addresses?.recommend ||
+            result?.address ||
+            (result?.address_component
+                ? `${result.address_component.city || ""}${result.address_component.district || ""}${result.address_component.street || ""}`
+                : "");
+        const adcode = result?.ad_info?.adcode;
+        const townName = result?.address_component?.townName || "";
+        locationAddress.value = address || locationAddress.value;
+        locationAdcode.value = adcode != null && adcode !== "" ? String(adcode) : locationAdcode.value;
+        locationCountyAddress.value = result?.county_address || locationCountyAddress.value;
+        if (townName) locationTownName.value = townName;
+        saveDraft(
+            point,
+            coordinate,
+            locationAddress.value,
+            locationAdcode.value,
+            locationCountyAddress.value,
+            locationTownName.value
+        );
+    } catch {
+        // 逆地理失败时保留已有文案
+    }
+}
+
+function onMapClick(coordinate) {
+    if (!coordinate?.length) return;
+    const point = toPointWkt(coordinate);
+    locationAddress.value = "定位中...";
+    locationAdcode.value = "";
+    locationTownName.value = "";
+    locationPoint.value = point;
+    saveDraft(point, coordinate);
+    fetchLocationAddress(point);
+}
+
+function refreshMapSize() {
+    nextTick(() => {
+        previewMap?.kmap?.map?.updateSize?.();
+        setTimeout(() => previewMap?.kmap?.map?.updateSize?.(), 120);
+    });
+}
+
+function initPreviewMap(point) {
+    if (!previewMapRef.value || !point) return;
+    if (!previewMap) {
+        previewMap = new SelectLocationMap({
+            iconSrc: POINT_ICON.current,
+            onMapClick,
+        });
+        previewMap.initMap(point, previewMapRef.value, {
+            enableClick: true,
+            showPoint: true,
+        });
+        refreshMapSize();
+        return;
+    }
+    if (previewMap.kmap) {
+        const coordinate = convertPointToArray(point).map(Number);
+        if (coordinate?.length) previewMap.showPoint(coordinate);
+        refreshMapSize();
+        return;
+    }
+    previewMap.initMap(point, previewMapRef.value, {
+        enableClick: true,
+        showPoint: true,
+    });
+    refreshMapSize();
+}
+
+function applyPoint(point, address = "", adcode = "", countyAddress = "", townName = "") {
+    if (!point) return;
+    locationPoint.value = point;
+    // 有正式地址立刻回填,避免切步回来先空白
+    if (!isPendingAddress(address)) {
+        locationAddress.value = address;
+    } else if (!locationAddress.value) {
+        locationAddress.value = address || "定位中...";
+    }
+    if (adcode) locationAdcode.value = String(adcode);
+    if (countyAddress) locationCountyAddress.value = String(countyAddress);
+    if (townName) locationTownName.value = String(townName);
+    nextTick(() => {
+        initPreviewMap(point);
+        // 缺正式地址或村镇名时补一次逆地理
+        if (
+            (isPendingAddress(address) && isPendingAddress(locationAddress.value)) ||
+            !locationTownName.value
+        ) {
+            fetchLocationAddress(point);
+            return;
+        }
+        saveDraft(
+            point,
+            convertPointToArray(point),
+            locationAddress.value,
+            locationAdcode.value,
+            locationCountyAddress.value,
+            locationTownName.value
+        );
+    });
+}
+
+function syncFromSession() {
+    const saved = readJson(DRAFT_KEY) || {};
+    const resident = readJson("ENTRY_RESIDENT_LOCATION");
+    if (saved.radiusKm != null) {
+        radiusKm.value = Number(saved.radiusKm) || 30;
+    }
+
+    // 选点页改了坐标才用 resident;否则优先本流程草稿(避免空地址覆盖)
+    const residentChanged =
+        resident?.point &&
+        (!saved?.point || String(resident.point) !== String(saved.point));
+
+    if (residentChanged) {
+        const address =
+            resident.address ||
+            (String(resident.point) === String(saved.point) ? saved.address : "") ||
+            "";
+        applyPoint(
+            resident.point,
+            address,
+            resident.adcode || saved.adcode || "",
+            resident.county_address || saved.county_address || "",
+            resident.townName || saved.townName || ""
+        );
+        return;
+    }
+
+    if (saved?.point) {
+        applyPoint(
+            saved.point,
+            saved.address || "",
+            saved.adcode || "",
+            saved.county_address || "",
+            saved.townName || ""
+        );
+        return;
+    }
+
+    if (resident?.point) {
+        applyPoint(
+            resident.point,
+            resident.address || "",
+            resident.adcode || "",
+            resident.county_address || "",
+            resident.townName || ""
+        );
+        return;
+    }
+
+    applyPoint(getDefaultPoint());
+}
+
+// ---------------------------------------------------------------------------
+// 事件处理
+// ---------------------------------------------------------------------------
+const handleRelocate = () => {
+    applyPoint(getDefaultPoint());
+};
+
+const goSelectLocation = () => {
+    const mapCenter = locationPoint.value || getDefaultPoint();
+    const coordinate = convertPointToArray(mapCenter);
+    saveDraft(mapCenter, coordinate);
+    router.push({
+        path: "/entry_select_location",
+        query: { mapCenter },
+    });
+};
+
+const handleConfirm = () => {
+    const point = locationPoint.value || getDefaultPoint();
+    if (!point) {
+        ElMessage.warning("请选择服务出发位置");
+        return;
+    }
+    const coordinate = convertPointToArray(point).map(Number);
+    const address = locationAddress.value;
+    const adcode = locationAdcode.value;
+    const countyAddress = locationCountyAddress.value;
+    const townName = locationTownName.value;
+    saveDraft(point, coordinate, address, adcode, countyAddress, townName);
+    // 与选点页共用缓存对齐,避免返回本步时被空 resident 冲掉
+    sessionStorage.setItem(
+        "ENTRY_RESIDENT_LOCATION",
+        JSON.stringify({
+            point,
+            coordinate,
+            address: isPendingAddress(address) ? "" : address,
+            adcode: adcode || "",
+            county_address: countyAddress || "",
+            townName: townName || "",
+        })
+    );
+    emit("next");
+};
+
+watch(radiusKm, () => {
+    if (!locationPoint.value) return;
+    saveDraft(
+        locationPoint.value,
+        convertPointToArray(locationPoint.value),
+        locationAddress.value,
+        locationAdcode.value,
+        locationCountyAddress.value,
+        locationTownName.value
+    );
+});
+
+onMounted(syncFromSession);
+onActivated(syncFromSession);
+onBeforeUnmount(() => {
+    // 进度条切走时也落盘,避免回来丢地址
+    if (locationPoint.value) {
+        saveDraft(
+            locationPoint.value,
+            convertPointToArray(locationPoint.value),
+            locationAddress.value,
+            locationAdcode.value,
+            locationCountyAddress.value,
+            locationTownName.value
+        );
+    }
+    previewMap?.clearLayer();
+    previewMap = null;
+});
+</script>
+
+<style lang="scss" scoped>
+.service-location {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    background: #141414;
+    color: #fff;
+
+    &__content {
+        overflow-y: auto;
+        padding: 0 16px 0;
+        min-height: 0;
+    }
+
+    &__footer {
+        flex-shrink: 0;
+        padding: 16px 24px calc(22px + env(safe-area-inset-bottom));
+    }
+
+    .page-header {
+        margin-bottom: 15px;
+
+        .page-title {
+            font-size: 20px;
+            line-height: 30px;
+        }
+
+        .page-subtitle {
+            margin-top: 2px;
+            font-size: 14px;
+            color: rgba(255, 255, 255, 0.6);
+        }
+    }
+
+    .map-card {
+        position: relative;
+        min-height: 280px;
+        height: 310px;
+        border-radius: 16px;
+        overflow: hidden;
+        background: #1a1a1a;
+
+        &__map {
+            width: 100%;
+            height: 310px;
+        }
+
+        &__locate {
+            position: absolute;
+            top: 16px;
+            right: 12px;
+            z-index: 2;
+            width: 31px;
+            height: 31px;
+            border-radius: 10px;
+            border: 1px solid rgba(255, 255, 255, 0.12);
+            background: rgba(20, 20, 20, 0.8);
+            display: flex;
+            align-items: center;
+            justify-content: center;
+        }
+
+        .locate-crosshair__icon {
+            width: 18px;
+        }
+
+        &__address {
+            position: absolute;
+            left: 12px;
+            right: 12px;
+            bottom: 16px;
+            z-index: 2;
+            display: flex;
+            align-items: center;
+            gap: 10px;
+            padding: 10px 14px;
+            border-radius: 12px;
+            border: 1px solid rgba(255, 255, 255, 0.12);
+            background: rgba(20, 20, 22, 0.8);
+        }
+
+        .address-name {
+            font-size: 16px;
+            line-height: 24px;
+        }
+    }
+
+    .radius-section {
+        margin-top: 20px;
+        padding-bottom: 8px;
+    }
+
+    .radius-title {
+        font-size: 16px;
+        margin-bottom: 12px;
+    }
+
+    .radius-chips {
+        display: flex;
+        gap: 10px;
+    }
+
+    .radius-chip {
+        flex: 1;
+        height: 55px;
+        border-radius: 12px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 20px;
+        font-weight: 600;
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.12);
+        cursor: pointer;
+        .chip-unit {
+            font-size: 12px;
+            color: rgba(255, 255, 255, 0.6);
+        }
+
+        &.selected {
+            color: rgba(255, 212, 137, 1);
+            background: rgba(255, 212, 137, 0.1);
+            border-color: rgba(255, 212, 137, 1);
+            .chip-unit {
+                color: rgba(255, 212, 137, 1);
+            }
+        }
+    }
+
+    .action-btns {
+        display: flex;
+        gap: 12px;
+
+        &.step-nav {
+            margin-top: 12px;
+        }
+    }
+
+    .action-btn {
+        flex: 1;
+        height: 48px;
+        border-radius: 12px;
+        font-size: 16px;
+        font-weight: 500;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        cursor: pointer;
+
+        &.secondary {
+            background: #2a2a2a;
+            color: #fff;
+        }
+
+        &.primary {
+            background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
+            color: #1a1a1a;
+        }
+    }
+
+    .search-link {
+        margin-top: 12px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        gap: 6px;
+        font-size: 14px;
+        color: rgba(255, 255, 255, 0.5);
+        cursor: pointer;
+
+        &__dot {
+            width: 9px;
+            height: 9px;
+            border: 1.5px solid rgba(255, 255, 255, 0.5);
+            border-radius: 50%;
+        }
+    }
+}
+</style>

+ 406 - 0
src/views/old_mini/entry_information_service/components/serviceManual.vue

@@ -0,0 +1,406 @@
+<template>
+    <div class="service-manual">
+        <div class="service-manual__content">
+            <div class="page-header">
+                <div class="page-title">你们可以提供哪些人工服务?</div>
+                <div class="page-subtitle">为你精准匹配农事</div>
+            </div>
+
+            <div v-if="visibleTabs.length > 1" class="tab-pills">
+                <div
+                    v-for="tab in visibleTabs"
+                    :key="tab.key"
+                    class="tab-pill"
+                    :class="{ active: activeTab === tab.key }"
+                    @click="handleTabChange(tab.key)"
+                >
+                    {{ tab.label }}
+                </div>
+            </div>
+
+            <div class="task-card" v-if="activeTab === 'field'">
+                <div class="tag-group">
+                    <div v-for="item in fieldTaskList" :key="item.id" class="tag-item"
+                        :class="{ selected: selectedIds.has(String(item.id)) }" @click="toggleSelect(item)">
+                        {{ item.name }}
+                    </div>
+                </div>
+            </div>
+
+            <div v-else class="fruit-list">
+                <div v-for="group in fruitGroups" :key="group.name" class="task-card fruit-card">
+                    <div class="section-title">
+                        <img class="title-icon" src="@/assets/img/home/label-icon.png" alt="" />
+                        <span>{{ group.name }}</span>
+                    </div>
+                    <div class="tag-group">
+                        <div v-for="item in group.items" :key="item.id" class="tag-item"
+                            :class="{ selected: selectedIds.has(String(item.id)) }" @click="toggleSelect(item)">
+                            {{ item.name }}
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <div class="service-manual__footer">
+            <div class="action-btns">
+                <div class="action-btn secondary" @click="emit('prev')">上一步</div>
+                <div class="action-btn primary" @click="handleConfirm">确认</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import { computed, onMounted, reactive, ref } from "vue";
+
+// ---------------------------------------------------------------------------
+// Emits
+// ---------------------------------------------------------------------------
+const emit = defineEmits(["prev", "complete"]);
+
+// ---------------------------------------------------------------------------
+// 常量
+// ---------------------------------------------------------------------------
+const DRAFT_KEY = "SERVICE_ENTRY_MANUAL";
+const CATEGORY_KEY = "SERVICE_ENTRY_CATEGORY";
+
+const FIELD_TASKS = [
+    { id: 1, name: "人工补苗", scope: "field" },
+    { id: 2, name: "人工授粉", scope: "field" },
+    { id: 3, name: "人工除草", scope: "field" },
+    { id: 4, name: "清沟修渠", scope: "field" },
+    { id: 5, name: "排水晒田", scope: "field" },
+    { id: 6, name: "甘蔗砍收", scope: "field" },
+    { id: 7, name: "棉花采摘", scope: "field" },
+];
+
+const FRUIT_GROUPS = [
+    {
+        name: "树体管理",
+        items: [
+            { id: 201, name: "整形修剪", scope: "fruit" },
+            { id: 202, name: "嫁接", scope: "fruit" },
+            { id: 203, name: "环割环剥", scope: "fruit" },
+            { id: 204, name: "枝梢管理", scope: "fruit" },
+        ],
+    },
+    {
+        name: "花果管理",
+        items: [
+            { id: 301, name: "疏花疏果", scope: "fruit" },
+            { id: 302, name: "果实套袋", scope: "fruit" },
+            { id: 303, name: "人工授粉", scope: "fruit" },
+            { id: 304, name: "果实增色", scope: "fruit" },
+        ],
+    },
+    {
+        name: "采收与园地管理",
+        items: [
+            { id: 401, name: "人工采摘", scope: "fruit" },
+            { id: 402, name: "清园", scope: "fruit" },
+            { id: 403, name: "清沟修渠", scope: "fruit" },
+            { id: 404, name: "摇花抖水", scope: "fruit" },
+            { id: 405, name: "葡萄绑蔓/夏剪", scope: "fruit" },
+            { id: 406, name: "防寒保暖", scope: "fruit" },
+        ],
+    },
+    {
+        name: "其他人工服务",
+        items: [
+            { id: 501, name: "补植/定植", scope: "fruit" },
+            { id: 502, name: "行间中耕松土", scope: "fruit" },
+        ],
+    },
+];
+
+// ---------------------------------------------------------------------------
+// 页面状态
+// ---------------------------------------------------------------------------
+const selectedIds = reactive(new Set());
+const fieldTaskList = ref(FIELD_TASKS.map((item) => ({ ...item })));
+const fruitGroups = ref(
+    FRUIT_GROUPS.map((group) => ({
+        name: group.name,
+        items: group.items.map((item) => ({ ...item })),
+    }))
+);
+const hasField = ref(false);
+const hasFruit = ref(false);
+const activeTab = ref("field");
+
+// ---------------------------------------------------------------------------
+// 计算属性
+// ---------------------------------------------------------------------------
+const visibleTabs = computed(() => {
+    const tabs = [];
+    if (hasField.value) tabs.push({ key: "field", label: "大田类" });
+    if (hasFruit.value) tabs.push({ key: "fruit", label: "果树类" });
+    if (!tabs.length) {
+        return [
+            { key: "field", label: "大田类" },
+            { key: "fruit", label: "果树类" },
+        ];
+    }
+    return tabs;
+});
+
+// ---------------------------------------------------------------------------
+// 工具函数
+// ---------------------------------------------------------------------------
+function readJson(key) {
+    try {
+        const raw = sessionStorage.getItem(key);
+        return raw ? JSON.parse(raw) : null;
+    } catch {
+        return null;
+    }
+}
+
+const allFruitTasks = computed(() => fruitGroups.value.flatMap((group) => group.items));
+
+function refreshCropFlags() {
+    const list = readJson(CATEGORY_KEY);
+    const items = Array.isArray(list) ? list : [];
+    hasField.value = items.some(
+        (item) => item?.firstCrop === "大田" || item?.majorKey === "field"
+    );
+    hasFruit.value = items.some(
+        (item) => item?.firstCrop === "果树" || item?.majorKey === "fruit"
+    );
+    if (hasField.value && !hasFruit.value) activeTab.value = "field";
+    else if (hasFruit.value && !hasField.value) activeTab.value = "fruit";
+}
+
+function saveSelection() {
+    const field = fieldTaskList.value
+        .filter((item) => selectedIds.has(String(item.id)))
+        .map((item) => ({ id: item.id, name: item.name, scope: "field" }));
+    const fruit = allFruitTasks.value
+        .filter((item) => selectedIds.has(String(item.id)))
+        .map((item) => ({ id: item.id, name: item.name, scope: "fruit" }));
+    sessionStorage.setItem(DRAFT_KEY, JSON.stringify([...field, ...fruit]));
+}
+
+function restoreSelection() {
+    const cached = readJson(DRAFT_KEY);
+    const list = Array.isArray(cached) ? cached : [];
+    list.forEach((item) => {
+        if (item?.id != null) selectedIds.add(String(item.id));
+    });
+}
+
+function getSelectedFieldNames() {
+    return new Set(
+        fieldTaskList.value
+            .filter((item) => selectedIds.has(String(item.id)))
+            .map((item) => item.name)
+            .filter(Boolean)
+    );
+}
+
+/** 大田已选、果树侧同名项默认勾上(id 不同,按 name 对齐) */
+function applyFieldOverlapToFruit() {
+    if (!hasFruit.value) return;
+    const fieldNames = getSelectedFieldNames();
+    if (!fieldNames.size) return;
+    let changed = false;
+    allFruitTasks.value.forEach((item) => {
+        if (!item?.name || !fieldNames.has(item.name)) return;
+        const id = String(item.id);
+        if (selectedIds.has(id)) return;
+        selectedIds.add(id);
+        changed = true;
+    });
+    if (changed) saveSelection();
+}
+
+function syncFruitByFieldName(name, selected) {
+    if (!name) return;
+    allFruitTasks.value.forEach((item) => {
+        if (item?.name !== name) return;
+        const id = String(item.id);
+        if (selected) selectedIds.add(id);
+        else selectedIds.delete(id);
+    });
+}
+
+const handleTabChange = (key) => {
+    if (key === activeTab.value) return;
+    activeTab.value = key;
+    if (key === "fruit") applyFieldOverlapToFruit();
+};
+
+const toggleSelect = (item) => {
+    const id = String(item.id);
+    const nextSelected = !selectedIds.has(id);
+    if (nextSelected) selectedIds.add(id);
+    else selectedIds.delete(id);
+
+    // 大田勾选/取消时,同步果树同名项
+    if (item?.scope === "field" || activeTab.value === "field") {
+        syncFruitByFieldName(item.name, nextSelected);
+    }
+    saveSelection();
+};
+
+const handleConfirm = () => {
+    applyFieldOverlapToFruit();
+    saveSelection();
+    emit("complete");
+};
+
+onMounted(() => {
+    refreshCropFlags();
+    restoreSelection();
+    applyFieldOverlapToFruit();
+});
+</script>
+
+<style lang="scss" scoped>
+.service-manual {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    background: #0f0f0f;
+    color: #fff;
+
+    &__content {
+        flex: 1;
+        overflow-y: auto;
+        padding: 0 16px 0;
+        min-height: 0;
+    }
+
+    &__footer {
+        flex-shrink: 0;
+        padding: 24px 24px calc(22px + env(safe-area-inset-bottom));
+    }
+
+    .page-header {
+        margin-bottom: 16px;
+
+        .page-title {
+            font-size: 20px;
+            line-height: 30px;
+        }
+
+        .page-subtitle {
+            margin-top: 2px;
+            font-size: 14px;
+            color: rgba(255, 255, 255, 0.6);
+        }
+    }
+
+    .tab-pills {
+        display: flex;
+        gap: 10px;
+        margin-bottom: 12px;
+    }
+
+    .tab-pill {
+        flex: 1;
+        height: 32px;
+        border-radius: 6px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 14px;
+        color: rgba(133, 133, 133, 1);
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.12);
+        cursor: pointer;
+        box-sizing: border-box;
+        line-height: 30px;
+
+        &.active {
+            color: #000000;
+            background: #FFD489;
+            border-color: #FFD489;
+        }
+    }
+
+    .task-card {
+        margin-bottom: 12px;
+        padding: 0 10px 10px;
+        border-radius: 12px;
+        background: rgba(255, 255, 255, 0.04);
+        border: 1px solid rgba(255, 255, 255, 0.08);
+        &.fruit-card {
+            padding: 10px;
+        }
+    }
+
+    .section-title {
+        display: flex;
+        align-items: center;
+        gap: 5px;
+        margin-bottom: 2px;
+        font-size: 16px;
+        color: #FFD489;
+        font-weight: 500;
+
+        .title-icon {
+            width: 14px;
+        }
+    }
+
+    .tag-group {
+        display: grid;
+        grid-template-columns: repeat(3, 1fr);
+        gap: 0 8px;
+    }
+
+    .tag-item {
+        margin-top: 10px;
+        position: relative;
+        border-radius: 6px;
+        box-sizing: border-box;
+        min-height: 40px;
+        padding: 6px 4px;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        text-align: center;
+        cursor: pointer;
+        color: rgba(255, 255, 255, 1);
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.12);
+
+        &.selected {
+            color: rgba(255, 212, 137, 1);
+            border-color: rgba(255, 212, 137, 1);
+            background: rgba(255, 212, 137, 0.05);
+        }
+    }
+
+    .action-btns {
+        display: flex;
+        gap: 12px;
+    }
+
+    .action-btn {
+        flex: 1;
+        height: 48px;
+        border-radius: 12px;
+        font-size: 16px;
+        font-weight: 500;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        cursor: pointer;
+
+        &.secondary {
+            background: #2a2a2a;
+            color: #fff;
+        }
+
+        &.primary {
+            background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
+            color: #1a1a1a;
+        }
+    }
+}
+</style>

+ 272 - 0
src/views/old_mini/entry_information_service/components/teamBasic.vue

@@ -0,0 +1,272 @@
+<template>
+    <div class="team-basic">
+        <div class="team-basic__content">
+            <div class="page-header">
+                <div class="page-title">你们团队叫什么?</div>
+                <div class="page-subtitle">农户在订单里会看到这个名字</div>
+            </div>
+            <div class="farm-name-input">
+                <input
+                    v-model="teamName"
+                    class="farm-name-input__field"
+                    type="text"
+                    maxlength="30"
+                    placeholder="请输入团队名称"
+                />
+                <el-icon v-if="teamName" class="farm-name-input__clear" @click="teamName = ''"><CircleCloseFilled /></el-icon>
+                <!-- <div v-if="teamName" class="farm-name-input__clear" @click="teamName = ''">×</div> -->
+            </div>
+
+            <div class="section-header">
+                <div class="section-title">团队类型</div>
+            </div>
+            <div class="type-grid">
+                <div
+                    v-for="item in TEAM_TYPES"
+                    :key="item.value"
+                    class="type-item"
+                    :class="{ selected: teamType === item.value }"
+                    @click="teamType = item.value"
+                >
+                    {{ item.label }}
+                </div>
+            </div>
+        </div>
+        <div class="team-basic__footer">
+            <div class="action-btns">
+                <!-- <div class="action-btn secondary" @click="handlePrev">上一步</div> -->
+                <div class="action-btn primary" @click="handleConfirm">确认</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import { onMounted, ref, watch } from "vue";
+import { ElMessage } from "element-plus";
+
+// ---------------------------------------------------------------------------
+// Emits
+// ---------------------------------------------------------------------------
+const emit = defineEmits(["prev", "next"]);
+
+// ---------------------------------------------------------------------------
+// 常量
+// ---------------------------------------------------------------------------
+const DRAFT_KEY = "SERVICE_ENTRY_BASIC";
+const TEAM_TYPES = [
+    { value: "machinery_coop", label: "农机专业合作社" },
+    { value: "grower", label: "种植大户兼营" },
+    { value: "family_farm", label: "家庭农场" },
+    { value: "agri_company", label: "农业公司" },
+    { value: "individual", label: "个体农机户" },
+    { value: "other", label: "其他" },
+];
+
+// ---------------------------------------------------------------------------
+// 页面状态
+// ---------------------------------------------------------------------------
+const teamName = ref("");
+const teamType = ref("");
+
+// ---------------------------------------------------------------------------
+// 工具函数
+// ---------------------------------------------------------------------------
+function readJson(key) {
+    try {
+        const raw = sessionStorage.getItem(key);
+        return raw ? JSON.parse(raw) : null;
+    } catch {
+        return null;
+    }
+}
+
+function saveDraft() {
+    const label = TEAM_TYPES.find((t) => t.value === teamType.value)?.label || "";
+    sessionStorage.setItem(
+        DRAFT_KEY,
+        JSON.stringify({
+            teamName: teamName.value.trim(),
+            teamType: teamType.value,
+            teamTypeLabel: label,
+        })
+    );
+}
+
+function restoreDraft() {
+    const draft = readJson(DRAFT_KEY);
+    if (!draft) return;
+    if (draft.teamName != null) teamName.value = String(draft.teamName);
+    if (draft.teamType) teamType.value = draft.teamType;
+}
+
+// ---------------------------------------------------------------------------
+// 事件处理
+// ---------------------------------------------------------------------------
+const handlePrev = () => {
+    saveDraft();
+    emit("prev");
+};
+
+const handleConfirm = () => {
+    const name = teamName.value.trim();
+    if (!name) {
+        ElMessage.warning("请输入团队名称");
+        return;
+    }
+    if (!teamType.value) {
+        ElMessage.warning("请选择团队类型");
+        return;
+    }
+    saveDraft();
+    emit("next");
+};
+
+watch([teamName, teamType], saveDraft);
+
+onMounted(restoreDraft);
+</script>
+
+<style lang="scss" scoped>
+.team-basic {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+    background: #141414;
+    color: #fff;
+
+    &__content {
+        flex: 1;
+        overflow-y: auto;
+        padding: 0px 20px 0;
+        min-height: 0;
+    }
+
+    &__footer {
+        flex-shrink: 0;
+        padding: 24px 24px calc(22px + env(safe-area-inset-bottom));
+    }
+
+    .page-header {
+        margin-bottom: 4px;
+
+        .page-title {
+            font-size: 20px;
+            line-height: 30px;
+        }
+
+        .page-subtitle {
+            margin-top: 2px;
+            font-size: 14px;
+            line-height: 20px;
+            color: rgba(255, 255, 255, 0.6);
+        }
+    }
+
+    .farm-name-input {
+        margin-top: 16px;
+        position: relative;
+        display: flex;
+        align-items: center;
+        height: 46px;
+        padding: 0 14px;
+        border-radius: 12px;
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.4);
+        box-sizing: border-box;
+
+        &__field {
+            flex: 1;
+            min-width: 0;
+            height: 100%;
+            border: none;
+            outline: none;
+            background: transparent;
+            color: #fff;
+            font-size: 15px;
+
+            &::placeholder {
+                color: rgba(255, 255, 255, 0.35);
+            }
+        }
+
+        &__clear {
+            color: rgba(255, 255, 255, 0.2);
+            font-size: 18px;
+            flex-shrink: 0;
+            margin-left: 8px;
+            cursor: pointer;
+        }
+    }
+    .section-header {
+        margin-top: 20px;
+        display: flex;
+        align-items: baseline;
+        gap: 8px;
+        margin-bottom: 12px;
+
+        .section-title {
+            font-size: 16px;
+        }
+
+        .section-hint {
+            font-size: 13px;
+            color: rgba(255, 255, 255, 0.45);
+        }
+    }
+
+    .type-grid {
+        display: grid;
+        grid-template-columns: 1fr 1fr;
+        gap: 12px;
+    }
+
+    .type-item {
+        min-height: 55px;
+        padding: 16px 14px;
+        box-sizing: border-box;
+        border-radius: 8px;
+        display: flex;
+        align-items: center;
+        font-size: 16px;
+        color: rgba(255, 255, 255, 1);
+        background: rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.12);
+        cursor: pointer;
+
+        &.selected {
+            color: rgba(255, 212, 137, 1);
+            border-color: rgba(255, 212, 137, 1);
+            background: rgba(255, 212, 137, 0.1);
+        }
+    }
+
+    .action-btns {
+        display: flex;
+        gap: 12px;
+    }
+
+    .action-btn {
+        flex: 1;
+        height: 48px;
+        border-radius: 12px;
+        font-size: 16px;
+        font-weight: 500;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        cursor: pointer;
+
+        &.secondary {
+            background: #2a2a2a;
+            color: #fff;
+        }
+
+        &.primary {
+            background: linear-gradient(90deg, #ffebc9 0%, #ffca6d 100%);
+            color: #1a1a1a;
+        }
+    }
+}
+</style>

+ 321 - 0
src/views/old_mini/entry_information_service/index.vue

@@ -0,0 +1,321 @@
+<template>
+    <div class="service-entry-page">
+        <custom-header
+            v-if="!showComplete"
+            name="认证农服"
+            :isClose="hideBack"
+            :showClose="false"
+        />
+        <div v-if="!showComplete" class="progress-bar">
+            <div
+                v-for="i in TOTAL_STEPS"
+                :key="i"
+                class="progress-segment"
+                :class="{
+                    active: i <= currentStep,
+                    clickable: i <= maxReachedStep && i !== currentStep,
+                }"
+                @click="goToStep(i)"
+            />
+        </div>
+        <div class="service-entry-body">
+            <service-complete
+                v-if="showComplete"
+                :summary="completeSummary"
+                @home="leaveCompleteToHome"
+            />
+            <template v-else>
+                <team-basic v-if="currentStep === 1" @prev="handleStepPrev" @next="handleNext" />
+                <service-location
+                    v-else-if="currentStep === 2"
+                    @prev="handlePrev"
+                    @next="handleNext"
+                />
+                <service-category
+                    v-else-if="currentStep === 3"
+                    @prev="handlePrev"
+                    @next="handleNext"
+                />
+                <service-equipment
+                    v-else-if="currentStep === 4"
+                    @prev="handlePrev"
+                    @next="handleNext"
+                />
+                <service-manual
+                    v-else-if="currentStep === 5"
+                    @prev="handlePrev"
+                    @complete="handleFlowComplete"
+                />
+            </template>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import { computed, onActivated, onMounted, ref, watch } from "vue";
+import { useRoute, useRouter } from "vue-router";
+import customHeader from "@/components/customHeader.vue";
+import teamBasic from "./components/teamBasic.vue";
+import serviceLocation from "./components/serviceLocation.vue";
+import serviceCategory from "./components/serviceCategory.vue";
+import serviceEquipment from "./components/serviceEquipment.vue";
+import serviceManual from "./components/serviceManual.vue";
+import serviceComplete from "./components/serviceComplete.vue";
+
+// ---------------------------------------------------------------------------
+// 常量
+// ---------------------------------------------------------------------------
+const STEP_KEY = "SERVICE_ENTRY_STEP";
+const MAX_STEP_KEY = "SERVICE_ENTRY_MAX_STEP";
+const INVITE_TYPE_KEY = "ENTRY_INVITE_TYPE";
+const ADMIN_ID_KEY = "ENTRY_ADMIN_ID";
+const TOTAL_STEPS = 5;
+
+const TEAM_TYPE_LABELS = {
+    machinery_coop: "农机专业合作社",
+    grower: "种植大户兼营",
+    family_farm: "家庭农场",
+    agri_company: "农业公司",
+    individual: "个体农机户",
+    other: "其他",
+};
+
+const SERVICE_DRAFT_KEYS = [
+    STEP_KEY,
+    MAX_STEP_KEY,
+    "SERVICE_ENTRY_BASIC",
+    "SERVICE_ENTRY_LOCATION",
+    "SERVICE_ENTRY_CATEGORY",
+    "SERVICE_ENTRY_EQUIPMENT",
+    "SERVICE_ENTRY_MANUAL",
+];
+
+// ---------------------------------------------------------------------------
+// 页面状态
+// ---------------------------------------------------------------------------
+const router = useRouter();
+const route = useRoute();
+const currentStep = ref(1);
+/** 已到达过的最大步骤,进度条只能点到这里 */
+const maxReachedStep = ref(1);
+const showComplete = ref(false);
+const completeSummary = ref({});
+
+const hideBack = computed(
+    () => route.query.isClose === "1" || route.query.isClose === "true"
+);
+
+// ---------------------------------------------------------------------------
+// 工具函数
+// ---------------------------------------------------------------------------
+function readJson(key) {
+    try {
+        const raw = sessionStorage.getItem(key);
+        return raw ? JSON.parse(raw) : null;
+    } catch {
+        return null;
+    }
+}
+
+function readStep() {
+    const step = Number(sessionStorage.getItem(STEP_KEY));
+    return step >= 1 && step <= TOTAL_STEPS ? step : 1;
+}
+
+function readMaxReachedStep(fallback = 1) {
+    const max = Number(sessionStorage.getItem(MAX_STEP_KEY));
+    if (max >= 1 && max <= TOTAL_STEPS) return Math.max(max, fallback);
+    return fallback;
+}
+
+function syncInviteFromQuery() {
+    const inviteType = route.query.inviteType;
+    if (inviteType === "service" || inviteType === "farmer") {
+        sessionStorage.setItem(INVITE_TYPE_KEY, inviteType);
+    } else if (!sessionStorage.getItem(INVITE_TYPE_KEY)) {
+        sessionStorage.setItem(INVITE_TYPE_KEY, "service");
+    }
+    const adminId = route.query.adminId;
+    if (adminId != null && adminId !== "") {
+        sessionStorage.setItem(ADMIN_ID_KEY, String(adminId));
+    }
+}
+
+function clearServiceDrafts() {
+    SERVICE_DRAFT_KEYS.forEach((key) => sessionStorage.removeItem(key));
+}
+
+function buildCompleteSummary() {
+    const basic = readJson("SERVICE_ENTRY_BASIC") || {};
+    const location = readJson("SERVICE_ENTRY_LOCATION") || {};
+    const category = readJson("SERVICE_ENTRY_CATEGORY") || [];
+    const equipmentRaw = readJson("SERVICE_ENTRY_EQUIPMENT");
+    const equipment = Array.isArray(equipmentRaw)
+        ? equipmentRaw
+        : [
+              ...(equipmentRaw?.merged || []),
+              ...(equipmentRaw?.field || []),
+              ...(equipmentRaw?.fruit || []),
+          ];
+    const manual = readJson("SERVICE_ENTRY_MANUAL") || [];
+
+    const cropNames = (Array.isArray(category) ? category : [])
+        .map((item) => item?.name)
+        .filter(Boolean);
+    const manualNames = (Array.isArray(manual) ? manual : [])
+        .map((item) => item?.name)
+        .filter(Boolean);
+    const equipmentNames = [];
+    const seenEquip = new Set();
+    equipment.forEach((item) => {
+        const name = item?.name;
+        if (!name || seenEquip.has(name)) return;
+        seenEquip.add(name);
+        equipmentNames.push(name);
+    });
+    const capabilityNames =
+        manualNames.length > 0
+            ? manualNames
+            : equipmentNames.length > 0
+              ? equipmentNames
+              : [];
+
+    return {
+        teamName: basic.teamName || "",
+        teamType:
+            basic.teamTypeLabel ||
+            TEAM_TYPE_LABELS[basic.teamType] ||
+            "",
+        address:
+            location.townName ||
+            location.county_address ||
+            location.address ||
+            "",
+        townName: location.townName || "",
+        radiusKm: location.radiusKm ?? 30,
+        crops: cropNames,
+        capabilities: capabilityNames,
+        cropLabel: cropNames.join(" · "),
+        capabilityLabel: capabilityNames.join(" · "),
+    };
+}
+
+function resetToFirstStep() {
+    clearServiceDrafts();
+    showComplete.value = false;
+    completeSummary.value = {};
+    currentStep.value = 1;
+    maxReachedStep.value = 1;
+    sessionStorage.setItem(STEP_KEY, "1");
+    sessionStorage.setItem(MAX_STEP_KEY, "1");
+}
+
+function syncEntryState() {
+    syncInviteFromQuery();
+    if (showComplete.value) {
+        resetToFirstStep();
+        return;
+    }
+    const step = readStep();
+    currentStep.value = step;
+    maxReachedStep.value = readMaxReachedStep(step);
+}
+
+// ---------------------------------------------------------------------------
+// 事件处理
+// ---------------------------------------------------------------------------
+/** 进度条跳转:仅允许已到达过的步骤 */
+const goToStep = (step) => {
+    if (step < 1 || step > TOTAL_STEPS) return;
+    if (step > maxReachedStep.value) return;
+    if (step === currentStep.value) return;
+    currentStep.value = step;
+};
+
+const handleNext = () => {
+    if (currentStep.value < TOTAL_STEPS) {
+        currentStep.value += 1;
+    }
+};
+
+const handlePrev = () => {
+    if (currentStep.value > 1) {
+        currentStep.value -= 1;
+    }
+};
+
+/** 第 1 步「上一步」由子组件 router.back */
+const handleStepPrev = () => {
+    router.back();
+};
+
+const handleFlowComplete = () => {
+    completeSummary.value = buildCompleteSummary();
+    showComplete.value = true;
+};
+
+function leaveCompleteToHome() {
+    resetToFirstStep();
+    router.replace("/growth_report");
+}
+
+watch(
+    currentStep,
+    (step) => {
+        sessionStorage.setItem(STEP_KEY, String(step));
+        if (step > maxReachedStep.value) {
+            maxReachedStep.value = step;
+        }
+        sessionStorage.setItem(MAX_STEP_KEY, String(maxReachedStep.value));
+    },
+    { immediate: true }
+);
+
+onActivated(syncEntryState);
+onMounted(syncEntryState);
+</script>
+
+<style lang="scss" scoped>
+.service-entry-page {
+    height: 100vh;
+    background: #0f0f0f;
+    display: flex;
+    flex-direction: column;
+}
+
+.progress-bar {
+    flex-shrink: 0;
+    display: flex;
+    justify-content: center;
+    gap: 6px;
+    padding: 20px 16px 12px;
+}
+
+.progress-segment {
+    width: 22px;
+    height: 4px;
+    border-radius: 2px;
+    background: rgba(255, 255, 255, 0.5);
+    // 加大可点热区
+    // padding: 12px 4px;
+    // background-clip: content-box;
+    box-sizing: content-box;
+
+    &.active {
+        background: #fff;
+        background-clip: content-box;
+    }
+
+    &.clickable {
+        cursor: pointer;
+    }
+}
+
+.service-entry-body {
+    flex: 1;
+    min-height: 0;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+}
+</style>

+ 8 - 1
src/views/old_mini/growth_report/alert_detail.vue

@@ -357,7 +357,9 @@ onMounted(() => {
     }
 }
 
-.analysis-top {}
+.analysis-top {
+    margin-bottom: 12px;
+}
 
 .analysis-card {
     padding: 1px;
@@ -482,6 +484,11 @@ onMounted(() => {
     align-items: flex-start;
     gap: 8px;
     padding-top: 14px;
+    &:last-child {
+        .crop-metric__content {
+            border-bottom: none;
+        }
+    }
 
     // & + & {
     //     border-top: 1px solid rgba(255, 255, 255, 0.08);

+ 8 - 4
src/views/old_mini/growth_report/index.vue

@@ -674,19 +674,23 @@ const handleInvite = (type) => {
     } catch {
         // ignore
     }
+    // inviteType 写入 paramsPage,欢迎页据此切换农服/农户文案与跳转
     const inviteType = isService ? "service" : "farmer";
     const adminId = localStorage.getItem("MINI_USER_ID") || "";
     const query = {
-        askInfo: { title: "邀请完善信息", content: "是否分享该邀请给好友" },
+        askInfo: {
+            title: isService ? "邀请农服入驻" : "邀请完善信息",
+            content: "是否分享该邀请给好友",
+        },
         shareText: isService ? "邀请您完善农服信息" : "邀请您完善地块种植信息",
-        targetUrl: `invite_welcome`,
+        targetUrl: "invite_welcome",
         paramsPage: JSON.stringify({ inviteName, inviteType, adminId }),
-        imageUrl: 'https://birdseye-img.sysuimars.com/farm-h5/field.png',
+        imageUrl: isService ? "https://birdseye-img.sysuimars.com/farm-h5/service_cover.png" : "https://birdseye-img.sysuimars.com/farm-h5/field.png",
     };
     wx.miniProgram.navigateTo({
         url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
     });
-}
+};
 
 onMounted(() => {
     // syncSelectedFarmId();

+ 90 - 17
src/views/old_mini/invite_welcome/index.vue

@@ -12,16 +12,16 @@
                 src="@/assets/img/agricultural/logo-big.png"
                 alt="飞鸟管家"
             />
-            <h1 class="invite-welcome-page__title">欢迎来到飞鸟管家</h1>
-            <p class="invite-welcome-page__subtitle">建好农场档案,马上领取专属种植报告</p>
+            <h1 class="invite-welcome-page__title">{{ pageTitle }}</h1>
+            <p class="invite-welcome-page__subtitle">{{ pageSubtitle }}</p>
         </div>
 
         <div class="invite-welcome-page__card">
             <div
-                v-for="(item, index) in featureList"
+                v-for="(item, index) in displayFeatures"
                 :key="item.title"
                 class="feature-item"
-                :class="{ 'is-last': index === featureList.length - 1 }"
+                :class="{ 'is-last': index === displayFeatures.length - 1 }"
             >
                 <div class="feature-item__icon">
                     <img v-if="item.icon" :src="item.icon" alt="" />
@@ -34,17 +34,20 @@
         </div>
 
         <div class="invite-welcome-page__footer">
-            <div class="invite-welcome-page__btn" @click="handleCreate">去新建</div>
+            <div class="invite-welcome-page__btn" @click="handleCreate">{{ actionText }}</div>
         </div>
     </div>
 </template>
 
 <script setup>
+import { computed, onMounted } from "vue";
 import { useRouter, useRoute } from "vue-router";
 import { ArrowLeftBold } from "@element-plus/icons-vue";
 
 const STEP_KEY = "ENTRY_INFORMATION_STEP";
 const INVITE_TYPE_KEY = "ENTRY_INVITE_TYPE";
+/** 邀请人 id,录入提交 addFarmInfo.admin_id 用 */
+const ADMIN_ID_KEY = "ENTRY_ADMIN_ID";
 
 const router = useRouter();
 const route = useRoute();
@@ -53,7 +56,8 @@ const goBack = () => {
     router.replace({ path: "/growth_report" });
 };
 
-const featureList = [
+/** 农户卖点 */
+const farmerFeatures = [
     {
         icon: require("@/assets/img/farm/warning.png"),
         title: "风险预警",
@@ -71,22 +75,91 @@ const featureList = [
     },
 ];
 
-/** 进入新建农场流程,保留邀请相关 query */
+/** 农服卖点 */
+const serviceFeatures = [
+    {
+        icon: require("@/assets/img/farm/target.png"),
+        title: "附近订单直推",
+        desc: "一键匹配精准用户",
+    },
+    {
+        icon: require("@/assets/img/farm/list.png"),
+        title: "农闲设备增收",
+        desc: "设备不闲着,淡季也有一份收入",
+    },
+    {
+        icon: require("@/assets/img/farm/clock.png"),
+        title: "平台认证背书",
+        desc: "认证标识加服务评价,农户更放心",
+    },
+];
+
+function parseMaybeJson(value) {
+    if (value == null || value === "") return null;
+    if (typeof value === "object") return value;
+    try {
+        return JSON.parse(value);
+    } catch {
+        return null;
+    }
+}
+
+/** 分享链路:params 可能在 query / paramsPage / miniJson.paramsPage */
+function resolvePageParams() {
+    const mini = parseMaybeJson(route.query.miniJson);
+    if (mini) {
+        const page = parseMaybeJson(mini.paramsPage) || {};
+        return { ...mini, ...page };
+    }
+    const paramsPage = parseMaybeJson(route.query.paramsPage);
+    if (paramsPage) {
+        return { ...route.query, ...paramsPage };
+    }
+    return { ...(route.query || {}) };
+}
+
+const pageParams = computed(() => resolvePageParams());
+const isServiceInvite = computed(() => pageParams.value?.inviteType === "service");
+const pageTitle = computed(() =>
+    isServiceInvite.value ? "成为飞鸟认证农服" : "欢迎来到飞鸟管家"
+);
+const pageSubtitle = computed(() => "建好农场档案,马上领取专属种植报告");
+const displayFeatures = computed(() =>
+    isServiceInvite.value ? serviceFeatures : farmerFeatures
+);
+const actionText = computed(() => (isServiceInvite.value ? "加入社会化农服组织" : "去新建"));
+
+/** 从 paramsPage / miniJson 取出邀请人 adminId 并落盘 */
+function persistInviteAdminId() {
+    const adminId = pageParams.value?.adminId;
+    if (adminId == null || adminId === "") return "";
+    const id = String(adminId);
+    sessionStorage.setItem(ADMIN_ID_KEY, id);
+    return id;
+}
+
+/** 农户 → 新建农场;农服 → 录入农服信息 */
 const handleCreate = () => {
     sessionStorage.removeItem(STEP_KEY);
-    const inviteType = route.query.inviteType === "service" ? "service" : "farmer";
+    const inviteType = isServiceInvite.value ? "service" : "farmer";
     sessionStorage.setItem(INVITE_TYPE_KEY, inviteType);
 
-    const query = {
-        // isClose: "1",
-        inviteType,
-    };
-    if (route.query.adminId) {
-        query.adminId = String(route.query.adminId);
+    const query = { inviteType };
+    const adminId = persistInviteAdminId();
+    if (adminId) {
+        query.adminId = adminId;
     }
 
-    router.replace({ path: "/entry_information", query });
+    router.replace({
+        path: isServiceInvite.value ? "/entry_information_service" : "/entry_information",
+        query,
+    });
 };
+
+// 进页即落盘,避免只依赖 query 传递丢失
+onMounted(() => {
+    persistInviteAdminId();
+});
 </script>
 
 <style scoped lang="scss">
@@ -135,7 +208,7 @@ const handleCreate = () => {
 }
 
 .invite-welcome-page__title {
-    margin: 28px 0 0;
+    margin: 48px 0 0;
     font-size: 28px;
     font-family: "PangMenZhengDao";
     line-height: 32px;
@@ -151,7 +224,7 @@ const handleCreate = () => {
 .invite-welcome-page__card {
     background: linear-gradient(180deg, rgba(26, 25, 29, 0.82) 0%, rgba(18, 18, 22, 0.82) 100%);
     width: 100%;
-    margin-top: 40px;
+    margin-top: 24px;
     padding: 12px;
     box-sizing: border-box;
     border-radius: 16px;

+ 7 - 2
src/views/old_mini/work_execute/index.vue

@@ -87,13 +87,13 @@
                                 <img src="@/assets/img/farm/farm.png" alt="外包农事" class="outsource-icon">
                                 外包农事
                             </div>
-                            <div class="footer-r">
+                            <div class="footer-r" v-if="item.status !== 'completed'">
                                 <div class="card-btn card-btn--ghost" @click.stop="handleForward(item)">
                                     <Icon size="14" color="rgba(255, 255, 255, 0.6)" name="share" />
                                     派发工人
                                 </div>
                                 <div
-                                    v-if="item.status !== 'completed'"
+                                    
                                     class="card-btn card-btn--primary"
                                     :class="{ disabled: completeSubmittingId === item.id }"
                                     @click.stop="handleMarkComplete(item)"
@@ -102,6 +102,11 @@
                                     我已完成
                                 </div>
                             </div>
+                            <div class="footer-r" v-else>
+                                <div class="card-btn card-btn--ghost">
+                                    查看详情
+                                </div>
+                            </div>
                         </div>
                     </div>
                 </div>