deductionDetails.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <template>
  2. <view>
  3. <u-navbar title="扣费详情" title-color="#101010"></u-navbar>
  4. <view class="background">
  5. <view class="recharge-details">
  6. <view class="headline">
  7. <text v-if="tenantBalanceRecord.remark">
  8. <image class="img" v-if="tenantBalanceRecord.remark.indexOf('水')>-1"
  9. src="@/assets/img/wImage@1x.png" mode=""></image>
  10. <image class="img"
  11. v-else-if="tenantBalanceRecord.remark.indexOf('房')>-1||tenantBalanceRecord.remark.indexOf('租')>-1"
  12. src="@/assets/img/wImage.png" mode=""></image>
  13. <image class="img" v-else-if="tenantBalanceRecord.remark.indexOf('保洁')>-1"
  14. src="@/assets/img/wImage3.png" mode=""></image>
  15. <image class="img" v-else-if="tenantBalanceRecord.remark.indexOf('物业')>-1"
  16. src="@/assets/img/wImage4.png" mode=""></image>
  17. <image class="img" v-else src="@/assets/img/Copy PEokWS2 Copy 1@1x.png" mode=""></image>
  18. </text>{{tenantBalanceRecord.remark}}
  19. </view>
  20. <view class="sum">
  21. {{tenantBalanceRecord.amount}}
  22. <span>元</span>
  23. </view>
  24. <view class="state">
  25. 已扣费
  26. </view>
  27. <view class="details">
  28. <view class="item">
  29. <view class="item-title">
  30. 合同信息
  31. </view>
  32. <view class="item-value">
  33. {{tenantContract.remark}}
  34. </view>
  35. </view>
  36. <view class="item" v-if="false">
  37. <view class="item-title">
  38. 户号
  39. </view>
  40. <view class="item-value">
  41. 00880088
  42. </view>
  43. </view>
  44. <view class="item">
  45. <view class="item-title">
  46. 收费标准
  47. </view>
  48. <view class="item-value" v-if="contractItem.id">
  49. <template v-if="tenantBalanceRecord.extraJson.chargeType=='2'">
  50. </template>
  51. <template v-else>
  52. {{contractItem.price}}{{contractItem.unit}}
  53. </template>
  54. </view>
  55. </view>
  56. <template v-if="contractItem.id&&tenantBalanceRecord.extraJson.chargeType=='2'">
  57. <table class="table1" >
  58. <tr class="tr1">
  59. <td class="td1">类型</td>
  60. <td>度数</td>
  61. <td>价格({{contractItem.unit}})</td>
  62. <td>金额</td>
  63. </tr>
  64. <tr>
  65. <td class="td1">峰</td>
  66. <td class="td3">{{tenantBalanceRecord.extraJson.fengKwh}}</td>
  67. <td >{{tenantBalanceRecord.extraJson.fengPrice}}</td>
  68. <td class="td3">{{tenantBalanceRecord.extraJson.fengFee}}</td>
  69. </tr>
  70. <tr>
  71. <td class="td1">谷</td>
  72. <td class="td3">{{tenantBalanceRecord.extraJson.guKwh}}</td>
  73. <td >{{tenantBalanceRecord.extraJson.guPrice}}</td>
  74. <td class="td3">{{tenantBalanceRecord.extraJson.guFee}}</td>
  75. </tr>
  76. <tr>
  77. <td class="td1">平</td>
  78. <td class="td3">{{tenantBalanceRecord.extraJson.pingKwh}}</td>
  79. <td >{{tenantBalanceRecord.extraJson.pingPrice}}</td>
  80. <td class="td3">{{tenantBalanceRecord.extraJson.pingFee}}</td>
  81. </tr>
  82. <tr>
  83. <td class="td1">尖</td>
  84. <td class="td3">{{tenantBalanceRecord.extraJson.jianKwh}}</td>
  85. <td >{{tenantBalanceRecord.extraJson.jianPrice}}</td>
  86. <td class="td3">{{tenantBalanceRecord.extraJson.jianFee}}</td>
  87. </tr>
  88. </table>
  89. </template>
  90. <template v-if="tenantBalanceRecord.remark=='电费'&&tenantBalanceRecord.extraJson">
  91. <table class="table1" v-if="tenantBalanceRecord.extraJson.children">
  92. <tr class="tr1">
  93. <td></td>
  94. <td>起止码</td>
  95. <td>度数</td>
  96. </tr>
  97. <tr>
  98. <td class="td1">{{tenantBalanceRecord.extraJson.meterName}}</td>
  99. <td>{{tenantBalanceRecord.extraJson.startMeter}}-{{tenantBalanceRecord.extraJson.endMeter}}</td>
  100. <td class="td3" >{{tenantBalanceRecord.extraJson.kwh}}度</td>
  101. </tr>
  102. <tr v-for="(item,i) in tenantBalanceRecord.extraJson.children" :key="i">
  103. <td class="td1">{{item.meterName}}</td>
  104. <td>{{item.startMeter}}-{{item.endMeter}}</td>
  105. <td class="td3">{{item.kwh}}度</td>
  106. </tr>
  107. <tr style="font-weight: bold;color:#fff;background-color:#307af6 ;height: 80rpx;" >
  108. <td class="td1" colspan="2">扣除后用电量</td>
  109. <td>{{tenantBalanceRecord.extraJson.remainKwh}}度</td>
  110. </tr>
  111. </table>
  112. <template v-else >
  113. <view class="item" >
  114. <view class="item-title">
  115. 度数
  116. </view>
  117. <view class="item-value">
  118. {{tenantBalanceRecord.extraJson.kwh}}度
  119. </view>
  120. </view>
  121. <view class="item" >
  122. <view class="item-title">
  123. 起止码
  124. </view>
  125. <view class="item-value">
  126. {{tenantBalanceRecord.extraJson.startMeter}}-{{tenantBalanceRecord.extraJson.endMeter}}
  127. </view>
  128. </view>
  129. </template>
  130. </template>
  131. <template v-if="contractItem.id&&tenantBalanceRecord.extraJson.sharedKwh!=null">
  132. <table class="table1" >
  133. <tr class="tr1">
  134. <td></td>
  135. <td>起止码</td>
  136. <td>度数</td>
  137. </tr>
  138. <tr>
  139. <td class="td1">楼层电量</td>
  140. <td>{{tenantBalanceRecord.extraJson.startMeter}}-{{tenantBalanceRecord.extraJson.endMeter}}</td>
  141. <td class="td3" >{{tenantBalanceRecord.extraJson.totalKwh}}度</td>
  142. </tr>
  143. <tr>
  144. <td class="td1">表计电量</td>
  145. <td></td>
  146. <td class="td3" >{{tenantBalanceRecord.extraJson.childSumKwh}}度</td>
  147. </tr>
  148. <tr>
  149. <td class="td1">公摊电量</td>
  150. <td></td>
  151. <td class="td3" >{{(tenantBalanceRecord.extraJson.sharedKwh)}}度</td>
  152. </tr>
  153. <tr>
  154. <td class="td1">楼层总面积</td>
  155. <td></td>
  156. <td class="td3" >{{tenantBalanceRecord.extraJson.totalHouseArea}}平方米</td>
  157. </tr>
  158. <tr>
  159. <td class="td1">租用面积</td>
  160. <td></td>
  161. <td class="td3" >{{tenantBalanceRecord.extraJson.houseArea}}平方米</td>
  162. </tr>
  163. <tr>
  164. <td class="td1">租用面积占比</td>
  165. <td></td>
  166. <td class="td3" >{{tenantBalanceRecord.extraJson.houseAreaPercent}}%</td>
  167. </tr>
  168. <tr>
  169. <td class="td1">租户公摊电量</td>
  170. <td></td>
  171. <td class="td3" >{{tenantBalanceRecord.extraJson.tenantSharedKwh}}度</td>
  172. </tr>
  173. </table>
  174. </template>
  175. </view>
  176. <view class="details">
  177. <view class="item">
  178. <view class="item-title">
  179. 付款方式
  180. </view>
  181. <view class="item-value">
  182. {{tenantBalanceRecord.methodN}}
  183. </view>
  184. </view>
  185. <!-- <view class="item">
  186. <view class="item-title">
  187. 订单号
  188. </view>
  189. <view class="item-value">
  190. 30816112557708460925
  191. </view>
  192. </view> -->
  193. <view class="item">
  194. <view class="item-title">
  195. 扣费时间
  196. </view>
  197. <view class="item-value">
  198. {{tenantBalanceRecord.createTime}}
  199. </view>
  200. </view>
  201. <!-- <view class="item">
  202. <view class="item-title">
  203. 支付时间
  204. </view>
  205. <view class="item-value">
  206. 2023-08-20 10:29:00
  207. </view>
  208. </view> -->
  209. </view>
  210. </view>
  211. </view>
  212. <!-- 返回 -->
  213. <!-- <button class="back">返回</button> -->
  214. </view>
  215. </template>
  216. <script>
  217. import * as API from '@/apis/pagejs/deduction.js'
  218. export default {
  219. data() {
  220. return {
  221. id: '',
  222. tenantBalanceRecord: {},
  223. contractItem: {},
  224. tenantContract: {},
  225. }
  226. },
  227. onLoad(op) {
  228. if (op.id) {
  229. this.id = op.id
  230. }
  231. this.getRechargeDetails()
  232. },
  233. methods: {
  234. getRechargeDetails() {
  235. uni.showLoading({
  236. title: "加载中",
  237. mask: true,
  238. })
  239. API.recordDetails({
  240. id: this.id
  241. }).then((response) => {
  242. uni.hideLoading();
  243. this.contractItem = response.data.contractItem;
  244. this.tenantContract = response.data.tenantContract;
  245. this.tenantBalanceRecord = response.data.tenantBalanceRecord;
  246. }).catch(error => {
  247. uni.hideLoading();
  248. uni.showToast({
  249. icon: "none",
  250. title: error
  251. })
  252. })
  253. }
  254. }
  255. }
  256. </script>
  257. <style lang="scss" scoped>
  258. .table1{
  259. margin: 8rpx 0;
  260. width: 100%;
  261. border-collapse: collapse;
  262. td{
  263. border: 1px solid #e7e7e7;
  264. text-align: end;
  265. padding: 2px 8px;
  266. }
  267. .td1{
  268. text-align: start;
  269. min-width: 20%;
  270. max-width: 30%;
  271. }
  272. .td3{
  273. white-space: pre;
  274. }
  275. tr{
  276. background-color:#f5f5f6
  277. }
  278. .tr1{
  279. text-align: end;
  280. font-weight: bold;
  281. }
  282. tr:nth-child(even) {
  283. background-color: #fff;
  284. }
  285. }
  286. .background {
  287. background: linear-gradient(180deg, rgba(203, 234, 255, 1) 0%, rgba(203, 234, 255, 0) 100%);
  288. padding: 40rpx 32rpx;
  289. .recharge-details {
  290. background-color: #fff;
  291. border-radius: 8px;
  292. padding: 40rpx 32rpx;
  293. text-align: center;
  294. .headline {
  295. color: rgb(16, 16, 16);
  296. font-size: 36rpx;
  297. display: flex;
  298. align-items: center;
  299. justify-content: center;
  300. .img {
  301. width: 48rpx;
  302. height: 48rpx;
  303. vertical-align: middle;
  304. }
  305. }
  306. .sum {
  307. color: rgb(16, 16, 16);
  308. font-size: 48rpx;
  309. margin-top: 32rpx;
  310. span{
  311. font-size: 28rpx;
  312. }
  313. }
  314. .state {
  315. color: rgb(56, 158, 13);
  316. margin-top: 8rpx;
  317. }
  318. .details {
  319. margin-top: 40rpx;
  320. padding-top: 40rpx;
  321. border-top: 1px solid rgba(241, 241, 241, 1);
  322. .item {
  323. display: flex;
  324. align-items: center;
  325. justify-content: space-between;
  326. margin-bottom: 16rpx;
  327. .item-title {
  328. color: rgb(119, 119, 119);
  329. }
  330. .item-value {
  331. color: rgb(48, 48, 48);
  332. }
  333. }
  334. }
  335. }
  336. }
  337. // 返回
  338. .back {
  339. border: 1px solid rgba(205, 205, 205, 1);
  340. border-radius: 8px;
  341. line-height: 88rpx;
  342. background-color: rgba(255, 255, 255, 1);
  343. color: rgba(119, 119, 119, 1);
  344. font-size: 32rpx;
  345. }
  346. </style>