grade_form.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <div class="layui-fluid">
  2. <div class="layui-row layui-col-space15">
  3. <div class="layui-col-md12">
  4. <div class="layui-card">
  5. <div class="layui-card-header">成绩</div>
  6. <div class="layui-card-body" pad15>
  7. <div class="layui-form layui-form-pane" lay-filter="{$lay_table}">
  8. <input type="hidden" name="id" value="{:array_get($info,'id')}">
  9. <div class="layui-form-item">
  10. <label class="layui-form-label"><span style="color:#f90c05;">*</span>考生号</label>
  11. <div class="layui-input-block">
  12. <input type="text" name="no" value="{:array_get($info,'no')}" lay-verify="required"
  13. placeholder="请输入考生号" autocomplete="off"
  14. class="layui-input">
  15. </div>
  16. </div>
  17. <div class="layui-form-item">
  18. <label class="layui-form-label"><span style="color:#f90c05;">*</span>姓名</label>
  19. <div class="layui-input-block">
  20. <input type="text" name="name" value="{:array_get($info,'name')}" lay-verify="required"
  21. placeholder="请输入姓名" autocomplete="off"
  22. class="layui-input">
  23. </div>
  24. </div>
  25. <div class="layui-form-item">
  26. <label class="layui-form-label"><span style="color:#f90c05;">*</span>单位</label>
  27. <div class="layui-input-block">
  28. <input type="text" name="company" value="{:array_get($info,'company')}" lay-verify="required"
  29. placeholder="请输入单位" autocomplete="off"
  30. class="layui-input">
  31. </div>
  32. </div>
  33. <div class="layui-form-item">
  34. <label class="layui-form-label"><span style="color:#f90c05;">*</span>理论得分</label>
  35. <div class="layui-input-block">
  36. <input type="number" name="theory_score" value="{:array_get($info,'theory_score')}" lay-verify="required"
  37. placeholder="请输入理论得分" autocomplete="off"
  38. class="layui-input">
  39. </div>
  40. </div>
  41. <div class="layui-form-item">
  42. <label class="layui-form-label"><span style="color:#f90c05;">*</span>机操得分</label>
  43. <div class="layui-input-block">
  44. <input type="number" name="computer_score" value="{:array_get($info,'computer_score')}" lay-verify="required"
  45. placeholder="请输入机操得分" autocomplete="off"
  46. class="layui-input">
  47. </div>
  48. </div>
  49. <div class="layui-form-item">
  50. <label class="layui-form-label"><span style="color:#f90c05;">*</span>初赛得分</label>
  51. <div class="layui-input-block">
  52. <input type="number" name="total_score" value="{:array_get($info,'total_score')}" lay-verify="required"
  53. placeholder="请输入机操得分" autocomplete="off"
  54. class="layui-input">
  55. </div>
  56. </div>
  57. <div class="layui-form-item">
  58. <label class="layui-form-label"><span style="color:#f90c05;">*</span>排名</label>
  59. <div class="layui-input-block">
  60. <input type="number" name="rank" value="{:array_get($info,'rank')}" lay-verify="required"
  61. placeholder="排名" autocomplete="off"
  62. class="layui-input">
  63. </div>
  64. </div>
  65. <div class="layui-form-item" pane>
  66. <label class="layui-form-label"><span style="color:#f90c05;">*</span>进入决赛</label>
  67. <div class="layui-input-block">
  68. {volist name="is_final_list" id="v"}
  69. <input type="radio" name="is_final" value="{$key}" title="{$v}" {eq name=":array_get($info,'is_final',2)" value="$key" }checked{/eq}>
  70. {/volist}
  71. </div>
  72. </div>
  73. <div class="layui-form-item">
  74. <div class="layui-input-block">
  75. <input type="button" lay-submit lay-filter="{$lay_btn}" value="确认提交" class="layui-btn">
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. <script>
  85. layui.use(['index', 'form', 'layedit', 'upload'], function () {
  86. const admin = layui.admin;
  87. const form = layui.form;
  88. form.render();
  89. form.on('submit({$lay_btn})', function (obj) {
  90. const index = parent.layer.getFrameIndex(window.name);
  91. admin.req({
  92. url: "{:url('grade/editGrade')}",
  93. type: 'post',
  94. data: obj.field,
  95. done: function (res) {
  96. layer.msg("提交成功", {
  97. icon: 1
  98. });
  99. parent.layui.table.reload('lay-grade-index-table'); //重载表格
  100. parent.layer.close(index);
  101. }
  102. });
  103. });
  104. });
  105. </script>