manage-client 3.2.69-aode → 3.2.70-aode

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,396 +1,396 @@
1
- <template>
2
- <div id="unit" class="flex-row" class="foot_tabset" @keyup.enter="search">
3
- <div class="basic-main">
4
- <div class="flex" v-if="!show">
5
- <criteria-paged :model="model" v-ref:paged @sort="sort">
6
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
- <div class="row">
9
- <div class="col-sm-2 form-group">
10
- <label class="font_normal_body">开始日期</label>
11
- <datepicker id="startDate" placeholder="开始日期" style="width:60%"
12
- v-model="model.startDate"
13
- :value.sync="model.startDate"
14
- :format="'yyyy-MM-dd HH:mm:ss'"
15
- :show-reset-button="true"
16
- condition="f_operate_date >= '{}'">
17
- </datepicker>
18
- </div>
19
- <div class="col-sm-2 form-group">
20
- <label class="font_normal_body">结束日期</label>
21
- <datepicker id="endDate" placeholder="结束日期" style="width:60%"
22
- v-model="model.endDate"
23
- :value.sync="model.endDate"
24
- :format="'yyyy-MM-dd HH:mm:ss'"
25
- :show-reset-button="true"
26
- condition="f_operate_date <= '{}'">
27
- </datepicker>
28
- </div>
29
- <div class="col-sm-2 form-group ">
30
- <label class="font_normal_body">客户编号</label>
31
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
32
- condition="f_userinfo_code = '{}' " placeholder="客户编号">
33
- </div>
34
- <div class="col-sm-2 form-group">
35
- <label class="font_normal_body" title="旧客户编号">档案编号</label>
36
- <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
37
- condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
38
- </div>
39
-
40
-
41
- <div class="span" style="float:right;">
42
- <button class="button_search button_spacing" @click="search()">查询</button>
43
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
44
- <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
45
-
46
- <export-excel :data="$parent.$parent.getCondition"
47
- :field="$parent.$parent.getfield"
48
- :header="$parent.$parent.other"
49
- v-if="$parent.$parent.authArr.includes('档案查询导出')"
50
- sqlurl="rs/logic/exportfile" sql-name="changeuserquery" template-name='档案变更导出'
51
- :choose-col="true"></export-excel>
52
- <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
53
- :defaultfield="$parent.$parent.defaultfield"
54
- titletable="档案变更"
55
- :sumsmodel="$parent.$parent.sumsmodel"></print-data>
56
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
57
- </div>
58
- </div>
59
-
60
- <div class="row" v-show="$parent.$parent.criteriaShow">
61
- <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
62
- <div class="col-sm-2 form-group">
63
- <label class="font_normal_body">客户名称</label>
64
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
65
- condition="f_user_name like '%{}%'" placeholder="客户名称">
66
- </div>
67
- <div class="col-sm-2 form-group">
68
- <label class="font_normal_body">客户电话</label>
69
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
70
- condition="f_user_phone like '%{}%'" placeholder="客户电话">
71
- </div>
72
- <div class="col-sm-2 form-group">
73
- <label class="font_normal_body">表&emsp;&emsp;号</label>
74
- <input type="text" style="width:60%" class="input_search" v-model="model.f_meter_number"
75
- condition="f_meternumber = '{}'" placeholder='表号'>
76
- </div>
77
- <div class="col-sm-2 form-group">
78
- <label class="font_normal_body">卡&emsp;&emsp;号</label>
79
- <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
80
- condition="f_card_id = '{}'" placeholder='卡号'>
81
- </div>
82
- <div class="col-sm-2 form-group">
83
- <label class="font_normal_body">更改内容</label>
84
- <input type="text" style="width:60%" class="input_search" v-model="model.f_field_name"
85
- condition="f_field_name like '%{}%'" placeholder='更改内容'>
86
- <!-- <v-select :value.sync="model.f_field_name"-->
87
- <!-- v-model="model.f_field_name"-->
88
- <!-- :options='$parent.$parent.field_name' placeholder='请选择'-->
89
- <!-- condition="f_field_name = '{}'"-->
90
- <!-- close-on-select></v-select>-->
91
- </div>
92
- </div>
93
- </div>
94
- </criteria>
95
-
96
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid @dblclick="$parent.$parent.toBusiness">
97
- <template partial='head'>
98
- <tr>
99
- <th>
100
- <!--<nobr>客户编号</nobr>-->
101
- <data-order field="f_userinfo_code" name="客户编号" :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
102
- </th>
103
- <th>
104
- <nobr>客户名称</nobr>
105
- </th>
106
- <th>
107
- <nobr>档案编号</nobr>
108
- </th>
109
- <th>
110
- <nobr>客户电话</nobr>
111
- </th>
112
- <th>
113
- <nobr>更改内容</nobr>
114
- </th>
115
- <th>
116
- <nobr>更改前</nobr>
117
- </th>
118
- <th>
119
- <nobr>更改后</nobr>
120
- </th>
121
- <th>
122
- <nobr>操作人</nobr>
123
- </th>
124
- <th>
125
- <!--<nobr>操作日期</nobr>-->
126
- <data-order field="f_operate_date" name="操作日期" :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
127
- </th>
128
- <th>
129
- <nobr>部门</nobr>
130
- </th>
131
- <th>
132
- <nobr>公司</nobr>
133
- </th>
134
- <th>
135
- <nobr>修改原因</nobr>
136
- </th>
137
- </tr>
138
- </template>
139
- <template partial='body'>
140
- <td style="text-align: center;"><nobr>
141
- {{row.f_userinfo_code}}
142
- </nobr> </td>
143
- <td style="text-align: center;">
144
- <nobr>{{row.f_user_name}}</nobr>
145
- </td>
146
- <td style="text-align: center;">
147
- <nobr>{{row.f_olduserinfo_code}}</nobr>
148
- </td>
149
- <td style="text-align: center;">
150
- <nobr>{{row.f_user_phone}}</nobr>
151
- </td>
152
- <td style="text-align: center;">
153
- <nobr>{{row.f_field_name}}</nobr>
154
- </td>
155
- <td style="text-align: center;">
156
- <nobr>{{row.f_used_content}}</nobr>
157
- </td>
158
- <td style="text-align: center;">
159
- <nobr>{{row.f_new_content}}</nobr>
160
- </td>
161
- <td style="text-align: center;">
162
- <nobr>{{row.f_operator}}</nobr>
163
- </td>
164
- <td style="text-align: center;">
165
- <nobr>{{row.f_operate_date}}</nobr>
166
- </td>
167
- <td style="text-align: center;">
168
- <nobr>{{row.f_depname}}</nobr>
169
- </td>
170
- <td style="text-align: center;">
171
- <nobr>{{row.f_orgname}}</nobr>
172
- </td>
173
- <td style="text-align: center;">
174
- <nobr>{{row.f_comments}}</nobr>
175
- </td>
176
- </template>
177
- <template partial='foot'></template>
178
- </data-grid>
179
- </criteria-paged>
180
- </div>
181
- <!-- <div class="flex" v-if="show">-->
182
- <!-- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>-->
183
- <!-- </div>-->
184
- </div>
185
- </div>
186
- </template>
187
-
188
- <script>
189
- import {PagedList} from 'vue-client'
190
- import defaultPrint from '../config/DefaultPrint'
191
- import exportConfig from '../config/exportConfig'
192
-
193
- let readySomething = async function (self) {
194
-
195
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
196
- self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
197
- // self.$refs.paged.$refs.cri.search()
198
- await self.$MagLoadParams.loadParam()
199
- self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
200
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
201
- }
202
- export default {
203
- title: '档案变更记录',
204
- data() {
205
- return {
206
- data: {},
207
- other:[],
208
- footer:[],
209
- meterbrands: [],
210
- pricenames: [],
211
- model: new PagedList('rs/sql/changeuserquery', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`}),
212
- criteriaShow: false,
213
- orgCondtionStr: '',
214
- modelval: [],
215
- printshow: false,
216
- all: false,
217
- fields: {},
218
- //排序
219
- orderitem:'f_operate_date desc',
220
- orderFields: {
221
- f_operate_date: 'no'
222
- },
223
- initres: {
224
- org:[this.$login.f.orgid],
225
- dep:[],
226
- user:[],
227
- },
228
- defaultfield: [],
229
- config: {
230
- defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone']
231
- },
232
- show:false,
233
- rowdata:{},
234
- thead: '',
235
- tfoot: '',
236
-
237
- // tablestate: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '停用', value: '停用'}],
238
-
239
-
240
- //合计数据
241
- sumsmodel: {}
242
- }
243
- },
244
- ready() {
245
- readySomething(this)
246
- },
247
- methods: {
248
- getotherfooter () {
249
- // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
250
- // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
251
- this.other = [];
252
- this.footer = [];
253
- let exportdata = this.getCondition;
254
- let otherInData = [];
255
- otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
256
- // let footerData = [], exportfield = this.getfield;
257
- // footerData.push("合计");
258
- // let self = this;
259
- // for (var field in self.sumsmodel) {
260
- // footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
261
- // }
262
- // this.footer.push(footerData);
263
- this.other.push(otherInData);
264
- },
265
- search(){
266
- this.$refs.paged.$refs.cri.search()
267
- },
268
- cancel() {
269
- this.show = false
270
- },
271
- // showmsg(obj){
272
- // this.rowdata=obj
273
- // this.show=true
274
- // },
275
-
276
- selfSearch(args) {
277
- args.condition = `${args.condition}` + this.orgCondtionStr
278
- this.model.search(args.condition, args.model)
279
- this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
280
- },
281
- clear() {
282
- //清空部门和人员
283
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
284
- //部门和人员变为全选
285
- this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
286
- this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
287
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
288
- this.$refs.paged.$refs.cri.model[key] = []
289
- })
290
- },
291
- show() {
292
- this.criteriaShow = true
293
- },
294
- hidden() {
295
- this.criteriaShow = !this.criteriaShow
296
- },
297
- getRes(obj) {
298
- console.log(obj,"========")
299
- this.orgCondtionStr = obj
300
- },
301
- stamp() {
302
- this.all = false
303
- //默认选择要打印的列
304
- this.modelval = defaultPrint.config
305
- this.fields = this.getfield
306
- console.log('所有打印字段', this.fields)
307
- this.printshow = true
308
- this.put()
309
- },
310
- dealmsg(val) {
311
- console.log('---------------dealmsg')
312
- val.model = this.model.model
313
- this.$dispatch('deal-msg', val)
314
- },
315
- put() {
316
- // 对Modelval进行排序
317
- this.sortModelval()
318
- this.thead = `<tr><th colspan=${this.modelval.length}>换表查询统计报表</th></tr><tr>`
319
- for (let key of this.modelval) {
320
- this.thead += '<th>' + this.fields[key] + '</th>'
321
- }
322
- this.thead += '</tr>'
323
- },
324
- print() {
325
- this.$refs.print.PrintAsFile()
326
- this.printshow = false
327
- },
328
- close() {
329
- this.printshow = false
330
- this.all = false
331
- },
332
- // 对选择的列进行排序
333
- sortModelval() {
334
- let sortModel = []
335
- Object.keys(this.fields).forEach((key) => {
336
- if (this.modelval.includes(key)) {
337
- sortModel.push(key)
338
- }
339
- })
340
- this.modelval = sortModel
341
- console.log('选择的打印的字段', this.modelval)
342
- },
343
- sort (field, rule) {
344
- // 将所有排序方式设为不排序,实现相互排斥
345
- for (let key in this.orderFields) {
346
- if (key === field) {
347
- this.orderFields[key] = rule
348
- } else {
349
- this.orderFields[key] = 'no'
350
- }
351
- }
352
- // 如果新规则不排序,还原为默认排序
353
- if (rule === 'no') {
354
- this.model.paramSource.orderitem = `'${this.orderitem}'`
355
- } else {
356
- this.model.paramSource.orderitem = `'${field} ${rule}'`
357
- }
358
-
359
- this.search()
360
- }
361
- },
362
- watch: {
363
- 'all'(val) {
364
- if (val) {
365
- this.modelval = this.bodyData
366
- } else {
367
- this.modelval = defaultPrint.config
368
- this.put()
369
- }
370
- },
371
- 'modelval.length'() {
372
- this.put()
373
- },
374
- sumsmodel:{
375
- handler: function(val) {
376
- this.getotherfooter();
377
- },
378
- deep: true
379
- },
380
- },
381
- computed: {
382
- authArr () {
383
- return this.$login.r ? this.$login.r : []
384
- },
385
- getCondition() {
386
- return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,orderitem:this.orderitem}
387
- },
388
- getfield() {
389
- return exportConfig.changUserConfig
390
- },
391
- field_name() {
392
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('更改内容')]
393
- }
394
- }
395
- }
396
- </script>
1
+ <template>
2
+ <div id="unit" class="flex-row" class="foot_tabset" @keyup.enter="search">
3
+ <div class="basic-main">
4
+ <div class="flex" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label class="font_normal_body">开始日期</label>
11
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :format="'yyyy-MM-dd HH:mm:ss'"
15
+ :show-reset-button="true"
16
+ condition="f_operate_date >= '{}'">
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-2 form-group">
20
+ <label class="font_normal_body">结束日期</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :format="'yyyy-MM-dd HH:mm:ss'"
25
+ :show-reset-button="true"
26
+ condition="f_operate_date <= '{}'">
27
+ </datepicker>
28
+ </div>
29
+ <div class="col-sm-2 form-group ">
30
+ <label class="font_normal_body">客户编号</label>
31
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
32
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
33
+ </div>
34
+ <div class="col-sm-2 form-group">
35
+ <label class="font_normal_body" title="旧客户编号">档案编号</label>
36
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
37
+ condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
38
+ </div>
39
+
40
+
41
+ <div class="span" style="float:right;">
42
+ <button class="button_search button_spacing" @click="search()">查询</button>
43
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
44
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
45
+
46
+ <export-excel :data="$parent.$parent.getCondition"
47
+ :field="$parent.$parent.getfield"
48
+ :header="$parent.$parent.other"
49
+ v-if="$parent.$parent.authArr.includes('档案查询导出')"
50
+ sqlurl="rs/logic/exportfile" sql-name="changeuserquery" template-name='档案变更导出'
51
+ :choose-col="true"></export-excel>
52
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
53
+ :defaultfield="$parent.$parent.defaultfield"
54
+ titletable="档案变更"
55
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
56
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
57
+ </div>
58
+ </div>
59
+
60
+ <div class="row" v-show="$parent.$parent.criteriaShow">
61
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
62
+ <div class="col-sm-2 form-group">
63
+ <label class="font_normal_body">客户名称</label>
64
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
65
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
66
+ </div>
67
+ <div class="col-sm-2 form-group">
68
+ <label class="font_normal_body">客户电话</label>
69
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
70
+ condition="f_user_phone like '%{}%'" placeholder="客户电话">
71
+ </div>
72
+ <div class="col-sm-2 form-group">
73
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
74
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meter_number"
75
+ condition="f_meternumber = '{}'" placeholder='表号'>
76
+ </div>
77
+ <div class="col-sm-2 form-group">
78
+ <label class="font_normal_body">卡&emsp;&emsp;号</label>
79
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
80
+ condition="f_card_id = '{}'" placeholder='卡号'>
81
+ </div>
82
+ <div class="col-sm-2 form-group">
83
+ <label class="font_normal_body">更改内容</label>
84
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_field_name"
85
+ condition="f_field_name like '%{}%'" placeholder='更改内容'>
86
+ <!-- <v-select :value.sync="model.f_field_name"-->
87
+ <!-- v-model="model.f_field_name"-->
88
+ <!-- :options='$parent.$parent.field_name' placeholder='请选择'-->
89
+ <!-- condition="f_field_name = '{}'"-->
90
+ <!-- close-on-select></v-select>-->
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </criteria>
95
+
96
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid @dblclick="$parent.$parent.toBusiness">
97
+ <template partial='head'>
98
+ <tr>
99
+ <th>
100
+ <!--<nobr>客户编号</nobr>-->
101
+ <data-order field="f_userinfo_code" name="客户编号" :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
102
+ </th>
103
+ <th>
104
+ <nobr>客户名称</nobr>
105
+ </th>
106
+ <th>
107
+ <nobr>档案编号</nobr>
108
+ </th>
109
+ <th>
110
+ <nobr>客户电话</nobr>
111
+ </th>
112
+ <th>
113
+ <nobr>更改内容</nobr>
114
+ </th>
115
+ <th>
116
+ <nobr>更改前</nobr>
117
+ </th>
118
+ <th>
119
+ <nobr>更改后</nobr>
120
+ </th>
121
+ <th>
122
+ <nobr>操作人</nobr>
123
+ </th>
124
+ <th>
125
+ <!--<nobr>操作日期</nobr>-->
126
+ <data-order field="f_operate_date" name="操作日期" :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
127
+ </th>
128
+ <th>
129
+ <nobr>部门</nobr>
130
+ </th>
131
+ <th>
132
+ <nobr>公司</nobr>
133
+ </th>
134
+ <th>
135
+ <nobr>修改原因</nobr>
136
+ </th>
137
+ </tr>
138
+ </template>
139
+ <template partial='body'>
140
+ <td style="text-align: center;"><nobr>
141
+ {{row.f_userinfo_code}}
142
+ </nobr> </td>
143
+ <td style="text-align: center;">
144
+ <nobr>{{row.f_user_name}}</nobr>
145
+ </td>
146
+ <td style="text-align: center;">
147
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
148
+ </td>
149
+ <td style="text-align: center;">
150
+ <nobr>{{row.f_user_phone}}</nobr>
151
+ </td>
152
+ <td style="text-align: center;">
153
+ <nobr>{{row.f_field_name}}</nobr>
154
+ </td>
155
+ <td style="text-align: center;">
156
+ <nobr>{{row.f_used_content}}</nobr>
157
+ </td>
158
+ <td style="text-align: center;">
159
+ <nobr>{{row.f_new_content}}</nobr>
160
+ </td>
161
+ <td style="text-align: center;">
162
+ <nobr>{{row.f_operator}}</nobr>
163
+ </td>
164
+ <td style="text-align: center;">
165
+ <nobr>{{row.f_operate_date}}</nobr>
166
+ </td>
167
+ <td style="text-align: center;">
168
+ <nobr>{{row.f_depname}}</nobr>
169
+ </td>
170
+ <td style="text-align: center;">
171
+ <nobr>{{row.f_orgname}}</nobr>
172
+ </td>
173
+ <td style="text-align: center;">
174
+ <nobr>{{row.f_comments}}</nobr>
175
+ </td>
176
+ </template>
177
+ <template partial='foot'></template>
178
+ </data-grid>
179
+ </criteria-paged>
180
+ </div>
181
+ <!-- <div class="flex" v-if="show">-->
182
+ <!-- <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>-->
183
+ <!-- </div>-->
184
+ </div>
185
+ </div>
186
+ </template>
187
+
188
+ <script>
189
+ import {PagedList} from 'vue-client'
190
+ import defaultPrint from '../config/DefaultPrint'
191
+ import exportConfig from '../config/exportConfig'
192
+
193
+ let readySomething = async function (self) {
194
+
195
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
196
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
197
+ // self.$refs.paged.$refs.cri.search()
198
+ await self.$MagLoadParams.loadParam()
199
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
200
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
201
+ }
202
+ export default {
203
+ title: '档案变更记录',
204
+ data() {
205
+ return {
206
+ data: {},
207
+ other:[],
208
+ footer:[],
209
+ meterbrands: [],
210
+ pricenames: [],
211
+ model: new PagedList('rs/sql/changeuserquery', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`}),
212
+ criteriaShow: false,
213
+ orgCondtionStr: '',
214
+ modelval: [],
215
+ printshow: false,
216
+ all: false,
217
+ fields: {},
218
+ //排序
219
+ orderitem:'f_operate_date desc',
220
+ orderFields: {
221
+ f_operate_date: 'no'
222
+ },
223
+ initres: {
224
+ org:[this.$login.f.orgid],
225
+ dep:[],
226
+ user:[],
227
+ },
228
+ defaultfield: [],
229
+ config: {
230
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone']
231
+ },
232
+ show:false,
233
+ rowdata:{},
234
+ thead: '',
235
+ tfoot: '',
236
+
237
+ // tablestate: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '停用', value: '停用'}],
238
+
239
+
240
+ //合计数据
241
+ sumsmodel: {}
242
+ }
243
+ },
244
+ ready() {
245
+ readySomething(this)
246
+ },
247
+ methods: {
248
+ getotherfooter () {
249
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
250
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
251
+ this.other = [];
252
+ this.footer = [];
253
+ let exportdata = this.getCondition;
254
+ let otherInData = [];
255
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
256
+ // let footerData = [], exportfield = this.getfield;
257
+ // footerData.push("合计");
258
+ // let self = this;
259
+ // for (var field in self.sumsmodel) {
260
+ // footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
261
+ // }
262
+ // this.footer.push(footerData);
263
+ this.other.push(otherInData);
264
+ },
265
+ search(){
266
+ this.$refs.paged.$refs.cri.search()
267
+ },
268
+ cancel() {
269
+ this.show = false
270
+ },
271
+ // showmsg(obj){
272
+ // this.rowdata=obj
273
+ // this.show=true
274
+ // },
275
+
276
+ selfSearch(args) {
277
+ args.condition = `${args.condition}` + this.orgCondtionStr
278
+ this.model.search(args.condition, args.model)
279
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
280
+ },
281
+ clear() {
282
+ //清空部门和人员
283
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
284
+ //部门和人员变为全选
285
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
286
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
287
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
288
+ this.$refs.paged.$refs.cri.model[key] = []
289
+ })
290
+ },
291
+ show() {
292
+ this.criteriaShow = true
293
+ },
294
+ hidden() {
295
+ this.criteriaShow = !this.criteriaShow
296
+ },
297
+ getRes(obj) {
298
+ console.log(obj,"========")
299
+ this.orgCondtionStr = obj
300
+ },
301
+ stamp() {
302
+ this.all = false
303
+ //默认选择要打印的列
304
+ this.modelval = defaultPrint.config
305
+ this.fields = this.getfield
306
+ console.log('所有打印字段', this.fields)
307
+ this.printshow = true
308
+ this.put()
309
+ },
310
+ dealmsg(val) {
311
+ console.log('---------------dealmsg')
312
+ val.model = this.model.model
313
+ this.$dispatch('deal-msg', val)
314
+ },
315
+ put() {
316
+ // 对Modelval进行排序
317
+ this.sortModelval()
318
+ this.thead = `<tr><th colspan=${this.modelval.length}>换表查询统计报表</th></tr><tr>`
319
+ for (let key of this.modelval) {
320
+ this.thead += '<th>' + this.fields[key] + '</th>'
321
+ }
322
+ this.thead += '</tr>'
323
+ },
324
+ print() {
325
+ this.$refs.print.PrintAsFile()
326
+ this.printshow = false
327
+ },
328
+ close() {
329
+ this.printshow = false
330
+ this.all = false
331
+ },
332
+ // 对选择的列进行排序
333
+ sortModelval() {
334
+ let sortModel = []
335
+ Object.keys(this.fields).forEach((key) => {
336
+ if (this.modelval.includes(key)) {
337
+ sortModel.push(key)
338
+ }
339
+ })
340
+ this.modelval = sortModel
341
+ console.log('选择的打印的字段', this.modelval)
342
+ },
343
+ sort (field, rule) {
344
+ // 将所有排序方式设为不排序,实现相互排斥
345
+ for (let key in this.orderFields) {
346
+ if (key === field) {
347
+ this.orderFields[key] = rule
348
+ } else {
349
+ this.orderFields[key] = 'no'
350
+ }
351
+ }
352
+ // 如果新规则不排序,还原为默认排序
353
+ if (rule === 'no') {
354
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
355
+ } else {
356
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
357
+ }
358
+
359
+ this.search()
360
+ }
361
+ },
362
+ watch: {
363
+ 'all'(val) {
364
+ if (val) {
365
+ this.modelval = this.bodyData
366
+ } else {
367
+ this.modelval = defaultPrint.config
368
+ this.put()
369
+ }
370
+ },
371
+ 'modelval.length'() {
372
+ this.put()
373
+ },
374
+ sumsmodel:{
375
+ handler: function(val) {
376
+ this.getotherfooter();
377
+ },
378
+ deep: true
379
+ },
380
+ },
381
+ computed: {
382
+ authArr () {
383
+ return this.$login.r ? this.$login.r : []
384
+ },
385
+ getCondition() {
386
+ return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,orderitem:this.orderitem}
387
+ },
388
+ getfield() {
389
+ return exportConfig.changUserConfig
390
+ },
391
+ field_name() {
392
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('更改内容')]
393
+ }
394
+ }
395
+ }
396
+ </script>