From 9c38da0d86a221cbbbc2bf84dc14a3154832778f Mon Sep 17 00:00:00 2001 From: QI_YUJIE <2878090898@qq.com> Date: Tue, 22 Aug 2023 15:58:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=BF=E5=8C=85=E5=90=88=E5=90=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../village/contractor/contractorLand.vue | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/views/contracted/village/contractor/contractorLand.vue b/src/views/contracted/village/contractor/contractorLand.vue index 94b5585b..69fc61ea 100644 --- a/src/views/contracted/village/contractor/contractorLand.vue +++ b/src/views/contracted/village/contractor/contractorLand.vue @@ -85,6 +85,7 @@ import contractorHeader from "./contractorHeader"; import { listCbdkxx, deleteCbdkxx, transferCbdkxx } from "@/api/contracted/cbdkxx"; import { listCbf } from "@/api/contracted/cbf"; + import { getCbht } from "@/api/contracted/cbht"; export default { name: "contractedVillageContractor", @@ -115,6 +116,29 @@ }); }, goDetail(id){ + if (!id) { + // 新增时,查看承包合同是否存在 + getCbht(this.$route.params.cbfbm).then(response => { + if (!response.data) { + this.$toast({ + icon: 'fail', // 找到自己需要的图标 + message: '承包合同不存在,请先添加承包合同信息', + duration:"2000" + }); + return ; + } else { + this.$router.push({ + name: 'contractedVillageContractorLandDetail', + params: { + deptId: this.$route.params.deptId, + cbfbm: this.$route.params.cbfbm, + cbfmc: this.$route.params.cbfmc, + surveyStatus: this.$route.params.surveyStatus + } + }); + } + }); + } else { this.$router.push({ name: 'contractedVillageContractorLandDetail', params: { @@ -125,6 +149,7 @@ surveyStatus: this.$route.params.surveyStatus } }); + } }, skip(name) { this.$router.push({