Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

car-release.vue 49KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615
  1. <template>
  2. <navBar title="行驶证信息上传" :scrollTop="scrollTop" navbgClass="nav-bgXin" fontColor='#fff'></navBar>
  3. <navBgCar :activeNum='4'></navBgCar>
  4. <view class="content">
  5. <view class="t-card">
  6. <view class="item-tips">
  7. <view class="title"> 上传后请核对识别信息 </view>
  8. <view class="tip"> 如有错误请及时手动修改 </view>
  9. </view>
  10. <view class="picture-wrapper" @click="takePhotoMode('3')">
  11. <view class="bg">
  12. <view class="">
  13. <view class="name"> 行驶证主页 </view>
  14. <view class="value"> 上传行驶证的主页 </view>
  15. <view class="tip">
  16. <view class="tip-value"> 拍摄规范 </view>
  17. </view>
  18. </view>
  19. <image v-if="!state.form.vehPosImgUrl" class="icon" :src="`${$imgUrl}issuance/xz.png`"
  20. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  21. </image>
  22. <image v-else class="icon" :src="imgPathMontage(state.form.vehPosImgUrlName)"
  23. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  24. </view>
  25. </view>
  26. <view class="picture-wrapper" @click="takePhotoMode('4')">
  27. <view class="bg">
  28. <view class="">
  29. <view class="name"> 行驶证副页 </view>
  30. <view class="value"> 上传行驶证的副页 </view>
  31. <view class="tip">
  32. <view class="tip-value"> 拍摄规范 </view>
  33. </view>
  34. </view>
  35. <image v-if="!state.form.vehNegImgUrl" class="icon" :src="`${$imgUrl}issuance/xf.png`"
  36. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  37. </image>
  38. <image v-else class="icon" :src="imgPathMontage(state.form.vehNegImgUrlName)"
  39. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  40. </view>
  41. </view>
  42. <view class="picture-wrapper" @click="cardFileImageUpdate(1)">
  43. <view class="bg">
  44. <view class="">
  45. <view class="name"> 车头照 </view>
  46. <view class="value"> 上传汽车的45度车头照片 </view>
  47. <view class="tip">
  48. <view class="tip-value"> 拍摄规范 </view>
  49. </view>
  50. </view>
  51. <image v-if="!state.form.vehBodyUrl" class="icon" :src="`${$imgUrl}issuance/chetou.png`"
  52. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  53. </image>
  54. <image v-else class="icon" :src="imgPathMontage(state.form.vehBodyUrlName)"
  55. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  56. </view>
  57. </view>
  58. <view class="uni-list tractor">
  59. <radio-group @change="radioChange" v-if="state.form.vanType==2">
  60. <text class="title">是否是牵引车</text>
  61. <label style="margin-right: 60rpx;" class="uni-list-cell uni-list-cell-pd "
  62. v-for="(item, index) in state.items" :key="item.value">
  63. <radio :value="item.value" :checked="index === state.current" />{{item.name}}
  64. </label>
  65. </radio-group>
  66. </view>
  67. <!-- 货车 牵引车 需要传道路运输许可证-->
  68. <view class="picture-wrapper" v-if="state.form.vanType==2 && state.form.tractorSign==1"
  69. @click="cardFileImageUpdate(2)">
  70. <view class="bg">
  71. <view class="">
  72. <view class="name"> 道路运输许可证 </view>
  73. <view class="value"> 上传道路运输许可证 </view>
  74. <view class="tip">
  75. <view class="tip-value"> 拍摄规范 </view>
  76. </view>
  77. </view>
  78. <image v-if="!state.form.roadTransportPermitPicUrl" class="icon"
  79. :src="`${$imgUrl}issuance/chetou.png`"
  80. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  81. </image>
  82. <image v-else class="icon" :src="imgPathMontage(state.form.roadTransportPermitPicUrl)"
  83. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="shibie-wrapper">
  88. <view class="title"> 识别内容如下 </view>
  89. <view class="">
  90. <u-form label-width="200" :model="state.form" ref="uForm" :label-style='labelStyle'>
  91. <u-form-item label="车牌号" :left-icon='`${$imgUrl}issuance/point-form.png`'
  92. :left-icon-style='leftIcon'>
  93. <car-number-input @numberInputResult="carNumber"
  94. :defaultStr="state.form.vehiclePlate"></car-number-input>
  95. </u-form-item>
  96. <u-form-item label="所有人" :left-icon='`${$imgUrl}issuance/point-form.png`'
  97. :left-icon-style='leftIcon'>
  98. <u-input inputAlign="right" placeholder="请输入所有人" v-model="state.form.ownerName"
  99. :disabled="state.isEnableChangeOCRCarInfo" maxlength="20" />
  100. </u-form-item>
  101. <u-form-item label="车辆类型" :left-icon='`${$imgUrl}issuance/point-form.png`'
  102. :left-icon-style='leftIcon'>
  103. <u-input inputAlign="right" placeholder="请输入车辆类型" v-model="state.form.vehicleType"
  104. :disabled="state.isEnableChangeOCRCarInfo" maxlength="20" />
  105. </u-form-item>
  106. <u-form-item label="品牌型号" :left-icon='`${$imgUrl}issuance/point-form.png`'
  107. :left-icon-style='leftIcon'>
  108. <u-input inputAlign="right" placeholder="请输入品牌型号" v-model="state.form.vehicleModel"
  109. :disabled="state.isEnableChangeOCRCarInfo" maxlength="30" />
  110. </u-form-item>
  111. <u-form-item label="使用性质" :left-icon='`${$imgUrl}issuance/point-form.png`'
  112. :left-icon-style='leftIcon'>
  113. <!-- <u-input inputAlign="right" placeholder="请输入使用性质" v-model="state.form.character"
  114. :disabled="state.isEnableChangeOCRCarInfo" maxlength="20" />
  115. <picker :value="state.form.registerDate" @change="bindDateChange1"
  116. :disabled="state.isEnableChangeOCRCarInfo">
  117. <view class="uni-input" style="text-align: right;" :class="state.changeColor?'hei':'hui'">
  118. {{state.form.registerDate}}
  119. </view>
  120. </picker> -->
  121. <picker @change="bindPickerChange" placeholder="请选择使用性质"
  122. :disabled="state.isEnableChangeOCRCarInfo" range-key="name" :value="state.form.character"
  123. :range="array">
  124. <view class="uni-input" style="text-align: right;" :class="state.changeColor?'hei':'hui'">
  125. {{state.form.character}}
  126. </view>
  127. </picker>
  128. </u-form-item>
  129. <u-form-item label="车辆识别代号" :left-icon='`${$imgUrl}issuance/point-form.png`'
  130. :left-icon-style='leftIcon'>
  131. <u-input inputAlign="right" placeholder="请输入车辆识别代号" v-model="state.form.vin"
  132. :disabled="state.isEnableChangeOCRCarInfo" maxlength="50" />
  133. </u-form-item>
  134. <u-form-item label="发动机号码" :left-icon='`${$imgUrl}issuance/point-form.png`'
  135. :left-icon-style='leftIcon'>
  136. <u-input inputAlign="right" placeholder="请输入发动机号码" v-model="state.form.engineNum"
  137. :disabled="state.isEnableChangeOCRCarInfo" maxlength="20" />
  138. </u-form-item>
  139. <u-form-item label="注册日期" :left-icon='`${$imgUrl}issuance/point-form.png`'
  140. :left-icon-style='leftIcon'>
  141. <picker mode="date" :value="state.form.registerDate" @change="bindDateChange1"
  142. :disabled="state.isEnableChangeOCRCarInfo">
  143. <view class="uni-input" style="text-align: right;" :class="state.changeColor?'hei':'hui'">
  144. {{state.form.registerDate}}
  145. </view>
  146. </picker>
  147. </u-form-item>
  148. <u-form-item label="发证日期" :left-icon='`${$imgUrl}issuance/point-form.png`'
  149. :left-icon-style='leftIcon'>
  150. <picker mode="date" :value="state.form.issueDate" @change="bindDateChange2"
  151. :disabled="state.isEnableChangeOCRCarInfo">
  152. <view class="uni-input" style="text-align: right;" :class="state.changeColor?'hei':'hui'">
  153. {{state.form.issueDate}}
  154. </view>
  155. </picker>
  156. </u-form-item>
  157. <u-form-item label="核定载人数" :left-icon='`${$imgUrl}issuance/point-form.png`'
  158. :left-icon-style='leftIcon'>
  159. <u-input inputAlign="right" placeholder="请输入核定载人数" v-model="state.form.approvedCountShow"
  160. :disabled="state.isEnableChangeOCRCarInfo" maxlength="3" />
  161. </u-form-item>
  162. <u-form-item label="整备质量" :left-icon='`${$imgUrl}issuance/point-form.png`'
  163. :left-icon-style='leftIcon'>
  164. <u-input inputAlign="right" placeholder="请输入整备质量" v-model="state.form.maintenaceMassShow"
  165. :disabled="state.isEnableChangeOCRCarInfo" maxlength="7" />
  166. </u-form-item>
  167. <view class="form-item">
  168. <label class='l-label'>
  169. <image class="icon-img" :src="`${$imgUrl}issuance/point-form.png`" /><text>外廊尺寸</text>
  170. </label>
  171. <view class="input-box">
  172. <text class="sub-label">长</text>
  173. <input v-model="state.outlineL" @input="outlineInput"
  174. :disabled="state.isEnableChangeOCRCarInfo" type="number" maxlength="5" />
  175. <text class="sub-label">宽</text>
  176. <input v-model="state.outlineW" @input="outlineInput"
  177. :disabled="state.isEnableChangeOCRCarInfo" type="number" maxlength="5" />
  178. <text class="sub-label">高</text>
  179. <input v-model="state.outlineH" @input="outlineInput"
  180. :disabled="state.isEnableChangeOCRCarInfo" type="number" maxlength="5" />
  181. <text class="sub-text">mm</text>
  182. </view>
  183. </view>
  184. <u-form-item label="总质量" :left-icon='`${$imgUrl}issuance/point-form.png`'
  185. :left-icon-style='leftIcon'>
  186. <u-input inputAlign="right" placeholder="请输入总质量" v-model="state.form.totalMassShow"
  187. :disabled="state.isEnableChangeOCRCarInfo" />
  188. </u-form-item>
  189. <u-form-item label="核定载质量" v-if="state.form.permittedWeight"
  190. :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'>
  191. <u-input inputAlign="right" placeholder="核定载质量" v-model="state.form.permittedWeight"
  192. :disabled="state.isEnableChangeOCRCarInfo" />
  193. </u-form-item>
  194. <u-form-item label="车轴数" :left-icon='`${$imgUrl}issuance/point-form.png`'
  195. :left-icon-style='leftIcon'>
  196. <u-input inputAlign="right" placeholder="请输入车轴数" v-model="state.form.axleCount" type="number"
  197. maxlength="2" />
  198. </u-form-item>
  199. <view class="form-item">
  200. <label class='l-label'>
  201. <image class="icon-img" :src="`${$imgUrl}issuance/point-form.png`" /><text>车辆用户类型</text>
  202. </label>
  203. <view class="select" @click="state.actionSheetShow = true">{{state.form.useUserTypeName}}</view>
  204. <image :src="`${$imgUrl}common/arror-down.png`" class="icon"
  205. @click="state.actionSheetShow = true">
  206. </image>
  207. </view>
  208. </u-form>
  209. </view>
  210. <!-- 车主信息 -->
  211. <view class="" v-if="state.showOwner">
  212. <view class="uni-list" style="margin: 20rpx 0;">
  213. <radio-group @change="ownerRadioChange" class="ownerRadio">
  214. <label v-for="(item, index) in carOwnerList" :key="item.value">
  215. <radio :value="item.value" :checked="index === ownerCurrent">{{item.name}}</radio>
  216. </label>
  217. </radio-group>
  218. </view>
  219. <view class="" v-if="state.form.ownerIdType == '101'">
  220. <view class="t-con">
  221. <view class="item-tips">
  222. <view class="title"> 上传后请核对识别信息 </view>
  223. <view class="tip"> 如有错误请及时手动修改 </view>
  224. </view>
  225. <view class="picture-wrapper" @click="takePhotoMode('1','my')">
  226. <view class="bg">
  227. <view class="">
  228. <view class="name"> 人像面 </view>
  229. <view class="value"> 上传身份证的人像面 </view>
  230. <view class="tip">
  231. <view class="tip-value"> 拍摄规范 </view>
  232. </view>
  233. </view>
  234. <image v-if="!state.form.ownerPosImgUrl" class="icon"
  235. :src="`${$imgUrl}issuance/sfz.png`"
  236. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  237. </image>
  238. <image v-else class="icon" :src="imgPathMontage(state.form.ownerPosImgUrlName)"
  239. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image>
  240. </view>
  241. </view>
  242. <view class="picture-wrapper" @click="takePhotoMode('2','my')">
  243. <view class="bg">
  244. <view class="">
  245. <view class="name"> 国徽面 </view>
  246. <view class="value"> 上传身份证的国徽面 </view>
  247. <view class="tip">
  248. <view class="tip-value"> 拍摄规范 </view>
  249. </view>
  250. </view>
  251. <image v-if="!state.form.ownerNegImgUrl" class="icon"
  252. :src="`${$imgUrl}issuance/sff.png`"
  253. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}">
  254. </image>
  255. <image v-else class="icon" :src="imgPathMontage(state.form.ownerNegImgUrlName)"
  256. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image>
  257. </view>
  258. </view>
  259. <view class="picture-wrapper" @click="cardFileImageUpdate(99)">
  260. <view class="bg">
  261. <view class="">
  262. <view class="name"> 委托书 </view>
  263. <view class="value"> 上传文字清晰的委托书 </view>
  264. <view class="tip">
  265. <view class="tip-value"> 拍摄规范 </view>
  266. </view>
  267. </view>
  268. <image v-if="!state.form.proxyUrl" class="icon" :src="`${$imgUrl}issuance/weituo.png`"
  269. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}">
  270. </image>
  271. <image v-else class="icon" :src="imgPathMontage(state.form.proxyUrlName)"
  272. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image>
  273. </view>
  274. </view>
  275. </view>
  276. <view class="shibie-wrapper">
  277. <view class="title"> 识别内容如下 </view>
  278. <u-form label-width="230" :model="state.form" ref="uForm" :label-style='labelStyle'>
  279. <u-form-item label="车主姓名" :left-icon='`${$imgUrl}issuance/point-form.png`'
  280. :left-icon-style='leftIcon'>
  281. <u-input v-model="state.form.idName" placeholder='请输入车主姓名' maxlength="20"
  282. @input="replaceInput" inputAlign="right" />
  283. </u-form-item>
  284. <u-form-item label="车主身份证号" :left-icon='`${$imgUrl}issuance/point-form.png`'
  285. :left-icon-style='leftIcon'>
  286. <u-input placeholder='请输入车主身份证' type="idcard" v-model="state.form.ownerIdNum"
  287. maxlength="18" inputAlign="right" />
  288. </u-form-item>
  289. <u-form-item label="车主地址" :left-icon='`${$imgUrl}issuance/point-form.png`'
  290. :left-icon-style='leftIcon'>
  291. <u-input placeholder='请输入车主地址' :autoHeight='true' v-model="state.form.ownerIdAddress"
  292. maxlength="50" inputAlign="right" />
  293. </u-form-item>
  294. <u-form-item label="车主联系方式" :left-icon='`${$imgUrl}issuance/point-form.png`'
  295. :left-icon-style='leftIcon'>
  296. <u-input placeholder='请输入车主联系方式' type="number" v-model="state.form.ownerTel"
  297. maxlength="11" inputAlign="right" />
  298. </u-form-item>
  299. </u-form>
  300. </view>
  301. </view>
  302. <view class="" v-if="state.form.ownerIdType == '203'">
  303. <view class="t-con">
  304. <view class="item-tips">
  305. <view class="title"> 上传后请核对识别信息 </view>
  306. <view class="tip"> 如有错误请及时手动修改 </view>
  307. </view>
  308. <view class="picture-wrapper" @click="cardImageOcrYY()">
  309. <view class="bg">
  310. <view class="">
  311. <view class="name"> 营业执照 </view>
  312. <view class="value"> 上传企业的营业执照 </view>
  313. <view class="tip">
  314. <view class="tip-value"> 拍摄规范 </view>
  315. </view>
  316. </view>
  317. <image v-if="!state.form.ownerPosImgUrl" class="icon"
  318. :src="`${$imgUrl}applyCard/zhizhao.png`"
  319. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  320. </image>
  321. <image v-else class="icon" :src="strReplace(state.form.ownerPosImgUrlName)"
  322. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  323. </view>
  324. </view>
  325. </view>
  326. <view class="shibie-wrapper">
  327. <view class="title"> 识别内容如下 </view>
  328. <u-form label-width="230" :model="state.form" ref="uForm" :label-style='labelStyle'>
  329. <u-form-item label="公司名称" :left-icon='`${$imgUrl}issuance/point-form.png`'
  330. :left-icon-style='leftIcon'>
  331. <u-input v-model="state.form.idName" placeholder='请输入公司名称' maxlength="20"
  332. @input="replaceInput" inputAlign="right" />
  333. </u-form-item>
  334. <u-form-item label="社会信用代码" :left-icon='`${$imgUrl}issuance/point-form.png`'
  335. :left-icon-style='leftIcon'>
  336. <u-input placeholder='请输入社会信用代码' type="idcard" v-model="state.form.ownerIdNum"
  337. maxlength="18" inputAlign="right" />
  338. </u-form-item>
  339. <u-form-item label="地址" :left-icon='`${$imgUrl}issuance/point-form.png`'
  340. :left-icon-style='leftIcon'>
  341. <u-input placeholder='请输入地址' :autoHeight='true' v-model="state.form.ownerIdAddress"
  342. maxlength="50" inputAlign="right" />
  343. </u-form-item>
  344. <u-form-item label="联系方式" :left-icon='`${$imgUrl}issuance/point-form.png`'
  345. :left-icon-style='leftIcon'>
  346. <u-input placeholder='请输入联系方式' type="number" v-model="state.form.ownerTel"
  347. maxlength="11" inputAlign="right" />
  348. </u-form-item>
  349. </u-form>
  350. </view>
  351. </view>
  352. </view>
  353. </view>
  354. <view class="action">
  355. <view class="btn-tip">
  356. 如识别信息有误,请手动修改,确认无误后,点击下一步!
  357. </view>
  358. <button type="default" class="ui-btn" @click="savaHandle()">
  359. 下一步
  360. </button>
  361. </view>
  362. </view>
  363. <!-- 车辆类型弹窗 -->
  364. <u-popup mode="bottom" v-model="state.actionSheetShow">
  365. <view class="window">
  366. <view class="window-item" v-for="item in state.actionSheetList" :key="item.value" @click="userType(item)">
  367. {{item.text}}
  368. </view>
  369. </view>
  370. </u-popup>
  371. <u-popup mode="bottom" v-model="state.show">
  372. <view v-if="state.data.transferLogs && state.data.transferLogs.length" class="">
  373. <view class="bettwen-center">
  374. <view style="padding: 20rpx" class="title"> 选择卡签 </view>
  375. <view class="goto" @click="pass"> 直接跳过,不使用此套卡签 </view>
  376. </view>
  377. <view @click="guohuAction(item)" class="card" v-for="(item, index) in state.data.transferLogs" :key="index"
  378. style="margin-top: 30rpx; margin-bottom: 30rpx">
  379. <view v-if="item.status === 'WAITING'" class="card-left">
  380. <image :src="`${$imgUrl}card2.png`" mode=""></image>
  381. <view class="card-center">
  382. <view class="flex">
  383. <view class=""> 卡号: </view>
  384. <view class="card-center-head">
  385. {{ item.cardId }}
  386. </view>
  387. </view>
  388. <view style="margin-top: 10rpx" class="flex">
  389. <view class=""> OBU编号: </view>
  390. <view class="card-center-head">
  391. {{ item.obuId }}
  392. </view>
  393. </view>
  394. </view>
  395. </view>
  396. </view>
  397. </view>
  398. </u-popup>
  399. <uploadImg :isTakePhotoModeShow="state.isTakePhotoModeShow" :phoneType="state.choiceIndex" @close="close"
  400. @ocrResult="ocrResult">
  401. </uploadImg>
  402. </template>
  403. <script setup lang="ts">
  404. import { reactive, ref } from "vue";
  405. import uploadImg from '@/components/uploadOcr';
  406. import navBgCar from "./components/nav-bg-car1";
  407. import navBar from "@/components/nav-bar/nav-bar2.vue";
  408. import carNumberInput from "@/components/car-number-input/car-number-input.vue";
  409. import {
  410. etcCarCardInfoSubmit,
  411. queryGuoHuJianCe,
  412. queryGuoHuCaoZuo,
  413. carMessageApi,
  414. vehicleUpload,
  415. vehicleLicenseOcr,
  416. vehicUsePropert,
  417. vehicCharge,
  418. ocrAllQuery,
  419. } from "@/utils/network/api.js";
  420. import { request, requestNew } from "@/utils/network/request.js";
  421. import { stringToJson } from "@/utils/network/encryption";
  422. import { onLoad, onPageScroll } from "@dcloudio/uni-app";
  423. import { getItem, StorageKeys } from "@/utils/storage";
  424. import { msg, strReplace, imgPathMontage, hasLogin, uploadFile, compressImage, chooseImageCompress } from "@/utils/utils";
  425. import { navTo } from "@/utils/utils";
  426. import {
  427. getCodeName
  428. } from "@/datas/queryKey.js";
  429. const scrollTop = ref(0);
  430. const labelStyle = {
  431. color: "#004576",
  432. fontSize: "28rpx",
  433. }
  434. const leftIcon = {
  435. height: '100%',
  436. width: '8rpx',
  437. display: 'flex',
  438. 'align-items': 'center',
  439. 'margin-right': '3rpx',
  440. }
  441. const array = [
  442. {
  443. name: "家庭自用",
  444. value: "1"
  445. }, {
  446. name: "非营业客车",
  447. value: "2"
  448. }, {
  449. name: "营业客车",
  450. value: "3"
  451. }, {
  452. name: "非营业货车",
  453. value: "4"
  454. }, {
  455. name: "营业货车",
  456. value: "5"
  457. }, {
  458. name: "特种车",
  459. value: "6"
  460. }, {
  461. name: "挂车",
  462. value: "7"
  463. }, {
  464. name: "应急救援车",
  465. value: "8"
  466. }
  467. ]
  468. let index = 0;
  469. function bindPickerChange(e) {
  470. console.log('picker发送选择改变,携带值为', e.detail.value)
  471. index = e.detail.value;
  472. state.form.character = array[e.detail.value].name
  473. }
  474. //监听页面滚动
  475. onPageScroll((e) => {
  476. scrollTop.value = e.scrollTop;
  477. });
  478. const close = (e) => {
  479. console.log("e", e)
  480. state.isTakePhotoModeShow = e
  481. }
  482. //车牌号输入
  483. const carNumber = (val : any) => {
  484. state.form.vehiclePlate = val.trim();
  485. };
  486. const camera = () => {
  487. state.phoneType = 0
  488. }
  489. const carOwnerList = ref([
  490. { name: "个人", value: "101" },
  491. { name: "企业", value: "203" },
  492. ])
  493. const ownerCurrent = ref(0);
  494. const ownerRadioChange = (evt) => {
  495. console.log(evt)
  496. state.form.ownerIdType = evt.detail.value;
  497. // if (state.form.ownerIdType != evt.detail.value) {
  498. state.form.idName = "";
  499. state.form.ownerIdNum = "";
  500. state.form.ownerIdAddress = "";
  501. state.form.ownerPosImgUrl = "";
  502. state.form.proxyUrl = "";
  503. state.form.ownerNegImgUrl = "";
  504. state.form.ownerTel = "";
  505. // }
  506. for (let i = 0; i < this.items.length; i++) {
  507. if (this.items[i].value === evt.detail.value) {
  508. ownerCurrent.value = i;
  509. break;
  510. }
  511. }
  512. }
  513. // 获取车辆使用性质
  514. const getCharacter = (options) => {
  515. let data = {
  516. "approvedCount": state.form.approvedCount,
  517. "axleCount": state.form.axleCount,
  518. "totalMass": state.form.totalMass,
  519. "vanType": state.form.vanType,
  520. "vehicleDimensions": state.form.vehicleDimensions,
  521. "plateNum": state.form.vehiclePlate,
  522. "vehicleTypeName": state.form.vehicleType,
  523. "vehicleUsePropertName": state.form.character
  524. }
  525. let params = {
  526. type: 2,
  527. data: data,
  528. method: "POST",
  529. showLoading: true,
  530. };
  531. requestNew(vehicCharge, params)
  532. .then((res) => {
  533. let data = {
  534. ...options,
  535. character: res.vehicUse || array[index].value,
  536. feeVehicleType: res.feeVehicleType,
  537. }
  538. let params = {
  539. type: 2,
  540. data: data,
  541. method: "POST",
  542. showLoading: true,
  543. };
  544. requestNew(vehicleUpload, params)
  545. .then((resIn) => {
  546. if (resIn.flag == 1) {
  547. // 车辆信息与用户信息不符,上传车主信息
  548. state.showOwner = true;
  549. state.form.ownerIdType = "101";
  550. } else if (resIn.flag == 2) {
  551. if (resIn.approvalStatus == 2) {
  552. // 会详细列出具体字段的错误信息。
  553. // uni.showModal({
  554. // title: '提示',
  555. // content: "等待人工审核",
  556. // success: function (res) {
  557. // if (res.confirm) {
  558. // } else if (res.cancel) {
  559. // console.log('用户点击取消2');
  560. // }
  561. // }
  562. // });
  563. navTo(
  564. `/subpackage/orders/product-detail?orderId=${state.form.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&vehicleId=${state.form.vehicleId}`,
  565. );
  566. }
  567. }
  568. })
  569. .catch((err) => {
  570. console.log(err);
  571. });
  572. })
  573. .catch((err) => {
  574. console.log(err);
  575. });
  576. }
  577. //提交车辆信息
  578. const savaHandle = () => {
  579. if (!state.form.vehPosImgUrl) {
  580. msg("请上传行驶证的主页");
  581. return;
  582. }
  583. if (!state.form.vehNegImgUrl) {
  584. msg("请上传行驶证的副页");
  585. return;
  586. }
  587. if (!state.form.vehBodyUrl) {
  588. msg("请上传车头照");
  589. return;
  590. }
  591. if (!state.form.ownerName) {
  592. msg("请输入所有人");
  593. return;
  594. }
  595. if (!state.form.vehicleType) {
  596. msg("请输入车辆类型");
  597. return;
  598. }
  599. if (!state.form.character) {
  600. msg("请输入使用性质");
  601. return;
  602. }
  603. if (!state.form.vin) {
  604. msg("请输入车辆识别代号");
  605. return;
  606. }
  607. if (!state.form.engineNum) {
  608. msg("请输入发动机号码");
  609. return;
  610. }
  611. if (!state.form.approvedCountShow) {
  612. msg("请输入核定载人数");
  613. return;
  614. }
  615. if (!state.outlineL || state.outlineL == '0') {
  616. msg("请输入外廊尺寸长");
  617. return;
  618. }
  619. if (!state.outlineW || state.outlineW == '0') {
  620. msg("请输入外廊尺寸宽");
  621. return;
  622. }
  623. if (!state.outlineH || state.outlineH == '0') {
  624. msg("请输入外廊尺寸高");
  625. return;
  626. }
  627. console.log("state.form.tractorSign", state.form.tractorSign, state.form.roadTransportPermitPicUrl)
  628. if (state.form.tractorSign == 1 && !state.form.roadTransportPermitPicUrl) {
  629. msg("请上传道路运输许可证");
  630. return;
  631. }
  632. if (state.form.vanType == 1) {
  633. state.form.axleCount = 2;
  634. } else {
  635. if (!state.form.axleCount) {
  636. msg("请输入车轴数");
  637. return;
  638. }
  639. }
  640. state.form.vehicleId =
  641. state.form.vehiclePlate + "_" + state.vehiclePlateColor;
  642. state.form.opId = getItem(StorageKeys.OpenId);
  643. state.form.approvedCount = parseFloat(state.form.approvedCount);
  644. state.form.maintenaceMass = parseFloat(state.form.maintenaceMass);
  645. // state.form.totalMass = parseFloat(state.form.totalMass);
  646. state.form.permittedWeight = parseFloat(state.form.permittedWeight);
  647. state.form.permittedTowWeight = parseFloat(state.form.permittedTowWeight);
  648. console.log("state.form.approvedCountShow", state.form.approvedCountShow, state.form.approvedCountShow.toString().indexOf('人'))
  649. // return;
  650. if (state.form.approvedCountShow.toString().indexOf('人') > 0) {
  651. state.form.approvedCount = state.form.approvedCountShow.replace("人", "");
  652. } else {
  653. state.form.approvedCount = state.form.approvedCountShow;
  654. }
  655. if (state.form.maintenaceMassShow.toString().indexOf('kg') > 0) {
  656. state.form.maintenaceMass = state.form.maintenaceMassShow.replace("kg", "");
  657. } else {
  658. state.form.maintenaceMass = state.form.maintenaceMassShow;
  659. }
  660. console.log("state.form.totalMassShow", state.form.totalMassShow)
  661. if (state.form.totalMassShow.toString().indexOf('kg') > 0) {
  662. state.form.totalMass = state.form.totalMassShow.replace("kg", "");
  663. } else {
  664. state.form.totalMass = state.form.totalMassShow;
  665. }
  666. const options = {
  667. type: 2,
  668. data: state.form,
  669. method: "POST",
  670. showLoading: true,
  671. };
  672. getCharacter(state.form);
  673. };
  674. const pass = () => {
  675. state.show = false
  676. state.form.vehicleId =
  677. state.form.vehiclePlate + "_" + state.vehiclePlateColor;
  678. state.form.opId = getItem(StorageKeys.OpenId);
  679. state.form.approvedCount = parseFloat(state.form.approvedCount);
  680. state.form.maintenaceMass = parseFloat(state.form.maintenaceMass);
  681. state.form.totalMass = parseFloat(state.form.totalMass);
  682. state.form.permittedWeight = parseFloat(state.form.permittedWeight);
  683. state.form.permittedTowWeight = parseFloat(state.form.permittedTowWeight);
  684. const options = {
  685. type: 2,
  686. data: state.form,
  687. method: "POST",
  688. showLoading: true,
  689. };
  690. request(etcCarCardInfoSubmit, options).then((res) => {
  691. uni.redirectTo({
  692. url: `/subpackage/orders/product-detail?orderId=${state.form.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&vehicleId=${state.form.vehicleId}`,
  693. });
  694. })
  695. }
  696. const selectConfirm = (index : any) => {
  697. console.log(index);
  698. state.form.useUserType = state.actionSheetList[index].value;
  699. state.form.useUserTypeName = state.actionSheetList[index].text;
  700. };
  701. //选择车辆用户类型
  702. const userType = (item : any) => {
  703. state.form.useUserType = item.value;
  704. state.form.useUserTypeName = item.text;
  705. state.actionSheetShow = false;
  706. }
  707. //车头照图片上传 val 1 车头照 2 道路运输证 5 委托书
  708. const cardFileImageUpdate = (val) => {
  709. uni.chooseImage({
  710. count: 1, //只能选取一张照片
  711. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  712. sourceType: ["camera", "album"], //从相册选择
  713. success: function (res) {
  714. uploadFile(res.tempFilePaths[0], val).then((data : any) => {
  715. if (val == 1) {
  716. state.form.vehBodyUrl = data.imageUrl;
  717. state.form.vehBodyUrlName = data.imageName;
  718. } else if (val == 99) {
  719. state.form.proxyUrl = data.imageUrl;
  720. state.form.proxyUrlName = data.imageName;
  721. } else {
  722. state.form.roadTransportPermitPicUrl = data.imageUrl;
  723. state.form.roadTransportPermitPicUrlName = data.imageName;
  724. }
  725. })
  726. },
  727. });
  728. };
  729. const state = reactive({
  730. phoneType: 0, // 1 身份证正面 2 身份证反面 3行驶证正面 4行驶证反面
  731. choiceIndex: 1, // 1 身份证正面 2 身份证反面
  732. isTakePhotoModeShow: false, //选择拍照方式是否出来
  733. changeColor: false,
  734. showImg: true,
  735. images: '',
  736. showOwner: false,
  737. data: {
  738. transferLogs: [],
  739. },
  740. actionSheetShow: false,
  741. actionSheetList: [],
  742. form: {
  743. orderNo: "", //订单ID
  744. character: "", //使用性质
  745. registerDate: "请输入注册日期", //注册日期
  746. vehiclePlateColor: "",
  747. customerId: "", //用户编号
  748. vehicleId: "",
  749. vehiclePlate: "", //车牌编号
  750. issueDate: "请输入发证日期", //发证日期
  751. vehPosImgUrl: "", //行驶证正面
  752. vehNegImgUrl: "", //行驶证证反面
  753. vanType: 1, //1,客车 2.货车
  754. useUserType: 0, //车辆用户类型
  755. useUserTypeName: "普通车",
  756. vehicleSign: 2, //前/后装标识
  757. vin: "", //车辆识别代号
  758. engineNum: "", //发动机号码
  759. vehicleType: "", //车辆类型
  760. vehicleModel: "", //行驶证品牌型号
  761. approvedCount: undefined, //核定人数
  762. approvedCountShow: undefined,//展示的
  763. totalMass: undefined, //总质量
  764. totalMassShow: undefined, //总质量
  765. maintenaceMass: undefined, //整备质量
  766. maintenaceMassShow: undefined, //整备质量展示的
  767. permittedWeight: "", //核定载质量
  768. vehicleDimensions: "", //车辆尺寸
  769. permittedTowWeight: "", //准牵引总质量
  770. axleCount: 2, //车轴数
  771. ownerName: "", //车主姓名
  772. ownerIdType: "", //车主证件类型
  773. ownerIdNum: "", //车主证件号码
  774. ownerPosImgUrl: "", //车主证件正面图片
  775. ownerNegImgUrl: "", //车主证件反面图片
  776. agreementId: "", //签约编号
  777. channelId: "5201018892300000001", //编号渠道
  778. scenePayType: "", //
  779. transportIdNum: "", //道路运输证编号
  780. licenseIdNum: "", //经营许可证编号
  781. vehBodyUrl: "", //车身照片
  782. proxyUrl: "", //委托书地址
  783. roadTransportPermitPicUrl: "", //道路运输许可证
  784. opId: "",
  785. tractorSign: 0, //是否是牵引车 1 是 0 不是
  786. "emergencyFlag": 0,
  787. "feeVehicleType": 0,
  788. "idName": "",
  789. "ownerIdAddress": "",
  790. "ownerTel": "",
  791. },
  792. vehiclePlateColor: undefined,
  793. orderNo: "",
  794. // type: undefined, //标记来源是否登录 1为未登录数据 - 需要新增地址
  795. show: false,
  796. isMyPeopple: true,
  797. outlineL: "",
  798. outlineW: "",
  799. outlineH: "",
  800. isEnableChangeOCRCarInfo: false, //申办时是否允许修改OCR识别出来的车辆信息数据
  801. items: [{
  802. value: '1',
  803. name: '是',
  804. },
  805. {
  806. value: '0',
  807. name: '否',
  808. checked: 'true'
  809. }],
  810. current: "1",
  811. });
  812. onLoad((option : any) => {
  813. state.form.orderNo = option.orderId;
  814. state.form.vanType = Number(option.vanType);
  815. state.vehiclePlateColor = option.vehiclePlateColor;
  816. state.form.vehiclePlateColor = option.vehiclePlateColor;
  817. if (option.vehicleId) {
  818. state.form.vehicleId = option.vehicleId;
  819. }
  820. console.log("option", option)
  821. // getGlobalParam();
  822. if (option.vanType == 1) {
  823. state.actionSheetList = [{
  824. text: "普通车",
  825. value: 0,
  826. }]
  827. } else {
  828. state.actionSheetList = [{
  829. text: "普通车",
  830. value: 0,
  831. },
  832. {
  833. text: "道路运输证经营范围仅有“货物专用运输(集装箱) ”的牵引车办理J类型集装箱",
  834. value: 24,
  835. },
  836. {
  837. text: "道路运输证经营范围不含“货物专用运输(集装箱)”的牵引车",
  838. value: 27,
  839. },
  840. {
  841. text: '道路运输证经营范围除“货物专用运输 (集装 箱)"外,还有“普通货运”等其他项目的牵引车办理J2类型集装箱',
  842. value: 28,
  843. }]
  844. }
  845. });
  846. //外廓尺寸输入框
  847. const outlineInput = (e) => {
  848. state.form.vehicleDimensions =
  849. state.outlineL + "X" + state.outlineW + "X" + state.outlineH + "mm";
  850. };
  851. //过户检测
  852. const queryGuoHuJianCeAction = () => {
  853. var data = {
  854. orderId: state.form.orderNo,
  855. };
  856. const options = {
  857. type: 2,
  858. data: data,
  859. method: "POST",
  860. showLoading: true,
  861. };
  862. return new Promise(async (resolve, reject) => {
  863. const res = await request(queryGuoHuJianCe, options);
  864. const data = stringToJson(res.bizContent);
  865. console.log("过户检测111", data)
  866. resolve(data);
  867. }).catch((error) => {
  868. reject(error);
  869. });
  870. };
  871. //过户操作
  872. const guohuAction = (val) => {
  873. var data = {
  874. orderId: state.form.orderNo,
  875. serviceType: "USE",
  876. obuId: val.obuId,
  877. cardId: val.cardId,
  878. };
  879. const options = {
  880. type: 2,
  881. data: data,
  882. method: "POST",
  883. showLoading: true,
  884. };
  885. return new Promise(async (resolve, reject) => {
  886. const res = await request(queryGuoHuCaoZuo, options);
  887. const data = stringToJson(res.bizContent);
  888. state.show = false;
  889. uni.redirectTo({
  890. url: `/subpackage/orders/product-detail?orderId=${state.form.orderNo}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}&&isValueCard=${getItem("isValueCard")}&vehicleId=${state.form.vehicleId}`,
  891. });
  892. }).catch((error) => {
  893. reject(error);
  894. });
  895. };
  896. const getGlobalParam = () => {
  897. const data = getItem('globalParam')
  898. getCarMessage();
  899. // console.log("全局配置数据", getCodeName('IS_ENABLE', data.applyChangeOCRCarInfo))
  900. // // 申办时是否允许修改OCR识别出来的车辆信息数据
  901. // if (getCodeName('IS_ENABLE', data.applyChangeOCRCarInfo) == '启用') {
  902. // state.isEnableChangeOCRCarInfo = false;
  903. // } else {
  904. // state.isEnableChangeOCRCarInfo = true;
  905. // }
  906. // // 中办时是否允许带出车辆信息
  907. // console.log("11", getCodeName('IS_ENABLE', data.applyCarInfo))
  908. // if (getCodeName('IS_ENABLE', data.applyCarInfo) == '启用') {
  909. // // 获取车辆信息
  910. // getCarMessage()
  911. // console.log("11")
  912. // }
  913. }
  914. const getCarMessage = () => {
  915. const options = {
  916. type: 2,
  917. data: {
  918. vehicleId: state.form.vehicleId,
  919. },
  920. method: "POST",
  921. showLoading: true,
  922. };
  923. request(carMessageApi, options).then((res) => {
  924. const data = stringToJson(res.bizContent);
  925. console.log("通过vehicleId查询车辆信息", data)
  926. if (data.statusCode == 0) {
  927. writeMsg(data.data)
  928. }
  929. })
  930. }
  931. const writeMsg = (allData) => {
  932. console.log("车辆信息", allData);
  933. state.form.ownerPosImgUrl = allData['ownerPosImgUrl']
  934. state.form.ownerNegImgUrl = allData['ownerNegImgUrl']
  935. state.form.userName = allData['contacts']
  936. state.form.userIdNum = allData['ownerIdNum']
  937. state.form.ownerIdNum = allData['ownerIdNum']
  938. state.form.address = allData['ownerAddress']
  939. state.form.tel = allData['ownerTel']
  940. state.form.vehPosImgUrl = allData['vehPosImgUrl']
  941. state.form.vehNegImgUrl = allData['vehNegImgUrl']
  942. state.form.vehBodyUrl = allData['vehBodyUrl']
  943. state.form.vehiclePlate = allData['vehiclePlate']
  944. state.form.ownerName = allData['ownerName']
  945. state.form.vehicleType = allData['vehicleType']
  946. if (allData['useCharacter'] == 1) {
  947. state.form.character = "营运" //使用性质
  948. } else if (allData['useCharacter'] == 2) {
  949. state.form.character = "非营运" //使用性质
  950. } else {
  951. state.form.character = "未知" //使用性质
  952. }
  953. state.form.vin = allData['vin']
  954. state.form.engineNum = allData['engineNum']
  955. state.form.registerDate = allData['registerDate']
  956. state.form.issueDate = allData['issueDate']
  957. state.form.approvedCountShow = allData['approvedCount']
  958. state.form.maintenaceMassShow = allData['maintenaceMass']
  959. state.form.approvedCount = allData['approvedCount']
  960. state.form.maintenaceMass = allData['maintenaceMass']
  961. allData['vehicleDimensions']
  962. state.form.vehicleDimensions = allData['vehicleDimensions']
  963. let arr = allData['vehicleDimensions'].split("X");
  964. state.outlineL = parseInt(arr[0]); //外廓 长
  965. state.outlineW = parseInt(arr[1]); //外廓 宽
  966. state.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高
  967. state.form.totalMassShow = allData['totalMass']
  968. state.form.totalMass = allData['totalMass']
  969. state.form.axleCount = allData['axleCount'] ? allData['axleCount'] : 2
  970. if (allData['useUserType'] == 0) {
  971. state.form.useUserTypeName = "普通车"
  972. } else if (allData['useUserType'] == 24) {
  973. state.form.useUserTypeName = "道路运输证经营范围仅有“货物专用运输(集装箱) ”的牵引车办理J类型集装箱"
  974. } else if (allData['useUserType'] == 27) {
  975. state.form.useUserTypeName = "道路运输证经营范围不含“货物专用运输(集装箱)”的牵引车"
  976. } else if (allData['useUserType'] == 28) {
  977. state.form.useUserTypeName = "道路运输证经营范围除'货物专用运输 (集装 箱)'外,还有“普通货运”等其他项目的牵引车办理J2类型集装箱"
  978. }
  979. state.vehiclePlateColor = allData['vehiclePlateColor']
  980. state.form.customerId = allData['customerId']
  981. state.form.vehicleModel = allData['vehicleModel']
  982. state.form.permittedWeight = allData['permittedWeight'] ? allData['permittedWeight'] : 0;
  983. state.form.permittedTowWeight = allData['permittedTowWeight']
  984. state.changeColor = true
  985. if (allData['tractorSign'] == "1") {
  986. qian()
  987. state.form.roadTransportPermitPicUrl = allData['roadTransportPermitPicUrl']
  988. } else {
  989. notQian()
  990. }
  991. }
  992. const bindDateChange1 = (e) => {
  993. state.form.registerDate = e.detail.value
  994. state.changeColor = true;
  995. }
  996. const bindDateChange2 = (e) => {
  997. state.form.issueDate = e.detail.value
  998. state.changeColor = true;
  999. }
  1000. const takePhoto = (val) => {
  1001. console.log("拍照", val)
  1002. state.phoneType = val;
  1003. state.showImg = true;
  1004. }
  1005. const ocrResult = (data) => {
  1006. state.changeColor = true;
  1007. console.log('输出内容=====================', state.choiceIndex)
  1008. console.log("上传数据:", data)
  1009. if (state.choiceIndex === "3") {
  1010. // 行驶证正面
  1011. if (data.plate_a.length > 8) {
  1012. state.form.vehiclePlate = data.plate_a.substring(0, 8);
  1013. } else {
  1014. state.form.vehiclePlate = data.plate_a;
  1015. }
  1016. state.form.ownerName = data.man;
  1017. state.form.vehicleType = data.vehicle;
  1018. state.form.character = data.character;
  1019. state.form.vin = data.vin;
  1020. state.form.engineNum = data.engine;
  1021. state.form.registerDate = data.register;
  1022. state.form.issueDate = data.issue;
  1023. state.form.vehPosImgUrl = data.imageUrl;
  1024. state.form.vehPosImgUrlName = data.imageName;
  1025. state.form.vehicleModel = data.model;
  1026. console.log("走不是牵引车的", data.vehicle.indexOf('牵引车'), data.vehicle)
  1027. if (data.vehicle.indexOf('牵引车') > 0) {
  1028. console.log("是牵引车的")
  1029. qian()
  1030. } else {
  1031. console.log("走不是牵引车的")
  1032. notQian()
  1033. }
  1034. } else if (state.choiceIndex === "4") {
  1035. // 行驶证反面
  1036. state.form.approvedCount = data.apc;
  1037. state.form.approvedCountShow = data.apc;
  1038. state.form.maintenaceMass = data.unladen;
  1039. state.form.maintenaceMassShow = data.unladen;
  1040. // 91接口差
  1041. // // #ifdef MP-WEIXIN
  1042. // state.form.vehicleDimensions = data.overall.replaceAll("×", "X");
  1043. // // #endif
  1044. // // #ifdef MP-ALIPAY
  1045. // state.form.vehicleDimensions = data.overall.replace(/×/g, "X");
  1046. // // #endif
  1047. // let arr = data.overall.split("×");
  1048. // #ifdef MP-WEIXIN
  1049. state.form.vehicleDimensions = data.overall.replaceAll("x", "X");
  1050. // #endif
  1051. // #ifdef MP-ALIPAY
  1052. state.form.vehicleDimensions = data.overall.replace(/x/g, "X");
  1053. // #endif
  1054. let arr = state.form.vehicleDimensions.split("X");
  1055. state.outlineL = arr[0]; //外廓 长
  1056. state.outlineW = arr[1]; //外廓 宽
  1057. state.outlineH = arr[2].substring(0, arr[2].length - 2); //外廓 高
  1058. state.form.totalMass = data.gross ? data.gross : 0;
  1059. state.form.totalMassShow = data.gross ? data.gross : 0;
  1060. console.log("state.form.totalMassShow", state.form.totalMassShow)
  1061. state.form.vehNegImgUrl = data.imageUrl;
  1062. state.form.vehNegImgUrlName = data.imageName;
  1063. state.form.permittedWeight = data.alc ? data.alc : 0;
  1064. state.form.permittedTowWeight = data.towing ? data.towing : 0;
  1065. console.log('=====================', state.form.vehNegImgUrl, state)
  1066. } else if (state.choiceIndex === "1") {
  1067. // 车主身份证正面
  1068. state.form.idName = data.name;
  1069. state.form.ownerIdNum = data.idno;
  1070. state.form.ownerIdAddress = data.address;
  1071. state.form.ownerPosImgUrl = data.imageUrl;
  1072. state.form.ownerPosImgUrlName = data.imageName;
  1073. } else if (state.choiceIndex === "2") {
  1074. // 车主身份证反面
  1075. state.form.ownerNegImgUrl = data.imageUrl;
  1076. state.form.ownerNegImgUrlName = data.imageName;
  1077. } else if (state.choiceIndex === "5") {
  1078. // 委托书
  1079. state.form.proxyUrl = data.imageUrl;
  1080. state.form.proxyUrlName = data.imageName;
  1081. }
  1082. }
  1083. //营业执照Orc接口调用
  1084. const cardImageOcrYY = () => {
  1085. uni.chooseImage({
  1086. count: 1, //只能选取一张照片
  1087. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  1088. sourceType: ["camera", "album"], //从相册选择
  1089. success: function (res) {
  1090. uploadFile(res.tempFilePaths[0], "5").then((data : any) => {
  1091. console.log("data", data)
  1092. state.form.idName = data.unitName;
  1093. state.form.ownerIdNum = data.screditCode;
  1094. state.form.ownerIdAddress = data.adress;
  1095. // state.form.ownerTel = data.address;
  1096. state.form.ownerPosImgUrl = data.imageUrl;
  1097. state.form.ownerPosImgUrlName = data.imageName;
  1098. })
  1099. },
  1100. });
  1101. };
  1102. const takePhotoMode = (index) => {
  1103. console.log("index", index)
  1104. state.isTakePhotoModeShow = true
  1105. state.choiceIndex = index
  1106. }
  1107. const radioChange = (evt) => {
  1108. console.log("evt.detail.value", evt.detail.value)
  1109. for (let i = 0; i < state.items.length; i++) {
  1110. if (state.items[i].value === evt.detail.value) {
  1111. state.current = i;
  1112. state.form.tractorSign = evt.detail.value;
  1113. break;
  1114. }
  1115. }
  1116. }
  1117. // 牵引车
  1118. const qian = () => {
  1119. state.items = [{
  1120. value: '1',
  1121. name: '是',
  1122. checked: 'true'
  1123. },
  1124. {
  1125. value: '0',
  1126. name: '否',
  1127. }]
  1128. for (let i = 0; i < state.items.length; i++) {
  1129. console.log("")
  1130. if (state.items[i].value === '1') {
  1131. state.current = i;
  1132. state.form.tractorSign = 1;
  1133. break;
  1134. }
  1135. }
  1136. }
  1137. // 不是牵引车
  1138. const notQian = () => {
  1139. state.items = [{
  1140. value: '1',
  1141. name: '是',
  1142. },
  1143. {
  1144. value: '0',
  1145. name: '否',
  1146. checked: 'true'
  1147. }]
  1148. for (let i = 0; i < state.items.length; i++) {
  1149. console.log("不是牵引车", state.items[i].value, state.items[i].value === '0')
  1150. if (state.items[i].value === '0') {
  1151. state.current = i;
  1152. state.form.tractorSign = 0;
  1153. break;
  1154. }
  1155. }
  1156. }
  1157. </script>
  1158. <style lang="scss" scoped>
  1159. .content-warp {}
  1160. .hui {
  1161. color: #ccc;
  1162. }
  1163. .hei {
  1164. color: black;
  1165. }
  1166. .goto {
  1167. margin-right: 20rpx;
  1168. padding: 10rpx;
  1169. color: #00b38b;
  1170. border: 1rpx solid #00b38b;
  1171. border-radius: 20rpx;
  1172. }
  1173. .flex {
  1174. display: flex;
  1175. align-items: center;
  1176. }
  1177. .bettwen-center {
  1178. display: flex;
  1179. align-items: center;
  1180. justify-content: space-between;
  1181. }
  1182. .card {
  1183. margin: 20rpx;
  1184. height: 150rpx;
  1185. background: #ffffff;
  1186. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  1187. border-radius: 20rpx;
  1188. padding: 20rpx;
  1189. display: flex;
  1190. justify-content: space-between;
  1191. align-items: center;
  1192. margin-bottom: 30rpx;
  1193. .card-left {
  1194. display: flex;
  1195. align-items: center;
  1196. image {
  1197. width: 100rpx;
  1198. height: 90rpx;
  1199. }
  1200. .card-center {
  1201. margin-left: 30rpx;
  1202. .card-center-head {
  1203. font-size: 32rpx;
  1204. font-family: Noto Sans S Chinese;
  1205. font-weight: 400;
  1206. color: #333333;
  1207. }
  1208. .tips {
  1209. font-size: 26rpx;
  1210. font-family: Noto Sans S Chinese;
  1211. font-weight: 400;
  1212. color: #666666;
  1213. .tips-card {
  1214. width: 70rpx;
  1215. height: 40rpx;
  1216. background: #d3f2ef;
  1217. border-radius: 6rpx;
  1218. font-size: 20rpx;
  1219. font-family: Noto Sans S Chinese;
  1220. font-weight: 400;
  1221. color: #0a8f8a;
  1222. padding: 5rpx 10rpx;
  1223. margin-left: 20rpx;
  1224. }
  1225. }
  1226. }
  1227. }
  1228. .choose-item {
  1229. margin-right: 20rpx;
  1230. width: 50rpx;
  1231. height: 50rpx;
  1232. border: 1rpx solid #00b38b;
  1233. border-radius: 50%;
  1234. display: flex;
  1235. justify-content: center;
  1236. align-items: center;
  1237. .active {
  1238. width: 38rpx;
  1239. height: 38rpx;
  1240. background: #00b38b;
  1241. border-radius: 50%;
  1242. }
  1243. }
  1244. }
  1245. .content {
  1246. position: absolute;
  1247. top: 370rpx;
  1248. width: 100%;
  1249. min-height: calc(100% - 370rpx);
  1250. box-sizing: border-box;
  1251. padding: 0 30rpx 210rpx;
  1252. .t-card {
  1253. width: 100%;
  1254. background-color: #fff;
  1255. border-radius: 12rpx;
  1256. padding: 40rpx 30rpx 30rpx;
  1257. box-sizing: border-box;
  1258. }
  1259. .img-pos {
  1260. position: absolute;
  1261. left: 270rpx;
  1262. top: -38rpx;
  1263. right: 50rpx;
  1264. .img-flex {
  1265. display: flex;
  1266. justify-content: space-between;
  1267. align-items: center;
  1268. .car-img {
  1269. width: 86rpx;
  1270. height: 42rpx;
  1271. }
  1272. .flag-img {
  1273. width: 30rpx;
  1274. height: 35rpx;
  1275. }
  1276. }
  1277. }
  1278. .action {
  1279. position: absolute;
  1280. bottom: 0rpx;
  1281. left: 0;
  1282. height: 188rpx;
  1283. background-color: #fff;
  1284. border-radius: 30rpx 30rpx 0 0;
  1285. width: 100vw;
  1286. display: flex;
  1287. align-items: center;
  1288. justify-content: center;
  1289. flex-direction: column;
  1290. .btn-tip {
  1291. font-family: SourceHanSansSC, SourceHanSansSC;
  1292. font-weight: 400;
  1293. font-size: 24rpx;
  1294. color: #CCB375;
  1295. margin-bottom: 14rpx;
  1296. }
  1297. }
  1298. .item-tips {
  1299. .title {
  1300. font-size: 30rpx;
  1301. font-family: Microsoft YaHei;
  1302. font-weight: 500;
  1303. color: #01243A;
  1304. line-height: 30rpx;
  1305. }
  1306. .tip {
  1307. margin-top: 16rpx;
  1308. font-size: 24rpx;
  1309. font-family: Microsoft YaHei;
  1310. font-weight: 400;
  1311. color: #999999;
  1312. line-height: 24rpx;
  1313. }
  1314. }
  1315. .picture-wrapper {
  1316. margin-top: 30rpx;
  1317. .bg {
  1318. background: #F5F9FB;
  1319. border-radius: 10rpx;
  1320. padding: 40rpx 30rpx;
  1321. display: flex;
  1322. // align-items: center;
  1323. justify-content: space-between;
  1324. .name {
  1325. padding-top: 30rpx;
  1326. font-size: 32rpx;
  1327. font-family: SourceHanSansSC, SourceHanSansSC;
  1328. font-weight: 500;
  1329. color: #111;
  1330. line-height: 34rpx;
  1331. }
  1332. .value {
  1333. margin-top: 20rpx;
  1334. font-size: 22rpx;
  1335. font-family: SourceHanSansSC, SourceHanSansSC;
  1336. font-weight: 400;
  1337. color: #999999;
  1338. line-height: 24rpx;
  1339. }
  1340. .tip {
  1341. margin-top: 20rpx;
  1342. text-align: center;
  1343. width: 100rpx;
  1344. height: 30rpx;
  1345. // background: rgba(204, 179, 117);
  1346. border-radius: 6rpx;
  1347. border: 1rpx solid #CCB375;
  1348. .tip-value {
  1349. font-size: 20rpx;
  1350. font-family: Microsoft YaHei;
  1351. font-weight: 400;
  1352. color: #CCB375;
  1353. line-height: 30rpx;
  1354. opacity: 1;
  1355. }
  1356. }
  1357. }
  1358. .icon {
  1359. width: 304rpx;
  1360. height: 190rpx;
  1361. background-image: var(--bgimg);
  1362. background-size: 100% 100%;
  1363. background-repeat: no-repeat;
  1364. }
  1365. }
  1366. .shibie-wrapper {
  1367. margin-top: 30rpx;
  1368. border-radius: 12rpx;
  1369. background-color: #fff;
  1370. width: 100%;
  1371. padding: 30rpx;
  1372. box-sizing: border-box;
  1373. .title {
  1374. font-size: 30rpx;
  1375. font-family: Microsoft YaHei;
  1376. font-weight: 500;
  1377. color: #01243A;
  1378. line-height: 30rpx;
  1379. }
  1380. }
  1381. .buchong-wrapper {
  1382. margin-top: 60rpx;
  1383. .title {
  1384. font-size: 30rpx;
  1385. font-family: Microsoft YaHei;
  1386. font-weight: 400;
  1387. color: #000000;
  1388. line-height: 30rpx;
  1389. }
  1390. }
  1391. .green-tip {
  1392. margin-top: 50rpx;
  1393. font-size: 24rpx;
  1394. font-family: Microsoft YaHei;
  1395. font-weight: 400;
  1396. color: #00b38b;
  1397. line-height: 24rpx;
  1398. margin-bottom: 60rpx;
  1399. }
  1400. }
  1401. .form-item {
  1402. display: flex;
  1403. font-size: 28rpx;
  1404. justify-content: space-between;
  1405. align-items: center;
  1406. height: 70rpx;
  1407. .l-label {
  1408. font-size: 28rpx;
  1409. color: #004576;
  1410. display: flex;
  1411. align-items: center;
  1412. .icon-img {
  1413. align-items: center;
  1414. margin-right: 8rpx;
  1415. width: 8rpx;
  1416. height: 8rpx;
  1417. display: flex;
  1418. }
  1419. }
  1420. }
  1421. .form-item label {}
  1422. .form-item .input-box {
  1423. display: flex;
  1424. align-items: center;
  1425. }
  1426. .form-item .select {
  1427. flex: 1;
  1428. background: #f1f1f1;
  1429. padding: 6rpx 20rpx;
  1430. margin: 0 10rpx;
  1431. min-height: 48rpx;
  1432. line-height: 48rpx;
  1433. border-radius: 8rpx;
  1434. }
  1435. .form-item .icon {
  1436. width: 28rpx;
  1437. height: 32rpx;
  1438. }
  1439. .form-item .input-box input {
  1440. width: 90rpx;
  1441. background: #f1f1f1;
  1442. border-radius: 8rpx;
  1443. padding: 0 5rpx;
  1444. }
  1445. .form-item .sub-text {
  1446. color: #808080;
  1447. padding-left: 10rpx;
  1448. }
  1449. .form-item .sub-label {
  1450. padding: 0 10rpx;
  1451. }
  1452. .window {
  1453. padding: 60rpx 30rpx;
  1454. }
  1455. .window .window-item {
  1456. border: 1px solid #00b38b;
  1457. background: rgba(0, 179, 139, .1);
  1458. border-radius: 10rpx;
  1459. padding: 16rpx 30rpx;
  1460. font-size: 30rpx;
  1461. margin-bottom: 10rpx;
  1462. }
  1463. ::v-deep .u-input__input {
  1464. background: transparent;
  1465. }
  1466. .choice-takePhoto {
  1467. position: absolute;
  1468. bottom: 0;
  1469. background-color: white;
  1470. width: 100%;
  1471. border-radius: 20rpx 20rpx 0 0;
  1472. }
  1473. .choice-takePhoto>view:first-child {
  1474. text-align: center;
  1475. height: 80rpx;
  1476. line-height: 80rpx;
  1477. border-bottom: 1rpx solid rgba(127, 127, 127, 0.3);
  1478. background-color: white;
  1479. }
  1480. .choice-takePhoto>view:last-child {
  1481. text-align: center;
  1482. height: 80rpx;
  1483. line-height: 80rpx;
  1484. border-top: 6rpx solid rgba(127, 127, 127, 0.1);
  1485. background-color: white;
  1486. }
  1487. .choice-takePhoto>view {
  1488. text-align: center;
  1489. height: 80rpx;
  1490. line-height: 80rpx;
  1491. background-color: white;
  1492. }
  1493. .choice-takePhoto-wrap {
  1494. width: 100%;
  1495. height: 100vh;
  1496. background-color: rgba(127, 127, 127, 0.2);
  1497. position: fixed;
  1498. left: 0;
  1499. top: 0;
  1500. z-index: 11111;
  1501. }
  1502. .tractor {
  1503. font-size: 32rpx;
  1504. margin-top: 40rpx;
  1505. }
  1506. .tractor .title {
  1507. margin-right: 60rpx;
  1508. }
  1509. // .tractor .title .label {
  1510. // margin-right: 40rpx !important;
  1511. // }
  1512. .ownerRadio {
  1513. transform: scale(0.8);
  1514. /* 调整缩放比例 */
  1515. margin-right: 10rpx;
  1516. }
  1517. </style>