1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import { cloneDeep } from "lodash";
import Utils from "~/utils/index";
import Pts from '~/components/business/commonModel/Pts.js';
import BigNumber from "bignumber.js";
export default {
mixins: [commonFunctions],
methods: {
advtypDefault() {
if (this.model.btdgrp.rec.advtyp == "754")
{
this.model.btdgrp.rec.disdat = "";
this.model.btdgrp.rec.dscinsflg = "";
this.model.btdgrp.blk.docdisflg = "";
let bttpModifyList = this.model.bttp.modifySet;
if (!(bttpModifyList && bttpModifyList.includes("setnowflg")) )
{
this.model.bttp.setnowflg = "X";
}
}else if (this.model.btdgrp.rec.advtyp == "750"){
this.model.btdgrp.rec.advdat = "";
let modifyList = this.model.btdgrp.rec.modifySet;
if (!(modifyList && modifyList.includes("dscinsflg")) )
{
this.model.btdgrp.rec.dscinsflg = "X";
}
let blkModifyList = this.model.btdgrp.blk.modifySet;
if (!(blkModifyList && blkModifyList.includes("docdisflg")) )
{
this.model.btdgrp.blk.docdisflg = "X";
}
this.model.bttp.setnowflg = "";
this.model.ltdgrp.rmt.pts.extkey = "";
}else{
this.model.btdgrp.rec.dscinsflg = "";
this.model.btdgrp.blk.docdisflg = "";
this.model.bttp.setnowflg = "";
this.model.ltdgrp.rmt.pts.extkey = "";
}
//优化:通知到单默认初始化一些常规的单据信息
if(this.model.btdgrp.rec.advtyp == "750" && this.model.bttp.docgrdmbe2.docgrd.length == 0 && this.model.bttp.docgrdmbe2.rightdocgrd .length == 0) {
this.model.bttp.docgrdmbe2.docgrd = [
{
docnam: 'Commercial Invoice'
},
{
docnam: 'Bill of Lading Originals'
},
{
docnam: 'Packing List'
}
]
this.model.bttp.docgrdmbe2.rightdocgrd = [
{
docnam: 'Beneficiary\'s Certificate'
},
{
docnam: 'Insurance Policy'
}
]
}else{
this.model.bttp.docgrdmbe2.docgrd = []
this.model.bttp.docgrdmbe2.rightdocgrd = []
}
},
docprbrolDefault() {
if (this.model.btdgrp.rec.docprbrol == "ADT")
{
this.model.btdgrp.prb = cloneDeep(this.model.ltdgrp.adt);
this.model.btdgrp.prb.pts.rol = "PRB";
}else if (this.model.btdgrp.rec.docprbrol == "BE2")
{
this.model.btdgrp.prb = cloneDeep(this.model.btdgrp.be2);
this.model.btdgrp.prb.pts.rol = "PRB";
}else{
const objpta = {
pts : new Pts().data,
}
this.model.btdgrp.prb = cloneDeep(objpta);
this.model.btdgrp.prb.pts.rol = "PRB";
}
},
defaultBtdgrpBlkDocdisN10(){
if(this.model.btdgrp.blk.docdisflg === ""){
this.model.btdgrp.blk.docdis = ""
}
},
docstaDefault() {
if (this.model.btdgrp.rec.disdat != "" && this.model.btdgrp.rec.advtyp == "750")
{
if(this.model.btdgrp.rec.rcvdatbe2 == "" || this.model.btdgrp.rec.rcvdatbe1 == "")
{
this.model.btdgrp.rec.docsta = "E";
}else{
this.model.btdgrp.rec.docsta = "F";
}
}
},
async queryAdvData(ltdinr) {
let res = await Api.post("/Lc/lttdck/queryAdvData", ltdinr);
if (res.respCode == SUCCESS) {
return res.data;
}
},
totamt() {
if (this.model.btdgrp.blk.chaadd.trim() == "" && this.model.btdgrp.blk.chaded.trim() == ""){
const maxAmt = this.model.btdgrp.cbs.max.amt;
const max2Amt = this.model.btdgrp.cbs.max2.amt;
this.model.btdgrp.rec.totamt =new BigNumber(maxAmt).plus(new BigNumber(max2Amt));
}
},
}
}