manage-client 3.3.140-mx → 3.3.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.
@@ -1,575 +1,574 @@
1
- <template >
2
- <div class="flex-row">
3
- <div @keyup.enter="search1" class="basic-main">
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria @condition-changed='$parent.search' partial='criteria' v-ref:criteria>
6
- <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
7
- <div class="row">
8
- <div class="col-sm-2">
9
- <res-select-group :show-component="['company']" :initres="$parent.$parent.org" @re-res="$parent.$parent.getorg" style="width:60%"></res-select-group>
10
- </div>
11
- <div class="col-sm-2 form-group ">
12
- <label class="font_normal_body">客户编号</label>
13
- <input
14
- class="input_search" condition="f_userinfo_code = '{}'"
15
- placeholder='客户编号'
16
- style="width:60%"
17
- type="text"
18
- v-model="model.f_userinfo_code">
19
- </div>
20
-
21
- <div class="col-sm-2 form-group">
22
- <label class="font_normal_body">客户名称</label>
23
- <input
24
- class="input_search" condition="f_user_name like '%{}%'"
25
- placeholder='客户名称'
26
- style="width:60%"
27
- type="text"
28
- v-model="model.f_user_name"
29
- >
30
- </div>
31
- <div class="col-sm-2 form-group">
32
- <label class="font_normal_body">客户地址</label>
33
- <input class="input_search"
34
- condition="f_address like '%{}%'"
35
- placeholder='客户地址'
36
- style="width:60%"
37
- type="text"
38
- v-model="model.f_address"
39
- >
40
- </div>
41
-
42
- <div style="float:right">
43
- <button @click="search()" class="button_search" v-el:cba>查询</button>
44
- <button @click="$parent.$parent.clearmsg" class="button_clear">清空</button>
45
- <export-excel
46
- :choose-col="true"
47
- :data="{condition: $parent.$parent.condition,
48
- f_orgid: $parent.$parent.f_orgid,
49
- f_start_date: $parent.$parent.f_start_date,
50
- f_end_date: $parent.$parent.f_end_date
51
- }"
52
- :field="$parent.$parent.getfield" sql-name="manage_getNewQueryInstruct" sqlurl="rs/logic/exportfile"
53
- template-name='指令查看'></export-excel>
54
- <div
55
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
56
- @click="$parent.$parent.hidden()" class="button_spacing" style="float: right"></div>
57
- </div>
58
- </div>
59
- <div class="row" v-show="$parent.$parent.criteriaShow">
60
-
61
- <!-- <div class="col-sm-2">-->
62
- <!-- <label class="font_normal_body">组织机构</label>-->
63
- <!-- <res-select :initresid="$parent.$parent.org"-->
64
- <!-- style="width:60%"-->
65
- <!-- @res-select="$parent.$parent.getorg"-->
66
- <!-- restype='organization'>-->
67
- <!-- </res-select>-->
68
-
69
- <!-- </div>-->
70
-
71
- <!-- <div class="col-sm-2 form-group">-->
72
- <!-- <label class="font_normal_body">客户类型</label>-->
73
- <!-- <v-select style="width:60%" :value.sync="model.f_user_type" v-model="model.f_user_type"-->
74
- <!-- placeholder='客户类型'-->
75
- <!-- value-single="true"-->
76
- <!-- :options='$parent.$parent.userType'-->
77
- <!-- close-on-select-->
78
- <!-- condition="f_user_type ='{}'"-->
79
- <!-- ></v-select>-->
80
- <!-- </div>-->
81
- <div class="col-sm-2 form-group">
82
- <label class="font_normal_body">用气性质</label>
83
- <v-select style="width:60%" :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
84
- placeholder='用气性质'
85
- value-single="true"
86
- :options='$parent.$parent.Gasproperties'
87
- close-on-select
88
- condition="f_gasproperties = '{}'"
89
- ></v-select>
90
- </div>
91
- <div class="col-sm-2 form-group">
92
- <label class="font_normal_body">表&ensp;&ensp;&ensp;&ensp;号</label>
93
- <input
94
- class="input_search" condition="u1.f_meternumber = '{}'"
95
- placeholder='表号'
96
- style="width:60%"
97
- type="text"
98
- v-model="model.f_meternumber">
99
- </div>
100
- <div class="col-sm-2 form-group">
101
- <label class="font_normal_body">气表品牌</label>
102
- <v-select
103
- :options='$parent.$parent.meterbrand'
104
-
105
- :value.sync="model.f_gasbrand"
106
- close-on-select
107
- condition="f_meter_brand='{}'"
108
- placeholder='气表品牌'
109
- style="width:60%"
110
- v-model="model.f_gasbrand">
111
- </v-select>
112
- </div>
113
- <div class="col-sm-2 form-group">
114
- <label class="font_normal_body">指令类型</label>
115
- <v-select :options='$parent.$parent.instructtype' :value.sync="model.f_instruct_type" close-on-select
116
- condition="f_instruct_type='{}'"
117
- placeholder='指令类型'
118
- style="width:60%"
119
- v-model="model.f_instruct_type"></v-select>
120
- </div>
121
- <div class="col-sm-2 form-group">
122
- <label class="font_normal_body">执行状态</label>
123
- <v-select :options='$parent.$parent.instructstate' :value.sync="model.f_instruct_state" close-on-select
124
- condition="f_instruct_state='{}'"
125
- placeholder='执行状态'
126
- style="width:60%"
127
- v-model="model.f_instruct_state"
128
- ></v-select>
129
- </div>
130
-
131
- <div class="col-sm-2 form-group">
132
- <label class="font_normal_body">指令时间</label>
133
- <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_start_date"
134
- condition="f_instruct_date >= '{}'"
135
- placeholder="起始时间"
136
- style="width:60%"
137
- v-model="model.f_start_date"
138
- ></datepicker>
139
- </div>
140
- <div class="col-sm-2 form-group">
141
- <label class="font_normal_body">&emsp;&emsp;至&emsp;</label>
142
- <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_end_date"
143
- condition="f_instruct_date <= '{}'"
144
- placeholder="结束时间"
145
- style="width:60%"
146
- v-model="model.f_end_date"
147
- ></datepicker>
148
- </div>
149
- <div class="col-sm-2 form-group">
150
- <label class="font_normal_body">指令标题</label>
151
- <v-select :options='$parent.$parent.instructtitle' :value.sync="model.f_instruct_title" close-on-select
152
- condition="f_instruct_title='{}'"
153
- placeholder='指令标题'
154
- style="width:60%"
155
- v-model="model.f_instruct_title"></v-select>
156
- </div>
157
-
158
- <div class="col-sm-2 form-group">
159
- <label class="font_normal_body">操&nbsp;作&nbsp;人</label>
160
- <v-select :options='$parent.$parent.operators' :value.sync="model.f_operator" close-on-select
161
- condition="f_operator='{}'"
162
- placeholder='操作人'
163
- style="width:60%"
164
- v-model="model.f_operator"></v-select>
165
- </div>
166
- </div>
167
- </div>
168
- </criteria>
169
- <data-grid :model="model" class="list_area table_sy" id="queryinstruct" partial='list' :modelval="$parent.$parent.modelval" v-ref:grid>
170
- <template partial='head'>
171
- <tr>
172
- <th style="text-align:center">
173
- <nobr>序号</nobr>
174
- </th>
175
- <th style="text-align:center">
176
- <nobr>客户编号</nobr>
177
- </th>
178
- <th style="text-align:center">
179
- <nobr>客户名称</nobr>
180
- </th>
181
- <th style="text-align:center">
182
- <nobr>客户地址</nobr>
183
- </th>
184
- <th style="text-align:center">
185
- <nobr>表号</nobr>
186
- </th>
187
- <th style="text-align:center">
188
- <nobr>气表品牌</nobr>
189
- </th>
190
- <th style="text-align:center">
191
- <nobr>指令类型</nobr>
192
- </th>
193
- <th style="text-align:center">
194
- <nobr>指令标题</nobr>
195
- </th>
196
- <th style="text-align:center">
197
- <nobr>执行状态</nobr>
198
- </th>
199
- <th style="text-align:center"><nobr>执行结果</nobr></th>
200
- <th style="text-align:center"><nobr>指令生成人</nobr></th>
201
- <th style="text-align:center"><nobr>指令生成时间</nobr></th>
202
- <th style="text-align:center"><nobr>指令发送时间</nobr></th>
203
- <th style="text-align:center"><nobr>上表时间</nobr></th>
204
- <th style="text-align:center">
205
- <nobr>充值金额</nobr>
206
- </th>
207
- <th style="text-align:center">
208
- <nobr>操作内容</nobr>
209
- </th>
210
- <th style="text-align:center">
211
- <nobr>操作原因</nobr>
212
- </th>
213
- <th style="text-align:center">
214
- <nobr>操作人(记录)</nobr>
215
- </th>
216
- <th style="text-align:center">
217
- <nobr>操作时间(记录)</nobr>
218
- </th>
219
- <th style="text-align:center">
220
- <nobr>操作类型</nobr>
221
- </th>
222
- <th style="text-align:center">
223
- <nobr>记录状态</nobr>
224
- </th>
225
- <th style="text-align:center">
226
- <nobr>组织机构</nobr>
227
- </th>
228
- <th style="text-align:center;">
229
- <nobr>指令内容</nobr>
230
- </th>
231
- <th style="text-align:center">
232
- <nobr>指令详情</nobr>
233
- </th>
234
- </tr>
235
- </template>
236
- <template partial='body'>
237
- <tr>
238
- <td style="text-align:center">
239
- <nobr>{{$index+1}}</nobr>
240
- </td>
241
- <td style="text-align:center">
242
- <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
243
- </td>
244
- <td style="text-align:center">
245
- <nobr>{{row.f_user_name}}</nobr>
246
- </td>
247
- <td style="text-align:center">
248
- <nobr>{{row.f_address}}</nobr>
249
- </td>
250
- <td style="text-align:center">
251
- <nobr>{{row.f_meternumber}}</nobr>
252
- </td>
253
- <td style="text-align:center">
254
- <nobr>{{row.f_meter_brand}}</nobr>
255
- </td>
256
-
257
- <td style="text-align:center">
258
- <nobr>{{row.f_instruct_type}}</nobr>
259
- </td>
260
- <td style="text-align:center">
261
- <nobr>{{row.f_instruct_title}}</nobr>
262
- </td>
263
- <td style="text-align:center">
264
- <nobr>{{row.f_instruct_state}}</nobr>
265
- </td>
266
- <td style="text-align:center">
267
- <nobr>{{row.f_receive_state}}</nobr>
268
- </td>
269
- <td style="text-align:center">
270
- <nobr>{{row.f_inputtor}}</nobr>
271
- </td>
272
- <td style="text-align:center">
273
- <nobr>{{row.f_instruct_date}}</nobr>
274
- </td>
275
- <td style="text-align:center"><nobr>{{row.f_send_date}}</nobr></td>
276
- <td style="text-align:center"><nobr>{{row.f_callback_date}}</nobr></td>
277
- <td style="text-align:center">
278
- <nobr>{{row.f_collection}}</nobr>
279
- </td>
280
- <td style="text-align:center">
281
- <nobr>{{row.note}}</nobr>
282
- </td>
283
- <td style="text-align:center">
284
- <nobr>{{row.f_info}}</nobr>
285
- </td>
286
- <td style="text-align:center">
287
- <nobr>{{row.f_operator}}</nobr>
288
- </td>
289
- <td style="text-align:center">
290
- <nobr>{{row.f_operate_date}}</nobr>
291
- </td>
292
- <td style="text-align:center">
293
- <nobr>{{row.f_operate_type}}</nobr>
294
- </td>
295
- <td style="text-align:center">
296
- <nobr>{{row.f_state}}</nobr>
297
- </td>
298
- <td style="text-align:center">
299
- <nobr>{{row.f_orgname}}</nobr>
300
- </td>
301
- <td style="text-align:center;">
302
- <nobr>{{row.f_instruct_content}}</nobr>
303
- </td>
304
- <td style="text-align:center">
305
- <button style=" height: 28px;line-height: 16px;" class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.instructDetail(row)">指令详情</button>
306
- </td>
307
- </tr>
308
- </template>
309
- </data-grid>
310
- </criteria-paged>
311
- </div>
312
- <modal :show.sync="detailShow" v-if="detailShow" width="40%" style="width:auto;" v-ref:modal middle backdrop="false">
313
- <article slot="modal-body">
314
- <p class="text-center" style="font-size: 15px" v-html="f_instruct_content"></p>
315
- </article>
316
- <footer slot="modal-footer" class="modal-footer">
317
- </footer>
318
- </modal>
319
- </div>
320
- </template>
321
- <script>
322
- import {PagedList} from 'vue-client'
323
- import co from 'co'
324
- import * as Util from '../../../Util'
325
- import getLodop from '../../../plugins/LodopFuncs'
326
- import {HttpResetClass} from 'vue-client'
327
- import plugins from '../../../plugins/GetLoginInfoService'
328
-
329
- let readyGen = async function (self) {
330
- await self.$MagLoadParams.loadParam()
331
- await self.$MagGetSaleParam.initinputtor()
332
- self.initQueryParam()
333
- self.getinstructtype()
334
- self.getinstructtitle()
335
- self.getinstructstate()
336
- await self.$getConfig(self, 'NewQueryInstruct')
337
- console.log('指令查看config', self.config)
338
- self.getfield = self.config.excelHeaders
339
- self.getOperators(self.$login.f.orgid)
340
- // self.reflash()
341
- }
342
- export default {
343
- title: '指令查看',
344
- data () {
345
- return {
346
- model: new PagedList('rs/sql/manage_getNewQueryInstruct', 50),
347
- row: null,
348
- isLoading: true,
349
- searchshow: true,
350
- criteriaShow:false,
351
- Gasproperties:[],
352
- meterbrand: [],
353
- operators:[],
354
- userType:[],
355
- instructtype:[],
356
- instructstate:[],
357
- org:{
358
- org:[this.$login.f.orgid],
359
- dep:[],
360
- user:[],
361
- },
362
- orgcondition:'',
363
- show: false,
364
- condition:'',
365
- f_orgid:'',
366
- f_start_date:'',
367
- f_end_date:'',
368
- getfield: {},
369
- config: {
370
- excelHeaders: {
371
- 'f_userinfo_code': '客户编号','f_address': '客户地址','f_user_name': '客户姓名',
372
- 'f_meternumber': '表号','f_meter_brand': '气表品牌','f_instruct_type': '指令类型',
373
- 'f_instruct_state': '执行状态','f_receive_state': '执行结果','f_inputtor': '指令生成人','f_instruct_date': '指令时间',
374
- 'note':'操作内容','f_info':'操作原因','f_operator':'操作人(记录)','f_operate_date':'操作时间(记录)','f_operate_type':'操作类型','f_state':'操作状态',
375
- 'f_orgname': '组织机构'
376
- }
377
- },
378
- instructtitle: [],
379
- detailShow: false,
380
- f_instruct_content: '',
381
- modelval: [
382
- '序号','客户编号','客户名称','客户地址','表号','气表品牌','指令类型','指令标题','执行状态','执行结果','指令生成人','指令生成时间',
383
- '指令发送时间','上表时间','充值金额','操作内容','操作原因','操作人(记录)','操作时间(记录)','操作类型','记录状态','组织机构'
384
- ]
385
- }
386
- },
387
- ready () {
388
- readyGen(this)
389
- this.$refs.paged.$refs.criteria.model.f_start_date = Util.toStandardDateString() + ' 00:00:00'
390
- this.$refs.paged.$refs.criteria.model.f_end_date = Util.toStandardDateString() + ' 23:59:59'
391
- this.$refs.paged.$refs.grid.modelval = this.modelval
392
- //this.$refs.paged.$refs.criteria.search()
393
- },
394
- methods: {
395
- instructDetail(row){
396
- if (row.f_instruct_content != '{}') {
397
- let data = JSON.parse(row.f_instruct_content)
398
- console.log('看下具体的指令详情===>',data)
399
- let str = ''
400
- if (data.hasOwnProperty("Data")) {
401
- console.log('看下具体的指令详情2===>',data.Data)
402
- console.log('看下具体的指令详情2===>',typeof data.Data)
403
- for (let key in data.Data) {
404
- str = str + key + ':' + data.Data[key] + '</br>'
405
- }
406
- }
407
- for (let key in data) {
408
- if (key != 'Data'){
409
- str = str + key + ':' + data[key] + '</br>'
410
- }
411
- }
412
- this.f_instruct_content = str
413
- this.detailShow = true
414
- }else{
415
- this.$showMessage('当前指令没有内容!!!', ['confirm'])
416
- }
417
- },
418
- hidden(){
419
- this.criteriaShow = !this.criteriaShow
420
- },
421
- getorg(condition,obj) {
422
- this.orgcondition = condition.replace('f_orgid','f_orgid')
423
- this.orgcondition = this.orgcondition.replace('f_depid','f_depid')
424
- this.orgcondition = this.orgcondition.replace('f_operatorid','f_operatorid')
425
- this.orgname = obj.orgnames[0]
426
- },
427
- initQueryParam () {
428
- let arr = []
429
- this.$MagGetSaleParam.getGasbrand().forEach((item) => {
430
- let temp = {}
431
- if(item.value.f_meter_type==='物联网表'){
432
- temp.label = item.label
433
- temp.value = item.value.f_meter_brand
434
- arr.push(temp )
435
- }
436
-
437
- })
438
- this.meterbrand = [{label: '全部', value: ''}, ...arr]
439
- },
440
- //获取资源数据
441
- getOperators(orgid) {
442
- this.operators = []
443
- this.$MagGetSaleParam.inputtors.forEach((res) => {
444
- if(res.rolestr != null && res.rolestr!='' ){
445
- if( res.f_orgid == orgid) {
446
- let temp = {
447
- label :res.name,
448
- value:res.name,
449
- }
450
- this.operators.push(temp)
451
- }
452
- }
453
- })
454
- },
455
- getinstructtype(){
456
- this.instructtype=[]
457
- let load = new HttpResetClass()
458
- load.load('POST', 'rs/sql/singleTableParam', {
459
- data: {
460
- items:'f_instruct_type',
461
- tablename:'t_instruct',
462
- condition:'f_instruct_type is not null group by f_instruct_type'
463
- }
464
- },{warnMsg:null,resolveMsg:null}).then((res) => {
465
- this.instructtype.push({label: '全部', value: ''})
466
- res.data.forEach((item) => {
467
- this.instructtype.push({label: item.f_instruct_type, value: item.f_instruct_type})
468
- })
469
- })
470
-
471
- },
472
- getinstructtitle(){
473
- this.instructtype=[]
474
- let load = new HttpResetClass()
475
- load.load('POST', 'rs/sql/singleTableParam', {
476
- data: {
477
- items:'f_instruct_title',
478
- tablename:'t_instruct',
479
- condition:'f_instruct_title is not null group by f_instruct_title'
480
- }
481
- },{warnMsg:null,resolveMsg:null}).then((res) => {
482
- this.instructtitle.push({label: '全部', value: ''})
483
- res.data.forEach((item) => {
484
- this.instructtitle.push({label: item.f_instruct_title, value: item.f_instruct_title})
485
- })
486
- })
487
-
488
- },
489
- getinstructstate(){
490
- this.instructstate=[]
491
- let load = new HttpResetClass()
492
- load.load('POST', 'rs/sql/singleTableParam', {
493
- data: {
494
- items:'f_instruct_state',
495
- tablename:'t_instruct',
496
- condition:'f_instruct_state is not null group by f_instruct_state'
497
- }
498
- },{warnMsg:null,resolveMsg:null}).then((res) => {
499
- this.instructstate.push({label: '全部', value: ''})
500
- res.data.forEach((item) => {
501
- this.instructstate.push({label: item.f_instruct_state, value: item.f_instruct_state})
502
- })
503
- })
504
-
505
- },
506
- clearmsg () {
507
- this.$refs.paged.$refs.criteria.model = {}
508
- },
509
- clickshow () {
510
- this.searchshow = !this.searchshow
511
- },
512
- dealmsg (val) {
513
- val.model = this.model.model
514
- this.$emit('deal-msg', val)
515
- },
516
- async search (args) {
517
- // this.obj.resids = this.obj.resids.replace(/\./g, ''),
518
- args.condition = `${args.condition}`+this.orgcondition
519
- console.log(args.condition+"args.condition")
520
- this.condition = args.condition
521
- if( this.$refs.paged.$refs.criteria.model.f_start_date!=null && this.$refs.paged.$refs.criteria.model.f_start_date!=''){
522
- this.model.params.f_start_date = `'${this.$refs.paged.$refs.criteria.model.f_start_date}'`;
523
- this.f_start_date = `'${this.$refs.paged.$refs.criteria.model.f_start_date}'`;
524
- }else{
525
- this.model.params.f_start_date = '';
526
- this.f_start_date = '';
527
- }
528
- if( this.$refs.paged.$refs.criteria.model.f_end_date!=null && this.$refs.paged.$refs.criteria.model.f_end_date!=''){
529
- this.model.params.f_end_date = `'${this.$refs.paged.$refs.criteria.model.f_end_date}'`;
530
- this.f_end_date = `'${this.$refs.paged.$refs.criteria.model.f_end_date}'`;
531
- }else{
532
- this.model.params.f_end_date = "";
533
- this.f_end_date = "";
534
- }
535
- if(this.f_orgid_new == '' || this.f_orgid_new == null){
536
- this.model.params.f_orgid = `'${this.$login.f.orgid}'`;
537
- this.f_orgid = `${this.$login.f.orgid}`;
538
- //await this.$LoadParams.loadParam(this.$login.f.orgid)
539
- }else{
540
- this.model.params.f_orgid = `'${this.f_orgid_new}'`;
541
- this.f_orgid = `${this.f_orgid_new}`;
542
- //await this.$LoadParams.loadParam(this.f_orgid_new)
543
- }
544
- await this.model.search(args.condition, args.model)
545
- await this.initQueryParam();
546
- await this.$refs.paged.$refs.grid.InitializedData()
547
- await this.$refs.paged.$refs.grid.displayColumnSettings(undefined)
548
-
549
- },
550
-
551
- },
552
- computed: {
553
- userType () {
554
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
555
- },
556
- Gasproperties () {
557
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
558
- }
559
-
560
- }
561
- }
562
- </script>
563
- <style>
564
- .form-input-group label {
565
- text-align: right;
566
- width: auto;
567
- }
568
- .datapanel {
569
- color: #333;
570
- background-color: white;
571
- box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
572
- padding: 10px 30px 10px 30px;
573
- border-radius:15px;
574
- }
575
- </style>
1
+ <template >
2
+ <div class="flex-row">
3
+ <div @keyup.enter="search1" class="basic-main">
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria @condition-changed='$parent.search' partial='criteria' v-ref:criteria>
6
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
7
+ <div class="row">
8
+ <div class="col-sm-2">
9
+ <res-select-group :show-component="['company']" :initres="$parent.$parent.org" @re-res="$parent.$parent.getorg" style="width:60%"></res-select-group>
10
+ </div>
11
+ <div class="col-sm-2 form-group ">
12
+ <label class="font_normal_body">客户编号</label>
13
+ <input
14
+ class="input_search" condition="f_userinfo_code = '{}'"
15
+ placeholder='客户编号'
16
+ style="width:60%"
17
+ type="text"
18
+ v-model="model.f_userinfo_code">
19
+ </div>
20
+
21
+ <div class="col-sm-2 form-group">
22
+ <label class="font_normal_body">客户名称</label>
23
+ <input
24
+ class="input_search" condition="f_user_name like '%{}%'"
25
+ placeholder='客户名称'
26
+ style="width:60%"
27
+ type="text"
28
+ v-model="model.f_user_name"
29
+ >
30
+ </div>
31
+ <div class="col-sm-2 form-group">
32
+ <label class="font_normal_body">客户地址</label>
33
+ <input class="input_search"
34
+ condition="f_address like '%{}%'"
35
+ placeholder='客户地址'
36
+ style="width:60%"
37
+ type="text"
38
+ v-model="model.f_address"
39
+ >
40
+ </div>
41
+
42
+ <div style="float:right">
43
+ <button @click="search()" class="button_search" v-el:cba>查询</button>
44
+ <button @click="$parent.$parent.clearmsg" class="button_clear">清空</button>
45
+ <export-excel
46
+ :choose-col="true"
47
+ :data="{condition: $parent.$parent.condition,
48
+ f_orgid: $parent.$parent.f_orgid,
49
+ f_start_date: $parent.$parent.f_start_date,
50
+ f_end_date: $parent.$parent.f_end_date
51
+ }"
52
+ :field="$parent.$parent.getfield" sql-name="manage_getNewQueryInstruct" sqlurl="rs/logic/exportfile"
53
+ template-name='指令查看'></export-excel>
54
+ <div
55
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
56
+ @click="$parent.$parent.hidden()" class="button_spacing" style="float: right"></div>
57
+ </div>
58
+ </div>
59
+ <div class="row" v-show="$parent.$parent.criteriaShow">
60
+
61
+ <!-- <div class="col-sm-2">-->
62
+ <!-- <label class="font_normal_body">组织机构</label>-->
63
+ <!-- <res-select :initresid="$parent.$parent.org"-->
64
+ <!-- style="width:60%"-->
65
+ <!-- @res-select="$parent.$parent.getorg"-->
66
+ <!-- restype='organization'>-->
67
+ <!-- </res-select>-->
68
+
69
+ <!-- </div>-->
70
+
71
+ <!-- <div class="col-sm-2 form-group">-->
72
+ <!-- <label class="font_normal_body">客户类型</label>-->
73
+ <!-- <v-select style="width:60%" :value.sync="model.f_user_type" v-model="model.f_user_type"-->
74
+ <!-- placeholder='客户类型'-->
75
+ <!-- value-single="true"-->
76
+ <!-- :options='$parent.$parent.userType'-->
77
+ <!-- close-on-select-->
78
+ <!-- condition="f_user_type ='{}'"-->
79
+ <!-- ></v-select>-->
80
+ <!-- </div>-->
81
+ <div class="col-sm-2 form-group">
82
+ <label class="font_normal_body">用气性质</label>
83
+ <v-select style="width:60%" :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
84
+ placeholder='用气性质'
85
+ value-single="true"
86
+ :options='$parent.$parent.Gasproperties'
87
+ close-on-select
88
+ condition="f_gasproperties = '{}'"
89
+ ></v-select>
90
+ </div>
91
+ <div class="col-sm-2 form-group">
92
+ <label class="font_normal_body">表&ensp;&ensp;&ensp;&ensp;号</label>
93
+ <input
94
+ class="input_search" condition="u1.f_meternumber = '{}'"
95
+ placeholder='表号'
96
+ style="width:60%"
97
+ type="text"
98
+ v-model="model.f_meternumber">
99
+ </div>
100
+ <div class="col-sm-2 form-group">
101
+ <label class="font_normal_body">气表品牌</label>
102
+ <v-select
103
+ :options='$parent.$parent.meterbrand'
104
+
105
+ :value.sync="model.f_gasbrand"
106
+ close-on-select
107
+ condition="f_meter_brand='{}'"
108
+ placeholder='气表品牌'
109
+ style="width:60%"
110
+ v-model="model.f_gasbrand">
111
+ </v-select>
112
+ </div>
113
+ <div class="col-sm-2 form-group">
114
+ <label class="font_normal_body">指令类型</label>
115
+ <v-select :options='$parent.$parent.instructtype' :value.sync="model.f_instruct_type" close-on-select
116
+ condition="f_instruct_type='{}'"
117
+ placeholder='指令类型'
118
+ style="width:60%"
119
+ v-model="model.f_instruct_type"></v-select>
120
+ </div>
121
+ <div class="col-sm-2 form-group">
122
+ <label class="font_normal_body">执行状态</label>
123
+ <v-select :options='$parent.$parent.instructstate' :value.sync="model.f_instruct_state" close-on-select
124
+ condition="f_instruct_state='{}'"
125
+ placeholder='执行状态'
126
+ style="width:60%"
127
+ v-model="model.f_instruct_state"
128
+ ></v-select>
129
+ </div>
130
+
131
+ <div class="col-sm-2 form-group">
132
+ <label class="font_normal_body">指令时间</label>
133
+ <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_start_date"
134
+ condition="f_instruct_date >= '{}'"
135
+ placeholder="起始时间"
136
+ style="width:60%"
137
+ v-model="model.f_start_date"
138
+ ></datepicker>
139
+ </div>
140
+ <div class="col-sm-2 form-group">
141
+ <label class="font_normal_body">&emsp;&emsp;至&emsp;</label>
142
+ <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_end_date"
143
+ condition="f_instruct_date <= '{}'"
144
+ placeholder="结束时间"
145
+ style="width:60%"
146
+ v-model="model.f_end_date"
147
+ ></datepicker>
148
+ </div>
149
+ <div class="col-sm-2 form-group">
150
+ <label class="font_normal_body">指令标题</label>
151
+ <v-select :options='$parent.$parent.instructtitle' :value.sync="model.f_instruct_title" close-on-select
152
+ condition="f_instruct_title='{}'"
153
+ placeholder='指令标题'
154
+ style="width:60%"
155
+ v-model="model.f_instruct_title"></v-select>
156
+ </div>
157
+
158
+ <div class="col-sm-2 form-group">
159
+ <label class="font_normal_body">操&nbsp;作&nbsp;人</label>
160
+ <v-select :options='$parent.$parent.operators' :value.sync="model.f_operator" close-on-select
161
+ condition="f_operator='{}'"
162
+ placeholder='操作人'
163
+ style="width:60%"
164
+ v-model="model.f_operator"></v-select>
165
+ </div>
166
+ </div>
167
+ </div>
168
+ </criteria>
169
+ <data-grid :model="model" class="list_area table_sy" id="queryinstruct" partial='list' :modelval="$parent.$parent.modelval" v-ref:grid>
170
+ <template partial='head'>
171
+ <tr>
172
+ <th style="text-align:center">
173
+ <nobr>序号</nobr>
174
+ </th>
175
+ <th style="text-align:center">
176
+ <nobr>客户编号</nobr>
177
+ </th>
178
+ <th style="text-align:center">
179
+ <nobr>客户名称</nobr>
180
+ </th>
181
+ <th style="text-align:center">
182
+ <nobr>客户地址</nobr>
183
+ </th>
184
+ <th style="text-align:center">
185
+ <nobr>表号</nobr>
186
+ </th>
187
+ <th style="text-align:center">
188
+ <nobr>气表品牌</nobr>
189
+ </th>
190
+ <th style="text-align:center">
191
+ <nobr>指令类型</nobr>
192
+ </th>
193
+ <th style="text-align:center">
194
+ <nobr>指令标题</nobr>
195
+ </th>
196
+ <th style="text-align:center">
197
+ <nobr>执行状态</nobr>
198
+ </th>
199
+ <th style="text-align:center"><nobr>执行结果</nobr></th>
200
+ <th style="text-align:center"><nobr>指令生成人</nobr></th>
201
+ <th style="text-align:center"><nobr>指令生成时间</nobr></th>
202
+ <th style="text-align:center"><nobr>指令发送时间</nobr></th>
203
+ <th style="text-align:center"><nobr>上表时间</nobr></th>
204
+ <th style="text-align:center">
205
+ <nobr>充值金额</nobr>
206
+ </th>
207
+ <th style="text-align:center">
208
+ <nobr>操作内容</nobr>
209
+ </th>
210
+ <th style="text-align:center">
211
+ <nobr>操作原因</nobr>
212
+ </th>
213
+ <th style="text-align:center">
214
+ <nobr>操作人(记录)</nobr>
215
+ </th>
216
+ <th style="text-align:center">
217
+ <nobr>操作时间(记录)</nobr>
218
+ </th>
219
+ <th style="text-align:center">
220
+ <nobr>操作类型</nobr>
221
+ </th>
222
+ <th style="text-align:center">
223
+ <nobr>记录状态</nobr>
224
+ </th>
225
+ <th style="text-align:center">
226
+ <nobr>组织机构</nobr>
227
+ </th>
228
+ <th style="text-align:center;">
229
+ <nobr>指令内容</nobr>
230
+ </th>
231
+ <th style="text-align:center">
232
+ <nobr>指令详情</nobr>
233
+ </th>
234
+ </tr>
235
+ </template>
236
+ <template partial='body'>
237
+ <tr>
238
+ <td style="text-align:center">
239
+ <nobr>{{$index+1}}</nobr>
240
+ </td>
241
+ <td style="text-align:center">
242
+ <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
243
+ </td>
244
+ <td style="text-align:center">
245
+ <nobr>{{row.f_user_name}}</nobr>
246
+ </td>
247
+ <td style="text-align:center">
248
+ <nobr>{{row.f_address}}</nobr>
249
+ </td>
250
+ <td style="text-align:center">
251
+ <nobr>{{row.f_meternumber}}</nobr>
252
+ </td>
253
+ <td style="text-align:center">
254
+ <nobr>{{row.f_meter_brand}}</nobr>
255
+ </td>
256
+
257
+ <td style="text-align:center">
258
+ <nobr>{{row.f_instruct_type}}</nobr>
259
+ </td>
260
+ <td style="text-align:center">
261
+ <nobr>{{row.f_instruct_title}}</nobr>
262
+ </td>
263
+ <td style="text-align:center">
264
+ <nobr>{{row.f_instruct_state}}</nobr>
265
+ </td>
266
+ <td style="text-align:center">
267
+ <nobr>{{row.f_receive_state}}</nobr>
268
+ </td>
269
+ <td style="text-align:center">
270
+ <nobr>{{row.f_inputtor}}</nobr>
271
+ </td>
272
+ <td style="text-align:center">
273
+ <nobr>{{row.f_instruct_date}}</nobr>
274
+ </td>
275
+ <td style="text-align:center"><nobr>{{row.f_send_date}}</nobr></td>
276
+ <td style="text-align:center"><nobr>{{row.f_callback_date}}</nobr></td>
277
+ <td style="text-align:center">
278
+ <nobr>{{row.f_collection}}</nobr>
279
+ </td>
280
+ <td style="text-align:center">
281
+ <nobr>{{row.note}}</nobr>
282
+ </td>
283
+ <td style="text-align:center">
284
+ <nobr>{{row.f_info}}</nobr>
285
+ </td>
286
+ <td style="text-align:center">
287
+ <nobr>{{row.f_operator}}</nobr>
288
+ </td>
289
+ <td style="text-align:center">
290
+ <nobr>{{row.f_operate_date}}</nobr>
291
+ </td>
292
+ <td style="text-align:center">
293
+ <nobr>{{row.f_operate_type}}</nobr>
294
+ </td>
295
+ <td style="text-align:center">
296
+ <nobr>{{row.f_state}}</nobr>
297
+ </td>
298
+ <td style="text-align:center">
299
+ <nobr>{{row.f_orgname}}</nobr>
300
+ </td>
301
+ <td style="text-align:center;">
302
+ <nobr>{{row.f_instruct_content}}</nobr>
303
+ </td>
304
+ <td style="text-align:center">
305
+ <button style=" height: 28px;line-height: 16px;" class="button_search button_spacing width-60" @click.stop="$parent.$parent.$parent.instructDetail(row)">指令详情</button>
306
+ </td>
307
+ </tr>
308
+ </template>
309
+ </data-grid>
310
+ </criteria-paged>
311
+ </div>
312
+ <modal :show.sync="detailShow" v-if="detailShow" width="40%" style="width:auto;" v-ref:modal middle backdrop="false">
313
+ <article slot="modal-body">
314
+ <p class="text-center" style="font-size: 15px" v-html="f_instruct_content"></p>
315
+ </article>
316
+ <footer slot="modal-footer" class="modal-footer">
317
+ </footer>
318
+ </modal>
319
+ </div>
320
+ </template>
321
+ <script>
322
+ import {PagedList} from 'vue-client'
323
+ import co from 'co'
324
+ import * as Util from '../../../Util'
325
+ import getLodop from '../../../plugins/LodopFuncs'
326
+ import {HttpResetClass} from 'vue-client'
327
+ import plugins from '../../../plugins/GetLoginInfoService'
328
+
329
+ let readyGen = async function (self) {
330
+ await self.$MagLoadParams.loadParam()
331
+ await self.$MagGetSaleParam.initinputtor()
332
+ self.initQueryParam()
333
+ self.getinstructtype()
334
+ self.getinstructtitle()
335
+ self.getinstructstate()
336
+ await self.$getConfig(self, 'NewQueryInstruct')
337
+ console.log('指令查看config', self.config)
338
+ self.getfield = self.config.excelHeaders
339
+ self.getOperators(self.$login.f.orgid)
340
+ // self.reflash()
341
+ }
342
+ export default {
343
+ title: '指令查看',
344
+ data () {
345
+ return {
346
+ model: new PagedList('rs/sql/manage_getNewQueryInstruct', 50),
347
+ row: null,
348
+ isLoading: true,
349
+ searchshow: true,
350
+ criteriaShow:false,
351
+ Gasproperties:[],
352
+ meterbrand: [],
353
+ operators:[],
354
+ userType:[],
355
+ instructtype:[],
356
+ instructstate:[],
357
+ org:{
358
+ org:[this.$login.f.orgid],
359
+ dep:[],
360
+ user:[],
361
+ },
362
+ orgcondition:'',
363
+ show: false,
364
+ condition:'',
365
+ f_orgid:'',
366
+ f_start_date:'',
367
+ f_end_date:'',
368
+ getfield: {},
369
+ config: {
370
+ excelHeaders: {
371
+ 'f_userinfo_code': '客户编号','f_address': '客户地址','f_user_name': '客户姓名',
372
+ 'f_meternumber': '表号','f_meter_brand': '气表品牌','f_instruct_type': '指令类型',
373
+ 'f_instruct_state': '执行状态','f_receive_state': '执行结果','f_inputtor': '指令生成人','f_instruct_date': '指令时间',
374
+ 'note':'操作内容','f_info':'操作原因','f_operator':'操作人(记录)','f_operate_date':'操作时间(记录)','f_operate_type':'操作类型','f_state':'操作状态',
375
+ 'f_orgname': '组织机构'
376
+ }
377
+ },
378
+ instructtitle: [],
379
+ detailShow: false,
380
+ f_instruct_content: '',
381
+ modelval: [
382
+ '序号','客户编号','客户名称','客户地址','表号','气表品牌','指令类型','指令标题','执行状态','执行结果','指令生成人','指令生成时间',
383
+ '指令发送时间','上表时间','充值金额','操作内容','操作原因','操作人(记录)','操作时间(记录)','操作类型','记录状态','组织机构'
384
+ ]
385
+ }
386
+ },
387
+ ready () {
388
+ readyGen(this)
389
+ this.$refs.paged.$refs.criteria.model.f_start_date = Util.toStandardDateString() + ' 00:00:00'
390
+ this.$refs.paged.$refs.criteria.model.f_end_date = Util.toStandardDateString() + ' 23:59:59'
391
+ this.$refs.paged.$refs.grid.modelval = this.modelval
392
+ //this.$refs.paged.$refs.criteria.search()
393
+ },
394
+ methods: {
395
+ instructDetail(row){
396
+ if (row.f_instruct_content != '{}') {
397
+ let data = JSON.parse(row.f_instruct_content)
398
+ console.log('看下具体的指令详情===>',data)
399
+ let str = ''
400
+ if (data.hasOwnProperty("Data")) {
401
+ console.log('看下具体的指令详情2===>',data.Data)
402
+ console.log('看下具体的指令详情2===>',typeof data.Data)
403
+ for (let key in data.Data) {
404
+ str = str + key + ':' + data.Data[key] + '</br>'
405
+ }
406
+ }
407
+ for (let key in data) {
408
+ if (key != 'Data'){
409
+ str = str + key + ':' + data[key] + '</br>'
410
+ }
411
+ }
412
+ this.f_instruct_content = str
413
+ this.detailShow = true
414
+ }else{
415
+ this.$showMessage('当前指令没有内容!!!', ['confirm'])
416
+ }
417
+ },
418
+ hidden(){
419
+ this.criteriaShow = !this.criteriaShow
420
+ },
421
+ getorg(condition,obj) {
422
+ this.orgcondition = condition.replace('f_orgid','f_orgid')
423
+ this.orgcondition = this.orgcondition.replace('f_depid','f_depid')
424
+ this.orgname = obj.orgnames[0]
425
+ },
426
+ initQueryParam () {
427
+ let arr = []
428
+ this.$MagGetSaleParam.getGasbrand().forEach((item) => {
429
+ let temp = {}
430
+ if(item.value.f_meter_type==='物联网表'){
431
+ temp.label = item.label
432
+ temp.value = item.value.f_meter_brand
433
+ arr.push(temp )
434
+ }
435
+
436
+ })
437
+ this.meterbrand = [{label: '全部', value: ''}, ...arr]
438
+ },
439
+ //获取资源数据
440
+ getOperators(orgid) {
441
+ this.operators = []
442
+ this.$MagGetSaleParam.inputtors.forEach((res) => {
443
+ if(res.rolestr != null && res.rolestr!='' ){
444
+ if( res.f_orgid == orgid) {
445
+ let temp = {
446
+ label :res.name,
447
+ value:res.name,
448
+ }
449
+ this.operators.push(temp)
450
+ }
451
+ }
452
+ })
453
+ },
454
+ getinstructtype(){
455
+ this.instructtype=[]
456
+ let load = new HttpResetClass()
457
+ load.load('POST', 'rs/sql/singleTableParam', {
458
+ data: {
459
+ items:'f_instruct_type',
460
+ tablename:'t_instruct',
461
+ condition:'f_instruct_type is not null group by f_instruct_type'
462
+ }
463
+ },{warnMsg:null,resolveMsg:null}).then((res) => {
464
+ this.instructtype.push({label: '全部', value: ''})
465
+ res.data.forEach((item) => {
466
+ this.instructtype.push({label: item.f_instruct_type, value: item.f_instruct_type})
467
+ })
468
+ })
469
+
470
+ },
471
+ getinstructtitle(){
472
+ this.instructtype=[]
473
+ let load = new HttpResetClass()
474
+ load.load('POST', 'rs/sql/singleTableParam', {
475
+ data: {
476
+ items:'f_instruct_title',
477
+ tablename:'t_instruct',
478
+ condition:'f_instruct_title is not null group by f_instruct_title'
479
+ }
480
+ },{warnMsg:null,resolveMsg:null}).then((res) => {
481
+ this.instructtitle.push({label: '全部', value: ''})
482
+ res.data.forEach((item) => {
483
+ this.instructtitle.push({label: item.f_instruct_title, value: item.f_instruct_title})
484
+ })
485
+ })
486
+
487
+ },
488
+ getinstructstate(){
489
+ this.instructstate=[]
490
+ let load = new HttpResetClass()
491
+ load.load('POST', 'rs/sql/singleTableParam', {
492
+ data: {
493
+ items:'f_instruct_state',
494
+ tablename:'t_instruct',
495
+ condition:'f_instruct_state is not null group by f_instruct_state'
496
+ }
497
+ },{warnMsg:null,resolveMsg:null}).then((res) => {
498
+ this.instructstate.push({label: '全部', value: ''})
499
+ res.data.forEach((item) => {
500
+ this.instructstate.push({label: item.f_instruct_state, value: item.f_instruct_state})
501
+ })
502
+ })
503
+
504
+ },
505
+ clearmsg () {
506
+ this.$refs.paged.$refs.criteria.model = {}
507
+ },
508
+ clickshow () {
509
+ this.searchshow = !this.searchshow
510
+ },
511
+ dealmsg (val) {
512
+ val.model = this.model.model
513
+ this.$emit('deal-msg', val)
514
+ },
515
+ async search (args) {
516
+ // this.obj.resids = this.obj.resids.replace(/\./g, ''),
517
+ args.condition = `${args.condition}`+this.orgcondition
518
+ console.log(args.condition+"args.condition")
519
+ this.condition = args.condition
520
+ if( this.$refs.paged.$refs.criteria.model.f_start_date!=null && this.$refs.paged.$refs.criteria.model.f_start_date!=''){
521
+ this.model.params.f_start_date = `'${this.$refs.paged.$refs.criteria.model.f_start_date}'`;
522
+ this.f_start_date = `'${this.$refs.paged.$refs.criteria.model.f_start_date}'`;
523
+ }else{
524
+ this.model.params.f_start_date = '';
525
+ this.f_start_date = '';
526
+ }
527
+ if( this.$refs.paged.$refs.criteria.model.f_end_date!=null && this.$refs.paged.$refs.criteria.model.f_end_date!=''){
528
+ this.model.params.f_end_date = `'${this.$refs.paged.$refs.criteria.model.f_end_date}'`;
529
+ this.f_end_date = `'${this.$refs.paged.$refs.criteria.model.f_end_date}'`;
530
+ }else{
531
+ this.model.params.f_end_date = "";
532
+ this.f_end_date = "";
533
+ }
534
+ if(this.f_orgid_new == '' || this.f_orgid_new == null){
535
+ this.model.params.f_orgid = `'${this.$login.f.orgid}'`;
536
+ this.f_orgid = `${this.$login.f.orgid}`;
537
+ //await this.$LoadParams.loadParam(this.$login.f.orgid)
538
+ }else{
539
+ this.model.params.f_orgid = `'${this.f_orgid_new}'`;
540
+ this.f_orgid = `${this.f_orgid_new}`;
541
+ //await this.$LoadParams.loadParam(this.f_orgid_new)
542
+ }
543
+ await this.model.search(args.condition, args.model)
544
+ await this.initQueryParam();
545
+ await this.$refs.paged.$refs.grid.InitializedData()
546
+ await this.$refs.paged.$refs.grid.displayColumnSettings(undefined)
547
+
548
+ },
549
+
550
+ },
551
+ computed: {
552
+ userType () {
553
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
554
+ },
555
+ Gasproperties () {
556
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')]
557
+ }
558
+
559
+ }
560
+ }
561
+ </script>
562
+ <style>
563
+ .form-input-group label {
564
+ text-align: right;
565
+ width: auto;
566
+ }
567
+ .datapanel {
568
+ color: #333;
569
+ background-color: white;
570
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
571
+ padding: 10px 30px 10px 30px;
572
+ border-radius:15px;
573
+ }
574
+ </style>