@shwfed/config 3.0.13 → 3.0.15
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/module.mjs +20 -1
- package/dist/runtime/components/actions/ai-l1.md +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/prompt.md +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.d.ts +1 -1
- package/dist/runtime/components/actions/buttons/2026-05-21/com.shwfed.actions.button.http.download/schema.js +2 -2
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/prompt.md +1 -1
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/runtime.vue +1 -1
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/schema.d.ts +2 -4
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/schema.js +1 -1
- package/dist/runtime/components/actions/components/trigger-row-scope.vue +6 -3
- package/dist/runtime/components/actions/utils/steps.d.ts +1 -1
- 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/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/prompt.md +1 -1
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/RichTextEditor.d.vue.ts +33 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/RichTextEditor.vue +269 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/RichTextEditor.vue.d.ts +33 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/config.d.vue.ts +107 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/config.vue +370 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/config.vue.d.ts +107 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/extensions.d.ts +27 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/extensions.js +83 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/features.d.ts +21 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/features.js +16 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/indent.d.ts +26 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/indent.js +64 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/prompt.md +33 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/runtime.vue +121 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/schema.d.ts +133 -0
- package/dist/runtime/components/form/fields/2026-07-18/com.shwfed.form.field.richtext/schema.js +65 -0
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/runtime.js +16 -4
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.js +10 -3
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.js +2 -2
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/schema.js +1 -1
- package/dist/runtime/components/operations/utils/resolve.d.ts +1 -1
- package/dist/runtime/components/operations/utils/step-vars.d.ts +16 -4
- package/dist/runtime/components/operations/utils/step-vars.js +14 -1
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-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 +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-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 +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/prompt.md +1 -1
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/runtime.vue +8 -2
- package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +8 -4
- package/dist/runtime/components/ui/calendar/Calendar.vue +39 -10
- package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +8 -4
- package/dist/runtime/components/ui/date-picker/DatePicker.vue +3 -1
- package/dist/runtime/components/ui/date-picker/DatePickerDatePanel.vue +6 -0
- package/dist/runtime/components/ui/date-picker/DatePickerDateTimePanel.vue +6 -0
- package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue +7 -9
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePicker.vue +10 -7
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +3 -5
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue +28 -26
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +3 -5
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
- package/dist/runtime/components/ui/expression-editor/picker-entries.js +1 -1
- package/dist/runtime/components/ui/expression-editor/step-chip-extension.js +1 -1
- package/dist/runtime/components/ui/expression-editor/step-refs.js +1 -1
- package/dist/runtime/components/ui/range-calendar/RangeCalendar.d.vue.ts +5 -5
- package/dist/runtime/components/ui/range-calendar/RangeCalendar.vue +22 -5
- package/dist/runtime/components/ui/range-calendar/RangeCalendar.vue.d.ts +5 -5
- package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +0 -1
- package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +0 -1
- package/dist/runtime/share/event-bus.d.ts +16 -0
- package/dist/runtime/share/event-bus.js +18 -13
- package/dist/runtime/share/idempotency-key.d.ts +18 -0
- package/dist/runtime/share/idempotency-key.js +9 -0
- package/dist/runtime/share/slot-renderer.vue +83 -24
- package/dist/runtime/utils/cel-context.d.ts +3 -2
- package/dist/runtime/utils/cel-context.js +1 -0
- 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 +8 -1
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useInvoiceEval } from "../../../../../share/invoice-eval";
|
|
4
|
+
import { InvoiceSheet } from "../../../../ui/invoice";
|
|
5
|
+
import ItemsColgroup from "./items-colgroup.vue";
|
|
6
|
+
import { BUSINESS_LABEL } from "./schema";
|
|
7
|
+
defineOptions({ name: "ShwfedBlockInvoiceRealestateLeaseRuntime" });
|
|
8
|
+
const block = defineModel("block", { type: null, ...{ required: true } });
|
|
9
|
+
defineProps({
|
|
10
|
+
configure: { type: Function, required: false }
|
|
11
|
+
});
|
|
12
|
+
const { evaluate, text, money, plain, bool, capital } = useInvoiceEval(() => block.value.request);
|
|
13
|
+
const title = computed(() => {
|
|
14
|
+
const kind = text(block.value.kindLabel);
|
|
15
|
+
return kind ? `\u7535\u5B50\u53D1\u7968\uFF08${kind}\uFF09` : "\u7535\u5B50\u53D1\u7968";
|
|
16
|
+
});
|
|
17
|
+
const invoiceNumber = computed(() => text(block.value.invoiceNumber));
|
|
18
|
+
const issueDate = computed(() => text(block.value.issueDate));
|
|
19
|
+
const buyer = computed(() => ({
|
|
20
|
+
name: text(block.value.buyer.name),
|
|
21
|
+
taxId: text(block.value.buyer.taxId)
|
|
22
|
+
}));
|
|
23
|
+
const seller = computed(() => ({
|
|
24
|
+
name: text(block.value.seller.name),
|
|
25
|
+
taxId: text(block.value.seller.taxId)
|
|
26
|
+
}));
|
|
27
|
+
const items = computed(() => {
|
|
28
|
+
const result = evaluate(block.value.items);
|
|
29
|
+
return Array.isArray(result) ? result : [];
|
|
30
|
+
});
|
|
31
|
+
const rows = computed(
|
|
32
|
+
() => items.value.map((item, index) => {
|
|
33
|
+
const scope = { item, index };
|
|
34
|
+
const line = block.value.line;
|
|
35
|
+
return {
|
|
36
|
+
name: text(line.name, scope),
|
|
37
|
+
certNo: text(line.certNo, scope),
|
|
38
|
+
areaUnit: text(line.areaUnit, scope),
|
|
39
|
+
quantity: plain(line.quantity, scope),
|
|
40
|
+
unitPrice: plain(line.unitPrice, scope),
|
|
41
|
+
amount: money(line.amount, scope),
|
|
42
|
+
taxRate: text(line.taxRate, scope),
|
|
43
|
+
taxAmount: money(line.taxAmount, scope)
|
|
44
|
+
};
|
|
45
|
+
})
|
|
46
|
+
);
|
|
47
|
+
const totalAmount = computed(() => money(block.value.totalAmount));
|
|
48
|
+
const totalTax = computed(() => money(block.value.totalTax));
|
|
49
|
+
const grandTotal = computed(() => money(block.value.grandTotal));
|
|
50
|
+
const grandTotalCapital = computed(() => capital(block.value.grandTotal));
|
|
51
|
+
const address = computed(() => text(block.value.remark.address));
|
|
52
|
+
const leasePeriod = computed(() => text(block.value.remark.leasePeriod));
|
|
53
|
+
const crossCity = computed(() => {
|
|
54
|
+
const result = evaluate(block.value.remark.crossCity);
|
|
55
|
+
return typeof result === "boolean" ? result : void 0;
|
|
56
|
+
});
|
|
57
|
+
const issuer = computed(() => text(block.value.issuer));
|
|
58
|
+
const redLetter = computed(() => bool(block.value.redLetter));
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<template>
|
|
62
|
+
<InvoiceSheet
|
|
63
|
+
:title="title"
|
|
64
|
+
:invoice-number="invoiceNumber"
|
|
65
|
+
:issue-date="issueDate"
|
|
66
|
+
:buyer="buyer"
|
|
67
|
+
:seller="seller"
|
|
68
|
+
:grand-total="grandTotal"
|
|
69
|
+
:grand-total-capital="grandTotalCapital"
|
|
70
|
+
:issuer="issuer"
|
|
71
|
+
:red-letter="redLetter"
|
|
72
|
+
:column-count="8"
|
|
73
|
+
:row-count="rows.length"
|
|
74
|
+
:items-max-height="block.itemsMaxHeight"
|
|
75
|
+
>
|
|
76
|
+
<template #business>
|
|
77
|
+
<div class="business-label">
|
|
78
|
+
{{ BUSINESS_LABEL }}
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<template #colgroup>
|
|
83
|
+
<ItemsColgroup />
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<template #items-head>
|
|
87
|
+
<tr>
|
|
88
|
+
<th>项目名称</th>
|
|
89
|
+
<th>产权证书/不动产权证号</th>
|
|
90
|
+
<th>面积单位</th>
|
|
91
|
+
<th>数 量</th>
|
|
92
|
+
<th>单 价</th>
|
|
93
|
+
<th>金 额</th>
|
|
94
|
+
<th>税率/征收率</th>
|
|
95
|
+
<th>税 额</th>
|
|
96
|
+
</tr>
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<template #items-body>
|
|
100
|
+
<tr
|
|
101
|
+
v-for="(row, index) in rows"
|
|
102
|
+
:key="index"
|
|
103
|
+
>
|
|
104
|
+
<td class="cell-text">
|
|
105
|
+
{{ row.name }}
|
|
106
|
+
</td>
|
|
107
|
+
<!-- 产权证书号是长串,与项目名称同为左对齐的文本栏 -->
|
|
108
|
+
<td class="cell-text">
|
|
109
|
+
{{ row.certNo }}
|
|
110
|
+
</td>
|
|
111
|
+
<td class="cell-center">
|
|
112
|
+
{{ row.areaUnit }}
|
|
113
|
+
</td>
|
|
114
|
+
<td class="cell-num">
|
|
115
|
+
{{ row.quantity }}
|
|
116
|
+
</td>
|
|
117
|
+
<td class="cell-num">
|
|
118
|
+
{{ row.unitPrice }}
|
|
119
|
+
</td>
|
|
120
|
+
<td class="cell-num">
|
|
121
|
+
{{ row.amount }}
|
|
122
|
+
</td>
|
|
123
|
+
<td class="cell-center">
|
|
124
|
+
{{ row.taxRate }}
|
|
125
|
+
</td>
|
|
126
|
+
<td class="cell-num">
|
|
127
|
+
{{ row.taxAmount }}
|
|
128
|
+
</td>
|
|
129
|
+
</tr>
|
|
130
|
+
</template>
|
|
131
|
+
|
|
132
|
+
<template #items-foot>
|
|
133
|
+
<tr>
|
|
134
|
+
<!-- 「合计」只占项目名称列,好让它正对下方的「价税合计(大写)」 -->
|
|
135
|
+
<td class="total-label">
|
|
136
|
+
合  计
|
|
137
|
+
</td>
|
|
138
|
+
<td colspan="4" />
|
|
139
|
+
<td class="cell-num">
|
|
140
|
+
<template v-if="totalAmount">
|
|
141
|
+
¥{{ totalAmount }}
|
|
142
|
+
</template>
|
|
143
|
+
</td>
|
|
144
|
+
<td />
|
|
145
|
+
<td class="cell-num">
|
|
146
|
+
<template v-if="totalTax">
|
|
147
|
+
¥{{ totalTax }}
|
|
148
|
+
</template>
|
|
149
|
+
</td>
|
|
150
|
+
</tr>
|
|
151
|
+
</template>
|
|
152
|
+
|
|
153
|
+
<!-- 备注是「标签:值;」的内联流(真票如此,不是网格):三栏顺次排下去,宽度不够就
|
|
154
|
+
整体折行。取不到值的栏**连标签一起不印** —— 印一个 `跨地(市)标志:;` 的空栏
|
|
155
|
+
比不印更像是票面出了错。 -->
|
|
156
|
+
<template #remark>
|
|
157
|
+
<div class="remark-flow">
|
|
158
|
+
<span
|
|
159
|
+
v-if="address"
|
|
160
|
+
class="remark-item"
|
|
161
|
+
><span class="remark-key">不动产地址:</span>{{ address }};</span>
|
|
162
|
+
<span
|
|
163
|
+
v-if="leasePeriod"
|
|
164
|
+
class="remark-item"
|
|
165
|
+
><span class="remark-key">租赁期起止:</span>{{ leasePeriod }};</span>
|
|
166
|
+
<span
|
|
167
|
+
v-if="crossCity !== void 0"
|
|
168
|
+
class="remark-item"
|
|
169
|
+
><span class="remark-key">跨地(市)标志:</span>{{ crossCity ? "\u662F" : "\u5426" }};</span>
|
|
170
|
+
</div>
|
|
171
|
+
</template>
|
|
172
|
+
</InvoiceSheet>
|
|
173
|
+
</template>
|
|
174
|
+
|
|
175
|
+
<style scoped>
|
|
176
|
+
.business-label{color:var(--invoice-ink);font-family:var(--invoice-font-kai);letter-spacing:.05em;white-space:nowrap}.remark-flow{white-space:normal}.remark-item+.remark-item{margin-left:.8em}.remark-key{color:var(--invoice-ink);font-family:var(--invoice-font-kai)}
|
|
177
|
+
</style>
|
|
@@ -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
|
+
'block': 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:block": (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:block"?: ((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,102 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import { type Configure } from '../../../../../share/invoice.js';
|
|
3
|
+
export { getStructFieldDescription, getStructFieldTitle } from '../../../../table/utils/schema-meta.js';
|
|
4
|
+
export { JSON_VAR, partySchema } from '../../../../../share/invoice.js';
|
|
5
|
+
export type { PartyValue } from '../../../../../share/invoice.js';
|
|
6
|
+
type AnySchema = Schema.Schema<any, any, never>;
|
|
7
|
+
export declare const type: "com.shwfed.block.invoice.realestate.lease";
|
|
8
|
+
export declare const compatibilityDate: "2026-07-17";
|
|
9
|
+
/**
|
|
10
|
+
* 票面左上角的业务标签。税总把「不动产经营租赁服务」印死在这张票上 —— 它标识的是**票
|
|
11
|
+
* 种本身**(决定了有哪些列、备注里有哪些栏),不是一栏数据,所以不可配置:能改成别的
|
|
12
|
+
* 字样的话,这个块就成了「一张长得像租赁票但印着别的业务」的伪造工具。
|
|
13
|
+
*/
|
|
14
|
+
export declare const BUSINESS_LABEL = "\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1";
|
|
15
|
+
export declare const metadata: {
|
|
16
|
+
readonly name: "数电票(不动产经营租赁服务)";
|
|
17
|
+
readonly icon: "fluent:building-20-regular";
|
|
18
|
+
readonly description: "按国家税务总局版式渲染一张不动产经营租赁服务数电票,票面各栏由 CEL 表达式映射";
|
|
19
|
+
readonly w: {
|
|
20
|
+
readonly initial: 24;
|
|
21
|
+
readonly min: 12;
|
|
22
|
+
readonly max: number;
|
|
23
|
+
};
|
|
24
|
+
readonly h: {
|
|
25
|
+
readonly initial: 12;
|
|
26
|
+
readonly min: 8;
|
|
27
|
+
readonly max: number;
|
|
28
|
+
readonly grow: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* 明细行的列映射。可访问 `item`(当前明细项)与 `index`(序号,从 0 开始)。
|
|
33
|
+
*
|
|
34
|
+
* 列与通用数电票**不同**:规格型号 / 单位 换成了「产权证书/不动产权证号」与「面积单位」
|
|
35
|
+
* —— 这是这张票之所以自成一个块的原因之一。
|
|
36
|
+
*/
|
|
37
|
+
export declare function lineSchema(configure: Configure): Schema.Struct<{
|
|
38
|
+
name: Schema.Schema<string, string, never>;
|
|
39
|
+
certNo: Schema.optional<Schema.Schema<string, string, never>>;
|
|
40
|
+
areaUnit: Schema.optional<Schema.Schema<string, string, never>>;
|
|
41
|
+
quantity: Schema.optional<Schema.Schema<string, string, never>>;
|
|
42
|
+
unitPrice: Schema.optional<Schema.Schema<string, string, never>>;
|
|
43
|
+
amount: Schema.Schema<string, string, never>;
|
|
44
|
+
taxRate: Schema.optional<Schema.Schema<string, string, never>>;
|
|
45
|
+
taxAmount: Schema.optional<Schema.Schema<string, string, never>>;
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* 备注栏。通用数电票的备注是一段自由文本,这张票**不是** —— 税总规定它必须印出
|
|
49
|
+
* 不动产地址、租赁期起止、跨地(市)标志三栏,票面上以「标签:值;」的内联流排布。
|
|
50
|
+
* 因此建成三个独立字段而不是一个 `remark`:后端本来就是分开给的,让作者自己拼串
|
|
51
|
+
* 等于把票面规矩交给每个接入方各拼一遍。
|
|
52
|
+
*/
|
|
53
|
+
export declare function remarkSchema(configure: Configure): Schema.Struct<{
|
|
54
|
+
address: Schema.Schema<string, string, never>;
|
|
55
|
+
leasePeriod: Schema.Schema<string, string, never>;
|
|
56
|
+
crossCity: Schema.Schema<string, string, never>;
|
|
57
|
+
}>;
|
|
58
|
+
export declare function schema(configure: Configure, _blockRef?: AnySchema): Schema.Struct<{
|
|
59
|
+
id: Schema.refine<string, typeof Schema.String>;
|
|
60
|
+
type: Schema.tag<"com.shwfed.block.invoice.realestate.lease">;
|
|
61
|
+
compatibilityDate: Schema.tag<"2026-07-17">;
|
|
62
|
+
displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
63
|
+
hidden: Schema.optional<Schema.Schema<string, string, never>>;
|
|
64
|
+
kindLabel: Schema.Schema<string, string, never>;
|
|
65
|
+
request: Schema.optional<Schema.Schema<string, string, never>>;
|
|
66
|
+
itemsMaxHeight: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
67
|
+
invoiceNumber: Schema.Schema<string, string, never>;
|
|
68
|
+
issueDate: Schema.Schema<string, string, never>;
|
|
69
|
+
buyer: Schema.Struct<{
|
|
70
|
+
name: Schema.Schema<string, string, never>;
|
|
71
|
+
taxId: Schema.Schema<string, string, never>;
|
|
72
|
+
}>;
|
|
73
|
+
seller: Schema.Struct<{
|
|
74
|
+
name: Schema.Schema<string, string, never>;
|
|
75
|
+
taxId: Schema.Schema<string, string, never>;
|
|
76
|
+
}>;
|
|
77
|
+
items: Schema.Schema<string, string, never>;
|
|
78
|
+
line: Schema.Struct<{
|
|
79
|
+
name: Schema.Schema<string, string, never>;
|
|
80
|
+
certNo: Schema.optional<Schema.Schema<string, string, never>>;
|
|
81
|
+
areaUnit: Schema.optional<Schema.Schema<string, string, never>>;
|
|
82
|
+
quantity: Schema.optional<Schema.Schema<string, string, never>>;
|
|
83
|
+
unitPrice: Schema.optional<Schema.Schema<string, string, never>>;
|
|
84
|
+
amount: Schema.Schema<string, string, never>;
|
|
85
|
+
taxRate: Schema.optional<Schema.Schema<string, string, never>>;
|
|
86
|
+
taxAmount: Schema.optional<Schema.Schema<string, string, never>>;
|
|
87
|
+
}>;
|
|
88
|
+
totalAmount: Schema.Schema<string, string, never>;
|
|
89
|
+
totalTax: Schema.Schema<string, string, never>;
|
|
90
|
+
grandTotal: Schema.Schema<string, string, never>;
|
|
91
|
+
remark: Schema.Struct<{
|
|
92
|
+
address: Schema.Schema<string, string, never>;
|
|
93
|
+
leasePeriod: Schema.Schema<string, string, never>;
|
|
94
|
+
crossCity: Schema.Schema<string, string, never>;
|
|
95
|
+
}>;
|
|
96
|
+
issuer: Schema.optional<Schema.Schema<string, string, never>>;
|
|
97
|
+
redLetter: Schema.optional<Schema.Schema<string, string, never>>;
|
|
98
|
+
}>;
|
|
99
|
+
export declare function defaultBody(): Record<string, unknown>;
|
|
100
|
+
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
101
|
+
export type LineValue = Value['line'];
|
|
102
|
+
export type RemarkValue = Value['remark'];
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Expression, HttpRequestResult } from "../../../../../share/expression.js";
|
|
3
|
+
import {
|
|
4
|
+
boolResult,
|
|
5
|
+
listResult,
|
|
6
|
+
moneyResult,
|
|
7
|
+
partySchema,
|
|
8
|
+
registerJsonIfAbsent,
|
|
9
|
+
textResult
|
|
10
|
+
} from "../../../../../share/invoice.js";
|
|
11
|
+
import { registerLoopVariablesIfAbsent } from "../../../../../share/loop-item-var.js";
|
|
12
|
+
export { getStructFieldDescription, getStructFieldTitle } from "../../../../table/utils/schema-meta.js";
|
|
13
|
+
export { JSON_VAR, partySchema } from "../../../../../share/invoice.js";
|
|
14
|
+
export const type = "com.shwfed.block.invoice.realestate.lease";
|
|
15
|
+
export const compatibilityDate = "2026-07-17";
|
|
16
|
+
export const BUSINESS_LABEL = "\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1";
|
|
17
|
+
export const metadata = {
|
|
18
|
+
name: "\u6570\u7535\u7968\uFF08\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1\uFF09",
|
|
19
|
+
icon: "fluent:building-20-regular",
|
|
20
|
+
description: "\u6309\u56FD\u5BB6\u7A0E\u52A1\u603B\u5C40\u7248\u5F0F\u6E32\u67D3\u4E00\u5F20\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1\u6570\u7535\u7968\uFF0C\u7968\u9762\u5404\u680F\u7531 CEL \u8868\u8FBE\u5F0F\u6620\u5C04",
|
|
21
|
+
w: { initial: 24, min: 12, max: Infinity },
|
|
22
|
+
// 与数电票块同理:票面高度由明细行数决定,需顶部锚定向下生长。
|
|
23
|
+
h: { initial: 12, min: 8, max: Infinity, grow: true }
|
|
24
|
+
};
|
|
25
|
+
export function lineSchema(configure) {
|
|
26
|
+
const rowConfigure = (env) => {
|
|
27
|
+
configure(env);
|
|
28
|
+
registerLoopVariablesIfAbsent(env);
|
|
29
|
+
};
|
|
30
|
+
const CelText = Expression({ configure: rowConfigure, resultType: textResult });
|
|
31
|
+
const CelMoney = Expression({ configure: rowConfigure, resultType: moneyResult });
|
|
32
|
+
return Schema.Struct({
|
|
33
|
+
name: CelText.annotations({
|
|
34
|
+
title: "\u9879\u76EE\u540D\u79F0",
|
|
35
|
+
description: "\u8FD4\u56DE\u9879\u76EE\u540D\u79F0\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5982 `item.xmmc`\u3002\u7968\u9762\u60EF\u4F8B\u5E26\u7C7B\u76EE\u524D\u7F00\uFF0C\u5982 `*\u7ECF\u8425\u79DF\u8D41*\u623F\u5C4B\u79DF\u8D41\u8D39`"
|
|
36
|
+
}),
|
|
37
|
+
certNo: Schema.optional(CelText.annotations({
|
|
38
|
+
title: "\u4EA7\u6743\u8BC1\u4E66/\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7",
|
|
39
|
+
description: "\u8FD4\u56DE\u4EA7\u6743\u8BC1\u4E66\u53F7\u6216\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
40
|
+
})),
|
|
41
|
+
areaUnit: Schema.optional(CelText.annotations({
|
|
42
|
+
title: "\u9762\u79EF\u5355\u4F4D",
|
|
43
|
+
description: "\u8FD4\u56DE\u9762\u79EF\u5355\u4F4D\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5982 `\u5E73\u65B9\u7C73`\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
44
|
+
})),
|
|
45
|
+
quantity: Schema.optional(CelMoney.annotations({
|
|
46
|
+
title: "\u6570\u91CF",
|
|
47
|
+
description: "\u8FD4\u56DE\u6570\u91CF\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u8FD4\u56DE `number` \u65F6\u539F\u6837\u5C55\u793A\uFF08\u4E0D\u8865\u5C0F\u6570\u4F4D\uFF09\uFF0C\u8FD4\u56DE `string` \u65F6\u539F\u6837\u6253\u5370\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
48
|
+
})),
|
|
49
|
+
unitPrice: Schema.optional(CelMoney.annotations({
|
|
50
|
+
title: "\u5355\u4EF7",
|
|
51
|
+
description: "\u8FD4\u56DE\u5355\u4EF7\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u8FD4\u56DE `number` \u65F6\u539F\u6837\u5C55\u793A\uFF08\u7968\u9762\u5355\u4EF7\u5E38\u5E26\u591A\u4F4D\u5C0F\u6570\uFF0C\u5982 `272.5663716814`\uFF0C\u6545\u4E0D\u505A\u56DB\u820D\u4E94\u5165\uFF09\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
52
|
+
})),
|
|
53
|
+
amount: CelMoney.annotations({
|
|
54
|
+
title: "\u91D1\u989D",
|
|
55
|
+
description: "\u8FD4\u56DE\u4E0D\u542B\u7A0E\u91D1\u989D\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u8FD4\u56DE `number` \u65F6\u683C\u5F0F\u5316\u4E3A\u4E24\u4F4D\u5C0F\u6570\u5E76\u52A0\u5343\u5206\u4F4D\uFF1B\u8FD4\u56DE `string` \u65F6\u539F\u6837\u6253\u5370"
|
|
56
|
+
}),
|
|
57
|
+
taxRate: Schema.optional(CelText.annotations({
|
|
58
|
+
title: "\u7A0E\u7387/\u5F81\u6536\u7387",
|
|
59
|
+
description: "\u8FD4\u56DE\u7A0E\u7387\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u539F\u6837\u6253\u5370\uFF0C\u5982 `5%`\u3002\u523B\u610F\u4E0D\u662F\u6570\u5B57 \u2014\u2014 \u8BE5\u680F\u5408\u6CD5\u53D6\u503C\u8FD8\u5305\u62EC `\u514D\u7A0E` / `\u4E0D\u5F81\u7A0E` / `***`"
|
|
60
|
+
})),
|
|
61
|
+
taxAmount: Schema.optional(CelMoney.annotations({
|
|
62
|
+
title: "\u7A0E\u989D",
|
|
63
|
+
description: "\u8FD4\u56DE\u7A0E\u989D\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u8FD4\u56DE `number` \u65F6\u683C\u5F0F\u5316\u4E3A\u4E24\u4F4D\u5C0F\u6570\u5E76\u52A0\u5343\u5206\u4F4D\uFF1B\u7559\u7A7A\u5219\u8BE5\u680F\u4E3A\u7A7A"
|
|
64
|
+
}))
|
|
65
|
+
}).annotations({
|
|
66
|
+
title: "\u660E\u7EC6\u884C",
|
|
67
|
+
description: "\u660E\u7EC6\u5404\u680F\u7684\u53D6\u503C\u8868\u8FBE\u5F0F\uFF0C\u5BF9\u6BCF\u4E00\u884C\u6C42\u503C\uFF1B\u53EF\u8BBF\u95EE `item`\uFF08\u5F53\u524D\u660E\u7EC6\u9879\uFF09\u4E0E `index`\uFF08\u5E8F\u53F7\uFF0C\u4ECE 0 \u5F00\u59CB\uFF09"
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
export function remarkSchema(configure) {
|
|
71
|
+
const CelText = Expression({ configure, resultType: textResult });
|
|
72
|
+
const CelBool = Expression({ configure, resultType: boolResult });
|
|
73
|
+
return Schema.Struct({
|
|
74
|
+
address: CelText.annotations({
|
|
75
|
+
title: "\u4E0D\u52A8\u4EA7\u5730\u5740",
|
|
76
|
+
description: "\u8FD4\u56DE\u4E0D\u52A8\u4EA7\u8BE6\u7EC6\u5730\u5740\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5982 `json.bdcdz`"
|
|
77
|
+
}),
|
|
78
|
+
leasePeriod: CelText.annotations({
|
|
79
|
+
title: "\u79DF\u8D41\u671F\u8D77\u6B62",
|
|
80
|
+
description: "\u8FD4\u56DE\u79DF\u8D41\u671F\u8D77\u6B62\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u539F\u6837\u6253\u5370\u3002\u7968\u9762\u60EF\u4F8B\u4E3A `2026\u5E7401\u670801\u65E5-2026\u5E7412\u670831\u65E5`\uFF0C\u683C\u5F0F\u5316\u8BF7\u5728\u8868\u8FBE\u5F0F\u5185\u5B8C\u6210"
|
|
81
|
+
}),
|
|
82
|
+
crossCity: CelBool.annotations({
|
|
83
|
+
title: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7",
|
|
84
|
+
description: "\u8FD4\u56DE `bool` \u7684 CEL \u8868\u8FBE\u5F0F\uFF1A`true` \u5370\u300C\u662F\u300D\uFF0C`false` \u5370\u300C\u5426\u300D\u3002\u6C42\u503C\u5931\u8D25\u65F6\u6574\u680F\uFF08\u542B\u6807\u7B7E\uFF09\u4E0D\u5370 \u2014\u2014 \u89C1 runtime.vue"
|
|
85
|
+
})
|
|
86
|
+
}).annotations({
|
|
87
|
+
title: "\u5907\u6CE8",
|
|
88
|
+
description: "\u7A0E\u603B\u89C4\u5B9A\u8FD9\u5F20\u7968\u7684\u5907\u6CE8\u987B\u542B\u4E0D\u52A8\u4EA7\u5730\u5740\u3001\u79DF\u8D41\u671F\u8D77\u6B62\u3001\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7\u4E09\u680F"
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
export function schema(configure, _blockRef) {
|
|
92
|
+
const CelRequest = Expression({ configure, resultType: HttpRequestResult });
|
|
93
|
+
const CelHidden = Expression({ configure, resultType: boolResult });
|
|
94
|
+
const bodyConfigure = (env) => {
|
|
95
|
+
configure(env);
|
|
96
|
+
registerJsonIfAbsent(env);
|
|
97
|
+
};
|
|
98
|
+
const CelText = Expression({ configure: bodyConfigure, resultType: textResult });
|
|
99
|
+
const CelMoney = Expression({ configure: bodyConfigure, resultType: moneyResult });
|
|
100
|
+
const CelItems = Expression({ configure: bodyConfigure, resultType: listResult });
|
|
101
|
+
const CelBool = Expression({ configure: bodyConfigure, resultType: boolResult });
|
|
102
|
+
return Schema.Struct({
|
|
103
|
+
id: Schema.UUID.annotations({ description: "\u5757\u552F\u4E00\u6807\u8BC6" }),
|
|
104
|
+
type: Schema.tag(type),
|
|
105
|
+
compatibilityDate: Schema.tag(compatibilityDate),
|
|
106
|
+
displayName: Schema.optional(Schema.String.annotations({
|
|
107
|
+
title: "\u5185\u90E8\u540D\u79F0",
|
|
108
|
+
description: "\u4EC5\u5728\u7F16\u8F91\u5668\u5185\u53EF\u89C1\u7684\u5757\u540D\uFF0C\u7528\u4E8E\u5728\u4FA7\u8FB9\u680F\u548C\u5E03\u5C40\u7F16\u8F91\u5668\u4E2D\u8BC6\u522B\u5757\uFF1B\u8FD0\u884C\u65F6\u4E0D\u5C55\u793A"
|
|
109
|
+
})),
|
|
110
|
+
hidden: Schema.optional(CelHidden.annotations({
|
|
111
|
+
title: "\u9690\u85CF\u6761\u4EF6",
|
|
112
|
+
description: "\u8FD4\u56DE `true` \u65F6\u8BE5\u5757\u5728\u6240\u6709\u5E03\u5C40\u4E2D\u90FD\u4E0D\u6E32\u67D3\uFF0C\u5B83\u5360\u7528\u7684\u884C/\u5217\u8F68\u9053\u4F1A\u81EA\u52A8\u6536\u62E2\uFF08\u540C\u4E00\u7247\u533A\u57DF\u5185\u53E6\u4E00\u5F20\u7968\u53EF\u9876\u4E0A\u6765\uFF09\u3002\u5728**\u9875\u9762\u4F5C\u7528\u57DF**\u6C42\u503C \u2014\u2014 \u8BFB\u4E0D\u5230\u672C\u5757 `\u8BF7\u6C42` \u4EA7\u51FA\u7684 `json`\uFF0C\u7968\u79CD\u5224\u65AD\u9700\u53D6\u81EA\u5916\u5C42\u4E0A\u4E0B\u6587"
|
|
113
|
+
})),
|
|
114
|
+
// 刻意不叫 `kind`:数电票块的 `kind` 是静态枚举(`special` / `normal`),同名不同
|
|
115
|
+
// 类型是个陷阱 —— 两个块的配置若被互相复制粘贴,同名字段会被静默当成同一个东西。
|
|
116
|
+
kindLabel: CelText.annotations({
|
|
117
|
+
title: "\u7968\u79CD",
|
|
118
|
+
description: "\u8FD4\u56DE\u7968\u79CD\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u586B\u5165\u6807\u9898\u62EC\u53F7\u5185\uFF0C\u5982 `'\u589E\u503C\u7A0E\u4E13\u7528\u53D1\u7968'`\u3002\u62EC\u53F7\u5185\u5B8C\u5168\u81EA\u7531 \u2014\u2014 \u771F\u7968\u4E0A\u8FD9\u91CC\u8FD8\u53EF\u80FD\u662F\u300C\u589E\u503C\u7A0E\u7535\u5B50\u666E\u901A\u53D1\u7968\u300D\u7B49\u5B57\u6837\uFF1B\u6C42\u503C\u4E3A\u7A7A\u5219\u6807\u9898\u53EA\u5370\u300C\u7535\u5B50\u53D1\u7968\u300D"
|
|
119
|
+
}),
|
|
120
|
+
request: Schema.optional(CelRequest.annotations({
|
|
121
|
+
title: "\u8BF7\u6C42",
|
|
122
|
+
description: "\u53EF\u9009\u7684 HTTP \u8BF7\u6C42\u8868\u8FBE\u5F0F\uFF08\u8FD4\u56DE `HttpRequest`\uFF09\uFF1B\u54CD\u5E94\u4F53\u4EE5 `json` \u63D0\u4F9B\u7ED9\u7968\u9762\u6240\u6709\u680F\u4F4D\uFF08\u542B\u660E\u7EC6\u5217\u8868\u4E0E\u9010\u884C\u680F\u4F4D\uFF09\u3002\u7559\u7A7A\u5219 `json` \u4E3A none\uFF0C\u5404\u680F\u4ECE\u5916\u5C42\u4E0A\u4E0B\u6587\u53D6\u503C"
|
|
123
|
+
})),
|
|
124
|
+
itemsMaxHeight: Schema.optional(Schema.String.annotations({
|
|
125
|
+
title: "\u660E\u7EC6\u533A\u9AD8\u5EA6",
|
|
126
|
+
description: "\u660E\u7EC6\u533A\u7684\u6700\u5927\u9AD8\u5EA6\uFF08CSS \u957F\u5EA6\uFF0C\u5982 `24rem` / `50vh`\uFF09\uFF1B\u8D85\u51FA\u540E\u660E\u7EC6\u5185\u5BB9\u6EDA\u52A8\uFF0C\u5217\u6807\u9898\u4E0E\u5408\u8BA1\u884C\u4FDD\u6301\u53EF\u89C1\u3002\u7559\u7A7A\u5219\u660E\u7EC6\u533A\u968F\u884C\u6570\u589E\u957F\uFF0C\u7968\u9762\u6574\u4F53\u53D8\u9AD8"
|
|
127
|
+
})),
|
|
128
|
+
invoiceNumber: CelText.annotations({
|
|
129
|
+
title: "\u53D1\u7968\u53F7\u7801",
|
|
130
|
+
description: "\u8FD4\u56DE\u53D1\u7968\u53F7\u7801\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5C55\u793A\u5728\u7968\u9762\u53F3\u4E0A\u89D2"
|
|
131
|
+
}),
|
|
132
|
+
issueDate: CelText.annotations({
|
|
133
|
+
title: "\u5F00\u7968\u65E5\u671F",
|
|
134
|
+
description: "\u8FD4\u56DE\u5F00\u7968\u65E5\u671F\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u539F\u6837\u6253\u5370\u3002\u7968\u9762\u60EF\u4F8B\u4E3A `2026\u5E7406\u670801\u65E5`\uFF0C\u683C\u5F0F\u5316\u8BF7\u5728\u8868\u8FBE\u5F0F\u5185\u5B8C\u6210"
|
|
135
|
+
}),
|
|
136
|
+
buyer: partySchema(bodyConfigure, "\u8D2D\u4E70\u65B9"),
|
|
137
|
+
seller: partySchema(bodyConfigure, "\u9500\u552E\u65B9"),
|
|
138
|
+
items: CelItems.annotations({
|
|
139
|
+
title: "\u660E\u7EC6\u5217\u8868",
|
|
140
|
+
description: "\u8FD4\u56DE\u660E\u7EC6\u884C\u5217\u8868\u7684 CEL \u8868\u8FBE\u5F0F\uFF0C\u5982 `json.mxList`\uFF1B\u6BCF\u4E00\u9879\u6309\u300C\u660E\u7EC6\u884C\u300D\u7684\u5217\u6620\u5C04\u6E32\u67D3\u4E00\u884C\u3002\u8FD4\u56DE `none` / \u975E\u5217\u8868\u65F6\u4E0D\u6E32\u67D3\u4EFB\u4F55\u660E\u7EC6\u884C"
|
|
141
|
+
}),
|
|
142
|
+
line: lineSchema(bodyConfigure).annotations({
|
|
143
|
+
title: "\u660E\u7EC6\u884C",
|
|
144
|
+
description: "\u660E\u7EC6\u5404\u680F\u7684\u53D6\u503C\u8868\u8FBE\u5F0F\uFF0C\u5BF9\u300C\u660E\u7EC6\u5217\u8868\u300D\u7684\u6BCF\u4E00\u9879\u6C42\u503C"
|
|
145
|
+
}),
|
|
146
|
+
totalAmount: CelMoney.annotations({
|
|
147
|
+
title: "\u5408\u8BA1\u91D1\u989D",
|
|
148
|
+
description: "\u8FD4\u56DE\u5408\u8BA1\u680F\u4E0D\u542B\u7A0E\u91D1\u989D\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u523B\u610F\u4E0D\u7531\u660E\u7EC6\u81EA\u52A8\u6C42\u548C \u2014\u2014 \u7968\u9762\u5408\u8BA1\u4EE5\u5F00\u7968\u6570\u636E\u4E3A\u51C6\uFF0C\u4E0D\u5E94\u7531\u524D\u7AEF\u91CD\u7B97"
|
|
149
|
+
}),
|
|
150
|
+
totalTax: CelMoney.annotations({
|
|
151
|
+
title: "\u5408\u8BA1\u7A0E\u989D",
|
|
152
|
+
description: "\u8FD4\u56DE\u5408\u8BA1\u680F\u7A0E\u989D\u7684 CEL \u8868\u8FBE\u5F0F"
|
|
153
|
+
}),
|
|
154
|
+
grandTotal: CelMoney.annotations({
|
|
155
|
+
title: "\u4EF7\u7A0E\u5408\u8BA1",
|
|
156
|
+
description: "\u8FD4\u56DE\u4EF7\u7A0E\u5408\u8BA1\uFF08\u5C0F\u5199\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\u3002\u5927\u5199\u680F\u7531\u8BE5\u503C\u672C\u5730\u63A8\u5BFC\uFF08\u5982 `\u9646\u4EDF\u67D2\u4F70\u96F6\u9646\u5706\u58F9\u89D2\u6574`\u3001\u8D1F\u6570\u4E3A `\uFF08\u8D1F\u6570\uFF09\u53C1\u4F70\u96F6\u634C\u5706\u6574`\uFF09\uFF0C\u65E0\u9700\u53E6\u884C\u914D\u7F6E"
|
|
157
|
+
}),
|
|
158
|
+
remark: remarkSchema(bodyConfigure),
|
|
159
|
+
issuer: Schema.optional(CelText.annotations({
|
|
160
|
+
title: "\u5F00\u7968\u4EBA",
|
|
161
|
+
description: "\u8FD4\u56DE\u5F00\u7968\u4EBA\u59D3\u540D\uFF08`string`\uFF09\u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u7559\u7A7A\u5219\u4E0D\u5C55\u793A"
|
|
162
|
+
})),
|
|
163
|
+
redLetter: Schema.optional(CelBool.annotations({
|
|
164
|
+
title: "\u7EA2\u5B57\u53D1\u7968",
|
|
165
|
+
description: "\u8FD4\u56DE `bool` \u7684 CEL \u8868\u8FBE\u5F0F\uFF1B\u4E3A `true` \u65F6\u7968\u9762\u4E2D\u592E\u53E0\u52A0\u300C\u7EA2\u5B57\u53D1\u7968\u300D\u6C34\u5370\u3002\u7559\u7A7A\u5219\u4E0D\u5C55\u793A\u6C34\u5370"
|
|
166
|
+
}))
|
|
167
|
+
}).annotations({
|
|
168
|
+
title: "\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1\u6570\u7535\u7968\u5757",
|
|
169
|
+
description: "\u6309\u56FD\u5BB6\u7A0E\u52A1\u603B\u5C40\u7248\u5F0F\u6E32\u67D3\u4E00\u5F20\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1\u6570\u7535\u7968\uFF0C\u7968\u9762\u5404\u680F\u7531 CEL \u8868\u8FBE\u5F0F\u6620\u5C04"
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
export function defaultBody() {
|
|
173
|
+
return {
|
|
174
|
+
kindLabel: "",
|
|
175
|
+
invoiceNumber: "",
|
|
176
|
+
issueDate: "",
|
|
177
|
+
buyer: { name: "", taxId: "" },
|
|
178
|
+
seller: { name: "", taxId: "" },
|
|
179
|
+
items: "[]",
|
|
180
|
+
line: { name: "", amount: "" },
|
|
181
|
+
totalAmount: "",
|
|
182
|
+
totalTax: "",
|
|
183
|
+
grandTotal: "",
|
|
184
|
+
remark: { address: "", leasePeriod: "", crossCity: "" }
|
|
185
|
+
};
|
|
186
|
+
}
|
|
@@ -33,7 +33,7 @@ export const metadata = {
|
|
|
33
33
|
icon: httpRequestOperation.metadata.icon
|
|
34
34
|
},
|
|
35
35
|
// Navigation as an op (replaces the standalone navigation *button*): its URL
|
|
36
|
-
// expression can reference `steps[
|
|
36
|
+
// expression can reference `steps["<id>"]`, so a chain can navigate using an
|
|
37
37
|
// earlier request's response. The page hosts it for the same reason as the
|
|
38
38
|
// request op — navigation acts on nothing instance-specific.
|
|
39
39
|
{
|
|
@@ -43,7 +43,7 @@ export const metadata = {
|
|
|
43
43
|
icon: navigationOperation.metadata.icon
|
|
44
44
|
},
|
|
45
45
|
// Download as an op (replaces the standalone download *button*): its request
|
|
46
|
-
// expression can reference `steps[
|
|
46
|
+
// expression can reference `steps["<id>"]`, so the old two-step「先取凭据再下载」
|
|
47
47
|
// becomes a 发送请求 row followed by this download row. The page hosts it for
|
|
48
48
|
// the same reason as the request op — the download acts on nothing
|
|
49
49
|
// instance-specific.
|
|
@@ -40,6 +40,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
40
40
|
readonly mode: "formula" | "prefill";
|
|
41
41
|
readonly expression: string;
|
|
42
42
|
} | undefined;
|
|
43
|
+
readonly optionValue: string;
|
|
44
|
+
readonly optionLabel: readonly [{
|
|
45
|
+
readonly locale: "zh";
|
|
46
|
+
readonly message: string;
|
|
47
|
+
}, ...{
|
|
48
|
+
readonly locale: "en" | "ja" | "ko";
|
|
49
|
+
readonly message: string;
|
|
50
|
+
}[]];
|
|
43
51
|
readonly validations?: readonly {
|
|
44
52
|
readonly message: readonly [{
|
|
45
53
|
readonly locale: "zh";
|
|
@@ -51,14 +59,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
51
59
|
readonly warning?: boolean | undefined;
|
|
52
60
|
readonly when: string;
|
|
53
61
|
}[] | undefined;
|
|
54
|
-
readonly optionValue: string;
|
|
55
|
-
readonly optionLabel: readonly [{
|
|
56
|
-
readonly locale: "zh";
|
|
57
|
-
readonly message: string;
|
|
58
|
-
}, ...{
|
|
59
|
-
readonly locale: "en" | "ja" | "ko";
|
|
60
|
-
readonly message: string;
|
|
61
|
-
}[]];
|
|
62
62
|
}) => any;
|
|
63
63
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
64
64
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -98,6 +98,14 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
98
98
|
readonly mode: "formula" | "prefill";
|
|
99
99
|
readonly expression: string;
|
|
100
100
|
} | undefined;
|
|
101
|
+
readonly optionValue: string;
|
|
102
|
+
readonly optionLabel: readonly [{
|
|
103
|
+
readonly locale: "zh";
|
|
104
|
+
readonly message: string;
|
|
105
|
+
}, ...{
|
|
106
|
+
readonly locale: "en" | "ja" | "ko";
|
|
107
|
+
readonly message: string;
|
|
108
|
+
}[]];
|
|
101
109
|
readonly validations?: readonly {
|
|
102
110
|
readonly message: readonly [{
|
|
103
111
|
readonly locale: "zh";
|
|
@@ -109,14 +117,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
109
117
|
readonly warning?: boolean | undefined;
|
|
110
118
|
readonly when: string;
|
|
111
119
|
}[] | undefined;
|
|
112
|
-
readonly optionValue: string;
|
|
113
|
-
readonly optionLabel: readonly [{
|
|
114
|
-
readonly locale: "zh";
|
|
115
|
-
readonly message: string;
|
|
116
|
-
}, ...{
|
|
117
|
-
readonly locale: "en" | "ja" | "ko";
|
|
118
|
-
readonly message: string;
|
|
119
|
-
}[]];
|
|
120
120
|
}) => any) | undefined;
|
|
121
121
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
122
122
|
declare const _default: typeof __VLS_export;
|