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 7.5KB

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