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.

car-release.vue 33KB

pirms 2 gadiem
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 1 gada
pirms 2 gadiem
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 2 gadiem
pirms 2 gadiem
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 2 gadiem
pirms 1 gada
pirms 1 gada
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132
  1. <template>
  2. <navBar title="行驶证信息上传" :scrollTop="scrollTop"></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="takePhotoMode('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="takePhotoMode('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. <car-number-input @numberInputResult="carNumber"
  58. :defaultStr="state.form.vehicleIdNum"></car-number-input>
  59. </u-form-item>
  60. <u-form-item label="所有人">
  61. <u-input inputAlign="right" placeholder="请输入所有人" v-model="state.form.man"
  62. :disabled="state.isEnableChangeOCRCarInfo" />
  63. </u-form-item>
  64. <u-form-item label="车辆类型">
  65. <u-input inputAlign="right" placeholder="请输入车辆类型" v-model="state.form.vehicleType"
  66. :disabled="state.isEnableChangeOCRCarInfo" />
  67. </u-form-item>
  68. <u-form-item label="使用性质">
  69. <u-input inputAlign="right" placeholder="请输入使用性质" v-model="state.form.character"
  70. :disabled="state.isEnableChangeOCRCarInfo" />
  71. </u-form-item>
  72. <u-form-item label="车辆识别代号">
  73. <u-input inputAlign="right" placeholder="请输入车辆识别代号" v-model="state.form.vin"
  74. :disabled="state.isEnableChangeOCRCarInfo" />
  75. </u-form-item>
  76. <u-form-item label="发动机号码">
  77. <u-input inputAlign="right" placeholder="请输入发动机号码" v-model="state.form.engineNum"
  78. :disabled="state.isEnableChangeOCRCarInfo" />
  79. </u-form-item>
  80. <u-form-item label="注册日期">
  81. <picker mode="date" :value="state.form.register" @change="bindDateChange1"
  82. :disabled="state.isEnableChangeOCRCarInfo">
  83. <view class="uni-input" style="text-align: right;" :class="state.changeColor?'hei':'hui'">
  84. {{state.form.register}}
  85. </view>
  86. </picker>
  87. <!-- <u-input inputAlign="right" placeholder="请输入注册日期" v-model="state.form.register" :disabled="state.isEnableChangeOCRCarInfo" /> -->
  88. </u-form-item>
  89. <u-form-item label="发证日期">
  90. <picker mode="date" :value="state.form.issueDate" @change="bindDateChange2"
  91. :disabled="state.isEnableChangeOCRCarInfo">
  92. <view class="uni-input" style="text-align: right;" :class="state.changeColor?'hei':'hui'">
  93. {{state.form.issueDate}}
  94. </view>
  95. </picker>
  96. <!-- <u-input inputAlign="right" placeholder="请输入发证日期" v-model="state.form.issueDate" :disabled="state.isEnableChangeOCRCarInfo"/> -->
  97. </u-form-item>
  98. <u-form-item label="核定载人数">
  99. <u-input inputAlign="right" placeholder="请输入核定载人数" v-model="state.form.approvedCountShow"
  100. :disabled="state.isEnableChangeOCRCarInfo" />
  101. </u-form-item>
  102. <u-form-item label="整备质量">
  103. <u-input inputAlign="right" placeholder="请输入整备质量" v-model="state.form.maintenaceMassShow"
  104. :disabled="state.isEnableChangeOCRCarInfo" />
  105. </u-form-item>
  106. <!-- <u-form-item label="外廊尺寸">
  107. <u-input inputAlign="right" placeholder='请输入外廊尺寸' v-model="state.form.vehicleDimensions" />
  108. </u-form-item> -->
  109. <view class="form-item">
  110. <label>外廊尺寸</label>
  111. <view class="input-box">
  112. <text class="sub-label">长</text>
  113. <input v-model="state.outlineL" @input="outlineInput"
  114. :disabled="state.isEnableChangeOCRCarInfo" />
  115. <text class="sub-text">X</text>
  116. <text class="sub-label">宽</text>
  117. <input v-model="state.outlineW" @input="outlineInput"
  118. :disabled="state.isEnableChangeOCRCarInfo" />
  119. <text class="sub-text">X</text>
  120. <text class="sub-label">高</text>
  121. <input v-model="state.outlineH" @input="outlineInput"
  122. :disabled="state.isEnableChangeOCRCarInfo" />
  123. <text class="sub-text">mm</text>
  124. </view>
  125. </view>
  126. <u-form-item label="总质量">
  127. <u-input inputAlign="right" placeholder="请输入总质量" v-model="state.form.totalMassShow"
  128. :disabled="state.isEnableChangeOCRCarInfo" />
  129. </u-form-item>
  130. <u-form-item label="车轴数">
  131. <u-input inputAlign="right" placeholder="请输入车轴数" v-model="state.form.axleCount" type="number"
  132. maxlength="2" />
  133. </u-form-item>
  134. <view class="form-item">
  135. <label>车辆用户类型</label>
  136. <view class="select" @click="state.actionSheetShow = true">{{state.form.useUserTypeName}}</view>
  137. <image :src="`${$imgUrl}common/arror-down.png`" class="icon"
  138. @click="state.actionSheetShow = true"></image>
  139. </view>
  140. <!-- <u-form-item label="车辆用户类型">
  141. <u-input @click="state.actionSheetShow = true" placeholder="请输入车辆用户类型" inputAlign="right"
  142. v-model="state.form.useUserTypeName" height="38" type="textarea" :autoHeight="true" />
  143. </u-form-item> -->
  144. </u-form>
  145. </view>
  146. </view>
  147. <view class="green-tip">
  148. 如识别信息有误,请手动修改,确认无误后,点击下一步!
  149. </view>
  150. <view class="action">
  151. <button type="default" class="button" @click="savaHandle()">
  152. 下一步
  153. </button>
  154. </view>
  155. <!-- <u-select v-model="state.actionSheetShow" :list="state.actionSheetList" @confirm="selectConfirm"></u-select>
  156. <u-action-sheet @click="selectConfirm" :list="state.actionSheetList" v-model="state.actionSheetShow">
  157. </u-action-sheet> -->
  158. <!-- 车辆类型弹窗 -->
  159. <u-popup mode="bottom" v-model="state.actionSheetShow">
  160. <view class="window">
  161. <view class="window-item" v-for="item in state.actionSheetList" :key="item.value"
  162. @click="userType(item)">{{item.text}}</view>
  163. </view>
  164. </u-popup>
  165. <u-popup mode="bottom" v-model="state.show">
  166. <view v-if="state.data.transferLogs && state.data.transferLogs.length" class="">
  167. <view class="bettwen-center">
  168. <view style="padding: 20rpx" class="title"> 选择卡签 </view>
  169. <view class="goto" @click="pass"> 直接跳过,不使用此套卡签 </view>
  170. </view>
  171. <view @click="guohuAction(item)" class="card" v-for="(item, index) in state.data.transferLogs"
  172. :key="index" style="margin-top: 30rpx; margin-bottom: 30rpx">
  173. <view v-if="item.status === 'WAITING'" class="card-left">
  174. <image :src="`${$imgUrl}card2.png`" mode=""></image>
  175. <view class="card-center">
  176. <view class="flex">
  177. <view class=""> 卡号: </view>
  178. <view class="card-center-head">
  179. {{ item.cardId }}
  180. </view>
  181. </view>
  182. <view style="margin-top: 10rpx" class="flex">
  183. <view class=""> OBU编号: </view>
  184. <view class="card-center-head">
  185. {{ item.obuId }}
  186. </view>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </u-popup>
  193. </view>
  194. <view class="choice-takePhoto-wrap" v-if="state.isTakePhotoModeShow" @click="cancle">
  195. <view class="choice-takePhoto">
  196. <view @click.stop="takePhoto(state.choiceIndex)" style="border-radius: 20rpx 20rpx 0 0;">拍照</view>
  197. <view @click.stop="xiangce(state.choiceIndex)">从手机相册选择</view>
  198. <view @click.stop="cancle">取消</view>
  199. </view>
  200. </view>
  201. <viewfinderCar v-if="state.phoneType" :phoneType="state.phoneType" @confirmReturn="confirmReturn"></viewfinderCar>
  202. </template>
  203. <script setup lang="ts">
  204. import { reactive, ref } from "vue";
  205. import viewfinderCar from "../../components/viewfinderCar.vue"
  206. import navBgCar from "./components/nav-bg-car4";
  207. import navBar from "@/components/nav-bar/nav-bar2.vue";
  208. import carNumberInput from "@/components/car-number-input/car-number-input.vue";
  209. import { pathToBase64 } from "@/utils/util/imageTool.js";
  210. import {
  211. etcCarCardInfoSubmit,
  212. etcCarOcrCard,
  213. fileUpload,
  214. envs,
  215. queryGuoHuJianCe,
  216. queryGuoHuCaoZuo,
  217. } from "@/utils/network/api.js";
  218. import { request } from "@/utils/network/request.js";
  219. import { stringToJson } from "@/utils/network/encryption";
  220. import { onLoad, onPageScroll } from "@dcloudio/uni-app";
  221. import { getObuStatus } from "@/datas/obuStatus.js";
  222. import { getEtcCardStatus } from "@/datas/etcCardStatus.js";
  223. import { getItem, StorageKeys } from "@/utils/storage";
  224. import { hasLogin } from "@/utils/utils.ts";
  225. import { msg } from "@/utils/utils";
  226. import {
  227. getCodeName
  228. } from "@/datas/queryKey.js";
  229. const scrollTop = ref(0);
  230. //监听页面滚动
  231. onPageScroll((e) => {
  232. scrollTop.value = e.scrollTop;
  233. });
  234. //车牌号输入
  235. const carNumber = (val : any) => {
  236. state.form.vehicleIdNum = val.trim();
  237. };
  238. //提交车辆信息
  239. const savaHandle = () => {
  240. if (!state.form.vehBodyUrl) {
  241. msg("请上次车头照");
  242. return;
  243. }
  244. if (state.form.type == 1) {
  245. state.form.axleCount = 2;
  246. } else {
  247. if (!state.form.axleCount) {
  248. msg("请输入车轴数");
  249. return;
  250. }
  251. }
  252. state.form.vehicleId =
  253. state.form.vehicleIdNum + "_" + state.vehiclePlateColor;
  254. state.form.opId = getItem(StorageKeys.OpenId);
  255. state.form.approvedCount = parseFloat(state.form.approvedCount);
  256. state.form.maintenaceMass = parseFloat(state.form.maintenaceMass);
  257. state.form.totalMass = parseFloat(state.form.totalMass);
  258. state.form.permittedWeight = parseFloat(state.form.permittedWeight);
  259. state.form.permittedTowWeight = parseFloat(state.form.permittedTowWeight);
  260. const options = {
  261. type: 2,
  262. data: state.form,
  263. method: "POST",
  264. showLoading: true,
  265. };
  266. request(etcCarCardInfoSubmit, options)
  267. .then((res) => {
  268. const data = stringToJson(res.bizContent);
  269. queryGuoHuJianCeAction().then((value) => {
  270. console.log("过户检测", value)
  271. if (value.transferLogs && value.transferLogs.length > 0) {
  272. state.data.transferLogs = value.transferLogs;
  273. state.show = true;
  274. } else {
  275. // 签约
  276. if (state.isSign == 2 || state.isSign == 3) {
  277. if (!hasLogin()) {
  278. uni.redirectTo({
  279. url: `/subpackage/orders/addAddress?orderId=${state.form.orderId
  280. }&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
  281. });
  282. } else {
  283. // uni.redirectTo({
  284. // url: `/subpackage/orders/release-products?orderId=${state.form.orderId
  285. // }&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
  286. // });
  287. // #ifdef MP-ALIPAY
  288. uni.redirectTo({
  289. url: `/subpackage/orders/order_payment?orderId=${state.form.orderId}`,
  290. });
  291. // #endif
  292. // #ifdef MP-WEIXIN
  293. // uni.redirectTo({
  294. // url: `/subpackage/orders/interestsList?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`// url: `/subpackage/orders/sign-up?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
  295. // });
  296. uni.redirectTo({
  297. url: `/subpackage/orders/product-detail?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}`,
  298. });
  299. // #endif
  300. }
  301. } else {
  302. // 不签约
  303. // uni.redirectTo({
  304. // url: `/subpackage/orders/sign-up?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
  305. // });
  306. // uni.redirectTo({
  307. // url: `/subpackage/orders/interestsList?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`
  308. // });
  309. uni.redirectTo({
  310. url: `/subpackage/orders/product-detail?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}`,
  311. });
  312. // uni.redirectTo({
  313. // url: `/subpackage/orders/release-products?orderId=${state.form.orderId}&clientFee=${getItem('clientFee')}&&id=${getItem('productId')}`,
  314. // });
  315. }
  316. }
  317. });
  318. })
  319. .catch((res) => {
  320. console.log(res);
  321. });
  322. };
  323. const pass = () => {
  324. state.show = false
  325. }
  326. const selectConfirm = (index : any) => {
  327. console.log(index);
  328. state.form.useUserType = state.actionSheetList[index].value;
  329. state.form.useUserTypeName = state.actionSheetList[index].text;
  330. };
  331. //选择车辆用户类型
  332. const userType = (item : any) => {
  333. state.form.useUserType = item.value;
  334. state.form.useUserTypeName = item.text;
  335. state.actionSheetShow = false;
  336. }
  337. //车头照图片上传
  338. const cardFileImageUpdate = () => {
  339. uni.chooseImage({
  340. count: 1, //只能选取一张照片
  341. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  342. sourceType: ["camera", "album"], //从相册选择
  343. success: function (res) {
  344. pathToBase64(res.tempFilePaths[0])
  345. .then((path) => {
  346. var data = {
  347. fileBase64: path,
  348. };
  349. const options = {
  350. type: 2,
  351. data: data,
  352. method: "POST",
  353. showLoading: true,
  354. };
  355. request(fileUpload, options).then((res) => {
  356. const data = stringToJson(res.bizContent);
  357. console.log(data);
  358. state.form.vehBodyUrl = data.data.url;
  359. });
  360. })
  361. .catch((error) => { });
  362. },
  363. });
  364. };
  365. const state = reactive({
  366. phoneType: 0, // 1 身份证正面 2 身份证反面 3行驶证正面 4行驶证反面
  367. choiceIndex: 1, // 1 身份证正面 2 身份证反面
  368. isTakePhotoModeShow: false, //选择拍照方式是否出来
  369. changeColor: false,
  370. data: {
  371. transferLogs: [],
  372. },
  373. actionSheetShow: false,
  374. actionSheetList: [],
  375. form: {
  376. orderId: "", //订单ID
  377. man: "", //所有人
  378. character: "", //使用性质
  379. register: "请输入注册日期", //注册日期
  380. customerId: "", //用户编号
  381. vehicleId: "",
  382. vehicleIdNum: "", //车牌编号
  383. issueDate: "请输入发证日期", //发证日期
  384. vehPosImgUrl: "", //行驶证正面
  385. vehNegImgUrl: "", //行驶证证反面
  386. type: "0", //0,客车 1.货车
  387. useUserType: 0, //车辆用户类型
  388. useUserTypeName: "普通车",
  389. vehicleSign: 2, //前/后装标识
  390. vin: "", //车辆识别代号
  391. engineNum: "", //发动机号码
  392. vehicleType: "", //车辆类型
  393. vehicleModel: "", //行驶证品牌型号
  394. approvedCount: undefined, //核定人数
  395. approvedCountShow: undefined,//展示的
  396. totalMass: undefined, //总质量
  397. totalMassShow: undefined, //总质量
  398. maintenaceMass: undefined, //整备质量
  399. maintenaceMassShow: undefined, //整备质量展示的
  400. permittedWeight: "", //核定载质量
  401. vehicleDimensions: "", //车辆尺寸
  402. permittedTowWeight: "", //准牵引总质量
  403. axleCount: "", //车轴数
  404. ownerName: "", //车主姓名
  405. ownerIdType: "", //车主证件类型
  406. ownerIdNum: "", //车主证件号码
  407. ownPosImgUrl: "", //车主证件正面图片
  408. ownNegImgUrl: "", //车主证件反面图片
  409. agreementId: "", //签约编号
  410. channelId: "5201018892300000001", //编号渠道
  411. scenePayType: "", //
  412. transportIdNum: "", //道路运输证编号
  413. licenseIdNum: "", //经营许可证编号
  414. vehBodyUrl: "", //车身照片
  415. proxyUrl: "", //委托书地址
  416. opId: "",
  417. },
  418. vehiclePlateColor: undefined,
  419. orderId: "",
  420. // type: undefined, //标记来源是否登录 1为未登录数据 - 需要新增地址
  421. show: false,
  422. isMyPeopple: true,
  423. outlineL: "",
  424. outlineW: "",
  425. outlineH: "",
  426. isSign: '',
  427. isEnableChangeOCRCarInfo: true, //申办时是否允许修改OCR识别出来的车辆信息数据
  428. });
  429. onLoad((option : any) => {
  430. state.form.orderId = option.orderId;
  431. // state.type = option.type;
  432. state.form.type = option.type;
  433. state.vehiclePlateColor = option.vehiclePlateColor;
  434. state.isSign = option.isSign
  435. console.log("option", option)
  436. getGlobalParam();
  437. if (option.type == 1) {
  438. state.actionSheetList = [{
  439. text: "普通车",
  440. value: 0,
  441. }]
  442. } else {
  443. state.actionSheetList = [{
  444. text: "普通车",
  445. value: 0,
  446. },
  447. {
  448. text: "道路运输证经营范围仅有“货物专用运输(集装箱) ”的牵引车办理J类型集装箱",
  449. value: 24,
  450. },
  451. {
  452. text: "道路运输证经营范围不含“货物专用运输(集装箱)”的牵引车",
  453. value: 27,
  454. },
  455. {
  456. text: '道路运输证经营范围除“货物专用运输 (集装 箱)"外,还有“普通货运”等其他项目的牵引车办理J2类型集装箱',
  457. value: 28,
  458. }]
  459. }
  460. });
  461. //外廓尺寸输入框
  462. const outlineInput = (e) => {
  463. state.form.vehicleDimensions =
  464. state.outlineL + "X" + state.outlineW + "X" + state.outlineH + "mm";
  465. };
  466. //orc接口调用
  467. const cardImageOcr = (val : any) => {
  468. state.changeColor = true;
  469. var imageType = val;
  470. uni.chooseImage({
  471. count: 1, //只能选取一张照片
  472. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  473. sourceType: ["camera", "album"], //从相册选择
  474. success: function (res) {
  475. // tempFilePaths[0].startsWith('file://')
  476. pathToBase64(res.tempFilePaths[0])
  477. .then((path) => {
  478. console.log("Base64返回", path)
  479. var data = {
  480. source: "1",
  481. agencyId: "52010106004",
  482. imageType: imageType,
  483. fileName: res.tempFilePaths[0],
  484. imageBase64: path,
  485. };
  486. const options = {
  487. type: 2,
  488. data: data,
  489. method: "POST",
  490. showLoading: true,
  491. };
  492. request(etcCarOcrCard, options).then((res) => {
  493. const data = stringToJson(res.bizContent);
  494. console.log(data);
  495. if (val === "1") {
  496. if (data.plate_a.length > 8) {
  497. state.form.vehicleIdNum = data.plate_a.substring(0, 8);
  498. } else {
  499. state.form.vehicleIdNum = data.plate_a;
  500. }
  501. state.form.man = data.man;
  502. state.form.vehicleType = data.vehicle;
  503. state.form.character = data.character;
  504. state.form.vin = data.vin;
  505. state.form.engineNum = data.engine;
  506. state.form.register = data.register;
  507. state.form.issueDate = data.issue;
  508. state.form.vehPosImgUrl = data.imageUrl;
  509. state.form.vehicleModel = data.model;
  510. } else {
  511. state.form.approvedCount = data.apc;
  512. state.form.approvedCountShow = data.apc;
  513. state.form.maintenaceMass = data.unladen;
  514. state.form.maintenaceMassShow = data.unladen;
  515. state.form.vehicleDimensions = data.overall.replaceAll("x", "X");
  516. let arr = data.overall.split("x");
  517. state.outlineL = arr[0]; //外廓 长
  518. state.outlineW = arr[1]; //外廓 宽
  519. state.outlineH = arr[2].substring(0, arr[2].length - 2); //外廓 高
  520. state.form.totalMass = data.gross;
  521. state.form.totalMassShow = data.gross;
  522. state.form.vehNegImgUrl = data.imageUrl;
  523. state.form.permittedWeight = data.alc ? data.alc : 0;
  524. state.form.permittedTowWeight = data.towing ? data.towing : 0;
  525. }
  526. });
  527. })
  528. .catch((error) => { console.log("Base64异常", error) });
  529. },
  530. });
  531. };
  532. //过户检测
  533. const queryGuoHuJianCeAction = () => {
  534. var data = {
  535. orderId: state.form.orderId,
  536. };
  537. const options = {
  538. type: 2,
  539. data: data,
  540. method: "POST",
  541. showLoading: true,
  542. };
  543. return new Promise(async (resolve, reject) => {
  544. const res = await request(queryGuoHuJianCe, options);
  545. const data = stringToJson(res.bizContent);
  546. console.log("过户检测111", data)
  547. resolve(data);
  548. }).catch((error) => {
  549. reject(error);
  550. });
  551. };
  552. //过户操作
  553. const guohuAction = (val) => {
  554. var data = {
  555. orderId: state.form.orderId,
  556. serviceType: "USE",
  557. obuId: val.obuId,
  558. cardId: val.cardId,
  559. };
  560. const options = {
  561. type: 2,
  562. data: data,
  563. method: "POST",
  564. showLoading: true,
  565. };
  566. return new Promise(async (resolve, reject) => {
  567. const res = await request(queryGuoHuCaoZuo, options);
  568. const data = stringToJson(res.bizContent);
  569. state.show = false;
  570. // uni.navigateTo({
  571. // url: `/subpackage/orders/choice-product?orderId=${state.form.orderId}`,
  572. // });
  573. uni.redirectTo({
  574. url: `/subpackage/orders/product-detail?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}`,
  575. });
  576. }).catch((error) => {
  577. reject(error);
  578. });
  579. };
  580. //替换图片地址
  581. const strReplace = (str : string) => {
  582. let imgUrl = str.replace("http://192.168.101.145:9000", envs[process.env.NODE_ENV].baseUrl);
  583. imgUrl = imgUrl.replace("http://100.64.2.113:9000", envs[process.env.NODE_ENV].baseUrl);
  584. return imgUrl;
  585. };
  586. const getGlobalParam = () => {
  587. const data = getItem('globalParam')
  588. console.log("全局配置数据", getCodeName('IS_ENABLE', data.applyChangeOCRCarInfo))
  589. // 申办时是否允许修改OCR识别出来的车辆信息数据
  590. if (getCodeName('IS_ENABLE', data.applyChangeOCRCarInfo) == '启用') {
  591. state.isEnableChangeOCRCarInfo = true;
  592. } else {
  593. state.isEnableChangeOCRCarInfo = false;
  594. }
  595. }
  596. const bindDateChange1 = (e) => {
  597. state.form.register = e.detail.value
  598. state.changeColor = true;
  599. }
  600. const bindDateChange2 = (e) => {
  601. state.form.issueDate = e.detail.value
  602. state.changeColor = true;
  603. }
  604. const xiangce = (val) => {
  605. console.log("val", val)
  606. var imageType = val;
  607. state.changeColor = true;
  608. uni.chooseImage({
  609. count: 1, //只能选取一张照片
  610. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  611. sourceType: ["album"], //从相册选择
  612. success: function (res) {
  613. console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://'))
  614. pathToBase64(res.tempFilePaths[0])
  615. .then((path) => {
  616. var data = {
  617. source: "1",
  618. agencyId: "52010106004",
  619. imageType: imageType,
  620. fileName: res.tempFilePaths[0],
  621. imageBase64: path,
  622. };
  623. const options = {
  624. type: 2,
  625. data: data,
  626. method: "POST",
  627. showLoading: true,
  628. };
  629. request(etcCarOcrCard, options).then((res) => {
  630. const data = stringToJson(res.bizContent);
  631. if (state.choiceIndex === "1") {
  632. if (data.plate_a.length > 8) {
  633. state.form.vehicleIdNum = data.plate_a.substring(0, 8);
  634. } else {
  635. state.form.vehicleIdNum = data.plate_a;
  636. }
  637. state.form.man = data.man;
  638. state.form.vehicleType = data.vehicle;
  639. state.form.character = data.character;
  640. state.form.vin = data.vin;
  641. state.form.engineNum = data.engine;
  642. state.form.register = data.register;
  643. state.form.issueDate = data.issue;
  644. state.form.vehPosImgUrl = data.imageUrl;
  645. state.form.vehicleModel = data.model;
  646. } else {
  647. state.form.approvedCount = data.apc;
  648. state.form.approvedCountShow = data.apc;
  649. state.form.maintenaceMass = data.unladen;
  650. state.form.maintenaceMassShow = data.unladen;
  651. state.form.vehicleDimensions = data.overall.replaceAll("x", "X");
  652. let arr = data.overall.split("x");
  653. state.outlineL = arr[0]; //外廓 长
  654. state.outlineW = arr[1]; //外廓 宽
  655. state.outlineH = arr[2].substring(0, arr[2].length - 2); //外廓 高
  656. state.form.totalMass = data.gross;
  657. state.form.totalMassShow = data.gross;
  658. state.form.vehNegImgUrl = data.imageUrl;
  659. state.form.permittedWeight = data.alc ? data.alc : 0;
  660. state.form.permittedTowWeight = data.towing ? data.towing : 0;
  661. }
  662. state.isTakePhotoModeShow = false
  663. });
  664. })
  665. .catch((error) => { });
  666. },
  667. })
  668. }
  669. const takePhoto = (val) => {
  670. console.log("拍照", val)
  671. // uni.navigateTo({
  672. // url: `/subpackage/orders/takePhoto?phoneType=${val}`
  673. // })
  674. state.phoneType = val;
  675. }
  676. const confirmReturn = (val) => {
  677. state.changeColor = true;
  678. state.phoneType = 0
  679. state.isTakePhotoModeShow = false
  680. var imageType = state.choiceIndex;
  681. console.log("图片地址val", val.tempImagePath)
  682. pathToBase64(val.tempImagePath)
  683. .then((path) => {
  684. var data = {
  685. source: "1",
  686. agencyId: "52010106004",
  687. imageType: imageType,
  688. fileName: val.tempImagePath,
  689. imageBase64: path,
  690. };
  691. const options = {
  692. type: 2,
  693. data: data,
  694. method: "POST",
  695. showLoading: true,
  696. };
  697. request(etcCarOcrCard, options).then((res) => {
  698. const data = stringToJson(res.bizContent);
  699. if (state.choiceIndex === "1") {
  700. if (data.plate_a.length > 8) {
  701. state.form.vehicleIdNum = data.plate_a.substring(0, 8);
  702. } else {
  703. state.form.vehicleIdNum = data.plate_a;
  704. }
  705. state.form.man = data.man;
  706. state.form.vehicleType = data.vehicle;
  707. state.form.character = data.character;
  708. state.form.vin = data.vin;
  709. state.form.engineNum = data.engine;
  710. state.form.register = data.register;
  711. state.form.issueDate = data.issue;
  712. state.form.vehPosImgUrl = data.imageUrl;
  713. state.form.vehicleModel = data.model;
  714. } else {
  715. state.form.approvedCount = data.apc;
  716. state.form.approvedCountShow = data.apc;
  717. state.form.maintenaceMass = data.unladen;
  718. state.form.maintenaceMassShow = data.unladen;
  719. state.form.vehicleDimensions = data.overall.replaceAll("x", "X");
  720. let arr = data.overall.split("x");
  721. state.outlineL = arr[0]; //外廓 长
  722. state.outlineW = arr[1]; //外廓 宽
  723. state.outlineH = arr[2].substring(0, arr[2].length - 2); //外廓 高
  724. state.form.totalMass = data.gross;
  725. state.form.totalMassShow = data.gross;
  726. state.form.vehNegImgUrl = data.imageUrl;
  727. state.form.permittedWeight = data.alc ? data.alc : 0;
  728. state.form.permittedTowWeight = data.towing ? data.towing : 0;
  729. }
  730. state.isTakePhotoModeShow = false
  731. });
  732. })
  733. .catch((error) => { });
  734. }
  735. const takePhotoMode = (index) => {
  736. console.log("index", index)
  737. state.isTakePhotoModeShow = true
  738. state.choiceIndex = index
  739. }
  740. const cancle = () => {
  741. state.isTakePhotoModeShow = false
  742. }
  743. </script>
  744. <style lang="scss" scoped>
  745. .hui {
  746. color: #ccc;
  747. }
  748. .hei {
  749. color: black;
  750. }
  751. .goto {
  752. margin-right: 20rpx;
  753. padding: 10rpx;
  754. color: #00b38b;
  755. border: 1rpx solid #00b38b;
  756. border-radius: 20rpx;
  757. }
  758. .flex {
  759. display: flex;
  760. align-items: center;
  761. }
  762. .bettwen-center {
  763. display: flex;
  764. align-items: center;
  765. justify-content: space-between;
  766. }
  767. .card {
  768. margin: 20rpx;
  769. height: 150rpx;
  770. background: #ffffff;
  771. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  772. border-radius: 20rpx;
  773. padding: 20rpx;
  774. display: flex;
  775. justify-content: space-between;
  776. align-items: center;
  777. margin-bottom: 30rpx;
  778. .card-left {
  779. display: flex;
  780. align-items: center;
  781. image {
  782. width: 100rpx;
  783. height: 90rpx;
  784. }
  785. .card-center {
  786. margin-left: 30rpx;
  787. .card-center-head {
  788. font-size: 32rpx;
  789. font-family: Noto Sans S Chinese;
  790. font-weight: 400;
  791. color: #333333;
  792. }
  793. .tips {
  794. font-size: 26rpx;
  795. font-family: Noto Sans S Chinese;
  796. font-weight: 400;
  797. color: #666666;
  798. .tips-card {
  799. width: 70rpx;
  800. height: 40rpx;
  801. background: #d3f2ef;
  802. border-radius: 6rpx;
  803. font-size: 20rpx;
  804. font-family: Noto Sans S Chinese;
  805. font-weight: 400;
  806. color: #0a8f8a;
  807. padding: 5rpx 10rpx;
  808. margin-left: 20rpx;
  809. }
  810. }
  811. }
  812. }
  813. .choose-item {
  814. margin-right: 20rpx;
  815. width: 50rpx;
  816. height: 50rpx;
  817. border: 1rpx solid #00b38b;
  818. border-radius: 50%;
  819. display: flex;
  820. justify-content: center;
  821. align-items: center;
  822. .active {
  823. width: 38rpx;
  824. height: 38rpx;
  825. background: #00b38b;
  826. border-radius: 50%;
  827. }
  828. }
  829. }
  830. .content {
  831. position: relative;
  832. margin-top: -50rpx;
  833. padding: 0rpx 30rpx;
  834. position: relative;
  835. .img-pos {
  836. position: absolute;
  837. left: 270rpx;
  838. top: -38rpx;
  839. right: 50rpx;
  840. .img-flex {
  841. display: flex;
  842. justify-content: space-between;
  843. align-items: center;
  844. .car-img {
  845. width: 86rpx;
  846. height: 42rpx;
  847. }
  848. .flag-img {
  849. width: 30rpx;
  850. height: 35rpx;
  851. }
  852. }
  853. }
  854. .action {
  855. padding-left: 20rpx;
  856. padding-right: 20rpx;
  857. padding-bottom: 30rpx;
  858. .button {
  859. height: 80rpx;
  860. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  861. border-radius: 40rpx;
  862. font-size: 32rpx;
  863. font-weight: 400;
  864. color: #ffffff;
  865. line-height: 80rpx;
  866. }
  867. }
  868. .item-tips {
  869. .title {
  870. font-size: 30rpx;
  871. font-family: Microsoft YaHei;
  872. font-weight: 400;
  873. color: #000000;
  874. line-height: 24rpx;
  875. }
  876. .tip {
  877. margin-top: 16rpx;
  878. font-size: 24rpx;
  879. font-family: Microsoft YaHei;
  880. font-weight: 400;
  881. color: #999999;
  882. line-height: 24rpx;
  883. }
  884. }
  885. .picture-wrapper {
  886. margin-top: 40rpx;
  887. .bg {
  888. background: #ffffff;
  889. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  890. border-radius: 20rpx;
  891. padding: 40rpx;
  892. display: flex;
  893. // align-items: center;
  894. justify-content: space-between;
  895. .name {
  896. font-size: 34rpx;
  897. font-family: Microsoft YaHei;
  898. font-weight: 400;
  899. color: #000000;
  900. line-height: 34rpx;
  901. }
  902. .value {
  903. margin-top: 20rpx;
  904. font-size: 24rpx;
  905. font-family: Microsoft YaHei;
  906. font-weight: 400;
  907. color: #999999;
  908. line-height: 24rpx;
  909. }
  910. .tip {
  911. margin-top: 20rpx;
  912. text-align: center;
  913. width: 110rpx;
  914. height: 40rpx;
  915. background: rgba(33, 190, 177, 0.2);
  916. border-radius: 6rpx;
  917. .tip-value {
  918. font-size: 20rpx;
  919. font-family: Microsoft YaHei;
  920. font-weight: 400;
  921. color: #0a8f8a;
  922. line-height: 40rpx;
  923. opacity: 1;
  924. }
  925. }
  926. }
  927. .icon {
  928. width: 294rpx;
  929. height: 188rpx;
  930. }
  931. }
  932. .shibie-wrapper {
  933. margin-top: 60rpx;
  934. .title {
  935. font-size: 30rpx;
  936. font-family: Microsoft YaHei;
  937. font-weight: 400;
  938. color: #000000;
  939. line-height: 30rpx;
  940. }
  941. }
  942. .buchong-wrapper {
  943. margin-top: 60rpx;
  944. .title {
  945. font-size: 30rpx;
  946. font-family: Microsoft YaHei;
  947. font-weight: 400;
  948. color: #000000;
  949. line-height: 30rpx;
  950. }
  951. }
  952. .green-tip {
  953. margin-top: 50rpx;
  954. font-size: 24rpx;
  955. font-family: Microsoft YaHei;
  956. font-weight: 400;
  957. color: #00b38b;
  958. line-height: 24rpx;
  959. margin-bottom: 60rpx;
  960. }
  961. }
  962. .form-item {
  963. display: flex;
  964. font-size: 28rpx;
  965. justify-content: space-between;
  966. align-items: center;
  967. }
  968. .form-item label {}
  969. .form-item .input-box {
  970. display: flex;
  971. align-items: center;
  972. }
  973. .form-item .select {
  974. flex: 1;
  975. background: #f1f1f1;
  976. padding: 6rpx 20rpx;
  977. margin: 0 10rpx;
  978. min-height: 48rpx;
  979. line-height: 48rpx;
  980. border-radius: 8rpx;
  981. }
  982. .form-item .icon {
  983. width: 28rpx;
  984. height: 32rpx;
  985. }
  986. .form-item .input-box input {
  987. width: 90rpx;
  988. background: #f1f1f1;
  989. border-radius: 8rpx;
  990. padding: 0 5rpx;
  991. }
  992. .form-item .sub-text {
  993. color: #808080;
  994. padding-left: 10rpx;
  995. }
  996. .form-item .sub-label {
  997. padding: 0 10rpx;
  998. }
  999. .window {
  1000. padding: 60rpx 30rpx;
  1001. }
  1002. .window .window-item {
  1003. border: 1px solid #00b38b;
  1004. background: rgba(0, 179, 139, .1);
  1005. border-radius: 10rpx;
  1006. padding: 16rpx 30rpx;
  1007. font-size: 30rpx;
  1008. margin-bottom: 10rpx;
  1009. }
  1010. ::v-deep .u-input__input {
  1011. background: transparent;
  1012. }
  1013. .choice-takePhoto {
  1014. position: absolute;
  1015. bottom: 0;
  1016. background-color: white;
  1017. width: 100%;
  1018. border-radius: 20rpx 20rpx 0 0;
  1019. }
  1020. .choice-takePhoto>view:first-child {
  1021. text-align: center;
  1022. height: 80rpx;
  1023. line-height: 80rpx;
  1024. border-bottom: 1rpx solid rgba(127, 127, 127, 0.3);
  1025. background-color: white;
  1026. }
  1027. .choice-takePhoto>view:last-child {
  1028. text-align: center;
  1029. height: 80rpx;
  1030. line-height: 80rpx;
  1031. border-top: 6rpx solid rgba(127, 127, 127, 0.1);
  1032. background-color: white;
  1033. }
  1034. .choice-takePhoto>view {
  1035. text-align: center;
  1036. height: 80rpx;
  1037. line-height: 80rpx;
  1038. background-color: white;
  1039. }
  1040. .choice-takePhoto-wrap {
  1041. width: 100%;
  1042. height: 100vh;
  1043. background-color: rgba(127, 127, 127, 0.2);
  1044. position: fixed;
  1045. left: 0;
  1046. top: 0;
  1047. z-index: 11111;
  1048. }
  1049. </style>