|
|
@@ -26,13 +26,13 @@
|
|
|
<template #footer>
|
|
|
<div class="action-group">
|
|
|
<div class="action-l">查看详情</div>
|
|
|
- <div class="action-r" v-if="section.farmWorkDetail?.flowStatus === 1">
|
|
|
+ <div class="action-r" v-if="section.farmWorkDetail?.flowStatus === 0 && !section.isPublic">
|
|
|
<div class="action-item warning-item" @click.stop="handleApply(section)">
|
|
|
发起需求
|
|
|
</div>
|
|
|
- <div class="action-item primary-item">我已完成</div>
|
|
|
+ <div class="action-item primary-item" @click.stop="handleConfirmComplete(section)">确认并完成</div>
|
|
|
</div>
|
|
|
- <div class="action-r" v-else-if="section.farmWorkDetail?.flowStatus === 2">
|
|
|
+ <div class="action-r" v-else-if="section.farmWorkDetail?.flowStatus === 0 && section.isPublic">
|
|
|
<div
|
|
|
class="action-item second-item"
|
|
|
@click.stop="handleOperation(section, 'cancel')"
|
|
|
@@ -99,11 +99,15 @@ import wx from "weixin-js-sdk";
|
|
|
import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
|
|
|
import tipPopup from "@/components/popup/tipPopup.vue";
|
|
|
import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
|
|
|
-import { ElMessageBox } from "element-plus";
|
|
|
+import { ElMessageBox, ElMessage } from "element-plus";
|
|
|
import { base_img_url2 } from "@/api/config";
|
|
|
import reviewUploadPopup from "@/components/popup/reviewUploadPopup.vue";
|
|
|
const router = useRouter();
|
|
|
|
|
|
+const handleConfirmComplete = (section) => {
|
|
|
+ ElMessage.warning("该功能正在升级中,敬请期待");
|
|
|
+};
|
|
|
+
|
|
|
const showApplyPopup = ref(false);
|
|
|
const uploadExecuteRef = ref(null);
|
|
|
|
|
|
@@ -138,10 +142,18 @@ const onSelect = async (option) => {
|
|
|
url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=priceSheet`,
|
|
|
});
|
|
|
} else {
|
|
|
- updateFlowStatus(2);
|
|
|
+ updatePublicStatus(1);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const updatePublicStatus = (isPublic) => {
|
|
|
+ return VE_API.z_farm_work_record.updatePublicStatus({ recordId: currentSection.value.id, isPublic }).then((res) => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ getContentData();
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
const updateFlowStatus = (targetFlowStatus) => {
|
|
|
return VE_API.z_farm_work_record.updateFlowStatus({ id: currentSection.value.id, targetFlowStatus }).then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
@@ -162,7 +174,11 @@ const handleOperation = (section, type) => {
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
|
- updateFlowStatus(type === "cancel" ? 1 : 5);
|
|
|
+ if (type === "cancel") {
|
|
|
+ updatePublicStatus(0);
|
|
|
+ }else{
|
|
|
+ updateFlowStatus(5);
|
|
|
+ }
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
};
|
|
|
@@ -177,6 +193,10 @@ const handleUploadPhoto = ({ id }) => {
|
|
|
|
|
|
const filterType = ref([
|
|
|
{
|
|
|
+ title: "待确认",
|
|
|
+ value: '0',
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "待完成",
|
|
|
value: 4,
|
|
|
},
|
|
|
@@ -186,7 +206,7 @@ const filterType = ref([
|
|
|
},
|
|
|
]);
|
|
|
|
|
|
-const activePlanIndex = ref(4);
|
|
|
+const activePlanIndex = ref('0');
|
|
|
const handlePlanClick = (value) => {
|
|
|
activePlanIndex.value = value;
|
|
|
getContentData();
|
|
|
@@ -200,7 +220,7 @@ const contentData = ref([]);
|
|
|
const getContentData = async () => {
|
|
|
const res = await VE_API.z_farm_work_record.getSimpleList({
|
|
|
role: localStorage.getItem("SET_USER_CUR_ROLE"),
|
|
|
- flowStatus: activePlanIndex.value === 4 ? "1,2,3,4" : activePlanIndex.value,
|
|
|
+ flowStatus: activePlanIndex.value === 4 ? "3,4" : activePlanIndex.value,
|
|
|
});
|
|
|
contentData.value = res.data;
|
|
|
|