|
1 | | -@page "/ocr" |
| 1 | +@page "/ocr" |
2 | 2 |
|
3 | 3 | <h3>@Localizer["Title"]</h3> |
4 | 4 |
|
5 | 5 | <h4>@Localizer["SubTitle"]</h4> |
6 | 6 |
|
7 | 7 | <Tips>@Localizer["BaiduOcrDesc"]</Tips> |
8 | 8 | <PackageTips Name="BootstrapBlazor.BaiduOcr" /> |
| 9 | + |
9 | 10 | <p><b>@Localizer["BaiduOcrIntro"]</b></p> |
10 | | -<p class="code-label">@((MarkupString)Localizer["BaiduOcrStep1"].Value)</p> |
| 11 | +<p class="code-label">@Localizer["BaiduOcrStep1"]</p> |
| 12 | +<Pre>services.AddBootstrapBlazorBaiduOcr();</Pre> |
| 13 | + |
| 14 | +<p class="code-label">@((MarkupString)Localizer["BaiduOcrStep2"].Value)</p> |
11 | 15 | <p>@((MarkupString)Localizer["BaiduOcrStep1Desc"].Value)</p> |
12 | 16 | <Pre>{ |
13 | 17 | "BaiduOcrOption": { |
|
16 | 20 | "Secret": "" |
17 | 21 | } |
18 | 22 | }</Pre> |
19 | | -<p class="code-label">@((MarkupString)Localizer["BaiduOcrStep2"].Value)</p> |
| 23 | + |
| 24 | +<p class="code-label">@((MarkupString)Localizer["BaiduOcrStep3"].Value)</p> |
20 | 25 | <Pre>[Inject, NotNull] |
21 | 26 | private IBaiduOcr? OcrService { get; set; }</Pre> |
22 | 27 |
|
23 | | -<p class="code-label">@((MarkupString)Localizer["BaiduOcrStep3"].Value)</p> |
| 28 | +<p class="code-label">@((MarkupString)Localizer["BaiduOcrStep4"].Value)</p> |
24 | 29 |
|
25 | 30 | <DemoBlock Title="@Localizer["VatInvoiceTitle"]" Introduction="@Localizer["VatInvoiceIntro"]" Name="VatInvoice"> |
26 | | - <ButtonUpload TValue="string" OnChange="@OnClickToUploadBlock" BrowserButtonText="VATInvoice" ShowUploadFileList="false" IsDisabled="_isLoading" BrowserButtonIcon="@Icon"></ButtonUpload> |
| 31 | + <ButtonUpload TValue="string" OnChange="@OnClickToUploadBlock" BrowserButtonText="@Localizer["VatInvoiceButtonText"]" ShowUploadFileList="false" IsDisabled="_isLoading" BrowserButtonIcon="@Icon"></ButtonUpload> |
27 | 32 | @if (Invoice != null) |
28 | 33 | { |
29 | 34 | <div class="row form-inline g-3 mt-0"> |
30 | 35 | <div class="col-12 col-sm-6"> |
31 | | - <Display ShowLabel="true" DisplayText="发票代码" @bind-Value="Invoice.InvoiceCode"></Display> |
| 36 | + <Display ShowLabel="true" DisplayText="@Localizer["InvoiceCodeLabel"]" @bind-Value="Invoice.InvoiceCode"></Display> |
32 | 37 | </div> |
33 | 38 | <div class="col-12 col-sm-6"> |
34 | | - <Display ShowLabel="true" DisplayText="发票号码" Value="Invoice.InvoiceNum"></Display> |
| 39 | + <Display ShowLabel="true" DisplayText="@Localizer["InvoiceNumLabel"]" Value="Invoice.InvoiceNum"></Display> |
35 | 40 | </div> |
36 | 41 | <div class="col-12 col-sm-6"> |
37 | | - <Display ShowLabel="true" DisplayText="发票类型" @bind-Value="Invoice.ServiceType"></Display> |
| 42 | + <Display ShowLabel="true" DisplayText="@Localizer["InvoiceServiceTypeLabel"]" @bind-Value="Invoice.ServiceType"></Display> |
38 | 43 | </div> |
39 | 44 | <div class="col-12 col-sm-6"> |
40 | | - <Display ShowLabel="true" DisplayText="联次信息" Value="Invoice.SheetNum"></Display> |
| 45 | + <Display ShowLabel="true" DisplayText="@Localizer["SheetNumLabel"]" Value="Invoice.SheetNum"></Display> |
41 | 46 | </div> |
42 | 47 | <div class="col-12 col-sm-6"> |
43 | | - <Display ShowLabel="true" DisplayText="发票种类" @bind-Value="Invoice.InvoiceType"></Display> |
| 48 | + <Display ShowLabel="true" DisplayText="@Localizer["InvoiceTypeLabel"]" @bind-Value="Invoice.InvoiceType"></Display> |
44 | 49 | </div> |
45 | 50 | <div class="col-12 col-sm-6"> |
46 | | - <Display ShowLabel="true" DisplayText="发票名称" Value="Invoice.InvoiceTypeOrg"></Display> |
| 51 | + <Display ShowLabel="true" DisplayText="@Localizer["InvoiceTypeOrgLabel"]" Value="Invoice.InvoiceTypeOrg"></Display> |
47 | 52 | </div> |
48 | 53 | <div class="col-12 col-sm-6"> |
49 | | - <Display ShowLabel="true" DisplayText="发票标志" @bind-Value="Invoice.InvoiceTag"></Display> |
| 54 | + <Display ShowLabel="true" DisplayText="@Localizer["InvoiceTagLabel"]" @bind-Value="Invoice.InvoiceTag"></Display> |
50 | 55 | </div> |
51 | 56 | <div class="col-12 col-sm-6"> |
52 | | - <Display ShowLabel="true" DisplayText="开票日期" Value="Invoice.InvoiceDate"></Display> |
| 57 | + <Display ShowLabel="true" DisplayText="@Localizer["InvoiceDateLabel"]" Value="Invoice.InvoiceDate"></Display> |
53 | 58 | </div> |
54 | 59 | <div class="col-12"> |
55 | | - <Display ShowLabel="true" DisplayText="校验码" Value="Invoice.CheckCode"></Display> |
| 60 | + <Display ShowLabel="true" DisplayText="@Localizer["CheckCodeLabel"]" Value="Invoice.CheckCode"></Display> |
56 | 61 | </div> |
57 | 62 | <div class="col-12 col-sm-6"> |
58 | | - <Display ShowLabel="true" DisplayText="购方名称" @bind-Value="Invoice.PurchaserName"></Display> |
| 63 | + <Display ShowLabel="true" DisplayText="@Localizer["PurchaserNameLabel"]" @bind-Value="Invoice.PurchaserName"></Display> |
59 | 64 | </div> |
60 | 65 | <div class="col-12 col-sm-6"> |
61 | | - <Display ShowLabel="true" DisplayText="纳税人识别号" Value="Invoice.PurchaserRegisterNum"></Display> |
| 66 | + <Display ShowLabel="true" DisplayText="@Localizer["PurchaserRegisterNumLabel"]" Value="Invoice.PurchaserRegisterNum"></Display> |
62 | 67 | </div> |
63 | 68 | <div class="col-12 col-sm-6"> |
64 | | - <Display ShowLabel="true" DisplayText="开户行及账号" @bind-Value="Invoice.PurchaserBank"></Display> |
| 69 | + <Display ShowLabel="true" DisplayText="@Localizer["PurchaserBankLabel"]" @bind-Value="Invoice.PurchaserBank"></Display> |
65 | 70 | </div> |
66 | 71 | <div class="col-12 col-sm-6"> |
67 | | - <Display ShowLabel="true" DisplayText="购方地址" Value="Invoice.PurchaserAddress"></Display> |
| 72 | + <Display ShowLabel="true" DisplayText="@Localizer["PurchaserAddressLabel"]" Value="Invoice.PurchaserAddress"></Display> |
68 | 73 | </div> |
69 | 74 | <div class="col-12 col-sm-6"> |
70 | | - <Display ShowLabel="true" DisplayText="销售方名称" @bind-Value="Invoice.SellerName"></Display> |
| 75 | + <Display ShowLabel="true" DisplayText="@Localizer["SellerNameLabel"]" @bind-Value="Invoice.SellerName"></Display> |
71 | 76 | </div> |
72 | 77 | <div class="col-12 col-sm-6"> |
73 | | - <Display ShowLabel="true" DisplayText="纳税人识别号" Value="Invoice.SellerRegisterNum"></Display> |
| 78 | + <Display ShowLabel="true" DisplayText="@Localizer["SellerRegisterNumLabel"]" Value="Invoice.SellerRegisterNum"></Display> |
74 | 79 | </div> |
75 | 80 | <div class="col-12 col-sm-6"> |
76 | | - <Display ShowLabel="true" DisplayText="销售方及账号" @bind-Value="Invoice.SellerBank"></Display> |
| 81 | + <Display ShowLabel="true" DisplayText="@Localizer["SellerBankLabel"]" @bind-Value="Invoice.SellerBank"></Display> |
77 | 82 | </div> |
78 | 83 | <div class="col-12 col-sm-6"> |
79 | | - <Display ShowLabel="true" DisplayText="销售方地址" Value="Invoice.SellerAddress"></Display> |
| 84 | + <Display ShowLabel="true" DisplayText="@Localizer["SellerAddressLabel"]" Value="Invoice.SellerAddress"></Display> |
80 | 85 | </div> |
81 | 86 | <div class="col-12"> |
82 | | - <Display ShowLabel="true" DisplayText="备注" @bind-Value="Invoice.Remarks"></Display> |
| 87 | + <Display ShowLabel="true" DisplayText="@Localizer["RemarksLabel"]" @bind-Value="Invoice.Remarks"></Display> |
83 | 88 | </div> |
84 | 89 | <div class="col-12 col-sm-6"> |
85 | | - <Display ShowLabel="true" DisplayText="价税合计" Value="Invoice.AmountInFiguers"></Display> |
| 90 | + <Display ShowLabel="true" DisplayText="@Localizer["AmountInFiguresLabel"]" Value="Invoice.AmountInFiguers"></Display> |
86 | 91 | </div> |
87 | 92 | <div class="col-12 col-sm-6"> |
88 | | - <Display ShowLabel="true" DisplayText="合计金额" Value="Invoice.TotalAmount"></Display> |
| 93 | + <Display ShowLabel="true" DisplayText="@Localizer["TotalAmountLabel"]" Value="Invoice.TotalAmount"></Display> |
89 | 94 | </div> |
90 | 95 | <div class="col-12 col-sm-6"> |
91 | | - <Display ShowLabel="true" DisplayText="合计税额" @bind-Value="Invoice.TotalTax"></Display> |
| 96 | + <Display ShowLabel="true" DisplayText="@Localizer["TotalTaxLabel"]" @bind-Value="Invoice.TotalTax"></Display> |
92 | 97 | </div> |
93 | 98 | <div class="col-12 col-sm-6"> |
94 | 99 | </div> |
95 | 100 | @if (Invoice.CommodityName?.Any() ?? false) |
96 | 101 | { |
97 | 102 | <div class="col-12 col-sm-6"> |
98 | | - <Display ShowLabel="true" DisplayText="项目名称" Value="Invoice.CommodityName.First().CommodityName"></Display> |
| 103 | + <Display ShowLabel="true" DisplayText="@Localizer["CommodityNameLabel"]" Value="Invoice.CommodityName.First().CommodityName"></Display> |
99 | 104 | </div> |
100 | 105 | } |
101 | 106 | @if (Invoice.CommodityTaxRate?.Any() ?? false) |
102 | 107 | { |
103 | 108 | <div class="col-12 col-sm-6"> |
104 | | - <Display ShowLabel="true" DisplayText="税率" Value="Invoice.CommodityTaxRate.First().CommodityTaxRate"></Display> |
| 109 | + <Display ShowLabel="true" DisplayText="@Localizer["CommodityTaxRateLabel"]" Value="Invoice.CommodityTaxRate.First().CommodityTaxRate"></Display> |
105 | 110 | </div> |
106 | 111 | } |
107 | 112 | </div> |
108 | 113 | } |
109 | 114 | </DemoBlock> |
110 | 115 |
|
111 | 116 | <DemoBlock Title="@Localizer["VerifyVatInvoiceTitle"]" Introduction="@Localizer["VerifyVatInvoiceIntro"]" Name="Verify"> |
112 | | - <p class="code-label">发票种类</p> |
| 117 | + <p class="code-label">@Localizer["InvoiceTypeLabel"]</p> |
113 | 118 | <ul class="ul-demo"> |
114 | | - <li>增值税专用发票:special_vat_invoice</li> |
115 | | - <li>增值税电子专用发票:elec_special_vat_invoice</li> |
116 | | - <li>增值税普通发票:normal_invoice</li> |
117 | | - <li>增值税普通发票(电子):elec_normal_invoice</li> |
118 | | - <li>增值税普通发票(卷式):roll_normal_invoice</li> |
119 | | - <li>通行费增值税电子普通发票:toll_elec_normal_invoice</li> |
120 | | - <li>区块链电子发票(目前仅支持深圳地区):blockchain_invoice</li> |
121 | | - <li>全电发票(专用发票):elec_invoice_special</li> |
122 | | - <li>全电发票(普通发票):elec_invoice_normal</li> |
123 | | - <li>货运运输业增值税专用发票:special_freight_transport_invoice</li> |
124 | | - <li>机动车销售发票:motor_vehicle_invoice</li> |
125 | | - <li>二手车销售发票:used_vehicle_invoice</li> |
| 119 | + <li>@Localizer["InvoiceTypeOption1"]</li> |
| 120 | + <li>@Localizer["InvoiceTypeOption2"]</li> |
| 121 | + <li>@Localizer["InvoiceTypeOption3"]</li> |
| 122 | + <li>@Localizer["InvoiceTypeOption4"]</li> |
| 123 | + <li>@Localizer["InvoiceTypeOption5"]</li> |
| 124 | + <li>@Localizer["InvoiceTypeOption6"]</li> |
| 125 | + <li>@Localizer["InvoiceTypeOption7"]</li> |
| 126 | + <li>@Localizer["InvoiceTypeOption8"]</li> |
| 127 | + <li>@Localizer["InvoiceTypeOption9"]</li> |
| 128 | + <li>@Localizer["InvoiceTypeOption10"]</li> |
| 129 | + <li>@Localizer["InvoiceTypeOption11"]</li> |
| 130 | + <li>@Localizer["InvoiceTypeOption12"]</li> |
126 | 131 | </ul> |
127 | 132 | <ValidateForm Model="Model" OnValidSubmit="@Verify"> |
128 | 133 | <EditorForm TModel="InvoiceForm" RowType="RowType.Inline" AutoGenerateAllItem="false"> |
129 | 134 | <FieldItems> |
130 | | - <EditorItem @bind-Field="@context.InvoiceType" Text="发票种类" /> |
131 | | - <EditorItem @bind-Field="@context.InvoiceCode" Text="发票代码" /> |
132 | | - <EditorItem @bind-Field="@context.InvoiceNum" Text="发票号码" /> |
133 | | - <EditorItem @bind-Field="@context.InvoiceDate" Text="开票日期" PlaceHolder="YYYYMMDD" /> |
134 | | - <EditorItem @bind-Field="@context.CheckCode" Text="校验码" PlaceHolder="后六位" /> |
135 | | - <EditorItem @bind-Field="@context.TotalAmount" Text="金额" PlaceHolder="可为空" /> |
| 135 | + <EditorItem @bind-Field="@context.InvoiceType" Text="@Localizer["InvoiceTypeLabel"]" /> |
| 136 | + <EditorItem @bind-Field="@context.InvoiceCode" Text="@Localizer["InvoiceCodeLabel"]" /> |
| 137 | + <EditorItem @bind-Field="@context.InvoiceNum" Text="@Localizer["InvoiceNumLabel"]" /> |
| 138 | + <EditorItem @bind-Field="@context.InvoiceDate" Text="@Localizer["InvoiceDateLabel"]" PlaceHolder="@Localizer["InvoiceDatePlaceHolder"]" /> |
| 139 | + <EditorItem @bind-Field="@context.CheckCode" Text="@Localizer["CheckCodeLabel"]" PlaceHolder="@Localizer["CheckCodePlaceHolder"]" /> |
| 140 | + <EditorItem @bind-Field="@context.TotalAmount" Text="@Localizer["AmountLabel"]" PlaceHolder="@Localizer["AmountPlaceHolder"]" /> |
136 | 141 | </FieldItems> |
137 | 142 | <Buttons> |
138 | | - <Button ButtonType="ButtonType.Submit" Icon="fa-solid fa-check" Text="Verify"></Button> |
| 143 | + <Button ButtonType="ButtonType.Submit" Icon="fa-solid fa-check" Text="@Localizer["VerifyButtonText"]"></Button> |
139 | 144 | </Buttons> |
140 | 145 | </EditorForm> |
141 | 146 | </ValidateForm> |
|
0 commit comments