fix(gltTicketOrder): 优化订单列表显示和时间格式化
- 使用 formatDay 函数格式化配送时间为 yyyy-MM-dd 格式 - 添加图片预览功能,将留档图片链接替换为 a-image 组件 - 新增 formatDay 工具函数用于日期格式化 - 移除 nickname 列的固定宽度设置 - 为送水数量列添加固定宽度 120px - 注释掉开发环境中的 VITE_API_URL 配置项
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
VITE_APP_NAME=后台管理(开发环境)
|
VITE_APP_NAME=后台管理(开发环境)
|
||||||
VITE_API_URL=http://127.0.0.1:9200/api
|
#VITE_API_URL=http://127.0.0.1:9200/api
|
||||||
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<template v-if="column.key === 'riderName'">
|
<template v-if="column.key === 'riderName'">
|
||||||
<a-space>
|
<a-space>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<div class="text-gray-400">配送时间:{{ record.sendTime || '-'}}</div>
|
<div class="text-gray-400">配送时间:{{ formatDay(record.sendTime) || '-'}}</div>
|
||||||
<div class="text-gray-400 flex justify-between" style="min-width: 224px">
|
<div class="text-gray-400 flex justify-between" style="min-width: 224px">
|
||||||
配送人员:{{ record.riderName || '-' }}
|
配送人员:{{ record.riderName || '-' }}
|
||||||
<a-tag
|
<a-tag
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</a-tag>
|
</a-tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-blue-400">联系电话:{{ record.riderPhone || '-' }}</div>
|
<div class="text-blue-400">联系电话:{{ record.riderPhone || '-' }}</div>
|
||||||
<div class="text-gray-400">留档图片:{{ record.sendEndImg || '-' }}</div>
|
<div class="text-gray-400">留档图片:<a-image :src="record.sendEndImg" v-if="record.sendEndImg" :width="50" /></div>
|
||||||
</div>
|
</div>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
@@ -313,6 +313,10 @@
|
|||||||
return value ? toDateString(value, 'yyyy-MM-dd HH:mm:ss') : '-';
|
return value ? toDateString(value, 'yyyy-MM-dd HH:mm:ss') : '-';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const formatDay = (value?: string) => {
|
||||||
|
return value ? toDateString(value, 'yyyy-MM-dd') : '-';
|
||||||
|
};
|
||||||
|
|
||||||
const getOrderStatus = (record: any) => {
|
const getOrderStatus = (record: any) => {
|
||||||
const { sendTime, arriveTime, signTime } = getOrderTimes(record);
|
const { sendTime, arriveTime, signTime } = getOrderTimes(record);
|
||||||
if (signTime) return { value: 3, label: '已签收', color: 'red' };
|
if (signTime) return { value: 3, label: '已签收', color: 'red' };
|
||||||
@@ -355,8 +359,7 @@
|
|||||||
{
|
{
|
||||||
title: '订水用户',
|
title: '订水用户',
|
||||||
dataIndex: 'nickname',
|
dataIndex: 'nickname',
|
||||||
key: 'nickname',
|
key: 'nickname'
|
||||||
width: 360
|
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: '送货地址',
|
// title: '送货地址',
|
||||||
@@ -377,7 +380,8 @@
|
|||||||
title: '送水数量(桶)',
|
title: '送水数量(桶)',
|
||||||
dataIndex: 'totalNum',
|
dataIndex: 'totalNum',
|
||||||
key: 'totalNum',
|
key: 'totalNum',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
width: 120
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: '买家留言',
|
// title: '买家留言',
|
||||||
|
|||||||
Reference in New Issue
Block a user