liangjin
2021-03-31 15dedf22b81b08e627dc3c176b32fadc75536dde
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
<!--
 * @Author: 小明丶
 * @Date: 2020-03-19 10:25:57
 * @LastEditors: 小明丶
 * @LastEditTime: 2020-06-28 10:28:58
 * @Description: 
 -->
<!--
 * @Author: 小明丶
 * @Date: 2019-10-21 17:19:32
 * @LastEditors: 小明丶
 * @LastEditTime: 2019-11-04 17:28:32
 * @Description:
 -->
<template>
  <div class="hbhy-big-box">
    <!-- <van-nav-bar title="办理套餐" left-arrow @click-left="onClickLeft" /> -->
    <!-- <x-header title="办理套餐" :left-options="{backText:''}"></x-header> -->
    <v-navbar title="办理套餐" fixed></v-navbar>
    <div class="color-box"></div>
    <div class="package-information">
      <div class="tit">
        <p>套餐信息</p>
      </div>
      <div class="package-tariff">
        <van-field
        class="myStyle"
          disabled
          custom-style="color:#333333"
          v-model="query.packageTariff"
          label="套餐资费"
          placeholder="请输入套餐资费"
          input-align="right"
          label-class="input-text"
          style="font-size: 14px;
        color: rgba(102, 102, 102, 1);
        font-family:PingFang SC;"
        />
      </div>
      <div class="total-repayment">
        <van-field
        class="myStyle"
          disabled
          v-model="query.totalRepayment"
          label="总还款额"
          placeholder="请输入总还款额"
          input-align="right"
          label-class="input-text"
          style="font-size: 14px;
        color: rgba(102, 102, 102, 1);
        font-family:PingFang SC;"
        />
      </div>
      <div class="monthly-repayment">
        <van-field
        class="myStyle"
          disabled
          v-model="query.monthlyRepayment"
          label="每月还款"
          placeholder="请输入每月还款"
          input-align="right"
          label-class="input-text"
          style="font-size: 14px;
        color: rgba(102, 102, 102, 1);
        font-family:PingFang SC;"
        />
      </div>
      <div class="trim">
        <van-field
        class="myStyle"
          disabled
          v-model="query.trim"
          label="还款期数"
          placeholder="请输入还款期数"
          input-align="right"
          label-class="input-text"
          style="font-size: 14px;
        color: rgba(102, 102, 102, 1);
        font-family:PingFang SC;"
        />
      </div>
      <div class="merchant-arrival">
        <van-field
          disabled
          v-model="query.merchantArrival"
          label="商户到账"
          placeholder="请输入商户到账"
          input-align="right"
          label-class="input-text"
          style="font-size: 14px;
        color: rgba(102, 102, 102, 1);
        font-family:PingFang SC;"
        />
      </div>
    </div>
    <div class="btn-grounp">
        <button @click="goHbPage">花呗分期</button>
        <button @click="goCxPage">储蓄卡分期</button>
    </div>
  </div>
</template>
<script>
import Vue from "vue";
import { NavBar } from "vant";
import { Field } from "vant";
import { Button } from "vant";
import { Notify } from "vant";
 
Vue.use(Notify);
Vue.use(Button);
Vue.use(Field);
Vue.use(NavBar);
export default {
  data() {
    return {
      query: {
        merchantArrival: "", //商户到账
        trim: "", //分期期数
        monthlyRepayment: "", //每月还款
        totalRepayment: "", //总还款额
        packageTariff: "", //套餐资费
        contId: "", //套餐id
        contName: "" //套餐名称
      },
      userName: "", //用户名
      userNumber: "", //用户手机号
      tradeName: "", //商品名称
      contMblNo:"",//合约手机号
      idNo:""//身份证号
    };
  },
  mounted() {
    this.query = this.$route.query;
    console.log(this.query);
  },
  methods: {
    goCxPage(){
        this.$route.push({
            path:"/xyg/list",
            query:this.query
        })
    },
    goHbPage(){
        this.$route.push({
            path:"/xyg/list",
            query:this.query
        })
    },
    onClickLeft() {
      this.$router.go(-1);
    },
    createdQRCode() {
      if (
        this.userName == "" ||
        this.userNumber == "" ||
        this.tradeName == "" ||
        this.contMblNo == "" ||
        this.idNo == ""
      ) {
        Notify({ type: "primary", message: "姓名、入网号码、合约号码、身份证号、商品名称不能为空" });
        return;
      }
      let params = {
        contId: this.query.contId,
        goodsName: this.tradeName,
        userName: this.userName,
        userMblNo: this.userNumber,
        contMblNo:this.contMblNo,
        idNo:this.idNo
      };
      this.$api.hbhyjCreate(params).then(res => {
        let body = res.body;
        this.orderId = body.orderId;
        this.payQrCodeUrl = body.payQrCodeUrl;
        this.totalAmount = body.totalAmount;
        // this.trial.repayPerMonth = body.repayPerMonth;
        // this.trial.feeRate = body.feeRate;
        this.showConfirm = true;
        if (body.payQrCodeUrl) {
          sessionStorage.setItem("hbpayQrCodeUrl", body.payQrCodeUrl);
        }
        this.$router.push({
          path: "/hb-getHBQRCode",
          query: {
            orderId: body.orderId,
            payQrCodeUrl: body.payQrCodeUrl,
            totalAmount: body.totalAmount,
            term: this.query.trim,
            typeId: this.query.typeId || ""
          }
        });
      });
    }
  }
};
</script>
<style lang="less" scoped>
.hbhy-big-box {
  & {
    position: relative;
    background-color: #f5f5f5;
    height: auto;
    padding-bottom: 20px;
    min-height: 100vh;
  }
  .color-box {
    width: 100%;
    height: 260px;
    background: linear-gradient(
      180deg,
      rgba(85, 78, 128, 1),
      rgba(66, 61, 93, 1)
    );
  }
  .user-information {
    & {
      position: absolute;
      width: 90%;
      height: 220px;
      background-color: white;
      left: 5%;
      top: 98px;
      border-radius: 6px;
    }
    div {
      height: 50px;
      width: 100%;
      border-bottom: 1px solid #f5f5f5;
    }
    .tit {
      p {
        color: #333333;
        font-size: 16px;
        font-weight: bold;
        line-height: 50px;
        margin-left: 5px;
      }
      p::before {
        width: 3px;
        height: 16px;
        content: "";
        background: rgba(137, 110, 219, 1);
        border-radius: 0px 3px 0px 3px;
        // left: -8px;
        // top: 24px;
        // position: absolute;
        display: inline-block;
        margin-right: 5px;
      }
    }
  }
  .package-information {
    & {
      width: 94%;
      height: 302px;
      background-color: white;
      margin: auto;
      margin-top: -150px;
      border-radius:6px;
    }
    div:not(:last-child) {
      height: 50px;
      width: 100%;
      border-bottom: 1px solid #f5f5f5;
    }
    /deep/ .van-field__control:disabled {
        //color: #333333;
        -webkit-text-fill-color: #333333!important;
        background-color: transparent;
        opacity: 1;
      }
    .tit {
      p {
        color: #333333;
        font-size: 16px;
        font-weight: bold;
        line-height: 50px;
        margin-left: 5px;
      }
      p::before {
        width: 3px;
        height: 16px;
        content: "";
        background: rgba(137, 110, 219, 1);
        border-radius: 0px 3px 0px 3px;
        // left: -8px;
        // top: 24px;
        // position: absolute;
        display: inline-block;
        margin-right: 5px;
      }
    }
  }
  .btn-grounp{
      margin-top: 40px;
      color: #fff;
      text-align: center;
      button:nth-of-type(1){
            width:160px;
            height:44px;
            background:rgba(137,110,219,1);
            border-radius:22px;
            outline: none;
            border: 0;
            margin-right: 12px;
      }
      button:nth-of-type(2){
            width:160px;
            height:44px;
            background:rgba(81,74,120,1);
            border-radius:22px;
            outline: none;
            border: 0;
      }
  }
}
 
</style>