|
|
@@ -91,9 +91,10 @@
|
|
|
</template>
|
|
|
|
|
|
<template #slot-more-do-btn>
|
|
|
- <el-dropdown size="medium" split-button type="primary" @click="installCp" @command="doMore">
|
|
|
- 设置产品
|
|
|
+ <el-dropdown size="medium" split-button type="primary" @click="setCpSetAuth" @command="doMore">
|
|
|
+ 关联产品并加V
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="relateCp">关联产品</el-dropdown-item>
|
|
|
<el-dropdown-item command="toAuth">加V认证</el-dropdown-item>
|
|
|
<el-dropdown-item command="cancelAuth">取消加V</el-dropdown-item>
|
|
|
<el-dropdown-item command="delCpRelate">删除产品关联</el-dropdown-item>
|
|
|
@@ -326,6 +327,26 @@ export default {
|
|
|
this.cpInfoList = []
|
|
|
}
|
|
|
},
|
|
|
+ setCpSetAuth(){
|
|
|
+ let that = this
|
|
|
+ if (this.$util.isEmpty(this.selectedIds)) {
|
|
|
+ this.$message.error('请选花材')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if(this.selectCpId == 0){
|
|
|
+ this.$message.error('请选产品')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.$confirm('确认设置?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
|
|
+ this.$service.ptCpItem.setCpRelate({ids:JSON.stringify(this.selectedIds),cpId:this.selectCpId,auth:1}).then((res) => {
|
|
|
+ that.$message.success('操作成功')
|
|
|
+ that.selectCpId = 0
|
|
|
+ that.selectCpName =''
|
|
|
+ that.cpInfoList = []
|
|
|
+ that.app.refresh({ classId: this.classId,cpId:this.cpId,cpClassStyle:this.cpClassStyle })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
installCp(){
|
|
|
let that = this
|
|
|
if (this.$util.isEmpty(this.selectedIds)) {
|
|
|
@@ -337,7 +358,7 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
this.$confirm('确认设置?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
|
|
- this.$service.ptCpItem.setCpRelate({ids:JSON.stringify(this.selectedIds),cpId:this.selectCpId}).then((res) => {
|
|
|
+ this.$service.ptCpItem.setCpRelate({ids:JSON.stringify(this.selectedIds),cpId:this.selectCpId,auth:0}).then((res) => {
|
|
|
that.$message.success('操作成功')
|
|
|
that.selectCpId = 0
|
|
|
that.selectCpName =''
|
|
|
@@ -368,6 +389,9 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+ if(cmd == 'relateCp'){
|
|
|
+ that.installCp()
|
|
|
+ }
|
|
|
//申请认证
|
|
|
if(cmd == 'toAuth'){
|
|
|
this.$confirm('确认申请?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|