diff --git a/src/api/task.ts b/src/api/task.ts index e53e0b4..200b2c9 100644 --- a/src/api/task.ts +++ b/src/api/task.ts @@ -15,7 +15,7 @@ export function apiTaskCreat(params: any) { export function apiTaskAdd(params: any) { return request.post({ url: "/task.task/add", params }); } -//任务排期-任务添加 -export function apiTaskScheduling(params: any) { - return request.post({ url: "/task_scheduling.task_scheduling/add", params }); +//任务日程-列表 +export function apiTaskList(params: any) { + return request.get({ url: "/task_scheduling.task_scheduling/lists", params }); } diff --git a/src/views/company/edit.vue b/src/views/company/edit.vue index 3987378..8f2b11a 100644 --- a/src/views/company/edit.vue +++ b/src/views/company/edit.vue @@ -410,7 +410,8 @@ - + +
电子合同
diff --git a/src/views/task/Taskform.vue b/src/views/task/Taskform.vue index f1be6c4..5176d4c 100644 --- a/src/views/task/Taskform.vue +++ b/src/views/task/Taskform.vue @@ -1,13 +1,19 @@ @@ -75,10 +79,10 @@ import { ref } from "vue"; import { dictDataLists } from "@/api/setting/dict"; import { apiTaskAdd } from "@/api/task"; const rules = reactive({ - title: { required: true, message: "请输入标题", trigger: "blur" }, + title: { required: true, message: "请输入主题", trigger: "blur" }, money: { required: true, message: "请输入金额", trigger: "blur" }, - type: { required: true, message: "请输入类型", trigger: "blur" }, - state: { required: true, message: "请输入状态", trigger: "blur" }, + type: { required: true, message: "请选择任务类型", trigger: "blur" }, + state: { required: true, message: "请选择状态", trigger: "blur" }, }); const formData = ref({ title: "", @@ -97,6 +101,7 @@ const formData = ref({ }); const datalist = ref([]); + dictDataLists({ type_id: 10 }).then((res) => { datalist.value = res.lists; }); @@ -110,6 +115,19 @@ function handleSubmit() { } }); } +const handleClose = (formRef) => { + if (!formRef) return; + formRef.resetFields(); +}; - + diff --git a/src/views/task/edit.vue b/src/views/task/edit.vue index e860dc9..96e3e1f 100644 --- a/src/views/task/edit.vue +++ b/src/views/task/edit.vue @@ -8,7 +8,7 @@ @confirm="handleSubmit" @close="handleClose" > - + @@ -49,8 +49,9 @@ - + + diff --git a/src/views/task/taskCalendar.vue b/src/views/task/taskCalendar.vue index f72ae89..928e133 100644 --- a/src/views/task/taskCalendar.vue +++ b/src/views/task/taskCalendar.vue @@ -58,7 +58,7 @@ import feedback from "@/utils/feedback"; // import { getRoutePath } from "router"; import EditPopup from "./edit.vue"; import { reactive, watch } from "vue"; - +import { apiTaskList } from '@/api/task' const dateValue = ref(new Date()); watch( @@ -68,6 +68,7 @@ watch( }, { deep: true } ); +// apiTaskList() const test = (e: any) => { console.log(e); diff --git a/src/views/task_scheduling/edit.vue b/src/views/task_scheduling/edit.vue index 5a88010..e4775d4 100644 --- a/src/views/task_scheduling/edit.vue +++ b/src/views/task_scheduling/edit.vue @@ -4,11 +4,11 @@ ref="popupRef" :title="popupTitle" :async="true" - width="550px" + width="500px" @confirm="handleSubmit" @close="handleClose" > - + @@ -22,14 +22,18 @@ - + + + + + - + diff --git a/src/views/task_template/edit.vue b/src/views/task_template/edit.vue index c79055f..68a207b 100644 --- a/src/views/task_template/edit.vue +++ b/src/views/task_template/edit.vue @@ -19,10 +19,20 @@ - + + + - + + + + @@ -38,6 +48,7 @@ import Popup from '@/components/popup/index.vue' import { apiTaskTemplateAdd, apiTaskTemplateEdit, apiTaskTemplateDetail } from '@/api/task_template' import { timeFormat } from '@/utils/util' import type { PropType } from 'vue' +import { dictDataLists } from "@/api/setting/dict"; defineProps({ dictData: { type: Object as PropType>, @@ -48,7 +59,7 @@ const emit = defineEmits(['success', 'close']) const formRef = shallowRef() const popupRef = shallowRef>() const mode = ref('add') - +const datalist=ref([]) // 弹窗标题 const popupTitle = computed(() => { @@ -65,7 +76,10 @@ const formData = reactive({ status: '', content: '', }) - +//任务类型接口 +dictDataLists({ type_id: 10 }).then((res) => { + datalist.value = res.lists; +}); // 表单验证 const formRules = reactive({ @@ -86,7 +100,7 @@ const formRules = reactive({ }], status: [{ required: true, - message: '请输入状态', + message: '请选择状态', trigger: ['blur'] }] }) diff --git a/src/views/task_template/index.vue b/src/views/task_template/index.vue index 1e353b5..73949d9 100644 --- a/src/views/task_template/index.vue +++ b/src/views/task_template/index.vue @@ -2,30 +2,37 @@
- + - + - + - - + + + + - + - + - - 查询 + + 查询 重置 @@ -50,7 +57,7 @@ - + @@ -90,8 +97,9 @@ import { apiTaskTemplateLists, apiTaskTemplateDelete } from '@/api/task_template import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' - +import { dictDataLists } from "@/api/setting/dict"; const editRef = shallowRef>() +const datalist=ref([]) // 是否显示编辑框 const showEdit = ref(false) @@ -122,7 +130,6 @@ const { pager, getLists, resetParams, resetPage } = usePaging({ fetchFun: apiTaskTemplateLists, params: queryParams }) - // 添加 const handleAdd = async () => { showEdit.value = true @@ -144,7 +151,21 @@ const handleDelete = async (id: number | any[]) => { await apiTaskTemplateDelete({ id }) getLists() } - +//任务类型接口 +dictDataLists({ type_id: 10 }).then((res) => { + datalist.value = res.lists; +}); getLists() +