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

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

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