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.

car-release.vue 27KB

2 lat temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
2 lat temu
1 rok temu
2 lat temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
2 lat temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
2 lat temu
1 rok temu
1 rok temu
2 lat temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
2 lat temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
2 lat temu
2 lat temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
2 lat temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
2 lat temu
1 rok temu
2 lat temu
1 rok temu
2 lat temu
1 rok temu
2 lat temu
1 rok temu
2 lat temu
1 rok temu
2 lat temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
2 lat temu
1 rok temu
2 lat temu
1 rok temu
2 lat temu
1 rok temu
1 rok temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983
  1. <template>
  2. <navBar title="行驶证信息上传" :scrollTop="scrollTop"></navBar>
  3. <navBgCar></navBgCar>
  4. <view class="content">
  5. <view class="item-tips">
  6. <view class="title"> 上传后请核对识别信息 </view>
  7. <view class="tip"> 如有错误请及时手动修改 </view>
  8. </view>
  9. <view class="picture-wrapper" @click="takePhotoMode('3')">
  10. <view class="bg">
  11. <view class="">
  12. <view class="name"> 行驶证主页 </view>
  13. <view class="value"> 上传行驶证的主页 </view>
  14. <view class="tip">
  15. <view class="tip-value"> 拍摄规范 </view>
  16. </view>
  17. </view>
  18. <image v-if="!state.form.vehPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/car-zhu.png`">
  19. </image>
  20. <image v-else class="icon" :src="strReplace(state.form.vehPosImgUrl)"></image>
  21. </view>
  22. </view>
  23. <view class="picture-wrapper" @click="takePhotoMode('4')">
  24. <view class="bg">
  25. <view class="">
  26. <view class="name"> 行驶证副页 </view>
  27. <view class="value"> 上传行驶证的副页 </view>
  28. <view class="tip">
  29. <view class="tip-value"> 拍摄规范 </view>
  30. </view>
  31. </view>
  32. <image v-if="!state.form.vehNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/car-fu.png`">
  33. </image>
  34. <image v-else class="icon" :src="strReplace(state.form.vehNegImgUrl)"></image>
  35. </view>
  36. </view>
  37. <view class="picture-wrapper" @click="cardFileImageUpdate()">
  38. <view class="bg">
  39. <view class="">
  40. <view class="name"> 车头照 </view>
  41. <view class="value"> 上传汽车的车头照片 </view>
  42. <view class="tip">
  43. <view class="tip-value"> 拍摄规范 </view>
  44. </view>
  45. </view>
  46. <image v-if="!state.form.vehBodyUrl" class="icon" :src="`${$imgUrl}applyCard/chetou.png`">
  47. </image>
  48. <image v-else class="icon" :src="strReplace(state.form.vehBodyUrl)"></image>
  49. </view>
  50. </view>
  51. <view class="shibie-wrapper">
  52. <view class="title"> 识别内容如下 </view>
  53. <view class="">
  54. <u-form label-width="200" :model="state.form" ref="uForm">
  55. <u-form-item label="车牌号">
  56. <!-- <u-input inputAlign="right" placeholder='请输入车牌号' v-model="state.form.vehicleIdNum" /> -->
  57. <car-number-input @numberInputResult="carNumber"
  58. :defaultStr="state.form.vehicleIdNum"></car-number-input>
  59. </u-form-item>
  60. <u-form-item label="所有人">
  61. <u-input inputAlign="right" placeholder="请输入所有人" v-model="state.form.man"
  62. :disabled="state.isEnableChangeOCRCarInfo" />
  63. </u-form-item>
  64. <u-form-item label="车辆类型">
  65. <u-input inputAlign="right" placeholder="请输入车辆类型" v-model="state.form.vehicleType"
  66. :disabled="state.isEnableChangeOCRCarInfo" />
  67. </u-form-item>
  68. <u-form-item label="使用性质">
  69. <u-input inputAlign="right" placeholder="请输入使用性质" v-model="state.form.character"
  70. :disabled="state.isEnableChangeOCRCarInfo" />
  71. </u-form-item>
  72. <u-form-item label="车辆识别代号">
  73. <u-input inputAlign="right" placeholder="请输入车辆识别代号" v-model="state.form.vin"
  74. :disabled="state.isEnableChangeOCRCarInfo" />
  75. </u-form-item>
  76. <u-form-item label="发动机号码">
  77. <u-input inputAlign="right" placeholder="请输入发动机号码" v-model="state.form.engineNum"
  78. :disabled="state.isEnableChangeOCRCarInfo" />
  79. </u-form-item>
  80. <u-form-item label="注册日期">
  81. <picker mode="date" :value="state.form.register" @change="bindDateChange1"
  82. :disabled="state.isEnableChangeOCRCarInfo">
  83. <view class="uni-input" style="text-align: right;" :class="state.changeColor?'hei':'hui'">
  84. {{state.form.register}}
  85. </view>
  86. </picker>
  87. <!-- <u-input inputAlign="right" placeholder="请输入注册日期" v-model="state.form.register" :disabled="state.isEnableChangeOCRCarInfo" /> -->
  88. </u-form-item>
  89. <u-form-item label="发证日期">
  90. <picker mode="date" :value="state.form.issueDate" @change="bindDateChange2"
  91. :disabled="state.isEnableChangeOCRCarInfo">
  92. <view class="uni-input" style="text-align: right;" :class="state.changeColor?'hei':'hui'">
  93. {{state.form.issueDate}}
  94. </view>
  95. </picker>
  96. <!-- <u-input inputAlign="right" placeholder="请输入发证日期" v-model="state.form.issueDate" :disabled="state.isEnableChangeOCRCarInfo"/> -->
  97. </u-form-item>
  98. <u-form-item label="核定载人数">
  99. <u-input inputAlign="right" placeholder="请输入核定载人数" v-model="state.form.approvedCountShow"
  100. :disabled="state.isEnableChangeOCRCarInfo" />
  101. </u-form-item>
  102. <u-form-item label="整备质量">
  103. <u-input inputAlign="right" placeholder="请输入整备质量" v-model="state.form.maintenaceMassShow"
  104. :disabled="state.isEnableChangeOCRCarInfo" />
  105. </u-form-item>
  106. <!-- <u-form-item label="外廊尺寸">
  107. <u-input inputAlign="right" placeholder='请输入外廊尺寸' v-model="state.form.vehicleDimensions" />
  108. </u-form-item> -->
  109. <view class="form-item">
  110. <label>外廊尺寸</label>
  111. <view class="input-box">
  112. <text class="sub-label">长</text>
  113. <input v-model="state.outlineL" @input="outlineInput"
  114. :disabled="state.isEnableChangeOCRCarInfo" />
  115. <text class="sub-text">X</text>
  116. <text class="sub-label">宽</text>
  117. <input v-model="state.outlineW" @input="outlineInput"
  118. :disabled="state.isEnableChangeOCRCarInfo" />
  119. <text class="sub-text">X</text>
  120. <text class="sub-label">高</text>
  121. <input v-model="state.outlineH" @input="outlineInput"
  122. :disabled="state.isEnableChangeOCRCarInfo" />
  123. <text class="sub-text">mm</text>
  124. </view>
  125. </view>
  126. <u-form-item label="总质量">
  127. <u-input inputAlign="right" placeholder="请输入总质量" v-model="state.form.totalMassShow"
  128. :disabled="state.isEnableChangeOCRCarInfo" />
  129. </u-form-item>
  130. <u-form-item label="车轴数">
  131. <u-input inputAlign="right" placeholder="请输入车轴数" v-model="state.form.axleCount" type="number"
  132. maxlength="2" />
  133. </u-form-item>
  134. <view class="form-item">
  135. <label>车辆用户类型</label>
  136. <view class="select" @click="state.actionSheetShow = true">{{state.form.useUserTypeName}}</view>
  137. <image :src="`${$imgUrl}common/arror-down.png`" class="icon"
  138. @click="state.actionSheetShow = true"></image>
  139. </view>
  140. <!-- <u-form-item label="车辆用户类型">
  141. <u-input @click="state.actionSheetShow = true" placeholder="请输入车辆用户类型" inputAlign="right"
  142. v-model="state.form.useUserTypeName" height="38" type="textarea" :autoHeight="true" />
  143. </u-form-item> -->
  144. </u-form>
  145. </view>
  146. </view>
  147. <view class="green-tip">
  148. 如识别信息有误,请手动修改,确认无误后,点击下一步!
  149. </view>
  150. <view class="action">
  151. <button type="default" class="button" @click="savaHandle()">
  152. 下一步
  153. </button>
  154. </view>
  155. <!-- <u-select v-model="state.actionSheetShow" :list="state.actionSheetList" @confirm="selectConfirm"></u-select>
  156. <u-action-sheet @click="selectConfirm" :list="state.actionSheetList" v-model="state.actionSheetShow">
  157. </u-action-sheet> -->
  158. <!-- 车辆类型弹窗 -->
  159. <u-popup mode="bottom" v-model="state.actionSheetShow">
  160. <view class="window">
  161. <view class="window-item" v-for="item in state.actionSheetList" :key="item.value"
  162. @click="userType(item)">{{item.text}}</view>
  163. </view>
  164. </u-popup>
  165. <u-popup mode="bottom" v-model="state.show">
  166. <view v-if="state.data.transferLogs && state.data.transferLogs.length" class="">
  167. <view class="bettwen-center">
  168. <view style="padding: 20rpx" class="title"> 选择卡签 </view>
  169. <view class="goto" @click="pass"> 直接跳过,不使用此套卡签 </view>
  170. </view>
  171. <view @click="guohuAction(item)" class="card" v-for="(item, index) in state.data.transferLogs"
  172. :key="index" style="margin-top: 30rpx; margin-bottom: 30rpx">
  173. <view v-if="item.status === 'WAITING'" class="card-left">
  174. <image :src="`${$imgUrl}card2.png`" mode=""></image>
  175. <view class="card-center">
  176. <view class="flex">
  177. <view class=""> 卡号: </view>
  178. <view class="card-center-head">
  179. {{ item.cardId }}
  180. </view>
  181. </view>
  182. <view style="margin-top: 10rpx" class="flex">
  183. <view class=""> OBU编号: </view>
  184. <view class="card-center-head">
  185. {{ item.obuId }}
  186. </view>
  187. </view>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. </u-popup>
  193. </view>
  194. <view class="choice-takePhoto-wrap" v-if="state.isTakePhotoModeShow" @click="cancle">
  195. <view class="choice-takePhoto">
  196. <view @click.stop="takePhoto(state.choiceIndex)" style="border-radius: 20rpx 20rpx 0 0;">拍照</view>
  197. <view @click.stop="xiangce(state.choiceIndex)">从手机相册选择</view>
  198. <view @click.stop="cancle">取消</view>
  199. </view>
  200. </view>
  201. <viewfinder v-if="state.phoneType" :phoneType="state.phoneType" :images="state.images"
  202. :showStartPhoto="state.showImg" @confirmReturn="confirmReturn" @camera="camera"></viewfinder>
  203. </template>
  204. <script setup lang="ts">
  205. import { reactive, ref } from "vue";
  206. import viewfinder from "../../components/viewfinder.vue"
  207. import navBgCar from "./components/nav-bg-car4";
  208. import navBar from "@/components/nav-bar/nav-bar2.vue";
  209. import carNumberInput from "@/components/car-number-input/car-number-input.vue";
  210. import {
  211. etcCarCardInfoSubmit,
  212. etcCarOcrCard,
  213. fileUpload,
  214. envs,
  215. queryGuoHuJianCe,
  216. queryGuoHuCaoZuo,
  217. ocrAllQuery
  218. } from "@/utils/network/api.js";
  219. import { request } from "@/utils/network/request.js";
  220. import { stringToJson } from "@/utils/network/encryption";
  221. import { onLoad, onPageScroll } from "@dcloudio/uni-app";
  222. import { getObuStatus } from "@/datas/obuStatus.js";
  223. import { getEtcCardStatus } from "@/datas/etcCardStatus.js";
  224. import { getItem, StorageKeys } from "@/utils/storage";
  225. // import { hasLogin } from "@/utils/utils.ts";
  226. import { msg, strReplace, hasLogin, uploadFile } from "@/utils/utils";
  227. import {
  228. getCodeName
  229. } from "@/datas/queryKey.js";
  230. const scrollTop = ref(0);
  231. //监听页面滚动
  232. onPageScroll((e) => {
  233. scrollTop.value = e.scrollTop;
  234. });
  235. //车牌号输入
  236. const carNumber = (val : any) => {
  237. state.form.vehicleIdNum = val.trim();
  238. };
  239. const camera = () => {
  240. state.phoneType = 0
  241. }
  242. //提交车辆信息
  243. const savaHandle = () => {
  244. if (!state.form.vehBodyUrl) {
  245. msg("请上传车头照");
  246. return;
  247. }
  248. if (state.form.type == 1) {
  249. state.form.axleCount = 2;
  250. } else {
  251. if (!state.form.axleCount) {
  252. msg("请输入车轴数");
  253. return;
  254. }
  255. }
  256. state.form.vehicleId =
  257. state.form.vehicleIdNum + "_" + state.vehiclePlateColor;
  258. state.form.opId = getItem(StorageKeys.OpenId);
  259. state.form.approvedCount = parseFloat(state.form.approvedCount);
  260. state.form.maintenaceMass = parseFloat(state.form.maintenaceMass);
  261. state.form.totalMass = parseFloat(state.form.totalMass);
  262. state.form.permittedWeight = parseFloat(state.form.permittedWeight);
  263. state.form.permittedTowWeight = parseFloat(state.form.permittedTowWeight);
  264. const options = {
  265. type: 2,
  266. data: state.form,
  267. method: "POST",
  268. showLoading: true,
  269. };
  270. request(etcCarCardInfoSubmit, options)
  271. .then((res) => {
  272. const data = stringToJson(res.bizContent);
  273. queryGuoHuJianCeAction().then((value) => {
  274. console.log("过户检测", value)
  275. if (value.transferLogs && value.transferLogs.length > 0) {
  276. state.data.transferLogs = value.transferLogs;
  277. state.show = true;
  278. } else {
  279. // 签约
  280. // if (state.isSign == 2 || state.isSign == 3) {
  281. if (!hasLogin()) {
  282. uni.redirectTo({
  283. url: `/subpackage/orders/addAddress?orderId=${state.form.orderId
  284. }&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`,
  285. });
  286. } else {
  287. uni.redirectTo({
  288. url: `/subpackage/orders/product-detail?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}`,
  289. });
  290. }
  291. // } else {
  292. // uni.redirectTo({
  293. // url: `/subpackage/orders/product-detail?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}`,
  294. // });
  295. // }
  296. }
  297. });
  298. })
  299. .catch((res) => {
  300. console.log(res);
  301. });
  302. };
  303. const pass = () => {
  304. state.show = false
  305. }
  306. const selectConfirm = (index : any) => {
  307. console.log(index);
  308. state.form.useUserType = state.actionSheetList[index].value;
  309. state.form.useUserTypeName = state.actionSheetList[index].text;
  310. };
  311. //选择车辆用户类型
  312. const userType = (item : any) => {
  313. state.form.useUserType = item.value;
  314. state.form.useUserTypeName = item.text;
  315. state.actionSheetShow = false;
  316. }
  317. //车头照图片上传
  318. const cardFileImageUpdate = () => {
  319. uni.chooseImage({
  320. count: 1, //只能选取一张照片
  321. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  322. sourceType: ["camera", "album"], //从相册选择
  323. success: function (res) {
  324. uploadFile(res.tempFilePaths[0], "", "").then((data) => {
  325. state.form.vehBodyUrl = data;
  326. })
  327. },
  328. });
  329. };
  330. const state = reactive({
  331. phoneType: 0, // 1 身份证正面 2 身份证反面 3行驶证正面 4行驶证反面
  332. choiceIndex: 1, // 1 身份证正面 2 身份证反面
  333. isTakePhotoModeShow: false, //选择拍照方式是否出来
  334. changeColor: false,
  335. showImg: true,
  336. images: '',
  337. data: {
  338. transferLogs: [],
  339. },
  340. actionSheetShow: false,
  341. actionSheetList: [],
  342. form: {
  343. orderId: "", //订单ID
  344. man: "", //所有人
  345. character: "", //使用性质
  346. register: "请输入注册日期", //注册日期
  347. customerId: "", //用户编号
  348. vehicleId: "",
  349. vehicleIdNum: "", //车牌编号
  350. issueDate: "请输入发证日期", //发证日期
  351. vehPosImgUrl: "", //行驶证正面
  352. vehNegImgUrl: "", //行驶证证反面
  353. type: "0", //0,客车 1.货车
  354. useUserType: 0, //车辆用户类型
  355. useUserTypeName: "普通车",
  356. vehicleSign: 2, //前/后装标识
  357. vin: "", //车辆识别代号
  358. engineNum: "", //发动机号码
  359. vehicleType: "", //车辆类型
  360. vehicleModel: "", //行驶证品牌型号
  361. approvedCount: undefined, //核定人数
  362. approvedCountShow: undefined,//展示的
  363. totalMass: undefined, //总质量
  364. totalMassShow: undefined, //总质量
  365. maintenaceMass: undefined, //整备质量
  366. maintenaceMassShow: undefined, //整备质量展示的
  367. permittedWeight: "", //核定载质量
  368. vehicleDimensions: "", //车辆尺寸
  369. permittedTowWeight: "", //准牵引总质量
  370. axleCount: "", //车轴数
  371. ownerName: "", //车主姓名
  372. ownerIdType: "", //车主证件类型
  373. ownerIdNum: "", //车主证件号码
  374. ownPosImgUrl: "", //车主证件正面图片
  375. ownNegImgUrl: "", //车主证件反面图片
  376. agreementId: "", //签约编号
  377. channelId: "5201018892300000001", //编号渠道
  378. scenePayType: "", //
  379. transportIdNum: "", //道路运输证编号
  380. licenseIdNum: "", //经营许可证编号
  381. vehBodyUrl: "", //车身照片
  382. proxyUrl: "", //委托书地址
  383. opId: "",
  384. },
  385. vehiclePlateColor: undefined,
  386. orderId: "",
  387. // type: undefined, //标记来源是否登录 1为未登录数据 - 需要新增地址
  388. show: false,
  389. isMyPeopple: true,
  390. outlineL: "",
  391. outlineW: "",
  392. outlineH: "",
  393. isSign: '',
  394. isEnableChangeOCRCarInfo: true, //申办时是否允许修改OCR识别出来的车辆信息数据
  395. });
  396. onLoad((option : any) => {
  397. state.form.orderId = option.orderId;
  398. // state.type = option.type;
  399. state.form.type = option.type;
  400. state.vehiclePlateColor = option.vehiclePlateColor;
  401. state.isSign = option.isSign
  402. console.log("option", option)
  403. getGlobalParam();
  404. if (option.type == 1) {
  405. state.actionSheetList = [{
  406. text: "普通车",
  407. value: 0,
  408. }]
  409. } else {
  410. state.actionSheetList = [{
  411. text: "普通车",
  412. value: 0,
  413. },
  414. {
  415. text: "道路运输证经营范围仅有“货物专用运输(集装箱) ”的牵引车办理J类型集装箱",
  416. value: 24,
  417. },
  418. {
  419. text: "道路运输证经营范围不含“货物专用运输(集装箱)”的牵引车",
  420. value: 27,
  421. },
  422. {
  423. text: '道路运输证经营范围除“货物专用运输 (集装 箱)"外,还有“普通货运”等其他项目的牵引车办理J2类型集装箱',
  424. value: 28,
  425. }]
  426. }
  427. });
  428. //外廓尺寸输入框
  429. const outlineInput = (e) => {
  430. state.form.vehicleDimensions =
  431. state.outlineL + "X" + state.outlineW + "X" + state.outlineH + "mm";
  432. };
  433. //过户检测
  434. const queryGuoHuJianCeAction = () => {
  435. var data = {
  436. orderId: state.form.orderId,
  437. };
  438. const options = {
  439. type: 2,
  440. data: data,
  441. method: "POST",
  442. showLoading: true,
  443. };
  444. return new Promise(async (resolve, reject) => {
  445. const res = await request(queryGuoHuJianCe, options);
  446. const data = stringToJson(res.bizContent);
  447. console.log("过户检测111", data)
  448. resolve(data);
  449. }).catch((error) => {
  450. reject(error);
  451. });
  452. };
  453. //过户操作
  454. const guohuAction = (val) => {
  455. var data = {
  456. orderId: state.form.orderId,
  457. serviceType: "USE",
  458. obuId: val.obuId,
  459. cardId: val.cardId,
  460. };
  461. const options = {
  462. type: 2,
  463. data: data,
  464. method: "POST",
  465. showLoading: true,
  466. };
  467. return new Promise(async (resolve, reject) => {
  468. const res = await request(queryGuoHuCaoZuo, options);
  469. const data = stringToJson(res.bizContent);
  470. state.show = false;
  471. // uni.navigateTo({
  472. // url: `/subpackage/orders/choice-product?orderId=${state.form.orderId}`,
  473. // });
  474. uni.redirectTo({
  475. url: `/subpackage/orders/product-detail?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}`,
  476. });
  477. }).catch((error) => {
  478. reject(error);
  479. });
  480. };
  481. const getGlobalParam = () => {
  482. const data = getItem('globalParam')
  483. console.log("全局配置数据", getCodeName('IS_ENABLE', data.applyChangeOCRCarInfo))
  484. // 申办时是否允许修改OCR识别出来的车辆信息数据
  485. if (getCodeName('IS_ENABLE', data.applyChangeOCRCarInfo) == '启用') {
  486. state.isEnableChangeOCRCarInfo = true;
  487. } else {
  488. state.isEnableChangeOCRCarInfo = false;
  489. }
  490. }
  491. const bindDateChange1 = (e) => {
  492. state.form.register = e.detail.value
  493. state.changeColor = true;
  494. }
  495. const bindDateChange2 = (e) => {
  496. state.form.issueDate = e.detail.value
  497. state.changeColor = true;
  498. }
  499. const xiangce = (val) => {
  500. console.log("val", val)
  501. if (state.choiceIndex == 3) {
  502. var imageType = 1;
  503. } else {
  504. var imageType = 2;
  505. }
  506. state.changeColor = true;
  507. uni.chooseImage({
  508. count: 1, //只能选取一张照片
  509. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  510. sourceType: ["album"], //从相册选择
  511. success: function (res) {
  512. console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://'))
  513. if (state.choiceIndex == 3 || state.choiceIndex == 4) {
  514. state.showImg = false
  515. state.images = res.tempFilePaths[0]
  516. state.phoneType = state.choiceIndex
  517. state.isTakePhotoModeShow = false
  518. return
  519. }
  520. },
  521. })
  522. }
  523. const takePhoto = (val) => {
  524. console.log("拍照", val)
  525. state.phoneType = val;
  526. state.showImg = true;
  527. }
  528. const confirmReturn = (val) => {
  529. if (state.choiceIndex == 3) {
  530. var imageType = 1;
  531. } else {
  532. var imageType = 2;
  533. }
  534. state.changeColor = true;
  535. state.phoneType = 0
  536. state.isTakePhotoModeShow = false
  537. uploadFile(val.tempImagePath, imageType, etcCarOcrCard).then((data) => {
  538. // uploadFile(val.tempImagePath, state.choiceIndex, ocrAllQuery).then((data) => {
  539. console.log('输出内容=====================', state.choiceIndex)
  540. if (state.choiceIndex === "3") {
  541. if (data.plate_a.length > 8) {
  542. state.form.vehicleIdNum = data.plate_a.substring(0, 8);
  543. } else {
  544. state.form.vehicleIdNum = data.plate_a;
  545. }
  546. state.form.man = data.man;
  547. state.form.vehicleType = data.vehicle;
  548. state.form.character = data.character;
  549. state.form.vin = data.vin;
  550. state.form.engineNum = data.engine;
  551. state.form.register = data.register;
  552. state.form.issueDate = data.issue;
  553. state.form.vehPosImgUrl = data.imageUrl;
  554. state.form.vehicleModel = data.model;
  555. } else {
  556. state.form.approvedCount = data.apc;
  557. state.form.approvedCountShow = data.apc;
  558. state.form.maintenaceMass = data.unladen;
  559. state.form.maintenaceMassShow = data.unladen;
  560. // 91接口差
  561. // // #ifdef MP-WEIXIN
  562. // state.form.vehicleDimensions = data.overall.replaceAll("×", "X");
  563. // // #endif
  564. // // #ifdef MP-ALIPAY
  565. // state.form.vehicleDimensions = data.overall.replace(/×/g, "X");
  566. // // #endif
  567. // let arr = data.overall.split("×");
  568. // #ifdef MP-WEIXIN
  569. state.form.vehicleDimensions = data.overall.replaceAll("x", "X");
  570. // #endif
  571. // #ifdef MP-ALIPAY
  572. state.form.vehicleDimensions = data.overall.replace(/x/g, "X");
  573. // #endif
  574. let arr = data.overall.split("x");
  575. state.outlineL = arr[0]; //外廓 长
  576. state.outlineW = arr[1]; //外廓 宽
  577. state.outlineH = arr[2].substring(0, arr[2].length - 2); //外廓 高
  578. state.form.totalMass = data.gross;
  579. state.form.totalMassShow = data.gross;
  580. state.form.vehNegImgUrl = data.imageUrl;
  581. state.form.permittedWeight = data.alc ? data.alc : 0;
  582. state.form.permittedTowWeight = data.towing ? data.towing : 0;
  583. console.log('=====================', state.form.vehNegImgUrl, state)
  584. }
  585. state.isTakePhotoModeShow = false
  586. })
  587. console.log("图片地址val", val.tempImagePath)
  588. }
  589. const takePhotoMode = (index) => {
  590. console.log("index", index)
  591. state.isTakePhotoModeShow = true
  592. state.choiceIndex = index
  593. }
  594. const cancle = () => {
  595. state.isTakePhotoModeShow = false
  596. }
  597. </script>
  598. <style lang="scss" scoped>
  599. .hui {
  600. color: #ccc;
  601. }
  602. .hei {
  603. color: black;
  604. }
  605. .goto {
  606. margin-right: 20rpx;
  607. padding: 10rpx;
  608. color: #00b38b;
  609. border: 1rpx solid #00b38b;
  610. border-radius: 20rpx;
  611. }
  612. .flex {
  613. display: flex;
  614. align-items: center;
  615. }
  616. .bettwen-center {
  617. display: flex;
  618. align-items: center;
  619. justify-content: space-between;
  620. }
  621. .card {
  622. margin: 20rpx;
  623. height: 150rpx;
  624. background: #ffffff;
  625. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  626. border-radius: 20rpx;
  627. padding: 20rpx;
  628. display: flex;
  629. justify-content: space-between;
  630. align-items: center;
  631. margin-bottom: 30rpx;
  632. .card-left {
  633. display: flex;
  634. align-items: center;
  635. image {
  636. width: 100rpx;
  637. height: 90rpx;
  638. }
  639. .card-center {
  640. margin-left: 30rpx;
  641. .card-center-head {
  642. font-size: 32rpx;
  643. font-family: Noto Sans S Chinese;
  644. font-weight: 400;
  645. color: #333333;
  646. }
  647. .tips {
  648. font-size: 26rpx;
  649. font-family: Noto Sans S Chinese;
  650. font-weight: 400;
  651. color: #666666;
  652. .tips-card {
  653. width: 70rpx;
  654. height: 40rpx;
  655. background: #d3f2ef;
  656. border-radius: 6rpx;
  657. font-size: 20rpx;
  658. font-family: Noto Sans S Chinese;
  659. font-weight: 400;
  660. color: #0a8f8a;
  661. padding: 5rpx 10rpx;
  662. margin-left: 20rpx;
  663. }
  664. }
  665. }
  666. }
  667. .choose-item {
  668. margin-right: 20rpx;
  669. width: 50rpx;
  670. height: 50rpx;
  671. border: 1rpx solid #00b38b;
  672. border-radius: 50%;
  673. display: flex;
  674. justify-content: center;
  675. align-items: center;
  676. .active {
  677. width: 38rpx;
  678. height: 38rpx;
  679. background: #00b38b;
  680. border-radius: 50%;
  681. }
  682. }
  683. }
  684. .content {
  685. position: relative;
  686. margin-top: -50rpx;
  687. padding: 0rpx 30rpx;
  688. position: relative;
  689. .img-pos {
  690. position: absolute;
  691. left: 270rpx;
  692. top: -38rpx;
  693. right: 50rpx;
  694. .img-flex {
  695. display: flex;
  696. justify-content: space-between;
  697. align-items: center;
  698. .car-img {
  699. width: 86rpx;
  700. height: 42rpx;
  701. }
  702. .flag-img {
  703. width: 30rpx;
  704. height: 35rpx;
  705. }
  706. }
  707. }
  708. .action {
  709. padding-left: 20rpx;
  710. padding-right: 20rpx;
  711. padding-bottom: 30rpx;
  712. .button {
  713. height: 80rpx;
  714. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  715. border-radius: 40rpx;
  716. font-size: 32rpx;
  717. font-weight: 400;
  718. color: #ffffff;
  719. line-height: 80rpx;
  720. }
  721. }
  722. .item-tips {
  723. .title {
  724. font-size: 30rpx;
  725. font-family: Microsoft YaHei;
  726. font-weight: 400;
  727. color: #000000;
  728. line-height: 24rpx;
  729. }
  730. .tip {
  731. margin-top: 16rpx;
  732. font-size: 24rpx;
  733. font-family: Microsoft YaHei;
  734. font-weight: 400;
  735. color: #999999;
  736. line-height: 24rpx;
  737. }
  738. }
  739. .picture-wrapper {
  740. margin-top: 40rpx;
  741. .bg {
  742. background: #ffffff;
  743. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  744. border-radius: 20rpx;
  745. padding: 40rpx;
  746. display: flex;
  747. // align-items: center;
  748. justify-content: space-between;
  749. .name {
  750. font-size: 34rpx;
  751. font-family: Microsoft YaHei;
  752. font-weight: 400;
  753. color: #000000;
  754. line-height: 34rpx;
  755. }
  756. .value {
  757. margin-top: 20rpx;
  758. font-size: 24rpx;
  759. font-family: Microsoft YaHei;
  760. font-weight: 400;
  761. color: #999999;
  762. line-height: 24rpx;
  763. }
  764. .tip {
  765. margin-top: 20rpx;
  766. text-align: center;
  767. width: 110rpx;
  768. height: 40rpx;
  769. background: rgba(33, 190, 177, 0.2);
  770. border-radius: 6rpx;
  771. .tip-value {
  772. font-size: 20rpx;
  773. font-family: Microsoft YaHei;
  774. font-weight: 400;
  775. color: #0a8f8a;
  776. line-height: 40rpx;
  777. opacity: 1;
  778. }
  779. }
  780. }
  781. .icon {
  782. width: 294rpx;
  783. height: 188rpx;
  784. }
  785. }
  786. .shibie-wrapper {
  787. margin-top: 60rpx;
  788. .title {
  789. font-size: 30rpx;
  790. font-family: Microsoft YaHei;
  791. font-weight: 400;
  792. color: #000000;
  793. line-height: 30rpx;
  794. }
  795. }
  796. .buchong-wrapper {
  797. margin-top: 60rpx;
  798. .title {
  799. font-size: 30rpx;
  800. font-family: Microsoft YaHei;
  801. font-weight: 400;
  802. color: #000000;
  803. line-height: 30rpx;
  804. }
  805. }
  806. .green-tip {
  807. margin-top: 50rpx;
  808. font-size: 24rpx;
  809. font-family: Microsoft YaHei;
  810. font-weight: 400;
  811. color: #00b38b;
  812. line-height: 24rpx;
  813. margin-bottom: 60rpx;
  814. }
  815. }
  816. .form-item {
  817. display: flex;
  818. font-size: 28rpx;
  819. justify-content: space-between;
  820. align-items: center;
  821. }
  822. .form-item label {}
  823. .form-item .input-box {
  824. display: flex;
  825. align-items: center;
  826. }
  827. .form-item .select {
  828. flex: 1;
  829. background: #f1f1f1;
  830. padding: 6rpx 20rpx;
  831. margin: 0 10rpx;
  832. min-height: 48rpx;
  833. line-height: 48rpx;
  834. border-radius: 8rpx;
  835. }
  836. .form-item .icon {
  837. width: 28rpx;
  838. height: 32rpx;
  839. }
  840. .form-item .input-box input {
  841. width: 90rpx;
  842. background: #f1f1f1;
  843. border-radius: 8rpx;
  844. padding: 0 5rpx;
  845. }
  846. .form-item .sub-text {
  847. color: #808080;
  848. padding-left: 10rpx;
  849. }
  850. .form-item .sub-label {
  851. padding: 0 10rpx;
  852. }
  853. .window {
  854. padding: 60rpx 30rpx;
  855. }
  856. .window .window-item {
  857. border: 1px solid #00b38b;
  858. background: rgba(0, 179, 139, .1);
  859. border-radius: 10rpx;
  860. padding: 16rpx 30rpx;
  861. font-size: 30rpx;
  862. margin-bottom: 10rpx;
  863. }
  864. ::v-deep .u-input__input {
  865. background: transparent;
  866. }
  867. .choice-takePhoto {
  868. position: absolute;
  869. bottom: 0;
  870. background-color: white;
  871. width: 100%;
  872. border-radius: 20rpx 20rpx 0 0;
  873. }
  874. .choice-takePhoto>view:first-child {
  875. text-align: center;
  876. height: 80rpx;
  877. line-height: 80rpx;
  878. border-bottom: 1rpx solid rgba(127, 127, 127, 0.3);
  879. background-color: white;
  880. }
  881. .choice-takePhoto>view:last-child {
  882. text-align: center;
  883. height: 80rpx;
  884. line-height: 80rpx;
  885. border-top: 6rpx solid rgba(127, 127, 127, 0.1);
  886. background-color: white;
  887. }
  888. .choice-takePhoto>view {
  889. text-align: center;
  890. height: 80rpx;
  891. line-height: 80rpx;
  892. background-color: white;
  893. }
  894. .choice-takePhoto-wrap {
  895. width: 100%;
  896. height: 100vh;
  897. background-color: rgba(127, 127, 127, 0.2);
  898. position: fixed;
  899. left: 0;
  900. top: 0;
  901. z-index: 11111;
  902. }
  903. </style>