vue2-client 1.9.139 → 1.9.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/base-client/components/common/BillPrint/Demo.vue +32 -0
- package/src/base-client/components/common/BillPrint/OpenInvoice.vue +21 -0
- package/src/base-client/components/common/BillPrint/PrintBill.vue +311 -0
- package/src/base-client/components/common/BillPrint/index.vue +97 -0
- package/src/base-client/components/common/XFormTable/XFormTable.vue +9 -3
- package/src/base-client/components/common/XTable/XTable.vue +18 -9
- package/src/config/CreateQueryConfig.js +1 -1
- package/src/pages/userInfoDetailManage/ChangeMeterRecordQuery/index.vue +64 -0
- package/src/pages/userInfoDetailManage/FillCardRecordQuery/index.vue +76 -0
- package/src/pages/userInfoDetailManage/FillGasRecordQuery/index.vue +74 -0
- package/src/pages/userInfoDetailManage/InfoChangeRecordQuery/index.vue +64 -0
- package/src/pages/userInfoDetailManage/InstructRecordQuery/index.vue +64 -0
- package/src/pages/userInfoDetailManage/MachineRecordQuery/index.vue +74 -0
- package/src/pages/userInfoDetailManage/MeterParamRecordQuery/index.vue +64 -0
- package/src/pages/userInfoDetailManage/OtherChargeRecordQuery/index.vue +74 -0
- package/src/pages/userInfoDetailManage/TransferRecordQuery/index.vue +66 -0
- package/src/pages/userInfoDetailManage/UserChargeRecordQuery/index.vue +92 -0
- package/src/pages/userInfoDetailManage/UserHandRecordQuery/index.vue +86 -0
- package/src/pages/userInfoDetailManage/UserRecordQuery/index.vue +73 -0
- package/src/pages/userInfoDetailManage/WatchCollectionRecordQuery/index.vue +64 -0
- package/src/pages/userInfoDetailManage/index.vue +82 -0
- package/src/pages/userInfoDetailManage/userInfoDetailQueryTabs.vue +132 -0
- package/src/router/async/router.map.js +2 -2
- package/src/services/DataModel.js +30 -0
- package/src/services/LodopFuncs.js +144 -0
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import PrintBill from './PrintBill.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: 'Demo',
|
|
6
|
+
components: { PrintBill },
|
|
7
|
+
methods: {
|
|
8
|
+
print () {
|
|
9
|
+
this.$refs.print.print({
|
|
10
|
+
reprint: '正常',
|
|
11
|
+
billUrl: 'card_bill',
|
|
12
|
+
operator: `张三丰`,
|
|
13
|
+
condition: '21952838'
|
|
14
|
+
})
|
|
15
|
+
},
|
|
16
|
+
printOk () {
|
|
17
|
+
console.log('打印成功')
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div>
|
|
25
|
+
<a-button @click="print">打印</a-button>
|
|
26
|
+
<print-bill ref="print" @ok="printOk" :autoPrint="true"></print-bill>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style scoped>
|
|
31
|
+
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// 开电子票
|
|
3
|
+
export default {
|
|
4
|
+
name: 'OpenInvoice',
|
|
5
|
+
data () {
|
|
6
|
+
return {
|
|
7
|
+
show: false
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<a-modal v-model="show">
|
|
15
|
+
<h4>功能暂未实现</h4>
|
|
16
|
+
</a-modal>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<style scoped>
|
|
20
|
+
|
|
21
|
+
</style>
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a-modal
|
|
4
|
+
v-model="showModal"
|
|
5
|
+
title="收费发票"
|
|
6
|
+
width="60vw"
|
|
7
|
+
@ok="printGen"
|
|
8
|
+
@cancel="cancel"
|
|
9
|
+
style="min-width: 800px">
|
|
10
|
+
<div
|
|
11
|
+
style="display: flex;justify-content: center;"
|
|
12
|
+
id="normal-bill"
|
|
13
|
+
v-if="bill.data"
|
|
14
|
+
v-html="bill.data">
|
|
15
|
+
</div>
|
|
16
|
+
<a-skeleton v-else active/>
|
|
17
|
+
</a-modal>
|
|
18
|
+
<div
|
|
19
|
+
style="display: flex;justify-content: center;"
|
|
20
|
+
id="normal-bill"
|
|
21
|
+
v-show="false"
|
|
22
|
+
v-html="bill.data">
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<script>
|
|
27
|
+
|
|
28
|
+
import DataModel from '@/services/DataModel'
|
|
29
|
+
import getLodop from '@/services/LodopFuncs'
|
|
30
|
+
import { mapState } from 'vuex'
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
title: '收费发票',
|
|
34
|
+
data () {
|
|
35
|
+
return {
|
|
36
|
+
model: {},
|
|
37
|
+
bill: {},
|
|
38
|
+
showModal: false,
|
|
39
|
+
id: 'normal-bill'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
props: {
|
|
43
|
+
serviceName: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: process.env.VUE_APP_SYSTEM_NAME
|
|
46
|
+
},
|
|
47
|
+
autoPrint: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false
|
|
50
|
+
},
|
|
51
|
+
top: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: '5mm'
|
|
54
|
+
},
|
|
55
|
+
left: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: '5mm'
|
|
58
|
+
},
|
|
59
|
+
width: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: '90%'
|
|
62
|
+
},
|
|
63
|
+
height: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: '80%'
|
|
66
|
+
},
|
|
67
|
+
extra: {
|
|
68
|
+
type: Object,
|
|
69
|
+
default: function () {
|
|
70
|
+
return {
|
|
71
|
+
count: 0,
|
|
72
|
+
tops: []
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
customStyle: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: ''
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
ready () {
|
|
82
|
+
},
|
|
83
|
+
computed: {
|
|
84
|
+
...mapState('account', { currUser: 'user' }),
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
cancel () {
|
|
88
|
+
this.showModal = false
|
|
89
|
+
this.$emit('ok')
|
|
90
|
+
},
|
|
91
|
+
async getBillData (data) {
|
|
92
|
+
// {
|
|
93
|
+
// reprint: "'正常'",
|
|
94
|
+
// billUrl: "card_bill",
|
|
95
|
+
// operator: `'${this.currUser.name}'`,
|
|
96
|
+
// condition: id
|
|
97
|
+
// }
|
|
98
|
+
this.bill = new DataModel({ serviceName: this.serviceName, ...data, })
|
|
99
|
+
await this.bill.search()
|
|
100
|
+
},
|
|
101
|
+
async print (data) {
|
|
102
|
+
if (!this.autoPrint) {
|
|
103
|
+
this.showModal = true
|
|
104
|
+
}
|
|
105
|
+
await this.getBillData(data).catch(
|
|
106
|
+
_err => {
|
|
107
|
+
this.showModal = false
|
|
108
|
+
this.$message.error('获取发票信息失败')
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
if (this.autoPrint) {
|
|
112
|
+
this.printGen()
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
printGen () {
|
|
116
|
+
this.$nextTick(() => {
|
|
117
|
+
this.refreshData()
|
|
118
|
+
})
|
|
119
|
+
const lodop = getLodop()
|
|
120
|
+
if (!lodop) {
|
|
121
|
+
this.$emit('ok', this.id)
|
|
122
|
+
return
|
|
123
|
+
}
|
|
124
|
+
let selfStyle = '<style>'
|
|
125
|
+
// var style = '<link rel="stylesheet/less" type="text/less" href="../client.less"/>'
|
|
126
|
+
if (this.customStyle) {
|
|
127
|
+
selfStyle += this.customStyle
|
|
128
|
+
} else {
|
|
129
|
+
selfStyle += 'td {border-width: 2px;padding: 0.5px;border-style: solid; border-color:#000000; } \n' +
|
|
130
|
+
'table{border-collapse:collapse; border}\n' +
|
|
131
|
+
'.noborder{border-width: 0px;}\n' +
|
|
132
|
+
'.tdleft{text-align: left;}\n' +
|
|
133
|
+
'.tdright{text-align: right;} \n' +
|
|
134
|
+
'.tdcenter{text-align: center;}\n' +
|
|
135
|
+
'.fs10{font-size: 0.4em;}\n' +
|
|
136
|
+
'.fs11{font-size: 0.5em;}\n' +
|
|
137
|
+
'.fs12{font-size: 0.6em;}\n' +
|
|
138
|
+
'.fs13{font-size: 0.7em;}\n' +
|
|
139
|
+
'.fs15{font-size: 0.9em;}\n' +
|
|
140
|
+
'.fs17{font-size: 1.1em;}\n' +
|
|
141
|
+
'.fs19{font-size: 1.2em;}\n' +
|
|
142
|
+
'.fs24{font-size: 1.5em;}\n' +
|
|
143
|
+
'.fs26{font-size: 1.6em;}\n' +
|
|
144
|
+
'.b{font-weight: bold;}\n' +
|
|
145
|
+
'.td-border-right{BORDER-RIGHT: #000000 1px solid; }\n' +
|
|
146
|
+
'.td-border-top{BORDER-TOP: #000000 1px solid; }\n' +
|
|
147
|
+
'.td-border-left{BORDER-LEFT: #000000 1px solid;}\n' +
|
|
148
|
+
'.td-border-bottom{BORDER-BOTTOM: #000000 1px solid;}'
|
|
149
|
+
}
|
|
150
|
+
selfStyle += '</style>'
|
|
151
|
+
const strFormHtml = selfStyle + document.getElementById(this.id).innerHTML
|
|
152
|
+
lodop.PRINT_INIT('报表打印')
|
|
153
|
+
// lodop.SET_PRINT_PAGESIZE(1, 0, 0, 'A4')
|
|
154
|
+
lodop.ADD_PRINT_HTM(this.top, this.left, this.width, this.height, strFormHtml)
|
|
155
|
+
|
|
156
|
+
// 支持一张纸打印多份
|
|
157
|
+
for (let i = 0; i < this.extra.count; i++) {
|
|
158
|
+
lodop.ADD_PRINT_HTM(this.extra.tops[i], this.left, this.width, this.height, strFormHtml)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS",true)
|
|
162
|
+
const that = this
|
|
163
|
+
// 这个设置 针式打印机打印纸张会超出界限导致右侧打不全
|
|
164
|
+
// lodop.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Full-Width')
|
|
165
|
+
if (lodop.CVERSION) {
|
|
166
|
+
lodop.On_Return = function (TaskID, Value) {
|
|
167
|
+
// 当直接打印时,Value值为true和false
|
|
168
|
+
// 当走打印预览是,Value值为1和0
|
|
169
|
+
switch (Value) {
|
|
170
|
+
case '1':
|
|
171
|
+
case true:
|
|
172
|
+
that.$emit('ok', Value)
|
|
173
|
+
break
|
|
174
|
+
case '0':
|
|
175
|
+
case false:
|
|
176
|
+
that.$emit('print-error', Value)
|
|
177
|
+
break
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// lodop.PREVIEW()
|
|
181
|
+
if (this.preview) {
|
|
182
|
+
lodop.PREVIEW()
|
|
183
|
+
} else {
|
|
184
|
+
lodop.PRINT()
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
this.$emit('ok', this.id)
|
|
188
|
+
},
|
|
189
|
+
refreshData () { // 让innerHTML获取的内容包含input和select(option)的最新值
|
|
190
|
+
const obj = document.getElementById(this.id)
|
|
191
|
+
let allInputObject = null
|
|
192
|
+
if (obj) {
|
|
193
|
+
allInputObject = obj.getElementsByTagName('input')
|
|
194
|
+
}
|
|
195
|
+
for (let i = 0; i < allInputObject.length; i++) {
|
|
196
|
+
if (allInputObject[i].type === 'checkbox') {
|
|
197
|
+
if (allInputObject[i].checked) {
|
|
198
|
+
allInputObject[i].setAttribute('checked', 'checked')
|
|
199
|
+
} else {
|
|
200
|
+
allInputObject[i].removeAttribute('checked')
|
|
201
|
+
}
|
|
202
|
+
} else if (allInputObject[i].type === 'radio') {
|
|
203
|
+
if (allInputObject[i].checked) {
|
|
204
|
+
allInputObject[i].setAttribute('checked', 'checked')
|
|
205
|
+
} else {
|
|
206
|
+
allInputObject[i].removeAttribute('checked')
|
|
207
|
+
}
|
|
208
|
+
} else {
|
|
209
|
+
allInputObject[i].setAttribute('value', allInputObject[i].value)
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
for (let i = 0; i < document.getElementsByTagName('select').length; i++) {
|
|
213
|
+
const sl = document.getElementsByTagName('select')[i]
|
|
214
|
+
for (let j = 0; j < sl.options.length; j++) {
|
|
215
|
+
if (sl.options[j].selected) {
|
|
216
|
+
sl.options[j].setAttribute('selected', 'selected')
|
|
217
|
+
} else {
|
|
218
|
+
sl.options[j] = new Option(sl.options[j].text, sl.options[j].value)
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
watch: {}
|
|
225
|
+
}
|
|
226
|
+
</script>
|
|
227
|
+
<style scoped>
|
|
228
|
+
|
|
229
|
+
#normal-bill >>> td {
|
|
230
|
+
padding: 0.5px;
|
|
231
|
+
border: 2px solid #000000;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
#normal-bill >>> table {
|
|
235
|
+
border-collapse: collapse;
|
|
236
|
+
border: solid;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
#normal-bill >>> .noborder {
|
|
240
|
+
border: 1px dashed #ccc;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
#normal-bill >>> .tdleft {
|
|
244
|
+
text-align: left;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
#normal-bill >>> .tdright {
|
|
248
|
+
text-align: right;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
#normal-bill >>> .tdcenter {
|
|
252
|
+
text-align: center;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
#normal-bill >>> .fs10 {
|
|
256
|
+
font-size: 0.4em;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
#normal-bill >>> .fs11 {
|
|
260
|
+
font-size: 0.5em;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
#normal-bill >>> .fs12 {
|
|
264
|
+
font-size: 0.6em;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
#normal-bill >>> .fs13 {
|
|
268
|
+
font-size: 0.7em;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
#normal-bill >>> .fs15 {
|
|
272
|
+
font-size: 0.9em;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
#normal-bill >>> .fs17 {
|
|
276
|
+
font-size: 1.1em;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
#normal-bill >>> .fs19 {
|
|
280
|
+
font-size: 1.2em;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
#normal-bill >>> .fs24 {
|
|
284
|
+
font-size: 1.5em;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
#normal-bill >>> .fs26 {
|
|
288
|
+
font-size: 1.6em;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
#normal-bill >>> .b {
|
|
292
|
+
font-weight: bold;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
#normal-bill >>> .td-border-right {
|
|
296
|
+
border-right: #000000 1px solid;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
#normal-bill >>> .td-border-top {
|
|
300
|
+
border-top: #000000 1px solid;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
#normal-bill >>> .td-border-left {
|
|
304
|
+
border-left: #000000 1px solid;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
#normal-bill >>> .td-border-bottom {
|
|
308
|
+
border-bottom: #000000 1px solid;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
</style>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import PrintBill from './PrintBill.vue'
|
|
3
|
+
import OpenInvoice from './OpenInvoice.vue'
|
|
4
|
+
import { getConfigByNameAsync } from '@vue2-client/services/api/common'
|
|
5
|
+
export default {
|
|
6
|
+
name: 'BillPrint',
|
|
7
|
+
components: { OpenInvoice, PrintBill },
|
|
8
|
+
data () {
|
|
9
|
+
return {}
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
autoPrint: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
serviceName: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: process.env.VUE_APP_SYSTEM_NAME
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
async print ({ id, billUrl, operator, billType, billStyle, autoPrint, reprint = '正常' }) {
|
|
23
|
+
// 获取票据格式
|
|
24
|
+
// {
|
|
25
|
+
// "value": [
|
|
26
|
+
// {
|
|
27
|
+
// "label": "普通收据",
|
|
28
|
+
// "value": "普通收据"
|
|
29
|
+
// },
|
|
30
|
+
// {
|
|
31
|
+
// "label": "电子发票",
|
|
32
|
+
// "invoice": true,
|
|
33
|
+
// "value": "电子发票"
|
|
34
|
+
// }
|
|
35
|
+
// ]
|
|
36
|
+
// }
|
|
37
|
+
getConfigByNameAsync('打印格式Dic', this.serviceName).then(async res => {
|
|
38
|
+
// 判断当前 billStyle 是否是电子票
|
|
39
|
+
const isInvoice = res.value.find(item => item.value === billStyle && item.invoice)
|
|
40
|
+
if (isInvoice) {
|
|
41
|
+
// todo 电子票功能暂未实现
|
|
42
|
+
// this.$refs.invoice.print({
|
|
43
|
+
// reprint: '正常',
|
|
44
|
+
// billUrl: billUrl,
|
|
45
|
+
// operator: operator,
|
|
46
|
+
// condition: id
|
|
47
|
+
// })
|
|
48
|
+
} else {
|
|
49
|
+
// 如果没有 billurl 通过 billtype 获取链接
|
|
50
|
+
if (!billUrl) {
|
|
51
|
+
if (billType) {
|
|
52
|
+
// 获取 类型对应的配置
|
|
53
|
+
await getConfigByNameAsync('票据类型Url映射Config', this.serviceName).then(res => {
|
|
54
|
+
if (res[billType]) {
|
|
55
|
+
billUrl = res[billType]
|
|
56
|
+
this.$refs['print-bill'].print({
|
|
57
|
+
reprint: reprint,
|
|
58
|
+
condition: id,
|
|
59
|
+
billUrl,
|
|
60
|
+
operator
|
|
61
|
+
})
|
|
62
|
+
} else {
|
|
63
|
+
this.$message.error(`未找到${billType}对应的票据映射,请检查`)
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
} else {
|
|
67
|
+
this.$message.error('未找到票据格式,请检查')
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
await this.$refs['print-bill'].print({
|
|
71
|
+
reprint: reprint,
|
|
72
|
+
condition: id,
|
|
73
|
+
billUrl,
|
|
74
|
+
operator
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
},
|
|
80
|
+
printOk () {
|
|
81
|
+
console.log('打印成功')
|
|
82
|
+
this.$emit('ok')
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<template>
|
|
89
|
+
<div>
|
|
90
|
+
<print-bill :serviceName="serviceName" ref="print-bill" @ok="printOk" :autoPrint="autoPrint"/>
|
|
91
|
+
<open-invoice :serviceName="serviceName" ref="invoice" @ok="printOk" :autoPrint="autoPrint"/>
|
|
92
|
+
</div>
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<style scoped>
|
|
96
|
+
|
|
97
|
+
</style>
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
:show-pagination="showPagination"
|
|
67
67
|
:customDelete="customDelete"
|
|
68
68
|
:extraHeight="extraHeight"
|
|
69
|
+
:serviceName="serviceName"
|
|
69
70
|
@add="add"
|
|
70
71
|
@move="move"
|
|
71
72
|
@edit="edit"
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
@selectRow="selectRow"
|
|
78
79
|
@afterQuery="afterQuery"
|
|
79
80
|
@columnClick="columnClick"
|
|
81
|
+
@gotoUserDetail="gotoUserDetail"
|
|
80
82
|
@editButtonStateDataClick="editButtonStateDataClick"
|
|
81
83
|
@importExcelOk="importExcelOk">
|
|
82
84
|
<template slot="leftButton" slot-scope="{selectedRowKeys, selectedRows}">
|
|
@@ -110,6 +112,7 @@
|
|
|
110
112
|
</template>
|
|
111
113
|
</div>
|
|
112
114
|
</a-col>
|
|
115
|
+
<UserInfoDetailManage ref="userInfo" @close="refresh(false)"/>
|
|
113
116
|
</a-row>
|
|
114
117
|
</template>
|
|
115
118
|
<script>
|
|
@@ -128,10 +131,12 @@ import { mapState } from 'vuex'
|
|
|
128
131
|
import XTreePro from '@vue2-client/base-client/components/common/XTree/XTreePro.vue'
|
|
129
132
|
import { executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
|
|
130
133
|
import util, { getRealKeyData } from '@vue2-client/utils/util'
|
|
134
|
+
import UserInfoDetailManage from '@vue2-client/pages/userInfoDetailManage/index.vue'
|
|
131
135
|
|
|
132
136
|
export default {
|
|
133
137
|
name: 'XFormTable',
|
|
134
138
|
components: {
|
|
139
|
+
UserInfoDetailManage,
|
|
135
140
|
XTreePro,
|
|
136
141
|
XTable,
|
|
137
142
|
XForm,
|
|
@@ -191,7 +196,7 @@ export default {
|
|
|
191
196
|
// 配置所属命名空间
|
|
192
197
|
serviceName: {
|
|
193
198
|
type: String,
|
|
194
|
-
default:
|
|
199
|
+
default: process.env.VUE_APP_SYSTEM_NAME
|
|
195
200
|
},
|
|
196
201
|
// 查询配置文件Json,用于查询配置生成器的预览
|
|
197
202
|
queryParamsJson: {
|
|
@@ -338,7 +343,9 @@ export default {
|
|
|
338
343
|
columnClick (key, value, record) {
|
|
339
344
|
this.$emit('columnClick', key, value, record)
|
|
340
345
|
},
|
|
341
|
-
|
|
346
|
+
gotoUserDetail (key, value, record) {
|
|
347
|
+
this.$refs.userInfo.init(getRealKeyData(record))
|
|
348
|
+
},
|
|
342
349
|
// 获取主表的数据内容,去掉主表别名
|
|
343
350
|
getPrimaryData (rows) {
|
|
344
351
|
const alias = this.realQueryConfig.tableAliasName // 获取主表的别名
|
|
@@ -454,7 +461,6 @@ export default {
|
|
|
454
461
|
item.sorter = false
|
|
455
462
|
})
|
|
456
463
|
}
|
|
457
|
-
console.log(JSON.stringify(res.columnJson))
|
|
458
464
|
const initTable = () => {
|
|
459
465
|
// 初始化 xTable 子组件
|
|
460
466
|
this.$refs.xTable.init({
|
|
@@ -179,6 +179,10 @@
|
|
|
179
179
|
<span v-else-if="item.slotType === 'link'" :key="'link-' + c_index">
|
|
180
180
|
<a @click="columnClick(item.dataIndex,text,record)">{{ text }}</a>
|
|
181
181
|
</span>
|
|
182
|
+
<!-- 跳转用户详情 -->
|
|
183
|
+
<span v-else-if="item.slotType === 'gotoUserDetail'" :key="'gotoUserDetail-' + c_index">
|
|
184
|
+
<a @click="gotoUserDetail(item.dataIndex,text,record)">{{ text }}</a>
|
|
185
|
+
</span>
|
|
182
186
|
<!-- 文本溢出省略(ellipsis) -->
|
|
183
187
|
<span v-else-if="item.slotType === 'ellipsis'" :key="'ellipsis-' + c_index">
|
|
184
188
|
<ellipsis :length="item.slotValue" tooltip>{{ text === '' ? '--' : text }}</ellipsis>
|
|
@@ -402,7 +406,7 @@ export default {
|
|
|
402
406
|
})
|
|
403
407
|
requestParameters.conditionParams = conditionParams
|
|
404
408
|
requestParameters.queryParamsName = this.queryParamsName
|
|
405
|
-
requestParameters.queryParams = this.queryParams
|
|
409
|
+
requestParameters.queryParams = this.queryParams && Object.keys(this.queryParams).length > 0 ? this.queryParams : undefined
|
|
406
410
|
this.requestParameters = requestParameters
|
|
407
411
|
// 加载数据
|
|
408
412
|
return this.loadTableData(requestParameters)
|
|
@@ -432,8 +436,6 @@ export default {
|
|
|
432
436
|
isDelete: false,
|
|
433
437
|
// 是否允许选择
|
|
434
438
|
isChoose: false,
|
|
435
|
-
// 服务名称
|
|
436
|
-
serviceName: undefined,
|
|
437
439
|
// 选中用于修改的id
|
|
438
440
|
selectId: undefined,
|
|
439
441
|
// 是否显示展示列抽屉
|
|
@@ -493,6 +495,13 @@ export default {
|
|
|
493
495
|
return ''
|
|
494
496
|
}
|
|
495
497
|
},
|
|
498
|
+
// 查询配置文件名
|
|
499
|
+
serviceName: {
|
|
500
|
+
type: String,
|
|
501
|
+
default: () => {
|
|
502
|
+
return ''
|
|
503
|
+
}
|
|
504
|
+
},
|
|
496
505
|
// 查询配置文件Json
|
|
497
506
|
queryParamsJson: {
|
|
498
507
|
type: Object,
|
|
@@ -550,6 +559,9 @@ export default {
|
|
|
550
559
|
columnClick (key, value, record) {
|
|
551
560
|
this.$emit('columnClick', key, value, record)
|
|
552
561
|
},
|
|
562
|
+
gotoUserDetail (key, value, record) {
|
|
563
|
+
this.$emit('gotoUserDetail', key, value, record)
|
|
564
|
+
},
|
|
553
565
|
getFromItem (model, text, record, index) {
|
|
554
566
|
const aa = this.formItems.find(item => item.model === model && item.editRow)
|
|
555
567
|
if (aa) {
|
|
@@ -671,9 +683,7 @@ export default {
|
|
|
671
683
|
changeViewMode () {
|
|
672
684
|
this.isTableMode = !this.isTableMode
|
|
673
685
|
// 看板切换回表格模式 刷新列表
|
|
674
|
-
|
|
675
|
-
this.refresh(true)
|
|
676
|
-
}
|
|
686
|
+
this.refresh(true)
|
|
677
687
|
},
|
|
678
688
|
/**
|
|
679
689
|
* 初始化表格参数
|
|
@@ -690,7 +700,6 @@ export default {
|
|
|
690
700
|
editButtonStateData = [],
|
|
691
701
|
title,
|
|
692
702
|
form,
|
|
693
|
-
serviceName,
|
|
694
703
|
tableSummaryMap = {},
|
|
695
704
|
customTableSummaryArray = [],
|
|
696
705
|
viewMode,
|
|
@@ -766,7 +775,6 @@ export default {
|
|
|
766
775
|
this.buttonPermissions = buttonPermissions
|
|
767
776
|
this.editButtonStateData = editButtonStateData
|
|
768
777
|
this.title = title
|
|
769
|
-
this.serviceName = serviceName
|
|
770
778
|
this.env = env
|
|
771
779
|
this.rowKey = this.getPrimaryKeyName()
|
|
772
780
|
this.allowedCardMode = allowedCardMode
|
|
@@ -843,6 +851,7 @@ export default {
|
|
|
843
851
|
})
|
|
844
852
|
})
|
|
845
853
|
} else {
|
|
854
|
+
console.log('====', this.serviceName)
|
|
846
855
|
result = query(Object.assign(requestParameters, { userId: this.currUser?.id }), this.serviceName, this.env === 'dev')
|
|
847
856
|
}
|
|
848
857
|
if (this.isTableMode && !this.simpleMode) {
|
|
@@ -1055,7 +1064,7 @@ export default {
|
|
|
1055
1064
|
}
|
|
1056
1065
|
const requestParameters = {
|
|
1057
1066
|
queryParamsName: this.queryParamsName,
|
|
1058
|
-
queryParams: this.queryParams,
|
|
1067
|
+
queryParams: this.queryParams && Object.keys(this.queryParams).length > 0 ? this.queryParams : undefined,
|
|
1059
1068
|
conditionParams: {},
|
|
1060
1069
|
pageNo: 1,
|
|
1061
1070
|
pageSize: 1
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a-card :bordered="false" v-if="currUserInfo">
|
|
3
|
+
<x-form-table
|
|
4
|
+
title="换表记录查询"
|
|
5
|
+
:queryParamsName="queryParamsName"
|
|
6
|
+
:fixedQueryForm="fixedQueryForm"
|
|
7
|
+
@action="action"
|
|
8
|
+
service-name="af-revenue"
|
|
9
|
+
ref="xFormTable">
|
|
10
|
+
</x-form-table>
|
|
11
|
+
</a-card>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import { mapState } from 'vuex'
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: 'ChangeMeterRecordQuery',
|
|
19
|
+
components: {
|
|
20
|
+
XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue')
|
|
21
|
+
},
|
|
22
|
+
data () {
|
|
23
|
+
return {
|
|
24
|
+
// 查询配置名称
|
|
25
|
+
queryParamsName: 'ChangeMeterRecordQueryCRUD',
|
|
26
|
+
// 查询表单固定值
|
|
27
|
+
fixedQueryForm: { c_f_user_id: this.currUserInfo.f_user_id },
|
|
28
|
+
// 是否显示详情抽屉
|
|
29
|
+
detailVisible: false,
|
|
30
|
+
// 当前记录
|
|
31
|
+
record: {}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
currUserInfo: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: () => undefined
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
mounted () {
|
|
41
|
+
this.$refs.xFormTable.refresh(true)
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
action (record, id, actionType) {
|
|
45
|
+
this.detailVisible = true
|
|
46
|
+
console.log('触发了详情操作', record, id, actionType)
|
|
47
|
+
},
|
|
48
|
+
onClose () {
|
|
49
|
+
this.detailVisible = false
|
|
50
|
+
// 关闭详情之后重新查询表单
|
|
51
|
+
this.$refs.xFormTable.refreshTable(true)
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
computed: {
|
|
56
|
+
...mapState('account', { currUser: 'user' }),
|
|
57
|
+
...mapState('setting', { isMobile: 'isMobile' })
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style scoped>
|
|
63
|
+
|
|
64
|
+
</style>
|