index.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. <span>房屋&nbsp;</span>
  8. <el-input v-model="search.houseName" class="ch-input ch-input-size" placeholder="房屋" size="small" @keyup.enter.native="handleSearch()" />
  9. <span>收款状态&nbsp;</span>
  10. <el-select
  11. v-model="search.collectionStatus"
  12. clearable
  13. filterable
  14. placeholder="收款状态"
  15. :popper-append-to-body="false"
  16. popper-class="statistic_base"
  17. size="small"
  18. @change="handleSearch"
  19. >
  20. <el-option
  21. v-for="item in dc_data.HOUSE_PAYMENT_STATUS"
  22. :key="item.value"
  23. :label="item.label"
  24. :value="item.value"
  25. :popper-append-to-body="false"
  26. popper-class="statistic_base"
  27. />
  28. </el-select>
  29. </el-col>
  30. </el-row>
  31. <el-row class="handle-box" style="margin-bottom: 10px">
  32. <el-col :span="24" style="margin-top: 20px">
  33. <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
  34. <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
  35. </el-col>
  36. </el-row>
  37. <el-row class="handle-box">
  38. <el-col :span="24">
  39. <el-table
  40. v-loading="loading"
  41. :data="AllData"
  42. row-class-name="g_table_row"
  43. border
  44. :header-cell-style="{background:'#f2f2f2'}"
  45. >
  46. <el-table-column type="index" width="60" />
  47. <el-table-column label="合同编号" prop="contractNumber" />
  48. <el-table-column label="买受人" prop="buyerName" width="200" />
  49. <el-table-column label="房屋" prop="houseName" width="200" />
  50. <el-table-column label="实测建筑面积(㎡)" prop="actualBuildArea" width="110" />
  51. <el-table-column label="买卖单价(㎡)" prop="housePrice" />
  52. <el-table-column label="买受人产权份额占比" prop="buyerProportion" />
  53. <el-table-column label="付款方式" prop="paymentMethodStr" />
  54. <el-table-column label="应收房款(元)" prop="buyerMoney" />
  55. <el-table-column label="已收房款(元)" prop="receivedMoney" />
  56. <el-table-column label="尚欠房款(元)" prop="arrears" />
  57. <el-table-column label="收款状态" prop="collectionStatusStr" width="110">
  58. <template scope="scope">
  59. <span
  60. :style="{'color':scope.row.collectionStatusStr==='已退款'?'red':scope.row.collectionStatusStr==='完全收款'?'green':'gray'}"
  61. >
  62. {{ scope.row.collectionStatusStr }}
  63. </span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column header-align="center" label="操作" width="200">
  67. <template scope="scope">
  68. <el-button :disabled="scope.row.collectionStatus !== 1" size="mini" type="text" @click="handleEdit(scope.row)">预收款登记</el-button>
  69. <el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. <div class="table-page">
  74. <el-pagination
  75. :current-page.sync="currentPage"
  76. :page-sizes="[10, 20, 50, 100]"
  77. :page-size="pageSize"
  78. background
  79. layout="total, sizes, prev, pager, next, jumper"
  80. :total="allpage"
  81. @size-change="handleSizeChange"
  82. @current-change="handleCurrentChange"
  83. />
  84. </div>
  85. </el-col>
  86. </el-row>
  87. <!-- 预收款登记 -->
  88. <el-dialog
  89. :visible.sync="dialogVisible"
  90. :close-on-click-modal="false"
  91. :close-on-press-escape="false"
  92. title=""
  93. width="90%"
  94. top="20px"
  95. class="statistic_base"
  96. :append-to-body="true"
  97. :modal-append-to-body="true"
  98. custom-class="tagdialog"
  99. @close="getData"
  100. >
  101. <payment-registration v-if="dialogVisible" ref="paymentRegistration" @cancel="cancel" />
  102. </el-dialog>
  103. </div>
  104. </template>
  105. <script>
  106. import Base from '@/views/base/base'
  107. import BaseData from '@/views/base/baseData'
  108. import PaymentRegistration from '@/views/receiveRefundsManagement/paymentManagement/paymentRegistration.vue'
  109. export default {
  110. name: 'PaymentManagementIndex',
  111. components: { PaymentRegistration },
  112. mixins: [Base, BaseData],
  113. data() {
  114. return {
  115. dc_key: ['CONTRACT_STATUS', 'HOUSE_PAYMENT_STATUS', 'PAYMENT_METHODS'],
  116. // 列表相关
  117. search: {
  118. },
  119. AllData: [],
  120. loading: false,
  121. // 弹框相关
  122. dialogVisible: false,
  123. dialogTitle: '新增'
  124. }
  125. },
  126. mounted() {
  127. this.initDict(this.dc_key).then((res) => {
  128. this.getData()
  129. })
  130. },
  131. methods: {
  132. getData: function() {
  133. const _this = this
  134. _this.loading = true
  135. _this.AllData = []
  136. this.search.pageNum = this.currentPage
  137. this.search.pageSize = this.pageSize
  138. this.search.payType = 1
  139. this.baseRequest('list', this.search).then((res) => {
  140. if (res.data.rows) {
  141. res.data.rows.forEach(function(item) {
  142. const json = _this.getItemJson(item)
  143. _this.AllData.push(json)
  144. })
  145. _this.allpage = res.data.total
  146. }
  147. _this.loading = false
  148. }).catch((e) => {
  149. // console.log(e)
  150. })
  151. // this.initOutData()
  152. },
  153. handleSearch: function() {
  154. this.getData()
  155. },
  156. handleReset: function() {
  157. for (const i in this.search) {
  158. if (i !== 'pageNum' && i !== 'pageSize') {
  159. this.search[i] = ''
  160. }
  161. }
  162. this.handleSearch()
  163. },
  164. getItemJson: function(item) {
  165. item.paymentMethodStr = this.dc_map.PAYMENT_METHODS[item.paymentMethod]
  166. item.collectionStatusStr = this.dc_map.HOUSE_PAYMENT_STATUS[item.collectionStatus]
  167. return item
  168. },
  169. /* 编辑*/
  170. handleEdit: function(val) {
  171. this.dialogVisible = true
  172. val.isView = false
  173. // 新vue时调用的方法
  174. this.$nextTick(() => {
  175. this.$refs.paymentRegistration.initData(val)
  176. })
  177. },
  178. handleView(val) {
  179. this.dialogVisible = true
  180. val.isView = true
  181. // 新vue时调用的方法
  182. this.$nextTick(() => {
  183. this.$refs.paymentRegistration.initData(val)
  184. })
  185. },
  186. cancel: function() {
  187. this.dialogVisible = false
  188. },
  189. baseRequest(opUrl, postData) {
  190. return this.$channel.globeRequest('PayLogController', opUrl, postData, 'project')
  191. }
  192. }
  193. }
  194. </script>
  195. <style scoped>
  196. .ch-input .el-input__inner {
  197. border-color: #32323A;
  198. }
  199. .ch-input-size {
  200. width: 150px;
  201. }
  202. .ch-button {
  203. border-color: #32323A;
  204. background-color: #32323A;
  205. color: #fff;
  206. }
  207. .ch-button-warning {
  208. margin-left: 10px;
  209. border-color: #E6A23C;
  210. background-color: #E6A23C;
  211. color: #fff;
  212. }
  213. .ch-button-export {
  214. margin-left: 10px;
  215. border-color: #98CC1F;
  216. background-color: #98CC1F;
  217. color: #fff;
  218. }
  219. /deep/.el-dialog__header {
  220. padding: 10px 20px;
  221. }
  222. /deep/.el-dialog__body {
  223. padding: 10px 20px;
  224. }
  225. </style>