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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import Api from "~/service/Api"
import commonFunctions from '~/mixin/commonFunctions.js';
export default {
mixins: [commonFunctions],
methods: {
commonValidate() {
if (this.model.unionOrgCode == "") {
this.$notify.warning({
title: '提示',
message: '统一社会信用代码不能为空!'
});
return false;
}
if (this.model.orderNo == "") {
this.$notify.warning({
title: '提示',
message: '平台订单编号不能为空!'
});
return false;
}
return true;
},
async queryGdye() {
if (!this.commonValidate()) {
return;
}
let rtnmsg = await Api.post(`/${this.moduleRouter()}/gmgf/queryGdye`, this.model);
if (rtnmsg.respCode == SUCCESS) {
this.bgdlst = rtnmsg.data ? rtnmsg.data : [];
if (this.bgdlst.length <= 0) {
this.$notify.warning({ title: '提示', message: '无此报关单信息' });
}else{
this.$notify.success("查询成功!");
}
} else {
this.$notify.error({ title: '错误', message: rtnmsg.respCode + "|" + rtnmsg.respMsg });
}
},
async queryGdmx(row) {
if (!this.commonValidate()) {
return;
}
if (row.customNo == "") {
this.$notify.warning({
title: '提示',
message: '报关单号不能为空!'
});
return;
}
let rtnmsg = await Api.post(`/${this.moduleRouter()}/gmgf/queryGdmx`, {
unionOrgCode: this.model.unionOrgCode,
orderNo: this.model.orderNo,
choiceCustomNo: row.customNo
});
if (rtnmsg.respCode == SUCCESS) {
if (!rtnmsg.data.formatData) {
this.$notify.warning({
title: '提示',
message: '关单明细展示失败!'
});
} else {
this.$notify.success("查询成功!");
this.$nextTick(() => {
if (!this.$refs.msgView.directViewDispaly(rtnmsg.data)) {
this.$notify.warning({
title: '提示',
message: '关单明细展示失败!'
});
}
})
}
} else {
this.$notify.error({ title: '错误', message: rtnmsg.respCode + "|" + rtnmsg.respMsg });
}
},
async queryYzbg(row) {
if (!this.commonValidate()) {
return;
}
let rtnmsg = await Api.post(`/${this.moduleRouter()}/gmgf/queryYzbg`, {
orderNo: this.model.orderNo,
choiceCustomNo: row.customNo
});
if (rtnmsg.respCode == SUCCESS) {
this.$notify.success("产生验真报告!");
} else {
this.$notify.error({ title: '错误', message: rtnmsg.respCode + "|" + rtnmsg.respMsg });
}
},
async queryImage(row) {
if (!this.commonValidate()) {
return;
}
if (row.customNo == "") {
this.$notify.warning({
title: '提示',
message: '报关单号不能为空!'
});
return;
}
let rtnmsg = await Api.post(`/${this.moduleRouter()}/gmgf/queryImage`, {
orderNo: this.model.orderNo,
choiceCustomNo: row.customNo
});
if (rtnmsg.respCode == SUCCESS) {
this.$notify.success("产生关单PDF!");
} else {
this.$notify.error({ title: '错误', message: rtnmsg.respCode + "|" + rtnmsg.respMsg });
}
},
async queryPdf(row) {
if (!this.commonValidate()) {
return;
}
if (row.customNo == "") {
this.$notify.warning({
title: '提示',
message: '报关单号不能为空!'
});
return;
}
let rtnmsg = await Api.post(`/${this.moduleRouter()}/gmgf/queryPdf`, {
orderNo: this.model.orderNo,
choiceCustomNo: row.customNo
});
if (rtnmsg.respCode == SUCCESS) {
this.yzbglst = rtnmsg.data.yzbgs ? rtnmsg.data.yzbgs : [];
this.gdpdflst = rtnmsg.data.imges ? rtnmsg.data.imges : [];
} else {
this.$notify.error({ title: '错误', message: rtnmsg.respCode + "|" + rtnmsg.respMsg });
}
},
async showPdf(row) {
if (row.inr == "") {
this.$notify.warning({
title: '提示',
message: '报关单号不能为空!'
});
return;
}
let rtnmsg = await Api.post(`/${this.moduleRouter()}/gmgf/showPdf`, row.inr);
if (rtnmsg.respCode == SUCCESS) {
this.$nextTick(() => {
if (!this.$refs.msgView.directViewDispaly(rtnmsg.data)) {
this.$notify.warning({
title: '提示',
message: 'pdf展示失败!'
});
}
})
} else {
this.$notify.error({ title: '错误', message: rtnmsg.respCode + "|" + rtnmsg.respMsg });
}
}
},
}