From cbd4d5d890694f29aa531867153d8f8f324f93b6 Mon Sep 17 00:00:00 2001 From: weiwei Date: Mon, 10 Mar 2025 17:04:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wallet/mch-manage/form.vue | 21 ++++++++++----------- src/views/wallet/mch-manage/index.vue | 18 ++++++++---------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/views/wallet/mch-manage/form.vue b/src/views/wallet/mch-manage/form.vue index dcdb532..79e6e26 100644 --- a/src/views/wallet/mch-manage/form.vue +++ b/src/views/wallet/mch-manage/form.vue @@ -59,7 +59,7 @@ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" - value-format="HH-mm" + value-format="HH:mm" format="HH:mm" /> @@ -71,7 +71,7 @@ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" - value-format="HH-mm" + value-format="HH:mm" format="HH:mm" /> @@ -83,7 +83,7 @@ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" - value-format="HH-mm" + value-format="HH:mm" format="HH:mm" /> @@ -176,7 +176,7 @@ const onSubmit = async () => { const _pa = { ...form, types: form.merchantType, - jobTime: jobTime.morning.join(",") + ";" + jobTime.noon.join(",") + ";" + jobTime.evening.join(","), + jobTime: (jobTime.morning?.join("-") || "") + "," + (jobTime.noon?.join("-") || "") + "," + (jobTime.evening?.join("-") || ""), } try { loading.value = true @@ -197,14 +197,13 @@ const getmerchantInfoData = async (id: string) => { try { const res = await getObj(id) if (res.code === 0) { - const data = res.data - const resJobTime = data.jobTime?.split(";") - Object.assign(form, data, { - merchantType: data.types, + const resJobTime = res.data.jobTime ? res.data.jobTime.split(",") : [] + Object.assign(form, res.data, { + merchantType: res.data.types, }) - jobTime.morning = resJobTime ? resJobTime[0]?.split(",") : [] - jobTime.noon = resJobTime ? resJobTime[1]?.split(",") : [] - jobTime.evening = resJobTime ? resJobTime[2]?.split(",") : [] + jobTime.morning = resJobTime[0]?.split("-") + jobTime.noon = resJobTime[1]?.split("-") + jobTime.evening = resJobTime[2]?.split("-") } } catch (error: any) { useMessage().error(error.msg) diff --git a/src/views/wallet/mch-manage/index.vue b/src/views/wallet/mch-manage/index.vue index 1377a5b..0602bf2 100644 --- a/src/views/wallet/mch-manage/index.vue +++ b/src/views/wallet/mch-manage/index.vue @@ -36,8 +36,8 @@ @sort-change="sortChangeHandle" > - - + + - + - + - +