fix(order): 修复订单详情分成明细报错并将弹窗改为独立选项卡打开

这个提交包含在:
chen
2026-09-17 08:10:24 +08:00
父节点 251d62296e
当前提交 23fe197bff
共有 9 个文件被更改,包括 408 次插入 和 164 次删除

查看文件

@@ -1006,7 +1006,17 @@ define(['io', 'moment', 'moment/locale/zh-cn'], function (io, Moment) {
}
function onOpenOrderDetail(id) {
Fast.api.open(`shopro/order/order/detail?id=${id}`, "订单详情")
const url = `shopro/order/order/detail/id/${id}?id=${id}`;
const title = `订单详情 #${id}`;
if (typeof Backend !== 'undefined' && Backend.api && typeof Backend.api.addtabs === 'function') {
Backend.api.addtabs(url, title);
} else if (top && top.Backend && top.Backend.api && typeof top.Backend.api.addtabs === 'function') {
top.Backend.api.addtabs(url, title);
} else if (Fast && Fast.api && typeof Fast.api.addtabs === 'function') {
Fast.api.addtabs(url, title);
} else {
window.location.href = Fast.api.fixurl(url);
}
}
function scrollBottom() {

查看文件

@@ -328,11 +328,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
function onOpenOrderDetail(id) {
Fast.api.open(`shopro/order/order/detail?id=${id}`, "订单详情", {
callback() {
getData()
}
})
const url = `shopro/order/order/detail/id/${id}?id=${id}`;
const title = `订单详情 #${id}`;
if (typeof Backend !== 'undefined' && Backend.api && typeof Backend.api.addtabs === 'function') {
Backend.api.addtabs(url, title);
} else if (top && top.Backend && top.Backend.api && typeof top.Backend.api.addtabs === 'function') {
top.Backend.api.addtabs(url, title);
} else if (Fast && Fast.api && typeof Fast.api.addtabs === 'function') {
Fast.api.addtabs(url, title);
} else {
window.location.href = Fast.api.fixurl(url);
}
}
const exportLoading = ref(false);

查看文件

@@ -194,11 +194,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
function onOpenOrderDetail(id) {
Fast.api.open(`shopro/order/order/detail?id=${id}`, "订单详情", {
callback() {
getData()
}
})
const url = `shopro/order/order/detail/id/${id}?id=${id}`;
const title = `订单详情 #${id}`;
if (typeof Backend !== 'undefined' && Backend.api && typeof Backend.api.addtabs === 'function') {
Backend.api.addtabs(url, title);
} else if (top && top.Backend && top.Backend.api && typeof top.Backend.api.addtabs === 'function') {
top.Backend.api.addtabs(url, title);
} else if (Fast && Fast.api && typeof Fast.api.addtabs === 'function') {
Fast.api.addtabs(url, title);
} else {
window.location.href = Fast.api.fixurl(url);
}
}
onMounted(() => {

查看文件

@@ -197,11 +197,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
function onOpenOrderDetail(id) {
Fast.api.open(`shopro/order/order/detail?id=${id}`, "订单详情", {
callback() {
getData()
}
})
const url = `shopro/order/order/detail/id/${id}?id=${id}`;
const title = `订单详情 #${id}`;
if (typeof Backend !== 'undefined' && Backend.api && typeof Backend.api.addtabs === 'function') {
Backend.api.addtabs(url, title);
} else if (top && top.Backend && top.Backend.api && typeof top.Backend.api.addtabs === 'function') {
top.Backend.api.addtabs(url, title);
} else if (Fast && Fast.api && typeof Fast.api.addtabs === 'function') {
Fast.api.addtabs(url, title);
} else {
window.location.href = Fast.api.fixurl(url);
}
}
onMounted(() => {

查看文件

@@ -514,11 +514,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
function onDetail(id) {
Fast.api.open(`shopro/order/order/detail/id/${id}?id=${id}`, "详情", {
callback() {
getData()
}
})
const url = `shopro/order/order/detail/id/${id}?id=${id}`;
const title = `订单详情 #${id}`;
if (typeof Backend !== 'undefined' && Backend.api && typeof Backend.api.addtabs === 'function') {
Backend.api.addtabs(url, title);
} else if (top && top.Backend && top.Backend.api && typeof top.Backend.api.addtabs === 'function') {
top.Backend.api.addtabs(url, title);
} else if (Fast && Fast.api && typeof Fast.api.addtabs === 'function') {
Fast.api.addtabs(url, title);
} else {
window.location.href = Fast.api.fixurl(url);
}
}
function onAction(id) {
@@ -572,8 +578,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
setup() {
const { proxy } = getCurrentInstance();
const queryOrderId = (typeof Config !== 'undefined' && Config.order_id)
? Config.order_id
: (new URLSearchParams(location.search).get('id') || (location.pathname.match(/\/id\/(\d+)/i) || [])[1] || Fast.api.query('id'));
const state = reactive({
id: new URLSearchParams(location.search).get('id'),
id: queryOrderId,
detail: {},
stepActive: 1,
})
@@ -873,6 +883,31 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}, function (ret, res) { })
}
});
function onBack() {
if (parent && parent.Layer && typeof parent.Layer.getFrameIndex === 'function') {
try {
var index = parent.Layer.getFrameIndex(window.name);
if (index) {
parent.Layer.close(index);
return;
}
} catch (e) {}
}
if (top && top.Backend && top.Backend.api && typeof top.Backend.api.closetabs === 'function') {
top.Backend.api.closetabs();
} else {
window.history.back();
}
}
function partnerStatusTagType(status) {
const map = {
'-2': 'danger',
'-1': 'info',
'0': 'warning',
'1': 'success',
};
return map[String(status)] || 'info';
}
onMounted(() => {
@@ -883,6 +918,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
...Controller.data(),
state,
getDetail,
onBack,
partnerStatusTagType,
onDispatch,
onFullRefund,
memo,