Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

rescind-carId-select.vue 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. <template>
  2. <view class="bg">
  3. <view class="card">
  4. <text>车辆类型:</text>
  5. <uni-data-select v-model="state.form.applyType" :localdata="state.applyTypeRange"
  6. @change="changeapplyType" :clear="false" style="width: 300rpx;"></uni-data-select>
  7. </view>
  8. <view class="card" style="margin-top: 20rpx;" v-if="state.form.applyType=='1'">
  9. <text>是否本人:</text>
  10. <uni-data-select v-model="state.form.isSelf" :localdata="state.isSelfRange"
  11. @change="changeisSelf" :clear="false" style="width: 300rpx;"></uni-data-select>
  12. </view>
  13. </view>
  14. <view class="bg">
  15. <view class="title"> 身份证信息 </view>
  16. <view class="picture-wrapper" @click="takePhotoMode('1',false)">
  17. <view class="bg">
  18. <view class="">
  19. <view class="name"> 人像面 </view>
  20. <view class="value"> 上传身份证的人像面 </view>
  21. <view class="tip">
  22. <view class="tip-value"> 拍摄规范 </view>
  23. </view>
  24. </view>
  25. <image v-if="!state.form.userImagesUrl1" class="icon" :src="`${$imgUrl}issuance/sfz.png`"
  26. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  27. </image>
  28. <image v-else class="icon" :src="strReplace(state.form.userImagesUrl1)"
  29. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image>
  30. </view>
  31. </view>
  32. <view class="picture-wrapper" @click="takePhotoMode('2',false)">
  33. <view class="bg">
  34. <view class="">
  35. <view class="name"> 国徽面 </view>
  36. <view class="value"> 上传身份证的国徽面 </view>
  37. <view class="tip">
  38. <view class="tip-value"> 拍摄规范 </view>
  39. </view>
  40. </view>
  41. <image v-if="!state.form.userImagesUrl2" class="icon" :src="`${$imgUrl}issuance/sff.png`"
  42. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}">
  43. </image>
  44. <image v-else class="icon" :src="strReplace(state.form.userImagesUrl2)"
  45. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image>
  46. </view>
  47. </view>
  48. <u-form label-width="230" :model="state.form" ref="uForm" :label-style='labelStyle'>
  49. <u-form-item label="申请人姓名" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon' borderBottom>
  50. <u-input v-model="state.form.name" placeholder='请输入姓名'
  51. maxlength="20" @blur="replaceInput($event,1)" inputAlign="right"/>
  52. </u-form-item>
  53. <u-form-item label="证号号码" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon' borderBottom>
  54. <u-input placeholder='请输入证件号码' type="idcard" v-model="state.form.customerIdNum"
  55. maxlength="18" inputAlign="right"/>
  56. </u-form-item>
  57. <u-form-item label="手机号" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon' borderBottom>
  58. <u-input placeholder='请输入手机号' type="number" v-model="state.form.mobile"
  59. maxlength="11" inputAlign="right"/>
  60. </u-form-item>
  61. </u-form>
  62. </view>
  63. <view class="bg">
  64. <view class="title"> 行驶证信息 </view>
  65. <view class="picture-wrapper" @click="takePhotoMode('3')">
  66. <view class="bg">
  67. <view class="">
  68. <view class="name"> 行驶证主页 </view>
  69. <view class="value"> 上传行驶证的主页 </view>
  70. <view class="tip">
  71. <view class="tip-value"> 拍摄规范 </view>
  72. </view>
  73. </view>
  74. <image v-if="!state.form.vehicleImagesUrl1" class="icon" :src="`${$imgUrl}issuance/xz.png`"
  75. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  76. </image>
  77. <image v-else class="icon" :src="strReplace(state.form.vehicleImagesUrl1)"
  78. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  79. </view>
  80. </view>
  81. <view class="picture-wrapper" @click="takePhotoMode('4')">
  82. <view class="bg">
  83. <view class="">
  84. <view class="name"> 行驶证副页 </view>
  85. <view class="value"> 上传行驶证的副页 </view>
  86. <view class="tip">
  87. <view class="tip-value"> 拍摄规范 </view>
  88. </view>
  89. </view>
  90. <image v-if="!state.form.vehicleImagesUrl2" class="icon" :src="`${$imgUrl}issuance/xf.png`"
  91. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  92. </image>
  93. <image v-else class="icon" :src="strReplace(state.form.vehicleImagesUrl2)"
  94. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  95. </view>
  96. </view>
  97. <u-form label-width="200" :model="state.form" ref="uForm" :label-style='labelStyle'>
  98. <u-form-item label="车牌号" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'>
  99. <car-number-input @numberInputResult="carNumber" :defaultStr="state.form.vehiclePlate"></car-number-input>
  100. </u-form-item>
  101. <u-form-item label="所有人" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'>
  102. <u-input inputAlign="right" placeholder="请输入所有人" v-model="state.form.vehicleOwnerName" maxlength="20" />
  103. </u-form-item>
  104. <u-form-item label="车牌颜色" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon'>
  105. <uni-data-select v-model="state.form.vehiclePlateColor" :localdata="state.colorRange" @change="changeColor"
  106. :clear="false"></uni-data-select>
  107. </u-form-item>
  108. </u-form>
  109. </view>
  110. <view class="bg" v-if="state.form.applyType=='2'">
  111. <view class="title"> 单位资料信息 </view>
  112. <view class="picture-wrapper" @click="cardImageOcrYY()">
  113. <view class="bg">
  114. <view class="">
  115. <view class="name"> 营业执照 </view>
  116. <view class="value"> 上传企业的营业执照 </view>
  117. <view class="tip">
  118. <view class="tip-value"> 拍摄规范 </view>
  119. </view>
  120. </view>
  121. <image v-if="!state.form.orgImagesUrl1" class="icon" :src="`${$imgUrl}applyCard/zhizhao.png`"
  122. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  123. </image>
  124. <image v-else class="icon" :src="strReplace(state.form.orgImagesUrl1)"
  125. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  126. </view>
  127. </view>
  128. <view class="picture-wrapper" @click="cardFileImageUpdate()">
  129. <view class="bg">
  130. <view class="">
  131. <view class="name"> 授权书 </view>
  132. <view class="value"> 上传授权书 </view>
  133. <view class="tip">
  134. <view class="tip-value"> 拍摄规范 </view>
  135. </view>
  136. <!-- <view class="down" @click="downAuthD">模板下载</view> -->
  137. </view>
  138. <image v-if="!state.form.authorizeImagesUrl1" class="icon" :src="`${$imgUrl}issuance/weituo.png`"
  139. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  140. </image>
  141. <image v-else class="icon" :src="strReplace(state.form.authorizeImagesUrl1)"
  142. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  143. </view>
  144. </view>
  145. <u-form label-width="230" :model="state.form" ref="uForm" :label-style='labelStyle'>
  146. <u-form-item label="单位名称" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon' border-bottom=true>
  147. <u-input v-model="state.form.orgName" placeholder='请输入单位名称'
  148. maxlength="20" @blur="replaceInput($event,2)" inputAlign="right"/>
  149. </u-form-item>
  150. <u-form-item label="证号号码" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon' border-bottom=true>
  151. <u-input placeholder='请输入证件号码' type="idcard" v-model="state.form.orgId"
  152. maxlength="18" inputAlign="right"/>
  153. </u-form-item>
  154. </u-form>
  155. </view>
  156. <!-- 个人 非本人 展示 -->
  157. <view class="bg" v-if="state.form.applyType=='1' && state.form.isSelf=='2'">
  158. <view class="title"> 车主信息 </view>
  159. <view class="picture-wrapper" @click="takePhotoMode('1',true)">
  160. <view class="bg">
  161. <view class="">
  162. <view class="name"> 车主身份证 </view>
  163. <view class="name"> 人像面 </view>
  164. <view class="value"> 上传身份证的人像面 </view>
  165. <view class="tip">
  166. <view class="tip-value"> 拍摄规范 </view>
  167. </view>
  168. </view>
  169. <image v-if="!state.form.personFrontUrl" class="icon" :src="`${$imgUrl}issuance/sfz.png`"
  170. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  171. </image>
  172. <image v-else class="icon" :src="strReplace(state.form.personFrontUrl)"
  173. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image>
  174. </view>
  175. </view>
  176. <view class="picture-wrapper" @click="takePhotoMode('2',true)">
  177. <view class="bg">
  178. <view class="">
  179. <view class="name"> 车主身份证 </view>
  180. <view class="name"> 国徽面 </view>
  181. <view class="value"> 上传身份证的国徽面 </view>
  182. <view class="tip">
  183. <view class="tip-value"> 拍摄规范 </view>
  184. </view>
  185. </view>
  186. <image v-if="!state.form.personBackUrl" class="icon" :src="`${$imgUrl}issuance/sff.png`"
  187. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}">
  188. </image>
  189. <image v-else class="icon" :src="strReplace(state.form.personBackUrl)"
  190. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png`}"></image>
  191. </view>
  192. </view>
  193. <u-form label-width="230" :model="state.form" ref="uForm" :label-style='labelStyle'>
  194. <u-form-item label="车主姓名" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon' border-bottom=true>
  195. <u-input v-model="state.form.personName" placeholder='请输入车主姓名'
  196. maxlength="20" @blur="replaceInput($event,3)" inputAlign="right"/>
  197. </u-form-item>
  198. <u-form-item label="证号号码" :left-icon='`${$imgUrl}issuance/point-form.png`' :left-icon-style='leftIcon' border-bottom=true>
  199. <u-input placeholder='请输入证件号码' type="idcard" v-model="state.form.personIdNum"
  200. maxlength="18" inputAlign="right"/>
  201. </u-form-item>
  202. </u-form>
  203. <view class="picture-wrapper" @click="cardFileImageUpdate()">
  204. <view class="bg">
  205. <view class="">
  206. <view class="name"> 授权书 </view>
  207. <view class="value"> 上传授权书 </view>
  208. <view class="tip">
  209. <view class="tip-value"> 拍摄规范 </view>
  210. </view>
  211. <!-- <view class="down" @click="downAuthD">模板下载</view> -->
  212. </view>
  213. <image v-if="!state.form.authorizeImagesUrl1" class="icon" :src="`${$imgUrl}issuance/weituo.png`"
  214. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}">
  215. </image>
  216. <image v-else class="icon" :src="strReplace(state.form.authorizeImagesUrl1)"
  217. :style="{'--bgimg':`url(${$imgUrl}issuance/bg-border.png)`}"></image>
  218. </view>
  219. </view>
  220. </view>
  221. <view class="action">
  222. <button type="default" class="ui-btn" @click="savaHandle()">
  223. 提交
  224. </button>
  225. </view>
  226. <view class="choice-takePhoto-wrap" v-if="state.isTakePhotoModeShow" @click="cancle">
  227. <view class="choice-takePhoto">
  228. <view @click.stop="takePhoto(state.choiceIndex)" style="border-radius: 20rpx 20rpx 0 0;">拍照</view>
  229. <view @click.stop="xiangce(state.choiceIndex)">从手机相册选择</view>
  230. <view @click.stop="cancle">取消</view>
  231. </view>
  232. </view>
  233. <viewfinder v-if="state.phoneType" :phoneType="state.phoneType" :images="state.images"
  234. :showStartPhoto="state.showImg" @confirmReturn="confirmReturn" @camera="camera"></viewfinder>
  235. </template>
  236. <script setup lang="ts">
  237. import {
  238. reactive,
  239. ref
  240. } from "vue";
  241. import {
  242. onLoad
  243. } from "@dcloudio/uni-app";
  244. import {
  245. idCardOcr,
  246. vehicleLicenseOcr,
  247. releasePlateaApply,
  248. ocrAllQuery
  249. } from "@/utils/network/api.js";
  250. import {requestNew} from "@/utils/network/request.js";
  251. import {
  252. getItem
  253. } from "@/utils/storage.ts"
  254. import viewfinder from "@/components/viewfinder.vue"
  255. import carNumberInput from "@/components/car-number-input/car-number-input.vue";
  256. import {
  257. navTo, strReplace, uploadFile,msg
  258. } from "@/utils/utils";
  259. // ########
  260. const labelStyle = {
  261. color: "#004576",
  262. fontSize: "28rpx",
  263. }
  264. const leftIcon = {
  265. height: '100%',
  266. width: '8rpx',
  267. display: 'flex',
  268. 'align-items': 'center',
  269. 'margin-right': '4rpx',
  270. }
  271. const show1 = ref(false)
  272. const state = reactive({
  273. applyTypeRange:[{
  274. value: "1",
  275. text: "个人车辆"
  276. }, {
  277. value: "2",
  278. text: "单位车辆"
  279. }],
  280. isSelfRange:[
  281. {
  282. value: "1",
  283. text: "是"
  284. }, {
  285. value: "2",
  286. text: "否"
  287. }
  288. ],
  289. showImg: true,
  290. phoneType: 0, // 1 身份证正面 2 身份证反面 3行驶证正面 4行驶证反面
  291. choiceIndex: 1, // 1 身份证正面 2 身份证反面
  292. isTakePhotoModeShow: false, //选择拍照方式是否出来
  293. images: '',
  294. form: {
  295. applyType:"",//1个人,2单位
  296. isSelf:"",//是否本人 1是,2否
  297. mobile:"",
  298. name: "", //开户人姓名
  299. customerIdNum: "", //用户证件号码
  300. userImagesUrl1: "", //身份证正面
  301. userImagesUrl2: "", //身份证反面
  302. vehicleImagesUrl1: "", //行驶证正面
  303. vehicleImagesUrl2: "", //行驶证证反面
  304. vehiclePlate:"",
  305. vehiclePlateColor:"",
  306. vehicleOwnerName:"", //车主姓名,ocr识别行驶证
  307. personFrontUrl:"",//车主身份证件人面地址
  308. personBackUrl:"",//车主身份证件国徽地址
  309. personIdNum:"",//车主证件号
  310. personName:"",//车主姓名
  311. authorizeImagesUrl1:"",//授权书图片地址
  312. orgImagesUrl1:"",//营业执照图片地址
  313. orgId:"",//单位证件编号
  314. orgName:"",
  315. orgIdClass:"",//营业执照203
  316. },
  317. colorRange: [],
  318. ownerInfo:false,//非本人 个人 车主信息true ==== 本人 个人 false
  319. });
  320. const changeapplyType = (e) => {
  321. state.form.applyType = e
  322. console.log("111",e,state.applyTypeRange)
  323. }
  324. const changeisSelf=(e)=>{
  325. state.form.isSelf = e
  326. }
  327. const changeColor = (e) => {
  328. state.form.vehiclePlateColor = e
  329. console.log(e)
  330. }
  331. //车牌号输入
  332. const carNumber = (val : any) => {
  333. state.form.vehiclePlate = val.trim();
  334. };
  335. const replaceInput = (event,val) => {
  336. if(val==1){
  337. state.form.name=event.replace(/\s/g, "")
  338. }else if(val==2){
  339. state.form.orgName=event.replace(/\s/g, "")
  340. }else if(val==3){
  341. state.form.personName=event.replace(/\s/g, "")
  342. }
  343. console.log("event", event,val,state.form.name)
  344. }
  345. const savaHandle = () => {
  346. if(!state.form.applyType){
  347. msg('请选择车辆类型');
  348. return;
  349. }
  350. if(state.form.applyType=='1'){
  351. if(!state.form.isSelf){
  352. msg('请选择是否本人');
  353. return;
  354. }
  355. }
  356. if(!state.form.userImagesUrl1){
  357. msg('请上传身份证正面');
  358. return;
  359. }
  360. if(!state.form.userImagesUrl2){
  361. msg('请上传身份证反面');
  362. return;
  363. }
  364. if(!state.form.name){
  365. msg('请输入姓名');
  366. return;
  367. }
  368. if(!state.form.customerIdNum){
  369. msg('请输入证件号码');
  370. return;
  371. }
  372. if(!state.form.mobile){
  373. msg('请输入手机号');
  374. return;
  375. }
  376. if(!state.form.vehicleImagesUrl1){
  377. msg('请上传行驶证主页');
  378. return;
  379. }
  380. if(!state.form.vehicleImagesUrl2){
  381. msg('请上传行驶证副页');
  382. return;
  383. }
  384. if(!state.form.vehiclePlate){
  385. msg('请输入车牌号');
  386. return;
  387. }
  388. if(!state.form.vehicleOwnerName){
  389. msg('请输入所有人');
  390. return;
  391. }
  392. if(!state.form.vehiclePlateColor){
  393. msg('请选择车牌颜色');
  394. return;
  395. }
  396. // 单位
  397. if(state.form.applyType=='2'){
  398. // 非本人办理
  399. state.form.isSelf='2'
  400. state.form.orgIdClass='203'
  401. }
  402. const options = {
  403. type: 2,
  404. data: state.form,
  405. method: "POST",
  406. showLoading: true,
  407. };
  408. requestNew(releasePlateaApply, options).then((res) => {
  409. console.log(res);
  410. navTo(`/subpackage/after-sale/rescind-carId/result`);
  411. });
  412. };
  413. const cardFileImageUpdate = () => {
  414. uni.chooseImage({
  415. count: 1, //只能选取一张照片
  416. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  417. sourceType: ["camera", "album"], //从相册选择
  418. success: function (res) {
  419. uploadFile(res.tempFilePaths[0], "", "").then((data) => {
  420. state.form.authorizeImagesUrl1 = data;
  421. })
  422. },
  423. });
  424. };
  425. onLoad((option : any) => {
  426. let getColor = getItem('key')['VEHICLE_COLOR_TYPE'];
  427. for (var k = 0; k < getColor.length; k++) {
  428. let obj = {};
  429. obj['value'] = getColor[k]['code']
  430. obj['text'] = getColor[k]['name']
  431. state.colorRange.push(obj)
  432. }
  433. });
  434. const xiangce = (val) => {
  435. console.log("val", val)
  436. var imageType = val;
  437. uni.chooseImage({
  438. count: 1, //只能选取一张照片
  439. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  440. sourceType: ["album"], //从相册选择
  441. success: function (res) {
  442. state.showImg = false
  443. state.images = res.tempFilePaths[0]
  444. state.phoneType = state.choiceIndex
  445. state.isTakePhotoModeShow = false
  446. console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://'))
  447. },
  448. })
  449. }
  450. const takePhoto = (val) => {
  451. state.showImg = true
  452. console.log("拍照", val)
  453. state.phoneType = val;
  454. }
  455. const confirmReturn = (val) => {
  456. state.phoneType = 0
  457. state.isTakePhotoModeShow = false
  458. var imageType = 1;
  459. if (state.choiceIndex == 1) {
  460. imageType = 1
  461. var isEtcOcrCard = idCardOcr
  462. } else if (state.choiceIndex == 2) {
  463. imageType = 2
  464. var isEtcOcrCard = idCardOcr
  465. } else if (state.choiceIndex == 3) {
  466. imageType = 1
  467. var isEtcOcrCard = vehicleLicenseOcr
  468. } else if (state.choiceIndex == 4) {
  469. imageType = 2
  470. var isEtcOcrCard = vehicleLicenseOcr
  471. }
  472. console.log("图片地址val", val.tempImagePath)
  473. uploadFile(val.tempImagePath, imageType, isEtcOcrCard).then((data) => {
  474. console.log("身份证上传", data)
  475. if (state.choiceIndex == "1") {
  476. if(state.ownerInfo){
  477. state.form.personFrontUrl = data.imageUrl;
  478. state.form.personName = data.name;
  479. state.form.personIdNum = data.idno;
  480. }else{
  481. // 谁上传就是谁的信息
  482. state.form.name = data.name;
  483. state.form.customerIdNum = data.idno;
  484. state.form.userImagesUrl1 = data.imageUrl;
  485. }
  486. } else if (state.choiceIndex == "2") {
  487. if(state.ownerInfo){
  488. state.form.personBackUrl = data.imageUrl;
  489. }else{
  490. state.form.userImagesUrl2 = data.imageUrl;
  491. }
  492. } else if (state.choiceIndex == "3") {
  493. state.form.vehiclePlate = data.plate_a;
  494. state.form.vehicleOwnerName = data.man;
  495. state.form.vehicleImagesUrl1 = data.imageUrl;
  496. } else if (state.choiceIndex == "4") {
  497. state.form.vehicleImagesUrl2 = data.imageUrl;
  498. }
  499. state.isTakePhotoModeShow = false
  500. })
  501. }
  502. const takePhotoMode = (index,ownerInfo) => {
  503. console.log("index", index)
  504. state.isTakePhotoModeShow = true
  505. state.choiceIndex = index
  506. state.ownerInfo=ownerInfo
  507. }
  508. const cancle = () => {
  509. state.isTakePhotoModeShow = false
  510. }
  511. const camera = () => {
  512. state.phoneType = 0
  513. }
  514. //营业执照Orc接口调用
  515. const cardImageOcrYY = () => {
  516. uni.chooseImage({
  517. count: 1, //只能选取一张照片
  518. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  519. sourceType: ["camera", "album"], //从相册选择
  520. success: function (res) {
  521. uploadFile(res.tempFilePaths[0], "", ocrAllQuery).then((data) => {
  522. console.log("data",data)
  523. state.form.orgName =data.unitName;
  524. state.form.orgId =data.screditCode;
  525. state.form.orgImagesUrl1 =data.imageUrl;
  526. })
  527. },
  528. });
  529. };
  530. </script>
  531. <style lang="scss" scoped>
  532. .bg{
  533. background-color: white;
  534. width: 88%;
  535. margin:0 auto;
  536. margin-top: 20rpx;
  537. border-radius: 12px;
  538. border: 1px solid #FFFFFF;
  539. padding: 20rpx;
  540. }
  541. .card {
  542. display: flex;
  543. margin: 0 20rpx;
  544. align-items: center;
  545. }
  546. .picture-wrapper {
  547. margin-top: 30rpx;
  548. .bg {
  549. background: #F5F9FB;
  550. border-radius: 10rpx;
  551. padding: 40rpx 30rpx;
  552. display: flex;
  553. // align-items: center;
  554. justify-content: space-between;
  555. .name {
  556. padding-top: 30rpx;
  557. font-size: 32rpx;
  558. font-family: SourceHanSansSC, SourceHanSansSC;
  559. font-weight: 500;
  560. color: #111;
  561. line-height: 34rpx;
  562. }
  563. .value {
  564. margin-top: 20rpx;
  565. font-size: 22rpx;
  566. font-family: SourceHanSansSC, SourceHanSansSC;
  567. font-weight: 400;
  568. color: #999999;
  569. line-height: 24rpx;
  570. }
  571. .tip {
  572. margin-top: 20rpx;
  573. text-align: center;
  574. width: 100rpx;
  575. height: 30rpx;
  576. // background: rgba(204, 179, 117);
  577. border-radius: 6rpx;
  578. border: 1rpx solid #CCB375;
  579. .tip-value {
  580. font-size: 20rpx;
  581. font-family: Microsoft YaHei;
  582. font-weight: 400;
  583. color: #CCB375;
  584. line-height: 30rpx;
  585. opacity: 1;
  586. }
  587. }
  588. }
  589. .icon {
  590. width: 304rpx;
  591. height: 190rpx;
  592. background-image: var(--bgimg);
  593. background-size: 100% 100%;
  594. background-repeat: no-repeat;
  595. }
  596. }
  597. .action {
  598. position: absolute;
  599. left: 0;
  600. height: 188rpx;
  601. background-color: #fff;
  602. border-radius: 30rpx 30rpx 0 0;
  603. width: 100vw;
  604. display: flex;
  605. align-items: center;
  606. justify-content: center;
  607. flex-direction: column;
  608. margin-top: 20rpx;
  609. }
  610. ::deep.uni-select {
  611. font-size: 13px;
  612. height: 30px;
  613. line-height: 30px;
  614. }
  615. .choice-takePhoto-wrap {
  616. width: 100%;
  617. height: 100vh;
  618. background-color: rgba(127, 127, 127, 0.2);
  619. position: fixed;
  620. left: 0;
  621. top: 0;
  622. z-index: 11111;
  623. }
  624. .choice-takePhoto {
  625. position: absolute;
  626. bottom: 0;
  627. background-color: white;
  628. width: 100%;
  629. border-radius: 20rpx 20rpx 0 0;
  630. }
  631. .choice-takePhoto>view:first-child {
  632. text-align: center;
  633. height: 80rpx;
  634. line-height: 80rpx;
  635. border-bottom: 1rpx solid rgba(127, 127, 127, 0.3);
  636. background-color: white;
  637. }
  638. .choice-takePhoto>view:last-child {
  639. text-align: center;
  640. height: 80rpx;
  641. line-height: 80rpx;
  642. border-top: 6rpx solid rgba(127, 127, 127, 0.1);
  643. background-color: white;
  644. }
  645. .choice-takePhoto>view {
  646. text-align: center;
  647. height: 80rpx;
  648. line-height: 80rpx;
  649. background-color: white;
  650. }
  651. .choice-takePhoto-wrap {
  652. width: 100%;
  653. height: 100vh;
  654. background-color: rgba(127, 127, 127, 0.2);
  655. position: fixed;
  656. left: 0;
  657. top: 0;
  658. z-index: 11111;
  659. }
  660. </style>