refundRecordIndex.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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. style="width: 100%"
  14. @change="handleChange"
  15. />
  16. </el-col>
  17. <el-col :span="2">
  18. <div style="text-align: center"><span>退款日期</span></div>
  19. </el-col>
  20. <el-col :span="4">
  21. <el-date-picker
  22. v-model="search.collectionDateFrom"
  23. popper-class="statistic_base"
  24. type="date"
  25. placeholder="年月日"
  26. value-format="yyyy-MM-dd"
  27. style="width: 100%"
  28. />
  29. </el-col>
  30. <el-col :span="2">
  31. <div style="text-align: center"><span>至</span></div>
  32. </el-col>
  33. <el-col :span="4">
  34. <el-date-picker
  35. v-model="search.collectionDateTo"
  36. popper-class="statistic_base"
  37. type="date"
  38. placeholder="年月日"
  39. value-format="yyyy-MM-dd"
  40. style="width: 100%"
  41. />
  42. </el-col>
  43. </el-row>
  44. <el-row class="handle-box" style="margin-bottom: 10px">
  45. <el-col :span="2">
  46. <span>姓名</span>
  47. </el-col>
  48. <el-col :span="4">
  49. <el-input v-model="search.buyerName" />
  50. </el-col>
  51. <el-col :span="2">
  52. <div style="text-align: center"><span>退款类型</span></div>
  53. </el-col>
  54. <el-col :span="4">
  55. <el-select
  56. v-model="search.contentType"
  57. style="width: 100%"
  58. clearable
  59. filterable
  60. placeholder="收款类型"
  61. @change="handleSearch"
  62. >
  63. <el-option
  64. v-for="item in dc_data.CONTENT_TYPE"
  65. :key="item.value"
  66. :label="item.label"
  67. :value="item.value"
  68. />
  69. </el-select>
  70. </el-col>
  71. </el-row>
  72. <el-row class="handle-box" style="margin-bottom: 10px">
  73. <el-col :span="24" style="margin-top: 20px">
  74. <el-button size="small" class="ch-button-export" style="float: right" @click="handleExcel"><i class="el-icon-menu" />&nbsp;导出EXCEL</el-button>
  75. <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
  76. <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
  77. <el-button type="primary" size="small" style="float: right" @click="handleAdd()">&nbsp;NCC提交</el-button>
  78. </el-col>
  79. </el-row>
  80. <el-row class="handle-box">
  81. <el-col :span="24">
  82. <el-table
  83. ref="myTable"
  84. v-loading="loading"
  85. :data="AllData"
  86. row-class-name="g_table_row"
  87. border
  88. :header-cell-style="{background:'#f2f2f2'}"
  89. @selection-change="handleSelectionChange"
  90. >
  91. <el-table-column type="index" width="60" />
  92. <el-table-column label="房屋" prop="houseName" width="250" />
  93. <el-table-column label="流水号" prop="serialNumber" width="250" />
  94. <el-table-column label="买受人" prop="buyerName" width="200" />
  95. <el-table-column label="金额(元)" prop="money" width="200" />
  96. <el-table-column label="退款类型" prop="contentTypeStr" width="110" />
  97. <!-- <el-table-column label="收款方式" prop="paymentMethodStr" />-->
  98. <el-table-column label="付款账号" prop="bankNumber" />
  99. <el-table-column label="银行流水号" prop="bankSerialId" />
  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. @close="handleClose"
  129. >
  130. <ncc-submit-index v-if="dialogVisible" ref="nccSubmit" @editClose="handleClose" />
  131. </el-dialog>
  132. </div>
  133. </template>
  134. <script>
  135. import Base from '@/views/base/base'
  136. import BaseData from '@/views/base/baseData'
  137. import NccSubmitIndex from '@/views/transactionRecord/nccSubmitIndex.vue'
  138. export default {
  139. name: 'RefundRecordIndexVue',
  140. components: { NccSubmitIndex },
  141. mixins: [Base, BaseData],
  142. props: {
  143. fromAddress: {
  144. type: String,
  145. default: ''
  146. }
  147. },
  148. data() {
  149. return {
  150. dc_key: ['CONTENT_TYPE', 'COLLECTION_METHODS'],
  151. // 列表相关
  152. search: {
  153. },
  154. AllData: [],
  155. loading: false,
  156. // 弹框相关
  157. dialogVisible: false,
  158. dialogTitle: '新增',
  159. selectedRows: [],
  160. selectId: '',
  161. options: []
  162. }
  163. },
  164. mounted() {
  165. this.getTreeSelectData()
  166. this.initDict(this.dc_key).then((res) => {
  167. this.getData()
  168. })
  169. },
  170. methods: {
  171. getTreeSelectData: function() {
  172. this.baseInfoRequest('getTreeData3', {}).then((res) => {
  173. this.options = res.data.data
  174. }).catch(() => {
  175. })
  176. },
  177. getData: function() {
  178. const _this = this
  179. _this.loading = true
  180. _this.AllData = []
  181. this.search.pageNum = this.currentPage
  182. this.search.pageSize = this.pageSize
  183. if (this.search.findids && this.search.findids.length > 0) {
  184. const data = []
  185. this.search.findids.forEach(item => {
  186. if (item[1]) {
  187. data.push(item[1])
  188. }
  189. })
  190. this.search.discIds = data.join(',')
  191. }
  192. this.baseRequest('refundRecord', this.search).then((res) => {
  193. if (res.data.rows) {
  194. res.data.rows.forEach(function(item) {
  195. const json = _this.getItemJson(item)
  196. _this.AllData.push(json)
  197. })
  198. _this.allpage = res.data.total
  199. }
  200. _this.loading = false
  201. }).catch((e) => {
  202. // console.log(e)
  203. })
  204. // this.initOutData()
  205. },
  206. handleSearch: function() {
  207. this.getData()
  208. },
  209. handleReset: function() {
  210. for (const i in this.search) {
  211. if (i !== 'pageNum' && i !== 'pageSize') {
  212. this.search[i] = ''
  213. }
  214. }
  215. this.handleSearch()
  216. },
  217. getItemJson: function(item) {
  218. item.contentTypeStr = this.dc_map.CONTENT_TYPE[item.contentType]
  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.AllData = []
  243. this.OutData = []
  244. const title = ['单元/楼栋号', '所在层', '户室号', '套内面积', '建筑面积', '用途', '装修情况',
  245. '可售状态', '已售状态']
  246. this.OutData.push(title)
  247. const temp = []
  248. this.baseRequest('refundRecordListAll', _this.search).then(res => {
  249. const data = res.data
  250. data.data.forEach(function(item) {
  251. const json = _this.getItemJson(item)
  252. temp.push(json)
  253. })
  254. temp.forEach(function(item) {
  255. const jsonArray = []
  256. jsonArray.push(item.buildName)
  257. jsonArray.push(item.floor)
  258. jsonArray.push(item.roomNo)
  259. jsonArray.push(item.actualInternalArea)
  260. jsonArray.push(item.actualBuildArea)
  261. jsonArray.push(item.roomUse)
  262. jsonArray.push(item.decorationSituationStr)
  263. jsonArray.push(item.saleStatusStr)
  264. jsonArray.push(item.soldStatusStr)
  265. _this.OutData.push(jsonArray)
  266. })
  267. const OutSize = [{ wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 },
  268. { wch: 15 }, { wch: 15 }]
  269. const fileName = '收款记录导出 ' + new Date().Format('yyyyMMddhhmm')
  270. this.$outputXlsxFile(this.OutData, OutSize, fileName)
  271. })
  272. },
  273. cancel: function() {
  274. this.dialogVisible = false
  275. },
  276. baseRequest(opUrl, postData) {
  277. return this.$channel.globeRequest('TransactionRecordController', opUrl, postData, 'project')
  278. },
  279. baseInfoRequest: function(opUrl, postData) {
  280. return this.$channel.baseRequest('ParkInfoController', opUrl, postData, 'User')
  281. }
  282. }
  283. }
  284. </script>
  285. <style lang="scss">
  286. .newIndexDiv{
  287. .qyrqBox{
  288. display: inline-flex;align-items: center;
  289. .el-input{
  290. width: 220px !important;
  291. }
  292. }
  293. }
  294. </style>
  295. <style scoped>
  296. .ch-input .el-input__inner {
  297. border-color: #32323A;
  298. }
  299. .ch-input-size {
  300. width: 150px;
  301. }
  302. .ch-button {
  303. border-color: #32323A;
  304. background-color: #32323A;
  305. color: #fff;
  306. }
  307. .ch-button-warning {
  308. margin-left: 10px;
  309. border-color: #E6A23C;
  310. background-color: #E6A23C;
  311. color: #fff;
  312. }
  313. .ch-button-export {
  314. margin-left: 10px;
  315. border-color: #98CC1F;
  316. background-color: #98CC1F;
  317. color: #fff;
  318. }
  319. /deep/.el-dialog__header {
  320. padding: 10px 20px;
  321. }
  322. /deep/.el-dialog__body {
  323. padding: 10px 20px;
  324. }
  325. </style>