瀏覽代碼

Merge branch 'master' of http://www.sysuimars.cn:3000/feiniao/feiniao-farm-h5

lxf 5 天之前
父節點
當前提交
3b3d90b0ed

+ 2 - 1
src/components/pageComponents/FarmWorkPlanTimeline.vue

@@ -627,12 +627,13 @@ watch(
                 height: 100%;
                 background: #2199f8;
                 color: #fff;
-                margin-right: 18px;
                 border-radius: 2px;
+                padding: 5px 0;
             }
             .arranges {
                 display: flex;
                 max-width: calc(100vw - 84px);
+                min-width: calc(100vw - 84px);
                 gap: 10px;
                 letter-spacing: 0px;
                 .arrange-card {

+ 1 - 1
src/views/old_mini/home/index.vue

@@ -79,7 +79,7 @@ const handleBtn = () => {
 //判断是否存在可用方案
 async function checkExistsEnabledScheme() {
     const { data } = await VE_API.home.existsEnabledScheme({containerId:null});
-    if(!data) {
+    if(!data && localStorage.getItem("SET_USER_CUR_ROLE") == 2) {
         showTipPopup.value = true;
     }
 }

+ 9 - 108
src/views/old_mini/mine/index.vue

@@ -124,61 +124,6 @@ const onSelect = async (item) => {
 };
 
 onActivated(() => {
-    // if (curRole.value === 0) {
-    //     gridItems.value = [
-    //         {
-    //             title: "我的农场",
-    //             desc: "查看农场列表",
-    //             path: "/my_farm",
-    //         },
-    //         {
-    //             title: "我的消息",
-    //             desc: "查看未读信息",
-    //             path: "/message",
-    //         },
-    //         {
-    //             title: "农事记录",
-    //             desc: "查看历史农事",
-    //             path: "/farm_records",
-    //         },
-    //     ];
-    // } else if (curRole.value === 1) {
-    //     gridItems.value = [
-    //         {
-    //             title: "我的主页",
-    //             desc: "查看农场列表",
-    //             path: "/expert_detail",
-    //         },
-    //         {
-    //             title: "我的报价",
-    //             desc: "查看未读信息",
-    //             path: "/message",
-    //         },
-    //         {
-    //             title: "信息化档案",
-    //             desc: "查看历史农事",
-    //             path: "/archives",
-    //         },
-    //     ];
-    // } else if (curRole.value === 2) {
-    //     gridItems.value = [
-    //         {
-    //             title: "我的主页",
-    //             desc: "查看农场列表",
-    //             path: "/my_farm",
-    //         },
-    //         {
-    //             title: "我的消息",
-    //             desc: "查看未读信息",
-    //             path: "/message",
-    //         },
-    //         {
-    //             title: "信息化档案",
-    //             desc: "查看历史农事",
-    //             path: "/archives",
-    //         },
-    //     ];
-    // }
     gridItems.value = [
         {
             title: "我的主页",
@@ -200,58 +145,7 @@ onActivated(() => {
 
 // 单元格项数据 - 根据角色动态显示
 const cellItems = computed(() => {
-    // if (curRole.value === 0) {
-    //     return [
-    //         // {
-    //         //     title: "我的农场",
-    //         //     path: "/my_farm",
-    //         // },
-    //         {
-    //             title: "认证农资",
-    //             path: "/register?identity=NZ",
-    //         },
-    //         // {
-    //         //     title: "退出登录",
-    //         //     path: "/logout",
-    //         // },
-    //     ];
-    // } else {
-    //     return [
-    //         {
-    //             title: "认证农资",
-    //             path: "/register?identity=NZ",
-    //         },
-    //         {
-    //             title: "系统提醒",
-    //             path: "/message",
-    //         },
-    //         {
-    //             title: "种植方案",
-    //             path: "/plan?farmId=101532&pageType=plant",
-    //         },
-    //         {
-    //             title: "服务记录",
-    //             path: "/service_records",
-    //         },
-    //         {
-    //             title: "报价维护",
-    //             path: "/offer_price",
-    //         },
-    //         {
-    //             title: "服务维护",
-    //             path: "/service_manage",
-    //         },
-    //         {
-    //             title: "团队管理",
-    //             path: "/team_manage",
-    //         },
-    //     ];
-    // }
-    return [
-        {
-            title: "认证农资",
-            path: "/register?identity=NZ",
-        },
+    let list  = [
         {
             title: "系统提醒",
             path: "/message",
@@ -276,7 +170,14 @@ const cellItems = computed(() => {
             title: "团队管理",
             path: "/team_manage",
         },
-    ];
+    ]
+    if(curRole.value === 0) {
+        list.unshift({
+            title: "认证农资",
+            path: "/register?identity=NZ",
+        });
+    }
+    return list;
 });
 
 // 花园信息项数据

+ 39 - 34
src/views/old_mini/modify_work/completedWork.vue

@@ -220,11 +220,13 @@
             </div>
 
             <!-- 农资,步骤:农资已执行,请求确认 -->
-            <div class="fixed-btn-wrap center" v-if="curRole == 2 && !detailData?.expectedExecuteDate">
-                <div class="fixed-btn orange" :class="{ 'primary-text': getButtonText() }" @click="selectExecuteTime">{{ getButtonText() ? '提醒确认执行时间' : '确认执行时间' }}</div>
+            <div class="fixed-btn-wrap" :class="{ 'center': !getButtonText() }" v-if="curRole == 2 && !detailData?.expectedExecuteDate">
+                <div class="fixed-btn orange primary-text" @click="handleRemindExecuteTime" v-if="getButtonText()">提醒确认执行时间</div>
+                <div class="fixed-btn orange" @click="selectExecuteTime">确认执行时间</div>
             </div>
-            <div class="fixed-btn-wrap center" v-if="curRole == 2 && detailData?.expectedExecuteDate">
-                <div class="fixed-btn primary" @click="showOfferPopup(detailData)">{{ getButtonText() ? '提醒执行' : '上传照片' }}</div>
+            <div class="fixed-btn-wrap" :class="{ 'center': !getButtonText() }" v-if="curRole == 2 && detailData?.expectedExecuteDate">
+                <div class="fixed-btn primary primary-text width-120" @click="handleExecute" v-if="getButtonText()">提醒执行</div>
+                <div class="fixed-btn primary" @click="showOfferPopup(detailData)">上传照片</div>
             </div>
 
             <!-- 农资,步骤:农事已确认 -->
@@ -394,21 +396,21 @@ const getButtonText = () => {
 const offerPopupRef = ref(null);
 const isGoBack = ref(false);
 const showOfferPopup = (item) => {
-    if(getButtonText()) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事执行提醒,请您尽快执行',
-            targetUrl: `completed_work`,
-            paramsPage: JSON.stringify({id: item.id}),
-            imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
-        };
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-        });
-    }else{
-        isGoBack.value = true;
-        offerPopupRef.value.openPopup(item);
-    }
+    isGoBack.value = true;
+    offerPopupRef.value.openPopup(item);
+};
+
+const handleExecute = () => {
+    const query = {
+        askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
+        shareText: '向您分享了一条农事执行提醒,请您尽快执行',
+        targetUrl: `completed_work`,
+        paramsPage: JSON.stringify({id: detailData.value.id}),
+        imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
+    };
+    wx.miniProgram.navigateTo({
+        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
+    });
 };
 
 const showCalendar = ref(false);
@@ -416,21 +418,21 @@ const maxDate = ref(new Date());
 // 最小日期设置为今天,今天可以选择
 const minDate = new Date();
 const selectExecuteTime = () => {
-    if(getButtonText()) {
-        const query = {
-            askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
-            shareText: '向您分享了一条农事提醒,请您尽快确认执行时间',
-            targetUrl: `completed_work`,
-            paramsPage: JSON.stringify({id: detailData.value.id}),
-            imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
-        };
-        wx.miniProgram.navigateTo({
-            url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
-        });
-    }else{
-        maxDate.value = new Date(detailData.value.executeDeadlineDate);
-        showCalendar.value = true;
-    }
+    maxDate.value = new Date(detailData.value.executeDeadlineDate);
+    showCalendar.value = true;
+};
+
+const handleRemindExecuteTime = () => {
+    const query = {
+        askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
+        shareText: '向您分享了一条农事提醒,请您尽快确认执行时间',
+        targetUrl: `completed_work`,
+        paramsPage: JSON.stringify({id: detailData.value.id}),
+        imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
+    };
+    wx.miniProgram.navigateTo({
+        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
+    });
 };
 
 const onConfirmExecuteTime = (date) => {
@@ -700,6 +702,9 @@ const handlePriceInfo = async () => {
                     color: #2199f8;
                     border: 1px solid #2199f8;
                 }
+                &.width-120 {
+                    width: 120px;
+                }
             }
         }
         .card-title {

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

@@ -245,8 +245,9 @@
                 </template>
             </div>
 
-            <div class="fixed-btn-wrap" :class="{ center: !paramsPage.isBtn }">
+            <div class="fixed-btn-wrap" :class="{ center: !paramsPage.isBtn && !getButtonText() }">
                     <div class="fixed-btn more" @click="handleMore" v-if="paramsPage.isBtn">查看更多农事</div>
+                    <div class="fixed-btn more" @click="handleRemindUser" v-if="getButtonText() && !paramsPage.isBtn">提醒复核</div>
                     <div class="fixed-btn excute" @click="generateReport">生成成果报告</div>
             </div>
             <div
@@ -328,6 +329,7 @@ import AlbumCarousel from "@/components/album_compoents/albumCarousel";
 import { ElMessage } from "element-plus";
 import uploadPopup from "@/components/popup/uploadPopup.vue";
 import { base_img_url2 } from "@/api/config";
+import wx from "weixin-js-sdk";
 import reviewPopup from "@/views/old_mini/task_condition/components/reviewPopup.vue";
 import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
 import html2canvas from "html2canvas";
@@ -376,6 +378,10 @@ onActivated(() => {
     getTriggerImg(paramsPage.value.id);
 });
 
+const getButtonText = () => {
+    return agriculturalRole.value === 1 || workItem.value.executorUserId != userId.value;
+};
+
 const getDetail = () => {
     if (!paramsPage.value.id) return;
     loading.value = true;
@@ -533,7 +539,16 @@ const generateReport = () => {
 };
 
 const handleRemindUser = () => {
-    uploadExecuteRef.value.showPopup({ ...workItem.value, type: "remindUser" });
+    const query = {
+        askInfo: { title: "农事提醒", content: "是否分享该农事提醒给好友" },
+        shareText: '向您分享了一条农事复核提醒,请您尽快复核',
+        targetUrl: `review_work`,
+        paramsPage: JSON.stringify({id: workItem.value.id}),
+        imageUrl: 'https://birdseye-img.sysuimars.com/birdseye-look-mini/invite_bg.png',
+    };
+    wx.miniProgram.navigateTo({
+        url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
+    });
 };
 
 const handleMore = () => {

+ 2 - 2
src/views/old_mini/monitor/subPages/plan.vue

@@ -289,7 +289,7 @@ const getFarmWorkPlanForPhenology = async () => {
         });
         if (code === 0 && data?.phenologyList?.[0]?.containerSpaceTimeId) {
             containerSpaceTimeId.value = data.phenologyList[0].containerSpaceTimeId;
-            schemeId.value = data.phenologyList[0].reproductiveList[0].farmWorkArrangeList[0].schemeId;
+            schemeId.value = data.schemeId;
 
             // 收集所有farmWorkId
             farmWorkIds.value = [];
@@ -549,7 +549,7 @@ const handleRowClick = (item) => {
             }
             // 没有权限时,底部按钮不显示,高度增加 73px
             &.timeline-container-no-permission-wrap {
-                height: calc(100vh - 90px - 18px);
+                height: calc(100vh - 90px - 60px);
             }
         }
     }