|
@@ -4,9 +4,11 @@
|
|
|
<p class="normal-title normal-margin">预测提报任务</p>
|
|
|
<div class="header-handle">
|
|
|
<Search @searchActive="searchActive" @clearData="clearData" />
|
|
|
- <DownSelect @selectChange="categoryChange" @clearCategory="clearCategory" title="提报要求:" :list="[{label:'按产品类别预测',value:'0'},{label:'按项目及产品类别预测',value:'1'}]" style="margin-right:16px" />
|
|
|
+ <DownSelect @selectChange="categoryChange" @clearCategory="clearCategory" title="提报要求:"
|
|
|
+ :list="[{label:'按产品类别预测',value:'0'},{label:'按项目及产品类别预测',value:'1'}]" style="margin-right:16px" />
|
|
|
</div>
|
|
|
- <tableLayout v-if="salesPanelList" :layout="tablecols" :data="salesPanelList" :custom="true" height="30vh" @rowClick="rowClick">
|
|
|
+ <tableLayout v-if="salesPanelList" :layout="tablecols" :data="salesPanelList" :custom="true" height="30vh"
|
|
|
+ @rowClick="rowClick">
|
|
|
<template v-slot:customcol="scope">
|
|
|
<div v-if="scope.column.columnname == 'periodtype'">
|
|
|
<span>
|
|
@@ -23,8 +25,7 @@
|
|
|
<span v-else>{{scope.column.data[scope.column.columnname]}}</span>
|
|
|
</template>
|
|
|
<template v-slot:opreation="scope">
|
|
|
- <el-button type="text" size="small"
|
|
|
- @click="addBuill(scope)"
|
|
|
+ <el-button type="text" size="small" @click="addBuill(scope)"
|
|
|
v-if="tool.checkAuth($route.name,'create_sales')">创建提报</el-button>
|
|
|
</template>
|
|
|
</tableLayout>
|
|
@@ -51,11 +52,9 @@
|
|
|
<span v-else>{{scope.column.data[scope.column.columnname]}}</span>
|
|
|
</template>
|
|
|
<template v-slot:opreation="scope">
|
|
|
- <el-button type="text" size="small"
|
|
|
- @click="goDetail(scope.data)"
|
|
|
+ <el-button type="text" size="small" @click="goDetail(scope.data)"
|
|
|
v-if="tool.checkAuth($route.name,'read') && scope.data.isoverdue == 1">详情</el-button>
|
|
|
- <el-button type="text" size="small"
|
|
|
- @click="goEdit(scope.data)"
|
|
|
+ <el-button type="text" size="small" @click="goEdit(scope.data)"
|
|
|
v-else-if="tool.checkAuth($route.name,'update') && scope.data.isoverdue == 0">编辑</el-button>
|
|
|
</template>
|
|
|
</tableLayout>
|
|
@@ -79,14 +78,14 @@ export default {
|
|
|
"id": 20220906154403,
|
|
|
"version": 1,
|
|
|
"content": {
|
|
|
- "nocache":true,
|
|
|
+ "nocache": true,
|
|
|
"pageNumber": 1,
|
|
|
"pageSize": 12,
|
|
|
"where": {
|
|
|
"condition": "",
|
|
|
- "baseonproject":"",
|
|
|
- "begindate":'',
|
|
|
- "enddate":''
|
|
|
+ "baseonproject": "",
|
|
|
+ "begindate": '',
|
|
|
+ "enddate": ''
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -95,17 +94,17 @@ export default {
|
|
|
/* 当前选中的模板id */
|
|
|
selectPanelId: '',
|
|
|
/* 提报记录数据 */
|
|
|
- historyList:[],
|
|
|
+ historyList: [],
|
|
|
tablecols: '',
|
|
|
tablecols2: '',
|
|
|
- total:0,
|
|
|
+ total: 0,
|
|
|
/* 开始时间 */
|
|
|
- begindate:'',
|
|
|
+ begindate: '',
|
|
|
/* 结束时间 */
|
|
|
- enddate:''
|
|
|
+ enddate: ''
|
|
|
};
|
|
|
},
|
|
|
- components: { Header, Search, DownSelect, TimeSelect , Pagination},
|
|
|
+ components: { Header, Search, DownSelect, TimeSelect, Pagination },
|
|
|
computed: {
|
|
|
},
|
|
|
watch: {
|
|
@@ -139,77 +138,77 @@ export default {
|
|
|
"id": 20220908134403,
|
|
|
"version": 1,
|
|
|
"content": {
|
|
|
- "nocache":true,
|
|
|
+ "nocache": true,
|
|
|
"sa_salesforecastmodelid": this.selectPanelId,
|
|
|
"where": {
|
|
|
- "begindate":this.begindate,
|
|
|
- "enddate":this.enddate
|
|
|
+ "begindate": this.begindate,
|
|
|
+ "enddate": this.enddate
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
this.historyList = res.data
|
|
|
console.log(this.historyList);
|
|
|
},
|
|
|
- async rowClick(data) {
|
|
|
+ async rowClick (data) {
|
|
|
this.selectPanelId = data.sa_salesforecastmodelid
|
|
|
let res = await this.$api.requested({
|
|
|
"id": 20220908134403,
|
|
|
"version": 1,
|
|
|
"content": {
|
|
|
- "nocache":true,
|
|
|
+ "nocache": true,
|
|
|
"sa_salesforecastmodelid": this.selectPanelId
|
|
|
}
|
|
|
})
|
|
|
this.historyList = res.data
|
|
|
console.log(this.historyList);
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
/* 创建提报 */
|
|
|
- async addBuill(data) {
|
|
|
+ async addBuill (data) {
|
|
|
let res = await this.$api.requested({
|
|
|
- "id": 20220913154403,
|
|
|
- "version":1,
|
|
|
- "content": {
|
|
|
- "sa_salesforecastmodelid":data.data.sa_salesforecastmodelid,
|
|
|
- "sa_salesforecastbillid":0,
|
|
|
- "sa_projectids": data.data.baseonproject == 1 ? [] : [0]
|
|
|
- }
|
|
|
+ "id": 20220913154403,
|
|
|
+ "version": 1,
|
|
|
+ "content": {
|
|
|
+ "sa_salesforecastmodelid": data.data.sa_salesforecastmodelid,
|
|
|
+ "sa_salesforecastbillid": 0,
|
|
|
+ "sa_projectids": data.data.baseonproject == 1 ? [] : [0]
|
|
|
+ }
|
|
|
})
|
|
|
- if(res.code == 0) {
|
|
|
+ if (res.code == 0) {
|
|
|
this.$notify({
|
|
|
- title:'提示',
|
|
|
- message:res.msg,
|
|
|
- type:'warning'
|
|
|
+ title: '提示',
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning'
|
|
|
})
|
|
|
} else {
|
|
|
console.log(res);
|
|
|
- this.$router.push({path:data.data.baseonproject == 1 ? '/edit_sales' : '/edit_product',query:{id:res.data[0].sa_salesforecastbillid,id2:data.data.sa_salesforecastmodelid,header:'panel'}})
|
|
|
+ this.$router.push({ path: data.data.baseonproject == 1 ? '/edit_sales' : '/edit_product', query: { id: res.data[0].sa_salesforecastbillid, id2: data.data.sa_salesforecastmodelid, header: 'panel' } })
|
|
|
}
|
|
|
},
|
|
|
/* 前往详情页 */
|
|
|
- goDetail(data) {
|
|
|
+ goDetail (data) {
|
|
|
if (data.baseonproject == 0) {
|
|
|
- this.$router.push({path:'/product_detail',query:{id:data.sa_salesforecastbillid}})
|
|
|
+ this.$router.push({ path: '/product_detail', query: { id: data.sa_salesforecastbillid } })
|
|
|
} else {
|
|
|
- this.$router.push({path:'/project_detail',query:{id:data.sa_salesforecastbillid,type:'product'}})
|
|
|
+ this.$router.push({ path: '/project_detail', query: { id: data.sa_salesforecastbillid, type: 'product' } })
|
|
|
}
|
|
|
},
|
|
|
/* 前往编辑页 */
|
|
|
- goEdit(data) {
|
|
|
+ goEdit (data) {
|
|
|
/* 跳转到产品编辑页 */
|
|
|
- if(data.baseonproject == 0) {
|
|
|
- this.$router.push({path:'/edit_product',query:{id:data.sa_salesforecastbillid,id2:data.sa_salesforecastmodelid}})
|
|
|
+ if (data.baseonproject == 0) {
|
|
|
+ this.$router.push({ path: '/edit_product', query: { id: data.sa_salesforecastbillid, id2: data.sa_salesforecastmodelid } })
|
|
|
/* 跳转到项目编辑页 */
|
|
|
} else {
|
|
|
- this.$router.push({path:'/edit_sales',query:{id:data.sa_salesforecastbillid,id2:data.sa_salesforecastmodelid,type:'project'}})
|
|
|
+ this.$router.push({ path: '/edit_sales', query: { id: data.sa_salesforecastbillid, id2: data.sa_salesforecastmodelid, type: 'project' } })
|
|
|
}
|
|
|
},
|
|
|
- pageChange(n) {
|
|
|
+ pageChange (n) {
|
|
|
this.params.content.pageNumber = n
|
|
|
this.getSalesPanel()
|
|
|
},
|
|
|
/* 搜索 */
|
|
|
- searchActive(data) {
|
|
|
+ searchActive (data) {
|
|
|
this.params.content.where.condition = data
|
|
|
this.params.content.pageNumber = 1
|
|
|
this.getSalesPanel()
|
|
@@ -221,13 +220,13 @@ export default {
|
|
|
this.getSalesPanel()
|
|
|
},
|
|
|
/* 清除分类 */
|
|
|
- clearCategory() {
|
|
|
+ clearCategory () {
|
|
|
this.params.content.where.baseonproject = ''
|
|
|
this.params.content.pageNumber = 1
|
|
|
this.getSalesPanel()
|
|
|
},
|
|
|
/* 分类改变 */
|
|
|
- categoryChange(data) {
|
|
|
+ categoryChange (data) {
|
|
|
console.log(222);
|
|
|
this.params.content.where.baseonproject = data
|
|
|
this.params.content.pageNumber = 1
|
|
@@ -240,7 +239,7 @@ export default {
|
|
|
this.getSalesDetail()
|
|
|
},
|
|
|
/* 清除时间赛选 */
|
|
|
- clearTime() {
|
|
|
+ clearTime () {
|
|
|
this.begindate = ''
|
|
|
this.enddate = ''
|
|
|
this.getSalesDetail()
|