提交 43f89069 authored 作者: lidongxu's avatar lidongxu

refactor(promotion): 修改:Ap 执行上报_新增操作提示列在填报模式中_并且修改零食陈列调用接口

上级 d208081c
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
:label="col.label" :label="col.label"
:key="col.prop" :key="col.prop"
align="center" align="center"
:show-overflow-tooltip="col.type === 'string'"
class-name="column-style" class-name="column-style"
:width="col.width" :width="col.width"
:fixed="operation === '填报模式' && col.fixed"> :fixed="operation === '填报模式' && col.fixed">
...@@ -72,9 +71,10 @@ ...@@ -72,9 +71,10 @@
</template> </template>
<script setup> <script setup>
import { h } from 'vue'
/*************** 操作类型 ***************/ /*************** 操作类型 ***************/
const operation = ref('平铺模式'); // const operation = ref('平铺模式');
// const operation = ref('填报模式'); const operation = ref('填报模式');
const tableRef = ref(null) const tableRef = ref(null)
const props = defineProps({ const props = defineProps({
...@@ -261,4 +261,22 @@ const getTableList = () => { ...@@ -261,4 +261,22 @@ const getTableList = () => {
margin: 0; margin: 0;
} }
} }
/* 操作提示列 */
.operation_tip_cell {
display: flex;
flex-direction: column;
align-items: flex-start;
p{
width: 100%;
margin: 0;
}
p:first-child {
background-color: #e1e2e6;
border-bottom: 1px solid #ebeef5;
}
p:last-child {
padding: 15px 0;
}
}
</style> </style>
\ No newline at end of file
...@@ -25,6 +25,24 @@ ...@@ -25,6 +25,24 @@
{ {
label: "基础信息", // 类型标题 label: "基础信息", // 类型标题
children: [ children: [
{
label: '操作提示',
prop: 'operationTip', // 列属性
visible: true, // 是否显示
type: 'string', // 列类型
fill: true, // 是否为填报列
fixed: 'left', // 是否固定在左侧
width: 100,
onlyFill: true, // 只在填报列显示
render: (_, row, col) => {
return (
<div class="operation_tip_cell">
<p>计划</p>
<p>实际</p>
</div>
)
}
},
{ {
label: '计划月份', // 列标题 label: '计划月份', // 列标题
prop: 'salesMonth', // 列属性 prop: 'salesMonth', // 列属性
......
...@@ -28,6 +28,24 @@ ...@@ -28,6 +28,24 @@
{ {
label: "基础信息", label: "基础信息",
children: [ children: [
{
label: '操作提示',
prop: 'operationTip', // 列属性
visible: true, // 是否显示
type: 'string', // 列类型
fill: true, // 是否为填报列
fixed: 'left', // 是否固定在左侧
width: 100,
onlyFill: true, // 只在填报列显示
render: (_, row, col) => {
return (
<div class="operation_tip_cell">
<p>计划</p>
<p>实际</p>
</div>
)
}
},
{ {
label: '计划月份', label: '计划月份',
prop: 'salesMonth', prop: 'salesMonth',
......
...@@ -25,6 +25,24 @@ ...@@ -25,6 +25,24 @@
{ {
label: "基础信息", // 类型标题 label: "基础信息", // 类型标题
children: [ children: [
{
label: '操作提示',
prop: 'operationTip', // 列属性
visible: true, // 是否显示
type: 'string', // 列类型
fill: true, // 是否为填报列
fixed: 'left', // 是否固定在左侧
width: 100,
onlyFill: true, // 只在填报列显示
render: (_, row, col) => {
return (
<div class="operation_tip_cell">
<p>计划</p>
<p>实际</p>
</div>
)
}
},
{ {
"label": "销售大区", "label": "销售大区",
"prop": "regionName", "prop": "regionName",
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<script setup <script setup
lang="jsx"> lang="jsx">
import CommonPlan from '@/views/promotion/components/CommonPlan' import CommonPlan from '@/views/promotion/components/CommonPlan'
import { getSnackPlanList, submitDisplayPlan } from '@/api' import { getSnackPlanList, submitSnackPlan } from '@/api'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
import { onMounted } from 'vue'; import { onMounted } from 'vue';
...@@ -24,6 +24,24 @@ ...@@ -24,6 +24,24 @@
{ {
label: "基础信息", label: "基础信息",
children: [ children: [
{
label: '操作提示',
prop: 'operationTip', // 列属性
visible: true, // 是否显示
type: 'string', // 列类型
fill: true, // 是否为填报列
fixed: 'left', // 是否固定在左侧
width: 100,
onlyFill: true, // 只在填报列显示
render: (_, row, col) => {
return (
<div class="operation_tip_cell">
<p>计划</p>
<p>实际</p>
</div>
)
}
},
{ {
"label": "销售大区", "label": "销售大区",
"prop": "regionName", "prop": "regionName",
...@@ -222,6 +240,7 @@ ...@@ -222,6 +240,7 @@
"prop": "actualDisplay", "prop": "actualDisplay",
"visible": true, "visible": true,
"type": "select", "type": "select",
referenceKey: "plannedDisplay",
"fill": true, "fill": true,
"width": 130, "width": 130,
"options": [ "options": [
...@@ -288,6 +307,7 @@ ...@@ -288,6 +307,7 @@
"prop": "actualEndCapQty", "prop": "actualEndCapQty",
"visible": true, "visible": true,
"type": "select", "type": "select",
referenceKey: "plannedEndCapQty",
"fill": true, "fill": true,
"options": [ "options": [
{ {
...@@ -447,7 +467,7 @@ ...@@ -447,7 +467,7 @@
} }
} }
await submitDisplayPlan({ await submitSnackPlan({
id: row.sasdId, id: row.sasdId,
[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] }), {}), // 额外携带影响的列字段值
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论