|
|
@@ -424,6 +424,13 @@
|
|
|
@click="handleDelete(scope.row)"
|
|
|
>删除
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-document-copy"
|
|
|
+ @click="productCopy(scope.row)"
|
|
|
+ >一键复制
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -1175,7 +1182,8 @@ import {
|
|
|
batchModify,
|
|
|
sync580,
|
|
|
updateIsShow,
|
|
|
- getProductrAuthInfo
|
|
|
+ getProductrAuthInfo,
|
|
|
+ copyProduct
|
|
|
} from "@/api/store/storeProduct";
|
|
|
import {getAllStoreProductCategory} from "@/api/store/storeProductCategory";
|
|
|
import {getAllStoreProductRule} from "@/api/store/storeProductRule";
|
|
|
@@ -2361,6 +2369,25 @@ export default {
|
|
|
done();
|
|
|
})
|
|
|
.catch(_ => {});
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 复制商品
|
|
|
+ * **/
|
|
|
+ productCopy(row){
|
|
|
+ this.$confirm('确认是否复制当前《'+row.productName+'》商品!', '复制商品', {
|
|
|
+ confirmButtonText: '确 认',
|
|
|
+ cancelButtonText: '取 消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ copyProduct(row).then(response => {
|
|
|
+ if(response.code === 200){
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|