Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

upgrade-confirm.vue 22KB

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