practitionerInfo.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. <template>
  2. <view class="page">
  3. <view class="headers ">
  4. <view class="header">
  5. <view class="dis a-c j-start ">
  6. <u-icon name="arrow-left" size="40" @tap="back"></u-icon>
  7. <text style="margin: auto;">提交资料</text>
  8. </view>
  9. </view>
  10. </view>
  11. <view class="reviewResult dis f-c"
  12. :style="{background:desc?'linear-gradient( 90deg, #FFE2E0 0%, #FBF3F3 100%)':'linear-gradient( 90deg, #FFF4E0 0%, #FBF8F3 100%)',borderTop:desc?'1px solid #FF535B':'1px solid #FFB053',borderBottom:desc?'1px solid #FF535B':'1px solid #FFB053'}">
  13. <view class="dis a-c">
  14. <image v-if="desc" src="../../static/image/user/error.png" mode="" style="width: 28rpx;height: 35rpx;">
  15. </image>
  16. <text v-if="desc" style="color:#F44149;font-size: 13px;">审核不通过:</text>
  17. <text v-else style="color: #E79E11;font-size: 13px;">尊敬的{{this.userInfo.sysUser.name}}:</text>
  18. </view>
  19. <text>{{desc?desc:'为了顺利开展您的车险业务,请您提交以下资料的照片,提交后,我们将在第一时间进行审核请您耐心等待,我们会尽快完成审核并通知您结果。'}}</text>
  20. </view>
  21. <view style="padding: 12px 15px 74px;">
  22. <view class="ImgInfo">
  23. <view class="title dis a-c ">
  24. <view class="tag"></view>
  25. <text>身份证件照</text>
  26. </view>
  27. <view class="content">
  28. <view class="avatar dis j-s">
  29. <view class="dis f-c a-c">
  30. <view class="avatar-img">
  31. <image :src="userfrontImg" mode=""></image>
  32. </view>
  33. <text style="font-size: 14px;color: #333;font-weight: bold;">头像面</text>
  34. </view>
  35. <view class="dis f-c a-c">
  36. <view class="avatar-img">
  37. <image :src="userbackImg" mode=""></image>
  38. </view>
  39. <text style="font-size: 14px;color: #333;font-weight: bold;">国徽面</text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="ImgInfo mt-3">
  45. <view class="title dis a-c ">
  46. <view class="tag"></view>
  47. <text>银行卡信息</text>
  48. <text>请确保照片清晰,信息完整可见</text>
  49. </view>
  50. <view class="content">
  51. <view class="bankimg dis j-c">
  52. <view class="dis f-c a-c">
  53. <view class="avatar-img">
  54. <image :src="bankImg?bankImg:'../../static/image/user/bank.png'" mode=""
  55. @click="bankchange"></image>
  56. </view>
  57. <text style="font-size: 14px;color: #333;font-weight: bold;">银行卡正面</text>
  58. </view>
  59. </view>
  60. </view>
  61. <uni-forms :value="bankInfo" ref="bankForm" validate-trigger="bind" err-show-type="toast"
  62. label-width="70" style="padding: 0 10px;">
  63. <uni-forms-item label="开户行: " required name="caryear">
  64. <input class="uni-input-input textColor" placeholder="输入开户行信息" v-model="bankInfo.accountno"
  65. placeholder-style="font-size:28upx" />
  66. </uni-forms-item>
  67. <uni-forms-item label="开户账号: " required>
  68. <input class="uni-input-input textColor" placeholder="输入开户账号信息" v-model="bankInfo.bankName"
  69. placeholder-style="font-size:28upx" />
  70. </uni-forms-item>
  71. </uni-forms>
  72. </view>
  73. <view class="ImgInfo mt-3">
  74. <view class="title dis a-c ">
  75. <view class="tag"></view>
  76. <text>展业资格证</text>
  77. <text>请确保照片清晰,信息完整可见</text>
  78. </view>
  79. <view class="content">
  80. <view class="bankimg dis j-c">
  81. <view class="dis f-c a-c">
  82. <view class="avatar-img">
  83. <image :src="certificationImg?certificationImg:'../../static/image/user/zigezheng.png'"
  84. mode="" @click="certificationChange">
  85. </image>
  86. </view>
  87. <text style="font-size: 14px;color: #333;font-weight: bold;">展业资格证</text>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="footer">
  94. <view class="btn dis j-c a-c"
  95. :style="{background:disabled?'linear-gradient(90deg, #499DFF 0%, #0052FF 100%)':'linear-gradient(90deg, rgba(73, 157, 255, 0.4) 0%, rgba(0, 82, 255, 0.4) 100%)',pointerEvents:disabled?'auto':'none'}"
  96. @tap="$u.throttle(authSubmit,3000)">提交申请</view>
  97. </view>
  98. </view>
  99. </template>
  100. <script>
  101. import {
  102. mapState
  103. } from "vuex"
  104. export default {
  105. data() {
  106. return {
  107. disabled: false,
  108. userfrontImg: "",
  109. userbackImg: "",
  110. bankImg: "",
  111. certificationImg: "",
  112. bankInfo: {
  113. accountno: "",
  114. bankName: "",
  115. esmUserImageVo: [
  116. ],
  117. userId: "",
  118. },
  119. desc: ""
  120. }
  121. },
  122. watch: {
  123. "bankInfo.accountno": {
  124. handler(val) {
  125. this.OnBtnChange();
  126. },
  127. },
  128. "bankInfo.bankName": {
  129. handler(val) {
  130. this.OnBtnChange();
  131. },
  132. },
  133. },
  134. computed: {
  135. ...mapState(['userInfo', 'token']),
  136. },
  137. onShow() {
  138. },
  139. async onLoad() {
  140. this.bankInfo.userId = this.userInfo.sysUser.id;
  141. let res = await this.$http.post('/userAgent/getAuthResult', {
  142. userId: this.bankInfo.userId,
  143. });
  144. if (await res.code == '200') {
  145. this.desc = res.data.desc;
  146. this.bankInfo.accountno = res.data.sysUserInfo.accountno;
  147. this.bankInfo.bankName = res.data.sysUserInfo.bankName;
  148. this.bankInfo.esmUserImageVo = res.data.esmUserImageVo;
  149. res.data.esmUserImageVo.map(val => {
  150. switch (val.type) {
  151. case 'SFZ_01':
  152. this.userfrontImg = this.$base.baseUrl + val.path;
  153. break;
  154. case 'SFZ_02':
  155. this.userbackImg = this.$base.baseUrl + val.path;
  156. break;
  157. case 'YHK_01':
  158. this.bankImg = this.$base.baseUrl + val.path;
  159. break;
  160. case 'ZGZ_00':
  161. this.certificationImg = this.$base.baseUrl + val.path;
  162. break;
  163. }
  164. return val;
  165. })
  166. }
  167. },
  168. methods: {
  169. async authSubmit() {
  170. uni.showLoading({
  171. mask: true,
  172. title: '正在提交,请稍等片刻'
  173. });
  174. let res = await this.$http.post('/userAgent/agentSubmit', this.bankInfo);
  175. if (res.code == '200') {
  176. uni.hideLoading();
  177. uni.navigateTo({
  178. url: "/pages/user/authResult1"
  179. })
  180. } else {
  181. uni.hideLoading();
  182. uni.showToast({
  183. title: res.msg,
  184. icon: 'none',
  185. });
  186. }
  187. },
  188. // 改变按钮状态
  189. OnBtnChange() {
  190. if (this.bankInfo.accountno && this.bankInfo.bankName) {
  191. this.disabled = true;
  192. return;
  193. }
  194. this.disabled = false;
  195. },
  196. async bankchange() {
  197. let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
  198. count: 1,
  199. sizeType: ['compressed']
  200. });
  201. let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
  202. if (!size) {
  203. this.$refs.uToast.show({
  204. title: '上传图片大小不能超过 5MB!',
  205. type: 'error',
  206. })
  207. return false
  208. }
  209. if (chooseImageRes) {
  210. this.bankImg = chooseImageRes.tempFilePaths[0];
  211. uni.uploadFile({
  212. url: this.$base.baseUrl + '/ins/taskImage/uploadFile',
  213. filePath: chooseImageRes.tempFilePaths[0],
  214. name: "multipartFile",
  215. formData: {
  216. 'type': 'image',
  217. },
  218. header: {
  219. Authorization: this.token,
  220. },
  221. success: (imgRes) => {
  222. let data = JSON.parse(imgRes.data);
  223. if (data.code == '200') {
  224. if (this.bankInfo.esmUserImageVo.some(v => v.type == 'YHK_01')) {
  225. this.bankInfo.esmUserImageVo.map(val => {
  226. if (val.type == 'YHK_01') {
  227. val.imageId = data.data.id;
  228. }
  229. })
  230. } else {
  231. this.bankInfo.esmUserImageVo.push({
  232. imageId: data.data.id,
  233. type: "YHK_01",
  234. })
  235. }
  236. }
  237. }
  238. })
  239. }
  240. },
  241. async certificationChange() {
  242. let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
  243. count: 1,
  244. sizeType: ['compressed']
  245. });
  246. let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
  247. if (!size) {
  248. this.$refs.uToast.show({
  249. title: '上传图片大小不能超过 5MB!',
  250. type: 'error',
  251. })
  252. return false
  253. }
  254. if (chooseImageRes) {
  255. this.certificationImg = chooseImageRes.tempFilePaths[0];
  256. uni.uploadFile({
  257. url: this.$base.baseUrl + '/ins/taskImage/uploadFile',
  258. filePath: chooseImageRes.tempFilePaths[0],
  259. name: "multipartFile",
  260. formData: {
  261. 'type': 'image',
  262. },
  263. header: {
  264. Authorization: this.token,
  265. },
  266. success: (imgRes) => {
  267. let data = JSON.parse(imgRes.data);
  268. if (data.code == '200') {
  269. if (this.bankInfo.esmUserImageVo.some(v => v.type == 'ZGZ_00')) {
  270. this.bankInfo.esmUserImageVo.map(val => {
  271. if (val.type == 'ZGZ_00') {
  272. val.imageId = data.data.id;
  273. }
  274. })
  275. } else {
  276. this.bankInfo.esmUserImageVo.push({
  277. imageId: data.data.id,
  278. type: "ZGZ_00",
  279. })
  280. }
  281. }
  282. }
  283. })
  284. }
  285. },
  286. //页面返回按钮
  287. back() {
  288. uni.navigateBack({
  289. delta: 1, // 返回的页面数,如果是1表示返回上一页
  290. success: function() {}
  291. });
  292. },
  293. }
  294. }
  295. </script>
  296. <style lang="scss" scoped>
  297. ::v-deep .uni-forms-item {
  298. border-bottom: 1px solid #f2f2f2;
  299. }
  300. ::v-deep .uni-forms-item:last-child {
  301. border: none;
  302. }
  303. ::v-deep .uni-forms-item__content {
  304. display: flex;
  305. align-items: center;
  306. }
  307. page {
  308. background: #F7F7F7;
  309. }
  310. .headers {
  311. position: fixed;
  312. top: 0;
  313. left: 0;
  314. z-index: 999999;
  315. width: 100%;
  316. .header {
  317. width: 100%;
  318. height: auto;
  319. padding: 50px 16px 14px;
  320. background: linear-gradient(180deg, #D1E3FE 0%, #FFFFFF 100%);
  321. text {
  322. font-size: 18px;
  323. font-weight: bold;
  324. color: #000;
  325. }
  326. }
  327. }
  328. .reviewResult {
  329. width: 100%;
  330. background: linear-gradient(90deg, #FFF4E0 0%, #FBF8F3 100%);
  331. border-radius: 0px 0px 0px 0px;
  332. padding: 8px 15px;
  333. margin-top: 96px;
  334. text:last-child {
  335. color: #333;
  336. font-size: 12px;
  337. }
  338. }
  339. .ImgInfo {
  340. background: #FFFFFF;
  341. border-radius: 5px;
  342. border-bottom: 1px solid #EEEEEE;
  343. .title {
  344. padding: 10px 0;
  345. .tag {
  346. width: 4px;
  347. height: 16px;
  348. background: linear-gradient(132deg, #83B4FC 0%, #3D74FE 100%);
  349. border-radius: 5px;
  350. }
  351. text:nth-child(2) {
  352. font-size: 16px;
  353. color: #333;
  354. font-weight: bold;
  355. margin-left: 6px;
  356. }
  357. text:nth-child(3) {
  358. font-size: 12px;
  359. color: #999;
  360. margin-left: 10px;
  361. }
  362. }
  363. .content {
  364. padding: 0 10px 10px;
  365. .avatar {
  366. background: #FBFBFB;
  367. border-radius: 4px;
  368. padding: 7px 8px;
  369. .avatar-img {
  370. width: 130px;
  371. height: 78px;
  372. position: relative;
  373. padding: 7px;
  374. background-image: url("/static/image/user/asset3.png");
  375. background-size: 100% 100%;
  376. margin-top: 10px;
  377. image {
  378. width: 100%;
  379. height: 100%;
  380. border-radius: 4px;
  381. }
  382. }
  383. }
  384. .bankimg {
  385. background: #FBFBFB;
  386. border-radius: 4px;
  387. padding: 7px 8px;
  388. .avatar-img {
  389. width: 180px;
  390. height: 109px;
  391. position: relative;
  392. padding: 7px;
  393. background-image: url("/static/image/user/asset3.png");
  394. background-size: 100% 100%;
  395. image {
  396. width: 100%;
  397. height: 100%;
  398. border-radius: 4px;
  399. }
  400. }
  401. }
  402. }
  403. }
  404. .footer {
  405. position: fixed;
  406. bottom: 0;
  407. height: 62px;
  408. background: #FFFFFF;
  409. box-shadow: 0px -4px 10px 0px rgba(1, 83, 255, 0.05);
  410. padding: 12px 16px;
  411. width: 100%;
  412. .btn {
  413. border-radius: 4px;
  414. padding: 7px;
  415. color: #FFFFFF;
  416. font-size: 16px;
  417. }
  418. }
  419. </style>