feat:添加店铺订单详情api

This commit is contained in:
2026-06-05 13:21:40 +08:00
parent 620712828e
commit 3d795805e7
4 changed files with 19 additions and 38 deletions
+4 -10
View File
@@ -25,14 +25,13 @@
<view class="record-meta">
<view class="meta-row flex-row-end">
<view class="record-qty">数量 {{ item.qty }}</view>
<view class="record-total-inline">
<!-- <view class="total-price">¥{{ formatMoney(item.total) }}</view> -->
</view>
</view>
<view class="meta-row flex-between">
<view class="record-time">下单时间:{{ item.time }}</view>
<view class="record-total-inline">
<view class="total-label">总计</view>
<view class="total-price">¥{{ formatMoney(item.total) }}</view>
</view>
<view class="record-qty">数量 {{ item.qty }}</view>
</view>
</view>
</view>
@@ -289,11 +288,6 @@
gap: 10rpx;
}
.total-label {
font-size: 24rpx;
color: #111111;
}
.total-price {
font-size: 34rpx;
font-weight: 800;
+8 -2
View File
@@ -100,7 +100,7 @@
handleOrderButtons,
} from '@/sheep/hooks/useGoods';
import OrderApi from '@/sheep/api/trade/order';
import { getOpenOrderDetail } from '@/sheep/api/ai';
import { getOrderDetail as getAiOrderDetail, getOpenOrderDetail } from '@/sheep/api/ai';
import DeliveryApi from '@/sheep/api/trade/delivery';
import card_order from '@/components/orderItem/card_order.vue';
import truckLine from '@/components/truckLine/truckLine.vue'
@@ -112,6 +112,7 @@
merchantTradeNo: '', // 商户订单号
comeinType: '', // 进入订单详情的来源类型
orderType: '',
source: '',
});
// ========== 门店自提(核销) ==========
@@ -134,7 +135,9 @@
merchant_trade_no: state.merchantTradeNo,
});
} else {
if (String(state.orderType) === '5') {
if (String(state.source) === 'aishop') {
res = await getAiOrderDetail({ id });
} else if (String(state.orderType) === '5') {
res = await getOpenOrderDetail({ id });
} else {
res = await OrderApi.getOrderDetail(id);
@@ -174,6 +177,9 @@
if (options.type !== undefined) {
state.orderType = options.type;
}
if (options.source !== undefined) {
state.source = options.source;
}
state.orderInfo.id = id;
});
+5 -3
View File
@@ -169,11 +169,12 @@
}
const pageData = dataList.value?.[mescroll.dataObj.i] || {};
const list = Array.isArray(pageData?.list) ? pageData.list : Array.isArray(pageData) ? pageData : [];
list.forEach((order) => handleOrderButtons(order));
const nextList = state.currentType === 1 ? list.map((o) => ({ ...o, __source: 'aishop' })) : list;
nextList.forEach((order) => handleOrderButtons(order));
if (mescroll.num == 1) state.list[mescroll.dataObj.i] = [];
state.list[mescroll.dataObj.i] = state.list[mescroll.dataObj.i].concat(list);
state.list[mescroll.dataObj.i] = state.list[mescroll.dataObj.i].concat(nextList);
if (cardPages.value) {
cardPages.value.getState(true, list.length);
cardPages.value.getState(true, nextList.length);
}
}
@@ -198,6 +199,7 @@
const navChangeType = (i) => {
state.currentType = i;
state.currentTab = 0;
state.list = {};
downCallback(state.currentTab);
};
const downCallback = () => {