index.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <view class="content">
  3. <!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
  4. <u--form labelPosition="left" :model="wuyeAmountInfo" :rules="rules" ref="form1" labelWidth="80">
  5. <u-form-item label="楼号" prop="name" borderBottom ref="item1">
  6. <u--input v-model="wuyeAmountInfo.buildingNo" border="none" placeholder="请输入楼号(例:1)" type='number'>
  7. </u--input>
  8. </u-form-item>
  9. <u-form-item label="单元号" prop="name" borderBottom ref="item1">
  10. <u--input v-model="wuyeAmountInfo.unitNo" border="none" placeholder="请输入单元号(例:2)" type='number'>
  11. </u--input>
  12. </u-form-item>
  13. <u-form-item label="房间号" prop="name" borderBottom ref="item1">
  14. <u--input v-model="wuyeAmountInfo.floor" border="none" placeholder="请输入房间号(例:501)" type='number'>
  15. </u--input>
  16. </u-form-item>
  17. </u--form>
  18. <u-button type="primary" text="查询" @click="selectInfo"></u-button>
  19. <u-toast ref="uToast"></u-toast>
  20. <view class="content1" v-if="isSHowInfo">
  21. <view class="fy-detail">
  22. <view class="title">
  23. 户主信息
  24. </view>
  25. <view class="row">
  26. <view class="left">
  27. 户主:
  28. </view>
  29. <view class="">
  30. {{wuyeAmountInfo.householder}}
  31. </view>
  32. </view>
  33. <view class="row">
  34. <view class="left">
  35. 房源号:
  36. </view>
  37. <view class="">
  38. {{wuyeAmountInfo.sourceNumber}}
  39. </view>
  40. </view>
  41. <view class="row">
  42. <view class="left">
  43. 实际面积:
  44. </view>
  45. <view class="">
  46. {{wuyeAmountInfo.actualMoney}}
  47. </view>
  48. </view>
  49. <view class="row">
  50. <view class="left">
  51. 付款状态:
  52. </view>
  53. <view class="">
  54. {{wuyeAmountInfo.totalActualPayment==0?'未支付':"已支付"}}
  55. </view>
  56. </view>
  57. <view class="title-qj">
  58. 缴费区间:{{wuyeAmountInfo.paymentRange}}
  59. </view>
  60. <view class="title">
  61. 费用明细:
  62. </view>
  63. <view class="row">
  64. <view class="left">
  65. 物业费:
  66. </view>
  67. <view class="">
  68. {{wuyeAmountInfo.propertyFee}}
  69. </view>
  70. </view>
  71. <view class="row">
  72. <view class="left">
  73. 电梯费:
  74. </view>
  75. <view class="">
  76. {{wuyeAmountInfo.elevatorFee}}
  77. </view>
  78. </view>
  79. <view class="row">
  80. <view class="left">
  81. 车位管理费:
  82. </view>
  83. <view class="">
  84. {{wuyeAmountInfo.parkingSpace}}
  85. </view>
  86. </view>
  87. <view class="row">
  88. <view class="left">
  89. 车库管理费:
  90. </view>
  91. <view class="">
  92. {{wuyeAmountInfo.garage}}
  93. </view>
  94. </view>
  95. <view class="row">
  96. <view class="left">
  97. 仓库管理费:
  98. </view>
  99. <view class="">
  100. {{wuyeAmountInfo.warehouse}}
  101. </view>
  102. </view>
  103. <view class="row">
  104. <view class="left">
  105. 垃圾清运费:
  106. </view>
  107. <view class="">
  108. {{wuyeAmountInfo.garbageClearing}}
  109. </view>
  110. </view>
  111. </view>
  112. <view class="total">
  113. <view class="left">
  114. 应缴费总合计:
  115. </view>
  116. <view class="">
  117. {{total}}
  118. </view>
  119. </view>
  120. <u-button type="primary" text="去付款" @click="pay" class="pay"></u-button>
  121. </view>
  122. <!-- <u-popup :show="isShowCode" @close="isShowCode= false" @open="open" mode="center">
  123. </u-popup> -->
  124. </view>
  125. </template>
  126. <script>
  127. export default {
  128. data() {
  129. return {
  130. isSHowInfo: false,
  131. isShowCode: false,
  132. wuyeAmountInfo: {
  133. buildingNo: '',
  134. unitNo: '',
  135. floor: '',
  136. },
  137. rules: {
  138. 'buildingNo': {
  139. type: 'string',
  140. required: true,
  141. message: '请填写楼号',
  142. trigger: ['blur', 'change']
  143. },
  144. 'unitNo': {
  145. type: 'string',
  146. required: true,
  147. message: '请填写单元号',
  148. trigger: ['blur', 'change']
  149. },
  150. 'floor': {
  151. type: 'string',
  152. required: true,
  153. message: '请填写房间号',
  154. trigger: ['blur', 'change']
  155. }
  156. }
  157. };
  158. },
  159. computed: {
  160. total() {
  161. let _totalPrice = Number(this.wuyeAmountInfo.propertyFee) + Number(this.wuyeAmountInfo.elevatorFee) +
  162. Number(this.wuyeAmountInfo.parkingSpace) + Number(this.wuyeAmountInfo.garage) + Number(this
  163. .wuyeAmountInfo.warehouse) + Number(this.wuyeAmountInfo.garbageClearing)
  164. return _totalPrice;
  165. },
  166. },
  167. methods: {
  168. pay() {
  169. console.log("去付款")
  170. this.isShowCode = true
  171. uni.navigateTo({
  172. url: '/pages/pay/pay?price=' + this.total + "&id=" + this.wuyeAmountInfo.id
  173. })
  174. },
  175. selectInfo() {
  176. if (!this.wuyeAmountInfo.buildingNo) {
  177. this.$refs.uToast.show({
  178. type: 'error',
  179. message: '请输入楼号!',
  180. })
  181. return
  182. }
  183. if (!this.wuyeAmountInfo.unitNo) {
  184. this.$refs.uToast.show({
  185. type: 'error',
  186. message: '请输入单元号!',
  187. })
  188. return
  189. }
  190. if (!this.wuyeAmountInfo.floor) {
  191. this.$refs.uToast.show({
  192. type: 'error',
  193. message: '请输入房间号!',
  194. })
  195. return
  196. }
  197. this.$request.baseRequest('wuyeAmountInfoApp', 'getInfo', {
  198. wuyeAmountInfo: JSON.stringify(this.wuyeAmountInfo)
  199. }, failres => {
  200. this.$refs.uToast.show({
  201. type: 'error',
  202. message: failres.errmsg,
  203. })
  204. uni.hideLoading()
  205. }).then(res => {
  206. console.log(res)
  207. this.isSHowInfo = true
  208. this.wuyeAmountInfo = res.data
  209. })
  210. },
  211. },
  212. onReady() {
  213. //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
  214. this.$refs.form1.setRules(this.rules)
  215. },
  216. };
  217. </script>
  218. <style lang="scss" scoped>
  219. .content {
  220. padding: 0 40rpx;
  221. }
  222. .fy-detail {
  223. .title-qj {
  224. font-weight: 700;
  225. margin: 20rpx 0;
  226. }
  227. .title {
  228. font-size: 36rpx;
  229. font-weight: 700;
  230. margin: 20rpx 0;
  231. }
  232. .row {
  233. display: flex;
  234. .left {
  235. width: 200rpx;
  236. }
  237. }
  238. }
  239. .total {
  240. display: flex;
  241. margin-top: 20rpx;
  242. font-size: 32rpx;
  243. font-weight: 700;
  244. .left {
  245. width: 260rpx;
  246. }
  247. }
  248. .pay {
  249. margin-top: 50rpx;
  250. }
  251. </style>