Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

opening-account-unit.vue 6.7KB

pirms 2 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <template>
  2. <navBar title="ETC开户新办申请-单位"></navBar>
  3. <navBgCar></navBgCar>
  4. <view class="content-wrap">
  5. <view class="item-tips">
  6. <view class="title"> 上传后请核对识别信息 </view>
  7. <view class="tip"> 如有错误请及时手动修改 </view>
  8. </view>
  9. <view class="picture-wrapper" @click="cardImageOcr('1')">
  10. <view class="bg">
  11. <view class="">
  12. <view class="name"> 营业执照 </view>
  13. <view class="value"> 上传企业的营业执照 </view>
  14. <view class="tip">
  15. <view class="tip-value"> 拍摄规范 </view>
  16. </view>
  17. </view>
  18. <image class="icon" src="../../static/image/applyCard/zhizhao.png"></image>
  19. </view>
  20. </view>
  21. <view class="picture-wrapper" @click="cardImageOcr('1')">
  22. <view class="bg">
  23. <view class="">
  24. <view class="name"> 人像面 </view>
  25. <view class="value"> 上传身份证的人像面 </view>
  26. <view class="tip">
  27. <view class="tip-value"> 拍摄规范 </view>
  28. </view>
  29. </view>
  30. <image class="icon" src="../../static/image/applyCard/renxiang.png"></image>
  31. </view>
  32. </view>
  33. <view class="shibie-wrapper">
  34. <view class="title"> 识别内容如下 </view>
  35. <view class="">
  36. <u-field v-model="state.ocrData.conmpany" input-align="right" label="公司名称" disabled="true">
  37. </u-field>
  38. <u-field v-model="state.ocrData.type" input-align="right" label="证件类型" disabled="true">
  39. </u-field>
  40. <u-field v-model="state.ocrData.card" input-align="right" label="证件号码" disabled="true">
  41. </u-field>
  42. </view>
  43. </view>
  44. <view class="buchong-wrapper">
  45. <view class="title"> 需要补充内容如下 </view>
  46. <view class="">
  47. <u-field label-width="200" v-model="state.buchongData.conmpany" input-align="right" label="经办人名称">
  48. </u-field>
  49. <u-field label-width="200" v-model="state.buchongData.type" input-align="right" label="经办人证件类型">
  50. </u-field>
  51. <u-field label-width="200" v-model="state.buchongData.card" input-align="right" label="经办人证件号码">
  52. </u-field>
  53. <u-field label-width="200" v-model="state.buchongData.phone" input-align="right" label="经办人手机号"
  54. placeholder="请手动输入联系方式">
  55. </u-field>
  56. </view>
  57. </view>
  58. <view class="green-tip">
  59. 如识别信息有误,请手动修改,确认无误后,点击下一步!
  60. </view>
  61. <view class="action">
  62. <button type="default" class="button" @click="savaHandle()">
  63. 下一步
  64. </button>
  65. </view>
  66. </view>
  67. </template>
  68. <script setup lang="ts">
  69. import {
  70. reactive
  71. } from "vue";
  72. import navBgCar from "./components/nav-bg-car2";
  73. import navBar from "../components/nav-bar/nav-bar2.vue";
  74. import {
  75. pathToBase64New
  76. } from "@/utils/image-tools/index.js";
  77. import {
  78. ocrAllQuery
  79. } from "@/utils/network/api.js";
  80. import {
  81. request
  82. } from "@/utils/network/request.js";
  83. import {
  84. stringToJson
  85. } from "@/utils/network/encryption";
  86. import {
  87. onLoad
  88. } from "@dcloudio/uni-app";
  89. const savaHandle = () => {
  90. console.log("执行点击事件");
  91. uni.navigateTo({
  92. url: "/applyCard/car-release",
  93. });
  94. };
  95. const state = reactive({
  96. ocrData: {
  97. conmpany: "",
  98. type: "",
  99. card: "",
  100. },
  101. buchongData: {
  102. conmpany: "",
  103. type: "",
  104. card: "",
  105. phone: "",
  106. },
  107. });
  108. //orc接口调用
  109. const cardImageOcr = (val: any) => {
  110. var imageType = val;
  111. uni.chooseImage({
  112. count: 1, //只能选取一张照片
  113. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  114. sourceType: ["camera", "album"], //从相册选择
  115. success: function(res) {
  116. console.log(res);
  117. pathToBase64New(res.tempFilePaths[0])
  118. .then((path) => {
  119. var data = {
  120. type: 'business_license',
  121. base64: path,
  122. };
  123. const options = {
  124. type: 2,
  125. data: data,
  126. method: "POST",
  127. showLoading: true,
  128. };
  129. request(ocrAllQuery, options).then((res) => {
  130. console.log(res);
  131. const data = stringToJson(res.bizContent);
  132. });
  133. })
  134. .catch((error) => {});
  135. },
  136. });
  137. };
  138. onLoad((option: any) => {
  139. //state.fromOrder = option.fromOrder //是否来自订单-修改资料
  140. });
  141. </script>
  142. <style lang="scss" scoped>
  143. .content-wrap {
  144. position: relative;
  145. margin-top: -50rpx;
  146. padding: 0rpx 30rpx;
  147. position: relative;
  148. .action {
  149. padding-left: 20rpx;
  150. padding-right: 20rpx;
  151. padding-bottom: 30rpx;
  152. .button {
  153. height: 80rpx;
  154. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  155. border-radius: 40rpx;
  156. font-size: 32rpx;
  157. font-weight: 400;
  158. color: #ffffff;
  159. line-height: 80rpx;
  160. }
  161. }
  162. .item-tips {
  163. .title {
  164. font-size: 30rpx;
  165. font-family: Microsoft YaHei;
  166. font-weight: 400;
  167. color: #000000;
  168. line-height: 24rpx;
  169. }
  170. .tip {
  171. margin-top: 16rpx;
  172. font-size: 24rpx;
  173. font-family: Microsoft YaHei;
  174. font-weight: 400;
  175. color: #999999;
  176. line-height: 24rpx;
  177. }
  178. }
  179. .picture-wrapper {
  180. margin-top: 40rpx;
  181. .bg {
  182. background: #ffffff;
  183. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  184. border-radius: 20rpx;
  185. padding: 40rpx;
  186. display: flex;
  187. // align-items: center;
  188. justify-content: space-between;
  189. .name {
  190. font-size: 34rpx;
  191. font-family: Microsoft YaHei;
  192. font-weight: 400;
  193. color: #000000;
  194. line-height: 34rpx;
  195. }
  196. .value {
  197. margin-top: 20rpx;
  198. font-size: 24rpx;
  199. font-family: Microsoft YaHei;
  200. font-weight: 400;
  201. color: #999999;
  202. line-height: 24rpx;
  203. }
  204. .tip {
  205. margin-top: 20rpx;
  206. text-align: center;
  207. width: 110rpx;
  208. height: 40rpx;
  209. background: rgba(33, 190, 177, 0.2);
  210. border-radius: 6rpx;
  211. .tip-value {
  212. font-size: 20rpx;
  213. font-family: Microsoft YaHei;
  214. font-weight: 400;
  215. color: #0a8f8a;
  216. line-height: 40rpx;
  217. opacity: 1;
  218. }
  219. }
  220. }
  221. .icon {
  222. width: 294rpx;
  223. height: 188rpx;
  224. }
  225. }
  226. .shibie-wrapper {
  227. margin-top: 60rpx;
  228. .title {
  229. font-size: 30rpx;
  230. font-family: Microsoft YaHei;
  231. font-weight: 400;
  232. color: #000000;
  233. line-height: 30rpx;
  234. }
  235. }
  236. .buchong-wrapper {
  237. margin-top: 60rpx;
  238. .title {
  239. font-size: 30rpx;
  240. font-family: Microsoft YaHei;
  241. font-weight: 400;
  242. color: #000000;
  243. line-height: 30rpx;
  244. }
  245. }
  246. .green-tip {
  247. margin-top: 50rpx;
  248. font-size: 24rpx;
  249. font-family: Microsoft YaHei;
  250. font-weight: 400;
  251. color: #00b38b;
  252. line-height: 24rpx;
  253. margin-bottom: 60rpx;
  254. }
  255. }
  256. </style>