Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685
  1. <template>
  2. <navBar title="行驶证信息上传"></navBar>
  3. <navBgCar></navBgCar>
  4. <view class="content">
  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 v-if="!state.form.vehPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/car-zhu.png`">
  19. </image>
  20. <image v-else class="icon" :src="strReplace(state.form.vehPosImgUrl)"></image>
  21. </view>
  22. </view>
  23. <view class="picture-wrapper" @click="cardImageOcr('2')">
  24. <view class="bg">
  25. <view class="">
  26. <view class="name"> 行驶证副页 </view>
  27. <view class="value"> 上传行驶证的副页 </view>
  28. <view class="tip">
  29. <view class="tip-value"> 拍摄规范 </view>
  30. </view>
  31. </view>
  32. <image v-if="!state.form.vehNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/car-fu.png`">
  33. </image>
  34. <image v-else class="icon" :src="strReplace(state.form.vehNegImgUrl)"></image>
  35. </view>
  36. </view>
  37. <view class="picture-wrapper" @click="cardFileImageUpdate()">
  38. <view class="bg">
  39. <view class="">
  40. <view class="name"> 车头照 </view>
  41. <view class="value"> 上传汽车的车头照片 </view>
  42. <view class="tip">
  43. <view class="tip-value"> 拍摄规范 </view>
  44. </view>
  45. </view>
  46. <image v-if="!state.form.vehBodyUrl" class="icon" :src="`${$imgUrl}applyCard/chetou.png`">
  47. </image>
  48. <image v-else class="icon" :src="strReplace(state.form.vehBodyUrl)"></image>
  49. </view>
  50. </view>
  51. <view class="shibie-wrapper">
  52. <view class="title"> 识别内容如下 </view>
  53. <view class="">
  54. <u-form label-width="200" :model="state.form" ref="uForm">
  55. <u-form-item label="车牌号">
  56. <u-input inputAlign="right" placeholder='请输入车牌号' v-model="state.form.vehicleIdNum" />
  57. </u-form-item>
  58. <u-form-item label="所有人">
  59. <u-input inputAlign="right" placeholder='请输入所有人' v-model="state.form.man" />
  60. </u-form-item>
  61. <u-form-item label="车辆类型">
  62. <u-input inputAlign="right" placeholder='请输入车辆类型' v-model="state.form.vehicleType" />
  63. </u-form-item>
  64. <u-form-item label="使用性质">
  65. <u-input inputAlign="right" placeholder='请输入使用性质' v-model="state.form.character" />
  66. </u-form-item>
  67. <u-form-item label="车辆识别代号">
  68. <u-input inputAlign="right" placeholder='请输入车辆识别代号' v-model="state.form.vin" />
  69. </u-form-item>
  70. <u-form-item label="发动机号码">
  71. <u-input inputAlign="right" placeholder='请输入发动机号码' v-model="state.form.engineNum" />
  72. </u-form-item>
  73. <u-form-item label="注册日期">
  74. <u-input inputAlign="right" placeholder='请输入注册日期' v-model="state.form.register" />
  75. </u-form-item>
  76. <u-form-item label="发证日期">
  77. <u-input inputAlign="right" placeholder='请输入发证日期' v-model="state.form.issueDate" />
  78. </u-form-item>
  79. <u-form-item label="核定载人数">
  80. <u-input inputAlign="right" placeholder='请输入核定载人数' v-model="state.form.approvedCount" />
  81. </u-form-item>
  82. <u-form-item label="整备质量">
  83. <u-input inputAlign="right" placeholder='请输入整备质量' v-model="state.form.maintenaceMass" />
  84. </u-form-item>
  85. <u-form-item label="外廊尺寸">
  86. <u-input inputAlign="right" placeholder='请输入外廊尺寸' v-model="state.form.vehicleDimensions" />
  87. </u-form-item>
  88. <u-form-item label="总质量">
  89. <u-input inputAlign="right" placeholder='请输入总质量' v-model="state.form.totalMass" />
  90. </u-form-item>
  91. <u-form-item label="车辆用户类型">
  92. <u-input @click="state.actionSheetShow = true" placeholder='请输入车辆用户类型' inputAlign="right"
  93. v-model="state.form.useUserTypeName" height='38' type='textarea' :autoHeight='true' />
  94. </u-form-item>
  95. </u-form>
  96. </view>
  97. </view>
  98. <view class="green-tip">
  99. 如识别信息有误,请手动修改,确认无误后,点击下一步!
  100. </view>
  101. <view class="action">
  102. <button type="default" class="button" @click="savaHandle()">
  103. 下一步
  104. </button>
  105. </view>
  106. <!-- <u-select v-model="state.actionSheetShow" :list="state.actionSheetList" @confirm="selectConfirm"></u-select> -->
  107. <u-action-sheet @click="selectConfirm" :list="state.actionSheetList" v-model="state.actionSheetShow">
  108. </u-action-sheet>
  109. <u-popup mode="bottom" v-model="state.show">
  110. <view v-if="state.data.transferLogs&&state.data.transferLogs.length" class="">
  111. <view class="bettwen-center">
  112. <view style="padding: 20rpx;" class="title">
  113. 选择卡签
  114. </view>
  115. <view class="goto">
  116. 直接跳过,不使用此套卡签
  117. </view>
  118. </view>
  119. <view @click="guohuAction(item)" class="card" v-for="(item,index) in state.data.transferLogs"
  120. :key="index" style="margin-top: 30rpx;margin-bottom: 30rpx;">
  121. <view v-if="item.status==='WAITING'" class="card-left">
  122. <image :src="`${$imgUrl}card2.png`" mode=""></image>
  123. <view class="card-center">
  124. <view class="flex">
  125. <view class="">
  126. 卡号:
  127. </view>
  128. <view class="card-center-head">
  129. {{item.cardId}}
  130. </view>
  131. </view>
  132. <view style="margin-top: 10rpx;" class="flex">
  133. <view class="">
  134. OBU编号:
  135. </view>
  136. <view class="card-center-head">
  137. {{item.obuId}}
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </u-popup>
  145. </view>
  146. </template>
  147. <script setup lang="ts">
  148. import {
  149. reactive
  150. } from "vue";
  151. import navBgCar from "./components/nav-bg-car4";
  152. import navBar from "../components/nav-bar/nav-bar2.vue";
  153. import {
  154. pathToBase64
  155. } from "@/utils/util/imageTool.js";
  156. import {
  157. etcCarCardInfoSubmit,
  158. etcCarOcrCard,
  159. fileUpload,
  160. queryGuoHuJianCe,
  161. queryGuoHuCaoZuo
  162. } from "@/utils/network/api.js";
  163. import {
  164. request
  165. } from "@/utils/network/request.js";
  166. import {
  167. stringToJson
  168. } from "@/utils/network/encryption";
  169. import {
  170. onLoad,
  171. onShow
  172. } from "@dcloudio/uni-app";
  173. import {
  174. getObuStatus
  175. } from "@/datas/obuStatus.js";
  176. import {
  177. getEtcCardStatus
  178. } from "@/datas/etcCardStatus.js";
  179. import {
  180. getItem
  181. } from "@/utils/storage";
  182. const savaHandle = () => {
  183. state.form.vehicleId =
  184. state.form.vehicleIdNum + "_" + state.vehiclePlateColor;
  185. const options = {
  186. type: 2,
  187. data: state.form,
  188. method: "POST",
  189. showLoading: true,
  190. };
  191. request(etcCarCardInfoSubmit, options)
  192. .then((res) => {
  193. const data = stringToJson(res.bizContent);
  194. queryGuoHuJianCeAction().then(value => {
  195. if (value.transferLogs && value.transferLogs.length > 0) {
  196. state.data.transferLogs = value.transferLogs
  197. state.show = true;
  198. } else {
  199. if(state.type == 1|| state.type == '1'){
  200. uni.navigateTo({
  201. url:`/applyCard/addAddress?orderId=${state.form.orderId}&clientFee=${getItem('clientFee')}&&id=${getItem('productId')}`
  202. })
  203. }else{
  204. uni.navigateTo({
  205. // url: `/applyCard/choice-product?orderId=${state.form.orderId}`,
  206. url: `/applyCard/release-products?orderId=${state.form.orderId}&clientFee=${getItem('clientFee')}&&id=${getItem('productId')}`,
  207. });
  208. }
  209. }
  210. })
  211. })
  212. .catch((res) => {
  213. console.log(res);
  214. });
  215. };
  216. const selectConfirm = (index: any) => {
  217. console.log(index)
  218. state.form.useUserType = state.actionSheetList[index].value
  219. state.form.useUserTypeName = state.actionSheetList[index].text
  220. };
  221. const cardFileImageUpdate = () => {
  222. uni.chooseImage({
  223. count: 1, //只能选取一张照片
  224. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  225. sourceType: ["camera", "album"], //从相册选择
  226. success: function(res) {
  227. pathToBase64(res.tempFilePaths[0])
  228. .then((path) => {
  229. var data = {
  230. fileBase64: path,
  231. };
  232. const options = {
  233. type: 2,
  234. data: data,
  235. method: "POST",
  236. showLoading: true,
  237. };
  238. request(fileUpload, options).then((res) => {
  239. const data = stringToJson(res.bizContent);
  240. console.log(data);
  241. state.form.vehBodyUrl = data.data.url;
  242. });
  243. })
  244. .catch((error) => {});
  245. },
  246. });
  247. };
  248. const state = reactive({
  249. data: {
  250. transferLogs: [],
  251. },
  252. actionSheetShow: false,
  253. actionSheetList: [{
  254. text: "普通车",
  255. value: 0,
  256. },
  257. {
  258. text: "道路运输证经营范围仅有“货物专用运输(集装箱) ”的牵引车办理J类型集装箱",
  259. value: 24,
  260. },
  261. {
  262. text: "道路运输证经营范围不含“货物专用运输(集装箱)”的牵引车",
  263. value: 27,
  264. },
  265. {
  266. text: '道路运输证经营范围除“货物专用运输 (集装 箱)"外,还有“普通货运”等其他项目的牵引车办理J2类型集装箱',
  267. value: 28,
  268. },
  269. ],
  270. form: {
  271. orderId: "", //订单ID
  272. man: "", //所有人
  273. character: "", //使用性质
  274. register: "", //注册日期
  275. customerId: "", //用户编号
  276. vehicleId: "",
  277. vehicleIdNum: "", //车牌编号
  278. issueDate: "", //发证日期
  279. vehPosImgUrl: "", //行驶证正面
  280. vehNegImgUrl: "", //行驶证证反面
  281. type: "0", //0,客车 1.货车
  282. useUserType: 0, //车辆用户类型
  283. useUserTypeName: "普通车",
  284. vehicleSign: 2, //前/后装标识
  285. vin: "", //车辆识别代号
  286. engineNum: "", //发动机号码
  287. vehicleType: "", //车辆类型
  288. vehicleModel: "", //行驶证品牌型号
  289. approvedCount: undefined, //核定人数
  290. totalMass: undefined, //总质量
  291. maintenaceMass: undefined, //整备质量
  292. permittedWeight: "", //核定载质量
  293. vehicleDimensions: "", //车辆尺寸
  294. permittedTowWeight: "", //准牵引总质量
  295. axleCount: "", //车轴数
  296. ownerName: "", //车主姓名
  297. ownerIdType: "", //车主证件类型
  298. ownerIdNum: "", //车主证件号码
  299. ownPosImgUrl: "", //车主证件正面图片
  300. ownNegImgUrl: "", //车主证件反面图片
  301. agreementId: "", //签约编号
  302. channelId: "5201018892300000001", //编号渠道
  303. scenePayType: "", //
  304. transportIdNum: "", //道路运输证编号
  305. licenseIdNum: "", //经营许可证编号
  306. vehBodyUrl: "", //车身照片
  307. proxyUrl: "", //委托书地址
  308. },
  309. vehiclePlateColor: undefined,
  310. orderId: "",
  311. type: undefined,//标记来源是否登录 1为未登录数据 - 需要新增地址
  312. show: false,
  313. isMyPeopple: true,
  314. });
  315. onLoad((option: any) => {
  316. state.form.orderId = option.orderId;
  317. state.type = option.type;
  318. state.vehiclePlateColor = option.vehiclePlateColor;
  319. });
  320. //orc接口调用
  321. const cardImageOcr = (val: any) => {
  322. var imageType = val;
  323. uni.chooseImage({
  324. count: 1, //只能选取一张照片
  325. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  326. sourceType: ["camera", "album"], //从相册选择
  327. success: function(res) {
  328. pathToBase64(res.tempFilePaths[0])
  329. .then((path) => {
  330. var data = {
  331. source: "1",
  332. agencyId: "52010106004",
  333. imageType: imageType,
  334. fileName: res.tempFilePaths[0],
  335. imageBase64: path,
  336. };
  337. const options = {
  338. type: 2,
  339. data: data,
  340. method: "POST",
  341. showLoading: true,
  342. };
  343. request(etcCarOcrCard, options).then((res) => {
  344. const data = stringToJson(res.bizContent);
  345. console.log(data);
  346. if (val === "1") {
  347. state.form.vehicleIdNum = data.plate_a;
  348. state.form.man = data.man;
  349. state.form.vehicleType = data.vehicle;
  350. state.form.character = data.character;
  351. state.form.vin = data.vin;
  352. state.form.engineNum = data.engine;
  353. state.form.register = data.register;
  354. state.form.issueDate = data.issue;
  355. state.form.vehPosImgUrl = data.imageUrl;
  356. state.form.vehicleModel = data.model;
  357. } else {
  358. state.form.approvedCount = parseFloat(data.apc);
  359. state.form.maintenaceMass = parseFloat(data.unladen);
  360. state.form.vehicleDimensions = data.overall;
  361. state.form.totalMass = parseFloat(data.gross);
  362. state.form.vehNegImgUrl = data.imageUrl;
  363. }
  364. });
  365. })
  366. .catch((error) => {});
  367. },
  368. });
  369. };
  370. const queryGuoHuJianCeAction = () => {
  371. var data = {
  372. orderId: state.form.orderId
  373. };
  374. const options = {
  375. type: 2,
  376. data: data,
  377. method: "POST",
  378. showLoading: true,
  379. };
  380. return new Promise(async (resolve, reject) => {
  381. const res = await request(queryGuoHuJianCe, options);
  382. const data = stringToJson(res.bizContent);
  383. resolve(data);
  384. }).catch((error) => {
  385. reject(error);
  386. });
  387. }
  388. const guohuAction = (val) => {
  389. var data = {
  390. orderId: state.form.orderId,
  391. serviceType: 'USE',
  392. obuId: val.obuId,
  393. cardId: val.cardId
  394. };
  395. const options = {
  396. type: 2,
  397. data: data,
  398. method: "POST",
  399. showLoading: true,
  400. };
  401. return new Promise(async (resolve, reject) => {
  402. const res = await request(queryGuoHuCaoZuo, options);
  403. const data = stringToJson(res.bizContent);
  404. state.show = false
  405. uni.navigateTo({
  406. url: `/applyCard/choice-product?orderId=${state.form.orderId}`,
  407. });
  408. }).catch((error) => {
  409. reject(error);
  410. });
  411. }
  412. //替换图片地址
  413. const strReplace = (str: string) => {
  414. return str.replace('192.168.101.145:9000', '222.85.144.89:19002')
  415. }
  416. </script>
  417. <style lang="scss" scoped>
  418. .goto {
  419. margin-right: 20rpx;
  420. padding: 10rpx;
  421. color: #00B38B;
  422. border: 1rpx solid #00B38B;
  423. border-radius: 20rpx;
  424. }
  425. .flex {
  426. display: flex;
  427. align-items: center;
  428. }
  429. .bettwen-center {
  430. display: flex;
  431. align-items: center;
  432. justify-content: space-between;
  433. }
  434. .card {
  435. margin: 20rpx;
  436. height: 150rpx;
  437. background: #FFFFFF;
  438. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  439. border-radius: 20rpx;
  440. padding: 20rpx;
  441. display: flex;
  442. justify-content: space-between;
  443. align-items: center;
  444. margin-bottom: 30rpx;
  445. .card-left {
  446. display: flex;
  447. align-items: center;
  448. image {
  449. width: 100rpx;
  450. height: 90rpx;
  451. }
  452. .card-center {
  453. margin-left: 30rpx;
  454. .card-center-head {
  455. font-size: 32rpx;
  456. font-family: Noto Sans S Chinese;
  457. font-weight: 400;
  458. color: #333333;
  459. }
  460. .tips {
  461. font-size: 26rpx;
  462. font-family: Noto Sans S Chinese;
  463. font-weight: 400;
  464. color: #666666;
  465. .tips-card {
  466. width: 70rpx;
  467. height: 40rpx;
  468. background: #D3F2EF;
  469. border-radius: 6rpx;
  470. font-size: 20rpx;
  471. font-family: Noto Sans S Chinese;
  472. font-weight: 400;
  473. color: #0A8F8A;
  474. padding: 5rpx 10rpx;
  475. margin-left: 20rpx;
  476. }
  477. }
  478. }
  479. }
  480. .choose-item {
  481. margin-right: 20rpx;
  482. width: 50rpx;
  483. height: 50rpx;
  484. border: 1rpx solid #00B38B;
  485. border-radius: 50%;
  486. display: flex;
  487. justify-content: center;
  488. align-items: center;
  489. .active {
  490. width: 38rpx;
  491. height: 38rpx;
  492. background: #00B38B;
  493. border-radius: 50%;
  494. }
  495. }
  496. }
  497. .content {
  498. position: relative;
  499. margin-top: -50rpx;
  500. padding: 0rpx 30rpx;
  501. position: relative;
  502. .img-pos {
  503. position: absolute;
  504. left: 270rpx;
  505. top: -38rpx;
  506. right: 50rpx;
  507. .img-flex {
  508. display: flex;
  509. justify-content: space-between;
  510. align-items: center;
  511. .car-img {
  512. width: 86rpx;
  513. height: 42rpx;
  514. }
  515. .flag-img {
  516. width: 30rpx;
  517. height: 35rpx;
  518. }
  519. }
  520. }
  521. .action {
  522. padding-left: 20rpx;
  523. padding-right: 20rpx;
  524. padding-bottom: 30rpx;
  525. .button {
  526. height: 80rpx;
  527. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  528. border-radius: 40rpx;
  529. font-size: 32rpx;
  530. font-weight: 400;
  531. color: #ffffff;
  532. line-height: 80rpx;
  533. }
  534. }
  535. .item-tips {
  536. .title {
  537. font-size: 30rpx;
  538. font-family: Microsoft YaHei;
  539. font-weight: 400;
  540. color: #000000;
  541. line-height: 24rpx;
  542. }
  543. .tip {
  544. margin-top: 16rpx;
  545. font-size: 24rpx;
  546. font-family: Microsoft YaHei;
  547. font-weight: 400;
  548. color: #999999;
  549. line-height: 24rpx;
  550. }
  551. }
  552. .picture-wrapper {
  553. margin-top: 40rpx;
  554. .bg {
  555. background: #ffffff;
  556. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  557. border-radius: 20rpx;
  558. padding: 40rpx;
  559. display: flex;
  560. // align-items: center;
  561. justify-content: space-between;
  562. .name {
  563. font-size: 34rpx;
  564. font-family: Microsoft YaHei;
  565. font-weight: 400;
  566. color: #000000;
  567. line-height: 34rpx;
  568. }
  569. .value {
  570. margin-top: 20rpx;
  571. font-size: 24rpx;
  572. font-family: Microsoft YaHei;
  573. font-weight: 400;
  574. color: #999999;
  575. line-height: 24rpx;
  576. }
  577. .tip {
  578. margin-top: 20rpx;
  579. text-align: center;
  580. width: 110rpx;
  581. height: 40rpx;
  582. background: rgba(33, 190, 177, 0.2);
  583. border-radius: 6rpx;
  584. .tip-value {
  585. font-size: 20rpx;
  586. font-family: Microsoft YaHei;
  587. font-weight: 400;
  588. color: #0a8f8a;
  589. line-height: 40rpx;
  590. opacity: 1;
  591. }
  592. }
  593. }
  594. .icon {
  595. width: 294rpx;
  596. height: 188rpx;
  597. }
  598. }
  599. .shibie-wrapper {
  600. margin-top: 60rpx;
  601. .title {
  602. font-size: 30rpx;
  603. font-family: Microsoft YaHei;
  604. font-weight: 400;
  605. color: #000000;
  606. line-height: 30rpx;
  607. }
  608. }
  609. .buchong-wrapper {
  610. margin-top: 60rpx;
  611. .title {
  612. font-size: 30rpx;
  613. font-family: Microsoft YaHei;
  614. font-weight: 400;
  615. color: #000000;
  616. line-height: 30rpx;
  617. }
  618. }
  619. .green-tip {
  620. margin-top: 50rpx;
  621. font-size: 24rpx;
  622. font-family: Microsoft YaHei;
  623. font-weight: 400;
  624. color: #00b38b;
  625. line-height: 24rpx;
  626. margin-bottom: 60rpx;
  627. }
  628. }
  629. </style>