|
@@ -324,7 +324,7 @@ onDeactivated(() => {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const handleSelfDone = () => {
|
|
const handleSelfDone = () => {
|
|
|
- VE_API.z_farm_work_record.updateFlowStatus({ id: query.value.id, targetFlowStatus: 5 }).then((res) => {
|
|
|
|
|
|
|
+ VE_API.z_farm_work_record.updateFlowStatus({ id: queryRecordId.value, targetFlowStatus: 5 }).then((res) => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
showUpload.value = false;
|
|
showUpload.value = false;
|
|
|
sectionId.value = null;
|
|
sectionId.value = null;
|
|
@@ -332,7 +332,7 @@ const handleSelfDone = () => {
|
|
|
router.replace({
|
|
router.replace({
|
|
|
path: "/review_work",
|
|
path: "/review_work",
|
|
|
query: {
|
|
query: {
|
|
|
- miniJson: JSON.stringify({ id: query.value.id, goBack: true }),
|
|
|
|
|
|
|
+ miniJson: JSON.stringify({ id: queryRecordId.value, goBack: true }),
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
}, 500);
|
|
}, 500);
|
|
@@ -348,14 +348,14 @@ const handlePopupBtn = () => {
|
|
|
showTaskPopup.value = false;
|
|
showTaskPopup.value = false;
|
|
|
if (taskPopupType.value === "warning") {
|
|
if (taskPopupType.value === "warning") {
|
|
|
// 取消发起
|
|
// 取消发起
|
|
|
- VE_API.z_farm_work_record.updatePublicStatus({ recordId: query.value.id, isPublic: 0 }).then((res) => {
|
|
|
|
|
|
|
+ VE_API.z_farm_work_record.updatePublicStatus({ recordId: queryRecordId.value, isPublic: 0 }).then((res) => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
- getDetail(query.value.id);
|
|
|
|
|
|
|
+ getDetail(queryRecordId.value);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
} else if (taskPopupType.value === "warningIgnore") {
|
|
} else if (taskPopupType.value === "warningIgnore") {
|
|
|
// 确认忽略
|
|
// 确认忽略
|
|
|
- VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: query.value.id }).then((res) => {
|
|
|
|
|
|
|
+ VE_API.z_farm_work_record.ignoreFarmWorkRecord({ farmWorkRecordId: queryRecordId.value }).then((res) => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
ElMessage.success("操作成功");
|
|
ElMessage.success("操作成功");
|
|
|
router.back();
|
|
router.back();
|
|
@@ -363,7 +363,7 @@ const handlePopupBtn = () => {
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
if (taskPopupActionType.value === 0) {
|
|
if (taskPopupActionType.value === 0) {
|
|
|
- getDetail(query.value.id);
|
|
|
|
|
|
|
+ getDetail(queryRecordId.value);
|
|
|
} else {
|
|
} else {
|
|
|
showUpload.value = false;
|
|
showUpload.value = false;
|
|
|
sectionId.value = null;
|
|
sectionId.value = null;
|
|
@@ -371,7 +371,7 @@ const handlePopupBtn = () => {
|
|
|
router.replace({
|
|
router.replace({
|
|
|
path: "/review_work",
|
|
path: "/review_work",
|
|
|
query: {
|
|
query: {
|
|
|
- miniJson: JSON.stringify({ id: query.value.id, goBack: true }),
|
|
|
|
|
|
|
+ miniJson: JSON.stringify({ id: queryRecordId.value, goBack: true }),
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
}, 500);
|
|
}, 500);
|
|
@@ -438,17 +438,11 @@ const handleRemindExecuteTime = () => {
|
|
|
const onConfirmExecuteTime = (date) => {
|
|
const onConfirmExecuteTime = (date) => {
|
|
|
showCalendar.value = false;
|
|
showCalendar.value = false;
|
|
|
VE_API.z_farm_work_record
|
|
VE_API.z_farm_work_record
|
|
|
- .updateExpectedExecuteDate({ recordId: query.value.id, expectedExecuteDate: formatDate(date) })
|
|
|
|
|
|
|
+ .updateExpectedExecuteDate({ recordId: queryRecordId.value, expectedExecuteDate: formatDate(date) })
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
- if(showBack.value){
|
|
|
|
|
- router.replace({
|
|
|
|
|
- path: "/task_condition",
|
|
|
|
|
- });
|
|
|
|
|
- }else{
|
|
|
|
|
- ElMessage.success("操作成功");
|
|
|
|
|
- getDetail(query.value.id);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ElMessage.success("操作成功");
|
|
|
|
|
+ getDetail(queryRecordId.value);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
@@ -458,7 +452,7 @@ const handleUploadSuccess = () => {
|
|
|
isGoBack.value = false;
|
|
isGoBack.value = false;
|
|
|
router.back();
|
|
router.back();
|
|
|
} else {
|
|
} else {
|
|
|
- getDetail(query.value.id);
|
|
|
|
|
|
|
+ getDetail(queryRecordId.value);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -483,6 +477,7 @@ const equipmentList = computed(() => toList(quotationData.value.serviceEquipment
|
|
|
const agriculturalRole = ref(null);
|
|
const agriculturalRole = ref(null);
|
|
|
const userId = ref(null);
|
|
const userId = ref(null);
|
|
|
const showBack = ref(false);
|
|
const showBack = ref(false);
|
|
|
|
|
+const queryRecordId = ref(null);
|
|
|
onActivated(async () => {
|
|
onActivated(async () => {
|
|
|
//
|
|
//
|
|
|
const userInfo = JSON.parse(localStorage.getItem("localUserInfo"));
|
|
const userInfo = JSON.parse(localStorage.getItem("localUserInfo"));
|
|
@@ -499,6 +494,7 @@ onActivated(async () => {
|
|
|
id = data?.id;
|
|
id = data?.id;
|
|
|
showBack.value = true;
|
|
showBack.value = true;
|
|
|
}
|
|
}
|
|
|
|
|
+ queryRecordId.value = id;
|
|
|
if (id) {
|
|
if (id) {
|
|
|
await getDetail(id);
|
|
await getDetail(id);
|
|
|
|
|
|