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.

renewal-confirm.vue 22KB

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