counter.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. <template>
  2. <view class="counter">
  3. <view class="dataCenter-header u-flex u-row-between">
  4. <view class="header-item u-flex-col u-col-center" v-for="(item,index) in tabs" :key="index" @click="change(index)">
  5. <text :class="current == index ? 'active1' : 'active'">{{item}}</text>
  6. <image :style="{opacity:current == index ? 1 : 0}" src="../../static/images/dataCenter1-1.png" mode=""></image>
  7. </view>
  8. </view>
  9. <view class="" v-if="current == 0">
  10. <view class="jisuan-row u-flex">
  11. <view class="u-flex row-left">
  12. <text class="text">还款方式:</text>
  13. <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon>
  14. </view>
  15. <u-radio-group v-model="denge" class="u-flex-1" size="24">
  16. <view class="row-right u-flex u-row-between">
  17. <u-radio :name="1" label-size="24">等额本息</u-radio>
  18. <u-radio :name="2" label-size="24">等额本金</u-radio>
  19. </view>
  20. </u-radio-group>
  21. </view>
  22. <view class="jisuan-row u-flex">
  23. <view class="u-flex row-left">
  24. <text class="text">计算方式:</text>
  25. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  26. </view>
  27. <u-radio-group v-model="jisuan" class="u-flex-1" size="24">
  28. <view class="row-right u-flex u-row-between">
  29. <u-radio :name="1" label-size="24">贷款总额</u-radio>
  30. <u-radio :name="2" label-size="24">单价面积</u-radio>
  31. </view>
  32. </u-radio-group>
  33. </view>
  34. <view class="jisuan-row u-flex">
  35. <view class="u-flex row-left">
  36. <text class="text">贷款总额:</text>
  37. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  38. </view>
  39. <view class="row-right u-flex u-row-between u-flex-1" v-if="jisuan == 1">
  40. <input type="digit" placeholder="请输入" class="input" v-model="shangyeprice">
  41. <text class="text">万元</text>
  42. </view>
  43. <view class="row-right u-flex u-row-between u-flex-1" v-if="jisuan == 2">
  44. <input type="digit" placeholder="请输入" class="input" v-model="shangyeprice">
  45. <text class="text" style="margin-right: 10rpx;">元/㎡</text>
  46. x
  47. <input type="digit" placeholder="请输入" class="input" v-model="shangyemianji">
  48. <text class="text">㎡</text>
  49. </view>
  50. </view>
  51. <view class="jisuan-row u-flex" v-if="jisuan == 2" @click="shoufushow = true">
  52. <view class="u-flex row-left">
  53. <text class="text">首付成数:</text>
  54. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  55. </view>
  56. <view class="row-right u-flex u-row-between u-flex-1">
  57. <input type="text" placeholder="请选择" class="input" v-model="shoufuname" :disabled="true">
  58. <u-icon name="arrow-right" color="#ccc" size="24"></u-icon>
  59. </view>
  60. </view>
  61. <view class="jisuan-row u-flex">
  62. <view class="u-flex row-left">
  63. <text class="text">贷款利率:</text>
  64. <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon>
  65. </view>
  66. <view class="row-right u-flex u-row-between u-flex-1">
  67. <input type="digit" placeholder="请输入" class="input" v-model="shangyelilv">
  68. <text class="text">%</text>
  69. </view>
  70. </view>
  71. <view class="jisuan-row u-flex" @click="qixianshow = true">
  72. <view class="u-flex row-left">
  73. <text class="text">贷款期限:</text>
  74. <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon>
  75. </view>
  76. <view class="row-right u-flex u-row-between u-flex-1">
  77. <input type="text" placeholder="请选择" class="input" v-model="qixianname" :disabled="true">
  78. <u-icon name="arrow-right" color="#ccc" size="24"></u-icon>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="" v-if="current == 1">
  83. <view class="jisuan-row u-flex">
  84. <view class="u-flex row-left">
  85. <text class="text">还款方式:</text>
  86. <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon>
  87. </view>
  88. <u-radio-group v-model="denge" class="u-flex-1" size="24">
  89. <view class="row-right u-flex u-row-between">
  90. <u-radio :name="1" label-size="24">等额本息</u-radio>
  91. <u-radio :name="2" label-size="24">等额本金</u-radio>
  92. </view>
  93. </u-radio-group>
  94. </view>
  95. <view class="jisuan-row u-flex">
  96. <view class="u-flex row-left">
  97. <text class="text">计算方式:</text>
  98. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  99. </view>
  100. <u-radio-group v-model="jisuan" class="u-flex-1" size="24">
  101. <view class="row-right u-flex u-row-between">
  102. <u-radio :name="1" label-size="24">贷款总额</u-radio>
  103. <u-radio :name="2" label-size="24">单价面积</u-radio>
  104. </view>
  105. </u-radio-group>
  106. </view>
  107. <view class="jisuan-row u-flex">
  108. <view class="u-flex row-left">
  109. <text class="text">贷款总额:</text>
  110. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  111. </view>
  112. <view class="row-right u-flex u-row-between u-flex-1" v-if="jisuan == 1">
  113. <input type="digit" placeholder="请输入" class="input" v-model="gongjijinprice">
  114. <text class="text">万元</text>
  115. </view>
  116. <view class="row-right u-flex u-row-between u-flex-1" v-if="jisuan == 2">
  117. <input type="digit" placeholder="请输入" class="input" v-model="gongjijinprice">
  118. <text class="text" style="margin-right: 10rpx;">元/㎡</text>
  119. x
  120. <input type="digit" placeholder="请输入" class="input" v-model="gongjijinmianji">
  121. <text class="text">㎡</text>
  122. </view>
  123. </view>
  124. <view class="jisuan-row u-flex" v-if="jisuan == 2" @click="shoufushow = true">
  125. <view class="u-flex row-left">
  126. <text class="text">首付成数:</text>
  127. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  128. </view>
  129. <view class="row-right u-flex u-row-between u-flex-1">
  130. <input type="text" placeholder="请选择" class="input" v-model="shoufuname" :disabled="true">
  131. <u-icon name="arrow-right" color="#ccc" size="24"></u-icon>
  132. </view>
  133. </view>
  134. <view class="jisuan-row u-flex">
  135. <view class="u-flex row-left">
  136. <text class="text">贷款利率:</text>
  137. <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon>
  138. </view>
  139. <view class="row-right u-flex u-row-between u-flex-1">
  140. <input type="digit" placeholder="请输入" class="input" v-model="gongjijinlilv">
  141. <text class="text">%</text>
  142. </view>
  143. </view>
  144. <view class="jisuan-row u-flex" @click="qixianshow = true">
  145. <view class="u-flex row-left">
  146. <text class="text">贷款期限:</text>
  147. <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon>
  148. </view>
  149. <view class="row-right u-flex u-row-between u-flex-1">
  150. <input type="text" placeholder="请选择" class="input" v-model="qixianname" :disabled="true">
  151. <u-icon name="arrow-right" color="#ccc" size="24"></u-icon>
  152. </view>
  153. </view>
  154. </view>
  155. <view class="" v-if="current == 2">
  156. <view class="jisuan-row u-flex">
  157. <view class="u-flex row-left">
  158. <text class="text">还款方式:</text>
  159. <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon>
  160. </view>
  161. <u-radio-group v-model="denge" class="u-flex-1" size="24">
  162. <view class="row-right u-flex u-row-between">
  163. <u-radio :name="1" label-size="24">等额本息</u-radio>
  164. <u-radio :name="2" label-size="24">等额本金</u-radio>
  165. </view>
  166. </u-radio-group>
  167. </view>
  168. <view class="jisuan-row u-flex">
  169. <view class="u-flex row-left">
  170. <text class="text">计算方式:</text>
  171. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  172. </view>
  173. <u-radio-group v-model="jisuan" class="u-flex-1" size="24" @change="changejisuan">
  174. <view class="row-right u-flex u-row-between">
  175. <u-radio :name="1" label-size="24">房屋总价</u-radio>
  176. <u-radio :name="2" label-size="24">单价面积</u-radio>
  177. </view>
  178. </u-radio-group>
  179. </view>
  180. <view class="jisuan-row u-flex">
  181. <view class="u-flex row-left">
  182. <text class="text">房屋总价:</text>
  183. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  184. </view>
  185. <view class="row-right u-flex u-row-between u-flex-1" v-if="jisuan == 1">
  186. <input type="digit" placeholder="请输入" class="input" v-model="zuheprice" @input="changezuhe">
  187. <text class="text">万元</text>
  188. </view>
  189. <view class="row-right u-flex u-row-between u-flex-1" v-if="jisuan == 2">
  190. <input type="digit" placeholder="请输入" class="input" v-model="zuheprice" @input="changezuhe">
  191. <text class="text" style="margin-right: 10rpx;">元/㎡</text>
  192. x
  193. <input type="digit" placeholder="请输入" class="input" v-model="zuhemianji" @input="changezuhe">
  194. <text class="text">㎡</text>
  195. </view>
  196. </view>
  197. <view class="jisuan-row u-flex">
  198. <view class="u-flex row-left">
  199. <text class="text">首付成数:</text>
  200. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  201. </view>
  202. <u-radio-group v-model="shoufu" class="u-flex-1" size="24" @change="changechengshu">
  203. <view class="row-right u-flex u-row-between">
  204. <u-radio :name="1" label-size="24">首套</u-radio>
  205. <u-radio :name="2" label-size="24">二套</u-radio>
  206. <view class="row-right u-flex u-row-between" style="width: 30%;" @click="shoufushow = true">
  207. <input type="text" placeholder="请选择" class="input" v-model="shoufuname" :disabled="true">
  208. <u-icon name="arrow-right" color="#ccc" size="24"></u-icon>
  209. </view>
  210. </view>
  211. </u-radio-group>
  212. </view>
  213. <view class="jisuan-row u-flex" @click="qixianshow = true">
  214. <view class="u-flex row-left">
  215. <text class="text">贷款期限:</text>
  216. <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon>
  217. </view>
  218. <view class="row-right u-flex u-row-between u-flex-1">
  219. <input type="text" placeholder="请选择" class="input" v-model="qixianname" :disabled="true">
  220. <u-icon name="arrow-right" color="#ccc" size="24"></u-icon>
  221. </view>
  222. </view>
  223. <u-gap height="20" bg-color="#F6F6F6"></u-gap>
  224. <view class="tabs-title">
  225. 公积金贷款信息
  226. </view>
  227. <view class="jisuan-row u-flex">
  228. <view class="u-flex row-left">
  229. <text class="text">贷款总额:</text>
  230. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  231. </view>
  232. <view class="row-right u-flex u-row-between u-flex-1">
  233. <input type="number" placeholder="请输入" class="input" v-model="gongjijinprice" @input="changezuhe2">
  234. <text class="text">万元</text>
  235. </view>
  236. </view>
  237. <view class="jisuan-row u-flex">
  238. <view class="u-flex row-left">
  239. <text class="text">贷款利率:</text>
  240. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  241. </view>
  242. <view class="row-right u-flex u-row-between u-flex-1">
  243. <input type="number" placeholder="请输入" class="input" v-model="gongjijinlilv">
  244. <text class="text">%</text>
  245. </view>
  246. </view>
  247. <u-gap height="20" bg-color="#F6F6F6"></u-gap>
  248. <view class="tabs-title">
  249. 商业贷款信息
  250. </view>
  251. <view class="jisuan-row u-flex">
  252. <view class="u-flex row-left">
  253. <text class="text">贷款总额:</text>
  254. <!-- <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon> -->
  255. </view>
  256. <view class="row-right u-flex u-row-between u-flex-1">
  257. <input type="number" placeholder="请输入" class="input" v-model="shangyeprice" @input="changezuhe1">
  258. <text class="text">万元</text>
  259. </view>
  260. </view>
  261. <view class="jisuan-row u-flex">
  262. <view class="u-flex row-left">
  263. <text class="text">贷款利率:</text>
  264. <u-icon name="question-circle-fill" color="#CCCCCC"></u-icon>
  265. </view>
  266. <view class="row-right u-flex u-row-between u-flex-1">
  267. <input type="number" placeholder="请输入" class="input" v-model="shangyelilv">
  268. <text class="text">%</text>
  269. </view>
  270. </view>
  271. </view>
  272. <view class="down-btn u-flex u-row-between">
  273. <text @click="chongzhi">重置</text>
  274. <text @click="toinfo">计算</text>
  275. </view>
  276. <u-select v-model="qixianshow" :list="qixianlist" label-name="name" value-name="value" @confirm="changeqixian"></u-select>
  277. <u-select v-model="shoufushow" :list="shoufulist" label-name="name" value-name="value" @confirm="changeshoufu"></u-select>
  278. </view>
  279. </template>
  280. <script>
  281. export default {
  282. data() {
  283. return {
  284. tabs: ['商业贷款', '公积金贷款', '组合贷款'],
  285. current: 0,
  286. denge: 1,
  287. jisuan: 1,
  288. shoufu: 1,
  289. shangyeprice: '',
  290. shangyemianji: '',
  291. shangyelilv: '',
  292. gongjijinprice: '',
  293. gongjijinmianji: '',
  294. gongjijinlilv: '',
  295. zuheprice: '',
  296. zuhemianji: '',
  297. qixianname: '30年(360期)',
  298. qixianvalue: '360',
  299. qixianlist: [],
  300. qixianshow: false,
  301. shoufuname: '',
  302. shoufuvalue: '',
  303. shoufulist: [],
  304. shoufushow: false,
  305. config: {}
  306. }
  307. },
  308. onLoad() {
  309. this.getdata()
  310. },
  311. computed: {
  312. },
  313. methods: {
  314. chongzhi() {
  315. this.shangyeprice = ''
  316. this.shangyemianji = ''
  317. this.shangyelilv = this.config.business_interest_rate
  318. this.gongjijinprice = ''
  319. this.gongjijinmianji = ''
  320. this.gongjijinlilv = this.config.accumulation_interest_rate
  321. this.zuheprice = ''
  322. this.zuhemianji = ''
  323. this.qixianname = '30年(360期)'
  324. this.qixianvalue = 360
  325. this.shoufuname = `${this.config.first_home_divide}成`
  326. this.shoufuvalue = this.config.first_home_divide
  327. this.denge = 1
  328. this.jisuan = 1
  329. this.shoufu = 1
  330. },
  331. changejisuan() {
  332. this.changezuhe()
  333. },
  334. changechengshu(e) {
  335. if (e == 1) {
  336. this.shoufuname = `${this.config.first_home_divide}成`
  337. this.shoufuvalue = this.config.first_home_divide
  338. } else {
  339. this.shoufuname = `${this.config.second_home_divide}成`
  340. this.shoufuvalue = this.config.second_home_divide
  341. }
  342. this.changezuhe()
  343. },
  344. changezuhe() {
  345. if (this.zuheprice > 0) {
  346. if (this.jisuan == 1) {
  347. this.shangyeprice = (this.zuheprice * (1 - this.shoufuvalue / 10)).toFixed(2)
  348. } else {
  349. this.shangyeprice = ((this.zuheprice * this.zuhemianji) / 10000 * (1 - this.shoufuvalue / 10)).toFixed(2)
  350. }
  351. this.gongjijinprice = ''
  352. } else {
  353. this.gongjijinprice = ''
  354. this.shangyeprice = ''
  355. }
  356. },
  357. changezuhe1(e) {
  358. if (this.zuheprice > 0) {
  359. if (this.jisuan == 1) {
  360. var zuheprice = (this.zuheprice * (1 - this.shoufuvalue / 10)).toFixed(2)
  361. } else {
  362. var zuheprice = ((this.zuheprice * this.zuhemianji) / 10000 * (1 - this.shoufuvalue / 10)).toFixed(2)
  363. }
  364. if (this.shangyeprice > zuheprice) {
  365. this.$u.toast(`商业贷款必须小于${zuheprice}万元`)
  366. this.gongjijinprice = ''
  367. return
  368. }
  369. this.gongjijinprice = (zuheprice - this.shangyeprice).toFixed(2)
  370. }
  371. },
  372. changezuhe2(e) {
  373. if (this.zuheprice > 0) {
  374. if (this.jisuan == 1) {
  375. var zuheprice = (this.zuheprice * (1 - this.shoufuvalue / 10)).toFixed(2)
  376. } else {
  377. var zuheprice = ((this.zuheprice * this.zuhemianji) / 10000 * (1 - this.shoufuvalue / 10)).toFixed(2)
  378. }
  379. if (this.gongjijinprice > zuheprice) {
  380. this.$u.toast(`公积金贷款必须小于${zuheprice}万元`)
  381. this.shangyeprice = ''
  382. return
  383. }
  384. this.shangyeprice = (zuheprice - this.gongjijinprice).toFixed(2)
  385. }
  386. },
  387. changeshoufu(e) {
  388. this.shoufuname = e[0].label
  389. this.shoufuvalue = e[0].value
  390. if (this.current == 2) {
  391. this.changezuhe()
  392. }
  393. },
  394. changeqixian(e) {
  395. this.qixianname = e[0].label
  396. this.qixianvalue = e[0].value
  397. },
  398. getdata() {
  399. this.$u.post('/api/Calculator/divide_list').then(res => {
  400. res.data.forEach(val => {
  401. this.shoufulist.push({
  402. name: `${val.name}成`,
  403. value: val.name
  404. })
  405. })
  406. })
  407. for (let i = 1; i <= 30; i++) {
  408. this.qixianlist.push({
  409. name: `${i}年(${i * 12}期)`,
  410. value: i * 12
  411. })
  412. }
  413. this.$u.post('/api/Index/platform_config').then(res => {
  414. if (res.code == 1) {
  415. this.config = res.data
  416. this.shangyelilv = this.config.business_interest_rate
  417. this.gongjijinlilv = this.config.accumulation_interest_rate
  418. this.shoufuname = `${this.config.first_home_divide}成`
  419. this.shoufuvalue = this.config.first_home_divide
  420. }
  421. })
  422. },
  423. change(index) {
  424. this.current = index
  425. this.shangyelilv = this.config.business_interest_rate
  426. this.gongjijinlilv = this.config.accumulation_interest_rate
  427. this.shoufu = 1
  428. this.shoufuname = `${this.config.first_home_divide}成`
  429. this.shoufuvalue = this.config.first_home_divide
  430. },
  431. toinfo() {
  432. if (this.current == 0) {
  433. if (this.jisuan == 1) {
  434. if (!this.shangyeprice) {
  435. this.$u.toast("请输入贷款总额")
  436. return
  437. }
  438. }
  439. if (this.jisuan == 2) {
  440. if (!this.shangyeprice || !this.shangyemianji) {
  441. this.$u.toast("请输入单价面积")
  442. return
  443. }
  444. if (!this.shoufuname) {
  445. this.$u.toast("请选择首付成数")
  446. return
  447. }
  448. }
  449. if (!this.shangyelilv) {
  450. this.$u.toast("请输入贷款利率")
  451. return
  452. }
  453. var params = {
  454. repay_type: this.denge,
  455. calculate_amount: this.jisuan == 1 ? (this.shangyeprice * 10000) : (this.shangyeprice * this.shangyemianji * (1 - this.shoufuvalue / 10)),
  456. interest_rate: this.shangyelilv,
  457. time_limit: this.qixianvalue
  458. }
  459. this.$u.post('/api/Calculator/not_group_loans', params).then(res => {
  460. if (res.code == 1) {
  461. uni.navigateTo({
  462. url: "./counter-info?params=" + encodeURIComponent(JSON.stringify(params)) + "&type=1"
  463. })
  464. } else {
  465. this.$u.toast(res.msg)
  466. }
  467. })
  468. }
  469. if (this.current == 1) {
  470. if (this.jisuan == 1) {
  471. if (!this.gongjijinprice) {
  472. this.$u.toast("请输入贷款总额")
  473. return
  474. }
  475. }
  476. if (this.jisuan == 2) {
  477. if (!this.gongjijinprice || !this.gongjijinmianji) {
  478. this.$u.toast("请输入单价面积")
  479. return
  480. }
  481. if (!this.shoufuname) {
  482. this.$u.toast("请选择首付成数")
  483. return
  484. }
  485. }
  486. if (!this.gongjijinlilv) {
  487. this.$u.toast("请输入贷款利率")
  488. return
  489. }
  490. var params = {
  491. repay_type: this.denge,
  492. calculate_amount: this.jisuan == 1 ? (this.gongjijinprice * 10000) : (this.gongjijinprice * this.gongjijinmianji * (1 - this.shoufuvalue / 10)),
  493. interest_rate: this.gongjijinlilv,
  494. time_limit: this.qixianvalue
  495. }
  496. this.$u.post('/api/Calculator/not_group_loans', params).then(res => {
  497. if (res.code == 1) {
  498. uni.navigateTo({
  499. url: "./counter-info?params=" + encodeURIComponent(JSON.stringify(params)) + "&type=2"
  500. })
  501. } else {
  502. this.$u.toast(res.msg)
  503. }
  504. })
  505. }
  506. if (this.current == 2) {
  507. if (this.jisuan == 1) {
  508. if (!this.zuheprice) {
  509. this.$u.toast("请输入房屋总价")
  510. return
  511. }
  512. }
  513. if (this.jisuan == 2) {
  514. if (!this.zuheprice || !this.zuhemianji) {
  515. this.$u.toast("请输入单价面积")
  516. return
  517. }
  518. if (!this.shoufuname) {
  519. this.$u.toast("请选择首付成数")
  520. return
  521. }
  522. }
  523. if (!this.shangyelilv) {
  524. this.$u.toast("请输入商业贷款利率")
  525. return
  526. }
  527. if (!this.gongjijinlilv) {
  528. this.$u.toast("请输入公积金贷款利率")
  529. return
  530. }
  531. var all = Number(this.gongjijinprice) + Number(this.shangyeprice)
  532. if (this.jisuan == 1) {
  533. var zuheprice = (this.zuheprice * (1 - this.shoufuvalue / 10)).toFixed(2)
  534. } else {
  535. var zuheprice = ((this.zuheprice * this.zuhemianji) / 10000 * (1 - this.shoufuvalue / 10)).toFixed(2)
  536. }
  537. if (all > zuheprice) {
  538. this.$u.toast(`贷款金额不得大于${zuheprice}万元`)
  539. return
  540. }
  541. var params = {
  542. repay_type: this.denge,
  543. business_calculate_amount: this.jisuan == 1 ? (this.shangyeprice * 10000) : (this.shangyeprice * this.shangyemianji * (1 - this.shoufuvalue / 10)),
  544. business_interest_rate: this.shangyelilv,
  545. accumulation_calculate_amount: this.jisuan == 1 ? (this.gongjijinprice * 10000) : (this.gongjijinprice * this.gongjijinmianji * (1 - this.shoufuvalue / 10)),
  546. accumulation_interest_rate: this.gongjijinlilv,
  547. time_limit: this.qixianvalue
  548. }
  549. uni.showLoading({
  550. mask: true,
  551. title: "请稍后"
  552. })
  553. this.$u.post('/api/Calculator/group_loans', params).then(res => {
  554. if (res.code == 1) {
  555. uni.navigateTo({
  556. url: "./counter-info?params=" + encodeURIComponent(JSON.stringify(params)) + "&type=3"
  557. })
  558. } else {
  559. this.$u.toast(res.msg)
  560. }
  561. })
  562. }
  563. }
  564. }
  565. }
  566. </script>
  567. <style lang="scss">
  568. page {
  569. background-color: #F6F6F6;
  570. }
  571. .counter {
  572. .tabs-title {
  573. padding: 24rpx 240rpx 0 24rpx;
  574. font-size: 24rpx;
  575. font-family: PingFangSC-Medium, PingFang SC;
  576. font-weight: 500;
  577. color: #333333;
  578. background-color: #fff;
  579. }
  580. .jisuan-row {
  581. height: 82rpx;
  582. border-bottom: 2rpx solid #F6F6F6;
  583. padding: 0 24rpx;
  584. background-color: #fff;
  585. .row-left {
  586. width: 294rpx;
  587. font-size: 24rpx;
  588. font-weight: 400;
  589. color: #999999;
  590. }
  591. .row-right {
  592. .input {
  593. font-size: 24rpx;
  594. flex: 1;
  595. margin-right: 10rpx;
  596. }
  597. .text {
  598. font-size: 24rpx;
  599. font-family: PingFangSC-Regular, PingFang SC;
  600. font-weight: 400;
  601. color: #CCCCCC;
  602. }
  603. }
  604. }
  605. .down-btn {
  606. position: fixed;
  607. z-index: 10;
  608. width: 750rpx;
  609. height: 166rpx;
  610. background: #FFFFFF;
  611. bottom: 0;
  612. left: 0;
  613. padding: 0 24rpx 54rpx 24rpx;
  614. text:first-child {
  615. width: 338rpx;
  616. line-height: 84rpx;
  617. background: #FFA120;
  618. border-radius: 20rpx;
  619. text-align: center;
  620. font-size: 28rpx;
  621. font-family: PingFangSC-Regular, PingFang SC;
  622. font-weight: 400;
  623. color: #FFFFFF;
  624. }
  625. text:last-child {
  626. width: 338rpx;
  627. line-height: 84rpx;
  628. background: #1F7EFF;
  629. border-radius: 20rpx;
  630. text-align: center;
  631. font-size: 28rpx;
  632. font-family: PingFangSC-Regular, PingFang SC;
  633. font-weight: 400;
  634. color: #FFFFFF;
  635. }
  636. }
  637. .dataCenter-header {
  638. padding: 0 70rpx;
  639. height: 120rpx;
  640. background-color: #fff;
  641. position: sticky;
  642. top: 0;
  643. left: 0;
  644. z-index: 10;
  645. border-bottom: 2rpx solid #F5F5F5;
  646. .header-item {
  647. .active {
  648. font-size: 28rpx;
  649. font-family: PingFangSC-Regular, PingFang SC;
  650. font-weight: 400;
  651. color: #666666;
  652. }
  653. .active1 {
  654. font-size: 34rpx;
  655. font-family: PingFangSC-Medium, PingFang SC;
  656. font-weight: 500;
  657. color: #333333;
  658. }
  659. image {
  660. width: 50rpx;
  661. height: 20rpx;
  662. // margin-top: 10rpx;
  663. }
  664. }
  665. }
  666. }
  667. </style>