提交 55494ba7 authored 作者: lidongxu's avatar lidongxu

refactor(mobile_promotion): 任务详情所有数据都展示出来_打卡照片分组展示

同上
上级 349b5cc8
......@@ -7,16 +7,23 @@
<van-cell>
<template #title>
<p>{{ planDetail.storeName }}</p>
<p>{{ planDetail.pattern }}</p>
</template>
<template #label>
<p class="employee">{{ planDetail.employeeName }}</p>
<p v-if="planDetail.planStatus === 0">未执行</p>
<p v-else
class="plan-go">执行</p>
</template>
<template #value>
<p>{{ planDetail.pattern }}</p>
<p>{{ parseTime(planDetail.date, '{y}:{m}:{d}') }}</p>
<p class="employee">活动时间:{{ parseTime(planDetail.date, '{y}-{m}-{d}') }}</p>
<p class="employee">归属人:{{ planDetail.employeeName }}</p>
<p class="employee">归属人工号:{{ planDetail.employeeNo }}</p>
<p class="employee">战区:{{ planDetail.orgName }}</p>
<p class="employee">经销商:{{ planDetail.dealerName }}</p>
<p class="employee">系统名称:{{ planDetail.lineName }}</p>
<p class="employee">店铺编码:{{ planDetail.storeCode }}</p>
<p class="employee">促销员薪资:{{ planDetail.salary }}</p>
<p class="employee">促销员杂费:{{ planDetail.incidentals }}</p>
<p class="employee">上班时间:{{ parseTime(planDetail.clockInTime, "{h}:{i}:{s}") }}</p>
<p class="employee">下班时间:{{ parseTime(planDetail.clockOutTime, "{h}:{i}:{s}") }}</p>
<p class="employee">创建人:{{ planDetail.createBy }}</p>
<p class="employee">修改人:{{ planDetail.modifyBy }}</p>
<p class="employee">地址:{{ planDetail.addr }}</p>
</template>
</van-cell>
</van-cell-group>
......@@ -29,7 +36,8 @@
:immediate-check="false"
finished-text="没有更多了"
@load="onLoad">
<van-cell-group inset>
<van-cell-group inset
v-if="planList.length > 0">
<van-cell v-for="item in planList"
:key="item.id"
label-class="image-cell">
......@@ -38,12 +46,20 @@
<p>{{ item.province + item.city }}</p>
</template>
<template #label>
<div class="item"
v-for="o in item.photoList">
<template v-if="o.list">
<p>{{ o.title }}</p>
<div class="image-wrap">
<van-image v-for="o, index in item.photoList"
:src="o.photoUrl"
width="75"
height="100"
@click="previewImage(item.photoList, index)"></van-image>
<div class="small-item"
v-for="obj, index in o.list">
<van-image :src="obj.photoUrl"
@click="previewImage(o.list, index)" />
<p>{{ obj.title }}</p>
<p>{{ obj.time }}</p>
</div>
</div>
</template>
</div>
</template>
</van-cell>
......@@ -145,20 +161,20 @@ const getPlanDetail = async () => {
list: clockList
}])
// 把数组里图片合并成一个大数组
const allPhotoList = ref([])
photoDialogList.value.forEach(o => {
if (o.list) {
allPhotoList.value.push(...o.list)
allPhotoList.value.push(...o.list)
allPhotoList.value.push(...o.list)
}
})
// const allPhotoList = ref([])
// photoDialogList.value.forEach(o => {
// if (o.list) {
// allPhotoList.value.push(...o.list)
// allPhotoList.value.push(...o.list)
// allPhotoList.value.push(...o.list)
// }
// })
return {
id: o.reported.id, // 用的是促销上报的id,不是打卡的 id
province: o.reported.province, // 省份
city: o.reported.city, // 城市
temporaryName: o.reported.temporaryName, // 临时名称
photoList: allPhotoList, // 照片列表
photoList: photoDialogList, // 照片列表
}
})
}
......@@ -223,6 +239,7 @@ p {
}
::v-deep(.van-cell__title) {
flex: 3;
width: 100%;
.image-wrap {
......@@ -243,6 +260,11 @@ p {
}
}
::v-deep(.van-cell__label) {
flex: 1;
width: 100%;
}
}
::v-deep(.employee) {
......@@ -256,4 +278,13 @@ p {
::v-deep(.van-cell__label) {
font-size: 14px !important;
}
.small-item {
width: 125px;
text-align: center;
.van-image {
height: 135px;
}
}
</style>
\ No newline at end of file
......@@ -12,8 +12,8 @@
label-width="140px">
<!-- 报表所属部门 -->
<el-form-item label="报表所属部门"
prop="id">
<el-select v-model="value"
prop="categoryName">
<el-select v-model="categoryName"
placeholder="选择报表所属部门"
style="width: 240px">
<el-option v-for="item in deptList"
......@@ -50,14 +50,14 @@ import { enterOtherReportAPI, getReportFolderListAPI } from '@/api' // 假设你
const { proxy } = getCurrentInstance();
// 表单数据
const form = ref({
id: '',
categoryName: '',
name: '',
previewUrl: '',
})
// 表单验证规则
const rules = ref({
id: [
categoryName: [
{ required: true, message: '请选择报表所属部门', trigger: 'blur' }
],
name: [
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论