You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rescind-carId-select.vue 21KB

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