projectArchives.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <div>
  3. <el-row class="handle-box" style="margin-bottom: 10px">
  4. <el-col :span="2">
  5. <div style="text-align: center"><span>楼盘</span></div>
  6. </el-col>
  7. <el-col :span="4">
  8. <el-select
  9. v-model="search.groupId"
  10. style="width: 100%"
  11. clearable
  12. filterable
  13. @change="groupChange"
  14. >
  15. <el-option
  16. v-for="item in groupOption"
  17. :key="item.value"
  18. :label="item.label"
  19. :value="item.value"
  20. />
  21. </el-select>
  22. </el-col>
  23. <el-col :span="2">
  24. <div style="text-align: center"><span>分期</span></div>
  25. </el-col>
  26. <el-col :span="4">
  27. <el-select
  28. v-model="search.discId"
  29. style="width: 100%"
  30. clearable
  31. filterable
  32. @change="discChange"
  33. >
  34. <el-option
  35. v-for="item in discOption"
  36. :key="item.value"
  37. :label="item.label"
  38. :value="item.value"
  39. />
  40. </el-select>
  41. </el-col>
  42. <el-col :span="2">
  43. <div style="text-align: center"><span>关键字</span></div>
  44. </el-col>
  45. <el-col :span="4">
  46. <el-input v-model="search.roomNo" />
  47. </el-col>
  48. </el-row>
  49. <el-row class="handle-box" style="margin-bottom: 10px">
  50. <el-col :span="24" style="margin-top: 20px">
  51. <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
  52. <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
  53. </el-col>
  54. </el-row>
  55. <el-row class="handle-box">
  56. <el-col :span="24">
  57. <el-table
  58. v-loading="loading"
  59. :data="AllData"
  60. row-class-name="g_table_row"
  61. border
  62. :header-cell-style="{background:'#f2f2f2'}"
  63. >
  64. <el-table-column label="序号" type="index" width="60" />
  65. <el-table-column label="楼盘" prop="groupName" />
  66. <el-table-column label="分期" prop="discName" />
  67. <el-table-column label="楼栋数" prop="buildCount" />
  68. <el-table-column label="房屋总数" prop="roomCount" />
  69. <el-table-column label="待签约" prop="waitSigningCount" />
  70. <el-table-column label="已签约" prop="signingCount" />
  71. <el-table-column label="已结清数" prop="settledCount" />
  72. <el-table-column label="已入户数" prop="enteredCount" />
  73. <el-table-column header-align="center" label="操作">
  74. <template scope="scope">
  75. <el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
  76. </template>
  77. </el-table-column>
  78. </el-table>
  79. <div class="table-page">
  80. <el-pagination
  81. :current-page.sync="currentPage"
  82. :page-sizes="[10, 20, 50, 100]"
  83. :page-size="pageSize"
  84. background
  85. layout="total, sizes, prev, pager, next, jumper"
  86. :total="allpage"
  87. @size-change="handleSizeChange"
  88. @current-change="handleCurrentChange"
  89. />
  90. </div>
  91. </el-col>
  92. </el-row>
  93. <!-- 详情页面 -->
  94. <el-dialog
  95. :title="'项目详情'"
  96. :visible.sync="dialogVisible"
  97. width="75%"
  98. top="50px"
  99. :close-on-press-escape="false"
  100. :close-on-click-modal="false"
  101. append-to-body
  102. >
  103. <project-detail
  104. v-if="dialogVisible"
  105. ref="projectDetail"
  106. />
  107. </el-dialog>
  108. </div>
  109. </template>
  110. <script>
  111. import Base from '@/views/base/base'
  112. import BaseData from '@/views/base/baseData'
  113. import projectDetail from '@/views/reportForms/components/projectDetail.vue'
  114. export default {
  115. name: 'ProjectArchivesVue',
  116. components: { projectDetail },
  117. mixins: [Base, BaseData],
  118. data() {
  119. return {
  120. dc_key: ['INTENTIONAL_DEPOSIT_STATUS'],
  121. // 列表相关
  122. search: {
  123. },
  124. AllData: [],
  125. loading: false,
  126. options: [],
  127. dialogVisible: false,
  128. groupOption: [],
  129. discOption: [],
  130. buildOption: []
  131. }
  132. },
  133. mounted() {
  134. this.getGroupOption()
  135. // this.getDiscOption()
  136. this.initDict(this.dc_key).then((res) => {
  137. this.getData()
  138. })
  139. },
  140. methods: {
  141. groupChange() {
  142. this.discOption = []
  143. this.search.discId = ''
  144. this.search.roomNo = ''
  145. this.handleSearch()
  146. const data = {
  147. groupId: this.search.groupId
  148. }
  149. this.getDiscOption(data)
  150. },
  151. discChange() {
  152. this.search.roomNo = ''
  153. this.handleSearch()
  154. },
  155. getGroupOption() {
  156. this.baseGroupRequest('listAll', {}).then((res) => {
  157. const data = res.data
  158. this.groupOption = []
  159. data.forEach(item => {
  160. const obj = {
  161. value: item.groupId,
  162. label: item.groupName,
  163. key: item.groupId
  164. }
  165. this.groupOption.push(obj)
  166. })
  167. })
  168. },
  169. getDiscOption(data) {
  170. this.baseDiscRequest('listAll', data).then((res) => {
  171. const data = res.data
  172. this.discOption = []
  173. data.forEach(item => {
  174. const obj = {
  175. value: item.id,
  176. label: item.name,
  177. key: item.id
  178. }
  179. this.discOption.push(obj)
  180. })
  181. })
  182. },
  183. getData: function() {
  184. const _this = this
  185. _this.loading = true
  186. _this.AllData = []
  187. this.search.pageNum = this.currentPage
  188. this.search.pageSize = this.pageSize
  189. this.baseRequest('reportList', this.search).then((res) => {
  190. if (res.data.rows) {
  191. res.data.rows.forEach(function(item) {
  192. const json = _this.getItemJson(item)
  193. _this.AllData.push(json)
  194. })
  195. _this.allpage = res.data.total
  196. }
  197. _this.loading = false
  198. }).catch((e) => {
  199. // console.log(e)
  200. })
  201. // this.initOutData()
  202. },
  203. handleSearch: function() {
  204. this.getData()
  205. },
  206. handleReset: function() {
  207. for (const i in this.search) {
  208. if (i !== 'pageNum' && i !== 'pageSize') {
  209. this.search[i] = ''
  210. }
  211. }
  212. this.handleSearch()
  213. },
  214. getItemJson: function(item) {
  215. return item
  216. },
  217. handleView(val) {
  218. this.dialogVisible = true
  219. this.dialogTitle = '查看'
  220. // 新vue时调用的方法
  221. this.$nextTick(() => {
  222. this.$refs.projectDetail.initData(val)
  223. })
  224. },
  225. cancel: function() {
  226. this.dialogVisible = false
  227. },
  228. baseRequest(opUrl, postData) {
  229. return this.$channel.globeRequest('CustomerManagementController', opUrl, postData, '')
  230. },
  231. baseGroupRequest(opUrl, postData) {
  232. return this.$channel.globeRequest('ParkInfoController', opUrl, postData, 'project')
  233. },
  234. baseDiscRequest(opUrl, postData) {
  235. return this.$channel.globeRequest('ParkFloorDiscController', opUrl, postData, 'project')
  236. }
  237. }
  238. }
  239. </script>
  240. <style scoped>
  241. .ch-input .el-input__inner {
  242. border-color: #32323A;
  243. }
  244. .ch-input-size {
  245. width: 150px;
  246. }
  247. .ch-button {
  248. border-color: #32323A;
  249. background-color: #32323A;
  250. color: #fff;
  251. }
  252. .ch-button-warning {
  253. margin-left: 10px;
  254. border-color: #E6A23C;
  255. background-color: #E6A23C;
  256. color: #fff;
  257. }
  258. .ch-button-export {
  259. margin-left: 10px;
  260. border-color: #98CC1F;
  261. background-color: #98CC1F;
  262. color: #fff;
  263. }
  264. /deep/.el-dialog__header {
  265. padding: 10px 20px;
  266. }
  267. /deep/.el-dialog__body {
  268. padding: 10px 20px;
  269. }
  270. </style>