提交 55378c04 authored 作者: lidongxu's avatar lidongxu

refactor(promotion): 修复:店内执行上报已知问题

上级 73a98b11
...@@ -146,8 +146,8 @@ const emit = defineEmits(['getTableList', 'updateShowSearch']) ...@@ -146,8 +146,8 @@ const emit = defineEmits(['getTableList', 'updateShowSearch'])
/*************** 工具栏 ***************/ /*************** 工具栏 ***************/
const showFill = userStore().hasQcMarketEmpInfo // 是否启用填报模式 const showFill = userStore().hasQcMarketEmpInfo // 是否启用填报模式
// const operation = ref('展示模式'); // 切换平铺/填报模式 const operation = ref('展示模式'); // 切换平铺/填报模式
const operation = ref('填报模式'); // 切换平铺/填报模式 // const operation = ref('填报模式'); // 切换平铺/填报模式
const tableRef = ref(null) const tableRef = ref(null)
const chooseColumns = ref([]) // 右上角工具显隐列选择 const chooseColumns = ref([]) // 右上角工具显隐列选择
...@@ -408,6 +408,7 @@ const handleDialogClose = () => { ...@@ -408,6 +408,7 @@ const handleDialogClose = () => {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
padding: 0 10px;
} }
} }
......
...@@ -67,9 +67,8 @@ ...@@ -67,9 +67,8 @@
const isLoading = ref(true) const isLoading = ref(true)
const params = ref({ const params = ref({
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 50,
// salesMonth: new Date(), salesMonth: new Date(),
salesMonth: '',
deptName: '', deptName: '',
dealerCN: '', dealerCN: '',
lineNameLike: '', lineNameLike: '',
......
...@@ -60,7 +60,12 @@ ...@@ -60,7 +60,12 @@
if (col.requestKey) { if (col.requestKey) {
// 关联的公式计算列,需要特殊处理 // 关联的公式计算列,需要特殊处理
for (const str of col.requestKey) { for (const str of col.requestKey) {
const obj = getSchedulePlanConfig().find(item => item.prop == str) const obj = getSchedulePlanConfig().flatMap(item => {
if (item.children) {
return item.children.filter(child => !child.onlyFill);
}
return [];
}).find(item => item.prop == str)
if (obj && obj.type === 'formula') { if (obj && obj.type === 'formula') {
obj.func(row) obj.func(row)
} }
...@@ -84,7 +89,7 @@ ...@@ -84,7 +89,7 @@
const isLoading = ref(true) const isLoading = ref(true)
const params = ref({ const params = ref({
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 50,
salesMonth: new Date(), salesMonth: new Date(),
deptName: '', deptName: '',
dealerCN: '', dealerCN: '',
......
...@@ -31,7 +31,12 @@ ...@@ -31,7 +31,12 @@
// 关联的公式计算列,需要特殊处理 // 关联的公式计算列,需要特殊处理
for (const str of col.requestKey) { for (const str of col.requestKey) {
const obj = getScheduleDisConfig().find(item => item.prop === str) const obj = getScheduleDisConfig().flatMap(item => {
if (item.children) {
return item.children.filter(child => !child.onlyFill);
}
return [];
}).find(item => item.prop === str)
if (obj && obj.type === 'formula') { if (obj && obj.type === 'formula') {
obj.func(row) obj.func(row)
} }
...@@ -41,6 +46,11 @@ ...@@ -41,6 +46,11 @@
id: row.sapdId, id: row.sapdId,
[col.prop]: row[col.prop], // 当前修改列的值 [col.prop]: row[col.prop], // 当前修改列的值
...col.requestKey.reduce((acc, key) => ({ ...acc, [key]: row[key] }), {}), // 额外携带影响的列字段值 ...col.requestKey.reduce((acc, key) => ({ ...acc, [key]: row[key] }), {}), // 额外携带影响的列字段值
// 特殊类型字段处理
// 端架数量实际
actualEndCapQty: row.actualEndCapQty || 0,
// 地堆平米数实际
actualFloorStackArea: row.actualFloorStackArea || 0,
}) })
} }
// 全部列 // 全部列
...@@ -51,7 +61,7 @@ ...@@ -51,7 +61,7 @@
const isLoading = ref(true) const isLoading = ref(true)
const params = ref({ const params = ref({
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 50,
salesMonth: new Date(), salesMonth: new Date(),
deptName: '', deptName: '',
dealerCN: '', dealerCN: '',
...@@ -88,6 +98,10 @@ ...@@ -88,6 +98,10 @@
item.plannedPromotionDisplayEndDate = parseTime(item.plannedPromotionDisplayEndDate, '{y}-{m}-{d}') item.plannedPromotionDisplayEndDate = parseTime(item.plannedPromotionDisplayEndDate, '{y}-{m}-{d}')
// 修改时间 // 修改时间
item.updateTime = parseTime(item.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') item.updateTime = parseTime(item.updateTime, '{y}-{m}-{d} {h}:{i}:{s}')
// 特殊类型处理
item.actualEndCapQty = item.actualEndCapQty || ''
item.actualFloorStackArea = item.actualFloorStackArea || ''
}) })
tableData.value = res.data.rows tableData.value = res.data.rows
total.value = res.data.total total.value = res.data.total
......
...@@ -32,7 +32,12 @@ ...@@ -32,7 +32,12 @@
if (col.requestKey) { if (col.requestKey) {
// 关联的公式计算列,需要特殊处理 // 关联的公式计算列,需要特殊处理
for (const str of col.requestKey) { for (const str of col.requestKey) {
const obj = getSixLittleDiamondsConfig().find(item => item.prop === str) const obj = getSixLittleDiamondsConfig().flatMap(item => {
if (item.children) {
return item.children.filter(child => !child.onlyFill);
}
return [];
}).find(item => item.prop === str)
if (obj && obj.type === 'formula') { if (obj && obj.type === 'formula') {
obj.func(row) obj.func(row)
} }
...@@ -56,7 +61,7 @@ ...@@ -56,7 +61,7 @@
const params = ref({ const params = ref({
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 50,
salesMonth: new Date(), salesMonth: new Date(),
deptName: '', deptName: '',
dealerCN: '', dealerCN: '',
......
...@@ -31,7 +31,12 @@ ...@@ -31,7 +31,12 @@
// 关联的公式计算列,需要特殊处理 // 关联的公式计算列,需要特殊处理
for (const str of col.requestKey) { for (const str of col.requestKey) {
const obj = getSnackCofing().find(item => item.prop === str) const obj = getSnackCofing().flatMap(item => {
if (item.children) {
return item.children.filter(child => !child.onlyFill);
}
return [];
}).find(item => item.prop === str)
if (obj && obj.type === 'formula') { if (obj && obj.type === 'formula') {
obj.func(row) obj.func(row)
} }
...@@ -88,7 +93,7 @@ ...@@ -88,7 +93,7 @@
const isLoading = ref(true) const isLoading = ref(true)
const params = ref({ const params = ref({
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 50,
salesMonth: new Date(), salesMonth: new Date(),
deptName: '', deptName: '',
dealerCN: '', dealerCN: '',
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
import SearchList from '@/views/promotion/components/SearchList' import SearchList from '@/views/promotion/components/SearchList'
import { getThreeMetersTwoSecondsPlanList, submitThreeMetersTwoSecondsPlan } from '@/api' import { getThreeMetersTwoSecondsPlanList, submitThreeMetersTwoSecondsPlan } from '@/api'
import { getThreeTwoSecondsConfig } from './data.jsx' import { getThreeTwoSecondsConfig } from './data.jsx'
import { parseTime } from '@/utils'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
...@@ -34,7 +33,12 @@ ...@@ -34,7 +33,12 @@
if (col.requestKey) { if (col.requestKey) {
// 关联的公式计算列,需要特殊处理 // 关联的公式计算列,需要特殊处理
for (const str of col.requestKey) { for (const str of col.requestKey) {
const obj = getThreeTwoSecondsConfig().find(item => item.prop === str) const obj = getThreeTwoSecondsConfig().flatMap(item => {
if (item.children) {
return item.children.filter(child => !child.onlyFill);
}
return [];
}).find(item => item.prop === str)
if (obj && obj.type === 'formula') { if (obj && obj.type === 'formula') {
obj.func(row) obj.func(row)
} }
...@@ -58,7 +62,7 @@ ...@@ -58,7 +62,7 @@
const params = ref({ const params = ref({
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 50,
salesMonth: new Date(), salesMonth: new Date(),
deptName: '', deptName: '',
dealerCN: '', dealerCN: '',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论