|
@@ -54,8 +54,10 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template #slot-modify="{ scope }">
|
|
|
|
|
|
|
+ <template #slot-handle="{ scope }">
|
|
|
<el-button type="text" @click.native.stop="replaceBtnFn(scope.row.id)" >修改</el-button >
|
|
<el-button type="text" @click.native.stop="replaceBtnFn(scope.row.id)" >修改</el-button >
|
|
|
|
|
+ <el-button type="text" @click.native.stop="copyCreateCp(scope.row,0)" >建产品</el-button >
|
|
|
|
|
+ <el-button type="text" @click.native.stop="copyCreateCp(scope.row,1)" >建产品等级</el-button >
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-item-class="{scope}">
|
|
<template #slot-item-class="{scope}">
|
|
@@ -480,6 +482,20 @@ export default {
|
|
|
uploadSuccess() {
|
|
uploadSuccess() {
|
|
|
this.$refs['replaceForm'].validateField('cover');
|
|
this.$refs['replaceForm'].validateField('cover');
|
|
|
},
|
|
},
|
|
|
|
|
+ copyCreateCp(info,needLevelItem){
|
|
|
|
|
+ if(needLevelItem == 1){
|
|
|
|
|
+ if(this.selectCpId == 0){
|
|
|
|
|
+ this.$message.error('请选产品')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$confirm('确认复制新建?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
|
|
|
|
+ this.$service.ptCp.copyCreateCp({id:info.id,needLevelItem:needLevelItem,cpId:this.selectCpId}).then(res=>{
|
|
|
|
|
+ this.$message.success('操作成功');
|
|
|
|
|
+ this.app.refresh({ type: 0 })
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
replaceBtnFn(id) {
|
|
replaceBtnFn(id) {
|
|
|
this.getAllClass()
|
|
this.getAllClass()
|
|
|
this.getAllUnit()
|
|
this.getAllUnit()
|
|
@@ -665,12 +681,12 @@ export default {
|
|
|
op: {
|
|
op: {
|
|
|
visible: true,
|
|
visible: true,
|
|
|
props: {
|
|
props: {
|
|
|
- width: 200,
|
|
|
|
|
|
|
+ width: 290,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
|
label: '操作',
|
|
label: '操作',
|
|
|
},
|
|
},
|
|
|
- layout: ['slot-modify'],
|
|
|
|
|
|
|
+ layout: ['slot-handle'],
|
|
|
},
|
|
},
|
|
|
})
|
|
})
|
|
|
.set('dict', {
|
|
.set('dict', {
|