zhaopianZiliao.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <template>
  2. <view class="jz-content-box">
  3. <view :class="isZijiazheng=='true'?'mask-view':''">
  4. <view class="upload-img-box" :class="String(statusFlag) =='false'?'upload-img-mask-box':''"
  5. @click="touxiangTishi">
  6. <jiazhengUpload @getFileUrl="getTouxiang" :img='icon' bottomText="上传头像"></jiazhengUpload>
  7. </view>
  8. <view class="form-label-switch">
  9. <view class="phone-form-label"><text class="form-label-require"></text>身份证照片</view>
  10. <!-- <switch @change="switchSfzChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  11. </view>
  12. <view class="ziliao-upload-box">
  13. <view class="upload-item-box">
  14. <jiazhengUpload @getFileUrl="getSfzTouxiang" :img='idcardUrl1' bottomText="上传身份证头像面">
  15. </jiazhengUpload>
  16. </view>
  17. <view class="upload-item-box">
  18. <jiazhengUpload @getFileUrl="getSfzGuohui" :img='idcardUrl2' bottomText="上传身份证国徽面"></jiazhengUpload>
  19. </view>
  20. </view>
  21. <view @click="changeZhankai" :class="zhankaiFlag==1?'zpzl-open-box':'zpzl-close-box'">
  22. <view class="gdzl-row">更多资料<icon></icon>
  23. </view>
  24. <view v-show="zhankaiFlag">
  25. <view class="form-label-switch form-top-margin">
  26. <view class="phone-form-label"><text class="form-label-require"></text>体检报告</view>
  27. <!-- <switch @change="switchGzChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  28. </view>
  29. <view class="zhaopianZiliao-shenfenzhengImg">
  30. <view class="ziliao-upload-box">
  31. <view v-for="(item, index) in tijianbaogaoList" :key="index"
  32. v-if="tijianbaogaoList.length>0" class="ziliao-image-box">
  33. <img class="ziliao-image" :src="item" alt="">
  34. <view @click="deleteTijianbaogao(item,index)" class="ziliao-image-close"></view>
  35. </view>
  36. <jiazhengUpload changjingType="more" @getFileUrl="getTijianbaogao"></jiazhengUpload>
  37. </view>
  38. </view>
  39. <view class="form-label-switch form-top-margin">
  40. <view class="phone-form-label"><text class="form-label-require"></text>工作生活照</view>
  41. <!-- <switch @change="switchGzChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  42. </view>
  43. <view class="zhaopianZiliao-shenfenzhengImg">
  44. <view class="ziliao-upload-box">
  45. <view v-for="(item, index) in shenghuizhaoList" :key="index"
  46. v-if="shenghuizhaoList.length>0" class="ziliao-image-box">
  47. <img class="ziliao-image" :src="item" alt="">
  48. <view @click="deleteShenghuoZhao(item,index)" class="ziliao-image-close"></view>
  49. </view>
  50. <jiazhengUpload changjingType="more" @getFileUrl="getGzShenghuozhao"></jiazhengUpload>
  51. </view>
  52. </view>
  53. <view class="form-label-switch form-top-margin">
  54. <view class="phone-form-label"><text class="form-label-require"></text>资格类照片</view>
  55. <!-- <switch @change="switchZgChange" color="#3fd2a1" style="transform:scale(0.7)" /> -->
  56. </view>
  57. <view class="zhaopianZiliao-shenfenzhengImg">
  58. <view class="ziliao-upload-box">
  59. <view v-for="(item, index) in zigezhaoList" :key="index" v-if="zigezhaoList.length>0"
  60. class="ziliao-image-box">
  61. <img class="ziliao-image" :src="item" alt="">
  62. <view @click="deleteZigeZhao(item,index)" class="ziliao-image-close"></view>
  63. </view>
  64. <jiazhengUpload changjingType="more" @getFileUrl="getZigezhao"></jiazhengUpload>
  65. </view>
  66. </view>
  67. <view class="form-label-select">
  68. <view class="phone-form-label"><text class="form-label-require"></text>最近体检日期</view>
  69. <uni-datetime-picker class="form-radio-picker" type="date" @change="changeTijian">
  70. <view class="form-radio-select">
  71. <view>{{tijianDate}}</view>
  72. <icon></icon>
  73. </view>
  74. </uni-datetime-picker>
  75. </view>
  76. <view class="form-label-select">
  77. <view class="phone-form-label"><text class="form-label-require"></text>健康证日期</view>
  78. <uni-datetime-picker class="form-radio-picker" type="date" @change="changeJiankang">
  79. <view class="form-radio-select">
  80. <view>{{jiankangDate}}</view>
  81. <icon></icon>
  82. </view>
  83. </uni-datetime-picker>
  84. </view>
  85. </view>
  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 v-if="isZijiazheng !='true'" class="page-btn-box">
  104. <button type="default" v-if="status =='add'&&isZijiazheng !='true'" @click="goNext"
  105. class="phone-green-btn">下一步</button>
  106. <button type="default" v-if="status =='edit'&&isZijiazheng !='true'" @click="editSave"
  107. class="phone-green-btn">保存</button>
  108. </view>
  109. </view>
  110. </view>
  111. </template>
  112. <script>
  113. import {
  114. getAliyunPolicy
  115. } from "@/api/jiazheng.js"
  116. import jiazhengUpload from "./common/jiazhengUpload.vue"
  117. export default {
  118. data() {
  119. return {
  120. shenghuizhaoList: [],
  121. tijianbaogaoList: [],
  122. zigezhaoList: [],
  123. icon: '',
  124. idcardUrl1: '',
  125. idcardUrl2: '',
  126. shenghuoUrls: '',
  127. tijianDate: '',
  128. tijianUrls: '',
  129. jiankangDate: '',
  130. tijianbaogaoFlag: false,
  131. zhengshuUrls: '',
  132. accordionVal: '',
  133. zhankaiFlag: false
  134. }
  135. },
  136. props: {
  137. status: {
  138. type: String,
  139. },
  140. isZijiazheng: {
  141. type: String,
  142. },
  143. statusFlag: {
  144. type: Boolean,
  145. },
  146. },
  147. components: {
  148. jiazhengUpload
  149. },
  150. methods: {
  151. touxiangTishi() {
  152. if (String(this.statusFlag) == 'false') {
  153. uni.showToast({
  154. title: '已提交办证申请,禁止修改',
  155. icon: 'none'
  156. });
  157. return false
  158. }
  159. },
  160. changeZhankai() {
  161. this.zhankaiFlag = !this.zhankaiFlag
  162. console.log('this.changeZhankai', this.changeZhankai);
  163. },
  164. editinfo(data) {
  165. console.log('data', data);
  166. this.$nextTick(() => {
  167. this.icon = data.icon
  168. this.idcardUrl1 = data.idcardUrl1
  169. this.idcardUrl2 = data.idcardUrl2
  170. this.shenghuizhaoList = data.shenghuoUrls == '' ? '' : data.shenghuoUrls.split(",")
  171. this.zigezhaoList = data.zhengshuUrls == '' ? '' : data.zhengshuUrls.split(",")
  172. this.tijianbaogaoList = data.tijianUrls == '' ? '' : data.tijianUrls.split(",")
  173. this.tijianDate = data.tijianDate
  174. this.jiankangDate = data.jiankangDate
  175. })
  176. },
  177. getTouxiang(data) {
  178. this.icon = data
  179. console.log('getTouxiang', data);
  180. },
  181. getSfzTouxiang(data) {
  182. this.idcardUrl1 = data
  183. console.log('getSfzTouxiang', data);
  184. },
  185. getSfzGuohui(data) {
  186. this.idcardUrl2 = data
  187. console.log('getSfzGuohui', data);
  188. },
  189. getGzShenghuozhao(data) {
  190. console.log('getGzShenghuozhao', data);
  191. this.shenghuizhaoList.push(data);
  192. },
  193. getTijianbaogao(data) {
  194. console.log('getTijianbaogao', data);
  195. this.tijianbaogaoList.push(data);
  196. },
  197. getZigezhao(data) {
  198. console.log('getZigezhao', data);
  199. this.zigezhaoList.push(data);
  200. },
  201. deleteZigeZhao(data, index) {
  202. this.zigezhaoList.splice(index, 1);
  203. },
  204. deleteTijianbaogao(data, index) {
  205. this.tijianbaogaoList.splice(index, 1);
  206. },
  207. deleteShenghuoZhao(data, index) {
  208. this.shenghuizhaoList.splice(index, 1);
  209. },
  210. changeTijian(data) {
  211. console.log('data', data);
  212. this.tijianDate = data
  213. },
  214. changeJiankang(data) {
  215. console.log('data', data);
  216. this.jiankangDate = data
  217. },
  218. changeTijianbaogao(data) {
  219. this.tijianbaogaoFlag = !this.tijianbaogaoFlag
  220. },
  221. switchSfzChange(data) {
  222. console.log('data', data);
  223. },
  224. switchGzChange(data) {
  225. console.log('data', data);
  226. },
  227. switchZgChange(data) {
  228. console.log('data', data);
  229. },
  230. goNext() {
  231. this.formData = {
  232. icon: this.icon,
  233. idcardUrl1: this.idcardUrl1,
  234. idcardUrl2: this.idcardUrl2,
  235. tijianbaogaoFlag: this.tijianbaogaoFlag,
  236. shenghuoUrls: this.shenghuizhaoList ? this.shenghuizhaoList.join(',') : '',
  237. zhengshuUrls: this.zigezhaoList ? this.zigezhaoList.join(',') : '',
  238. tijianUrls: this.tijianbaogaoList ? this.tijianbaogaoList.join(',') : '',
  239. tijianDate: this.tijianDate,
  240. jiankangDate: this.jiankangDate,
  241. }
  242. console.log('this.formData', this.formData);
  243. this.$emit('goNext', this.formData, 2);
  244. },
  245. editSave() {
  246. this.formData = {
  247. icon: this.icon,
  248. idcardUrl1: this.idcardUrl1,
  249. idcardUrl2: this.idcardUrl2,
  250. tijianbaogaoFlag: this.tijianbaogaoFlag,
  251. shenghuoUrls: this.shenghuizhaoList.length > 0 ? this.shenghuizhaoList.join(',') : '',
  252. zhengshuUrls: this.zigezhaoList.length > 0 ? this.zigezhaoList.join(',') : '',
  253. tijianDate: this.tijianDate,
  254. jiankangDate: this.jiankangDate,
  255. tijianUrls: this.tijianbaogaoList ? this.tijianbaogaoList.join(',') : '',
  256. }
  257. console.log('this.formData', this.formData);
  258. this.$emit('editSave', this.formData);
  259. },
  260. },
  261. created() {
  262. // setTimeout(()=>{
  263. // this.$refs.datePicker.show()
  264. // },1000)
  265. },
  266. };
  267. </script>