supplement.blade.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. @extends('module.layouts.content')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. <link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
  6. <link href="{{theme_asset('app/css/recruit/recruit.css')}}" rel="stylesheet" type="text/css"/>
  7. <link href="{{theme_asset('app/css/element.css')}}" rel="stylesheet" type="text/css"/>
  8. <style>
  9. table,table tr th, table tr td { border:1px solid #ccc; padding: 0 7px}
  10. table { width: 100%; min-height: 25px; line-height: 25px; text-align: center; border-collapse: collapse; padding:2px;}
  11. .el-form-item{
  12. margin-bottom: 0;
  13. }
  14. .require{
  15. color: #f56c6c;
  16. }
  17. .ticket{
  18. border:3px solid #000;
  19. padding:10px;
  20. }
  21. .ticket h2{
  22. text-align:center;
  23. font:normal 20px/40px "microsoft yahei";
  24. }
  25. .ticket h3{
  26. text-align:center;
  27. font:normal 24px/30px "microsoft yahei";
  28. }
  29. .ex_rule{
  30. margin-top: 20px;
  31. }
  32. .ex_rule h4{
  33. font-size: 20px;
  34. line-height:50px;
  35. }
  36. .ex_rule p{
  37. text-indent: 30px;
  38. line-height: 25px;
  39. }
  40. .ticket .item{
  41. line-height: 30px;
  42. }
  43. @page {
  44. size: auto A4 landscape;
  45. margin: 3mm; /* this affects the margin in the printer settings */
  46. }
  47. </style>
  48. @endpush
  49. @push('js')
  50. @endpush
  51. @section('content')
  52. <div class="recruit_container" id="app" style="margin-top: 20px">
  53. <div role="alert" class="el-message el-message--error" style="position:relative" v-if="user.status == -1">
  54. <i class="el-message__icon el-icon-error"></i>
  55. <p class="el-message__content">@{{ user.msg }}</p>
  56. </div>
  57. <div role="alert" class="el-message el-message--info" style="position:relative" v-if="user.status == 0">
  58. <i class="el-message__icon el-icon-info"></i>
  59. <p class="el-message__content">您的报名资料正在审核中</p>
  60. </div>
  61. <div role="alert" class="el-message el-message--success" style="position:relative" v-if="user.status == 1">
  62. <i class="el-message__icon el-icon-success"></i>
  63. <p class="el-message__content">您的报名资料已审核成功</p>
  64. </div>
  65. <p style="text-align:center;line-height:37px;margin-top: 30px">
  66. <span style=";font-family:方正小标宋简体;font-size:29px"><span style="font-family:方正小标宋简体">{{$title}}公开招聘工作人员考察材料登记表</span></span>
  67. </p>
  68. <el-form :model="user" ref="userForm" :status-icon="true" :show-message="false" :rules="rules" :disabled="formDisable">
  69. <table cellspacing="0" width="100%">
  70. <tbody>
  71. <tr style="height:52px;page-break-inside:avoid">
  72. <td valign="center" width="350">
  73. <span class="require">*</span>身份证原件(正、反面)
  74. </td>
  75. <td valign="center" colspan="11">
  76. <el-form-item prop="identification" ref="identification">
  77. <div style="padding: 10px 0">
  78. <el-upload
  79. action="{{ route('recruit.api.upload') }}"
  80. list-type="picture-card"
  81. :data="{_token:'{{csrf_token()}}'}"
  82. :file-list="user.identification"
  83. :before-upload="beforeImageUpload"
  84. :on-success="uploadSuccessID"
  85. :multiple="true"
  86. :on-preview="handlePictureCardPreview"
  87. :on-remove="removeID">
  88. <i class="el-icon-plus"></i>
  89. </el-upload>
  90. </div>
  91. </el-form-item>
  92. </td>
  93. </tr>
  94. <tr style="height:52px;page-break-inside:avoid">
  95. <td valign="center" >
  96. <span class="require">*</span>户口簿(户主页及本人页)
  97. </td>
  98. <td valign="center" colspan="11">
  99. <el-form-item prop="household_register" ref="household_register">
  100. <div style="padding: 10px 0">
  101. <el-upload
  102. action="{{ route('recruit.api.upload') }}"
  103. list-type="picture-card"
  104. :data="{_token:'{{csrf_token()}}'}"
  105. :file-list="user.household_register"
  106. :before-upload="beforeImageUpload"
  107. :on-success="uploadSuccessHR"
  108. :multiple="true"
  109. :on-preview="handlePictureCardPreview"
  110. :on-remove="removeID">
  111. <i class="el-icon-plus"></i>
  112. </el-upload>
  113. </div>
  114. </el-form-item>
  115. </td>
  116. </tr>
  117. <tr style="height:52px;page-break-inside:avoid">
  118. <td valign="center" >
  119. <span class="require">*</span>毕业证书及学信网《教育部学历证书电子注册备案表》
  120. </td>
  121. <td valign="center" colspan="11">
  122. <el-form-item prop="education_certification" ref="education_certification">
  123. <div style="padding: 10px 0">
  124. <el-upload
  125. action="{{ route('recruit.api.upload') }}"
  126. list-type="picture-card"
  127. :data="{_token:'{{csrf_token()}}'}"
  128. :file-list="user.education_certification"
  129. :before-upload="beforeImageUpload"
  130. :on-success="uploadSuccessEDU"
  131. :multiple="true"
  132. :on-preview="handlePictureCardPreview"
  133. :on-remove="removeEDU">
  134. <i class="el-icon-plus"></i>
  135. </el-upload>
  136. </div>
  137. </el-form-item>
  138. </td>
  139. </tr>
  140. {{-- <tr style="height:52px;page-break-inside:avoid">--}}
  141. {{-- <td valign="center" >--}}
  142. {{-- <span class="require">*</span>计生证明--}}
  143. {{-- </td>--}}
  144. {{-- <td valign="center" colspan="11">--}}
  145. {{-- <el-form-item prop="family_planning" ref="family_planning">--}}
  146. {{-- <div style="padding: 10px 0">--}}
  147. {{-- <el-upload--}}
  148. {{-- action="{{ route('recruit.api.upload') }}"--}}
  149. {{-- list-type="picture-card"--}}
  150. {{-- :data="{_token:'{{csrf_token()}}'}"--}}
  151. {{-- :file-list="user.family_planning"--}}
  152. {{-- :before-upload="beforeImageUpload"--}}
  153. {{-- :on-success="uploadSuccessFP"--}}
  154. {{-- :multiple="true"--}}
  155. {{-- :on-preview="handlePictureCardPreview"--}}
  156. {{-- :on-remove="removeFP">--}}
  157. {{-- <i class="el-icon-plus"></i>--}}
  158. {{-- </el-upload>--}}
  159. {{-- </div>--}}
  160. {{-- </el-form-item>--}}
  161. {{-- </td>--}}
  162. {{-- </tr>--}}
  163. <tr style="height:52px;page-break-inside:avoid">
  164. <td valign="center" >
  165. <span class="require">*</span>综治证明
  166. </td>
  167. <td valign="center" colspan="11">
  168. <el-form-item prop="manage" ref="manage">
  169. <div style="padding: 10px 0">
  170. <el-upload
  171. action="{{ route('recruit.api.upload') }}"
  172. list-type="picture-card"
  173. :data="{_token:'{{csrf_token()}}'}"
  174. :file-list="user.manage"
  175. :before-upload="beforeImageUpload"
  176. :on-success="uploadSuccessManage"
  177. :multiple="true"
  178. :on-preview="handlePictureCardPreview"
  179. :on-remove="removeManage">
  180. <i class="el-icon-plus"></i>
  181. </el-upload>
  182. </div>
  183. </el-form-item>
  184. </td>
  185. </tr>
  186. </tbody>
  187. <tfoot>
  188. <tr>
  189. <td height="52" colspan="12" style="padding: 10px 0">
  190. <el-form-item size="large">
  191. <el-button type="success" @click="submit('userForm')">提交</el-button>
  192. </el-form-item>
  193. </td>
  194. </tr>
  195. </tfoot>
  196. </table>
  197. </el-form>
  198. <el-dialog :visible.sync="dialogVisible">
  199. <img width="100%" :src="dialogImageUrl" alt="">
  200. </el-dialog>
  201. </div>
  202. @endsection
  203. @section('script')
  204. <script src="{{theme_asset('app/js/vue.min.js')}}"></script>
  205. <script src="{{theme_asset('app/js/axios.js')}}"></script>
  206. <script src="{{theme_asset('app/js/qs.min.js')}}"></script>
  207. <script src="{{theme_asset('app/js/element.js')}}"></script>
  208. <script>
  209. new Vue({
  210. el: '#app',
  211. data: function() {
  212. return {
  213. loading: this.$loading({
  214. lock: false,
  215. text: '加载中',
  216. spinner: 'el-icon-loading',
  217. background: 'rgba(0, 0, 0, 0.7)'
  218. }),
  219. user:eval({!! $info !!}),
  220. formDisable:false,
  221. rules:{
  222. //身份验证
  223. identification:[
  224. {validator:this.validIdentification, trigger: 'change'}
  225. ],
  226. //身份验证
  227. household_register:[
  228. {validator:this.validHouseholdRegister, trigger: 'change'}
  229. ],
  230. education_certification:[
  231. {validator:this.validEducertification, trigger: 'change'}
  232. ],
  233. // family_planning:[
  234. // {validator:this.validFamilyPlanning, trigger: 'change'}
  235. // ],
  236. manage:[
  237. {validator:this.validManage, trigger: 'change'}
  238. ],
  239. },
  240. init: 0,
  241. upload: '',
  242. dialogImageUrl: '',
  243. dialogVisible: false
  244. }
  245. },
  246. methods: {
  247. validIdentification(rule, value, callback){
  248. if(this.user.identification.length == 0){
  249. callback(new Error('请上传身份证明证件'));
  250. }else{
  251. callback();
  252. }
  253. },
  254. validHouseholdRegister(rule, value, callback){
  255. if(this.user.household_register.length == 0){
  256. callback(new Error('请上传户口簿'));
  257. }else{
  258. callback();
  259. }
  260. },
  261. validEducertification(rule, value, callback){
  262. if(this.user.education_certification.length == 0){
  263. callback(new Error('请上传学历证明证件'));
  264. }else{
  265. callback();
  266. }
  267. },
  268. validFamilyPlanning(rule, value, callback){
  269. if(this.user.family_planning.length == 0){
  270. callback(new Error('请上传泉州市申请办理有关手续计生情况审核登记表'));
  271. }else{
  272. callback();
  273. }
  274. },
  275. validManage(rule, value, callback){
  276. if(this.user.manage.length == 0){
  277. callback(new Error('请上传社会管理综合治理审核登记表'));
  278. }else{
  279. callback();
  280. }
  281. },
  282. beforeImageUpload(file) {
  283. const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png');
  284. const isLt2M = file.size / 1024 / 1024 < 2;
  285. if (!isJPG) {
  286. this.$message.error('上传图片只能是 JPG、PNG 格式!');
  287. }
  288. if (!isLt2M) {
  289. this.$message.error('上传图片大小不能超过 2MB!');
  290. }
  291. return isJPG && isLt2M;
  292. },
  293. uploadSuccessID(response, file, fileList){
  294. if(response.status){
  295. this.user.identification = fileList
  296. }else{
  297. this.$message.error(response.msg);
  298. }
  299. },
  300. uploadSuccessHR(response, file, fileList){
  301. if(response.status){
  302. this.user.household_register = fileList
  303. }else{
  304. this.$message.error(response.msg);
  305. }
  306. },
  307. uploadSuccessEDU(response, file, fileList){
  308. if(response.status){
  309. this.user.education_certification = fileList
  310. }else{
  311. this.$message.error(response.msg);
  312. }
  313. },
  314. uploadSuccessFP(response, file, fileList){
  315. if(response.status){
  316. this.user.family_planning = fileList
  317. }else{
  318. this.$message.error(response.msg);
  319. }
  320. },
  321. uploadSuccessManage(response, file, fileList){
  322. if(response.status){
  323. this.user.manage = fileList
  324. }else{
  325. this.$message.error(response.msg);
  326. }
  327. },
  328. removeID(file,fileList) {
  329. this.user.identification = fileList
  330. },
  331. removeHR(file,fileList) {
  332. this.user.household_register = fileList
  333. },
  334. removeFP(file,fileList) {
  335. this.user.family_planning = fileList
  336. },
  337. removeEDU(file,fileList) {
  338. this.user.education_certification = fileList
  339. },
  340. removeManage(file,fileList) {
  341. this.user.manage = fileList
  342. },
  343. handlePictureCardPreview(file){
  344. this.dialogImageUrl = file.url;
  345. this.dialogVisible = true;
  346. },
  347. submit(formName){
  348. this.$refs[formName].validate((valid,object) => {
  349. if (valid) {
  350. var msg = '资料请详细检查!';
  351. this.$confirm(msg, '提示', {
  352. confirmButtonText: '检查无误,确定提交',
  353. cancelButtonText: '我需要再检查一遍',
  354. type: 'warning'
  355. }).then(() => {
  356. this.loading = this.$loading({
  357. lock: false,
  358. text: '加载中',
  359. spinner: 'el-icon-loading',
  360. background: 'rgba(0, 0, 0, 0.7)'
  361. });
  362. this.user._token = '{{csrf_token()}}';
  363. axios.post("{{route('recruit.save_supplement')}}",Qs.stringify(this.user)).then(response => {
  364. if(response.data.status){
  365. this.$alert(response.data.msg, '提交成功', {
  366. confirmButtonText: '确定',
  367. callback: action => {
  368. window.location.reload();
  369. }
  370. });
  371. }else{
  372. this.$message.error(response.data.msg);
  373. this.loading.close();
  374. return false;
  375. }
  376. });
  377. }).catch(() => {
  378. });
  379. } else {
  380. for(let key in object){
  381. this.$message.error(object[key][0].message);
  382. return false;
  383. }
  384. return false;
  385. }
  386. })
  387. },
  388. },
  389. computed:{
  390. },
  391. created(){
  392. this.loading.close();
  393. if(this.user.status == 1 || this.user.status == 0 ){
  394. this.formDisable = true
  395. }else{
  396. this.formDisable = false;
  397. }
  398. }
  399. })
  400. </script>
  401. @endsection