UploadData.razor 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. @page "/UploadData"
  2. @using System.ComponentModel.DataAnnotations;
  3. @using System.Text.Json;
  4. @using System.ComponentModel
  5. @using AntDesign.TableModels
  6. @using AntDesign.Form
  7. <style>
  8. .steps-content {
  9. margin-top: 16px;
  10. border: 1px dashed #e9e9e9;
  11. border-radius: 6px;
  12. background-color: #fafafa;
  13. min-height: 200px;
  14. text-align: center;
  15. padding-top: 80px;
  16. }
  17. .steps-action {
  18. margin-top: 24px;
  19. }
  20. </style>
  21. <Form Model="@model" LabelColSpan="10" WrapperColSpan="16" style="margin-left: 50px;margin-right:50px;">
  22. <wispro.sp.web.Share.SPStep CurrentStep="0" />
  23. <div class=" ant-upload ant-upload-select-text ant-upload-drag ant-upload-select">
  24. <FormItem>
  25. <p />
  26. </FormItem>
  27. <FormItem Label="绩效月份" LabelColSpan="10" WrapperColSpan="5">
  28. <DatePicker TValue="DateTime?" Picker="@DatePickerType.Month" @bind-Value="@context.Month" />
  29. </FormItem>
  30. <div tabindex="0" class="ant-upload" style="position:relative;" data-fileid="5c8e2c2b-92b2-4b57-bac4-89c3f44c64d4" role="button" _bl_1728="">
  31. <Upload Action="" Name="file">
  32. <p class="ant-upload-drag-icon">
  33. <Icon Type="upload" />
  34. </p>
  35. <p class="ant-upload-text">请选择包括绩效事项记录的Excel文件</p>
  36. <p class="ant-upload-hint">
  37. 请从维德流程管理系统中导出上月的申请案件完成事项报表文件,并将其上传到系统开始绩效核算流程
  38. </p>
  39. </Upload>
  40. </div>
  41. <p />
  42. <FormItem LabelColSpan="20" WrapperColSpan="16">
  43. <Button Type="@ButtonType.Primary" HtmlType="submit">
  44. 上传
  45. </Button>
  46. </FormItem>
  47. </div>
  48. </Form>
  49. @code {
  50. public class Model
  51. {
  52. public DateTime? Month { get; set; } = DateTime.Now.AddMonths(-1);
  53. }
  54. private Model model = new Model();
  55. private void OnFinish(EditContext editContext)
  56. {
  57. //Console.WriteLine($"Success:{JsonSerializer.Serialize(model)}");
  58. }
  59. private void OnFinishFailed(EditContext editContext)
  60. {
  61. //Console.WriteLine($"Failed:{JsonSerializer.Serialize(model)}");
  62. }
  63. }