|
|
@@ -13,8 +13,8 @@
|
|
|
@pageChange="pageChange"
|
|
|
@onEditSuccess="queryMainData($route.query.id)"
|
|
|
@onTabClick="onTabClick"
|
|
|
- :noPageChange="false"
|
|
|
- :hideTags="false"
|
|
|
+ :pageChange="true"
|
|
|
+ :hideTags="true"
|
|
|
>
|
|
|
<div slot="customOperation">
|
|
|
<!-- 此区域提供了自定义操作按钮 -->
|
|
|
@@ -29,7 +29,9 @@
|
|
|
|
|
|
<div slot="slot0">
|
|
|
<div>
|
|
|
- <project_add :id="this.$route.query.id" :year="this.$route.query.year" @onSuccess="onSuccess" :disabled="disable"></project_add>
|
|
|
+ <project_add :id="this.$route.query.id" :year="this.$route.query.year" @onSuccess="onSuccess" :disabled="disable" class="inline-16"></project_add>
|
|
|
+ <el-input style="width:200px;" placeholder="请输入搜索内容" suffix-icon="el-icon-search" @input="searchChange" v-model="params.content.where.condition" @keyup.native.enter="getprojectTargetList(params.content.pageNumber = 1)" @clear="getprojectTargetList(params.content.pageNumber = 1)" size="small" class="input-with-select inline-16" clearable>
|
|
|
+ </el-input>
|
|
|
</div>
|
|
|
<tableLayout ref="list" :layout="tablecols" :data="list" :custom="true" height="300">
|
|
|
<!-- <template v-slot:customcol="scope">
|
|
|
@@ -103,7 +105,7 @@ export default {
|
|
|
return {
|
|
|
pickerOptions:{
|
|
|
disabledDate(time){
|
|
|
- return ((time.getMonth() +1) < (new Date().getMonth() +1) && (time.getFullYear() > (new Date().getFullYear())))
|
|
|
+ return time.getTime() < Date.now()
|
|
|
}
|
|
|
},
|
|
|
disable:false,
|
|
|
@@ -206,6 +208,9 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
+ searchChange(){
|
|
|
+ this.getprojectTargetList()
|
|
|
+ },
|
|
|
onSuccess(){
|
|
|
this.queryMainData(this.$route.query.id)
|
|
|
},
|
|
|
@@ -236,22 +241,36 @@ export default {
|
|
|
console.log(this.date)
|
|
|
const dateNow = new Date(this.date)
|
|
|
const month = dateNow.getMonth() +1
|
|
|
- console.log(month)
|
|
|
- this.saveShow = false
|
|
|
- this.editShow = true
|
|
|
- this.actindex = 0
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": 20220906112602,
|
|
|
- "content": {
|
|
|
- "sa_salestargetid": row.sa_salestargetid,
|
|
|
- "target_l": row.target_l,
|
|
|
- "target_h": row.target_h,
|
|
|
- "month":month
|
|
|
- },
|
|
|
- })
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
- this.getprojectTargetList()
|
|
|
- })
|
|
|
+ const datenow = new Date()
|
|
|
+ if (dateNow.getFullYear() !== datenow.getFullYear()){
|
|
|
+ this.$alert('只能选取今年的月份,请重新进行选择', '标题名称', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: `重新选择月份`
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ console.log(month)
|
|
|
+ this.saveShow = false
|
|
|
+ this.editShow = true
|
|
|
+ this.actindex = 0
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20220906112602,
|
|
|
+ "content": {
|
|
|
+ "sa_salestargetid": row.sa_salestargetid,
|
|
|
+ "target_l": row.target_l,
|
|
|
+ "target_h": row.target_h,
|
|
|
+ "month":month
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.getprojectTargetList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
created() {
|