Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

upgrade-confirm.vue 21KB

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