|
@@ -448,6 +448,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
browseStatus: true,
|
|
|
+ nothing:[],
|
|
|
//导入状态
|
|
|
state_s: true ,
|
|
|
fWbuOptions: [],
|
|
@@ -488,6 +489,7 @@ export default {
|
|
|
timeExamine: '',
|
|
|
timeInterval: ''
|
|
|
},
|
|
|
+ empty:[],
|
|
|
//导入从表传主表
|
|
|
pass:{
|
|
|
fAmtdr:'', //应收合计
|
|
@@ -582,13 +584,6 @@ export default {
|
|
|
}, 0);
|
|
|
sums[0] = '合计';
|
|
|
sums[3] = '';
|
|
|
- if (this.pass.fAmtcr == ''){
|
|
|
-
|
|
|
- return sums[10]
|
|
|
- }else {
|
|
|
- sums[10] = this.pass.fAmtcr
|
|
|
- sums[9] = this.pass.fAmtdr
|
|
|
- }
|
|
|
}
|
|
|
});
|
|
|
return sums;
|
|
@@ -598,31 +593,51 @@ export default {
|
|
|
this.$set(row, 'fAmt', row.fAmtdr)
|
|
|
this.state_s = true
|
|
|
}
|
|
|
- this.$refs.chargeList.clearSelection()
|
|
|
+ console.log('数据:' + JSON.stringify(this.selection))
|
|
|
+ // this.$refs.chargeList.clearSelection()
|
|
|
},
|
|
|
//确认导入
|
|
|
confirmImport() {
|
|
|
console.log(this.state_s)
|
|
|
- if(this.state_s == true){
|
|
|
+
|
|
|
+ for (let item in this.selection) {
|
|
|
+ this.pass.fAmtcr += Number(this.selection[item].fAmt)
|
|
|
+ this.pass.fAmtdr += Number(this.selection[item].fAmtdr)
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.state_s == true) {
|
|
|
if (this.selection.length == '0') {
|
|
|
console.log('未选择')//写入提示
|
|
|
- this.$message.error('未选择导入行');
|
|
|
- }else {
|
|
|
+ this.$message.error('未选择导入行')
|
|
|
+ } else {
|
|
|
console.log(this.selection[0].fMblno)
|
|
|
- for (let item in this.selection){
|
|
|
+ for (let item in this.selection) {
|
|
|
console.log(this.selection[item])
|
|
|
console.log(this.selection[item].fMblno)
|
|
|
-
|
|
|
console.log(this.selection[item].fName)
|
|
|
- if(item >= 1){
|
|
|
- this.pass.fMblno = this.selection[item].fMblno + "..."
|
|
|
- this.pass.fName = this.selection[item].fName + "..."
|
|
|
+ this.empty.push(this.selection[item].fMblno)
|
|
|
+ this.nothing.push(this.selection[item].fName)
|
|
|
+ }
|
|
|
+ //去重提单号
|
|
|
+ this.empty = new Set(this.empty)
|
|
|
+ this.empty = Array.from(this.empty)
|
|
|
+ //去重货权方
|
|
|
+ this.nothing = new Set(this.nothing)
|
|
|
+ this.nothing = Array.from(this.nothing)
|
|
|
|
|
|
- }else if(item == 0){
|
|
|
- this.pass.fMblno = this.selection[item].fMblno
|
|
|
- this.pass.fName = this.selection[item].fName
|
|
|
- }
|
|
|
+ if(this.empty.length <= 1){
|
|
|
+ this.pass.fMblno = this.empty[0]
|
|
|
+ console.log(this.pass.fMblno)
|
|
|
+ }else {
|
|
|
+ this.pass.fMblno = this.empty[0] + "..."
|
|
|
+ console.log(this.pass.fMblno)
|
|
|
}
|
|
|
+ if (this.nothing.length <= 1){
|
|
|
+ this.pass.fName = this.nothing[0]
|
|
|
+ }else {
|
|
|
+ this.pass.fName = this.nothing[0] + "..."
|
|
|
+ }
|
|
|
+
|
|
|
this.increase_s = this.selection
|
|
|
this.queryParams.tMblno = this.pass.fMblno //提单号
|
|
|
this.queryParams.fCtrlcorpid = this.pass.fName
|
|
@@ -641,8 +656,8 @@ export default {
|
|
|
timeInterval: ''
|
|
|
}
|
|
|
}
|
|
|
- }else if(this.state_s == false){
|
|
|
- this.$message.error('本次金额不能大于原定金额');
|
|
|
+ } else if (this.state_s == false) {
|
|
|
+ this.$message.error('本次金额不能大于原定金额')
|
|
|
}
|
|
|
},
|
|
|
/** 查询财务数据主列表 */
|
|
@@ -755,12 +770,6 @@ export default {
|
|
|
// 导入多选框
|
|
|
handleSelectionChange_s(selection) {
|
|
|
console.log(selection)
|
|
|
- this.pass.fAmtcr = 0
|
|
|
- this.pass.fAmtdr = 0
|
|
|
- for (let item in selection){
|
|
|
- this.pass.fAmtcr += Number(selection[item].fAmt)
|
|
|
- this.pass.fAmtdr += Number(selection[item].fAmtdr)
|
|
|
- }
|
|
|
this.selection = selection
|
|
|
},
|
|
|
/** 新增按钮操作 */
|