@shwfed/config 3.0.13 → 3.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.d.vue.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/config.vue.d.ts +2 -2
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.d.vue.ts +8 -8
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.vue.d.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.vue.d.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.vue.d.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.vue +10 -2
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/schema.js +5 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/config.d.vue.ts +96 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/config.vue +385 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/config.vue.d.ts +96 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/items-colgroup.d.vue.ts +3 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/items-colgroup.vue +20 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/items-colgroup.vue.d.ts +3 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/runtime.d.vue.ts +96 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/runtime.vue +177 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/runtime.vue.d.ts +96 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/schema.d.ts +102 -0
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.realestate.lease/schema.js +186 -0
- package/dist/runtime/components/config/index.d.vue.ts +2 -2
- package/dist/runtime/components/config/index.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/runtime.vue +8 -2
- package/dist/runtime/share/slot-renderer.vue +83 -24
- package/dist/runtime/vendor/cel-js/CLAUDE.md +3 -1
- package/dist/runtime/vendor/cel-js/PROMPT.md +31 -2
- package/dist/runtime/vendor/cel-js/lib/functions.js +28 -1
- package/dist/runtime/vendor/cel-js/lib/registry.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
|
|
2
|
+
import { type Value } from './schema.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
configure?: (env: Environment) => void;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue: Value;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: {
|
|
12
|
+
readonly type: "com.shwfed.block.invoice.realestate.lease";
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly line: {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly quantity?: string | undefined;
|
|
17
|
+
readonly unitPrice?: string | undefined;
|
|
18
|
+
readonly amount: string;
|
|
19
|
+
readonly taxRate?: string | undefined;
|
|
20
|
+
readonly taxAmount?: string | undefined;
|
|
21
|
+
readonly certNo?: string | undefined;
|
|
22
|
+
readonly areaUnit?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
readonly hidden?: string | undefined;
|
|
25
|
+
readonly displayName?: string | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-07-17";
|
|
27
|
+
readonly items: string;
|
|
28
|
+
readonly request?: string | undefined;
|
|
29
|
+
readonly invoiceNumber: string;
|
|
30
|
+
readonly issueDate: string;
|
|
31
|
+
readonly buyer: {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly taxId: string;
|
|
34
|
+
};
|
|
35
|
+
readonly seller: {
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly taxId: string;
|
|
38
|
+
};
|
|
39
|
+
readonly grandTotal: string;
|
|
40
|
+
readonly issuer?: string | undefined;
|
|
41
|
+
readonly redLetter?: string | undefined;
|
|
42
|
+
readonly itemsMaxHeight?: string | undefined;
|
|
43
|
+
readonly remark: {
|
|
44
|
+
readonly address: string;
|
|
45
|
+
readonly leasePeriod: string;
|
|
46
|
+
readonly crossCity: string;
|
|
47
|
+
};
|
|
48
|
+
readonly totalAmount: string;
|
|
49
|
+
readonly totalTax: string;
|
|
50
|
+
readonly kindLabel: string;
|
|
51
|
+
}) => any;
|
|
52
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
53
|
+
"onUpdate:modelValue"?: ((value: {
|
|
54
|
+
readonly type: "com.shwfed.block.invoice.realestate.lease";
|
|
55
|
+
readonly id: string;
|
|
56
|
+
readonly line: {
|
|
57
|
+
readonly name: string;
|
|
58
|
+
readonly quantity?: string | undefined;
|
|
59
|
+
readonly unitPrice?: string | undefined;
|
|
60
|
+
readonly amount: string;
|
|
61
|
+
readonly taxRate?: string | undefined;
|
|
62
|
+
readonly taxAmount?: string | undefined;
|
|
63
|
+
readonly certNo?: string | undefined;
|
|
64
|
+
readonly areaUnit?: string | undefined;
|
|
65
|
+
};
|
|
66
|
+
readonly hidden?: string | undefined;
|
|
67
|
+
readonly displayName?: string | undefined;
|
|
68
|
+
readonly compatibilityDate: "2026-07-17";
|
|
69
|
+
readonly items: string;
|
|
70
|
+
readonly request?: string | undefined;
|
|
71
|
+
readonly invoiceNumber: string;
|
|
72
|
+
readonly issueDate: string;
|
|
73
|
+
readonly buyer: {
|
|
74
|
+
readonly name: string;
|
|
75
|
+
readonly taxId: string;
|
|
76
|
+
};
|
|
77
|
+
readonly seller: {
|
|
78
|
+
readonly name: string;
|
|
79
|
+
readonly taxId: string;
|
|
80
|
+
};
|
|
81
|
+
readonly grandTotal: string;
|
|
82
|
+
readonly issuer?: string | undefined;
|
|
83
|
+
readonly redLetter?: string | undefined;
|
|
84
|
+
readonly itemsMaxHeight?: string | undefined;
|
|
85
|
+
readonly remark: {
|
|
86
|
+
readonly address: string;
|
|
87
|
+
readonly leasePeriod: string;
|
|
88
|
+
readonly crossCity: string;
|
|
89
|
+
};
|
|
90
|
+
readonly totalAmount: string;
|
|
91
|
+
readonly totalTax: string;
|
|
92
|
+
readonly kindLabel: string;
|
|
93
|
+
}) => any) | undefined;
|
|
94
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
95
|
+
declare const _default: typeof __VLS_export;
|
|
96
|
+
export default _default;
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { Field, FieldLabel } from "../../../../ui/field";
|
|
4
|
+
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
5
|
+
import {
|
|
6
|
+
InvoiceConfigShell,
|
|
7
|
+
InvoiceExprField,
|
|
8
|
+
InvoiceJsonScope,
|
|
9
|
+
InvoiceRowScope
|
|
10
|
+
} from "../../../../ui/invoice-config";
|
|
11
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
12
|
+
import {
|
|
13
|
+
BUSINESS_LABEL,
|
|
14
|
+
getStructFieldDescription,
|
|
15
|
+
getStructFieldTitle,
|
|
16
|
+
lineSchema,
|
|
17
|
+
partySchema,
|
|
18
|
+
remarkSchema,
|
|
19
|
+
schema
|
|
20
|
+
} from "./schema";
|
|
21
|
+
defineOptions({ name: "ShwfedBlockInvoiceRealestateLeaseConfig" });
|
|
22
|
+
const block = defineModel({ type: null, ...{ required: true } });
|
|
23
|
+
defineProps({
|
|
24
|
+
configure: { type: Function, required: false }
|
|
25
|
+
});
|
|
26
|
+
const blockSchema = schema(() => {
|
|
27
|
+
});
|
|
28
|
+
const buyerSchema = partySchema(() => {
|
|
29
|
+
}, "\u8D2D\u4E70\u65B9");
|
|
30
|
+
const sellerSchema = partySchema(() => {
|
|
31
|
+
}, "\u9500\u552E\u65B9");
|
|
32
|
+
const lineSchemaObj = lineSchema(() => {
|
|
33
|
+
});
|
|
34
|
+
const remarkSchemaObj = remarkSchema(() => {
|
|
35
|
+
});
|
|
36
|
+
const fieldTitle = (f) => getStructFieldTitle(blockSchema, f) ?? f;
|
|
37
|
+
const fieldDescription = (f) => getStructFieldDescription(blockSchema, f);
|
|
38
|
+
const buyerTitle = (f) => getStructFieldTitle(buyerSchema, f) ?? f;
|
|
39
|
+
const buyerDescription = (f) => getStructFieldDescription(buyerSchema, f);
|
|
40
|
+
const sellerTitle = (f) => getStructFieldTitle(sellerSchema, f) ?? f;
|
|
41
|
+
const sellerDescription = (f) => getStructFieldDescription(sellerSchema, f);
|
|
42
|
+
const lineTitle = (f) => getStructFieldTitle(lineSchemaObj, f) ?? f;
|
|
43
|
+
const lineDescription = (f) => getStructFieldDescription(lineSchemaObj, f);
|
|
44
|
+
const remarkTitle = (f) => getStructFieldTitle(remarkSchemaObj, f) ?? f;
|
|
45
|
+
const remarkDescription = (f) => getStructFieldDescription(remarkSchemaObj, f);
|
|
46
|
+
const SECTIONS = [
|
|
47
|
+
{ key: "general", label: "\u901A\u7528\u914D\u7F6E", icon: "fluent:settings-20-regular" },
|
|
48
|
+
{ key: "head", label: "\u62AC\u5934", icon: "fluent:receipt-20-regular" },
|
|
49
|
+
{ key: "parties", label: "\u8D2D\u9500\u53CC\u65B9", icon: "fluent:people-20-regular" },
|
|
50
|
+
{ key: "items", label: "\u660E\u7EC6", icon: "fluent:apps-list-20-regular" },
|
|
51
|
+
{ key: "totals", label: "\u5408\u8BA1", icon: "fluent:calculator-20-regular" },
|
|
52
|
+
{ key: "remark", label: "\u5907\u6CE8\u4E0E\u7B7E\u53D1", icon: "fluent:note-20-regular" }
|
|
53
|
+
];
|
|
54
|
+
const section = ref("general");
|
|
55
|
+
function setDisplayName(v) {
|
|
56
|
+
const s = String(v ?? "");
|
|
57
|
+
block.value = { ...block.value, displayName: s.length > 0 ? s : void 0 };
|
|
58
|
+
}
|
|
59
|
+
function setRequired(field, v) {
|
|
60
|
+
block.value = { ...block.value, [field]: v };
|
|
61
|
+
}
|
|
62
|
+
function setOptional(field, v) {
|
|
63
|
+
block.value = { ...block.value, [field]: v.trim().length > 0 ? v : void 0 };
|
|
64
|
+
}
|
|
65
|
+
function setItemsMaxHeight(v) {
|
|
66
|
+
const s = String(v ?? "").trim();
|
|
67
|
+
block.value = { ...block.value, itemsMaxHeight: s.length > 0 ? s : void 0 };
|
|
68
|
+
}
|
|
69
|
+
function setParty(party, field, v) {
|
|
70
|
+
block.value = { ...block.value, [party]: { ...block.value[party], [field]: v } };
|
|
71
|
+
}
|
|
72
|
+
function setLineRequired(field, v) {
|
|
73
|
+
block.value = { ...block.value, line: { ...block.value.line, [field]: v } };
|
|
74
|
+
}
|
|
75
|
+
function setLineOptional(field, v) {
|
|
76
|
+
block.value = {
|
|
77
|
+
...block.value,
|
|
78
|
+
line: { ...block.value.line, [field]: v.trim().length > 0 ? v : void 0 }
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function setRemark(field, v) {
|
|
82
|
+
block.value = { ...block.value, remark: { ...block.value.remark, [field]: v } };
|
|
83
|
+
}
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<template>
|
|
87
|
+
<InvoiceConfigShell
|
|
88
|
+
v-model:section="section"
|
|
89
|
+
:sections="SECTIONS"
|
|
90
|
+
>
|
|
91
|
+
<template v-if="section === 'general'">
|
|
92
|
+
<Field orientation="vertical">
|
|
93
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
94
|
+
<template
|
|
95
|
+
v-if="fieldDescription('displayName')"
|
|
96
|
+
#tooltip
|
|
97
|
+
>
|
|
98
|
+
<Markdown
|
|
99
|
+
:source="fieldDescription('displayName')"
|
|
100
|
+
block
|
|
101
|
+
class="prose prose-sm prose-zinc"
|
|
102
|
+
/>
|
|
103
|
+
</template>
|
|
104
|
+
{{ fieldTitle("displayName") }}
|
|
105
|
+
</FieldLabel>
|
|
106
|
+
<InputGroup>
|
|
107
|
+
<InputGroupInput
|
|
108
|
+
:model-value="block.displayName ?? ''"
|
|
109
|
+
placeholder="例:房租发票预览"
|
|
110
|
+
@update:model-value="setDisplayName"
|
|
111
|
+
/>
|
|
112
|
+
</InputGroup>
|
|
113
|
+
</Field>
|
|
114
|
+
|
|
115
|
+
<!-- 业务标签印死在这张票上(见 schema 的 BUSINESS_LABEL)——它标识票种本身而不是
|
|
116
|
+
一栏数据,故只陈述、不给编辑。 -->
|
|
117
|
+
<Field orientation="vertical">
|
|
118
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
119
|
+
业务标签
|
|
120
|
+
</FieldLabel>
|
|
121
|
+
<p class="text-xs text-zinc-400">
|
|
122
|
+
固定为「{{ BUSINESS_LABEL }}」,印在票面左上角,不可配置。
|
|
123
|
+
</p>
|
|
124
|
+
</Field>
|
|
125
|
+
|
|
126
|
+
<!-- 「隐藏条件」与「请求」同在 InvoiceJsonScope 之外:前者由宿主在渲染本块之前
|
|
127
|
+
求值(`json` 尚不存在),后者就是产出 `json` 的那个表达式。 -->
|
|
128
|
+
<InvoiceExprField
|
|
129
|
+
:label="fieldTitle('hidden')"
|
|
130
|
+
:description="fieldDescription('hidden')"
|
|
131
|
+
:model-value="block.hidden ?? ''"
|
|
132
|
+
placeholder="可选;返回 bool,如 item.fplx != 'zl'"
|
|
133
|
+
@update:model-value="(v) => setOptional('hidden', v)"
|
|
134
|
+
/>
|
|
135
|
+
|
|
136
|
+
<InvoiceExprField
|
|
137
|
+
:label="fieldTitle('request')"
|
|
138
|
+
:description="fieldDescription('request')"
|
|
139
|
+
:model-value="block.request ?? ''"
|
|
140
|
+
placeholder="可选;如 http.get('/api/invoice/' + item.id)"
|
|
141
|
+
multiline
|
|
142
|
+
@update:model-value="(v) => setOptional('request', v)"
|
|
143
|
+
/>
|
|
144
|
+
</template>
|
|
145
|
+
|
|
146
|
+
<!-- 除「通用配置」外的每个分区都在 `json` 作用域内 —— `请求` 的响应体票面各栏
|
|
147
|
+
都能读。Provider 本身不渲染元素,所以外层 flex 布局不受影响。 -->
|
|
148
|
+
<InvoiceJsonScope v-else>
|
|
149
|
+
<template v-if="section === 'head'">
|
|
150
|
+
<InvoiceExprField
|
|
151
|
+
:label="fieldTitle('kindLabel')"
|
|
152
|
+
:description="fieldDescription('kindLabel')"
|
|
153
|
+
:model-value="block.kindLabel"
|
|
154
|
+
placeholder="如 '增值税专用发票' 或 json.fpzl"
|
|
155
|
+
@update:model-value="(v) => setRequired('kindLabel', v)"
|
|
156
|
+
/>
|
|
157
|
+
<InvoiceExprField
|
|
158
|
+
:label="fieldTitle('invoiceNumber')"
|
|
159
|
+
:description="fieldDescription('invoiceNumber')"
|
|
160
|
+
:model-value="block.invoiceNumber"
|
|
161
|
+
placeholder="如 json.fphm"
|
|
162
|
+
@update:model-value="(v) => setRequired('invoiceNumber', v)"
|
|
163
|
+
/>
|
|
164
|
+
<InvoiceExprField
|
|
165
|
+
:label="fieldTitle('issueDate')"
|
|
166
|
+
:description="fieldDescription('issueDate')"
|
|
167
|
+
:model-value="block.issueDate"
|
|
168
|
+
placeholder="如 json.kprq"
|
|
169
|
+
@update:model-value="(v) => setRequired('issueDate', v)"
|
|
170
|
+
/>
|
|
171
|
+
</template>
|
|
172
|
+
|
|
173
|
+
<template v-else-if="section === 'parties'">
|
|
174
|
+
<div class="text-xs font-medium text-zinc-500">
|
|
175
|
+
购买方信息
|
|
176
|
+
</div>
|
|
177
|
+
<InvoiceExprField
|
|
178
|
+
:label="buyerTitle('name')"
|
|
179
|
+
:description="buyerDescription('name')"
|
|
180
|
+
:model-value="block.buyer.name"
|
|
181
|
+
placeholder="如 json.gf.mc"
|
|
182
|
+
@update:model-value="(v) => setParty('buyer', 'name', v)"
|
|
183
|
+
/>
|
|
184
|
+
<InvoiceExprField
|
|
185
|
+
:label="buyerTitle('taxId')"
|
|
186
|
+
:description="buyerDescription('taxId')"
|
|
187
|
+
:model-value="block.buyer.taxId"
|
|
188
|
+
placeholder="如 json.gf.nsrsbh"
|
|
189
|
+
@update:model-value="(v) => setParty('buyer', 'taxId', v)"
|
|
190
|
+
/>
|
|
191
|
+
|
|
192
|
+
<div class="mt-2 text-xs font-medium text-zinc-500">
|
|
193
|
+
销售方信息
|
|
194
|
+
</div>
|
|
195
|
+
<InvoiceExprField
|
|
196
|
+
:label="sellerTitle('name')"
|
|
197
|
+
:description="sellerDescription('name')"
|
|
198
|
+
:model-value="block.seller.name"
|
|
199
|
+
placeholder="如 json.xf.mc"
|
|
200
|
+
@update:model-value="(v) => setParty('seller', 'name', v)"
|
|
201
|
+
/>
|
|
202
|
+
<InvoiceExprField
|
|
203
|
+
:label="sellerTitle('taxId')"
|
|
204
|
+
:description="sellerDescription('taxId')"
|
|
205
|
+
:model-value="block.seller.taxId"
|
|
206
|
+
placeholder="如 json.xf.nsrsbh"
|
|
207
|
+
@update:model-value="(v) => setParty('seller', 'taxId', v)"
|
|
208
|
+
/>
|
|
209
|
+
</template>
|
|
210
|
+
|
|
211
|
+
<template v-else-if="section === 'items'">
|
|
212
|
+
<Field orientation="vertical">
|
|
213
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
214
|
+
<template
|
|
215
|
+
v-if="fieldDescription('itemsMaxHeight')"
|
|
216
|
+
#tooltip
|
|
217
|
+
>
|
|
218
|
+
<Markdown
|
|
219
|
+
:source="fieldDescription('itemsMaxHeight')"
|
|
220
|
+
block
|
|
221
|
+
class="prose prose-sm prose-zinc"
|
|
222
|
+
/>
|
|
223
|
+
</template>
|
|
224
|
+
{{ fieldTitle("itemsMaxHeight") }}
|
|
225
|
+
</FieldLabel>
|
|
226
|
+
<InputGroup>
|
|
227
|
+
<InputGroupInput
|
|
228
|
+
:model-value="block.itemsMaxHeight ?? ''"
|
|
229
|
+
placeholder="可选;如 24rem。留空则明细区随行数增长"
|
|
230
|
+
@update:model-value="setItemsMaxHeight"
|
|
231
|
+
/>
|
|
232
|
+
</InputGroup>
|
|
233
|
+
</Field>
|
|
234
|
+
|
|
235
|
+
<!-- `明细列表` 在页面作用域求值(没有「当前行」),故在 InvoiceRowScope 之外 -->
|
|
236
|
+
<InvoiceExprField
|
|
237
|
+
:label="fieldTitle('items')"
|
|
238
|
+
:description="fieldDescription('items')"
|
|
239
|
+
:model-value="block.items"
|
|
240
|
+
placeholder="返回明细列表的表达式,如 json.mxList"
|
|
241
|
+
multiline
|
|
242
|
+
@update:model-value="(v) => setRequired('items', v)"
|
|
243
|
+
/>
|
|
244
|
+
|
|
245
|
+
<!-- 行内栏位可见 item / index;广告作用域与 schema 的 lineSchema 一致 -->
|
|
246
|
+
<InvoiceRowScope>
|
|
247
|
+
<div class="flex flex-col gap-3">
|
|
248
|
+
<div class="text-xs font-medium text-zinc-500">
|
|
249
|
+
明细行
|
|
250
|
+
</div>
|
|
251
|
+
<InvoiceExprField
|
|
252
|
+
:label="lineTitle('name')"
|
|
253
|
+
:description="lineDescription('name')"
|
|
254
|
+
:model-value="block.line.name"
|
|
255
|
+
placeholder="如 item.xmmc"
|
|
256
|
+
@update:model-value="(v) => setLineRequired('name', v)"
|
|
257
|
+
/>
|
|
258
|
+
<InvoiceExprField
|
|
259
|
+
:label="lineTitle('certNo')"
|
|
260
|
+
:description="lineDescription('certNo')"
|
|
261
|
+
:model-value="block.line.certNo ?? ''"
|
|
262
|
+
placeholder="可选;如 item.cqzsh"
|
|
263
|
+
@update:model-value="(v) => setLineOptional('certNo', v)"
|
|
264
|
+
/>
|
|
265
|
+
<InvoiceExprField
|
|
266
|
+
:label="lineTitle('areaUnit')"
|
|
267
|
+
:description="lineDescription('areaUnit')"
|
|
268
|
+
:model-value="block.line.areaUnit ?? ''"
|
|
269
|
+
placeholder="可选;如 item.mjdw(如「平方米」)"
|
|
270
|
+
@update:model-value="(v) => setLineOptional('areaUnit', v)"
|
|
271
|
+
/>
|
|
272
|
+
<InvoiceExprField
|
|
273
|
+
:label="lineTitle('quantity')"
|
|
274
|
+
:description="lineDescription('quantity')"
|
|
275
|
+
:model-value="block.line.quantity ?? ''"
|
|
276
|
+
placeholder="可选;如 item.sl"
|
|
277
|
+
@update:model-value="(v) => setLineOptional('quantity', v)"
|
|
278
|
+
/>
|
|
279
|
+
<InvoiceExprField
|
|
280
|
+
:label="lineTitle('unitPrice')"
|
|
281
|
+
:description="lineDescription('unitPrice')"
|
|
282
|
+
:model-value="block.line.unitPrice ?? ''"
|
|
283
|
+
placeholder="可选;如 item.dj"
|
|
284
|
+
@update:model-value="(v) => setLineOptional('unitPrice', v)"
|
|
285
|
+
/>
|
|
286
|
+
<InvoiceExprField
|
|
287
|
+
:label="lineTitle('amount')"
|
|
288
|
+
:description="lineDescription('amount')"
|
|
289
|
+
:model-value="block.line.amount"
|
|
290
|
+
placeholder="如 item.je"
|
|
291
|
+
@update:model-value="(v) => setLineRequired('amount', v)"
|
|
292
|
+
/>
|
|
293
|
+
<InvoiceExprField
|
|
294
|
+
:label="lineTitle('taxRate')"
|
|
295
|
+
:description="lineDescription('taxRate')"
|
|
296
|
+
:model-value="block.line.taxRate ?? ''"
|
|
297
|
+
placeholder="可选;如 item.slv(原样打印,可为「免税」)"
|
|
298
|
+
@update:model-value="(v) => setLineOptional('taxRate', v)"
|
|
299
|
+
/>
|
|
300
|
+
<InvoiceExprField
|
|
301
|
+
:label="lineTitle('taxAmount')"
|
|
302
|
+
:description="lineDescription('taxAmount')"
|
|
303
|
+
:model-value="block.line.taxAmount ?? ''"
|
|
304
|
+
placeholder="可选;如 item.se"
|
|
305
|
+
@update:model-value="(v) => setLineOptional('taxAmount', v)"
|
|
306
|
+
/>
|
|
307
|
+
</div>
|
|
308
|
+
</InvoiceRowScope>
|
|
309
|
+
</template>
|
|
310
|
+
|
|
311
|
+
<template v-else-if="section === 'totals'">
|
|
312
|
+
<InvoiceExprField
|
|
313
|
+
:label="fieldTitle('totalAmount')"
|
|
314
|
+
:description="fieldDescription('totalAmount')"
|
|
315
|
+
:model-value="block.totalAmount"
|
|
316
|
+
placeholder="如 json.hjje"
|
|
317
|
+
@update:model-value="(v) => setRequired('totalAmount', v)"
|
|
318
|
+
/>
|
|
319
|
+
<InvoiceExprField
|
|
320
|
+
:label="fieldTitle('totalTax')"
|
|
321
|
+
:description="fieldDescription('totalTax')"
|
|
322
|
+
:model-value="block.totalTax"
|
|
323
|
+
placeholder="如 json.hjse"
|
|
324
|
+
@update:model-value="(v) => setRequired('totalTax', v)"
|
|
325
|
+
/>
|
|
326
|
+
<InvoiceExprField
|
|
327
|
+
:label="fieldTitle('grandTotal')"
|
|
328
|
+
:description="fieldDescription('grandTotal')"
|
|
329
|
+
:model-value="block.grandTotal"
|
|
330
|
+
placeholder="如 json.jshj"
|
|
331
|
+
@update:model-value="(v) => setRequired('grandTotal', v)"
|
|
332
|
+
/>
|
|
333
|
+
<p class="text-xs text-zinc-400">
|
|
334
|
+
大写栏由「价税合计」本地推导,无需配置。
|
|
335
|
+
</p>
|
|
336
|
+
</template>
|
|
337
|
+
|
|
338
|
+
<template v-else-if="section === 'remark'">
|
|
339
|
+
<!-- 备注三栏是税总规定这张票必印的,故逐栏建模、逐栏必填;不是一段自由文本 -->
|
|
340
|
+
<div class="text-xs font-medium text-zinc-500">
|
|
341
|
+
备注
|
|
342
|
+
</div>
|
|
343
|
+
<InvoiceExprField
|
|
344
|
+
:label="remarkTitle('address')"
|
|
345
|
+
:description="remarkDescription('address')"
|
|
346
|
+
:model-value="block.remark.address"
|
|
347
|
+
placeholder="如 json.bdcdz"
|
|
348
|
+
@update:model-value="(v) => setRemark('address', v)"
|
|
349
|
+
/>
|
|
350
|
+
<InvoiceExprField
|
|
351
|
+
:label="remarkTitle('leasePeriod')"
|
|
352
|
+
:description="remarkDescription('leasePeriod')"
|
|
353
|
+
:model-value="block.remark.leasePeriod"
|
|
354
|
+
placeholder="如 json.zlqq + '-' + json.zlqz"
|
|
355
|
+
@update:model-value="(v) => setRemark('leasePeriod', v)"
|
|
356
|
+
/>
|
|
357
|
+
<InvoiceExprField
|
|
358
|
+
:label="remarkTitle('crossCity')"
|
|
359
|
+
:description="remarkDescription('crossCity')"
|
|
360
|
+
:model-value="block.remark.crossCity"
|
|
361
|
+
placeholder="返回 bool,如 json.kdsbz"
|
|
362
|
+
@update:model-value="(v) => setRemark('crossCity', v)"
|
|
363
|
+
/>
|
|
364
|
+
|
|
365
|
+
<div class="mt-2 text-xs font-medium text-zinc-500">
|
|
366
|
+
签发
|
|
367
|
+
</div>
|
|
368
|
+
<InvoiceExprField
|
|
369
|
+
:label="fieldTitle('issuer')"
|
|
370
|
+
:description="fieldDescription('issuer')"
|
|
371
|
+
:model-value="block.issuer ?? ''"
|
|
372
|
+
placeholder="可选;如 json.kpr"
|
|
373
|
+
@update:model-value="(v) => setOptional('issuer', v)"
|
|
374
|
+
/>
|
|
375
|
+
<InvoiceExprField
|
|
376
|
+
:label="fieldTitle('redLetter')"
|
|
377
|
+
:description="fieldDescription('redLetter')"
|
|
378
|
+
:model-value="block.redLetter ?? ''"
|
|
379
|
+
placeholder="可选;返回 bool,如 json.jshj < 0.0"
|
|
380
|
+
@update:model-value="(v) => setOptional('redLetter', v)"
|
|
381
|
+
/>
|
|
382
|
+
</template>
|
|
383
|
+
</InvoiceJsonScope>
|
|
384
|
+
</InvoiceConfigShell>
|
|
385
|
+
</template>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
|
|
2
|
+
import { type Value } from './schema.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
configure?: (env: Environment) => void;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue: Value;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: {
|
|
12
|
+
readonly type: "com.shwfed.block.invoice.realestate.lease";
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly line: {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly quantity?: string | undefined;
|
|
17
|
+
readonly unitPrice?: string | undefined;
|
|
18
|
+
readonly amount: string;
|
|
19
|
+
readonly taxRate?: string | undefined;
|
|
20
|
+
readonly taxAmount?: string | undefined;
|
|
21
|
+
readonly certNo?: string | undefined;
|
|
22
|
+
readonly areaUnit?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
readonly hidden?: string | undefined;
|
|
25
|
+
readonly displayName?: string | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-07-17";
|
|
27
|
+
readonly items: string;
|
|
28
|
+
readonly request?: string | undefined;
|
|
29
|
+
readonly invoiceNumber: string;
|
|
30
|
+
readonly issueDate: string;
|
|
31
|
+
readonly buyer: {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly taxId: string;
|
|
34
|
+
};
|
|
35
|
+
readonly seller: {
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly taxId: string;
|
|
38
|
+
};
|
|
39
|
+
readonly grandTotal: string;
|
|
40
|
+
readonly issuer?: string | undefined;
|
|
41
|
+
readonly redLetter?: string | undefined;
|
|
42
|
+
readonly itemsMaxHeight?: string | undefined;
|
|
43
|
+
readonly remark: {
|
|
44
|
+
readonly address: string;
|
|
45
|
+
readonly leasePeriod: string;
|
|
46
|
+
readonly crossCity: string;
|
|
47
|
+
};
|
|
48
|
+
readonly totalAmount: string;
|
|
49
|
+
readonly totalTax: string;
|
|
50
|
+
readonly kindLabel: string;
|
|
51
|
+
}) => any;
|
|
52
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
53
|
+
"onUpdate:modelValue"?: ((value: {
|
|
54
|
+
readonly type: "com.shwfed.block.invoice.realestate.lease";
|
|
55
|
+
readonly id: string;
|
|
56
|
+
readonly line: {
|
|
57
|
+
readonly name: string;
|
|
58
|
+
readonly quantity?: string | undefined;
|
|
59
|
+
readonly unitPrice?: string | undefined;
|
|
60
|
+
readonly amount: string;
|
|
61
|
+
readonly taxRate?: string | undefined;
|
|
62
|
+
readonly taxAmount?: string | undefined;
|
|
63
|
+
readonly certNo?: string | undefined;
|
|
64
|
+
readonly areaUnit?: string | undefined;
|
|
65
|
+
};
|
|
66
|
+
readonly hidden?: string | undefined;
|
|
67
|
+
readonly displayName?: string | undefined;
|
|
68
|
+
readonly compatibilityDate: "2026-07-17";
|
|
69
|
+
readonly items: string;
|
|
70
|
+
readonly request?: string | undefined;
|
|
71
|
+
readonly invoiceNumber: string;
|
|
72
|
+
readonly issueDate: string;
|
|
73
|
+
readonly buyer: {
|
|
74
|
+
readonly name: string;
|
|
75
|
+
readonly taxId: string;
|
|
76
|
+
};
|
|
77
|
+
readonly seller: {
|
|
78
|
+
readonly name: string;
|
|
79
|
+
readonly taxId: string;
|
|
80
|
+
};
|
|
81
|
+
readonly grandTotal: string;
|
|
82
|
+
readonly issuer?: string | undefined;
|
|
83
|
+
readonly redLetter?: string | undefined;
|
|
84
|
+
readonly itemsMaxHeight?: string | undefined;
|
|
85
|
+
readonly remark: {
|
|
86
|
+
readonly address: string;
|
|
87
|
+
readonly leasePeriod: string;
|
|
88
|
+
readonly crossCity: string;
|
|
89
|
+
};
|
|
90
|
+
readonly totalAmount: string;
|
|
91
|
+
readonly totalTax: string;
|
|
92
|
+
readonly kindLabel: string;
|
|
93
|
+
}) => any) | undefined;
|
|
94
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
95
|
+
declare const _default: typeof __VLS_export;
|
|
96
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineOptions({ name: "ShwfedBlockInvoiceRealestateLeaseItemsColgroup" });
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<colgroup>
|
|
7
|
+
<col class="col-name">
|
|
8
|
+
<col class="col-cert">
|
|
9
|
+
<col class="col-area-unit">
|
|
10
|
+
<col class="col-quantity">
|
|
11
|
+
<col class="col-num">
|
|
12
|
+
<col class="col-num">
|
|
13
|
+
<col class="col-rate">
|
|
14
|
+
<col class="col-num">
|
|
15
|
+
</colgroup>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<style scoped>
|
|
19
|
+
.col-name{width:22%}.col-cert{width:16%}.col-area-unit{width:8%}.col-quantity{width:10%}.col-num,.col-rate{width:11%}
|
|
20
|
+
</style>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|