supplyform.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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-supply-supplyform-edit">
  8. <input type="hidden" name="id" value="{$supply.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. <select name="workerid" lay-search lay-verify="required">
  13. <option value="">请选择劳务公司(可搜索)...</option>
  14. {volist name="workerlist" id="vo"}
  15. <option value="{$vo.id}" {$supply.workerid==$vo.id ? 'selected' : '' }>{$vo.title}</option>
  16. {/volist}
  17. </select>
  18. </div>
  19. </div>
  20. <div class="layui-form-item">
  21. <label class="layui-form-label"><span style="color:#f90c05;">*</span>男性人数</label>
  22. <div class="layui-input-block">
  23. <input type="number" name="mnumber" value="{$supply.mnumber}" lay-verify="required" placeholder="请输入数字..."
  24. autocomplete="off" class="layui-input">
  25. </div>
  26. </div>
  27. <div class="layui-form-item">
  28. <label class="layui-form-label"><span style="color:#f90c05;">*</span>女性人数</label>
  29. <div class="layui-input-block">
  30. <input type="number" name="wnumber" value="{$supply.wnumber}" lay-verify="required" placeholder="请输入数字..."
  31. autocomplete="off" class="layui-input">
  32. </div>
  33. </div>
  34. <div class="layui-form-item">
  35. <label class="layui-form-label"><span style="color:#f90c05;">*</span>年龄范围</label>
  36. <div class="layui-input-block">
  37. <input type="text" name="agegroup" value="{$supply.agegroup}" lay-verify="required" placeholder="请输入..."
  38. autocomplete="off" class="layui-input">
  39. </div>
  40. </div>
  41. <div class="layui-form-item" id="LAY-supply-supplyform-edit-areapicker">
  42. <label class="layui-form-label"><span style="color:#f90c05;">*</span>人员所在地</label>
  43. <div class="layui-input-inline">
  44. <select name="province" class="province-selector" data-value="{$supply.province}" lay-filter="province-2"
  45. lay-verify="required">
  46. <option value="">请选择省</option>
  47. </select>
  48. </div>
  49. <div class="layui-input-inline">
  50. <select name="city" class="city-selector" data-value="{$supply.city}" lay-filter="city-2" lay-verify="required">
  51. <option value="">请选择市</option>
  52. </select>
  53. </div>
  54. <div class="layui-input-inline">
  55. <select name="district" class="district-selector" data-value="{$supply.district}" lay-filter="district-2"
  56. lay-verify="required">
  57. <option value="">请选择区</option>
  58. </select>
  59. </div>
  60. </div>
  61. <div class="layui-form-item" pane>
  62. <label class="layui-form-label">期望工作地</label>
  63. <div class="layui-input-block">
  64. {volist name="provincelist" id="vo"}
  65. <input type="checkbox" name="descity[]" value="{$vo.value}" title="{$vo.title}" {in name="vo.title" value="$supply.descity"}checked{/in} />
  66. {/volist}
  67. </div>
  68. </div>
  69. <div class="layui-form-item">
  70. <label class="layui-form-label"><span style="color:#f90c05;">*</span>可到岗日期</label>
  71. <div class="layui-input-block">
  72. <input type="text" name="candate" id="candate" value="{$supply.candate}" lay-verify="required" placeholder="请选择..."
  73. autocomplete="off" class="layui-input">
  74. </div>
  75. </div>
  76. <div class="layui-form-item">
  77. <label class="layui-form-label"><span style="color:#f90c05;">*</span>咨询电话</label>
  78. <div class="layui-input-block">
  79. <input type="text" name="telephone" value="{$supply.telephone}" lay-verify="required" placeholder="请输入..." autocomplete="off" class="layui-input">
  80. </div>
  81. </div>
  82. <div class="layui-form-item">
  83. <label class="layui-form-label">情况说明</label>
  84. <div class="layui-input-block">
  85. <textarea name="remark" placeholder="请输入..." rows="6" class="layui-textarea">{$supply.remark}</textarea>
  86. </div>
  87. </div>
  88. <div class="layui-form-item" pane>
  89. <label class="layui-form-label">状态</label>
  90. <div class="layui-input-block">
  91. <input type="radio" name="status" value="1" title="待修改" {eq name="supply.status|default=1" value="1"}checked{/eq}>
  92. <input type="radio" name="status" value="2" title="待审核" {eq name="supply.status" value="2"}checked{/eq}>
  93. <input type="radio" name="status" value="3" title="已上架" {eq name="supply.status" value="3"}checked{/eq}>
  94. <input type="radio" name="status" value="4" title="已停供" {eq name="supply.status" value="4"}checked{/eq}>
  95. <input type="radio" name="status" value="5" title="已下架" {eq name="supply.status" value="5"}checked{/eq}>
  96. </div>
  97. </div>
  98. <div class="layui-form-item">
  99. <label class="layui-form-label">推荐</label>
  100. <div class="layui-input-block">
  101. <select name="priority">
  102. <option value="0" {$supply.priority===0 ? 'selected' : '' }>不推荐</option>
  103. <option value="1" {$supply.priority===1 ? 'selected' : '' }>推荐一</option>
  104. <option value="2" {$supply.priority===2 ? 'selected' : '' }>推荐二</option>
  105. <option value="3" {$supply.priority===3 ? 'selected' : '' }>推荐三</option>
  106. <option value="4" {$supply.priority===4 ? 'selected' : '' }>推荐四</option>
  107. <option value="5" {$supply.priority===5 ? 'selected' : '' }>推荐五</option>
  108. <option value="6" {$supply.priority===6 ? 'selected' : '' }>推荐六</option>
  109. <option value="7" {$supply.priority===7 ? 'selected' : '' }>推荐七</option>
  110. <option value="8" {$supply.priority===8 ? 'selected' : '' }>推荐八</option>
  111. <option value="9" {$supply.priority===9 ? 'selected' : '' }>推荐九</option>
  112. </select>
  113. <div class="layui-form-mid layui-word-aux">推荐值值越大越靠前</div>
  114. </div>
  115. </div>
  116. <div class="layui-form-item">
  117. <label class="layui-form-label"><span style="color:#f90c05;">*</span>更新时间</label>
  118. <div class="layui-input-block">
  119. <input type="text" name="updatetime" id="updatetime" value="{$supply.updatetime|default=time()|date='Y-m-d H:i:s'}" lay-verify="required"
  120. placeholder="请选择..." autocomplete="off" class="layui-input">
  121. </div>
  122. </div>
  123. <div class="layui-form-item">
  124. <label class="layui-form-label"><span style="color:#f90c05;">*</span>创建时间</label>
  125. <div class="layui-input-block">
  126. <input type="text" name="createtime" id="createtime" value="{$supply.createtime|default=time()|date='Y-m-d H:i:s'}" lay-verify="required"
  127. placeholder="请选择..." autocomplete="off" class="layui-input">
  128. </div>
  129. </div>
  130. <div class="layui-form-item">
  131. <label class="layui-form-label">浏览量</label>
  132. <div class="layui-input-block">
  133. <input type="text" name="volume" value="{$supply.volume|default=0}" lay-verify="number" placeholder="请输入..."
  134. autocomplete="off" class="layui-input">
  135. </div>
  136. </div>
  137. <div class="layui-form-item">
  138. <div class="layui-input-block">
  139. <input type="button" lay-submit lay-filter="LAY-supply-supplyform-edit-submit" value="确认提交" class="layui-btn">
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. <script>
  149. layui.config({
  150. base: '/static/echoui/' //静态资源所在路径
  151. }).extend({
  152. index: 'lib/index' //主入口模块
  153. }).use(['index', 'form', 'set', 'layedit', 'laydate', 'upload', 'inputTags', 'layarea'], function() {
  154. var $ = layui.$,
  155. setter = layui.setter,
  156. admin = layui.admin,
  157. layedit = layui.layedit,
  158. laydate = layui.laydate,
  159. form = layui.form,
  160. inputTags = layui.inputTags,
  161. upload = layui.upload,
  162. layarea = layui.layarea;
  163. form.render();
  164. inputTags.render({
  165. elem: '#inputTags',
  166. content: {:json_encode($supply.tags)} == null ? [] : {:json_encode($supply.tags)},
  167. aldaBtn: true,
  168. count: 6,
  169. done: function(value) {}
  170. });
  171. layarea.render({
  172. elem: '#LAY-supply-supplyform-edit-areapicker',
  173. data: {
  174. province: '福建省',
  175. city: '福州市',
  176. district: '马尾区',
  177. }
  178. });
  179. laydate.render({
  180. elem: '#candate',
  181. type: 'date',
  182. format: 'yyyy-MM-dd'
  183. });
  184. laydate.render({
  185. elem: '#updatetime',
  186. type: 'datetime'
  187. });
  188. laydate.render({
  189. elem: '#createtime',
  190. type: 'datetime'
  191. });
  192. form.on('submit(LAY-supply-supplyform-edit-submit)', function(obj) {
  193. var index = parent.layer.getFrameIndex(window.name);
  194. admin.req({
  195. url: setter.baseAdminUrl + 'supply/editsupply',
  196. data: obj.field,
  197. type: 'post',
  198. done: function(res) {
  199. layer.msg("提交成功", {
  200. icon: 1
  201. });
  202. parent.layui.table.reload('LAY-supply-supplylist-table'); //重载表格
  203. parent.layer.close(index);
  204. }
  205. });
  206. });
  207. });
  208. </script>