[C28-33][@ant] feat: кнопки расходов в PageHead (создать → пополнить), короткий № СЗ и formatAsset по канону фабрики, автоназначение платежа «Аванс под отчёт» для пайщика — описание позиции переназвано «Что оплачиваем», пункты документа без списка
This commit is contained in:
+4
-1
@@ -43,6 +43,8 @@ export interface Model {
|
||||
user: ICommonUser
|
||||
vars: IVars
|
||||
proposal_hash: string
|
||||
/** Короткий идентификатор СЗ (первые 16 символов хэша, uppercase) — для шапки документа */
|
||||
proposal_short_hash: string
|
||||
proposal: IExpenseProposalHeader
|
||||
items: IExpenseItem[]
|
||||
}
|
||||
@@ -56,7 +58,7 @@ export const description = 'Заявка-смета председателю к
|
||||
// записку можно найти), позиции — нумерованным списком: описание и сумма,
|
||||
// затем построчно получатель, реквизиты и назначение платежа (для кассира).
|
||||
// Кошелёк-источник в документе не указывается.
|
||||
export const context = `<div class="digital-document"><div style="text-align: right"><p>{% trans 'TO_COUNCIL' %} {{vars.full_abbr_genitive}} «{{vars.name}}»</p><p>{% trans 'FROM_MEMBER' %} {{ user.full_name_or_short_name }}</p></div><p>{% trans 'DATE' %}: {{ meta.created_at }}</p><div style="text-align: center"><h2>{% trans 'PROPOSAL_TITLE' %}</h2><p style="word-break: break-all">№ {{ proposal_hash }}</p></div><p>{% trans 'BODY_INTRO' %}{% if proposal.fund_name %} {% trans 'BY_FUND' %} {{ proposal.fund_name }}{% endif %} {% trans 'IN_TOTAL' %} {{ proposal.total_amount }}{% if proposal.deadline %} {% trans 'DUE_BY' %} {{ proposal.deadline }}{% endif %}, {% trans 'BODY_NAMELY' %}:</p><ol>{% for item in items %}<li><p>{{ item.description }} — {{ item.amount }} ({% if item.mechanics == 'ADVANCE' %}{% trans 'MECH_ADVANCE' %}{% else %}{% trans 'MECH_DIRECT' %}{% endif %})</p><p>{% trans 'ITEM_RECIPIENT' %}: {% if item.recipient_type == 'SELF' %}{{ user.full_name_or_short_name }}{% else %}{{ item.recipient_name }}{% endif %}</p>{% if item.requisites %}<p>{% trans 'ITEM_REQUISITES' %}: {{ item.requisites }}</p>{% endif %}{% if item.payment_purpose %}<p>{% trans 'ITEM_PAYMENT_PURPOSE' %}: {{ item.payment_purpose }}</p>{% endif %}</li>{% endfor %}</ol><p>{% trans 'PURPOSE' %}: {{ proposal.description }}</p><p>{{ user.full_name_or_short_name }}</p><p>{% trans 'SIGNED_DIGITALLY' %}</p></div>`
|
||||
export const context = `<div class="digital-document"><div style="text-align: right"><p>{% trans 'TO_COUNCIL' %} {{vars.full_abbr_genitive}} «{{vars.name}}»</p><p>{% trans 'FROM_MEMBER' %} {{ user.full_name_or_short_name }}</p></div><p>{% trans 'DATE' %}: {{ meta.created_at }}</p><div style="text-align: center"><h2>{% trans 'PROPOSAL_TITLE' %} № {{ proposal_short_hash }}</h2></div><p>{% trans 'BODY_INTRO' %}{% if proposal.fund_name %} {% trans 'BY_FUND' %} {{ proposal.fund_name }}{% endif %} {% trans 'IN_TOTAL' %} {{ proposal.total_amount }}{% if proposal.deadline %} {% trans 'DUE_BY' %} {{ proposal.deadline }}{% endif %}, {% trans 'BODY_NAMELY' %}:</p>{% for item in items %}<div style="padding-top: 10px"><p><strong>{{ item.number }}. {{ item.description }} — {{ item.amount }} ({% if item.mechanics == 'ADVANCE' %}{% trans 'MECH_ADVANCE' %}{% else %}{% trans 'MECH_DIRECT' %}{% endif %})</strong></p><p>{% trans 'ITEM_RECIPIENT' %}: {% if item.recipient_type == 'SELF' %}{{ user.full_name_or_short_name }}{% else %}{{ item.recipient_name }}{% endif %}</p>{% if item.requisites %}<p>{% trans 'ITEM_REQUISITES' %}: {{ item.requisites }}</p>{% endif %}{% if item.payment_purpose %}<p>{% trans 'ITEM_PAYMENT_PURPOSE' %}: {{ item.payment_purpose }}</p>{% endif %}</div>{% endfor %}<p>{% trans 'PURPOSE' %}: {{ proposal.description }}</p><p>{{ user.full_name_or_short_name }}</p><p>{% trans 'SIGNED_DIGITALLY' %}</p></div>`
|
||||
|
||||
export const translations = {
|
||||
ru: {
|
||||
@@ -85,6 +87,7 @@ export const exampleData = {
|
||||
vars: { full_abbr_genitive: 'ПК', name: 'Восход' },
|
||||
user: { full_name_or_short_name: 'Иванов И.И.' },
|
||||
proposal_hash: '55c470039a8c53ce1b4b6e842fe8063ab3d5b85ba2ba8ab0ae6e30be3ad328b7',
|
||||
proposal_short_hash: '55C470039A8C53CE',
|
||||
proposal: {
|
||||
description: 'Закупка хостинга и бухгалтерских услуг на июнь 2026',
|
||||
total_amount: '15000.00 RUB',
|
||||
|
||||
@@ -28,6 +28,8 @@ export interface Model {
|
||||
user: ICommonUser
|
||||
vars: IVars
|
||||
proposal_hash: string
|
||||
/** Короткий идентификатор СЗ (первые 16 символов хэша, uppercase) */
|
||||
proposal_short_hash: string
|
||||
proposal: IExpenseProposalHeader
|
||||
items: IExpenseItem[]
|
||||
decision: IExpenseProposalDecisionBody
|
||||
@@ -36,7 +38,7 @@ export interface Model {
|
||||
export const title = 'Протокол-1: решение по служебной записке о расходах'
|
||||
export const description = 'Решение председателя/совета об утверждении (или отказе) служебной записки-сметы о расходах. Подписывается председателем поверх документа Creator.'
|
||||
|
||||
export const context = `<style>h1{margin:0;text-align:center;}h3{margin:0;padding-top:15px;text-align:center;}.digital-document{padding:20px;white-space:pre-wrap;}table{width:100%;border-collapse:collapse;}th,td{border:1px solid #ccc;padding:8px;text-align:left;word-wrap:break-word;overflow-wrap:break-word;}th{background-color:#f4f4f4;}.summary{margin-top:20px;text-align:right;font-weight:bold;}.decision-block{padding-top:20px;border:2px solid #333;padding:15px;margin-top:20px;}.signature{padding-top:30px;}</style><div class="digital-document"><div style="padding-bottom:30px;"><h1 style="text-align:center">{% trans 'PROTOCOL_TITLE' %}</h1><p style="text-align:center">{{vars.full_abbr_genitive}} «{{vars.name}}»</p><p style="text-align:right;padding-top:20px">{{ coop.city }}, {{ meta.created_at }}</p>{% if decision.protocol_number %}<p style="text-align:center;padding-top:10px;">{% trans 'PROTOCOL_NUMBER' %} {{ decision.protocol_number }} {% trans 'FROM' %} {{ decision.protocol_date }}</p>{% endif %}</div><h3>{% trans 'REFERENCE' %}</h3><p>{% trans 'REFERENCE_BODY' %}</p><p><strong>{% trans 'REFERENCE_HASH' %}:</strong> {{ proposal_hash }}</p><p><strong>{% trans 'PURPOSE' %}:</strong> {{ proposal.description }}</p><h3 style="padding-top:20px;">{% trans 'ITEMS' %}</h3><table><thead><tr><th>№</th><th>{% trans 'ITEM_DESCRIPTION' %}</th><th>{% trans 'ITEM_AMOUNT' %}</th></tr></thead><tbody>{% for item in items %}<tr><td>{{ item.number }}</td><td>{{ item.description }}</td><td>{{ item.amount }}</td></tr>{% endfor %}</tbody></table><p class="summary">{% trans 'TOTAL' %}: {{ proposal.total_amount }}</p><div class="decision-block"><h3>{% trans 'DECISION_HEADER' %}</h3>{% if decision.kind == 'approve' %}<p><strong>{% trans 'DECISION_APPROVE' %}</strong></p>{% else %}<p><strong>{% trans 'DECISION_DECLINE' %}</strong></p>{% if decision.reason %}<p>{% trans 'DECLINE_REASON' %}: {{ decision.reason }}</p>{% endif %}{% endif %}</div><div class="signature"><p>{{ user.full_name_or_short_name }}</p><p>{% trans 'CHAIRMAN_SIGNATURE' %}</p><p>{% trans 'SIGNED_DIGITALLY' %}</p></div></div>`
|
||||
export const context = `<style>h1{margin:0;text-align:center;}h3{margin:0;padding-top:15px;text-align:center;}.digital-document{padding:20px;white-space:pre-wrap;}table{width:100%;border-collapse:collapse;}th,td{border:1px solid #ccc;padding:8px;text-align:left;word-wrap:break-word;overflow-wrap:break-word;}th{background-color:#f4f4f4;}.summary{margin-top:20px;text-align:right;font-weight:bold;}.decision-block{padding-top:20px;border:2px solid #333;padding:15px;margin-top:20px;}.signature{padding-top:30px;}</style><div class="digital-document"><div style="padding-bottom:30px;"><h1 style="text-align:center">{% trans 'PROTOCOL_TITLE' %}</h1><p style="text-align:center">{{vars.full_abbr_genitive}} «{{vars.name}}»</p><p style="text-align:right;padding-top:20px">{{ coop.city }}, {{ meta.created_at }}</p>{% if decision.protocol_number %}<p style="text-align:center;padding-top:10px;">{% trans 'PROTOCOL_NUMBER' %} {{ decision.protocol_number }} {% trans 'FROM' %} {{ decision.protocol_date }}</p>{% endif %}</div><h3>{% trans 'REFERENCE' %}</h3><p>{% trans 'REFERENCE_BODY' %}</p><p><strong>{% trans 'REFERENCE_HASH' %}:</strong> № {{ proposal_short_hash }}</p><p><strong>{% trans 'PURPOSE' %}:</strong> {{ proposal.description }}</p><h3 style="padding-top:20px;">{% trans 'ITEMS' %}</h3><table><thead><tr><th>№</th><th>{% trans 'ITEM_DESCRIPTION' %}</th><th>{% trans 'ITEM_AMOUNT' %}</th></tr></thead><tbody>{% for item in items %}<tr><td>{{ item.number }}</td><td>{{ item.description }}</td><td>{{ item.amount }}</td></tr>{% endfor %}</tbody></table><p class="summary">{% trans 'TOTAL' %}: {{ proposal.total_amount }}</p><div class="decision-block"><h3>{% trans 'DECISION_HEADER' %}</h3>{% if decision.kind == 'approve' %}<p><strong>{% trans 'DECISION_APPROVE' %}</strong></p>{% else %}<p><strong>{% trans 'DECISION_DECLINE' %}</strong></p>{% if decision.reason %}<p>{% trans 'DECLINE_REASON' %}: {{ decision.reason }}</p>{% endif %}{% endif %}</div><div class="signature"><p>{{ user.full_name_or_short_name }}</p><p>{% trans 'CHAIRMAN_SIGNATURE' %}</p><p>{% trans 'SIGNED_DIGITALLY' %}</p></div></div>`
|
||||
|
||||
export const translations = {
|
||||
ru: {
|
||||
@@ -45,7 +47,7 @@ export const translations = {
|
||||
FROM: 'от',
|
||||
REFERENCE: 'ОСНОВАНИЕ',
|
||||
REFERENCE_BODY: 'Рассмотрена служебная записка-смета о расходах:',
|
||||
REFERENCE_HASH: 'Хэш документа',
|
||||
REFERENCE_HASH: 'Служебная записка',
|
||||
PURPOSE: 'Цель',
|
||||
ITEMS: 'ПОЗИЦИИ РАСХОДА',
|
||||
ITEM_DESCRIPTION: 'Описание',
|
||||
@@ -65,7 +67,8 @@ export const exampleData = {
|
||||
meta: { created_at: '03.06.2026 11:00' },
|
||||
vars: { full_abbr_genitive: 'ПК', name: 'Восход' },
|
||||
user: { full_name_or_short_name: 'Петров П.П.' },
|
||||
proposal_hash: '0xabc123def456...',
|
||||
proposal_hash: '55c470039a8c53ce1b4b6e842fe8063ab3d5b85ba2ba8ab0ae6e30be3ad328b7',
|
||||
proposal_short_hash: '55C470039A8C53CE',
|
||||
proposal: {
|
||||
description: 'Закупка хостинга и бухгалтерских услуг на июнь 2026',
|
||||
total_amount: '15000.00 RUB',
|
||||
|
||||
Reference in New Issue
Block a user