351 lines
8.1 KiB
TypeScript
351 lines
8.1 KiB
TypeScript
import type { ContractTemplateConfig } from '../store/contractDesignStore';
|
|
|
|
// 示例合同模板 - 简单采购合同
|
|
export const samplePurchaseContract: ContractTemplateConfig = {
|
|
id: 'sample-purchase-001',
|
|
name: '采购合同模板',
|
|
code: 'PURCHASE_CONTRACT',
|
|
category: '采购类',
|
|
description: '标准采购合同模板,适用于一般商品采购场景',
|
|
pageSize: 'A4',
|
|
pageMargin: { top: 60, right: 60, bottom: 60, left: 60 },
|
|
elements: [
|
|
{
|
|
id: 'title-1',
|
|
type: 'title',
|
|
props: {
|
|
content: '采购合同',
|
|
level: 1,
|
|
align: 'center',
|
|
fontSize: 24,
|
|
fontWeight: 'bold',
|
|
},
|
|
},
|
|
{
|
|
id: 'contract-no',
|
|
type: 'paragraph',
|
|
props: {
|
|
content: '合同编号:{{contract_no}}',
|
|
align: 'right',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 0,
|
|
},
|
|
},
|
|
{
|
|
id: 'divider-1',
|
|
type: 'divider',
|
|
props: {
|
|
style: 'solid',
|
|
color: 'var(--el-border-color)',
|
|
margin: 16,
|
|
},
|
|
},
|
|
{
|
|
id: 'party-info',
|
|
type: 'paragraph',
|
|
props: {
|
|
content:
|
|
'甲方(采购方):{{party_a_name}}\n地址:{{party_a_address}}\n联系电话:{{party_a_phone}}\n\n乙方(供应方):{{party_b_name}}\n地址:{{party_b_address}}\n联系电话:{{party_b_phone}}',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 0,
|
|
},
|
|
},
|
|
{
|
|
id: 'divider-2',
|
|
type: 'divider',
|
|
props: {
|
|
style: 'dashed',
|
|
color: 'var(--el-border-color)',
|
|
margin: 16,
|
|
},
|
|
},
|
|
{
|
|
id: 'intro',
|
|
type: 'paragraph',
|
|
props: {
|
|
content:
|
|
'甲乙双方经友好协商,就甲方向乙方采购相关产品事宜,达成如下协议:',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 2,
|
|
},
|
|
},
|
|
{
|
|
id: 'article-1',
|
|
type: 'title',
|
|
props: {
|
|
content: '第一条 采购内容',
|
|
level: 3,
|
|
align: 'left',
|
|
fontSize: 16,
|
|
fontWeight: 'bold',
|
|
},
|
|
},
|
|
{
|
|
id: 'article-1-content',
|
|
type: 'paragraph',
|
|
props: {
|
|
content:
|
|
'甲方向乙方采购以下产品(详见附件清单),合同总金额为人民币 {{contract_amount}} 元整。',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 2,
|
|
},
|
|
},
|
|
{
|
|
id: 'article-2',
|
|
type: 'title',
|
|
props: {
|
|
content: '第二条 交付方式',
|
|
level: 3,
|
|
align: 'left',
|
|
fontSize: 16,
|
|
fontWeight: 'bold',
|
|
},
|
|
},
|
|
{
|
|
id: 'article-2-content',
|
|
type: 'paragraph',
|
|
props: {
|
|
content:
|
|
'乙方应于合同签订后30个工作日内完成产品交付。交付地点为甲方指定地址。',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 2,
|
|
},
|
|
},
|
|
{
|
|
id: 'article-3',
|
|
type: 'title',
|
|
props: {
|
|
content: '第三条 付款方式',
|
|
level: 3,
|
|
align: 'left',
|
|
fontSize: 16,
|
|
fontWeight: 'bold',
|
|
},
|
|
},
|
|
{
|
|
id: 'article-3-content',
|
|
type: 'paragraph',
|
|
props: {
|
|
content: '甲方应于产品验收合格后15个工作日内,向乙方支付全部合同款项。',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 2,
|
|
},
|
|
},
|
|
{
|
|
id: 'article-4',
|
|
type: 'title',
|
|
props: {
|
|
content: '第四条 违约责任',
|
|
level: 3,
|
|
align: 'left',
|
|
fontSize: 16,
|
|
fontWeight: 'bold',
|
|
},
|
|
},
|
|
{
|
|
id: 'article-4-content',
|
|
type: 'paragraph',
|
|
props: {
|
|
content:
|
|
'任何一方违反本合同约定,应向对方支付合同总金额10%的违约金,并赔偿由此造成的全部损失。',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 2,
|
|
},
|
|
},
|
|
{
|
|
id: 'article-5',
|
|
type: 'title',
|
|
props: {
|
|
content: '第五条 争议解决',
|
|
level: 3,
|
|
align: 'left',
|
|
fontSize: 16,
|
|
fontWeight: 'bold',
|
|
},
|
|
},
|
|
{
|
|
id: 'article-5-content',
|
|
type: 'paragraph',
|
|
props: {
|
|
content:
|
|
'本合同在履行过程中发生的争议,由双方协商解决;协商不成的,任何一方均可向合同签订地人民法院提起诉讼。',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 2,
|
|
},
|
|
},
|
|
{
|
|
id: 'article-6',
|
|
type: 'title',
|
|
props: {
|
|
content: '第六条 其他',
|
|
level: 3,
|
|
align: 'left',
|
|
fontSize: 16,
|
|
fontWeight: 'bold',
|
|
},
|
|
},
|
|
{
|
|
id: 'article-6-content',
|
|
type: 'paragraph',
|
|
props: {
|
|
content:
|
|
'本合同一式两份,甲乙双方各执一份,具有同等法律效力。本合同自双方签字盖章之日起生效。',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 2,
|
|
},
|
|
},
|
|
{
|
|
id: 'divider-3',
|
|
type: 'divider',
|
|
props: {
|
|
style: 'solid',
|
|
color: 'var(--el-border-color)',
|
|
margin: 24,
|
|
},
|
|
},
|
|
{
|
|
id: 'sign-section-title',
|
|
type: 'paragraph',
|
|
props: {
|
|
content: '(以下为签署区)',
|
|
align: 'center',
|
|
fontSize: 12,
|
|
lineHeight: 1.5,
|
|
indent: 0,
|
|
},
|
|
},
|
|
{
|
|
id: 'sign-party-a',
|
|
type: 'paragraph',
|
|
props: {
|
|
content: '甲方(盖章):',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 0,
|
|
},
|
|
},
|
|
{
|
|
id: 'signature-a',
|
|
type: 'signature-zone',
|
|
props: {
|
|
width: 200,
|
|
height: 80,
|
|
label: '签名',
|
|
showBorder: true,
|
|
},
|
|
signature: {
|
|
partyType: 'party_a',
|
|
partyLabel: '甲方签名',
|
|
showDate: true,
|
|
showSeal: false,
|
|
required: true,
|
|
},
|
|
},
|
|
{
|
|
id: 'date-a',
|
|
type: 'date-zone',
|
|
props: {
|
|
format: 'YYYY年MM月DD日',
|
|
label: '签署日期',
|
|
showUnderline: true,
|
|
},
|
|
},
|
|
{
|
|
id: 'sign-party-b',
|
|
type: 'paragraph',
|
|
props: {
|
|
content: '乙方(盖章):',
|
|
align: 'left',
|
|
fontSize: 14,
|
|
lineHeight: 1.8,
|
|
indent: 0,
|
|
},
|
|
},
|
|
{
|
|
id: 'signature-b',
|
|
type: 'signature-zone',
|
|
props: {
|
|
width: 200,
|
|
height: 80,
|
|
label: '签名',
|
|
showBorder: true,
|
|
},
|
|
signature: {
|
|
partyType: 'party_b',
|
|
partyLabel: '乙方签名',
|
|
showDate: true,
|
|
showSeal: false,
|
|
required: true,
|
|
},
|
|
},
|
|
{
|
|
id: 'date-b',
|
|
type: 'date-zone',
|
|
props: {
|
|
format: 'YYYY年MM月DD日',
|
|
label: '签署日期',
|
|
showUnderline: true,
|
|
},
|
|
},
|
|
],
|
|
variables: [
|
|
{ code: 'party_a_name', name: '甲方名称', type: 'text', required: true },
|
|
{
|
|
code: 'party_a_address',
|
|
name: '甲方地址',
|
|
type: 'text',
|
|
required: false,
|
|
},
|
|
{ code: 'party_a_phone', name: '甲方电话', type: 'text', required: false },
|
|
{ code: 'party_b_name', name: '乙方名称', type: 'text', required: true },
|
|
{
|
|
code: 'party_b_address',
|
|
name: '乙方地址',
|
|
type: 'text',
|
|
required: false,
|
|
},
|
|
{ code: 'party_b_phone', name: '乙方电话', type: 'text', required: false },
|
|
{ code: 'contract_no', name: '合同编号', type: 'text', required: true },
|
|
{
|
|
code: 'contract_amount',
|
|
name: '合同金额',
|
|
type: 'money',
|
|
required: true,
|
|
format: '¥#,##0.00',
|
|
},
|
|
],
|
|
parties: [
|
|
{ type: 'party_a', label: '甲方(采购方)', required: true },
|
|
{ type: 'party_b', label: '乙方(供应方)', required: true },
|
|
],
|
|
};
|
|
|
|
// 导出所有模板
|
|
export const contractTemplates = [
|
|
{
|
|
id: 'sample-purchase',
|
|
name: '采购合同',
|
|
description: '标准采购合同模板',
|
|
icon: 'FileText',
|
|
template: samplePurchaseContract,
|
|
},
|
|
];
|