convertRecordIndex.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <template>
  2. <div class="newIndexDiv">
  3. <el-row class="handle-box" style="margin-bottom: 10px">
  4. <el-col :span="2">
  5. <span>分期</span>
  6. </el-col>
  7. <el-col :span="4">
  8. <el-cascader
  9. v-model="search.findids"
  10. :append-to-body="false"
  11. :options="options"
  12. clearable
  13. :props="{ multiple: true}"
  14. style="width: 100%"
  15. @change="handleChange"
  16. />
  17. </el-col>
  18. <el-col :span="2">
  19. <div style="text-align: center"><span>转换日期</span></div>
  20. </el-col>
  21. <el-col :span="4">
  22. <el-date-picker
  23. v-model="search.collectionDateFrom"
  24. popper-class="statistic_base"
  25. type="date"
  26. placeholder="年月日"
  27. value-format="yyyy-MM-dd"
  28. style="width: 100%"
  29. />
  30. </el-col>
  31. <el-col :span="2">
  32. <div style="text-align: center"><span>至</span></div>
  33. </el-col>
  34. <el-col :span="4">
  35. <el-date-picker
  36. v-model="search.collectionDateTo"
  37. popper-class="statistic_base"
  38. type="date"
  39. placeholder="年月日"
  40. value-format="yyyy-MM-dd"
  41. style="width: 100%"
  42. />
  43. </el-col>
  44. </el-row>
  45. <el-row class="handle-box" style="margin-bottom: 10px">
  46. <el-col :span="2">
  47. <span>姓名</span>
  48. </el-col>
  49. <el-col :span="4">
  50. <el-input v-model="search.buyerName" />
  51. </el-col>
  52. <el-col :span="2">
  53. <div style="text-align: center"><span>转换类型</span></div>
  54. </el-col>
  55. <el-col :span="4">
  56. <el-select
  57. v-model="search.convertType"
  58. style="width: 100%"
  59. clearable
  60. filterable
  61. placeholder="转换类型"
  62. @change="handleSearch"
  63. >
  64. <el-option
  65. v-for="item in dc_data.CONVERT_TYPE"
  66. :key="item.value"
  67. :label="item.label"
  68. :value="item.value"
  69. />
  70. </el-select>
  71. </el-col>
  72. </el-row>
  73. <el-row class="handle-box" style="margin-bottom: 10px">
  74. <el-col :span="24" style="margin-top: 20px">
  75. <el-button size="small" class="ch-button-export" style="float: right" @click="handleExcel"><i class="el-icon-menu" />&nbsp;导出EXCEL</el-button>
  76. <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
  77. <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
  78. <el-button type="primary" size="small" style="float: right" @click="handleAdd()">&nbsp;NCC提交</el-button>
  79. </el-col>
  80. </el-row>
  81. <el-row class="handle-box">
  82. <el-col :span="24">
  83. <el-table
  84. ref="myTable"
  85. v-loading="loading"
  86. :data="AllData"
  87. row-class-name="g_table_row"
  88. border
  89. :header-cell-style="{background:'#f2f2f2'}"
  90. @selection-change="handleSelectionChange"
  91. >
  92. <el-table-column type="index" width="60" />
  93. <el-table-column label="房屋" prop="houseName" width="250" />
  94. <el-table-column label="流水号" prop="serialNumber" width="250" />
  95. <el-table-column label="买受人" prop="buyerName" width="200" />
  96. <el-table-column label="金额(元)" prop="money" width="200" />
  97. <el-table-column label="转换类型" prop="convertTypeStr" width="110" />
  98. <el-table-column label="转换日期" prop="convertDate" />
  99. <el-table-column label="付款账号" prop="bankNumber" />
  100. <el-table-column label="转换经办人" prop="createdName" />
  101. <el-table-column label="NCC提交状态" prop="ncSubmitStatusStr" />
  102. <el-table-column label="最近提交日期" prop="ncSubmitDate" />
  103. <el-table-column label="NCC提交人" prop="ncSubmitName" />
  104. </el-table>
  105. <div class="table-page">
  106. <el-pagination
  107. :current-page.sync="currentPage"
  108. :page-sizes="[10, 20, 50, 100]"
  109. :page-size="pageSize"
  110. background
  111. layout="total, sizes, prev, pager, next, jumper"
  112. :total="allpage"
  113. @size-change="handleSizeChange"
  114. @current-change="handleCurrentChange"
  115. />
  116. </div>
  117. </el-col>
  118. </el-row>
  119. <!-- ncc提交 -->
  120. <el-dialog
  121. :title="dialogTitle"
  122. :visible.sync="dialogVisible"
  123. width="50%"
  124. top="50px"
  125. :close-on-press-escape="false"
  126. :close-on-click-modal="false"
  127. append-to-body
  128. >
  129. <ncc-submit-index v-if="dialogVisible" ref="nccSubmit" @editClose="handleClose" />
  130. </el-dialog>
  131. </div>
  132. </template>
  133. <script>
  134. import Base from '@/views/base/base'
  135. import BaseData from '@/views/base/baseData'
  136. import NccSubmitIndex from '@/views/transactionRecord/nccSubmitIndex.vue'
  137. export default {
  138. name: 'ConvertRecordIndex',
  139. components: { NccSubmitIndex },
  140. mixins: [Base, BaseData],
  141. props: {
  142. fromAddress: {
  143. type: String,
  144. default: ''
  145. }
  146. },
  147. data() {
  148. return {
  149. dc_key: ['CONTENT_TYPE', 'COLLECTION_METHODS', 'CONVERT_TYPE'],
  150. // 列表相关
  151. search: {
  152. },
  153. AllData: [],
  154. loading: false,
  155. // 弹框相关
  156. dialogVisible: false,
  157. dialogTitle: '新增',
  158. selectedRows: [],
  159. selectId: '',
  160. options: []
  161. }
  162. },
  163. mounted() {
  164. this.getTreeSelectData()
  165. this.initDict(this.dc_key).then((res) => {
  166. this.getData()
  167. })
  168. },
  169. methods: {
  170. getTreeSelectData: function() {
  171. this.baseInfoRequest('getTreeData3', {}).then((res) => {
  172. this.options = res.data.data
  173. }).catch(() => {
  174. })
  175. },
  176. getData: function() {
  177. const _this = this
  178. _this.loading = true
  179. _this.AllData = []
  180. this.search.pageNum = this.currentPage
  181. this.search.pageSize = this.pageSize
  182. if (this.search.findids && this.search.findids.length > 0) {
  183. const data = []
  184. this.search.findids.forEach(item => {
  185. if (item[1]) {
  186. data.push(item[1])
  187. }
  188. })
  189. this.search.discIds = data.join(',')
  190. }
  191. this.baseRequest('convertRecord', this.search).then((res) => {
  192. if (res.data.rows) {
  193. res.data.rows.forEach(function(item) {
  194. const json = _this.getItemJson(item)
  195. _this.AllData.push(json)
  196. })
  197. _this.allpage = res.data.total
  198. }
  199. _this.loading = false
  200. }).catch((e) => {
  201. // console.log(e)
  202. })
  203. // this.initOutData()
  204. },
  205. handleSearch: function() {
  206. this.getData()
  207. },
  208. handleReset: function() {
  209. for (const i in this.search) {
  210. if (i !== 'pageNum' && i !== 'pageSize') {
  211. this.search[i] = ''
  212. }
  213. }
  214. this.handleSearch()
  215. },
  216. getItemJson: function(item) {
  217. // item.contentTypeStr = this.dc_map.CONTENT_TYPE[item.contentType]
  218. item.convertTypeStr = this.dc_map.CONVERT_TYPE[item.convertType]
  219. item.paymentMethodStr = this.dc_map.COLLECTION_METHODS[item.paymentMethod]
  220. item.ncSubmitStatusStr = item.ncSubmitStatus == '1' ? '已提交' : '未提交'
  221. return item
  222. },
  223. /* ncc提交*/
  224. handleAdd: function(val) {
  225. this.dialogTitle = 'NCC提交'
  226. this.dialogVisible = true
  227. this.$nextTick(() => {
  228. this.$refs.nccSubmit.initData('转换')
  229. })
  230. },
  231. handleClose(refresh) {
  232. this.dialogVisible = false
  233. this.getData()
  234. },
  235. handleView(val) {
  236. },
  237. handleChange() {
  238. },
  239. // 导出
  240. handleExcel: function() {
  241. const _this = this
  242. this.OutData = []
  243. const title = ['房屋', '流水号', '买受人', '金额(元)', '转换类型', '转换日期', '付款账号',
  244. '转换经办人', 'NCC提交状态', '最近提交日期', 'NCC提交人']
  245. this.OutData.push(title)
  246. const temp = []
  247. this.baseRequest('convertRecordListAll', _this.search).then(res => {
  248. const data = res.data
  249. data.forEach(function(item) {
  250. const json = _this.getItemJson(item)
  251. temp.push(json)
  252. })
  253. temp.forEach(function(item) {
  254. const jsonArray = []
  255. jsonArray.push(item.houseName)
  256. jsonArray.push(item.serialNumber)
  257. jsonArray.push(item.buyerName)
  258. jsonArray.push(item.money)
  259. jsonArray.push(item.convertTypeStr)
  260. jsonArray.push(item.convertDate)
  261. jsonArray.push(item.bankNumber)
  262. jsonArray.push(item.createdName)
  263. jsonArray.push(item.ncSubmitStatusStr)
  264. jsonArray.push(item.ncSubmitDate)
  265. jsonArray.push(item.ncSubmitName)
  266. _this.OutData.push(jsonArray)
  267. })
  268. const OutSize = [{ wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 },
  269. { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }]
  270. const fileName = '转换记录导出 ' + new Date().Format('yyyyMMddhhmm')
  271. this.$outputXlsxFile(this.OutData, OutSize, fileName)
  272. })
  273. },
  274. cancel: function() {
  275. this.dialogVisible = false
  276. },
  277. baseRequest(opUrl, postData) {
  278. return this.$channel.globeRequest('TransactionRecordController', opUrl, postData, 'project')
  279. },
  280. baseInfoRequest: function(opUrl, postData) {
  281. return this.$channel.baseRequest('ParkInfoController', opUrl, postData, 'User')
  282. }
  283. }
  284. }
  285. </script>
  286. <style lang="scss">
  287. .newIndexDiv{
  288. .qyrqBox{
  289. display: inline-flex;align-items: center;
  290. .el-input{
  291. width: 220px !important;
  292. }
  293. }
  294. }
  295. </style>
  296. <style scoped>
  297. .ch-input .el-input__inner {
  298. border-color: #32323A;
  299. }
  300. .ch-input-size {
  301. width: 150px;
  302. }
  303. .ch-button {
  304. border-color: #32323A;
  305. background-color: #32323A;
  306. color: #fff;
  307. }
  308. .ch-button-warning {
  309. margin-left: 10px;
  310. border-color: #E6A23C;
  311. background-color: #E6A23C;
  312. color: #fff;
  313. }
  314. .ch-button-export {
  315. margin-left: 10px;
  316. border-color: #98CC1F;
  317. background-color: #98CC1F;
  318. color: #fff;
  319. }
  320. /deep/.el-dialog__header {
  321. padding: 10px 20px;
  322. }
  323. /deep/.el-dialog__body {
  324. padding: 10px 20px;
  325. }
  326. </style>