123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306 |
- <template>
- <div>
- <el-row class="handle-box" style="margin-bottom: 10px">
- <el-col :span="8">
- <div class="Pageform">
- <div class="formlabel">申请人</div>
- <div class="formvalue">
- <el-input v-model="search.applicant" class="ch-input ch-input-size" placeholder="买受人" size="small" @keyup.enter.native="handleSearch()" />
- </div>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="Pageform">
- <div class="formlabel">房屋</div>
- <div class="formvalue">
- <el-input v-model="search.houseName" class="ch-input ch-input-size" placeholder="房号" size="small" @keyup.enter.native="handleSearch()" />
- </div>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="Pageform">
- <div class="formlabel">身份证</div>
- <div class="formvalue">
- <el-input v-model="search.buyerIdentityCard" class="ch-input ch-input-size" placeholder="身份证" size="small" @keyup.enter.native="handleSearch()" />
- </div>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="Pageform">
- <div class="formlabel">批次号</div>
- <div class="formvalue">
- <el-input v-model="search.batchNumber" class="ch-input ch-input-size" placeholder="批次号" size="small" @keyup.enter.native="handleSearch()" />
- </div>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="Pageform">
- <div class="formlabel">退款日期</div>
- <div class="formvalue">
- <el-date-picker
- v-model="search.refundDateFrom"
- value-format="yyyy-MM-dd"
- format="yyyy-MM-dd"
- size="small"
- type="date"
- placeholder="开始日期"
- />
- <div class="zhi">至</div>
- <el-date-picker
- v-model="search.refundDateTo"
- value-format="yyyy-MM-dd"
- format="yyyy-MM-dd"
- size="small"
- type="date"
- placeholder="终止日期"
- />
- </div>
- </div>
- </el-col>
- </el-row>
- <el-row class="handle-box" style="margin-bottom: 10px">
- <el-col :span="24" style="margin-top: 20px">
- <el-button v-if="$has('refundExport')" :loading="excelFlag" size="small" class="ch-button-export" style="float: right;" @click="handleExcel"><i class="el-icon-menu" /> 导出EXCEL</el-button>
- <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" /> 重置</el-button>
- <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" /> 查询</el-button>
- <el-button class="ch-button-add" size="small" style="float: right;" @click="handleAdd()"><i class="el-icon-menu" /> 新增</el-button>
- </el-col>
- </el-row>
- <el-row class="handle-box">
- <el-col :span="24">
- <el-table
- v-loading="loading"
- :data="AllData"
- row-class-name="g_table_row"
- border
- :header-cell-style="{background:'#f2f2f2'}"
- >
- <el-table-column type="index" width="60" />
- <el-table-column label="合同编号" prop="contractNumber" width="200" />
- <el-table-column label="申请人" prop="applicant" width="200" />
- <el-table-column label="买受人" prop="buyerName" width="200" />
- <el-table-column label="房屋" prop="houseName" width="200" />
- <el-table-column label="退房原因" prop="reasonStr" width="110" />
- <el-table-column label="应退(元)" prop="refundAmount" />
- <el-table-column label="实退(元)" prop="actualRefundAmount" />
- <el-table-column label="扣除" prop="deductible" />
- <el-table-column label="关联审批单号" prop="approvalNumber" />
- <el-table-column header-align="center" label="操作" width="200">
- <template scope="scope">
- <el-button size="mini" type="text" @click="handleEdit(scope.row)">编辑</el-button>
- <el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div class="table-page">
- <el-pagination
- :current-page.sync="currentPage"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="pageSize"
- background
- layout="total, sizes, prev, pager, next, jumper"
- :total="allpage"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- />
- </div>
- </el-col>
- </el-row>
- <!-- 预收款登记 -->
- <el-dialog
- :visible.sync="dialogVisible"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- title=""
- width="90%"
- top="20px"
- class="statistic_base"
- :append-to-body="true"
- :modal-append-to-body="true"
- custom-class="tagdialog"
- @close="getData"
- >
- <add-refund v-if="dialogVisible" ref="addRefund" @cancel="cancel" />
- </el-dialog>
- </div>
- </template>
- <script>
- import Base from '@/views/base/base'
- import BaseData from '@/views/base/baseData'
- import AddRefund from '@/views/receiveRefundsManagement/refundManagement/addRefund.vue'
- export default {
- name: 'RefundManagementIndex',
- components: { AddRefund },
- mixins: [Base, BaseData],
- data() {
- return {
- dc_key: ['CHECK_OUT_REASON'],
- // 列表相关
- search: {
- },
- AllData: [],
- loading: false,
- // 弹框相关
- dialogVisible: false,
- dialogTitle: '新增',
- excelFlag: false
- }
- },
- mounted() {
- this.initDict(this.dc_key).then((res) => {
- this.getData()
- })
- },
- methods: {
- getData: function() {
- const _this = this
- _this.loading = true
- _this.AllData = []
- this.search.pageNum = this.currentPage
- this.search.pageSize = this.pageSize
- this.search.payType = 1
- this.baseRequest('list', this.search).then((res) => {
- if (res.data.rows) {
- res.data.rows.forEach(function(item) {
- const json = _this.getItemJson(item)
- _this.AllData.push(json)
- })
- _this.allpage = res.data.total
- }
- _this.loading = false
- }).catch((e) => {
- })
- },
- handleSearch: function() {
- this.getData()
- },
- handleReset: function() {
- for (const i in this.search) {
- if (i !== 'pageNum' && i !== 'pageSize') {
- this.search[i] = ''
- }
- }
- this.handleSearch()
- },
- getItemJson: function(item) {
- item.reasonStr = this.dc_map.CHECK_OUT_REASON[item.reason]
- return item
- },
- handleAdd: function() {
- this.dialogVisible = true
- const val = {
- isView: false
- }
- // 新vue时调用的方法
- this.$nextTick(() => {
- this.$refs.addRefund.initData(val)
- })
- },
- /* 编辑*/
- handleEdit: function(val) {
- this.dialogVisible = true
- val.isView = false
- // 新vue时调用的方法
- this.$nextTick(() => {
- this.$refs.addRefund.initData(val)
- })
- },
- handleView(val) {
- this.dialogVisible = true
- val.isView = true
- // 新vue时调用的方法
- this.$nextTick(() => {
- this.$refs.addRefund.initData(val)
- })
- },
- cancel: function() {
- this.dialogVisible = false
- },
- // 导出
- handleExcel: function() {
- const _this = this
- _this.excelFlag = true
- this.search.pageNum = this.currentPage
- this.search.pageSize = this.pageSize
- this.OutData = []
- const title = ['关联审批单号', '申请人', '身份证号', '退房原因', '所退房屋', '买受人', '款项', '已收(元)', '扣除',
- '实退(元)', '应退金额(元)', '扣除金额(元)', '实退金额(元)', '收款账号', '备注'
- ]
- this.OutData.push(title)
- const temp = []
- this.baseRequest('excelList', _this.search).then(res => {
- const data = res.data
- data.data.forEach(function(item) {
- const json = _this.getItemJson(item)
- temp.push(json)
- })
- temp.forEach(function(item) {
- const jsonArray = []
- jsonArray.push(item.approvalNumber)
- jsonArray.push(item.applicant)
- jsonArray.push(item.identityCard)
- jsonArray.push(item.reasonStr)
- jsonArray.push(item.houseName)
- jsonArray.push(item.buyerName)
- jsonArray.push(item.contentTypeStr)
- jsonArray.push(item.receivedAmountInfo)
- jsonArray.push(item.deductibleInfo)
- jsonArray.push(item.actualRefundAmountInfo)
- jsonArray.push(item.refundAmount)
- jsonArray.push(item.deductible)
- jsonArray.push(item.actualRefundAmount)
- jsonArray.push(item.bankNumber)
- jsonArray.push(item.remark)
- _this.OutData.push(jsonArray)
- })
- const OutSize = [{ wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }]
- const fileName = '退款导出 ' + new Date().Format('yyyyMMddhhmm')
- this.$outputXlsxFile(this.OutData, OutSize, fileName)
- _this.excelFlag = false
- })
- },
- baseRequest(opUrl, postData) {
- return this.$channel.globeRequest('RefundManageController', opUrl, postData, 'project')
- }
- }
- }
- </script>
- <style scoped>
- .ch-input .el-input__inner {
- border-color: #32323A;
- }
- .ch-input-size {
- width: 150px;
- }
- .ch-button {
- border-color: #32323A;
- background-color: #32323A;
- color: #fff;
- }
- .ch-button-warning {
- margin-left: 10px;
- border-color: #E6A23C;
- background-color: #E6A23C;
- color: #fff;
- }
- .ch-button-export {
- margin-left: 10px;
- border-color: #98CC1F;
- background-color: #98CC1F;
- color: #fff;
- }
- /deep/.el-dialog__header {
- padding: 10px 20px;
- }
- /deep/.el-dialog__body {
- padding: 10px 20px;
- }
- </style>
|