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.

changeInformation.vue 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. <template>
  2. <view class="content-wrap">
  3. <view @click="tabChange(true)">
  4. <view :class="state.isMyPeopple ? 'big' : 'nomal'"> 本人车辆 </view>
  5. <view :class="state.isMyPeopple ? 'tip' : ''"> </view>
  6. </view>
  7. <view @click="tabChange(false)" style="margin-left: 60rpx" class="" v-if="state.isEnableOther">
  8. <view :class="state.isMyPeopple ? 'nomal' : 'big'"> 他人车辆 </view>
  9. <view :class="state.isMyPeopple ? '' : 'tip'"> </view>
  10. </view>
  11. </view>
  12. <view v-if="state.isMyPeopple" class="content">
  13. <view class="item-tips">
  14. <view class="title"> 上传后请核对识别信息 </view>
  15. <view class="tip"> 如有错误请及时手动修改 </view>
  16. </view>
  17. <view class="picture-wrapper" @click="cardImageOcr('1')">
  18. <view class="bg">
  19. <view class="">
  20. <view class="name"> 人像面 </view>
  21. <view class="value"> 上传身份证的人像面 </view>
  22. <view class="tip">
  23. <view class="tip-value"> 拍摄规范 </view>
  24. </view>
  25. </view>
  26. <image v-if="!state.form.userPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  27. </image>
  28. <image v-else class="icon" :src="strReplace(state.form.userPosImgUrl)"></image>
  29. </view>
  30. </view>
  31. <view class="picture-wrapper" @click="cardImageOcr('2')">
  32. <view class="bg">
  33. <view class="">
  34. <view class="name"> 国徽面 </view>
  35. <view class="value"> 上传身份证的国徽面 </view>
  36. <view class="tip">
  37. <view class="tip-value"> 拍摄规范 </view>
  38. </view>
  39. </view>
  40. <image v-if="!state.form.userNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/guohui.png`">
  41. </image>
  42. <image v-else class="icon" :src="strReplace(state.form.userNegImgUrl)"></image>
  43. </view>
  44. </view>
  45. <view class="shibie-wrapper">
  46. <view class="title"> 识别内容如下 </view>
  47. <u-form label-width="230" :model="state.form" ref="uForm">
  48. <u-form-item label="姓名">
  49. <u-input v-model="state.form.userName" placeholder='请输入姓名' :disabled="state.isEnableOCRData"
  50. maxlength="20" @input="replaceInput" />
  51. </u-form-item>
  52. <!-- <u-form-item label="性别">
  53. <u-input placeholder='请选择性别' v-model="state.form.gender" @click="userGenderAction()"
  54. type="select" />
  55. </u-form-item> -->
  56. <u-form-item label="身份证号">
  57. <u-input placeholder='请输入身份证' type="idcard" v-model="state.form.userIdNum"
  58. :disabled="state.isEnableOCRData" maxlength="18" />
  59. </u-form-item>
  60. <u-form-item label="地址">
  61. <u-input placeholder='请输入地址' height='38' type='textarea' :autoHeight='true'
  62. v-model="state.form.address" :disabled="state.isEnableOCRData" maxlength="100" />
  63. </u-form-item>
  64. <!-- <u-form-item label="证件有效期">
  65. <u-input v-model="state.form.begindate" type="select" />
  66. </u-form-item> -->
  67. <u-form-item label="联系方式">
  68. <u-input placeholder='请输入联系方式' type="number" v-model="state.form.tel" maxlength="11" />
  69. </u-form-item>
  70. </u-form>
  71. </view>
  72. <view class="green-tip">
  73. 如识别信息有误,请手动修改,确认无误后,点击下一步!
  74. </view>
  75. <view class="action">
  76. <button type="default" class="button" @click="savaHandle()">
  77. 下一步
  78. </button>
  79. </view>
  80. </view>
  81. <view v-else class="content">
  82. <view class="title"> 车主信息 </view>
  83. <view class="item-tips">
  84. <view class="title"> 上传后请核对识别信息 </view>
  85. <view class="tip"> 如有错误请及时手动修改 </view>
  86. </view>
  87. <view class="picture-wrapper" @click="cardImageOcr('1')">
  88. <view class="bg">
  89. <view class="">
  90. <view class="name"> 人像面 </view>
  91. <view class="value"> 上传身份证的人像面 </view>
  92. <view class="tip">
  93. <view class="tip-value"> 拍摄规范 </view>
  94. </view>
  95. </view>
  96. <image v-if="!state.form.userPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  97. </image>
  98. <image v-else class="icon" :src="strReplace(state.form.userPosImgUrl)"></image>
  99. </view>
  100. </view>
  101. <view class="picture-wrapper" @click="cardImageOcr('2')">
  102. <view class="bg">
  103. <view class="">
  104. <view class="name"> 国徽面 </view>
  105. <view class="value"> 上传身份证的国徽面 </view>
  106. <view class="tip">
  107. <view class="tip-value"> 拍摄规范 </view>
  108. </view>
  109. </view>
  110. <image v-if="!state.form.userNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/guohui.png`">
  111. </image>
  112. <image v-else class="icon" :src="strReplace(state.form.userNegImgUrl)"></image>
  113. </view>
  114. </view>
  115. <view class="shibie-wrapper">
  116. <view class="title"> 识别内容如下 </view>
  117. <u-form label-width="200" :model="state.form" ref="uForm">
  118. <u-form-item label="姓名">
  119. <u-input inputAlign="right" placeholder='请输入姓名' v-model="state.form.userName"
  120. :disabled="state.isEnableOCRData" maxlength="20" />
  121. </u-form-item>
  122. <!-- <u-form-item label="性别">
  123. <u-input inputAlign="right" placeholder='请选择性别' v-model="state.form.gender" type="select" />
  124. </u-form-item> -->
  125. <u-form-item label="身份证号">
  126. <u-input inputAlign="right" placeholder='请输入身份证号' v-model="state.form.userIdNum"
  127. :disabled="state.isEnableOCRData" type="idcard" />
  128. </u-form-item>
  129. <!-- <u-form-item label="">
  130. <u-input v-model="state.form.userIdNum" />
  131. </u-form-item> -->
  132. <!-- <u-form-item label="证件有效期">
  133. <u-input v-model="state.form.begindate" type="select" />
  134. </u-form-item> -->
  135. <u-form-item label="联系方式">
  136. <u-input inputAlign="right" placeholder='请输入联系方式' v-model="state.form.tel" maxlength="11" />
  137. </u-form-item>
  138. </u-form>
  139. </view>
  140. <view style="margin-top: 30rpx" class="title"> 代办人信息 </view>
  141. <view class="item-tips">
  142. <view class="title"> 上传后请核对识别信息 </view>
  143. <view class="tip"> 如有错误请及时手动修改 </view>
  144. </view>
  145. <view class="picture-wrapper" @click="cardDbImageOcr('1')">
  146. <view class="bg">
  147. <view class="">
  148. <view class="name"> 人像面 </view>
  149. <view class="value"> 上传身份证的人像面 </view>
  150. <view class="tip">
  151. <view class="tip-value"> 拍摄规范 </view>
  152. </view>
  153. </view>
  154. <image v-if="!state.form.agentPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  155. </image>
  156. <image v-else class="icon" :src="strReplace(state.form.agentPosImgUrl)"></image>
  157. </view>
  158. </view>
  159. <view class="picture-wrapper" @click="cardDbImageOcr('2')">
  160. <view class="bg">
  161. <view class="">
  162. <view class="name"> 国徽面 </view>
  163. <view class="value"> 上传身份证的国徽面 </view>
  164. <view class="tip">
  165. <view class="tip-value"> 拍摄规范 </view>
  166. </view>
  167. </view>
  168. <image v-if="!state.form.agentNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/guohui.png`">
  169. </image>
  170. <image v-else class="icon" :src="state.form.agentNegImgUrl"></image>
  171. </view>
  172. </view>
  173. <view class="picture-wrapper" @click="cardFileImageUpdate()" v-if='state.isEnableBook'>
  174. <view class="bg">
  175. <view class="">
  176. <view class="name"> 委托书 </view>
  177. <view class="value"> 上传文字清晰的委托书 </view>
  178. <view class="tip">
  179. <view class="tip-value"> 拍摄规范 </view>
  180. </view>
  181. </view>
  182. <image v-if="!state.form.proxyUrl" class="icon" :src="`${$imgUrl}applyCard/weituoshu.png`">
  183. </image>
  184. <image v-else class="icon" :src="strReplace(state.form.proxyUrl)"></image>
  185. </view>
  186. </view>
  187. <view class="shibie-wrapper">
  188. <view class="title"> 识别内容如下 </view>
  189. <u-form label-width="200" :model="state.form" ref="uForm">
  190. <u-form-item label="经办人姓名">
  191. <u-input inputAlign="right" placeholder='请输入经办人姓名' v-model="state.form.agentName"
  192. :disabled="state.isEnableOCRData" maxlength="20" />
  193. </u-form-item>
  194. <!-- <u-form-item label="性别">
  195. <u-input v-model="state.form.agentGender" type="select" />
  196. </u-form-item> -->
  197. <u-form-item label="身份证号">
  198. <u-input inputAlign="right" placeholder='请输入身份证号' v-model="state.form.agentIdNum"
  199. :disabled="state.isEnableOCRData" maxlength="18" type="idcard" />
  200. </u-form-item>
  201. <!-- <u-form-item label="证件有效期">
  202. <u-input v-model="state.form.begindate" type="select" />
  203. </u-form-item> -->
  204. <u-form-item label="联系方式">
  205. <u-input inputAlign="right" placeholder='请输入联系方式' v-model="state.form.agentTel" type="number"
  206. maxlength="11" />
  207. </u-form-item>
  208. </u-form>
  209. </view>
  210. <view class="green-tip">
  211. 如识别信息有误,请手动修改,确认无误后,点击下一步!
  212. </view>
  213. <view class="action">
  214. <button type="default" class="button" @click="savaHandle()">
  215. 下一步
  216. </button>
  217. </view>
  218. </view>
  219. <u-select mode="single-column" :list="state.genderList" v-model="state.genderShow" @confirm="genderSelectConfirm">
  220. </u-select>
  221. </template>
  222. <script setup lang="ts">
  223. import navBgCar from "./components/nav-bg-car3";
  224. import {
  225. pathToBase64
  226. } from "@/utils/image-tools/index.js";
  227. import {
  228. reactive,
  229. ref,
  230. } from "vue";
  231. import {
  232. msg,
  233. checkStr
  234. } from "@/utils/utils";
  235. import {
  236. onLoad,
  237. onPageScroll,
  238. } from "@dcloudio/uni-app";
  239. import {
  240. etcOcrCard,
  241. etcUserCardInfoSubmit,
  242. fileUpload,
  243. register,
  244. envs,
  245. getUserMsg
  246. } from "@/utils/network/api.js";
  247. import {
  248. request
  249. } from "@/utils/network/request.js";
  250. import {
  251. stringToJson
  252. } from "@/utils/network/encryption";
  253. import {
  254. setItem,
  255. getItem,
  256. } from "@/utils/storage";
  257. import {
  258. getCodeName
  259. } from "@/datas/queryKey.js";
  260. import navBar from "@/components/nav-bar/nav-bar2.vue";
  261. const scrollTop = ref(0)
  262. const state = reactive({
  263. genderList: [{
  264. value: '男',
  265. label: '男'
  266. },
  267. {
  268. value: '女',
  269. label: '女'
  270. }
  271. ],
  272. form: {
  273. orderId: "", //订单ID
  274. userName: "", //开户人姓名
  275. userIdType: "101", //用户证件类型 101//身份证
  276. userIdNum: "", //用户证件号码
  277. userPosImgUrl: "", //身份证正面
  278. userNegImgUrl: "", //身份证反面
  279. tel: "", //开户人手机号
  280. address: "", //开户人地址
  281. sceneType: "", //用户协议支撑服务场景(发行服务机构和用户签订的协议)
  282. channelId: "", //渠道id
  283. gender: "",
  284. customerIdVld: "",
  285. agentName: "",
  286. agentGender: "",
  287. agentTel: '',
  288. agentPhone: "",
  289. agentIdType: "101",
  290. agentIdNum: "",
  291. agentPosImgUrl: "",
  292. agentNegImgUrl: "",
  293. proxyUrl: "",
  294. agentAddress: "",
  295. agentIdVld: '',
  296. opId: '',
  297. orderSource: 'WECHAT',
  298. },
  299. genderShow: false,
  300. orderId: "",
  301. vehiclePlateColor: undefined,
  302. isMyPeopple: true,
  303. isSign: '',
  304. type: 1,
  305. isEnableOther: true, //小程序是否支持他人办理
  306. isEnableBook: true, //他人办理时是否上传委托书
  307. isEnableInfo: true, //小程序信息带出
  308. isEnableOCRData: true, //允许修改OCR识别出来的数据
  309. });
  310. const userGenderAction = () => {
  311. state.genderShow = true;
  312. };
  313. const genderSelectConfirm = (e) => {
  314. state.form.gender = ''
  315. e.map((val, index) => {
  316. state.form.gender = val.label;
  317. })
  318. };
  319. const savaHandle = () => {
  320. if (!checkStr(state.form.userIdNum, 'card')) {
  321. msg('请输入正确身份证');
  322. return;
  323. }
  324. if (!checkStr(state.form.tel, 'mobile')) {
  325. msg('请输入正确手机号');
  326. return;
  327. }
  328. //如果未登录||新用户
  329. if (!getItem('openId')) {
  330. let data = {
  331. userType: "PERSONAL",
  332. idNum: state.form.userIdNum,
  333. idType: state.form.userIdType,
  334. mobile: state.form.tel,
  335. userName: state.form.userName,
  336. gender: state.form.gender == '男' ? 'MALE' : 'FEMALE',
  337. certifyChannel: "BAIDUOCR",
  338. address: state.form.address,
  339. agentIdNum: state.form.agentIdNum,
  340. agentIdType: state.form.agentIdType,
  341. agentName: state.form.agentName,
  342. department: "",
  343. userIdImgUrl: state.form.userPosImgUrl,
  344. userIdImgBase64: "",
  345. }
  346. const options = {
  347. type: 2,
  348. data: data,
  349. method: "POST",
  350. showLoading: true,
  351. };
  352. request(register, options).then((res) => {
  353. let result = stringToJson(res.bizContent);
  354. if (result.accessToken && result.openId) {
  355. setItem('token', result.accessToken)
  356. setItem('openId', result.openId)
  357. state.form.opId = result.openId;
  358. let data = state.form;
  359. const options = {
  360. type: 2,
  361. data: data,
  362. method: "POST",
  363. showLoading: true,
  364. };
  365. request(etcUserCardInfoSubmit, options).then((res) => {
  366. // let result = stringToJson(res.bizContent);
  367. console.log(res);
  368. uni.redirectTo({
  369. url: `/subpackage/orders/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&type=${state.type}&isSign=${state.isSign}`,
  370. });
  371. });
  372. }
  373. })
  374. } else {
  375. // 已经登录
  376. let data = state.form;
  377. const options = {
  378. type: 2,
  379. data: data,
  380. method: "POST",
  381. showLoading: true,
  382. };
  383. request(etcUserCardInfoSubmit, options).then((res) => {
  384. // let result = stringToJson(res.bizContent);
  385. console.log(res);
  386. uni.redirectTo({
  387. url: `/subpackage/orders/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&type=${state.type}&isSign=${state.isSign}`,
  388. });
  389. });
  390. }
  391. };
  392. const cardFileImageUpdate = () => {
  393. uni.chooseImage({
  394. count: 1, //只能选取一张照片
  395. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  396. sourceType: ["camera", "album"], //从相册选择
  397. success: function (res) {
  398. pathToBase64(res.tempFilePaths[0])
  399. .then((path) => {
  400. var data = {
  401. fileBase64: path,
  402. };
  403. const options = {
  404. type: 2,
  405. data: data,
  406. method: "POST",
  407. showLoading: true,
  408. };
  409. request(fileUpload, options).then((res) => {
  410. const data = stringToJson(res.bizContent);
  411. console.log(data);
  412. state.form.proxyUrl = data.data.url;
  413. });
  414. })
  415. .catch((error) => { });
  416. },
  417. });
  418. };
  419. //tab切换
  420. const tabChange = (val : any) => {
  421. if (val) {
  422. state.isMyPeopple = true;
  423. } else {
  424. state.isMyPeopple = false;
  425. }
  426. state.form = {
  427. orderId: state.orderId, //订单ID
  428. userName: "", //开户人姓名
  429. userIdType: "101", //用户证件类型 101//身份证
  430. userIdNum: "", //用户证件号码
  431. userPosImgUrl: "", //身份证正面
  432. userNegImgUrl: "", //身份证反面
  433. tel: "", //开户人手机号
  434. address: "", //开户人地址
  435. sceneType: "", //用户协议支撑服务场景(发行服务机构和用户签订的协议)
  436. channelId: "", //渠道id
  437. gender: "",
  438. customerIdVld: "",
  439. agentName: "",
  440. agentGender: "",
  441. agentTel: '',
  442. agentPhone: "",
  443. agentIdType: "101",
  444. agentIdNum: "",
  445. agentPosImgUrl: "",
  446. agentNegImgUrl: "",
  447. proxyUrl: "",
  448. agentAddress: "",
  449. agentIdVld: '',
  450. };
  451. };
  452. onLoad((option : any) => {
  453. state.form.orderId = option.orderId;
  454. state.orderId = option.orderId;
  455. state.vehiclePlateColor = option.vehiclePlateColor;
  456. state.form.opId = getItem('openId') ? getItem('openId') : '';
  457. state.isSign = option.isSign;
  458. state.type = option.type;
  459. //state.fromOrder = option.fromOrder //是否来自订单-修改资料
  460. getGlobalParam(); //全局配置数据
  461. console.log("option", option)
  462. });
  463. //监听页面滚动
  464. onPageScroll((e) => {
  465. scrollTop.value = e.scrollTop;
  466. });
  467. const replaceInput = (event) => {
  468. console.log("event", event)
  469. const screeningStr = /[^\u4E00-\u9FA5]/g; //想禁止什么类型,在这里替换正则就可以了
  470. if (screeningStr.test(event)) {
  471. setTimeout(() => {
  472. state.form.userName = event.replace(screeningStr, '');
  473. }, 100)
  474. } else {
  475. setTimeout(() => {
  476. state.form.userName = event;
  477. }, 100)
  478. }
  479. console.log("event.replace(screeningStr, '')", event.replace(screeningStr, ''), event, state.form.userName)
  480. }
  481. const cardDbImageOcr = (val : any) => {
  482. var imageType = val;
  483. uni.chooseImage({
  484. count: 1, //只能选取一张照片
  485. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  486. sourceType: ["camera", "album"], //从相册选择
  487. success: function (res) {
  488. pathToBase64(res.tempFilePaths[0])
  489. .then((path) => {
  490. var data = {
  491. source: "1",
  492. agencyId: "52010106004",
  493. imageType: imageType,
  494. fileName: res.tempFilePaths[0],
  495. imageBase64: path,
  496. };
  497. const options = {
  498. type: 2,
  499. data: data,
  500. method: "POST",
  501. showLoading: true,
  502. };
  503. request(etcOcrCard, options).then((res) => {
  504. const data = stringToJson(res.bizContent);
  505. if (val === "1") {
  506. state.form.agentName = data.name;
  507. state.form.agentGender = data.gender;
  508. state.form.agentIdNum = data.idno;
  509. state.form.agentPosImgUrl = data.imageUrl;
  510. state.form.agentAddress = data.address;
  511. } else {
  512. state.form.agentIdVld = data.enddate;
  513. state.form.agentNegImgUrl = data.imageUrl;
  514. }
  515. });
  516. })
  517. .catch((error) => { });
  518. },
  519. });
  520. };
  521. //orc接口调用
  522. const cardImageOcr = (val : any) => {
  523. if (state.isEnableOCRData) {
  524. return;
  525. }
  526. var imageType = val;
  527. console.log("点击了", val)
  528. uni.chooseImage({
  529. count: 1, //只能选取一张照片
  530. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  531. sourceType: ["camera", "album"], //从相册选择
  532. success: function (res) {
  533. pathToBase64(res.tempFilePaths[0])
  534. .then((path) => {
  535. var data = {
  536. source: "1",
  537. agencyId: "52010106004",
  538. imageType: imageType,
  539. fileName: res.tempFilePaths[0],
  540. imageBase64: path,
  541. };
  542. const options = {
  543. type: 2,
  544. data: data,
  545. method: "POST",
  546. showLoading: true,
  547. };
  548. request(etcOcrCard, options).then((res) => {
  549. const data = stringToJson(res.bizContent);
  550. if (val === "1") {
  551. state.form.userName = data.name;
  552. state.form.gender = data.gender;
  553. state.form.userIdNum = data.idno;
  554. state.form.userPosImgUrl = data.imageUrl;
  555. state.form.address = data.address;
  556. } else {
  557. state.form.customerIdVld = data.enddate;
  558. state.form.userNegImgUrl = data.imageUrl;
  559. }
  560. });
  561. })
  562. .catch((error) => { });
  563. },
  564. });
  565. };
  566. //替换图片地址
  567. const strReplace = (str : string) => {
  568. let imgUrl = str.replace("http://192.168.101.145:9000", envs[process.env.NODE_ENV].baseUrl);
  569. imgUrl = imgUrl.replace("http://100.64.2.113:9000", envs[process.env.NODE_ENV].baseUrl);
  570. console.log(imgUrl)
  571. return imgUrl;
  572. }
  573. const getGlobalParam = () => {
  574. const data = getItem('globalParam')
  575. console.log("全局配置数据", getCodeName('IS_ENABLE', data.miniSupportOther), getCodeName('IS_ENABLE', data.otherUploadProxy), getCodeName('IS_ENABLE', data.miniInfoShow), getCodeName('IS_ENABLE', data.changeOCRData))
  576. // 小程序是否支持他人办理
  577. if (getCodeName('IS_ENABLE', data.miniSupportOther) == '启用') {
  578. state.isEnableOther = true;
  579. } else {
  580. state.isEnableOther = false;
  581. }
  582. // 他人办理时是否上传委托书
  583. if (getCodeName('IS_ENABLE', data.otherUploadProxy) == '启用') {
  584. state.isEnableBook = true;
  585. } else {
  586. state.isEnableBook = false;
  587. }
  588. // 小程序信息带出
  589. if (getCodeName('IS_ENABLE', data.miniInfoShow) == '启用') {
  590. state.isEnableInfo = true;
  591. uni.showModal({
  592. // title: '提示',
  593. content: '是否允许带出用户信息',
  594. success: function (res) {
  595. if (res.confirm) {
  596. console.log('用户点击确定');
  597. queryUserMsg() //通过opneId查询用户信息
  598. } else if (res.cancel) {
  599. console.log('用户点击取消');
  600. }
  601. }
  602. });
  603. } else {
  604. state.isEnableInfo = false;
  605. }
  606. // 允许修改OCR识别出来的数据
  607. if (getCodeName('IS_ENABLE', data.changeOCRData) == '启用') {
  608. state.isEnableOCRData = false;
  609. } else {
  610. state.isEnableOCRData = true;
  611. }
  612. }
  613. // 通过opneId查询用户信息
  614. const queryUserMsg = () => {
  615. const options = {
  616. type: 2,
  617. data: {
  618. "openId": getItem('openId')
  619. },
  620. method: "POST",
  621. showLoading: true,
  622. };
  623. request(getUserMsg, options).then((res) => {
  624. console.log("通过opneId查询用户信息", stringToJson(res.bizContent))
  625. const data = stringToJson(res.bizContent);
  626. state.form.userPosImgUrl = data.customerPosImgUrl;
  627. state.form.userNegImgUrl = data.customerNegImgUrl;
  628. state.form.userName = data.customerName;
  629. state.form.userIdNum = data.customerIdNum;
  630. state.form.address = data.customerAddress;
  631. state.form.tel = data.customerTel;
  632. })
  633. }
  634. </script>
  635. <style lang="scss" scoped>
  636. .title {
  637. font-size: 35rpx;
  638. font-family: Microsoft YaHei;
  639. font-weight: 400;
  640. color: #000000;
  641. line-height: 80rpx;
  642. margin-bottom: 10rpx;
  643. }
  644. .content-wrap {
  645. position: relative;
  646. margin-top: -50rpx;
  647. padding: 0rpx 30rpx;
  648. display: flex;
  649. .big {
  650. font-size: 30rpx;
  651. font-family: Microsoft YaHei;
  652. font-weight: 400;
  653. color: #333333;
  654. line-height: 24rpx;
  655. }
  656. .nomal {
  657. font-size: 26rpx;
  658. font-family: Microsoft YaHei;
  659. font-weight: 400;
  660. color: #666666;
  661. line-height: 24rpx;
  662. }
  663. .tip {
  664. margin-top: -5px;
  665. width: 117rpx;
  666. height: 16rpx;
  667. background: #00b38b;
  668. opacity: 0.3;
  669. }
  670. }
  671. .content {
  672. padding: 50rpx 30rpx 50rpx 30rpx;
  673. .action {
  674. padding-left: 20rpx;
  675. padding-right: 20rpx;
  676. padding-bottom: 30rpx;
  677. .button {
  678. height: 80rpx;
  679. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  680. border-radius: 40rpx;
  681. font-size: 32rpx;
  682. font-weight: 400;
  683. color: #ffffff;
  684. line-height: 80rpx;
  685. }
  686. }
  687. .item-tips {
  688. .title {
  689. font-size: 30rpx;
  690. font-family: Microsoft YaHei;
  691. font-weight: 400;
  692. color: #000000;
  693. line-height: 24rpx;
  694. }
  695. .tip {
  696. margin-top: 16rpx;
  697. font-size: 24rpx;
  698. font-family: Microsoft YaHei;
  699. font-weight: 400;
  700. color: #999999;
  701. line-height: 24rpx;
  702. }
  703. }
  704. .picture-wrapper {
  705. margin-top: 40rpx;
  706. .bg {
  707. background: #ffffff;
  708. box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8);
  709. border-radius: 20rpx;
  710. padding: 40rpx;
  711. display: flex;
  712. // align-items: center;
  713. justify-content: space-between;
  714. .name {
  715. font-size: 34rpx;
  716. font-family: Microsoft YaHei;
  717. font-weight: 400;
  718. color: #000000;
  719. line-height: 34rpx;
  720. }
  721. .value {
  722. margin-top: 20rpx;
  723. font-size: 24rpx;
  724. font-family: Microsoft YaHei;
  725. font-weight: 400;
  726. color: #999999;
  727. line-height: 24rpx;
  728. }
  729. .tip {
  730. margin-top: 20rpx;
  731. text-align: center;
  732. width: 110rpx;
  733. height: 40rpx;
  734. background: rgba(33, 190, 177, 0.2);
  735. border-radius: 6rpx;
  736. .tip-value {
  737. font-size: 20rpx;
  738. font-family: Microsoft YaHei;
  739. font-weight: 400;
  740. color: #0a8f8a;
  741. line-height: 40rpx;
  742. opacity: 1;
  743. }
  744. }
  745. }
  746. .icon {
  747. width: 294rpx;
  748. height: 188rpx;
  749. }
  750. }
  751. .shibie-wrapper {
  752. margin-top: 60rpx;
  753. .title {
  754. font-size: 30rpx;
  755. font-family: Microsoft YaHei;
  756. font-weight: 400;
  757. color: #000000;
  758. line-height: 30rpx;
  759. }
  760. }
  761. .buchong-wrapper {
  762. margin-top: 60rpx;
  763. .title {
  764. font-size: 30rpx;
  765. font-family: Microsoft YaHei;
  766. font-weight: 400;
  767. color: #000000;
  768. line-height: 30rpx;
  769. }
  770. }
  771. .green-tip {
  772. margin-top: 50rpx;
  773. font-size: 24rpx;
  774. font-family: Microsoft YaHei;
  775. font-weight: 400;
  776. color: #00b38b;
  777. line-height: 24rpx;
  778. margin-bottom: 60rpx;
  779. }
  780. }
  781. </style>