|
@@ -43,12 +43,25 @@
|
|
|
<div class="executor-details">
|
|
<div class="executor-details">
|
|
|
<div class="org-name">
|
|
<div class="org-name">
|
|
|
<span class="name">{{ quotationData.agriculturalStoreName || '--' }}</span>
|
|
<span class="name">{{ quotationData.agriculturalStoreName || '--' }}</span>
|
|
|
- <span class="rating">5.0分</span>
|
|
|
|
|
|
|
+ <span class="rating">{{ quotationData.score ? (quotationData.score + '分') : '--' }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="service-info">
|
|
<div class="service-info">
|
|
|
- <div class="service-item">服务品种: <span>荔枝、龙眼</span></div>
|
|
|
|
|
|
|
+ <div class="service-item">服务品种:
|
|
|
|
|
+ <span v-if="speciesList.length">
|
|
|
|
|
+ <span v-for="(sp, sIdx) in speciesList" :key="sIdx">
|
|
|
|
|
+ {{ sp }}<template v-if="sIdx < speciesList.length - 1">、</template>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
|
+ </div>
|
|
|
<div class="service-item">
|
|
<div class="service-item">
|
|
|
- 服务设备: <span>无人机、水肥一体机、水肥一体机水肥</span>
|
|
|
|
|
|
|
+ 服务设备:
|
|
|
|
|
+ <span v-if="equipmentList.length">
|
|
|
|
|
+ <span v-for="(eq, eIdx) in equipmentList" :key="eIdx">
|
|
|
|
|
+ {{ eq }}<template v-if="eIdx < equipmentList.length - 1">、</template>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span v-else>--</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -245,12 +258,20 @@
|
|
|
v-if="query.status !== 'warning'"
|
|
v-if="query.status !== 'warning'"
|
|
|
>
|
|
>
|
|
|
<!-- <div class="fixed-btn expert">提醒农事确认</div> -->
|
|
<!-- <div class="fixed-btn expert">提醒农事确认</div> -->
|
|
|
- <div class="fixed-btn expert excute" v-if="detailData?.flowStatus == 2 && query?.farmWorkOrderId && curRole == 0" @click="handleConfirmExecute">确认对方执行</div>
|
|
|
|
|
- <div class="fixed-btn expert" v-if="detailData?.flowStatus == 5 && curRole == 0">确认对方完成</div>
|
|
|
|
|
- <div class="fixed-btn expert" v-if="detailData?.flowStatus == 4 && curRole == 0">提醒对方执行</div>
|
|
|
|
|
- <div class="fixed-btn orange" v-if="detailData?.flowStatus == 1 && curRole == 0" @click="handleDemand">发起需求</div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div class="fixed-btn expert" v-if="detailData?.flowStatus == 4 && curRole == 0 && detailData?.executeEvidence?.length" @click="handleConfirmComplete">确认对方完成</div>
|
|
|
|
|
+ <div class="fixed-btn expert" v-if="detailData?.flowStatus == 4 && curRole == 0 && !detailData?.executeEvidence?.length">提醒对方执行</div>
|
|
|
|
|
+ <div class="fixed-btn orange" v-if="detailData?.flowStatus == 1 && curRole == 0 && !query?.isAssign" @click="handleDemand">发起需求</div>
|
|
|
<div class="fixed-btn orange" v-if="detailData?.flowStatus == 2 && !(query?.farmWorkOrderId) && curRole == 0" @click="cancelDemand">取消发起</div>
|
|
<div class="fixed-btn orange" v-if="detailData?.flowStatus == 2 && !(query?.farmWorkOrderId) && curRole == 0" @click="cancelDemand">取消发起</div>
|
|
|
- <div class="fixed-btn" v-if="detailData?.flowStatus == 1 && curRole == 0" @click="handleOk">我已完成</div>
|
|
|
|
|
|
|
+ <div class="fixed-btn" v-if="detailData?.flowStatus == 1 && curRole == 0 && !query?.isAssign" @click="handleOk">我已完成</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 农户,步骤:农资已生成报价,农户要确认对方执行 -->
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="fixed-btn-wrap center"
|
|
|
|
|
+ v-if="(detailData?.flowStatus == 2 && query?.farmWorkOrderId && curRole == 0) || (query?.isAssign && curRole == 0 && detailData?.flowStatus < 4)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="fixed-btn expert excute" @click="handleConfirmExecute">确认对方执行</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 农资,步骤:农事已确认 -->
|
|
<!-- 农资,步骤:农事已确认 -->
|
|
@@ -296,7 +317,7 @@
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import customHeader from "@/components/customHeader.vue";
|
|
import customHeader from "@/components/customHeader.vue";
|
|
|
-import { onMounted, ref } from "vue";
|
|
|
|
|
|
|
+import { onMounted, ref, computed } from "vue";
|
|
|
// import NewFarmMap from "./newFarmMap";
|
|
// import NewFarmMap from "./newFarmMap";
|
|
|
import { useStore } from "vuex";
|
|
import { useStore } from "vuex";
|
|
|
import { Popup } from "vant";
|
|
import { Popup } from "vant";
|
|
@@ -336,12 +357,14 @@ const handleOk = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const successText = ref('');
|
|
const successText = ref('');
|
|
|
|
|
+const taskPopupActionType = ref(0);
|
|
|
const handleDemand = () => {
|
|
const handleDemand = () => {
|
|
|
// router.push("/share_page");
|
|
// router.push("/share_page");
|
|
|
VE_API.z_farm_work_record.updateFlowStatus({ id: query.id, targetFlowStatus: 2 }).then((res) => {
|
|
VE_API.z_farm_work_record.updateFlowStatus({ id: query.id, targetFlowStatus: 2 }).then((res) => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
taskPopupType.value = 'success';
|
|
taskPopupType.value = 'success';
|
|
|
successText.value = '需求已发送成功';
|
|
successText.value = '需求已发送成功';
|
|
|
|
|
+ taskPopupActionType.value = 0;
|
|
|
showTaskPopup.value = true;
|
|
showTaskPopup.value = true;
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -360,8 +383,17 @@ const handlePopupBtn = () => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
- getDetail(query.id);
|
|
|
|
|
- currentStep.value = 2
|
|
|
|
|
|
|
+ if (taskPopupActionType.value === 0) {
|
|
|
|
|
+ getDetail(query.id);
|
|
|
|
|
+ currentStep.value = 2
|
|
|
|
|
+ } else {
|
|
|
|
|
+ router.replace({
|
|
|
|
|
+ path: "/review_work",
|
|
|
|
|
+ query: {
|
|
|
|
|
+ id: query.id,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -380,11 +412,23 @@ const handleConfirmExecute = () => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
taskPopupType.value = 'success';
|
|
taskPopupType.value = 'success';
|
|
|
successText.value = '农事已锁单成功';
|
|
successText.value = '农事已锁单成功';
|
|
|
|
|
+ taskPopupActionType.value = 0;
|
|
|
showTaskPopup.value = true;
|
|
showTaskPopup.value = true;
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const handleConfirmComplete = () => {
|
|
|
|
|
+ VE_API.z_farm_work_record.updateFlowStatus({ id: query.id, targetFlowStatus: 5 }).then((res) => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ taskPopupType.value = 'success';
|
|
|
|
|
+ successText.value = '农事已经执行结束,请按照时间复核';
|
|
|
|
|
+ taskPopupActionType.value = 1;
|
|
|
|
|
+ showTaskPopup.value = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const onlyShare = ref(false);
|
|
const onlyShare = ref(false);
|
|
|
const handleShare = () => {
|
|
const handleShare = () => {
|
|
|
onlyShare.value = true;
|
|
onlyShare.value = true;
|
|
@@ -393,7 +437,11 @@ const handleShare = () => {
|
|
|
}, 10);
|
|
}, 10);
|
|
|
};
|
|
};
|
|
|
const showUploadExecutePopup = () => {
|
|
const showUploadExecutePopup = () => {
|
|
|
- onlyShare.value = false;
|
|
|
|
|
|
|
+ if (detailData.value?.executeEvidence.length) {
|
|
|
|
|
+ onlyShare.value = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ onlyShare.value = false;
|
|
|
|
|
+ }
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
uploadExecuteRef.value.showPopup(query.id);
|
|
uploadExecuteRef.value.showPopup(query.id);
|
|
|
}, 10);
|
|
}, 10);
|
|
@@ -402,6 +450,12 @@ const showUploadExecutePopup = () => {
|
|
|
// const areaRef = ref(null);
|
|
// const areaRef = ref(null);
|
|
|
// let newFarmMap = new NewFarmMap();
|
|
// let newFarmMap = new NewFarmMap();
|
|
|
const quotationData = ref({});
|
|
const quotationData = ref({});
|
|
|
|
|
+const toList = (val) => {
|
|
|
|
|
+ if (!val) return [];
|
|
|
|
|
+ return JSON.parse(val);
|
|
|
|
|
+};
|
|
|
|
|
+const speciesList = computed(() => toList(quotationData.value.serviceSpecies));
|
|
|
|
|
+const equipmentList = computed(() => toList(quotationData.value.serviceEquipment));
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
const id = query.id;
|
|
const id = query.id;
|
|
|
if (id) {
|
|
if (id) {
|