diff --git a/src/api/brand/index.js b/src/api/brand/index.js new file mode 100644 index 0000000..0c29081 --- /dev/null +++ b/src/api/brand/index.js @@ -0,0 +1,41 @@ +import request from "@/utils/request"; + +// 获取商品管理列表 +export function getBrandbaseList(query) { + return request({ + url: "/brand/brandbase/page", + method: "get", + params: query, + }); +} +//新增品牌 +export function addBrand(data) { + return request({ + url: "/brand/brandbase/save", + method: "post", + data: data, + }); +} +//编辑品牌 +export function updateBrand(data) { + return request({ + url: "/brand/brandbase/update", + method: "post", + data: data, + }); +} +// 删除品牌 +export function deleteBrand(id) { + return request({ + url: `/brand/brandbase/del/${id}`, + method: "delete", + }); +} + +// 获取品牌信息(id) +export function getBrandInfo(id) { + return request({ + url: `/brand/brandbase/detail/${id}`, + method: "get", + }); +} diff --git a/src/router/index.js b/src/router/index.js index a74a565..9e783c2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -93,12 +93,6 @@ export const constantRoutes = [ name: 'editGoods', meta: { title: '编辑商品', icon: '' } }, - { - path: 'goodsManage/seeDetails/:activeTab?', - component: () => import('@/views/goods/goodsManage/seeDetails'), - name: 'seeDetails', - meta: { title: '商品详情', icon: '' } - }, { path: '/goods/goodsReview/auditGoods/:activeTab?', component: () => import('@/views/goods/goodsReview/auditGoods'), @@ -107,35 +101,7 @@ export const constantRoutes = [ } ] }, - { - path: '/order', - component: Layout, - hidden: true, - redirect: 'noredirect', - children: [ - { - path: 'order/sendGoodsInfo/:activeTab?', - component: () => import('@/views/order/sendGoodsInfo'), - hidden: false, - meta: { - title: "去发货", - icon: "star", - }, - name: "sendGoodsInfo", - }, - { - path: 'order/orderDetails/:activeTab?', - component: () => import('@/views/order/orderDetails'), - hidden: false, - meta: { - title: "订单详情", - icon: "star", - }, - name: "orderDetails", - }, - ] - }, - { + { path: '/user', component: Layout, hidden: true, @@ -362,122 +328,63 @@ export const constantRoutes = [ name: "brand", component: Layout, hidden: false, - children: [ - { - path: 'brand/index', - component: () => import('@/views/brand/index'), - hidden: false, - meta: { - title: "公共品牌", - icon: "star", - noCache: false, - link: null, - }, - name: "index", - }, - ], - }, - { - path: '/order', - name: "order", - component: Layout, - hidden: false, + alwaysShow: true, + redirect: 'noredirect', meta: { - title: "订单列表", - icon: "documentation", - noCache: false, + icon: "money", link: null, + noCache: false, + title: "公共品牌", }, children: [ { - path: 'order/obligation', - component: () => import('@/views/order/obligation'), + path: 'brand/informationManagement', + component: () => import('@/views/brand/informationManagement/index'), hidden: false, meta: { - title: "待付款", + title: "信息管理", + icon: "", noCache: false, link: null, }, - name: "obligation", + name: "informationManagement", }, { - path: 'order/sendGoods', - component: () => import('@/views/order/sendGoods'), + path: 'brand/applicationReview', + component: () => import('@/views/brand/applicationReview/index'), hidden: false, meta: { - title: "待发货", + title: "申请审核", + icon: "", noCache: false, link: null, }, - name: "sendGoods", + name: "applicationReview", }, { - path: 'order/shipped', - component: () => import('@/views/order/shipped'), + path: 'brand/renewal', + component: () => import('@/views/brand/renewal/index'), hidden: false, meta: { - title: "已发货", + title: "续期", + icon: "", noCache: false, link: null, }, - name: "shipped", + name: "renewal", }, { - path: 'order/receivedGoods', - component: () => import('@/views/order/receivedGoods'), + path: 'brand/management', + component: () => import('@/views/brand/management/index'), hidden: false, meta: { - title: "已收货", + title: "管理制度上传", + icon: "", noCache: false, link: null, }, - name: "receivedGoods", + name: "management", }, - { - path: 'order/completed', - component: () => import('@/views/order/completed'), - hidden: false, - meta: { - title: "已完成", - noCache: false, - link: null, - }, - name: "completed", - }, - { - path: 'order/cancelled', - component: () => import('@/views/order/cancelled'), - hidden: false, - meta: { - title: "已取消", - noCache: false, - link: null, - }, - name: "cancelled", - }, - { - path: 'order/salesService', - component: () => import('@/views/order/salesService'), - hidden: false, - meta: { - title: "退货/退款", - noCache: false, - link: null, - }, - name: "salesService", - }, - { - path: 'order/refunded', - component: () => import('@/views/order/refunded'), - hidden: false, - meta: { - title: "已退货/退款", - noCache: false, - link: null, - }, - name: "refunded", - }, - ], }, ] diff --git a/src/views/brand/applicationReview/index.vue b/src/views/brand/applicationReview/index.vue new file mode 100644 index 0000000..bc61ff2 --- /dev/null +++ b/src/views/brand/applicationReview/index.vue @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/src/views/brand/informationManagement/index.vue b/src/views/brand/informationManagement/index.vue new file mode 100644 index 0000000..b9d149e --- /dev/null +++ b/src/views/brand/informationManagement/index.vue @@ -0,0 +1,460 @@ + + + diff --git a/src/views/brand/management/index.vue b/src/views/brand/management/index.vue new file mode 100644 index 0000000..bc61ff2 --- /dev/null +++ b/src/views/brand/management/index.vue @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/src/views/brand/renewal/index.vue b/src/views/brand/renewal/index.vue new file mode 100644 index 0000000..bc61ff2 --- /dev/null +++ b/src/views/brand/renewal/index.vue @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/src/views/goods/contrabandManage/index.vue b/src/views/goods/contrabandManage/index.vue index 83317e0..f890064 100644 --- a/src/views/goods/contrabandManage/index.vue +++ b/src/views/goods/contrabandManage/index.vue @@ -278,10 +278,20 @@ const onSaveCategory = () => { }; const addItem = () => { dialogTitle.value = "添加违禁物品"; + Object.assign(dialogForm, { // 保持响应性,手动清空字段 + id: "", + violateGoodName: "", + goodParameter: "", + }); dialogFormVisible.value = true; }; const cancelDialog = () => { dialogRef.value.resetFields(); + Object.assign(dialogForm, { // 保持响应性,手动清空字段 + id: "", + violateGoodName: "", + goodParameter: "", + }); dialogFormVisible.value = false; }; diff --git a/src/views/goods/goodsCategory/index.vue b/src/views/goods/goodsCategory/index.vue index c7c3cd6..a6759b2 100644 --- a/src/views/goods/goodsCategory/index.vue +++ b/src/views/goods/goodsCategory/index.vue @@ -102,7 +102,7 @@ import { getGoodCategoryInfo, getGoodType, categoryAdd, categoryEdit, - categoryRemove,enableAndDisableCategory + categoryRemove, enableAndDisableCategory } from "@/api/goods/info"; import { ca } from "element-plus/es/locales.mjs"; const { proxy } = getCurrentInstance(); @@ -139,15 +139,15 @@ const searchForm = ref(null); const onSubmit = () => { formInline.current = 1; formInline.status = formInline.status == undefined ? "" : formInline.status; - if (formInline.startDate && !formInline.endDate) { + if (formInline.startDate && !formInline.endDate) { ElMessage.warning("请选择结束日期!"); return; } if (formInline.endDate && !formInline.startDate) { - ElMessage.warning("请选择开始日期!"); + ElMessage.warning("请选择开始日期!"); return; } - console.log( formInline); + console.log(formInline); loadData(); }; const resetForm = () => { @@ -223,7 +223,7 @@ const loadData = async () => { tableTotal.value = response.data.total; } } catch (error) { - + } tableLoading.value = false; }; @@ -256,7 +256,7 @@ const enableAndDisable = async (row, num) => { tableLoading.value = false; if (res.code == 200) { onSubmit(); - if (num == 1) { + if (num == 1) { ElMessage.success("启用成功!"); } else { ElMessage.success("禁用成功!"); @@ -280,7 +280,7 @@ const handleEdit = (row) => { dialogForm.name = row.name; dialogForm.level = row.level; dialogForm.parentId = row.parentId; - dialogForm.status = row.status.toString(); + dialogForm.status = row.status?.toString() ?? '1'; }; // 删除操作 const handleDelete = (row) => { @@ -314,7 +314,7 @@ const dialogTitle = ref("添加分类"); const dialogForm = reactive({ type: null, //分类类型归属,类型1->农资交易,2->供应商服务,3->采购商服务,4->土地交易 name: "", //分类名字 - parentId: [], //父级id + parentId: "", //父级id level: "", //分类层级,parentId的长度 sort: "", //排序值 status: "1", //分类状态(1-启用 2-禁用) @@ -347,7 +347,7 @@ const getGoodTypeList = async () => { goodsOptions.value = response.data; } } catch (error) { - + } }; // 递归查找节点对象 @@ -400,10 +400,27 @@ const onSaveCategory = () => { const addCategory = () => { dialogTitle.value = "添加分类"; getGoodTypeList(); + dialogRef.value.resetFields(); + Object.assign(dialogForm, { // 保持响应性,手动清空字段 + id: "", + type: null, + name: "", + level: "", + parentId: "", + status: "1", + }); dialogFormVisible.value = true; }; const cancelDialog = () => { dialogRef.value.resetFields(); + Object.assign(dialogForm, { // 保持响应性,手动清空字段 + id: "", + type: null, + name: "", + level: "", + parentId: "", + status: "1", + }); dialogFormVisible.value = false; }; diff --git a/src/views/goods/goodsReview/auditGoods.vue b/src/views/goods/goodsReview/auditGoods.vue index ad3a2a3..7b5b0b9 100644 --- a/src/views/goods/goodsReview/auditGoods.vue +++ b/src/views/goods/goodsReview/auditGoods.vue @@ -43,7 +43,7 @@
- +
@@ -54,6 +54,9 @@
+ + + @@ -71,7 +74,12 @@ + + + + +
@@ -84,7 +92,7 @@ - 添加属性 + @@ -109,7 +117,12 @@ + + + + + @@ -126,7 +139,7 @@ - 添加属性 + @@ -147,7 +160,7 @@ + placeholder="请选择省市区" clearable style="width: 400px;" /> @@ -568,7 +581,7 @@ const approved = async (index) => { const getArea = async () => { const res = await getRegion(); if (res.code === 200) { - addressOptions.value = res.data.list; + addressOptions.value = res.data; } }; const activeInfoList = ref([]); diff --git a/src/views/goods/goodsReview/index.vue b/src/views/goods/goodsReview/index.vue index da3ebe7..79e835f 100644 --- a/src/views/goods/goodsReview/index.vue +++ b/src/views/goods/goodsReview/index.vue @@ -42,7 +42,7 @@ v-model="formInline.goodCategoryId" :options="goodsOptions" :props="cascaderProps" - placeholder="请选择省市区" + placeholder="请选择商品分类" clearable /> @@ -226,7 +226,7 @@ let nowClickRow = ref({}); const columns = ref([]); const columns1 = ref([ { prop: "goodId", label: "ID", width: "150" }, - { prop: "goodUrl", label: "商品图片", slotName: "goodUrl" }, + { prop: "goodUrl", label: "商品图片", slotName: "goodUrl",align: "left" }, { prop: "goodName", label: "商品名称", width: "120" }, { prop: "categoryName", label: "分类名称" }, { prop: "goodPrice", label: "商品售价" },