Bläddra i källkod

feat: 对接服务维护,忽略

lxf 2 veckor sedan
förälder
incheckning
b8a9b38b44

+ 8 - 0
src/api/modules/z_agricultural_store.js

@@ -14,4 +14,12 @@ module.exports = {
         url: url + "/statistics",
         type: "get",
     },
+    updateService: {
+        url: url + "/update",
+        type: "post",
+    },
+    getServiceDetail: {
+        url: url + "/detail",
+        type: "get",
+    },
 }

+ 4 - 0
src/api/modules/z_farm_work_record.js

@@ -67,4 +67,8 @@ module.exports = {
         url: url + "/updatePublicStatus",
         type: "post",
     },
+    ignoreFarmWorkRecord: {
+        url: url + "/ignoreFarmWorkRecord",
+        type: "get",
+    },
 }

BIN
src/assets/img/home/nz.png


+ 14 - 0
src/components/pageComponents/ServiceInfo.vue

@@ -225,6 +225,20 @@ function handleConfirm() {
     currentEditIndex.value = -1;
     currentEditName.value = '';
 }
+
+function getServiceInfo() {
+    // 获取所有选中的项或自己新加的项的名称
+    const selectedCrops = props.crops.filter(item => item.selected || item.isSelf === 1).map(item => item.name);
+    const selectedServiceTypes = props.serviceTypes.filter(item => item.selected || item.isSelf === 1).map(item => item.name);
+    const selectedMachines = props.machines.filter(item => item.selected || item.isSelf === 1).map(item => item.name);
+    
+    // 返回所有选中项和自己新加的项
+    return {serviceCropsJson: selectedCrops, serviceTypeJson: selectedServiceTypes, agriculturalEquipmentJson: selectedMachines}
+}
+
+defineExpose({
+    getServiceInfo
+});
 </script>
 
 <style lang="scss" scoped>

+ 7 - 3
src/components/popup/priceSheetPopup.vue

@@ -222,13 +222,17 @@ function fetchPriceData() {
     });
 }
 
-// 检查 itemsList 是否都有价格
+// 检查 itemsList 是否都有价格和品牌
 function checkItemsListHasPrice() {
     if (!priceData.value?.itemsList || !Array.isArray(priceData.value.itemsList) || priceData.value.itemsList.length === 0) {
         return false;
     }
-    // 检查所有项是否都有 price 且 price 大于 0
-    return priceData.value.itemsList.every(item => item.price != null && item.price !== '' && item.price !== 0);
+    // 检查所有项是否都有 price 且 price 不为 0,以及 brand 有值
+    return priceData.value.itemsList.every(item => {
+        const hasPrice = item.price != null && item.price !== '' && item.price !== 0;
+        const hasBrand = item.brand && item.brand.trim() !== '';
+        return hasPrice && hasBrand;
+    });
 }
 
 async function checkOrder() {

+ 1 - 1
src/components/taskItem.vue

@@ -42,7 +42,7 @@
                 </div>
             </div> -->
 
-            <div class="farm-text" v-if="status === 0 && !isHall && itemIndex === 0">
+            <div class="farm-text" v-if="(status === 0 && itemIndex === 0) || isHall">
                 <span class="text-title">农场现状:</span>{{ farmStatusText }}
                 <!-- <span class="text-more">点击查看照片</span> -->
             </div>

+ 90 - 6
src/views/old_mini/farm_manage/components/demandHall.vue

@@ -61,9 +61,9 @@
                                 <div class="item-footer">
                                     <div class="footer-l" @click="toDetail(item)">查看详情</div>
                                     <div class="footer-r">
-                                        <!-- <div class="btn second">
-                                            转发给客户
-                                        </div> -->
+                                        <div class="btn second" @click="showIgnore(item)">
+                                            忽略
+                                        </div>
                                         <div class="btn primary" @click="showPriceSheetPopup(item)">确认并报价</div>
                                     </div>
                                 </div>
@@ -78,11 +78,24 @@
     </div>
     <!-- 服务报价单 -->
     <price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
+
+    <popup v-model:show="showIgnorePopup" round class="task-tips-popup">
+            <img class="create-farm-icon" src="@/assets/img/home/create-farm-icon.png" alt="" />
+            <div class="create-farm-text">
+                <div>
+                    您确认忽略 <span class="main-text">{{ currentTask?.farmName }}</span> 的
+                    <span class="main-text">{{ currentTask?.farmWorkName }}</span> 农事吗
+                </div>
+            </div>
+        <div class="create-farm-btn" @click="handleIgnore">
+            确认忽略
+        </div>
+    </popup>
 </template>
 
 <script setup>
 import { FloatingPanel } from "vant";
-import { computed, nextTick, onMounted, ref } from "vue";
+import { computed, nextTick, onActivated, onDeactivated, onMounted, ref } from "vue";
 import { useStore } from "vuex";
 import IndexMap from "../map/index";
 import taskItem from "@/components/taskItem.vue";
@@ -91,7 +104,8 @@ import { useRouter } from "vue-router";
 import LocationSearch from "@/components/pageComponents/LocationSearch.vue";
 import { Point } from "ol/geom";
 import Feature from "ol/Feature";
-import { convertPointToArray } from "@/utils/index";
+import { Popup } from "vant";
+import { ElMessage } from "element-plus";
 const props = defineProps({
     isCapital: {
         type: Boolean,
@@ -121,6 +135,14 @@ onMounted(() => {
     });
 });
 
+onActivated(() => {
+    showIgnorePopup.value = false;
+    getSimpleList();
+});
+onDeactivated(() => {
+    showIgnorePopup.value = false;
+});
+
 defineExpose({
     getSimpleList,
 });
@@ -166,7 +188,8 @@ function getSimpleList() {
     VE_API.z_farm_work_record
         .getOrderReceivingSimpleList(params)
         .then(({ data }) => {
-            taskList.value = data || [];
+            const filteredData = data.filter(item => item.isIgnored !== 1);
+            taskList.value = filteredData || [];
         })
         .catch((error) => {
             taskList.value = [];
@@ -242,6 +265,23 @@ const showPriceSheetPopup = (item) => {
         priceSheetPopupRef.value.handleShowPopup(res);
     });
 };
+
+const showIgnorePopup = ref(false);
+const showIgnore = (item) => {
+    currentTask.value = item;
+    showIgnorePopup.value = true;
+};
+
+const currentTask = ref({});
+const handleIgnore = () => {
+    showIgnorePopup.value = false;
+    VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: currentTask.value.id }).then((res) => {
+        if (res.code === 0) {
+            ElMessage.success("操作成功");
+            getSimpleList();
+        }
+    });
+};
 </script>
 
 <style lang="scss" scoped>
@@ -444,4 +484,48 @@ const showPriceSheetPopup = (item) => {
         }
     }
 }
+
+
+.task-tips-popup {
+    width: 75%;
+    padding: 28px 28px 20px;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    .create-farm-icon {
+        width: 40px;
+        height: 40px;
+        margin-bottom: 12px;
+    }
+    .farm-check-icon {
+        width: 68px;
+        height: 68px;
+        margin-bottom: 12px;
+    }
+    .create-farm-text {
+        font-size: 20px;
+        font-weight: 500;
+        line-height: 40px;
+        margin-bottom: 32px;
+        text-align: center;
+        &.success-text {
+            font-size: 23px;
+            font-weight: 400;
+        }
+    }
+    .main-text {
+        color: #2199f8;
+    }
+    .create-farm-btn {
+        width: 100%;
+        box-sizing: border-box;
+        padding: 8px;
+        border-radius: 25px;
+        font-size: 16px;
+        background: #2199f8;
+        color: #fff;
+        text-align: center;
+    }
+}
 </style>

+ 22 - 8
src/views/old_mini/mine/pages/register.vue

@@ -133,6 +133,7 @@
                         v-model:serviceTypes="serviceTypes"
                         v-model:machines="machines"
                         v-model:isEdit="isEdit"
+                        ref="serviceInfoRef"
                     />
                 </template>
                 <Button class="button" round block type="primary" native-type="submit"> 提交 </Button>
@@ -152,6 +153,7 @@ import ServiceInfo from "@/components/pageComponents/ServiceInfo.vue";
 const route = useRoute();
 const router = useRouter();
 
+const serviceInfoRef = ref(null);
 const formRef = ref(null);
 const formData = ref({
     name: "",
@@ -174,7 +176,14 @@ const onSubmit = () => {
         ElMessage.warning("请上传营业执照");
         return;
     }
-    VE_API.mine.register(formData.value).then(res =>{
+    const {serviceCropsJson, serviceTypeJson, agriculturalEquipmentJson} = serviceInfoRef.value.getServiceInfo();
+    const params = {
+        ...formData.value,
+        serviceCropsJson,
+        serviceTypeJson,
+        agriculturalEquipmentJson,
+    }
+    VE_API.mine.register(params).then(res =>{
         if(res.code===0){
             ElMessage.success('注册成功,待审核')
             router.push('/mine')
@@ -225,17 +234,22 @@ const identityTyepe = {
 // 服务信息数据,转换为 ServiceInfo 组件需要的格式
 const isEdit = ref(true); // 默认编辑状态
 const crops = ref([
-    { name: "荔枝", isSelf: 1 },
-    { name: "龙眼", isSelf: 0 },
-    { name: "芒果", isSelf: 0 }
+    { name: "荔枝", isSelf: 0 },
+    { name: "水稻", isSelf: 0 },
+    { name: "菠萝", isSelf: 0 },
+    { name: "柚子", isSelf: 0 },
+    { name: "蔬菜", isSelf: 0 },
+    { name: "小麦", isSelf: 0 },
 ]);
 const serviceTypes = ref([
-    { name: "播种", isSelf: 1 },
-    { name: "收获", isSelf: 0 }
+    { name: "嫁接", isSelf: 0 },
+    { name: "施肥打药", isSelf: 0 },
+    { name: "修剪", isSelf: 0 },
 ]);
 const machines = ref([
-    { name: "收割机", isSelf: 1 },
-    { name: "灌溉机", isSelf: 0 }
+    { name: "植保机", isSelf: 0 },
+    { name: "喷药车", isSelf: 0 },
+    { name: "收割机", isSelf: 0 }
 ]);
 
 const handleUploadSuccess = (data) => {

+ 26 - 4
src/views/old_mini/modify_work/completedWork.vue

@@ -371,8 +371,8 @@
             </div>
 
             <!-- 农资,步骤:农事已确认 -->
-            <div class="fixed-btn-wrap center" v-if="curRole == 2 && currentStep == 0">
-                <!-- <div class="fixed-btn second" @click="handleForward">转发给客户</div> -->
+            <div class="fixed-btn-wrap" v-if="curRole == 2 && currentStep == 0">
+                <div class="fixed-btn second" @click="showIgnore">忽略</div>
                 <div class="fixed-btn" @click="showPriceSheetPopup">确认并报价</div>
             </div>
             <!-- 农资,步骤:农资已执行,请求确认 -->
@@ -394,12 +394,21 @@
                 <div>您确认取消已发起的农事需求吗</div>
             </div>
         </template>
+        <template v-else-if="taskPopupType === 'warningIgnore'">
+            <img class="create-farm-icon" src="@/assets/img/home/create-farm-icon.png" alt="" />
+            <div class="create-farm-text">
+                <div>
+                    您确认忽略 <span class="main-text">{{ detailData?.farmName }}</span> 的
+                    <span class="main-text">{{ detailData?.farmWorkName }}</span> 农事吗
+                </div>
+            </div>
+        </template>
         <template v-else>
             <img class="farm-check-icon" src="@/assets/img/home/right.png" alt="" />
             <div class="create-farm-text success-text">{{ successText }}</div>
         </template>
         <div class="create-farm-btn" @click="handlePopupBtn">
-            {{ taskPopupType === "warning" ? "确认" : "我知道了" }}
+            {{ taskPopupType === "warning" ? "确认" : taskPopupType === 'warningIgnore' ? "确认忽略" : "我知道了" }}
         </div>
     </popup>
 
@@ -494,13 +503,21 @@ const taskPopupType = ref("");
 const handlePopupBtn = () => {
     showTaskPopup.value = false;
     if (taskPopupType.value === "warning") {
-        // 确认忽略
+        // 取消发起
         VE_API.z_farm_work_record.updatePublicStatus({ recordId: query.value.id, isPublic: 0 }).then((res) => {
             if (res.code === 0) {
                 getDetail(query.value.id);
                 currentStep.value = 1;
             }
         });
+    } else if (taskPopupType.value === "warningIgnore") {
+        // 确认忽略
+        VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: query.value.id }).then((res) => {
+            if (res.code === 0) {
+                ElMessage.success("操作成功");
+                router.back();
+            }
+        });
     } else {
         if (taskPopupActionType.value === 0) {
             getDetail(query.value.id);
@@ -526,6 +543,11 @@ const showPriceSheetPopup = () => {
     priceSheetPopupRef.value.handleShowPopup(detailData.value);
 };
 
+const showIgnore = () => {
+    taskPopupType.value = "warningIgnore";
+    showTaskPopup.value = true;
+};
+
 const handleConfirmExecute = () => {
     VE_API.z_farm_work_record_cost
         .selectQuote({ farmWorkRecordId: query.value.id, agriculturalId: quotationData.value.agriculturalId })

+ 6 - 0
src/views/old_mini/modify_work/index.vue

@@ -541,6 +541,12 @@ function handlePopupBtn() {
     showTaskPopup.value = false;
     if (taskPopupType.value === 'warning') {
         // 确认忽略
+        VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: route.query.id }).then((res) => {
+            if (res.code === 0) {
+                ElMessage.success("操作成功");
+                router.back();
+            }
+        });
     } else {
         router.replace({
             path: "/completed_work",

+ 2 - 2
src/views/old_mini/modify_work/reviewWork.vue

@@ -19,7 +19,7 @@
                         </div>
                         <div class="info-item">
                             <div class="info-name">农事目的:</div>
-                            <div class="info-value">{{ workItem.farmWorkTypeName || workItem.condition }}</div>
+                            <div class="info-value">{{ workItem.purpose || "--" }}</div>
                         </div>
                         <div class="info-item">
                             <div class="info-name">肥药处方:</div>
@@ -53,7 +53,7 @@
                 <div class="info-box subject-content">
                     <div class="subject-box">
                         <div class="subject-item cost-l">
-                            <img class="subject-img" src="@/assets/img/gallery/capital.png" alt="" />
+                            <img class="subject-img" src="@/assets/img/home/nz.png" alt="" />
                             <div class="subject-tag">
                                 {{ workItem.serviceMain }}
                                 <el-icon class="right-icon" size="10"><ArrowRight /></el-icon>

+ 164 - 18
src/views/old_mini/service_manage/index.vue

@@ -2,6 +2,7 @@
     <div class="service-manage">
         <custom-header name="服务维护"></custom-header>
         <ServiceInfo 
+            ref="serviceInfoRef"
             v-model:crops="crops"
             v-model:serviceTypes="serviceTypes"
             v-model:machines="machines"
@@ -11,7 +12,7 @@
         <div class="page-action" v-if="isEdit">
             <div class="btn-item cancel" @click="isEdit = false">取消</div>
             <div class="btn-right">
-                <div class="btn-item primary" @click="isEdit = false">保存服务类型</div>
+                <div class="btn-item primary" @click="handleSave">保存服务类型</div>
             </div>
         </div>
         <div class="page-action" v-else>
@@ -21,28 +22,173 @@
 </template>
 
 <script setup>
-import { ref } from "vue";
+import { ref, onMounted, onActivated, watch } from "vue";
 import customHeader from "@/components/customHeader.vue";
 import ServiceInfo from "@/components/pageComponents/ServiceInfo.vue";
+import { ElMessage } from "element-plus";
 
 const isEdit = ref(false);
+const serviceInfoRef = ref(null);
 
-// 三类数据:数组对象形式,随意赋值 isSelf=0/1
-const crops = ref([
-    { name: "荔枝", isSelf: 1 },
-    { name: "龙眼", isSelf: 1 },
-    { name: "芒果", isSelf: 0 }
-]);
-const serviceTypes = ref([
-    { name: "飞防类", isSelf: 1 },
-    { name: "技术类", isSelf: 1 },
-    { name: "劳力类", isSelf: 0 },
-    { name: "机械类", isSelf: 0 }
-]);
-const machines = ref([
-    { name: "收割机", isSelf: 1 },
-    { name: "M3E", isSelf: 0 }
-]);
+// 默认数据
+const defaultCrops = [
+    { name: "荔枝", isSelf: 0 },
+    { name: "水稻", isSelf: 0 },
+    { name: "菠萝", isSelf: 0 },
+    { name: "柚子", isSelf: 0 },
+    { name: "蔬菜", isSelf: 0 },
+    { name: "小麦", isSelf: 0 },
+];
+const defaultServiceTypes = [
+    { name: "嫁接", isSelf: 0 },
+    { name: "施肥打药", isSelf: 0 },
+    { name: "修剪", isSelf: 0 },
+];
+const defaultMachines = [
+    { name: "植保机", isSelf: 0 },
+    { name: "喷药车", isSelf: 0 },
+    { name: "收割机", isSelf: 0 }
+];
+
+// 三类数据:数组对象形式
+const crops = ref([]);
+const serviceTypes = ref([]);
+const machines = ref([]);
+
+// 将接口返回的字符串数组转换为对象数组(默认显示时使用)
+function convertApiDataToItems(apiList) {
+    if (!Array.isArray(apiList)) {
+        return [];
+    }
+    return apiList.map(item => {
+        const name = typeof item === 'string' ? item : (item.name || item);
+        // 检查是否是默认数据中的项
+        const isDefault = defaultCrops.some(d => d.name === name) || 
+                         defaultServiceTypes.some(d => d.name === name) || 
+                         defaultMachines.some(d => d.name === name);
+        return {
+            name: name,
+            isSelf: isDefault ? 0 : 1, // 如果是默认数据中的,isSelf=0,否则是用户自定义的
+            selected: true // 接口返回的都是已保存的,所以都选中
+        };
+    });
+}
+
+// 合并数据:编辑时将默认数据与接口数据合并,name相同的设置为选中
+function mergeDataForEdit(defaultList, apiList) {
+    // 创建 API 返回数据的名称集合(用于判断是否选中)
+    const apiNameSet = new Set(apiList.map(item => typeof item === 'string' ? item : (item.name || item)));
+    
+    // 合并逻辑:默认数据 + API 数据(去重)
+    const merged = [...defaultList];
+    
+    // 标记默认数据中哪些被选中(name 在 API 数据中存在)
+    merged.forEach(item => {
+        if (apiNameSet.has(item.name)) {
+            item.selected = true;
+        } else {
+            item.selected = false;
+        }
+    });
+    
+    // 添加 API 中存在但默认数据中不存在的项(这些是用户自定义的)
+    apiList.forEach(apiItem => {
+        const apiName = typeof apiItem === 'string' ? apiItem : (apiItem.name || apiItem);
+        const exists = merged.some(item => item.name === apiName);
+        if (!exists) {
+            merged.push({
+                name: apiName,
+                isSelf: 1, // 标记为用户自定义
+                selected: true
+            });
+        }
+    });
+    
+    return merged;
+}
+
+// 获取服务详情
+function getServiceDetail() {
+    VE_API.z_agricultural_store.getServiceDetail().then(({ data }) => {
+        if (data) {
+            // 默认情况下,只显示接口返回的数据
+            crops.value = convertApiDataToItems(data.serviceCropsJson || []);
+            serviceTypes.value = convertApiDataToItems(data.serviceTypeJson || []);
+            machines.value = convertApiDataToItems(data.agriculturalEquipmentJson || []);
+        } else {
+            // 如果没有数据,显示空数组
+            crops.value = [];
+            serviceTypes.value = [];
+            machines.value = [];
+        }
+    }).catch(() => {
+        // 获取失败,显示空数组
+        crops.value = [];
+        serviceTypes.value = [];
+        machines.value = [];
+    });
+}
+
+// 监听编辑状态,编辑时合并默认数据
+watch(isEdit, (newVal) => {
+    if (newVal) {
+        // 进入编辑模式,合并默认数据
+        VE_API.z_agricultural_store.getServiceDetail().then(({ data }) => {
+            if (data) {
+                crops.value = mergeDataForEdit(defaultCrops, data.serviceCropsJson || []);
+                serviceTypes.value = mergeDataForEdit(defaultServiceTypes, data.serviceTypeJson || []);
+                machines.value = mergeDataForEdit(defaultMachines, data.agriculturalEquipmentJson || []);
+            } else {
+                // 如果没有数据,使用默认数据(都不选中)
+                crops.value = defaultCrops.map(item => ({ ...item, selected: false }));
+                serviceTypes.value = defaultServiceTypes.map(item => ({ ...item, selected: false }));
+                machines.value = defaultMachines.map(item => ({ ...item, selected: false }));
+            }
+        }).catch(() => {
+            // 获取失败,使用默认数据(都不选中)
+            crops.value = defaultCrops.map(item => ({ ...item, selected: false }));
+            serviceTypes.value = defaultServiceTypes.map(item => ({ ...item, selected: false }));
+            machines.value = defaultMachines.map(item => ({ ...item, selected: false }));
+        });
+    } else {
+        // 退出编辑模式,重新获取数据(只显示接口返回的数据)
+        getServiceDetail();
+    }
+});
+
+// 保存服务类型
+function handleSave() {
+    if (!serviceInfoRef.value) {
+        return;
+    }
+    
+    const serviceInfo = serviceInfoRef.value.getServiceInfo();
+    
+    VE_API.z_agricultural_store.updateService({
+        serviceCropsJson: serviceInfo.serviceCropsJson,
+        serviceTypeJson: serviceInfo.serviceTypeJson,
+        agriculturalEquipmentJson: serviceInfo.agriculturalEquipmentJson
+    }).then(({ code, msg }) => {
+        if (code === 0) {
+            ElMessage.success("保存成功");
+            isEdit.value = false;
+            // 重新获取数据
+            getServiceDetail();
+        } else {
+            ElMessage.error(msg || "保存失败");
+        }
+    }).catch(() => {
+        ElMessage.error("保存失败,请重试");
+    });
+}
+
+onMounted(() => {
+    getServiceDetail();
+});
+
+onActivated(() => {
+    getServiceDetail();
+});
 </script>
 
 <style lang="scss" scoped>

+ 30 - 3
src/views/old_mini/task_condition/components/reviewPopup.vue

@@ -26,11 +26,38 @@
                             <span class="info-label">农事名称</span>
                             <span class="info-value">{{ quotationData?.farmWorkName || "--" }}</span>
                         </div>
-                        <div class="info-item flex-wrap">
+                        <!-- <div class="info-item flex-wrap">
                             <div class="info-label">复核成效</div>
                             <div class="info-value">
                                 促进分蘖芽萌发、加快分蘖生长,同时补充氮素等关键养分,增强植株长势,为形成足够穗数、提高群体产量打基础。
                             </div>
+                        </div> -->
+
+                        <div class="info-item flex-wrap">
+                            <div class="info-label">肥药处方</div>
+                            <div class="info-value">
+                                <div class="rescription" v-if="quotationData?.prescriptionList">
+                                    <span
+                                        v-for="(fertilizer, fertilizerI) in quotationData.prescriptionList"
+                                        :key="fertilizerI"
+                                    >
+                                        <span
+                                            v-for="(pest, pestI) in fertilizer.pesticideFertilizerList"
+                                            :key="'sub' + pestI"
+                                        >
+                                            {{ pest.defaultName || pest.pesticideFertilizerName }}
+                                            <span
+                                                v-if="
+                                                    pestI !== fertilizer.pesticideFertilizerList.length - 1 ||
+                                                    fertilizerI !== quotationData.prescriptionList.length - 1
+                                                "
+                                            >
+                                                +
+                                            </span>
+                                        </span>
+                                    </span>
+                                </div>
+                            </div>
                         </div>
                     </div>
 
@@ -66,12 +93,12 @@
                         </div>
                         <span class="btn-label">微信</span>
                     </div>
-                    <div class="action-btn orange-btn">
+                    <!-- <div class="action-btn orange-btn">
                         <div class="icon-circle">
                             <el-icon :size="24"><Download /></el-icon>
                         </div>
                         <span class="btn-label">保存图片</span>
-                    </div>
+                    </div> -->
                 </div>
                 <div class="cancel-btn" @click="handleCancel">取消</div>
             </div>

+ 13 - 5
src/views/old_mini/task_condition/components/task.vue

@@ -301,6 +301,11 @@ function getSimpleList() {
             // 假设返回的数据结构是 { list: [], total: 0 } 或者直接是数组
             let filteredData = data
 
+            // 如果是"待确认"状态,过滤掉 isIgnored 为 1 的数据
+            if (activeIndex.value === 0 && Array.isArray(data)) {
+                filteredData = data.filter((item) => item.isIgnored !== 1);
+            }
+
             // 保存完整数据(用于日历显示)
             if (activeIndex.value === 2) {
                 // 如果是"待完成"状态,保存完整数据用于日历
@@ -308,8 +313,8 @@ function getSimpleList() {
             }
 
             // 如果有日期筛选,在前端再次过滤(确保数据准确)
-            if (filterDate.value && Array.isArray(data)) {
-                filteredData = data.filter((item) => {
+            if (filterDate.value && Array.isArray(filteredData)) {
+                filteredData = filteredData.filter((item) => {
                     if (!item.executeDate) return false;
                     const itemDate = formatDate(new Date(item.executeDate));
                     return itemDate === filterDate.value;
@@ -459,9 +464,12 @@ function handlePopupBtn() {
     showTaskPopup.value = false;
     if (taskPopupType.value === "warning") {
         // 确认忽略
-    } else {
-        // 待确认
-        getTaskCount("1,2,3", 1);
+        VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: currentTask.value.id }).then((res) => {
+            if (res.code === 0) {
+                ElMessage.success("操作成功");
+                getSimpleList();
+            }
+        });
     }
 }