refundRecordIndex.vue 11 KB

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