identity.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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="`https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/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="`https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/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="`https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/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" >
  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="https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/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" hover-class="is-hover" @click="onAuthentication(1)">去认证</button>-->
  44. <!-- </view>-->
  45. <add-identity :user-name.sync="formData.name" :user-sex.sync="formData.sex" :id-number.sync="formData.id_number" :identity-one.sync="formData.identity_one" :identity-two.sync="formData.identity_two" :identity-validity.sync="formData.identity_validity" :user-birthday.sync="formData.birthday" v-if="verifyKey('identity_one')"></add-identity>
  46. <view class="p-t20">
  47. <WhInput :value="formData.name" name="姓名" placeholder="待自动录入" v-if="verifyKey('name')" disabled></WhInput>
  48. <!-- <WhInput :value="formData.sex===1?'男':'女'" name="性别" placeholder="待自动录入" disabled></WhInput>-->
  49. <EnRadio v-model="formData.sex" name="性别" v-if="verifyKey('sex')" :list="sexData" disabled="disabled"> </EnRadio>
  50. <WhInput :value="formData.id_number" v-if="verifyKey('id_number')" :is_border="false" :name="'身份证号'" placeholder="待自动录入" disabled> </WhInput>
  51. <WhInput :value="formData.birthday" v-if="verifyKey('birthday')" :is_border="false" :name="'生日'" placeholder="待自动录入" disabled> </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. <en-upload label="添加结婚证" :imageWidth="180" v-if="verifyKey('marriage_img') && formData.marriage_type!=='1'" v-model="formData.marriage_img"></en-upload>
  60. </view>
  61. <view class="sys-background-fff r-20 m-t20 p-lr30" v-if="formData.marriage_type===2">
  62. <add-identity v-if="verifyKey('m_identity_one')" :user-name.sync="formData.mate_name" :id-number.sync="formData.mate_id_number" :identity-one.sync="formData.m_identity_one" :identity-two.sync="formData.m_identity_two" :identity-validity="formData.m_identity_validity" ></add-identity>
  63. <WhInput label="配偶姓名" type="text" placeholder="等待自动录入" v-if="verifyKey('mate_name')"
  64. v-model="formData.mate_name"></WhInput>
  65. <WhInput label="配偶身份" type="idcard" placeholder="等待自动录入" v-if="verifyKey('mate_id_number')"
  66. v-model="formData.mate_id_number"></WhInput>
  67. <WhInput label="配偶手机号" type="number" placeholder="请输入手机号码" v-if="verifyKey('mate_phone')"
  68. v-model="formData.mate_phone"></WhInput>
  69. <WhInput label="配偶企业" type="text" placeholder="请输入配偶所在企业" v-if="verifyKey('mate_firm')"
  70. v-model="formData.mate_firm" :no-box="true"></WhInput>
  71. </view>
  72. </view>
  73. <!-- 身份认证end -->
  74. <!-- 教育职业背景start -->
  75. <view class="m-t20 m-lr30 text-color-12" v-show="verifyKey('education_type') || verifyKey('employ_type') || verifyKey('firm_name')|| verifyKey('firm_city')|| verifyKey('firm_address')">
  76. <view class="sys-background-fff r-20 m-t20 p-lr30 p-t30">
  77. <view class="size-30 sys-weight-600 p-b30">教育职业背景</view>
  78. <WhInput name="学历" placeholder="请选择教育背景" :local-data="educationData" v-if="verifyKey('education_type')" v-model="formData.education_type" is_select></WhInput>
  79. <EnRadio v-model="formData.is_farming" name="雇佣类型" :list="employTypeData" > </EnRadio>
  80. <WhInput name="企业名称" placeholder="请输入企业名称" v-if="verifyKey('firm_name')" v-model="formData.firm_name"></WhInput>
  81. <en-city label="企业城市" placeholder="请选择省、市、区" v-if="verifyKey('firm_city')" v-model="formData.firm_city"></en-city>
  82. <WhInput :is_border="false" name="详细地址" v-if="verifyKey('firm_address')" v-model="formData.firm_address"></WhInput>
  83. </view>
  84. </view>
  85. <!-- 教育职业背景end -->
  86. <!-- 社保信息start -->
  87. <view class="m-t20 m-lr30 text-color-12" v-show="verifyKey('social_num') || verifyKey('reserved_money')">
  88. <view class="sys-background-fff r-20 m-t20 p-lr30 p-t30">
  89. <view class="size-30 sys-weight-600 p-b30">社保信息</view>
  90. <WhInput name="缴纳时间" rightText="月" v-if="verifyKey('social_num')" v-model="formData.social_num"></WhInput>
  91. <WhInput name="公积金" rightText="元" v-if="verifyKey('reserved_money')" v-model="formData.reserved_money" placeholder="请输入公积金缴纳基数"></WhInput>
  92. </view>
  93. </view>
  94. <!-- 社保信息end -->
  95. </view>
  96. <!-- <EnButton :text="'完成'" @onSubmit="onSubmit" v-if="step === 3 || step === 4"></EnButton> -->
  97. <EnButton is_both :leftText="'上一步'" :rightText="'保存'" @onLeftSubmit="onStep(0)" @onSubmit="onSubmit" />
  98. </view>
  99. </template>
  100. <!-- correct -->
  101. <script>
  102. import TaskImgTab from "@/common/task/task_ima_tab.vue"
  103. import WhInput from "@/components/en-from/en-input/wh-input.vue"
  104. import EnDataPicker from "@/components/en-utils/en-data-picker/en-data-picker.vue"
  105. import EnCity from "@/components/en-from/en-city/en-city.vue";
  106. import EnSelect from "@/components/en-from/en-select/en-select.vue";
  107. import EnUpload from "@/components/en-from/en-upload/en-upload.vue";
  108. import AddIdentity from "@/page_task/identity_upload/add-identity.vue";
  109. export default {
  110. components: {
  111. AddIdentity,
  112. EnUpload,
  113. EnSelect,
  114. EnCity,
  115. TaskImgTab,
  116. WhInput,
  117. EnDataPicker
  118. },
  119. data() {
  120. return {
  121. employTypeData: [{'value': 1, 'text': '受薪'}, {'value': 2, 'text': '自雇'}],
  122. sexData: [{'value': 1, 'text': '男'}, {'value': 2, 'text': '女'}],
  123. marriageData: [{'value': 1, 'text': '单身'}, {'value': 2, 'text': '已婚'}, {'value': 3, 'text': '离异'}, {'value': 4, 'text': '丧偶'}],
  124. educationData: [
  125. {text: "初中", value: 1,},
  126. {text: "高中", value: 2,},
  127. {text: "中专", value: 3,},
  128. {text: "大专", value: 4,},
  129. {text: "本科", value: 5,},
  130. {text: "研究生", value: 6,},
  131. {text: "硕士", value: 7,},
  132. {text: "博士", value: 8,},
  133. {text: "博士后", value: 9,},
  134. ],
  135. title: '',
  136. step: 1,
  137. scrollTop: 0,
  138. // fixedHeight: 75,
  139. fixedHeight: 0,
  140. stepTwo: ['two', 'double', 'correct', 'correct'],
  141. stepThree: ['three', 'three', 'double', 'correct'],
  142. value: '',
  143. formData: {
  144. "name": "",
  145. "birthday": "",
  146. "sex": 1,
  147. "id_number": "",
  148. "identity_one": "",
  149. "identity_two": "",
  150. "phone": "",
  151. "marriage_type": 1,
  152. "education_type": '',
  153. "education_name": '',
  154. "employ_type": 1,
  155. "firm_name": "",
  156. "firm_address": "",
  157. "resident_city": "",
  158. "resident_address": "",
  159. "mate_name": "",
  160. "mate_phone": "",
  161. "mate_id_number": "",
  162. "mate_firm": "",
  163. "m_code": "",
  164. "code": "",
  165. "m_identity_one": "",
  166. "m_identity_two": "",
  167. "firm_city": "",
  168. "social_num": "",
  169. "reserved_money": "",
  170. "marriage_img": [],
  171. "credit_img": []
  172. },
  173. clientInfoKey:[]
  174. }
  175. },
  176. watch: {
  177. 'formData': {
  178. handler() {
  179. uni.$emit("putClientInfo", this.formData);
  180. },
  181. deep: true
  182. },
  183. },
  184. onPageScroll(res) {
  185. this.scrollTop = res.scrollTop / 120
  186. },
  187. onLoad(options) {
  188. this.title = options.title
  189. let clientInfoData = uni.getStorageSync('clientInfoData')
  190. let clientInfoKey = uni.getStorageSync('clientInfoKey')
  191. this.formData=clientInfoData
  192. this.clientInfoKey=clientInfoKey
  193. uni.$on('setClientData',clientInfo=>{
  194. this.formData=clientInfo
  195. })
  196. },
  197. methods: {
  198. verifyKey(field) {
  199. return this.clientInfoKey.indexOf(field) >= 0
  200. },
  201. // 身份认证
  202. onAuthentication(item) {
  203. uni.navigateTo({
  204. url: "/page_task/identity_upload/identity_upload?identity_one="+this.formData.identity_one+'&identity_two='+this.formData.identity_two+'&name='+this.formData.name+'&identity_validity='+this.formData.identity_validity
  205. })
  206. },
  207. // 保存
  208. onLeftSubmit() {
  209. console.log(this.formData);
  210. console.log('保存');
  211. this.step--
  212. },
  213. // 下一步
  214. onStep(type) {
  215. },
  216. // 完成
  217. onSubmit() {
  218. this.step = 4
  219. },
  220. onChange(address) {
  221. console.log(address);
  222. this.formData.firm_address = address
  223. }
  224. }
  225. }
  226. </script>
  227. <style lang="scss" scoped>
  228. .info_button {
  229. width: 130rpx;
  230. height: 60rpx;
  231. border: none;
  232. line-height: 60rpx;
  233. }
  234. .attestation_content {
  235. width: 100%;
  236. position: absolute;
  237. }
  238. .attestation-button {
  239. width: 156rpx;
  240. height: 54rpx;
  241. line-height: 54rpx;
  242. background: #FFFFFF;
  243. border: 1rpx solid #0FB160;
  244. }
  245. .line {
  246. width: 70rpx;
  247. height: 4rpx;
  248. background: #8EDBDA;
  249. margin-top: 22rpx;
  250. }
  251. button::after {
  252. border: none;
  253. }
  254. </style>