Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

car-release.vue 53KB

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