任务
This commit is contained in:
parent
408ff1c8b0
commit
a46a49e750
@ -1,6 +1,6 @@
|
||||
NODE_ENV = 'development'
|
||||
|
||||
VITE_APP_BASE_URL = 'http://192.168.1.22:8000'
|
||||
VITE_APP_BASE_URL = 'http://192.168.1.29:8000'
|
||||
#
|
||||
# VITE_APP_BASE_URL = 'https://ceshi-worker-task.lihaink.cn'
|
||||
|
||||
|
@ -1,16 +1,19 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="任务详情" width="30%">
|
||||
<!-- <span>This is a message</span> -->
|
||||
<el-card class="box-card" v-loading="loading">
|
||||
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span class="tit">任务名称:</span>
|
||||
<span>{{ taskDeatil?.detail?.title }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div style="margin-top: 1vh;display: flex;" class="tit">
|
||||
|
||||
<div style="margin-top: 1vh;display: flex;">
|
||||
|
||||
<!-- town_task_type_5任务 -->
|
||||
<div v-if="taskDeatil?.detail?.task_type_value == 'town_task_type_5'"
|
||||
style="display: flex; justify-content:space-between;width: 100%; ">
|
||||
style="display: flex; justify-content:space-between;width: 100%; " class="tit">
|
||||
<div>
|
||||
交易金额剩余池: {{ taskDeatil?.detail?.progress?.done }}
|
||||
</div>
|
||||
@ -18,17 +21,133 @@
|
||||
目标完成金额: {{ taskDeatil?.detail?.progress?.total }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<!-- town_task_type_marketing_director_10任务 -->
|
||||
<div v-else-if="taskDeatil?.detail?.task_type_value == 'town_task_type_marketing_director_10'">
|
||||
|
||||
|
||||
<div style="width: 25.5vw;" v-if="taskDeatil.detail?.progress?.stage1">
|
||||
<div class="tit">第一阶段</div>
|
||||
<div>
|
||||
<el-image style="width: 100px; height: 100px;margin: 10px 5px;" :src="items" fit="fill"
|
||||
v-for=" items in taskDeatil.detail?.progress.stage1.stage1.file" />
|
||||
</div>
|
||||
<div>
|
||||
备注: {{ taskDeatil.detail?.progress.stage1.stage1.remark }}
|
||||
</div>
|
||||
<el-divider />
|
||||
</div>
|
||||
|
||||
<div style="width: 25.5vw;" v-if="taskDeatil.detail?.progress?.stage2">
|
||||
<div class="tit">第二阶段</div>
|
||||
<div>
|
||||
<el-image style="width: 100px; height: 100px;margin: 10px 5px;" :src="items" fit="fill"
|
||||
v-for=" items in taskDeatil.detail?.progress.stage2.stage2.file" />
|
||||
</div>
|
||||
<div>
|
||||
备注: {{ taskDeatil.detail?.progress.stage2.stage2.remark }}
|
||||
</div>
|
||||
<el-divider />
|
||||
</div>
|
||||
<div style="width: 25.5vw;" v-if="taskDeatil.detail?.progress?.stage3">
|
||||
<div class="tit">第三阶段</div>
|
||||
<div>
|
||||
<el-image style="width: 100px; height: 100px;margin: 10px 5px;" :src="items" fit="fill"
|
||||
v-for=" items in taskDeatil.detail?.progress.stage3.stage3.file" />
|
||||
</div>
|
||||
<div>
|
||||
备注: {{ taskDeatil.detail?.progress.stage3.stage3.remark }}
|
||||
</div>
|
||||
<el-divider />
|
||||
</div>
|
||||
<div style="width: 25.5vw;" v-if="taskDeatil.detail?.progress?.stage4">
|
||||
<div class="tit">第四阶段</div>
|
||||
<div>
|
||||
<el-image style="width: 100px; height: 100px;margin: 10px 5px;" :src="items" fit="fill"
|
||||
v-for=" items in taskDeatil.detail?.progress.stage4.stage4.file" />
|
||||
</div>
|
||||
<div>
|
||||
备注: {{ taskDeatil.detail?.progress.stage4.stage4.remark }}
|
||||
</div>
|
||||
<el-divider />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- town_task_type_marketing_director_4 及其他任务 -->
|
||||
<div v-else-if="town_task_type_marketing_director_4TaskList.includes(taskDeatil?.detail?.task_type_value)"
|
||||
style="width: 100%;">
|
||||
<div class="tit"> 任务进度: {{ sue(taskDeatil?.detail?.progress, 'procure_amount') }} / {{
|
||||
taskDeatil?.detail?.progress[0]?.total }}</div>
|
||||
<el-table :data="taskDeatil?.detail?.progress">
|
||||
<el-table-column label="商户名称" prop="merchant_name" show-overflow-tooltip />
|
||||
<el-table-column label="已采购金额" prop="procure_amount" show-overflow-tooltip width="130px"
|
||||
align="center" />
|
||||
<el-table-column label="目标金额" prop="total" show-overflow-tooltip align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- town_task_type_marketing_director_5 任务 -->
|
||||
<div v-else-if="taskDeatil?.detail?.task_type_value == 'town_task_type_marketing_director_5'"
|
||||
style="width: 100%;">
|
||||
<div class="tit"> 任务进度: {{ sue(taskDeatil?.detail?.progress, 'trade_amount') }} / {{
|
||||
taskDeatil?.detail?.progress[0]?.total }}</div>
|
||||
<el-table :data="taskDeatil?.detail?.progress">
|
||||
<el-table-column label="商户名称" prop="merchant_name" show-overflow-tooltip />
|
||||
<el-table-column label="已销售金额" prop="trade_amount" show-overflow-tooltip width="130px"
|
||||
align="center" />
|
||||
<el-table-column label="目标金额" prop="total" show-overflow-tooltip align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<!-- town_task_type_marketing_director_3任务 -->
|
||||
<div v-else-if="town_task_type_marketing_director_3TaskList.includes(taskDeatil?.detail?.task_type_value)"
|
||||
style="width: 100%;">
|
||||
<el-table :data="taskDeatil?.detail?.progress">
|
||||
<el-table-column label="商户名称" prop="mer_name" show-overflow-tooltip />
|
||||
<el-table-column label="产品上架目标数" prop="total" show-overflow-tooltip width="130px" align="center" />
|
||||
<el-table-column label="已上架数" prop="count" show-overflow-tooltip align="center" />
|
||||
<el-table-column label="是否更新库存" show-overflow-tooltip align="center">
|
||||
<template #default="{ row }">
|
||||
{{ row.is_update_stock ? '已更新' : "未更新" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 其他任务 -->
|
||||
<div v-else class="tit">
|
||||
任务进度: {{ taskDeatil?.detail?.progress?.done }} / {{ taskDeatil?.detail?.progress?.total }}
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 1vh;">
|
||||
|
||||
|
||||
|
||||
<!-- town_task_type_marketing_director_2任务 -->
|
||||
<div style="margin-top: 1vh;"
|
||||
v-if="taskDeatil?.detail?.task_type_value == 'town_task_type_marketing_director_2'">
|
||||
<div class="tit"> 完成详情: </div>
|
||||
<div class='task-card' v-for="(item, index) in taskDeatil?.detail?.done_list">
|
||||
大师傅似的
|
||||
</div>
|
||||
|
||||
<el-table :data="taskDeatil?.detail?.done_list">
|
||||
<el-table-column label="商户ID" prop="mer_id" show-overflow-tooltip align="center" />
|
||||
<el-table-column label= "商户名称" prop="mer_name" show-overflow-tooltip align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!--town_task_type_master_5任务 -->
|
||||
<div style="margin-top: 1vh;" v-if="taskDeatil?.detail?.task_type_value == 'town_task_type_master_5'">
|
||||
<div class="tit"> 完成详情: </div>
|
||||
|
||||
<el-table :data="taskDeatil?.detail?.done_list">
|
||||
<el-table-column label="ID" prop="id" show-overflow-tooltip align="center" width="38px" />
|
||||
<el-table-column label="公司名称" prop="company_name" show-overflow-tooltip align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
@ -46,6 +165,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
|
||||
import { ref } from 'vue'
|
||||
import { taskProgress } from "@/api/task"
|
||||
|
||||
@ -54,10 +175,28 @@ const loading = ref(true)
|
||||
const row = ref("")
|
||||
const taskDeatil = ref('')
|
||||
|
||||
const openDeatl = (item: any) => {
|
||||
console.log(item)
|
||||
loading.value = true
|
||||
/* 狮心会的干部们对于该送什么样的花没有讨论出结果,于是决意扫光学院的花店,学院花店的鲜花不是外面运来的,而是源于基因科学系的温室,当天有整整一温室的黄色和白色的郁金香被采摘,于是被狮心会豪迈地包圆了。郁金香的花语是“博爱、体贴、高雅、富贵”,在法国人兰斯洛特想来倒也合适,不过最后这些鲜花摆在病房里的效果确实有些窘迫,于是兰斯洛特很有心地叫人再去买一些红玫瑰来放在床头。*/
|
||||
|
||||
|
||||
|
||||
// town_task_type_marketing_director_4相同类型的任务列表
|
||||
const town_task_type_marketing_director_4TaskList = reactive([
|
||||
'town_task_type_marketing_director_4',
|
||||
'town_task_type_marketing_director_9',
|
||||
'town_task_type_marketing_director_8'
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
// town_task_type_marketing_director_3相同类型的任务列表
|
||||
const town_task_type_marketing_director_3TaskList = reactive([
|
||||
'town_task_type_marketing_director_3',
|
||||
'town_task_type_marketing_director_7'
|
||||
])
|
||||
|
||||
const openDeatl = (item: any) => {
|
||||
loading.value = true
|
||||
row.value = item
|
||||
dialogVisible.value = true
|
||||
taskProgress({
|
||||
@ -65,31 +204,23 @@ const openDeatl = (item: any) => {
|
||||
}).then(res => {
|
||||
taskDeatil.value = res
|
||||
loading.value = false
|
||||
console.log(res)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log(taskDeatil.value)
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
// town_task_type_marketing_director_4任务求和
|
||||
const sue = (list: any, key: string) => {
|
||||
const sum = list.reduce((accumulator: number, currentValue: number) => accumulator + currentValue[key], 0);
|
||||
return sum
|
||||
}
|
||||
|
||||
|
||||
// 任务结算
|
||||
const settlementFn = () => {
|
||||
|
||||
dialogVisible.value = false
|
||||
|
||||
|
||||
|
||||
|
||||
console.log(row.value.task.id)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
@ -97,6 +228,7 @@ defineExpose({
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.dialog-footer button:first-child {
|
||||
@ -126,15 +258,17 @@ defineExpose({
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.task-card {
|
||||
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: red;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 10px;
|
||||
.li {
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
margin: 5px 0;
|
||||
padding: 3px 5px;
|
||||
border-bottom: 1px solid #F8F8F8;
|
||||
}
|
||||
|
||||
|
||||
.li:hover {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
</style>
|
||||
|
@ -39,7 +39,8 @@ const title = ref("任务列表");
|
||||
const mode = ref('')
|
||||
const queryParams = {
|
||||
company_id: '',
|
||||
date: ''
|
||||
date: '',
|
||||
page_size:50
|
||||
}
|
||||
const dayTaskList = ref("")
|
||||
//打开弹窗
|
||||
@ -47,17 +48,9 @@ const open = async (date, id) => {
|
||||
|
||||
queryParams.company_id = id
|
||||
queryParams.date = timeFormat(date)
|
||||
|
||||
await getLists();
|
||||
|
||||
// console.log(pager.lists)
|
||||
// getDayTaskList( {
|
||||
// company_id:id,
|
||||
// date:timeFormat(date)
|
||||
// }).then(res=>{
|
||||
|
||||
// dayTaskList.value=res
|
||||
// })
|
||||
|
||||
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
@ -44,8 +44,8 @@
|
||||
<el-calendar v-model="value" @click="dateClick">
|
||||
<template #date-cell="{ data }">
|
||||
{{ data.day.split('-').slice(1).join('-') }}
|
||||
<p style="color: #4A5DFF; text-align: center;margin-top: 4vh; ">
|
||||
查看任务
|
||||
<p style=" text-align: center;margin-top: 4vh; ">
|
||||
<el-tag class="ml-2" >查看任务</el-tag>
|
||||
</p>
|
||||
</template>
|
||||
</el-calendar>
|
||||
@ -151,27 +151,27 @@ const taskList = ref<any>([]);
|
||||
const start_date = ref("");
|
||||
const end_date = ref("");
|
||||
// 计算当前显示的第一天和最后一天
|
||||
const initShowDate = (dateStr = "") => {
|
||||
const currentDate = dateStr ? new Date(dateStr) : new Date();
|
||||
const currentYear = currentDate.getFullYear();
|
||||
const currentMonth = currentDate.getMonth();
|
||||
const lastDay = new Date(currentYear, currentMonth + 1, 0).getDay(); //获取第一天星期
|
||||
const startDay = new Date(currentYear, currentMonth, 1).getDay(); //获取最后一天星期
|
||||
// console.log(new Date(currentYear, currentMonth, 1-startDay).getDate());
|
||||
// console.log(new Date(currentYear, currentMonth + 1, 6-lastDay).getDate());
|
||||
start_date.value = timeFormat(
|
||||
new Date(currentYear, currentMonth, 1 - startDay).getTime()
|
||||
); //获取第一天时间
|
||||
end_date.value = timeFormat(
|
||||
new Date(currentYear, currentMonth + 1, 6 - lastDay).getTime()
|
||||
); //获取最后一天时间
|
||||
if (queryParams.start_time != start_date.value) {
|
||||
queryParams.start_time = start_date.value;
|
||||
queryParams.end_time = end_date.value;
|
||||
// loading.value = true;
|
||||
// loadTask();
|
||||
}
|
||||
};
|
||||
// const initShowDate = (dateStr = "") => {
|
||||
// const currentDate = dateStr ? new Date(dateStr) : new Date();
|
||||
// const currentYear = currentDate.getFullYear();
|
||||
// const currentMonth = currentDate.getMonth();
|
||||
// const lastDay = new Date(currentYear, currentMonth + 1, 0).getDay(); //获取第一天星期
|
||||
// const startDay = new Date(currentYear, currentMonth, 1).getDay(); //获取最后一天星期
|
||||
// // console.log(new Date(currentYear, currentMonth, 1-startDay).getDate());
|
||||
// // console.log(new Date(currentYear, currentMonth + 1, 6-lastDay).getDate());
|
||||
// start_date.value = timeFormat(
|
||||
// new Date(currentYear, currentMonth, 1 - startDay).getTime()
|
||||
// ); //获取第一天时间
|
||||
// end_date.value = timeFormat(
|
||||
// new Date(currentYear, currentMonth + 1, 6 - lastDay).getTime()
|
||||
// ); //获取最后一天时间
|
||||
// if (queryParams.start_time != start_date.value) {
|
||||
// queryParams.start_time = start_date.value;
|
||||
// queryParams.end_time = end_date.value;
|
||||
// // loading.value = true;
|
||||
// // loadTask();
|
||||
// }
|
||||
// };[]
|
||||
// initShowDate();
|
||||
|
||||
// // 过滤的任务列表
|
||||
|
Loading…
x
Reference in New Issue
Block a user