identity.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  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 v-model="formData.name" label="姓名" placeholder="待自动录入" v-if="verifyKey('name')"
  51. disabled></en-input>
  52. <!-- <en-input v-model="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 v-model="formData.id_number" v-if="verifyKey('id_number')" :label="'身份证号'"
  56. placeholder="待自动录入" disabled> </en-input>
  57. <en-input v-model="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 v-model="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="'详细地址'" v-model="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-select label="学历" placeholder="请选择教育背景" :local-data="educationData"
  95. v-if="verifyKey('education_type')" v-model="formData.education_type" ></en-select>
  96. <EnRadio v-model="formData.is_farming" label="雇佣类型" :list="employTypeData"> </EnRadio>
  97. <en-input label="企业名称" placeholder="请输入企业名称" v-if="verifyKey('firm_name')"
  98. v-model="formData.firm_name"></en-input>
  99. <en-city label="企业城市" placeholder="请选择省、市、区" v-if="verifyKey('firm_city')"
  100. v-model="formData.firm_city"></en-city>
  101. <en-input :is_border="false" label="详细地址" v-if="verifyKey('firm_address')"
  102. v-model="formData.firm_address"></en-input>
  103. </view>
  104. </view>
  105. <!-- 教育职业背景end -->
  106. <!-- 社保信息start -->
  107. <view class="m-t20 m-lr30 text-color-12" v-show="verifyKey('social_num') || verifyKey('reserved_money')">
  108. <view class="sys-background-fff r-20 m-t20 p-lr30 p-t30">
  109. <view class="size-30 sys-weight-600 p-b30">社保信息</view>
  110. <en-input label="缴纳时间" rightText="月" v-if="verifyKey('social_num')"
  111. v-model="formData.social_num"></en-input>
  112. <en-input label="公积金" rightText="元" v-if="verifyKey('reserved_money')"
  113. v-model="formData.reserved_money" placeholder="请输入公积金缴纳基数"></en-input>
  114. </view>
  115. </view>
  116. <!-- 社保信息end -->
  117. </view>
  118. <EnButton :text="'完成'" @onSubmit="onSubmit" ></EnButton>
  119. </view>
  120. </template>
  121. <!-- correct -->
  122. <script>
  123. import TaskImgTab from "@/common/task/task_ima_tab.vue"
  124. import EnDataPicker from "@/components/en-utils/en-data-picker/en-data-picker.vue"
  125. import EnCity from "@/components/en-from/en-city/en-city.vue";
  126. import EnSelect from "@/components/en-from/en-select/en-select.vue";
  127. import EnUpload from "@/components/en-from/en-upload/en-upload.vue";
  128. import AddIdentity from "@/page_task/identity_upload/add-identity.vue";
  129. import EnInput from "@/components/en-from/en-input/en-input.vue";
  130. import tools from "@/service/tools";
  131. import {verifyBusinessModuleKey} from "@/api/task";
  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. // console.log( this.formData)
  253. // uni.$emit("putClientInfo", this.formData);
  254. },
  255. deep: true
  256. },
  257. 'formData.id_number':function () {
  258. if(this.formData.id_number!==''){
  259. uni.$emit("putClientInfo", this.formData);
  260. }
  261. }
  262. },
  263. onPageScroll(res) {
  264. this.scrollTop = res.scrollTop / 120
  265. },
  266. onLoad(options) {
  267. this.title = options.title
  268. let clientInfoData = uni.getStorageSync('clientInfoData')
  269. let clientInfoKey = uni.getStorageSync('clientInfoKey')
  270. this.formData = clientInfoData
  271. this.clientInfoKey = clientInfoKey
  272. uni.$on('setClientData', clientInfo => {
  273. console.log('数据被重置了-------------------')
  274. this.formData = clientInfo
  275. })
  276. },
  277. methods: {
  278. verifyKey(field) {
  279. return this.clientInfoKey.indexOf(field) >= 0
  280. },
  281. // 身份认证
  282. onAuthentication(item) {
  283. uni.navigateTo({
  284. url: "/page_task/identity_upload/identity_upload?identity_one=" + this.formData.identity_one +
  285. '&identity_two=' + this.formData.identity_two + '&name=' + this.formData.name +
  286. '&identity_validity=' + this.formData.identity_validity
  287. })
  288. },
  289. // 完成
  290. onSubmit() {
  291. uni.$emit("putClientInfo", this.formData);
  292. setTimeout(()=>{
  293. tools.leftClick()
  294. },50)
  295. },
  296. }
  297. }
  298. </script>
  299. <style lang="scss" scoped>
  300. .info_button {
  301. width: 130rpx;
  302. height: 60rpx;
  303. border: none;
  304. line-height: 60rpx;
  305. }
  306. .attestation_content {
  307. width: 100%;
  308. position: absolute;
  309. }
  310. .attestation-button {
  311. width: 156rpx;
  312. height: 54rpx;
  313. line-height: 54rpx;
  314. background: #FFFFFF;
  315. border: 1rpx solid #0FB160;
  316. }
  317. .line {
  318. width: 70rpx;
  319. height: 4rpx;
  320. background: #8EDBDA;
  321. margin-top: 22rpx;
  322. }
  323. button::after {
  324. border: none;
  325. }
  326. </style>