fix(gltTicketOrder): 优化订单列表显示和时间格式化
- 使用 formatDay 函数格式化配送时间为 yyyy-MM-dd 格式 - 添加图片预览功能,将留档图片链接替换为 a-image 组件 - 新增 formatDay 工具函数用于日期格式化 - 移除 nickname 列的固定宽度设置 - 为送水数量列添加固定宽度 120px - 注释掉开发环境中的 VITE_API_URL 配置项
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
<template v-if="column.key === 'riderName'">
|
||||
<a-space>
|
||||
<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">
|
||||
配送人员:{{ record.riderName || '-' }}
|
||||
<a-tag
|
||||
@@ -55,7 +55,7 @@
|
||||
</a-tag>
|
||||
</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>
|
||||
</a-space>
|
||||
</template>
|
||||
@@ -313,6 +313,10 @@
|
||||
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 { sendTime, arriveTime, signTime } = getOrderTimes(record);
|
||||
if (signTime) return { value: 3, label: '已签收', color: 'red' };
|
||||
@@ -355,8 +359,7 @@
|
||||
{
|
||||
title: '订水用户',
|
||||
dataIndex: 'nickname',
|
||||
key: 'nickname',
|
||||
width: 360
|
||||
key: 'nickname'
|
||||
},
|
||||
// {
|
||||
// title: '送货地址',
|
||||
@@ -377,7 +380,8 @@
|
||||
title: '送水数量(桶)',
|
||||
dataIndex: 'totalNum',
|
||||
key: 'totalNum',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
// {
|
||||
// title: '买家留言',
|
||||
|
||||
Reference in New Issue
Block a user