|
@@ -9,7 +9,12 @@
|
|
|
@using Microsoft.AspNetCore.Components.Authorization;
|
|
|
@using XF.Common.Core.VM;
|
|
|
@using XF.Common.Core.Server;
|
|
|
+@using XF.Common.Server.Repositories.SQLLite;
|
|
|
+@using XF.Common.Core.Model.FCC;
|
|
|
+@using Microsoft.EntityFrameworkCore;
|
|
|
+@using XF.Common.Server.Core.Server
|
|
|
|
|
|
+@inject IMessageService _message;
|
|
|
|
|
|
|
|
|
<PageContainer Title="FCC油机配置">
|
|
@@ -18,24 +23,26 @@
|
|
|
<ChildContent>
|
|
|
|
|
|
|
|
|
- <Form Model="@model" Name="advanced_search" Class="ant-advanced-search-form">
|
|
|
+ <Form Model="@model" OnFinish="SaveFcc" Name="advanced_search" Class="ant-advanced-search-form">
|
|
|
<GridRow>
|
|
|
- <GridCol Span="10">
|
|
|
- <FormItem Label="恒山IC卡UI板">
|
|
|
- <Input @bind-Value="context.ui_number" Placeholder="请输入个数" />
|
|
|
- </FormItem>
|
|
|
- </GridCol>
|
|
|
|
|
|
|
|
|
-
|
|
|
- <GridCol Span="2" />
|
|
|
-
|
|
|
<GridCol Span="9">
|
|
|
<FormItem Label="BUID">
|
|
|
<Input Placeholder="请输入" @bind-Value="context.buid" />
|
|
|
</FormItem>
|
|
|
</GridCol>
|
|
|
+
|
|
|
+ <GridCol Span="2" />
|
|
|
+
|
|
|
+ <GridCol Span="10">
|
|
|
+ <FormItem Label="恒山IC卡UI板数量">
|
|
|
+ <Input @bind-Value="context.uiboardnumber" Placeholder="请输入个数" />
|
|
|
+ </FormItem>
|
|
|
+ </GridCol>
|
|
|
+
|
|
|
</GridRow>
|
|
|
+
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
@@ -50,7 +57,7 @@
|
|
|
|
|
|
<GridCol Span="9">
|
|
|
<label>激活配置</label>
|
|
|
- <Switch @bind-Checked="context.config_active" />
|
|
|
+ <Switch @bind-Checked="context.sps_app_active" />
|
|
|
</GridCol>
|
|
|
</GridRow>
|
|
|
<br />
|
|
@@ -103,15 +110,21 @@
|
|
|
<FormItem>
|
|
|
<GridRow Justify="center">
|
|
|
<GridCol Span="6">
|
|
|
+
|
|
|
+ <Button Size="large" Type="@ButtonType.Primary" OnClick="selectFcc">查询</Button>
|
|
|
+ <Button Size="large" Type="@ButtonType.Primary" HtmlType="submit">保存</Button>
|
|
|
+
|
|
|
<Button Size="large" Type="@ButtonType.Primary" HtmlType="submit">
|
|
|
+ <!--HtmlType="submit"-->
|
|
|
下载FCC脚本
|
|
|
</Button>
|
|
|
+
|
|
|
+
|
|
|
</GridCol>
|
|
|
</GridRow>
|
|
|
</FormItem>
|
|
|
|
|
|
|
|
|
-
|
|
|
</Form>
|
|
|
|
|
|
|
|
@@ -142,30 +155,71 @@
|
|
|
|
|
|
|
|
|
@code {
|
|
|
- class FccInfo
|
|
|
- {
|
|
|
|
|
|
- [Required]
|
|
|
- public int? ui_number { get; set; }
|
|
|
+ [Inject] IFccInfoServer server { get; set; }
|
|
|
|
|
|
- [Required]
|
|
|
- public string? buid { get; set; }
|
|
|
- [Required]
|
|
|
- public string? sps_app { get; set; }
|
|
|
|
|
|
- [Required]
|
|
|
- public bool config_active { get; set; } = false;
|
|
|
- [Required]
|
|
|
- public bool fcc_remote { get; set; } = true;
|
|
|
|
|
|
- [Required]
|
|
|
- public int ipos_cardtype { get; set; } = 0;
|
|
|
- [Required]
|
|
|
- public int ipos_authmode { get; set; } = 0;
|
|
|
|
|
|
+ void selectFcc()
|
|
|
+ {
|
|
|
+ if (model.buid == null || model.buid == "")
|
|
|
+ {
|
|
|
+ _message.Error("请输入buid!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ FCCInfo fccinfo = new FCCInfo();
|
|
|
+ fccinfo = server.getFccInfosById(model.buid).Result;
|
|
|
+
|
|
|
+ if (fccinfo != null)
|
|
|
+ {
|
|
|
+ model = fccinfo;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _message.Info("未查到该buid!");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ void SaveFcc()
|
|
|
+ {
|
|
|
+ FCCInfo info = server.getFccInfosById(model.buid).Result;
|
|
|
+ if (info != null)
|
|
|
+ {
|
|
|
+ bool rtn = server.UpdateFccInfo(model).GetAwaiter().GetResult();
|
|
|
+ if(rtn == true)
|
|
|
+ {
|
|
|
+ _message.Success("更新信息成功!");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _message.Success("更新信息失败!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ bool rtn = server.AddFccInfo(model).GetAwaiter().GetResult();;
|
|
|
+ if (rtn == true)
|
|
|
+ {
|
|
|
+ _message.Success("保存信息成功!");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _message.Success("保存信息失败!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ void UpdateFcc()
|
|
|
+ {
|
|
|
+ server.UpdateFccInfo(model);
|
|
|
}
|
|
|
|
|
|
- FccInfo model = new FccInfo();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ FCCInfo model = new FCCInfo();
|
|
|
}
|
|
|
|