Files
console-dev/app/pages/invoices/settings/index.vue
T

1406 lines
53 KiB
Vue

<script>
/**
* 发票资料设置:统一维护抬头与收票地址;编辑器复制原数据,提交按新增/修改及电子/纸质地址分别组装字段。
*/
import "~/assets/styles/settings.zV3AWuRw.css";
import { toDisplayString } from "vue";
import { onMounted } from "vue";
import { useId } from "vue";
import { createBlock } from "vue";
import { ref } from "vue";
import { withCtx } from "vue";
import { createCommentVNode } from "vue";
import { reactive } from "vue";
import { isRef } from "vue";
import { createElementBlock } from "vue";
import { Fragment } from "vue";
import { createElementVNode } from "vue";
import { createTextVNode } from "vue";
import { unref } from "vue";
import { defineComponent } from "vue";
import { createVNode } from "vue";
import { openBlock } from "vue";
import { NuxtLink } from "#components";
import { useApi } from "~/lib/auth.js";
import dialog from "primevue/dialog";
import button from "primevue/button";
import { t as _plugin_vue_export_helper_t } from "~/lib/_plugin-vue_export-helper.js";
import message from "primevue/message";
import inputtext from "primevue/inputtext";
import datatable from "primevue/datatable";
import select from "primevue/select";
import checkbox from "primevue/checkbox";
import column from "primevue/column";
import tag from "primevue/tag";
import { t as invoice_t } from "~/lib/invoice.js";
var ue = {
class: `page`,
},
de = {
class: `page-head`,
},
fe = {
key: 1,
},
pe = {
class: `settings-section`,
},
me = {
class: `settings-content`,
},
he = {
class: `settings-table`,
},
ge = {
class: `row-actions`,
},
_e = {
class: `settings-section`,
},
ve = {
class: `settings-content`,
},
ye = {
class: `settings-table`,
},
be = {
key: 0,
},
xe = {
class: `row-actions`,
},
Se = {
class: `form`,
},
Ce = {
class: `field-row`,
},
we = {
class: `field`,
},
Te = [`id`],
b = {
class: `field`,
},
x = [`id`],
S = {
class: `field`,
},
C = [`for`],
w = {
class: `field`,
},
T = [`for`],
E = {
class: `field`,
},
D = [`for`],
O = {
class: `field-row`,
},
Ee = {
class: `field`,
},
De = [`for`],
Oe = {
class: `field`,
},
ke = [`for`],
Ae = {
class: `form`,
},
je = {
class: `field`,
},
Me = [`id`],
k = {
class: `field`,
},
Ne = [`for`],
Pe = {
class: `field`,
},
Fe = [`for`],
Ie = {
class: `field`,
},
Le = [`for`],
Re = {
class: `field`,
},
ze = [`for`],
Be = {
class: `field`,
},
Ve = [`for`],
He = {
class: `field-check`,
},
Ue = [`for`],
A = _plugin_vue_export_helper_t(
defineComponent({
__name: `index`,
setup(m) {
let v = useApi(),
A = useId();
ref(0);
let j = ref([]),
M = ref([]),
N = ref(!0),
P = ref(``);
// 完整读取抬头与地址的所有分页,避免选择器仅显示第一页资料。
async function F() {
((N.value = !0), (P.value = ``));
try {
let [e, t] = await Promise.all([
invoice_t((e, t) =>
v.get(`/invoice_title`, {
page: e,
limit: t,
}),
),
invoice_t((e, t) =>
v.get(`/invoice_address`, {
page: e,
limit: t,
}),
),
]);
((j.value = e), (M.value = t));
} catch (e) {
P.value = e instanceof Error ? e.message : `加载发票资料失败`;
} finally {
N.value = !1;
}
}
let I = ref(!1),
L = ref(null),
R = ref(!1),
z = ref(``),
B = reactive({
title_type: `company`,
title: ``,
invoice_type: `normal`,
tax: ``,
company_address: ``,
bank: ``,
bank_user: ``,
});
// 重置抬头草稿后回填待编辑记录,避免上次表单字段残留。
function V(e) {
((L.value = e?.id ?? null),
(z.value = ``),
Object.assign(B, {
title_type: `company`,
title: ``,
invoice_type: `normal`,
tax: ``,
company_address: ``,
bank: ``,
bank_user: ``,
}),
e &&
Object.assign(B, {
...e,
company_address: e.company_address || ``,
tax: e.tax || ``,
bank: e.bank || ``,
bank_user: e.bank_user || ``,
invoice_type: e.invoice_type || `normal`,
}),
(I.value = !0));
}
// 抬头名称必填;新增与修改成功后统一重新加载资料列表。
async function We() {
if (!R.value) {
if (((z.value = ``), !B.title.trim())) {
z.value = `请输入发票抬头名称`;
return;
}
R.value = !0;
try {
(L.value
? await v.put(`/invoice_title/${L.value}`, {
...B,
id: L.value,
})
: await v.post(`/invoice_title`, {
...B,
}),
(I.value = !1),
await F());
} catch (e) {
z.value = e instanceof Error ? e.message : `保存失败`;
} finally {
R.value = !1;
}
}
}
// 删除抬头后重载列表,失败在页面保留错误提示。
async function H(e) {
try {
(await v.del(`/invoice_title/${e.id}`), await F());
} catch (e) {
P.value = e instanceof Error ? e.message : `删除失败`;
}
}
let U = ref(!1),
W = ref(null),
G = ref(!1),
K = ref(``),
q = reactive({
rec_type: `email`,
rec_name: ``,
email: ``,
address: ``,
phone: ``,
is_default: !1,
});
// 电子邮箱和纸质地址共用编辑器;打开时恢复默认字段,再复制现有资料。
function J(e) {
((W.value = e?.id ?? null),
(K.value = ``),
Object.assign(q, {
rec_type: `email`,
rec_name: ``,
email: ``,
address: ``,
phone: ``,
is_default: !1,
}),
e &&
Object.assign(q, {
...e,
rec_name: e.rec_name || ``,
email: e.email || ``,
address: e.address || ``,
phone: e.phone || ``,
is_default: !!e.is_default,
}),
(U.value = !0));
}
// 电子地址只提交邮箱,纸质地址提交收件地址与电话,避免把另一种地址的草稿字段发给接口。
async function Ge() {
if (!G.value) {
if (((K.value = ``), q.rec_type === `email` && !q.email.trim())) {
K.value = `请输入邮箱地址`;
return;
}
if (q.rec_type === `paper` && !q.address.trim()) {
K.value = `请输入纸质发票收件地址`;
return;
}
G.value = !0;
try {
let e = {
rec_type: q.rec_type,
rec_name: q.rec_name,
is_default: q.is_default,
};
(q.rec_type === `email`
? (e.email = q.email.trim())
: ((e.address = q.address.trim()), (e.phone = q.phone.trim())),
W.value
? await v.put(`/invoice_address/${W.value}`, {
...e,
id: W.value,
})
: await v.post(`/invoice_address`, e),
(U.value = !1),
await F());
} catch (e) {
K.value = e instanceof Error ? e.message : `保存失败`;
} finally {
G.value = !1;
}
}
}
// 删除收票地址后重载资料。
async function Y(e) {
try {
(await v.del(`/invoice_address/${e.id}`), await F());
} catch (e) {
P.value = e instanceof Error ? e.message : `删除失败`;
}
}
let X = ref(!1),
Z = ref(!1),
Q = ref(null);
// 记录待删除抬头,在确认前不发起删除。
function Ke(e) {
((Q.value = {
kind: `title`,
item: e,
}),
(X.value = !0));
}
// 记录待删除地址,复用同一确认弹窗。
function qe(e) {
((Q.value = {
kind: `address`,
item: e,
}),
(X.value = !0));
}
// 确认时按目标类型调用删除函数,用独立忙碌态阻止重复确认。
async function Je() {
if (Q.value && !Z.value) {
Z.value = !0;
try {
(Q.value.kind === `title`
? await H(Q.value.item)
: await Y(Q.value.item),
(X.value = !1));
} finally {
Z.value = !1;
}
}
}
return (
onMounted(F),
(t, n) => {
let i = NuxtLink,
s = message,
m = button,
_ = column,
v = datatable,
y = tag,
H = dialog,
Y = select,
$ = inputtext,
Ye = checkbox;
return (
openBlock(),
createElementBlock(`div`, ue, [
createElementVNode(`div`, de, [
createVNode(
i,
{
to: `/invoices`,
class: `back`,
},
{
default: withCtx(() => [
...(n[22] ||= [
createElementVNode(
`i`,
{
class: `pi pi-arrow-left`,
},
null,
-1,
),
createTextVNode(` 返回发票管理 `, -1),
]),
]),
_: 1,
},
),
(n[23] ||= createElementVNode(`h2`, null, `发票设置`, -1)),
]),
unref(P)
? (openBlock(),
createBlock(
s,
{
key: 0,
severity: `error`,
closable: !1,
},
{
default: withCtx(() => [
createTextVNode(toDisplayString(unref(P)), 1),
]),
_: 1,
},
))
: createCommentVNode(``, !0),
unref(P)
? (openBlock(),
createElementBlock(`div`, fe, [
createVNode(
m,
{
label: `重新加载发票资料`,
icon: `pi pi-refresh`,
severity: `secondary`,
outlined: ``,
loading: unref(N),
onClick: F,
},
null,
8,
[`loading`],
),
]))
: createCommentVNode(``, !0),
createElementVNode(`div`, pe, [
(n[25] ||= createElementVNode(
`div`,
{
class: `settings-intro`,
},
[
createElementVNode(`h3`, null, `发票抬头`),
createElementVNode(
`p`,
null,
`这里是您申请发票时使用的抬头信息。个人抬头填写姓名,组织机构抬头请使用完整名称与纳税人识别号。`,
),
],
-1,
)),
createElementVNode(`div`, me, [
createElementVNode(`div`, he, [
createVNode(
v,
{
value: unref(j),
loading: unref(N),
},
{
empty: withCtx(() => [
...(n[24] ||= [
createElementVNode(
`div`,
{
class: `empty`,
},
`暂无发票抬头`,
-1,
),
]),
]),
default: withCtx(() => [
createVNode(
_,
{
header: `抬头类型`,
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
toDisplayString(
t.title_type === `company`
? `组织机构`
: `个人`,
),
1,
),
]),
_: 1,
},
),
createVNode(_, {
field: `title`,
header: `抬头`,
}),
createVNode(
_,
{
header: `发票类型`,
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
toDisplayString(
t.invoice_type === `special`
? `增值税专用发票`
: `增值税普通发票`,
),
1,
),
]),
_: 1,
},
),
createVNode(
_,
{
header: `纳税人识别号`,
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
toDisplayString(t.tax || `—`),
1,
),
]),
_: 1,
},
),
createVNode(
_,
{
header: ``,
style: {
width: `90px`,
},
},
{
body: withCtx(({ data: e }) => [
createElementVNode(`div`, ge, [
createVNode(
m,
{
"aria-label": `编辑抬头 ${e.title}`,
icon: `pi pi-pencil`,
severity: `secondary`,
text: ``,
size: `small`,
onClick: (t) => V(e),
},
null,
8,
[`aria-label`, `onClick`],
),
createVNode(
m,
{
"aria-label": `删除抬头 ${e.title}`,
icon: `pi pi-trash`,
severity: `danger`,
text: ``,
size: `small`,
onClick: (t) => Ke(e),
},
null,
8,
[`aria-label`, `onClick`],
),
]),
]),
_: 1,
},
),
]),
_: 1,
},
8,
[`value`, `loading`],
),
]),
createVNode(m, {
label: `添加抬头`,
icon: `pi pi-plus`,
size: `small`,
onClick: (n[0] ||= (e) => V()),
}),
]),
]),
createElementVNode(`div`, _e, [
(n[27] ||= createElementVNode(
`div`,
{
class: `settings-intro`,
},
[
createElementVNode(`h3`, null, `收件地址`),
createElementVNode(
`p`,
null,
`这里是您的发票接收信息,支持电子发票邮箱与纸质发票邮寄地址。`,
),
],
-1,
)),
createElementVNode(`div`, ve, [
createElementVNode(`div`, ye, [
createVNode(
v,
{
value: unref(M),
loading: unref(N),
},
{
empty: withCtx(() => [
...(n[26] ||= [
createElementVNode(
`div`,
{
class: `empty`,
},
`暂无收件地址`,
-1,
),
]),
]),
default: withCtx(() => [
createVNode(
_,
{
header: `收件类型`,
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
toDisplayString(
t.rec_type === `email` ? `电子` : `纸质`,
) + ` `,
1,
),
t.is_default
? (openBlock(),
createBlock(y, {
key: 0,
value: `默认`,
severity: `secondary`,
}))
: createCommentVNode(``, !0),
]),
_: 1,
},
),
createVNode(
_,
{
header: `收件地址`,
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
toDisplayString(
t.email || t.address || `—`,
),
1,
),
]),
_: 1,
},
),
createVNode(
_,
{
header: `收件人`,
},
{
body: withCtx(({ data: t }) => [
createTextVNode(
toDisplayString(t.rec_name || `—`),
1,
),
t.phone
? (openBlock(),
createElementBlock(
`span`,
be,
` / ` + toDisplayString(t.phone),
1,
))
: createCommentVNode(``, !0),
]),
_: 1,
},
),
createVNode(
_,
{
header: ``,
style: {
width: `90px`,
},
},
{
body: withCtx(({ data: e }) => [
createElementVNode(`div`, xe, [
createVNode(
m,
{
"aria-label": `编辑地址 ${e.email || e.address}`,
icon: `pi pi-pencil`,
severity: `secondary`,
text: ``,
size: `small`,
onClick: (t) => J(e),
},
null,
8,
[`aria-label`, `onClick`],
),
createVNode(
m,
{
"aria-label": `删除地址 ${e.email || e.address}`,
icon: `pi pi-trash`,
severity: `danger`,
text: ``,
size: `small`,
onClick: (t) => qe(e),
},
null,
8,
[`aria-label`, `onClick`],
),
]),
]),
_: 1,
},
),
]),
_: 1,
},
8,
[`value`, `loading`],
),
]),
createVNode(m, {
label: `添加地址`,
icon: `pi pi-plus`,
size: `small`,
onClick: (n[1] ||= (e) => J()),
}),
]),
]),
createVNode(
H,
{
visible: unref(X),
"onUpdate:visible": (n[3] ||= (e) =>
isRef(X) ? (X.value = e) : null),
header: `提示`,
modal: ``,
draggable: !1,
closable: !unref(Z),
style: {
width: `min(420px, calc(100vw - 28px))`,
},
},
{
footer: withCtx(() => [
createVNode(
m,
{
label: `取消`,
icon: `pi pi-times`,
severity: `secondary`,
outlined: ``,
disabled: unref(Z),
onClick: (n[2] ||= (e) => (X.value = !1)),
},
null,
8,
[`disabled`],
),
createVNode(
m,
{
label: `确认`,
icon: `pi pi-check`,
severity: `danger`,
loading: unref(Z),
onClick: Je,
},
null,
8,
[`loading`],
),
]),
default: withCtx(() => [
createElementVNode(
`p`,
null,
`确定删除此` +
toDisplayString(
unref(Q)?.kind === `title` ? `抬头` : `地址`,
) +
`吗?`,
1,
),
]),
_: 1,
},
8,
[`visible`, `closable`],
),
createVNode(
H,
{
visible: unref(I),
"onUpdate:visible": (n[12] ||= (e) =>
isRef(I) ? (I.value = e) : null),
header: unref(L) ? `编辑抬头` : `添加抬头`,
modal: ``,
draggable: !1,
style: {
width: `min(480px, calc(100vw - 28px))`,
},
},
{
footer: withCtx(() => [
createVNode(m, {
label: `取消`,
icon: `pi pi-times`,
severity: `secondary`,
outlined: ``,
onClick: (n[11] ||= (e) => (I.value = !1)),
}),
createVNode(
m,
{
label: `确认`,
icon: `pi pi-check`,
loading: unref(R),
onClick: We,
},
null,
8,
[`loading`],
),
]),
default: withCtx(() => [
createElementVNode(`div`, Se, [
unref(z)
? (openBlock(),
createBlock(
s,
{
key: 0,
severity: `error`,
closable: !1,
},
{
default: withCtx(() => [
createTextVNode(toDisplayString(unref(z)), 1),
]),
_: 1,
},
))
: createCommentVNode(``, !0),
createElementVNode(`div`, Ce, [
createElementVNode(`div`, we, [
createElementVNode(
`label`,
{
id: `${unref(A)}-title-type-label`,
},
`抬头类型`,
8,
Te,
),
createVNode(
Y,
{
modelValue: unref(B).title_type,
"onUpdate:modelValue": (n[4] ||= (e) =>
(unref(B).title_type = e)),
"aria-labelledby": `${unref(A)}-title-type-label`,
options: [
{
label: `企业`,
value: `company`,
},
{
label: `个人`,
value: `person`,
},
],
optionLabel: `label`,
optionValue: `value`,
fluid: ``,
},
null,
8,
[`modelValue`, `aria-labelledby`],
),
]),
createElementVNode(`div`, b, [
createElementVNode(
`label`,
{
id: `${unref(A)}-invoice-type-label`,
},
`发票类型`,
8,
x,
),
createVNode(
Y,
{
modelValue: unref(B).invoice_type,
"onUpdate:modelValue": (n[5] ||= (e) =>
(unref(B).invoice_type = e)),
"aria-labelledby": `${unref(A)}-invoice-type-label`,
options: [
{
label: `普通发票`,
value: `normal`,
},
{
label: `专用发票`,
value: `special`,
},
],
optionLabel: `label`,
optionValue: `value`,
fluid: ``,
},
null,
8,
[`modelValue`, `aria-labelledby`],
),
]),
]),
createElementVNode(`div`, S, [
createElementVNode(
`label`,
{
for: `${unref(A)}-title-name`,
},
[
...(n[28] ||= [
createTextVNode(`抬头名称 `, -1),
createElementVNode(
`span`,
{
class: `req`,
},
`*`,
-1,
),
]),
],
8,
C,
),
createVNode(
$,
{
id: `${unref(A)}-title-name`,
"aria-required": `true`,
modelValue: unref(B).title,
"onUpdate:modelValue": (n[6] ||= (e) =>
(unref(B).title = e)),
placeholder: `个人姓名或企业全称`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
unref(B).title_type === `company`
? (openBlock(),
createElementBlock(
Fragment,
{
key: 1,
},
[
createElementVNode(`div`, w, [
createElementVNode(
`label`,
{
for: `${unref(A)}-tax`,
},
`税号`,
8,
T,
),
createVNode(
$,
{
id: `${unref(A)}-tax`,
modelValue: unref(B).tax,
"onUpdate:modelValue": (n[7] ||= (e) =>
(unref(B).tax = e)),
placeholder: `纳税人识别号`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
createElementVNode(`div`, E, [
createElementVNode(
`label`,
{
for: `${unref(A)}-company-address`,
},
`企业地址`,
8,
D,
),
createVNode(
$,
{
id: `${unref(A)}-company-address`,
modelValue: unref(B).company_address,
"onUpdate:modelValue": (n[8] ||= (e) =>
(unref(B).company_address = e)),
placeholder: `注册地址(专票需要)`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
createElementVNode(`div`, O, [
createElementVNode(`div`, Ee, [
createElementVNode(
`label`,
{
for: `${unref(A)}-bank`,
},
`开户银行`,
8,
De,
),
createVNode(
$,
{
id: `${unref(A)}-bank`,
modelValue: unref(B).bank,
"onUpdate:modelValue": (n[9] ||= (e) =>
(unref(B).bank = e)),
placeholder: `开户行(专票需要)`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
createElementVNode(`div`, Oe, [
createElementVNode(
`label`,
{
for: `${unref(A)}-bank-account`,
},
`银行账号`,
8,
ke,
),
createVNode(
$,
{
id: `${unref(A)}-bank-account`,
modelValue: unref(B).bank_user,
"onUpdate:modelValue": (n[10] ||= (e) =>
(unref(B).bank_user = e)),
placeholder: `账号(专票需要)`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
]),
],
64,
))
: createCommentVNode(``, !0),
]),
]),
_: 1,
},
8,
[`visible`, `header`],
),
createVNode(
H,
{
visible: unref(U),
"onUpdate:visible": (n[21] ||= (e) =>
isRef(U) ? (U.value = e) : null),
header: unref(W) ? `编辑地址` : `添加地址`,
modal: ``,
draggable: !1,
style: {
width: `min(480px, calc(100vw - 28px))`,
},
},
{
footer: withCtx(() => [
createVNode(m, {
label: `取消`,
icon: `pi pi-times`,
severity: `secondary`,
outlined: ``,
onClick: (n[20] ||= (e) => (U.value = !1)),
}),
createVNode(
m,
{
label: `确认`,
icon: `pi pi-check`,
loading: unref(G),
onClick: Ge,
},
null,
8,
[`loading`],
),
]),
default: withCtx(() => [
createElementVNode(`div`, Ae, [
unref(K)
? (openBlock(),
createBlock(
s,
{
key: 0,
severity: `error`,
closable: !1,
},
{
default: withCtx(() => [
createTextVNode(toDisplayString(unref(K)), 1),
]),
_: 1,
},
))
: createCommentVNode(``, !0),
createElementVNode(`div`, je, [
createElementVNode(
`label`,
{
id: `${unref(A)}-receive-type-label`,
},
`收票方式`,
8,
Me,
),
createVNode(
Y,
{
modelValue: unref(q).rec_type,
"onUpdate:modelValue": (n[13] ||= (e) =>
(unref(q).rec_type = e)),
"aria-labelledby": `${unref(A)}-receive-type-label`,
options: [
{
label: `电子发票(邮箱)`,
value: `email`,
},
{
label: `纸质发票(邮寄)`,
value: `paper`,
},
],
optionLabel: `label`,
optionValue: `value`,
fluid: ``,
},
null,
8,
[`modelValue`, `aria-labelledby`],
),
]),
unref(q).rec_type === `email`
? (openBlock(),
createElementBlock(
Fragment,
{
key: 1,
},
[
createElementVNode(`div`, k, [
createElementVNode(
`label`,
{
for: `${unref(A)}-email`,
},
[
...(n[29] ||= [
createTextVNode(`接收邮箱 `, -1),
createElementVNode(
`span`,
{
class: `req`,
},
`*`,
-1,
),
]),
],
8,
Ne,
),
createVNode(
$,
{
id: `${unref(A)}-email`,
"aria-required": `true`,
modelValue: unref(q).email,
"onUpdate:modelValue": (n[14] ||= (e) =>
(unref(q).email = e)),
placeholder: `用于接收电子发票`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
createElementVNode(`div`, Pe, [
createElementVNode(
`label`,
{
for: `${unref(A)}-recipient`,
},
`收件人`,
8,
Fe,
),
createVNode(
$,
{
id: `${unref(A)}-recipient`,
modelValue: unref(q).rec_name,
"onUpdate:modelValue": (n[15] ||= (e) =>
(unref(q).rec_name = e)),
placeholder: `选填`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
],
64,
))
: (openBlock(),
createElementBlock(
Fragment,
{
key: 2,
},
[
createElementVNode(`div`, Ie, [
createElementVNode(
`label`,
{
for: `${unref(A)}-recipient`,
},
`收件人`,
8,
Le,
),
createVNode(
$,
{
id: `${unref(A)}-recipient`,
modelValue: unref(q).rec_name,
"onUpdate:modelValue": (n[16] ||= (e) =>
(unref(q).rec_name = e)),
placeholder: `收件人姓名`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
createElementVNode(`div`, Re, [
createElementVNode(
`label`,
{
for: `${unref(A)}-phone`,
},
`联系电话`,
8,
ze,
),
createVNode(
$,
{
id: `${unref(A)}-phone`,
modelValue: unref(q).phone,
"onUpdate:modelValue": (n[17] ||= (e) =>
(unref(q).phone = e)),
placeholder: `手机号`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
createElementVNode(`div`, Be, [
createElementVNode(
`label`,
{
for: `${unref(A)}-address`,
},
[
...(n[30] ||= [
createTextVNode(`邮寄地址 `, -1),
createElementVNode(
`span`,
{
class: `req`,
},
`*`,
-1,
),
]),
],
8,
Ve,
),
createVNode(
$,
{
id: `${unref(A)}-address`,
"aria-required": `true`,
modelValue: unref(q).address,
"onUpdate:modelValue": (n[18] ||= (e) =>
(unref(q).address = e)),
placeholder: `详细地址`,
fluid: ``,
},
null,
8,
[`id`, `modelValue`],
),
]),
],
64,
)),
createElementVNode(`div`, He, [
createVNode(
Ye,
{
modelValue: unref(q).is_default,
"onUpdate:modelValue": (n[19] ||= (e) =>
(unref(q).is_default = e)),
binary: ``,
inputId: `${unref(A)}-default`,
},
null,
8,
[`modelValue`, `inputId`],
),
createElementVNode(
`label`,
{
for: `${unref(A)}-default`,
},
`设为默认地址`,
8,
Ue,
),
]),
]),
]),
_: 1,
},
8,
[`visible`, `header`],
),
])
);
}
);
},
}),
[[`__scopeId`, `data-v-4a007273`]],
);
export {};
export default A;
</script>