|
|
@@ -9,6 +9,18 @@ interface DocumentTemplate {
|
|
|
category: string;
|
|
|
description: string;
|
|
|
useCount: number;
|
|
|
+ icon: string;
|
|
|
+ fields: TemplateField[];
|
|
|
+ content: string;
|
|
|
+}
|
|
|
+
|
|
|
+interface TemplateField {
|
|
|
+ key: string;
|
|
|
+ label: string;
|
|
|
+ type: 'text' | 'textarea' | 'date' | 'number' | 'select';
|
|
|
+ placeholder?: string;
|
|
|
+ required?: boolean;
|
|
|
+ options?: string[];
|
|
|
}
|
|
|
|
|
|
@Component({
|
|
|
@@ -21,25 +33,441 @@ interface DocumentTemplate {
|
|
|
export class DocumentGenerator {
|
|
|
searchQuery = '';
|
|
|
activeCategory = 'all';
|
|
|
+ selectedTemplate: DocumentTemplate | null = null;
|
|
|
+ showPreview = false;
|
|
|
+ formData: { [key: string]: any } = {};
|
|
|
+ generatedDocument = '';
|
|
|
|
|
|
categories = [
|
|
|
- { id: 'all', name: '全部' },
|
|
|
- { id: 'labor', name: '劳动纠纷' },
|
|
|
- { id: 'contract', name: '合同纠纷' },
|
|
|
- { id: 'divorce', name: '婚姻家庭' },
|
|
|
- { id: 'traffic', name: '交通事故' },
|
|
|
- { id: 'property', name: '房产纠纷' }
|
|
|
+ { id: 'all', name: '全部', icon: 'fas fa-th' },
|
|
|
+ { id: 'labor', name: '劳动纠纷', icon: 'fas fa-briefcase' },
|
|
|
+ { id: 'contract', name: '合同纠纷', icon: 'fas fa-file-contract' },
|
|
|
+ { id: 'divorce', name: '婚姻家庭', icon: 'fas fa-heart-broken' },
|
|
|
+ { id: 'traffic', name: '交通事故', icon: 'fas fa-car-crash' },
|
|
|
+ { id: 'property', name: '房产纠纷', icon: 'fas fa-home' }
|
|
|
];
|
|
|
|
|
|
allTemplates: DocumentTemplate[] = [
|
|
|
- { id: 1, name: '劳动仲裁申请书', category: 'labor', description: '用于劳动争议仲裁申请', useCount: 1234 },
|
|
|
- { id: 2, name: '民事起诉状', category: 'contract', description: '民事诉讼起诉书模板', useCount: 2345 },
|
|
|
- { id: 3, name: '离婚协议书', category: 'divorce', description: '协议离婚所需文书', useCount: 1890 },
|
|
|
- { id: 4, name: '交通事故赔偿协议', category: 'traffic', description: '交通事故私了协议', useCount: 987 },
|
|
|
- { id: 5, name: '房屋租赁合同', category: 'property', description: '标准租房合同模板', useCount: 3456 },
|
|
|
- { id: 6, name: '答辩状', category: 'all', description: '民事诉讼答辩文书', useCount: 876 },
|
|
|
- { id: 7, name: '上诉状', category: 'all', description: '二审上诉申请书', useCount: 654 },
|
|
|
- { id: 8, name: '授权委托书', category: 'all', description: '诉讼代理委托书', useCount: 2109 }
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ name: '劳动仲裁申请书',
|
|
|
+ category: 'labor',
|
|
|
+ description: '用于劳动争议仲裁申请',
|
|
|
+ useCount: 1234,
|
|
|
+ icon: 'fas fa-briefcase',
|
|
|
+ fields: [
|
|
|
+ { key: 'applicantName', label: '申请人姓名', type: 'text', placeholder: '请输入申请人姓名', required: true },
|
|
|
+ { key: 'applicantGender', label: '性别', type: 'select', options: ['男', '女'], required: true },
|
|
|
+ { key: 'applicantId', label: '身份证号', type: 'text', placeholder: '请输入身份证号', required: true },
|
|
|
+ { key: 'applicantAddress', label: '住址', type: 'text', placeholder: '请输入住址', required: true },
|
|
|
+ { key: 'applicantPhone', label: '联系电话', type: 'text', placeholder: '请输入联系电话', required: true },
|
|
|
+ { key: 'respondentName', label: '被申请人名称', type: 'text', placeholder: '请输入公司名称', required: true },
|
|
|
+ { key: 'respondentAddress', label: '被申请人地址', type: 'text', placeholder: '请输入公司地址', required: true },
|
|
|
+ { key: 'respondentLegal', label: '法定代表人', type: 'text', placeholder: '请输入法定代表人', required: true },
|
|
|
+ { key: 'entryDate', label: '入职日期', type: 'date', required: true },
|
|
|
+ { key: 'leaveDate', label: '离职日期', type: 'date', required: true },
|
|
|
+ { key: 'position', label: '工作岗位', type: 'text', placeholder: '请输入工作岗位', required: true },
|
|
|
+ { key: 'salary', label: '月工资', type: 'number', placeholder: '请输入月工资金额', required: true },
|
|
|
+ { key: 'disputeReason', label: '争议事项', type: 'textarea', placeholder: '请详细描述劳动争议的具体情况', required: true },
|
|
|
+ { key: 'claimAmount', label: '请求金额', type: 'number', placeholder: '请输入索赔金额', required: true },
|
|
|
+ { key: 'arbitrationCommission', label: '仲裁委员会', type: 'text', placeholder: '如:XX市劳动人事争议仲裁委员会', required: true }
|
|
|
+ ],
|
|
|
+ content: `劳动人事争议仲裁申请书
|
|
|
+
|
|
|
+申请人:{{applicantName}},{{applicantGender}},身份证号:{{applicantId}}
|
|
|
+住址:{{applicantAddress}}
|
|
|
+联系电话:{{applicantPhone}}
|
|
|
+
|
|
|
+被申请人:{{respondentName}}
|
|
|
+地址:{{respondentAddress}}
|
|
|
+法定代表人:{{respondentLegal}}
|
|
|
+
|
|
|
+仲裁请求:
|
|
|
+一、请求裁决被申请人支付申请人经济补偿金人民币{{claimAmount}}元;
|
|
|
+二、请求裁决被申请人支付申请人拖欠工资人民币______元;
|
|
|
+三、本案仲裁费用由被申请人承担。
|
|
|
+
|
|
|
+事实与理由:
|
|
|
+申请人于{{entryDate}}入职被申请人单位,担任{{position}}一职,月工资为{{salary}}元。
|
|
|
+
|
|
|
+{{disputeReason}}
|
|
|
+
|
|
|
+申请人于{{leaveDate}}离职。根据《中华人民共和国劳动合同法》第四十六条、第四十七条之规定,被申请人应当向申请人支付经济补偿金。经申请人多次催要,被申请人拒不支付,严重侵害了申请人的合法权益。
|
|
|
+
|
|
|
+综上所述,被申请人的行为严重违反了《中华人民共和国劳动合同法》的相关规定,为维护申请人的合法权益,特向贵委提出仲裁申请,请求依法裁决。
|
|
|
+
|
|
|
+此致
|
|
|
+{{arbitrationCommission}}
|
|
|
+
|
|
|
+申请人:{{applicantName}}
|
|
|
+日期:{{currentDate}}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ name: '民事起诉状',
|
|
|
+ category: 'contract',
|
|
|
+ description: '民事诉讼起诉书模板',
|
|
|
+ useCount: 2345,
|
|
|
+ icon: 'fas fa-gavel',
|
|
|
+ fields: [
|
|
|
+ { key: 'plaintiffName', label: '原告姓名', type: 'text', placeholder: '请输入原告姓名', required: true },
|
|
|
+ { key: 'plaintiffGender', label: '性别', type: 'select', options: ['男', '女'], required: true },
|
|
|
+ { key: 'plaintiffBirth', label: '出生年月', type: 'date', required: true },
|
|
|
+ { key: 'plaintiffNation', label: '民族', type: 'text', placeholder: '如:汉族', required: true },
|
|
|
+ { key: 'plaintiffAddress', label: '住址', type: 'text', placeholder: '请输入住址', required: true },
|
|
|
+ { key: 'plaintiffPhone', label: '联系电话', type: 'text', placeholder: '请输入联系电话', required: true },
|
|
|
+ { key: 'defendantName', label: '被告姓名/名称', type: 'text', placeholder: '请输入被告姓名或公司名称', required: true },
|
|
|
+ { key: 'defendantAddress', label: '被告地址', type: 'text', placeholder: '请输入被告地址', required: true },
|
|
|
+ { key: 'caseType', label: '案由', type: 'select', options: ['合同纠纷', '侵权纠纷', '债权债务纠纷', '其他'], required: true },
|
|
|
+ { key: 'claimAmount', label: '诉讼请求金额', type: 'number', placeholder: '请输入金额', required: true },
|
|
|
+ { key: 'factsAndReasons', label: '事实与理由', type: 'textarea', placeholder: '请详细描述案件事实和起诉理由', required: true },
|
|
|
+ { key: 'evidence', label: '证据清单', type: 'textarea', placeholder: '请列出证据材料,如:1.合同原件一份 2.转账记录...', required: true },
|
|
|
+ { key: 'court', label: '受理法院', type: 'text', placeholder: '如:XX市XX区人民法院', required: true }
|
|
|
+ ],
|
|
|
+ content: `民事起诉状
|
|
|
+
|
|
|
+原告:{{plaintiffName}},{{plaintiffGender}},{{plaintiffNation}}族,{{plaintiffBirth}}出生
|
|
|
+住址:{{plaintiffAddress}}
|
|
|
+联系电话:{{plaintiffPhone}}
|
|
|
+
|
|
|
+被告:{{defendantName}}
|
|
|
+地址:{{defendantAddress}}
|
|
|
+
|
|
|
+案由:{{caseType}}
|
|
|
+
|
|
|
+诉讼请求:
|
|
|
+一、判令被告向原告支付人民币{{claimAmount}}元;
|
|
|
+二、判令被告承担本案诉讼费用。
|
|
|
+
|
|
|
+事实与理由:
|
|
|
+{{factsAndReasons}}
|
|
|
+
|
|
|
+原告认为,被告的上述行为严重侵害了原告的合法权益,给原告造成了经济损失。根据《中华人民共和国民法典》及相关法律规定,被告应当承担相应的民事责任。
|
|
|
+
|
|
|
+为维护原告的合法权益,特向贵院提起诉讼,请求依法判决。
|
|
|
+
|
|
|
+证据清单:
|
|
|
+{{evidence}}
|
|
|
+
|
|
|
+此致
|
|
|
+{{court}}
|
|
|
+
|
|
|
+起诉人:{{plaintiffName}}
|
|
|
+日期:{{currentDate}}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ name: '离婚协议书',
|
|
|
+ category: 'divorce',
|
|
|
+ description: '协议离婚所需文书',
|
|
|
+ useCount: 1890,
|
|
|
+ icon: 'fas fa-heart-broken',
|
|
|
+ fields: [
|
|
|
+ { key: 'husbandName', label: '男方姓名', type: 'text', placeholder: '请输入男方姓名', required: true },
|
|
|
+ { key: 'husbandId', label: '男方身份证号', type: 'text', placeholder: '请输入身份证号', required: true },
|
|
|
+ { key: 'husbandAddress', label: '男方住址', type: 'text', placeholder: '请输入住址', required: true },
|
|
|
+ { key: 'wifeName', label: '女方姓名', type: 'text', placeholder: '请输入女方姓名', required: true },
|
|
|
+ { key: 'wifeId', label: '女方身份证号', type: 'text', placeholder: '请输入身份证号', required: true },
|
|
|
+ { key: 'wifeAddress', label: '女方住址', type: 'text', placeholder: '请输入住址', required: true },
|
|
|
+ { key: 'marriageDate', label: '结婚日期', type: 'date', required: true },
|
|
|
+ { key: 'hasChildren', label: '是否有子女', type: 'select', options: ['是', '否'], required: true },
|
|
|
+ { key: 'childrenInfo', label: '子女信息', type: 'textarea', placeholder: '如有子女,请填写姓名、性别、出生日期' },
|
|
|
+ { key: 'custodyArrangement', label: '子女抚养安排', type: 'textarea', placeholder: '请说明子女由谁抚养,抚养费如何支付' },
|
|
|
+ { key: 'propertyDivision', label: '财产分割', type: 'textarea', placeholder: '请详细说明夫妻共同财产的分割方案', required: true },
|
|
|
+ { key: 'debtArrangement', label: '债务处理', type: 'textarea', placeholder: '请说明夫妻共同债务的处理方案' }
|
|
|
+ ],
|
|
|
+ content: `离婚协议书
|
|
|
+
|
|
|
+男方:{{husbandName}},身份证号:{{husbandId}}
|
|
|
+住址:{{husbandAddress}}
|
|
|
+
|
|
|
+女方:{{wifeName}},身份证号:{{wifeId}}
|
|
|
+住址:{{wifeAddress}}
|
|
|
+
|
|
|
+男女双方于{{marriageDate}}在______民政局登记结婚。现因夫妻感情确已破裂,经双方自愿协商,达成如下离婚协议:
|
|
|
+
|
|
|
+一、离婚
|
|
|
+男女双方自愿离婚。
|
|
|
+
|
|
|
+二、子女抚养
|
|
|
+{{hasChildren}}子女。
|
|
|
+{{custodyArrangement}}
|
|
|
+
|
|
|
+三、夫妻共同财产的分割
|
|
|
+{{propertyDivision}}
|
|
|
+
|
|
|
+四、债务处理
|
|
|
+{{debtArrangement}}
|
|
|
+
|
|
|
+五、其他约定
|
|
|
+1. 双方确认除上述财产外,无其他共同财产;
|
|
|
+2. 双方确认除上述债务外,无其他共同债务;
|
|
|
+3. 双方应互相尊重,不得干涉对方离婚后的生活。
|
|
|
+
|
|
|
+六、协议生效
|
|
|
+本协议一式三份,男女双方各执一份,婚姻登记机关存档一份,自双方签字并经婚姻登记机关办理离婚登记后生效。
|
|
|
+
|
|
|
+男方签字:____________ 日期:{{currentDate}}
|
|
|
+
|
|
|
+女方签字:____________ 日期:{{currentDate}}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 4,
|
|
|
+ name: '交通事故赔偿协议',
|
|
|
+ category: 'traffic',
|
|
|
+ description: '交通事故私了协议',
|
|
|
+ useCount: 987,
|
|
|
+ icon: 'fas fa-car-crash',
|
|
|
+ fields: [
|
|
|
+ { key: 'partyAName', label: '甲方姓名', type: 'text', placeholder: '请输入甲方(赔偿方)姓名', required: true },
|
|
|
+ { key: 'partyAId', label: '甲方身份证号', type: 'text', placeholder: '请输入身份证号', required: true },
|
|
|
+ { key: 'partyAPhone', label: '甲方电话', type: 'text', placeholder: '请输入联系电话', required: true },
|
|
|
+ { key: 'partyAVehicle', label: '甲方车辆', type: 'text', placeholder: '请输入车牌号', required: true },
|
|
|
+ { key: 'partyBName', label: '乙方姓名', type: 'text', placeholder: '请输入乙方(受害方)姓名', required: true },
|
|
|
+ { key: 'partyBId', label: '乙方身份证号', type: 'text', placeholder: '请输入身份证号', required: true },
|
|
|
+ { key: 'partyBPhone', label: '乙方电话', type: 'text', placeholder: '请输入联系电话', required: true },
|
|
|
+ { key: 'partyBVehicle', label: '乙方车辆', type: 'text', placeholder: '请输入车牌号(如有)' },
|
|
|
+ { key: 'accidentDate', label: '事故日期', type: 'date', required: true },
|
|
|
+ { key: 'accidentLocation', label: '事故地点', type: 'text', placeholder: '请输入事故发生地点', required: true },
|
|
|
+ { key: 'accidentDescription', label: '事故经过', type: 'textarea', placeholder: '请简要描述事故经过', required: true },
|
|
|
+ { key: 'damageDescription', label: '损失情况', type: 'textarea', placeholder: '请描述车辆损坏或人员受伤情况', required: true },
|
|
|
+ { key: 'compensationAmount', label: '赔偿金额', type: 'number', placeholder: '请输入赔偿金额(元)', required: true },
|
|
|
+ { key: 'paymentMethod', label: '支付方式', type: 'select', options: ['一次性支付', '分期支付'], required: true }
|
|
|
+ ],
|
|
|
+ content: `交通事故赔偿协议书
|
|
|
+
|
|
|
+甲方(赔偿方):{{partyAName}}
|
|
|
+身份证号:{{partyAId}}
|
|
|
+联系电话:{{partyAPhone}}
|
|
|
+车辆号牌:{{partyAVehicle}}
|
|
|
+
|
|
|
+乙方(受害方):{{partyBName}}
|
|
|
+身份证号:{{partyBId}}
|
|
|
+联系电话:{{partyBPhone}}
|
|
|
+车辆号牌:{{partyBVehicle}}
|
|
|
+
|
|
|
+{{accidentDate}},甲乙双方在{{accidentLocation}}发生交通事故。
|
|
|
+
|
|
|
+一、事故经过
|
|
|
+{{accidentDescription}}
|
|
|
+
|
|
|
+二、损失情况
|
|
|
+{{damageDescription}}
|
|
|
+
|
|
|
+三、责任认定
|
|
|
+经双方协商,甲方对本次事故承担全部/主要责任。
|
|
|
+
|
|
|
+四、赔偿方案
|
|
|
+1. 甲方同意向乙方支付赔偿款人民币{{compensationAmount}}元(大写:______元整);
|
|
|
+2. 支付方式:{{paymentMethod}};
|
|
|
+3. 甲方应于本协议签订后____日内支付完毕。
|
|
|
+
|
|
|
+五、其他约定
|
|
|
+1. 本协议签订后,乙方不得就本次事故再向甲方主张任何权利;
|
|
|
+2. 双方确认本次事故已处理完毕,今后互不追究;
|
|
|
+3. 如甲方未按约定支付赔偿款,乙方有权通过法律途径解决。
|
|
|
+
|
|
|
+六、协议生效
|
|
|
+本协议一式两份,甲乙双方各执一份,自双方签字之日起生效。
|
|
|
+
|
|
|
+甲方签字:____________ 日期:{{currentDate}}
|
|
|
+
|
|
|
+乙方签字:____________ 日期:{{currentDate}}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 5,
|
|
|
+ name: '房屋租赁合同',
|
|
|
+ category: 'property',
|
|
|
+ description: '标准租房合同模板',
|
|
|
+ useCount: 3456,
|
|
|
+ icon: 'fas fa-home',
|
|
|
+ fields: [
|
|
|
+ { key: 'landlordName', label: '出租方姓名', type: 'text', placeholder: '请输入出租方姓名', required: true },
|
|
|
+ { key: 'landlordId', label: '出租方身份证号', type: 'text', placeholder: '请输入身份证号', required: true },
|
|
|
+ { key: 'landlordPhone', label: '出租方电话', type: 'text', placeholder: '请输入联系电话', required: true },
|
|
|
+ { key: 'tenantName', label: '承租方姓名', type: 'text', placeholder: '请输入承租方姓名', required: true },
|
|
|
+ { key: 'tenantId', label: '承租方身份证号', type: 'text', placeholder: '请输入身份证号', required: true },
|
|
|
+ { key: 'tenantPhone', label: '承租方电话', type: 'text', placeholder: '请输入联系电话', required: true },
|
|
|
+ { key: 'propertyAddress', label: '房屋地址', type: 'text', placeholder: '请输入房屋详细地址', required: true },
|
|
|
+ { key: 'propertyArea', label: '房屋面积', type: 'number', placeholder: '请输入房屋面积(平方米)', required: true },
|
|
|
+ { key: 'rentAmount', label: '月租金', type: 'number', placeholder: '请输入月租金金额(元)', required: true },
|
|
|
+ { key: 'deposit', label: '押金', type: 'number', placeholder: '请输入押金金额(元)', required: true },
|
|
|
+ { key: 'startDate', label: '租赁开始日期', type: 'date', required: true },
|
|
|
+ { key: 'endDate', label: '租赁结束日期', type: 'date', required: true },
|
|
|
+ { key: 'paymentDay', label: '租金支付日', type: 'number', placeholder: '每月几号支付(1-31)', required: true },
|
|
|
+ { key: 'utilities', label: '水电费承担', type: 'select', options: ['承租方承担', '出租方承担', '双方协商'], required: true }
|
|
|
+ ],
|
|
|
+ content: `房屋租赁合同
|
|
|
+
|
|
|
+出租方(甲方):{{landlordName}}
|
|
|
+身份证号:{{landlordId}}
|
|
|
+联系电话:{{landlordPhone}}
|
|
|
+
|
|
|
+承租方(乙方):{{tenantName}}
|
|
|
+身份证号:{{tenantId}}
|
|
|
+联系电话:{{tenantPhone}}
|
|
|
+
|
|
|
+根据《中华人民共和国民法典》及有关法律法规的规定,甲乙双方在平等、自愿的基础上,就房屋租赁事宜达成如下协议:
|
|
|
+
|
|
|
+一、租赁房屋
|
|
|
+甲方将其所有的位于{{propertyAddress}}的房屋(建筑面积约{{propertyArea}}平方米)出租给乙方使用。
|
|
|
+
|
|
|
+二、租赁期限
|
|
|
+租赁期限自{{startDate}}起至{{endDate}}止,共计____个月。
|
|
|
+
|
|
|
+三、租金及支付方式
|
|
|
+1. 月租金为人民币{{rentAmount}}元(大写:______元整);
|
|
|
+2. 乙方应于每月{{paymentDay}}日前支付当月租金;
|
|
|
+3. 乙方应在签订本合同时向甲方支付押金人民币{{deposit}}元。
|
|
|
+
|
|
|
+四、房屋使用
|
|
|
+1. 乙方应合理使用房屋,不得擅自改变房屋结构;
|
|
|
+2. 乙方不得利用房屋从事违法活动;
|
|
|
+3. 乙方应按时缴纳水、电、燃气等费用({{utilities}})。
|
|
|
+
|
|
|
+五、房屋维修
|
|
|
+1. 因自然损耗造成的维修由甲方负责;
|
|
|
+2. 因乙方使用不当造成的损坏由乙方负责维修或赔偿。
|
|
|
+
|
|
|
+六、合同解除
|
|
|
+1. 租赁期满,本合同自然终止;
|
|
|
+2. 经双方协商一致,可以提前解除合同;
|
|
|
+3. 一方违约,守约方有权解除合同并要求赔偿。
|
|
|
+
|
|
|
+七、违约责任
|
|
|
+1. 乙方逾期支付租金超过____日,甲方有权解除合同并没收押金;
|
|
|
+2. 甲方未按约定提供房屋,应双倍返还押金。
|
|
|
+
|
|
|
+八、其他约定
|
|
|
+1. 本合同未尽事宜,双方可另行协商;
|
|
|
+2. 本合同一式两份,甲乙双方各执一份,自双方签字之日起生效。
|
|
|
+
|
|
|
+甲方签字:____________ 日期:{{currentDate}}
|
|
|
+
|
|
|
+乙方签字:____________ 日期:{{currentDate}}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 6,
|
|
|
+ name: '答辩状',
|
|
|
+ category: 'contract',
|
|
|
+ description: '民事诉讼答辩文书',
|
|
|
+ useCount: 876,
|
|
|
+ icon: 'fas fa-reply',
|
|
|
+ fields: [
|
|
|
+ { key: 'defendantName', label: '答辩人姓名/名称', type: 'text', placeholder: '请输入答辩人姓名或公司名称', required: true },
|
|
|
+ { key: 'defendantAddress', label: '答辩人地址', type: 'text', placeholder: '请输入地址', required: true },
|
|
|
+ { key: 'plaintiffName', label: '原告姓名/名称', type: 'text', placeholder: '请输入原告姓名或公司名称', required: true },
|
|
|
+ { key: 'caseNumber', label: '案号', type: 'text', placeholder: '请输入案号', required: true },
|
|
|
+ { key: 'caseType', label: '案由', type: 'text', placeholder: '如:合同纠纷', required: true },
|
|
|
+ { key: 'defenseOpinion', label: '答辩意见', type: 'textarea', placeholder: '请详细阐述答辩观点和理由', required: true },
|
|
|
+ { key: 'evidence', label: '证据清单', type: 'textarea', placeholder: '请列出支持答辩的证据材料', required: true },
|
|
|
+ { key: 'court', label: '受理法院', type: 'text', placeholder: '如:XX市XX区人民法院', required: true }
|
|
|
+ ],
|
|
|
+ content: `答辩状
|
|
|
+
|
|
|
+答辩人:{{defendantName}}
|
|
|
+地址:{{defendantAddress}}
|
|
|
+
|
|
|
+因原告{{plaintiffName}}诉答辩人{{caseType}}一案(案号:{{caseNumber}}),现提出如下答辩意见:
|
|
|
+
|
|
|
+一、答辩意见
|
|
|
+{{defenseOpinion}}
|
|
|
+
|
|
|
+二、事实与理由
|
|
|
+答辩人认为,原告的诉讼请求缺乏事实和法律依据,具体理由如下:
|
|
|
+
|
|
|
+1. 原告所述事实与客观事实不符;
|
|
|
+2. 原告的诉讼请求没有法律依据;
|
|
|
+3. 答辩人已依法履行了相关义务。
|
|
|
+
|
|
|
+综上所述,请求贵院依法驳回原告的诉讼请求。
|
|
|
+
|
|
|
+证据清单:
|
|
|
+{{evidence}}
|
|
|
+
|
|
|
+此致
|
|
|
+{{court}}
|
|
|
+
|
|
|
+答辩人:{{defendantName}}
|
|
|
+日期:{{currentDate}}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 7,
|
|
|
+ name: '上诉状',
|
|
|
+ category: 'contract',
|
|
|
+ description: '二审上诉申请书',
|
|
|
+ useCount: 654,
|
|
|
+ icon: 'fas fa-level-up-alt',
|
|
|
+ fields: [
|
|
|
+ { key: 'appellantName', label: '上诉人姓名/名称', type: 'text', placeholder: '请输入上诉人姓名或公司名称', required: true },
|
|
|
+ { key: 'appellantAddress', label: '上诉人地址', type: 'text', placeholder: '请输入地址', required: true },
|
|
|
+ { key: 'appelleeName', label: '被上诉人姓名/名称', type: 'text', placeholder: '请输入被上诉人姓名或公司名称', required: true },
|
|
|
+ { key: 'firstCaseNumber', label: '一审案号', type: 'text', placeholder: '请输入一审案号', required: true },
|
|
|
+ { key: 'firstCourt', label: '一审法院', type: 'text', placeholder: '请输入一审法院名称', required: true },
|
|
|
+ { key: 'judgmentDate', label: '判决日期', type: 'date', required: true },
|
|
|
+ { key: 'appealRequest', label: '上诉请求', type: 'textarea', placeholder: '请列出具体的上诉请求', required: true },
|
|
|
+ { key: 'appealReasons', label: '上诉理由', type: 'textarea', placeholder: '请详细阐述上诉的事实和理由', required: true },
|
|
|
+ { key: 'secondCourt', label: '二审法院', type: 'text', placeholder: '如:XX市中级人民法院', required: true }
|
|
|
+ ],
|
|
|
+ content: `上诉状
|
|
|
+
|
|
|
+上诉人:{{appellantName}}
|
|
|
+地址:{{appellantAddress}}
|
|
|
+
|
|
|
+被上诉人:{{appelleeName}}
|
|
|
+
|
|
|
+上诉人因不服{{firstCourt}}于{{judgmentDate}}作出的({{firstCaseNumber}})号民事判决,现依法提起上诉。
|
|
|
+
|
|
|
+上诉请求:
|
|
|
+{{appealRequest}}
|
|
|
+
|
|
|
+事实与理由:
|
|
|
+{{appealReasons}}
|
|
|
+
|
|
|
+上诉人认为,一审判决认定事实不清,适用法律错误,请求二审法院依法改判。
|
|
|
+
|
|
|
+此致
|
|
|
+{{secondCourt}}
|
|
|
+
|
|
|
+上诉人:{{appellantName}}
|
|
|
+日期:{{currentDate}}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 8,
|
|
|
+ name: '授权委托书',
|
|
|
+ category: 'contract',
|
|
|
+ description: '诉讼代理委托书',
|
|
|
+ useCount: 2109,
|
|
|
+ icon: 'fas fa-user-tie',
|
|
|
+ fields: [
|
|
|
+ { key: 'clientName', label: '委托人姓名', type: 'text', placeholder: '请输入委托人姓名', required: true },
|
|
|
+ { key: 'clientId', label: '委托人身份证号', type: 'text', placeholder: '请输入身份证号', required: true },
|
|
|
+ { key: 'agentName', label: '受托人姓名', type: 'text', placeholder: '请输入受托人(律师)姓名', required: true },
|
|
|
+ { key: 'agentLawFirm', label: '律师事务所', type: 'text', placeholder: '请输入律师事务所名称', required: true },
|
|
|
+ { key: 'caseType', label: '案件类型', type: 'text', placeholder: '如:合同纠纷', required: true },
|
|
|
+ { key: 'authorityScope', label: '委托权限', type: 'select', options: ['一般代理', '特别授权'], required: true },
|
|
|
+ { key: 'specificAuthority', label: '具体授权事项', type: 'textarea', placeholder: '如特别授权,请列出具体授权事项(如:代为承认、放弃、变更诉讼请求等)' }
|
|
|
+ ],
|
|
|
+ content: `授权委托书
|
|
|
+
|
|
|
+委托人:{{clientName}}
|
|
|
+身份证号:{{clientId}}
|
|
|
+
|
|
|
+受托人:{{agentName}}
|
|
|
+工作单位:{{agentLawFirm}}
|
|
|
+
|
|
|
+现委托上列受托人在本人与______因{{caseType}}一案中,作为本人的诉讼代理人。
|
|
|
+
|
|
|
+委托权限:{{authorityScope}}
|
|
|
+
|
|
|
+{{specificAuthority}}
|
|
|
+
|
|
|
+委托期限:自本委托书签署之日起至本案审理终结之日止。
|
|
|
+
|
|
|
+委托人签字:____________
|
|
|
+
|
|
|
+日期:{{currentDate}}`
|
|
|
+ }
|
|
|
];
|
|
|
|
|
|
constructor() {}
|
|
|
@@ -47,7 +475,7 @@ export class DocumentGenerator {
|
|
|
get filteredTemplates() {
|
|
|
let templates = this.activeCategory === 'all'
|
|
|
? this.allTemplates
|
|
|
- : this.allTemplates.filter(t => t.category === this.activeCategory || t.category === 'all');
|
|
|
+ : this.allTemplates.filter(t => t.category === this.activeCategory);
|
|
|
|
|
|
if (this.searchQuery.trim()) {
|
|
|
const query = this.searchQuery.toLowerCase();
|
|
|
@@ -64,8 +492,99 @@ export class DocumentGenerator {
|
|
|
this.activeCategory = categoryId;
|
|
|
}
|
|
|
|
|
|
- selectTemplate(template: DocumentTemplate) {
|
|
|
- console.log('选择模板:', template);
|
|
|
- // 这里可以导航到文书编辑页面
|
|
|
+ useTemplate(template: DocumentTemplate) {
|
|
|
+ this.selectedTemplate = template;
|
|
|
+ this.formData = {};
|
|
|
+ this.generatedDocument = '';
|
|
|
+ this.showPreview = false;
|
|
|
+
|
|
|
+ // 初始化表单数据
|
|
|
+ template.fields.forEach(field => {
|
|
|
+ this.formData[field.key] = '';
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ closeTemplate() {
|
|
|
+ this.selectedTemplate = null;
|
|
|
+ this.formData = {};
|
|
|
+ this.generatedDocument = '';
|
|
|
+ this.showPreview = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ generateDocument() {
|
|
|
+ if (!this.selectedTemplate) return;
|
|
|
+
|
|
|
+ // 验证必填字段
|
|
|
+ const missingFields = this.selectedTemplate.fields
|
|
|
+ .filter(field => field.required && !this.formData[field.key])
|
|
|
+ .map(field => field.label);
|
|
|
+
|
|
|
+ if (missingFields.length > 0) {
|
|
|
+ alert(`请填写以下必填项:\n${missingFields.join('\n')}`);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 生成文档
|
|
|
+ let document = this.selectedTemplate.content;
|
|
|
+
|
|
|
+ // 替换所有占位符
|
|
|
+ Object.keys(this.formData).forEach(key => {
|
|
|
+ const regex = new RegExp(`{{${key}}}`, 'g');
|
|
|
+ document = document.replace(regex, this.formData[key] || '______');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 添加当前日期
|
|
|
+ const today = new Date();
|
|
|
+ const dateStr = `${today.getFullYear()}年${today.getMonth() + 1}月${today.getDate()}日`;
|
|
|
+ document = document.replace(/{{currentDate}}/g, dateStr);
|
|
|
+
|
|
|
+ this.generatedDocument = document;
|
|
|
+ this.showPreview = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ downloadDocument() {
|
|
|
+ if (!this.generatedDocument || !this.selectedTemplate) return;
|
|
|
+
|
|
|
+ const blob = new Blob([this.generatedDocument], { type: 'text/plain;charset=utf-8' });
|
|
|
+ const url = window.URL.createObjectURL(blob);
|
|
|
+ const link = document.createElement('a');
|
|
|
+ link.href = url;
|
|
|
+ link.download = `${this.selectedTemplate.name}.txt`;
|
|
|
+ link.click();
|
|
|
+ window.URL.revokeObjectURL(url);
|
|
|
+ }
|
|
|
+
|
|
|
+ copyDocument() {
|
|
|
+ if (!this.generatedDocument) return;
|
|
|
+
|
|
|
+ navigator.clipboard.writeText(this.generatedDocument).then(() => {
|
|
|
+ alert('文书内容已复制到剪贴板');
|
|
|
+ }).catch(err => {
|
|
|
+ console.error('复制失败:', err);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ printDocument() {
|
|
|
+ if (!this.generatedDocument) return;
|
|
|
+
|
|
|
+ const printWindow = window.open('', '_blank');
|
|
|
+ if (printWindow) {
|
|
|
+ printWindow.document.write(`
|
|
|
+ <html>
|
|
|
+ <head>
|
|
|
+ <title>${this.selectedTemplate?.name}</title>
|
|
|
+ <style>
|
|
|
+ body { font-family: 'SimSun', serif; padding: 40px; line-height: 2; }
|
|
|
+ pre { white-space: pre-wrap; font-family: 'SimSun', serif; }
|
|
|
+ </style>
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ <pre>${this.generatedDocument}</pre>
|
|
|
+ </body>
|
|
|
+ </html>
|
|
|
+ `);
|
|
|
+ printWindow.document.close();
|
|
|
+ printWindow.print();
|
|
|
+ }
|
|
|
}
|
|
|
}
|