invoiceCodeDetailDialog.vue
5.68 KB
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
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div v-loading="loading">
<div class="form_div">
<el-form class="edit-sub-block"
label-width="150px"
:inline="true">
<div>
<el-form-item label="可选开票种类:"
class="onLineItem">
{{
detailInfo.invoiceTypeShow ? detailInfo.invoiceTypeShow : "-"
}}
</el-form-item>
</div>
<div>
<el-form-item label="主订单号:"
class="onLineItem">
{{
detailInfo.bizOrderCode ? detailInfo.bizOrderCode : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="开票项目:"
class="halfItem">
{{ detailInfo.itemNames ? detailInfo.itemNames : "-" }}
</el-form-item>
<el-form-item label="待开票金额:"
class="halfItem">
{{ detailInfo.invoiceAmount
? detailInfo.invoiceAmount
: "-" }}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="收款人:"
class="halfItem">
{{ detailInfo.casherName ? detailInfo.casherName : "-" }}
</el-form-item>
<el-form-item label="复核人:"
class="halfItem">
{{
detailInfo.reviewerName ? detailInfo.reviewerName : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="可开票张数:"
class="halfItem">
{{ detailInfo.allowInvoiceCount ? detailInfo.allowInvoiceCount : "-" }}
</el-form-item>
<el-form-item label="发票备注:"
class="halfItem">
{{
detailInfo.invoiceRemark ? detailInfo.invoiceRemark : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="发送短信:"
class="halfItem">
{{ "-" }}
</el-form-item>
<el-form-item label="二维码有效期:"
class="halfItem">
{{
detailInfo.expireDay ? detailInfo.expireDay + '天' : "-"
}}
</el-form-item>
</div>
<div class="itemDiv">
<el-form-item label="发送邮件:"
class="halfItem">
{{ detailInfo.email ? detailInfo.email : "-" }}
</el-form-item>
</div>
</el-form>
</div>
</div>
</basedialog>
</div>
</template>
<script>
import { getByQrcodeNo } from '@api/invoiceManage'
import { Util, deepClone } from "@/common/util"
import { invoiceTypeOpt } from '@/common/constants.js'
export default {
name: "InvoiceCodeDetailDialog",
components: {
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('dialogClose')
}
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "开票二维码详情",
width: "1080px"
}
},
detailInfo: {},
loading: true,
invoiceTypeOpt: deepClone(invoiceTypeOpt)
}
},
methods: {
getDetail() {
var params = { qrcodeNo: this.paramsObj.qrcodeNo }
getByQrcodeNo(params).then(res => {
this.detailInfo = res
this.dataProcess(this.detailInfo)
this.loading = false
})
},
dataProcess(info) {
if (info) {
if (info.invoiceType) {
let arr = info.invoiceType.split(",")
console.log('arr', arr)
console.log('this.invoiceTypeOpt', this.invoiceTypeOpt)
arr = arr.map((o) => {
return this.invoiceTypeOpt.find(item => item.confId === o)?.confValue
})
info.invoiceTypeShow = arr.join("/")
}
}
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.form_div {
color: #333333;
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
}
}
</style>