提交 8c6fc8af authored 作者: lidongxu's avatar lidongxu

refactor(promotion): 促销表格改变顺序_强制一行显示超出浮窗_活动日期加周几

同上
上级 f56b2b18
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
v-if="planDetail.planStatus === 0">未执行</p> v-if="planDetail.planStatus === 0">未执行</p>
<p v-else <p v-else
class="employee plan-go">执行</p> class="employee plan-go">执行</p>
<p class="employee">活动日期:&emsp;{{ parseTime(planDetail.date, '{y}-{m}-{d}') }}</p> <p class="employee">活动日期:&emsp;{{ parseTime(planDetail.date, '{y}-{m}-{d} (周{a})') }}</p>
<p class="employee">归属人:&emsp;&emsp;{{ planDetail.employeeName }}{{ planDetail.employeeNo }}</p> <p class="employee">归属人:&emsp;&emsp;{{ planDetail.employeeName }}{{ planDetail.employeeNo }}</p>
<p class="employee">战区:&emsp;&emsp;&emsp;{{ planDetail.orgName }}</p> <p class="employee">战区:&emsp;&emsp;&emsp;{{ planDetail.orgName }}</p>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</template> </template>
<template #value> <template #value>
<span>{{ item.pattern }}</span> <span>{{ item.pattern }}</span>
<p>{{ parseTime(item.date, '{y}-{m}-{d}') }}</p> <p>{{ parseTime(item.date, '{y}-{m}-{d} (周{a})') }}</p>
</template> </template>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
......
...@@ -190,7 +190,8 @@ ...@@ -190,7 +190,8 @@
:label="item.label" :label="item.label"
:width="item.width" :width="item.width"
:formatter="formatter" :formatter="formatter"
:fixed="item.fixed" /> :fixed="item.fixed"
:show-overflow-tooltip="true" />
<el-table-column label="操作" <el-table-column label="操作"
width="150" width="150"
fixed="right"> fixed="right">
...@@ -570,67 +571,68 @@ const tableList = ref([]) ...@@ -570,67 +571,68 @@ const tableList = ref([])
const total = ref(0) const total = ref(0)
const multiple = ref(true) const multiple = ref(true)
const columns = ref([ const columns = ref([
{
label: '活动 ID',
prop: 'id',
width: 90,
// fixed: true
},
{ {
label: '归属人', label: '归属人',
prop: 'employeeName', prop: 'employeeName',
width: 90, width: 150,
fixed: true fixed: true
}, },
// {
// label: '归属人工号',
// prop: 'employeeNo',
// width: 140
// },
{ {
label: '归属人工号', label: '活动状态',
prop: 'employeeNo', prop: 'planStatus',
width: 140 width: 100
}, },
{ {
label: '经销商 ID', label: '活动模式',
prop: 'dealerId', prop: 'pattern',
width: 120 width: 100
}, },
{ {
label: '经销商', label: '活动日期',
prop: 'dealerName', prop: 'date',
width: 220 width: 180
}, },
{ {
label: '系统名称', label: '系统名称',
prop: 'lineName', prop: 'lineName',
width: 100 width: 150
}, },
{ {
label: '店铺编码', label: '战区',
prop: 'storeCode', prop: 'orgName',
width: 160 width: 150
}, },
{ {
label: '店铺名称', label: '店铺名称',
prop: 'storeName', prop: 'storeName',
width: 200 width: 150
}, },
{ {
label: '活动日期', label: '店铺编码',
prop: 'date', prop: 'storeCode',
width: 180 width: 160
}, },
{ {
label: '活动状态', label: '经销商',
prop: 'planStatus', prop: 'dealerName',
width: 100 width: 220
}, },
{ {
label: '活动模式', label: '经销商 ID',
prop: 'pattern', prop: 'dealerId',
width: 100 width: 120
}, },
{ {
label: '省份', label: '省份',
prop: 'province', prop: 'province',
width: 100 width: 130
}, },
{ {
label: '地址', label: '地址',
...@@ -657,11 +659,7 @@ const columns = ref([ ...@@ -657,11 +659,7 @@ const columns = ref([
prop: 'incidentals', prop: 'incidentals',
width: 100 width: 100
}, },
{
label: '战区',
prop: 'orgName',
width: 150
},
// { // {
// label: '城市', // label: '城市',
// prop: 'city', // prop: 'city',
...@@ -670,7 +668,7 @@ const columns = ref([ ...@@ -670,7 +668,7 @@ const columns = ref([
{ {
label: '创建人', label: '创建人',
prop: 'createBy', prop: 'createBy',
width: 100 width: 120
}, },
{ {
label: '最近修改人', label: '最近修改人',
...@@ -681,6 +679,12 @@ const columns = ref([ ...@@ -681,6 +679,12 @@ const columns = ref([
label: '最后修改时间', label: '最后修改时间',
prop: 'modifyTime', prop: 'modifyTime',
width: 250 width: 250
},
{
label: '活动 ID',
prop: 'id',
width: 90,
// fixed: true
} }
]) ])
const getPlanList = async () => { const getPlanList = async () => {
...@@ -704,11 +708,22 @@ const formatter = (row, col, value) => { ...@@ -704,11 +708,22 @@ const formatter = (row, col, value) => {
if (col.property === 'planStatus') { if (col.property === 'planStatus') {
return value == 0 ? '未执行' : '执行' return value == 0 ? '未执行' : '执行'
} else if (col.property === 'date') { } else if (col.property === 'date') {
return parseTime(value, '{y}-{m}-{d}') return parseTime(value, '{y}-{m}-{d} (周{a})')
} else if (col.property === 'modifyTime') { } else if (col.property === 'modifyTime') {
return parseTime(value, '{y}-{m}-{d} {h}:{i}:{s}') return parseTime(value, '{y}-{m}-{d} {h}:{i}:{s}')
} else if (col.property === 'clockInTime' || col.property === 'clockOutTime') { } else if (col.property === 'clockInTime' || col.property === 'clockOutTime') {
return parseTime(value) return parseTime(value)
} else if (col.property === 'employeeName') {
// 判断名字小于 4 个字,少于几个就加几个空格
if (value.length === 2) {
return value + '  ' + '(' + row.employeeNo + ')'
} else if (value.length === 3) {
return value + ' ' + '(' + row.employeeNo + ')'
} else {
return value + '(' + row.employeeNo + ')'
}
} else if (col.property === 'salary' || col.property === 'incidentals') {
return '¥ ' + value + ' 元'
} else { } else {
return value return value
} }
...@@ -1236,7 +1251,7 @@ const uploadChangeFile = async (file) => { ...@@ -1236,7 +1251,7 @@ const uploadChangeFile = async (file) => {
} }
.container .el-table ::v-deep(.cell) { .container .el-table ::v-deep(.cell) {
white-space: pre-line; /* white-space: pre-line; */
/* 强制显示 2 行,超出的省略号 */ /* 强制显示 2 行,超出的省略号 */
/* overflow: hidden; /* overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论