You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

etc-activation.vue 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980
  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="takePhotoMode('3')">
  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="!vehicleFrontData.imageName" 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="vehicleFrontData.imageName"
  129. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  130. </view>
  131. </view>
  132. <view class="picture-wrapper" @click="takePhotoMode('4')">
  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="!vehicleBackData.imageName" 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(vehicleBackData.imageName)"
  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. <uploadImg :isTakePhotoModeShow="isTakePhotoModeShow" :phoneType="choiceIndex" @close="close"
  187. @ocrResult="ocrResult">
  188. </uploadImg>
  189. </view>
  190. </template>
  191. <script setup lang="ts">
  192. import { ref, reactive, onMounted, onUnmounted } from 'vue'
  193. import { onLoad } from '@dcloudio/uni-app'
  194. import carNumberInput from './components/car-number-input.vue'
  195. import { requestNew } from "@/utils/network/request.js";
  196. import {
  197. queryVehicle, sendMessage, vehicCharge
  198. } from "@/utils/network/api.js";
  199. import {
  200. getCodeName, getDicWithType
  201. } from "@/datas/queryKey.js";
  202. import { msg, strReplace, imgPathMontage, hasLogin, uploadFile, compressImage, chooseImageCompress, navTo } from "@/utils/utils";
  203. import uploadImg from '@/components/uploadOcr';
  204. import useOrderSkip from "@/composables/order/useOrderSkip";
  205. import { setItem,getItem } from "@/utils/storage";
  206. //办理订单按钮跳转业务逻辑
  207. const {
  208. gotoCancelOrder,
  209. gotoEditUserOrUnitInfo,
  210. gotoConfirmReceipt,
  211. gotoCheckLogistics,
  212. gotoEvaluateProduct,
  213. gotoActiveOrder,
  214. gotoPay,
  215. gotoReturnOrder,
  216. gotoExchangeOrder,
  217. gotoOrderDetailsPay,
  218. gotoOrderDetails,
  219. gotoAgainUseOrder,
  220. gotoOrderSign,
  221. closeOrder,
  222. gotoReplenishmentOrder,
  223. gotoAddressOrder,
  224. placeAnOrder,
  225. gotoEditAddressNew
  226. } = useOrderSkip();
  227. // 响应式数据
  228. const statusBarHeight = ref(0)
  229. const barHeight = ref(0)
  230. const activationType = ref('self') // 'self' 本人激活, 'other' 非本人激活
  231. const waitTime = ref(0)
  232. let timer: any = null
  233. const formData = reactive({
  234. carNumber: '',
  235. vehicleIndex: '',
  236. vehiclePlate: '',
  237. colorCode: '',
  238. colorIndex: '',
  239. colorName: '',
  240. carColor: '',
  241. phoneNumber: '',
  242. vehPosImgUrl: '',
  243. vehPosImgUrlName: '',
  244. vehNegImgUrl: '',
  245. vehNegImgUrlName: '',
  246. vehBodyUrl: '',
  247. vehBodyUrlName: '',
  248. deviceImageUrl: '',
  249. deviceImageName: '',
  250. smsCode: '',
  251. activeType: '',
  252. orderId: '',
  253. orderNo: '',
  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 vehicleFrontData = reactive({});
  293. const vehicleBackData = reactive({})
  294. const ocrResult = (data) => {
  295. console.log('输出内容=====================', choiceIndex.value);
  296. console.log("上传数据:", data)
  297. console.log("上传数据:", data)
  298. if (choiceIndex.value == "3") {
  299. Object.assign(vehicleFrontData, data);
  300. } else if (choiceIndex.value === "4") {
  301. Object.assign(vehicleBackData, data);
  302. }
  303. }
  304. const isTakePhotoModeShow = ref(false);
  305. const choiceIndex = ref('');
  306. const takePhotoMode = (index) => {
  307. console.log("index", index)
  308. isTakePhotoModeShow.value = true
  309. choiceIndex.value = index
  310. }
  311. const vehiclesShow = ref(true);
  312. const vehicles = ref([]);
  313. const queryVehicleData = (vehicleId) => {
  314. let data = {
  315. vehicleId: ''
  316. }
  317. if(vehicleId) {
  318. data.vehicleId = vehicleId;
  319. }
  320. const options = {
  321. type: 2,
  322. method: "POST",
  323. data,
  324. showLoading: true,
  325. }
  326. requestNew('/iaw/active/queryVehicle', options).then(res => {
  327. vehicles.value = res.modelList;
  328. if(vehicleId) {
  329. let vehicle = res.modelList[0];
  330. formData.phoneNumber = vehicle.mobile;
  331. formData.activeType = vehicle.activeType;
  332. formData.orderId = vehicle.orderId;
  333. formData.orderNo = vehicle.orderNo;
  334. }
  335. })
  336. }
  337. //车头照图片上传 val 100行驶证证明 101行驶证反面 102车头照 103
  338. const cardFileImageUpdate = (val) => {
  339. uni.chooseImage({
  340. count: 1, //只能选取一张照片
  341. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  342. sourceType: ["camera", "album"], //从相册选择
  343. success: function (res) {
  344. uploadFile(res.tempFilePaths[0], val).then((data : any) => {
  345. if (val == 100) {
  346. formData.vehPosImgUrl = data.imageUrl;
  347. formData.vehPosImgUrlName = res.tempFilePaths[0];
  348. } else if (val == 101) {
  349. formData.vehNegImgUrl = data.imageUrl;
  350. formData.vehNegImgUrlName = res.tempFilePaths[0];
  351. } else if (val == 102){
  352. formData.vehBodyUrl = data.imageUrl;
  353. formData.vehBodyUrlName = res.tempFilePaths[0];
  354. } else {
  355. formData.deviceImageUrl = data.imageUrl;
  356. formData.deviceImageName = res.tempFilePaths[0];
  357. }
  358. })
  359. },
  360. });
  361. };
  362. const bindPickerChange = (e) => {
  363. console.log('picker发送选择改变,携带值为:' + e.detail.value)
  364. let index = e.detail.value;
  365. formData.vehicleIndex = index;
  366. let vehicle = vehicles.value[index];
  367. formData.vehiclePlate = vehicle.vehiclePlate;
  368. formData.colorCode = vehicle.vehiclePlateColor;
  369. formData.activeType = vehicle.activeType;
  370. const colorItem = getDicWithType('VEHICLE_COLOR_TYPE').find(item => item.code == formData.colorCode);
  371. formData.colorName = colorItem.name;
  372. formData.phoneNumber = vehicle.mobile
  373. formData.orderId = vehicle.orderId;
  374. formData.orderNo = vehicle.orderNo;
  375. };
  376. const bindColorPickerChange = (e) => {
  377. console.log('picker发送选择改变,携带值为:' + e.detail.value)
  378. let index = e.detail.value
  379. formData.colorIndex = index;
  380. let colorItem = getDicWithType('VEHICLE_COLOR_TYPE')[index];
  381. formData.colorCode = colorItem.code;
  382. formData.colorName = colorItem.name;
  383. if(formData.carNumber) {
  384. queryVehicleData(`${formData.carNumber}_${formData.colorCode}`);
  385. }
  386. };
  387. // 获取系统信息
  388. const getSystemInfo = () => {
  389. const systemInfo = uni.getSystemInfoSync()
  390. statusBarHeight.value = systemInfo.statusBarHeight || 0
  391. const { top, height } = uni.getMenuButtonBoundingClientRect()
  392. barHeight.value = height ? height + (top - statusBarHeight.value) * 2 : 38
  393. }
  394. // 返回上一页
  395. const goBack = () => {
  396. uni.navigateBack()
  397. }
  398. // 选择车牌号
  399. const selectCarNumber = () => {
  400. // 这里可以调用车牌号选择组件
  401. // uni.showActionSheet({
  402. // itemList: vehicles.value,
  403. // success: (res) => {
  404. // const colors = ['蓝色', '绿色', '黄色', '白色', '黑色']
  405. // formData.carColor = colors[res.tapIndex]
  406. // }
  407. // })
  408. vehiclesShow.value = true;
  409. }
  410. // 上传图片
  411. const uploadImage = (type: 'vehicle' | 'device') => {
  412. uni.chooseImage({
  413. count: 1, //只能选取一张照片
  414. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  415. sourceType: ["camera", "album"], //从相册选择
  416. success: function (res) {
  417. // 这里可以添加文件上传逻辑
  418. const tempFilePath = res.tempFilePaths[0]
  419. if (type === 'vehicle') {
  420. formData.vehicleImage = tempFilePath
  421. } else {
  422. formData.deviceImage = tempFilePath
  423. }
  424. }
  425. })
  426. }
  427. // 显示拍摄规范
  428. const showSpec = (type: 'vehicle' | 'device') => {
  429. const title = type === 'vehicle' ? '车辆45度照拍摄规范' : 'ETC设备安装照拍摄规范'
  430. const content = type === 'vehicle'
  431. ? '请从车辆前45度角拍摄,确保车牌清晰可见,车辆完整入镜。'
  432. : '请拍摄ETC设备安装位置,确保设备清晰可见,安装牢固。'
  433. uni.showModal({
  434. title,
  435. content,
  436. showCancel: false
  437. })
  438. }
  439. // 发送验证码
  440. const sendCode = () => {
  441. if (!/^1[3-9]\d{9}$/.test(formData.phoneNumber)) {
  442. uni.showToast({ title: '请输入正确手机号', icon: 'none' })
  443. return
  444. }
  445. const options = {
  446. type: 2,
  447. data: {
  448. mobile: formData.phoneNumber,
  449. businessType:4
  450. },
  451. method: "POST",
  452. showLoading: true,
  453. };
  454. requestNew(sendMessage, options).then((res) => {
  455. // 这里调用后端发送验证码接口
  456. msg("验证码发送成功!");
  457. uni.showToast({ title: '验证码已发送', icon: 'success' })
  458. waitTime.value = 60
  459. timer = setInterval(() => {
  460. waitTime.value--
  461. if (waitTime.value <= 0) clearInterval(timer)
  462. }, 1000)
  463. });
  464. }
  465. onUnmounted(() => { if (timer) clearInterval(timer) })
  466. const carNumberInputResult = (val: string) => {
  467. formData.carNumber = val.replaceAll(' ', '');
  468. if(formData.colorCode && formData.carNumber.length >= 7) {
  469. queryVehicleData(`${formData.carNumber}_${formData.colorCode}`);
  470. }
  471. };
  472. // 下一步
  473. const nextStep = () => {
  474. // 表单验证
  475. if (!formData.carNumber && activationType.value === 'other') {
  476. uni.showToast({
  477. title: '请输入车牌号',
  478. icon: 'none'
  479. })
  480. return
  481. }
  482. if (!formData.vehiclePlate && activationType.value === 'self') {
  483. uni.showToast({
  484. title: '请选择车牌号',
  485. icon: 'none'
  486. })
  487. return
  488. }
  489. if (formData.colorCode == undefined || formData.colorCode == null) {
  490. uni.showToast({
  491. title: '请选择车牌颜色',
  492. icon: 'none'
  493. })
  494. return
  495. }
  496. if (!formData.phoneNumber) {
  497. uni.showToast({
  498. title: '请输入手机号码',
  499. icon: 'none'
  500. })
  501. return
  502. }
  503. if (!/^1[3-9]\d{9}$/.test(formData.phoneNumber)) {
  504. uni.showToast({
  505. title: '请输入正确的手机号码',
  506. icon: 'none'
  507. })
  508. return
  509. }
  510. if (!formData.smsCode && activationType.value === 'other') {
  511. uni.showToast({
  512. title: '请输入验证码',
  513. icon: 'none'
  514. })
  515. return
  516. }
  517. if(formData.activeType == '2') {
  518. if (!vehicleFrontData.imageName) {
  519. uni.showToast({
  520. title: '请上传行驶证正面照',
  521. icon: 'none'
  522. })
  523. return
  524. }
  525. if (!vehicleBackData.imageName) {
  526. uni.showToast({
  527. title: '请上传行驶证反面照',
  528. icon: 'none'
  529. })
  530. return
  531. }
  532. if (!formData.vehBodyUrl) {
  533. uni.showToast({
  534. title: '请上传车辆45度照',
  535. icon: 'none'
  536. })
  537. return
  538. }
  539. if (!formData.deviceImageUrl) {
  540. uni.showToast({
  541. title: '请上传ETC设备安装照',
  542. icon: 'none'
  543. })
  544. return
  545. }
  546. }
  547. // 提交数据
  548. console.log('表单数据:', formData)
  549. let requests = [];
  550. if(activationType.value === 'other') {
  551. const options = {
  552. type: 2,
  553. method: "POST",
  554. data: {
  555. mobile: formData.phoneNumber,
  556. code: formData.smsCode
  557. },
  558. showLoading: true,
  559. }
  560. requests.push(requestNew('/iaw/active/checkSendCode', options));
  561. }
  562. // if(formData.activeType == '2') {
  563. // requests.push(getCharacter());
  564. // }
  565. if(requests.length == 0) {
  566. next();
  567. return;
  568. }
  569. Promise.all(requests).then(res => {
  570. next();
  571. })
  572. }
  573. // 获取车辆使用性质
  574. const getCharacter = () => {
  575. let approvedCount;
  576. if (vehicleBackData.apc.indexOf('人') > 0) {
  577. approvedCount = vehicleBackData.apc.replace("人", "");
  578. } else {
  579. approvedCount = vehicleBackData.apc;
  580. }
  581. let totalMass;
  582. if (vehicleBackData.gross.toString().indexOf('kg') > 0) {
  583. totalMass = vehicleBackData.gross.replace("kg", "");
  584. } else {
  585. totalMass = vehicleBackData.gross;
  586. }
  587. let data = {
  588. "approvedCount": approvedCount,
  589. // "axleCount": state.form.axleCount,
  590. "totalMass": totalMass,
  591. // "vanType": state.form.vanType,
  592. "vehicleDimensions": vehicleBackData.overall.replaceAll("x", "X"),
  593. "plateNum": activationType.value === 'other' ? formData.carNumber : formData.vehiclePlate,
  594. "vehicleTypeName": vehicleFrontData.vehicle,
  595. "vehicleUsePropertName": vehicleFrontData.character
  596. }
  597. let params = {
  598. type: 2,
  599. data: data,
  600. method: "POST",
  601. showLoading: true,
  602. };
  603. return requestNew(vehicCharge, params)
  604. }
  605. const next = () => {
  606. console.log('formData', formData);
  607. let carNumber = activationType.value == 'self' ? formData.vehiclePlate : formData.carNumber;
  608. setItem('vehicleId', `${carNumber}_${formData.colorCode}`)
  609. // if(formData.activeType == '1') {
  610. setItem('vehicleUrl', {
  611. front: vehicleFrontData.imageName,
  612. back: vehicleBackData.imageName
  613. })
  614. navTo(`/subpackage/after-sale/activation/operation-tips?id=${formData.orderId}&orderId=${formData.orderNo}&cardStatus=${undefined}&obuStatus=${undefined}&transfer=${formData.activeType}`);
  615. // } else {
  616. // }
  617. }
  618. </script>
  619. <style lang="scss" scoped>
  620. .picture-wrapper {
  621. margin-top: 30rpx;
  622. .bg {
  623. background: #F5F9FB;
  624. border-radius: 10rpx;
  625. padding: 40rpx 30rpx;
  626. display: flex;
  627. // align-items: center;
  628. justify-content: space-between;
  629. .name {
  630. padding-top: 30rpx;
  631. font-size: 32rpx;
  632. font-family: SourceHanSansSC, SourceHanSansSC;
  633. font-weight: 500;
  634. color: #111;
  635. line-height: 34rpx;
  636. }
  637. .value {
  638. margin-top: 20rpx;
  639. font-size: 22rpx;
  640. font-family: SourceHanSansSC, SourceHanSansSC;
  641. font-weight: 400;
  642. color: #999999;
  643. line-height: 24rpx;
  644. }
  645. .tip {
  646. margin-top: 20rpx;
  647. text-align: center;
  648. width: 100rpx;
  649. height: 30rpx;
  650. // background: rgba(204, 179, 117);
  651. border-radius: 6rpx;
  652. border: 1rpx solid #CCB375;
  653. .tip-value {
  654. font-size: 20rpx;
  655. font-family: Microsoft YaHei;
  656. font-weight: 400;
  657. color: #CCB375;
  658. line-height: 30rpx;
  659. opacity: 1;
  660. }
  661. }
  662. }
  663. .icon {
  664. width: 304rpx;
  665. height: 190rpx;
  666. background-image: var(--bgimg);
  667. background-size: 100% 100%;
  668. background-repeat: no-repeat;
  669. }
  670. }
  671. .container {
  672. min-height: 100vh;
  673. background-color: #f2f5f7;
  674. }
  675. .nav-bar {
  676. background-color: #fff;
  677. position: fixed;
  678. top: 0;
  679. left: 0;
  680. right: 0;
  681. z-index: 100;
  682. .nav-content {
  683. display: flex;
  684. align-items: center;
  685. justify-content: space-between;
  686. padding: 0 30rpx;
  687. .nav-left, .nav-right {
  688. width: 60rpx;
  689. height: 60rpx;
  690. display: flex;
  691. align-items: center;
  692. justify-content: center;
  693. .back-icon {
  694. width: 40rpx;
  695. height: 40rpx;
  696. }
  697. .more-dots {
  698. display: flex;
  699. flex-direction: column;
  700. gap: 4rpx;
  701. .dot {
  702. width: 6rpx;
  703. height: 6rpx;
  704. background-color: #333;
  705. border-radius: 50%;
  706. }
  707. }
  708. }
  709. .nav-title {
  710. font-size: 36rpx;
  711. font-weight: bold;
  712. color: #333;
  713. }
  714. }
  715. }
  716. .content {
  717. padding: 60rpx 30rpx 120rpx;
  718. }
  719. .info-section, .upload-section {
  720. background-color: #fff;
  721. border-radius: 20rpx;
  722. padding: 30rpx;
  723. margin-bottom: 30rpx;
  724. .section-title {
  725. font-size: 32rpx;
  726. font-weight: bold;
  727. color: #333;
  728. margin-bottom: 30rpx;
  729. }
  730. }
  731. .activation-type {
  732. display: flex;
  733. background-color: #f5f5f5;
  734. border-radius: 10rpx;
  735. padding: 4rpx;
  736. margin-bottom: 30rpx;
  737. .type-item {
  738. flex: 1;
  739. text-align: center;
  740. padding: 20rpx 0;
  741. border-radius: 8rpx;
  742. font-size: 28rpx;
  743. color: #666;
  744. transition: all 0.3s;
  745. &.active {
  746. background-color: #c2a75f;
  747. color: #fff;
  748. }
  749. }
  750. }
  751. .form-item {
  752. display: flex;
  753. align-items: center;
  754. margin-bottom: 30rpx;
  755. .form-label {
  756. width: 160rpx;
  757. font-size: 28rpx;
  758. color: #333;
  759. }
  760. .form-input {
  761. flex: 1;
  762. display: flex;
  763. align-items: center;
  764. justify-content: space-between;
  765. height: 80rpx;
  766. padding: 0 20rpx;
  767. background-color: #f8f8f8;
  768. border-radius: 10rpx;
  769. .picker-disabled--test {
  770. width: 100%;
  771. height: 100%;
  772. line-height: 80rpx;
  773. .uni-input {
  774. display: flex;
  775. flex-direction: row;
  776. align-items: center;
  777. .text {
  778. flex: 1;
  779. height: 100%;
  780. }
  781. }
  782. }
  783. .input-text {
  784. font-size: 28rpx;
  785. color: #333;
  786. &.placeholder {
  787. color: #999;
  788. }
  789. }
  790. .arrow-down {
  791. font-size: 20rpx;
  792. color: #999;
  793. }
  794. }
  795. .form-input-text {
  796. flex: 1;
  797. height: 80rpx;
  798. padding: 0 20rpx;
  799. background-color: #f8f8f8;
  800. border-radius: 10rpx;
  801. font-size: 28rpx;
  802. color: #333;
  803. }
  804. }
  805. .car-number-row {
  806. flex-direction: column;
  807. align-items: flex-start;
  808. .form-label {
  809. margin-bottom: 12rpx;
  810. }
  811. :deep(.car-number-input-root) {
  812. width: 100%;
  813. justify-content: flex-start;
  814. }
  815. }
  816. // .picture-wrapper {
  817. // margin-top: 30rpx;
  818. // .bg1 {
  819. // background: #F5F9FB;
  820. // border-radius: 10rpx;
  821. // padding: 40rpx 30rpx;
  822. // display: flex;
  823. // justify-content: space-between;
  824. // .name {
  825. // padding-top: 30rpx;
  826. // font-size: 32rpx;
  827. // font-family: SourceHanSansSC, SourceHanSansSC;
  828. // font-weight: 500;
  829. // color: #111;
  830. // line-height: 34rpx;
  831. // }
  832. // .value {
  833. // margin-top: 20rpx;
  834. // font-size: 22rpx;
  835. // font-family: SourceHanSansSC, SourceHanSansSC;
  836. // font-weight: 400;
  837. // color: #999999;
  838. // line-height: 24rpx;
  839. // }
  840. // .tip {
  841. // margin-top: 20rpx;
  842. // text-align: center;
  843. // width: 100rpx;
  844. // height: 30rpx;
  845. // border-radius: 6rpx;
  846. // border: 1rpx solid #CCB375;
  847. // .tip-value {
  848. // font-size: 20rpx;
  849. // font-family: Microsoft YaHei;
  850. // font-weight: 400;
  851. // color: #CCB375;
  852. // line-height: 30rpx;
  853. // opacity: 1;
  854. // }
  855. // }
  856. // }
  857. // .icon {
  858. // width: 304rpx;
  859. // height: 190rpx;
  860. // background-image: var(--bgimg);
  861. // background-size: 100% 100%;
  862. // background-repeat: no-repeat;
  863. // }
  864. // }
  865. .bottom-button {
  866. position: fixed;
  867. bottom: 0;
  868. left: 0;
  869. right: 0;
  870. height: 100rpx;
  871. background-color: #133850;
  872. color: #fff;
  873. font-size: 32rpx;
  874. font-weight: bold;
  875. display: flex;
  876. align-items: center;
  877. justify-content: center;
  878. }
  879. .send-code-btn {
  880. margin-left: 16rpx;
  881. background: #f8f4e7;
  882. color: #ccb375;
  883. border: 1px solid #ccb375;
  884. border-radius: 10rpx;
  885. font-size: 24rpx;
  886. height: 60rpx;
  887. line-height: 60rpx;
  888. padding: 0 20rpx;
  889. }
  890. </style>