This commit is contained in:
linfso 2024-08-06 00:17:51 +08:00
parent c1e549a566
commit efc5ff85e3
2 changed files with 634 additions and 0 deletions

View File

@ -0,0 +1,408 @@
<template>
<div class="app-container">
<XdTable v-loading="loading"
border stripe
size="mini"
:data="emisSettleInvoiceChRecordList"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:total="total"
@queryTable="getList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
>
<div slot="toolbar">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增航信开票</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
:disabled="multiple"
@click="handleSendHXToOpen"
>发送航信开票</el-button>
</el-col>
<!-- v-hasPermi="['emis:emisSettleInvoiceChRecord:edit']"
v-hasPermi="['emis:emisSettleInvoiceChRecord:add']" -->
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
</el-col>
<!-- v-hasPermi="['emis:emisSettleInvoiceChRecord:remove']" -->
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['emis:emisSettleInvoiceChRecord:export']"
>导出</el-button>
</el-col> -->
</el-row>
</div>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="60">
<template slot-scope="scope">
<span v-text="getIndex(scope.$index)"> </span>
</template>
</el-table-column>
<el-table-column :label="$t('流水号')" align="center" prop="reqNo" width="100" />
<!-- <el-table-column :label="$t('发票申请序号')" align="center" prop="applySeqNo" width="100" /> -->
<!-- <el-table-column :label="$t('是否电子发票')" align="center" prop="blEcinv" width="100" /> -->
<!-- <el-table-column :label="$t('申请开票类型')" align="center" prop="invoiceType" width="100" :show-overflow-tooltip="true" /> -->
<el-table-column :label="$t('开票类型')" align="center" prop="realInvoiceType" min-width="80" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_invoice_ch_type" :value="scope.row.realInvoiceType" :show-overflow-tooltip="true" />
</template>
</el-table-column>
<el-table-column :label="$t('开票状态')" align="center" prop="openChStatus" width="100" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<el-tag v-if="scope.row.openChStatus==-1" type="error" >发送异常</el-tag>
<el-tag v-if="scope.row.openChStatus==0" type="info" >未发送</el-tag>
<el-tag v-if="scope.row.openChStatus==1" type="info" >已发送</el-tag>
<el-tag v-if="scope.row.openChStatus==2" type="success" >开票成功</el-tag>
<el-tag v-if="scope.row.openChStatus==3" type="error" >开发失败</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('开票金额')" align="center" prop="openMoney" width="100" :show-overflow-tooltip="true" />
<el-table-column :label="$t('开票公司')" align="center" prop="companyName" width="100" :show-overflow-tooltip="true" />
<el-table-column :label="$t('税号')" align="center" prop="companyTaxNo" width="100" :show-overflow-tooltip="true" />
<!-- <el-table-column :label="$t('开票电话')" align="center" prop="companyTel" width="100" /> -->
<!-- <el-table-column :label="$t('开票地址')" align="center" prop="companyAddress" width="100" /> -->
<!-- <el-table-column :label="$t('开户行')" align="center" prop="bankName" width="100" /> -->
<!-- <el-table-column :label="$t('开户账号')" align="center" prop="bankAccNo" width="100" /> -->
<!-- <el-table-column :label="$t('联系人')" align="center" prop="contact" width="100" /> -->
<!-- <el-table-column :label="$t('联系电话')" align="center" prop="phone" width="100" /> -->
<!-- <el-table-column :label="$t('税率')" align="center" prop="taxRate" width="100" :show-overflow-tooltip="true" /> -->
<!-- <el-table-column :label="$t('发票投递邮箱')" align="center" prop="email" width="100" /> -->
<el-table-column :label="$t('开票主体')" align="center" prop="salerCompanyName" width="100" :show-overflow-tooltip="true" />
<el-table-column :label="$t('主体税号')" align="center" prop="salerCompanyTaxNo" width="100" :show-overflow-tooltip="true" />
<!-- <el-table-column :label="$t('销方开票电话')" align="center" prop="salerCompanyTel" width="100" /> -->
<!-- <el-table-column :label="$t('销方开票地址')" align="center" prop="salerCompanyAddress" width="100" /> -->
<el-table-column :label="$t('主体银行')" align="center" prop="salerBankName" width="100" :show-overflow-tooltip="true" />
<el-table-column :label="$t('主体账号')" align="center" prop="salerBankAccNo" width="100" :show-overflow-tooltip="true" />
<!-- <el-table-column :label="$t('销方联系人')" align="center" prop="salerContact" width="100" /> -->
<!-- <el-table-column :label="$t('销方联系电话')" align="center" prop="salerPhone" width="100" /> -->
<el-table-column :label="$t('发票号')" align="center" prop="invoiceNo" width="100" :show-overflow-tooltip="true" />
<el-table-column :label="$t('pdf下载路径')" align="center" prop="filePath" width="150" :show-overflow-tooltip="true" />
<!-- <el-table-column :label="$t('qr路径')" align="center" prop="qrPath" width="100" /> -->
<!-- <el-table-column :label="$t('操作人')" align="center" prop="opManCode" width="100" /> -->
<!-- <el-table-column :label="$t('操作时间')" align="center" prop="opDate" width="100" /> -->
<!-- <el-table-column :label="$t('操作站点')" align="center" prop="opSiteCode" width="100" /> -->
<!-- <el-table-column :label="$t('开票渠道编号')" align="center" prop="openChId" width="100" /> -->
<el-table-column :label="$t('状态描述')" align="center" prop="openChStatusDesc" width="100" :show-overflow-tooltip="true" />
<!-- <el-table-column :label="$t('使用的开票企业代码')" align="center" prop="openComCode" width="100" /> -->
<!-- <el-table-column :label="$t('扩展信息,货物名称')" align="center" prop="extData" width="100" :show-overflow-tooltip="true" /> -->
<el-table-column :label="$t('开票备注')" align="center" prop="remark" width="100" :show-overflow-tooltip="true" />
</XdTable>
<el-dialog :title="titleForm" :visible.sync="openForm" width="80%" :destroy-on-close="true" v-dialogDrag append-to-body>
<emisSettleInvoiceChRecordForm :id="currentId" :applyId="applyId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisSettleInvoiceChRecordForm>
</el-dialog>
</div>
</template>
<script>
import { listEmisSettleInvoiceChRecord,sendHXToOpen, getEmisSettleInvoiceChRecord, delEmisSettleInvoiceChRecord, addEmisSettleInvoiceChRecord, updateEmisSettleInvoiceChRecord } from "@/api/emis/emisSettleInvoiceChRecord";
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
// import emisSettleInvoiceChRecordView from '@/views/emis/emisSettleInvoiceChRecord/emisSettleInvoiceChRecordView';
import emisSettleInvoiceChRecordForm from '@/views/emis/emisSettleInvoiceChRecord/emisSettleInvoiceChRecordForm';
export default {
name: "emisSettleInvoiceChRecord",
props:{
applyId:{
type:Number
},
applySeqNo:{
type:String
}
},
components: { elDateSimplePicker,emisSettleInvoiceChRecordForm },
dicts: ['emis_invoice_ch_type'
],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 创建时间搜索
dateTimeRange:[],
// 总条数
total: 0,
// 渠道开票记录表表格数据
emisSettleInvoiceChRecordList: [],
currentId:null,
openForm: false,
titleForm: "",
// 弹出展示层
id:null,
titleView:"",
openView: false,
// 更新站点时间范围
daterangeOpDate: [],
// 更新站点时间范围
daterangeCreateTime: [],
// 更新站点时间范围
daterangeUpdateTime: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 20,
reqNo: null,
applySeqNo: this.applySeqNo,
blEcinv: null,
invoiceType: null,
realInvoiceType: null,
companyName: null,
companyTaxNo: null,
companyTel: null,
companyAddress: null,
bankName: null,
bankAccNo: null,
contact: null,
phone: null,
taxRate: null,
openMoney: null,
email: null,
salerCompanyName: null,
salerCompanyTaxNo: null,
salerCompanyTel: null,
salerCompanyAddress: null,
salerBankName: null,
salerBankAccNo: null,
salerContact: null,
salerPhone: null,
invoiceNo: null,
filePath: null,
qrPath: null,
opManCode: null,
opDate: null,
opSiteCode: null,
openChId: null,
openChStatus: null,
openChStatusDesc: null,
openComCode: null,
extData: null,
remark: null,
},
};
},
watch: {
"applySeqNo": {
handler (newValue, oldValue) {
this.queryParams.applySeqNo = this.applySeqNo;
this.getList();
},
deep: true
},
},
created() {
this.getList();
},
methods: {
/** 查询渠道开票记录表列表 */
getList() {
this.loading = true;
listEmisSettleInvoiceChRecord(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
this.emisSettleInvoiceChRecordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
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.ids;
this.openForm = true;
this.titleForm = "修改";
},
handleFormChanged(){
this.openForm = false;
this.getList();
},
cancelForm(){
this.openForm = false;
},
handleSendHXToOpen(){
const ids = this.ids;
this.$modal.confirm('是否确认发送').then(async function() {
console.log("===>handleSendHXToOpen==>",ids);
if(ids&&ids.length>=1){
var len=ids.length;
let i=0;
for(i=0;i<len;i++){
const id=ids[i];
console.log("===>sendHXToOpen==>",id);
let res=await sendHXToOpen({id:id});
console.log("===>sendHXToOpen==res==>",res);
}
}
}).then(() => {
this.getList();
this.$modal.msgSuccess("发送成功");
}).catch(() => {});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除').then(function() {
return delEmisSettleInvoiceChRecord(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('emis/emisSettleInvoiceChRecord/export', {
// ...this.queryParams
// }, `emisSettleInvoiceChRecord_${new Date().getTime()}.xlsx`)
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
qParam.pageNum=1;
qParam.pageSize=5000;
listEmisSettleInvoiceChRecord(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','渠道请求号','发票申请序号','是否电子发票','开票类型','实际开票类型','开票名称','开票税号','开票电话','开票地址','开户行','开户账号','联系人','联系电话','税率','开票金额','发票投递邮箱','销方开票名称','销方开票税号','销方开票电话','销方开票地址','销方开户行','销方开户账号','销方联系人','销方联系电话','发票号','pdf下载路径','qr路径','操作人','操作时间','操作站点','开票渠道编号','开票渠道状态','开票渠道描述','使用的开票企业代码','扩展信息,货物名称','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',];
const filterVal = ['id','reqNo','applySeqNo','blEcinv','invoiceType','realInvoiceType','companyName','companyTaxNo','companyTel','companyAddress','bankName','bankAccNo','contact','phone','taxRate','openMoney','email','salerCompanyName','salerCompanyTaxNo','salerCompanyTel','salerCompanyAddress','salerBankName','salerBankAccNo','salerContact','salerPhone','invoiceNo','filePath','qrPath','opManCode','opDate','opSiteCode','openChId','openChStatus','openChStatusDesc','openComCode','extData','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>

View File

@ -0,0 +1,226 @@
<template>
<div>
<el-table v-loading="loading"
border stripe
size="mini"
storageName="emisSettlePayRecordList_pay_dtl_s"
:data="emisSettlePayRecordList"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:total="total"
@queryTable="getList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
>
<el-table-column :label="$t('支付流水号')" align="center" prop="payId" width="170" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收款来源')" align="center" prop="settleType" 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="payMan" min-width="100" />
<el-table-column :label="$t('月结编号')" align="center" prop="payManCode" min-width="100" :show-overflow-tooltip="true"/>
<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>
</template>
</el-table-column>
<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="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="tradeDate" min-width="170" />
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100" />
</el-table>
</div>
</template>
<script>
import { listEmisSettlePayRecord, getEmisSettlePayRecord, delEmisSettlePayRecord, addEmisSettlePayRecord, updateEmisSettlePayRecord } from "@/api/emis/emisSettlePayRecord";
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
export default {
name: "PayRecordList",
props:{
settleBillNo:{
type:String
}
},
components: { elDateSimplePicker },
dicts: [
],
data() {
return {
// 遮罩层
loading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 创建时间搜索
dateTimeRange:[],
// 总条数
total: 0,
// 账单收退款记录表格数据
emisSettlePayRecordList: [],
currentId:null,
openForm: false,
titleForm: "",
// 弹出展示层
id:null,
titleView:"",
openView: false,
// 更新站点时间范围
daterangeAuditDate: [],
// 更新站点时间范围
daterangeRefundDate: [],
// 更新站点时间范围
daterangeTradeDate: [],
// 更新站点时间范围
daterangeCreateTime: [],
// 更新站点时间范围
daterangeUpdateTime: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 100,
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,
},
};
},
watch: {
settleBillNo(newVal){
this.queryParams.settleBillNo=this.settleBillNo;
this.getList();
}
},
created() {
this.queryParams.settleBillNo=this.settleBillNo;
this.getList();
},
methods: {
/** 查询账单收退款记录列表 */
getList() {
this.loading = true;
listEmisSettlePayRecord(this.queryParams).then(response => {
this.emisSettlePayRecordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
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();
},
/** 列索引函数 */
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>