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