646 lines
26 KiB
Vue
646 lines
26 KiB
Vue
|
|
<template>
|
|||
|
|
<div >
|
|||
|
|
<SearchForm :model="queryParams" ref="queryForm" size="mini" :maxShow="20" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
|||
|
|
<el-form-item label="" prop="billCode" label-width="80px">
|
|||
|
|
<div slot="label">
|
|||
|
|
<el-radio-group class="query-label" v-model="queryOrderType">
|
|||
|
|
<el-radio :key="1" label="1">运单号</el-radio>
|
|||
|
|
<el-radio :key="2" label="2">账单号</el-radio>
|
|||
|
|
</el-radio-group>
|
|||
|
|
</div>
|
|||
|
|
<XdTextareaInput
|
|||
|
|
v-model="queryParams.billCode"
|
|||
|
|
:placeholder="$t('多个流水号逗号或换行隔开')"
|
|||
|
|
clearable
|
|||
|
|
:rows="2"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
|
|||
|
|
<el-form-item label="账单名称" prop="settleBillName">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.settleBillName"
|
|||
|
|
:placeholder="$t('账单名称')"
|
|||
|
|
clearable
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
</SearchForm>
|
|||
|
|
<!-- 账单表 -->
|
|||
|
|
<XdTable
|
|||
|
|
v-loading="loading"
|
|||
|
|
border stripe
|
|||
|
|
size="mini"
|
|||
|
|
storageName="emisSettleBillList_site_confitm_main"
|
|||
|
|
:data="emisSettleBillList"
|
|||
|
|
:showSearch.sync="showSearch"
|
|||
|
|
:queryParams="queryParams"
|
|||
|
|
:total="total"
|
|||
|
|
@queryTable="getList"
|
|||
|
|
@selection-change="handleSelectionChange"
|
|||
|
|
@sort-change="handleSortChange"
|
|||
|
|
@row-dblclick="handleSendDbClick"
|
|||
|
|
show-summary
|
|||
|
|
:summary-method="getSummaries"
|
|||
|
|
>
|
|||
|
|
<div slot="toolbar">
|
|||
|
|
<el-row :gutter="10" class="mb8">
|
|||
|
|
<!-- <el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
plain
|
|||
|
|
icon="el-icon-edit"
|
|||
|
|
size="mini"
|
|||
|
|
:disabled="single"
|
|||
|
|
@click="handleUpdate"
|
|||
|
|
v-hasPermi="['emis:emisSettleBill:edit']"
|
|||
|
|
>修改账单</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:emisSettleBill:export']"
|
|||
|
|
>导出</el-button>
|
|||
|
|
</el-col> -->
|
|||
|
|
<el-col :span="1.5" >
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
plain
|
|||
|
|
size="mini"
|
|||
|
|
:disabled="multiple"
|
|||
|
|
@click="handleApplyOpenBill"
|
|||
|
|
>申请开票</el-button>
|
|||
|
|
</el-col>
|
|||
|
|
<!-- <el-col :span="1.5" v-if="activeTab=='waitConfirm'">
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
plain
|
|||
|
|
size="mini"
|
|||
|
|
:disabled="multiple"
|
|||
|
|
@click="handleConfirmNoBillBySite"
|
|||
|
|
v-hasPermi="['emis:emisSettleSubBill:confirmNoBillBySite']"
|
|||
|
|
>确认不出账</el-button>
|
|||
|
|
</el-col> -->
|
|||
|
|
|
|||
|
|
<!-- <el-col :span="1.5" v-if="activeTab!='waitConfirm'">
|
|||
|
|
<el-button
|
|||
|
|
type="danger"
|
|||
|
|
plain
|
|||
|
|
size="mini"
|
|||
|
|
:disabled="multiple"
|
|||
|
|
@click="handleCancelConfirmBySite"
|
|||
|
|
v-hasPermi="['emis:emisSettleSubBill:cancelConfirmBillBySite']"
|
|||
|
|
>取消确认</el-button>
|
|||
|
|
</el-col> -->
|
|||
|
|
<!-- <el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
type="warning"
|
|||
|
|
plain
|
|||
|
|
icon="el-icon-download"
|
|||
|
|
size="mini"
|
|||
|
|
@click="handleExportToBill"
|
|||
|
|
>导出EXCEL电子表</el-button>
|
|||
|
|
</el-col> -->
|
|||
|
|
</el-row>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<el-table-column type="selection" width="55" align="center" />
|
|||
|
|
<el-table-column :label="$t('账单编号')" align="center" prop="settleBillNo" min-width="170" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column :label="$t('账单名称')" align="left" prop="settleBillName" min-width="200" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column :label="$t('账单月份')" align="center" prop="billMonth" min-width="80" />
|
|||
|
|
<el-table-column :label="$t('账单期间')" align="center" prop="billMonth" min-width="200" :show-overflow-tooltip="true">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<div >{{scope.row.settleStartDate}}~{{scope.row.settleEndDate}}</div>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column :label="$t('总票数')" align="center" prop="sendPieceSum" min-width="100" />
|
|||
|
|
<el-table-column :label="$t('总件数')" align="center" prop="pieceNumber" min-width="100" />
|
|||
|
|
<el-table-column :label="$t('重量')" align="center" prop="feeWeight" min-width="100" />
|
|||
|
|
<el-table-column :label="$t('账单应收金额')" align="center" prop="recMoney" min-width="150" />
|
|||
|
|
<el-table-column :label="$t('账单已收金额')" align="center" prop="recedMoney" min-width="150" />
|
|||
|
|
<el-table-column :label="$t('账单退款金额')" align="center" prop="refundMoney" min-width="150" />
|
|||
|
|
|
|||
|
|
<el-table-column :label="$t('收款状态')" align="center" prop="paymentStatus" min-width="100" >
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<el-tag v-if="scope.row.paymentStatus=='0'" type="error">未收款</el-tag>
|
|||
|
|
<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 :label="$t('理赔金额')" align="center" prop="satisfyMoney" min-width="100" /> -->
|
|||
|
|
<!-- <el-table-column :label="$t('允许金额')" align="center" prop="allowanceMoney" min-width="100" /> -->
|
|||
|
|
<!-- <el-table-column :label="$t('抵扣金额')" align="center" prop="deductionMoney" min-width="100" /> -->
|
|||
|
|
<!-- <el-table-column :label="$t('其他收费项')" align="center" prop="otherMoney" min-width="100" /> -->
|
|||
|
|
<!-- <el-table-column :label="$t('合计金额')" align="center" prop="sendMoneySum" min-width="100" /> -->
|
|||
|
|
<el-table-column :label="$t('月结编号')" align="center" prop="custNo" min-width="100" />
|
|||
|
|
<!-- <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="createTime" min-width="170" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column :label="$t('回款联系人')" align="center" prop="payee" width="100" />
|
|||
|
|
<el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" width="100" :disabled="this.$store.getters.ownerSiteCode !='88888'"/>
|
|||
|
|
|
|||
|
|
<!-- <el-table-column :label="$t('理赔原因')" align="center" prop="satisfyMoney" min-width="100" /> -->
|
|||
|
|
<!-- <el-table-column :label="$t('抵让原因')" align="center" prop="deductionReason" min-width="100" /> -->
|
|||
|
|
<!-- <el-table-column :label="$t('其他原因')" align="center" prop="otherReason" min-width="100" /> -->
|
|||
|
|
<!-- <el-table-column :label="$t('账单其他费用')" align="center" prop="otherReason" min-width="170" /> -->
|
|||
|
|
|
|||
|
|
<el-table-column :label="$t('业务确认状态')" align="center" prop="blConfirmSite" min-width="120" >
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span v-if="scope.row.blConfirmSite=='0'" >未确认</span>
|
|||
|
|
<el-tag v-if="scope.row.blConfirmSite=='1'" type="success">已确认</el-tag>
|
|||
|
|
<el-tag v-if="scope.row.blConfirmSite=='2'" type="error">确认不出账</el-tag>
|
|||
|
|
<el-tag v-if="scope.row.blConfirmSite=='3'" type="error">账单异常</el-tag>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column :label="$t('业务确认时间')" align="center" prop="confirmSiteDate" min-width="170" />
|
|||
|
|
<el-table-column :label="$t('业务确认人')" align="center" prop="confirmSiteManName" min-width="100" />
|
|||
|
|
<el-table-column :label="$t('业务备注')" align="center" prop="confirmSiteNote" min-width="100" />
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
</XdTable>
|
|||
|
|
|
|||
|
|
<el-dialog :title="titleForm" :visible.sync="openForm" width="80%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
|||
|
|
<MergeBillForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></MergeBillForm>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
import { listEmisSettleBill,confirmSettleBillBySite, getEmisSettleBill, delEmisSettleBill, addEmisSettleBill, updateEmisSettleBill } from "@/api/emis/emisSettleBill";
|
|||
|
|
import MergeBillForm from '@/views/emis/emisSettleBill/MergeBillForm.vue';
|
|||
|
|
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
|||
|
|
|
|||
|
|
import PayeePicker from '@/views/emis/EmisBaseTools/PayeePicker.vue';
|
|||
|
|
import SalemanPicker from '@/views/emis/EmisBaseTools/SalemanPicker.vue';
|
|||
|
|
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
|
|||
|
|
|
|||
|
|
export default {
|
|||
|
|
name: "SiteConfimPanel",
|
|||
|
|
props:{
|
|||
|
|
confirmStatus:{
|
|||
|
|
type:[String,Number]
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
components: { MergeBillForm,elDateSimplePicker,PayeePicker,SalemanPicker,EmisMonthpayAccountPicker },
|
|||
|
|
dicts: [
|
|||
|
|
],
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
// 遮罩层
|
|||
|
|
loading: true,
|
|||
|
|
// 选中数组
|
|||
|
|
ids: [],
|
|||
|
|
// 非单个禁用
|
|||
|
|
single: true,
|
|||
|
|
// 非多个禁用
|
|||
|
|
multiple: true,
|
|||
|
|
// 显示搜索条件
|
|||
|
|
showSearch: true,
|
|||
|
|
// 创建时间搜索
|
|||
|
|
dateTimeRange:[],
|
|||
|
|
// 总条数
|
|||
|
|
total: 0,
|
|||
|
|
// 结算总账单表格数据
|
|||
|
|
emisSettleBillList: [],
|
|||
|
|
|
|||
|
|
currentId:null,
|
|||
|
|
openForm: false,
|
|||
|
|
titleForm: "",
|
|||
|
|
|
|||
|
|
subBillTotal: 0,
|
|||
|
|
// 结算子账单表格数据
|
|||
|
|
emisSettleSubBillList: [],
|
|||
|
|
|
|||
|
|
currentSettleBillNo:null,
|
|||
|
|
|
|||
|
|
queryOrderType:null,
|
|||
|
|
|
|||
|
|
// 弹出展示层
|
|||
|
|
id:null,
|
|||
|
|
titleView:"",
|
|||
|
|
openView: false,
|
|||
|
|
// 更新站点时间范围
|
|||
|
|
daterangeSettleStartDate: [],
|
|||
|
|
// 更新站点时间范围
|
|||
|
|
daterangeSettleEndDate: [],
|
|||
|
|
// 更新站点时间范围
|
|||
|
|
daterangeCreateTime: [],
|
|||
|
|
// 更新站点时间范围
|
|||
|
|
daterangeUpdateTime: [],
|
|||
|
|
// 查询参数
|
|||
|
|
queryParams: {
|
|||
|
|
pageNum: 1,
|
|||
|
|
pageSize: 20,
|
|||
|
|
settleBillNo: null,
|
|||
|
|
settleBillName: null,
|
|||
|
|
settleType: null,
|
|||
|
|
settleStartDate: null,
|
|||
|
|
settleEndDate: null,
|
|||
|
|
billMonth: null,
|
|||
|
|
recMoney: null,
|
|||
|
|
recedMoney: null,
|
|||
|
|
custNo: null,
|
|||
|
|
customerCode: null,
|
|||
|
|
customerName: null,
|
|||
|
|
siteCode: null,
|
|||
|
|
siteName: null,
|
|||
|
|
satisfyMoney: null,
|
|||
|
|
allowanceMoney: null,
|
|||
|
|
deductionMoney: null,
|
|||
|
|
otherMoney: null,
|
|||
|
|
satisfyReason: null,
|
|||
|
|
allowanceReason: null,
|
|||
|
|
deductionReason: null,
|
|||
|
|
otherReason: null,
|
|||
|
|
openBillStatus: null,
|
|||
|
|
paymentStatus: null,
|
|||
|
|
chargeStatus: null,
|
|||
|
|
sendPieceSum: null,
|
|||
|
|
pieceNumber: null,
|
|||
|
|
feeWeight: null,
|
|||
|
|
uncollectedAmount: null,
|
|||
|
|
sendMoneySum: null,
|
|||
|
|
refundAmount: null,
|
|||
|
|
refundMoney: null,
|
|||
|
|
payee: null,
|
|||
|
|
salesmen: null,
|
|||
|
|
blSendOms: null,
|
|||
|
|
blConfirmCenter: null,
|
|||
|
|
confirmCenterDate: null,
|
|||
|
|
confirmCenterNote: null,
|
|||
|
|
confirmCenterManCode: null,
|
|||
|
|
confirmCenterCode: null,
|
|||
|
|
blConfirmSite: this.confirmStatus,
|
|||
|
|
confirmSiteDate: null,
|
|||
|
|
confirmSiteManCode: null,
|
|||
|
|
confirmSiteNote: null,
|
|||
|
|
confirmSiteCode: null,
|
|||
|
|
remark: null,
|
|||
|
|
delFlag: null,
|
|||
|
|
params:{
|
|||
|
|
billCode:null,
|
|||
|
|
canOpenBill:1,
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
};
|
|||
|
|
},
|
|||
|
|
watch: {
|
|||
|
|
},
|
|||
|
|
created() {
|
|||
|
|
this.queryOrderType="1"
|
|||
|
|
this.getList();
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
methods: {
|
|||
|
|
/** 查询结算总账单列表 */
|
|||
|
|
getList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
|
|||
|
|
// 按运单查询时的处理
|
|||
|
|
if(this.queryOrderType==1){
|
|||
|
|
this.queryParams.params.billCode=this.queryParams.settleBillNo;
|
|||
|
|
this.queryParams.settleBillNo=null;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
console.log("====>this.$store.getters.ownerSiteCode==>",this.$store.getters.ownerSiteCode)
|
|||
|
|
if(this.$store.getters.ownerSiteCode !='88888'){
|
|||
|
|
this.queryParams.salesmen=this.$store.getters.empName
|
|||
|
|
}
|
|||
|
|
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange);
|
|||
|
|
listEmisSettleBill(this.queryParams).then(response => {
|
|||
|
|
this.emisSettleBillList = response.rows;
|
|||
|
|
this.total = response.total;
|
|||
|
|
this.loading = false;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
handleConfirmBySite(row) {
|
|||
|
|
const ids = row.id || this.ids;
|
|||
|
|
this.$modal.confirm('请仔细确认,确认后不可撤销').then(function() {
|
|||
|
|
return confirmSettleBillBySite(ids);
|
|||
|
|
}).then(() => {
|
|||
|
|
this.getList();
|
|||
|
|
this.$modal.msgSuccess("操作成功");
|
|||
|
|
}).catch(() => {});
|
|||
|
|
},
|
|||
|
|
// 申请开票
|
|||
|
|
handleApplyOpenBill(){
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
handleSendDbClick(row){
|
|||
|
|
this.$emit("onSelect",row);
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
//指定列求和
|
|||
|
|
getSummaries(param) {
|
|||
|
|
const { columns, data } = param;
|
|||
|
|
const sums = [];
|
|||
|
|
columns.forEach((column, index) => {
|
|||
|
|
if (index === 0) {
|
|||
|
|
sums[index] = '合计';
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (
|
|||
|
|
column.property === 'sendPieceSum'
|
|||
|
|
) {
|
|||
|
|
const values = data.map(item => Number(item.sendPieceSum));
|
|||
|
|
sums[index] = values.reduce((prev, curr) => {
|
|||
|
|
const value = Number(curr);
|
|||
|
|
if (!isNaN(value)) {
|
|||
|
|
return prev + curr;
|
|||
|
|
} else {
|
|||
|
|
return prev;
|
|||
|
|
}
|
|||
|
|
}, 0);
|
|||
|
|
sums[index] = sums[index].toFixed(0); //保留0位小数
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
else if (
|
|||
|
|
column.property === 'pieceNumber'
|
|||
|
|
|
|||
|
|
) {
|
|||
|
|
const values = data.map(item => Number(item.pieceNumber));
|
|||
|
|
|
|||
|
|
sums[index] = values.reduce((prev, curr) => {
|
|||
|
|
const value = Number(curr);
|
|||
|
|
if (!isNaN(value)) {
|
|||
|
|
return prev + curr;
|
|||
|
|
} else {
|
|||
|
|
return prev;
|
|||
|
|
}
|
|||
|
|
}, 0);
|
|||
|
|
sums[index] = sums[index].toFixed(0); //保留0位小数
|
|||
|
|
}
|
|||
|
|
else if (
|
|||
|
|
column.property === 'feeWeight'
|
|||
|
|
|
|||
|
|
) {
|
|||
|
|
const values = data.map(item => Number(item.feeWeight));
|
|||
|
|
|
|||
|
|
sums[index] = values.reduce((prev, curr) => {
|
|||
|
|
const value = Number(curr);
|
|||
|
|
if (!isNaN(value)) {
|
|||
|
|
return prev + curr;
|
|||
|
|
} else {
|
|||
|
|
return prev;
|
|||
|
|
}
|
|||
|
|
}, 0);
|
|||
|
|
sums[index] = sums[index].toFixed(2); //保留2位小数
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
else if (
|
|||
|
|
column.property === 'recMoney'
|
|||
|
|
) {
|
|||
|
|
const values = data.map(item => Number(item.recMoney));
|
|||
|
|
sums[index] = values.reduce((prev, curr) => {
|
|||
|
|
const value = Number(curr);
|
|||
|
|
if (!isNaN(value)) {
|
|||
|
|
return prev + curr;
|
|||
|
|
} else {
|
|||
|
|
return prev;
|
|||
|
|
}
|
|||
|
|
}, 0);
|
|||
|
|
sums[index] = sums[index].toFixed(2); //保留2位小数
|
|||
|
|
}
|
|||
|
|
else if(
|
|||
|
|
column.property === 'recedMoney'
|
|||
|
|
){
|
|||
|
|
const values = data.map(item => Number(item.recedMoney));
|
|||
|
|
sums[index] = values.reduce((prev, curr) => {
|
|||
|
|
const value = Number(curr);
|
|||
|
|
if (!isNaN(value)) {
|
|||
|
|
return prev + curr;
|
|||
|
|
} else {
|
|||
|
|
return prev;
|
|||
|
|
}
|
|||
|
|
}, 0);
|
|||
|
|
sums[index] = sums[index].toFixed(2); //保留2位小数
|
|||
|
|
}
|
|||
|
|
else if(
|
|||
|
|
column.property === 'refundMoney'
|
|||
|
|
){
|
|||
|
|
const values = data.map(item => Number(item.refundMoney));
|
|||
|
|
sums[index] = values.reduce((prev, curr) => {
|
|||
|
|
const value = Number(curr);
|
|||
|
|
if (!isNaN(value)) {
|
|||
|
|
return prev + curr;
|
|||
|
|
} else {
|
|||
|
|
return prev;
|
|||
|
|
}
|
|||
|
|
}, 0);
|
|||
|
|
sums[index] = sums[index].toFixed(2); //保留2位小数
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
console.log(sums);
|
|||
|
|
return sums
|
|||
|
|
},
|
|||
|
|
handleAddBillCode(){
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
handleRemovceBillCode(){
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
handleExportToBill() {
|
|||
|
|
this.download('emis/emisSettleBill/exportBill', {
|
|||
|
|
settleBillNo:this.currentSettleBillNo
|
|||
|
|
}, `账单${new Date().getTime()}.xlsx`)
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
/** 搜索按钮操作 */
|
|||
|
|
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
|
|||
|
|
|
|||
|
|
if(selection&&selection.length>0){
|
|||
|
|
this.currentSettleBillNo=selection[0].settleBillNo;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
|||
|
|
handleSortChange(column) {
|
|||
|
|
this.queryParams.orderByColumn = column.prop;
|
|||
|
|
this.queryParams.isAsc = column.order;
|
|||
|
|
this.getList();
|
|||
|
|
},
|
|||
|
|
/** 修改按钮操作 */
|
|||
|
|
handleUpdate(row) {
|
|||
|
|
this.currentId= row.id || this.ids;
|
|||
|
|
this.openForm = true;
|
|||
|
|
this.titleForm = "账单修改:"+this.currentSettleBillNo;
|
|||
|
|
},
|
|||
|
|
handleView(row) {
|
|||
|
|
this.id=row.id;
|
|||
|
|
this.titleView="查看";
|
|||
|
|
this.openView=true;
|
|||
|
|
// this.router.push({ path: '/emis/emisSettleBill/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 delEmisSettleBill(ids);
|
|||
|
|
}).then(() => {
|
|||
|
|
this.getList();
|
|||
|
|
this.$modal.msgSuccess("删除成功");
|
|||
|
|
}).catch(() => {});
|
|||
|
|
},
|
|||
|
|
/** 导出按钮操作 */
|
|||
|
|
handleExport() {
|
|||
|
|
// this.download('emis/emisSettleBill/export', {
|
|||
|
|
// ...this.queryParams
|
|||
|
|
// }, `emisSettleBill_${new Date().getTime()}.xlsx`)
|
|||
|
|
const loadingInstance = this.$loading({
|
|||
|
|
text: '正在导出...'
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
|
|||
|
|
var qParam = {...this.queryParams};
|
|||
|
|
qParam.pageNum=1;
|
|||
|
|
qParam.pageSize=5000;
|
|||
|
|
|
|||
|
|
listEmisSettleBill(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','settleBillNo','settleBillName','settleType','settleStartDate','settleEndDate','billMonth','recMoney','recedMoney','custNo','customerCode','customerName','siteCode','siteName','satisfyMoney','allowanceMoney','deductionMoney','otherMoney','satisfyReason','allowanceReason','deductionReason','otherReason','openBillStatus','paymentStatus','sendPieceSum','pieceNumber','feeWeight','uncollectedAmount','sendMoneySum','refundAmount','refundMoney','blConfirm','confirmDate','confirmSite','confirmManCode','blSiteConfirm','confirmNote','siteConfirmDate','siteConfirmManCode','siteConfirmNote','remark','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
|||
|
|
const data = this.formatJson(filterVal, curList, response.rows)
|
|||
|
|
axios({
|
|||
|
|
method: "get",
|
|||
|
|
url: this.templateFile,
|
|||
|
|
responseType: "arraybuffer",
|
|||
|
|
}).then(response =>{
|
|||
|
|
|
|||
|
|
|
|||
|
|
console.log("==this.templateFile=>",this.templateFile);
|
|||
|
|
console.log("==xxxx=>",response);
|
|||
|
|
|
|||
|
|
excel.export_json_to_excel_by_tpl({
|
|||
|
|
tplData:response,
|
|||
|
|
header: tHeader,
|
|||
|
|
data,
|
|||
|
|
filename: '账单',
|
|||
|
|
autoWidth: true
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
|
|||
|
|
}).catch(error => console.log(error))
|
|||
|
|
|
|||
|
|
|
|||
|
|
loadingInstance.close()
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
/** 导出按钮操作 */
|
|||
|
|
handleExport_old() {
|
|||
|
|
// this.download('emis/emisSettleBill/export', {
|
|||
|
|
// ...this.queryParams
|
|||
|
|
// }, `emisSettleBill_${new Date().getTime()}.xlsx`)
|
|||
|
|
const loadingInstance = this.$loading({
|
|||
|
|
text: '正在导出...'
|
|||
|
|
})
|
|||
|
|
var qParam = {...this.queryParams};
|
|||
|
|
qParam.pageNum=1;
|
|||
|
|
qParam.pageSize=5000;
|
|||
|
|
|
|||
|
|
listEmisSettleBill(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','settleBillNo','settleBillName','settleType','settleStartDate','settleEndDate','billMonth','recMoney','recedMoney','custNo','customerCode','customerName','siteCode','siteName','satisfyMoney','allowanceMoney','deductionMoney','otherMoney','satisfyReason','allowanceReason','deductionReason','otherReason','openBillStatus','paymentStatus','sendPieceSum','pieceNumber','feeWeight','uncollectedAmount','sendMoneySum','refundAmount','refundMoney','blConfirm','confirmDate','confirmSite','confirmManCode','blSiteConfirm','confirmNote','siteConfirmDate','siteConfirmManCode','siteConfirmNote','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 lang="scss" scoped>
|
|||
|
|
.el-divider{
|
|||
|
|
margin-top: 0px;
|
|||
|
|
background: 0 0;
|
|||
|
|
border-top: 1px solid #E6EBF5;
|
|||
|
|
}
|
|||
|
|
.el-divider__text {
|
|||
|
|
color: #0955ee;
|
|||
|
|
cursor: pointer;
|
|||
|
|
}
|
|||
|
|
.query-label {
|
|||
|
|
.el-radio{
|
|||
|
|
display: block;
|
|||
|
|
line-height: 23px;
|
|||
|
|
white-space: normal;
|
|||
|
|
margin-right: 0;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
</style>
|