index.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <div>
  3. <el-row class="handle-box" style="margin-bottom: 10px">
  4. <el-col :span="24">
  5. <span>姓名&nbsp;</span>
  6. <el-input v-model="search.buyerName" class="ch-input ch-input-size" placeholder="买受人" size="small" @keyup.enter.native="handleSearch()" />
  7. </el-col>
  8. </el-row>
  9. <el-row class="handle-box" style="margin-bottom: 10px">
  10. <el-col :span="24" style="margin-top: 20px">
  11. <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
  12. <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
  13. </el-col>
  14. </el-row>
  15. <el-row class="handle-box">
  16. <el-col :span="24">
  17. <el-table
  18. v-loading="loading"
  19. :data="AllData"
  20. row-class-name="g_table_row"
  21. border
  22. :header-cell-style="{background:'#f2f2f2'}"
  23. >
  24. <el-table-column type="index" width="60" />
  25. <el-table-column label="小区-分期" prop="groupDiscName" />
  26. <el-table-column label="买受人" prop="buyerName" width="200" />
  27. <el-table-column label="定金金额" prop="receivableMoney" width="200" />
  28. <el-table-column label="定金流水号" prop="serialNumber" />
  29. <el-table-column label="认购房屋" prop="houseName" />
  30. <el-table-column label="状态" prop="statusStr" width="110" />
  31. <el-table-column label="经办时间" prop="createdName" />
  32. <el-table-column label="经办人" prop="createdAt" />
  33. <el-table-column header-align="center" label="操作" width="380">
  34. <template scope="scope">
  35. <el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
  36. <el-button size="mini" type="text" @click="downLoad(scope.row)">定金收据</el-button>
  37. </template>
  38. </el-table-column>
  39. </el-table>
  40. <div class="table-page">
  41. <el-pagination
  42. :current-page.sync="currentPage"
  43. :page-sizes="[10, 20, 50, 100]"
  44. :page-size="pageSize"
  45. background
  46. layout="total, sizes, prev, pager, next, jumper"
  47. :total="allpage"
  48. @size-change="handleSizeChange"
  49. @current-change="handleCurrentChange"
  50. />
  51. </div>
  52. </el-col>
  53. </el-row>
  54. <!-- 转定金 -->
  55. <el-dialog
  56. :visible.sync="dialogVisible"
  57. :close-on-click-modal="false"
  58. :close-on-press-escape="false"
  59. title=""
  60. width="90%"
  61. top="20px"
  62. class="statistic_base"
  63. :append-to-body="true"
  64. :modal-append-to-body="true"
  65. custom-class="tagdialog"
  66. @close="getData"
  67. >
  68. <to-deposit v-if="dialogVisible" ref="toDeposit" @cancel="cancel" />
  69. </el-dialog>
  70. <!--定金查看-->
  71. <el-dialog
  72. :visible.sync="dialogAddVisible"
  73. :close-on-click-modal="false"
  74. :close-on-press-escape="false"
  75. title=""
  76. width="90%"
  77. top="20px"
  78. class="statistic_base"
  79. :append-to-body="true"
  80. :modal-append-to-body="true"
  81. custom-class="tagdialog"
  82. @close="getData"
  83. >
  84. <add-subscribe v-if="dialogAddVisible" ref="addSubscribe" @cancel="cancel" />
  85. </el-dialog>
  86. </div>
  87. </template>
  88. <script>
  89. import Base from '@/views/base/base'
  90. import BaseData from '@/views/base/baseData'
  91. import ToDeposit from '@/views/receiveRefundsManagement/intentionalDepositManagement/toDeposit.vue'
  92. import AddSubscribe from '@/views/customerManagement/subscribe/addSubscribe.vue'
  93. export default {
  94. name: 'Index',
  95. components: { AddSubscribe, ToDeposit },
  96. mixins: [Base, BaseData],
  97. data() {
  98. return {
  99. dc_key: ['DEPOSIT_STATUS'],
  100. // 列表相关
  101. search: {
  102. },
  103. AllData: [],
  104. loading: false,
  105. // 弹框相关
  106. dialogVisible: false,
  107. dialogTitle: '新增',
  108. dialogAddVisible: false
  109. }
  110. },
  111. mounted() {
  112. this.initDict(this.dc_key).then((res) => {
  113. this.getData()
  114. })
  115. },
  116. methods: {
  117. getData: function() {
  118. const _this = this
  119. _this.loading = true
  120. _this.AllData = []
  121. this.search.pageNum = this.currentPage
  122. this.search.pageSize = this.pageSize
  123. this.baseRequest('list', this.search).then((res) => {
  124. if (res.data.rows) {
  125. res.data.rows.forEach(function(item) {
  126. const json = _this.getItemJson(item)
  127. _this.AllData.push(json)
  128. })
  129. _this.allpage = res.data.total
  130. }
  131. _this.loading = false
  132. }).catch((e) => {
  133. // console.log(e)
  134. })
  135. // this.initOutData()
  136. },
  137. handleSearch: function() {
  138. this.getData()
  139. },
  140. handleReset: function() {
  141. for (const i in this.search) {
  142. if (i !== 'pageNum' && i !== 'pageSize') {
  143. this.search[i] = ''
  144. }
  145. }
  146. this.handleSearch()
  147. },
  148. getItemJson: function(item) {
  149. item.houseName = item.buildName + '-' + item.roomNo
  150. item.statusStr = this.dc_map.DEPOSIT_STATUS[item.status]
  151. return item
  152. },
  153. /* 编辑*/
  154. handleEdit: function(val) {
  155. this.dialogVisible = true
  156. val.isView = false
  157. // 新vue时调用的方法
  158. this.$nextTick(() => {
  159. this.$refs.toDeposit.initData(val)
  160. })
  161. },
  162. handleView(val) {
  163. this.dialogAddVisible = true
  164. this.dialogTitle = '查看'
  165. val.isView = true
  166. // 新vue时调用的方法
  167. this.$nextTick(() => {
  168. this.$refs.addSubscribe.initData(val)
  169. })
  170. },
  171. downLoad(val) {
  172. },
  173. cancel: function() {
  174. this.dialogVisible = false
  175. this.dialogAddVisible = false
  176. },
  177. baseRequest(opUrl, postData) {
  178. return this.$channel.globeRequest('RoomSelectionInfoController', opUrl, postData, '')
  179. }
  180. }
  181. }
  182. </script>
  183. <style scoped>
  184. .ch-input .el-input__inner {
  185. border-color: #32323A;
  186. }
  187. .ch-input-size {
  188. width: 150px;
  189. }
  190. .ch-button {
  191. border-color: #32323A;
  192. background-color: #32323A;
  193. color: #fff;
  194. }
  195. .ch-button-warning {
  196. margin-left: 10px;
  197. border-color: #E6A23C;
  198. background-color: #E6A23C;
  199. color: #fff;
  200. }
  201. .ch-button-export {
  202. margin-left: 10px;
  203. border-color: #98CC1F;
  204. background-color: #98CC1F;
  205. color: #fff;
  206. }
  207. /deep/.el-dialog__header {
  208. padding: 10px 20px;
  209. }
  210. /deep/.el-dialog__body {
  211. padding: 10px 20px;
  212. }
  213. </style>