From 22ebd0927d0f1d35acb99c73f728dd3a242e3559 Mon Sep 17 00:00:00 2001 From: zjf <1799650030@qq.com> Date: Thu, 4 Sep 2025 19:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B1=E5=AF=8C=E5=95=86=E5=9F=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supermarket/mallMerchant/bindUser.vue | 319 ++++++++++++++++++ src/views/supermarket/mallMerchant/form.vue | 6 +- src/views/supermarket/mallMerchant/index.vue | 15 +- src/views/supermarket/mallProduct/form.vue | 10 + 4 files changed, 348 insertions(+), 2 deletions(-) create mode 100644 src/views/supermarket/mallMerchant/bindUser.vue diff --git a/src/views/supermarket/mallMerchant/bindUser.vue b/src/views/supermarket/mallMerchant/bindUser.vue new file mode 100644 index 0000000..7eb0775 --- /dev/null +++ b/src/views/supermarket/mallMerchant/bindUser.vue @@ -0,0 +1,319 @@ + + + + + diff --git a/src/views/supermarket/mallMerchant/form.vue b/src/views/supermarket/mallMerchant/form.vue index d23cd53..f64978e 100644 --- a/src/views/supermarket/mallMerchant/form.vue +++ b/src/views/supermarket/mallMerchant/form.vue @@ -99,7 +99,7 @@ const form = reactive({ contactName: '', contactPhone: '', email: '', - status: '', + status: 1, // 默认正常状态 licenseNo: '', address: '', images: '', @@ -122,6 +122,10 @@ const openDialog = (id: string) => { // 重置表单数据 nextTick(() => { dataFormRef.value?.resetFields(); + // 新增时设置默认状态为正常 + if (!id) { + form.status = 1; + } }); // 获取mallMerchant信息 diff --git a/src/views/supermarket/mallMerchant/index.vue b/src/views/supermarket/mallMerchant/index.vue index fe5e35a..e5f4858 100644 --- a/src/views/supermarket/mallMerchant/index.vue +++ b/src/views/supermarket/mallMerchant/index.vue @@ -55,10 +55,12 @@ - + @@ -69,10 +71,14 @@ + + + diff --git a/src/views/supermarket/mallProduct/form.vue b/src/views/supermarket/mallProduct/form.vue index 9468724..86b5808 100644 --- a/src/views/supermarket/mallProduct/form.vue +++ b/src/views/supermarket/mallProduct/form.vue @@ -465,6 +465,16 @@ const onSubmit = async () => { submitData.categoryId = form.categoryId.slice(-1)[0]; } + // 处理时间格式:转换为 LocalDateTime 格式 (yyyy-MM-dd HH:mm:ss) + if (form.saleStartTime) { + const date = new Date(form.saleStartTime); + submitData.saleStartTime = date.toISOString().slice(0, 19).replace('T', ' '); + } + if (form.saleEndTime) { + const date = new Date(form.saleEndTime); + submitData.saleEndTime = date.toISOString().slice(0, 19).replace('T', ' '); + } + // 如果是单价SPU模式,清空SKU列表 if (form.priceType === 2) { submitData.skuList = [];