Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

car-release.vue 52KB

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