get-deposit.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>押金详情-创业帮</title>
  6. <meta name="keywords" content="押金详情-创业帮">
  7. <meta name="description" content="押金详情-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="押金详情-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. <link rel="stylesheet" href="./static/css/possDetail.css?t=992">
  17. </head>
  18. <body class="pb0 ovh pt0" style="padding-top:0;">
  19. <div class="possDetail" id="app" v-cloak>
  20. <div class="formWarp" style="padding-bottom:0">
  21. <div class="item mb20"><span class="f14 c333 mr26">真实姓名</span><span class="f14 c999">{{userInfo.MerRealName}}</span></div>
  22. <div class="item mb8"><span class="f14 c333 mr26">身份证号</span><span class="f14 c999">{{userInfo.MerIdcardNo}}</span></div>
  23. <div class="df aic c-blue mb20"><img src="./static/images/accreditation.png" alt="alt">
  24. <div class="f12 ml4">身份证信息仅用于确认用户身份真实性</div>
  25. </div>
  26. <div class="item"><span class="f14 c333 mr12">开机手机号</span><span class="f14 c999">{{phoneNum}}</span></div>
  27. </div>
  28. <van-form class="formWarp" validate-first @failed="onFailed" validate-trigger="onSubmit" @submit="onSubmit" :show-error-message="false" :show-error="false">
  29. <div class="lable">
  30. <div class="f14">短信验证码</div>
  31. </div>
  32. <van-field class="user-phone mb12" center clearable>
  33. <template #button="">
  34. <div class="fl getbtn" @click="getsmscode" v-if="codeisclick">获取验证码</div>
  35. <div class="fl waitbtn" disabled v-else>{{countdown}}s</div>
  36. </template>
  37. <template #input="">
  38. <input class="mobilecode" placeholder="请输入验证码" v-model="formInfo.MobileCode" inputmode="numeric" type="text" autocomplete="one-time-code" style="padding:0;">
  39. </template>
  40. </van-field>
  41. <div class="lable">
  42. <div class="f14">收款支付宝账户</div>
  43. </div>
  44. <van-field v-model.number="formInfo.AlipayAccountNo" name="tel" placeholder="请输入与真实姓名一致的支付宝号"></van-field>
  45. <van-button class="btn abs btomBtn" round block type="info" color="#FDD500" native-type="submit">确认返还</van-button>
  46. </van-form>
  47. <van-popup v-model="applicationSuccess" style="border-radius:.4267rem;width:83%;">
  48. <div class="warp-box" style="height:4.4133rem;padding: 0 .5333rem">
  49. <div class="f16 c333 tc b" style="margin:.5333rem auto .2133rem auto">返还成功</div>
  50. <div class="f14">押金将在审核后内返还至您的支付宝账户,请及时查收</div>
  51. <van-button class="btn" round color="#FDD500" block @click="sureBtn" style="width:6.3rem;">好的</van-button>
  52. </div>
  53. </van-popup>
  54. </div>
  55. <script src="./static/js/klm-vv.min.js?t=99999999912312"></script>
  56. <script src="./static/js/appfunc.min.js?t=99999999912312"></script>
  57. <script src="./static/js/klm-axios-config.js?t=99999999912312"></script>
  58. <script src="./static/js/publicfn.js?t=999999999"></script>
  59. <script>
  60. // 在 #app 标签下渲染一个按钮组件
  61. let app = new Vue({
  62. el: '#app',
  63. data() {
  64. return {
  65. toptitleisshow:true,
  66. codeisclick:true,
  67. formInfo:{
  68. AlipayAccountNo:'',
  69. MobileCode:'',
  70. },
  71. userInfo:{
  72. MerReanlName:'',
  73. MerIdcardNo:'',
  74. MerchantMobile:'',
  75. },
  76. countdown:60,
  77. diaoisshow:false,
  78. applicationSuccess:false,
  79. };
  80. },
  81. created() {
  82. this.toptitleisshow = toptitleisshow;
  83. this.getMerchantInfo()
  84. this.userInfo = JSON.parse(PublicLib.getCookieInfo('formInfo'));
  85. },
  86. computed:{
  87. phoneNum:function(){
  88. console.log(this.userInfo.MerchantMobile)
  89. let a = this.userInfo.MerchantMobile.toString().split('')
  90. a.splice(3,4,'*','*','*','*')
  91. return a.join('')
  92. }
  93. },
  94. methods: {
  95. //- 获取验证码
  96. async getsmscode(){
  97. if(verification(this.formInfo.MerchantMobile)) return;
  98. this.codeisclick = false;
  99. setTimeout(()=>{
  100. this.codeisclick = true;
  101. },60000);
  102. const timer = setInterval(()=>{
  103. this.countdown--;
  104. if(this.countdown === 0) {
  105. this.countdown = 60;
  106. clearInterval(timer)
  107. }
  108. },1000);
  109. const res = await postRequest('api/v1/mobilecodecheck/sendsms',JSON.stringify({Mobile:this.formInfo.MerchantMobile}));
  110. if(res.status === '1'){
  111. tips('验证码已发送,请注意查收')
  112. };
  113. },
  114. async getMerchantInfo(){
  115. const Id = PublicLib.getCookieInfo('merChantId')
  116. const res = await getRequest('api/v1/pos/posmerchantinfo/returndepositforconfirm?'+Math.random(6),JSON.stringify({Id}))
  117. if(res.status !== '1'){
  118. return tips('初始化失败!')
  119. }
  120. this.userInfo = res.data
  121. },
  122. onFailed(errorInfo) {
  123. tips(errorInfo.errors[0].message);
  124. },
  125. onSubmit(){
  126. console.log('rilima')
  127. if(this.formInfo.MobileCode === '') return tips('请输入短信验证码!');
  128. if(this.formInfo.AlipayAccountNo === '') return tips('请输入支付宝账号!')
  129. this.postForm()
  130. },
  131. goback(){
  132. PublicLib.GoBack({Leval:1});
  133. },
  134. sureBtn(){
  135. this.applicationSuccess = false
  136. PublicLib.Goto({Url:'deposit-detail'});
  137. },
  138. async postForm(){
  139. let res = await postRequest('api/v1/pos/merchantdepositreturns/Add?t='+Math.random(6),JSON.stringify({...this.formInfo,...this.userInfo}));
  140. if(res.status === '1'){
  141. tips('申请失败!请重试')
  142. }else{
  143. this.diaoisshow = true
  144. }
  145. }
  146. },
  147. })
  148. </script>
  149. </body>
  150. </html>