Browse Source

Merge pull request '客户需求管理工作台' (#95) from wangxy into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_AdvancedPlanner_Front/pulls/95
pull/96/head
wangxy 3 years ago
parent
commit
05e500579d
2 changed files with 44 additions and 16 deletions
  1. +14
    -2
      src/components/queryComponent/index.vue
  2. +30
    -14
      src/views/plan/workbench/homePage/beta/predict/index.vue

+ 14
- 2
src/components/queryComponent/index.vue View File

@ -8,8 +8,9 @@
<template #dropdown>
<div class="predict-search-container">
<el-select v-if="isShowAddButton"
v-model="valid"
style="width: 150px;margin-right:10px;" placeholder="请选择是否有效" >
v-model="valid"
style="width: 150px;margin-right:10px;"
placeholder="请选择是否有效" >
<el-option
v-for="item in validArrray"
:key="item['value']"
@ -17,6 +18,13 @@
:value="item['value']">
</el-option>
</el-select>
<el-input
v-if="isShowAddButton"
v-model="VersionID"
placeholder="检索条件:版本号"
clearable
style="width: 200px;margin-right:10px;"
/>
<el-input
v-if="isShowAddButton"
v-model="SearchId"
@ -60,6 +68,7 @@ export default {
//
notalReadyPic: require('../../assets/img/notalready.png'),
//
VersionID: undefined,
SearchId: undefined,
valid: undefined,
isShowDialog: '',
@ -110,6 +119,7 @@ export default {
if (this.isShowAddButton) {
let editData = {
artId: this.SearchId,
versionId: this.VersionID,
valid: this.valid
}
this.$emit('searchEmit', editData)
@ -119,10 +129,12 @@ export default {
},
resetQuery() {
this.SearchId = undefined
this.VersionID = undefined
this.valid = undefined
if (this.isShowAddButton) {
let editData = {
artId: this.SearchId,
versionId: this.VersionID,
valid: this.valid
}
this.$emit('resetEmit', editData)


+ 30
- 14
src/views/plan/workbench/homePage/beta/predict/index.vue View File

@ -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


Loading…
Cancel
Save