提交 e730a99d authored 作者: lidongxu's avatar lidongxu

Merge branch 'ap' into dev

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