|
|
@@ -10,9 +10,7 @@
|
|
|
<div class="date">
|
|
|
<span class="work-name">{{ timelineItem.farmWorkName }}</span>
|
|
|
<span v-show="timelineItem.expectedRisk">({{ timelineItem.expectedRisk }})</span>
|
|
|
- <span class="ignore-btn" @click="handleIgnore(timelineItem, item.farmId)">
|
|
|
- 忽略
|
|
|
- </span>
|
|
|
+ <span class="ignore-btn" @click="handleIgnore(timelineItem)"> 忽略 </span>
|
|
|
</div>
|
|
|
<div class="text">
|
|
|
预计报价<span class="price">{{ timelineItem.estimatedCost }}元</span>
|
|
|
@@ -33,7 +31,7 @@
|
|
|
import activeUploadPopup from "@/components/popup/activeUploadPopup.vue";
|
|
|
import priceSheetPopup from "@/components/popup/priceSheetPopup.vue";
|
|
|
import { computed, onMounted, ref } from "vue";
|
|
|
-import { ElMessage } from "element-plus";
|
|
|
+import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
|
|
const props = defineProps({
|
|
|
item: {
|
|
|
@@ -61,13 +59,12 @@ onMounted(() => {
|
|
|
getManagerList();
|
|
|
});
|
|
|
|
|
|
-
|
|
|
-// 查询当前农资店的成员列表(只保留有“任务接单”权限的成员)
|
|
|
+// 查询当前农资店的成员列表(只保留有"任务接单"权限的成员)
|
|
|
const getManagerList = async () => {
|
|
|
- const { data } = await VE_API.mine.listManagerList({onlyExecutor: true});
|
|
|
+ const { data } = await VE_API.mine.listManagerList({ onlyExecutor: true });
|
|
|
if (data && data.length > 0) {
|
|
|
- // 过滤 permissionList 中包含“任务接单”的成员
|
|
|
- executorList.value = data;
|
|
|
+ // 过滤 permissionList 中包含"任务接单"的成员,并过滤掉超管(role为1)
|
|
|
+ executorList.value = data.filter((item) => item.role !== 1);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -83,18 +80,33 @@ const handleTimelineAction = (timelineItem, farmId) => {
|
|
|
arrangeIdVal: timelineItem.arrangeId,
|
|
|
executorListVal: executorList.value,
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
ElMessage.warning("您暂无权限操作");
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const emits = defineEmits(["updateList"]);
|
|
|
+
|
|
|
const handleUploadSuccess = async () => {
|
|
|
- emit('handleUploadSuccess');
|
|
|
+ emits("updateList");
|
|
|
};
|
|
|
|
|
|
-const handleIgnore = (timelineItem, farmId) => {
|
|
|
- console.log('timelineItem', timelineItem);
|
|
|
- console.log('farmId', farmId);
|
|
|
+// 忽略农事库
|
|
|
+const handleIgnore = ({ farmWorkId }) => {
|
|
|
+ ElMessageBox.confirm("确认忽略该农事吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ VE_API.home.ignoreFarmWorkLib({ farmWorkLibId: farmWorkId }).then(({ code }) => {
|
|
|
+ if (code === 0) {
|
|
|
+ ElMessage.success("忽略成功");
|
|
|
+ handleUploadSuccess()
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
};
|
|
|
|
|
|
const priceSheetPopupRef = ref(null);
|
|
|
@@ -104,8 +116,6 @@ const showPriceSheetPopup = (item) => {
|
|
|
priceSheetPopupRef.value.handleShowPopup(res);
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
-const emit = defineEmits(["handleUploadSuccess"]);
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|