emis-frontend/src/views/emis/emisSettlePayRecord/index.vue

497 lines
21 KiB
Vue
Raw Normal View History

2024-07-22 00:43:22 +00:00
<template>
<div class="app-container">
<SearchForm :model="queryParams" ref="queryForm" size="small" :maxShow="3" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
2024-07-22 11:12:27 +00:00
<el-form-item label="支付类型" prop="payType">
<el-select v-model="queryParams.payType" placeholder="收款方式" clearable filterable style="width:100%">
<el-option label="企业微信收款" :value="3"></el-option>
<el-option label="对公付款" :value="4"></el-option>
<el-option label="微信支付" :value="1"></el-option>
<el-option label="支付宝支付" :value="2"></el-option>
<el-option label="其他" :value="5"></el-option>
</el-select>
2024-07-22 00:43:22 +00:00
</el-form-item>
2024-07-22 11:12:27 +00:00
<el-form-item label="收退类型" prop="recType">
<el-select v-model="queryParams.recType" placeholder="" clearable filterable style="width:100%">
<el-option label="收款" :value="1"></el-option>
<el-option label="退款" :value="2"></el-option>
</el-select>
2024-07-22 00:43:22 +00:00
</el-form-item>
2024-07-22 11:12:27 +00:00
<!-- <el-form-item label="" prop="payMan">
2024-07-22 00:43:22 +00:00
<el-input
v-model="queryParams.payMan"
:placeholder="$t('支付人名称')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="payManCode">
<el-input
v-model="queryParams.payManCode"
:placeholder="$t('支付人编码')"
clearable
@keyup.enter.native="handleQuery"
/>
2024-07-22 11:12:27 +00:00
</el-form-item> -->
<el-form-item label="总账单号" prop="settleBillNo">
2024-07-22 00:43:22 +00:00
<el-input
v-model="queryParams.settleBillNo"
:placeholder="$t('总账单号')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
2024-07-22 11:12:27 +00:00
<el-form-item label="审核状态" prop="blAudit">
<el-select v-model="queryParams.blAudit" placeholder="" clearable filterable style="width:100%">
<el-option label="未审核" :value="0"></el-option>
<el-option label="审核通过" :value="1"></el-option>
<el-option label="审核不通过" :value="1"></el-option>
</el-select>
2024-07-22 00:43:22 +00:00
</el-form-item>
2024-07-22 11:12:27 +00:00
<!-- <el-form-item label="" prop="customerCode">
2024-07-22 00:43:22 +00:00
<el-input
v-model="queryParams.customerCode"
:placeholder="$t('客户编码')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="customerName">
<el-input
v-model="queryParams.customerName"
:placeholder="$t('客户名称')"
clearable
@keyup.enter.native="handleQuery"
/>
2024-07-22 11:12:27 +00:00
</el-form-item> -->
<el-form-item label="支付状态" prop="payStatus">
<el-select v-model="queryParams.payStatus" placeholder="" clearable filterable style="width:100%">
<el-option label="未支付" :value="0"></el-option>
<el-option label="支付成功" :value="1"></el-option>
<el-option label="支付失败" :value="2"></el-option>
</el-select>
2024-07-22 00:43:22 +00:00
</el-form-item>
</SearchForm>
2024-07-22 11:12:27 +00:00
<XdTable v-loading="loading"
2024-07-22 00:43:22 +00:00
border stripe
size="small"
2024-07-22 11:12:27 +00:00
storageName="emisSettlePayRecordList_main_s"
2024-07-22 00:43:22 +00:00
:data="emisSettlePayRecordList"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:total="total"
@queryTable="getList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
>
2024-07-22 11:12:27 +00:00
2024-07-22 00:43:22 +00:00
<div slot="toolbar">
<el-row :gutter="10" class="mb8">
2024-07-22 11:12:27 +00:00
<!-- <el-col :span="1.5">
2024-07-22 00:43:22 +00:00
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['emis:emisSettlePayRecord:add']"
>新增</el-button>
2024-07-22 11:12:27 +00:00
</el-col> -->
<!--
2024-07-22 00:43:22 +00:00
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['emis:emisSettlePayRecord:edit']"
>修改</el-button>
2024-07-22 11:12:27 +00:00
</el-col>-->
2024-07-22 00:43:22 +00:00
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['emis:emisSettlePayRecord:remove']"
2024-07-22 11:12:27 +00:00
>作废</el-button>
2024-07-22 00:43:22 +00:00
</el-col>
2024-07-22 11:12:27 +00:00
<el-col :span="1.5">
2024-07-22 00:43:22 +00:00
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['emis:emisSettlePayRecord:export']"
>导出</el-button>
2024-07-22 11:12:27 +00:00
</el-col>
2024-07-22 00:43:22 +00:00
</el-row>
</div>
2024-07-22 11:12:27 +00:00
2024-07-22 00:43:22 +00:00
<el-table-column type="selection" width="55" align="center" />
2024-07-22 11:12:27 +00:00
<el-table-column label="序号" align="center" width="60">
2024-07-22 00:43:22 +00:00
<template slot-scope="scope">
<span v-text="getIndex(scope.$index)"> </span>
</template>
</el-table-column>
2024-07-22 11:12:27 +00:00
<el-table-column :label="$t('支付流水号')" align="center" prop="payId" min-width="170" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收款来源')" align="center" prop="settleType" min-width="80" >
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.settleType == '1'">月结收款</el-tag>
<el-tag type="success" v-if="scope.row.settleType == '2'">现金收款</el-tag>
<span v-else>其他</span>
</template>
</el-table-column>
<el-table-column :label="$t('账单编号')" align="center" prop="settleBillNo" min-width="170" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('审核状态')" align="center" prop="blAudit" min-width="100" >
2024-07-22 00:43:22 +00:00
<template slot-scope="scope">
2024-07-22 11:12:27 +00:00
<el-tag type="success" v-if="scope.row.blAudit == '1'">审核通过</el-tag>
<el-tag type="error" v-if="scope.row.blAudit == '2'">审核不通过</el-tag>
<span v-else>未审核</span>
</template>
2024-07-22 00:43:22 +00:00
</el-table-column>
2024-07-22 11:12:27 +00:00
<el-table-column :label="$t('缴款客户')" align="center" prop="payMan" min-width="100" />
<el-table-column :label="$t('月结编号')" align="center" prop="payManCode" min-width="100" :show-overflow-tooltip="true"/>
2024-07-22 00:43:22 +00:00
2024-07-22 11:12:27 +00:00
<el-table-column :label="$t('支付类型')" align="center" prop="payType" min-width="100" >
<template slot-scope="scope">
<span v-if="scope.row.payType == '1'">微信支付</span>
<span v-if="scope.row.payType == '2'">支付宝支付</span>
<span v-if="scope.row.payType == '3'">企业微信收款</span>
<span v-if="scope.row.payType == '4'">对公付款</span>
<span v-if="scope.row.payType == '5'">其他</span>
2024-07-22 00:43:22 +00:00
</template>
2024-07-22 11:12:27 +00:00
</el-table-column>
2024-07-22 00:43:22 +00:00
2024-07-22 11:12:27 +00:00
<el-table-column :label="$t('收付类型')" align="center" prop="recType" min-width="100" >
<template slot-scope="scope">
<span v-if="scope.row.recType == '1'">收款</span>
<span v-if="scope.row.recType == '2'">退款</span>
</template>
</el-table-column>
<el-table-column :label="$t('支付金额')" align="center" prop="payMoney" min-width="100" />
<el-table-column :label="$t('审核日期')" align="center" prop="auditDate" min-width="170" />
2024-07-22 00:43:22 +00:00
<el-table-column :label="$t('审核人')" align="center" prop="auditManCode" min-width="100" />
<el-table-column :label="$t('审核站点')" align="center" prop="auditSiteCode" min-width="100" />
2024-07-22 11:12:27 +00:00
<!-- <el-table-column :label="$t('客户编码')" align="center" prop="customerCode" min-width="100" />
<el-table-column :label="$t('客户名称')" align="center" prop="customerName" min-width="100" /> -->
<el-table-column :label="$t('支付状态')" align="center" prop="payStatus" min-width="100" >
<template slot-scope="scope">
<span v-if="scope.row.payStatus == '0'">未支付</span>
<span v-if="scope.row.payStatus == '1'">已支付</span>
<span v-if="scope.row.payStatus == '2'">支付异常</span>
</template>
</el-table-column>
<el-table-column :label="$t('异常描述')" align="center" prop="payStatusDesc" min-width="100" />
<!-- <el-table-column :label="$t('收款人代码')" align="center" prop="recManCode" min-width="100" />
2024-07-22 00:43:22 +00:00
<el-table-column :label="$t('结算类型')" align="center" prop="settleType" min-width="100" />
<el-table-column :label="$t('退款日期')" align="center" prop="refundDate" min-width="100" />
<el-table-column :label="$t('退款人')" align="center" prop="refundManCode" min-width="100" />
<el-table-column :label="$t('退款序号')" align="center" prop="refundSeq" min-width="100" />
<el-table-column :label="$t('退款模式')" align="center" prop="refundMode" min-width="100" />
<el-table-column :label="$t('退款金额')" align="center" prop="refundMoney" min-width="100" />
<el-table-column :label="$t('退款原因')" align="center" prop="refundReason" min-width="100" />
<el-table-column :label="$t('退款备注')" align="center" prop="refundRemark" min-width="100" />
<el-table-column :label="$t('退款操作人')" align="center" prop="refundOpManCode" min-width="100" />
<el-table-column :label="$t('退款登记站点')" align="center" prop="refundRegisterSiteCode" min-width="100" />
<el-table-column :label="$t('退款登记人')" align="center" prop="refundRegisterManCode" min-width="100" />
<el-table-column :label="$t('安全金额')" align="center" prop="satisfyMoney" min-width="100" />
2024-07-22 11:12:27 +00:00
<el-table-column :label="$t('安全原因')" align="center" prop="satisfyReason" min-width="100" /> -->
<!-- <el-table-column :label="$t('allowance_money')" align="center" prop="allowanceMoney" min-width="100" />
2024-07-22 00:43:22 +00:00
<el-table-column :label="$t('allowance_reason')" align="center" prop="allowanceReason" min-width="100" />
<el-table-column :label="$t('deduction_money')" align="center" prop="deductionMoney" min-width="100" />
<el-table-column :label="$t('deduction_reason')" align="center" prop="deductionReason" min-width="100" />
<el-table-column :label="$t('other_money')" align="center" prop="otherMoney" min-width="100" />
2024-07-22 11:12:27 +00:00
<el-table-column :label="$t('other_reason')" align="center" prop="otherReason" min-width="100" /> -->
<el-table-column :label="$t('交易时间')" align="center" prop="tradeDate" min-width="170" />
2024-07-22 00:43:22 +00:00
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100" />
2024-07-22 11:12:27 +00:00
2024-07-22 00:43:22 +00:00
</XdTable>
<el-dialog :title="titleForm" :visible.sync="openForm" width="50%" :destroy-on-close="true" v-dialogDrag append-to-body>
<emisSettlePayRecordForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisSettlePayRecordForm>
</el-dialog>
2024-07-22 11:12:27 +00:00
2024-07-22 00:43:22 +00:00
<!--
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" v-dialogDrag append-to-body>
<emisSettlePayRecordView :id="id" ></EmisSettlePayRecordView>
</el-dialog>
-->
</div>
</template>
<script>
import { listEmisSettlePayRecord, getEmisSettlePayRecord, delEmisSettlePayRecord, addEmisSettlePayRecord, updateEmisSettlePayRecord } from "@/api/emis/emisSettlePayRecord";
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
// import emisSettlePayRecordView from '@/views/emis/emisSettlePayRecord/emisSettlePayRecordView';
import emisSettlePayRecordForm from '@/views/emis/emisSettlePayRecord/emisSettlePayRecordForm';
export default {
name: "emisSettlePayRecord",
components: { elDateSimplePicker,emisSettlePayRecordForm },
dicts: [
],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 创建时间搜索
dateTimeRange:[],
// 总条数
total: 0,
// 账单收退款记录表格数据
emisSettlePayRecordList: [],
2024-07-22 11:12:27 +00:00
2024-07-22 00:43:22 +00:00
currentId:null,
openForm: false,
titleForm: "",
// 弹出展示层
id:null,
titleView:"",
openView: false,
// 更新站点时间范围
daterangeAuditDate: [],
// 更新站点时间范围
daterangeRefundDate: [],
// 更新站点时间范围
daterangeTradeDate: [],
// 更新站点时间范围
daterangeCreateTime: [],
// 更新站点时间范围
daterangeUpdateTime: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 20,
payType: null,
recType: null,
payMan: null,
payManCode: null,
settleBillNo: null,
blAudit: null,
auditDate: null,
auditManCode: null,
auditSiteCode: null,
customerCode: null,
customerName: null,
payMoney: null,
payStatus: null,
payStatusDesc: null,
breakType: null,
breakReason: null,
breakEmpCode: null,
recManCode: null,
settleType: null,
refundDate: null,
refundManCode: null,
refundSeq: null,
refundMode: null,
refundMoney: null,
refundReason: null,
refundRemark: null,
refundOpManCode: null,
refundRegisterSiteCode: null,
refundRegisterManCode: null,
satisfyMoney: null,
satisfyReason: null,
allowanceMoney: null,
allowanceReason: null,
deductionMoney: null,
deductionReason: null,
otherMoney: null,
otherReason: null,
tradeDate: null,
remark: null,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询账单收退款记录列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeAuditDate && '' != this.daterangeAuditDate) {
this.queryParams.params["beginAuditDate"] = this.daterangeAuditDate[0];
this.queryParams.params["endAuditDate"] = this.daterangeAuditDate[1];
}
if (null != this.daterangeRefundDate && '' != this.daterangeRefundDate) {
this.queryParams.params["beginRefundDate"] = this.daterangeRefundDate[0];
this.queryParams.params["endRefundDate"] = this.daterangeRefundDate[1];
}
if (null != this.daterangeTradeDate && '' != this.daterangeTradeDate) {
this.queryParams.params["beginTradeDate"] = this.daterangeTradeDate[0];
this.queryParams.params["endTradeDate"] = this.daterangeTradeDate[1];
}
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
}
listEmisSettlePayRecord(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
this.emisSettlePayRecordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
2024-07-22 11:12:27 +00:00
2024-07-22 00:43:22 +00:00
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
// 排序 查询字段是表格中字段名字 动态取值排序顺序
handleSortChange(column) {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
this.getList();
},
/** 新增按钮操作 */
handleAdd(row) {
this.currentId=null;
this.openForm= true;
this.titleForm = "新增";
},
handleShowMoreInput(){
this.moreInputVisible = !this.moreInputVisible;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.currentId= row.id;
this.openForm = true;
this.titleForm = "修改";
},
handleView(row) {
this.id=row.id;
this.titleView="查看";
this.openView=true;
// this.router.push({ path: '/emis/emisSettlePayRecord/viewDetail', query: { id: row.id }})
},
handleFormChanged(){
this.openForm = false;
this.getList();
},
cancelForm(){
this.openForm = false;
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除').then(function() {
return delEmisSettlePayRecord(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('emis/emisSettlePayRecord/export', {
// ...this.queryParams
// }, `emisSettlePayRecord_${new Date().getTime()}.xlsx`)
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
qParam.pageNum=1;
qParam.pageSize=5000;
listEmisSettlePayRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
this.downloadLoading = false
if (response.code === 200) {
const curList = response.rows
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['id','支付序号','支付类型','收付类型','支付人名称','支付人编码','总账单号','审核状态','审核日期','审核人','审核站点','客户编码','客户名称','金额','支付状态','支付状态描述','break_type','break_reason','break_emp_code','收款人代码','结算类型','退款日期','退款人','退款序号','退款模式','退款金额','退款原因','退款备注','退款操作人','退款登记站点','退款登记人','安全金额','安全原因','allowance_money','allowance_reason','deduction_money','deduction_reason','other_money','other_reason','交易时间','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',];
const filterVal = ['id','payId','payType','recType','payMan','payManCode','settleBillNo','blAudit','auditDate','auditManCode','auditSiteCode','customerCode','customerName','payMoney','payStatus','payStatusDesc','breakType','breakReason','breakEmpCode','recManCode','settleType','refundDate','refundManCode','refundSeq','refundMode','refundMoney','refundReason','refundRemark','refundOpManCode','refundRegisterSiteCode','refundRegisterManCode','satisfyMoney','satisfyReason','allowanceMoney','allowanceReason','deductionMoney','deductionReason','otherMoney','otherReason','tradeDate','remark','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
const data = this.formatJson(filterVal, curList, response.rows)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '账单收退款记录',
autoWidth: true
})
loadingInstance.close()
})
}
});
},
formatJson(filterVal, jsonData, resData) {
let index = 0
return jsonData.map(v => filterVal.map(j => {
if (j === 'index') {
return ++index
}
if (j === 'status') {
var statusStr='xxx'
if(v[j] == 10){
statusStr='xxx'
}
return statusStr;
}
return v[j]
}))
},
/** 列索引函数 */
getIndex($index) {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
},
/** 时间搜索响应函数 */
dateTimeChange(value){
this.dateTimeRange=value;
},
}
};
</script>
<style scoped>
.el-divider{
margin-top: 0px;
background: 0 0;
border-top: 1px solid #E6EBF5;
}
.el-divider__text {
color: #0955ee;
cursor: pointer;
}
</style>