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
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
import CommonEvent from "../../common/event/CommonEvent"
import { modifyAlpha } from 'zrender/lib/tool/color';
export default {
mixins:[CommonEvent],
methods: {
async query(){
if (this.model.bopp.rptno == null||this.model.bopp.rptno == "") {
this.$notify.error({ title: '错误', message: '请输入完整的申报号码' });
return;
}
const loading = this.loading();
const rtnmsg = await Api.post(`/${this.moduleRouter()}/${this.root.trnName}/query`,
{
...this.model.bopp,
pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize
});
if (rtnmsg.respCode === SUCCESS) {
this.model.dbllst = rtnmsg.data.list;
this.pagination.total =rtnmsg.data.total;
}
else{
this.model.dbllst = rtnmsg.data.list;
this.pagination.total =rtnmsg.data.total;
}
loading.close();
},
async currentChange(num){
this.pagination.pageNum = num
this.query()
},
reset(){
this.model.bopp.rptno='';
this.pagination= {
pageNum: 1,
pageSize: 10,
total: 0,
};
this.model.dbllst=[];
},
async init(inr){
const rtnmsg = await Api.post(`/report/bopnew/public/getDblByInr`,{inr:inr})
if(rtnmsg.respCode==SUCCESS){
this.model.bopgrp.dbl=rtnmsg.data;
}
},
async modify(){
const rtnmsgchk = await Api.post(`/${this.moduleRouter()}/${this.root.trnName}/checkAll`,{...this.model})
if(rtnmsgchk.respCode==SUCCESS){
var haserr=rtnmsgchk.data.errorMap;
if(haserr){
this.$confirm('存在非法状态,是否需要保存?', '提示', {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning"
}).then(async() => {
let rtnmsgame = await Api.post(`/report/bopnew/public/ameDblSta`,{...this.model.bopgrp.dbl})
if(rtnmsgame.respCode==SUCCESS){
this.$notify({ title: '成功', type: 'success', message: '修改成功' })
}else{
this.$notify({ title: '失败', type: 'error', message: '修改失败' })
}
this.closeDialogOpen();
this.query();
}).catch((e)=>{
var errorstr="";
for(var i in haserr){
errorstr+=haserr[i];
}
this.$msgbox({ title: "错误", message: errorstr, type: "error" })
});
}else{
let rtnmsgame = await Api.post(`/report/bopnew/public/ameDblSta`,{...this.model.bopgrp.dbl})
if(rtnmsgame.respCode==SUCCESS){
this.$notify({ title: '成功', type: 'success', message: '修改成功' })
}else{
this.$notify({ title: '失败', type: 'error', message: '修改失败' })
}
this.closeDialogOpen();
this.query();
}
}
}
}
}