zj
2024-06-03 89d48809779ae41f8712539584798d5900b64b78
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
<template>
  <el-container class="user-center">
    <el-header class="user-header">
      <home-header></home-header>
    </el-header>
    <div class="usercot">
      <el-container class="main-wrapper">
        <el-aside width="178px">
          <menu-box></menu-box>
        </el-aside>
        <el-main>
          <div class="header-chi" style="text-align: left;">
            <div class="user-center-title">
              <img src="../../../../assets/image/sanjao.png" alt />
              <span>提现</span>
            </div>
          </div>
          <div class="wrapper">
            <div class="chongzhi-cont" style="display: flex;justify-content: center;">
              <div style="width:100%">
                <el-form>
                  <div style="width:80%" class="left">
                    <div class="chongzhi-img">
                      <img
                        src="../../../../assets/image/chongzhi.png"
                        v-if="color == 'black-bg'"
                        alt
                      />
                      <img
                        src="../../../../assets/image/chongzhi1.png"
                        v-if="color == 'red-bg'"
                        alt
                      />
                    </div>
                    <div class="chongzhi-input">
                      <span>提现金额:</span>
                      <el-input type="text" v-model="form.number" placeholder="请输入提现金额"></el-input>
                      <!-- <el-input v-model="form.amt" type="number" placeholder="最小充值金额为100元"></el-input> -->
                    </div>
                    <el-form
                      label-width="100px"
                      v-model="form"
                      ref="ruleForm"
                      :rules="rule"
                      class="demo-form-inline"
                    >
                      <div class="chongzhi-type">
                        <p class="enable">
                          当前账户可用余额:
                          <span class="qian">¥{{$store.state.userInfo.enableAmt}}</span>
                          <a @click="selectAll" href="javascript:;">全部提现</a>
                        </p>
                      </div>
                    </el-form>
 
                    <div class="money-cont">
                      <p class="enable">
                        可用:
                        <span class="k">{{$store.state.userInfo.enableAmt}}</span>
                      </p>
                      <p class="enable">
                        冻结:
                        <span class="k">{{$store.state.hide?'****':$store.state.userInfo.allFreezAmt}}</span>
                      </p>
                    </div>
                    <!-- @click="chongzhi" -->
                    <div class="chongzhi-btn-cont" @click="Onsubmit('ruleForm')">
                      <div class="chongzhi-btn">提现</div>
                    </div>
                  </div>
                </el-form>
 
                <div class="chongzhi-bizhi">
                  <div class="chongzhi-bizhi-cont">
                    <div>入金须知</div>
                    <div class="chongzhi-item">
                      <span class="circle">1</span>
                      <span>点击“点击去充值”,跳转到支付页面;</span>
                    </div>
                    <div class="chongzhi-item">
                      <span class="circle">2</span>
                      <span>打开手机扫描完成支付。</span>
                    </div>
                    <div class="chongzhi-item">
                      <span class="circle">3</span>
                      <span>由于支付收款上限限制,每次收款公户可能不一样,请每次充值前获取最新的二维码完成支付。</span>
                    </div>
                    <div class="chongzhi-item">
                      <span class="circle">4</span>
                      <span>充值默认充值在股票账户中,如需充值指数账户可从股票账户转入至指数账户。</span>
                    </div>
                  </div>
                  <div class="right">
                    <img
                      src="../../../../assets/image/youqingtishi.png"
                      v-if="color == 'black-bg'"
                      alt
                    />
                    <img
                      src="../../../../assets/image/youqingtishi1.png"
                      v-if="color == 'red-bg'"
                      alt
                    />
                  </div>
                </div>
              </div>
            </div>
 
            <!-- <div class="box page-part transaction">
            <div class="box-contain clearfix">
              <div class="user-center-title">
                用户提现
              </div>
              <div class="text-center">
                <i style="color:green;font-size: 1.5rem;" class="iconfont icon-tixian1"></i>
              </div>
              <div class="auth-box">
                <el-form label-width="100px" v-model="form" ref="ruleForm" :rules="rule" class="demo-form-inline">
                  <el-form-item label="提现金额" prop="number">
                    <el-input type='text' v-model="form.number" placeholder="请输入提现金额">
                    </el-input>
                  </el-form-item>
                </el-form>
                <p class="enable">当前账户可用余额 <span>{{$store.state.userInfo.enableAmt}}</span> <a @click="selectAll"
                                                                                               href="javascript:;">全部提现</a>
                </p>
                <div slot="footer" class="dialog-footer">
                  <el-button type="success" :loading="isloading" @click="Onsubmit('ruleForm')">提现</el-button>
                </div>
              </div>
            </div>
            <div class="rule-box">
              <div class="attention" style="margin-bottom:10px;">
                <p>注意: 提现默认提取股票账户中的可用资金,如需提取指数账户中的金额请先转入至股票账户再提取 。</p>
              </div>
              <div class="title">提示:</div>
              <div class="attention">
                <p>1、当前有持仓订单不能出金 。</p>
                <p>2、出金请先在官网通过实名认证和绑定银行卡 。</p>
                <p>3、出金时间工作日 {{settingInfo.withTimeBegin}} : 00 到 {{settingInfo.withTimeEnd}} : 00 之间。</p>
                <p>4、每笔出金扣除 {{settingInfo.withFeeSingle}} 元手续费<span v-if="settingInfo.withFeePercent != 0">,加上出金金额 * {{settingInfo.withFeePercent}}</span>。
                </p>
                <p>5、每笔提现金额最小 {{settingInfo.withMinAmt}} 元。</p>
                <p>6、<span class="red">出金时段内出金一般2小时到账,出金时间收银行间清算时间影响,各家银行到账时间不同,最迟T+1次日24点前到账</span></p>
              </div>
            </div>
            </div>-->
          </div>
          <!-- <home-footer :siteInfo="siteInfo"></home-footer> -->
        </el-main>
      </el-container>
    </div>
  </el-container>
</template>
 
<script>
import HomeHeader from "../../../../components/HeaderOrder";
import HomeFooter from "../../../../components/Footer";
import MenuBox from "../menu";
import * as api from "../../../../axios/api";
import { mapState } from "vuex";
 
export default {
  components: {
    HomeHeader,
    HomeFooter,
    MenuBox,
  },
  props: {},
  data() {
    // let validatePass = (rule, value, callback) => {
    //   if (value === '') {
    //     callback(new Error('请输入银行卡号'))
    //   } else {
    //     let myreg = /^([1-9]{1})(\d{14,18})$/ // 卡号校验
    //     if (!myreg.test(value)) {
    //       callback(new Error('请输入正确的银行卡号'))
    //     }
    //     callback()
    //   }
    // }
    return {
      hasAuth: false,
      isloading: false,
      form: {
        number: "",
      },
      rule: {
        number: [
          { required: true, message: "请输入提现金额", trigger: "blur" },
        ],
      },
      settingInfo: {
        withTimeBegin: "",
        withTimeEnd: "",
        withFeeSingle: "",
        withFeePercent: "",
        withMinAmt: "",
      },
    };
  },
  watch: {},
  computed: {
    ...mapState({
      color: (state) => state.systemColor,
    }),
  },
  created() {
    this.getSettingInfo();
    if (!this.$store.state.bankInfo.bankInfo) {
      this.getCardDetail();
    }
    if (!this.$store.state.userInfo.idCard) {
      this.getUserInfo();
    }
  },
  mounted() {
    this.$store.state.userMenu = "2-7";
  },
  methods: {
    selectAll() {
      this.form.number = this.$store.state.userInfo.enableAmt;
    },
    async getCardDetail() {
      // 获取银行卡信息
      let data = await api.getBankCard();
      if (data.status === 0) {
        this.$store.state.bankInfo = data.data;
      } else {
        this.$message.error("您还未绑定银行卡,请先绑定银行卡");
        this.$router.push("/bank");
        // this.$message.error(data.msg)
      }
    },
    async getUserInfo() {
      // 获取用户信息
      let data = await api.getUserInfo();
      if (data.status === 0) {
        // 判断是否登录
        this.$store.state.userInfo = data.data;
      } else {
      }
    },
    async getSettingInfo() {
      // 网站设置信息
      let data = await api.getSetting();
      if (data.status === 0) {
        // 成功
        this.settingInfo = data.data;
      } else {
        this.$message.error(data.msg);
      }
    },
    async Onsubmit(formName) {
      // 提交
      //   this.$refs[formName].validate(async(valid) => {
      //     if (valid) {
      if (!this.$store.state.userInfo.idCard) {
        this.$message.error("请先实名认证");
        this.$router.push("/auth");
      } else if (!this.$store.state.bankInfo.bankNo) {
        this.$message.error("请先绑定银行卡");
        this.$router.push("/bank");
      } else {
        if (!this.form.number) {
          this.$message.error("请输入提现金额");
          this.$router.push("/bank");
          return;
        }
        let opts = {
          amt: this.form.number,
        };
        this.isloading = true;
        let data = await api.outMoney(opts);
        if (data.status === 0) {
          // 成功
          this.$message.success("申请成功,请等待审核!");
          this.$router.push("/withdrawlist");
        } else {
          this.$message.error(
            data.msg ? data.msg : "提现失败,请重新提现或者联系客服"
          );
        }
        this.isloading = false;
      }
      //     } else {
      //         return false;
      //     }
      // })
    },
  },
};
</script>
<style lang="less" scoped>
.user-center-title {
  text-align: left;
}
.wrapper .demo-form-inline[data-v-f8f69ec6] {
  margin: 0;
}
.red-bg {
  .chongzhi-cont {
    position: relative;
    .money-cont {
      display: flex;
    }
    .money-cont > p {
      margin-top: 10px;
      margin-right: 10px;
    }
    .money-cont > p .k {
      color: #c11815;
    }
    .qian {
      font-size: 20px;
      font-family: MyriadSetPro;
      color: #c11815;
      font-weight: bold;
    }
    .left {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }
    .xianshi-cont {
      display: flex;
      justify-content: space-between;
    }
    .chongzhi-bizhi {
      margin-top: 430px;
      background-color: rgb(229, 229, 229);
      display: flex;
      padding: 40px;
      justify-content: space-between;
      .chongzhi-bizhi-cont .chongzhi-item {
        margin: 15px 0;
        color: rgb(121, 121, 121);
        .circle {
          display: inline-block;
          width: 15px;
          text-align: center;
          height: 15px;
          border: 1px solid rgb(121, 121, 121);
          border-radius: 50%;
          line-height: 15px;
        }
      }
    }
    .chongzhi-img {
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .chongzhi-type {
      display: flex;
      margin-top: 20px;
      margin-bottom: 20px;
      .chongzhi-type-item {
        margin-right: 20px;
      }
    }
    .chongzhi-type > span {
      display: inline-block;
      width: 85px;
    }
    .chongzhi-btn-cont {
      display: flex;
      justify-content: center;
      margin-top: 10px;
      .chongzhi-btn {
        cursor: pointer;
        width: 80%;
        border-radius: 50px;
        text-align: center;
        height: 40px;
        background-color: #c11815;
        color: #fff;
        line-height: 40px;
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        margin-top: 20px;
      }
    }
 
    .chongzhi-input {
      margin-top: 20px;
      display: flex;
      align-items: center;
      width: 90%;
      background: none;
    }
    .chongzhi-input > span {
      display: inline-block;
      width: 100px;
    }
  }
}
.black-bg {
  .chongzhi-cont {
    position: relative;
    .money-cont > p .k {
      color: #86cbd2;
    }
    .qian {
      font-size: 20px;
      font-family: MyriadSetPro;
      color: #009c46;
      font-weight: bold;
    }
    .money-cont {
      display: flex;
    }
    .money-cont > p {
      margin-top: 10px;
      margin-right: 10px;
    }
    .left {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }
    .xianshi-cont {
      display: flex;
      justify-content: space-between;
    }
    .chongzhi-bizhi {
      margin-top: 430px;
      background-color: #191e2b;
      display: flex;
      padding: 40px;
      justify-content: space-between;
      .chongzhi-bizhi-cont .chongzhi-item {
        margin: 15px 0;
        color: #7e8086;
        .circle {
          display: inline-block;
          width: 15px;
          text-align: center;
          height: 15px;
          border: 1px solid rgb(121, 121, 121);
          border-radius: 50%;
          line-height: 15px;
        }
      }
    }
    .chongzhi-img {
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .chongzhi-type {
      display: flex;
      margin-top: 20px;
      margin-bottom: 20px;
      .chongzhi-type-item {
        margin-right: 20px;
      }
    }
    .chongzhi-type > span {
      display: inline-block;
      width: 85px;
    }
    .chongzhi-btn-cont {
      display: flex;
      justify-content: center;
      margin-top: 10px;
      .chongzhi-btn {
          cursor: pointer;
        width: 80%;
        border-radius: 50px;
        text-align: center;
        height: 40px;
        background-color: #c11815;
        color: #fff;
        line-height: 40px;
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        margin-top: 20px;
      }
    }
 
    .chongzhi-input {
      margin-top: 20px;
      display: flex;
      align-items: center;
      width: 90%;
      background: none;
    }
    .chongzhi-input > span {
      display: inline-block;
      width: 100px;
    }
  }
}
 
.code {
  font-size: 12px;
  color: #999;
}
 
.auth-box {
  margin-top: 20px;
 
  .el-row {
    margin-bottom: 10px;
  }
 
  .enable {
    margin-bottom: 20px;
    margin-left: -50px;
    color: #666;
    text-align: center;
 
    span {
      font-weight: 600;
      font-size: 16px;
    }
 
    a {
      margin-left: 20px;
    }
  }
}
 
.authed-box {
  .el-row {
    padding-top: 40px;
    width: 400px;
    margin: 0 auto;
  }
}
 
.wrapper {
  padding: 40px 100px;
 
  .demo-form-inline {
    margin: 20px auto;
  }
 
  .auth-box {
    .dialog-footer {
      width: 400px;
      margin: 0 auto;
 
      .el-button {
        margin-left: 100px;
        width: 300px;
      }
    }
  }
 
  .prompt-box {
    padding-bottom: 20px;
    color: #f44336;
 
    p {
      line-height: 24px;
    }
  }
 
  .rule-box {
    margin-top: 30px;
    line-height: 26px;
    margin-left: 70px;
  }
}
</style>