You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

car-release.vue 31KB

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