提交 760dc472 authored 作者: lidongxu's avatar lidongxu

refactor(display_schedule): 新增:链路中心_AP 上报_档期陈列和零食计划填报模式的接口

上级 097c47a6
...@@ -70,7 +70,7 @@ export function submitDisplayScheduleDetail(data) { ...@@ -70,7 +70,7 @@ export function submitDisplayScheduleDetail(data) {
url: `/operation/sales/ap_display/core_pro/${data.id}`, url: `/operation/sales/ap_display/core_pro/${data.id}`,
method: 'PUT', method: 'PUT',
data: { data: {
display: { promotionDisplay: {
...data, ...data,
id: undefined // 不携带 id id: undefined // 不携带 id
} }
...@@ -97,7 +97,7 @@ export function submitSnackPlan(data) { ...@@ -97,7 +97,7 @@ export function submitSnackPlan(data) {
url: `/operation/sales/ap_display/core_snack/${data.id}`, url: `/operation/sales/ap_display/core_snack/${data.id}`,
method: 'PUT', method: 'PUT',
data: { data: {
display: { snackDisplay: {
...data, ...data,
id: undefined // 不携带 id id: undefined // 不携带 id
} }
......
...@@ -30,7 +30,7 @@ import Display from './tabs/display.vue' ...@@ -30,7 +30,7 @@ import Display from './tabs/display.vue'
import Schedule from './tabs/schedule.vue' import Schedule from './tabs/schedule.vue'
import ScheduleDis from './tabs/schedule_dis.vue' import ScheduleDis from './tabs/schedule_dis.vue'
import Snack from './tabs/snack.vue' import Snack from './tabs/snack.vue'
const activeName = ref('档期陈列'); const activeName = ref('零食计划');
const handleClickTabs = (tab) => { const handleClickTabs = (tab) => {
activeName.value = tab.name; activeName.value = tab.name;
} }
......
...@@ -391,7 +391,7 @@ ...@@ -391,7 +391,7 @@
}, },
"fill": true, "fill": true,
"width": 140, "width": 140,
requestKey: ["actualEndCapExecuted"] requestKey: ["actualEndCapExecuted", "promotionDisplayExecuted"]
}, },
{ {
"label": "实际端架 - 是否执行", "label": "实际端架 - 是否执行",
...@@ -434,25 +434,104 @@ ...@@ -434,25 +434,104 @@
"label": "实际地堆 - 平米数(㎡)", "label": "实际地堆 - 平米数(㎡)",
"prop": "actualFloorStackArea", "prop": "actualFloorStackArea",
"visible": true, "visible": true,
"type": "string", "type": "select",
"fill": false, "fill": true,
"width": 180 "width": 180,
referenceKey: "plannedFloorStackArea",
"options": [
{
"label": "0",
"value": 0
},
{
"label": "0.5",
"value": 0.5
},
{
"label": "0.8",
"value": 0.8
},
{
"label": "1",
"value": 1
},
{
"label": "2",
"value": 2
},
{
"label": "3",
"value": 3
},
{
"label": "4",
"value": 4
}
],
render: (_, row, col) => {
return (
<div>
<span>{row[col.referenceKey] || '-'}</span>
<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: ["actualFloorStackExecuted", "promotionDisplayExecuted"]
}, },
{ {
"label": "实际地堆 - 数量", "label": "实际地堆 - 数量",
"prop": "actualFloorStackQty", "prop": "actualFloorStackQty",
"visible": true, "visible": true,
"type": "string", "type": "select",
"fill": false, "fill": true,
"width": 140 "width": 140,
referenceKey: "plannedFloorStackQty",
"options": [
{
"label": "0",
"value": 0
},
{
"label": "1",
"value": 1
},
{
"label": "2",
"value": 2
},
{
"label": "3",
"value": 3
}
],
requestKey: ["actualFloorStackExecuted", "promotionDisplayExecuted"]
}, },
{ {
"label": "实际地堆是否执行", "label": "实际地堆是否执行",
"prop": "actualFloorStackExecuted", "prop": "actualFloorStackExecuted",
"visible": true, "visible": true,
"type": "string", "type": "formula",
"fill": false, "fill": true,
"width": 140 "width": 150,
func: (row) => {
row.actualFloorStackExecuted = row.actualFloorStackArea >= row.plannedFloorStackArea && row.actualFloorStackQty >= row.plannedFloorStackQty ? '是' : '否'
return row.actualFloorStackExecuted
},
formulaStr: "执行平米数 >= 计划平米数,并且 执行地堆数量 >= 计划地堆数量"
}, },
{ {
"label": "计划其他陈列数量 + 形式", "label": "计划其他陈列数量 + 形式",
...@@ -474,17 +553,42 @@ ...@@ -474,17 +553,42 @@
"label": "实际其他陈列 - 数量 + 形式", "label": "实际其他陈列 - 数量 + 形式",
"prop": "actualOtherDisplay", "prop": "actualOtherDisplay",
"visible": true, "visible": true,
"type": "string", "type": "input",
"fill": false, "fill": true,
"width": 190 "width": 190,
referenceKey: "plannedOtherDisplay",
render: (_, row, col) => {
return (
<div>
<span>{row[col.referenceKey] || '-'}</span>
<div>
<el-input modelValue={row[col.prop]}
onUpdate:modelValue={(value) => {
row[col.prop] = value;
submitChange(row, col);
}}
disabled={!row[col.referenceKey]}
placeholder=""
clearable
/>
</div>
</div>
)
},
requestKey: ["actualOtherDisplayExecuted", "promotionDisplayExecuted"]
}, },
{ {
"label": "实际其他陈列 - 是否执行", "label": "实际其他陈列 - 是否执行",
"prop": "actualOtherDisplayExecuted", "prop": "actualOtherDisplayExecuted",
"visible": true, "visible": true,
"type": "string", "type": "formula",
"fill": false, "fill": true,
"width": 170 "width": 190,
func: (row) => {
row.actualOtherDisplayExecuted = !row.actualOtherDisplay ? '否' : '是'
return row.actualOtherDisplayExecuted
},
formulaStr: "执行其他陈列数量 + 形式,是否等于计划其他陈列数量 + 形式"
}, },
{ {
"label": "合计费用 - 费用", "label": "合计费用 - 费用",
...@@ -498,9 +602,15 @@ ...@@ -498,9 +602,15 @@
"label": "档期陈列是否执行", "label": "档期陈列是否执行",
"prop": "promotionDisplayExecuted", "prop": "promotionDisplayExecuted",
"visible": true, "visible": true,
"type": "string", "type": "formula",
"fill": false, "fill": true,
"width": 140 "width": 160,
func: (row) => {
// 实际端架-是否执行 && 实际地堆是否执行 && 实际其他陈列-是否执行
row.promotionDisplayExecuted = row.actualEndShelfExecuted === '是' && row.actualFloorStackExecuted === '是' && row.actualOtherDisplayExecuted === '是' ? '是' : '否'
return row.promotionDisplayExecuted
},
formulaStr: "实际端架-是否执行 === '是',并且 实际地堆是否执行 === '是',并且 实际其他陈列-是否执行 === '是'"
}, },
{ {
"label": "付费陈列 - 是否", "label": "付费陈列 - 是否",
......
...@@ -219,17 +219,59 @@ ...@@ -219,17 +219,59 @@
"label": "实际 - 陈列形式", "label": "实际 - 陈列形式",
"prop": "actualDisplay", "prop": "actualDisplay",
"visible": true, "visible": true,
"type": "string", "type": "select",
"fill": false, "fill": true,
"width": 130 "width": 130,
"options": [
{
"label": "端架",
"value": "端架"
},
{
"label": "收银台",
"value": "收银台"
},
{
"label": "端架和收银台",
"value": "端架和收银台"
}
],
render: (_, row, col) => {
return (
<div>
<span>{row[col.referenceKey] || '-'}</span>
<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"]
}, },
{ {
"label": "陈列形式是否执行", "label": "陈列形式是否执行",
"prop": "displayExecuted", "prop": "displayExecuted",
"visible": true, "visible": true,
"type": "string", "type": "formula",
"fill": false, "fill": true,
"width": 150 "width": 150,
func: (row) => {
row.displayExecuted = row.actualDisplay === row.plannedDisplay ? '是' : '否'
return row.displayExecuted
},
formulaStr: "实际陈列形式 === 计划陈列形式"
}, },
{ {
"label": "计划 - 端架数量(组)", "label": "计划 - 端架数量(组)",
...@@ -243,25 +285,76 @@ ...@@ -243,25 +285,76 @@
"label": "实际 - 端架数量(组)", "label": "实际 - 端架数量(组)",
"prop": "actualEndCapQty", "prop": "actualEndCapQty",
"visible": true, "visible": true,
"type": "string", "type": "select",
"fill": false, "fill": true,
"width": 160 "options": [
{
"label": "0",
"value": 0
},
{
"label": "0.5",
"value": 0.5
},
{
"label": "1",
"value": 1
},
{
"label": "2",
"value": 2
}
],
render: (_, row, col) => {
return (
<div>
<span>{row[col.referenceKey] || '-'}</span>
<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>
)
},
"width": 160,
requestKey: ["endCapQtyExecuted", "snackDisplayExecuted"]
}, },
{ {
"label": "端架数量是否执行", "label": "端架数量是否执行",
"prop": "endCapQtyExecuted", "prop": "endCapQtyExecuted",
"visible": true, "visible": true,
"type": "string", "type": "formula",
"fill": false, "fill": true,
"width": 140 "width": 150,
func: (row) => {
row.endCapQtyExecuted = row.actualEndCapQty >= row.plannedEndCapQty ? '是' : '否'
return row.endCapQtyExecuted
},
formulaStr: "执行端架数量 == 计划端架数量"
}, },
{ {
"label": "零食陈列是否执行", "label": "零食陈列是否执行",
"prop": "snackDisplayExecuted", "prop": "snackDisplayExecuted",
"visible": true, "visible": true,
"type": "string", "type": "formula",
"fill": false, "fill": true,
"width": 140 "width": 150,
func: (row) => {
row.snackDisplayExecuted = row.displayExecuted === '是' && row.endCapQtyExecuted === '是' ? '是' : '否'
return row.snackDisplayExecuted
},
formulaStr: "陈列形式是否执行 === 是,并且端架数量是否执行 === 是"
}, },
{ {
"label": "计划 - 陈列费用", "label": "计划 - 陈列费用",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论