publish.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>号源管理编辑</title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  9. <link rel="stylesheet" href="/static/public/layui/css/layui.css" media="all">
  10. <link rel="stylesheet" href="/static/public/font-awesome/css/font-awesome.min.css" media="all"/>
  11. <link rel="stylesheet" href="/static/admin/css/admin.css" media="all">
  12. <script src="/static/public/layui/layui.js"></script>
  13. <script src="/static/public/jquery/jquery.min.js"></script>
  14. </head>
  15. <style>
  16. .layui-upload-img {
  17. cursor: pointer;
  18. width: 150px;
  19. height: 150px;
  20. background: url('/static/public/images/uploadimg.jpg');
  21. background-size: contain;
  22. border-radius: 2px;
  23. border-width: 1px;
  24. border-style: solid;
  25. border-color: #e6e6e6;
  26. }
  27. </style>
  28. <body style="padding:10px;">
  29. <div class="tplay-body-div">
  30. {empty name="$data"}
  31. <div class="layui-tab">
  32. <ul class="layui-tab-title">
  33. <li><a href="index" class="a_menu">列表</a></li>
  34. <li class="layui-this">新增</li>
  35. </ul>
  36. </div>
  37. {/empty}
  38. <div style="margin-top: 20px;"></div>
  39. <form class="layui-form" id="publish" method="post">
  40. <!-- 数字 -->
  41. <div class="layui-form-item">
  42. <label class="layui-form-label">放号配置</label>
  43. <div class="layui-input-inline" style="max-width:300px;">
  44. <input name="appointment_id" lay-verify="required" autocomplete="off" placeholder="请输入"
  45. class="layui-input" type="number" {notempty name="$data" }value="{$data.appointment_id}" {/notempty}>
  46. </div>
  47. <div class="layui-form-mid layui-word-aux">必填</div>
  48. </div>
  49. <!-- 时间 -->
  50. <div class="layui-form-item">
  51. <label class="layui-form-label">排号日期</label>
  52. <div class="layui-input-inline" style="max-width:300px;">
  53. <input name="appointment_daytime" id="appointment_daytime" lay-verify="required" autocomplete="off"
  54. placeholder="请输入" class="layui-input" type="text" {notempty name="$data"
  55. }value="{$data.appointment_daytime}" {/notempty}>
  56. </div>
  57. <div class="layui-form-mid layui-word-aux">必填</div>
  58. </div>
  59. <!-- 数字 -->
  60. <div class="layui-form-item">
  61. <label class="layui-form-label">服务人id</label>
  62. <div class="layui-input-inline" style="max-width:300px;">
  63. <input name="provider_id" lay-verify="required" autocomplete="off" placeholder="请输入" class="layui-input"
  64. type="number" {notempty name="$data" }value="{$data.provider_id}" {/notempty}>
  65. </div>
  66. <div class="layui-form-mid layui-word-aux">必填</div>
  67. </div>
  68. <!-- 数字 -->
  69. <div class="layui-form-item">
  70. <label class="layui-form-label">地址id</label>
  71. <div class="layui-input-inline" style="max-width:300px;">
  72. <input name="address_id" autocomplete="off" placeholder="请输入" class="layui-input" type="number"
  73. {notempty name="$data" }value="{$data.address_id}" {/notempty}>
  74. </div>
  75. </div>
  76. <!-- 数字 -->
  77. <div class="layui-form-item">
  78. <label class="layui-form-label">上午报名个数</label>
  79. <div class="layui-input-inline" style="max-width:300px;">
  80. <input name="morning_use" autocomplete="off" placeholder="请输入" class="layui-input" type="number"
  81. {notempty name="$data" }value="{$data.morning_use}" {/notempty}>
  82. </div>
  83. </div>
  84. <!-- 数字 -->
  85. <div class="layui-form-item">
  86. <label class="layui-form-label">中午报名个数</label>
  87. <div class="layui-input-inline" style="max-width:300px;">
  88. <input name="afternoon_use" autocomplete="off" placeholder="请输入" class="layui-input" type="number"
  89. {notempty name="$data" }value="{$data.afternoon_use}" {/notempty}>
  90. </div>
  91. </div>
  92. <!-- 数字 -->
  93. <div class="layui-form-item">
  94. <label class="layui-form-label">晚上报名个数</label>
  95. <div class="layui-input-inline" style="max-width:300px;">
  96. <input name="night_use" autocomplete="off" placeholder="请输入" class="layui-input" type="number" {notempty
  97. name="$data" }value="{$data.night_use}" {/notempty}>
  98. </div>
  99. </div>
  100. {notempty name="$data"}
  101. <input type="hidden" name="id" value="{$data.id}">
  102. {/notempty}
  103. <div class="layui-form-item">
  104. <div class="layui-input-block">
  105. <button class="layui-btn" lay-submit lay-filter="admin">立即提交</button>
  106. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  107. </div>
  108. </div>
  109. </form>
  110. <script>
  111. layui.use(['layer', 'form', 'laydate'], function () {
  112. var layer = layui.layer,
  113. $ = layui.jquery,
  114. form = layui.form;
  115. var laydate = layui.laydate;
  116. $(window).on('load', function () {
  117. form.on('submit(admin)', function (data) {
  118. $.ajax({
  119. url: "{:url('publish')}",
  120. data: $('#publish').serialize(),
  121. type: 'post',
  122. dataType: 'json',
  123. async: false,
  124. success: function (res) {
  125. if (res.code == 1) {
  126. if (res.msg == "添加成功") {
  127. layer.alert(res.msg, function (index) {
  128. location.href = res.url;
  129. })
  130. } else {
  131. layer.confirm(res.msg, {
  132. btn: ['关闭', '继续编辑']
  133. }, function (index) {
  134. window.parent.tab.close('tplay_appointment_ticket{$data.id|default=0}');
  135. }, function (index, layero) {
  136. location.href = res.url;
  137. });
  138. }
  139. } else {
  140. layer.msg(res.msg);
  141. }
  142. }
  143. })
  144. return false;
  145. });
  146. laydate.render({
  147. elem: '#appointment_daytime', //指定元素
  148. type: 'datetime',
  149. });
  150. });
  151. });
  152. </script>
  153. </div>
  154. </body>
  155. </html>