diff --git a/src/api/goodsTool.js b/src/api/goodsTool.js new file mode 100644 index 0000000..f75309a --- /dev/null +++ b/src/api/goodsTool.js @@ -0,0 +1,113 @@ +import request from "@/utils/request"; +import { stringify } from "qs"; + +export async function getProductMapperList(data) { + data = stringify(data); + return request({ + url: `/admin/shop/shop-sync-productMapper/list?${data}`, + method: "get", + }); +} + +export async function getShopList() { + return request({ + url: "/admin/shop/shop-store-base/list?pageNum=1&pageSize=99999&store_type=1", + method: "get", + }); +} + +export async function updateGoods(data) { + return request({ + url: "/admin/shop/shop-sync-productMapper/udpateProductMapping", + method: "put", + data, + }); +} + +export async function deleteGoods(data) { + return request({ + url: "/admin/shop/shop-sync-productMapper/delProductMapping", + method: "delete", + data, + }); +} + +export async function downloadTempGoods(data) { + data = stringify(data); + return request({ + url: `/admin/shop/shop-sync-productMapper/template?${data}`, + method: "get", + }); +} + +export async function batchCreateGoods(data) { + return request({ + url: "/admin/shop/shop-sync-productMapper/saveProductMappingBatch", + method: "post", + headers: { + 'Content-Type': 'application/json', + }, + data, + }); +} + +export async function batchExportGoods(data) { + return request({ + url: "/admin/shop/shop-sync-productMapper/exportSelected", + method: "post", + data, + }); +} + +export async function getProductMapping(data) { + return request({ + url: "/admin/shop/shop-sync-productMapper/getProductMapping", + method: "post", + data, + }); +} + +export async function getSyncBaseMapingProducts() { + return request({ + url: "/admin/shop/shop-sync-productMapper/getSyncBaseMapingProducts", + method: "get", + }); +} + +export async function HandleDownloadErrorReport(data) { + data = stringify(data); + return request({ + url: `/admin/shop/shop-sync-productMapper/download?${data}`, + method: "get", + }); +} + +export async function syncProductMaping() { + return request({ + url: `/admin/shop/shop-sync-productMapper/syncProductMaping`, + method: "put", + }); +} + +export async function importGoodsData(data) { + return request({ + url: `/admin/shop/shop-sync-productMapper/importData`, + method: "post", + data, + }); +} + +export default { + getProductMapperList, + getShopList, + updateGoods, + deleteGoods, + downloadTempGoods, + batchCreateGoods, + batchExportGoods, + getProductMapping, + getSyncBaseMapingProducts, + HandleDownloadErrorReport, + syncProductMaping, + importGoodsData, +}; diff --git a/src/utils/routes.js b/src/utils/routes.js index a1f7320..fed1ce6 100644 --- a/src/utils/routes.js +++ b/src/utils/routes.js @@ -13,6 +13,24 @@ import icon from '../views/403.vue' */ export function convertRouter(asyncRoutes) { return asyncRoutes.map((route) => { + if (route.meta.title == '商品' && route.name == 'Vab320') { + const obj = { + path: '/goodsTool', + component: '@/views/product/goodsTool/index', + name: 'Vab88000', + redirect: null, + meta: { + title: '商品映射配置', + icon: '', + noClosable: 0, + hidden: null, + }, + menuHidden: false, + } + + route.children.splice(0, 0, obj) + } + if (route.meta.title == '店铺' && route.name == 'Vab330') { const obj = { path: '/shopAudit', diff --git a/src/views/product/goodsTool/GoodsItem.vue b/src/views/product/goodsTool/GoodsItem.vue new file mode 100644 index 0000000..b7feb22 --- /dev/null +++ b/src/views/product/goodsTool/GoodsItem.vue @@ -0,0 +1,411 @@ + + + + + diff --git a/src/views/product/goodsTool/index.vue b/src/views/product/goodsTool/index.vue new file mode 100644 index 0000000..34aac0d --- /dev/null +++ b/src/views/product/goodsTool/index.vue @@ -0,0 +1,396 @@ + + + + +