From 77f821a84b20cff7e2194ac96b965df542e4e6ae Mon Sep 17 00:00:00 2001
From: lwh <2679599887@qq.com>
Date: Fri, 16 Jun 2023 19:37:24 +0800
Subject: [PATCH] =?UTF-8?q?fixed=20=E5=AE=8C=E5=96=84=E5=95=86=E5=93=81?=
=?UTF-8?q?=E7=B1=BB=E7=9B=AE=E5=8F=8A=E5=B9=B3=E5=8F=B0=E4=B8=8E=E5=95=86?=
=?UTF-8?q?=E6=88=B7=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/styles/login.scss | 2 +-
.../components/AddDialog.vue | 149 ++++++++++--------
.../components/ChooseShopDialog.vue | 117 ++++++++++++++
.../components/DetailDialog.vue | 107 ++++++-------
.../components/EditDialog.vue | 122 ++++++--------
.../GoodsManager/ShopGoodsCategorys/index.vue | 29 +++-
6 files changed, 321 insertions(+), 205 deletions(-)
create mode 100644 src/views/business/GoodsManager/ShopGoodsCategorys/components/ChooseShopDialog.vue
diff --git a/src/assets/styles/login.scss b/src/assets/styles/login.scss
index 7af1f27..c323eb3 100644
--- a/src/assets/styles/login.scss
+++ b/src/assets/styles/login.scss
@@ -7,7 +7,7 @@
align-items: center;
height: 100%;
// 登录背景图
- // background-image: url('@/assets/images/login-bg.jpg');
+ background-image: url('@/assets/images/login-bg.jpg');
background-size: cover;
}
diff --git a/src/views/business/GoodsManager/ShopGoodsCategorys/components/AddDialog.vue b/src/views/business/GoodsManager/ShopGoodsCategorys/components/AddDialog.vue
index 3786d92..8dea5f0 100644
--- a/src/views/business/GoodsManager/ShopGoodsCategorys/components/AddDialog.vue
+++ b/src/views/business/GoodsManager/ShopGoodsCategorys/components/AddDialog.vue
@@ -7,59 +7,57 @@
* @LastEditTime: (2023-06-15)
-->
-
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
-
-
-
-
- {{ data.shopGoodsCategoryName }}
- ({{ data.children.length }})
-
-
-
+
+
+
+
+ {{ data.shopGoodsCategoryName }}
+ ({{ data.children.length }})
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.dictLabel}}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{
+ item.dictLabel }}
+
+
+
+
+
+
+
+
@@ -71,6 +69,9 @@
+
+
+
@@ -78,22 +79,29 @@
import { reactive, ref, watch } from "vue";
import { ElMessage } from 'element-plus'
import modal from '@/plugins/modal.js'
-import { shopGoodsCategoryTreeList, addOrUpdateShopGoodsCategory } from '@/api/business/GoodsManager/ShopGoodsCategorys/shopGoodsCategory.js';
+import useUserStore from '@/store/modules/user'
+import { shopGoodsCategoryTreeList, addOrUpdateShopGoodsCategory } from '@/api/business/GoodsManager/ShopGoodsCategorys/shopGoodsCategory.js';
+import ChooseShopDialog from './ChooseShopDialog.vue';
// 打开弹窗时回调
const openDialog = async () => {
+ formData.shopName = props.data?.shopName
+ formData.shopGuid = props.data?.shopGuid
+ formData.shopGoodsCategoryParentGuid = props.data?.shopGoodsCategoryGuid
- await getdisplay_status()
-
- await getTreeList()
+ await getdisplay_status()
+ await getTreeList()
}
// -业务参数
+const userid = useUserStore().userId
const dataList = ref([])
// 显示状态字典选项列表
const display_status = ref([]);
-
+// 选择店铺弹窗参数
+const ChooseShopDialogVisible = ref(false);
+const ChooseShopDialogRow = ref({});
// -业务方法
// 字典获取
@@ -103,18 +111,28 @@ async function getdisplay_status() {
})
}
-
+// 打开选择店铺弹窗
+const handleChooseShop = () => {
+ ChooseShopDialogVisible.value = true
+ ChooseShopDialogRow.value = formData
+}
// -基础参数
const labelWidth = 100;
const formRef = ref();
const { proxy } = getCurrentInstance()
const emits = defineEmits(["update:modelValue"]);
-const formData = reactive({
-});
const props = defineProps({
modelValue: Boolean,
done: Function,
+ data: Object
+});
+const formData = reactive({
+ shopName: "",
+ shopGuid: "",
+ shopGoodsCategoryParentGuid: "",
+ shopGoodsCategoryDisplayStatus: 1,
+ shopGoodsCategorySort: 100
});
const imgData = ref({
fileDir: "ShopGoodsCategory"
@@ -122,13 +140,10 @@ const imgData = ref({
// 验证
const rules = reactive({
- shopGoodsCategoryGuid: [{ required: true, message: "不能为空", trigger: "blur", type: "number" }],
- shopGuid: [{ required: true, message: "店铺guid不能为空", trigger: "blur", type: "number" }],
- shopGoodsCategoryParentGuid: [{ required: true, message: "父级guid不能为空", trigger: "blur", type: "number" }],
- shopGoodsCategoryAncestralGuid: [{ required: true, message: "祖级guid不能为空", trigger: "blur" }],
- shopGoodsCategoryName: [{ required: true, message: "名称不能为空", trigger: "blur" }],
- shopGoodsCategoryDisplayStatus: [{ required: true, message: "显示状态不能为空", trigger: "blur", type: "number" }],
- shopGoodsCategorySort: [{ required: true, message: "排序不能为空", trigger: "blur", type: "number" }],
+ shopGoodsCategoryParentGuid: [{ required: true, message: "上级菜单不能为空", trigger: "blur", type: "number" }],
+ shopGoodsCategoryName: [{ required: true, message: "名称不能为空", trigger: "blur" }],
+ shopGoodsCategoryDisplayStatus: [{ required: true, message: "显示状态不能为空", trigger: "blur", type: "number" }],
+ shopGoodsCategorySort: [{ required: true, message: "排序不能为空", trigger: "blur", type: "number" }],
});
// -基础方法
@@ -140,7 +155,7 @@ async function getTreeList() {
})
}
watch(props, async (v) => {
-
+
});
// 提交
@@ -160,9 +175,15 @@ const handleAddClick = async (formEl) => {
});
};
const closeDialog = () => {
+ formData.shopName = ""
+ formData.shopGuid = ""
+ formData.shopGoodsCategoryParentGuid = ""
+ console.log(formData);
+
handleResetClick(formRef.value);
props.done();
emits("update:modelValue", false);
+ emits("update:data", {});
};
const handleResetClick = async (formEl) => {
if (!formEl) return;
diff --git a/src/views/business/GoodsManager/ShopGoodsCategorys/components/ChooseShopDialog.vue b/src/views/business/GoodsManager/ShopGoodsCategorys/components/ChooseShopDialog.vue
new file mode 100644
index 0000000..f266d99
--- /dev/null
+++ b/src/views/business/GoodsManager/ShopGoodsCategorys/components/ChooseShopDialog.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/business/GoodsManager/ShopGoodsCategorys/components/DetailDialog.vue b/src/views/business/GoodsManager/ShopGoodsCategorys/components/DetailDialog.vue
index 9c469ed..d0097ee 100644
--- a/src/views/business/GoodsManager/ShopGoodsCategorys/components/DetailDialog.vue
+++ b/src/views/business/GoodsManager/ShopGoodsCategorys/components/DetailDialog.vue
@@ -6,74 +6,53 @@
* @LastEditors: (黎文豪)
* @LastEditTime: (2023-06-15)
-->
-
+
+
+
+
+
+
+
+
-
-
-
-
-
- {{ data.shopGoodsCategoryName }}
- ({{ data.children.length }})
-
-
-
+
+
+
+
+
+ {{ data.shopGoodsCategoryName }}
+ ({{ data.children.length }})
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.dictLabel}}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{
+ item.dictLabel }}
+
+
+
+
+
+
+
+
@@ -83,14 +62,15 @@