form.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. {extend name="../../admin/view/main"}
  2. {block name='content'}
  3. <form action="" class="layui-card layui-form" data-auto="true" method="post">
  4. <div class="layui-card-body">
  5. <input class="layui-input" type="hidden" name="type" required value='2'>
  6. <label class="layui-form-item relative block">
  7. <span class="help-label"><b>岗位名称</b></span>
  8. <input class="layui-input" name="title" placeholder="请输入岗位名称" required value='{$vo.title|default=""}'>
  9. </label>
  10. <label class="layui-form-item relative block">
  11. <span class="help-label"><b>需要人数</b></span>
  12. <input class="layui-input" name="number_person" placeholder="请输入人数" required value='{$vo.number_person|default=""}'>
  13. </label>
  14. <label class="layui-form-item relative block">
  15. <span class="help-label"><b>年龄</b></span>
  16. <input class="layui-input" name="age" placeholder="请输入年龄" required value='{$vo.age|default=""}'>
  17. </label>
  18. <label class="layui-form-item relative block">
  19. <span class="help-label"><b>性别</b></span>
  20. <select name="sex">
  21. <option value="男" {:isset($vo['sex']) && $vo['sex']=='男'?'selected':''}>男</option>
  22. <option value="女" {:isset($vo['sex']) && $vo['sex']=='女'?'selected':''}>女</option>
  23. <option value="不限" {:isset($vo['sex']) && $vo['sex']=='不限'?'selected':''}>不限</option>
  24. </select>
  25. </label>
  26. <label class="layui-form-item relative block">
  27. <span class="help-label"><b>学历</b></span>
  28. <select name="schooling">
  29. <option value="不限" {:isset($vo['schooling']) && $vo['schooling']=='不限'?'selected':''}>不限</option>
  30. <option value="初中及以下" {:isset($vo['schooling']) && $vo['schooling']=='初中及以下'?'selected':''}>初中及以下</option>
  31. <option value="中专/中技" {:isset($vo['schooling']) && $vo['schooling']=='中专/中技'?'selected':''}>中专/中技</option>
  32. <option value="高中" {:isset($vo['schooling']) && $vo['schooling']=='高中'?'selected':''}>高中</option>
  33. <option value="大专" {:isset($vo['schooling']) && $vo['schooling']=='大专'?'selected':''}>大专</option>
  34. <option value="本科" {:isset($vo['schooling']) && $vo['schooling']=='本科'?'selected':''}>本科</option>
  35. <option value="硕士" {:isset($vo['schooling']) && $vo['schooling']=='硕士'?'selected':''}>硕士</option>
  36. <option value="博士" {:isset($vo['schooling']) && $vo['schooling']=='博士'?'selected':''}>博士</option>
  37. </select>
  38. <!-- <input class="layui-input" name="schooling" placeholder="请输入学历" required value='{$vo.schooling|default=""}'>-->
  39. </label>
  40. <div class="layui-col-xs12 relative block">
  41. <span class="color-green font-w7 label-required-prev">地址</span>
  42. <span class="color-desc margin-left-5">(原区域:{$vo.province|default='--'} - {$vo.city|default=''} - {$vo.area|default=''} )</span>
  43. <div class="layui-row layui-col-space10">
  44. <label class="layui-col-xs4"><select class="layui-select" lay-filter="province" name="province"></select></label>
  45. <label class="layui-col-xs4"><select class="layui-select" lay-filter="city" name="city"></select></label>
  46. <label class="layui-col-xs4"><select class="layui-select" lay-filter="area" name="area"></select></label>
  47. </div>
  48. </div>
  49. <label class="layui-form-item relative block">
  50. <span class="help-label"><b>详细地址</b></span>
  51. <input class="layui-input" name="address" placeholder="请输入详细地址" required value='{$vo.address|default=""}'>
  52. </label>
  53. <label class="layui-form-item relative block">
  54. <span class="help-label"><b>经验</b></span>
  55. <input class="layui-input" name="experience" placeholder="请输入经验" value='{$vo.experience|default=""}'>
  56. </label>
  57. <label class="layui-form-item relative block">
  58. <span class="help-label"><b>用工时长</b></span>
  59. <input class="layui-input" name="working_time" placeholder="请输入用工时长" required value='{$vo.working_time|default=""}'>
  60. </label>
  61. <label class="layui-form-item relative block">
  62. <span class="help-label"><b>工作性质</b></span>
  63. <select name="work_nature">
  64. <option value="全职" {:isset($vo['work_nature']) && $vo['work_nature']=='全职'?'selected':''}>全职</option>
  65. <option value="兼职" {:isset($vo['work_nature']) && $vo['work_nature']=='兼职'?'selected':''}>兼职</option>
  66. </select>
  67. </label>
  68. <label class="layui-form-item relative block">
  69. <span class="help-label"><b>必备技能</b></span>
  70. <input class="layui-input" name="necessary_skills" placeholder="请输入必备技能" value='{$vo.necessary_skills|default=""}'>
  71. </label>
  72. <label class="layui-form-item relative block">
  73. <span class="help-label"><b>证书</b></span>
  74. <input class="layui-input" name="certificate" placeholder="请输入" value='{$vo.certificate|default=""}'>
  75. </label>
  76. <label class="layui-form-item relative block">
  77. <span class="help-label"><b>备注</b></span>
  78. <input class="layui-input" name="remark" placeholder="请输入备注" value='{$vo.remark|default=""}'>
  79. </label>
  80. <label class="layui-form-item relative block">
  81. <span class="help-label"><b>联系人姓名</b></span>
  82. <input class="layui-input" name="contact_person" placeholder="请输入联系人姓名" required value='{$vo.contact_person|default=""}'>
  83. </label>
  84. <div class="layui-form-item">
  85. <span class="help-label"><b>联系人头像</b></span>
  86. <table class="layui-table">
  87. <thead>
  88. <tr>
  89. </tr>
  90. <tr>
  91. <td class="text-left padding-0">
  92. <div class="help-images">
  93. <input name="contact_headimg" data-max-width="2048" data-max-height="1024" type="hidden" value="{$vo.contact_headimg|default=''}">
  94. <script>$('[name="contact_headimg"]').uploadOneImage();</script>
  95. </div>
  96. </td>
  97. </tr>
  98. </thead>
  99. </table>
  100. </div>
  101. <label class="layui-form-item relative block">
  102. <span class="help-label"><b>联系人职位</b></span>
  103. <input class="layui-input" name="contact_position" placeholder="请输入联系人职位" value='{$vo.contact_position|default=""}'>
  104. </label>
  105. <label class="layui-form-item relative block">
  106. <span class="help-label"><b>联系人手机号</b></span>
  107. <input class="layui-input" name="contact_phone" placeholder="请输入联系人手机号" required value='{$vo.contact_phone|default=""}'>
  108. </label>
  109. <label class="layui-form-item relative block">
  110. <span class="help-label"><b>联系人邮箱</b></span>
  111. <input class="layui-input" name="contact_email" placeholder="请输入联系人邮箱" required value='{$vo.contact_email|default=""}'>
  112. </label>
  113. <label class="layui-form-item relative block">
  114. <span class="help-label"><b>薪资</b></span>
  115. <div class="layui-row layui-col-space10">
  116. <label class="layui-col-xs4"> <input type="number" class="layui-input" name="salary_start" placeholder="" required value='{$vo.salary_start|default=""}'></label>
  117. <label class="layui-col-xs4"><input type="number" class="layui-input" name="salary_end" placeholder="" required value='{$vo.salary_end|default=""}'></label>
  118. </div>
  119. </label>
  120. <label class="layui-form-item relative block">
  121. <span class="help-label"><b>福利待遇</b></span>
  122. <input class="layui-input" name="welfare_benefits" placeholder="请输入福利待遇" required value='{$vo.welfare_benefits|default=""}'>
  123. </label>
  124. <div class="hr-line-dashed"></div>
  125. {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}
  126. <div class="layui-form-item text-center">
  127. <button class="layui-btn" type="submit">保存数据</button>
  128. <button class="layui-btn layui-btn-danger" data-history-back data-confirm="确定要取消编辑吗?" type='button'>取消编辑</button>
  129. </div>
  130. </div>
  131. </form>
  132. <script>
  133. require(['pcasunzips'], function () {
  134. (function (prov, city, area, refresh) {
  135. new PCAS("province", "city", "area", prov, city, area);
  136. refresh(), form.on('select(province)', refresh), form.on('select(city)', refresh), form.on('select(area)', refresh);
  137. })('{$vo.province|default=""}', '{$vo.city|default=""}', '{$vo.area|default=""}', function (data) {
  138. $('select:not([lay-ignore])').nextAll('div.layui-form-select').remove();
  139. data && data.elem && $(data.elem).trigger('change'), layui.form.render('select');
  140. });
  141. });
  142. $('[data-express-query]').on('click', function () {
  143. (function (code, number) {
  144. $.form.modal('{:url("shop.send/query")}', {code: code, number: number}, '快递追踪查询')
  145. })($('[data-truck-code]').val(), $('[data-truck-number]').val());
  146. });
  147. </script>
  148. <script>
  149. $('input[name="images"]').uploadMultipleImage();
  150. require(['ckeditor'], function () {
  151. window.createEditor('[name=content]', {height: 350})
  152. });
  153. layui.use(['upload', 'element', 'layer'], function() {
  154. var $ = layui.jquery
  155. , upload = layui.upload
  156. , element = layui.element
  157. , layer = layui.layer;
  158. upload.render({
  159. elem: '#test5'
  160. ,url: '' //此处配置你自己的上传接口即可
  161. ,accept: 'video' //视频
  162. ,done: function(res){
  163. layer.msg('上传成功');
  164. console.log(res)
  165. }
  166. });
  167. //演示多文件列表
  168. var uploadListIns = upload.render({
  169. elem: '#testList'
  170. ,elemList: $('#demoList') //列表元素对象
  171. ,url: 'https://httpbin.org/post' //此处用的是第三方的 http 请求演示,实际使用时改成您自己的上传接口即可。
  172. ,accept: 'file'
  173. ,multiple: true
  174. ,number: 3
  175. ,auto: false
  176. ,bindAction: '#testListAction'
  177. ,choose: function(obj){
  178. var that = this;
  179. var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
  180. //读取本地文件
  181. obj.preview(function(index, file, result){
  182. var tr = $(['<tr id="upload-'+ index +'">'
  183. ,'<td>'+ file.name +'</td>'
  184. ,'<td>'+ (file.size/1014).toFixed(1) +'kb</td>'
  185. ,'<td><div class="layui-progress" lay-filter="progress-demo-'+ index +'"><div class="layui-progress-bar" lay-percent=""></div></div></td>'
  186. ,'<td>'
  187. ,'<button class="layui-btn layui-btn-xs demo-reload layui-hide">重传</button>'
  188. ,'<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
  189. ,'</td>'
  190. ,'</tr>'].join(''));
  191. //单个重传
  192. tr.find('.demo-reload').on('click', function(){
  193. obj.upload(index, file);
  194. });
  195. //删除
  196. tr.find('.demo-delete').on('click', function(){
  197. delete files[index]; //删除对应的文件
  198. tr.remove();
  199. uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
  200. });
  201. that.elemList.append(tr);
  202. element.render('progress'); //渲染新加的进度条组件
  203. });
  204. }
  205. ,done: function(res, index, upload){ //成功的回调
  206. var that = this;
  207. //if(res.code == 0){ //上传成功
  208. var tr = that.elemList.find('tr#upload-'+ index)
  209. ,tds = tr.children();
  210. tds.eq(3).html(''); //清空操作
  211. delete this.files[index]; //删除文件队列已经上传成功的文件
  212. return;
  213. //}
  214. this.error(index, upload);
  215. }
  216. ,allDone: function(obj){ //多文件上传完毕后的状态回调
  217. console.log(obj)
  218. }
  219. ,error: function(index, upload){ //错误回调
  220. var that = this;
  221. var tr = that.elemList.find('tr#upload-'+ index)
  222. ,tds = tr.children();
  223. tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
  224. }
  225. ,progress: function(n, elem, e, index){ //注意:index 参数为 layui 2.6.6 新增
  226. element.progress('progress-demo-'+ index, n + '%'); //执行进度条。n 即为返回的进度百分比
  227. }
  228. });
  229. });
  230. </script>
  231. {/block}