123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <!--index.wxml-->
  2. <view class="container">
  3. <view class="MainPage">
  4. <view class="nav">
  5. <view class="flex-h">
  6. <text class="flex-item {{ActiveIndex === idx ? 'active' : ''}}" wx:for="{{NavList}}" wx:for-item="item" wx:for-index="idx" wx:key="key" data-index="{{idx}}" bindtap="CutNav">{{item.value}}</text>
  7. </view>
  8. </view>
  9. <view class="cutBody">
  10. <!-- 商业贷款 -->
  11. <view>
  12. <view class="mainInfo">
  13. <view>
  14. <view class="top">
  15. <image mode="widthFix" src="/assets/images/img3.jpg"></image>
  16. <view class="centerLabel">
  17. <view class="flex-h">
  18. <text class="flex-item">每月月供参考(元)</text>
  19. <text bindtap="CheckRepaymentList">还款详情 ></text>
  20. </view>
  21. <text>{{MainResult.PriceOfMonth}}</text>
  22. </view>
  23. </view>
  24. <view class="subInfo flex-h">
  25. <view class="flex-item">
  26. <text>支付利息(元)</text>
  27. <text>{{MainResult.TotalInterest}}</text>
  28. </view>
  29. <view class="flex-item">
  30. <text>还款总额(元)</text>
  31. <text>{{MainResult.TotalPrice}}</text>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="options">
  37. <view class="flex-h">
  38. <text>还款方式</text>
  39. <view class="flex-item">
  40. <Radio Params="{{RepaymentTypeList}}" Value="{{Options.RepaymentType}}" data-name="RepaymentType" bindradiochange="RadioChange" />
  41. </view>
  42. </view>
  43. <view class="flex-h {{ActiveIndex === 2 ? 'hide' : ''}}">
  44. <text>计算方式</text>
  45. <view class="flex-item">
  46. <Radio Params="{{CalcType}}" Value="{{Options.CalcType}}" data-name="CalcType" bindradiochange="RadioChange" />
  47. </view>
  48. </view>
  49. <view class="flex-h {{ActiveIndex === 2 ? 'hide' : ''}}">
  50. <text>房价总额</text>
  51. <view class="flex-item flex-h">
  52. <input class="flex-item" type="digit" data-name="TotalPrice" bindinput="TextInput"></input>
  53. <text>万元</text>
  54. </view>
  55. </view>
  56. <view class="flex-h {{ActiveIndex === 2 ? 'hide' : ''}}">
  57. <text>首付比例</text>
  58. <view class="flex-item flex-h">
  59. <text class="flex-item" bindtap="SelectFirstPercent">{{Options.FirstPercentName}}</text>
  60. <image mode="widthFix" src="/assets/images/icon11.png"></image>
  61. </view>
  62. </view>
  63. <view class="flex-h {{ActiveIndex === 2 ? 'hide' : ''}}">
  64. <text>首付金额</text>
  65. <view class="flex-item flex-h">
  66. <text class="flex-item">{{Options.FirstPrice}}</text>
  67. <text>元</text>
  68. </view>
  69. </view>
  70. <view class="flex-h {{ActiveIndex !== 2 ? 'hide' : ''}}">
  71. <text>商贷总额</text>
  72. <view class="flex-item flex-h">
  73. <input class="flex-item" type="digit" data-name="CommercialPrice" bindinput="TextInput"></input>
  74. <text>万元</text>
  75. </view>
  76. </view>
  77. <view class="flex-h {{ActiveIndex !== 2 ? 'hide' : ''}}">
  78. <text>公积金贷款额</text>
  79. <view class="flex-item flex-h">
  80. <input class="flex-item" type="digit" data-name="PublicHousingFundPrice" bindinput="TextInput"></input>
  81. <text>万元</text>
  82. </view>
  83. </view>
  84. <view class="flex-h">
  85. <text>按揭年数</text>
  86. <view class="flex-item flex-h">
  87. <text class="flex-item" bindtap="SelectStagesNum">{{Options.StagesNumName}}</text>
  88. <image mode="widthFix" src="/assets/images/icon11.png"></image>
  89. </view>
  90. </view>
  91. <view class="flex-h {{ActiveIndex === 1 ? 'hide' : ''}}">
  92. <text>商贷利率</text>
  93. <view class="flex-item flex-h">
  94. <text class="flex-item" bindtap="SelectCommercialLoanRate">{{Options.CommercialLoanRateName}}</text>
  95. <image mode="widthFix" src="/assets/images/icon11.png"></image>
  96. </view>
  97. </view>
  98. <view class="flex-h {{ActiveIndex === 1 ? 'hide' : ''}}">
  99. <text style="color: red;">商业贷款利率</text>
  100. <view class="flex-item">
  101. <text style="color: red;" class="flex-item">{{Options.CommercialLoanRateNumName}}</text>
  102. <text style="color: red;">%</text>
  103. </view>
  104. </view>
  105. <view class="flex-h {{ActiveIndex === 0 ? 'hide' : ''}}">
  106. <text>公积金利率</text>
  107. <view class="flex-item flex-h">
  108. <text class="flex-item" bindtap="SelectPublicHousingFundLoanRate">{{Options.PublicHousingFundLoanRateName}}</text>
  109. <image mode="widthFix" src="/assets/images/icon11.png"></image>
  110. </view>
  111. </view>
  112. <view class="flex-h {{ActiveIndex === 0 ? 'hide' : ''}}">
  113. <text style="color: red;">公积金贷款利率</text>
  114. <view class="flex-item">
  115. <text style="color: red;" class="flex-item">{{Options.PublicHousingFundLoanRateNumName}}</text>
  116. <text style="color: red;">%</text>
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. <text class="btn" bindtap="StartCalc">
  122. <text>开始计算</text>
  123. </text>
  124. </view>
  125. </view>
  126. <view class="popup" hidden="{{!ShowFirstPercentList}}">
  127. <view>
  128. <van-picker show-toolbar columns="{{ FirstPercentList }}" value-key="value" bind:cancel="SelectFirstPercentCancel" bind:confirm="SelectFirstPercentConfirm" />
  129. </view>
  130. </view>
  131. <view class="popup" hidden="{{!ShowStagesNumList}}">
  132. <view>
  133. <van-picker show-toolbar columns="{{ StagesNumList }}" value-key="value" bind:cancel="SelectStagesNumListCancel" bind:confirm="SelectStagesNumListConfirm" />
  134. </view>
  135. </view>
  136. <view class="popup" hidden="{{!ShowCommercialLoanRateList}}">
  137. <view>
  138. <van-picker show-toolbar columns="{{ CommercialLoanRateList }}" value-key="value" bind:cancel="SelectCommercialLoanRateCancel" bind:confirm="SelectCommercialLoanRateConfirm" />
  139. </view>
  140. </view>
  141. <view class="popup" hidden="{{!ShowPublicHousingFundLoanRateList}}">
  142. <view>
  143. <van-picker show-toolbar columns="{{ PublicHousingFundLoanRateList }}" value-key="value" bind:cancel="SelectPublicHousingFundCancel" bind:confirm="SelectPublicHousingFundConfirm" />
  144. </view>
  145. </view>
  146. <view class="popup" hidden="{{!ShowRepaymentList}}">
  147. <view class="layer" bindtap="CloseRepaymentList"></view>
  148. <view class="RepaymentList centerLabel flex-v">
  149. <view class="header flex-h" bindtap="CloseRepaymentList">
  150. <view class="flex-item">
  151. <text>总还款</text>
  152. <text>{{MainResult.TotalPriceFloat}}万</text>
  153. </view>
  154. <view class="flex-item">
  155. <text>总利息</text>
  156. <text>{{MainResult.TotalInterestFloat}}万</text>
  157. </view>
  158. <view class="flex-item">
  159. <text>总贷款</text>
  160. <text>{{MainResult.TotalLoanSum}}万</text>
  161. </view>
  162. <view class="flex-item">
  163. <text>贷款月数</text>
  164. <text>{{RepaymentList.length}}</text>
  165. </view>
  166. </view>
  167. <view class="flex-h title">
  168. <text class="flex-item">期数</text>
  169. <text class="flex-item">月份</text>
  170. <text class="flex-item">月供</text>
  171. <text class="flex-item">剩余</text>
  172. </view>
  173. <view class="flex-item">
  174. <view>
  175. <view class="list">
  176. <view class="flex-h" wx:for="{{RepaymentList}}" wx:for-item="item" wx:for-index="idx" wx:key="key">
  177. <text class="flex-item">第{{idx + 1}}期</text>
  178. <text class="flex-item">{{item.Month}}</text>
  179. <text class="flex-item">{{item.Price}}</text>
  180. <text class="flex-item">{{item.StockSum}}</text>
  181. </view>
  182. </view>
  183. </view>
  184. </view>
  185. </view>
  186. </view>
  187. <van-toast id="van-toast" />
  188. </view>