collections.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <div class="lookDetail">
  3. <div class="formContent-item_title">房屋:{{ thisItem.assets }} <br />租户/业主:{{ thisItem.residentName }}</div>
  4. <el-form ref="form" :model="formData" :rules="formRules" label-width="90px">
  5. <div class="grid">
  6. <div>
  7. <div class="mrB20">
  8. <div class="labelText">费用类型:</div>
  9. <span class="contentText">
  10. {{
  11. !!thisItem['depositType'] && !!thisItem['depositType'] == 1
  12. ? '装修押金'
  13. : thisItem['depositType'] == 2
  14. ? '租赁押金'
  15. : thisItem['depositType'] == 3
  16. ? '出入证押金'
  17. : '门禁卡押金'
  18. }}
  19. </span>
  20. </div>
  21. <div class="mrB20">
  22. <div class="labelText">应收时间:</div>
  23. <span class="contentText">{{ thisItem.receivableDate }}</span>
  24. </div>
  25. </div>
  26. <div>
  27. <div class="mrB20">
  28. <div class="labelText">费用金额(元):</div>
  29. <span class="contentText">{{ thisItem.amount }}</span>
  30. </div>
  31. <div class="mrB20">
  32. <div class="labelText">缴费状态:</div>
  33. <span class="redText">未缴费</span>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="inline">
  38. <el-form-item label="支付方式" prop="payType">
  39. <el-select v-model="formData.payType">
  40. <el-option
  41. :label="item.label"
  42. :value="item.value"
  43. v-for="(item, index) in $publicArray.paymentType()"
  44. :key="index"
  45. ></el-option>
  46. </el-select>
  47. </el-form-item>
  48. <div>
  49. <div class="labelText">应收金额(元):</div>
  50. <span class="contentText" style="white-space: nowrap">{{ thisItem.amount }}</span>
  51. </div>
  52. <el-form-item label="实收金额(元)" required
  53. ><el-input oninput="value=value.replace(/[^0-9.]/g,'')" disabled v-model="thisItem.amount"></el-input
  54. ></el-form-item>
  55. </div>
  56. <el-form-item label="备注信息">
  57. <el-input
  58. type="textarea"
  59. maxlength="100"
  60. v-model="formData.remark"
  61. show-word-limit
  62. resize="none"
  63. rows="3"
  64. placeholder="请输入备注信息"
  65. ></el-input>
  66. </el-form-item>
  67. </el-form>
  68. </div>
  69. </template>
  70. <script >
  71. export default {
  72. props: ['params'],
  73. data() {
  74. return {
  75. thisItem: {},
  76. formData: {
  77. payType: '',
  78. remark: ''
  79. },
  80. formRules: {
  81. payType: [this.$valid.selectRequired('支付方式')],
  82. amount: [this.$valid.inputRequired('实收金额')]
  83. }
  84. };
  85. },
  86. methods: {
  87. submit() {
  88. this.$refs.form.validate((valid) => {
  89. if (valid) {
  90. var loading = this.$loading();
  91. let { id, amount } = this.thisItem;
  92. let installData = {
  93. paymentMode: this.formData.payType,
  94. remarks: this.formData.remark,
  95. id: id,
  96. amount: amount
  97. };
  98. this.$http
  99. .post('/sc-charge/deposit/collect/money', installData)
  100. .then(({ status, msg }) => {
  101. if (status == 0) {
  102. this.$message.success(msg);
  103. this.params.callback();
  104. this.$emit('close');
  105. } else {
  106. this.$message.error(msg);
  107. }
  108. loading.close();
  109. })
  110. .catch(() => {
  111. loading.close();
  112. });
  113. }
  114. });
  115. },
  116. getDatali(id) {
  117. this.$http
  118. .post('/sc-charge/deposit/find/' + id)
  119. .then(({ data, msg, status }) => {
  120. if (status == 0) {
  121. this.thisItem = data;
  122. }
  123. })
  124. .catch(() => {});
  125. }
  126. },
  127. created() {
  128. this.thisItem = this.params.data;
  129. }
  130. };
  131. </script>
  132. <style lang="scss" scoped>
  133. .lookDetail {
  134. /deep/ .el-form-item__label,
  135. /deep/.el-form-item__content {
  136. font-size: 12px;
  137. white-space: nowrap;
  138. }
  139. .formContent-item_title {
  140. font-weight: 600;
  141. }
  142. }
  143. .inline {
  144. display: grid;
  145. column-gap: 20px;
  146. grid-template-columns: repeat(3, minmax(0, 1fr));
  147. font-size: 12px;
  148. }
  149. .labelText {
  150. width: 90px;
  151. line-height: 30px;
  152. text-align: right;
  153. display: inline-block;
  154. }
  155. .grid {
  156. display: flex;
  157. justify-content: space-between;
  158. font-size: 12px;
  159. & > div {
  160. width: 33%;
  161. }
  162. }
  163. .mrB20 {
  164. margin-bottom: 20px;
  165. }
  166. </style>