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.

open-account.vue 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <view class='content'>
  3. <view class='up_img_wrap'>
  4. <view class='title'>请上传图片</view>
  5. <view class='tips'>注意事项:1.请上传有效图片;2.图片大小不超过2M</view>
  6. <view class='item_wrap'>
  7. <view class='item' @click="cardDbImageOcr('1')">
  8. <image v-if="!state.isBusinessLicense" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  9. </image>
  10. <image v-else class="icon" :src="strReplace(state.form.businessLicenseUrl)"></image>
  11. <view>公司营业执照</view>
  12. </view>
  13. <view class='item' @click="cardDbImageOcr('2')">
  14. <image v-if="!state.isBusinessLicense" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  15. </image>
  16. <image v-else class="icon" :src="strReplace(state.form.businessLicenseUrl)"></image>
  17. <view>单位授权书</view>
  18. </view>
  19. <view class='item' @click="cardDbImageOcr('3')">
  20. <image v-if="!state.isBusinessLicense" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  21. </image>
  22. <image v-else class="icon" :src="strReplace(state.form.businessLicenseUrl)"></image>
  23. <view>被委托人身份证正页照</view>
  24. </view>
  25. <view class='item' @click="cardDbImageOcr('4')">
  26. <image v-if="!state.isBusinessLicense" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`">
  27. </image>
  28. <image v-else class="icon" :src="strReplace(state.form.businessLicenseUrl)"></image>
  29. <view>被委托人身份证副页</view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class='up_img_wrap message'>
  34. <u-form :model="form" ref="form1" label-width=210 border-bottom=false>
  35. <u-form-item label="对公用户登录名 " border-bottom=true >
  36. <u-input placeholder='请输入6-12位字母加数字组成的账号' type="text" v-model="state.form.name"/>
  37. </u-form-item>
  38. <u-form-item label="公司证件类型 ">
  39. <u-input v-model="state.form.type" type="select" :select-open="state.showType" @click="state.showType = true" placeholder='请选择'/>
  40. </u-form-item>
  41. <u-form-item label="公司证件编码 " >
  42. <u-input placeholder='请输入公司证件编码' type="text" v-model="state.form.code"/>
  43. </u-form-item>
  44. <u-form-item label="公司名称" >
  45. <u-input placeholder='请输入公司名称' type="text" v-model="state.form.companyName"/>
  46. </u-form-item>
  47. <u-form-item label="经办人姓名" >
  48. <u-input placeholder='请输入经办人姓名' type="text" v-model="state.form.handlerName"/>
  49. </u-form-item>
  50. <u-form-item label="经办人手机号" >
  51. <u-input placeholder='请输入经办人手机号' type="text" v-model="state.form.handlerPhone"/>
  52. </u-form-item>
  53. </u-form>
  54. <view class='pay_msg'>付款银行账户信息</view>
  55. <view class='company' @click='goBankCard()'>
  56. <view>
  57. <view><text>123456</text><text>贵阳银行股份有限公司</text></view>
  58. <view class='phone'>123****5678</view>
  59. </view>
  60. <u-icon name="arrow-right" color='#ccc' size='40'></u-icon>
  61. </view>
  62. </view>
  63. <view class='attention'>
  64. <view>注意事项:</view>
  65. <view>1.开户成功后,请先设置密码,否则不能进行圈存操作</view>
  66. <view>2.付款账户:贵单位打款银行卡</view>
  67. <view>3.开户申请审核结果将于两个工作日发送短信告知</view>
  68. <view>4.只支持黔通卡充值</view>
  69. </view>
  70. <u-button class='open' type="success">开户</u-button>
  71. </view>
  72. <u-picker mode="selector" :range="state.typeList" v-model="state.showType" @confirm="regionConfirmType"></u-picker>
  73. </template>
  74. <script setup lang="ts">
  75. import {reactive} from "vue";
  76. import {etcOcrCard} from "@/utils/network/api.js";
  77. import {pathToBase64} from "@/utils/image-tools/index.js";
  78. import { navTo } from "@/utils/utils";
  79. const state = reactive({
  80. isBusinessLicense:false, //是否上传公司营业执照
  81. form:{
  82. businessLicenseUrl:'', //公司营业执照
  83. name:'',//对公用户登录名
  84. type:'',//公司证件类型
  85. code:'', //公司证件编码
  86. companyName:'',
  87. handlerName:'',
  88. handlerPhone:'',
  89. },
  90. showType:false, //公司证件类型下拉
  91. typeList:['营业执照','统一社会信用代码证','组织结构代码证'],
  92. })
  93. const cardDbImageOcr = (val : any) => {
  94. var imageType = val;
  95. uni.chooseImage({
  96. count: 1, //只能选取一张照片
  97. sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
  98. sourceType: ["camera", "album"], //从相册选择
  99. success: function (res) {
  100. pathToBase64(res.tempFilePaths[0])
  101. .then((path) => {
  102. var data = {
  103. source: "1",
  104. agencyId: "52010106004",
  105. imageType: imageType,
  106. fileName: res.tempFilePaths[0],
  107. imageBase64: path,
  108. };
  109. const options = {
  110. type: 2,
  111. data: data,
  112. method: "POST",
  113. showLoading: true,
  114. };
  115. request(etcOcrCard, options).then((res) => {
  116. const data = stringToJson(res.bizContent);
  117. // if (val === "1") {
  118. // state.form.agentName = data.name;
  119. // state.form.agentGender = data.gender;
  120. // state.form.agentIdNum = data.idno;
  121. // state.form.agentPosImgUrl = data.imageUrl;
  122. // state.form.agentAddress = data.address;
  123. // } else {
  124. // state.form.agentIdVld = data.enddate;
  125. // state.form.agentNegImgUrl = data.imageUrl;
  126. // }
  127. });
  128. })
  129. .catch((error) => { });
  130. },
  131. });
  132. };
  133. // 选择公司证件类型的回调
  134. const regionConfirmType=(e : any)=>{
  135. state.form.type=state.typeList[e]
  136. }
  137. const goBankCard=()=>{
  138. navTo(`/subpackage/personal-center/setting/bank-card/bank-card`);
  139. }
  140. </script>
  141. <style scoped>
  142. .content{
  143. background-color:rgb(246,246,246);
  144. font-size:30rpx;
  145. padding-bottom: 30rpx;
  146. }
  147. .up_img_wrap{
  148. background-color:white;
  149. padding:0 20rpx;
  150. }
  151. .title{
  152. margin:0 0 20rpx 0;
  153. }
  154. .tips{
  155. color:red;
  156. font-size:30rpx;
  157. }
  158. .item_wrap{
  159. display: flex;
  160. flex-shrink: 1;
  161. flex-wrap: wrap;
  162. justify-content: space-between;
  163. padding:10rpx 0 20rpx 0;
  164. }
  165. .item{
  166. width:45%;
  167. height:250rpx;
  168. margin-top:20rpx;
  169. }
  170. .item image{
  171. width:100%;
  172. height:80%;
  173. }
  174. .item view{
  175. text-aline:center;
  176. text-align: center;
  177. }
  178. .message{
  179. margin-top:30rpx;
  180. }
  181. .pay_msg{
  182. border-bottom: 2px dotted rgb(75,217,97);
  183. padding:30rpx 0;
  184. }
  185. .company{
  186. padding: 20rpx 50rpx 20rpx 6rpx;
  187. display:flex;
  188. align-items: center;
  189. justify-content: space-between;
  190. }
  191. .phone{
  192. margin-top:20rpx;
  193. }
  194. .attention{
  195. background-color:rgb(246,246,246);
  196. color:red;
  197. font-size:30rpx;
  198. padding:30rpx 20rpx 20rpx 20rpx;
  199. }
  200. </style>