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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<template>
<div class="eibs-tab">
<c-col :span="24">
<span style="margin-left:20px">正常发票</span>
</c-col>
<c-col :span="20">
<div style="padding: 0 20px">
<el-table :data="model.imgInvmod.invrep.zcinvlst" style="width: 100%">
<el-table-column prop="repflg" label="替换" sortable min-width="100">
<template slot-scope="scope">
<c-checkbox v-model="scope.row.repflg" disabled style="margin-right: 30px;" @change="changeFlg(scope.row)" true-label="X" false-label="" ></c-checkbox>
</template>
</el-table-column>
<el-table-column prop="invcod" label="发票代码" sortable min-width="100">
</el-table-column>
<el-table-column prop="invnum" label="发票号码" sortable min-width="100">
</el-table-column>
<el-table-column prop="monstatus" label="发票监控状态" sortable min-width="160">
<template slot-scope="scope">
{{getLabel(dbCodes.monsta,scope.row.monstatus)}}
</template>
</el-table-column>
<el-table-column prop="hantyp" label="处理状态" sortable min-width="100">
<template slot-scope="scope">
{{getLabel(hantyp,scope.row.hantyp)}}
</template>
</el-table-column>
<el-table-column prop="handat" label="处理时间" sortable min-width="100">
</el-table-column>
<el-table-column prop="CMAIL7" label="处理用户" sortable min-width="100">
</el-table-column>
<el-table-column prop="invdat" label="开票日期" sortable min-width="100">
</el-table-column>
<el-table-column prop="amountin" label="发票占用金额" sortable min-width="150">
</el-table-column>
<el-table-column prop="amounttax" label="价税合计" sortable min-width="100">
</el-table-column>
</el-table>
</div>
</c-col>
<!-- <c-col :span="4">
<div style="margin-top: 50px; margin-left: 20px">
<span style="margin-right:10px">替换</span>
<c-button size="small" type="primary" @click="selectAll('tz')">全选</c-button>
<c-button size="small" type="primary" @click="clearAll('tz')">清空</c-button>
</div>
</c-col> -->
<c-col :span="24">
<span style="margin-left:20px">异常发票</span>
</c-col>
<c-col :span="20">
<div style="padding: 0 20px">
<el-table :data="model.imgInvmod.invrep.fzcinvlst" style="width: 100%">
<el-table-column prop="repflg" label="替换" sortable min-width="100">
<template slot-scope="scope">
<c-checkbox v-model="scope.row.repflg" style="margin-right: 30px;" @change="changeFlg(scope.row)" true-label="X" false-label="" ></c-checkbox>
</template>
</el-table-column>
<el-table-column prop="ignflg" label="忽略" sortable min-width="100">
<template slot-scope="scope">
<c-checkbox v-model="scope.row.ignflg" style="margin-right: 30px;" true-label="X" false-label="" ></c-checkbox>
</template>
</el-table-column>
<el-table-column prop="invcod" label="发票代码" sortable min-width="100">
</el-table-column>
<el-table-column prop="invnum" label="发票号码" sortable min-width="100">
</el-table-column>
<el-table-column prop="monstatus" label="发票监控状态" sortable min-width="160">
<template slot-scope="scope">
{{getLabel(dbCodes.monsta,scope.row.monstatus)}}
</template>
</el-table-column>
<el-table-column prop="hantyp" label="处理状态" sortable min-width="100">
<template slot-scope="scope">
{{getLabel(hantyp,scope.row.hantyp)}}
</template>
</el-table-column>
<el-table-column prop="handat" label="处理时间" sortable min-width="100">
</el-table-column>
<el-table-column prop="CMAIL7" label="处理用户" sortable min-width="100">
</el-table-column>
<el-table-column prop="invdat" label="开票日期" sortable min-width="100">
</el-table-column>
<el-table-column prop="amountin" label="发票占用金额" sortable min-width="150">
</el-table-column>
<el-table-column prop="amounttax" label="价税合计" sortable min-width="100">
</el-table-column>
</el-table>
</div>
</c-col>
<c-col :span="4">
<div style="margin-top: 30px; margin-left: 20px">
<span style="margin-right:10px">替换</span>
<c-button size="small" type="primary" @click="selectAll('ty')">全选</c-button>
<c-button size="small" type="primary" @click="clearAll('ty')">清空</c-button>
</div>
<div style="margin-top: 20px; margin-left: 20px">
<span style="margin-right:10px">忽略</span>
<c-button size="small" type="primary" @click="selectAll('hy')">全选</c-button>
<c-button size="small" type="primary" @click="clearAll('hy')">清空</c-button>
</div>
</c-col>
<c-col :span="24">
<span style="margin-left:20px">重复核验/重复监控</span>
</c-col>
<c-col :span="20">
<div style="padding: 0 20px">
<el-table :data="model.imgInvmod.invrep.cfinvlst" style="width: 100%">
<el-table-column prop="repflg" label="替换" sortable min-width="100">
<template slot-scope="scope">
<c-checkbox v-model="scope.row.repflg" style="margin-right: 30px;" @change="changeFlg(scope.row)" true-label="X" false-label="" ></c-checkbox>
</template>
</el-table-column>
<el-table-column prop="ignflg" label="忽略" sortable min-width="100">
<template slot-scope="scope">
<c-checkbox v-model="scope.row.ignflg" style="margin-right: 30px;" true-label="X" false-label="" ></c-checkbox>
</template>
</el-table-column>
<el-table-column prop="invcod" label="发票代码" sortable min-width="100">
</el-table-column>
<el-table-column prop="invnum" label="发票号码" sortable min-width="100">
</el-table-column>
<el-table-column prop="monstatus" label="发票监控状态" sortable min-width="160">
<template slot-scope="scope">
{{getLabel(dbCodes.monsta,scope.row.monstatus)}}
</template>
</el-table-column>
<el-table-column prop="hantyp" label="处理状态" sortable min-width="100">
<template slot-scope="scope">
{{getLabel(hantyp,scope.row.hantyp)}}
</template>
</el-table-column>
<el-table-column prop="handat" label="处理时间" sortable min-width="100">
</el-table-column>
<el-table-column prop="CMAIL7" label="处理用户" sortable min-width="100">
</el-table-column>
<el-table-column prop="invdat" label="开票日期" sortable min-width="100">
</el-table-column>
<el-table-column prop="amountin" label="发票占用金额" sortable min-width="150">
</el-table-column>
<el-table-column prop="amounttax" label="价税合计" sortable min-width="100">
</el-table-column>
</el-table>
</div>
</c-col>
<c-col :span="4">
<div style="margin-top: 30px; margin-left: 20px">
<span style="margin-right:10px">替换</span>
<c-button size="small" type="primary" @click="selectAll('tc')">全选</c-button>
<c-button size="small" type="primary" @click="clearAll('tc')">清空</c-button>
</div>
<div style="margin-top: 20px; margin-left: 20px">
<span style="margin-right:10px">忽略</span>
<c-button size="small" type="primary" @click="selectAll('hc')">全选</c-button>
<c-button size="small" type="primary" @click="clearAll('hc')">清空</c-button>
</div>
</c-col>
<c-col :span="12">
<el-form-item label="被替换发票占用总金额" style="margin-top:20px" prop="totalamountin">
<c-input-currency v-model="totalamountin" :precision="2" disabled ></c-input-currency>
</el-form-item>
</c-col>
</div>
</template>
<script>
import event from "../event";
import Api from '~/service/Api';
export default {
inject: ["root"],
props: ["model", "codes"],
mixins: [event],
data() {
return {
dbCodes: {
monsta: [],
},
hantyp:[
{ 'label': '已处理被替换', 'value': 'A' },
{ 'label': '已忽略', 'value': 'B' },
{ 'label': '未处理', 'value': 'C' },
],
};
},
computed:{
totalamountin(){
let total = 0
if(this.model.imgInvmod.invrep.zcinvlst.length > 0){
this.model.imgInvmod.invrep.zcinvlst.forEach(item =>{
if(item.repflg == 'X'){
total = total + Number(item.amountin)
}
})
}
if(this.model.imgInvmod.invrep.fzcinvlst.length > 0){
this.model.imgInvmod.invrep.fzcinvlst.forEach(item =>{
if(item.repflg == 'X'){
total = total + Number(item.amountin)
}
})
}
if(this.model.imgInvmod.invrep.cfinvlst.length > 0){
this.model.imgInvmod.invrep.cfinvlst.forEach(item =>{
if(item.repflg == 'X'){
total = total + Number(item.amountin)
}
})
}
this.model.imgInvmod.invrep.totalamountin = total
return total
}
},
methods: {
async getdbCode(dbCode, codeNam) {
let params = {
codeType: dbCode,
uil: 'EN'
}
let rtnmsg = await Api.post("/manager/dic/listDicInfo", params)
if (rtnmsg.respCode === SUCCESS) {
let srvtxt = rtnmsg.data.map(item => ({
value: item.codeValue,
label: item.codeName
}));
this.dbCodes[codeNam] = srvtxt
}
},
getLabel(list, id) {
if (id != '' && Array.isArray(list) && list.length != 0) {
return !list.find(item => item['value'] == id) ? id : list.find(item => item['value'] == id)['label']
}
},
},
created() {},
mounted() {
this.getdbCode("monsta", "monsta");
},
};
</script>
<style>
</style>