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.

197 lines
5.1 KiB

10 months ago
  1. <template>
  2. <view>
  3. <u-navbar
  4. :title="$t('page.bankCardWithdrawal.title')"
  5. :safeAreaInsetTop="false"
  6. placeholder
  7. @leftClick="leftClick"
  8. >
  9. </u-navbar>
  10. <u--form
  11. labelPosition="left"
  12. :model="model1"
  13. :rules="rules"
  14. class="line"
  15. ref="uForm"
  16. >
  17. <u-form-item
  18. :label="$t('page.bankCardWithdrawal.bank_id')"
  19. prop="bank_id"
  20. borderBottom
  21. labelWidth="80px"
  22. >
  23. <u--input
  24. v-model="model1.bank_no"
  25. @focus="showSelectBankCart = true"
  26. border="none"
  27. :placeholder="$t('page.bankCardWithdrawal.bank_id-placeholder')"
  28. ></u--input>
  29. </u-form-item>
  30. <u-form-item
  31. :label="$t('page.bankCardWithdrawal.withdrawalAmount')"
  32. prop="withdrawalAmount"
  33. borderBottom
  34. labelWidth="80px"
  35. >
  36. <u--input
  37. v-model="model1.withdrawalAmount"
  38. border="none"
  39. :placeholder="$t('page.bankCardWithdrawal.withdrawalAmount-placeholder')"
  40. ></u--input>
  41. </u-form-item>
  42. <u-form-item
  43. :label="$t('page.productDetail.payOrder.pay-password')"
  44. prop="payPassword"
  45. borderBottom
  46. labelWidth="80px"
  47. >
  48. <u--input
  49. v-model="model1.payPassword"
  50. type="password"
  51. :placeholder="$t('page.productDetail.payOrder.pay-input-placeholder')"
  52. ></u--input>
  53. </u-form-item>
  54. </u--form>
  55. <u-alert type = "warning" description = "Please check the card number information with customer service to ensure that it is accurate"></u-alert>
  56. <u-button class="submit"
  57. size="large" @click="submit"
  58. :text="$t('page.bankCardWithdrawal.submit')"></u-button>
  59. <!-- 注意事项 -->
  60. <view class="matters-needing-attention">
  61. <!-- <view class="matters-needing-attention-title">
  62. 注意事项
  63. </view>
  64. <view class="matters-needing-attention-content">
  65. <view>1.服务属于舒缓保健不是治疗如需治疗请到医院就诊</view>
  66. <view>2.平台只提供专业正规的服务对于不正当的行为和要求理疗师有权拒绝并保留诉讼法律的权利</view>
  67. <view>3.因客户原因提前终止服务的服务费不予退还</view>
  68. <view>4.客户因看见理疗师不够漂亮等与专业无关系列因素要求退单者该客户所付项回费退一半交通费不予退还</view>
  69. <view>5.如客户选择理疗师下单后理疗师与客户联系确定核实情况后理疗师按了确认出发客户如要取消订单的扣该订单的项目三分之一费用和理疗师的交通费用</view>
  70. <view>6.理疗师到达服务地址后若联系不上客户理疗师会等待20分钟; 如20分钟后仍无法联系上点按开始服务后理疗师则会自行离开该订单将扣除订单三分之一费用和金部交通费用剩余费用请联系客服退款感谢你的理解和支持</view>
  71. </view> -->
  72. </view>
  73. <bankCartSelect
  74. :show="showSelectBankCart"
  75. @close="showSelectBankCart = false"
  76. @select="select"
  77. :list="bankList"/>
  78. </view>
  79. </template>
  80. <script>
  81. import bankCartSelect from '@/components/bankCart/bankCartSelect.vue';
  82. export default {
  83. components : {
  84. bankCartSelect
  85. },
  86. data() {
  87. return {
  88. showSelectBankCart : false,
  89. model1: {
  90. withdrawalAmount: '',
  91. payPassword: '',
  92. bank_id : '',
  93. bank_no : ''
  94. },
  95. bankList : [],
  96. rules: {
  97. 'withdrawalAmount': {
  98. type: 'string',
  99. required: true,
  100. message: this.$t('page.bankCardWithdrawal.withdrawalAmount-placeholder'),
  101. trigger: ['blur', 'change']
  102. },
  103. 'payPassword': {
  104. type: 'string',
  105. required: true,
  106. message: this.$t('page.productDetail.payOrder.pay-input-placeholder'),
  107. trigger: ['blur', 'change']
  108. },
  109. // 'bank_id': {
  110. // type: 'string',
  111. // required: true,
  112. // message: this.$t('page.bankCardWithdrawal.bank_id-placeholder'),
  113. // trigger: ['blur', 'change']
  114. // },
  115. },
  116. };
  117. },
  118. onShow() {
  119. this.getData()
  120. },
  121. methods: {
  122. getData(){
  123. this.request('bankCardPage',{}, {
  124. uid : '1'
  125. }).then(res=>{
  126. if(res.code == 200){
  127. this.bankList = res.result.records
  128. }
  129. })
  130. this.request('tiShi').then(res => {
  131. if(res.code && res.result){
  132. }
  133. })
  134. },
  135. select(item){
  136. console.log(item);
  137. this.model1.bank_id = item.id
  138. this.model1.bank_no = item.no
  139. },
  140. leftClick(){
  141. uni.switchTab({
  142. url: '/pages/user/user'
  143. })
  144. },
  145. submit(){
  146. this.$refs.uForm.validate().then(res => {
  147. if(!this.model1.bank_id){
  148. return uni.$u.toast(this.$t('page.bankCardWithdrawal.bank_id-placeholder'));
  149. }
  150. this.request('water', {
  151. "type": "1",
  152. "money": this.model1.withdrawalAmount,
  153. bankId : this.model1.bank_id,
  154. payPass : this.model1.payPassword
  155. }).then(res => {
  156. if(res.code === 200){
  157. uni.$u.toast(this.$t('success-operation'))
  158. setTimeout(()=>{
  159. uni.navigateTo({
  160. url: '/pages/balance/balance'
  161. })
  162. },500)
  163. }
  164. })
  165. })
  166. }
  167. }
  168. }
  169. </script>
  170. <style lang="scss" scoped>
  171. .line{
  172. background-color: #fff;
  173. padding: 5px 10px;
  174. margin-top: 10px;
  175. }
  176. .submit{
  177. border-radius: 30px;
  178. background-color: #ED762F;
  179. color: #fff;
  180. margin: 10px;
  181. width: calc(100% - 20px);
  182. }
  183. </style>