From 182b981c632502f9d760730fbd09832819de14bb Mon Sep 17 00:00:00 2001 From: "2090205686@qq.com" Date: Wed, 11 Jun 2025 10:32:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=92=8C=E8=BF=9D=E7=A6=81=E7=89=A9=E5=93=81=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=8F=82=E6=95=B0=E9=87=8D=E7=BD=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/goods/contrabandManage/index.vue | 10 +++++++ src/views/goods/goodsCategory/index.vue | 35 ++++++++++++++++------ 2 files changed, 36 insertions(+), 9 deletions(-) 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; }; From 24202a1e3dd136925544a581921764c44aef3f58 Mon Sep 17 00:00:00 2001 From: 13713575202 <1345916905@qq.com> Date: Wed, 11 Jun 2025 10:38:08 +0800 Subject: [PATCH 2/2] xiabin --- src/layout/components/AppMain.vue | 27 +++++++++++++-------------- src/views/order/cancelled.vue | 20 +++++++++++--------- src/views/order/completed.vue | 20 +++++++++++--------- src/views/order/obligation.vue | 26 ++++++++++++++------------ src/views/order/orderDetails.vue | 4 +++- src/views/order/receivedGoods.vue | 26 ++++++++++++++------------ src/views/order/refunded.vue | 26 ++++++++++++++------------ src/views/order/salesService.vue | 26 ++++++++++++++------------ src/views/order/sendGoods.vue | 24 +++++++++++++----------- src/views/order/sendGoodsInfo.vue | 2 +- src/views/order/shipped.vue | 26 ++++++++++++++------------ 11 files changed, 122 insertions(+), 105 deletions(-) diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 0bb8b7e..3437a77 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -2,9 +2,9 @@
- - - + + + @@ -13,24 +13,24 @@ @@ -86,4 +86,3 @@ function addIframe() { border-radius: 3px; } - diff --git a/src/views/order/cancelled.vue b/src/views/order/cancelled.vue index 7638f99..9543e28 100644 --- a/src/views/order/cancelled.vue +++ b/src/views/order/cancelled.vue @@ -24,27 +24,27 @@ class="demo-form-inline" :label-width="'auto'" > - - - + + +
@@ -280,6 +280,8 @@ const formInline = reactive({ orderStatus: "7", current: 1, size: 10, + receiverName: "", + receiverPhone: "", }); const goodsCategoryList = ref([ { name: "蔬菜", id: 1 }, diff --git a/src/views/order/completed.vue b/src/views/order/completed.vue index 512f110..4c802da 100644 --- a/src/views/order/completed.vue +++ b/src/views/order/completed.vue @@ -24,27 +24,27 @@ class="demo-form-inline" :label-width="'auto'" > - - - + + +
@@ -280,6 +280,8 @@ const formInline = reactive({ orderStatus: "8", current: 1, size: 10, + receiverName: "", + receiverPhone: "", }); const goodsCategoryList = ref([ { name: "蔬菜", id: 1 }, diff --git a/src/views/order/obligation.vue b/src/views/order/obligation.vue index 8fb4d65..838f1d1 100644 --- a/src/views/order/obligation.vue +++ b/src/views/order/obligation.vue @@ -24,27 +24,27 @@ class="demo-form-inline" :label-width="'auto'" > - - - + + +
@@ -280,9 +280,11 @@ const router = useRouter(); const preserveExpanded = ref(true); const formInline = reactive({ orderNo: "", - orderStatus: 1, + orderStatus: "1", current: 1, size: 10, + receiverName: "", + receiverPhone: "", }); const goodsCategoryList = ref([ { name: "蔬菜", id: 1 }, @@ -544,8 +546,8 @@ onBeforeUnmount(() => {