更新
This commit is contained in:
parent
0432a7fbc6
commit
b015243544
@ -18,4 +18,8 @@ export function apiTaskAdd(params: any) {
|
||||
//任务日程-列表
|
||||
export function apiTaskList(params: any) {
|
||||
return request.get({ url: "/task_scheduling_plan.task_scheduling_plan/lists", params });
|
||||
}
|
||||
}
|
||||
//任务日程-详情
|
||||
export function apiTaskDetails(params: any) {
|
||||
return request.get({ url: "/task_scheduling_plan.task_scheduling_plan/detail", params });
|
||||
}
|
||||
|
@ -1,194 +1,241 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="公司名称" prop="company_id">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_id"
|
||||
clearable
|
||||
placeholder="请输入公司"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="contract_type">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.contract_type"
|
||||
clearable
|
||||
placeholder="请输入合同类型"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.contract_no"
|
||||
clearable
|
||||
placeholder="请输入合同编号"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
placeholder="请输入状态"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="公司名称" prop="company_id">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_id"
|
||||
clearable
|
||||
placeholder="请输入公司"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同类型" prop="contract_type">
|
||||
<el-select
|
||||
v-model="queryParams.contract_type"
|
||||
clearable
|
||||
placeholder="请输入合同类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in datalist"
|
||||
:key="item.label"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="片区经理" prop="area_manager">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.area_manager"
|
||||
clearable
|
||||
placeholder="请输入片区经理"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<!-- <el-button v-perms="['contract.contract/add']" type="primary" @click="handleAdd">
|
||||
<el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.contract_no"
|
||||
clearable
|
||||
placeholder="请输入合同编号"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
placeholder="请选择状态"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusdata"
|
||||
:key="item.label"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="片区经理" prop="area_manager">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.area_manager"
|
||||
clearable
|
||||
placeholder="请输入片区经理"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<!-- <el-button v-perms="['contract.contract/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>-->
|
||||
<!-- <el-button
|
||||
<!-- <el-button
|
||||
v-perms="['contract.contract/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>删除</el-button
|
||||
> -->
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" /> -->
|
||||
<el-table-column label="id" prop="id" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="公司" prop="company_name" show-overflow-tooltip /> -->
|
||||
<el-table-column
|
||||
label="合同类型"
|
||||
prop="contract_type_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="合同编号" prop="contract_no" show-overflow-tooltip />
|
||||
<el-table-column label="甲方" prop="party_a_name" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.party_a_info.company_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="乙方" prop="party_b_name" show-overflow-tooltip />
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" /> -->
|
||||
<el-table-column label="id" prop="id" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="公司" prop="company_name" show-overflow-tooltip /> -->
|
||||
<el-table-column
|
||||
label="合同类型"
|
||||
prop="contract_type_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="合同编号"
|
||||
prop="contract_no"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="甲方"
|
||||
prop="party_a_name"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.party_a_info.company_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="乙方"
|
||||
prop="party_b_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="片区经理"
|
||||
prop="area_manager_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="类型" prop="type" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span>{{
|
||||
scope.row.type == 1 ? '公司' : scope.row.type == 0 ? '' : '个人'
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="status_name" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.status_name == '已签约'" style="color: #67c23a"
|
||||
>已签约</span
|
||||
>
|
||||
<span v-else style="color: #fe0000">未签约</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" fixed="right" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link>
|
||||
<router-link
|
||||
:to="{ path: '/contract/detail', query: { id: row.id } }"
|
||||
>详情</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-table-column
|
||||
label="片区经理"
|
||||
prop="area_manager_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="类型" prop="type" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span>{{
|
||||
scope.row.type == 1 ? "公司" : scope.row.type == 0 ? "" : "个人"
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
prop="status_name"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.status_name == '已签约'"
|
||||
style="color: #67c23a"
|
||||
>已签约</span
|
||||
>
|
||||
<span v-else style="color: #fe0000">未签约</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="180"
|
||||
fixed="right"
|
||||
align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link>
|
||||
<router-link
|
||||
:to="{ path: '/contract/detail', query: { id: row.id } }"
|
||||
>详情</router-link
|
||||
>
|
||||
</el-button>
|
||||
|
||||
<!-- <el-button v-perms="['contract.contract/delete']" type="danger" link
|
||||
<!-- <el-button v-perms="['contract.contract/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- <contractDetil ref="childDetil"></contractDetil> -->
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<!-- <contractDetil ref="childDetil"></contractDetil> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="contractLists">
|
||||
// import contractDetil from './contractDetil.vue'
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiContractLists, apiContractDelete, apiContractDetail } from '@/api/contract'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
const route = useRoute()
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import {
|
||||
apiContractLists,
|
||||
apiContractDelete,
|
||||
apiContractDetail,
|
||||
} from "@/api/contract";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
const route = useRoute();
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
const showEdit = ref(false);
|
||||
const datalist = ref([]);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_id: '',
|
||||
contract_type: '',
|
||||
contract_no: '',
|
||||
status: '',
|
||||
party_a: '',
|
||||
party_b: '',
|
||||
area_manager: '',
|
||||
type: ''
|
||||
})
|
||||
company_id: "",
|
||||
contract_type: "",
|
||||
contract_no: "",
|
||||
status: "",
|
||||
party_a: "",
|
||||
party_b: "",
|
||||
area_manager: "",
|
||||
type: "",
|
||||
});
|
||||
const statusdata=reactive([
|
||||
{id:"1",name:'已签约'},
|
||||
{id:"0",name:"未签约"},
|
||||
]
|
||||
)
|
||||
if (route.query.type) {
|
||||
queryParams.type = route.query.type?.toString()
|
||||
queryParams.type = route.query.type?.toString();
|
||||
}
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
dictDataLists({ type_id: 7 }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
});
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiContractLists,
|
||||
params: queryParams
|
||||
})
|
||||
fetchFun: apiContractLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 详情
|
||||
const childDetil = ref()
|
||||
const childDetil = ref();
|
||||
const showDetil = async (id) => {
|
||||
// const res = await apiContractDetail({ id })
|
||||
// childDetil.value.setFormData(res)
|
||||
// childDetil.value.shoeEditFn(true)
|
||||
}
|
||||
// const res = await apiContractDetail({ id })
|
||||
// childDetil.value.setFormData(res)
|
||||
// childDetil.value.shoeEditFn(true)
|
||||
};
|
||||
// 查看合同
|
||||
const checkContcat = (id: number) => {
|
||||
apiContractDetail({ id }).then((res) => {
|
||||
res.file ? window.open(res.file) : feedback.msgError('暂无合同可以查看')
|
||||
})
|
||||
}
|
||||
apiContractDetail({ id }).then((res) => {
|
||||
res.file ? window.open(res.file) : feedback.msgError("暂无合同可以查看");
|
||||
});
|
||||
};
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiContractDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
await feedback.confirm("确定要删除?");
|
||||
await apiContractDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
|
||||
getLists()
|
||||
// pager.lists.forEach((item) => {
|
||||
// console.log(item.type);
|
||||
// });
|
||||
getLists();
|
||||
</script>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
title="创建日程安排"
|
||||
:async="true"
|
||||
width="1000px"
|
||||
@confirm="handleSubmit"
|
||||
@ -127,15 +127,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="详细描述" prop="icon">
|
||||
<editor
|
||||
v-model="formData.content"
|
||||
:height="500"
|
||||
/> </el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
|
||||
</el-col>
|
||||
</el-form>
|
||||
<el-dialog v-model="isMan" title="选择负责人" width="60%">
|
||||
@ -174,9 +166,9 @@ const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == "edit" ? "编辑任务" : "新增任务";
|
||||
});
|
||||
// const popupTitle = computed(() => {
|
||||
// return mode.value == "edit" ? "创建日程安排" : "新增任务";
|
||||
// });
|
||||
|
||||
onMounted(() => {
|
||||
props.dateValue?.toDateString()
|
||||
|
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" v-loading="loading" shadow="never">
|
||||
<el-button v-perms="['flow_type/add']" type="primary" @click="handleAdd">
|
||||
<!-- <el-button v-perms="['flow_type/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<div class="mt-4">
|
||||
<el-calendar v-model="dateValue">
|
||||
<template #dateCell="{ data }">
|
||||
@ -39,6 +39,7 @@
|
||||
</el-calendar>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<edit-popup
|
||||
v-if="showEdit"
|
||||
ref="editRef"
|
||||
@ -47,6 +48,7 @@
|
||||
@success="loadTask"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -58,13 +60,14 @@ import feedback from "@/utils/feedback";
|
||||
// import { getRoutePath } from "router";
|
||||
import EditPopup from "./edit.vue";
|
||||
import { reactive, watch } from "vue";
|
||||
import { apiTaskList } from '@/api/task'
|
||||
import { apiTaskList ,apiTaskDetails} from '@/api/task'
|
||||
const dateValue = ref(new Date());
|
||||
|
||||
watch(() => dateValue,(newValue, oldValue) => {
|
||||
initShowDate(timeFormat(newValue.value.getTime()));
|
||||
console.log(taskList.value.find((item)=>item.start_time.split(' ')[0]==timeFormat(newValue.value.getTime())));
|
||||
|
||||
showEdit.value = true;
|
||||
editRef.value?.open("add");
|
||||
initShowDate(timeFormat(newValue.value.getTime()));
|
||||
// console.log(taskList.value.find((item)=>item.start_time.split(' ')[0]==timeFormat(newValue.value.getTime())));
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
@ -122,7 +125,6 @@ const initShowDate = (dateStr = "") => {
|
||||
}
|
||||
};
|
||||
initShowDate();
|
||||
|
||||
const dateNow = (day)=>{
|
||||
return taskList.value.find((item)=>item.start_time.split(' ')[0]==day)?.template_name;
|
||||
}
|
||||
@ -139,12 +141,13 @@ const handleAdd = async () => {
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
// const handleEdit = async (data: any) => {
|
||||
// showEdit.value = true;
|
||||
// await nextTick();
|
||||
// editRef.value?.open("edit");
|
||||
// editRef.value?.setFormData(data);
|
||||
// };
|
||||
|
||||
|
||||
// 删除
|
||||
// const handleDelete = async (id: number | any[]) => {
|
||||
|
@ -30,8 +30,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
<el-radio :label="1">显示</el-radio>
|
||||
<el-radio :label="0">隐藏</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务描述" prop="content">
|
||||
|
@ -26,7 +26,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="100px" label="状态" prop="status">
|
||||
<el-input class="w-[280px]" v-model="queryParams.status" clearable placeholder="请输入状态" />
|
||||
<el-select v-model="queryParams.status" clearable placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="item in statusdata"
|
||||
:key="item.label"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="100px" label="任务描述" prop="content">
|
||||
<el-input class="w-[280px]" v-model="queryParams.content" clearable placeholder="请输入任务描述" />
|
||||
@ -58,7 +65,11 @@
|
||||
<el-table-column label="创建人" prop="admin_id" show-overflow-tooltip />
|
||||
<el-table-column label="金额" prop="moeny" show-overflow-tooltip />
|
||||
<el-table-column label="任务类型" prop="type_name" show-overflow-tooltip />
|
||||
<el-table-column label="状态" prop="status" show-overflow-tooltip />
|
||||
<el-table-column label="状态" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span>{{row.status==1?'显示':"隐藏"}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务描述" prop="content" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
@ -113,6 +124,10 @@ const queryParams = reactive({
|
||||
status: '',
|
||||
content: ''
|
||||
})
|
||||
const statusdata=reactive([
|
||||
{id:1,name:"显示"},
|
||||
{id:0,name:"隐藏"}
|
||||
])
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
Loading…
x
Reference in New Issue
Block a user