YHkamanager.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <view>
  3. <customNav :shownav="true" :title="$t('tixian.yhkguanli')" tinColor="#40AE36" jiantou="0" titledetl=''></customNav>
  4. <view class="contentColumn contenV">
  5. <view class="contentColumn ItemContent">
  6. <text class="bangdingText">{{$t('tixian.bangdingyhk')}}</text>
  7. <text class="jiedanText">{{$t('tixian.qingbangdbryhk')}}</text>
  8. </view>
  9. <view class="contentInRowL ItemContent">
  10. <text class="tianjiaBT">{{$t('tixian.chikaren')}}:</text>
  11. <input class="jiedanText" type="text" :placeholder="$t('tixian.qingshuckrxm')" @input="chikareninput">
  12. </view>
  13. <view class="contentInRowL ItemContent">
  14. <text class="tianjiaBT">{{$t('tixian.kahao')}}:</text>
  15. <input class="jiedanText" type="number" :placeholder="$t('tixian.qingshukh')" @input="kahaoinput">
  16. </view>
  17. <view class="contentInRowL ItemContent">
  18. <text class="tianjiaBT">{{$t('tixian.yinghang')}}:</text>
  19. <input class="jiedanText" type="text" :placeholder="$t('tixian.xuanzeyanhang')" @input="yinhanginput">
  20. </view>
  21. <!-- <view class="contentInRowS ItemContent" @click="popgjm">
  22. <view class="contentInRowL">
  23. <text class="tianjiaBT">{{$t('tixian.yinghang')}}:</text>
  24. <text v-if="yinhang.length>0" class="jiedanText">{{yinhang}}</text>
  25. <text v-if="yinhang.length==0" class="jiedanText">{{$t('tixian.xuanzeyanhang')}}</text>
  26. </view>
  27. <image style="width: 32rpx;height: 32rpx;" src="/static/imags/youjian@3x.png" mode="scaleToFill"></image>
  28. </view> -->
  29. </view>
  30. <view class="yzmctV">
  31. <label class="querenBt" @click="bangding">{{$t('tixian.bangdingyhk')}}</label>
  32. </view>
  33. <popViewGG :tips="$t('tixian.xuanzeyanhang')" :show="showpop" :maskClosable="true" :isCancel="true" @chooseCancel="chooseCancel">
  34. <picker-view :indicator-style="indicatorStyle" :value="pvalue" @change="bindChange" class="picker-view">
  35. <picker-view-column>
  36. <view class="item" v-for="(item,index) in range" :key="index">{{item}}</view>
  37. </picker-view-column>
  38. </picker-view>
  39. </popViewGG>
  40. </view>
  41. </template>
  42. <script>
  43. import {
  44. addbankcard,
  45. } from '@/pages/api/basic.js';
  46. export default {
  47. data() {
  48. return {
  49. meiyouyhk:true,
  50. chikaren:'',
  51. kahao:'',
  52. yinhang:'',
  53. showpop:false,
  54. range: [],
  55. pvalue: [0],
  56. indicatorStyle: `height: 50px;`
  57. }
  58. },
  59. onLoad() {
  60. this.range= [
  61. '工商银行',
  62. '交通银行',
  63. '农业银行',
  64. '民生银行',
  65. '广发银行',
  66. '浦发银行',
  67. '兴业银行'
  68. ];
  69. },
  70. methods: {
  71. chikareninput(event){
  72. this.chikaren = event.target.value;
  73. },
  74. kahaoinput(event){
  75. this.kahao = event.target.value;
  76. },
  77. yinhanginput(event){
  78. this.yinhang = event.target.value;
  79. },
  80. bindChange (e) {
  81. var val = e.detail.value[0];
  82. this.yinhang=this.range[val];
  83. },
  84. popgjm(){
  85. this.showpop=true;
  86. },
  87. chooseCancel(i){
  88. this.showpop=false;
  89. },
  90. bangding(){
  91. this.addbankcard();
  92. },
  93. async addbankcard(){
  94. //console.log('getUserMsg')
  95. if(''==this.kahao||''==this.yinhang||''==this.chikaren){
  96. uni.showToast({
  97. title: this.$t('tixian.qingtxwzyhkxx'),
  98. icon: 'none',
  99. duration: 2500
  100. })
  101. return;
  102. }
  103. await this.$http.post(`${addbankcard}`, {
  104. "number": this.kahao, //银行卡号
  105. "bankName": this.yinhang, //开户行
  106. "accountName": this.chikaren, //开户名
  107. "type": "0", //卡类型(0储蓄卡,1信用卡)
  108. "img": "" //银行图标
  109. },true)
  110. .then(async r => {
  111. console.log(r)
  112. uni.navigateBack();
  113. })
  114. .catch(err => {
  115. console.log(err)
  116. })
  117. },
  118. },
  119. }
  120. </script>
  121. <style lang="scss">
  122. @import '@/common/common.scss';
  123. @font-face {
  124. font-family: zrht;
  125. src: url('/uni_modules/font/zrht.otf');
  126. }
  127. page{
  128. background-color: whitesmoke;
  129. }
  130. .contenV{
  131. margin-top: 30rpx;
  132. width: 94%;
  133. margin-left: 3%;
  134. border-radius: 10rpx;
  135. box-shadow: 0px 0rpx 10rpx 0rpx darkgray;
  136. background-color: white;
  137. }
  138. .ItemContent{
  139. margin: 24rpx;
  140. border: solid whitesmoke;
  141. border-width: 0px 0px 2rpx 0px;
  142. }
  143. .jiedanText{
  144. font-size: 28rpx;
  145. color: darkgray;
  146. width: 80%;
  147. }
  148. .bangdingText{
  149. font-size: 28rpx;
  150. // font-family: zrht;
  151. padding-bottom: 10rpx;
  152. }
  153. .tianjiaBT{
  154. width: 180rpx;
  155. text-align: right;
  156. font-size: 28rpx;
  157. font-weight: bold;
  158. color: #1A1A1A;
  159. }
  160. .yzmctV{
  161. display: flex;
  162. flex-direction: row;
  163. align-items: center;
  164. justify-content:flex-start;
  165. margin-top: 30rpx;
  166. width: 94%;
  167. margin-left: 3%;
  168. }
  169. .querenBt{
  170. margin-top: 30rpx;
  171. width: 100%;
  172. height: 60rpx;
  173. line-height: 60rpx;
  174. padding: 10rpx;
  175. border-radius: 20rpx;
  176. text-align: center;
  177. justify-content: center;
  178. background-color: #40AE36;
  179. color: white;
  180. box-shadow: 0px 0rpx 10rpx 0rpx #40AE36;
  181. }
  182. .picker-view {
  183. width: 750rpx;
  184. height: 270rpx;
  185. }
  186. .item {
  187. line-height: 90rpx;
  188. text-align: center;
  189. }
  190. </style>