creat-rent-info.vue 85.7 KB
Newer Older
1
<template>
Jennie Shi's avatar
Jennie Shi committed
2
  <h-view id="create-rent-info" class="public-style">
邹骏's avatar
邹骏 committed
3 4 5 6 7
    <transition name="trans">
      <div v-show="downNum" class="modal-show">
        <div class="down">
          <div class="title">
            录入产品信息
8 9
            <img src="@/assets/intoApproval/close.png" @click="downNum = false">
            <!-- <span @click="downNum=false">x</span> -->
邹骏's avatar
邹骏 committed
10 11 12
          </div>
          <div class="down-content">
            <span>请上传照片</span>
Jennie Shi's avatar
Jennie Shi committed
13 14 15 16 17
            <div v-if="!isReadOnly" class="photo" @click="pickMethod()">
              <img v-if="vehicleImg" :src="vehicleImg" alt="">
            </div>
            <div v-if="isReadOnly" class="photo">
              <img :src="vehicleImg" @click="showBigPicture(vehicleImg)">
邹骏's avatar
邹骏 committed
18 19
            </div>
          </div>
Jennie Shi's avatar
Jennie Shi committed
20 21
          <list-item :item-height="44">
            <item>
22 23
              <div slot="name">车架号</div>
              <input slot="content" v-model="rentInfo.frame_number" :readonly="isReadOnly" placeholder="自动识别车架号">
Jennie Shi's avatar
Jennie Shi committed
24 25
            </item>
            <item>
26 27
              <div slot="name">发动机号</div>
              <input slot="content" v-model="rentInfo.engine" :readonly="isReadOnly" placeholder="自动识别发动机号">
Jennie Shi's avatar
Jennie Shi committed
28 29
            </item>
            <item>
30 31
              <div slot="name">车辆型号</div>
              <input slot="content" v-model="rentInfo.vehicle_model" :readonly="isReadOnly" placeholder="自动识别车辆型号">
Jennie Shi's avatar
Jennie Shi committed
32 33
            </item>
            <item>
34 35
              <div slot="name">合格证编号</div>
              <input slot="content" v-model="rentInfo.certificate_number" :readonly="isReadOnly" placeholder="自动识别合格证编号">
Jennie Shi's avatar
Jennie Shi committed
36 37
            </item>
            <item v-if="isReadOnly" class="date-check">
38 39
              <div slot="name">发车日期</div>
              <input slot="content" v-model="rentInfo.departure_date" readonly placeholder="请选择发车日期">
Jennie Shi's avatar
Jennie Shi committed
40 41
            </item>
            <item v-if="!isReadOnly" class="date-check" @click.native="showTime1('YYYY-MM-DD')">
42 43
              <div slot="name">发车日期</div>
              <input slot="content" v-model="rentInfo.departure_date" readonly placeholder="请选择发车日期">
Jennie Shi's avatar
Jennie Shi committed
44 45
            </item>
            <item v-if="isReadOnly" class="date-check">
46 47
              <div slot="name">开票日期</div>
              <input slot="content" v-model="rentInfo.invoice_date" readonly placeholder="请选择开票日期">
Jennie Shi's avatar
Jennie Shi committed
48 49
            </item>
            <item v-if="!isReadOnly" class="date-check" @click.native="showTime2('YYYY-MM-DD')">
50 51
              <div slot="name">开票日期</div>
              <input slot="content" v-model="rentInfo.invoice_date" readonly placeholder="请选择开票日期">
Jennie Shi's avatar
Jennie Shi committed
52
            </item>
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
            <item>
              <div slot="name" class="required">是否上牌</div>
              <input slot="content" v-model="rentInfo.register_flag_n" readonly placeholder="请选择"
                @click="showPicker('register_flag')">
            </item>
            <item>
              <div slot="name" class="required">是否挂靠</div>
              <input slot="content" v-model="rentInfo.associate_flag_n" readonly placeholder="请选择"
                @click="showPicker('associate_flag')">
            </item>
            <item>
              <div slot="name" class="required">挂靠单位全称</div>
              <input slot="content" v-model="rentInfo.associate_company" placeholder="请输入">
            </item>
            <item>
              <div slot="name" class="required">是否提供挂靠协议</div>
              <input slot="content" v-model="rentInfo.associate_agreement_n" readonly placeholder="请选择"
                @click="showPicker('associate_agreement')">
            </item>
            <item>
              <div slot="name" class="required">租赁物是否办理抵押</div>
              <input slot="content" v-model="rentInfo.lease_mortgage_n" readonly placeholder="请选择"
                @click="showPicker('lease_mortgage')">
            </item>
            <item>
              <div slot="name" class="required">GPS是否安装</div>
              <input slot="content" v-model="rentInfo.gps_flag_n" readonly placeholder="请选择"
                @click="showPicker('gps_flag')">
            </item>
            <item>
              <div slot="name" class="required">设备是否购买保险</div>
              <input slot="content" v-model="rentInfo.insurance_flag_n" readonly placeholder="请选择"
                @click="showPicker('insurance_flag')">
            </item>
            <button v-if="!isReadOnly" class="type-save" @click="saveRent()" style="margin-bottom: 5px;">保存</button>
Jennie Shi's avatar
Jennie Shi committed
88
          </list-item>
邹骏's avatar
邹骏 committed
89
        </div>
Jennie Shi's avatar
Jennie Shi committed
90
      </div>
Jennie Shi's avatar
Jennie Shi committed
91
    </transition>
92
    <h-header :proportion="[5, 1, 1]" class="bar-custom">
93 94
      <div slot="left" class="h-header-btn" @click="routeGoCustomClick()">
        <img src="@/assets/userBind/arrow.png">
linxin's avatar
linxin committed
95
        <span>租赁信息</span>
96 97
      </div>
    </h-header>
linxin's avatar
linxin committed
98
    <h-content>
linxin's avatar
linxin committed
99
      <div v-if="!isReadOnly" class="top">
linxin's avatar
linxin committed
100
        <div class="item">
李晓兵's avatar
李晓兵 committed
101
          <img src="@/assets/contractCreate/finished.png">
linxin's avatar
linxin committed
102 103
          <p>基本信息</p>
        </div>
104
        <span class="line" />
linxin's avatar
linxin committed
105 106
        <div class="item">
          <span>2</span>
linxin's avatar
linxin committed
107
          <p style="color: #383F45;">租赁信息</p>
linxin's avatar
linxin committed
108
        </div>
109
        <span class="line" />
linxin's avatar
linxin committed
110 111
        <div class="item">
          <span>3</span>
112 113 114 115 116
          <p>设备清单</p>
        </div>
        <span class="line" />
        <div class="item">
          <span>4</span>
linxin's avatar
linxin committed
117 118 119
          <p>附件信息</p>
        </div>
      </div>
linxin's avatar
linxin committed
120 121 122 123 124
      <div v-if="isReadOnly" class="top">
        <div class="item">
          <img src="@/assets/contractCreate/finished.png">
          <p>基本信息</p>
        </div>
125
        <span class="line" />
linxin's avatar
linxin committed
126 127 128 129
        <div class="item">
          <img src="@/assets/contractCreate/finished.png">
          <p style="color: #383F45;">租赁信息</p>
        </div>
130 131 132 133 134 135
        <span class="line" />
        <div class="item">
          <img src="@/assets/contractCreate/finished.png">
          <p>设备清单</p>
        </div>
        <span class="line" />
linxin's avatar
linxin committed
136 137 138 139 140
        <div class="item">
          <img src="@/assets/contractCreate/finished.png">
          <p>附件信息</p>
        </div>
      </div>
linxin's avatar
linxin committed
141 142
      <div class="userInfo">租赁产品</div>
      <list-item :item-height="44">
linxin's avatar
linxin committed
143
        <item v-if="!isReadOnly" :showArrow="true" @click.native="selectProductLine">
linxin's avatar
linxin committed
144
          <div slot="name" class="required">产品线</div>
李晓兵's avatar
李晓兵 committed
145
          <input slot="content" v-model="saveInfo.division_n" readonly placeholder="请选择">
linxin's avatar
linxin committed
146
        </item>
linxin's avatar
linxin committed
147
        <item v-if="isReadOnly">
linxin's avatar
linxin committed
148
          <div slot="name" class="required">产品线</div>
linxin's avatar
linxin committed
149 150 151
          <input slot="content" v-model="saveInfo.division_n" readonly>
        </item>
        <item v-if="!isReadOnly" :showArrow="true" @click.native="getProduct">
linxin's avatar
linxin committed
152
          <div slot="name" class="required">产品型号</div>
李晓兵's avatar
李晓兵 committed
153
          <input slot="content" v-model="saveInfo.product_id_n" readonly placeholder="请选择">
linxin's avatar
linxin committed
154
        </item>
linxin's avatar
linxin committed
155
        <item v-if="isReadOnly">
linxin's avatar
linxin committed
156
          <div slot="name" class="required">产品型号</div>
李晓兵's avatar
李晓兵 committed
157
          <input slot="content" v-model="saveInfo.product_id_n" readonly>
linxin's avatar
linxin committed
158
        </item>
linxin's avatar
linxin committed
159
        <item>
linxin's avatar
linxin committed
160
          <div slot="name" class="required">产品数量</div>
linxin's avatar
linxin committed
161
          <input slot="content" v-model="saveInfo.product_num" :readonly="isReadOnly" placeholder="请输入产品数量">
linxin's avatar
linxin committed
162 163
        </item>
      </list-item>
胡's avatar
committed
164 165
      <div class="userInfo">
        <span>融资信息</span>
166 167
        <span v-if="nowPolicy.calc_type && nowPolicy.calc_type === 'FREE_CF'" class="fei-button"
          @click="showFeiInfo">非标报价商务信息</span>
胡's avatar
committed
168 169
      </div>
      <div v-if="showHideOnBlur">
170
        <x-dialog v-model="showHideOnBlur" :dialog-style="{ 'min-height': '100px', 'padding': '5px' }" hide-on-blur>
171
          <div class="feibox">
胡's avatar
committed
172 173 174
            <p>非标报价商务信息</p>

            <div>
胡's avatar
committed
175
              <span style="text-align: left; min-width: 80px;">报价模式</span>
176
              <span class="gray" style="text-align: right;">{{ nowPolicy.price_list_n }}</span>
胡's avatar
committed
177 178
            </div>

179
            <div v-if="['XCMG_FIRST_N_NO_INTEREST', 'XCMG_FIRST_N_INTEREST'].includes(nowPolicy.price_list)">
胡's avatar
committed
180
              <span>首X期-期数</span>
181
              <span class="gray">{{ nowPolicy.lease_times_x }}</span>
胡's avatar
committed
182 183
            </div>

184 185 186 187 188 189
            <template v-if="nowPolicy.fallow_x_flag === 'Y'">
              <div>
                <span>冬歇/雨歇起止日期</span>
              </div>
              <div style="justify-content: space-around;">
                <span class="gray">{{ nowPolicy.fallow_date_f.slice(0, 10) }}</span>
胡's avatar
committed
190
                <span>-</span>
191 192 193 194 195
                <span class="gray">{{ nowPolicy.fallow_date_t.slice(0, 10) }}</span>
              </div>
            </template>

          </div>
胡's avatar
committed
196 197
        </x-dialog>
      </div>
198

linxin's avatar
linxin committed
199
      <div class="hint-info">
李晓兵's avatar
李晓兵 committed
200
        <img src="@/assets/contractCreate/hint.png">提示 以下为单个设备商务政策
linxin's avatar
linxin committed
201 202
      </div>
      <list-item :item-height="44">
203 204
        <item v-if="!isReadOnly" :showArrow="true"
          @click.native="pagenumPolicy = 1; getBusinessPolicy(); showModalBusiness = true">
linxin's avatar
linxin committed
205
          <div slot="name" class="required">商务政策</div>
李晓兵's avatar
李晓兵 committed
206
          <input slot="content" v-model="saveInfo.product_plan_name" readonly placeholder="请选择">
linxin's avatar
linxin committed
207 208
        </item>
        <item v-if="isReadOnly">
linxin's avatar
linxin committed
209
          <div slot="name" class="required">商务政策</div>
李晓兵's avatar
李晓兵 committed
210
          <input slot="content" v-model="saveInfo.product_plan_name" readonly placeholder="请选择">
linxin's avatar
linxin committed
211
        </item>
linxin's avatar
linxin committed
212
        <item v-if="!isReadOnly">
linxin's avatar
linxin committed
213
          <div slot="name" class="required">设备单价</div>
214 215
          <CurrencyInput slot="content" :check="saveInfo.equip_price" v-model="saveInfo.equip_price"
            placeholder="请输入设备单价" />
linxin's avatar
linxin committed
216
        </item>
linxin's avatar
linxin committed
217 218
        <item v-if="isReadOnly">
          <div slot="name" class="required">设备单价</div>
219
          <span slot="content">{{ saveInfo.equip_price | currency }}</span>
linxin's avatar
linxin committed
220 221 222
        </item>
        <item v-if="!isReadOnly">
          <div slot="name" class="required">融资金额</div>
223
          <CurrencyInput slot="content" v-model="finance_amount" placeholder="请输入融资信息" />
linxin's avatar
linxin committed
224 225
        </item>
        <item v-if="isReadOnly">
linxin's avatar
linxin committed
226
          <div slot="name" class="required">融资金额</div>
227
          <span slot="content">{{ finance_amount | currency }}</span>
linxin's avatar
linxin committed
228
        </item>
linxin's avatar
linxin committed
229
        <item>
linxin's avatar
linxin committed
230
          <div slot="name" class="required">首付比例</div>
231
          <RateInput v-if="!isReadOnly" slot="content" v-model="saveInfo.down_payment_ratio_n" placeholder="%" />
linxin's avatar
linxin committed
232
          <span v-if="isReadOnly" slot="content">{{ saveInfo.down_payment_ratio_n }}%</span>
linxin's avatar
linxin committed
233
        </item>
linxin's avatar
linxin committed
234
        <item v-if="!isReadOnly">
linxin's avatar
linxin committed
235
          <div slot="name" class="required">首付款</div>
236
          <CurrencyInput slot="content" v-model="saveInfo.down_payment" placeholder="请输入首付款" @input="changeRatio" />
linxin's avatar
linxin committed
237
        </item>
linxin's avatar
linxin committed
238 239
        <item v-if="isReadOnly">
          <div slot="name" class="required">首付款</div>
240
          <span slot="content">{{ saveInfo.down_payment | currency }}</span>
linxin's avatar
linxin committed
241
        </item>
linxin's avatar
linxin committed
242
        <item>
linxin's avatar
linxin committed
243
          <div slot="name" class="required">保证金比例</div>
244
          <RateInput v-if="!isReadOnly" slot="content" v-model="saveInfo.deposit_ratio_n" placeholder="%" />
linxin's avatar
linxin committed
245
          <span v-if="isReadOnly" slot="content">{{ saveInfo.deposit_ratio_n }}%</span>
linxin's avatar
linxin committed
246
        </item>
linxin's avatar
linxin committed
247
        <item v-if="!isReadOnly">
linxin's avatar
linxin committed
248
          <div slot="name" class="required">保证金</div>
249
          <CurrencyInput slot="content" v-model="saveInfo.deposit" placeholder="请输入保证金" @input="changeDeposit" />
linxin's avatar
linxin committed
250
        </item>
linxin's avatar
linxin committed
251 252
        <item v-if="isReadOnly">
          <div slot="name" class="required">保证金</div>
253
          <span slot="content">{{ saveInfo.deposit | currency }}</span>
linxin's avatar
linxin committed
254
        </item>
255 256 257 258 259 260
        <item v-if="!isReadOnly" :showArrow="true" @click.native="selectDepositDeductionLine">
          <div slot="name" class="required">保证金抵扣方式</div>
          <input slot="content" v-model="saveInfo.deposit_deduction_n" readonly placeholder="请选择">
        </item>
        <item v-if="isReadOnly">
          <div slot="name" class="required">保证金抵扣方式</div>
261 262 263 264 265 266 267 268 269
          <input slot="content" v-model="saveInfo.handling_policy_n" readonly>
        </item>
        <item v-if="!isReadOnly" :showArrow="true" @click.native="selectHandlingPolicyLine">
          <div slot="name" class="required">手续费政策</div>
          <input slot="content" v-model="saveInfo.handling_policy_n" readonly placeholder="请选择">
        </item>
        <item v-if="isReadOnly">
          <div slot="name" class="required">手续费政策</div>
          <input slot="content" v-model="saveInfo.handling_policy_n" readonly>
270
        </item>
linxin's avatar
linxin committed
271
        <item>
linxin's avatar
linxin committed
272
          <div slot="name" class="required">手续费比例</div>
273
          <RateInput v-if="!isReadOnly" slot="content" v-model="saveInfo.lease_charge_ratio_n" placeholder="%" />
linxin's avatar
linxin committed
274
          <span v-if="isReadOnly" slot="content">{{ saveInfo.lease_charge_ratio_n }}%</span>
linxin's avatar
linxin committed
275
        </item>
linxin's avatar
linxin committed
276
        <item v-if="!isReadOnly">
linxin's avatar
linxin committed
277
          <div slot="name" class="required">手续费</div>
278
          <CurrencyInput slot="content" v-model="saveInfo.lease_charge" placeholder="请输入手续费" @input="changeLeaseCharge" />
linxin's avatar
linxin committed
279
        </item>
linxin's avatar
linxin committed
280 281
        <item v-if="isReadOnly">
          <div slot="name" class="required">手续费</div>
282
          <span slot="content">{{ saveInfo.lease_charge | currency }}</span>
linxin's avatar
linxin committed
283 284
        </item>
        <item v-if="!isReadOnly">
linxin's avatar
linxin committed
285
          <div slot="name" class="required">GPS费用</div>
286
          <CurrencyInput slot="content" v-model="saveInfo.gps_fee" placeholder="请输入GPS费用" />
linxin's avatar
linxin committed
287
        </item>
linxin's avatar
linxin committed
288 289
        <item v-if="isReadOnly">
          <div slot="name" class="required">GPS费用</div>
290
          <span slot="content">{{ saveInfo.gps_fee | currency }}</span>
linxin's avatar
linxin committed
291 292 293
        </item>
        <item v-if="!isReadOnly">
          <div slot="name" class="required">保险押金</div>
294
          <CurrencyInput slot="content" v-model="saveInfo.insurance_fee" placeholder="请输入保险押金" />
linxin's avatar
linxin committed
295 296
        </item>
        <item v-if="isReadOnly">
linxin's avatar
linxin committed
297
          <div slot="name" class="required">保险押金</div>
298
          <span slot="content">{{ saveInfo.insurance_fee | currency }}</span>
linxin's avatar
linxin committed
299
        </item>
邹骏's avatar
邹骏 committed
300 301
        <item v-if="!isReadOnly">
          <div slot="name" class="required">管理费</div>
302
          <CurrencyInput slot="content" v-model="saveInfo.management_money" placeholder="请输入管理费" />
邹骏's avatar
邹骏 committed
303 304 305
        </item>
        <item v-if="isReadOnly">
          <div slot="name" class="required">管理费</div>
306
          <span slot="content">{{ saveInfo.management_money | currency }}</span>
邹骏's avatar
邹骏 committed
307
        </item>
linxin's avatar
linxin committed
308
        <item v-if="!isReadOnly" class="date-check" @click.native="showTime('YYYY-MM-DD')">
linxin's avatar
linxin committed
309
          <div slot="name" class="required">预计付款日</div>
李晓兵's avatar
李晓兵 committed
310
          <input slot="content" v-model="saveInfo.lease_start_date" readonly placeholder="请选择日期 ">
linxin's avatar
linxin committed
311
        </item>
linxin's avatar
linxin committed
312
        <item v-if="isReadOnly" class="date-check">
linxin's avatar
linxin committed
313
          <div slot="name" class="required">预计付款日</div>
linxin's avatar
linxin committed
314 315
          <input slot="content" v-model="saveInfo.lease_start_date" readonly>
        </item>
李晓兵's avatar
李晓兵 committed
316
        <item v-if="!isReadOnly" :showArrow="true" @click.native="periodPull">
linxin's avatar
linxin committed
317
          <div slot="name" class="required">还款周期</div>
李晓兵's avatar
李晓兵 committed
318
          <input slot="content" v-model="saveInfo.annual_pay_times_n" readonly placeholder="请选择">
linxin's avatar
linxin committed
319 320
        </item>
        <item v-if="isReadOnly">
linxin's avatar
linxin committed
321
          <div slot="name" class="required">还款周期</div>
李晓兵's avatar
李晓兵 committed
322
          <input slot="content" v-model="saveInfo.annual_pay_times_n" readonly placeholder="请选择">
linxin's avatar
linxin committed
323 324
        </item>
        <item>
linxin's avatar
linxin committed
325
          <div slot="name" class="required">租赁期数</div>
326
          <input slot="content" v-model="saveInfo.lease_times" :readonly="isReadOnly" type="number" placeholder="请输入租赁期数">
linxin's avatar
linxin committed
327 328
        </item>
        <item>
linxin's avatar
linxin committed
329
          <div slot="name" class="required">年利率</div>
330
          <RateInput v-if="!isReadOnly" slot="content" v-model="saveInfo.int_rate_n" placeholder="%" />
linxin's avatar
linxin committed
331
          <span v-if="isReadOnly" slot="content">{{ saveInfo.int_rate_n }}</span>
linxin's avatar
linxin committed
332
        </item>
linxin's avatar
linxin committed
333
        <item v-if="!isReadOnly" :showArrow="true" @click.native="selectPayWay">
linxin's avatar
linxin committed
334
          <div slot="name" class="required">支付方式</div>
李晓兵's avatar
李晓兵 committed
335
          <input slot="content" v-model="saveInfo.pay_type_n" readonly placeholder="请选择">
linxin's avatar
linxin committed
336 337
        </item>
        <item v-if="isReadOnly">
linxin's avatar
linxin committed
338
          <div slot="name" class="required">支付方式</div>
李晓兵's avatar
李晓兵 committed
339
          <input slot="content" v-model="saveInfo.pay_type_n" readonly placeholder="请选择">
linxin's avatar
linxin committed
340 341
        </item>
        <item>
linxin's avatar
linxin committed
342
          <div slot="name" class="required">逾期日利率</div>
李晓兵's avatar
李晓兵 committed
343
          <input slot="content" v-model="saveInfo.penalty_rate_n" readonly placeholder="%">
linxin's avatar
linxin committed
344
        </item>
linxin's avatar
linxin committed
345 346
        <item v-if="!isReadOnly">
          <div slot="name" class="required">留购价</div>
347
          <CurrencyInput slot="content" v-model="saveInfo.residual_value" placeholder="请输入留购价" />
linxin's avatar
linxin committed
348 349
        </item>
        <item v-if="isReadOnly">
linxin's avatar
linxin committed
350
          <div slot="name" class="required">留购价</div>
351
          <span slot="content">{{ saveInfo.residual_value | currency }}</span>
linxin's avatar
linxin committed
352
        </item>
jiacheng.mao's avatar
jiacheng.mao committed
353 354 355
        <item v-if="!isReadOnly" :showArrow="true" @click.native="selectDepositCollectionMethod">
          <div slot="name" class="required">保证金收取方式</div>
          <input slot="content" v-model="saveInfo.deposit_collection_method_n" readonly placeholder="请选择">
郑娟's avatar
郑娟 committed
356 357
        </item>
        <item v-if="isReadOnly">
jiacheng.mao's avatar
jiacheng.mao committed
358 359
          <div slot="name" class="required">保证金收取方式</div>
          <input slot="content" v-model="saveInfo.deposit_collection_method_n" readonly placeholder="请选择">
郑娟's avatar
郑娟 committed
360
        </item>
linxin's avatar
linxin committed
361 362
        <item :showArrow="true" @click.native="goPlan">
          <div slot="name">查看还款计划</div>
李晓兵's avatar
李晓兵 committed
363
          <input slot="content" readonly>
linxin's avatar
linxin committed
364 365
        </item>
      </list-item>
366

linxin's avatar
linxin committed
367
    </h-content>
linxin's avatar
linxin committed
368
    <bottom-tab class="add-box">
李晓兵's avatar
李晓兵 committed
369 370
      <tab-button v-if="!isReadOnly && !calculeFlag" class="before" @click.native="save">计算</tab-button>
      <tab-button v-if="!isReadOnly && calculeFlag" class="before" @click.native="save">重新计算</tab-button>
linxin's avatar
linxin committed
371
      <tab-button v-if="isReadOnly" class="before" @click.native="$routeGo()">上一步</tab-button>
linxin's avatar
linxin committed
372
      <tab-button class="next" @click.native="next">下一步</tab-button>
linxin's avatar
linxin committed
373
    </bottom-tab>
374 375
    <SelectProduct ref="product" :bp_agent_id="bp_agent_id" :division="saveInfo.division"
      @selectedProduct="selectedProduct" />
linxin's avatar
linxin committed
376
    <!-- <h-modal ref="modal" v-model="showModalValue" class="flow" position="bottom">
linxin's avatar
linxin committed
377 378 379 380 381 382 383
      <h-view id="product-list">
        <h-header :proportion="[1,4,1]" class="bar-custom">
          <span slot="center" style="color:#fff">选择产品</span>
          <span slot="right" style="color:#fff" @click="showModalValue=false">取消</span>
        </h-header>
        <h-content>
          <div class="search has-header">
李晓兵's avatar
李晓兵 committed
384
            <input v-model="keyWordProduct" placeholder="请输入产品名称">
linxin's avatar
linxin committed
385 386
          </div>
          <div class="division-box">
387
            <scroll ref="scroll" :updateData="[divisionLists]" :pullUp="true" @pullingUp="loadMoreProduct">
linxin's avatar
linxin committed
388 389 390
              <list-item v-for="(item,index) in divisionLists" :key="index">
                <item
                  :proportion="[1,4]"
linxin's avatar
linxin committed
391
                  @click.native="selectProduct(item)"
linxin's avatar
linxin committed
392 393
                >
                  <div slot="name" class="item-pic">
linxin's avatar
linxin committed
394
                    <img :src="item.url">
linxin's avatar
linxin committed
395
                  </div>
linxin's avatar
linxin committed
396 397 398 399 400 401 402 403 404
                  <div slot="content" class="item-content">
                    <div class="pro-name">
                      <p>{{ item.product_name }}</p>
                    </div>
                    <div class="centers">
                      <p class="firsts1">{{ item.bp_type_n }}</p>
                      <p class="seconds1">{{ item.bp_name }}</p>
                    </div>
                    <div class="centers">
linxin's avatar
linxin committed
405
                      <p class="firsts1">产品型号</p>
linxin's avatar
linxin committed
406 407
                      <p class="seconds1">{{ item.product_code }}</p>
                    </div>
linxin's avatar
linxin committed
408
                  </div>
linxin's avatar
linxin committed
409 410
                </item>
              </list-item>
李晓兵's avatar
李晓兵 committed
411 412
            </scroll>
          </div>
linxin's avatar
linxin committed
413 414
        </h-content>
      </h-view>
linxin's avatar
linxin committed
415
    </h-modal> -->
416
    <h-modal ref="modal" v-model="showModalBusiness" class="flow" position="bottom">
linxin's avatar
linxin committed
417
      <h-view id="businuss-list">
418
        <h-header :proportion="[1, 4, 1]" class="bar-custom">
linxin's avatar
linxin committed
419
          <span slot="center" style="color:#fff">选择商务政策</span>
420
          <span slot="right" style="color:#fff" @click="showModalBusiness = false">取消</span>
linxin's avatar
linxin committed
421 422 423
        </h-header>
        <h-content>
          <div class="search has-header">
李晓兵's avatar
李晓兵 committed
424
            <input v-model="policyKeyWord" placeholder="请输入商务政策名称">
linxin's avatar
linxin committed
425
          </div>
426
          <scroll ref="scroll" :updateData="[businessLists]" :pullUp="true" @pullingUp="loadMorePolicy">
linxin's avatar
linxin committed
427 428

            <div class="division-box">
429
              <section v-for="(item, index) in businessLists" :key="index" @click="selectBusinessPolicy(item)">
linxin's avatar
linxin committed
430
                <div class="descript">
李晓兵's avatar
李晓兵 committed
431
                  <img src="@/assets/trial/product.png" alt>
linxin's avatar
linxin committed
432
                  <p class="produc">{{ item.product_plan_name }}</p>
linxin's avatar
linxin committed
433
                </div>
linxin's avatar
linxin committed
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
                <div class="tario">
                  <div class="wrap">
                    <p class="ratio">
                      <span>保证金比例</span>
                      <span>{{ item.deposit_ratio_n }}</span>
                    </p>
                    <p>
                      <span>手续费比例</span>
                      <span>{{ item.lease_charge_ratio_n }}</span>
                    </p>
                  </div>
                  <div class="wrap">
                    <p>
                      <span>年利率</span>
                      <span>{{ item.int_rate_n }}</span>
                    </p>
                    <p>
linxin's avatar
linxin committed
451 452
                      <span>首付款比例</span>
                      <span>{{ item.down_payment_ratio_n }}</span>
linxin's avatar
linxin committed
453 454
                    </p>
                  </div>
linxin's avatar
linxin committed
455
                </div>
linxin's avatar
linxin committed
456
              </section>
李晓兵's avatar
李晓兵 committed
457 458
            </div>
          </scroll>
linxin's avatar
linxin committed
459 460 461
        </h-content>
      </h-view>
    </h-modal>
462 463 464
  </h-view>
</template>
<script>
linxin's avatar
linxin committed
465
import CurrencyInput from '../../components/currencyInput'
linxin's avatar
linxin committed
466
import RateInput from '@/components/rateInput'
linxin's avatar
linxin committed
467
import SelectProduct from './select-product'
468 469 470
import { XDialog } from 'vux'
import { ActionSheet} from 'vant'
import 'vant/lib/action-sheet/style'
471
export default {
linxin's avatar
linxin committed
472 473
  components: {
    CurrencyInput,
linxin's avatar
linxin committed
474
    RateInput,
linxin's avatar
linxin committed
475
    SelectProduct,
476
    XDialog,
477
    ActionSheet,
linxin's avatar
linxin committed
478 479 480
  },
  data () {
    return {
胡's avatar
committed
481 482
      showHideOnBlur: false,

邹骏's avatar
邹骏 committed
483
      downNum: false,
李晓兵's avatar
李晓兵 committed
484 485 486
      calculeFlag: false,
      salesEnter: '', // 页面进入标识,该字段作用:第一次创建时即从销售页面进入进本信息、租赁信息、附件信息。用于判断后面页面录入数据后未保存则点击上一步,再次进入该页面数据丢失问题
      saveTed: false, // 本页面数据是否保存标识
linxin's avatar
linxin committed
487 488
      showModalValue: false,
      showModalBusiness: false,
linxin's avatar
linxin committed
489
      isComputed: false,
linxin's avatar
linxin committed
490
      fromPage: window.localStorage.fromPage,
linxin's avatar
linxin committed
491
      keyWordProduct: '',
linxin's avatar
linxin committed
492
      policyKeyWord: '',
linxin's avatar
linxin committed
493
      isReadOnly: false, // 是否只读
linxin's avatar
linxin committed
494
      fromPutted: false,
linxin's avatar
linxin committed
495
      isClick: false, // false:右滑返回;true:点击按钮返回
linxin's avatar
linxin committed
496
      fromList: false, // 判断是否从列表过来
497 498 499 500
      pagenum: 1, // 产品型号页码
      pagenumSearch: 1, // 产品型号查询时的页码
      pagenumPolicy: 1, // 商务政策没有查询时的页码
      pagenumSearchPolicy: 1, // 商务政策查询时的页码
linxin's avatar
linxin committed
501 502 503
      businessLists: [], // 商务政策
      periodLists: [], // 还款周期
      paywayLists: [], // 支付方式
郑娟's avatar
郑娟 committed
504
      yesNoList: [], // 是否值集
jiacheng.mao's avatar
jiacheng.mao committed
505
      depositCollectionMethodList: [], // 保证金收取方式值集
506
      divisionLists: [],
linxin's avatar
linxin committed
507
      productLine: [], // 产品线
508 509
      depositDeductionLine: [], // 保证金抵扣方式
      handlingPolicyLine: [], // 手续费政策
邹骏's avatar
邹骏 committed
510
      factory_ocr_type: '',
邹骏's avatar
邹骏 committed
511
      certificationType: '',
Jennie Shi's avatar
Jennie Shi committed
512
      uploadList: [], // 附件上传
邹骏's avatar
邹骏 committed
513
      rentInfo: {
邹骏's avatar
邹骏 committed
514
        project_lease_item_id: '',
邹骏's avatar
邹骏 committed
515 516 517 518
        frame_number: '',
        engine: '',
        vehicle_model: '',
        certificate_number: '',
邹骏's avatar
邹骏 committed
519 520
        departure_date: '',
        invoice_date: '',
521 522 523 524 525 526 527 528 529 530 531 532 533
        register_flag_n: '',
        register_flag_: '',
        associate_flag_n: '',
        associate_flag: '',
        associate_company: '',
        associate_agreement_n: '',
        associate_agreement: '',
        lease_mortgage_n: '',
        lease_mortgage: '',
        gps_flag_n: '',
        gps_flag: '',
        insurance_flag_n: '',
        insurance_flag: '',
邹骏's avatar
邹骏 committed
534 535
      },
      vehicleImg: '',
李晓兵's avatar
李晓兵 committed
536 537 538 539 540 541
      /* productInfo: {
           project_id: window.localStorage.project_id,
           product_id: '',
           product_id_n: '',
           product_num: '',
         }, */
邹骏's avatar
邹骏 committed
542
      leaseList: [],
李晓兵's avatar
李晓兵 committed
543
      saveInfo: {
linxin's avatar
linxin committed
544
        project_id: window.localStorage.project_id,
邹骏's avatar
邹骏 committed
545
        business_type: '',
linxin's avatar
linxin committed
546
        bp_name: '',
Jennie Shi's avatar
Jennie Shi committed
547
        if_sent_car: 'N',
linxin's avatar
linxin committed
548
        product_id: '',
linxin's avatar
linxin committed
549
        product_id_n: '',
linxin's avatar
linxin committed
550
        product_num: '',
linxin's avatar
linxin committed
551 552
        product_plan_id: '',
        product_plan_name: '',
linxin's avatar
linxin committed
553 554
        equip_price: '',
        int_rate: '',
linxin's avatar
linxin committed
555 556
        int_rate_n: '',
        penalty_rate_n: '',
linxin's avatar
linxin committed
557
        annual_pay_times: '',
linxin's avatar
linxin committed
558
        annual_pay_times_n: '',
linxin's avatar
linxin committed
559 560
        lease_times: '',
        down_payment_ratio: '',
linxin's avatar
linxin committed
561
        down_payment_ratio_n: '',
linxin's avatar
linxin committed
562 563
        down_payment: '',
        deposit_ratio: '',
linxin's avatar
linxin committed
564
        deposit_ratio_n: '',
565 566
        deposit_deduction: '',
        deposit_deduction_n: '',
567 568
        handling_policy: '',
        handling_policy_n: '',
linxin's avatar
linxin committed
569 570
        deposit: '',
        lease_charge_ratio: '',
linxin's avatar
linxin committed
571
        lease_charge_ratio_n: '',
linxin's avatar
linxin committed
572 573 574 575
        lease_charge: '',
        lease_start_date: '',
        gps_fee: '',
        insurance_fee: '',
邹骏's avatar
邹骏 committed
576
        management_money: '',
linxin's avatar
linxin committed
577
        pay_type: '',
linxin's avatar
linxin committed
578
        pay_type_n: '',
jiacheng.mao's avatar
jiacheng.mao committed
579 580
        deposit_collection_method_n: '',
        deposit_collection_method: '',
linxin's avatar
linxin committed
581 582
        residual_value: '',
        division_n: '',
786817560's avatar
'  
786817560 committed
583
        division: '',
linxin's avatar
linxin committed
584
        finance_amount: '',
linxin's avatar
linxin committed
585
        credit_id: window.localStorage.credit_id,
linxin's avatar
linxin committed
586
      },
胡's avatar
committed
587 588 589
      nowPolicy: {},
      isComputedSuccess: {
        status: false,
590
        msg: '',
胡's avatar
committed
591
      },
592 593 594 595
      YesNoType: [], // 是否类型
      now_nodeName: '', // 当前点击的名称
      picker_show: false, // 选择面板控制
      actions: [], // 选择组
linxin's avatar
linxin committed
596 597
    }
  },
linxin's avatar
linxin committed
598 599 600 601
  computed: {
    'finance_amount' () { // 融资金额
      return parseFloat(this.saveInfo.equip_price - this.saveInfo.equip_price * this.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2)
    },
linxin's avatar
linxin committed
602 603 604 605 606 607 608 609 610
    // isReadOnly () {
    //   if (window.localStorage.contractReadonly === 'true' && this.fromPage === 'list') {
    //     debugger
    //     return true
    //   } else {
    //     debugger
    //     return false
    //   }
    // },
linxin's avatar
linxin committed
611
  },
linxin's avatar
linxin committed
612
  watch: {
linxin's avatar
linxin committed
613 614 615 616 617 618 619
    $route (to, from) {
      if (to.name === 'CreateBaseInfo' && from.name === 'CreateRentInfo') {
        if (!this.isClick && this.fromPage === 'sale') {
          this.routeGoCustom()
        }
      }
    },
linxin's avatar
linxin committed
620
    policyKeyWord (newVal, oldVal) {
621 622 623 624
      this.searchBusinessPolicy()
    },
    keyWordProduct (newVal, oldVal) {
      this.searchProduct()
linxin's avatar
linxin committed
625
    },
626 627
    showModalBusiness (newVal, oldVal) {
      if (!this.showModalBusiness) {
628 629 630 631
        this.businessLists = []
        this.pagenumSearchPolicy = 1
      }
    },
linxin's avatar
linxin committed
632 633 634 635 636 637 638 639 640 641 642
    'saveInfo.equip_price' () {
      this.saveInfo.down_payment = (this.saveInfo.equip_price * this.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2)
      this.saveInfo.deposit = (this.saveInfo.equip_price * this.saveInfo.deposit_ratio_n.replace('%', '') / 100).toFixed(2)
      this.saveInfo.lease_charge = parseFloat((this.saveInfo.equip_price - this.saveInfo.equip_price * this.saveInfo.down_payment_ratio_n.replace('%', '') / 100) * (this.saveInfo.lease_charge_ratio_n.replace('%', '') / 100)).toFixed(2)
    },
    'saveInfo.deposit_ratio_n' (newVal, oldVal) {
      this.saveInfo.deposit = (this.saveInfo.equip_price * newVal.replace('%', '') / 100).toFixed(2)
    },
    'saveInfo.down_payment_ratio_n' (newVal, oldVal) {
      this.saveInfo.down_payment = (this.saveInfo.equip_price * newVal.replace('%', '') / 100).toFixed(2)
    },
jiacheng.mao's avatar
jiacheng.mao committed
643 644
    'saveInfo.deposit_collection_method' (newVal, oldVal) {
      if (newVal === 'FINANCING_AMOUNT') {
645
        this.saveInfo.deposit = ((this.saveInfo.equip_price - this.saveInfo.down_payment) * this.saveInfo.deposit_ratio_n.replace('%', '') / 100).toFixed(2)
jiacheng.mao's avatar
jiacheng.mao committed
646
      } else if (newVal === 'EQUIPMENT_AMOUNT') {
647 648 649
        this.saveInfo.deposit = (this.saveInfo.equip_price * this.saveInfo.deposit_ratio_n.replace('%', '') / 100).toFixed(2)
      }
    },
linxin's avatar
linxin committed
650 651 652
    // 'saveInfo.down_payment' (newVal, oldVal) {
    //   this.saveInfo.down_payment_ratio_n = `${(newVal / this.saveInfo.equip_price * 100).toFixed(2)}%`
    // },
Jennie Shi's avatar
Jennie Shi committed
653 654 655
    // 'saveInfo.lease_charge_ratio_n' (newVal, oldVal) {
    //   this.saveInfo.lease_charge = parseFloat((this.saveInfo.equip_price - this.saveInfo.equip_price * this.saveInfo.down_payment_ratio_n.replace('%', '') / 100) * (this.saveInfo.lease_charge_ratio_n.replace('%', '') / 100)).toFixed(2)
    // },
邹骏's avatar
邹骏 committed
656 657 658 659
    'downNum' (newVal, oldVal) {
      if (!newVal) {
        this.vehicleImg = ''
      }
660
    },
linxin's avatar
linxin committed
661
  },
linxin's avatar
linxin committed
662 663 664 665
  beforeRouteEnter (to, from, next) {
    next(vm => {
      vm.showModalBusiness = false
      vm.showModalValue = false
666 667 668
      vm.pagenumSearch = 1
      vm.pagenumSearchPolicy = 1
      vm.policyKeyWord = ''
linxin's avatar
linxin committed
669
      vm.keyWordProduct = ''
linxin's avatar
linxin committed
670
      vm.saveInfo.lease_start_date = ''
linxin's avatar
linxin committed
671 672
      vm.businessLists = []
      vm.divisionLists = []
673
      // vm.nowPolicy = {}
linxin's avatar
linxin committed
674 675
      vm.pagenum = 1
      vm.pagenumPolicy = 1
邹骏's avatar
邹骏 committed
676
      vm.downNum = false
linxin's avatar
linxin committed
677
      vm.setTime()
linxin's avatar
linxin committed
678
      vm.fromPage = window.localStorage.fromPage
linxin's avatar
linxin committed
679
      vm.saveInfo.project_id = window.localStorage.project_id // 重新赋值,防止缓存
680 681 682 683 684
      vm.isComputedSucces = {
        status: false,
        msg: '',
      }// 防止缓存
      vm.getDropBox()
李晓兵's avatar
李晓兵 committed
685
      // vm.productInfo['project_id'] = window.localStorage.project_id // 重新赋值,防止缓存
linxin's avatar
linxin committed
686
      if (from.name === 'CreateBaseInfo') {
linxin's avatar
linxin committed
687
        vm.isComputed = false
李晓兵's avatar
李晓兵 committed
688 689
        vm.calculeFlag = false
        vm.salesEnter = vm.$route.params.salesEnter
李晓兵's avatar
李晓兵 committed
690
        vm.bp_agent_id = vm.$route.params.bp_agent_id
linxin's avatar
linxin committed
691
        vm.saveInfo.bp_name = window.localStorage.bp_name_tenant
李晓兵's avatar
李晓兵 committed
692
        vm.saveTed = false
linxin's avatar
linxin committed
693
        vm.isClick = false
linxin's avatar
linxin committed
694 695
        if (vm.fromPage === 'sale') {
          vm.fromList = false
linxin's avatar
linxin committed
696
          vm.isReadOnly = false
邹骏's avatar
邹骏 committed
697
          vm.leaseList = []
邹骏's avatar
邹骏 committed
698 699
          vm.rentInfoQuery()
          vm.rentList()
linxin's avatar
linxin committed
700
        } else if (vm.fromPage === 'list') {
linxin's avatar
linxin committed
701 702 703 704 705
          if (window.localStorage.contractReadonly === 'true') {
            vm.isReadOnly = true
          } else {
            vm.isReadOnly = false
          }
linxin's avatar
linxin committed
706 707
          vm.fromList = true
          vm.rentInfoQuery()
邹骏's avatar
邹骏 committed
708
          vm.rentList()
linxin's avatar
linxin committed
709
        }
linxin's avatar
linxin committed
710
        Object.keys(vm.saveInfo).forEach(i => { // 置空saveInfo
Jennie Shi's avatar
Jennie Shi committed
711
          if (i !== 'project_id' && i !== 'bp_name' && i !== 'lease_start_date') {
linxin's avatar
linxin committed
712 713 714
            vm.saveInfo[i] = ''
          }
        })
李晓兵's avatar
李晓兵 committed
715 716 717 718 719 720
        /* console.log('@@@@@@@@@@@@@@@@@@'+JSON.stringify(vm.saveInfo))
           Object.keys(vm.productInfo).forEach(i => { // 置空productInfo
             if (i !== 'project_id') {
               vm.productInfo[i] = ''
             }
           }) */
linxin's avatar
linxin committed
721 722 723 724
        setTimeout(() => {
          vm.getProductLine() // 产品线查询
          vm.repayPeriod()// 还款周期查询
          vm.getPayWay()// 支付方式查询
郑娟's avatar
郑娟 committed
725
          vm.getYesNoList() // 是否值集获取
jiacheng.mao's avatar
jiacheng.mao committed
726
          vm.getDepositCollectionMethodListList() // 保证金收取方式值集获取
727
          vm.getDepositDeduction()// 保证金抵扣方式
728
          vm.getHandlingPolicy()// 手续费政策
linxin's avatar
linxin committed
729
        }, 0)
邹骏's avatar
邹骏 committed
730
        console.log(vm.factory_ocr_type)
linxin's avatar
linxin committed
731 732 733
      }
    })
  },
734
  methods: {
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762
    onSelect (value) {
      let val = value.name
      this.info[this.now_nodeName + '_n'] = val
      let arr = this.YesNoType.filter(item => item.code_name === val)
      this.info[this.now_nodeName] = arr[0].code
    },
    showPicker (flag, index) {
      // console.log(this.flag);
      if (this.flag) return
      this.now_nodeName = flag
      this.actions = this.YesNoType.map(item => ({ name: item.code_name }))
      this.picker_show = true
    },
    // 下拉框数据获取
    async getDropBox () {
      let url = process.env.basePath + 'app_get_syscode'
      let param = {
        'YES_NO': 'YES_NO',

      }

      hlsPopup.showLoading('请稍候')
      let res = await this.$post(url, param)
      this.hlsPopup.hideLoading()
      if (res.return_status === 'S') {
        this.YesNoType = res.YES_NO
      }
    },
胡's avatar
committed
763
    // 非标价商务信息
764
    showFeiInfo () {
胡's avatar
committed
765 766 767
      this.showHideOnBlur = true
    },

邹骏's avatar
邹骏 committed
768 769 770 771 772 773 774 775
    // 查看大图
    showBigPicture (pic) {
      let vm = this
      vm.hlsPopup.showBigPicture({
        imgUrl: pic,
        width: '100%',
      })
    },
Jennie Shi's avatar
Jennie Shi committed
776
    saveRent () {
邹骏's avatar
邹骏 committed
777
      let url = process.env.basePath + 'prj_leases_info_save'
Jennie Shi's avatar
Jennie Shi committed
778
      if (this.rentInfo.frame_number === '') {
邹骏's avatar
邹骏 committed
779
        hlsPopup.showLongCenter('车架号不能为空!')
Jennie Shi's avatar
Jennie Shi committed
780
      } else if (this.rentInfo.engine === '') {
邹骏's avatar
邹骏 committed
781
        hlsPopup.showLongCenter('发动机号不能为空!')
Jennie Shi's avatar
Jennie Shi committed
782
      } else if (this.rentInfo.vehicle_model === '') {
邹骏's avatar
邹骏 committed
783
        hlsPopup.showLongCenter('车辆型号不能为空!')
Jennie Shi's avatar
Jennie Shi committed
784
      } else if (this.rentInfo.certificate_number === '') {
邹骏's avatar
邹骏 committed
785
        hlsPopup.showLongCenter('合格证编号不能为空!')
Jennie Shi's avatar
Jennie Shi committed
786
      } else if (this.rentInfo.departure_date === '') {
邹骏's avatar
邹骏 committed
787
        hlsPopup.showLongCenter('发车日期不能为空!')
Jennie Shi's avatar
Jennie Shi committed
788
      } else if (this.rentInfo.invoice_date === '') {
邹骏's avatar
邹骏 committed
789 790 791 792 793 794 795 796 797 798
        hlsPopup.showLongCenter('开票日期不能为空!')
      } else {
        let param = {
          master: {
            project_lease_item_id: this.rentInfo.project_lease_item_id,
            project_id: window.localStorage.project_id,
            frame_number: this.rentInfo.frame_number,
            engine: this.rentInfo.engine,
            vehicle_model: this.rentInfo.vehicle_model,
            certificate_number: this.rentInfo.certificate_number,
邹骏's avatar
邹骏 committed
799 800
            departure_date: this.rentInfo.departure_date,
            invoice_date: this.rentInfo.invoice_date,
801 802 803 804 805 806 807 808 809 810 811 812 813
            register_flag_n: this.rentInfo.register_flag_n,
            register_flag_: this.rentInfo.register_flag_,
            associate_flag_n: this.rentInfo.associate_flag_n,
            associate_flag: this.rentInfo.associate_flag,
            associate_company: this.rentInfo.associate_company,
            associate_agreement_n: this.rentInfo.associate_agreement_n,
            associate_agreement: this.rentInfo.associate_agreement,
            lease_mortgage_n: this.rentInfo.lease_mortgage_n,
            lease_mortgage: this.rentInfo.lease_mortgage,
            gps_flag_n: this.rentInfo.gps_flag_n,
            gps_flag: this.rentInfo.gps_flag,
            insurance_flag_n: this.rentInfo.insurance_flag_n,
            insurance_flag: this.rentInfo.insurance_flag,
Jennie Shi's avatar
Jennie Shi committed
814
          },
邹骏's avatar
邹骏 committed
815
        }
邹骏's avatar
邹骏 committed
816
        this.$post(url, param).then((res) => {
邹骏's avatar
邹骏 committed
817 818 819 820 821
          this.hlsPopup.hideLoading()
          if (res.result === 'S') {
            hlsPopup.showLongCenter('保存成功')
            this.downNum = false
            this.rentInfo.project_lease_item_id = res.master.project_lease_item_id
Jennie Shi's avatar
Jennie Shi committed
822 823 824
            if (this.uploadList.length > 0) {
              this.uploadList[0].pkvalue = this.rentInfo.project_lease_item_id
            }
Jennie Shi's avatar
Jennie Shi committed
825
            this.savePicture(this.uploadList)
邹骏's avatar
邹骏 committed
826 827
            let ifPush = true
            this.leaseList.forEach(item => {
Jennie Shi's avatar
Jennie Shi committed
828
              if (item.project_lease_item_id === res.master.project_lease_item_id) {
邹骏's avatar
邹骏 committed
829 830 831 832 833 834
                ifPush = false
              }
            })
            if (ifPush) {
              this.leaseList.push(this.rentInfo)
            }
邹骏's avatar
邹骏 committed
835 836 837 838
          } else {
            hlsPopup.showLongCenter(res.message)
          }
        })
邹骏's avatar
邹骏 committed
839
      }
邹骏's avatar
邹骏 committed
840
    },
邹骏's avatar
邹骏 committed
841
    // 选择识别类型
842
    pickMethod() {
邹骏's avatar
邹骏 committed
843 844 845 846 847 848 849 850
      let vm = this
      hlsPopup.showActionSheet({
        titleText: '请选择证件类型',
        buttonArray: ['徐工重型合格证', '车辆登记证', '出厂合格证'],
        callback: index => {
          if (index === 0) {
            vm.certificationType = 'NORMAL'
            vm.ocrShow()
Jennie Shi's avatar
Jennie Shi committed
851
          } else if (index === 1) {
邹骏's avatar
邹骏 committed
852 853
            vm.certificationType = 'DAOLU'
            vm.ocrShow()
Jennie Shi's avatar
Jennie Shi committed
854
          } else if (index === 2) {
邹骏's avatar
邹骏 committed
855 856 857 858 859 860
            vm.certificationType = 'CHANYUN'
            vm.ocrShow()
          }
        },
      })
    },
邹骏's avatar
邹骏 committed
861
    // ocr识别入口
862
    ocrShow() {
邹骏's avatar
邹骏 committed
863 864 865 866 867 868 869 870 871 872 873 874 875
      let vm = this
      hlsPopup.showActionSheet({
        titleText: '请选择照片',
        buttonArray: ['拍照', '从相册取'],
        callback: index => {
          if (index === 0) {
            vm.openCamera()
          } else {
            vm.takePicture()
          }
        },
      })
    },
876
    openCamera() {
邹骏's avatar
邹骏 committed
877 878 879 880 881 882
      let vm = this
      let cameraoptions = {
        quality: 60,
        width: 1843,
        height: 1382,
      }
Jennie Shi's avatar
Jennie Shi committed
883 884 885 886 887 888 889 890
      let obj = {
        pkvalue: '',
        source_type: 'PRJ_PROJECT_LEASE_ITEM',
        filePath: '',
        attachment_id: '',
        user_id: 1,
        fileName: '合格证',
      }
邹骏's avatar
邹骏 committed
891 892 893 894 895 896 897
      let success = function (imgdata) {
        if (!imgdata) {
          hlsPopup.showLongCenter('请拍照')
        } else {
          vm.isUpload = true
          vm.vehicleImg = hlsUtil.convertImageUrl(imgdata)
          vm.vehicleIdentify(imgdata)
Jennie Shi's avatar
Jennie Shi committed
898 899 900
          obj.filePath = imgdata
          vm.uploadList = []
          vm.uploadList.push(imgdata)
邹骏's avatar
邹骏 committed
901 902 903 904 905 906 907
        }
      }
      let error = function () {
        hlsPopup.showLongCenter(error)
      }
      hlsUtil.openCamera(cameraoptions, success, error)
    },
908
    takePicture() {
邹骏's avatar
邹骏 committed
909 910 911 912 913 914 915
      let vm = this
      var cameraoptions = {
        quality: 70,
        width: 1843,
        height: 1382,
        maxCount: 1,
      }
Jennie Shi's avatar
Jennie Shi committed
916 917 918 919 920 921 922 923
      let obj = {
        pkvalue: '',
        source_type: 'PRJ_PROJECT_LEASE_ITEM',
        filePath: '',
        attachment_id: '',
        user_id: 1,
        fileName: '合格证',
      }
邹骏's avatar
邹骏 committed
924 925 926 927 928 929
      let success = function (imgUrl) {
        if (imgUrl.length === 0) {
          hlsPopup.showLongCenter('请选择一张图片')
        } else {
          vm.isUpload = true
          vm.vehicleImg = hlsUtil.convertImageUrl(imgUrl[0])
Jennie Shi's avatar
Jennie Shi committed
930
          obj.filePath = imgUrl[0]
邹骏's avatar
邹骏 committed
931
          vm.vehicleIdentify(imgUrl[0])
Jennie Shi's avatar
Jennie Shi committed
932 933
          vm.uploadList = []
          vm.uploadList.push(obj)
邹骏's avatar
邹骏 committed
934 935 936 937 938 939 940 941
        }
      }
      let error = function () {
        hlsPopup.showLongCenter(error)
      }
      vm.hlsUtil.takePicture(cameraoptions, success, error)
    },
    // 合格证识别
942
    vehicleIdentify(fileUrl) {
邹骏's avatar
邹骏 committed
943
      let vm = this
Jennie Shi's avatar
Jennie Shi committed
944
      hlsPopup.showLoading('正在识别...')
邹骏's avatar
邹骏 committed
945
      let url
Jennie Shi's avatar
Jennie Shi committed
946
      if (vm.certificationType === 'NORMAL') {
邹骏's avatar
邹骏 committed
947
        url = process.env.ocrPath + '/baidu/ocr/vehicle_certificate'
Jennie Shi's avatar
Jennie Shi committed
948
      } else if (vm.certificationType === 'CHANYUN') {
邹骏's avatar
邹骏 committed
949
        url = process.env.ocrPath + '/baidu/ocr/chanyun'
Jennie Shi's avatar
Jennie Shi committed
950
      } else if (vm.certificationType === 'DAOLU') {
邹骏's avatar
邹骏 committed
951 952
        url = process.env.ocrPath + '/baidu/ocr/daolu'
      }
邹骏's avatar
邹骏 committed
953
      console.log('OCR识别URL:' + url)
邹骏's avatar
邹骏 committed
954 955
      hlsUtil.baiduOcr(fileUrl, url, function (res) {
        hlsPopup.hideLoading()
邹骏's avatar
邹骏 committed
956
        console.log('OCR识别结果:' + JSON.stringify(res))
Jennie Shi's avatar
Jennie Shi committed
957 958 959 960
        if (vm.certificationType === 'NORMAL') {
          let result = res.result.words_result
          vm.rentInfo.frame_number = result.VinNo // 车架号
          vm.rentInfo.engine = result.EngineNo // 发动机号
Jennie Shi's avatar
Jennie Shi committed
961
          vm.rentInfo.vehicle_model = result.CarModel // 车辆型号
Jennie Shi's avatar
Jennie Shi committed
962
          vm.rentInfo.certificate_number = result.CertificationNo // 合格证编号
Jennie Shi's avatar
Jennie Shi committed
963
        } else if (vm.certificationType === 'DAOLU') {
Jennie Shi's avatar
Jennie Shi committed
964 965 966 967 968
          let result = res.result.data
          vm.rentInfo.frame_number = result.vehicle_number.word // 车架号
          vm.rentInfo.engine = result.engine_number.word // 发动机号
          vm.rentInfo.vehicle_model = result.car_model.word // 车辆型号
          vm.rentInfo.certificate_number = ''
Jennie Shi's avatar
Jennie Shi committed
969 970 971 972 973 974
        } else if (vm.certificationType === 'CHANYUN') {
          let result = res.result.data
          vm.rentInfo.frame_number = result.vehicle_number.word // 车架号
          vm.rentInfo.engine = result.engine_number.word // 发动机号
          vm.rentInfo.vehicle_model = result.car_type.word // 车辆型号
          vm.rentInfo.certificate_number = result.vechicle_ok_no.word
Jennie Shi's avatar
Jennie Shi committed
975 976 977 978
        }
        vm.rentInfo.project_lease_item_id = ''
        vm.rentInfo.departure_date = ''
        vm.rentInfo.invoice_date = ''
邹骏's avatar
邹骏 committed
979 980 981
      })
    },
    // 图片保存
Jennie Shi's avatar
Jennie Shi committed
982 983
    savePicture (list) {
      // let vm = this
邹骏's avatar
邹骏 committed
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017
      if (list.length) {
        // hlsPopup.showLoading('图片上传请稍候')
        var alreadyUploadNum = 0
        var attLength = 0
        var recordUploadInterval = setInterval(function () {
          if (alreadyUploadNum === attLength) {
            clearInterval(recordUploadInterval)
            hlsPopup.hideLoading()
            // hlsPopup.showLongCenter('图片上传成功')
          }
        }, 500)
        for (var i = 0; i < list.length; i++) {
          let uploadSuccess = function (res) {
            if (res.result === 'S') {
              alreadyUploadNum++
              for (var j = 0; j < list.length; j++) {
                if (list[j].filePath === res.response.filePath) {
                  list[j].attachment_id = res.response.attachment_id
                  break
                }
              }
            } else {
              hlsPopup.hideLoading()
            }
          }
          if (!list[i].attachment_id) {
            attLength++
            hlsUtil.fileUploadSvc(list[i], uploadSuccess)
          }
        }
      } else {
        hlsPopup.hideLoading()
      }
    },
1018
    getImg(id) {
邹骏's avatar
邹骏 committed
1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047
      // 获取合格证
      let vm = this
      let randomString = Math.floor(Math.random() * 21)
      let url =
        process.env.basePath +
        'app_attment_query' +
        '&index' +
        `'${randomString}'`
      let param = {
        master: {
          source_type: 'PRJ_PROJECT_LEASE_ITEM',
          pkvalue: id,
        },
      }
      vm.$post(url, param).then(function (res) {
        if (res.result === 'S') {
          if (res.info) {
            vm.vehicleImg =
              process.env.filePath +
              'attachment_id=' +
              res.info.attachment_id +
              '&access_token=' +
              window.localStorage.access_token
          }
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
1048
    getProduct() {
linxin's avatar
linxin committed
1049 1050 1051 1052
      this.$refs.product.init()
      this.$refs.product.getProduct()
      this.$refs.product.show()
    },
1053
    selectedProduct(e) {
linxin's avatar
linxin committed
1054 1055 1056
      this.saveInfo.product_id = e.product_id
      this.saveInfo.product_id_n = e.product_id_n
    },
1057
    check(e) {
linxin's avatar
linxin committed
1058 1059 1060 1061
      if (e < 1000) {
        hlsPopup.showLongCenter('设备单价不能小于1000元!')
      }
    },
1062
    routeGoCustomClick() {
linxin's avatar
linxin committed
1063 1064 1065 1066 1067 1068 1069
      if (this.fromPage === 'sale') {
        this.isClick = true
        this.routeGoCustom()
      } else {
        this.$routeGo()
      }
    },
李晓兵's avatar
李晓兵 committed
1070
    // 自定义返回逻辑:第一次新建时返回判断是否保存数据,未保存提示保存
1071
    routeGoCustom() {
李晓兵's avatar
李晓兵 committed
1072
      let vm = this
linxin's avatar
linxin committed
1073
      if (vm.fromPage === 'sale' && !vm.saveTed) {
李晓兵's avatar
李晓兵 committed
1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088
        hlsPopup.showConfirm({
          title: '提示',
          content: '当前页面数据未保存,返回会导致数据丢失,是否保存?',
          onConfirm: function (index) {
            if (index === 1) {
              vm.saveBack()
            } else {
              vm.$routeGo()
            }
          },
        })
      } else {
        vm.$routeGo()
      }
    },
1089
    changeRatio() {
linxin's avatar
linxin committed
1090
      this.saveInfo.down_payment_ratio_n = `${(this.saveInfo.down_payment / this.saveInfo.equip_price).toFixed(2) * 100}`
linxin's avatar
linxin committed
1091
    },
1092
    changeDeposit() {
linxin's avatar
linxin committed
1093
      this.saveInfo.deposit_ratio_n = `${(this.saveInfo.deposit / this.saveInfo.equip_price).toFixed(2) * 100}`
linxin's avatar
linxin committed
1094
    },
1095
    changeLeaseCharge() {
1096
      let vm = this
1097
      if (!this.saveInfo.equip_price || this.saveInfo.equip_price === '' || this.saveInfo.equip_price === 0 || this.saveInfo.equip_price === 0.00) {
1098
        hlsPopup.showPopup({
1099
          title: '提示',
1100 1101 1102
          content: '请先输入设备单价',
          onConfirm: function () {
            vm.saveInfo.lease_charge = 0
1103
          },
1104
        })
1105
      } else {
1106 1107
        this.saveInfo.lease_charge_ratio_n = `${((this.saveInfo.lease_charge / (this.saveInfo.equip_price - this.saveInfo.equip_price * this.saveInfo.down_payment_ratio_n.replace('%', '') / 100)) * 100).toFixed(6)}`
      }
linxin's avatar
linxin committed
1108
    },
邹骏's avatar
邹骏 committed
1109
    // 租赁物列表
1110
    rentList() {
邹骏's avatar
邹骏 committed
1111
      this.leaseList = []
邹骏's avatar
邹骏 committed
1112 1113 1114 1115 1116
      let url = process.env.basePath + 'prj_leases_info_list'
      let param = {
        project_id: window.localStorage.project_id,
      }
      hlsPopup.showLoading('请稍候')
Jennie Shi's avatar
Jennie Shi committed
1117
      this.$post(url, param).then((res) => {
邹骏's avatar
邹骏 committed
1118 1119 1120 1121 1122 1123 1124 1125
        this.hlsPopup.hideLoading()
        if (res.result === 'S') {
          this.leaseList = res.lists
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
1126
    rentInfoQuery() { // 租赁信息查询
linxin's avatar
linxin committed
1127 1128 1129 1130 1131 1132 1133 1134 1135
      let vm = this
      let url = process.env.basePath + 'prj_lease_query'
      let param = {
        project_id: window.localStorage.project_id,
      }
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
邹骏's avatar
邹骏 committed
1136 1137 1138 1139 1140 1141
          if (res.info !== undefined) {
            Object.assign(vm.saveInfo, res.info)
            vm.saveInfo.product_plan_name = res.info.product_plan_id_n
            vm.factory_ocr_type = res.info.factory_ocr_type
            vm.saveInfo.division_n = res.info.product_name
            vm.saveInfo.down_payment = res.info.down_payment
胡's avatar
committed
1142

1143 1144
            vm.nowPolicy = res.info
            console.log('复现的nowPolicy:', vm.nowPolicy)
邹骏's avatar
邹骏 committed
1145
          }
linxin's avatar
linxin committed
1146
          vm.saveInfo.int_rate_n = vm.saveInfo.int_rate_n.replace('%', '')
linxin's avatar
linxin committed
1147 1148 1149
          vm.saveInfo.down_payment_ratio_n = vm.saveInfo.down_payment_ratio_n.replace('%', '')
          vm.saveInfo.deposit_ratio_n = vm.saveInfo.deposit_ratio_n.replace('%', '')
          vm.saveInfo.lease_charge_ratio_n = vm.saveInfo.lease_charge_ratio_n.replace('%', '')
linxin's avatar
linxin committed
1150 1151 1152 1153 1154
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
1155
    selectBusinessPolicy(e) {
linxin's avatar
linxin committed
1156
      let vm = this
1157
      vm.nowPolicy = e // 保存目前的政策
linxin's avatar
linxin committed
1158 1159 1160
      vm.saveInfo.product_plan_id = e.product_plan_id
      vm.saveInfo.product_plan_name = e.product_plan_name
      vm.saveInfo.down_payment_ratio = e.down_payment_ratio
linxin's avatar
linxin committed
1161
      vm.saveInfo.down_payment_ratio_n = e.down_payment_ratio_n.replace('%', '')
linxin's avatar
linxin committed
1162
      vm.saveInfo.lease_charge_ratio = e.lease_charge_ratio
linxin's avatar
linxin committed
1163
      vm.saveInfo.lease_charge_ratio_n = e.lease_charge_ratio_n.replace('%', '')
linxin's avatar
linxin committed
1164
      vm.saveInfo.int_rate = e.int_rate
linxin's avatar
linxin committed
1165
      vm.saveInfo.int_rate_n = e.int_rate_n.replace('%', '')
linxin's avatar
linxin committed
1166
      vm.saveInfo.penalty_rate_n = e.penalty_rate_n
linxin's avatar
linxin committed
1167
      vm.saveInfo.penalty_rate = e.penalty_rate
linxin's avatar
linxin committed
1168
      vm.saveInfo.deposit_ratio = e.deposit_ratio
linxin's avatar
linxin committed
1169
      vm.saveInfo.deposit_ratio_n = e.deposit_ratio_n.replace('%', '')
1170 1171 1172 1173 1174
      //冬歇/雨歇起止日期
      vm.saveInfo.fallow_date_f = e.fallow_date_f ? vm.dateFormat(e.fallow_date_f) : ''
      vm.saveInfo.fallow_date_t = e.fallow_date_t ? vm.dateFormat(e.fallow_date_t) : ''
      //首X期-期数
      vm.saveInfo.lease_times_x = e.lease_times_x ? e.lease_times_x : ''
linxin's avatar
linxin committed
1175

Jennie Shi's avatar
Jennie Shi committed
1176 1177
      // vm.saveInfo.lease_times = e.lease_times
      vm.saveInfo.lease_times = ''
linxin's avatar
linxin committed
1178 1179 1180 1181
      setTimeout(() => {
        vm.showModalBusiness = false
      }, 100)
    },
1182
    calculateBack() {
李晓兵's avatar
李晓兵 committed
1183 1184 1185
      let vm = this
      let url = process.env.basePath + 'prj_lease_info_save'
      vm.saveInfo.down_payment_ratio = (vm.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2)
Jennie Shi's avatar
Jennie Shi committed
1186
      vm.saveInfo.lease_charge_ratio = (vm.saveInfo.lease_charge_ratio_n.replace('%', '') / 100).toFixed(8)
李晓兵's avatar
李晓兵 committed
1187 1188 1189 1190 1191 1192 1193 1194
      vm.saveInfo.deposit_ratio = (vm.saveInfo.deposit_ratio_n.replace('%', '') / 100).toFixed(2)
      vm.saveInfo.finance_amount = vm.finance_amount
      let param = {
        master: vm.saveInfo,
      }
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
李晓兵's avatar
李晓兵 committed
1195
          // vm.isComputed = true
1196
          vm.isComputedSuccess.status = true
李晓兵's avatar
李晓兵 committed
1197 1198
        } else {
          hlsPopup.showLongCenter(res.message)
1199
          vm.isComputedSuccess = { status: false, msg: res.message }
李晓兵's avatar
李晓兵 committed
1200 1201 1202
        }
      })
    },
1203
    save() {
李晓兵's avatar
李晓兵 committed
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238
      let vm = this
      if (!vm.saveInfo.division_n) {
        hlsPopup.showLongCenter('产品线不能为空!')
      } else if (!vm.saveInfo.product_id_n) {
        hlsPopup.showLongCenter('产品型号不能为空!')
      } else if (!vm.saveInfo.product_num) {
        hlsPopup.showLongCenter('产品数量不能为空!')
      } else if (!vm.saveInfo.product_plan_name) {
        hlsPopup.showLongCenter('商务政策不能为空!')
      } else if (!vm.saveInfo.equip_price) {
        hlsPopup.showLongCenter('设备单价不能为空!')
      } else if (!vm.saveInfo.down_payment_ratio_n) {
        hlsPopup.showLongCenter('首付比例不能为空!')
      } else if (!vm.saveInfo.down_payment) {
        hlsPopup.showLongCenter('首付款不能为空!')
      } else if (!vm.saveInfo.deposit_ratio_n) {
        hlsPopup.showLongCenter('保证金比例不能为空!')
      } else if (!vm.saveInfo.deposit) {
        hlsPopup.showLongCenter('保证金不能为空!')
      } else if (!vm.saveInfo.lease_charge_ratio_n) {
        hlsPopup.showLongCenter('手续费比例不能为空!')
      } else if (!vm.saveInfo.lease_charge) {
        hlsPopup.showLongCenter('手续费不能为空!')
      } else if (!vm.saveInfo.gps_fee) {
        hlsPopup.showLongCenter('GPS费用不能为空!')
      } else if (!vm.saveInfo.insurance_fee) {
        hlsPopup.showLongCenter('保险押金不能为空!')
      } else if (!vm.saveInfo.lease_start_date) {
        hlsPopup.showLongCenter('预计付款日不能为空!')
      } else if (!vm.saveInfo.annual_pay_times_n) {
        hlsPopup.showLongCenter('还款周期不能为空!')
      } else if (!vm.saveInfo.lease_times) {
        hlsPopup.showLongCenter('租赁期数不能为空!')
      } else if (!vm.saveInfo.pay_type_n) {
        hlsPopup.showLongCenter('支付方式不能为空!')
jiacheng.mao's avatar
jiacheng.mao committed
1239 1240
      } else if (!vm.saveInfo.deposit_collection_method_n) {
        hlsPopup.showLongCenter('保证金收取方式不能为空!')
李晓兵's avatar
李晓兵 committed
1241 1242
      } else if (!vm.saveInfo.residual_value) {
        hlsPopup.showLongCenter('留购价不能为空!')
linxin's avatar
linxin committed
1243 1244
      } else if (vm.saveInfo.equip_price < 1000) {
        hlsPopup.showLongCenter('设备单价不能小于1000元!')
李晓兵's avatar
李晓兵 committed
1245
      } else {
1246 1247 1248 1249 1250 1251 1252 1253 1254
        if (vm.saveInfo.lease_start_date) {
          let date = vm.saveInfo.lease_start_date
          let dateStr = new Date(date.replace(/-/g, '/'))
          let day = dateStr.getDate()
          if (day !== 20) {
            hlsPopup.showLongCenter(`预计付款日必须为每个月的20号`)
            return
          }
        }
李晓兵's avatar
李晓兵 committed
1255 1256
        let url = process.env.basePath + 'prj_lease_info_save'
        vm.saveInfo.down_payment_ratio = (vm.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2)
Jennie Shi's avatar
Jennie Shi committed
1257
        vm.saveInfo.lease_charge_ratio = (vm.saveInfo.lease_charge_ratio_n.replace('%', '') / 100).toFixed(8)
李晓兵's avatar
李晓兵 committed
1258
        vm.saveInfo.deposit_ratio = (vm.saveInfo.deposit_ratio_n.replace('%', '') / 100).toFixed(2)
linxin's avatar
linxin committed
1259
        vm.saveInfo.int_rate = (vm.saveInfo.int_rate_n.replace('%', '') / 100)
李晓兵's avatar
李晓兵 committed
1260
        vm.saveInfo.finance_amount = vm.finance_amount
linxin's avatar
linxin committed
1261
        vm.saveInfo.credit_id = window.localStorage.credit_id
李晓兵's avatar
李晓兵 committed
1262
        let param = {
邹骏's avatar
邹骏 committed
1263
          master: JSON.parse(JSON.stringify(vm.saveInfo)),
李晓兵's avatar
李晓兵 committed
1264 1265 1266 1267
        }
        hlsPopup.showLoading('请稍候')
        vm.$post(url, param).then(function (res) {
          if (res.result === 'S') {
linxin's avatar
linxin committed
1268
            vm.hlsPopup.hideLoading()
李晓兵's avatar
李晓兵 committed
1269 1270
            vm.isComputed = true
            vm.calculeFlag = true
李晓兵's avatar
李晓兵 committed
1271
            vm.saveTed = true
1272
            vm.isComputedSuccess.status = true
李晓兵's avatar
李晓兵 committed
1273 1274 1275
            hlsPopup.showLongCenter('计算成功')
            vm.goPlan()
          } else {
1276
            vm.isComputedSuccess = { status: false, msg: res.message }
linxin's avatar
linxin committed
1277
            vm.hlsPopup.hideLoading()
李晓兵's avatar
李晓兵 committed
1278 1279 1280 1281 1282
            hlsPopup.showLongCenter(res.message)
          }
        })
      }
    },
1283
    saveBack() {
linxin's avatar
linxin committed
1284
      let vm = this
linxin's avatar
linxin committed
1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302
      if (!vm.saveInfo.division_n) {
        hlsPopup.showLongCenter('产品线不能为空!')
      } else if (!vm.saveInfo.product_id_n) {
        hlsPopup.showLongCenter('产品型号不能为空!')
      } else if (!vm.saveInfo.product_num) {
        hlsPopup.showLongCenter('产品数量不能为空!')
      } else if (!vm.saveInfo.product_plan_name) {
        hlsPopup.showLongCenter('商务政策不能为空!')
      } else if (!vm.saveInfo.equip_price) {
        hlsPopup.showLongCenter('设备单价不能为空!')
      } else if (!vm.saveInfo.down_payment_ratio_n) {
        hlsPopup.showLongCenter('首付比例不能为空!')
      } else if (!vm.saveInfo.down_payment) {
        hlsPopup.showLongCenter('首付款不能为空!')
      } else if (!vm.saveInfo.deposit_ratio_n) {
        hlsPopup.showLongCenter('保证金比例不能为空!')
      } else if (!vm.saveInfo.deposit) {
        hlsPopup.showLongCenter('保证金不能为空!')
1303 1304
      } else if (!vm.saveInfo.deposit_deduction) {
        hlsPopup.showLongCenter('保证金抵扣方式不能为空!')
1305 1306
      } else if (!vm.saveInfo.handling_policy) {
        hlsPopup.showLongCenter('手续费政策不能为空!')
linxin's avatar
linxin committed
1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322
      } else if (!vm.saveInfo.lease_charge_ratio_n) {
        hlsPopup.showLongCenter('手续费比例不能为空!')
      } else if (!vm.saveInfo.lease_charge) {
        hlsPopup.showLongCenter('手续费不能为空!')
      } else if (!vm.saveInfo.gps_fee) {
        hlsPopup.showLongCenter('GPS费用不能为空!')
      } else if (!vm.saveInfo.insurance_fee) {
        hlsPopup.showLongCenter('保险押金不能为空!')
      } else if (!vm.saveInfo.lease_start_date) {
        hlsPopup.showLongCenter('预计付款日不能为空!')
      } else if (!vm.saveInfo.annual_pay_times_n) {
        hlsPopup.showLongCenter('还款周期不能为空!')
      } else if (!vm.saveInfo.lease_times) {
        hlsPopup.showLongCenter('租赁期数不能为空!')
      } else if (!vm.saveInfo.pay_type_n) {
        hlsPopup.showLongCenter('支付方式不能为空!')
jiacheng.mao's avatar
jiacheng.mao committed
1323 1324
      } else if (!vm.saveInfo.deposit_collection_method_n) {
        hlsPopup.showLongCenter('保证金收取方式不能为空!')
linxin's avatar
linxin committed
1325 1326
      } else if (!vm.saveInfo.residual_value) {
        hlsPopup.showLongCenter('留购价不能为空!')
linxin's avatar
linxin committed
1327 1328
      } else if (!vm.saveInfo.int_rate_n) {
        hlsPopup.showLongCenter('年利率不能为空!')
linxin's avatar
linxin committed
1329 1330 1331
      } else {
        let url = process.env.basePath + 'prj_lease_info_save'
        vm.saveInfo.down_payment_ratio = (vm.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2)
Jennie Shi's avatar
Jennie Shi committed
1332
        vm.saveInfo.lease_charge_ratio = (vm.saveInfo.lease_charge_ratio_n.replace('%', '') / 100).toFixed(8)
linxin's avatar
linxin committed
1333
        vm.saveInfo.deposit_ratio = (vm.saveInfo.deposit_ratio_n.replace('%', '') / 100).toFixed(2)
1334
        vm.saveInfo.finance_amount = vm.finance_amountnext
linxin's avatar
linxin committed
1335 1336
        let param = {
          master: vm.saveInfo,
李晓兵's avatar
李晓兵 committed
1337
        }
linxin's avatar
linxin committed
1338 1339 1340 1341 1342
        hlsPopup.showLoading('请稍候')
        vm.$post(url, param).then(function (res) {
          vm.hlsPopup.hideLoading()
          if (res.result === 'S') {
            hlsPopup.showLongCenter('保存成功')
1343
            vm.isComputedSuccess.status = true
linxin's avatar
linxin committed
1344 1345
            vm.$routeGo()
          } else {
1346
            vm.isComputedSuccess = { status: false, msg: res.message }
linxin's avatar
linxin committed
1347 1348 1349 1350
            hlsPopup.showLongCenter(res.message)
          }
        })
      }
李晓兵's avatar
李晓兵 committed
1351
    },
1352
    async isComputedCheck() {
linxin's avatar
linxin committed
1353 1354 1355
      let vm = this
      let url = process.env.basePath + 'prj_product_cal_status'
      let param = {
linxin's avatar
linxin committed
1356
        project_id: vm.saveInfo.project_id,
linxin's avatar
linxin committed
1357
      }
linxin's avatar
linxin committed
1358
      hlsPopup.showLoading('请稍候')
linxin's avatar
linxin committed
1359
      let res = await vm.$post(url, param)
linxin's avatar
linxin committed
1360
      vm.hlsPopup.hideLoading()
linxin's avatar
linxin committed
1361 1362 1363
      if (res.result === 'S') {
        if (res.info.success_flag === 'Y') {
          return true
linxin's avatar
linxin committed
1364
        } else {
linxin's avatar
linxin committed
1365
          return false
linxin's avatar
linxin committed
1366
        }
linxin's avatar
linxin committed
1367 1368 1369
      } else {
        hlsPopup.showLongCenter(res.message)
      }
linxin's avatar
linxin committed
1370
    },
1371
    async next() {
linxin's avatar
linxin committed
1372
      let vm = this
1373 1374
      if (!vm.isComputedSuccess.status && vm.isComputedSuccess.msg) {
        hlsPopup.showLongCenter(vm.isComputedSuccess.msg)
胡's avatar
committed
1375 1376
        return
      }
胡's avatar
committed
1377
      vm.isComputed = await vm.isComputedCheck()
linxin's avatar
linxin committed
1378
      if (vm.isReadOnly) {
1379 1380 1381
        // vm.$router.push({
        //   name: 'CreateEnclosureInfo',
        // })
linxin's avatar
linxin committed
1382
        vm.$router.push({
1383 1384 1385
          name: 'CreateEquipInfo',
          params: {
          },
786817560's avatar
786817560 committed
1386
        })
linxin's avatar
linxin committed
1387
      } else {
linxin's avatar
linxin committed
1388
        if (vm.isComputed) {
李晓兵's avatar
李晓兵 committed
1389
          vm.$router.push({
1390 1391
            name: 'CreateEquipInfo',
            params: {},
linxin's avatar
linxin committed
1392 1393 1394 1395
          })
        } else {
          hlsPopup.showLongCenter('请先进行计算')
        }
linxin's avatar
linxin committed
1396 1397
      }
    },
李晓兵's avatar
李晓兵 committed
1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469
    // next () {
    //         let vm = this
    //         if (vm.isReadOnly) {
    //           vm.$router.push({
    //             name: 'CreateEnclosureInfo',
    //             // vm.$router.push({
    //             //   name: 'CreateEnclosureInfo',
    //             // })
    //           })
    //         } else {
    //           if (vm.isComputed) {
    //             let url = process.env.basePath + 'prj_product_info_save'
    //             let param = {
    //               master: {
    //                 division_n: vm.saveInfo.division_n,
    //                 bp_name: vm.$route.params.bp_name,
    //                 ...vm.productInfo,
    //               },
    //             }
    //             hlsPopup.showLoading('请稍候')
    //             vm.$post(url, param).then(function (res) {
    //               vm.hlsPopup.hideLoading()
    //               if (res.result === 'S') {
    //                 vm.saveTed = true
    //                 vm.$router.push({
    //                   name: 'CreateEnclosureInfo',
    //                 })
    //               } else {
    //                 hlsPopup.showLongCenter(res.message)
    //               }
    //             })
    //           } else {
    //             hlsPopup.showLongCenter('请先进行计算')
    //           }
    //         }
    //       },
    /* next () {
             let vm = this
             if (vm.isReadOnly) {
               vm.$router.push({
                 name: 'CreateEnclosureInfo',
                 // vm.$router.push({
                 //   name: 'CreateEnclosureInfo',
                 // })
               })
             } else {
               if (vm.isComputed) {
                 let url = process.env.basePath + 'prj_product_info_save'
                 let param = {
                   master: {
                     division_n: vm.saveInfo.division_n,
                     bp_name: vm.$route.params.bp_name,
                     ...vm.productInfo,
                   },
                 }
                 hlsPopup.showLoading('请稍候')
                 vm.$post(url, param).then(function (res) {
                   vm.hlsPopup.hideLoading()
                   if (res.result === 'S') {
                     vm.saveTed = true
                     vm.$router.push({
                       name: 'CreateEnclosureInfo',
                     })
                   } else {
                     hlsPopup.showLongCenter(res.message)
                   }
                 })
               } else {
                 hlsPopup.showLongCenter('请先进行计算')
               }
             }
           }, */
1470
    setTime() {
linxin's avatar
linxin committed
1471
      if (!this.saveInfo.lease_start_date) {
linxin's avatar
linxin committed
1472 1473
        let date = window.localStorage.getItem('signDate').replace(/-/g, '/')
        let signDate = new Date(date)
linxin's avatar
linxin committed
1474 1475 1476
        let iToDay = signDate.getDate()
        let iToMon = signDate.getMonth()
        let iToYear = signDate.getFullYear()
1477
        let newDay = new Date(iToYear, iToMon, 20)
jiacheng.mao's avatar
jiacheng.mao committed
1478
        this.saveInfo.lease_start_date = `${newDay.getFullYear()}-${(newDay.getMonth() + 1).toString().length === 2 ? newDay.getMonth() + 1 : '0' + (newDay.getMonth() + 1)}-${(newDay.getDate()).toString().length === 2 ? newDay.getDate() : '0' + newDay.getDate()}`
linxin's avatar
linxin committed
1479 1480
      }
    },
1481
    showTime(format) { // 预计付款日
linxin's avatar
linxin committed
1482
      let vm = this
linxin's avatar
linxin committed
1483 1484
      let date = window.localStorage.getItem('signDate').replace(/-/g, '/')
      let signDate = new Date(date)
linxin's avatar
linxin committed
1485 1486 1487 1488
      let iToDay = signDate.getDate()
      let iToMon = signDate.getMonth()
      let iToYear = signDate.getFullYear()
      let newDay = new Date(iToYear, iToMon, (iToDay + 30))
linxin's avatar
linxin committed
1489
      hlsPopup.showTime({
linxin's avatar
linxin committed
1490
        // nowDate: newDay.format('yyyy-MM-dd'),
1491
        nowDate: (new Date(iToYear, iToMon, 20)).format('yyyy-MM-dd'),
linxin's avatar
linxin committed
1492 1493
        format: format,
        callback: (date) => {
1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504
          let dateStr = new Date(date.replace(/-/g, '/'))
          let day = dateStr.getDate()
          let mon = dateStr.getMonth()
          let year = dateStr.getFullYear()
          date = (new Date(year, mon, day)).format('yyyy-MM-dd')
          if (day !== 20) {
            hlsPopup.showLongCenter(`预计付款日必须为每个月的20号`)
            date = (new Date(year, mon, 20)).format('yyyy-MM-dd')
            // vm.saveInfo.lease_start_date = date
            // return
          }
linxin's avatar
linxin committed
1505 1506 1507
          if (date >= (new Date()).format('yyyy-MM-dd')) {
            vm.saveInfo.lease_start_date = date
          } else {
linxin's avatar
linxin committed
1508
            hlsPopup.showLongCenter(`预计付款日期不能小于当天${(new Date()).format('yyyy-MM-dd')}`)
linxin's avatar
linxin committed
1509
          }
linxin's avatar
linxin committed
1510 1511 1512
        },
      })
    },
1513
    showTime1(format) { // 预计付款日
邹骏's avatar
邹骏 committed
1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525
      let vm = this
      let date = window.localStorage.getItem('signDate').replace(/-/g, '/')
      let signDate = new Date(date)
      let iToDay = signDate.getDate()
      let iToMon = signDate.getMonth()
      let iToYear = signDate.getFullYear()
      let newDay = new Date(iToYear, iToMon, (iToDay + 30))
      hlsPopup.showTime({
        // nowDate: newDay.format('yyyy-MM-dd'),
        nowDate: (new Date(iToYear, iToMon, (iToDay + 30))).format('yyyy-MM-dd'),
        format: format,
        callback: (date) => {
邹骏's avatar
邹骏 committed
1526
          vm.rentInfo.departure_date = date
邹骏's avatar
邹骏 committed
1527 1528 1529
        },
      })
    },
1530
    showTime2(format) { // 预计付款日
邹骏's avatar
邹骏 committed
1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542
      let vm = this
      let date = window.localStorage.getItem('signDate').replace(/-/g, '/')
      let signDate = new Date(date)
      let iToDay = signDate.getDate()
      let iToMon = signDate.getMonth()
      let iToYear = signDate.getFullYear()
      let newDay = new Date(iToYear, iToMon, (iToDay + 30))
      hlsPopup.showTime({
        // nowDate: newDay.format('yyyy-MM-dd'),
        nowDate: (new Date(iToYear, iToMon, (iToDay + 30))).format('yyyy-MM-dd'),
        format: format,
        callback: (date) => {
邹骏's avatar
邹骏 committed
1543
          vm.rentInfo.invoice_date = date
邹骏's avatar
邹骏 committed
1544 1545 1546
        },
      })
    },
1547
    getPayWay() { // 支付方式查询
linxin's avatar
linxin committed
1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565
      let vm = this
      let url = $config.basePath + 'prj_pay_type_query'
      let param = {}
      vm.hlsPopup.showLoading('数据加载中')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.paywayLists = res.lists.map(item => {
            return {
              code: item.pay_type,
              code_name: item.pay_type_n,
            }
          })
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
郑娟's avatar
郑娟 committed
1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581
    getYesNoList () { // 是否值集获取
      let vm = this
      let url = $config.basePath + 'app_get_syscode'
      let param = {
        'YES_NO': 'YES_NO',
      }
      vm.hlsPopup.showLoading('数据加载中')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.return_status === 'S') {
          vm.yesNoList = res.YES_NO
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
jiacheng.mao's avatar
jiacheng.mao committed
1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597
    getDepositCollectionMethodListList () { // 保证金收取方式值集获取
      let vm = this
      let url = $config.basePath + 'app_get_syscode'
      let param = {
        'DEPOSIT_COLLECTION_METHOD': 'DEPOSIT_COLLECTION_METHOD',
      }
      vm.hlsPopup.showLoading('数据加载中')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.return_status === 'S') {
          vm.depositCollectionMethodList = res.DEPOSIT_COLLECTION_METHOD
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
郑娟's avatar
郑娟 committed
1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609
    // async  getYesNoList () { // 是否值集获取
    //   let url = $config.basePath + 'app_get_syscode'
    //   let param = {
    //     'YES_NO': 'YES_NO',
    //   }
    //   hlsPopup.showLoading('请稍候')
    //   let res = await this.$post(url, param)
    //   this.hlsPopup.hideLoading()
    //   if (res.return_status === 'S') {
    //     this.yesNoList = res.YES_NO
    //   }
    // },
linxin's avatar
linxin committed
1610
    // 支付方式选择
郑娟's avatar
郑娟 committed
1611
    selectPayWay () {
linxin's avatar
linxin committed
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622
      let vm = this
      vm.hlsPopup.selectList({
        list: vm.paywayLists, // 下拉列表
        code: 'bp_type',
        object: {},
        returnItem: function (index, obj) {
          vm.saveInfo.pay_type_n = obj.bp_type_n
          vm.saveInfo.pay_type = obj.bp_type
        },
      })
    },
郑娟's avatar
郑娟 committed
1623
    // 首付款是否计入保证金计算
jiacheng.mao's avatar
jiacheng.mao committed
1624
    selectDepositCollectionMethod () {
郑娟's avatar
郑娟 committed
1625 1626
      let vm = this
      vm.hlsPopup.selectList({
jiacheng.mao's avatar
jiacheng.mao committed
1627
        list: vm.depositCollectionMethodList, // 下拉列表
郑娟's avatar
郑娟 committed
1628 1629 1630
        code: 'type',
        object: {},
        returnItem: function (index, obj) {
jiacheng.mao's avatar
jiacheng.mao committed
1631 1632
          vm.saveInfo.deposit_collection_method_n = obj.type_n
          vm.saveInfo.deposit_collection_method = obj.type
郑娟's avatar
郑娟 committed
1633 1634 1635 1636
        },
      })
    },
    repayPeriod () { // 还款周期查询
linxin's avatar
linxin committed
1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655
      let vm = this
      let url = $config.basePath + 'annual_pay_times_query'
      let param = {}
      vm.hlsPopup.showLoading('数据加载中')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.periodLists = res.lists.map(item => {
            return {
              code: item.annual_pay_times,
              code_name: item.annual_pay_times_n,
            }
          })
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
    // 还款周期选择
1656
    periodPull() {
linxin's avatar
linxin committed
1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667
      let vm = this
      vm.hlsPopup.selectList({
        list: vm.periodLists, // 下拉列表
        code: 'bp_type',
        object: {},
        returnItem: function (index, obj) {
          vm.saveInfo.annual_pay_times_n = obj.bp_type_n
          vm.saveInfo.annual_pay_times = obj.bp_type
        },
      })
    },
1668
    loadMorePolicy() {
1669 1670 1671 1672 1673 1674
      if (this.policyKeyWord) {
        this.searchBusinessPolicy()
      } else {
        this.getBusinessPolicy()
      }
    },
1675
    searchBusinessPolicy() {
linxin's avatar
linxin committed
1676
      let vm = this
1677 1678
      // vm.businessLists = []
      // vm.pagenumSearchPolicy = 1
linxin's avatar
linxin committed
1679 1680
      let randomString = Math.floor(Math.random() * 21)
      let url =
1681 1682 1683 1684
        process.env.basePath +
        'prj_product_plan_query' +
        '&index' +
        `'${randomString}'`
linxin's avatar
linxin committed
1685
      let param = {
李晓兵's avatar
李晓兵 committed
1686
        bp_agent_id: vm.bp_agent_id,
linxin's avatar
linxin committed
1687
        pagesize: 10,
1688
        pagenum: vm.pagenumSearchPolicy,
linxin's avatar
linxin committed
1689
        searchInput: vm.policyKeyWord,
1690
        division: vm.saveInfo.division,
linxin's avatar
linxin committed
1691 1692 1693 1694 1695 1696 1697 1698
      }
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          let returnData = []
          returnData = res.lists
          if (returnData.length === 0) {
1699
            vm.businessLists = returnData
linxin's avatar
linxin committed
1700 1701
            vm.$refs.scroll.update(true)
          } else if (returnData.length > 0 && returnData.length < 10) {
1702 1703 1704 1705
            // vm.businessLists = returnData
            vum.forEach(returnData, function (data, index, array) {
              vm.businessLists.push(array[index])
            })
linxin's avatar
linxin committed
1706 1707 1708 1709 1710
            vm.$refs.scroll.update(true)
          } else if (returnData.length === 10) {
            vum.forEach(returnData, function (data, index, array) {
              vm.businessLists.push(array[index])
            })
1711
            vm.pagenumSearchPolicy++
linxin's avatar
linxin committed
1712 1713 1714 1715 1716 1717 1718
            vm.$refs.scroll.update(false)
          }
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
1719
    getBusinessPolicy() {
linxin's avatar
linxin committed
1720
      let vm = this
1721 1722
      // vm.businessLists = []
      // vm.pagenumPolicy = 1
linxin's avatar
linxin committed
1723 1724
      let randomString = Math.floor(Math.random() * 21)
      let url =
1725 1726 1727 1728
        process.env.basePath +
        'prj_product_plan_query' +
        '&index' +
        `'${randomString}'`
linxin's avatar
linxin committed
1729
      let param = {
李晓兵's avatar
李晓兵 committed
1730
        bp_agent_id: vm.bp_agent_id,
linxin's avatar
linxin committed
1731
        pagesize: 10,
1732
        pagenum: vm.pagenumPolicy,
linxin's avatar
linxin committed
1733
        searchInput: vm.policyKeyWord,
1734
        division: vm.saveInfo.division,
linxin's avatar
linxin committed
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747
      }
      hlsPopup.showLoading('请稍候')
      vm.$post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          let returnData = []
          returnData = res.lists
          if (returnData.length === 0) {
            vm.$refs.scroll.update(true)
          } else if (returnData.length > 0 && returnData.length < 10) {
            vum.forEach(returnData, function (data, index, array) {
              vm.businessLists.push(array[index])
            })
1748
            // vm.pagenumPolicy++
linxin's avatar
linxin committed
1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761
            vm.$refs.scroll.update(true)
          } else if (returnData.length === 10) {
            vum.forEach(returnData, function (data, index, array) {
              vm.businessLists.push(array[index])
            })
            vm.pagenumPolicy++
            vm.$refs.scroll.update(false)
          }
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
linxin's avatar
linxin committed
1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868
    // selectProduct (e) {
    //   let vm = this
    //   this.saveInfo.product_id_n = e.product_name
    //   this.saveInfo.product_id = e.product_id
    //   setTimeout(() => {
    //     vm.showModalValue = false
    //   }, 100)
    // },
    // loadMoreProduct () {
    //   if (this.keyWordProduct) {
    //     this.searchProduct()
    //   } else {
    //     this.getProduct()
    //   }
    // },
    // searchProduct () {
    //   let vm = this
    //   vm.divisionLists = []
    //   vm.pagenumSearch = 1
    //   let randomString = Math.floor(Math.random() * 21)
    //   let url =
    //       process.env.basePath +
    //       'prj_product_list' +
    //       '&index' +
    //       `'${randomString}'`
    //   let param = {
    //     bp_agent_id: vm.bp_agent_id,
    //     division: vm.saveInfo.division,
    //     user_phone: window.localStorage.getItem('user_phone'),
    //     pagesize: 10,
    //     pagenum: vm.pagenumSearch,
    //     searchInput: vm.keyWordProduct,
    //   }
    //   hlsPopup.showLoading('请稍候')
    //   vm.$post(url, param).then(function (res) {
    //     vm.hlsPopup.hideLoading()
    //     if (res.result === 'S') {
    //       let returnData = []
    //       returnData = res.lists
    //       if (returnData.length === 0) {
    //         vm.divisionLists = returnData
    //       } else if (returnData.length > 0 && returnData.length < 10) {
    //         vm.divisionLists = returnData
    //         vm.$refs.scroll.update(true)
    //       } else if (returnData.length === 10) {
    //         vum.forEach(returnData, function (data, index, array) {
    //           vm.divisionLists.push(array[index])
    //         })
    //         vm.pagenumSearch++
    //         vm.$refs.scroll.update(false)
    //       }
    //       vm.divisionLists.forEach(item => {
    //         item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
    //       })
    //     } else {
    //       hlsPopup.showLongCenter(res.message)
    //     }
    //   })
    // },
    // getProduct () {
    //   let vm = this
    //   vm.divisionLists = []
    //   vm.pagenum = 1
    //   vm.showModalValue = true
    //   let randomString = Math.floor(Math.random() * 21)
    //   let url =
    //       process.env.basePath +
    //       'prj_product_list' +
    //       '&index' +
    //       `'${randomString}'`
    //   let param = {
    //     bp_agent_id: vm.bp_agent_id,
    //     division: vm.saveInfo.division,
    //     user_phone: window.localStorage.getItem('user_phone'),
    //     pagesize: 10,
    //     pagenum: vm.pagenum,
    //     searchInput: vm.keyWordProduct,
    //   }
    //   hlsPopup.showLoading('请稍候')
    //   vm.$post(url, param).then(function (res) {
    //     vm.hlsPopup.hideLoading()
    //     if (res.result === 'S') {
    //       let returnData = []
    //       returnData = res.lists
    //       if (returnData.length === 0) {
    //         vm.$refs.scroll.update(true)
    //       } else if (returnData.length > 0 && returnData.length < 10) {
    //         vum.forEach(returnData, function (data, index, array) {
    //           vm.divisionLists.push(array[index])
    //         })
    //         vm.pagenum++
    //         vm.$refs.scroll.update(true)
    //       } else if (returnData.length === 10) {
    //         vum.forEach(returnData, function (data, index, array) {
    //           vm.divisionLists.push(array[index])
    //         })
    //         vm.pagenum++
    //         vm.$refs.scroll.update(false)
    //       }
    //       vm.divisionLists.forEach(item => {
    //         item['url'] = process.env.filePath + 'attachment_id=' + item.product_attachment_id + '&access_token=' + window.localStorage.access_token
    //       })
    //     } else {
    //       hlsPopup.showLongCenter(res.message)
    //     }
    //   })
    // },
1869
    selectProductLine(e) {
linxin's avatar
linxin committed
1870
      let vm = this
李晓兵's avatar
李晓兵 committed
1871 1872
      vm.saveInfo.product_id = ''
      vm.saveInfo.product_id_n = ''
linxin's avatar
linxin committed
1873 1874 1875 1876 1877 1878 1879
      vm.hlsPopup.selectList({
        list: vm.productLine,
        code: 'bp_type',
        object: {},
        returnItem: function (index, obj) {
          vm.saveInfo.division = obj.bp_type
          vm.saveInfo.division_n = obj.bp_type_n
邹骏's avatar
邹骏 committed
1880
          vm.factory_ocr_type = obj.factory_ocr_type
linxin's avatar
linxin committed
1881 1882 1883
        },
      })
    },
1884
    selectDepositDeductionLine(e) {
1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895
      let vm = this
      vm.hlsPopup.selectList({
        list: vm.depositDeductionLine,
        code: 'deposit_deduction',
        object: {},
        returnItem: function (index, obj) {
          vm.saveInfo.deposit_deduction = obj.deposit_deduction
          vm.saveInfo.deposit_deduction_n = obj.deposit_deduction_n
        },
      })
    },
1896
    getDepositDeduction() {
1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912
      let vm = this
      let url = process.env.basePath + 'prj_deposit_deduction'
      let param = {}
      vm.hlsPopup.showLoading('请稍候')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.depositDeductionLine = res.lists.map(item => {
            return {
              code: item.deposit_deduction,
              code_name: item.deposit_deduction_n,
            }
          })
        }
      })
    },
1913
    selectHandlingPolicyLine(e) {
1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924
      let vm = this
      vm.hlsPopup.selectList({
        list: vm.handlingPolicyLine,
        code: 'handling_policy',
        object: {},
        returnItem: function (index, obj) {
          vm.saveInfo.handling_policy = obj.handling_policy
          vm.saveInfo.handling_policy_n = obj.handling_policy_n
        },
      })
    },
1925
    getHandlingPolicy() {
1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941
      let vm = this
      let url = process.env.basePath + 'prj_handling_policy'
      let param = {}
      vm.hlsPopup.showLoading('请稍候')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.handlingPolicyLine = res.lists.map(item => {
            return {
              code: item.handling_policy,
              code_name: item.handling_policy_n,
            }
          })
        }
      })
    },
1942
    getProductLine() {
linxin's avatar
linxin committed
1943 1944 1945
      let vm = this
      let url = process.env.basePath + 'prj_product_division'
      let param = {
李晓兵's avatar
李晓兵 committed
1946
        bp_agent_id: vm.bp_agent_id,
linxin's avatar
linxin committed
1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960
      }
      vm.hlsPopup.showLoading('请稍候')
      vm.hlsHttp.post(url, param).then(function (res) {
        vm.hlsPopup.hideLoading()
        if (res.result === 'S') {
          vm.productLine = res.lists.map(item => {
            return {
              code: item.division,
              code_name: item.division_n,
            }
          })
        }
      })
    },
1961
    goPlan() {
linxin's avatar
linxin committed
1962 1963 1964
      this.$router.push({
        name: 'ContractRepayPlan',
        params: {
李晓兵's avatar
李晓兵 committed
1965
          product_num: this.saveInfo.product_num,
linxin's avatar
linxin committed
1966
          project_id: window.localStorage.project_id,
linxin's avatar
linxin committed
1967 1968 1969
        },
      })
    },
1970
    goRent() {
786817560's avatar
786817560 committed
1971 1972 1973 1974
      this.$router.push({
        name: 'CreateEnclosureInfo',
      })
    },
1975 1976 1977 1978 1979
    dateFormat (timestamp) {
      if (!timestamp) return '';
      var newDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(timestamp);
      return newDate[0];
    }
李晓兵's avatar
李晓兵 committed
1980 1981
  }
  ,
1982 1983
}
</script>
linxin's avatar
linxin committed
1984
<style lang="less">
1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007
.feibox {
  color: #333;
}

.feibox>p {
  color: #b3aeae;
  border-bottom: 1px solid #ccc;
  width: 85%;
  margin: 0 auto 10px;
  padding: 10px 0;
  font-size: 15px;
}

.feibox>div {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin: 15px 13px;
}

.gray {
  color: #b3aeae;
}
2008

2009 2010 2011
#create-rent-info {
  .swipeout-list .option-item .delete {
    background-color: rgba(249, 98, 104, 0.5);
Jennie Shi's avatar
Jennie Shi committed
2012 2013 2014 2015 2016 2017
    background-image: url("../../assets/contractCreate/delete.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 30px 30px;
    height: 61px !important;
  }
2018

Jennie Shi's avatar
Jennie Shi committed
2019
  .swipeout-list .item .function {
2020
    background: url("../../assets/contractCreate/delete.png") 45% 45% #fde5e8 no-repeat;
Jennie Shi's avatar
Jennie Shi committed
2021 2022
    background-size: 20px 20px;
  }
linxin's avatar
linxin committed
2023

2024 2025 2026 2027 2028 2029
  .check {
    span {
      width: 0.32rem;
      height: 0.32rem;
      border: 0.02rem solid #1d3fff;
      border-radius: 0.06rem;
李晓兵's avatar
李晓兵 committed
2030
    }
linxin's avatar
linxin committed
2031

2032 2033
    img {
      width: 16px;
linxin's avatar
linxin committed
2034
    }
2035
  }
李晓兵's avatar
李晓兵 committed
2036

2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087
  .mySlider {
    height: 68px;
    padding: 0;
  }

  .addRentBtn {
    text-align: center;
    height: 40px;
    line-height: 40px;
    color: #1D3FFF;
  }

  input {
    color: #333;
  }

  input::placeholder {
    color: #666;
  }

  .flow {
    z-index: 999;
  }

  .hls-list-item {
    margin-bottom: 0px !important;
  }

  .h-header-right {
    display: flex;
    align-items: center;
  }

  .modal-show {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 900;
    background-color: rgba(56, 63, 69, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;

    .type-save {
      color: #fff;
      width: 50%;
      height: 40px;
      font-size: 15px;
      margin: 20px 25% 0;
      border-radius: 5px;
      background-color: @headerColor;
李晓兵's avatar
李晓兵 committed
2088 2089
    }

2090 2091 2092 2093 2094 2095 2096
    .down {
      position: relative;
      width: 314px;
      height: 526px;
      background-size: 301px 24.7px;
      background-color: #fff;
      overflow-y: auto;
李晓兵's avatar
李晓兵 committed
2097
    }
2098 2099

    .title {
邹骏's avatar
邹骏 committed
2100
      width: 100%;
2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116
      height: 44px;
      font-family: PingFangSC-Semibold;
      font-size: 16px;
      letter-spacing: 0;
      text-align: center;
      line-height: 44px;
      color: #fff;
      background: #0041c4;

      img {
        width: 16px;
        height: 16px;
        margin-top: 13px;
        margin-right: 20px;
        position: absolute;
        right: 0;
邹骏's avatar
邹骏 committed
2117
      }
2118 2119 2120 2121 2122 2123 2124

      span {
        font-size: 24px;
        float: right;
        margin-right: 10px;
        font-family: YouYuan;
        // margin-left:100px;
邹骏's avatar
邹骏 committed
2125
      }
2126 2127 2128 2129 2130 2131 2132 2133 2134
    }

    .down-content {
      margin-top: 8px;

      span:first-child {
        font-family: PingFangSC-Regular;
        font-size: 13px;
        color: #656464;
邹骏's avatar
邹骏 committed
2135
        letter-spacing: 0;
2136
        margin-left: 15px;
邹骏's avatar
邹骏 committed
2137
      }
2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151

      .photo {
        width: 172px;
        height: 120px;
        border: 1px solid #dcdcdd;
        border-radius: 2px;
        margin: 0 auto;
        margin-top: 12px;
        background: url("../../assets/contractStart/photo.png") 70px no-repeat;
        background-size: 24px 20px;

        img {
          width: 100%;
          height: 100%;
邹骏's avatar
邹骏 committed
2152 2153 2154
        }
      }
    }
2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166
  }

  .equipment {
    width: 359px;
    height: 72px;
    background-color: #fff;
    margin: 0 auto;
    display: flex;

    .deleteBtn {
      color: #1D3FFF;
      flex: 1;
邹骏's avatar
邹骏 committed
2167
      display: flex;
2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183
      align-items: center;
      z-index: 100;
    }

    .left {
      flex: 1;
      box-align: center;
      align-items: center;
      padding: 15px 0;

      span {
        display: block;
        width: 30px;
        height: 30px;
        background-color: #e8e9ed;
        border-radius: 8px;
邹骏's avatar
邹骏 committed
2184 2185
        display: flex;
        align-items: center;
2186 2187 2188 2189
        justify-content: center;
        margin-left: 10px;
        margin-top: 8px;

邹骏's avatar
邹骏 committed
2190
        img {
2191 2192
          width: 11px;
          height: 14px;
邹骏's avatar
邹骏 committed
2193 2194 2195
        }
      }
    }
李晓兵's avatar
李晓兵 committed
2196

2197 2198 2199 2200 2201 2202
    .center {
      flex: 6;
      box-align: center;
      align-items: center;
      padding: 15px 0;
      overflow: hidden;
李晓兵's avatar
李晓兵 committed
2203

2204 2205 2206 2207 2208 2209 2210 2211
      span:first-child {
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #383f45;
        letter-spacing: 0.43px;
        margin-left: 10px;
        margin-top: 12px;
        overflow: hidden;
linxin's avatar
linxin committed
2212 2213
      }

2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226
      .status {
        display: inline-block;
        width: 46px;
        height: 16px;
        text-align: center;
        line-height: 16px;
        font-family: PingFangSC-Medium;
        font-size: 12px;
        color: #ffffff;
        letter-spacing: 0;
        margin-left: 21px;
        margin-top: 12px;
      }
linxin's avatar
linxin committed
2227

2228 2229
      .unMantain {
        background-color: #1d3fff;
linxin's avatar
linxin committed
2230
      }
李晓兵's avatar
李晓兵 committed
2231

2232 2233 2234 2235 2236
      .mantain {
        background-color: #fff;
        border: 1px solid #1d3fff;
        color: #1d3fff;
      }
李晓兵's avatar
李晓兵 committed
2237

2238 2239 2240 2241 2242 2243 2244 2245 2246
      p {
        font-family: PingFangSC-Regular;
        font-size: 13px;
        color: rgba(56, 63, 69, 0.6);
        letter-spacing: 0.4px;
        margin-left: 10px;
        margin-top: 10px;
        white-space: nowrap;
        overflow: hidden;
李晓兵's avatar
李晓兵 committed
2247

2248 2249
        span {
          font-family: Helvetica;
李晓兵's avatar
李晓兵 committed
2250 2251
          font-size: 13px;
          color: rgba(56, 63, 69, 0.6);
2252
          overflow: hidden;
李晓兵's avatar
李晓兵 committed
2253 2254 2255 2256
        }
      }
    }

2257 2258 2259 2260 2261 2262 2263 2264
    .right {
      flex: 1;
      display: flex;
      align-items: center;

      img {
        width: 13px;
        height: 13px;
Jennie Shi's avatar
Jennie Shi committed
2265
      }
linxin's avatar
linxin committed
2266
    }
2267
  }
李晓兵's avatar
李晓兵 committed
2268

2269 2270 2271 2272
  #businuss-list {
    .search {
      background-color: #fff;
      padding: 8px 12px;
linxin's avatar
linxin committed
2273
      width: 100%;
2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309
      height: 1.02rem;
      z-index: 100;
      margin-bottom: 8px;

      input {
        background: url("../../assets/contractStart/search1.png") 320px no-repeat;
        background-size: 16px 16px;
        background-color: rgba(239, 239, 239, 0.55);
        padding-left: 12px;
        height: 36px;
        line-height: 36px;
        border-radius: 4px;
        width: 100%;
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #888c8f;
      }

      input::placeholder {
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #888c8f;
        letter-spacing: 0;
      }

      input:focus {
        background: url("../../assets/contractStart/search2.png") 320px no-repeat;
        background-size: 16px 16px;
        background-color: rgba(239, 239, 239, 0.55);
        border: 2px solid #bcc6ff;
      }
    }

    .descript {
      width: 100%;
      height: 44px;
李晓兵's avatar
李晓兵 committed
2310
      display: flex;
2311 2312
      flex-direction: row;
      background: #fff;
李晓兵's avatar
李晓兵 committed
2313 2314

      img {
2315 2316 2317 2318 2319 2320 2321 2322
        width: 30px;
        height: 30px;
        margin-left: 10px;
        margin-top: 8px;
        // margin-right: 8px;
      }

      .linkPic {
李晓兵's avatar
李晓兵 committed
2323 2324
        width: 16px;
        height: 16px;
2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341
        margin-top: 15px;
        margin-left: -7px;
        margin-right: 10px;
      }

      .produc {
        height: 44px;
        display: flex;
        flex: 1;
        font-size: 15px;
        color: #4b4a4b;
        line-height: 44px;
        font-weight: 500;
        letter-spacing: 0;
        margin-left: 10px;
        font-family: PingFangSC-Semibold;
        border-bottom: 1px solid #f3f3f7;
linxin's avatar
linxin committed
2342
      }
李晓兵's avatar
李晓兵 committed
2343
    }
linxin's avatar
linxin committed
2344

2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355
    .tario {
      width: 100%;
      height: 60px;
      position: relative;
      background: #fff;

      // margin-bottom: 8px;
      .wrap:nth-of-type(1) {
        height: 60px;
        position: absolute;
        left: 50px;
linxin's avatar
linxin committed
2356
      }
linxin's avatar
linxin committed
2357

2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374
      .wrap:nth-of-type(2) {
        height: 60px;
        position: absolute;
        right: 30px;
      }

      p {
        height: 30px;
        line-height: 30px;
        font-family: PingFangSC-Regular;
        font-size: 13px;
        color: rgba(56, 63, 69, 0.6);

        span:nth-of-type(2) {
          margin-left: 16px;
          color: rgb(56, 63, 69);
        }
linxin's avatar
linxin committed
2375
      }
linxin's avatar
linxin committed
2376
    }
2377
  }
李晓兵's avatar
李晓兵 committed
2378

2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402
  .date-check {
    // background: url("../../assets/trial/date.png") 350px no-repeat;
    // background-size: 16px 16px;
    // input{
    //   margin-right:16px;
    // }
  }

  .hint-info {
    width: 100%;
    height: 36px;
    font-family: PingFangSC-Regular;
    font-size: 14px;
    color: #fcc800;
    letter-spacing: 0.5px;
    background-color: #faf5e0;
    display: flex;
    align-items: center;

    img {
      width: 16px;
      height: 16px;
      margin-left: 17px;
      margin-right: 17px;
linxin's avatar
linxin committed
2403
    }
2404
  }
李晓兵's avatar
李晓兵 committed
2405

2406 2407 2408 2409 2410
  .add-box {
    .before {
      border: 1px solid #fdb62f;
      border-radius: 4px;
      color: #fdb62f;
linxin's avatar
linxin committed
2411
    }
李晓兵's avatar
李晓兵 committed
2412

2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433
    .next {
      background: #1d3fff;
      border-radius: 4px;
      color: #fff;
    }
  }

  .userInfo:first-of-type {
    margin-top: 10px;
  }

  .userInfo {
    height: 40px;
    line-height: 40px;
    color: @headerColor;
    // margin-top: -10px;
    font-size: 15px;
    margin-left: 16px;
    position: relative;

    img:nth-of-type(1) {
2434
      float: right;
2435 2436 2437
      position: relative;
      top: 10px;
      width: 19px;
胡's avatar
committed
2438 2439
      margin-right: 10px;
    }
2440
  }
胡's avatar
committed
2441

2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478
  .userInfo>.fei-button {
    float: right;
    margin-right: 10px;
    margin-top: 7.5px;
    background-color: #1D3FFF;
    color: #fff;
    height: 25px;
    line-height: 25px;
    padding: 0 8px;
    border-radius: 15px;
    font-size: 13px;
  }

  .userInfo::before {
    content: "";
    display: block;
    width: 4px;
    height: 20px;
    background-color: @headerColor;
    position: absolute;
    left: -15px;
    top: 12px;
  }

  .top {
    width: 100%;
    height: 81px;
    background-color: #faf5e0;
    display: flex;
    justify-content: center;
    align-items: center;

    .line {
      display: inline-block;
      width: 78px;
      border-top: 1px solid #a4a4a4;
      margin-bottom: 18px;
linxin's avatar
linxin committed
2479
    }
李晓兵's avatar
李晓兵 committed
2480

2481 2482 2483 2484 2485
    .line:nth-of-type(1) {
      border-top: 1px solid #ffa000;
    }

    .item {
linxin's avatar
linxin committed
2486 2487 2488
      display: flex;
      justify-content: center;
      align-items: center;
2489 2490 2491 2492 2493
      flex-flow: column wrap;
      font-family: PingFangSC-Semibold;
      font-size: 12px;
      color: rgba(56, 63, 69, 0.5);
      letter-spacing: 0.43px;
李晓兵's avatar
李晓兵 committed
2494

2495 2496
      img {
        width: 18px;
linxin's avatar
linxin committed
2497
      }
李晓兵's avatar
李晓兵 committed
2498

2499 2500 2501 2502 2503 2504 2505 2506 2507
      span {
        display: block;
        text-align: center;
        line-height: 18px;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        color: #fff;
        background: #a4a4a4;
linxin's avatar
linxin committed
2508
      }
李晓兵's avatar
李晓兵 committed
2509

2510 2511 2512 2513
      p {
        margin-top: 10px;
        width: 9vw;
        text-align: center;
linxin's avatar
linxin committed
2514
      }
2515
    }
李晓兵's avatar
李晓兵 committed
2516

2517 2518 2519 2520 2521
    .item:nth-of-type(2) {
      font-family: PingFangSC-Semibold;
      font-size: 12px;
      color: rgba(56, 63, 69, 0.5);
      letter-spacing: 0.43px;
李晓兵's avatar
李晓兵 committed
2522

2523 2524
      span {
        background-color: #ffa000;
linxin's avatar
linxin committed
2525 2526 2527
      }
    }
  }
2528
}
2529
</style>