identity.vue 12 KB

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