zhaopianZiliao.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <template>
  2. <view class="jz-content-box">
  3. <view class="upload-img-box">
  4. <jiazhengUpload @getFileUrl="getTouxiang" :img='icon' bottomText="上传头像和生活照"></jiazhengUpload>
  5. </view>
  6. <view class="form-label-switch">
  7. <view class="phone-form-label"><text class="form-label-require"></text>身份证照片</view>
  8. <!-- <switch @change="switchSfzChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  9. </view>
  10. <view class="ziliao-upload-box">
  11. <view class="upload-item-box">
  12. <jiazhengUpload @getFileUrl="getSfzTouxiang" :img='idcardUrl1' bottomText="上传身份证头像面"></jiazhengUpload>
  13. </view>
  14. <view class="upload-item-box">
  15. <jiazhengUpload @getFileUrl="getSfzGuohui" :img='idcardUrl2' bottomText="上传身份证国徽面"></jiazhengUpload>
  16. </view>
  17. </view>
  18. <view class="form-label-switch form-top-margin">
  19. <view class="phone-form-label"><text class="form-label-require"></text>体检报告</view>
  20. <!-- <switch @change="switchGzChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  21. </view>
  22. <view class="zhaopianZiliao-shenfenzhengImg">
  23. <view class="ziliao-upload-box">
  24. <view v-if="tijianbaogaoList.length>0">
  25. <view v-for="(item, index) in tijianbaogaoList" :key="index">
  26. <img style="width: 100rpx;height: 100rpx;" :src="item" alt="">
  27. <view @click="deleteTijianbaogao(item,index)">删除</view>
  28. </view>
  29. </view>
  30. <view>
  31. <jiazhengUpload changjingType="more" @getFileUrl="getTijianbaogao"></jiazhengUpload>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="form-label-switch form-top-margin">
  36. <view class="phone-form-label"><text class="form-label-require"></text>工作生活照</view>
  37. <!-- <switch @change="switchGzChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  38. </view>
  39. <view class="zhaopianZiliao-shenfenzhengImg">
  40. <view class="ziliao-upload-box">
  41. <view v-if="shenghuizhaoList.length>0">
  42. <view v-for="(item, index) in shenghuizhaoList" :key="index">
  43. <img style="width: 100rpx;height: 100rpx;" :src="item" alt="">
  44. <view @click="deleteShenghuoZhao(item,index)">删除</view>
  45. </view>
  46. </view>
  47. <view>
  48. <jiazhengUpload changjingType="more" @getFileUrl="getGzShenghuozhao"></jiazhengUpload>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="form-label-switch form-top-margin">
  53. <view class="phone-form-label"><text class="form-label-require"></text>资格类照片</view>
  54. <!-- <switch @change="switchZgChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  55. </view>
  56. <view class="zhaopianZiliao-shenfenzhengImg">
  57. <view class="ziliao-upload-box">
  58. <view v-if="zigezhaoList.length>0">
  59. <view v-for="(item, index) in zigezhaoList" :key="index">
  60. <img style="width: 100rpx;height: 100rpx;" :src="item" alt="">
  61. <view @click="deleteZigeZhao(item,index)">删除</view>
  62. </view>
  63. </view>
  64. <view>
  65. <jiazhengUpload changjingType="more" @getFileUrl="getZigezhao"></jiazhengUpload>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="form-label-select">
  70. <view class="phone-form-label"><text class="form-label-require"></text>最近体检日期</view>
  71. <uni-datetime-picker class="form-radio-picker" type="date" @change="changeTijian">
  72. <view class="form-radio-select">
  73. <view>{{tijianDate}}</view>
  74. <icon></icon>
  75. </view>
  76. </uni-datetime-picker>
  77. </view>
  78. <view class="form-label-select">
  79. <view class="phone-form-label"><text class="form-label-require"></text>健康证日期</view>
  80. <uni-datetime-picker class="form-radio-picker" type="date" @change="changeJiankang">
  81. <view class="form-radio-select">
  82. <view>{{jiankangDate}}</view>
  83. <icon></icon>
  84. </view>
  85. </uni-datetime-picker>
  86. </view>
  87. <!-- <view class="zpzl-tip-box form-top-margin">
  88. <view>体检报告文件</view>
  89. <view class="red-tip">(*如未经同意,体检报告均不展示在简历中;在系统中预约的体检,如有电子报告,会自动关联到简历中) </view>
  90. <view>
  91. <checkbox-group>
  92. <checkbox :checked="tijianbaogaoFlag" @click="changeTijianbaogao" color="#3fd2a1"
  93. style="transform:scale(0.65)" />
  94. 已经同意,上传个人体检报告
  95. </checkbox-group>
  96. </view>
  97. <view class="scbg-tip">
  98. 还没有上传的体验报告<br>
  99. 可点击下方上传体检报告
  100. </view>
  101. <button type="default" class="phone-green-btn scbg-btn">+从手机上传体检报告(pdf)</button>
  102. </view> -->
  103. <view class="page-btn-box">
  104. <button type="default" v-if="status =='add'" @click="goNext" class="phone-green-btn">下一步</button>
  105. <button type="default" v-if="status =='edit'" @click="editSave" class="phone-green-btn">保存</button>
  106. </view>
  107. </view>
  108. </template>
  109. <script>
  110. import {
  111. getAliyunPolicy
  112. } from "@/api/jiazheng.js"
  113. import jiazhengUpload from "./common/jiazhengUpload.vue"
  114. export default {
  115. data() {
  116. return {
  117. shenghuizhaoList: [],
  118. tijianbaogaoList: [],
  119. zigezhaoList: [],
  120. icon: '',
  121. idcardUrl1: '',
  122. idcardUrl2: '',
  123. shenghuoUrls: '',
  124. tijianDate: '',
  125. tijianUrls: '',
  126. jiankangDate: '',
  127. tijianbaogaoFlag: false,
  128. zhengshuUrls: '',
  129. }
  130. },
  131. props: {
  132. status: {
  133. type: String,
  134. }
  135. },
  136. components: {
  137. jiazhengUpload
  138. },
  139. methods: {
  140. editinfo(data) {
  141. console.log('data', data);
  142. this.$nextTick(() => {
  143. this.icon = data.icon
  144. this.idcardUrl1 = data.idcardUrl1
  145. this.idcardUrl2 = data.idcardUrl2
  146. this.shenghuizhaoList = data.shenghuoUrls == '' ? '' : data.shenghuoUrls.split(",")
  147. this.zigezhaoList = data.zhengshuUrls == '' ? '' : data.shenghuoUrls.split(",")
  148. this.tijianUrls = data.tijianUrls == '' ? '' : data.tijianUrls.split(",")
  149. this.tijianDate = data.tijianDate
  150. this.jiankangDate = data.jiankangDate
  151. })
  152. },
  153. getTouxiang(data) {
  154. this.icon = data
  155. console.log('getTouxiang', data);
  156. },
  157. getSfzTouxiang(data) {
  158. this.idcardUrl1 = data
  159. console.log('getSfzTouxiang', data);
  160. },
  161. getSfzGuohui(data) {
  162. this.idcardUrl2 = data
  163. console.log('getSfzGuohui', data);
  164. },
  165. getGzShenghuozhao(data) {
  166. console.log('getGzShenghuozhao', data);
  167. this.shenghuizhaoList.push(data);
  168. },
  169. getTijianbaogao(data) {
  170. console.log('getTijianbaogao', data);
  171. this.tijianbaogaoList.push(data);
  172. },
  173. getZigezhao(data) {
  174. console.log('getZigezhao', data);
  175. this.zigezhaoList.push(data);
  176. },
  177. deleteZigeZhao(data, index) {
  178. this.zigezhaoList.splice(index, 1);
  179. },
  180. deleteTijianbaogao(data, index) {
  181. this.tijianbaogaoList.splice(index, 1);
  182. },
  183. deleteShenghuoZhao(data, index) {
  184. this.shenghuizhaoList.splice(index, 1);
  185. },
  186. changeTijian(data) {
  187. console.log('data', data);
  188. this.tijianDate = data
  189. },
  190. changeJiankang(data) {
  191. console.log('data', data);
  192. this.jiankangDate = data
  193. },
  194. changeTijianbaogao(data) {
  195. this.tijianbaogaoFlag = !this.tijianbaogaoFlag
  196. },
  197. switchSfzChange(data) {
  198. console.log('data', data);
  199. },
  200. switchGzChange(data) {
  201. console.log('data', data);
  202. },
  203. switchZgChange(data) {
  204. console.log('data', data);
  205. },
  206. goNext() {
  207. this.formData = {
  208. icon: this.icon,
  209. idcardUrl1: this.idcardUrl1,
  210. idcardUrl2: this.idcardUrl2,
  211. tijianbaogaoFlag: this.tijianbaogaoFlag,
  212. shenghuoUrls: this.shenghuizhaoList?this.shenghuizhaoList.join(','):'',
  213. zhengshuUrls: this.zigezhaoList?this.zigezhaoList.join(','):'',
  214. tijianUrls: this.tijianbaogaoList?this.tijianbaogaoList.join(','):'',
  215. tijianDate: this.tijianDate,
  216. jiankangDate: this.jiankangDate,
  217. }
  218. console.log('this.formData', this.formData);
  219. this.$emit('goNext', this.formData, 2);
  220. },
  221. editSave() {
  222. this.formData = {
  223. icon: this.icon,
  224. idcardUrl1: this.idcardUrl1,
  225. idcardUrl2: this.idcardUrl2,
  226. tijianbaogaoFlag: this.tijianbaogaoFlag,
  227. shenghuoUrls: this.shenghuizhaoList.length > 0 ? this.shenghuizhaoList.join(',') : '',
  228. zhengshuUrls: this.zigezhaoList.length > 0 ? this.zigezhaoList.join(',') : '',
  229. tijianDate: this.tijianDate,
  230. jiankangDate: this.jiankangDate,
  231. tijianUrls: this.tijianbaogaoList?this.tijianbaogaoList.join(','):'',
  232. }
  233. console.log('this.formData', this.formData);
  234. this.$emit('editSave', this.formData);
  235. },
  236. },
  237. created() {
  238. // setTimeout(()=>{
  239. // this.$refs.datePicker.show()
  240. // },1000)
  241. },
  242. };
  243. </script>