Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
2 роки тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
2 роки тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
2 роки тому
1 рік тому
1 рік тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. <template>
  2. <view class="picture-wrapper" @click="cardFileImageUpdate('1')">
  3. <view class="bg">
  4. <view class="">
  5. <view class="name"> 行驶证主页 </view>
  6. <view class="value"> 上传行驶证的主页 </view>
  7. <view class="tip">
  8. <view class="tip-value"> 拍摄规范 </view>
  9. </view>
  10. </view>
  11. <image v-if="!form.licenseFrontUrl" class="icon" :src="`${$imgUrl}applyCard/car-zhu.png`">
  12. </image>
  13. <image v-else class="icon" :src="strReplace(form.licenseFrontUrl)"></image>
  14. </view>
  15. </view>
  16. <view class="picture-wrapper" @click="cardFileImageUpdate('2')">
  17. <view class="bg">
  18. <view class="">
  19. <view class="name"> 行驶证副页 </view>
  20. <view class="value"> 上传行驶证的副页 </view>
  21. <view class="tip">
  22. <view class="tip-value"> 拍摄规范 </view>
  23. </view>
  24. </view>
  25. <image v-if="!form.licenseReverseUrl" class="icon" :src="`${$imgUrl}applyCard/car-fu.png`">
  26. </image>
  27. <image v-else class="icon" :src="strReplace(form.licenseReverseUrl)"></image>
  28. </view>
  29. </view>
  30. <view class="upload-box">
  31. <u-form :model="form" ref="myForm" :error-type="errorType">
  32. <view class="from">
  33. <view class="title"> 请填写注销原因 </view>
  34. <u-form-item prop="remark">
  35. <view class="from_item">
  36. <text><text style="color: red"></text>注销原因:</text>
  37. <view style="display: flex">
  38. <u-input v-model="form.ReasonCancellation" @click="showPicker()" class="input" disabled
  39. placeholder="请选择" />
  40. <u-icon name="arrow-right" style="margin-left: 10px;display: flex;"></u-icon>
  41. </view>
  42. </view>
  43. </u-form-item>
  44. </view>
  45. </u-form>
  46. <view v-if="form.cancelList">
  47. <view class="message">退款信息</view>
  48. <view class="list-item">
  49. <view><text>姓名:</text><text>{{form.cancelList.cusName}}</text></view>
  50. <view><text>开户行:</text><text>{{form.array[form.cancelList.bankType]}}</text></view>
  51. <view><text>开户行支行:</text><text>{{form.cancelList.branchName}}</text></view>
  52. <view><text>银行卡号:</text><text>{{form.cancelList.bankCardId}}</text></view>
  53. <view class="change">
  54. <view @click="next()">去修改</view>
  55. </view>
  56. </view>
  57. </view>
  58. <button class="submit" @click="next()" v-if="form.isShow">下一步</button>
  59. <button class="submit" @click="toPage()" v-else>注销</button>
  60. <view>
  61. <!-- 原因 -->
  62. <u-select v-model="show" mode="single-column" :list="list" @confirm="confirm"></u-select>
  63. </view>
  64. </view>
  65. </template>
  66. <script lang="ts" setup>
  67. import {
  68. reactive,
  69. ref
  70. } from "vue";
  71. import {
  72. onLoad,
  73. onShow,
  74. onUnload,
  75. onReady,
  76. } from "@dcloudio/uni-app";
  77. import {
  78. navTo,
  79. checkStr,
  80. msg, strReplace, uploadFile
  81. } from "@/utils/utils";
  82. import {
  83. request
  84. } from "@/utils/network/request.js";
  85. import {
  86. writeCardBack,
  87. CardSignCancellation,
  88. confirmSignCancellation, etcCarOcrCard
  89. } from "@/utils/network/api.js";
  90. import {
  91. stringToJson
  92. } from "@/utils/network/encryption.js";
  93. const bluetoothUtil = require("../../../static/etcUtil/index.js");
  94. import { getItem } from "@/utils/storage";
  95. // 表单数据
  96. const form = reactive({
  97. userType: "",
  98. obuId: '',
  99. cardId: '',
  100. orderId: '',
  101. ReasonCancellation: "",
  102. equipmentState: '',
  103. licenseFrontUrl: "", //行驶证正面
  104. licenseReverseUrl: "",//行驶证反面
  105. customerIdnum: "",
  106. mobile: "",
  107. isShow: true,//储值卡要去下一步填写信息,记账卡直接注销
  108. cancelList: "",
  109. array: ['贵阳银行股份有限公司', '中国工商银行股份有限公司', '中国建设银行股份有限公司', '中国银行股份有限公司', '中国农业银行股份有限公司', '中国交通银行股份有限公司',
  110. '兴业银行股份有限公司', '平安银行股份有限公司', '中国邮政储蓄银行股份有限公司', '中国光大银行股份有限公司', '贵州银行股份有限公司', '中国民生银行股份有限公司',
  111. '招商银行股份有限公司', '.农村信用社联合社', '农村商业银行'],
  112. });
  113. const list = reactive([]);
  114. // 验证提示类型(toast要版本为1.3.5才支持)
  115. const errorType = ["border-bottom", "toast"];
  116. // 设置验证规则
  117. const myForm = ref(null);
  118. onReady(() => {
  119. });
  120. onShow(() => {
  121. uni.$once('list', (query) => {
  122. console.log("111", query)
  123. form.cancelList = query.item
  124. form.isShow = false
  125. })
  126. })
  127. onLoad((option) => {
  128. let options = JSON.parse(decodeURIComponent(option.params))
  129. form.obuId = options.obuId;
  130. form.cardId = options.cardId;
  131. // form.cardId = "52011640220209453221";
  132. form.orderId = options.orderId
  133. form.equipmentState = options.equipmentState
  134. form.mobile = options.mobile
  135. form.customerIdnum = options.customerIdnum
  136. form.userType = options.userType
  137. if (form.cardId) {
  138. if (form.cardId.substring(8, 10) == "22") {
  139. form.isShow = true
  140. } else {
  141. form.isShow = false
  142. }
  143. }
  144. console.log("options.orderId", options, getItem('key')['LOGOFF'], "52011328220201990787".substring(8, 10))
  145. // 获取注销原因
  146. for (var k = 0; k < getItem('key')['LOGOFF'].length; k++) {
  147. var obj = {};
  148. obj['value'] = getItem('key')['LOGOFF'][k]['name']
  149. obj['label'] = getItem('key')['LOGOFF'][k]['name']
  150. list.push(obj)
  151. }
  152. console.log("list", list)
  153. /*监听蓝牙回调*/
  154. uni.$on('bluetoothLink', function (status) {
  155. queryCardSignCancellation(1, 1, 1).then((item : any) => {
  156. console.log("item========", item)
  157. instructAction(item).then(value => {
  158. console.log('orderStatus=======', value.orderStatus)
  159. })
  160. })
  161. })
  162. });
  163. onUnload(() => {
  164. /*移除监听*/
  165. uni.$off('bluetoothLink')
  166. });
  167. const show = ref(false);
  168. const showPicker = function () {
  169. show.value = true;
  170. };
  171. // 选择物流
  172. const confirm = (e) => {
  173. console.log(e);
  174. form.ReasonCancellation = e[0].value;
  175. };
  176. const toPage = () => {
  177. //参数说明
  178. let options = {};
  179. if (form.equipmentState === '1') {
  180. navTo("/pages/bluetooth/bluetooth?routeType=5");
  181. } else {
  182. queryCardSignCancellation(2, 2, 0).then((item : any) => {
  183. navTo("/subpackage/after-sale/ETC-log-off/log-off-result");
  184. })
  185. }
  186. };
  187. /*指令返回*/
  188. const instructAction = (data) => {
  189. let cmdArr = data.command.split(",");
  190. console.log("cmdArr=========", cmdArr);
  191. bluetoothUtil.transCmd(cmdArr, "10", function (res) {
  192. console.log("透传");
  193. console.log(res);
  194. var arraylenth = res.length;
  195. var status = res[arraylenth - 1].substring(
  196. res[arraylenth - 1].length - 4,
  197. res[arraylenth - 1].length
  198. );
  199. console.log("打印指令状态");
  200. console.log(status);
  201. var formes = {
  202. command: data.command,
  203. response: res.toString(),
  204. cosRecordId: data.cosRecordId,
  205. cardId: form.cardId,
  206. cosType: 9 //1- 开卡. 2- 修改卡内信息 4- 卡签绑定 9- 销卡
  207. };
  208. const options = {
  209. type: 2,
  210. data: formes,
  211. method: "POST",
  212. showLoading: true,
  213. };
  214. return new Promise(async (resolve, reject) => {
  215. const res = await request(writeCardBack, options);
  216. const data = stringToJson(res.bizContent);
  217. console.log('data--------------', data)
  218. if (status === "9000") {
  219. if (data.orderStatus === 1) {
  220. instructAction(data)
  221. } else {
  222. navTo("/subpackage/after-sale/ETC-log-off/log-off-result");
  223. }
  224. resolve(data);
  225. } else {
  226. reject("指令执行失败!");
  227. }
  228. }).catch((error) => {
  229. console.log('指令执行失败', error)
  230. reject(error);
  231. });
  232. });
  233. };
  234. //注销申请
  235. const queryCardSignCancellation = (hasCard, hasObu, cosProvider) => {
  236. if (!form.licenseFrontUrl) {
  237. msg("请上传行驶证的主页");
  238. return;
  239. }
  240. if (!form.licenseReverseUrl) {
  241. msg("请上传行驶证的副页");
  242. return;
  243. }
  244. if (!form.ReasonCancellation) {
  245. msg("请选择注销原因");
  246. return;
  247. }
  248. if (form.orderId) {
  249. var options = {
  250. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  251. data: {
  252. hasCard: hasCard,
  253. hasObu: hasObu,
  254. cosProvider: cosProvider,
  255. cardId: form.cardId, //卡号
  256. obuId: form.obuId, //签号
  257. serviceType: 3, //注销类型 1-卡注销,2-签注销,3-卡签注销
  258. orderId: form.orderId, //订单编号
  259. signReason: form.ReasonCancellation,
  260. licenseFrontUrl: form.licenseFrontUrl,
  261. licenseReverseUrl: form.licenseReverseUrl,
  262. }, //请求参数
  263. method: "POST", //提交方式(默认POST)
  264. showLoading: true, //是否显示加载中(默认显示)
  265. };
  266. } else {
  267. var options = {
  268. type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
  269. data: {
  270. hasCard: hasCard,
  271. hasObu: hasObu,
  272. cosProvider: cosProvider,
  273. cardId: form.cardId, //卡号
  274. obuId: form.obuId, //签号
  275. serviceType: 3, //注销类型 1-卡注销,2-签注销,3-卡签注销
  276. signReason: form.ReasonCancellation,
  277. licenseFrontUrl: form.licenseFrontUrl,
  278. licenseReverseUrl: form.licenseReverseUrl,
  279. }, //请求参数
  280. method: "POST", //提交方式(默认POST)
  281. showLoading: true, //是否显示加载中(默认显示)
  282. };
  283. }
  284. console.log("options", options)
  285. return new Promise(async (resolve, reject) => {
  286. const res = await request(CardSignCancellation, options);
  287. const data = stringToJson(res.bizContent);
  288. console.log("注销申请此接口可能有问题", data)
  289. resolve(data);
  290. }).catch((error) => {
  291. reject(error);
  292. });
  293. }
  294. //行驶证图片上传 val 1 正面 2 反面
  295. const cardFileImageUpdate = (val) => {
  296. uni.chooseImage({
  297. count: 1, //只能选取一张照片
  298. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  299. sourceType: ["camera", "album"], //从相册选择
  300. success: function (res) {
  301. uploadFile(res.tempFilePaths[0], val, etcCarOcrCard).then((data) => {
  302. console.log("data", data)
  303. if (val == 1) {
  304. form.licenseFrontUrl = data.imageUrl;
  305. } else {
  306. form.licenseReverseUrl = data.imageUrl;
  307. }
  308. })
  309. },
  310. });
  311. };
  312. const next = () => {
  313. if (!form.licenseFrontUrl) {
  314. msg("请上传行驶证的主页");
  315. return;
  316. }
  317. if (!form.licenseReverseUrl) {
  318. msg("请上传行驶证的副页");
  319. return;
  320. }
  321. if (!form.ReasonCancellation) {
  322. msg("请选择注销原因");
  323. return;
  324. }
  325. navTo(`/subpackage/after-sale/ETC-log-off/refund-information-list?mobile=${form.mobile}&&customerIdnum=${form.customerIdnum}&&userType=${form.userType}`);
  326. }
  327. </script>
  328. <style>
  329. page {
  330. width: 100%;
  331. height: 100%;
  332. background-color: #EEF7F7;
  333. }
  334. </style>
  335. <style lang="scss" scoped>
  336. .upload-box {
  337. width: 92%;
  338. margin: 30rpx auto;
  339. .head-tips {
  340. text-indent: 2rem;
  341. font-size: 26rpx;
  342. font-family: Microsoft YaHei;
  343. font-weight: 400;
  344. color: #666666;
  345. line-height: 50rpx;
  346. margin-bottom: 45rpx;
  347. text {
  348. color: #ff8000;
  349. }
  350. }
  351. .upload-card {
  352. margin-bottom: 70rpx;
  353. height: 260rpx;
  354. background: #ffffff;
  355. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  356. border-radius: 20rpx;
  357. padding: 30rpx;
  358. display: flex;
  359. justify-content: space-between;
  360. .card-left {
  361. .item1 {
  362. font-size: 34rpx;
  363. font-family: Microsoft YaHei;
  364. font-weight: 400;
  365. color: #000000;
  366. margin-bottom: 30rpx;
  367. }
  368. .item2 {
  369. font-size: 24rpx;
  370. font-family: Microsoft YaHei;
  371. font-weight: 400;
  372. color: #999999;
  373. margin-bottom: 30rpx;
  374. }
  375. .item3 {
  376. width: 110rpx;
  377. height: 40rpx;
  378. background: #ecfbf8;
  379. border-radius: 6rpx;
  380. font-size: 20rpx;
  381. font-family: Microsoft YaHei;
  382. font-weight: 400;
  383. text-align: center;
  384. line-height: 40rpx;
  385. color: #0a8f8a;
  386. }
  387. }
  388. image {
  389. width: 295rpx;
  390. height: 188rpx;
  391. }
  392. }
  393. .from {
  394. background-color: #fff;
  395. margin-top: 30rpx;
  396. border-radius: 20rpx;
  397. padding: 10rpx 20rpx;
  398. box-sizing: border-box;
  399. ::v-deep .u-form-item {
  400. padding: 0;
  401. line-height: normal;
  402. .u-form-item__message {
  403. margin-bottom: 12rpx;
  404. }
  405. }
  406. .title {
  407. font-size: 30rpx;
  408. font-family: Microsoft YaHei;
  409. font-weight: 400;
  410. color: #000000;
  411. margin: 38rpx 0;
  412. }
  413. .from_item {
  414. display: flex;
  415. flex-wrap: nowrap;
  416. justify-content: space-between;
  417. align-items: center;
  418. height: 80rpx;
  419. border-bottom: 1rpx solid #dcdcdc;
  420. ::v-deep .input {
  421. text-align: right;
  422. flex: 1;
  423. input {
  424. text-align: right;
  425. }
  426. }
  427. }
  428. .from_item1 {
  429. display: flex;
  430. flex-wrap: nowrap;
  431. flex-direction: column;
  432. justify-content: space-between;
  433. padding: 30rpx;
  434. border-bottom: #dcdcdc 1px solid;
  435. input {
  436. text-align: right;
  437. }
  438. .textarea {
  439. background-color: #f1f1f1;
  440. width: 100%;
  441. border-radius: 20rpx;
  442. margin-top: 10rpx;
  443. text-indent: 1rem;
  444. height: 180rpx;
  445. padding: 20rpx;
  446. box-sizing: border-box;
  447. }
  448. }
  449. }
  450. .submit {
  451. height: 80rpx;
  452. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  453. border-radius: 40rpx;
  454. font-size: 32rpx;
  455. font-family: Microsoft YaHei;
  456. font-weight: 400;
  457. color: #ffffff;
  458. line-height: 80rpx;
  459. margin: 60rpx auto;
  460. }
  461. }
  462. .picture-wrapper {
  463. width: 92%;
  464. margin: 0 auto;
  465. margin-top: 40rpx;
  466. .bg {
  467. background: #ffffff;
  468. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  469. border-radius: 20rpx;
  470. padding: 40rpx;
  471. display: flex;
  472. justify-content: space-between;
  473. .name {
  474. font-size: 34rpx;
  475. font-family: Microsoft YaHei;
  476. font-weight: 400;
  477. color: #000000;
  478. line-height: 34rpx;
  479. }
  480. .value {
  481. margin-top: 20rpx;
  482. font-size: 24rpx;
  483. font-family: Microsoft YaHei;
  484. font-weight: 400;
  485. color: #999999;
  486. line-height: 24rpx;
  487. }
  488. .tip {
  489. margin-top: 20rpx;
  490. text-align: center;
  491. width: 110rpx;
  492. height: 40rpx;
  493. background: rgba(33, 190, 177, 0.2);
  494. border-radius: 6rpx;
  495. .tip-value {
  496. font-size: 20rpx;
  497. font-family: Microsoft YaHei;
  498. font-weight: 400;
  499. color: #0a8f8a;
  500. line-height: 40rpx;
  501. opacity: 1;
  502. }
  503. }
  504. }
  505. .icon {
  506. width: 294rpx;
  507. height: 188rpx;
  508. }
  509. }
  510. .list-item {
  511. width: 100%;
  512. border-radius: 10rpx;
  513. margin: 0 auto;
  514. font-size: 28rpx;
  515. border: 1rpx solid #ccc;
  516. padding: 12rpx;
  517. box-sizing: border-box;
  518. background-color: white;
  519. margin-bottom: 28rpx;
  520. }
  521. .message {
  522. font-size: 32rpx;
  523. margin: 40rpx 0 20rpx 0;
  524. font-weight: bold;
  525. }
  526. .change {
  527. display: flex;
  528. text-align: center;
  529. justify-content: flex-end;
  530. width: 100%;
  531. }
  532. .change>view {
  533. height: 60rpx;
  534. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  535. border-radius: 40rpx;
  536. font-size: 32rpx;
  537. font-family: Microsoft YaHei;
  538. color: #ffffff;
  539. line-height: 60rpx;
  540. width: 25%;
  541. }
  542. </style>