index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. <!-- 证件识别 -->
  2. <template>
  3. <view>
  4. <view class="container">
  5. <!-- 输入统一社会信用代码/组织机构代码 -->
  6. <view class="cu-bar bg-white qyyyzz">
  7. <view class="action sub-title">
  8. <text class="text-xl text-bold text-blue text-shadow">统一社会信用代码/组织机构代码</text>
  9. <text class="text-ABC text-blue"></text>
  10. </view>
  11. </view>
  12. <view class="input_box">
  13. <input class="input" placeholder="企业名称" v-model="formData.agentsname" />
  14. <input class="input" placeholder="输入统一社会信用代码/组织机构代码" v-model="formData.agentstaxnumber" />
  15. </view>
  16. <!-- 企业营业执照 -->
  17. <view class="cu-bar bg-white qyyyzz">
  18. <view class="action sub-title">
  19. <text class="text-xl text-bold text-blue text-shadow">请拍摄并上传企业营业执照</text>
  20. <text class="text-ABC text-blue"></text>
  21. </view>
  22. </view>
  23. <view class="uploadBox r_flex_center">
  24. <view style="width: 43%">
  25. <view class="uploadItem qyyyzz_uploadItem">
  26. <view class="imgBox imgEx3">
  27. <view class="leftTop"></view>
  28. <view class="leftTop2"></view>
  29. <view class="leftbottom"></view>
  30. <view class="leftbottom2"></view>
  31. <view class="rightTop"></view>
  32. <view class="rightTop2"></view>
  33. <view class="rightbottom"></view>
  34. <view class="rightbottom2"></view>
  35. </view>
  36. <image class="imgUrl" v-if="imgUrl3" :src="imgUrl3"></image>
  37. </view>
  38. <view @click="uploadImg('imgUrl3', {attmodel: 'business-yyzz', attpath: '/certificate/business/', attother2: '营业执照'})" class="leftBtn text-white text-lg text-center"
  39. >上传照片</view
  40. >
  41. </view>
  42. </view>
  43. <view class="uploadText">请提供证件的原件照片或彩色扫描件,文字/盖章清晰可辨认。图片格式要求PNG、JPG、BMP、TIFF、WebP,不超过5M。</view>
  44. <!-- 输入您的姓名 -->
  45. <view class="cu-bar bg-white qyyyzz">
  46. <view class="action sub-title">
  47. <text class="text-xl text-bold text-blue text-shadow">法定代表人认证</text>
  48. <text class="text-ABC text-blue"></text>
  49. </view>
  50. </view>
  51. <view class="input_box">
  52. 您的身份:
  53. <u-radio-group v-model="formData.agentssf">
  54. <u-radio name="法人"> 法人 </u-radio>
  55. <u-radio name="经办人"> 经办人 </u-radio>
  56. </u-radio-group>
  57. </view>
  58. <view v-if="formData.agentssf == '法人'">
  59. <view class="input_box">
  60. <input class="input" placeholder="输入法定代表人姓名" v-model="formData.agentfddbrname" />
  61. </view>
  62. <view class="input_box">
  63. <input class="input" placeholder="输入法定代表人证件号" v-model="formData.agentfddbrzjcode" />
  64. </view>
  65. <view class="cu-bar bg-white">
  66. <view class="action sub-title">
  67. <text class="text-xl text-bold text-blue text-shadow">请拍摄并上传法定代表人证件</text>
  68. <text class="text-ABC text-blue"></text>
  69. </view>
  70. </view>
  71. <view class="input_box">
  72. 证件类型:
  73. <u-radio-group v-model="formData.agentfddbrzjlx">
  74. <u-radio name="身份证"> 身份证 </u-radio>
  75. </u-radio-group>
  76. </view>
  77. <view class="uploadBox">
  78. <view style="width: 43%">
  79. <view class="uploadItem">
  80. <view class="imgBox imgEx1">
  81. <view class="leftTop"></view>
  82. <view class="leftTop2"></view>
  83. <view class="leftbottom"></view>
  84. <view class="leftbottom2"></view>
  85. <view class="rightTop"></view>
  86. <view class="rightTop2"></view>
  87. <view class="rightbottom"></view>
  88. <view class="rightbottom2"></view>
  89. </view>
  90. <image class="imgUrl" v-if="imgUrl1" :src="imgUrl1"></image>
  91. </view>
  92. <view
  93. @click="uploadImg('imgUrl1', {attmodel: 'sfz-zhengmian', attpath: '/certificate/dlsPersonageidc/', attother2: '法人证件正面'})"
  94. class="leftBtn text-white text-lg text-center"
  95. >上传正面</view
  96. >
  97. </view>
  98. <view style="width: 43%">
  99. <view class="uploadItem">
  100. <view class="imgBox imgEx2">
  101. <view class="leftTop"></view>
  102. <view class="leftTop2"></view>
  103. <view class="leftbottom"></view>
  104. <view class="leftbottom2"></view>
  105. <view class="rightTop"></view>
  106. <view class="rightTop2"></view>
  107. <view class="rightbottom"></view>
  108. <view class="rightbottom2"></view>
  109. </view>
  110. <image class="imgUrl" :src="imgUrl2"></image>
  111. </view>
  112. <view
  113. @click="uploadImg('imgUrl2', {attmodel: 'sfz-fanmian', attpath: '/certificate/dlsPersonageidc/', attother2: '法人证件反面'})"
  114. class="leftBtn text-white text-lg text-center"
  115. >上传反面</view
  116. >
  117. </view>
  118. </view>
  119. <view class="uploadText">图片格式要求PNG、JPG、BMP、TIFF、WebP,不超过5M</view>
  120. </view>
  121. <view v-if="formData.agentssf == '经办人'">
  122. <view class="input_box">
  123. <input class="input" placeholder="输入经办人姓名" v-model="formData.agentfddbrname" />
  124. </view>
  125. <view class="input_box">
  126. <input class="input" placeholder="输入经办人证件号" v-model="formData.agentfddbrzjcode" />
  127. </view>
  128. <!-- 请上传授权书 -->
  129. <view class="cu-bar bg-white">
  130. <view class="action sub-title">
  131. <text class="text-xl text-bold text-blue text-shadow">请上传授权书</text>
  132. <text class="text-ABC text-blue"></text>
  133. </view>
  134. </view>
  135. <view class="input_box flex">
  136. <input class="input" disabled style="flex-grow: 1; background: #fff" placeholder="请上传授权书" v-model="authorization" />
  137. <view class="inputBtn" @click="uploadImg('authorization', {attmodel: 'business-sqs', attpath: '/certificate/authorization/', attother2: '授权书'})">点击上传</view>
  138. </view>
  139. <view class="uploadText">请提供证明的电子原件(包括不限于介绍信、授权书),电子签名/电子盖章清晰可辨认。文档格式要求.docx、.dot、.wps、.pdf不超过5M。</view>
  140. <view class="cu-bar bg-white">
  141. <view class="action sub-title">
  142. <text class="text-xl text-bold text-blue text-shadow">请拍摄并上传经办人证件</text>
  143. <text class="text-ABC text-blue"></text>
  144. </view>
  145. </view>
  146. <view class="input_box">
  147. 证件类型:
  148. <u-radio-group v-model="formData.agentfddbrzjlx">
  149. <u-radio name="身份证"> 身份证 </u-radio>
  150. </u-radio-group>
  151. </view>
  152. <view class="uploadBox">
  153. <view style="width: 43%">
  154. <view class="uploadItem">
  155. <view class="imgBox imgEx1">
  156. <view class="leftTop"></view>
  157. <view class="leftTop2"></view>
  158. <view class="leftbottom"></view>
  159. <view class="leftbottom2"></view>
  160. <view class="rightTop"></view>
  161. <view class="rightTop2"></view>
  162. <view class="rightbottom"></view>
  163. <view class="rightbottom2"></view>
  164. </view>
  165. <image class="imgUrl" v-if="imgjbr1" :src="imgjbr1"></image>
  166. </view>
  167. <view
  168. @click="uploadImg('imgjbr1', {attmodel: 'sfz-jbr-zhengmian', attpath: '/certificate/dlsPersonageidc/', attother2: '经办人证件正面'})"
  169. class="leftBtn text-white text-lg text-center"
  170. >上传正面</view
  171. >
  172. </view>
  173. <view style="width: 43%">
  174. <view class="uploadItem">
  175. <view class="imgBox imgEx2">
  176. <view class="leftTop"></view>
  177. <view class="leftTop2"></view>
  178. <view class="leftbottom"></view>
  179. <view class="leftbottom2"></view>
  180. <view class="rightTop"></view>
  181. <view class="rightTop2"></view>
  182. <view class="rightbottom"></view>
  183. <view class="rightbottom2"></view>
  184. </view>
  185. <image class="imgUrl" v-if="imgjbr2" :src="imgjbr2"></image>
  186. </view>
  187. <view
  188. @click="uploadImg('imgjbr2', {attmodel: 'sfz-jbr-fanmian', attpath: '/certificate/dlsPersonageidc/', attother2: '经办人证件反面'})"
  189. class="leftBtn text-white text-lg text-center"
  190. >上传反面</view
  191. >
  192. </view>
  193. </view>
  194. <view class="uploadText">图片格式要求PNG、JPG、BMP、TIFF、WebP,不超过5M</view>
  195. </view>
  196. <view class="cu-bar bg-white margin-top">
  197. <view class="action sub-title">
  198. <text class="text-xl text-bold text-blue text-shadow">拍摄要求须知</text>
  199. <text class="text-ABC text-blue"></text>
  200. </view>
  201. </view>
  202. <view class="requirement">
  203. <view>
  204. <text class="text-gray">请上传大陆公民持有的本人有效身份证;</text>
  205. </view>
  206. <view>
  207. <text class="text-gray">拍摄时确保身份证</text>
  208. <text class="text-red">边框完整,</text>
  209. <text class="text-red">字体清晰,</text>
  210. <text class="text-red">亮度均匀;</text>
  211. </view>
  212. <view class="errorBox">
  213. <view class="item1">
  214. <image class="iconImg" src="/static/discern/ok.png" mode="widthFix"></image>
  215. </view>
  216. <view class="item2">
  217. <image class="iconImg" src="/static/discern/no.png" mode="widthFix"></image>
  218. </view>
  219. <view class="item3">
  220. <image class="iconImg" src="/static/discern/no.png" mode="widthFix"></image>
  221. </view>
  222. <view class="item4">
  223. <image class="iconImg" src="/static/discern/no.png" mode="widthFix"></image>
  224. </view>
  225. </view>
  226. </view>
  227. <view class="submitBtn" @click="upFormData">提交认证</view>
  228. </view>
  229. </view>
  230. </template>
  231. <script>
  232. import * as AppApi from '@/api/app'
  233. import request from '@/utils/request'
  234. import storage from '@/utils/storage'
  235. import * as Verify from '@/utils/verify'
  236. const apiUrl = 'https://api.hninpop.com'
  237. export default {
  238. data() {
  239. return {
  240. checked: false,
  241. list: ['隐私说明:请按要求上传真实的证件照片,您所上传的行驶证仅用于平台账户绑定,请放心上传'],
  242. // ../static/me/zjx_me_bg6.jpg
  243. imgUrl1: '',
  244. imgUrl2: '',
  245. imgUrl3: '',
  246. imgjbr1: '',
  247. imgjbr2: '',
  248. formData: {
  249. agentstaxnumber: '',
  250. agentssf: '法人',
  251. agentfddbrname: '',
  252. agentfddbrzjcode: '',
  253. agentsname: '',
  254. agentfddbrzjlx: '身份证',
  255. agentsqurl: ''
  256. },
  257. imgList: [],
  258. imgss: [],
  259. fileList: '',
  260. authorizationText: '',
  261. authorization: ''
  262. }
  263. },
  264. watch: {},
  265. onReady() {
  266. // 获取屏幕高度
  267. uni.getSystemInfo({
  268. success: (res) => {
  269. console.log(res.windowHeight)
  270. }
  271. })
  272. },
  273. mounted() {
  274. let baseUrl = apiUrl + '/api/attachment/addtoPath?pagevalue=300'
  275. this.fileList = baseUrl
  276. if (storage.get('wx_dlsinfo')) {
  277. this.formData.agentsname = storage.get('wx_dlsinfo').agentsname
  278. }
  279. },
  280. methods: {
  281. //头像上传
  282. uploadImg(url, formData) {
  283. const app = this
  284. // 选择图片并上传
  285. uni.chooseImage({
  286. count: 1, // 可选择图片的数量
  287. extension: ['.docx', '.dot', '.wps', '.pdf'],
  288. success: function (chooseResult) {
  289. var tempFilePaths = chooseResult.tempFilePaths
  290. // 上传图片
  291. let baseUrl = apiUrl + '/api/attachment/addtoPath?pagevalue=300'
  292. uni.uploadFile({
  293. url: baseUrl, // 上传图片的服务器接口
  294. filePath: tempFilePaths[0],
  295. name: 'file',
  296. formData: {
  297. ...formData,
  298. attother1: 'dlszhengjianhao',
  299. attlsh: storage.get('wx_dlsinfo').agentsid
  300. },
  301. success: function (uploadResult) {
  302. let res = JSON.parse(uploadResult.data)
  303. if (res.Status == 0) {
  304. app[url] = res.Data
  305. // if (url === 'authorization') {
  306. // app.authorizationText = '授权书'
  307. // }
  308. console.log(app[url], 'imgUrl1')
  309. app.$toast('上传成功')
  310. } else {
  311. app.$toast('上传失败')
  312. }
  313. // 上传成功后的处理
  314. },
  315. fail: function (error) {
  316. console.log('上传失败', error)
  317. // 上传失败后的处理
  318. }
  319. })
  320. }
  321. })
  322. },
  323. async upFormData() {
  324. const app = this
  325. if (Verify.isEmpty(app.formData.agentstaxnumber)) {
  326. this.$toast('请填写统一社会信用代码')
  327. return false
  328. }
  329. if (!app.formData.agentssf) {
  330. this.$toast('请选择身份')
  331. return false
  332. }
  333. if (Verify.isEmpty(app.formData.agentfddbrname)) {
  334. this.$toast('请填写法定代表人姓名')
  335. return false
  336. }
  337. if (Verify.isEmpty(app.formData.agentfddbrzjcode)) {
  338. this.$toast('请输入法定人证件号')
  339. return false
  340. }
  341. if (Verify.isEmpty(app.formData.agentsname)) {
  342. this.$toast('请输入企业名称')
  343. return false
  344. }
  345. if (app.formData.agentssf == '经办人' && !app.authorization) {
  346. this.$toast('请上传授权书')
  347. return false
  348. }
  349. app.formData.agentsqurl = app.authorization
  350. const params = {
  351. 'agentsid.value': storage.get('wx_qyid'),
  352. ...app.formData
  353. }
  354. const Data = await AppApi.upDlsMsg(params)
  355. console.log(Data, 'Data')
  356. if (Data.Status == 0) {
  357. app.$toast('认证成功')
  358. setTimeout(() => {
  359. this.$navTo('pages/firm/home/index')
  360. }, 1000)
  361. }
  362. }
  363. },
  364. onPullDownRefresh() {
  365. console.log('下拉')
  366. // 获取首页数据
  367. uni.stopPullDownRefresh()
  368. }
  369. }
  370. </script>
  371. <style lang="scss" scoped>
  372. .inputBtn {
  373. width: 200rpx;
  374. background-color: #007aec;
  375. border-radius: 10rpx;
  376. color: #fff;
  377. margin: 10rpx 0rpx 26rpx 10rpx;
  378. text-align: center;
  379. padding: 20rpx 26rpx;
  380. height: auto;
  381. }
  382. .container {
  383. height: 100%;
  384. padding-bottom: 50rpx;
  385. background: #ffffff;
  386. font-size: 30rpx;
  387. }
  388. .input_box {
  389. padding: 0 30rpx;
  390. .input {
  391. background: #007aec0a;
  392. border: 1rpx solid #007aec;
  393. border-radius: 10rpx;
  394. margin: 10rpx 0rpx 26rpx;
  395. padding: 20rpx 26rpx;
  396. height: auto;
  397. }
  398. }
  399. .uploadText {
  400. color: #aaaaaa;
  401. font-size: 22rpx;
  402. padding: 0rpx 30rpx 26rpx;
  403. background: #ffffff;
  404. }
  405. .uploadBox {
  406. padding: 15rpx 80rpx 40rpx;
  407. background-color: #ffffff;
  408. display: flex;
  409. justify-content: space-between;
  410. .leftBtn {
  411. width: 100%;
  412. height: 75rpx;
  413. line-height: 75rpx;
  414. background-color: #007aec;
  415. border-radius: 0 0 12rpx 12rpx;
  416. }
  417. .uploadItem {
  418. width: 100%;
  419. height: 200rpx;
  420. background-color: #f1f7ff;
  421. border-radius: 15rpx;
  422. padding: 30rpx;
  423. position: relative;
  424. .imgUrl {
  425. width: 100%;
  426. height: 100%;
  427. position: absolute;
  428. left: 0;
  429. top: 0;
  430. }
  431. .imgBox {
  432. width: 100%;
  433. height: 100%;
  434. position: relative;
  435. }
  436. .imgEx1 {
  437. background: url('/static/discern/ex1.png');
  438. background-size: 82%;
  439. background-repeat: no-repeat;
  440. background-position: center;
  441. }
  442. .imgEx2 {
  443. background: url('/static/discern/ex2.png');
  444. background-size: 82%;
  445. background-repeat: no-repeat;
  446. background-position: center;
  447. }
  448. .imgEx3 {
  449. background: url('/static/background/wendang.png');
  450. background-size: 82%;
  451. background-repeat: no-repeat;
  452. background-position: center;
  453. }
  454. .leftTop {
  455. height: 28rpx;
  456. width: 4rpx;
  457. background-color: #007aec;
  458. position: absolute;
  459. left: 0;
  460. }
  461. .leftTop2 {
  462. height: 4rpx;
  463. width: 28rpx;
  464. background-color: #007aec;
  465. position: absolute;
  466. top: 0;
  467. }
  468. .leftbottom {
  469. height: 28rpx;
  470. width: 4rpx;
  471. background-color: #007aec;
  472. position: absolute;
  473. bottom: 0;
  474. }
  475. .leftbottom2 {
  476. height: 4rpx;
  477. width: 28rpx;
  478. background-color: #007aec;
  479. position: absolute;
  480. bottom: 0;
  481. }
  482. .rightTop {
  483. height: 28rpx;
  484. width: 4rpx;
  485. background-color: #007aec;
  486. position: absolute;
  487. right: 0;
  488. }
  489. .rightTop2 {
  490. height: 4rpx;
  491. width: 28rpx;
  492. background-color: #007aec;
  493. position: absolute;
  494. right: 0;
  495. top: 0;
  496. }
  497. .rightbottom {
  498. height: 28rpx;
  499. width: 4rpx;
  500. background-color: #007aec;
  501. position: absolute;
  502. right: 0;
  503. bottom: 0;
  504. }
  505. .rightbottom2 {
  506. height: 4rpx;
  507. width: 28rpx;
  508. background-color: #007aec;
  509. position: absolute;
  510. right: 0;
  511. bottom: 0;
  512. }
  513. }
  514. .qyyyzz_uploadItem {
  515. height: 255rpx;
  516. }
  517. }
  518. .distinguishBox {
  519. padding: 5rpx 30rpx 20rpx;
  520. background: white;
  521. view {
  522. margin-bottom: 20rpx;
  523. }
  524. }
  525. .disLabel {
  526. text-align-last: justify;
  527. text-align: justify;
  528. text-justify: distribute-all-lines;
  529. min-width: 142rpx;
  530. display: inline-block;
  531. margin-right: 5rpx;
  532. }
  533. .requirement {
  534. padding: 10rpx 30rpx 26rpx;
  535. background: white;
  536. view {
  537. margin-bottom: 10rpx;
  538. }
  539. .errorBox {
  540. display: flex;
  541. justify-content: space-between;
  542. margin-top: 30rpx;
  543. view {
  544. width: 23%;
  545. height: 100rpx;
  546. }
  547. .item1 {
  548. background-image: url('/static/discern/yes.png');
  549. background-repeat: no-repeat;
  550. background-size: 100%;
  551. position: relative;
  552. }
  553. .item2 {
  554. background-image: url('/static/discern/error1.png');
  555. background-repeat: no-repeat;
  556. background-size: 100%;
  557. position: relative;
  558. }
  559. .item3 {
  560. background-image: url('/static/discern/error2.png');
  561. background-repeat: no-repeat;
  562. background-size: 100%;
  563. position: relative;
  564. }
  565. .item4 {
  566. background-image: url('/static/discern/error3.png');
  567. background-repeat: no-repeat;
  568. background-size: 100%;
  569. position: relative;
  570. }
  571. .iconImg {
  572. width: 60rpx;
  573. position: absolute;
  574. bottom: -10px;
  575. left: 50%;
  576. margin-left: -30rpx;
  577. }
  578. }
  579. }
  580. .submitBtn {
  581. width: 90%;
  582. height: 90rpx;
  583. background: #007aec;
  584. line-height: 90rpx;
  585. margin: 50rpx auto;
  586. text-align: center;
  587. font-size: 34rpx;
  588. color: #fff;
  589. border-radius: 12rpx;
  590. }
  591. </style>