index.vue 7.7 KB

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