|
|
@@ -13,7 +13,8 @@
|
|
|
@pageChange="pageChange"
|
|
|
@onEditSuccess="queryMainData($route.query.id)"
|
|
|
@onTabClick="onTabClick"
|
|
|
- :noPageChange="true"
|
|
|
+ :noPageChange="false"
|
|
|
+ :hideTags="false"
|
|
|
>
|
|
|
<div slot="customOperation">
|
|
|
<!-- 此区域提供了自定义操作按钮 -->
|
|
|
@@ -28,7 +29,7 @@
|
|
|
|
|
|
<div slot="slot0">
|
|
|
<div>
|
|
|
- <project_add :id="this.$route.query.id" :year="this.$route.query.year" @onSuccess="onSuccess"></project_add>
|
|
|
+ <project_add :id="this.$route.query.id" :year="this.$route.query.year" @onSuccess="onSuccess" :disabled="disable"></project_add>
|
|
|
</div>
|
|
|
<tableLayout ref="list" :layout="tablecols" :data="list" :custom="true" height="300">
|
|
|
<!-- <template v-slot:customcol="scope">
|
|
|
@@ -51,9 +52,9 @@
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:opreation="scope">
|
|
|
- <el-button type="text" size="mini" class="inline-16" @click="edit(scope.data)" v-if="editShow ">编辑</el-button>
|
|
|
+ <el-button type="text" size="mini" class="inline-16" @click="edit(scope.data)" v-if="editShow " :disabled="disable">编辑</el-button>
|
|
|
<el-button type="text" style="color: #e09a1a" size="mini" class="inline-16" v-if="saveShow && actindex === (scope.data.index + 1)" @click="save(scope.data)">保存</el-button>
|
|
|
- <project_del class="inline-16" v-if="editShow " :data="scope.data" @onDel="onProjectSuccess"></project_del>
|
|
|
+ <project_del class="inline-16" v-if="editShow " :data="scope.data" @onDel="onProjectSuccess" :disabled="disable"></project_del>
|
|
|
</template>
|
|
|
</tableLayout>
|
|
|
<div>
|
|
|
@@ -102,9 +103,10 @@ export default {
|
|
|
return {
|
|
|
pickerOptions:{
|
|
|
disabledDate(time){
|
|
|
- return (time.getMonth() +1) < (new Date().getMonth() +1)
|
|
|
+ return ((time.getMonth() +1) < (new Date().getMonth() +1) && (time.getFullYear() > (new Date().getFullYear())))
|
|
|
}
|
|
|
},
|
|
|
+ disable:false,
|
|
|
actindex:0,
|
|
|
mainData:{},
|
|
|
mainAreaData:[],
|
|
|
@@ -150,6 +152,11 @@ export default {
|
|
|
})
|
|
|
this.mainData = res.data
|
|
|
console.log(this.mainData)
|
|
|
+ if (this.$route.query.id === this.$route.query.ownerHrid){
|
|
|
+ this.disable = false
|
|
|
+ }else{
|
|
|
+ this.disable = true
|
|
|
+ }
|
|
|
this.changeDataStructure()
|
|
|
this.getprojectTargetList()
|
|
|
},
|
|
|
@@ -226,6 +233,10 @@ export default {
|
|
|
async save(row){
|
|
|
console.log("保存数据")
|
|
|
console.log(row)
|
|
|
+ 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
|
|
|
@@ -234,7 +245,8 @@ export default {
|
|
|
"content": {
|
|
|
"sa_salestargetid": row.sa_salestargetid,
|
|
|
"target_l": row.target_l,
|
|
|
- "target_h": row.target_h
|
|
|
+ "target_h": row.target_h,
|
|
|
+ "month":month
|
|
|
},
|
|
|
})
|
|
|
this.tool.showMessage(res,()=>{
|
|
|
@@ -245,6 +257,14 @@ export default {
|
|
|
created() {
|
|
|
this.queryMainData(this.$route.query.id)
|
|
|
this.tablecols = this.tool.tabelCol(this.$route.name).projectTargetTable.tablecols
|
|
|
+ console.log(this.$route.query.id)
|
|
|
+ console.log(this.$route.query.ownerHrid)
|
|
|
+ if (this.$route.query.id === this.$route.query.ownerHrid){
|
|
|
+ this.disable = false
|
|
|
+ }else {
|
|
|
+ this.disable = true
|
|
|
+ }
|
|
|
+ console.log(this.disable)
|
|
|
}
|
|
|
}
|
|
|
</script>
|