|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="plan-page">
|
|
|
- <custom-header :name="pageType === 'plant' ? '种植方案' : '农事规划'"></custom-header>
|
|
|
+ <custom-header :name="pageType === 'plant' ? '种植方案' : '农事规划'" isGoBack @goback="goback"></custom-header>
|
|
|
<div class="plan-content">
|
|
|
<div class="plan-content-header" v-if="pageType === 'plant'">
|
|
|
<el-select
|
|
|
@@ -131,12 +131,10 @@
|
|
|
<tip-popup
|
|
|
v-model:show="showTipPopup"
|
|
|
type="warning"
|
|
|
- text="请完善"
|
|
|
- text2="信息"
|
|
|
- highlightText="全托管方案"
|
|
|
- buttonText="去完善"
|
|
|
+ text2="还未完善此方案不可用"
|
|
|
+ :highlightText="highlightText"
|
|
|
+ buttonText="我知道了"
|
|
|
@confirm="handleBtn"
|
|
|
- :closeOnClickOverlay="false"
|
|
|
/>
|
|
|
</template>
|
|
|
|
|
|
@@ -155,8 +153,21 @@ const router = useRouter();
|
|
|
const route = useRoute();
|
|
|
|
|
|
const showTipPopup = ref(false);
|
|
|
+const highlightText = ref("");
|
|
|
const handleBtn = () => {
|
|
|
showTipPopup.value = false;
|
|
|
+ setTimeout(() => {
|
|
|
+ router.go(-1);
|
|
|
+ }, 10);
|
|
|
+};
|
|
|
+
|
|
|
+const goback = () => {
|
|
|
+ if(tabs.value[currentTabIndex.value]?.enabled == 0 && pageType.value === "plant" && active.value !== tabs.value[0]?.id) {
|
|
|
+ highlightText.value = tabs.value[currentTabIndex.value]?.name;
|
|
|
+ showTipPopup.value = true;
|
|
|
+ } else {
|
|
|
+ router.go(-1);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const userInfoStr = localStorage.getItem("localUserInfo");
|
|
|
@@ -413,7 +424,6 @@ const handleSubmitPlan = async () => {
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
- // showTipPopup.value = true;
|
|
|
ElMessage.warning("当前方案有未完善报价信息的农事,请先完善报价信息");
|
|
|
}
|
|
|
}
|