|
|
@@ -31,11 +31,11 @@
|
|
|
该农事已完成
|
|
|
</div>
|
|
|
</div>
|
|
|
- <template v-if="query.status !== 'warning'">
|
|
|
+ <!-- <template v-if="query.status !== 'warning'">
|
|
|
<div class="status-r" v-if="curRole == 0">{{ status === 0 ? "设置提醒" : "去评价" }}</div>
|
|
|
<div class="status-r" v-if="curRole == 1">{{ status === 0 ? "提醒执行" : "提醒复核" }}</div>
|
|
|
<div class="status-r" v-if="curRole == 2">{{ status === 0 ? "提醒执行" : "提醒复核" }}</div>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
</div>
|
|
|
<div class="work-wrap" v-if="query?.farmWorkOrderId || detailData?.flowStatus === 4">
|
|
|
<div class="box-wrap executor-info" v-if="query.status === 'warning' || curRole == 0 || curRole == 2">
|
|
|
@@ -174,7 +174,7 @@
|
|
|
</div>
|
|
|
<div class="form-item">
|
|
|
<div class="item-name">执行时间</div>
|
|
|
- <div class="item-text">{{ detailData?.executeDate }}</div>
|
|
|
+ <div class="item-text">{{ detailData?.executeDate || detailData?.expectedExecuteDate || detailData?.executeDate }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -245,84 +245,18 @@
|
|
|
</div>
|
|
|
</div> -->
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="fixed-btn-wrap"
|
|
|
- :class="{
|
|
|
- center:
|
|
|
- (currentStep == 0 && detailData?.isPublic) ||
|
|
|
- (detailData?.flowStatus == 3 && curRole == 0) ||
|
|
|
- (detailData?.flowStatus == 4 && curRole == 2) ||
|
|
|
- (detailData?.flowStatus == 2 && curRole == 0) ||
|
|
|
- (detailData?.flowStatus == 4 && curRole == 0),
|
|
|
- }"
|
|
|
- v-if="query.status !== 'warning'"
|
|
|
- >
|
|
|
- <!-- <div class="fixed-btn expert">提醒农事确认</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"
|
|
|
- @click="handleRemindExecute"
|
|
|
- >
|
|
|
- 提醒对方执行
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="fixed-btn orange"
|
|
|
- v-if="detailData?.flowStatus == 0 && curRole == 0 && !query?.isAssign && !detailData?.isPublic"
|
|
|
- @click="handleDemand"
|
|
|
- >
|
|
|
- 发起需求
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="fixed-btn orange"
|
|
|
- v-if="detailData?.flowStatus == 0 && !query?.farmWorkOrderId && curRole == 0 && detailData?.isPublic"
|
|
|
- @click="cancelDemand"
|
|
|
- >
|
|
|
- 取消发起
|
|
|
- </div>
|
|
|
- <div
|
|
|
- class="fixed-btn"
|
|
|
- v-if="detailData?.flowStatus == 0 && curRole == 0 && !query?.isAssign && !detailData?.isPublic"
|
|
|
- @click="handleUploadPhoto({ id: detailData.id })"
|
|
|
- >
|
|
|
- 确认并完成
|
|
|
- </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 class="fixed-btn-wrap" v-if="curRole == 2 && currentStep == 0">
|
|
|
- <div class="fixed-btn second" @click="showIgnore">忽略</div>
|
|
|
- <div class="fixed-btn" @click="showPriceSheetPopup">确认并报价</div>
|
|
|
- </div>
|
|
|
<!-- 农资,步骤:农资已执行,请求确认 -->
|
|
|
- <div class="fixed-btn-wrap center" v-if="curRole == 2 && currentStep == 2">
|
|
|
+ <div class="fixed-btn-wrap center" v-if="curRole == 2 && !detailData?.expectedExecuteDate">
|
|
|
<div class="fixed-btn orange" @click="selectExecuteTime">确认执行时间</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<!-- 农资,步骤:农事已确认 -->
|
|
|
- <!-- <div class="fixed-btn-wrap" v-if="curRole == 2 && currentStep == 2">
|
|
|
+ <div class="fixed-btn-wrap" v-if="curRole == 2 && detailData?.expectedExecuteDate">
|
|
|
<div class="fixed-btn second" @click="showPriceSheetPopup">生成报价单</div>
|
|
|
<div class="fixed-btn" @click="handleTimelineAction(detailData)">转入农事任务</div>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 报价弹窗 -->
|
|
|
@@ -384,7 +318,7 @@ import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
|
|
|
import uploadExecute from "@/views/old_mini/task_condition/components/uploadExecute.vue";
|
|
|
import { base_img_url2 } from "@/api/config";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
-import { formatArea } from "@/common/commonFun";
|
|
|
+import { formatArea, formatDate } from "@/common/commonFun";
|
|
|
import wx from "weixin-js-sdk";
|
|
|
import reviewUploadPopup from "@/components/popup/reviewUploadPopup.vue";
|
|
|
import FnShareSheet from "@/components/pageComponents/FnShareSheet.vue";
|
|
|
@@ -568,17 +502,21 @@ const handleRemindExecute = () => {
|
|
|
};
|
|
|
|
|
|
const showCalendar = ref(false);
|
|
|
-const maxDate = ref(new Date(2025, 12, 25));
|
|
|
+const maxDate = ref(new Date());
|
|
|
const minDate = new Date(2010, 0, 1);
|
|
|
const selectExecuteTime = () => {
|
|
|
+ maxDate.value = new Date(detailData.value.executeDeadlineDate);
|
|
|
showCalendar.value = true;
|
|
|
};
|
|
|
|
|
|
-const formatDate = (date) => `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
|
|
|
|
|
|
const onConfirmExecuteTime = (date) => {
|
|
|
- console.log("date", formatDate(date));
|
|
|
showCalendar.value = false;
|
|
|
+ VE_API.z_farm_work_record.updateExpectedExecuteDate({ recordId: query.value.id, expectedExecuteDate: formatDate(date) }).then((res) => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ getDetail(query.value.id);
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
const handleForward = () => {
|
|
|
@@ -811,7 +749,7 @@ const getDetail = async (id) => {
|
|
|
const { data } = await VE_API.z_farm_work_record.getDetail({ id });
|
|
|
if (data && data.length > 0) {
|
|
|
detailData.value = data[0];
|
|
|
- maxDate.value = new Date(detailData.value.executeDate);
|
|
|
+ // maxDate.value = new Date(detailData.value.executeDate);
|
|
|
currentStep.value = getCurrentStep(detailData.value.flowStatus);
|
|
|
parmasPage.value = {
|
|
|
...detailData.value,
|