details.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <div class="lookDetail">
  3. <div class="formContent-item_title">{{ thisItem.billNumber }}-{{ thisItem.assets }}</div>
  4. <el-form ref="form" label-width="110px">
  5. <template v-for="(item, index) in formLook">
  6. <el-col :span="12" :key="index">
  7. <el-form-item :label="labelType(item.label, item.prop)">
  8. <template v-if="item.slot">
  9. <template v-if="item.slot == 'assetsArea' && thisItem['chargeType'] == 4">
  10. {{ !!thisItem['parkingDetail'] ? thisItem['parkingDetail'] : '--' }}
  11. </template>
  12. <template v-else-if="item.slot == 'chargeMode'">
  13. {{ !!chargeModeValue[thisItem[item.prop]] ? chargeModeValue[thisItem[item.prop]] : '--' }}
  14. </template>
  15. <template v-else-if="item.slot === 'chargeStatus'">
  16. <span v-if="thisItem['chargeStatus'] == 1" class="redText">未缴费</span>
  17. <span v-else class="greenText">已缴费</span>
  18. </template>
  19. <template v-else-if="item.slot === 'payEndTime'">
  20. <div style="white-space: nowrap">{{ thisItem['payBeginTime'] }} - {{ thisItem['payEndTime'] }}</div>
  21. </template>
  22. <template v-else>
  23. {{ thisItem[item.prop] || '--' }}
  24. </template>
  25. </template>
  26. <template v-else>
  27. {{ thisItem[item.prop] || '--' }}
  28. </template>
  29. </el-form-item>
  30. </el-col>
  31. </template>
  32. </el-form>
  33. </div>
  34. </template>
  35. <script >
  36. export default {
  37. props: ['params'],
  38. data() {
  39. return {
  40. chargeModeValue: {
  41. 1: '固定收费',
  42. 2: '价格*面积收费',
  43. 4: '单价*用量'
  44. },
  45. formLook: [
  46. {
  47. label: '费用名称:',
  48. prop: 'chargeName'
  49. },
  50. {
  51. label: '计费标准:',
  52. prop: 'chargeModeDict'
  53. },
  54. {
  55. label: '面积(㎡):',
  56. prop: 'assetsArea',
  57. slot: 'assetsArea'
  58. },
  59. {
  60. label: '单价(元):',
  61. prop: 'chargePrice'
  62. },
  63. {
  64. label: '费用金额(元):',
  65. prop: 'amount'
  66. },
  67. {
  68. label: '账期:',
  69. prop: 'paymentDays'
  70. },
  71. {
  72. label: '账单计费日期:',
  73. prop: 'payEndTime',
  74. slot: 'payEndTime'
  75. },
  76. {
  77. label: '滞纳金(元):',
  78. prop: 'lateFee'
  79. },
  80. {
  81. label: '缴费状态:',
  82. prop: 'chargeStatus',
  83. slot: 'chargeStatus'
  84. },
  85. {
  86. label: '业主:',
  87. prop: 'residentName'
  88. },
  89. {
  90. label: '业主手机号:',
  91. prop: 'phone'
  92. },
  93. {
  94. label: '支付方式:',
  95. prop: 'payTypeDict'
  96. },
  97. {
  98. label: '收款人:',
  99. prop: 'payee'
  100. },
  101. {
  102. label: '收款时间:',
  103. prop: 'chargeDate'
  104. },
  105. {
  106. label: '应收金额(元):',
  107. prop: 'receivableAmount'
  108. },
  109. {
  110. label: '实收金额(元):',
  111. prop: 'receivedAmount'
  112. },
  113. {
  114. label: '备注:',
  115. prop: 'remark'
  116. }
  117. ],
  118. thisItem: {}
  119. };
  120. },
  121. methods: {
  122. getDatali(id) {
  123. this.$http
  124. .get('/sc-charge/charge/bill/findUserBillDetail', { id: id })
  125. .then(({ data, msg, status }) => {
  126. if (status == 0) {
  127. this.thisItem = data;
  128. }
  129. })
  130. .catch(() => {});
  131. },
  132. labelType(lab, val) {
  133. let type = this.thisItem['chargeType'];
  134. if (val == 'assetsArea') {
  135. if (type == 2) {
  136. lab = '用量(吨):';
  137. } else if (type == 3) {
  138. lab = '用量(度):';
  139. } else if (type == 4) {
  140. lab = '车位:';
  141. }
  142. } else if (val == 'chargePrice') {
  143. if (type == 2) {
  144. lab = '价格(元/吨):';
  145. } else if (type == 3) {
  146. lab = '价格(元/度):';
  147. }
  148. }
  149. return lab;
  150. }
  151. },
  152. created() {
  153. this.getDatali(this.params.id);
  154. }
  155. };
  156. </script>
  157. <style lang="scss" scoped>
  158. @import '@assets/css/public-style.scss';
  159. .lookDetail {
  160. /deep/ .el-form-item__label,
  161. /deep/.el-form-item__content {
  162. font-size: 12px;
  163. white-space: nowrap;
  164. }
  165. }
  166. </style>