提交 3ed70bbb authored 作者: lidongxu's avatar lidongxu

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

上级 28532147
...@@ -220,8 +220,9 @@ const getTableList = () => { ...@@ -220,8 +220,9 @@ const getTableList = () => {
.date-picker { .date-picker {
width: 100%; width: 100%;
padding: 10px; padding: 10px;
background-color: rgb(227, 136, 136);
.el-input { ::v-deep(.el-input) {
width: 100%; width: 100%;
padding: 0; padding: 0;
} }
......
...@@ -414,12 +414,12 @@ ...@@ -414,12 +414,12 @@
label: "实际主货架-数量", label: "实际主货架-数量",
prop: "actualMainShelfQty", prop: "actualMainShelfQty",
visible: true, visible: true,
type: 'select', type: 'input',
options: [ // options: [
{ label: '0', value: 0 }, // { label: '0', value: 0 },
{ label: '1', value: 1 }, // { label: '1', value: 1 },
{ label: '2', value: 2 } // { label: '2', value: 2 }
], // ],
referenceKey: "plannedMainShelfQty", referenceKey: "plannedMainShelfQty",
fill: true, fill: true,
width: 130, width: 130,
...@@ -427,21 +427,21 @@ ...@@ -427,21 +427,21 @@
return ( return (
<div> <div>
<span>{row[col.referenceKey] || '-'}</span> <span>{row[col.referenceKey] || '-'}</span>
<el-select modelValue={row[col.prop]} <el-input modelValue={row[col.prop]}
onUpdate:modelValue={(value) => { onUpdate:modelValue={(value) => {
// 判断空字符串给 0
if (value === '') {
value = 0
}
row[col.prop] = value; row[col.prop] = value;
submitChange(row, col); submitChange(row, col);
}} }}
min="0"
type="number"
placeholder=""
disabled={!row[col.referenceKey]} disabled={!row[col.referenceKey]}
placeholder=""> clearable>
{col.options.map(item => ( </el-input>
<el-option
key={item.value}
label={item.label}
value={item.value}
/>
))}
</el-select>
</div> </div>
) )
}, },
...@@ -458,7 +458,18 @@ ...@@ -458,7 +458,18 @@
row.actualMainShelfExecuted = '-' row.actualMainShelfExecuted = '-'
return '-'; return '-';
} }
row.actualMainShelfExecuted = ((parseInt(row.actualMainShelfType) >= parseInt(row.plannedMainShelfType)) && (parseInt(row.actualMainShelfQty) >= parseInt(row.plannedMainShelfQty))) ? '是' : '否'; // 未执行情况(实际主货架形式 < 计划主货架形式)
if (parseInt(row.actualMainShelfType) < parseInt(row.plannedMainShelfType)) {
row.actualMainShelfExecuted = '未执行'
} else if (!row.actualMainShelfQty) {
row.actualMainShelfExecuted = '未执行'
} else if (parseInt(row.actualMainShelfQty) < parseInt(row.plannedMainShelfQty) ){
// 实际主货架数量 < 计划主货架数量
row.actualMainShelfExecuted = '部分执行'
} else {
// 实际主货架数量 >= 计划主货架数量
row.actualMainShelfExecuted = '执行'
}
return row.actualMainShelfExecuted; return row.actualMainShelfExecuted;
}, },
formulaStr: '公式:(实际主货架形式 >= 计划主货架形式)并且(实际主货架数量 >= 计划主货架数量)', formulaStr: '公式:(实际主货架形式 >= 计划主货架形式)并且(实际主货架数量 >= 计划主货架数量)',
...@@ -598,7 +609,9 @@ ...@@ -598,7 +609,9 @@
{ label: '1', value: 1 }, { label: '1', value: 1 },
{ label: '2', value: 2 }, { label: '2', value: 2 },
{ label: '3', value: 3 }, { label: '3', value: 3 },
{ label: '4', value: 4 } { label: '4', value: 4 },
{ label: '5', value: 5 },
{ label: '6', value: 6 },
], ],
referenceKey: "plannedFloorStackArea", referenceKey: "plannedFloorStackArea",
fill: true, fill: true,
...@@ -637,7 +650,8 @@ ...@@ -637,7 +650,8 @@
{ label: '0', value: 0 }, { label: '0', value: 0 },
{ label: '1', value: 1 }, { label: '1', value: 1 },
{ label: '2', value: 2 }, { label: '2', value: 2 },
{ label: '3', value: 3 } { label: '3', value: 3 },
{ label: '4', value: 4 }
], ],
referenceKey: "plannedFloorStackQty", referenceKey: "plannedFloorStackQty",
fill: true, fill: true,
...@@ -790,7 +804,7 @@ ...@@ -790,7 +804,7 @@
row.actualMultiDisplayExecuted = row.actualMultiDisplay === '执行与计划一致' ? '是' : '否'; row.actualMultiDisplayExecuted = row.actualMultiDisplay === '执行与计划一致' ? '是' : '否';
return row.actualMultiDisplayExecuted; return row.actualMultiDisplayExecuted;
}, },
formulaStr: '公式:实际多点陈列-数量+形式,有值', formulaStr: '公式:实际与计划是否一致',
fill: true, fill: true,
width: 180, width: 180,
}, },
...@@ -855,7 +869,7 @@ ...@@ -855,7 +869,7 @@
row.hangingStripExecuted = (row.actualHangingStripQuantityForm === '执行与计划一致') ? '是' : '否'; row.hangingStripExecuted = (row.actualHangingStripQuantityForm === '执行与计划一致') ? '是' : '否';
return row.hangingStripExecuted; return row.hangingStripExecuted;
}, },
formulaStr: '公式:实际挂条-数量+形式 === 计划挂条-数量+形式', formulaStr: '公式:实际与计划是否一致',
fill: true, fill: true,
width: 180, width: 180,
}, },
...@@ -1196,4 +1210,11 @@ ...@@ -1196,4 +1210,11 @@
margin: 0; margin: 0;
} }
} }
.el-select{
background-color: rgb(227, 136, 136);
}
.el-input{
background-color: rgb(227, 136, 136);
}
</style> </style>
\ No newline at end of file
...@@ -403,6 +403,7 @@ ...@@ -403,6 +403,7 @@
row[col.prop] = value; row[col.prop] = value;
submitChange(row, col); submitChange(row, col);
}} }}
disabled={!row[col.referenceKey]}
placeholder=""> placeholder="">
</el-input> </el-input>
) )
...@@ -548,6 +549,7 @@ ...@@ -548,6 +549,7 @@
row[col.prop] = value; row[col.prop] = value;
submitChange(row, col); submitChange(row, col);
}} }}
disabled={!row[col.referenceKey]}
placeholder=""> placeholder="">
</el-input> </el-input>
) )
...@@ -891,6 +893,7 @@ ...@@ -891,6 +893,7 @@
row[col.prop] = value; row[col.prop] = value;
submitChange(row, col); submitChange(row, col);
}} }}
disabled={!row[col.referenceKey]}
placeholder=""> placeholder="">
</el-input> </el-input>
) )
...@@ -1346,6 +1349,7 @@ ...@@ -1346,6 +1349,7 @@
const res = await getDisplayScheduleList({ const res = await getDisplayScheduleList({
...params ...params
}) })
console.log(1, res)
// 处理日期格式 // 处理日期格式
res.data.rows.forEach(item => { res.data.rows.forEach(item => {
item.salesMonth = parseTime(item.salesMonth, '{y}-{m}') item.salesMonth = parseTime(item.salesMonth, '{y}-{m}')
...@@ -1504,6 +1508,7 @@ ...@@ -1504,6 +1508,7 @@
.date-picker { .date-picker {
padding: 10px; padding: 10px;
.el-input { .el-input {
padding: 0; padding: 0;
......
...@@ -483,63 +483,63 @@ ...@@ -483,63 +483,63 @@
"label": "实际地堆 - 平米数(㎡)", "label": "实际地堆 - 平米数(㎡)",
"prop": "actualFloorStackArea", "prop": "actualFloorStackArea",
"visible": true, "visible": true,
"type": "select", "type": "input",
"fill": true, "fill": true,
"width": 180, "width": 180,
referenceKey: "plannedFloorStackArea", referenceKey: "plannedFloorStackArea",
"options": [ // "options": [
{ // {
"label": "0", // "label": "0",
"value": 0 // "value": 0
}, // },
{ // {
"label": "0.5", // "label": "0.5",
"value": 0.5 // "value": 0.5
}, // },
{ // {
"label": "0.8", // "label": "0.8",
"value": 0.8 // "value": 0.8
}, // },
{ // {
"label": "1", // "label": "1",
"value": 1 // "value": 1
}, // },
{ // {
"label": "2", // "label": "2",
"value": 2 // "value": 2
}, // },
{ // {
"label": "3", // "label": "3",
"value": 3 // "value": 3
}, // },
{ // {
"label": "4", // "label": "4",
"value": 4 // "value": 4
}, // },
{ // {
"label": "6", // "label": "6",
"value": 6 // "value": 6
} // }
], // ],
render: (_, row, col) => { render: (_, row, col) => {
return ( return (
<div> <div>
<span>{row[col.referenceKey] || '-'}</span> <span>{row[col.referenceKey] || '-'}</span>
<el-select modelValue={row[col.prop]} <el-input modelValue={row[col.prop]}
onUpdate:modelValue={(value) => { onUpdate:modelValue={(value) => {
// 判断空字符串给 0
if (value === '') {
value = 0
}
row[col.prop] = value; row[col.prop] = value;
submitChange(row, col); submitChange(row, col);
}} }}
min="0"
disabled={!row[col.referenceKey]} disabled={!row[col.referenceKey]}
placeholder=""> type="number"
{col.options.map(item => ( placeholder=""
<el-option clearable>
key={item.value} </el-input>
label={item.label}
value={item.value}
/>
))}
</el-select>
</div> </div>
) )
}, },
...@@ -549,52 +549,52 @@ ...@@ -549,52 +549,52 @@
"label": "实际地堆 - 数量", "label": "实际地堆 - 数量",
"prop": "actualFloorStackQty", "prop": "actualFloorStackQty",
"visible": true, "visible": true,
"type": "select", "type": "input",
"fill": true, "fill": true,
"width": 140, "width": 140,
referenceKey: "plannedFloorStackQty", referenceKey: "plannedFloorStackQty",
"options": [ // "options": [
{ // {
"label": "0", // "label": "0",
"value": 0 // "value": 0
}, // },
{ // {
"label": "1", // "label": "1",
"value": 1 // "value": 1
}, // },
{ // {
"label": "2", // "label": "2",
"value": 2 // "value": 2
}, // },
{ // {
"label": "3", // "label": "3",
"value": 3 // "value": 3
}, // },
{ // {
"label": "4", // "label": "4",
"value": 4 // "value": 4
} // }
], // ],
render: (_, row, col) => { render: (_, row, col) => {
return ( return (
<div> <div>
<span>{row[col.referenceKey] || '-'}</span> <span>{row[col.referenceKey] || '-'}</span>
<el-select modelValue={row[col.prop]} <el-input modelValue={row[col.prop]}
onUpdate:modelValue={(value) => { onUpdate:modelValue={(value) => {
// 判断空字符串给 0
if (value === '') {
value = 0
}
row[col.prop] = value; row[col.prop] = value;
submitChange(row, col); submitChange(row, col);
}} }}
disabled={!row[col.referenceKey]} disabled={!row[col.referenceKey]}
placeholder=""> min="0"
{col.options.map(item => ( type="number"
<el-option placeholder=""
key={item.value} clearable>
label={item.label} </el-input>
value={item.value}
/>
))}
</el-select>
</div> </div>
) )
}, },
...@@ -968,4 +968,15 @@ ...@@ -968,4 +968,15 @@
} }
} }
.el-select {
background-color: rgb(227, 136, 136);
}
.el-input {
background-color: rgb(227, 136, 136);
}
.date-picker{
background-color: rgb(227, 136, 136);
}
</style> </style>
\ No newline at end of file
...@@ -238,35 +238,33 @@ ...@@ -238,35 +238,33 @@
referenceKey: 'plannedGw6', referenceKey: 'plannedGw6',
visible: true, visible: true,
type: 'select', type: 'select',
options: [ // options: [
{ label: '是', value: '是' }, // // { label: '是', value: '是' },
{ label: '否', value: '否' } // // { label: '否', value: '否' }
], // // { label: 0, value: 0 },
// // { label: 1, value: 1 },
// // { label: '其他', value: '其他' }
// ],
render: (_, row, col) => { render: (_, row, col) => {
return ( return (
<div> <div>
<span>{row[col.referenceKey] || '-'}</span> <span>{row[col.referenceKey] || '-'}</span>
<el-select modelValue={row[col.prop]} <el-input 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]}
min="0"
type="number"
placeholder="" placeholder=""
clearable> clearable>
{col.options.map(item => ( </el-input>
<el-option
key={item.value}
label={item.label}
value={item.value}
/>
))}
</el-select>
</div> </div>
) )
}, },
fill: true, fill: true,
width: 180 width: 190
}, },
{ {
label: '六小金刚批发挂网陈列费', label: '六小金刚批发挂网陈列费',
...@@ -287,12 +285,21 @@ ...@@ -287,12 +285,21 @@
row.gwExecuted6 = '-' row.gwExecuted6 = '-'
return '-'; return '-';
} }
row.gwExecuted6 = (row.actualGw6 === '是') ? '是' : '否'; // 判断区间,未执行,部分执行,执行
return row.gwExecuted6; if (!row.actualGw6 || row.actualGw6 == 0) {
row.gwExecuted6 = '未执行'
return '未执行'
} else if (row.actualGw6 < row.plannedGw6) {
row.gwExecuted6 = '部分执行'
return '部分执行'
} else {
row.gwExecuted6 = '执行'
return '执行'
}
}, },
formulaStr: '公式:(实际执行-六小金刚批发挂网 = 是)', formulaStr: '公式:(计划执行-六小金刚批发挂网 = 实际执行-六小金刚批发挂网)',
fill: true, fill: true,
width: 160 width: 210
} }
], ],
prop: 'wholesaleNetColumns', prop: 'wholesaleNetColumns',
......
...@@ -345,7 +345,7 @@ ...@@ -345,7 +345,7 @@
// "prop": "displayExecuted", // "prop": "displayExecuted",
// "visible": true, // "visible": true,
// "type": "formula", // "type": "formula",
// "fill": true, // "fill": false,
// "width": 150, // "width": 150,
// func: (row) => { // func: (row) => {
// if (!row.plannedDisplay) { // if (!row.plannedDisplay) {
...@@ -353,7 +353,7 @@ ...@@ -353,7 +353,7 @@
// return '-'; // return '-';
// } // }
// // 截取计划陈列形式数据 // // 截取计划陈列形式数据
// row.displayExecuted = row.actualDisplay // 值为"是"或者“否” // row.displayExecuted = row.actualDisplay === '执行与计划一致' ? '执行' : '未执行'
// return row.displayExecuted // return row.displayExecuted
// }, // },
// formulaStr: "实际陈列形式 === 计划陈列形式" // formulaStr: "实际陈列形式 === 计划陈列形式"
...@@ -370,27 +370,27 @@ ...@@ -370,27 +370,27 @@
"label": "实际 - 端架数量(组)", "label": "实际 - 端架数量(组)",
"prop": "actualEndCapQty", "prop": "actualEndCapQty",
"visible": true, "visible": true,
"type": "select", "type": "input",
referenceKey: "plannedEndCapQty", referenceKey: "plannedEndCapQty",
"fill": true, "fill": true,
"options": [ // "options": [
{ // {
"label": "0", // "label": "0",
"value": 0 // "value": 0
}, // },
{ // {
"label": "0.5", // "label": "0.5",
"value": 0.5 // "value": 0.5
}, // },
{ // {
"label": "1", // "label": "1",
"value": 1 // "value": 1
}, // },
{ // {
"label": "2", // "label": "2",
"value": 2 // "value": 2
} // }
], // ],
render: (_, row, col) => { render: (_, row, col) => {
return ( return (
<div> <div>
...@@ -402,6 +402,8 @@ ...@@ -402,6 +402,8 @@
submitChange(row, col); submitChange(row, col);
}} }}
disabled={!row[col.referenceKey]} disabled={!row[col.referenceKey]}
min="0"
type="number"
placeholder="" placeholder=""
clearable clearable
/> />
...@@ -413,24 +415,24 @@ ...@@ -413,24 +415,24 @@
// requestKey: ["endCapQtyExecuted", "snackDisplayExecuted"] // requestKey: ["endCapQtyExecuted", "snackDisplayExecuted"]
requestKey: ["endCapQtyExecuted"] requestKey: ["endCapQtyExecuted"]
}, },
// { {
// "label": "端架数量是否执行", "label": "端架数量是否执行",
// "prop": "endCapQtyExecuted", "prop": "endCapQtyExecuted",
// "visible": true, "visible": true,
// "type": "formula", "type": "formula",
// "fill": true, "fill": false,
// "width": 150, "width": 150,
// func: (row) => { func: (row) => {
// if (!row.plannedEndCapQty) { if (!row.plannedEndCapQty) {
// row.endCapQtyExecuted = '-' row.endCapQtyExecuted = '-'
// return '-' return '-'
// } }
// // 截取计划端架数量数据 // 截取计划端架数量数据
// row.endCapQtyExecuted = row.actualEndCapQty == row.plannedEndCapQty ? '是' : '否' row.endCapQtyExecuted = row.actualEndCapQty >= row.plannedEndCapQty ? '执行' : '未执行'
// return row.endCapQtyExecuted return row.endCapQtyExecuted
// }, },
// formulaStr: "执行端架数量 == 计划端架数量" formulaStr: "执行端架数量 == 计划端架数量"
// }, },
{ {
"label": "零食陈列是否执行", "label": "零食陈列是否执行",
"prop": "snackDisplayExecuted", "prop": "snackDisplayExecuted",
...@@ -439,14 +441,27 @@ ...@@ -439,14 +441,27 @@
"fill": true, "fill": true,
"width": 150, "width": 150,
func: (row) => { func: (row) => {
const executionStatuses = [ // 如果关键的 2 个计划属性无值,则直接返回 '-'
row.displayExecuted, if (!row.plannedDisplay && !row.plannedEndCapQty) {
row.endCapQtyExecuted row.snackDisplayExecuted = '-'
].filter(status => status !== '-'); return '-'
}
// 如果所有过滤后的状态都是'是',则返回'是',否则返回'否' if ((row.plannedDisplay && row.actualDisplay === '执行与计划一致')) {
row.snackDisplayExecuted = executionStatuses.every(status => status === '是') ? '是' : '否'; // 判断实际端架数量为 0 或者空时就是未执行,如果小于计划是部分执行,如果大于等于就是执行
return row.snackDisplayExecuted; if (!row.actualEndCapQty || row.actualEndCapQty == 0) {
row.snackDisplayExecuted = '未执行'
return '未执行'
} else if (row.actualEndCapQty < row.plannedEndCapQty) {
row.snackDisplayExecuted = '部分执行'
return '部分执行'
} else {
row.snackDisplayExecuted = '执行'
return '执行'
}
} else {
row.snackDisplayExecuted = '未执行'
return '未执行'
}
}, },
formulaStr: "公式:陈列形式执行,并且端架数量执行(某项无计划时,忽略该项)" formulaStr: "公式:陈列形式执行,并且端架数量执行(某项无计划时,忽略该项)"
}, },
......
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
prop: 'actualDisplayQty60', prop: 'actualDisplayQty60',
referenceKey: 'plannedDisplayQty60', referenceKey: 'plannedDisplayQty60',
visible: true, visible: true,
type: 'string', type: 'input',
fill: true, fill: true,
width: 160, width: 160,
render: (_, row, col) => { render: (_, row, col) => {
...@@ -259,9 +259,17 @@ ...@@ -259,9 +259,17 @@
<el-input <el-input
modelValue={row[col.prop]} modelValue={row[col.prop]}
onUpdate:modelValue={(value) => { onUpdate:modelValue={(value) => {
{/* 小于 0 */}
if (value < 0) {
row[col.prop] = 0;
return;
}
row[col.prop] = value; row[col.prop] = value;
submitChange(row, col); submitChange(row, col);
}} }}
min="0"
type="number"
disabled={!row[col.referenceKey]}
placeholder="" placeholder=""
clearable clearable
/> />
...@@ -283,8 +291,17 @@ ...@@ -283,8 +291,17 @@
row.displayQtyExecuted60 = '-'; row.displayQtyExecuted60 = '-';
return '-'; return '-';
} }
row.displayQtyExecuted60 = (row.actualDisplayQty60 * 1) >= (row.plannedDisplayQty60 * 1) ? '是' : '否'; // 判断区间,未执行,部分执行,执行
return row.displayQtyExecuted60; if (!row.actualDisplayQty60 || row.actualDisplayQty60 == 0) {
row.displayQtyExecuted60 = '未执行'
return '未执行'
} else if (row.actualDisplayQty60 * 1 < row.plannedDisplayQty60 * 1) {
row.displayQtyExecuted60 = '部分执行'
return '部分执行'
} else {
row.displayQtyExecuted60 = '执行'
return '执行'
}
}, },
formulaStr: '公式:(实际-60g挂条陈列数量 >= 计划-60g挂条陈列数量)', formulaStr: '公式:(实际-60g挂条陈列数量 >= 计划-60g挂条陈列数量)',
fill: true, fill: true,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论