|
@@ -538,6 +538,7 @@ import {
|
|
|
api_queryGoodsCategoryList,
|
|
|
api_queryGoodsBrandList
|
|
|
} from "@/api/businessManager";
|
|
|
+import { api_goodsCopyGoods } from "./api";
|
|
|
import { goodsType } from "@/utils/searchArray";
|
|
|
import qs from "qs";
|
|
|
import cleanDeep from "clean-deep";
|
|
@@ -810,14 +811,24 @@ export default {
|
|
|
},
|
|
|
async onShopOperation(type, row) {
|
|
|
if (type === "copy") {
|
|
|
+ this.$confirm(`是否复制该商品?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(async () => {
|
|
|
+ try {
|
|
|
+ await api_goodsCopyGoods({
|
|
|
+ goodsId: row.id
|
|
|
+ });
|
|
|
+
|
|
|
+ this.$message.success("复制成功");
|
|
|
+ this.getList();
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ });
|
|
|
// api-web/goods/copyGoods?goodsId=106
|
|
|
- try {
|
|
|
- await api_goodsCopyGoods({
|
|
|
- goodsId: row.id
|
|
|
- });
|
|
|
|
|
|
- this.getList();
|
|
|
- } catch {}
|
|
|
return;
|
|
|
}
|
|
|
//修改
|