Merge pull request 'master-dev' (#134) from master-dev into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-frontend/pulls/134
This commit is contained in:
commit
15a0b2ea5b
@ -61,3 +61,21 @@ export function auditCenterPass(id) {
|
||||
data: {}
|
||||
})
|
||||
}
|
||||
|
||||
// 批量延迟开票
|
||||
export function batchDelayInvoice(ids) {
|
||||
console.log('延迟开票ids batchDelayInvoice:', ids);
|
||||
return request({
|
||||
url: 'emis/emisSettleInvoiceRecord/batchDelayInvoice/' + ids,
|
||||
method: 'post',
|
||||
data: {}
|
||||
})
|
||||
}
|
||||
//取消延迟开票
|
||||
export function cancelBatchDelayInvoice(ids) {
|
||||
return request({
|
||||
url: 'emis/emisSettleInvoiceRecord/batchCancelDelayInvoice/' + ids,
|
||||
method: 'post',
|
||||
data: {}
|
||||
})
|
||||
}
|
||||
@ -85,6 +85,9 @@
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开票主体" prop="salerCompanyName">
|
||||
<BaseInvoiceInfoPicker v-model="queryParams.salerCompanyName" :placeholder="$t('开票主体')" isInitiated="true" :disabled="false"></BaseInvoiceInfoPicker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="发票号" prop="params.invoiceNo">
|
||||
<el-input
|
||||
v-model="queryParams.params.invoiceNo"
|
||||
@ -99,7 +102,7 @@
|
||||
slot="pageContent"
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
|
||||
ref="refTable"
|
||||
v-loading="loading"
|
||||
border
|
||||
size="mini"
|
||||
@ -169,6 +172,16 @@
|
||||
v-hasPermi="['emis:emisSettleInvoiceRecord:payByInvoice']"
|
||||
>发票收款</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['emis:emisSettleInvoiceRecord:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
@ -283,9 +296,10 @@ import OpenBillForm from '@/views/emis/emisSettleInvoiceRecord/OpenBillForm';
|
||||
import { listEmisSettleInvoiceChRecord } from "@/api/emis/emisSettleInvoiceChRecord";
|
||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||
import {timeFormat , isOverOneMonth} from '@/utils/dateUtils'
|
||||
import BaseInvoiceInfoPicker from '@/views/emis/EmisBaseTools/BaseInvoiceInfoPicker.vue';
|
||||
export default {
|
||||
name: "CenterInvoiceHasOpenPanel",
|
||||
components: { elDateAdvPicker,OpenBillForm },
|
||||
components: { elDateAdvPicker,OpenBillForm,BaseInvoiceInfoPicker },
|
||||
props: {
|
||||
invoiceStatus:{
|
||||
type: [String,Number],
|
||||
@ -649,7 +663,7 @@ export default {
|
||||
this.initQueryParams();
|
||||
let params = this.addDateRange(this.queryParams, this.dateTimeRange,'createTime');
|
||||
//判断时间必选 且开始和结束时间相差不超一个月
|
||||
if(!this.dateTimeRange){
|
||||
if(!this.dateTimeRange && !this.queryParams.queryCode){
|
||||
this.$modal.msgError('请选择开票时间');
|
||||
return;
|
||||
}
|
||||
@ -663,7 +677,41 @@ export default {
|
||||
this.download('emis/emisSettleInvoiceRecord/customExport', {
|
||||
...params,
|
||||
pageSize:10000
|
||||
}, `已开票列表.xlsx`)
|
||||
}, `已开票定制列表.xlsx`)
|
||||
},
|
||||
handleExport(){
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
if(this.selectList&&this.selectList.length>0){
|
||||
this.exportData(this.selectList,loadingInstance);
|
||||
}else{
|
||||
this.initQueryParams();
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
listEmisSettleInvoiceRecord(this.addDateRange(qParam, this.dateTimeRange, 'createTime')).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.exportData(response.rows, loadingInstance);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
exportData(selData,loadingInstance){
|
||||
const curList =selData
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const exportParam=this.$refs.refTable.getExportParam();
|
||||
const tHeader = exportParam.header;
|
||||
const filterVal = exportParam.filter;
|
||||
const data = this.formatJson(filterVal, curList, selData)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '已开票列表',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
let index = 0
|
||||
@ -678,6 +726,69 @@ export default {
|
||||
}
|
||||
return statusStr;
|
||||
}
|
||||
// 开票状态
|
||||
if (j === 'invoiceStatus') {
|
||||
let invoiceStatus = v[j];
|
||||
if (invoiceStatus == 0) {
|
||||
return '未开票';
|
||||
}
|
||||
else if (invoiceStatus == 1) {
|
||||
return '开票中';
|
||||
}
|
||||
else if (invoiceStatus == 2) {
|
||||
return '已开票';
|
||||
}
|
||||
else if (invoiceStatus == 3) {
|
||||
return '开票异常';
|
||||
}
|
||||
}
|
||||
// 审核状态
|
||||
if (j === 'blAudit') {
|
||||
let auditStatus = v[j];
|
||||
if (auditStatus == 0) {
|
||||
return '未审核';
|
||||
}
|
||||
else if (auditStatus == 1) {
|
||||
return '审核中';
|
||||
}
|
||||
else if (auditStatus == 2) {
|
||||
return '已审核';
|
||||
}
|
||||
else if (auditStatus == 3) {
|
||||
return '审核异常';
|
||||
}
|
||||
}
|
||||
//开票类型
|
||||
if (j === 'invoiceType') {
|
||||
let invoiceType = v[j];
|
||||
if (invoiceType == 1) {
|
||||
return '增值税电子普通发票';
|
||||
}
|
||||
else if (invoiceType == 4) {
|
||||
return '增值税电子专用发票';
|
||||
} else if (invoiceType == 2) {
|
||||
return '增值税普通发票';
|
||||
} else if (invoiceType == 3) {
|
||||
return '增值税专用发票';
|
||||
} else if (invoiceType == 9) {
|
||||
return '其它手工发票';
|
||||
}
|
||||
}
|
||||
// 收款状态
|
||||
if (j === 'paymentStatus') {
|
||||
let paymentStatus = v[j];
|
||||
if (paymentStatus == 0) {
|
||||
return '未收款';
|
||||
}
|
||||
else if (paymentStatus == 1) {
|
||||
return '已收款';
|
||||
}
|
||||
else if (paymentStatus == 2) {
|
||||
return '部分收款';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
|
||||
@ -88,16 +88,23 @@
|
||||
:placeholder="$t('备注')"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="开票主体" prop="salerCompanyName">
|
||||
<BaseInvoiceInfoPicker v-model="queryParams.salerCompanyName" :placeholder="$t('开票主体')" isInitiated="true" :disabled="false"></BaseInvoiceInfoPicker>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票延期" prop="blDelay">
|
||||
<el-select clearable v-model="queryParams.blDelay" :placeholder="$t('发票延期')" filterable style="width:100%">
|
||||
<el-option label="不延期" :value="0"></el-option>
|
||||
<el-option label="延期" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</SearchForm>
|
||||
|
||||
<XdTable
|
||||
slot="pageContent"
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
|
||||
ref="refTable"
|
||||
v-loading="loading"
|
||||
border
|
||||
size="mini"
|
||||
@ -158,7 +165,7 @@
|
||||
>开票驳回</el-button>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -167,7 +174,27 @@
|
||||
@click="handleExport"
|
||||
v-hasPermi="['emis:emisSettleInvoiceRecord:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="multiple || !selectedAllNotInvoiced"
|
||||
@click="handleBatchDelay"
|
||||
v-hasPermi="['emis:emisSettleInvoiceRecord:delay']"
|
||||
>批量发票延期</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="single || !selectedAllNotInvoiced"
|
||||
@click="handleBatchCancel"
|
||||
v-hasPermi="['emis:emisSettleInvoiceRecord:cancelDelay']"
|
||||
>取消发票延期</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
@ -207,7 +234,16 @@
|
||||
<el-tag v-if="scope.row.paymentStatus=='1'" type="success">已收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='2'" type="warning">部分收款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('发票延期')" align="center" prop="blDelay" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.blDelay=='0'" type="info">不延期</el-tag>
|
||||
<el-tag v-if="scope.row.blDelay=='1'" type="success">延期</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('发票延期操作人')" align="center" prop="delayOpManCode" min-width="150" />
|
||||
<el-table-column :label="$t('发票延期操作时间')" align="center" prop="delayOpDate" min-width="150" />
|
||||
<el-table-column :label="$t('开票主体')" align="center" prop="salerCompanyName" min-width="150" />
|
||||
<!-- <el-tag v-if="scope.row.paymentStatus=='2'" type="warning">部分收款</el-tag> -->
|
||||
<el-table-column :label="$t('驳回原因')" align="center" prop="auditNote" min-width="100" :show-overflow-tooltip="true"/>
|
||||
|
||||
@ -271,15 +307,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { auditCenterNoPass,auditCenterPass,listEmisSettleInvoiceRecord, getEmisSettleInvoiceRecord, delEmisSettleInvoiceRecord, addEmisSettleInvoiceRecord, updateEmisSettleInvoiceRecord } from "@/api/emis/emisSettleInvoiceRecord";
|
||||
import { auditCenterNoPass,auditCenterPass,listEmisSettleInvoiceRecord, getEmisSettleInvoiceRecord, delEmisSettleInvoiceRecord, addEmisSettleInvoiceRecord, updateEmisSettleInvoiceRecord, batchDelayInvoice, cancelBatchDelayInvoice } from "@/api/emis/emisSettleInvoiceRecord";
|
||||
import OpenBillForm from '@/views/emis/emisSettleInvoiceRecord/OpenBillForm';
|
||||
import { listEmisSettleInvoiceChRecord } from "@/api/emis/emisSettleInvoiceChRecord";
|
||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||
import {timeFormat} from '@/utils/dateUtils'
|
||||
|
||||
import BaseInvoiceInfoPicker from '@/views/emis/EmisBaseTools/BaseInvoiceInfoPicker.vue';
|
||||
export default {
|
||||
name: "CenterInvoiceRecordDealListPanel",
|
||||
components: { elDateAdvPicker,OpenBillForm },
|
||||
components: { elDateAdvPicker,OpenBillForm,BaseInvoiceInfoPicker },
|
||||
props: {
|
||||
invoiceStatus:{
|
||||
type: [String,Number],
|
||||
@ -325,6 +361,7 @@ export default {
|
||||
|
||||
|
||||
dateTimeRange: [],
|
||||
selectedAllNotInvoiced:false, //选中数据全是未开票
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -368,6 +405,7 @@ export default {
|
||||
openComCode: null,
|
||||
delFlag: null,
|
||||
paymentStatus:null,
|
||||
salerCompanyName:null,
|
||||
params:{
|
||||
billCode:null,
|
||||
invoiceNo:null,
|
||||
@ -478,7 +516,9 @@ export default {
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
this.multiple = !selection.length
|
||||
//判断选中数据是否全是未开票
|
||||
this.selectedAllNotInvoiced = selection.every(item => item.invoiceStatus === '0');
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
handleSortChange(column) {
|
||||
@ -632,34 +672,39 @@ export default {
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('emis/emisSettleInvoiceRecord/export', {
|
||||
// ...this.queryParams
|
||||
// }, `emisSettleInvoiceRecord_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
if(this.selectList&&this.selectList.length>0){
|
||||
this.exportData(this.selectList,loadingInstance);
|
||||
}else{
|
||||
|
||||
listEmisSettleInvoiceRecord(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','申请序号','申请时间','审核人','审核站点','客户编码','客户名称','账单号编号','账单名称','申请开票金额','开票类型','开票名称','开票税号','开票电话','开票地址','联系人','联系电话','税类型','开票上限','开票金额','发票号','开票状态','开票状态描述','纸质发票邮寄地址','发票投递邮箱','发票下载路径','备注','审核状态','审核日期','审核人','审核站点','操作人','操作时间','操作站点','开票渠道编号','开票渠道状态','开票渠道描述','使用的开票企业代码','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',];
|
||||
const filterVal = ['id','applySeqNo','applyDate','applyManCode','applySiteCode','customerCode','customerName','settleBillNo','settleBillName','applyMoney','invoiceType','companyName','companyTaxNo','companyTel','companyAddress','contact','phone','realTaxType','openMoneyMax','openMoney','invoiceNo','invoiceStatus','invoiceStatusDesc','recieveAddress','email','filePath','remark','blAudit','auditDate','auditManCode','auditSiteCode','opManCode','opDate','opSiteCode','openChId','openChStatus','openChStatusDesc','openComCode','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()
|
||||
})
|
||||
}
|
||||
});
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
|
||||
listEmisSettleInvoiceRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.exportData(response.rows,loadingInstance);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
exportData(selData, loadingInstance) {
|
||||
const curList = selData
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const exportParam = this.$refs.refTable.getExportParam();
|
||||
const tHeader = exportParam.header;
|
||||
const filterVal = exportParam.filter;
|
||||
const data = this.formatJson(filterVal, curList, selData)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '开票申请记录',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
let index = 0
|
||||
@ -674,6 +719,67 @@ export default {
|
||||
}
|
||||
return statusStr;
|
||||
}
|
||||
// 开票状态
|
||||
if (j === 'invoiceStatus') {
|
||||
let invoiceStatus = v[j];
|
||||
if (invoiceStatus == 0) {
|
||||
return '未开票';
|
||||
}
|
||||
else if (invoiceStatus == 1) {
|
||||
return '开票中';
|
||||
}
|
||||
else if (invoiceStatus == 2) {
|
||||
return '已开票';
|
||||
}
|
||||
else if (invoiceStatus == 3) {
|
||||
return '开票异常';
|
||||
}
|
||||
}
|
||||
// 审核状态
|
||||
if (j === 'blAudit') {
|
||||
let auditStatus = v[j];
|
||||
if (auditStatus == 0) {
|
||||
return '未审核';
|
||||
}
|
||||
else if (auditStatus == 1) {
|
||||
return '审核中';
|
||||
}
|
||||
else if (auditStatus == 2) {
|
||||
return '已审核';
|
||||
}
|
||||
else if (auditStatus == 3) {
|
||||
return '审核异常';
|
||||
}
|
||||
}
|
||||
//开票类型
|
||||
if (j === 'invoiceType') {
|
||||
let invoiceType = v[j];
|
||||
if (invoiceType == 1) {
|
||||
return '增值税电子普通发票';
|
||||
}
|
||||
else if (invoiceType == 4) {
|
||||
return '增值税电子专用发票';
|
||||
} else if (invoiceType == 2) {
|
||||
return '增值税普通发票';
|
||||
} else if (invoiceType == 3) {
|
||||
return '增值税专用发票';
|
||||
} else if (invoiceType == 9) {
|
||||
return '其它手工发票';
|
||||
}
|
||||
}
|
||||
// 收款状态
|
||||
if (j === 'paymentStatus') {
|
||||
let paymentStatus = v[j];
|
||||
if (paymentStatus == 0) {
|
||||
return '未收款';
|
||||
}
|
||||
else if (paymentStatus == 1) {
|
||||
return '已收款';
|
||||
}
|
||||
else if (paymentStatus == 2) {
|
||||
return '部分收款';
|
||||
}
|
||||
}
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
@ -685,6 +791,30 @@ export default {
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
handleBatchDelay() {
|
||||
if (this.selectedAllNotInvoiced) {
|
||||
this.$modal.confirm('是否确认延迟开票?').then(()=> {
|
||||
return batchDelayInvoice(this.ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("延迟开票成功");
|
||||
}).catch(() => { });
|
||||
} else {
|
||||
this.$modal.msgError("只能选未开票的记录");
|
||||
}
|
||||
},
|
||||
handleBatchCancel(row){
|
||||
if(this.selectedAllNotInvoiced){
|
||||
this.$modal.confirm('是否确认取消延迟开票?').then(()=> {
|
||||
return cancelBatchDelayInvoice(this.ids.join(','));
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("取消延迟开票成功");
|
||||
}).catch(() => {});
|
||||
}else{
|
||||
this.$modal.msgError("只能选未开票的记录");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user