|
|
@ -27,13 +27,14 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="操作" width="350" fixed="right"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-button class="edit-button-style" @click="handleRing(scope.row)" icon="el-icon-pie-chart" size="small">环比</el-button> |
|
|
|
<el-button class="edit-button-style" @click="handleWith(scope.row)" icon="el-icon-s-data" size="small">同比</el-button> |
|
|
|
<el-button class="edit-button-style" :disabled="!customerId" @click="handleRing(scope.row)" icon="el-icon-pie-chart" size="small">环比</el-button> |
|
|
|
<el-button class="edit-button-style" :disabled="!customerId" @click="handleWith(scope.row)" icon="el-icon-s-data" size="small">同比</el-button> |
|
|
|
<el-button class="edit-button-style" @click="handleEdit(scope.row)" icon="el-icon-edit" size="small">修改</el-button> |
|
|
|
<el-button class="edit-button-style" @click="handleCopy(scope.row)" icon="el-icon-document-copy" size="small">复制</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<Pagination v-show="pagination.total>0" v-model:pagination="pagination" @change="getPredictList" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -68,6 +69,12 @@ export default { |
|
|
|
queryParams: { |
|
|
|
VersionId: undefined |
|
|
|
}, |
|
|
|
pagination: { |
|
|
|
// 分页参数 |
|
|
|
pageNumber: 1, |
|
|
|
pageSize: 10, |
|
|
|
total: 0, |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -87,19 +94,28 @@ export default { |
|
|
|
this.getWithRingStatus(newData) |
|
|
|
}, |
|
|
|
// 获取预测版本列表 |
|
|
|
getPredictList(id, data, valid) { |
|
|
|
getPredictList(id, artId, valid, versionId) { |
|
|
|
this.loading = true |
|
|
|
get(`/admin/ap/custdemandverhead/selectdata`, { |
|
|
|
customerId: id, ...{artId: data}, valid: valid |
|
|
|
}).then(({ code, data }) => { |
|
|
|
...this.pagination, |
|
|
|
customerId: id, |
|
|
|
...{artId: artId}, |
|
|
|
valid: valid, |
|
|
|
versionId: versionId |
|
|
|
}).then(({ code, data: { count = 0, records = [] } }) => { |
|
|
|
if (code === 200) { |
|
|
|
this.loading = false |
|
|
|
this.tableData = data |
|
|
|
this.tableData = records || [] |
|
|
|
this.pagination.total = count |
|
|
|
} else { |
|
|
|
this.loading = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
searchEmitHandle(data) { |
|
|
|
this.getPredictList(this.customerId, data.artId, data.valid) |
|
|
|
this.getPredictList(this.customerId, data.artId, data.valid, data.versionId) |
|
|
|
}, |
|
|
|
resetEmitHandle() { |
|
|
|
this.getPredictList(this.customerId) |
|
|
@ -134,13 +150,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(()=>{ |
|
|
|
let tableHeight = this.calculationTableHeight( |
|
|
|
this.$refs.topTableRef, |
|
|
|
1 |
|
|
|
); |
|
|
|
this.$emit('calculateTableHeight', tableHeight) |
|
|
|
}) |
|
|
|
this.$nextTick(()=>{ |
|
|
|
let tableHeight = this.calculationTableHeight( |
|
|
|
this.$refs.topTableRef, |
|
|
|
40 |
|
|
|
); |
|
|
|
this.$emit('calculateTableHeight', tableHeight) |
|
|
|
}) |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
// 监听客户ID的变化 |
|
|
|