|
@@ -4,7 +4,7 @@
|
|
<div class="top">
|
|
<div class="top">
|
|
<el-form :inline="true">
|
|
<el-form :inline="true">
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-input v-model="shipName" placeholder="请输入船名"></el-input>
|
|
|
|
|
|
+ <el-input v-model="shipName" placeholder="请输入船名" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- <el-form-item>
|
|
<!-- <el-form-item>
|
|
<span class="demonstration">离港日期</span>
|
|
<span class="demonstration">离港日期</span>
|
|
@@ -182,13 +182,13 @@
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="inspectionFees"
|
|
|
|
|
|
+ prop="inspectionsFee"
|
|
label="水分检测费"
|
|
label="水分检测费"
|
|
width="120px"
|
|
width="120px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input type="number" v-model="scope.row.inspectionFees"></el-input>
|
|
|
|
|
|
+ <el-input type="number" v-model="scope.row.inspectionsFee"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -213,94 +213,10 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="statementTotalAmount"
|
|
prop="statementTotalAmount"
|
|
- label="总计开票金额"
|
|
|
|
|
|
+ label="开票金额"
|
|
width="100px"
|
|
width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="capacityNumber"
|
|
|
|
- label="江船"
|
|
|
|
- width="100px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="loadTonnage"
|
|
|
|
- label="装船吨位"
|
|
|
|
- width="100px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="loadingProportion"
|
|
|
|
- label="装船比例"
|
|
|
|
- width="70px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- {{(scope.row.loadingProportion*100).toFixed(2)}}%
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="realTonnage"
|
|
|
|
- label="结算吨位"
|
|
|
|
- width="100px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope" v-if="scope.row.realTonnage">
|
|
|
|
- {{(scope.row.realTonnage).toFixed(2)}}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="fee"
|
|
|
|
- label="水运费"
|
|
|
|
- width="100px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope" v-if="scope.row.fee">
|
|
|
|
- {{(scope.row.fee).toFixed(2)}}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="previewTonnage"
|
|
|
|
- label="已预开票吨位"
|
|
|
|
- width="120px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope" v-if="scope.row.previewTonnage">
|
|
|
|
- {{(scope.row.previewTonnage).toFixed(2)}}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="previewFee"
|
|
|
|
- label="已预开票金额"
|
|
|
|
- width="100px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope" v-if="scope.row.previewFee">
|
|
|
|
- {{(scope.row.previewFee).toFixed(2)}}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="makeTonnage"
|
|
|
|
- label="实际开票吨位"
|
|
|
|
- width="100px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope" v-if="scope.row.makeTonnage">
|
|
|
|
- {{(scope.row.makeTonnage).toFixed(2)}}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="actuallyMoney"
|
|
|
|
- label="实际开票金额"
|
|
|
|
- width="100px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope" v-if="scope.row.actuallyMoney">
|
|
|
|
- {{(scope.row.actuallyMoney).toFixed(2)}}
|
|
|
|
- </template>
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<!-- <el-table-column
|
|
<!-- <el-table-column
|
|
prop="feeMake"
|
|
prop="feeMake"
|
|
@@ -330,9 +246,10 @@
|
|
<el-tab-pane label="已结算" name="second">
|
|
<el-tab-pane label="已结算" name="second">
|
|
<el-table
|
|
<el-table
|
|
:data="tableData1"
|
|
:data="tableData1"
|
|
- ref="tableRef1"
|
|
|
|
|
|
+ ref="tableRef"
|
|
border
|
|
border
|
|
- max-height="600px"
|
|
|
|
|
|
+ style="width: 100%; margin-top: 0px"
|
|
|
|
+ max-height="500px"
|
|
:row-style="{ height: '30px' }"
|
|
:row-style="{ height: '30px' }"
|
|
:cell-style="{ fontWeight: '700' }"
|
|
:cell-style="{ fontWeight: '700' }"
|
|
class="table"
|
|
class="table"
|
|
@@ -350,137 +267,101 @@
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="materialName"
|
|
prop="materialName"
|
|
label="品种"
|
|
label="品种"
|
|
- width="150px"
|
|
|
|
|
|
+ width="120px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="resultForeignShipName"
|
|
prop="resultForeignShipName"
|
|
label="船名"
|
|
label="船名"
|
|
- width="150px"
|
|
|
|
|
|
+ width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="portName"
|
|
prop="portName"
|
|
label="放货港口"
|
|
label="放货港口"
|
|
- width="150px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="totalPreviewTonnage"
|
|
|
|
- label="已预开总吨位"
|
|
|
|
width="120px"
|
|
width="120px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
- <template slot-scope="scope" v-if="scope.row.totalPreviewTonnage">
|
|
|
|
- {{(scope.row.totalPreviewTonnage).toFixed(2)}}
|
|
|
|
- </template>
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="totalPreviewFee"
|
|
|
|
- label="已预开总金额"
|
|
|
|
- width="120px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope" v-if="scope.row.totalPreviewFee">
|
|
|
|
- {{(scope.row.totalPreviewFee).toFixed(2)}}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="totalEnTonnage"
|
|
|
|
- label="开票总吨位"
|
|
|
|
- width="100px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope" v-if="scope.row.totalEnTonnage">
|
|
|
|
- {{(scope.row.totalEnTonnage).toFixed(2)}}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="statementTotalAmount"
|
|
|
|
- label="开票总金额"
|
|
|
|
|
|
+ <!-- <el-table-column
|
|
|
|
+ prop="carrierName"
|
|
|
|
+ label="承运单位"
|
|
width="100px"
|
|
width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
- </el-table-column>
|
|
|
|
|
|
+ </el-table-column> -->
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="resultOutPortTime"
|
|
prop="resultOutPortTime"
|
|
label="离港日期"
|
|
label="离港日期"
|
|
- width="200px"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="loadTonnage"
|
|
|
|
- label="装船吨位"
|
|
|
|
width="100px"
|
|
width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="loadingProportion"
|
|
|
|
- label="装船比例"
|
|
|
|
|
|
+ prop="monthMakeTonnage"
|
|
|
|
+ label="月份开票吨位"
|
|
width="100px"
|
|
width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
- <template slot-scope="scope">
|
|
|
|
- {{(scope.row.loadingProportion*100).toFixed(2)}}%
|
|
|
|
- </template>
|
|
|
|
|
|
+
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="inspectionFees"
|
|
|
|
- label="水分检测费"
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="unitPrice"
|
|
|
|
+ label="合同单价"
|
|
width="100px"
|
|
width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="realTonnage"
|
|
|
|
- label="结算吨位"
|
|
|
|
- width="100px"
|
|
|
|
|
|
+ prop="inspectionsFee"
|
|
|
|
+ label="水分检测费"
|
|
|
|
+ width="120px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="unitPrice"
|
|
|
|
- label="合同单价"
|
|
|
|
- width="100px"
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="totalPreviewTonnage"
|
|
|
|
+ label="已预开总吨位"
|
|
|
|
+ width="120px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="fee"
|
|
|
|
- label="金额(元)"
|
|
|
|
- width="100px"
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="totalPreviewFee"
|
|
|
|
+ label="已预开总金额"
|
|
|
|
+ width="120px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="previewTonnage"
|
|
|
|
- label="已预开票吨位"
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="statementTotalAmount"
|
|
|
|
+ label="开票金额"
|
|
width="100px"
|
|
width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="previewFee"
|
|
|
|
- label="已预开票金额"
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="monthLoadTonnage"
|
|
|
|
+ label="月份装船吨位"
|
|
width="100px"
|
|
width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="makeTonnage"
|
|
|
|
- label="实际开票吨位"
|
|
|
|
- width="100px"
|
|
|
|
|
|
+ prop="monthLoadingProportion"
|
|
|
|
+ label="月份装船比例"
|
|
|
|
+ width="70px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
|
|
+ <template slot-scope="scope" >
|
|
|
|
+ {{(scope.row.monthLoadingProportion*100).toFixed(2)}}%
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="feeMake"
|
|
|
|
- label="实际开票金额"
|
|
|
|
|
|
+ prop="monthRealTonnage"
|
|
|
|
+ label="月份结算吨位"
|
|
width="100px"
|
|
width="100px"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
@@ -510,20 +391,10 @@ export default {
|
|
pos: null,
|
|
pos: null,
|
|
mergeList: [
|
|
mergeList: [
|
|
"index",
|
|
"index",
|
|
- "carrierName",
|
|
|
|
- "portName",
|
|
|
|
"resultForeignShipName",
|
|
"resultForeignShipName",
|
|
"materialName",
|
|
"materialName",
|
|
"totalEnTonnage",
|
|
"totalEnTonnage",
|
|
"operate",
|
|
"operate",
|
|
- "statementTotalAmount",
|
|
|
|
- "makeTonnageTotal",
|
|
|
|
- "monthLoadTonnage",
|
|
|
|
- "monthLoadingProportion",
|
|
|
|
- "monthRealTonnage",
|
|
|
|
- "totalPreviewTonnage",
|
|
|
|
- "monthMakeTonnage",
|
|
|
|
- "totalPreviewFee"
|
|
|
|
],
|
|
],
|
|
activeName: "first",
|
|
activeName: "first",
|
|
tableTitle: "结算账单报表",
|
|
tableTitle: "结算账单报表",
|
|
@@ -555,16 +426,11 @@ export default {
|
|
console.log("row:",row);
|
|
console.log("row:",row);
|
|
//遍历tableData,找出相同批次的行数
|
|
//遍历tableData,找出相同批次的行数
|
|
let arr = this.tableData.filter(e => {
|
|
let arr = this.tableData.filter(e => {
|
|
- return e.batchId == row.batchId && e.noticeTime==row.noticeTime && row.unitPriceId == e.unitPriceId;
|
|
|
|
|
|
+ return e.batchId == row.batchId;
|
|
});
|
|
});
|
|
let map = {
|
|
let map = {
|
|
list: arr,
|
|
list: arr,
|
|
- statementType: 3,
|
|
|
|
- totalEnTonnage: row.monthMakeTonnage.toFixed(2),
|
|
|
|
- statementTotalAmount: row.statementTotalAmount.toFixed(2),
|
|
|
|
- totalPreviewFee:row.totalPreviewFee.toFixed(2),
|
|
|
|
- totalPreviewTonnage:row.totalPreviewTonnage.toFixed(2),
|
|
|
|
- userID: getCookie("userId"),
|
|
|
|
|
|
+ userId: getCookie("userId"),
|
|
statementStatus:1
|
|
statementStatus:1
|
|
};
|
|
};
|
|
console.log("map:",map);
|
|
console.log("map:",map);
|
|
@@ -585,16 +451,11 @@ export default {
|
|
console.log("row:",row);
|
|
console.log("row:",row);
|
|
//遍历tableData,找出相同批次的行数
|
|
//遍历tableData,找出相同批次的行数
|
|
let arr = this.tableData.filter(e => {
|
|
let arr = this.tableData.filter(e => {
|
|
- return e.batchId == row.batchId && e.noticeTime==row.noticeTime && row.unitPriceId == e.unitPriceId;
|
|
|
|
|
|
+ return e.batchId == row.batchId;
|
|
});
|
|
});
|
|
let map = {
|
|
let map = {
|
|
list: arr,
|
|
list: arr,
|
|
- statementType: 3,
|
|
|
|
- totalEnTonnage: row.monthMakeTonnage.toFixed(2),
|
|
|
|
- statementTotalAmount: row.statementTotalAmount.toFixed(2),
|
|
|
|
- totalPreviewFee:row.totalPreviewFee.toFixed(2),
|
|
|
|
- totalPreviewTonnage:row.totalPreviewTonnage.toFixed(2),
|
|
|
|
- userID: getCookie("userId"),
|
|
|
|
|
|
+ userId: getCookie("userId"),
|
|
statementStatus:0
|
|
statementStatus:0
|
|
};
|
|
};
|
|
console.log("map:",map);
|
|
console.log("map:",map);
|
|
@@ -614,52 +475,20 @@ export default {
|
|
computedTableData(data) {
|
|
computedTableData(data) {
|
|
data.forEach((item, index) => {
|
|
data.forEach((item, index) => {
|
|
if (index == 0) {
|
|
if (index == 0) {
|
|
- } else if (item.batchId == data[index - 1].batchId && item.noticeTime == data[index - 1].noticeTime && item.unitPriceId == data[index - 1].unitPriceId) {
|
|
|
|
|
|
+ } else if (item.batchId == data[index - 1].batchId) {
|
|
item.totalEnTonnage = data[index - 1].totalEnTonnage;
|
|
item.totalEnTonnage = data[index - 1].totalEnTonnage;
|
|
- item.totalPreviewTonnage= data[index - 1].totalPreviewTonnage;
|
|
|
|
}
|
|
}
|
|
//总计预开票金额
|
|
//总计预开票金额
|
|
item.totalPreviewFee=item.totalPreviewTonnage*item.unitPrice;
|
|
item.totalPreviewFee=item.totalPreviewTonnage*item.unitPrice;
|
|
- //预开吨位
|
|
|
|
- item.previewTonnage=item.totalPreviewTonnage*(item.loadTonnage/item.monthLoadTonnage);
|
|
|
|
- //预开金额
|
|
|
|
- item.previewFee = (item.unitPrice * item.previewTonnage);
|
|
|
|
- //结算吨位
|
|
|
|
- item.realTonnage = (
|
|
|
|
- item.totalEnTonnage * item.loadingProportion
|
|
|
|
- );
|
|
|
|
- //金额
|
|
|
|
- item.fee = (item.realTonnage * item.unitPrice);
|
|
|
|
- //开票吨位
|
|
|
|
- item.makeTonnage = (item.realTonnage - item.previewTonnage);
|
|
|
|
- //实际开票金额
|
|
|
|
- item.actuallyMoney = (item.makeTonnage * item.unitPrice-item.inspectionFees);
|
|
|
|
//月份结算吨位/
|
|
//月份结算吨位/
|
|
item.monthRealTonnage = item.totalEnTonnage*item.monthLoadingProportion;
|
|
item.monthRealTonnage = item.totalEnTonnage*item.monthLoadingProportion;
|
|
//月份开票吨位
|
|
//月份开票吨位
|
|
item.monthMakeTonnage = item.monthRealTonnage-item.totalPreviewTonnage;
|
|
item.monthMakeTonnage = item.monthRealTonnage-item.totalPreviewTonnage;
|
|
|
|
+ //月份开票金额
|
|
|
|
+ item.statementTotalAmount=(item.monthMakeTonnage.toFixed(2)*item.unitPrice-item.inspectionsFee).toFixed(2);
|
|
});
|
|
});
|
|
- this.computedTotal(data);
|
|
|
|
this.getSpanArr(this.tableData);
|
|
this.getSpanArr(this.tableData);
|
|
},
|
|
},
|
|
- //遍历,汇总
|
|
|
|
- computedTotal(data){
|
|
|
|
- data.forEach((item, index) => {
|
|
|
|
- let arr = data.filter(e => {
|
|
|
|
- return e.batchId == item.batchId && e.noticeTime==item.noticeTime && e.unitPriceId==item.unitPriceId;
|
|
|
|
- });
|
|
|
|
- let inspectionFees=arr.reduce((pre, item1) => {
|
|
|
|
- if(item1.inspectionFees)
|
|
|
|
- return pre.plus(new BigNumber(item1.inspectionFees));
|
|
|
|
- else
|
|
|
|
- return pre.plus(0.0);
|
|
|
|
- }, new BigNumber(0.0));
|
|
|
|
- console.log("inspectionFees:",inspectionFees.toNumber());
|
|
|
|
- if(item.monthMakeTonnage){
|
|
|
|
- item.statementTotalAmount=(item.monthMakeTonnage.toFixed(2)*item.unitPrice-inspectionFees.toNumber()).toFixed(2);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
//根据表格据汇总顶部展示
|
|
//根据表格据汇总顶部展示
|
|
getTotalArr(data) {
|
|
getTotalArr(data) {
|
|
this.totalWillTonageedValue = data.reduce((pre, item) => {
|
|
this.totalWillTonageedValue = data.reduce((pre, item) => {
|
|
@@ -738,7 +567,7 @@ export default {
|
|
this.pos = 0;
|
|
this.pos = 0;
|
|
} else {
|
|
} else {
|
|
// 判断当前元素与上一个元素是否相同
|
|
// 判断当前元素与上一个元素是否相同
|
|
- if (data[i].batchId === data[i - 1].batchId && data[i].unitPriceId==data[i-1].unitPriceId) {
|
|
|
|
|
|
+ if (data[i].batchId === data[i - 1].batchId) {
|
|
this.spanArr[this.pos] += 1;
|
|
this.spanArr[this.pos] += 1;
|
|
data[i].group = data[i - 1].group;
|
|
data[i].group = data[i - 1].group;
|
|
this.spanArr.push(0);
|
|
this.spanArr.push(0);
|
|
@@ -761,7 +590,7 @@ export default {
|
|
this.pos = 0;
|
|
this.pos = 0;
|
|
} else {
|
|
} else {
|
|
// 判断当前元素与上一个元素是否相同
|
|
// 判断当前元素与上一个元素是否相同
|
|
- if (data[i].statementId === data[i - 1].statementId) {
|
|
|
|
|
|
+ if (data[i].batchId === data[i - 1].batchId) {
|
|
this.spanArr1[this.pos] += 1;
|
|
this.spanArr1[this.pos] += 1;
|
|
data[i].group = data[i - 1].group;
|
|
data[i].group = data[i - 1].group;
|
|
this.spanArr1.push(0);
|
|
this.spanArr1.push(0);
|