選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

etc-activation.vue 23KB

3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
2週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
2週間前
3週間前
2週間前
3週間前
2週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
2週間前
3週間前
2週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
2週間前
2週間前
3週間前
3週間前
3週間前
1週間前
3週間前
1週間前
3週間前
2週間前
1週間前
1週間前
1週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
3週間前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950
  1. <template>
  2. <view class="container">
  3. <!-- 主要内容 -->
  4. <view class="content">
  5. <!-- 基本信息 -->
  6. <view class="info-section">
  7. <view class="section-title">基本信息</view>
  8. <!-- 激活类型选择 -->
  9. <view class="activation-type">
  10. <view
  11. :class="['type-item', { active: activationType === 'self' }]"
  12. @click="changeActivationType('self')"
  13. >
  14. 本人激活
  15. </view>
  16. <view
  17. :class="['type-item', { active: activationType === 'other' }]"
  18. @click="changeActivationType('other')"
  19. >
  20. 非本人激活
  21. </view>
  22. </view>
  23. <!-- 表单字段 -->
  24. <view v-if="activationType === 'other'" class="form-item car-number-row">
  25. <view class="form-label">车牌号</view>
  26. <car-number-input
  27. v-model="formData.carNumber"
  28. @numberInputResult="carNumberInputResult"
  29. inputColor="#ECF1F4"
  30. style="width: 100%;"
  31. />
  32. </view>
  33. <view v-else class="form-item">
  34. <view class="form-label">车牌号</view>
  35. <view class="form-input">
  36. <picker
  37. class="picker-disabled--test"
  38. @change="bindPickerChange"
  39. :value="formData.vehicleIndex"
  40. :range="vehicles"
  41. range-key="vehiclePlate">
  42. <view class="uni-input">
  43. <view class="text">{{vehicles[formData.vehicleIndex]? vehicles[formData.vehicleIndex].vehiclePlate : '请选择车牌号'}}</view>
  44. <view class="arrow-down">▼</view>
  45. </view>
  46. <!-- <view class="uni-input">{{vehicles[formData.vehicleIndex]?.vehiclePlate}}</view> -->
  47. </picker>
  48. </view>
  49. </view>
  50. <view class="form-item">
  51. <view class="form-label">车牌颜色</view>
  52. <view class="form-input">
  53. <picker
  54. class="picker-disabled--test"
  55. :disabled="activationType == 'self'"
  56. @change="bindColorPickerChange"
  57. :value="formData.colorIndex"
  58. :range="getDicWithType('VEHICLE_COLOR_TYPE')"
  59. range-key="name">
  60. <view class="uni-input">
  61. <view class="text">{{formData.colorName ? formData.colorName : '请选择车辆颜色'}}</view>
  62. <view class="arrow-down">▼</view>
  63. </view>
  64. <!-- <view class="uni-input">{{vehicles[formData.vehicleIndex]?.vehiclePlate}}</view> -->
  65. </picker>
  66. </view>
  67. </view>
  68. <!-- <view class="form-input" >
  69. <view class="uni-list-cell-db">
  70. <picker class="picker-selector--test" @change="bindPickerChange" :value="formData.vehicleIndex" :range="vehicles" range-key="name">
  71. <view class="uni-input picker-selector--value">{{vehicles[formData.vehicleIndex]}}</view>
  72. </picker>
  73. </view>
  74. </view> -->
  75. <!-- </view> -->
  76. <!-- <view class="form-item">
  77. <view class="form-label">车牌颜色</view>
  78. <view class="form-input" @click="selectCarColor">
  79. <text :class="['input-text', { placeholder: !formData.carColor }]">
  80. {{ formData.carColor || '请选择车牌颜色' }}
  81. </text>
  82. <view class="arrow-down">▼</view>
  83. </view>
  84. </view> -->
  85. <view class="form-item">
  86. <view class="form-label">申请手机号</view>
  87. <input
  88. class="form-input-text"
  89. placeholder="请输入手机号码"
  90. v-model="formData.phoneNumber"
  91. disabled="true"
  92. type="number"
  93. maxlength="11"
  94. />
  95. </view>
  96. <!-- 非本人激活时显示验证码 -->
  97. <view v-if="activationType === 'other'" class="form-item">
  98. <view class="form-label">短信验证码</view>
  99. <view class="form-input" style="display:flex;align-items:center;">
  100. <input
  101. class="form-input-text"
  102. placeholder="请输入验证码"
  103. v-model="formData.smsCode"
  104. maxlength="6"
  105. style="flex:1;"
  106. />
  107. <button class="send-code-btn" @click="sendCode" :disabled="waitTime>0">
  108. {{ waitTime > 0 ? waitTime + 's后重试' : '发送验证码' }}
  109. </button>
  110. </view>
  111. </view>
  112. </view>
  113. <!-- 上传照片 -->
  114. <view class="upload-section" v-if="formData.activeType == '2'">
  115. <view class="section-title">上传照片</view>
  116. <view class="picture-wrapper" @click="cardFileImageUpdate(100)">
  117. <view class="bg">
  118. <view class="">
  119. <view class="name"> 行驶证主页 </view>
  120. <view class="value"> 上传行驶证的主页 </view>
  121. <view class="tip">
  122. <view class="tip-value"> 拍摄规范 </view>
  123. </view>
  124. </view>
  125. <image v-if="!formData.vehPosImgUrlName" class="icon" :src="`${$imgUrl}issuance/xz.png`"
  126. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  127. </image>
  128. <image v-else class="icon" :src="formData.vehPosImgUrlName"
  129. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  130. </view>
  131. </view>
  132. <view class="picture-wrapper" @click="cardFileImageUpdate(101)">
  133. <view class="bg">
  134. <view class="">
  135. <view class="name"> 行驶证副页 </view>
  136. <view class="value"> 上传行驶证的副页 </view>
  137. <view class="tip">
  138. <view class="tip-value"> 拍摄规范 </view>
  139. </view>
  140. </view>
  141. <image v-if="!formData.vehNegImgUrlName" class="icon" :src="`${$imgUrl}issuance/xf.png`"
  142. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  143. </image>
  144. <image v-else class="icon" :src="imgPathMontage(formData.vehNegImgUrlName)"
  145. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  146. </view>
  147. </view>
  148. <view class="picture-wrapper" @click="cardFileImageUpdate(102)">
  149. <view class="bg">
  150. <view class="">
  151. <view class="name"> 上传激活车辆45度照 </view>
  152. <view class="value"> 上传车辆45度角照片 </view>
  153. <view class="tip">
  154. <view class="tip-value"> 拍摄规范 </view>
  155. </view>
  156. </view>
  157. <image v-if="!formData.vehBodyUrl" class="icon" :src="`${$imgUrl}issuance/chetou.png`"
  158. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  159. </image>
  160. <image v-else class="icon" :src="imgPathMontage(formData.vehBodyUrlName)"
  161. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  162. </view>
  163. </view>
  164. <view class="picture-wrapper" @click="cardFileImageUpdate(103)">
  165. <view class="bg">
  166. <view class="">
  167. <view class="name"> 上传ETC设备安装照 </view>
  168. <view class="value"> 上传ETC设备安装位置照片 </view>
  169. <view class="tip">
  170. <view class="tip-value"> 拍摄规范 </view>
  171. </view>
  172. </view>
  173. <image v-if="!formData.deviceImageUrl" class="icon" :src="``"
  174. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  175. </image>
  176. <image v-else class="icon" :src="imgPathMontage(formData.deviceImageName)"
  177. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. <!-- 底部按钮 -->
  183. <view class="bottom-button" @click="nextStep">
  184. 下一步
  185. </view>
  186. </view>
  187. </template>
  188. <script setup lang="ts">
  189. import { ref, reactive, onMounted, onUnmounted } from 'vue'
  190. import { onLoad } from '@dcloudio/uni-app'
  191. import carNumberInput from './components/car-number-input.vue'
  192. import { requestNew } from "@/utils/network/request.js";
  193. import {
  194. queryVehicle, sendMessage, vehicCharge
  195. } from "@/utils/network/api.js";
  196. import {
  197. getCodeName, getDicWithType
  198. } from "@/datas/queryKey.js";
  199. import { msg, strReplace, imgPathMontage, hasLogin, uploadFile, compressImage, chooseImageCompress, navTo } from "@/utils/utils";
  200. import uploadImg from '@/components/uploadOcr';
  201. import useOrderSkip from "@/composables/order/useOrderSkip";
  202. import { setItem,getItem } from "@/utils/storage";
  203. //办理订单按钮跳转业务逻辑
  204. const {
  205. gotoCancelOrder,
  206. gotoEditUserOrUnitInfo,
  207. gotoConfirmReceipt,
  208. gotoCheckLogistics,
  209. gotoEvaluateProduct,
  210. gotoActiveOrder,
  211. gotoPay,
  212. gotoReturnOrder,
  213. gotoExchangeOrder,
  214. gotoOrderDetailsPay,
  215. gotoOrderDetails,
  216. gotoAgainUseOrder,
  217. gotoOrderSign,
  218. closeOrder,
  219. gotoReplenishmentOrder,
  220. gotoAddressOrder,
  221. placeAnOrder,
  222. gotoEditAddressNew
  223. } = useOrderSkip();
  224. // 响应式数据
  225. const statusBarHeight = ref(0)
  226. const barHeight = ref(0)
  227. const activationType = ref('self') // 'self' 本人激活, 'other' 非本人激活
  228. const waitTime = ref(0)
  229. let timer: any = null
  230. const formData = reactive({
  231. vehicleType: '',
  232. carNumber: '',
  233. vehicleIndex: '',
  234. vehiclePlate: '',
  235. colorCode: '',
  236. colorIndex: '',
  237. colorName: '',
  238. carColor: '',
  239. phoneNumber: '',
  240. vehPosImgUrl: '',
  241. vehPosImgUrlName: '',
  242. vehNegImgUrl: '',
  243. vehNegImgUrlName: '',
  244. vehBodyUrl: '',
  245. vehBodyUrlName: '',
  246. deviceImageUrl: '',
  247. deviceImageName: '',
  248. smsCode: '',
  249. activeType: '',
  250. orderId: '',
  251. orderNo: '',
  252. cardId: '',
  253. obuId: ''
  254. })
  255. const reset = () => {
  256. Object.assign(formData, {
  257. carNumber: '',
  258. vehicleIndex: '',
  259. vehiclePlate: '',
  260. colorCode: '',
  261. colorIndex: '',
  262. colorName: '',
  263. carColor: '',
  264. phoneNumber: '',
  265. vehPosImgUrl: '',
  266. vehPosImgUrlName: '',
  267. vehNegImgUrl: '',
  268. vehNegImgUrlName: '',
  269. vehBodyUrl: '',
  270. vehBodyUrlName: '',
  271. deviceImageUrl: '',
  272. deviceImageName: '',
  273. smsCode: '',
  274. activeType: ''
  275. })
  276. }
  277. const changeActivationType = (type:string) => {
  278. if(activationType.value != type) {
  279. activationType.value = type;
  280. }
  281. reset();
  282. }
  283. // 页面加载
  284. onLoad(() => {
  285. getSystemInfo()
  286. queryVehicleData();
  287. })
  288. const close = (e) => {
  289. console.log("e", e)
  290. isTakePhotoModeShow.value = e
  291. }
  292. const isTakePhotoModeShow = ref(false);
  293. const choiceIndex = ref('');
  294. const takePhotoMode = (index) => {
  295. console.log("index", index)
  296. isTakePhotoModeShow.value = true
  297. choiceIndex.value = index
  298. }
  299. const vehiclesShow = ref(true);
  300. const vehicles = ref([]);
  301. const queryVehicleData = (vehicleId) => {
  302. let data = {
  303. vehicleId: ''
  304. }
  305. if(vehicleId) {
  306. data.vehicleId = vehicleId;
  307. }
  308. const options = {
  309. type: 2,
  310. method: "POST",
  311. data,
  312. showLoading: true,
  313. }
  314. requestNew('/iaw/active/queryVehicle', options).then(res => {
  315. vehicles.value = res.modelList;
  316. if(vehicleId) {
  317. let vehicle = res.modelList[0];
  318. formData.phoneNumber = vehicle.mobile;
  319. formData.activeType = vehicle.activeType;
  320. formData.orderId = vehicle.orderId;
  321. formData.orderNo = vehicle.orderNo;
  322. formData.vehicleType = vehicle.vehicleType;
  323. formData.cardId = vehicle.cardId;
  324. formData.obuId = vehicle.obuId;
  325. }
  326. })
  327. }
  328. //车头照图片上传 val 100行驶证证明 101行驶证反面 102车头照 103
  329. const cardFileImageUpdate = (val) => {
  330. uni.chooseImage({
  331. count: 1, //只能选取一张照片
  332. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  333. sourceType: ["camera", "album"], //从相册选择
  334. success: function (res) {
  335. uploadFile(res.tempFilePaths[0], val).then((data : any) => {
  336. if (val == 100) {
  337. formData.vehPosImgUrl = data.imageUrl;
  338. formData.vehPosImgUrlName = res.tempFilePaths[0];
  339. } else if (val == 101) {
  340. formData.vehNegImgUrl = data.imageUrl;
  341. formData.vehNegImgUrlName = res.tempFilePaths[0];
  342. } else if (val == 102){
  343. formData.vehBodyUrl = data.imageUrl;
  344. formData.vehBodyUrlName = res.tempFilePaths[0];
  345. } else {
  346. formData.deviceImageUrl = data.imageUrl;
  347. formData.deviceImageName = res.tempFilePaths[0];
  348. }
  349. })
  350. },
  351. });
  352. };
  353. const bindPickerChange = (e) => {
  354. console.log('picker发送选择改变,携带值为:' + e.detail.value)
  355. let index = e.detail.value;
  356. formData.vehicleIndex = index;
  357. let vehicle = vehicles.value[index];
  358. formData.vehiclePlate = vehicle.vehiclePlate;
  359. formData.colorCode = vehicle.vehiclePlateColor;
  360. formData.activeType = vehicle.activeType;
  361. formData.vehicleType = vehicle.vehicleType;
  362. const colorItem = getDicWithType('VEHICLE_COLOR_TYPE').find(item => item.code == formData.colorCode);
  363. formData.colorName = colorItem.name;
  364. formData.phoneNumber = vehicle.mobile
  365. formData.orderId = vehicle.orderId;
  366. formData.orderNo = vehicle.orderNo;
  367. formData.cardId = vehicle.cardId;
  368. formData.obuId = vehicle.obuId;
  369. };
  370. const bindColorPickerChange = (e) => {
  371. console.log('picker发送选择改变,携带值为:' + e.detail.value)
  372. let index = e.detail.value
  373. formData.colorIndex = index;
  374. let colorItem = getDicWithType('VEHICLE_COLOR_TYPE')[index];
  375. formData.colorCode = colorItem.code;
  376. formData.colorName = colorItem.name;
  377. if(formData.carNumber) {
  378. queryVehicleData(`${formData.carNumber}_${formData.colorCode}`);
  379. }
  380. };
  381. // 获取系统信息
  382. const getSystemInfo = () => {
  383. const systemInfo = uni.getSystemInfoSync()
  384. statusBarHeight.value = systemInfo.statusBarHeight || 0
  385. const { top, height } = uni.getMenuButtonBoundingClientRect()
  386. barHeight.value = height ? height + (top - statusBarHeight.value) * 2 : 38
  387. }
  388. // 返回上一页
  389. const goBack = () => {
  390. uni.navigateBack()
  391. }
  392. // 选择车牌号
  393. const selectCarNumber = () => {
  394. // 这里可以调用车牌号选择组件
  395. // uni.showActionSheet({
  396. // itemList: vehicles.value,
  397. // success: (res) => {
  398. // const colors = ['蓝色', '绿色', '黄色', '白色', '黑色']
  399. // formData.carColor = colors[res.tapIndex]
  400. // }
  401. // })
  402. vehiclesShow.value = true;
  403. }
  404. // 显示拍摄规范
  405. const showSpec = (type: 'vehicle' | 'device') => {
  406. const title = type === 'vehicle' ? '车辆45度照拍摄规范' : 'ETC设备安装照拍摄规范'
  407. const content = type === 'vehicle'
  408. ? '请从车辆前45度角拍摄,确保车牌清晰可见,车辆完整入镜。'
  409. : '请拍摄ETC设备安装位置,确保设备清晰可见,安装牢固。'
  410. uni.showModal({
  411. title,
  412. content,
  413. showCancel: false
  414. })
  415. }
  416. // 发送验证码
  417. const sendCode = () => {
  418. if (!/^1[3-9]\d{9}$/.test(formData.phoneNumber)) {
  419. uni.showToast({ title: '请输入正确手机号', icon: 'none' })
  420. return
  421. }
  422. const options = {
  423. type: 2,
  424. data: {
  425. mobile: formData.phoneNumber,
  426. businessType:4
  427. },
  428. method: "POST",
  429. showLoading: true,
  430. };
  431. requestNew(sendMessage, options).then((res) => {
  432. // 这里调用后端发送验证码接口
  433. msg("验证码发送成功!");
  434. uni.showToast({ title: '验证码已发送', icon: 'success' })
  435. waitTime.value = 60
  436. timer = setInterval(() => {
  437. waitTime.value--
  438. if (waitTime.value <= 0) clearInterval(timer)
  439. }, 1000)
  440. });
  441. }
  442. onUnmounted(() => { if (timer) clearInterval(timer) })
  443. const carNumberInputResult = (val: string) => {
  444. formData.carNumber = val.replaceAll(' ', '');
  445. if(formData.colorCode && formData.carNumber.length >= 7) {
  446. queryVehicleData(`${formData.carNumber}_${formData.colorCode}`);
  447. }
  448. };
  449. // 下一步
  450. const nextStep = () => {
  451. // return;
  452. // 表单验证
  453. if (!formData.carNumber && activationType.value === 'other') {
  454. uni.showToast({
  455. title: '请输入车牌号',
  456. icon: 'none'
  457. })
  458. return
  459. }
  460. if (!formData.vehiclePlate && activationType.value === 'self') {
  461. uni.showToast({
  462. title: '请选择车牌号',
  463. icon: 'none'
  464. })
  465. return
  466. }
  467. if (formData.colorCode == undefined || formData.colorCode == null) {
  468. uni.showToast({
  469. title: '请选择车牌颜色',
  470. icon: 'none'
  471. })
  472. return
  473. }
  474. if (!formData.phoneNumber) {
  475. uni.showToast({
  476. title: '请输入手机号码',
  477. icon: 'none'
  478. })
  479. return
  480. }
  481. if (!/^1[3-9]\d{9}$/.test(formData.phoneNumber)) {
  482. uni.showToast({
  483. title: '请输入正确的手机号码',
  484. icon: 'none'
  485. })
  486. return
  487. }
  488. if (!formData.smsCode && activationType.value === 'other') {
  489. uni.showToast({
  490. title: '请输入验证码',
  491. icon: 'none'
  492. })
  493. return
  494. }
  495. if(formData.activeType == '2') {
  496. if (!formData.vehPosImgUrlName) {
  497. uni.showToast({
  498. title: '请上传行驶证正面照',
  499. icon: 'none'
  500. })
  501. return
  502. }
  503. if (!formData.vehNegImgUrlName) {
  504. uni.showToast({
  505. title: '请上传行驶证反面照',
  506. icon: 'none'
  507. })
  508. return
  509. }
  510. if (!formData.vehBodyUrl) {
  511. uni.showToast({
  512. title: '请上传车辆45度照',
  513. icon: 'none'
  514. })
  515. return
  516. }
  517. if (!formData.deviceImageUrl) {
  518. uni.showToast({
  519. title: '请上传ETC设备安装照',
  520. icon: 'none'
  521. })
  522. return
  523. }
  524. }
  525. // 提交数据
  526. console.log('表单数据:', formData)
  527. requestNew('/iaw/active/checkCanActive',{
  528. type: 2,
  529. method: "POST",
  530. data: {
  531. vehiclePlate: activationType.value == 'self' ? formData.vehiclePlate : formData.carNumber,
  532. vehiclePlateColor: formData.colorCode,
  533. cardId: formData.cardId,
  534. obuId: formData.obuId
  535. },
  536. showLoading: true,
  537. }).then(()=>{
  538. let requests = [];
  539. if(activationType.value === 'other') {
  540. const options = {
  541. type: 2,
  542. method: "POST",
  543. data: {
  544. mobile: formData.phoneNumber,
  545. code: formData.smsCode
  546. },
  547. showLoading: true,
  548. }
  549. requests.push(requestNew('/iaw/active/checkSendCode', options));
  550. }
  551. // if(formData.activeType == '2') {
  552. // requests.push(getCharacter());
  553. // }
  554. if(requests.length == 0) {
  555. next();
  556. return;
  557. }
  558. Promise.all(requests).then(res => {
  559. next();
  560. })
  561. }).catch((error)=>{
  562. console.log(error)
  563. });
  564. }
  565. const next = () => {
  566. console.log('formData', formData);
  567. let carNumber = activationType.value == 'self' ? formData.vehiclePlate : formData.carNumber;
  568. // setItem('vehicleId', )
  569. // if(formData.activeType == '1') {
  570. setItem('currentActivateData', {
  571. vehPosImgUrl: formData.vehPosImgUrlName,
  572. vehNegImgUrl: formData.vehNegImgUrlName,
  573. vehBodyUrl: formData.vehBodyUrlName,
  574. deviceImageUrl: formData.deviceImageName,
  575. installImgUrl: formData.deviceImageName,
  576. vehicleId: `${carNumber}_${formData.colorCode}`,
  577. vehiclePlate: activationType.value === 'other' ? formData.carNumber : formData.vehiclePlate,
  578. vehiclePlateColor: formData.colorCode,
  579. vehiclePlateColorStr: formData.colorName,
  580. customerTel: formData.phoneNumber,
  581. vehicleType: formData.vehicleType,
  582. cardId: formData.cardId,
  583. obuId: formData.obuId,
  584. type: activationType.value == 'self' ? 1 : 2,
  585. activeType: formData.activeType
  586. // obuId: 'dsjfslkfjlsa'
  587. })
  588. navTo(`/subpackage/after-sale/activation/operation-tips?id=${formData.orderId}&orderId=${formData.orderNo}&cardStatus=${undefined}&obuStatus=${undefined}&transfer=${formData.activeType}`);
  589. }
  590. </script>
  591. <style lang="scss" scoped>
  592. .picture-wrapper {
  593. margin-top: 30rpx;
  594. .bg {
  595. background: #F5F9FB;
  596. border-radius: 10rpx;
  597. padding: 40rpx 30rpx;
  598. display: flex;
  599. // align-items: center;
  600. justify-content: space-between;
  601. .name {
  602. padding-top: 30rpx;
  603. font-size: 32rpx;
  604. font-family: SourceHanSansSC, SourceHanSansSC;
  605. font-weight: 500;
  606. color: #111;
  607. line-height: 34rpx;
  608. }
  609. .value {
  610. margin-top: 20rpx;
  611. font-size: 22rpx;
  612. font-family: SourceHanSansSC, SourceHanSansSC;
  613. font-weight: 400;
  614. color: #999999;
  615. line-height: 24rpx;
  616. }
  617. .tip {
  618. margin-top: 20rpx;
  619. text-align: center;
  620. width: 100rpx;
  621. height: 30rpx;
  622. // background: rgba(204, 179, 117);
  623. border-radius: 6rpx;
  624. border: 1rpx solid #CCB375;
  625. .tip-value {
  626. font-size: 20rpx;
  627. font-family: Microsoft YaHei;
  628. font-weight: 400;
  629. color: #CCB375;
  630. line-height: 30rpx;
  631. opacity: 1;
  632. }
  633. }
  634. }
  635. .icon {
  636. width: 304rpx;
  637. height: 190rpx;
  638. background-image: var(--bgimg);
  639. background-size: 100% 100%;
  640. background-repeat: no-repeat;
  641. }
  642. }
  643. .container {
  644. min-height: 100vh;
  645. background-color: #f2f5f7;
  646. }
  647. .nav-bar {
  648. background-color: #fff;
  649. position: fixed;
  650. top: 0;
  651. left: 0;
  652. right: 0;
  653. z-index: 100;
  654. .nav-content {
  655. display: flex;
  656. align-items: center;
  657. justify-content: space-between;
  658. padding: 0 30rpx;
  659. .nav-left, .nav-right {
  660. width: 60rpx;
  661. height: 60rpx;
  662. display: flex;
  663. align-items: center;
  664. justify-content: center;
  665. .back-icon {
  666. width: 40rpx;
  667. height: 40rpx;
  668. }
  669. .more-dots {
  670. display: flex;
  671. flex-direction: column;
  672. gap: 4rpx;
  673. .dot {
  674. width: 6rpx;
  675. height: 6rpx;
  676. background-color: #333;
  677. border-radius: 50%;
  678. }
  679. }
  680. }
  681. .nav-title {
  682. font-size: 36rpx;
  683. font-weight: bold;
  684. color: #333;
  685. }
  686. }
  687. }
  688. .content {
  689. padding: 60rpx 30rpx 120rpx;
  690. }
  691. .info-section, .upload-section {
  692. background-color: #fff;
  693. border-radius: 20rpx;
  694. padding: 30rpx;
  695. margin-bottom: 30rpx;
  696. .section-title {
  697. font-size: 32rpx;
  698. font-weight: bold;
  699. color: #333;
  700. margin-bottom: 30rpx;
  701. }
  702. }
  703. .activation-type {
  704. display: flex;
  705. background-color: #f5f5f5;
  706. border-radius: 10rpx;
  707. padding: 4rpx;
  708. margin-bottom: 30rpx;
  709. .type-item {
  710. flex: 1;
  711. text-align: center;
  712. padding: 20rpx 0;
  713. border-radius: 8rpx;
  714. font-size: 28rpx;
  715. color: #666;
  716. transition: all 0.3s;
  717. &.active {
  718. background-color: #c2a75f;
  719. color: #fff;
  720. }
  721. }
  722. }
  723. .form-item {
  724. display: flex;
  725. align-items: center;
  726. margin-bottom: 30rpx;
  727. .form-label {
  728. width: 160rpx;
  729. font-size: 28rpx;
  730. color: #333;
  731. }
  732. .form-input {
  733. flex: 1;
  734. display: flex;
  735. align-items: center;
  736. justify-content: space-between;
  737. height: 80rpx;
  738. padding: 0 20rpx;
  739. background-color: #f8f8f8;
  740. border-radius: 10rpx;
  741. .picker-disabled--test {
  742. width: 100%;
  743. height: 100%;
  744. line-height: 80rpx;
  745. .uni-input {
  746. display: flex;
  747. flex-direction: row;
  748. align-items: center;
  749. .text {
  750. flex: 1;
  751. height: 100%;
  752. }
  753. }
  754. }
  755. .input-text {
  756. font-size: 28rpx;
  757. color: #333;
  758. &.placeholder {
  759. color: #999;
  760. }
  761. }
  762. .arrow-down {
  763. font-size: 20rpx;
  764. color: #999;
  765. }
  766. }
  767. .form-input-text {
  768. flex: 1;
  769. height: 80rpx;
  770. padding: 0 20rpx;
  771. background-color: #f8f8f8;
  772. border-radius: 10rpx;
  773. font-size: 28rpx;
  774. color: #333;
  775. }
  776. }
  777. .car-number-row {
  778. flex-direction: column;
  779. align-items: flex-start;
  780. .form-label {
  781. margin-bottom: 12rpx;
  782. }
  783. :deep(.car-number-input-root) {
  784. width: 100%;
  785. justify-content: flex-start;
  786. }
  787. }
  788. // .picture-wrapper {
  789. // margin-top: 30rpx;
  790. // .bg1 {
  791. // background: #F5F9FB;
  792. // border-radius: 10rpx;
  793. // padding: 40rpx 30rpx;
  794. // display: flex;
  795. // justify-content: space-between;
  796. // .name {
  797. // padding-top: 30rpx;
  798. // font-size: 32rpx;
  799. // font-family: SourceHanSansSC, SourceHanSansSC;
  800. // font-weight: 500;
  801. // color: #111;
  802. // line-height: 34rpx;
  803. // }
  804. // .value {
  805. // margin-top: 20rpx;
  806. // font-size: 22rpx;
  807. // font-family: SourceHanSansSC, SourceHanSansSC;
  808. // font-weight: 400;
  809. // color: #999999;
  810. // line-height: 24rpx;
  811. // }
  812. // .tip {
  813. // margin-top: 20rpx;
  814. // text-align: center;
  815. // width: 100rpx;
  816. // height: 30rpx;
  817. // border-radius: 6rpx;
  818. // border: 1rpx solid #CCB375;
  819. // .tip-value {
  820. // font-size: 20rpx;
  821. // font-family: Microsoft YaHei;
  822. // font-weight: 400;
  823. // color: #CCB375;
  824. // line-height: 30rpx;
  825. // opacity: 1;
  826. // }
  827. // }
  828. // }
  829. // .icon {
  830. // width: 304rpx;
  831. // height: 190rpx;
  832. // background-image: var(--bgimg);
  833. // background-size: 100% 100%;
  834. // background-repeat: no-repeat;
  835. // }
  836. // }
  837. .bottom-button {
  838. position: fixed;
  839. bottom: 0;
  840. left: 0;
  841. right: 0;
  842. height: 100rpx;
  843. background-color: #133850;
  844. color: #fff;
  845. font-size: 32rpx;
  846. font-weight: bold;
  847. display: flex;
  848. align-items: center;
  849. justify-content: center;
  850. }
  851. .send-code-btn {
  852. margin-left: 16rpx;
  853. background: #f8f4e7;
  854. color: #ccb375;
  855. border: 1px solid #ccb375;
  856. border-radius: 10rpx;
  857. font-size: 24rpx;
  858. height: 60rpx;
  859. line-height: 60rpx;
  860. padding: 0 20rpx;
  861. }
  862. </style>