|
@@ -353,7 +353,7 @@
|
|
|
<div
|
|
<div
|
|
|
class="fixed-btn"
|
|
class="fixed-btn"
|
|
|
v-if="detailData?.flowStatus == 0 && curRole == 0 && !query?.isAssign && !detailData?.isPublic"
|
|
v-if="detailData?.flowStatus == 0 && curRole == 0 && !query?.isAssign && !detailData?.isPublic"
|
|
|
- @click="handleOk"
|
|
|
|
|
|
|
+ @click="handleUploadPhoto({ id: detailData.id })"
|
|
|
>
|
|
>
|
|
|
确认并完成
|
|
确认并完成
|
|
|
</div>
|
|
</div>
|
|
@@ -383,7 +383,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 报价弹窗 -->
|
|
<!-- 报价弹窗 -->
|
|
|
- <offer-popup :showPopup="showPopup" :executionData="executionData"></offer-popup>
|
|
|
|
|
|
|
+ <!-- <offer-popup :showPopup="showPopup" :executionData="executionData"></offer-popup> -->
|
|
|
<!-- 服务报价单 -->
|
|
<!-- 服务报价单 -->
|
|
|
<price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
|
|
<price-sheet-popup ref="priceSheetPopupRef"></price-sheet-popup>
|
|
|
<!-- 需求发送成功 -->
|
|
<!-- 需求发送成功 -->
|
|
@@ -416,11 +416,14 @@
|
|
|
<upload-execute ref="uploadExecuteRef" @uploadSuccess="handleUploadSuccess" :onlyShare="onlyShare" />
|
|
<upload-execute ref="uploadExecuteRef" @uploadSuccess="handleUploadSuccess" :onlyShare="onlyShare" />
|
|
|
<!-- 发起需求成功弹窗 -->
|
|
<!-- 发起需求成功弹窗 -->
|
|
|
<fn-share-sheet v-model:show="showDemandShare" @select="onDemandSelect" :options="demandOptions" />
|
|
<fn-share-sheet v-model:show="showDemandShare" @select="onDemandSelect" :options="demandOptions" />
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 上传照片弹窗 -->
|
|
|
|
|
+ <review-upload-popup :key="10" v-model="showUpload" :record-id="sectionId" @success="handleSelfDone" />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import customHeader from "@/components/customHeader.vue";
|
|
import customHeader from "@/components/customHeader.vue";
|
|
|
-import { ref, computed, onActivated } from "vue";
|
|
|
|
|
|
|
+import { ref, computed, onActivated, onDeactivated } 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";
|
|
@@ -434,6 +437,7 @@ import { base_img_url2 } from "@/api/config";
|
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
|
import { formatArea } from "@/common/commonFun";
|
|
import { formatArea } from "@/common/commonFun";
|
|
|
import wx from "weixin-js-sdk";
|
|
import wx from "weixin-js-sdk";
|
|
|
|
|
+import reviewUploadPopup from "@/components/popup/reviewUploadPopup.vue";
|
|
|
import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
|
|
import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
@@ -450,17 +454,36 @@ const curRole = ref(localStorage.getItem("SET_USER_CUR_ROLE"));
|
|
|
|
|
|
|
|
// 0:执行, 1: 复核
|
|
// 0:执行, 1: 复核
|
|
|
const status = ref(0);
|
|
const status = ref(0);
|
|
|
-const showPopup = ref(false);
|
|
|
|
|
-const executionData = ref({});
|
|
|
|
|
const uploadExecuteRef = ref(null);
|
|
const uploadExecuteRef = ref(null);
|
|
|
|
|
|
|
|
-// 我已完成
|
|
|
|
|
-const handleOk = () => {
|
|
|
|
|
- if (status.value === 0) {
|
|
|
|
|
- showPopup.value = !showPopup.value;
|
|
|
|
|
- } else {
|
|
|
|
|
- // 立即复核
|
|
|
|
|
- }
|
|
|
|
|
|
|
+const showUpload = ref(false);
|
|
|
|
|
+const sectionId = ref(null);
|
|
|
|
|
+// 上传照片处理函数
|
|
|
|
|
+const handleUploadPhoto = ({ id }) => {
|
|
|
|
|
+ showUpload.value = true;
|
|
|
|
|
+ sectionId.value = id;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+onDeactivated(() => {
|
|
|
|
|
+ showUpload.value = false;
|
|
|
|
|
+ sectionId.value = null;
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+const handleSelfDone = () => {
|
|
|
|
|
+ VE_API.z_farm_work_record.updateFlowStatus({ id: query.value.id, targetFlowStatus: 5 }).then((res) => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ showUpload.value = false;
|
|
|
|
|
+ sectionId.value = null;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ router.replace({
|
|
|
|
|
+ path: "/review_work",
|
|
|
|
|
+ query: {
|
|
|
|
|
+ json: JSON.stringify({ id: query.value.id, goBack: true }),
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 500)
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const successText = ref("");
|
|
const successText = ref("");
|
|
@@ -523,12 +546,16 @@ const handlePopupBtn = () => {
|
|
|
getDetail(query.value.id);
|
|
getDetail(query.value.id);
|
|
|
currentStep.value = 2;
|
|
currentStep.value = 2;
|
|
|
} else {
|
|
} else {
|
|
|
- router.replace({
|
|
|
|
|
- path: "/review_work",
|
|
|
|
|
- query: {
|
|
|
|
|
- json: JSON.stringify({ id: query.value.id,goBack: true }),
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ showUpload.value = false;
|
|
|
|
|
+ sectionId.value = null;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ router.replace({
|
|
|
|
|
+ path: "/review_work",
|
|
|
|
|
+ query: {
|
|
|
|
|
+ json: JSON.stringify({ id: query.value.id,goBack: true }),
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 500)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|