提交 893f2d67 authored 作者: lidongxu's avatar lidongxu

冲突解决

<template> <template>
<div> <div class="mobile-container">
123 <van-nav-bar right-text="搜索"
left-arrow
@click-left="clickBack"
@click-right="showSearch = true"
placeholder
fixed />
<!-- 计划列表 -->
<van-pull-refresh v-model="refreshLoading"
:pull-distance="100"
success-text="刷新成功"
@refresh="onRefresh">
<van-list v-model:loading="loading"
:finished="finished"
:immediate-check="false"
finished-text="没有更多了"
@load="onLoad">
<van-cell-group inset>
<van-swipe-cell v-for="item in planList"
:key="item.id">
<van-cell :title="item.prdName + '\n料号: ' + item.prdCode">
<template #label>
<p>批号:{{ item.manufactureBatchNo }}</p>
<p>厂家:{{ item.manufactureDate }}</p>
</template>
<template #value>
</template>
</van-cell>
</van-swipe-cell>
</van-cell-group>
</van-list>
</van-pull-refresh>
</div> </div>
</template> </template>
<script setup> <script setup>
import { getQualityInsPageList } from '@/api'
const router = useRouter()
/*************** 导航栏 ***************/
const showSearch = ref(false)
const clickBack = () => {
router.back()
}
/*************** 刷新+加载 ***************/
const refreshLoading = ref(false)
const onRefresh = async () => {
refreshLoading.value = true
await getPlanListFn()
refreshLoading.value = false
}
// 加载更多
const loading = ref(false)
const finished = ref(false)
const onLoad = async () => {
if (loading.value || finished.value) return
loading.value = true
await getPlanListFn()
loading.value = false
}
/*************** 计划列表 ***************/
const query = reactive({
pageNum: 1,
pageSize: 10,
})
const planList = ref([])
const getPlanListFn = async () => {
const res = await getQualityInsPageList(query)
if (res.code === 200) {
planList.value = res.data.rows || []
finished.value = res.data.rows.length < res.data.pageSize
}
}
getPlanListFn()
</script> </script>
<style scoped <style scoped
lang="scss"></style> lang="scss">
\ No newline at end of file ::v-deep(.van-cell__label) {
margin: 0;
}
</style>
\ No newline at end of file
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</div> </div>
</div> </div>
<!-- 展示模式 --> <!-- 展示模式 -->
<div v-else>{{ row[col.prop] || '-' }}</div> <div v-else>{{ formatter(row, col, row[col.prop] || '-') }}</div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
...@@ -120,6 +120,11 @@ const props = defineProps({ ...@@ -120,6 +120,11 @@ const props = defineProps({
useFill: { useFill: {
type: Boolean, type: Boolean,
default: false default: false
},
// 格式化表格某列内容
formatter: {
type: Function,
default: (row, col, cellValue) => cellValue
} }
}) })
const emit = defineEmits(['updateColumns', 'getTableList', 'updateShowSearch']) const emit = defineEmits(['updateColumns', 'getTableList', 'updateShowSearch'])
......
...@@ -464,6 +464,11 @@ ...@@ -464,6 +464,11 @@
visible: true, visible: true,
type: 'formula', type: 'formula',
func: (row) => { func: (row) => {
// 如果参考值是空则返回 '-'
if (!row.plannedMainShelfType || !row.plannedMainShelfQty) {
row.actualMainShelfExecuted = '-'
return '-';
}
row.actualMainShelfExecuted = ((parseInt(row.actualMainShelfType) >= parseInt(row.plannedMainShelfType)) && (parseInt(row.actualMainShelfQty) >= parseInt(row.plannedMainShelfQty))) ? '是' : '否'; row.actualMainShelfExecuted = ((parseInt(row.actualMainShelfType) >= parseInt(row.plannedMainShelfType)) && (parseInt(row.actualMainShelfQty) >= parseInt(row.plannedMainShelfQty))) ? '是' : '否';
return row.actualMainShelfExecuted; return row.actualMainShelfExecuted;
}, },
...@@ -540,6 +545,11 @@ ...@@ -540,6 +545,11 @@
visible: true, visible: true,
type: 'formula', type: 'formula',
func: (row) => { func: (row) => {
// 如果参考值是空则返回 '-'
if (!row.plannedEndCapQty) {
row.actualEndCapExecuted = '-'
return '-';
}
row.actualEndCapExecuted = ((parseFloat(row.actualEndCapQty) >= parseFloat(row.plannedEndCapQty))) ? '是' : '否'; row.actualEndCapExecuted = ((parseFloat(row.actualEndCapQty) >= parseFloat(row.plannedEndCapQty))) ? '是' : '否';
return row.actualEndCapExecuted; return row.actualEndCapExecuted;
}, },
...@@ -568,7 +578,7 @@ ...@@ -568,7 +578,7 @@
prop: "plannedThemedFloorStack", prop: "plannedThemedFloorStack",
visible: true, visible: true,
type: 'string', type: 'string',
fill: true, fill: false,
width: 140 width: 140
}, },
{ {
...@@ -668,10 +678,28 @@ ...@@ -668,10 +678,28 @@
// 请求时需要额外携带影响的列字段值 // 请求时需要额外携带影响的列字段值
requestKey: ["actualFloorStackExecuted", "regularDisplayExecuted"] requestKey: ["actualFloorStackExecuted", "regularDisplayExecuted"]
}, },
{
label: "实际地堆是否执行",
prop: "actualFloorStackExecuted",
visible: true,
type: 'formula',
func: (row) => {
// 如果参考值是空则返回 '-'
if (!row.plannedFloorStackArea || !row.plannedFloorStackQty) {
row.actualFloorStackExecuted = '-'
return '-';
}
row.actualFloorStackExecuted = ((parseFloat(row.actualFloorStackArea) >= parseFloat(row.plannedFloorStackArea)) && (parseInt(row.actualFloorStackQty) >= parseInt(row.plannedFloorStackQty))) ? '是' : '否';
return row.actualFloorStackExecuted;
},
formulaStr: '公式:(实际地堆平米数 >= 计划地堆平米数)并且(实际地堆数量 >= 计划地堆数量)',
fill: true,
width: 150
},
{ {
label: "实际主题地堆-是否", label: "实际主题地堆-是否",
prop: "actualThemedFloorStack", prop: "actualThemedFloorStack",
referenceKey: "actualFloorStackQty", referenceKey: "plannedThemedFloorStack",
visible: true, visible: true,
type: 'select', type: 'select',
options: [ options: [
...@@ -683,6 +711,7 @@ ...@@ -683,6 +711,7 @@
render: (_, row, col) => { render: (_, row, col) => {
return ( return (
<div> <div>
<span>{row[col.referenceKey] || '-'}</span>
<el-select modelValue={row[col.prop]} <el-select modelValue={row[col.prop]}
onUpdate:modelValue={(value) => { onUpdate:modelValue={(value) => {
row[col.prop] = value; row[col.prop] = value;
...@@ -702,19 +731,6 @@ ...@@ -702,19 +731,6 @@
) )
} }
}, },
{
label: "实际地堆是否执行",
prop: "actualFloorStackExecuted",
visible: true,
type: 'formula',
func: (row) => {
row.actualFloorStackExecuted = ((parseFloat(row.actualFloorStackArea) >= parseFloat(row.plannedFloorStackArea)) && (parseInt(row.actualFloorStackQty) >= parseInt(row.plannedFloorStackQty))) ? '是' : '否';
return row.actualFloorStackExecuted;
},
formulaStr: '公式:(实际地堆平米数 >= 计划地堆平米数)并且(实际地堆数量 >= 计划地堆数量)',
fill: true,
width: 150
},
{ {
label: "计划多点陈列-数量+形式", label: "计划多点陈列-数量+形式",
prop: "plannedMultiDisplay", prop: "plannedMultiDisplay",
...@@ -738,7 +754,7 @@ ...@@ -738,7 +754,7 @@
type: 'input', type: 'input',
func: (row) => { func: (row) => {
// 没有输入内容时,则是否执行设置为否 // 没有输入内容时,则是否执行设置为否
row.actualMultiDisplayExecuted = !row.actualMultiDisplay ? '否' : '是' // row.actualMultiDisplayExecuted = !row.actualMultiDisplay ? '否' : '是'
}, },
referenceKey: "plannedMultiDisplay", referenceKey: "plannedMultiDisplay",
fill: true, fill: true,
...@@ -766,36 +782,19 @@ ...@@ -766,36 +782,19 @@
prop: "actualMultiDisplayExecuted", prop: "actualMultiDisplayExecuted",
referenceKey: 'actualMultiDisplay', referenceKey: 'actualMultiDisplay',
visible: true, visible: true,
type: 'select', type: 'formula',
options: [ func: (row) => {
{ label: '是', value: '是' }, // 如果参考值是空则返回 '-'
{ label: '否', value: '否' } if (!row.plannedMultiDisplay) {
], row.actualMultiDisplayExecuted = '-'
fill: true, return '-';
width: 170, }
render: (_, row, col) => { row.actualMultiDisplayExecuted = (row.actualMultiDisplay) ? '是' : '否';
return ( return row.actualMultiDisplayExecuted;
<div>
<el-select modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
placeholder="">
{col.options.map(item => (
<el-option
key={item.value}
label={item.label}
value={item.value}
/>
))}
</el-select>
</div>
)
}, },
// 请求时需要额外携带影响的列字段值 formulaStr: '公式:实际多点陈列-数量+形式,有值',
requestKey: ["actualMultiDisplayExecuted"] fill: true,
width: 180,
}, },
{ {
label: "合计费用-费用", label: "合计费用-费用",
...@@ -820,10 +819,19 @@ ...@@ -820,10 +819,19 @@
type: 'formula', type: 'formula',
func: (row) => { func: (row) => {
// 实际主货架-执行 && 实际端架-执行 && 实际地堆-执行 && 实际多点陈列-执行 // 实际主货架-执行 && 实际端架-执行 && 实际地堆-执行 && 实际多点陈列-执行
row.regularDisplayExecuted = (row.actualMainShelfExecuted === '是' && row.actualEndCapExecuted === '是' && row.actualFloorStackExecuted === '是' && row.actualMultiDisplayExecuted === '是') ? '是' : '否'; // 过滤掉值为"-"的项,只对有实际值的项进行判断
const executionStatuses = [
row.actualMainShelfExecuted,
row.actualEndCapExecuted,
row.actualFloorStackExecuted,
row.actualMultiDisplayExecuted
].filter(status => status !== '-');
// 如果所有过滤后的状态都是'是',则返回'是',否则返回'否'
row.regularDisplayExecuted = executionStatuses.every(status => status === '是') ? '是' : '否';
return row.regularDisplayExecuted; return row.regularDisplayExecuted;
}, },
formulaStr: '公式:(实际主货架执行,并且实际端架执行,并且实际地堆执行,并且实际多点陈列执行)', formulaStr: '公式:实际主货架执行,并且实际端架执行,并且实际地堆执行,并且实际多点陈列执行(某项无计划时,忽略该项)',
fill: true, fill: true,
width: 150 width: 150
}, },
......
...@@ -12,9 +12,11 @@ ...@@ -12,9 +12,11 @@
:visibleProps="visibleProps" :visibleProps="visibleProps"
:params="params" :params="params"
:useFill="useFill" :useFill="useFill"
:formatter="formatterFn"
@updateColumns="updateColumns" @updateColumns="updateColumns"
@getTableList="getTableList" @getTableList="getTableList"
@updateShowSearch="updateShowSearch" /> @updateShowSearch="updateShowSearch"
/>
</template> </template>
<script setup <script setup
...@@ -330,6 +332,11 @@ ...@@ -330,6 +332,11 @@
visible: true, visible: true,
type: 'formula', type: 'formula',
func: (row) => { func: (row) => {
// 如果参考值是空则返回 '-'
if (!row.plannedPromotionSpec) {
row.specExecutionStatus = '-';
return '-';
}
row.specExecutionStatus = row.plannedPromotionSpec === row.actualPromotionSpec ? '是' : '否'; row.specExecutionStatus = row.plannedPromotionSpec === row.actualPromotionSpec ? '是' : '否';
return row.specExecutionStatus; return row.specExecutionStatus;
}, },
...@@ -347,7 +354,7 @@ ...@@ -347,7 +354,7 @@
fill: true, fill: true,
width: 170, width: 170,
render: (_, row, col) => { render: (_, row, col) => {
// options 根据参考属性值来决定 // options 根据参考属性值来决定(计划值)
let list = splitAndFilter(row[col.referenceKey]) let list = splitAndFilter(row[col.referenceKey])
let isFullFlavor = false let isFullFlavor = false
// 如果数组里有"全系列"/"全口味"则修改数组 // 如果数组里有"全系列"/"全口味"则修改数组
...@@ -409,6 +416,11 @@ ...@@ -409,6 +416,11 @@
visible: true, visible: true,
type: 'formula', type: 'formula',
func: (row) => { func: (row) => {
// 如果参考值是空则返回 '-'
if (!row.plannedPromotionFlavor) {
row.flavorExecutionStatus = '-';
return '-';
}
// 处理逗号的口味形成数组 // 处理逗号的口味形成数组
let ppromotionFlavor = splitAndFilter(row.plannedPromotionFlavor) let ppromotionFlavor = splitAndFilter(row.plannedPromotionFlavor)
if (!row.actualPromotionFlavor) { if (!row.actualPromotionFlavor) {
...@@ -599,6 +611,11 @@ ...@@ -599,6 +611,11 @@
visible: true, visible: true,
type: 'formula', type: 'formula',
func: (row) => { func: (row) => {
// 如果参考值是空则返回 '-'
if (!row.plannedPromotionStartDate || !row.plannedPromotionEndDate) {
row.promotionImplementationStatus = '-';
return '-';
}
row.promotionImplementationStatus = row.actualPromotionStartDate && row.actualPromotionEndDate ? '是' : '否'; row.promotionImplementationStatus = row.actualPromotionStartDate && row.actualPromotionEndDate ? '是' : '否';
return row.promotionImplementationStatus; return row.promotionImplementationStatus;
}, },
...@@ -612,6 +629,11 @@ ...@@ -612,6 +629,11 @@
visible: true, visible: true,
type: 'formula', type: 'formula',
func: (row) => { func: (row) => {
// 如果参考值是空则返回 '-'
if (!row.plannedPromotionStartDate || !row.plannedPromotionEndDate) {
row.timeExecutionStatus = '-';
return '-';
}
row.timeExecutionStatus = (parseTime(row.actualPromotionStartDate) === parseTime(row.plannedPromotionStartDate)) && parseTime(row.actualPromotionEndDate) === parseTime(row.plannedPromotionEndDate) ? '是' : '否'; row.timeExecutionStatus = (parseTime(row.actualPromotionStartDate) === parseTime(row.plannedPromotionStartDate)) && parseTime(row.actualPromotionEndDate) === parseTime(row.plannedPromotionEndDate) ? '是' : '否';
return row.timeExecutionStatus; return row.timeExecutionStatus;
}, },
...@@ -658,39 +680,19 @@ ...@@ -658,39 +680,19 @@
label: "促销机制是否执行", label: "促销机制是否执行",
prop: "promotionMechanismExecutionStatus", prop: "promotionMechanismExecutionStatus",
visible: true, visible: true,
type: 'select', type: 'formula',
options: [ func: (row) => {
{ // 如果参考值是空则返回 '-'
label: '是', if (!row.plannedPromotionMechanism) {
value: '是' row.promotionMechanismExecutionStatus = '-';
}, return '-';
{
label: '否',
value: '否'
} }
], row.promotionMechanismExecutionStatus = row.actualPromotionMechanism ? '是' : '否';
return row.promotionMechanismExecutionStatus;
},
formulaStr: '公式:实际促销机制,是否有值',
fill: true, fill: true,
width: 135, width: 145,
render: (_, row, col) => {
return (
<div>
<div style="width: 100%;">
<el-select modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
submitChange(row, col);
}}
placeholder=""
clearable
>
{col.options.map((item) => (
<el-option key={item.value} label={item.label} value={item.value} />
))}
</el-select>
</div>
</div>
)
}
}, },
{ {
label: "预估袋数", label: "预估袋数",
...@@ -872,11 +874,19 @@ ...@@ -872,11 +874,19 @@
visible: true, visible: true,
type: 'formula', type: 'formula',
func: (row) => { func: (row) => {
// 促销价是否执行,促销机制是否执行,档期规格是否执行,档期是否开展 // 过滤掉值为"-"的项,只对有实际值的项进行判断
row.promotionExecutionStatus = row.promotionPriceExecutionStatus == '是' && row.promotionMechanismExecutionStatus == '是' && row.specExecutionStatus == '是' && row.promotionImplementationStatus == '是' ? '是' : '否'; const executionStatuses = [
row.promotionPriceExecutionStatus,
row.promotionMechanismExecutionStatus,
row.specExecutionStatus,
row.promotionImplementationStatus
].filter(status => status !== '-');
// 如果所有过滤后的状态都是'是',则返回'是',否则返回'否'
row.promotionExecutionStatus = executionStatuses.every(status => status === '是') ? '是' : '否';
return row.promotionExecutionStatus; return row.promotionExecutionStatus;
}, },
formulaStr: '公式:(促销价是否执行 = 是,并且促销机制是否执行 = 是,并且档期规格是否执行 = 是,并且档期是否开展 = 是)', formulaStr: '公式:促销价执行,并且促销机制执行,并且促销规格执行,并且档期开展(某项无计划时,忽略该项)',
fill: true, fill: true,
width: 125 width: 125
} }
...@@ -951,6 +961,7 @@ ...@@ -951,6 +961,7 @@
visible: true, visible: true,
type: 'formula', type: 'formula',
func: (row) => { func: (row) => {
if (!row.plannedPosterFormat) return row.posterExecutionStatus = '-'
if (!row.actualPosterFormat) return row.posterExecutionStatus = '否' if (!row.actualPosterFormat) return row.posterExecutionStatus = '否'
row.posterExecutionStatus = row.plannedPosterFormat == row.actualPosterFormat ? '是' : '否'; row.posterExecutionStatus = row.plannedPosterFormat == row.actualPosterFormat ? '是' : '否';
return row.posterExecutionStatus; return row.posterExecutionStatus;
...@@ -1116,6 +1127,15 @@ ...@@ -1116,6 +1127,15 @@
isLoading.value = false isLoading.value = false
} }
// 表格格式化指定列的数据内容
const formatterFn = (row, col, cellValue) => {
if (col.prop === 'actualPromotionFlavor') {
// 对数组内容格式化,为空时,显示'-'
return cellValue.length ? cellValue.join(',') : '-'
}
return cellValue
}
onMounted(() => { onMounted(() => {
updateColumns() updateColumns()
getTableList() getTableList()
......
...@@ -445,6 +445,11 @@ ...@@ -445,6 +445,11 @@
"fill": true, "fill": true,
"width": 160, "width": 160,
func: (row) => { func: (row) => {
// 如果计划端架数量为空则返回 '-'
if (!row.plannedEndCapQty) {
row.actualEndCapExecuted = '-'
return '-';
}
row.actualEndCapExecuted = row.actualEndCapQty >= row.plannedEndCapQty ? '是' : '否' row.actualEndCapExecuted = row.actualEndCapQty >= row.plannedEndCapQty ? '是' : '否'
return row.actualEndCapExecuted return row.actualEndCapExecuted
}, },
...@@ -594,6 +599,11 @@ ...@@ -594,6 +599,11 @@
"fill": true, "fill": true,
"width": 150, "width": 150,
func: (row) => { func: (row) => {
// 如果计划端架数量为空则返回 '-'
if (!row.plannedFloorStackArea || !row.plannedFloorStackQty) {
row.actualFloorStackExecuted = '-'
return '-';
}
row.actualFloorStackExecuted = row.actualFloorStackArea >= row.plannedFloorStackArea && row.actualFloorStackQty >= row.plannedFloorStackQty ? '是' : '否' row.actualFloorStackExecuted = row.actualFloorStackArea >= row.plannedFloorStackArea && row.actualFloorStackQty >= row.plannedFloorStackQty ? '是' : '否'
return row.actualFloorStackExecuted return row.actualFloorStackExecuted
}, },
...@@ -651,10 +661,14 @@ ...@@ -651,10 +661,14 @@
"fill": true, "fill": true,
"width": 190, "width": 190,
func: (row) => { func: (row) => {
row.actualOtherDisplayExecuted = !row.actualOtherDisplay ? '否' : '是' if (!row.plannedOtherDisplay) {
row.actualOtherDisplayExecuted = '-'
return '-';
}
row.actualOtherDisplayExecuted = row.actualOtherDisplay ? '是' : '否'
return row.actualOtherDisplayExecuted return row.actualOtherDisplayExecuted
}, },
formulaStr: "执行其他陈列数量 + 形式,是否等于计划其他陈列数量 + 形式" formulaStr: "公式:实际其他陈列-数量+形式,有值"
}, },
{ {
"label": "合计费用 - 费用", "label": "合计费用 - 费用",
...@@ -673,10 +687,17 @@ ...@@ -673,10 +687,17 @@
"width": 160, "width": 160,
func: (row) => { func: (row) => {
// 实际端架-是否执行 && 实际地堆是否执行 && 实际其他陈列-是否执行 // 实际端架-是否执行 && 实际地堆是否执行 && 实际其他陈列-是否执行
row.promotionDisplayExecuted = row.actualEndShelfExecuted === '是' && row.actualFloorStackExecuted === '是' && row.actualOtherDisplayExecuted === '是' ? '是' : '否' const executionStatuses = [
return row.promotionDisplayExecuted row.actualEndCapExecuted,
row.actualFloorStackExecuted,
row.actualOtherDisplayExecuted
].filter(status => status !== '-');
// 如果所有过滤后的状态都是'是',则返回'是',否则返回'否'
row.promotionDisplayExecuted = executionStatuses.every(status => status === '是') ? '是' : '否';
return row.promotionDisplayExecuted;
}, },
formulaStr: "实际端架-是否执行 === '是',并且 实际地堆是否执行 === '是',并且 实际其他陈列-是否执行 === '是'" formulaStr: "公式:实际端架执行,并且实际地堆执行,并且实际其他陈列执行(某项无计划时,忽略该项)"
}, },
{ {
"label": "付费陈列 - 是否", "label": "付费陈列 - 是否",
......
...@@ -261,51 +261,68 @@ ...@@ -261,51 +261,68 @@
"label": "实际 - 陈列形式", "label": "实际 - 陈列形式",
"prop": "actualDisplay", "prop": "actualDisplay",
"visible": true, "visible": true,
"type": "select", "type": "input",
referenceKey: "plannedDisplay", referenceKey: "plannedDisplay",
"fill": true,
"width": 160,
"options": [
{
"label": "端架",
"value": "端架"
},
{
"label": "收银台",
"value": "收银台"
},
{
"label": "端架和收银台",
"value": "端架和收银台"
}
],
render: (_, row, col) => { render: (_, row, col) => {
return ( return (
<div> <div>
<el-tooltip placement="top" content={row[col.referenceKey] || '-'} disabled={!isContentOverflow(col.referenceKey, row[col.referenceKey], col)}> <span>{row[col.referenceKey] || '-'}</span>
<span style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%;"> <div>
{row[col.referenceKey] || '-'} <el-input modelValue={row[col.prop]}
</span>
</el-tooltip>
<el-select modelValue={row[col.prop]}
onUpdate:modelValue={(value) => { onUpdate:modelValue={(value) => {
row[col.prop] = value; row[col.prop] = value;
submitChange(row, col); submitChange(row, col);
}} }}
disabled={!row[col.referenceKey]} disabled={!row[col.referenceKey]}
placeholder="" placeholder=""
clearable> clearable
{col.options.map(item => (
<el-option
key={item.value}
label={item.label}
value={item.value}
/> />
))} </div>
</el-select>
</div> </div>
) )
}, },
"fill": true,
"width": 160,
// "options": [
// {
// "label": "端架",
// "value": "端架"
// },
// {
// "label": "收银台",
// "value": "收银台"
// },
// {
// "label": "端架和收银台",
// "value": "端架和收银台"
// }
// ],
// render: (_, row, col) => {
// return (
// <div>
// <el-tooltip placement="top" content={row[col.referenceKey] || '-'} disabled={!isContentOverflow(col.referenceKey, row[col.referenceKey], col)}>
// <span style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%;">
// {row[col.referenceKey] || '-'}
// </span>
// </el-tooltip>
// <el-select modelValue={row[col.prop]}
// onUpdate:modelValue={(value) => {
// row[col.prop] = value;
// submitChange(row, col);
// }}
// disabled={!row[col.referenceKey]}
// placeholder="">
// {col.options.map(item => (
// <el-option
// key={item.value}
// label={item.label}
// value={item.value}
// />
// ))}
// </el-select>
// </div>
// )
// },
requestKey: ["displayExecuted", "snackDisplayExecuted"] requestKey: ["displayExecuted", "snackDisplayExecuted"]
}, },
{ {
...@@ -316,7 +333,10 @@ ...@@ -316,7 +333,10 @@
"fill": true, "fill": true,
"width": 150, "width": 150,
func: (row) => { func: (row) => {
row.displayExecuted = row.actualDisplay === row.plannedDisplay ? '是' : '否' if (!row.plannedDisplay) {
return '-';
}
row.displayExecuted = row.actualDisplay ? '是' : '否'
return row.displayExecuted return row.displayExecuted
}, },
formulaStr: "实际陈列形式 === 计划陈列形式" formulaStr: "实际陈列形式 === 计划陈列形式"
...@@ -387,6 +407,10 @@ ...@@ -387,6 +407,10 @@
"fill": true, "fill": true,
"width": 150, "width": 150,
func: (row) => { func: (row) => {
if (!row.plannedEndCapQty) {
row.endCapQtyExecuted = '-'
return '-'
}
row.endCapQtyExecuted = row.actualEndCapQty >= row.plannedEndCapQty ? '是' : '否' row.endCapQtyExecuted = row.actualEndCapQty >= row.plannedEndCapQty ? '是' : '否'
return row.endCapQtyExecuted return row.endCapQtyExecuted
}, },
...@@ -400,10 +424,16 @@ ...@@ -400,10 +424,16 @@
"fill": true, "fill": true,
"width": 150, "width": 150,
func: (row) => { func: (row) => {
row.snackDisplayExecuted = row.displayExecuted === '是' && row.endCapQtyExecuted === '是' ? '是' : '否' const executionStatuses = [
return row.snackDisplayExecuted row.displayExecuted,
row.endCapQtyExecuted
].filter(status => status !== '-');
// 如果所有过滤后的状态都是'是',则返回'是',否则返回'否'
row.snackDisplayExecuted = executionStatuses.every(status => status === '是') ? '是' : '否';
return row.snackDisplayExecuted;
}, },
formulaStr: "陈列形式是否执行 === 是,并且端架数量是否执行 === 是" formulaStr: "公式:陈列形式执行,并且端架数量执行(某项无计划时,忽略该项)"
}, },
{ {
"label": "计划 - 陈列费用", "label": "计划 - 陈列费用",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论