mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 13:31:04 +00:00
fix(实物订单): 管理端订单详情按配送方式区分展示发货信息
- 实物订单详情页配送方式映射文案(快递配送/送货上门/无需配送/到店自提/上门服务) - 无需配送展示发货方式与发货备注,送货展示送货人信息,仅快递展示物流查询 - 订单中心详情组件到店自提改用后端 is_pickup 标识,兼容旧 order_delivery_type 字段
This commit is contained in:
parent
730fdad6f4
commit
b41f92e228
@ -36,10 +36,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 收货信息(快递配送)/ 自提门店信息(到店自提) -->
|
||||
<!-- 收货信息(快递配送/送货/无需配送)/ 自提门店信息(到店自提) -->
|
||||
<div class="section">
|
||||
<div class="title">{{ data.order_delivery_type === 'pickup' ? '自提门店' : '收货信息' }}</div>
|
||||
<ul class="list" v-if="data.order_delivery_type === 'pickup' && data.store_info">
|
||||
<div class="title">{{ isPickup ? '自提门店' : '收货信息' }}</div>
|
||||
<ul class="list" v-if="isPickup && data.store_info">
|
||||
<li class="item">
|
||||
<div>门店名称:</div>
|
||||
<div class="value">{{ data.store_info.store_name || '--' }}</div>
|
||||
@ -91,7 +91,7 @@
|
||||
<div>积分抵扣:</div>
|
||||
<div class="value">¥{{ data.deduction_price || '0.00' }}</div>
|
||||
</li>
|
||||
<li class="item" v-if="data.order_delivery_type !== 'pickup'">
|
||||
<li class="item" v-if="!isPickup">
|
||||
<div>交付邮费:</div>
|
||||
<div class="value">¥{{ data.pay_postage || '0.00' }}</div>
|
||||
</li>
|
||||
@ -144,17 +144,17 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" v-if="data.delivery_name">
|
||||
<div class="title">{{ data.delivery_type == 'express' ? '物流信息' : '送货人信息' }}</div>
|
||||
<div class="title">{{ isExpress ? '物流信息' : deliveryType === 'send' ? '送货人信息' : '发货信息' }}</div>
|
||||
<ul class="list">
|
||||
<li class="item">
|
||||
<div>{{ data.delivery_type == 'express' ? '物流公司:' : '送货人姓名:' }}</div>
|
||||
<div>{{ isExpress ? '物流公司:' : deliveryType === 'send' ? '送货人姓名:' : '发货方式:' }}</div>
|
||||
<div class="value">{{ data.delivery_name || '--' }}</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>{{ data.delivery_type == 'express' ? '物流单号:' : '送货人电话:' }}</div>
|
||||
<div>{{ isExpress ? '物流单号:' : deliveryType === 'send' ? '送货人电话:' : '发货备注:' }}</div>
|
||||
<div class="value">
|
||||
{{ data.delivery_id || '--' }}
|
||||
<a v-if="data.delivery_type == 'express'" v-db-click @click="$emit('openLogistics')">物流查询</a>
|
||||
<a v-if="isExpress" v-db-click @click="$emit('openLogistics')">物流查询</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -255,6 +255,14 @@ const orderItems = computed(() => {
|
||||
return props.data.order_items || props.data.cartInfo || [];
|
||||
});
|
||||
|
||||
/** 配送方式:express 快递 / send 送货 / fictitious 无需配送 / pickup 自提 / door 上门 */
|
||||
const deliveryType = computed(
|
||||
() => props.data.delivery_type || props.data.extra_info?.delivery_type || '',
|
||||
);
|
||||
const isExpress = computed(() => deliveryType.value === 'express');
|
||||
/** 到店自提:后端统一标识 is_pickup,兼容旧字段 order_delivery_type */
|
||||
const isPickup = computed(() => props.data.is_pickup == 1 || props.data.order_delivery_type === 'pickup');
|
||||
|
||||
function formatDate(timestamp) {
|
||||
if (!timestamp) return '--';
|
||||
const d = new Date(timestamp * 1000);
|
||||
|
||||
@ -91,9 +91,7 @@
|
||||
<el-col :span="8"
|
||||
><div class="detail-item">
|
||||
<span class="label">配送方式:</span
|
||||
><span class="value">{{
|
||||
detailData.extra_info?.delivery_type === 'pickup' ? '到店自提' : '快递配送'
|
||||
}}</span>
|
||||
><span class="value">{{ deliveryTypeText }}</span>
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
@ -101,25 +99,23 @@
|
||||
|
||||
<!-- 发货/物流信息 -->
|
||||
<div class="section" v-if="detailData.delivery_name">
|
||||
<div class="section-title">{{ detailData.delivery_type == 'express' ? '物流信息' : '送货人信息' }}</div>
|
||||
<div class="section-title">{{ isExpressDelivery ? '物流信息' : '发货信息' }}</div>
|
||||
<el-row :gutter="24" class="detail-grid">
|
||||
<el-col :span="8"
|
||||
><div class="detail-item">
|
||||
<span class="label">{{
|
||||
detailData.delivery_type == 'express' ? '物流公司:' : '送货人姓名:'
|
||||
}}</span
|
||||
<span class="label">{{ isExpressDelivery ? '物流公司:' : deliveryType === 'send' ? '送货人姓名:' : '发货方式:' }}</span
|
||||
><span class="value">{{ detailData.delivery_name || '--' }}</span>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="12"
|
||||
><div class="detail-item">
|
||||
<span class="label">{{
|
||||
detailData.delivery_type == 'express' ? '物流单号:' : '送货人电话:'
|
||||
isExpressDelivery ? '物流单号:' : deliveryType === 'send' ? '送货人电话:' : '发货备注:'
|
||||
}}</span
|
||||
><span class="value"
|
||||
>{{ detailData.delivery_id || '--'
|
||||
}}<a
|
||||
v-if="detailData.delivery_type == 'express'"
|
||||
v-if="isExpressDelivery"
|
||||
v-db-click
|
||||
@click="toggleLogistics"
|
||||
class="track-link"
|
||||
@ -474,6 +470,22 @@ const orderItems = computed(() => {
|
||||
/** 订单状态与列表同口径(待发货/待收货/待到店等业务状态) */
|
||||
const businessStatus = computed(() => getOrderBusinessStatus(detailData.value || {}));
|
||||
|
||||
/** 配送方式:express 快递 / send 送货 / fictitious 无需配送 / pickup 自提 / door 上门 */
|
||||
const deliveryType = computed(
|
||||
() => detailData.value?.extra_info?.delivery_type || detailData.value?.delivery_type || '',
|
||||
);
|
||||
const deliveryTypeText = computed(
|
||||
() =>
|
||||
({
|
||||
express: '快递配送',
|
||||
send: '送货上门',
|
||||
fictitious: '无需配送',
|
||||
pickup: '到店自提',
|
||||
door: '上门服务',
|
||||
})[deliveryType.value] || '快递配送',
|
||||
);
|
||||
const isExpressDelivery = computed(() => deliveryType.value === 'express');
|
||||
|
||||
/** 售后进度数据(后端注入到 detail.extend.after_sale) */
|
||||
const afterSaleInfo = computed(() => {
|
||||
if (!detailData.value) return null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user