docs: annotate account commerce finance and content pages
This commit is contained in:
1 parent
60827b8bfb
commit
2be21c1c62
24 files changed
+223
No files matched your search
@@ -1,4 +1,7 @@
|
||||
<script>
|
||||
/**
|
||||
* 发票列表与申请入口共用页面:加载可开票订单、抬头、收票地址、项目及税费配置;报价必须匹配当前表单签名后才可提交。
|
||||
*/
|
||||
import "~/assets/styles/PageInfoNotice._16xRFrB.css";
|
||||
import "~/assets/styles/PaymentDialog.BNFKQF1U.css";
|
||||
import "~/assets/styles/invoices.t1P1GXOx.css";
|
||||
@@ -397,6 +400,7 @@ var Ce = {
|
||||
tax: V.tax_rate,
|
||||
}),
|
||||
);
|
||||
// 打开申请时重置上次草稿,并完整加载所有分页选项;默认值确定后再请求报价。
|
||||
async function J() {
|
||||
if (!(D.value || E.value)) {
|
||||
((T.value = !0),
|
||||
@@ -521,6 +525,7 @@ var Ce = {
|
||||
: `请选择当前抬头支持的开票项目`
|
||||
: `请选择有效的发票抬头`;
|
||||
});
|
||||
// 报价以排序后的订单 ID 和全部开票选项作为签名;更早响应或表单已变更的结果不得用于提交。
|
||||
async function Q() {
|
||||
let e = ++P.value;
|
||||
if (
|
||||
@@ -578,6 +583,7 @@ var Ce = {
|
||||
.reduce((e, t) => e + Number(t.amount || 0), 0)
|
||||
.toFixed(2);
|
||||
});
|
||||
// 重新校验订单有效性、抬头、收票方式及最新报价后申请;返回费用订单时转入支付,不直接认定发票已开具。
|
||||
async function Et() {
|
||||
if (E.value || D.value || !O.value) return;
|
||||
if (((k.value = ``), Z.value)) {
|
||||
@@ -633,12 +639,14 @@ var Ce = {
|
||||
E.value = !1;
|
||||
}
|
||||
}
|
||||
// 只接受正整数形式的费用订单 ID,防止无效跳转或支付目标。
|
||||
function Dt(e) {
|
||||
return (
|
||||
(typeof e == `string` || typeof e == `number`) &&
|
||||
/^[1-9]\d*$/.test(String(e))
|
||||
);
|
||||
}
|
||||
// 只有具有有效费用订单且处于可继续处理的支付状态,才展示对应入口。
|
||||
function Ot(e) {
|
||||
return (
|
||||
Dt(e.invoice_order_id) &&
|
||||
@@ -647,6 +655,7 @@ var Ce = {
|
||||
)
|
||||
);
|
||||
}
|
||||
// 未付款的发票费用订单打开支付,其余待审核凭证状态交给订单详情处理。
|
||||
function kt(e) {
|
||||
if (Ot(e)) {
|
||||
if (e.order_status !== `Unpaid`) {
|
||||
@@ -656,9 +665,11 @@ var Ce = {
|
||||
((vt.value = e.invoice_order_id), (F.value = !0));
|
||||
}
|
||||
}
|
||||
// 支付结束后退出申请专用路由或刷新列表,开票状态以服务端为准。
|
||||
function At() {
|
||||
((F.value = !1), S.value ? x.push(`/invoices`) : w());
|
||||
}
|
||||
// 申请弹窗关闭且没有有效草稿时,申请专用路由回到发票列表。
|
||||
function jt(e) {
|
||||
!e && S.value && !O.value && x.push(`/invoices`);
|
||||
}
|
||||
@@ -670,9 +681,11 @@ var Ce = {
|
||||
`wait_create`,
|
||||
`create_fail`,
|
||||
]);
|
||||
// 可删除状态集中列举,已开具、已寄出等终态不开放撤回。
|
||||
function Nt(e) {
|
||||
return Mt.has(String(e.status || ``).toLowerCase());
|
||||
}
|
||||
// 撤回需要状态允许且用户确认;删除后重新读取列表。
|
||||
async function Pt(e) {
|
||||
if (
|
||||
Nt(e) &&
|
||||
|
||||
Reference in new issue
Block a user