|
@@ -599,10 +599,10 @@
|
|
|
@click="addOrUpdateHandle"
|
|
|
>查看审批流</el-button
|
|
|
>
|
|
|
- <el-button type="primary" @click="submitForm" size="mini" :disabled="notChange"
|
|
|
+ <el-button type="success" @click="submitForm" size="mini" :disabled="notChange"
|
|
|
>保 存</el-button
|
|
|
>
|
|
|
- <el-button @click="addPage" size="mini">新 增</el-button>
|
|
|
+ <el-button type="primary" @click="addPage" size="mini">新 增</el-button>
|
|
|
</div>
|
|
|
<div style="margin: 0 12px">
|
|
|
<el-button
|
|
@@ -3409,28 +3409,61 @@ export default {
|
|
|
const { columns, data } = param;
|
|
|
const sums = [];
|
|
|
columns.forEach((column, index) => {
|
|
|
- sums[0] = "合计";
|
|
|
- sums[10] = this.totAL.toFixed(2);
|
|
|
- sums[9] = this.Ttime.toFixed(2);
|
|
|
+ if(this.selection.length == 0){
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = "合计";
|
|
|
+ } else if ( column.label == '金额' || column.label == '本次金额') {
|
|
|
+ const values = data.map((item) => Number(item[column.property]));
|
|
|
+ if (!values.every((value) => isNaN(value))) {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ } else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = "合计";
|
|
|
+ } else if (column.label == '金额' || column.label == '本次金额') {
|
|
|
+ const values = this.selection.map((selection) => Number(selection[column.property]));
|
|
|
+ if (!values.every((value) => isNaN(value))) {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ } else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // sums[0] = "合计";
|
|
|
+ // sums[10] = this.totAL.toFixed(2);
|
|
|
+ // sums[9] = this.Ttime.toFixed(2);
|
|
|
});
|
|
|
return sums;
|
|
|
},
|
|
|
// 导入多选框
|
|
|
handleSelectionChange_s(selection) {
|
|
|
- this.totAL = 0;
|
|
|
- this.Ttime = 0;
|
|
|
+ // this.totAL = 0;
|
|
|
+ // this.Ttime = 0;
|
|
|
this.selection = selection;
|
|
|
- if (this.selection.length == 0) {
|
|
|
- for (let item in this.chargeList_s) {
|
|
|
- this.totAL += Number(this.chargeList_s[item].fAmt);
|
|
|
- this.Ttime += Number(this.chargeList_s[item].fAmtdr);
|
|
|
- }
|
|
|
- } else {
|
|
|
- for (let index in selection) {
|
|
|
- this.totAL += Number(selection[index].fAmt);
|
|
|
- this.Ttime += Number(selection[index].fAmtdr);
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (this.selection.length == 0) {
|
|
|
+ // for (let item in this.chargeList_s) {
|
|
|
+ // this.totAL += Number(this.chargeList_s[item].fAmt);
|
|
|
+ // this.Ttime += Number(this.chargeList_s[item].fAmtdr);
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // for (let index in selection) {
|
|
|
+ // this.totAL += Number(selection[index].fAmt);
|
|
|
+ // this.Ttime += Number(selection[index].fAmtdr);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
// this.getSummaries()
|
|
|
},
|
|
|
// 多选框选中数据
|
|
@@ -3485,6 +3518,13 @@ export default {
|
|
|
this.nothing.push(this.selection[item].fName);
|
|
|
if (this.increase_s.length === 0) {
|
|
|
this.increase_s = this.increase_s.concat(this.selection);
|
|
|
+ for(let li in this.increase_s){
|
|
|
+ if(this.increase_s[li].fSrcdc == 'D'){
|
|
|
+ this.increase_s[li].fSrcdc = "收"
|
|
|
+ }else if(this.increase_s[li].fSrcdc == 'C'){
|
|
|
+ this.increase_s[li].fSrcdc = "付"
|
|
|
+ }
|
|
|
+ }
|
|
|
//去重提单号
|
|
|
this.empty = new Set(this.empty);
|
|
|
this.empty = Array.from(this.empty);
|
|
@@ -3520,71 +3560,80 @@ export default {
|
|
|
fSystemType: Cookies.get("sysType")
|
|
|
};
|
|
|
return
|
|
|
- }else{
|
|
|
- for (let li in this.increase_s) {
|
|
|
- if (this.selection[item].fSrcid !== this.increase_s[li].fSrcid) {
|
|
|
- this.Fee = this.increase_s.concat(this.selection);
|
|
|
- let result = [];
|
|
|
- let obj = {};
|
|
|
- for (let lis in this.Fee) {
|
|
|
- if (!obj[this.Fee[lis].fSrcid]) {
|
|
|
- result.push(this.Fee[lis]);
|
|
|
- obj[this.Fee[lis].fSrcid] = true;
|
|
|
- }
|
|
|
- }
|
|
|
- //去重提单号
|
|
|
- this.empty = new Set(this.empty);
|
|
|
- this.empty = Array.from(this.empty);
|
|
|
- //去重货权方
|
|
|
- this.nothing = new Set(this.nothing);
|
|
|
- this.nothing = Array.from(this.nothing);
|
|
|
-
|
|
|
- if (this.empty.length <= 1) {
|
|
|
- this.pass.fMblno = this.empty[0];
|
|
|
- } else {
|
|
|
- this.pass.fMblno = this.empty[0] + "...";
|
|
|
- }
|
|
|
- if (this.nothing.length <= 1) {
|
|
|
- this.pass.fName = this.nothing[0];
|
|
|
- } else {
|
|
|
- this.pass.fName = this.nothing[0] + "...";
|
|
|
- }
|
|
|
- // this.increase_s = this.increase_s.concat(this.selection);
|
|
|
- this.queryParams.tMblno = this.pass.fMblno; //提单号
|
|
|
- this.queryParams.fCtrlcorpid = this.pass.fName;
|
|
|
- this.queryParams.fCorpid = this.queryParameter.fToCorpid;
|
|
|
- this.queryParams.fAmtcr = Number(this.pass.fAmtcr).toFixed(2);
|
|
|
- this.queryParams.fAmtdr = Number(this.pass.fAmtdr).toFixed(2);
|
|
|
- this.innerVisible = false;
|
|
|
- this.chargeList_s = [];
|
|
|
- this.queryParameter = {
|
|
|
- fCorpid: "",
|
|
|
- fToCorpid: this.queryParams.fCorpid,
|
|
|
- fMblno: "",
|
|
|
- fStatementNo: "",
|
|
|
- fFeeid: "",
|
|
|
- fBilltype: "",
|
|
|
- fBusinessType: "",
|
|
|
- fVslid: "",
|
|
|
- fVoyid: "",
|
|
|
- timeExamine: "",
|
|
|
- timeInterval: "",
|
|
|
- fSystemType: Cookies.get("sysType")
|
|
|
- };
|
|
|
- this.increase_s = result;
|
|
|
- } else {
|
|
|
- let i = Number(item) + 1;
|
|
|
- Num += i + '、'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let li in this.increase_s) {
|
|
|
+ for(let item in this.selection) {
|
|
|
+ if (this.selection[item].fSrcid !== this.increase_s[li].fSrcid) {
|
|
|
+ this.Fee = this.increase_s.concat(this.selection);
|
|
|
+ let result = [];
|
|
|
+ let obj = {};
|
|
|
+ for (let lis in this.Fee) {
|
|
|
+ if(this.Fee[lis].fSrcdc == 'D'){
|
|
|
+ this.Fee[lis].fSrcdc = "收"
|
|
|
+ }else if(this.Fee[lis].fSrcdc == 'C'){
|
|
|
+ this.Fee[lis].fSrcdc = "付"
|
|
|
+ }
|
|
|
+ if (!obj[this.Fee[lis].fSrcid]) {
|
|
|
+ result.push(this.Fee[lis]);
|
|
|
+ obj[this.Fee[lis].fSrcid] = true;
|
|
|
}
|
|
|
}
|
|
|
+ //去重提单号
|
|
|
+ this.empty = new Set(this.empty);
|
|
|
+ this.empty = Array.from(this.empty);
|
|
|
+ //去重货权方
|
|
|
+ this.nothing = new Set(this.nothing);
|
|
|
+ this.nothing = Array.from(this.nothing);
|
|
|
+
|
|
|
+ if (this.empty.length <= 1) {
|
|
|
+ this.pass.fMblno = this.empty[0];
|
|
|
+ } else {
|
|
|
+ this.pass.fMblno = this.empty[0] + "...";
|
|
|
+ }
|
|
|
+ if (this.nothing.length <= 1) {
|
|
|
+ this.pass.fName = this.nothing[0];
|
|
|
+ } else {
|
|
|
+ this.pass.fName = this.nothing[0] + "...";
|
|
|
+ }
|
|
|
+ // this.increase_s = this.increase_s.concat(this.selection);
|
|
|
+ this.queryParams.tMblno = this.pass.fMblno; //提单号
|
|
|
+ this.queryParams.fCtrlcorpid = this.pass.fName;
|
|
|
+ this.queryParams.fCorpid = this.queryParameter.fToCorpid;
|
|
|
+ this.queryParams.fAmtcr = Number(this.pass.fAmtcr).toFixed(2);
|
|
|
+ this.queryParams.fAmtdr = Number(this.pass.fAmtdr).toFixed(2);
|
|
|
+ this.innerVisible = false;
|
|
|
+ this.chargeList_s = [];
|
|
|
+ this.queryParameter = {
|
|
|
+ fCorpid: "",
|
|
|
+ fToCorpid: this.queryParams.fCorpid,
|
|
|
+ fMblno: "",
|
|
|
+ fStatementNo: "",
|
|
|
+ fFeeid: "",
|
|
|
+ fBilltype: "",
|
|
|
+ fBusinessType: "",
|
|
|
+ fVslid: "",
|
|
|
+ fVoyid: "",
|
|
|
+ timeExamine: "",
|
|
|
+ timeInterval: "",
|
|
|
+ fSystemType: Cookies.get("sysType")
|
|
|
+ };
|
|
|
+ this.increase_s = result;
|
|
|
+ } else {
|
|
|
+ let i = Number(li) + 1;
|
|
|
+ Num += i + '、'
|
|
|
}
|
|
|
- }
|
|
|
- MessageBox.confirm("选中的第" + (Num).slice(0,Num.length-1) + "行重复,请重新选择",{
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
+
|
|
|
}
|
|
|
- )
|
|
|
+ }
|
|
|
+ if(Num.length != 0){
|
|
|
+ MessageBox.confirm("从表的第" + (Num).slice(0,Num.length-1) + "行重复,如本次金额变更,请删除后重新选择","提示",{
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|
|
|
} else if (this.state_s == false) {
|
|
|
this.$message.error("本次金额不能大于原定金额");
|
|
@@ -3629,17 +3678,20 @@ export default {
|
|
|
if(this.notChange == true){
|
|
|
this.mainTable = false
|
|
|
}else{
|
|
|
- MessageBox.confirm("是否已保存?",{
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }
|
|
|
- ).then(()=>{
|
|
|
- this.mainTable = false
|
|
|
- this.approve = false;
|
|
|
- this.getList();
|
|
|
- this.reset();
|
|
|
+ this.$confirm("返回列表,是否保存?", "提示", {
|
|
|
+ confirmButtonText: "保存",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
})
|
|
|
+ .then(() => {
|
|
|
+ this.submitForm(Cookies.get("sysType"))
|
|
|
+ this.mainTable = false
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.mainTable = false
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
// 表单重置
|