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) --> + + + @@ -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) --> -