feat: 待收货、待发货添加15(部分发货状态)
This commit is contained in:
+26
-2
@@ -142,10 +142,34 @@
|
||||
},
|
||||
];
|
||||
let dataList = ref([]);
|
||||
const mergeAiStatusValue = (baseValue, extraList = []) => {
|
||||
const set = new Set();
|
||||
String(baseValue || '')
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean)
|
||||
.forEach((s) => set.add(s));
|
||||
(Array.isArray(extraList) ? extraList : [])
|
||||
.map((s) => String(s).trim())
|
||||
.filter(Boolean)
|
||||
.forEach((s) => set.add(s));
|
||||
return Array.from(set).join(',');
|
||||
};
|
||||
async function getData(mescroll) {
|
||||
let code = null;
|
||||
dataList.value = [];
|
||||
const status = tabMaps?.[mescroll?.dataObj?.i]?.value;
|
||||
const tab = tabMaps?.[mescroll?.dataObj?.i] || null;
|
||||
const tabStatusValue = tab?.value;
|
||||
const isAiStore = state.currentType === 1;
|
||||
let status = tabStatusValue;
|
||||
if (isAiStore) {
|
||||
const tabId = String(tab?.id);
|
||||
if (tabId === '10') {
|
||||
status = mergeAiStatusValue(tabStatusValue, ['10', '15']);
|
||||
} else if (tabId === '2') {
|
||||
status = mergeAiStatusValue(tabStatusValue, ['15', '20']);
|
||||
}
|
||||
}
|
||||
const obj = {
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
@@ -155,7 +179,7 @@
|
||||
if (!obj.status && obj.status !== 0) delete obj.status;
|
||||
if (!obj.keyWord) delete obj.keyWord;
|
||||
|
||||
const isAfterSaleTab = String(mescroll?.dataObj?.status) === '50,60';
|
||||
const isAfterSaleTab = String(tab?.id) === '4';
|
||||
if (state.currentType === 0 && isAfterSaleTab) {
|
||||
const res = await AfterSaleApi.getAfterSalePage(obj);
|
||||
code = res.code;
|
||||
|
||||
@@ -191,11 +191,11 @@ export function handleOrderButtons(order) {
|
||||
// 查看拼团
|
||||
order.buttons.push('combination');
|
||||
}
|
||||
if (order.status === 20) {
|
||||
// 确认收货
|
||||
if (order.status === 15 || order.status === 20) {
|
||||
// 确认收货(部分发货或全部发货)
|
||||
order.buttons.push('confirm');
|
||||
}
|
||||
if (order.logisticsId > 0) {
|
||||
if (order.logisticsId > 0 || Number(order?.logisticsId) > 0 || (String(order?.logisticsNo || '').trim())) {
|
||||
// 查看物流
|
||||
order.buttons.push('express');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user