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.

renewal-confirm.vue 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  1. <template>
  2. <view class="selectCar-box">
  3. <view class="details">
  4. <view class="title"> 基础信息 </view>
  5. <!-- <view class="details-item">
  6. <view> 订单编号: </view>
  7. <text>{{ orderInfos.orderId }}</text>
  8. </view> -->
  9. <view class="details-item">
  10. <view> 用户名称: </view>
  11. <text>{{ orderInfos.name }}</text>
  12. </view>
  13. <view class="details-item">
  14. <view> 用户证件类型: </view>
  15. <text>{{ getCodeName('CERTIFICATE_TYPE',orderInfos.ownerIdtype) }}</text>
  16. </view>
  17. <view class="details-item">
  18. <view> 用户证件号: </view>
  19. <text>{{ orderInfos.ownerIdnum }}</text>
  20. </view>
  21. <view class="details-item">
  22. <view> 订单车牌号: </view>
  23. <text style="color: #00b38b">{{ orderInfos.vehiclePlate }}</text>
  24. </view>
  25. <view class="details-item">
  26. <view> 车牌颜色: </view>
  27. <text style="color: #00b38b">{{getVehiclePlateColor(orderInfos.vehiclePlateColor)}}</text>
  28. </view>
  29. <view class="details-item">
  30. <view> 收费车型: </view>
  31. <text>{{ orderInfos.vehicleType }}</text>
  32. </view>
  33. </view>
  34. <view class="title"> 卡信息 </view>
  35. <view class="card">
  36. <view class="card-left">
  37. <image :src="`${$imgUrl}card2.png`" mode=""></image>
  38. <view class="card-center">
  39. <view class="card-center-head"> {{orderInfos.cardId}} </view>
  40. <view class="tips">
  41. <!-- <text>储蓄卡</text> -->
  42. <text class="tips-card">{{getCodeName('CARD_STATE_TYPE',orderInfos.cardStatus)}}</text>
  43. </view>
  44. <view class="choose-item1"> 有效期:{{orderInfos.cardExpireTime }}</view>
  45. </view>
  46. </view>
  47. <view class="choose-item" @click="choose(1)">
  48. <view class="active" v-if="flag.includes(1)">
  49. </view>
  50. </view>
  51. </view>
  52. <view class="title"> OBU设备信息 </view>
  53. <view class="card">
  54. <view class="card-left">
  55. <image :src="`${$imgUrl}card1.png`" mode=""></image>
  56. <view class="card-center">
  57. <view class="card-center-head"> {{orderInfos.obuId}} </view>
  58. <view class="tips">
  59. <!-- <text>储蓄卡</text> -->
  60. <text class="tips-card">{{getCodeName('OBU_STATE_TYPE',orderInfos.obuStatus)}}</text>
  61. </view>
  62. <view class="choose-item1"> 有效期:{{orderInfos.obuExpireTime }} </view>
  63. </view>
  64. </view>
  65. <view class="choose-item" @click="choose(2)">
  66. <view class="active" v-if="flag.includes(2)">
  67. </view>
  68. </view>
  69. </view>
  70. <button class="submit" @click="toPage" v-if="!state.flag">卡签续期</button>
  71. <button class="submit" @click="toBack" v-else="state.flag">返回服务中心</button>
  72. <view class="mask" v-show="state.showPopup">
  73. <view class="main">
  74. <view class="top">
  75. <image class="icon-close" :src="`${$imgUrl}common/icon-close.png`" @click="cancel"></image>
  76. </view>
  77. <image class="icon-success" :src="`${$imgUrl}bluetooth/card-success.png`"></image>
  78. <view class="title">{{state.successName}}续期成功!</view>
  79. </view>
  80. </view>
  81. </view>
  82. </template>
  83. <script setup>
  84. import {
  85. getCodeName
  86. } from "@/datas/queryKey.js";
  87. import {
  88. reactive,
  89. ref
  90. } from "vue";
  91. import {
  92. navTo,desensitization
  93. } from "@/utils/utils";
  94. import {
  95. onLoad,
  96. onUnload,
  97. onShow
  98. } from "@dcloudio/uni-app";
  99. import {
  100. request,requestNew
  101. } from "@/utils/network/request.js";
  102. import {
  103. commGetDetail,
  104. renewaCard,
  105. writeCardReturn,
  106. cardInfoChangeConfirm,
  107. renewalObu,
  108. changeVehicleInfo,
  109. cardRenewalConfirm,
  110. vfjObuActive,
  111. vfjCfmActive
  112. } from "@/utils/network/api.js";
  113. import {
  114. getVehiclePlateColor
  115. } from "@/datas/vehiclePlateColor";
  116. import {
  117. searchVehicleInfoQuery
  118. } from "@/subpackage/after-sale/js/publicRequest";
  119. const cmd = require("../../../static/etcUtil/cmdConfig.js");
  120. import {
  121. IntegerToHexString,
  122. AsciToHexString,
  123. } from "@/utils/util/fileData.js";
  124. import {
  125. stringToJson
  126. } from "@/utils/network/encryption";
  127. const tools = require("../../../static/etcUtil/tools.js");
  128. const bluetoothUtil = require("../../../static/etcUtil/index.js");
  129. const state = reactive({
  130. showPopup: false,
  131. flag: false,
  132. successName: "",
  133. })
  134. const flag = reactive([])
  135. const type = ref('') //1 卡 2 签 3卡签
  136. const fileDataStrings = reactive({
  137. approvedCount: 0, //核载人数
  138. cardId: "", //卡号
  139. obuId: "", //obu号
  140. obuId: "", //obu号
  141. packageNum: "", //套餐编号
  142. axleCount: 0, //轴数
  143. axleDistance: "", //轴距
  144. engineNum: "", //发动机
  145. vehicleVin: "",
  146. vehicleEngineNum: "",
  147. cardStatus: "",
  148. obuStatus: "",
  149. type: 0, //类型
  150. userType: 0, //用户类型
  151. vehiclePlate: "", //车牌
  152. vehiclePlateColor: 0, //车牌颜色
  153. vehicleDimensions: "",
  154. outlineL: 0, //外廓 长
  155. outlineW: 0, //外廓 宽
  156. outlineH: 0, //外廓 高
  157. wheelCount: "", //车轮数
  158. vehicleIdNo: "", //车牌号
  159. vehiclePlateColorStr: "",
  160. customerTel: "",
  161. customerId: "",
  162. orderId: ""
  163. });
  164. let cmdRandNum = '';
  165. const orderInfos = reactive({
  166. orderId: "",
  167. name: "",
  168. ownerIdtype: "",
  169. ownerIdnum: "",
  170. vehiclePlate: "",
  171. vehiclePlateColorStr: "",
  172. vehiclePlateColor: "",
  173. vehicleType: "",
  174. cardId: "",
  175. cardStatus: "",
  176. obuId: "",
  177. obuStatus: "",
  178. cardEnableTime: "",
  179. obuEnableTime: "",
  180. cardExpireTime: "",
  181. obuExpireTime: "",
  182. vehicleId: ""
  183. });
  184. let orderInfo = {};
  185. onLoad((option) => {
  186. //请求订单详情
  187. queryOrderDetail(option.vehicleId);
  188. getOrderDetails(option.vehicleId)
  189. });
  190. onShow((option) => {
  191. uni.$on('bluetoothLink', res => {
  192. console.log(res);
  193. if (res.status) {
  194. // 分别写
  195. if (flag.length == 1) {
  196. for (var i = 0; i < flag.length; i++) {
  197. if (flag[i] == 1) {
  198. state.successName = '卡'
  199. getCardRenewal()
  200. } else {
  201. state.successName = '签'
  202. getObuRenewal()
  203. }
  204. }
  205. } else {
  206. state.successName = '卡签'
  207. // 两个都要写,
  208. getCardRenewal()
  209. }
  210. }
  211. })
  212. })
  213. onUnload(() => {
  214. //移除监听
  215. uni.$off('bluetoothLink')
  216. })
  217. const choose = (data) => {
  218. if (!flag.includes(data)) {
  219. flag.push(data)
  220. console.log(flag);
  221. } else {
  222. flag.splice(flag.indexOf(data), 1)
  223. console.log(flag);
  224. }
  225. if (flag.length == 2) {
  226. type.value = '3'
  227. } else if (flag[0] == 1) {
  228. type.value = '1'
  229. } else {
  230. type.value = '2'
  231. }
  232. console.log("type.value",type.value)
  233. console.log("flag",flag)
  234. }
  235. //获取订单详情
  236. const queryOrderDetail = (vehicleId) => {
  237. const options = {
  238. type: 2,
  239. data: {
  240. vehicleId
  241. },
  242. method: "POST",
  243. showLoading: true,
  244. };
  245. requestNew(commGetDetail, options).then((res) => {
  246. let orderInfo = res;
  247. console.log("orderInfo", orderInfo);
  248. orderInfos.orderId = orderInfo.orderId;
  249. orderInfos.name = orderInfo.name;
  250. orderInfos.ownerIdtype = orderInfo.idType;
  251. orderInfos.ownerIdnum = desensitization(orderInfo.idNum);
  252. orderInfos.vehiclePlate = orderInfo.vehiclePlate;
  253. orderInfos.vehiclePlateColorStr = orderInfo.vehiclePlateColorStr;
  254. orderInfos.vehiclePlateColor = orderInfo.vehiclePlateColor;
  255. orderInfos.vehicleType = orderInfo.vehicleType;
  256. orderInfos.cardId = orderInfo.cardId;
  257. orderInfos.cardStatus = orderInfo.cardStatus;
  258. orderInfos.obuId = orderInfo.obuId;
  259. orderInfos.obuStatus = orderInfo.obuStatus;
  260. orderInfos.cardExpireTime = orderInfo.cardExpiretime;
  261. orderInfos.obuExpireTime = orderInfo.obuExpiretime;
  262. orderInfos.vehicleId = orderInfo.vehicleId;
  263. console.log("orderInfos.cardExpiretime", orderInfos.cardExpiretime, orderInfo.cardExpiretime)
  264. });
  265. };
  266. //卡续期 请求
  267. const getCardRenewal = () => {
  268. const options = {
  269. type: 2,
  270. data: {
  271. cardId: orderInfos.cardId,
  272. },
  273. method: "POST",
  274. showLoading: true,
  275. };
  276. requestNew(renewaCard, options).then((res) => {
  277. let result =res
  278. let cmdArray = result.command.split(",");
  279. console.log("卡续期 请求",cmdArray,result);
  280. console.log(result.cosRecordId);
  281. if (cmdArray.length > 0) {
  282. tools.showLoadingAlert("正在执行指令");
  283. bluetoothUtil.transCmd(cmdArray, "10", function(res) {
  284. console.log("卡续期res",res)
  285. tools.hideLoadingAlert();
  286. let status = res[cmdArray.length - 1].substring(res[cmdArray.length - 1].length -
  287. 4, res[cmdArray.length - 1].length);
  288. if (status == "9000") {
  289. getCommandBack(result.command, result.cosRecordId, res.toString());
  290. }
  291. })
  292. }
  293. })
  294. };
  295. /**
  296. * 写卡指令返回 请求
  297. */
  298. const getCommandBack = (command, cosRecordId, response) => {
  299. console.log('======循环写卡指令中======')
  300. tools.showLoadingAlert("加载中");
  301. let options = {
  302. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  303. data: {
  304. cardId: orderInfos.cardId,
  305. orderId: orderInfos.orderId,
  306. command: command,
  307. response: response,
  308. cosRecordId: cosRecordId,
  309. cosType: 2
  310. }, //请求参数
  311. method: "POST", //提交方式(默认POST)
  312. showLoading: true, //是否显示加载中(默认显示)
  313. };
  314. //调用方式
  315. requestNew(writeCardReturn, options)
  316. .then((res) => {
  317. tools.hideLoadingAlert();
  318. let result = res;
  319. if (result.orderStatus == 1 || result.orderStatus == "1") {
  320. tools.showLoadingAlert("执行指令中");
  321. bluetoothUtil.transCmd(result.command.split(","), "10", function(res) {
  322. tools.hideLoadingAlert();
  323. let response = res.toString();
  324. getCommandBack(result.command, cosRecordId, response);
  325. });
  326. } else {
  327. getCardModifyConfirm(cosRecordId)
  328. }
  329. })
  330. };
  331. //卡信息变更确认
  332. const getCardModifyConfirm = (cosRecordId) => {
  333. const options = {
  334. type: 2,
  335. data: {
  336. cardId: orderInfos.cardId,
  337. operation: 1,
  338. cosRecordId: cosRecordId
  339. },
  340. method: "POST",
  341. showLoading: true,
  342. };
  343. requestNew(cardInfoChangeConfirm, options).then((res) => {
  344. // 只写卡
  345. if (flag.length == 1) {
  346. sure(1)
  347. state.showPopup = true;
  348. } else {
  349. // 为2要写签 2 卡签都要写 但是要先把卡签确认接口卡 先调用一遍
  350. if(flag.includes(1)){
  351. sure(1)
  352. getObuRenewal()
  353. }
  354. }
  355. })
  356. }
  357. //去连接蓝牙
  358. const toPage = () => {
  359. console.log("flag.length", flag, type)
  360. if (flag.length == 0) {
  361. uni.showToast({
  362. title: '请至少勾选一项',
  363. icon: 'none'
  364. });
  365. } else {
  366. console.log("getCurrentPages()", getCurrentPages())
  367. navTo("/pages/bluetooth/bluetooth?routeType=5"); //去连接蓝牙
  368. }
  369. };
  370. //返回列表
  371. const toBack = () => {
  372. uni.redirectTo({
  373. url: "/pages/service/service"
  374. })
  375. }
  376. //关闭弹窗
  377. const cancel = () => {
  378. state.flag = true;
  379. state.showPopup = false;
  380. uni.navigateTo({
  381. url: `/subpackage/after-sale/deviceInfo/deviceInfo`
  382. })
  383. }
  384. //签续期 请求
  385. const getObuRenewal = () => {
  386. let cmdArray1 = [cmd.HOME_DIRECTORY, cmd.OBU_SYSTEM_FILE, cmd.RANDOM_NUMBER];
  387. tools.showLoadingAlert("正在执行指令");
  388. bluetoothUtil.transCmd(cmdArray1, "20", function(res) {
  389. tools.hideLoadingAlert();
  390. var str = res[2].substring(res[2].length - 4, res[2].length);
  391. if (str == "9000") {
  392. cmdRandNum = res[2].substring(0, res[2].length - 4);
  393. const options = {
  394. type: 2,
  395. data: {
  396. obuId: orderInfos.obuId,
  397. random: cmdRandNum
  398. },
  399. method: "POST",
  400. showLoading: true,
  401. };
  402. requestNew(renewalObu, options).then((res) => {
  403. let datas = res;
  404. console.log("899", datas, datas.data.APDU);
  405. if (datas.data.APDU) {
  406. tools.showLoadingAlert("正在执行指令");
  407. bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
  408. tools.hideLoadingAlert();
  409. console.log("res=====", res, res[0])
  410. let cmdArr = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd
  411. .RANDOM_NUMBER
  412. ];
  413. bluetoothUtil.transCmd(cmdArr, "20", function(res) {
  414. console.log("chelaing======", res)
  415. var str = res[3].substring(res[3].length - 4, res[3]
  416. .length);
  417. if (str == "9000") {
  418. cmdRandNum = res[3].substring(0, res[3].length -
  419. 4);
  420. console.log("0000000000000000000000000")
  421. getFileData((demos) => {
  422. modifyVehicle(demos);
  423. })
  424. } else {
  425. tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
  426. }
  427. })
  428. })
  429. }
  430. })
  431. } else {
  432. tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
  433. }
  434. })
  435. };
  436. //获取fileData
  437. const getFileData = (fun) => {
  438. searchVehicleInfoQuery(orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor,cmdRandNum).then((orderInfo) => {
  439. console.log("orderInfo==",orderInfo,orderInfo.fileData)
  440. fun(orderInfo.fileData);
  441. })
  442. };
  443. /**
  444. * 修改车辆信息 请求
  445. */
  446. const modifyVehicle = (ites) => {
  447. tools.showLoadingAlert("加载中");
  448. console.log('======修改车辆信息======', ites)
  449. let options = {
  450. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  451. data: {
  452. Status: "0",
  453. random: cmdRandNum,
  454. contractSN: orderInfos.obuId,
  455. systemInfo: ites,
  456. orderId: orderInfos.orderId,
  457. result:"9000",
  458. code:'00',
  459. orderNo:""
  460. }, //请求参数
  461. method: "POST", //提交方式(默认POST)
  462. showLoading: true, //是否显示加载中(默认显示)
  463. };
  464. //调用方式
  465. requestNew(changeVehicleInfo, options)
  466. .then((res) => {
  467. tools.hideLoadingAlert();
  468. const datas = res;
  469. console.log("modifyObuVehicleInfo", datas)
  470. tools.showLoadingAlert("正在执行指令");
  471. if (datas.data.APDU) {
  472. bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
  473. console.log('执行指令结果', res)
  474. tools.hideLoadingAlert();
  475. if (res[0] == "9000") {
  476. //再次获取随机数
  477. let cmdArr = [cmd.HOME_DIRECTORY, cmd.RANDOM_NUMBER];
  478. bluetoothUtil.transCmd(cmdArr, '20', function(res) {
  479. var str = res[1].substring(res[1].length - 4, res[1].length);
  480. if (str == "9000") {
  481. cmdRandNum = res[1].substring(0, res[1].length - 4);
  482. getObuActivation();
  483. } else {
  484. tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]);
  485. }
  486. })
  487. }
  488. });
  489. }
  490. })
  491. };
  492. /**
  493. * VFJ-OBU在线激活 请求
  494. */
  495. const getObuActivation = () => {
  496. tools.showLoadingAlert("加载中");
  497. let options = {
  498. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  499. data: {
  500. random: cmdRandNum,
  501. contractSN: obu.obuId,
  502. flag:"0001"
  503. }, //请求参数
  504. method: "POST", //提交方式(默认POST)
  505. showLoading: true, //是否显示加载中(默认显示)
  506. };
  507. //调用方式
  508. requestNew(vfjObuActive, options)
  509. .then((res) => {
  510. tools.hideLoadingAlert();
  511. console.log("在线激活 请求");
  512. console.log(res);
  513. const datas = res;
  514. tools.showLoadingAlert("执行指令");
  515. bluetoothUtil.transCmd([datas.apdu], "20", function (res) {
  516. tools.hideLoadingAlert();
  517. console.log(res);
  518. if (res[0] == "9000") {
  519. console.log("在线激活执行指令88888 请求", res);
  520. cfmActiveRequest(datas.orderNo)
  521. }
  522. });
  523. })
  524. .catch((err) => {
  525. console.log(err);
  526. });
  527. };
  528. // 激活确认
  529. const cfmActiveRequest = (orderNo) => {
  530. tools.showLoadingAlert("加载中");
  531. let options = {
  532. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  533. data: {
  534. orderNo,
  535. result:"9000",
  536. code:"00"
  537. }, //请求参数
  538. method: "POST", //提交方式(默认POST)
  539. showLoading: true, //是否显示加载中(默认显示)
  540. };
  541. //调用方式
  542. requestNew(vfjCfmActive, options)
  543. .then((res) => {
  544. tools.hideLoadingAlert();
  545. console.log("在线激活 确认");
  546. console.log(res);
  547. sure(2)
  548. state.showPopup = true;
  549. })
  550. .catch((err) => {
  551. console.log(err);
  552. });
  553. };
  554. // const getObuActivation = () => {
  555. // console.log('======VFJ-OBU在线激活======')
  556. // tools.showLoadingAlert("加载中");
  557. // let options = {
  558. // type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  559. // data: {
  560. // random: cmdRandNum,
  561. // obuSerailNo: orderInfos.obuId,
  562. // orderId: orderInfos.orderId,
  563. // }, //请求参数
  564. // method: "POST", //提交方式(默认POST)
  565. // showLoading: true, //是否显示加载中(默认显示)
  566. // };
  567. // //调用方式
  568. // requestNew(writeActiveInfo, options)
  569. // .then((res) => {
  570. // tools.hideLoadingAlert();
  571. // console.log("在线激活 请求",res);
  572. // const datas = res;
  573. // tools.showLoadingAlert("执行指令");
  574. // console.log("在线激活 请求==========================", datas, datas.data.APDU);
  575. // bluetoothUtil.transCmd([datas.data.APDU], "20", function(res) {
  576. // tools.hideLoadingAlert();
  577. // console.log("在线激活 请求", res);
  578. // if (res[0] == "9000") {
  579. // sure(2)
  580. // state.showPopup = true;
  581. // }
  582. // });
  583. // })
  584. // .catch((err) => {
  585. // console.log(err);
  586. // });
  587. // };
  588. //获取订单详情
  589. const getOrderDetails = (vehicleId) => {
  590. console.log('======获取订单信息======')
  591. const options = {
  592. type: 2,
  593. data: {
  594. vehicleId
  595. },
  596. method: "POST",
  597. showLoading: true,
  598. };
  599. requestNew(commGetDetail, options).then((res) => {
  600. orderInfo = res;
  601. console.log("orderInfo", orderInfo);
  602. console.log("orderInfores", res);
  603. if (orderInfo) {
  604. fileDataStrings.userType = orderInfo.userType; //用户类型
  605. fileDataStrings.cardId = orderInfo.cardId;
  606. fileDataStrings.packageNum = orderInfo.packageNum;
  607. fileDataStrings.obuId = orderInfo.obuId;
  608. fileDataStrings.customerTel = orderInfo.customerTel;
  609. fileDataStrings.customerId = orderInfo.customerId;
  610. fileDataStrings.orderId = orderInfo.orderId;
  611. let vehicleId = orderInfo.vehiclePlate + "_" + orderInfo.vehiclePlateColor
  612. searchVehicleInfoQuery(vehicleId).then((orderInfo) => {
  613. fileDataStrings.approvedCount = parseInt(orderInfo.approvedCount); //核载人数
  614. fileDataStrings.vehicleVin = orderInfo.vin;
  615. fileDataStrings.vehicleEngineNum = orderInfo.engineNum;
  616. fileDataStrings.axleCount = parseInt(orderInfo.axleCount); //轴数
  617. fileDataStrings.engineNum = orderInfo.engineNum; //发动机
  618. fileDataStrings.type = parseInt(orderInfo.type); //类型
  619. fileDataStrings.vehiclePlate = orderInfo.vehiclePlate; //车牌
  620. fileDataStrings.vehiclePlateColor = orderInfo.vehiclePlateColor; //车牌颜色
  621. console.log("车辆信息", orderInfo)
  622. fileDataStrings.vehicleDimensions = orderInfo.vehicleDimensions;
  623. fileDataStrings.vehicleIdNo = orderInfo.vehicleEngineNum; //车编号
  624. fileDataStrings.vehiclePlateColorStr = getVehiclePlateColor(orderInfo
  625. .vehiclePlateColor);
  626. console.log("fileDataStrings", fileDataStrings);
  627. })
  628. }
  629. });
  630. };
  631. const sure = (val) => {
  632. var data = {}
  633. if (val == 1) {
  634. data = {
  635. type: "1",
  636. cardId: fileDataStrings.cardId,
  637. vehicleId:orderInfos.vehicleId
  638. }
  639. } else {
  640. data = {
  641. type: "2",
  642. obuId: fileDataStrings.obuId,
  643. vehicleId:orderInfos.vehicleId
  644. }
  645. }
  646. const options = {
  647. type: 2,
  648. data: data,
  649. method: "POST",
  650. showLoading: true,
  651. };
  652. requestNew(cardRenewalConfirm, options).then((res) => {
  653. })
  654. }
  655. </script>
  656. <style>
  657. page {
  658. width: 100%;
  659. height: 100%;
  660. background-color: #fff;
  661. }
  662. </style>
  663. <style lang="scss" scoped>
  664. .mask {
  665. background: rgba(0, 0, 0, .35);
  666. position: fixed;
  667. left: 0;
  668. top: 0;
  669. bottom: 0;
  670. right: 0;
  671. }
  672. .main {
  673. width: 560rpx;
  674. padding: 25rpx 20rpx 55rpx;
  675. text-align: center;
  676. background: #fff;
  677. position: absolute;
  678. left: 50%;
  679. top: 50%;
  680. transform: translate(-50%, -50%);
  681. border-radius: 20rpx;
  682. .top {
  683. text-align: right;
  684. .icon-close {
  685. width: 48rpx;
  686. height: 48rpx;
  687. }
  688. }
  689. .icon-success {
  690. width: 500rpx;
  691. height: 320rpx;
  692. margin-top: 22rpx;
  693. }
  694. .title {
  695. color: #333333;
  696. font-size: 40rpx;
  697. font-weight: 600;
  698. text-align: center;
  699. margin-top: 55rpx;
  700. }
  701. }
  702. .selectCar-box {
  703. // width: 100%;
  704. // height: 100%;
  705. padding: 30rpx;
  706. .title {
  707. font-size: 30rpx;
  708. font-family: Microsoft YaHei UI;
  709. font-weight: 400;
  710. color: #333333;
  711. margin-bottom: 30rpx;
  712. }
  713. .details {
  714. .title {
  715. font-size: 30rpx;
  716. font-family: Microsoft YaHei UI;
  717. font-weight: 400;
  718. color: #333333;
  719. margin-bottom: 30rpx;
  720. }
  721. .details-item {
  722. display: flex;
  723. font-size: 26rpx;
  724. font-family: Noto Sans S Chinese;
  725. font-weight: 400;
  726. color: #999999;
  727. margin-bottom: 30rpx;
  728. text {
  729. font-size: 26rpx;
  730. font-family: Noto Sans S Chinese;
  731. font-weight: 400;
  732. color: #333333;
  733. }
  734. }
  735. }
  736. .card {
  737. height: 150rpx;
  738. background: #ffffff;
  739. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  740. border-radius: 20rpx;
  741. padding: 30rpx;
  742. display: flex;
  743. justify-content: space-between;
  744. align-items: center;
  745. margin-bottom: 60rpx;
  746. .card-left {
  747. display: flex;
  748. align-items: center;
  749. image {
  750. width: 100rpx;
  751. height: 90rpx;
  752. }
  753. .card-center {
  754. margin-left: 30rpx;
  755. .card-center-head {
  756. font-size: 32rpx;
  757. font-family: Noto Sans S Chinese;
  758. font-weight: 400;
  759. color: #333333;
  760. }
  761. .tips {
  762. font-size: 26rpx;
  763. font-family: Noto Sans S Chinese;
  764. font-weight: 400;
  765. color: #666666;
  766. .tips-card {
  767. width: 70rpx;
  768. height: 40rpx;
  769. background: #d3f2ef;
  770. border-radius: 6rpx;
  771. font-size: 20rpx;
  772. font-family: Noto Sans S Chinese;
  773. font-weight: 400;
  774. color: #0a8f8a;
  775. padding: 5rpx 10rpx;
  776. margin-left: 20rpx;
  777. }
  778. }
  779. }
  780. }
  781. .choose-item1 {
  782. margin-right: 20rpx;
  783. /* width: 50rpx; */
  784. // height: 50rpx;
  785. /* border: 1rpx solid #00B38B; */
  786. border-radius: 50%;
  787. // display: flex;
  788. // justify-content: center;
  789. // align-items: center;
  790. font-size: 25rpx;
  791. // align-self: end;
  792. .active {
  793. width: 38rpx;
  794. height: 38rpx;
  795. background: #00b38b;
  796. border-radius: 50%;
  797. }
  798. }
  799. .choose-item {
  800. margin-right: 20rpx;
  801. width: 50rpx;
  802. height: 50rpx;
  803. border: 1rpx solid #00B38B;
  804. border-radius: 50%;
  805. display: flex;
  806. justify-content: center;
  807. align-items: center;
  808. .active {
  809. width: 38rpx;
  810. height: 38rpx;
  811. background: #00B38B;
  812. border-radius: 50%;
  813. }
  814. }
  815. }
  816. .remark {
  817. font-size: 26rpx;
  818. font-family: Microsoft YaHei UI;
  819. font-weight: 400;
  820. color: #666666;
  821. text-indent: 30rpx;
  822. margin-bottom: 30rpx;
  823. }
  824. .submit {
  825. margin-top: 100rpx;
  826. width: 670rpx;
  827. height: 80rpx;
  828. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  829. border-radius: 40rpx;
  830. font-size: 32rpx;
  831. font-family: Noto Sans S Chinese;
  832. font-weight: 400;
  833. color: #ffffff;
  834. line-height: 80rpx;
  835. }
  836. }
  837. </style>