identity.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <view class="total-page page-env-160 page-box task-bg">
  3. <Nav :title="title" :genre="4" is_fixed :opacity="scrollTop" :fixedHeight="fixedHeight"
  4. :navsHeight="fixedHeight" :bgHeight="fixedHeight">
  5. <!-- 步鄹条start -->
  6. <view class="task-tabs" :style="{top:`${$tools.topHeight()}px`}">
  7. <view class="row-justify-sb m-lr50 m-tb20">
  8. <view class="column-c" style="text-align: center;" @click="setNum(1)">
  9. <image class="wh-45 m-b16" :src="`/static/img/information/${step === 1?'double':'correct'}.png`"
  10. mode="aspectFill"></image>
  11. <text class="size-24"
  12. :class="step === 1?'color-0FB160 sys-weight-600':'sys-weight-400'">身份认证</text>
  13. </view>
  14. <view class="line"></view>
  15. <view class="column-c justify-center" @click="setNum(2)">
  16. <image class="wh-45 m-b16" :src="`/static/img/information/${stepTwo[step-1]}.png`"
  17. mode="aspectFill"></image>
  18. <text class="size-24"
  19. :class="step === 2?'color-0FB160 sys-weight-600':'sys-weight-400'">教育职业信息</text>
  20. </view>
  21. <view class="line"></view>
  22. <view class="column-c justify-center" @click="setNum(3)">
  23. <image class="wh-45 m-b16" :src="`/static/img/information/${stepThree[step-1]}.png`"
  24. mode="aspectFill"></image>
  25. <text class="size-24"
  26. :class="step === 3?'color-0FB160 sys-weight-600':'sys-weight-400'">社保信息</text>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 步鄹条end -->
  31. </Nav>
  32. <view class=" page-env-20" :style="[{top:`${$tools.topHeight() + fixedHeight}px`}]">
  33. <!-- 身份认证start -->
  34. <view class="m-t20 m-lr30 text-color-12" v-if="step === 1">
  35. <view class="sys-background-fff r-20 p-lr30 p-t30">
  36. <text class="size-30 sys-weight-600'">身份认证</text>
  37. <view class="size-26 m-t10 text-color-999">应监管要求,请先进行身份认证</view>
  38. <view class="sys-bg-BFD2CC row-justify-sb sys-weight-500 center r-20 p-30 m-t40">
  39. <view class="row-c flex">
  40. <image class="wh-45 m-r20" src="/static/img/task/sf_icon.png" mode=""></image>
  41. <text class="size-26">身份证认证</text>
  42. </view>
  43. <button class="attestation-button button-background button-color size-26 r-30" type="default"
  44. hover-class="is-hover" @click="onAuthentication">去认证</button>
  45. </view>
  46. <view class="p-t20">
  47. <WhInput :value="formData.name" name="姓名" placeholder="待自动录入" disabled></WhInput>
  48. <WhInput :value="formData.sex===1?'男':'女'" name="性别" placeholder="待自动录入" disabled></WhInput>
  49. <WhInput :value="formData.id_number" :is_border="false" :name="'身份证号'" placeholder="待自动录入"
  50. disabled>
  51. </WhInput>
  52. </view>
  53. </view>
  54. <view class="sys-background-fff r-20 m-t20 p-lr30">
  55. <WhInput :value="formData.phone" v-if="verifyKey('phone')" :name="'联系方式'"></WhInput>
  56. <en-city label="常居城市" placeholder="请选择省、市、区" v-if="verifyKey('resident_city')" v-model="formData.resident_city"></en-city>
  57. <WhInput :name="'详细地址'" :value="formData.resident_address" v-if="verifyKey('resident_address')"></WhInput>
  58. <en-select label="婚姻状态" :local-data="marriageData" v-if="verifyKey('marriage_type')" v-model="formData.marriage_type"></en-select>
  59. </view>
  60. </view>
  61. <!-- 身份认证end -->
  62. <!-- 教育职业背景start -->
  63. <view class="m-t20 m-lr30 text-color-12" v-if="step === 2">
  64. <view class="sys-background-fff r-20 m-t20 p-lr30 p-t30">
  65. <view class="size-30 sys-weight-600 p-b30">教育职业背景</view>
  66. <WhInput name="学历" disabled is_select></WhInput>
  67. <EnRadio :value="formData.is_farming" name="雇佣类型" :list="employTypeData" @onSelect="onFarming">
  68. </EnRadio>
  69. <WhInput name="企业名称"></WhInput>
  70. <WhInput name="企业城市" disabled is_select></WhInput>
  71. <WhInput :is_border="false" name="详细地址"></WhInput>
  72. </view>
  73. </view>
  74. <!-- 教育职业背景end -->
  75. <!-- 社保信息start -->
  76. <view class="m-t20 m-lr30 text-color-12" v-if="step === 3 || step === 4">
  77. <view class="sys-background-fff r-20 m-t20 p-lr30 p-t30">
  78. <view class="size-30 sys-weight-600 p-b30">社保信息</view>
  79. <WhInput name="缴纳时间" rightText="月" placeholder="请输入社保连续缴纳时间"></WhInput>
  80. <WhInput name="公积金" rightText="元" placeholder="请输入公积金缴纳基数"></WhInput>
  81. </view>
  82. </view>
  83. <!-- 社保信息end -->
  84. </view>
  85. <!-- <EnButton :text="'完成'" @onSubmit="onSubmit" v-if="step === 3 || step === 4"></EnButton> -->
  86. <EnButton v-if="step === 3 || step === 4" is_both :leftText="'上一步'" :rightText="'保存'" @onLeftSubmit="onStep(0)"
  87. @onSubmit="onSubmit" />
  88. <EnButton v-else is_both :leftText="'保存'" :rightText="'下一步'" @onLeftSubmit="onLeftSubmit" @onSubmit="onStep(1)">
  89. </EnButton>
  90. <uv-action-sheet ref="marriageSheet" round="10" :actions="marriageData" title="请选择婚姻状态" @select="onSelectMarriage"></uv-action-sheet>
  91. </view>
  92. </template>
  93. <!-- correct -->
  94. <script>
  95. import TaskImgTab from "@/common/task/task_ima_tab.vue"
  96. import WhInput from "@/components/en-from/en-input/wh-input.vue"
  97. import EnDataPicker from "@/components/en-utils/en-data-picker/en-data-picker.vue"
  98. import EnCity from "@/components/en-from/en-city/en-city.vue";
  99. import EnSelect from "@/components/en-from/en-select/en-select.vue";
  100. export default {
  101. components: {
  102. EnSelect,
  103. EnCity,
  104. TaskImgTab,
  105. WhInput,
  106. EnDataPicker
  107. },
  108. data() {
  109. return {
  110. employTypeData: [{'id': 1, 'name': '受薪'}, {'id': 2, 'name': '自雇'}],
  111. sexData: [{'id': 1, 'name': '男'}, {'id': 2, 'name': '女'}],
  112. marriageData: [{'value': 1, 'text': '单身'}, {'value': 2, 'text': '已婚'}, {'value': 3, 'text': '离异'}, {'value': 4, 'text': '丧偶'}],
  113. educationData: [
  114. {text: "初中", value: 1,},
  115. {text: "高中", value: 2,},
  116. {text: "中专", value: 3,},
  117. {text: "大专", value: 4,},
  118. {text: "本科", value: 5,},
  119. {text: "研究生", value: 6,},
  120. {text: "硕士", value: 7,},
  121. {text: "博士", value: 8,},
  122. {text: "博士后", value: 9,},
  123. ],
  124. title: '',
  125. step: 1,
  126. scrollTop: 0,
  127. fixedHeight: 75,
  128. stepTwo: ['two', 'double', 'correct', 'correct'],
  129. stepThree: ['three', 'three', 'double', 'correct'],
  130. value: '',
  131. formData: {
  132. "name": "",
  133. "birthday": "",
  134. "sex": 1,
  135. "id_number": "",
  136. "identity_one": "",
  137. "identity_two": "",
  138. "phone": "",
  139. "marriage_type": 1,
  140. "education_type": '',
  141. "education_name": '',
  142. "employ_type": 1,
  143. "firm_name": "",
  144. "firm_address": "",
  145. "resident_city": "",
  146. "resident_address": "",
  147. "mate_name": "",
  148. "mate_phone": "",
  149. "mate_id_number": "",
  150. "mate_firm": "",
  151. "m_code": "",
  152. "code": "",
  153. "m_identity_one": "",
  154. "m_identity_two": "",
  155. "firm_city": "",
  156. "social_num": "",
  157. "reserved_money": "",
  158. "marriage_img": [],
  159. "credit_img": []
  160. },
  161. clientInfoKey:[]
  162. }
  163. },
  164. watch: {
  165. 'formData': {
  166. handler() {
  167. uni.$emit("putClientInfo", this.formData);
  168. },
  169. deep: true
  170. },
  171. },
  172. onPageScroll(res) {
  173. this.scrollTop = res.scrollTop / 120
  174. },
  175. onLoad(options) {
  176. this.title = options.title
  177. let clientInfoData = uni.getStorageSync('clientInfoData')
  178. let clientInfoKey = uni.getStorageSync('clientInfoKey')
  179. this.formData=clientInfoData
  180. this.clientInfoKey=clientInfoKey
  181. console.log(clientInfoData, clientInfoKey)
  182. uni.$on('discernMember',data=>{
  183. this.formData.identity_one=data.identity_one
  184. this.formData.identity_two=data.identity_two
  185. this.formData.name=data.name
  186. this.formData.id_number=data.id_number
  187. this.formData.sex=data.sex
  188. this.formData.identity_validity=data.identity_validity
  189. })
  190. uni.$on('setClientData',clientInfo=>{
  191. this.formData=clientInfo
  192. })
  193. },
  194. methods: {
  195. verifyKey(field) {
  196. return this.clientInfoKey.indexOf(field) >= 0
  197. },
  198. setNum(step) {
  199. if (this.step !== step) {
  200. this.step = step
  201. }
  202. },
  203. // 身份认证
  204. onAuthentication(item) {
  205. uni.navigateTo({
  206. url: "/page_task/identity_upload/identity_upload"
  207. })
  208. },
  209. // 保存
  210. onLeftSubmit() {
  211. console.log(this.formData);
  212. console.log('保存');
  213. this.step--
  214. },
  215. // 下一步
  216. onStep(type) {
  217. if (type === 1) {
  218. if (this.step === 3) return
  219. this.step++
  220. } else {
  221. if (this.step === 1) return
  222. this.step--
  223. }
  224. },
  225. // 完成
  226. onSubmit() {
  227. this.step = 4
  228. },
  229. onChange(address) {
  230. console.log(address);
  231. this.formData.firm_address = address
  232. },
  233. onMarriage() {
  234. this.$refs.marriageSheet.open();
  235. },
  236. onSelectMarriage(e) {
  237. console.log(e);
  238. },
  239. onFarming(e) {
  240. this.formData.is_farming = e
  241. }
  242. }
  243. }
  244. </script>
  245. <style lang="scss" scoped>
  246. .info_button {
  247. width: 130rpx;
  248. height: 60rpx;
  249. border: none;
  250. line-height: 60rpx;
  251. }
  252. .attestation_content {
  253. width: 100%;
  254. position: absolute;
  255. }
  256. .attestation-button {
  257. width: 156rpx;
  258. height: 54rpx;
  259. line-height: 54rpx;
  260. background: #FFFFFF;
  261. border: 1rpx solid #0FB160;
  262. }
  263. .line {
  264. width: 70rpx;
  265. height: 4rpx;
  266. background: #8EDBDA;
  267. margin-top: 22rpx;
  268. }
  269. button::after {
  270. border: none;
  271. }
  272. </style>