修改显示

This commit is contained in:
weiwei committed 2025-03-10 17:04:21 +08:00
1 parent 922d5333f8
commit cbd4d5d890
2 files changed
+18 -21

No files matched your search

+10 -11
View File
@@ -59,7 +59,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="HH-mm"
value-format="HH:mm"
format="HH:mm"
/>
</el-form-item>
@@ -71,7 +71,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="HH-mm"
value-format="HH:mm"
format="HH:mm"
/>
</el-form-item>
@@ -83,7 +83,7 @@
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="HH-mm"
value-format="HH:mm"
format="HH:mm"
/>
</el-form-item>
@@ -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)
+8 -10
View File
@@ -36,8 +36,8 @@
@sort-change="sortChangeHandle"
>
<el-table-column type="selection" width="40" align="center" />
<el-table-column type="index" label="#" width="40" />
<el-table-column prop="name" label="商户名" />
<el-table-column type="index" label="#" width="50" />
<el-table-column prop="name" label="商户名" min-width="120" />
<el-table-column prop="logoPic" label="logo">
<template #default="{ row }">
<preview-image :src="row.logoPic" />
@@ -48,7 +48,7 @@
<preview-image :src="row.collectionCode" />
</template>
</el-table-column>
<el-table-column prop="merchantType" label="商户类型" show-overflow-tooltip :min-width="160">
<el-table-column prop="merchantType" label="商户类型" show-overflow-tooltip :min-width="100">
<template #default="{ row }">
<div class="flex justify-center items-center">
<div v-for="(v, i) in row.types.split(',')" :key="i" class="mr-1">
@@ -67,15 +67,13 @@
</div>
</template>
</el-table-column>
<el-table-column prop="deptName" label="部门" />
<el-table-column prop="deptName" label="部门" min-width="120" />
<el-table-column prop="phone" label="联系电话" show-overflow-tooltip :min-width="120" />
<el-table-column prop="businessTime" label="结束营业时间" show-overflow-tooltip :min-width="160">
<el-table-column prop="businessTime" label="营业时间" show-overflow-tooltip :min-width="160">
<template #default="{ row }">
<div>
<span>{{ row.jobStartTime }}</span>
<span class="mx-1">-</span>
<span>{{ row.jobStartTime }}</span>
</div>
<div>{{ row.jobTime?.split(",")[0] ? "早上:" + row.jobTime?.split(",")[0] : "" }}</div>
<div>{{ row.jobTime?.split(",")[1] ? "中午:" + row.jobTime?.split(",")[1] : "" }}</div>
<div>{{ row.jobTime?.split(",")[2] ? "晚上:" + row.jobTime?.split(",")[2] : "" }}</div>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip :min-width="160" />