manage-client-xy 3.2.1 → 3.2.3

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.
@@ -1,153 +1,153 @@
1
- <template>
2
- <button class="button_export button_spacing" @click="stamp()">打印</button>
3
- </template>
4
-
5
- <script>
6
- import getLodop from '../../../../../plugins/LodopFuncs'
7
- import {PagedList} from "vue-client";
8
-
9
- export default {
10
- title: '月报表打印',
11
- props: {
12
- countmodel:{
13
- type:Object,
14
- default:{}
15
- }
16
- },
17
- data() {
18
- return {
19
- modelval: [],
20
- fields: {},
21
- thead: '',
22
- tfoot: '',
23
- model:{},
24
- sumsmodel:{},
25
- orgname: ''
26
- }
27
- },
28
- methods: {
29
- stamp() {
30
- this.model = this.countmodel.model,
31
- this.sumsmodel = this.countmodel.sumsmodel,
32
- this.orgname = this.countmodel.orgname,
33
- //默认选择要打印的列
34
- this.modelval = [
35
- "f_operate_date",
36
- "f_count",
37
- "f_pregas",
38
- "f_collection"
39
- ];
40
- this.fields = {
41
- "f_operate_date": "购买日期",
42
- "f_count": "人次",
43
- "f_pregas":"气量",
44
- "f_collection":"金额"
45
- };
46
- this.put();
47
- this.print();
48
- },
49
- put() {
50
-
51
- let statisticalMonth = ''
52
-
53
- if (this.model.model.f_begin_operate_date && this.model.model.f_end_operate_date) {
54
- statisticalMonth = this.model.model.f_end_operate_date.substring(0, 7)
55
- } else {
56
- statisticalMonth = this.model.model.f_operate_date
57
- }
58
-
59
- this.thead = `
60
- <tr>
61
- <th class="biaoti" colspan=${this.modelval.length} style="font-size: 6mm">
62
- ${this.orgname}悦生活月统计报表
63
- </th>
64
- </tr>
65
- <tr>
66
- <th class="biaoti" colspan=${this.modelval.length}>统计月份: ${statisticalMonth}</th></tr>
67
- <tr>
68
- <tr>
69
- <th class="biaoti" colspan=${this.modelval.length}>制单人:${this.$login.f.name} 打印时间: ${this.$login.toStandardTimeString()}</th></tr>
70
-
71
- </tr>`
72
-
73
- this.thead += '<tr>';
74
- for (let key of this.modelval) {
75
- if (this.fields[key] == '购买日期') {
76
- this.thead += '<th class="bz">' + this.fields[key] + '</th>'
77
- } else {
78
- this.thead += '<th class="other">' + this.fields[key] + '</th>'
79
- }
80
- }
81
- this.thead += '</tr>'
82
- },
83
- async print() {
84
- // 开始打印
85
- let lodop = getLodop()
86
- lodop.PRINT_INIT('打印')
87
-
88
- // 是否横向打印
89
- let isHeng = 1
90
- lodop.SET_PRINT_PAGESIZE(1, 0, 0, "A4");
91
-
92
- // 定义样式
93
- let style = '<style>table {border-collapse: collapse;font-size:2.8mm}' +
94
- 'table th {border-collapse: collapse;text-align: center;width: 180mm;border: 0.2mm solid black;}' +
95
- 'table td {border-collapse: collapse;text-align: center;border: 0.2mm solid black} ' +
96
- 'table span {width: 25mm;text-align:left;display:inline-block;}' +
97
- '.comments {text-overflow: ellipsis;overflow: hidden} ' +
98
- '.khxm {border-top: 0;width: 14.4mm;text-align: center;} ' +
99
- '.bz {border-top: 0;width: 21.6mm;text-align: center;} ' +
100
- '.name {border-top: 0;width: 14.4 mm} ' +
101
- '.other {border-top: 0;width: 10mm}</style>'
102
-
103
-
104
- let tHtml = style + '<table><thead>' + this.thead + '</thead><tbody>'
105
- for (var i = 1; i <= this.model.totalPage; i++) {
106
- await this.model.loadPage(i)
107
- for (let j = 0; j < this.model.rows.length; j++) {
108
- tHtml += '<tr>'
109
- for (let field of this.modelval) {
110
- if (field && this.model.rows[j]) {
111
- if(this.model.rows[j][field]==null){
112
- this.model.rows[j][field]=''
113
- }
114
- if (field === 'f_operate_date'&& this.model.rows[j][field]) {
115
- tHtml += '<td class="bz">' +
116
- this.model.rows[j][field]
117
- + '</td>'
118
- } else {
119
- tHtml += '<td>' + this.model.rows[j][field] + '</td>'
120
- }
121
- }
122
- }
123
- tHtml += '</tr>'
124
- }
125
- }
126
- this.tfoot = ``
127
-
128
- // 如果有表尾,则添加表尾,如果内容翻页的话,表尾每一页都要打印
129
- tHtml += `</tbody><tfoot>${this.tfoot}</tfoot></table>`
130
- //ADD_PRINT_TABLE(intTop,intLeft,intWidth,intHeight,strHtml)增加表格项
131
- lodop.ADD_PRINT_TABLE(0, 0, "200mm", 'BottomMargin:' + 30, tHtml);//增加表格项
132
- lodop.SET_PRINT_STYLEA(0, "Horient", 2);//打印项在纸张中水平居中
133
-
134
- // 设置页脚
135
- lodop.ADD_PRINT_HTM("96%", "45%", 100, 50, `<font color='#0000ff' format='##'><span tdata='pageNO'>第##页</span>/<span tdata='pageCount'>共##页</span></font>`);//增加超文本项
136
- lodop.SET_PRINT_STYLEA(0, "ItemType", 1);
137
- lodop.SET_PRINT_STYLEA(0, "Horient", 2);
138
-
139
- // 设置打印方式 (横向|纵向)
140
- lodop.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1);
141
- // 打印维护
142
- // 使用打印预览是为了方便调整打印格式。例如:横向打印
143
- lodop.PREVIEW()
144
- },
145
- }
146
-
147
-
148
- }
149
- </script>
150
-
151
- <style scoped>
152
-
153
- </style>
1
+ <template>
2
+ <button class="button_export button_spacing" @click="stamp()">打印</button>
3
+ </template>
4
+
5
+ <script>
6
+ import getLodop from '../../../../../plugins/LodopFuncs'
7
+ import {PagedList} from "vue-client";
8
+
9
+ export default {
10
+ title: '月报表打印',
11
+ props: {
12
+ countmodel:{
13
+ type:Object,
14
+ default:{}
15
+ }
16
+ },
17
+ data() {
18
+ return {
19
+ modelval: [],
20
+ fields: {},
21
+ thead: '',
22
+ tfoot: '',
23
+ model:{},
24
+ sumsmodel:{},
25
+ orgname: ''
26
+ }
27
+ },
28
+ methods: {
29
+ stamp() {
30
+ this.model = this.countmodel.model,
31
+ this.sumsmodel = this.countmodel.sumsmodel,
32
+ this.orgname = this.countmodel.orgname,
33
+ //默认选择要打印的列
34
+ this.modelval = [
35
+ "f_operate_date",
36
+ "f_count",
37
+ "f_pregas",
38
+ "f_collection"
39
+ ];
40
+ this.fields = {
41
+ "f_operate_date": "购买日期",
42
+ "f_count": "人次",
43
+ "f_pregas":"气量",
44
+ "f_collection":"金额"
45
+ };
46
+ this.put();
47
+ this.print();
48
+ },
49
+ put() {
50
+
51
+ let statisticalMonth = ''
52
+
53
+ if (this.model.model.f_begin_operate_date && this.model.model.f_end_operate_date) {
54
+ statisticalMonth = this.model.model.f_end_operate_date.substring(0, 7)
55
+ } else {
56
+ statisticalMonth = this.model.model.f_operate_date
57
+ }
58
+
59
+ this.thead = `
60
+ <tr>
61
+ <th class="biaoti" colspan=${this.modelval.length} style="font-size: 6mm">
62
+ ${this.orgname}悦生活月统计报表
63
+ </th>
64
+ </tr>
65
+ <tr>
66
+ <th class="biaoti" colspan=${this.modelval.length}>统计月份: ${statisticalMonth}</th></tr>
67
+ <tr>
68
+ <tr>
69
+ <th class="biaoti" colspan=${this.modelval.length}>制单人:${this.$login.f.name} 打印时间: ${this.$login.toStandardTimeString()}</th></tr>
70
+
71
+ </tr>`
72
+
73
+ this.thead += '<tr>';
74
+ for (let key of this.modelval) {
75
+ if (this.fields[key] == '购买日期') {
76
+ this.thead += '<th class="bz">' + this.fields[key] + '</th>'
77
+ } else {
78
+ this.thead += '<th class="other">' + this.fields[key] + '</th>'
79
+ }
80
+ }
81
+ this.thead += '</tr>'
82
+ },
83
+ async print() {
84
+ // 开始打印
85
+ let lodop = getLodop()
86
+ lodop.PRINT_INIT('打印')
87
+
88
+ // 是否横向打印
89
+ let isHeng = 1
90
+ lodop.SET_PRINT_PAGESIZE(1, 0, 0, "A4");
91
+
92
+ // 定义样式
93
+ let style = '<style>table {border-collapse: collapse;font-size:2.8mm}' +
94
+ 'table th {border-collapse: collapse;text-align: center;width: 180mm;border: 0.2mm solid black;}' +
95
+ 'table td {border-collapse: collapse;text-align: center;border: 0.2mm solid black} ' +
96
+ 'table span {width: 25mm;text-align:left;display:inline-block;}' +
97
+ '.comments {text-overflow: ellipsis;overflow: hidden} ' +
98
+ '.khxm {border-top: 0;width: 14.4mm;text-align: center;} ' +
99
+ '.bz {border-top: 0;width: 21.6mm;text-align: center;} ' +
100
+ '.name {border-top: 0;width: 14.4 mm} ' +
101
+ '.other {border-top: 0;width: 10mm}</style>'
102
+
103
+
104
+ let tHtml = style + '<table><thead>' + this.thead + '</thead><tbody>'
105
+ for (var i = 1; i <= this.model.totalPage; i++) {
106
+ await this.model.loadPage(i)
107
+ for (let j = 0; j < this.model.rows.length; j++) {
108
+ tHtml += '<tr>'
109
+ for (let field of this.modelval) {
110
+ if (field && this.model.rows[j]) {
111
+ if(this.model.rows[j][field]==null){
112
+ this.model.rows[j][field]=''
113
+ }
114
+ if (field === 'f_operate_date'&& this.model.rows[j][field]) {
115
+ tHtml += '<td class="bz">' +
116
+ this.model.rows[j][field]
117
+ + '</td>'
118
+ } else {
119
+ tHtml += '<td>' + this.model.rows[j][field] + '</td>'
120
+ }
121
+ }
122
+ }
123
+ tHtml += '</tr>'
124
+ }
125
+ }
126
+ this.tfoot = ``
127
+
128
+ // 如果有表尾,则添加表尾,如果内容翻页的话,表尾每一页都要打印
129
+ tHtml += `</tbody><tfoot>${this.tfoot}</tfoot></table>`
130
+ //ADD_PRINT_TABLE(intTop,intLeft,intWidth,intHeight,strHtml)增加表格项
131
+ lodop.ADD_PRINT_TABLE(0, 0, "200mm", 'BottomMargin:' + 30, tHtml);//增加表格项
132
+ lodop.SET_PRINT_STYLEA(0, "Horient", 2);//打印项在纸张中水平居中
133
+
134
+ // 设置页脚
135
+ lodop.ADD_PRINT_HTM("96%", "45%", 100, 50, `<font color='#0000ff' format='##'><span tdata='pageNO'>第##页</span>/<span tdata='pageCount'>共##页</span></font>`);//增加超文本项
136
+ lodop.SET_PRINT_STYLEA(0, "ItemType", 1);
137
+ lodop.SET_PRINT_STYLEA(0, "Horient", 2);
138
+
139
+ // 设置打印方式 (横向|纵向)
140
+ lodop.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1);
141
+ // 打印维护
142
+ // 使用打印预览是为了方便调整打印格式。例如:横向打印
143
+ lodop.PREVIEW()
144
+ },
145
+ }
146
+
147
+
148
+ }
149
+ </script>
150
+
151
+ <style scoped>
152
+
153
+ </style>
@@ -1,143 +1,143 @@
1
- <template>
2
- <button class="button_export button_spacing" @click="stamp()">打印</button>
3
- </template>
4
-
5
- <script>
6
- import getLodop from '../../../../../plugins/LodopFuncs'
7
- import {PagedList} from "vue-client";
8
-
9
- export default {
10
- title: '年报表打印',
11
- props: {
12
- countmodel:{
13
- type:Object,
14
- default:{}
15
- }
16
- },
17
- data() {
18
- return {
19
- modelval: [],
20
- fields: {},
21
- thead: '',
22
- tfoot: '',
23
- model:{},
24
- sumsmodel:{},
25
- orgname: ''
26
- }
27
- },
28
- methods: {
29
- stamp() {
30
- this.model = this.countmodel.model,
31
- this.sumsmodel = this.countmodel.sumsmodel,
32
- this.orgname = this.countmodel.orgname
33
- //默认选择要打印的列
34
- this.modelval = [
35
- "f_operate_date",
36
- "f_count",
37
- "f_pregas",
38
- "f_collection"
39
- ];
40
- this.fields = {
41
- "f_operate_date": "月份",
42
- "f_count": "人次",
43
- "f_pregas":"气量",
44
- "f_collection":"金额"
45
- };
46
- this.put();
47
- this.print();
48
- },
49
- put() {
50
- this.thead = `
51
- <tr>
52
- <th class="biaoti" colspan=${this.modelval.length} style="font-size: 6mm">
53
- ${this.orgname}悦生活年统计报表
54
- </th>
55
- </tr>
56
- <tr>
57
- <th class="biaoti" colspan=${this.modelval.length}>统计年份: ${this.model.model.YeadDate}</th></tr>
58
- <tr>
59
- <tr>
60
- <th class="biaoti" colspan=${this.modelval.length}>制单人:${this.$login.f.name} 打印时间: ${this.$login.toStandardTimeString()}</th></tr>
61
-
62
- </tr>`
63
-
64
- this.thead += '<tr>';
65
- for (let key of this.modelval) {
66
- if (this.fields[key] == '月份') {
67
- this.thead += '<th class="bz">' + this.fields[key] + '</th>'
68
- } else {
69
- this.thead += '<th class="other">' + this.fields[key] + '</th>'
70
- }
71
- }
72
- this.thead += '</tr>'
73
- },
74
- async print() {
75
- // 开始打印
76
- let lodop = getLodop()
77
- lodop.PRINT_INIT('打印')
78
-
79
- // 是否横向打印
80
- lodop.SET_PRINT_PAGESIZE(1, 0, 0, "A4");
81
-
82
- // 定义样式
83
- let style = '<style>table {border-collapse: collapse;font-size:2.8mm}' +
84
- 'table th {border-collapse: collapse;text-align: center;width: 180mm;border: 0.2mm solid black;}' +
85
- 'table td {border-collapse: collapse;text-align: center;border: 0.2mm solid black} ' +
86
- 'table span {width: 25mm;text-align:left;display:inline-block;}' +
87
- '.comments {text-overflow: ellipsis;overflow: hidden} ' +
88
- '.khxm {border-top: 0;width: 14.4mm;text-align: center;} ' +
89
- '.bz {border-top: 0;width: 21.6mm;text-align: center;} ' +
90
- '.name {border-top: 0;width: 14.4 mm} ' +
91
- '.other {border-top: 0;width: 10mm}</style>'
92
-
93
-
94
- let tHtml = style + '<table><thead>' + this.thead + '</thead><tbody>'
95
- for (var i = 1; i <= this.model.totalPage; i++) {
96
- await this.model.loadPage(i)
97
- for (let j = 0; j < this.model.rows.length; j++) {
98
- tHtml += '<tr>'
99
- for (let field of this.modelval) {
100
- if (field && this.model.rows[j]) {
101
- if(this.model.rows[j][field]==null){
102
- this.model.rows[j][field]=''
103
- }
104
- if (field === 'f_operate_date'&& this.model.rows[j][field]) {
105
- tHtml += '<td class="bz">' +
106
- this.model.rows[j][field]
107
- + '</td>'
108
- } else {
109
- tHtml += '<td>' + this.model.rows[j][field] + '</td>'
110
- }
111
- }
112
- }
113
- tHtml += '</tr>'
114
- }
115
- }
116
- this.tfoot = ``
117
-
118
- // 如果有表尾,则添加表尾,如果内容翻页的话,表尾每一页都要打印
119
- tHtml += `</tbody><tfoot>${this.tfoot}</tfoot></table>`
120
- //ADD_PRINT_TABLE(intTop,intLeft,intWidth,intHeight,strHtml)增加表格项
121
- lodop.ADD_PRINT_TABLE(0, 0, "200mm", 'BottomMargin:' + 30, tHtml);//增加表格项
122
- lodop.SET_PRINT_STYLEA(0, "Horient", 2);//打印项在纸张中水平居中
123
-
124
- // 设置页脚
125
- lodop.ADD_PRINT_HTM("96%", "45%", 100, 50, `<font color='#0000ff' format='##'><span tdata='pageNO'>第##页</span>/<span tdata='pageCount'>共##页</span></font>`);//增加超文本项
126
- lodop.SET_PRINT_STYLEA(0, "ItemType", 1);
127
- lodop.SET_PRINT_STYLEA(0, "Horient", 2);
128
-
129
- // 设置打印方式 (横向|纵向)
130
- lodop.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1);
131
- // 打印维护
132
- // 使用打印预览是为了方便调整打印格式。例如:横向打印
133
- lodop.PREVIEW()
134
- },
135
- }
136
-
137
-
138
- }
139
- </script>
140
-
141
- <style scoped>
142
-
143
- </style>
1
+ <template>
2
+ <button class="button_export button_spacing" @click="stamp()">打印</button>
3
+ </template>
4
+
5
+ <script>
6
+ import getLodop from '../../../../../plugins/LodopFuncs'
7
+ import {PagedList} from "vue-client";
8
+
9
+ export default {
10
+ title: '年报表打印',
11
+ props: {
12
+ countmodel:{
13
+ type:Object,
14
+ default:{}
15
+ }
16
+ },
17
+ data() {
18
+ return {
19
+ modelval: [],
20
+ fields: {},
21
+ thead: '',
22
+ tfoot: '',
23
+ model:{},
24
+ sumsmodel:{},
25
+ orgname: ''
26
+ }
27
+ },
28
+ methods: {
29
+ stamp() {
30
+ this.model = this.countmodel.model,
31
+ this.sumsmodel = this.countmodel.sumsmodel,
32
+ this.orgname = this.countmodel.orgname
33
+ //默认选择要打印的列
34
+ this.modelval = [
35
+ "f_operate_date",
36
+ "f_count",
37
+ "f_pregas",
38
+ "f_collection"
39
+ ];
40
+ this.fields = {
41
+ "f_operate_date": "月份",
42
+ "f_count": "人次",
43
+ "f_pregas":"气量",
44
+ "f_collection":"金额"
45
+ };
46
+ this.put();
47
+ this.print();
48
+ },
49
+ put() {
50
+ this.thead = `
51
+ <tr>
52
+ <th class="biaoti" colspan=${this.modelval.length} style="font-size: 6mm">
53
+ ${this.orgname}悦生活年统计报表
54
+ </th>
55
+ </tr>
56
+ <tr>
57
+ <th class="biaoti" colspan=${this.modelval.length}>统计年份: ${this.model.model.YeadDate}</th></tr>
58
+ <tr>
59
+ <tr>
60
+ <th class="biaoti" colspan=${this.modelval.length}>制单人:${this.$login.f.name} 打印时间: ${this.$login.toStandardTimeString()}</th></tr>
61
+
62
+ </tr>`
63
+
64
+ this.thead += '<tr>';
65
+ for (let key of this.modelval) {
66
+ if (this.fields[key] == '月份') {
67
+ this.thead += '<th class="bz">' + this.fields[key] + '</th>'
68
+ } else {
69
+ this.thead += '<th class="other">' + this.fields[key] + '</th>'
70
+ }
71
+ }
72
+ this.thead += '</tr>'
73
+ },
74
+ async print() {
75
+ // 开始打印
76
+ let lodop = getLodop()
77
+ lodop.PRINT_INIT('打印')
78
+
79
+ // 是否横向打印
80
+ lodop.SET_PRINT_PAGESIZE(1, 0, 0, "A4");
81
+
82
+ // 定义样式
83
+ let style = '<style>table {border-collapse: collapse;font-size:2.8mm}' +
84
+ 'table th {border-collapse: collapse;text-align: center;width: 180mm;border: 0.2mm solid black;}' +
85
+ 'table td {border-collapse: collapse;text-align: center;border: 0.2mm solid black} ' +
86
+ 'table span {width: 25mm;text-align:left;display:inline-block;}' +
87
+ '.comments {text-overflow: ellipsis;overflow: hidden} ' +
88
+ '.khxm {border-top: 0;width: 14.4mm;text-align: center;} ' +
89
+ '.bz {border-top: 0;width: 21.6mm;text-align: center;} ' +
90
+ '.name {border-top: 0;width: 14.4 mm} ' +
91
+ '.other {border-top: 0;width: 10mm}</style>'
92
+
93
+
94
+ let tHtml = style + '<table><thead>' + this.thead + '</thead><tbody>'
95
+ for (var i = 1; i <= this.model.totalPage; i++) {
96
+ await this.model.loadPage(i)
97
+ for (let j = 0; j < this.model.rows.length; j++) {
98
+ tHtml += '<tr>'
99
+ for (let field of this.modelval) {
100
+ if (field && this.model.rows[j]) {
101
+ if(this.model.rows[j][field]==null){
102
+ this.model.rows[j][field]=''
103
+ }
104
+ if (field === 'f_operate_date'&& this.model.rows[j][field]) {
105
+ tHtml += '<td class="bz">' +
106
+ this.model.rows[j][field]
107
+ + '</td>'
108
+ } else {
109
+ tHtml += '<td>' + this.model.rows[j][field] + '</td>'
110
+ }
111
+ }
112
+ }
113
+ tHtml += '</tr>'
114
+ }
115
+ }
116
+ this.tfoot = ``
117
+
118
+ // 如果有表尾,则添加表尾,如果内容翻页的话,表尾每一页都要打印
119
+ tHtml += `</tbody><tfoot>${this.tfoot}</tfoot></table>`
120
+ //ADD_PRINT_TABLE(intTop,intLeft,intWidth,intHeight,strHtml)增加表格项
121
+ lodop.ADD_PRINT_TABLE(0, 0, "200mm", 'BottomMargin:' + 30, tHtml);//增加表格项
122
+ lodop.SET_PRINT_STYLEA(0, "Horient", 2);//打印项在纸张中水平居中
123
+
124
+ // 设置页脚
125
+ lodop.ADD_PRINT_HTM("96%", "45%", 100, 50, `<font color='#0000ff' format='##'><span tdata='pageNO'>第##页</span>/<span tdata='pageCount'>共##页</span></font>`);//增加超文本项
126
+ lodop.SET_PRINT_STYLEA(0, "ItemType", 1);
127
+ lodop.SET_PRINT_STYLEA(0, "Horient", 2);
128
+
129
+ // 设置打印方式 (横向|纵向)
130
+ lodop.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1);
131
+ // 打印维护
132
+ // 使用打印预览是为了方便调整打印格式。例如:横向打印
133
+ lodop.PREVIEW()
134
+ },
135
+ }
136
+
137
+
138
+ }
139
+ </script>
140
+
141
+ <style scoped>
142
+
143
+ </style>