zhaopianZiliao.vue 8.7 KB

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