提交 ca682fb4 authored 作者: lidongxu's avatar lidongxu

feat(examine/index): 完成稽核 CP 列表的展示

同上
上级 245c93c7
......@@ -20,10 +20,15 @@ export function createExamine(data) {
}
// 获取稽核任务列表
export function getExamineList() {
export function getExamineList(data) {
return request({
baseURL: VITE_APP_PROMOTION,
url: `/exa/query/page`,
method: 'post',
data: {
pageNum: data.page,
pageSize: data.pageSize,
queryParams: {}
}
})
}
\ No newline at end of file
<template>
<div class="app-container">
<div class="container">
<!-- 查询表单 -->
<el-form :model="queryParams"
inline
label-width="68px">
<el-form-item label="活动日期"
prop="date">
<el-date-picker v-model="queryParams.date"
type="daterange"
clearable
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:shortcuts="pickerOptions"
@change="getTaskList" />
</el-form-item>
<el-form-item label="任务执行"
prop="taskStatus">
<el-radio-group v-model="queryParams.taskStatus"
@change="getTaskList">
<el-radio-button v-for="item in taskStatusList"
:key="item.value"
:label="item.label"
:value="item.value" />
</el-radio-group>
</el-form-item>
<!-- 省市 -->
<el-row>
<el-form-item label="区域查询"
prop="region">
<el-radio-group v-model="queryParams.region"
@change="regionChange">
<el-radio-button label="全国"
value="全国" />
<el-radio-button label="省"
value="省" />
<el-radio-button label="省-市"
value="省-市" />
</el-radio-group>
</el-form-item>
<el-form-item label="省份"
prop="province"
v-show="queryParams.region !== '全国'">
<el-select v-model="queryParams.provinceId"
placeholder="请选择省"
@change="getProCity">
<el-option v-for="item in provinceList"
:key="item.value"
:label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="城市"
prop="city"
v-show="queryParams.region === '省-市'">
<el-select v-model="queryParams.cityId"
placeholder="请选择市">
<el-option v-for="item in cityList"
:key="item.value"
:label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="战区"
prop="zone">
<el-select v-model="queryParams.zoneId"
placeholder="请选择战区"
clearable
:disabled="cityManagerPrivilege"
@change="getTaskList">
<el-option v-for="item in zoneList"
:key="item.value"
:label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="负责人"
prop="manager">
<el-select v-model="queryParams.managerId"
placeholder="请选择负责人"
:disabled="cityManagerPrivilege"
clearable
@change="getTaskList">
<el-option v-for="item in managerList"
:key="item.value"
:label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="门店"
prop="store">
<el-input v-model="queryParams.storeName"
clearable
@input="getTaskList"
placeholder="请输入门店名称" />
</el-form-item>
</el-row>
</el-form>
<!-- 数据表格 -->
<el-table :data="tableList"
:cell-style="{ 'word-wrap': 'break-word', 'white-space': 'normal' }"
border
style="width: 100%"
show-overflow-tooltip>
style="width: 100%">
<el-table-column v-for="item in columns"
:key="item.label"
:prop="item.prop"
:label="item.label"
:width="item.width"
:formatter="formatter"
:fixed="item.fixed" />
:fixed="item.fixed"
show-overflow-tooltip>
<template #default="scope">
<template v-if="item.prop === 'storePicture'">
<!-- 如果是门头照字段,渲染图片 -->
<el-image :preview-src-list="[scope.row[item.prop]]"
preview-teleported
:src="scope.row[item.prop]"
alt="图片"
style="width: 100px; height: 100px;" />
</template>
<template v-else-if="item.prop === 'temWorkPhotos'">
<el-image :preview-src-list="[item]"
preview-teleported
v-for="item in JSON.parse(scope.row[item.prop])"
:src="item"
alt="图片"
style="width: 100px; height: 100px; margin-right: 10px;" />
</template>
<template v-else-if="item.prop === 'storeTcPhoto'">
<el-image :preview-src-list="[scope.row[item.prop]]"
preview-teleported
:src="scope.row[item.prop]"
alt="图片"
style="width: 100px; height: 100px;" />
</template>
<template v-else-if="item.prop === 'storeZhjPhoto'">
<el-image :preview-src-list="[scope.row[item.prop]]"
preview-teleported
:src="scope.row[item.prop]"
alt="图片"
style="width: 100px; height: 100px;" />
</template>
<template v-else-if="item.prop === 'posPhotos'">
<el-image :preview-src-list="[item]"
preview-teleported
v-for="item in JSON.parse(scope.row[item.prop])"
:src="item"
alt="图片"
style="width: 100px; height: 100px; margin-right: 10px;" />
</template>
<template v-else>
<!-- 其他字段显示原始值 -->
{{ formatter(scope.row, scope.column, scope.row[item.prop]) }}
</template>
</template>
</el-table-column>
<el-table-column label="操作"
width="200"
fixed="right">
......@@ -141,7 +86,8 @@
width="60%">
<p>活动记录 ID :{{ photoLookInfoObj.id }}</p>
<p>活动时间 :{{ photoLookInfoObj.createDate }}</p>
<el-card v-for="obj in photoDialogList" shadow="never">
<el-card v-for="obj in photoDialogList"
shadow="never">
<template #header>{{ obj.title }}</template>
<div class="content">
<el-result :title="item.time"
......@@ -262,152 +208,152 @@ const columns = ref([
{
label: '稽核标识',
prop: 'id',
width: 90,
width: 80,
},
{
label: '稽核人',
prop: 'temporaryName',
prop: 'createBy',
width: 90,
},
{
label: '稽核人工号',
prop: 'createDate',
width: 120,
prop: 'employeeNo',
width: 100,
},
{
label: 'CP 活动 ID',
prop: 'week',
width: 120
label: 'cp活动 ID',
prop: 'planId',
width: 100
},
{
label: '是否执行',
prop: 'province',
prop: 'planStatus',
width: 100
},
{
label: '战区',
prop: 'city',
prop: 'deptQcOrgName',
width: 100
},
{
label: '城市经理',
prop: 'dealerName',
prop: 'manageName',
width: 120
},
{
label: '城市',
prop: 'storeName',
width: 120
prop: 'city',
width: 100
},
{
label: '活动日期',
prop: 'activityPattern',
prop: 'planDate',
width: 150
},
{
label: '系统名称',
prop: 'approveStatus',
prop: 'lineName',
width: 150
},
{
label: '门店',
prop: 'clockDto.clockInTime',
width: 150
prop: 'storeName',
width: 210
},
{
label: '经销商',
prop: 'clockDto.noonClockOutTime', // 拼接地址 noonClockOutAddress, 经纬度 noonClockOutCoordinates
width: 300
prop: 'dealerName',
width: 200
},
{
label: '活动模式',
prop: 'clockDto.noonClockInTime', // 拼接地址 noonClockInAddress, 经纬度 noonClockInCoordinates
width: 300
prop: 'pattern',
width: 100
},
{
label: '稽核日期',
prop: 'clockDto.clockOutTime', // 拼接地址 clockOutAddress, 经纬度 clockOutCoordinates
width: 300
prop: 'createDate',
width: 120
},
{
label: '门头照',
prop: 'deptQcOrgName',
prop: 'storePicture',
width: 150
},
{
label: '促销员人数',
prop: 'manageName',
width: 120
prop: 'temNum',
width: 100
},
{
label: '地堆',
prop: 'manageName',
width: 120
prop: 'storeDd',
width: 80
},
{
label: '促销员是否在岗',
prop: 'manageName',
prop: 'temOnWork',
width: 120
},
{
label: '话术',
prop: 'manageName',
width: 120
prop: 'temHs',
width: 80
},
{
label: '物料',
prop: 'manageName',
width: 120
prop: 'temWl',
width: 80
},
{
label: '着装',
prop: 'manageName',
width: 120
prop: 'temZz',
width: 80
},
{
label: '工作取证照片',
prop: 'manageName',
width: 120
prop: 'temWorkPhotos',
width: 250
},
{
label: '特陈照',
prop: 'manageName',
width: 120
prop: 'storeTcPhoto',
width: 150
},
{
label: '主货架照',
prop: 'manageName',
width: 120
prop: 'storeZhjPhoto',
width: 150
},
{
label: 'POS 金额',
prop: 'manageName',
prop: 'posRmb',
width: 120
},
{
label: 'POS 照片',
prop: 'manageName',
width: 120
prop: 'posPhotos',
width: 250
},
{
label: '创建人',
prop: 'manageName',
prop: 'createBy',
width: 120
},
{
label: '创建时间',
prop: 'manageName',
prop: 'createTime',
width: 120
},
{
label: '修改人',
prop: 'manageName',
prop: 'modifyBy',
width: 120
},
{
label: '修改时间',
prop: 'manageName',
prop: 'mobifyTime',
width: 120
}
])
......@@ -427,30 +373,20 @@ const deleteView = async (row) => {
// 获取稽核任务列表
const getTaskList = async () => {
const { data } = await getExamineList(queryParams)
console.log(data)
const { data: { records } } = await getExamineList(queryParams)
tableList.value = records
}
getTaskList()
const formatter = (row, columns, value) => {
// 判断有值再转换
if (columns.property === 'clockDto.clockInTime' && value) {
return parseTime(value, '{h}:{i}') + '\n' + row['clockDto']['clockInAddress']
} else if (columns.property === 'clockDto.noonClockOutTime' && value) {
return parseTime(value, '{h}:{i}') + '\n' + row['clockDto']['noonClockOutAddress']
} else if (columns.property === 'clockDto.noonClockInTime' && value) {
return parseTime(value, '{h}:{i}') + '\n' + row['clockDto']['noonClockInAddress']
} else if (columns.property === 'clockDto.clockOutTime' && value) {
return parseTime(value, '{h}:{i}') + '\n' + row['clockDto']['clockOutAddress']
} else if (columns.property === 'week') {
return parseTime(row['createDate'], '周{a}')
} else if (columns.property === 'approveStatus' && value) {
const obj = {
SUBMITTED: '未审批',
APPROVED: '已审批'
}
return obj[value]
if (columns.property === 'planDate' || columns.property === 'createDate' || columns.property === 'createTime' || columns.property === 'mobifyTime') {
return parseTime(value, '{y}-{m}-{d}')
} else {
return value
}
return value
}
// 区域查询切换
......@@ -554,13 +490,14 @@ const currentChange = (page) => {
::v-deep(.el-form-item) {
width: 350px !important;
}
.el-card{
.el-card {
margin-top: 20px;
}
/* 单元格支持 \n 换行 */
.container .el-table ::v-deep(.cell) {
white-space: pre-line;
/* white-space: pre-line; */
/* 强制显示 2 行,超出的省略号 */
/* overflow: hidden;
text-overflow: ellipsis;
......@@ -604,4 +541,5 @@ const currentChange = (page) => {
}
}
}
</style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论