|
|
@@ -82,6 +82,17 @@
|
|
|
</template>
|
|
|
|
|
|
<template #slot-modify="{ scope }">
|
|
|
+
|
|
|
+
|
|
|
+ <el-popover style="margin-right:10px;" placement="top" width="160" :ref="'popover-' + scope.row.id">
|
|
|
+ <p>确认复制生成花材?</p>
|
|
|
+ <div style="text-align: right; margin: 0">
|
|
|
+ <el-button size="mini" type="text" @click.stop="cancelCopyProduct(scope.row.id)">取消</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click.stop="copyProduct(scope.row)">确定</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button slot="reference" size="mini" type="text" plain @click.stop="">复制</el-button>
|
|
|
+ </el-popover>
|
|
|
+
|
|
|
<el-button type="text" @click.native.stop="replaceBtnFn(scope.row.id)" >修改</el-button>
|
|
|
<el-button type="text" v-if="scope.row.status==2" @click.native.stop="setStatusFun(scope.row.id,1)" >上架</el-button>
|
|
|
<el-button type="text" v-if="scope.row.status==1" @click.native.stop="setStatusFun(scope.row.id,2)" >下架</el-button>
|
|
|
@@ -292,6 +303,7 @@ export default {
|
|
|
return {
|
|
|
app: null,
|
|
|
sortLink: '',
|
|
|
+ showCopyProduct:false,
|
|
|
operateData: {},
|
|
|
statusOption: [{
|
|
|
value: '0',
|
|
|
@@ -404,6 +416,16 @@ export default {
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ copyProduct(){
|
|
|
+ this.$service.product.copy({id:id}).then(res => {
|
|
|
+ this.$message.success('操作成功!')
|
|
|
+ this.app.refresh()
|
|
|
+ }).catch(err => {})
|
|
|
+ },
|
|
|
+ //取消复制
|
|
|
+ cancelCopyProduct(id) {
|
|
|
+ this.$refs[`popover-` + id].doClose();
|
|
|
+ },
|
|
|
changedStatus(status){
|
|
|
this.status = status
|
|
|
this.app.refresh({ classId: this.classId,status:this.status,showPage: 1});
|