Commit 7189eeda by 李伟康

修复BUG

1 parent 49ce8679
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
} }
list.length && list.length &&
list.forEach((e) => { list.forEach((e) => {
e.day = dayjs().diff(dayjs(e.sopJourneyStageEnterTime), 'day') e.day = dayjs().diff(dayjs(e.sopJourneyStageEnterTime).format('YYYY/MM/DD'), 'day')
}) })
arr.push({ arr.push({
title: k.label, title: k.label,
......
...@@ -156,16 +156,13 @@ export default { ...@@ -156,16 +156,13 @@ export default {
{ {
label: '进入旅程时间', label: '进入旅程时间',
prop: 'sopJourneyEnterTime', prop: 'sopJourneyEnterTime',
minWidth: '160px', minWidth: '160px'
formatter: cell => {
return `${dayjs(cell.sopJourneyEnterTime).format('YYYY/MM/DD')}`
}
}, },
{ {
label: '所处旅程天数', label: '所处旅程天数',
minWidth: '160px', minWidth: '160px',
formatter: cell => { formatter: cell => {
return `${dayjs().diff(dayjs(cell.sopJourneyEnterTime), 'day')}天` return `${dayjs().diff(cell.sopJourneyEnterTime, 'day')}天`
} }
}, },
{ {
...@@ -177,7 +174,7 @@ export default { ...@@ -177,7 +174,7 @@ export default {
label: '所处旅程阶段天数', label: '所处旅程阶段天数',
minWidth: '160px', minWidth: '160px',
formatter: cell => { formatter: cell => {
return `${dayjs().diff(dayjs(cell.sopJourneyStageEnterTime), 'day')}天` return `${dayjs().diff(cell.sopJourneyStageEnterTime, 'day')}天`
} }
} }
] ]
...@@ -246,6 +243,11 @@ export default { ...@@ -246,6 +243,11 @@ export default {
this.$apis.journey.getCustomersList(params).then(res => { this.$apis.journey.getCustomersList(params).then(res => {
this.loading = false this.loading = false
if (res) { if (res) {
res?.list?.map(e =>{
e.sopJourneyEnterTime = dayjs(e.sopJourneyEnterTime).format('YYYY/MM/DD')
e.sopJourneyStageEnterTime = dayjs(e.sopJourneyStageEnterTime).format('YYYY/MM/DD')
})
console.log(res.list)
this.tableData = res.list this.tableData = res.list
this.tableTotal = res.total || 0 this.tableTotal = res.total || 0
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!