apply-clients 5.0.35-ezhou-25-16 → 5.0.35-ezhou-25-17

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,805 +1,805 @@
1
- <template>
2
- <div class="d1">
3
- <div class="left col-sm-12">
4
- <criteria-paged :model="model" v-ref:cp>
5
- <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri style="padding: 20px;background-color: #f6f6f6;">
6
- <form novalidate class="" partial>
7
- <div class="col-sm-12">
8
- <div class="col-sm-2">
9
- <label class="col-sm-4 control-label">联&nbsp;&nbsp;系&nbsp;人</label>
10
- <div class="col-sm-8">
11
- <input type="text" class="form-control" placeholder='联系人' v-model="model.f_user_name"
12
- v-on:keyup.enter="search"
13
- condition="f_user_name like '{}%'">
14
- </div>
15
- </div>
16
- <div class="col-sm-2">
17
- <label class="col-sm-4 control-label">项目名称</label>
18
- <div class="col-sm-8">
19
- <input type="text" class="form-control" placeholder='项目名称' v-model="model.f_entry_name"
20
- v-on:keyup.enter="search"
21
- condition="f_entry_name like '{}%'">
22
- </div>
23
- </div>
24
- <div class="col-sm-2">
25
- <label class="col-sm-4 control-label">报建编号</label>
26
- <div class="col-sm-8">
27
- <input type="text" class="form-control" :options="$parent.$parent.fapplytype" placeholder='报建编号' v-model="model.f_apply_num"
28
- v-on:keyup.enter="search"
29
- condition="f_apply_num like '{}%'">
30
- </div>
31
- </div>
32
- <div class="col-sm-2">
33
- <label class="col-sm-4 control-label">用户地址</label>
34
- <div class="col-sm-8">
35
- <input type="text" class="form-control" placeholder='用户地址' v-model="model.f_address"
36
- v-on:keyup.enter="search"
37
- condition="f_address like '%{}%'">
38
- </div>
39
- </div>
40
- <div class="col-sm-3 " style="width:30%">
41
- <button class="btn btn-primary btn-sm width-80" type="button" @click="$parent.$parent.searchNow(),$parent.$parent.close()" style="margin-left:5%">
42
- <span class="glyphicon glyphicon-search"></span>{{$parent.$parent.button_name}}
43
- </button>
44
- <button class="btn-primary btn btn-sm" @click.prevent="$parent.$parent.clear()">清空</button>
45
- <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowonce"
46
- @click="$parent.$parent.addactive('报装申请')">
47
- <span class="glyphicon glyphicon-plus" ></span>报装申请
48
- </button>
49
- <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowonce"
50
- @click="$parent.$parent.showFile = !$parent.$parent.showFile">
51
- <span class="glyphicon glyphicon-plus" ></span>批量导入
52
- </button>
53
- <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowall"
54
- @click="$parent.$parent.addactive('集体报装申请')">
55
- <span class="glyphicon glyphicon-plus" ></span>集体报装申请
56
- </button>
57
- </div>
58
-
59
-
60
- </div>
61
- <div class="col-sm-12 " style="margin-top:5px">
62
- <div class="col-sm-2 form-input-group ">
63
- <label for="startDate" class="control-label" style="width:81px;">开始日期</label>
64
- <datepicker @change="$dispatch('setQueryCondition',model)" id="startDate" placeholder="开始日期"
65
- width='100%'
66
- v-model="model.startDate"
67
- :value.sync="model.startDate"
68
- :format="'yyyy-MM-dd HH:mm:ss'"
69
- :show-reset-button="true"
70
- condition="f_apply_date >= '{}'">
71
- </datepicker>
72
- </div>
73
-
74
- <div class="col-sm-2 ">
75
- <label for="startDate" class="col-sm-4 control-label">终止日期</label>
76
- <div class="col-sm-8">
77
- <datepicker @change="$dispatch('setQueryCondition',model)" id="endDate" placeholder="终止日期"
78
- style="display: block;"
79
- v-model="model.endDate"
80
- :value.sync="model.endDate"
81
- :format="'yyyy-MM-dd HH:mm:ss'"
82
- :show-reset-button="true"
83
- condition="f_apply_date <= '{}'">
84
- </datepicker>
85
- </div>
86
-
87
- </div>
88
- <div class="col-sm-2">
89
- <label class="col-sm-4 control-label">流程状态</label>
90
- <div class="col-sm-8">
91
- <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.alloptions"
92
- condition="defname = '{}'" placeholder='流程状态'
93
- v-model="model.defname" :value.sync="model.defname" close-on-select>
94
- </v-select>
95
- </div>
96
- </div>
97
- <div class="col-sm-2" >
98
- <label class="col-sm-4 control-label">报建类型</label>
99
- <div class="col-sm-8">
100
- <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'报装申请',value:'报装申请'},{label:'集体报建',value:'集体报建'}]"
101
- condition="f_apply_type = '{}'" placeholder='报建类型' :search="true"
102
- v-model="model.f_apply_type" :value.sync="model.f_apply_type" close-on-select>
103
- </v-select>
104
- </div>
105
- </div>
106
- <div class="col-sm-2" >
107
- <label class="col-sm-4 control-label">业务类型</label>
108
- <div class="col-sm-8">
109
- <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'新报装',value:'新报装'},{label:'改管',value:'改管'}]"
110
- condition="f_work_type = '{}'" placeholder='业务类型'
111
- v-model="model.f_work_type" :value.sync="model.f_work_type" close-on-select>
112
- </v-select>
113
- </div>
114
- </div>
115
-
116
- <!-- <div class="col-sm-2" style="float: left">
117
- <label class="col-sm-4 control-label">报装来源</label>
118
- <div class="col-sm-8">
119
- <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.alloption"
120
- condition="f_apply_source = '{}'" placeholder='报装来源'
121
- v-model="model.f_apply_source" :value.sync="model.f_apply_source" close-on-select>
122
- </v-select>
123
- </div>
124
- </div> -->
125
- <div class="col-sm-2" style="float: left">
126
- <label class="col-sm-4 control-label">报装来源</label>
127
- <div class="col-sm-8">
128
- <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.Submission"
129
- condition="f_apply_source = '{}'" placeholder='报装来源'
130
- v-model="model.f_apply_source" :value.sync="model.f_apply_source" close-on-select>
131
- </v-select>
132
- </div>
133
- </div>
134
-
135
-
136
- </div>
137
- <div class="col-sm-12 " style="margin-top:5px">
138
- <div class="col-sm-2">
139
- <label class="col-sm-4 control-label ">用户类型</label>
140
- <div class="col-sm-8">
141
- <v-select :options="$parent.$parent.usertype" placeholder='用户类型' condition="f_user_type like '{}'"
142
- :width="100" style="width:100%"
143
- v-model="model.f_user_type" :value.sync="model.f_user_type" close-on-select>
144
- </v-select>
145
- </div>
146
- </div>
147
- <div class="col-sm-2">
148
- <label class="col-sm-4 control-label ">流程状态</label>
149
- <div class="col-sm-8">
150
- <v-select :options="$parent.$parent.defnameStates" placeholder='流程状态' condition="{}"
151
- :width="100" style="width:100%"
152
- v-model="model.defnameState" :value.sync="model.defnameState" close-on-select>
153
- </v-select>
154
- </div>
155
- </div>
156
- </div>
157
-
158
-
159
- <!--<div class="col-sm-1">-->
160
- <!--<button class="btn btn-primary btn-sm" type="button" @click="$parent.$parent.modify()"><span-->
161
- <!--class="glyphicon glyphicon-plus"></span>改装登记-->
162
- <!--</button>-->
163
- <!--</div>-->
164
- <!--</div>-->
165
-
166
- </form>
167
- </criteria>
168
- <data-grid :model="model" partial='list' v-ref:grid class="data-grid" is-fixed='false' style="overflow-x:auto">
169
- <template partial='head'>
170
- <tr class="title">
171
- <th>
172
- <nobr>序号</nobr>
173
- </th>
174
- <th>
175
- <nobr>来源</nobr>
176
- </th>
177
- <th>
178
- <nobr>当前状态</nobr>
179
- </th>
180
- <th>
181
- <nobr>工程编号</nobr>
182
- </th>
183
- <th>
184
- <nobr>报建编号</nobr>
185
- </th>
186
- <th>
187
- <nobr>业务类型</nobr>
188
- </th>
189
- <th>
190
- <nobr>联系人</nobr>
191
- </th>
192
- <th>
193
- <nobr>项目名称</nobr>
194
- </th>
195
- <th v-if="!this.$login.f.f_fengongsi.includes('中燃')">
196
- <nobr>用户类型</nobr>
197
- </th>
198
- <th>
199
- <nobr>电话</nobr>
200
- </th>
201
- <th>
202
- <nobr>地址</nobr>
203
- </th>
204
- <th>
205
- <nobr>流程状态</nobr>
206
- </th>
207
- <th>
208
- <nobr>报建类型</nobr>
209
- </th>
210
- <th>
211
- <nobr>报建日期</nobr>
212
- </th>
213
- <th>
214
- <nobr>督办信息</nobr>
215
- </th>
216
- <th>
217
- <nobr >申请信息</nobr>
218
- </th>
219
- <th>
220
- <nobr>操作</nobr>
221
- </th>
222
- </tr>
223
- </template>
224
- <template partial='body'>
225
- <tr >
226
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
227
- <nobr><font>{{$index+1}}</font></nobr>
228
- </td>
229
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
230
- <nobr><font>{{row.f_apply_source}}</font></nobr>
231
- </td>
232
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
233
- <nobr><font>{{row.f_sub_state!='完工' ? '未完工' :'完工'}}</font></nobr>
234
- </td>
235
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
236
- <nobr><font>{{row.f_project_number}}</font></nobr>
237
- </td>
238
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
239
- <nobr><font>{{row.f_apply_num}}</font></nobr>
240
- </td>
241
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
242
- <nobr><font>{{row.f_work_type}}</font></nobr>
243
- </td>
244
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
245
- <nobr><font>{{row.f_user_name}}</font></nobr>
246
- </td>
247
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
248
- <nobr><font>{{row.f_entry_name}}</font></nobr>
249
- </td>
250
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
251
- <nobr><font>{{row.f_user_type}}</font></nobr>
252
- </td>
253
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
254
- <nobr><font>{{row.f_phone}}</font></nobr>
255
- </td>
256
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
257
- <nobr><font>{{row.f_address}}</font></nobr>
258
- </td>
259
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
260
- <nobr><font>{{row.defname}}</font></nobr>
261
- </td>
262
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
263
- <nobr><font>{{row.f_apply_type}}</font></nobr>
264
- </td>
265
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
266
- <nobr><font>{{row.f_apply_date}}</font></nobr>
267
- </td>
268
- <th >
269
- <nobr v-if="row.f_surpervise_type"><button class="btn btn-danger" @click="$parent.$parent.$parent.stopinfoshow($index)">查看督办信息</button></nobr>
270
- <nobr v-if="!row.f_surpervise_type" >无督办</nobr>
271
- </th>
272
- <th >
273
-
274
- <nobr v-if="row.f_check_state">用户已申请</nobr>
275
- <nobr v-if="!row.f_check_state" >无申请</nobr>
276
- </th>
277
- <td style="text-align: center;">
278
- <dropdown v-if="row.defname != '完工'">
279
- <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
280
- <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
281
- </button>
282
- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
283
- <li>
284
- <a href="#" @click="$parent.$parent.$parent.check(row)">{{row.defname}}</a>
285
- </li>
286
- </ul>
287
- </dropdown>
288
- </td>
289
- </tr>
290
- </template>
291
- </data-grid>
292
- </criteria-paged>
293
- </div>
294
- <modal :show.sync="showstopinfoflag" v-ref:modal backdrop="false">
295
- <header slot="modal-header" class="modal-header">
296
- <button type="button" class="close" @click="closestopinfo"><span>&times;</span></button>
297
- <h4 class="modal-title">督办信息</h4>
298
- </header>
299
- <article slot="modal-body" class="modal-body">
300
- <p >{{stopremarks}}</p>
301
- </article>
302
- <footer slot="modal-footer" class="modal-footer">
303
- </footer>
304
- </modal>
305
- <modal :show.sync="showFile" v-ref:modal backdrop="false">
306
- <header slot="modal-header" class="modal-header">
307
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
308
- <h4 class="modal-title">批量导入</h4>
309
- </header>
310
- <article slot="modal-body" class="modal-body">
311
- <div class="form-group">
312
- <file-upload class="my-file-uploader" :name="key+Math.random()"
313
- action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
314
- <a type="button" class="btn btn-info head-but"
315
- href="/apply/download/excel/报建批量导入.xlsx" download>模板下载</a>
316
- </div>
317
-
318
- </article>
319
- <footer slot="modal-footer" class="modal-footer"></footer>
320
- </modal>
321
- <modal :show.sync="showMessage" v-ref: modal backdrop="false">
322
- <header slot="modal-header" class="modal-header">
323
- <h4 class="modal-title"></h4>
324
- </header>
325
- <article slot="modal-body" class="modal-body">
326
- <div class="form-group">
327
- <p>
328
- {{ messageInfo }}
329
- </p>
330
- </div>
331
-
332
- </article>
333
- <footer slot="modal-footer" class="modal-footer">
334
- <div style="text-align: left">
335
- <button type="button" class="btn btn-primary" @click='goToSearch'>查看详情</button>
336
- </div>
337
- <div style="text-align: right">
338
- <button type="button" class="btn btn-primary" @click='closModal()'>确认</button>
339
- </div>
340
- </footer>
341
- </modal>
342
- </div>
343
- </template>
344
- <script>
345
- import * as Util from '../../Util'
346
- import Vue from 'vue'
347
- import {
348
- PagedList
349
- } from 'vue-client'
350
- import getNowDate from '../../getNowDate.js'
351
- import {HttpResetClass} from 'vue-client'
352
- export default {
353
- title: '勘探详情',
354
- data() {
355
- return {
356
- timer: null,
357
- timer1:null,
358
- remindTime:5,//超时提醒时间
359
- isOverNum:0,//报建是否提醒过
360
- model: new PagedList('rs/sql/checkuser', 20, {
361
- data: {
362
- id: this.$login.f.id,
363
- fengongsi: this.$login.f.f_fengongsi,
364
- f_product_id: 0
365
- }
366
- }),
367
- fapplytype: this.$appdata.getParam('用户类型'),
368
- applytype: this.$appdata.getParam('报建类型'),
369
- department: this.$appdata.getParam('受理部门'),
370
- derection: this.$appdata.getParam('方向'),
371
- containt: this.$appdata.getParam('工作内容'),
372
- condition: '',
373
- select: '',
374
- alloptions:[],
375
- showFile:false,
376
- alloption:[],
377
- button_name:"查询",
378
- showstopinfoflag:false,
379
- stopremarks:"",
380
- startFlowonce:true,
381
- startFlowall:true,
382
- usertype: this.$appdata.getParam('用户类型'),
383
- headers: "批量导入",
384
- key: "批量导入",
385
- showMessage: false,
386
- messageInfo: '',
387
- showMessage1: false,
388
- guoQiNum:0,
389
- defnameStates: [{label: '全部', value: ''}, {label: '已过期', value: 'datediff( minute, GETDATE(), act.deadLine )<= 0'}, {label: '未过期', value: '( datediff( minute, GETDATE(), act.deadLine )> 0 or act.deadLine is null)'}],
390
- Submission:[{label: '全部', value: ''},...this.$appdata.getParam('报装来源')],
391
-
392
- }
393
- },
394
- compiled(){
395
- console.log("开始判断")
396
- },
397
- async ready() {
398
- this.guoQisearch()
399
- this.eachFind();
400
- this.$refs.cp.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
401
- this.$refs.cp.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
402
- await this.getConfig()
403
- let str='报建语音提醒时间'
404
- this.$refs.cp.$refs.cri.search()
405
- str='超时提前提醒时间'
406
- this.loadSingleValue(str)
407
- let self = this
408
- //判断用户是否有权限
409
- this.checkUserOperator();
410
- },
411
- methods: {
412
- //清空 查询条件项
413
- clear(){
414
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
415
- this.$refs.cp.$refs.cri.model[key] = []
416
- })
417
- },
418
- checkUserOperator(){
419
- if(this.$login.r.find(value => value == '报装申请')){
420
- this.startFlowonce=true;
421
- }
422
- if(this.$login.r.find(value => value == '集体报装申请')){
423
- this.startFlowall=true;
424
- }
425
- },
426
- stopinfoshow(index){
427
- this.showstopinfoflag = true;
428
- let remakrs = this.model.rows[index].f_surpervise_info;
429
- console.log(JSON.stringify(remakrs))
430
- console.log(remakrs)
431
-
432
- this.stopremarks= remakrs;
433
- },
434
- closestopinfo(){
435
- this.showstopinfoflag = close;
436
- },
437
- getapplyName(str){
438
- console.log("开始获取所有名")
439
- console.log(JSON.stringify(str.activitys))
440
- let param = [];
441
- // let workflow = JSON.parse(str);
442
- param.push({label:"全部",value:""})
443
- str.activitys.forEach(function(item){
444
- let title = item.title;
445
- param.push({label:title,value:title});
446
- })
447
- this.alloptions = param;
448
- },
449
- generateUUID() {
450
- var d = new Date().getTime()
451
- var uuid = 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
452
- var r = (d + Math.random() * 16) % 16 | 0
453
- d = Math.floor(d / 16)
454
- return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
455
- })
456
- return uuid
457
- },
458
- searchNow(){
459
- if(this.button_name == "返回"){
460
- this.button_name ="查询";
461
- }
462
- this.$refs.cp.$refs.cri.search()
463
- this.eachFind()
464
- },
465
- async getConfig(){
466
- let http = new HttpResetClass()
467
- await http.load('POST','rs/logic/ApplyGetConfigs', {data:this.$login.f}, {resolveMsg: null, rejectMsg: null}
468
- ).then((res)=>{
469
- if(res.data.code && res.data.code == 200){
470
- Vue.workflow_vue = Vue.prototype.$workflow_vue = res.data.workflow_vue
471
- console.log("$workflow_vue===>"+JSON.stringify(this.$workflow_vue))
472
- this.getapplyName(this.$workflow_vue);
473
- }else{
474
- this.$showMessage('获取报建配置失败,原因:' + res.data.msg)
475
- return
476
- }
477
- })
478
-
479
- },
480
- async addactive(modify) {
481
- // 动态获取报装来源
482
- // let ces = [];
483
- // http.load('POST', 'rs/sql/findParameter').then((res) => {
484
- // console.log("这是报装来源:" + res.name)
485
- // res.forEach(function(res){
486
- // ces.push({label:res.name,value:res.name});
487
- // })
488
- // this.alloption = ces;
489
- // })
490
- this.button_name ="返回"
491
- var workflow_xmlfilename='鄂州报建流程'
492
- if(this.$login.f.filialenames === '迪泰天然气' && modify==='集体报装申请'){
493
- workflow_xmlfilename = '鄂州报建流程迪泰'
494
- }else{
495
- workflow_xmlfilename = '鄂州报建流程'
496
- }
497
- //await this.getConfig()
498
- this.$workflow_vue.start_activity = modify
499
- let http = new HttpResetClass()
500
- let res = await http.load('POST','rs/logic/ApplyGetProcessID',{data:{filename:workflow_xmlfilename,start_activity:this.$workflow_vue.start_activity}}, {resolveMsg: null, rejectMsg: '获取流程ID失败,请联系开发人员'})
501
- this.$refs.cp.pager = false
502
- debugger
503
- let val = {
504
- defname: this.$workflow_vue.start_activity,
505
- f_process_id: res.data.f_process_id,
506
- f_apply_date: Util.toStandardTimeString(),
507
- f_apply_num: this.generateUUID(),
508
- f_apply_operator_telephone: this.$login.f.f_fgsdianhua,
509
- f_product_id: res.data.f_product_id
510
- }
511
- // // 如果是改装,将modify装入val
512
- // if(modify){
513
- // modify.f_customer_type = '个人'
514
- // modify.f_apply_type = '改装登记'
515
- // modify.f_phone = modify.f_user_phone
516
- // let temp = modify.f_residential_area
517
- // modify.f_residential_area = modify.f_area
518
- // modify.f_area = temp
519
- // Object.assign(val,modify)
520
- // }
521
-
522
- console.log(112 + JSON.stringify(this.$login.f.f_apply_department))
523
- this.$dispatch('check', val)
524
- this.$dispatch('changeheight')
525
- this.$dispatch('addactive')
526
- },
527
- // 改装申请
528
- modify(){
529
- // 调出改装申请界面
530
- this.$parent.show = false
531
- }
532
- ,
533
- check(val) {
534
- this.button_name="返回"
535
- // if(val.defname.includes("派单")){
536
- // if(val.f_unaccounts_money && parseInt(val.f_unaccounts_money)!=0){
537
- // this.$showAlert('当前用户金额未结余!!!', 'warning', 3000)
538
- // this.button_name ="查询";
539
- // return;
540
- // }
541
- // }
542
- this.$dispatch('check', val)
543
- this.$dispatch('addactive')
544
- }
545
- ,
546
- close() {
547
- this.$dispatch('close')
548
- }
549
- ,
550
- compare(val) {
551
- val === '完工'
552
- console.log('完工', val)
553
- return false
554
- },
555
- // 获取数据
556
- loadSingleValue(str) {
557
- let http = new HttpResetClass()
558
- let data = {
559
- singlename: str,
560
- //预先提醒时间
561
-
562
- }
563
- http.load('POST', 'rs/sql/findsingle', {data: data}, {resolveMsg: null, rejectMsg: '获取语音提醒时间失败'}).then((res) => {
564
- console.log('-----------------进去之前-----------'+JSON.stringify(res))
565
- let flag1=false
566
- let flag2=false
567
- if (res.data.length==0){
568
- flag1=true
569
- console.log('没有单值'+flag1)
570
- flag2=false
571
- }else if (res.data[0].value==0) {
572
- flag2=true
573
- console.log('为0')
574
- flag1=false
575
- }else{
576
- if (str==='报建语音提醒时间'){
577
- this.remindTime = res.data[0].value
578
- }
579
- console.log('为'+res.data[0].value)
580
- flag1=false
581
- flag2=false
582
- }
583
-
584
- if (this.isOverNum==0){
585
- if (flag1){
586
- console.log('不启动定时器')
587
-
588
- }else if (flag2) {
589
- console.log('启动定时器out')
590
- this.setOut()
591
- }else{
592
- console.log('启动定时器timer和out')
593
- this.setTimer()
594
- this.setOut()
595
- }
596
- this.isOverNum++;
597
- } else{
598
- this.isOverNum=0;
599
- }
600
-
601
-
602
- },(res)=>{
603
- //响应错误回调
604
- console.log('响应错误')
605
- })
606
-
607
- },
608
- setTimer() {
609
- if(this.timer == null) {
610
- this.timer = setInterval( () => {
611
- console.log('开始定时...每过5秒执行一次')
612
- this.$refs.cp.$refs.cri.search()
613
- console.log('数据已刷新')
614
- this.eachFind()
615
- console.log('eachfind完毕');
616
- }, 60*1000*this.remindTime)
617
- }
618
- },
619
- setOut() {
620
- if(this.timer1 == null) {
621
- this.timer1 = setTimeout( () => {
622
- console.log('开始setTimeout')
623
- this.eachFind()
624
- console.log('setTimeout完毕');
625
- }, 1000)
626
- }
627
- },
628
- //语音提醒
629
- speckText(str) {
630
- var url= "http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=" + encodeURI(str);
631
- new Audio(url).play();
632
-
633
- },
634
- //查看多少过期任务
635
- async guoQisearch(){
636
- let http = new HttpResetClass()
637
- let data = {
638
- data: {
639
- id: this.$login.f.id,
640
- fengongsi: this.$login.f.f_fengongsi,
641
- f_product_id: 0
642
- },
643
- condition: `datediff( minute, GETDATE(), act.deadLine )<= 0`
644
- }
645
- await http.load('POST', 'rs/sql/checkuser?pageNo=1&pageSize=999999', {data: data}, {
646
- resolveMsg: null,
647
- rejectMsg: '获取语音提醒时间失败'
648
- }).then((res) => {
649
- this.guoQiNum = res.data.length
650
- console.log('guoQi:' + this.guoQiNum);
651
- })
652
- },
653
- eachFind() {
654
- let arr = this.$refs.cp.$refs.grid.model.rows
655
- let overNumString1 = ''
656
- let flagNum1 = 1
657
- let dbflag = 1
658
- let dbinfo = []
659
- let hourfals = 0
660
- let hourstr = ''
661
- let guoQi = 0
662
- let guoQiString = ''
663
- for (let val of arr) {
664
- if (val.f_surpervise_type) {
665
- dbflag = dbflag + 1
666
- dbinfo.push(val.f_user_name)
667
- }
668
- if (val.ishourover == '1') {
669
- hourfals += 1
670
- hourstr += hourfals + '条'
671
- }
672
- console.log(val.isbeforeover)
673
- if (val.isbeforeover === '预期提醒') {
674
- console.log('flagNUm:' + flagNum1);
675
- if (flagNum1 == 1) {
676
- overNumString1 = flagNum1 + '条'
677
- flagNum1 = flagNum1 + 1
678
- } else {
679
- overNumString1 = overNumString1 + '和第' + flagNum1 + '条'
680
- flagNum1 = flagNum1 + 1
681
- }
682
- }
683
- }
684
- if (hourfals != 0) {
685
- this.speckText('请注意:第:' + overNumString1 + '数据一小时后过期')
686
- this.$showMessage("请注意:第:" + overNumString1 + "数据一小时后过期")
687
- }
688
- if (!this.$login.f.guoQi) {
689
- guoQi = this.guoQiNum
690
- guoQiString = guoQi + '条'
691
- if (guoQi > 0) {
692
- this.$login.f.guoQi = true
693
- this.messageInfo = "请注意:" + guoQiString + "数据已经过期,本次登录只提醒一次"
694
- this.showMessage = true
695
- }
696
- // this.$showMessage("请注意:" + guoQiString + "数据已经过期,本次登录只提醒一次")
697
- }
698
- if (flagNum1 != 1) {
699
- console.log(overNumString1);
700
- this.speckText('请注意:第:' + overNumString1 + '数据即将过期')
701
- this.$showMessage("请注意:第:" + overNumString1 + "数据即将过期")
702
- }
703
- if (dbflag != 1) {
704
- this.speckText('请注意: 您有' + dbflag - 1 + '条数据被督办')
705
- this.$showMessage("用户:" + dbinfo.join(",") + "需要紧急处理!!")
706
- }
707
- console.log('语音播放完毕');
708
- },
709
- searchCondition (args) {
710
- if (this.showMessage1){
711
- args.condition = `datediff( minute, GETDATE(), act.deadLine )<= 0`
712
- this.showMessage1 = false
713
- }
714
-
715
- console.log("args.condition",args.condition)
716
- this.model.search(args.condition, args.model)
717
-
718
- console.log("当前数据",this.model)
719
- },
720
- search(){
721
- this.$dispatch('search')
722
- },
723
- goToSearch(){
724
- this.showMessage = false
725
- this.showMessage1 = true
726
- this.messageInfo = ''
727
- this.$refs.cp.$refs.cri.search()
728
- // this.searchCondition()
729
- },
730
- closModal() {
731
- this.showMessage = false
732
- this.showMessage1 = true
733
- this.messageInfo = ''
734
- },
735
- closeFile() {
736
- this.showFile = false
737
-
738
- // 将选的文件清空
739
- this.$refs.file.$el.querySelector('input').value = ''
740
-
741
- this.$dispatch('close')
742
- }
743
- },
744
- created: function() {
745
- clearInterval(this.timer)
746
- clearInterval(this.timer1)
747
- this.timer = null
748
- this.timer1 = null
749
- },
750
- beforeDestroy() {
751
- clearInterval(this.timer)
752
- clearInterval(this.timer1)
753
- this.timer = null
754
- this.timer1 = null
755
- },
756
- events: {
757
- async 'onFileUpload'(file, result) {
758
- let data = {
759
- filepath: result.f_downloadpath,
760
- user: this.$login.f
761
- }
762
- let res = await this.$resetpost(`rs/logic/importApply`, {data:data}, {resolveMsg: null, rejectMsg: '导入失败!!!', silent: true}, 0)
763
-
764
- this.closeFile()
765
- }
766
- },
767
- computed: {
768
- date() {
769
- return getNowDate()
770
- }
771
- ,
772
- selected() {
773
- return this.$refs.cp.$refs.grid.selected
774
- }
775
- }
776
- }
777
- </script>
778
- <style scoped>
779
- label {
780
- display: flex;
781
- justify-content:center;
782
- align-items:Center;
783
- padding-top: 8px;
784
- }
785
- tr.title {
786
- background-color: #6666ff;
787
- }
788
- td{
789
- text-align: center;
790
- }
791
- /* .active{
792
- color: Crimson;
793
- }
794
- .p{
795
- color: green;
796
- }*/
797
-
798
- .p1 {
799
- color: #dc0b12;
800
- font-weight:bold
801
- }
802
- .p {
803
- color: #ffaf4f;
804
- }
805
- </style>
1
+ <template>
2
+ <div class="d1">
3
+ <div class="left col-sm-12">
4
+ <criteria-paged :model="model" v-ref:cp>
5
+ <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri style="padding: 20px;background-color: #f6f6f6;">
6
+ <form novalidate class="" partial>
7
+ <div class="col-sm-12">
8
+ <div class="col-sm-2">
9
+ <label class="col-sm-4 control-label">联&nbsp;&nbsp;系&nbsp;人</label>
10
+ <div class="col-sm-8">
11
+ <input type="text" class="form-control" placeholder='联系人' v-model="model.f_user_name"
12
+ v-on:keyup.enter="search"
13
+ condition="f_user_name like '{}%'">
14
+ </div>
15
+ </div>
16
+ <div class="col-sm-2">
17
+ <label class="col-sm-4 control-label">项目名称</label>
18
+ <div class="col-sm-8">
19
+ <input type="text" class="form-control" placeholder='项目名称' v-model="model.f_entry_name"
20
+ v-on:keyup.enter="search"
21
+ condition="f_entry_name like '{}%'">
22
+ </div>
23
+ </div>
24
+ <div class="col-sm-2">
25
+ <label class="col-sm-4 control-label">报建编号</label>
26
+ <div class="col-sm-8">
27
+ <input type="text" class="form-control" :options="$parent.$parent.fapplytype" placeholder='报建编号' v-model="model.f_apply_num"
28
+ v-on:keyup.enter="search"
29
+ condition="f_apply_num like '{}%'">
30
+ </div>
31
+ </div>
32
+ <div class="col-sm-2">
33
+ <label class="col-sm-4 control-label">用户地址</label>
34
+ <div class="col-sm-8">
35
+ <input type="text" class="form-control" placeholder='用户地址' v-model="model.f_address"
36
+ v-on:keyup.enter="search"
37
+ condition="f_address like '%{}%'">
38
+ </div>
39
+ </div>
40
+ <div class="col-sm-3 " style="width:30%">
41
+ <button class="btn btn-primary btn-sm width-80" type="button" @click="$parent.$parent.searchNow(),$parent.$parent.close()" style="margin-left:5%">
42
+ <span class="glyphicon glyphicon-search"></span>{{$parent.$parent.button_name}}
43
+ </button>
44
+ <button class="btn-primary btn btn-sm" @click.prevent="$parent.$parent.clear()">清空</button>
45
+ <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowonce"
46
+ @click="$parent.$parent.addactive('报装申请')">
47
+ <span class="glyphicon glyphicon-plus" ></span>报装申请
48
+ </button>
49
+ <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowonce"
50
+ @click="$parent.$parent.showFile = !$parent.$parent.showFile">
51
+ <span class="glyphicon glyphicon-plus" ></span>批量导入
52
+ </button>
53
+ <button class="btn btn-primary btn-sm" type="button" v-show="$parent.$parent.startFlowall"
54
+ @click="$parent.$parent.addactive('集体报装申请')">
55
+ <span class="glyphicon glyphicon-plus" ></span>集体报装申请
56
+ </button>
57
+ </div>
58
+
59
+
60
+ </div>
61
+ <div class="col-sm-12 " style="margin-top:5px">
62
+ <div class="col-sm-2 form-input-group ">
63
+ <label for="startDate" class="control-label" style="width:81px;">开始日期</label>
64
+ <datepicker @change="$dispatch('setQueryCondition',model)" id="startDate" placeholder="开始日期"
65
+ width='100%'
66
+ v-model="model.startDate"
67
+ :value.sync="model.startDate"
68
+ :format="'yyyy-MM-dd HH:mm:ss'"
69
+ :show-reset-button="true"
70
+ condition="f_apply_date >= '{}'">
71
+ </datepicker>
72
+ </div>
73
+
74
+ <div class="col-sm-2 ">
75
+ <label for="startDate" class="col-sm-4 control-label">终止日期</label>
76
+ <div class="col-sm-8">
77
+ <datepicker @change="$dispatch('setQueryCondition',model)" id="endDate" placeholder="终止日期"
78
+ style="display: block;"
79
+ v-model="model.endDate"
80
+ :value.sync="model.endDate"
81
+ :format="'yyyy-MM-dd HH:mm:ss'"
82
+ :show-reset-button="true"
83
+ condition="f_apply_date <= '{}'">
84
+ </datepicker>
85
+ </div>
86
+
87
+ </div>
88
+ <div class="col-sm-2">
89
+ <label class="col-sm-4 control-label">流程状态</label>
90
+ <div class="col-sm-8">
91
+ <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.alloptions"
92
+ condition="defname = '{}'" placeholder='流程状态'
93
+ v-model="model.defname" :value.sync="model.defname" close-on-select>
94
+ </v-select>
95
+ </div>
96
+ </div>
97
+ <div class="col-sm-2" >
98
+ <label class="col-sm-4 control-label">报建类型</label>
99
+ <div class="col-sm-8">
100
+ <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'报装申请',value:'报装申请'},{label:'集体报建',value:'集体报建'}]"
101
+ condition="f_apply_type = '{}'" placeholder='报建类型' :search="true"
102
+ v-model="model.f_apply_type" :value.sync="model.f_apply_type" close-on-select>
103
+ </v-select>
104
+ </div>
105
+ </div>
106
+ <div class="col-sm-2" >
107
+ <label class="col-sm-4 control-label">业务类型</label>
108
+ <div class="col-sm-8">
109
+ <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="[{label:'全部',value:''},{label:'新报装',value:'新报装'},{label:'改管',value:'改管'}]"
110
+ condition="f_work_type = '{}'" placeholder='业务类型'
111
+ v-model="model.f_work_type" :value.sync="model.f_work_type" close-on-select>
112
+ </v-select>
113
+ </div>
114
+ </div>
115
+
116
+ <!-- <div class="col-sm-2" style="float: left">
117
+ <label class="col-sm-4 control-label">报装来源</label>
118
+ <div class="col-sm-8">
119
+ <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.alloption"
120
+ condition="f_apply_source = '{}'" placeholder='报装来源'
121
+ v-model="model.f_apply_source" :value.sync="model.f_apply_source" close-on-select>
122
+ </v-select>
123
+ </div>
124
+ </div> -->
125
+ <div class="col-sm-2" style="float: left">
126
+ <label class="col-sm-4 control-label">报装来源</label>
127
+ <div class="col-sm-8">
128
+ <v-select style="min-width: 100%;" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.Submission"
129
+ condition="f_apply_source = '{}'" placeholder='报装来源'
130
+ v-model="model.f_apply_source" :value.sync="model.f_apply_source" close-on-select>
131
+ </v-select>
132
+ </div>
133
+ </div>
134
+
135
+
136
+ </div>
137
+ <div class="col-sm-12 " style="margin-top:5px">
138
+ <div class="col-sm-2">
139
+ <label class="col-sm-4 control-label ">用户类型</label>
140
+ <div class="col-sm-8">
141
+ <v-select :options="$parent.$parent.usertype" placeholder='用户类型' condition="f_user_type like '{}'"
142
+ :width="100" style="width:100%"
143
+ v-model="model.f_user_type" :value.sync="model.f_user_type" close-on-select>
144
+ </v-select>
145
+ </div>
146
+ </div>
147
+ <div class="col-sm-2">
148
+ <label class="col-sm-4 control-label ">流程状态</label>
149
+ <div class="col-sm-8">
150
+ <v-select :options="$parent.$parent.defnameStates" placeholder='流程状态' condition="{}"
151
+ :width="100" style="width:100%"
152
+ v-model="model.defnameState" :value.sync="model.defnameState" close-on-select>
153
+ </v-select>
154
+ </div>
155
+ </div>
156
+ </div>
157
+
158
+
159
+ <!--<div class="col-sm-1">-->
160
+ <!--<button class="btn btn-primary btn-sm" type="button" @click="$parent.$parent.modify()"><span-->
161
+ <!--class="glyphicon glyphicon-plus"></span>改装登记-->
162
+ <!--</button>-->
163
+ <!--</div>-->
164
+ <!--</div>-->
165
+
166
+ </form>
167
+ </criteria>
168
+ <data-grid :model="model" partial='list' v-ref:grid class="data-grid" is-fixed='false' style="overflow-x:auto">
169
+ <template partial='head'>
170
+ <tr class="title">
171
+ <th>
172
+ <nobr>序号</nobr>
173
+ </th>
174
+ <th>
175
+ <nobr>来源</nobr>
176
+ </th>
177
+ <th>
178
+ <nobr>当前状态</nobr>
179
+ </th>
180
+ <th>
181
+ <nobr>工程编号</nobr>
182
+ </th>
183
+ <th>
184
+ <nobr>报建编号</nobr>
185
+ </th>
186
+ <th>
187
+ <nobr>业务类型</nobr>
188
+ </th>
189
+ <th>
190
+ <nobr>联系人</nobr>
191
+ </th>
192
+ <th>
193
+ <nobr>项目名称</nobr>
194
+ </th>
195
+ <th v-if="!this.$login.f.f_fengongsi.includes('中燃')">
196
+ <nobr>用户类型</nobr>
197
+ </th>
198
+ <th>
199
+ <nobr>电话</nobr>
200
+ </th>
201
+ <th>
202
+ <nobr>地址</nobr>
203
+ </th>
204
+ <th>
205
+ <nobr>流程状态</nobr>
206
+ </th>
207
+ <th>
208
+ <nobr>报建类型</nobr>
209
+ </th>
210
+ <th>
211
+ <nobr>报建日期</nobr>
212
+ </th>
213
+ <th>
214
+ <nobr>督办信息</nobr>
215
+ </th>
216
+ <th>
217
+ <nobr >申请信息</nobr>
218
+ </th>
219
+ <th>
220
+ <nobr>操作</nobr>
221
+ </th>
222
+ </tr>
223
+ </template>
224
+ <template partial='body'>
225
+ <tr >
226
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
227
+ <nobr><font>{{$index+1}}</font></nobr>
228
+ </td>
229
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
230
+ <nobr><font>{{row.f_apply_source}}</font></nobr>
231
+ </td>
232
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
233
+ <nobr><font>{{row.f_sub_state!='完工' ? '未完工' :'完工'}}</font></nobr>
234
+ </td>
235
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
236
+ <nobr><font>{{row.f_project_number}}</font></nobr>
237
+ </td>
238
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
239
+ <nobr><font>{{row.f_apply_num}}</font></nobr>
240
+ </td>
241
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
242
+ <nobr><font>{{row.f_work_type}}</font></nobr>
243
+ </td>
244
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
245
+ <nobr><font>{{row.f_user_name}}</font></nobr>
246
+ </td>
247
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
248
+ <nobr><font>{{row.f_entry_name}}</font></nobr>
249
+ </td>
250
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
251
+ <nobr><font>{{row.f_user_type}}</font></nobr>
252
+ </td>
253
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
254
+ <nobr><font>{{row.f_phone}}</font></nobr>
255
+ </td>
256
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
257
+ <nobr><font>{{row.f_address}}</font></nobr>
258
+ </td>
259
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
260
+ <nobr><font>{{row.defname}}</font></nobr>
261
+ </td>
262
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
263
+ <nobr><font>{{row.f_apply_type}}</font></nobr>
264
+ </td>
265
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
266
+ <nobr><font>{{row.f_apply_date}}</font></nobr>
267
+ </td>
268
+ <th >
269
+ <nobr v-if="row.f_surpervise_type"><button class="btn btn-danger" @click="$parent.$parent.$parent.stopinfoshow($index)">查看督办信息</button></nobr>
270
+ <nobr v-if="!row.f_surpervise_type" >无督办</nobr>
271
+ </th>
272
+ <th >
273
+
274
+ <nobr v-if="row.f_check_state">用户已申请</nobr>
275
+ <nobr v-if="!row.f_check_state" >无申请</nobr>
276
+ </th>
277
+ <td style="text-align: center;">
278
+ <dropdown v-if="row.defname != '完工'">
279
+ <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
280
+ <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
281
+ </button>
282
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
283
+ <li>
284
+ <a href="#" @click="$parent.$parent.$parent.check(row)">{{row.defname}}</a>
285
+ </li>
286
+ </ul>
287
+ </dropdown>
288
+ </td>
289
+ </tr>
290
+ </template>
291
+ </data-grid>
292
+ </criteria-paged>
293
+ </div>
294
+ <modal :show.sync="showstopinfoflag" v-ref:modal backdrop="false">
295
+ <header slot="modal-header" class="modal-header">
296
+ <button type="button" class="close" @click="closestopinfo"><span>&times;</span></button>
297
+ <h4 class="modal-title">督办信息</h4>
298
+ </header>
299
+ <article slot="modal-body" class="modal-body">
300
+ <p >{{stopremarks}}</p>
301
+ </article>
302
+ <footer slot="modal-footer" class="modal-footer">
303
+ </footer>
304
+ </modal>
305
+ <modal :show.sync="showFile" v-ref:modal backdrop="false">
306
+ <header slot="modal-header" class="modal-header">
307
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
308
+ <h4 class="modal-title">批量导入</h4>
309
+ </header>
310
+ <article slot="modal-body" class="modal-body">
311
+ <div class="form-group">
312
+ <file-upload class="my-file-uploader" :name="key+Math.random()"
313
+ action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
314
+ <a type="button" class="btn btn-info head-but"
315
+ href="/apply/download/excel/报建批量导入.xlsx" download>模板下载</a>
316
+ </div>
317
+
318
+ </article>
319
+ <footer slot="modal-footer" class="modal-footer"></footer>
320
+ </modal>
321
+ <modal :show.sync="showMessage" v-ref: modal backdrop="false">
322
+ <header slot="modal-header" class="modal-header">
323
+ <h4 class="modal-title"></h4>
324
+ </header>
325
+ <article slot="modal-body" class="modal-body">
326
+ <div class="form-group">
327
+ <p>
328
+ {{ messageInfo }}
329
+ </p>
330
+ </div>
331
+
332
+ </article>
333
+ <footer slot="modal-footer" class="modal-footer">
334
+ <div style="text-align: left">
335
+ <button type="button" class="btn btn-primary" @click='goToSearch'>查看详情</button>
336
+ </div>
337
+ <div style="text-align: right">
338
+ <button type="button" class="btn btn-primary" @click='closModal()'>确认</button>
339
+ </div>
340
+ </footer>
341
+ </modal>
342
+ </div>
343
+ </template>
344
+ <script>
345
+ import * as Util from '../../Util'
346
+ import Vue from 'vue'
347
+ import {
348
+ PagedList
349
+ } from 'vue-client'
350
+ import getNowDate from '../../getNowDate.js'
351
+ import {HttpResetClass} from 'vue-client'
352
+ export default {
353
+ title: '勘探详情',
354
+ data() {
355
+ return {
356
+ timer: null,
357
+ timer1:null,
358
+ remindTime:5,//超时提醒时间
359
+ isOverNum:0,//报建是否提醒过
360
+ model: new PagedList('rs/sql/checkuser', 20, {
361
+ data: {
362
+ id: this.$login.f.id,
363
+ fengongsi: this.$login.f.f_fengongsi,
364
+ f_product_id: 0
365
+ }
366
+ }),
367
+ fapplytype: this.$appdata.getParam('用户类型'),
368
+ applytype: this.$appdata.getParam('报建类型'),
369
+ department: this.$appdata.getParam('受理部门'),
370
+ derection: this.$appdata.getParam('方向'),
371
+ containt: this.$appdata.getParam('工作内容'),
372
+ condition: '',
373
+ select: '',
374
+ alloptions:[],
375
+ showFile:false,
376
+ alloption:[],
377
+ button_name:"查询",
378
+ showstopinfoflag:false,
379
+ stopremarks:"",
380
+ startFlowonce:true,
381
+ startFlowall:true,
382
+ usertype: this.$appdata.getParam('用户类型'),
383
+ headers: "批量导入",
384
+ key: "批量导入",
385
+ showMessage: false,
386
+ messageInfo: '',
387
+ showMessage1: false,
388
+ guoQiNum:0,
389
+ defnameStates: [{label: '全部', value: ''}, {label: '已过期', value: 'datediff( minute, GETDATE(), act.deadLine )<= 0'}, {label: '未过期', value: '( datediff( minute, GETDATE(), act.deadLine )> 0 or act.deadLine is null)'}],
390
+ Submission:[{label: '全部', value: ''},...this.$appdata.getParam('报装来源')],
391
+
392
+ }
393
+ },
394
+ compiled(){
395
+ console.log("开始判断")
396
+ },
397
+ async ready() {
398
+ this.guoQisearch()
399
+ this.eachFind();
400
+ this.$refs.cp.$refs.cri.model.startDate = Util.toStandardDateString() + ' 00:00:00'
401
+ this.$refs.cp.$refs.cri.model.endDate = Util.toStandardDateString() + ' 23:59:59'
402
+ await this.getConfig()
403
+ let str='报建语音提醒时间'
404
+ this.$refs.cp.$refs.cri.search()
405
+ str='超时提前提醒时间'
406
+ this.loadSingleValue(str)
407
+ let self = this
408
+ //判断用户是否有权限
409
+ this.checkUserOperator();
410
+ },
411
+ methods: {
412
+ //清空 查询条件项
413
+ clear(){
414
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
415
+ this.$refs.cp.$refs.cri.model[key] = []
416
+ })
417
+ },
418
+ checkUserOperator(){
419
+ if(this.$login.r.find(value => value == '报装申请')){
420
+ this.startFlowonce=true;
421
+ }
422
+ if(this.$login.r.find(value => value == '集体报装申请')){
423
+ this.startFlowall=true;
424
+ }
425
+ },
426
+ stopinfoshow(index){
427
+ this.showstopinfoflag = true;
428
+ let remakrs = this.model.rows[index].f_surpervise_info;
429
+ console.log(JSON.stringify(remakrs))
430
+ console.log(remakrs)
431
+
432
+ this.stopremarks= remakrs;
433
+ },
434
+ closestopinfo(){
435
+ this.showstopinfoflag = close;
436
+ },
437
+ getapplyName(str){
438
+ console.log("开始获取所有名")
439
+ console.log(JSON.stringify(str.activitys))
440
+ let param = [];
441
+ // let workflow = JSON.parse(str);
442
+ param.push({label:"全部",value:""})
443
+ str.activitys.forEach(function(item){
444
+ let title = item.title;
445
+ param.push({label:title,value:title});
446
+ })
447
+ this.alloptions = param;
448
+ },
449
+ generateUUID() {
450
+ var d = new Date().getTime()
451
+ var uuid = 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
452
+ var r = (d + Math.random() * 16) % 16 | 0
453
+ d = Math.floor(d / 16)
454
+ return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
455
+ })
456
+ return uuid
457
+ },
458
+ searchNow(){
459
+ if(this.button_name == "返回"){
460
+ this.button_name ="查询";
461
+ }
462
+ this.$refs.cp.$refs.cri.search()
463
+ this.eachFind()
464
+ },
465
+ async getConfig(){
466
+ let http = new HttpResetClass()
467
+ await http.load('POST','rs/logic/ApplyGetConfigs', {data:this.$login.f}, {resolveMsg: null, rejectMsg: null}
468
+ ).then((res)=>{
469
+ if(res.data.code && res.data.code == 200){
470
+ Vue.workflow_vue = Vue.prototype.$workflow_vue = res.data.workflow_vue
471
+ console.log("$workflow_vue===>"+JSON.stringify(this.$workflow_vue))
472
+ this.getapplyName(this.$workflow_vue);
473
+ }else{
474
+ this.$showMessage('获取报建配置失败,原因:' + res.data.msg)
475
+ return
476
+ }
477
+ })
478
+
479
+ },
480
+ async addactive(modify) {
481
+ // 动态获取报装来源
482
+ // let ces = [];
483
+ // http.load('POST', 'rs/sql/findParameter').then((res) => {
484
+ // console.log("这是报装来源:" + res.name)
485
+ // res.forEach(function(res){
486
+ // ces.push({label:res.name,value:res.name});
487
+ // })
488
+ // this.alloption = ces;
489
+ // })
490
+ this.button_name ="返回"
491
+ var workflow_xmlfilename='鄂州报建流程'
492
+ if(this.$login.f.filialenames === '迪泰天然气' && modify==='集体报装申请'){
493
+ workflow_xmlfilename = '鄂州报建流程迪泰'
494
+ }else{
495
+ workflow_xmlfilename = '鄂州报建流程'
496
+ }
497
+ //await this.getConfig()
498
+ this.$workflow_vue.start_activity = modify
499
+ let http = new HttpResetClass()
500
+ let res = await http.load('POST','rs/logic/ApplyGetProcessID',{data:{filename:workflow_xmlfilename,start_activity:this.$workflow_vue.start_activity}}, {resolveMsg: null, rejectMsg: '获取流程ID失败,请联系开发人员'})
501
+ this.$refs.cp.pager = false
502
+ debugger
503
+ let val = {
504
+ defname: this.$workflow_vue.start_activity,
505
+ f_process_id: res.data.f_process_id,
506
+ f_apply_date: Util.toStandardTimeString(),
507
+ f_apply_num: this.generateUUID(),
508
+ f_apply_operator_telephone: this.$login.f.f_fgsdianhua,
509
+ f_product_id: res.data.f_product_id
510
+ }
511
+ // // 如果是改装,将modify装入val
512
+ // if(modify){
513
+ // modify.f_customer_type = '个人'
514
+ // modify.f_apply_type = '改装登记'
515
+ // modify.f_phone = modify.f_user_phone
516
+ // let temp = modify.f_residential_area
517
+ // modify.f_residential_area = modify.f_area
518
+ // modify.f_area = temp
519
+ // Object.assign(val,modify)
520
+ // }
521
+
522
+ console.log(112 + JSON.stringify(this.$login.f.f_apply_department))
523
+ this.$dispatch('check', val)
524
+ this.$dispatch('changeheight')
525
+ this.$dispatch('addactive')
526
+ },
527
+ // 改装申请
528
+ modify(){
529
+ // 调出改装申请界面
530
+ this.$parent.show = false
531
+ }
532
+ ,
533
+ check(val) {
534
+ this.button_name="返回"
535
+ // if(val.defname.includes("派单")){
536
+ // if(val.f_unaccounts_money && parseInt(val.f_unaccounts_money)!=0){
537
+ // this.$showAlert('当前用户金额未结余!!!', 'warning', 3000)
538
+ // this.button_name ="查询";
539
+ // return;
540
+ // }
541
+ // }
542
+ this.$dispatch('check', val)
543
+ this.$dispatch('addactive')
544
+ }
545
+ ,
546
+ close() {
547
+ this.$dispatch('close')
548
+ }
549
+ ,
550
+ compare(val) {
551
+ val === '完工'
552
+ console.log('完工', val)
553
+ return false
554
+ },
555
+ // 获取数据
556
+ loadSingleValue(str) {
557
+ let http = new HttpResetClass()
558
+ let data = {
559
+ singlename: str,
560
+ //预先提醒时间
561
+
562
+ }
563
+ http.load('POST', 'rs/sql/findsingle', {data: data}, {resolveMsg: null, rejectMsg: '获取语音提醒时间失败'}).then((res) => {
564
+ console.log('-----------------进去之前-----------'+JSON.stringify(res))
565
+ let flag1=false
566
+ let flag2=false
567
+ if (res.data.length==0){
568
+ flag1=true
569
+ console.log('没有单值'+flag1)
570
+ flag2=false
571
+ }else if (res.data[0].value==0) {
572
+ flag2=true
573
+ console.log('为0')
574
+ flag1=false
575
+ }else{
576
+ if (str==='报建语音提醒时间'){
577
+ this.remindTime = res.data[0].value
578
+ }
579
+ console.log('为'+res.data[0].value)
580
+ flag1=false
581
+ flag2=false
582
+ }
583
+
584
+ if (this.isOverNum==0){
585
+ if (flag1){
586
+ console.log('不启动定时器')
587
+
588
+ }else if (flag2) {
589
+ console.log('启动定时器out')
590
+ this.setOut()
591
+ }else{
592
+ console.log('启动定时器timer和out')
593
+ this.setTimer()
594
+ this.setOut()
595
+ }
596
+ this.isOverNum++;
597
+ } else{
598
+ this.isOverNum=0;
599
+ }
600
+
601
+
602
+ },(res)=>{
603
+ //响应错误回调
604
+ console.log('响应错误')
605
+ })
606
+
607
+ },
608
+ setTimer() {
609
+ if(this.timer == null) {
610
+ this.timer = setInterval( () => {
611
+ console.log('开始定时...每过5秒执行一次')
612
+ this.$refs.cp.$refs.cri.search()
613
+ console.log('数据已刷新')
614
+ this.eachFind()
615
+ console.log('eachfind完毕');
616
+ }, 60*1000*this.remindTime)
617
+ }
618
+ },
619
+ setOut() {
620
+ if(this.timer1 == null) {
621
+ this.timer1 = setTimeout( () => {
622
+ console.log('开始setTimeout')
623
+ this.eachFind()
624
+ console.log('setTimeout完毕');
625
+ }, 1000)
626
+ }
627
+ },
628
+ //语音提醒
629
+ speckText(str) {
630
+ var url= "http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=" + encodeURI(str);
631
+ new Audio(url).play();
632
+
633
+ },
634
+ //查看多少过期任务
635
+ async guoQisearch(){
636
+ let http = new HttpResetClass()
637
+ let data = {
638
+ data: {
639
+ id: this.$login.f.id,
640
+ fengongsi: this.$login.f.f_fengongsi,
641
+ f_product_id: 0
642
+ },
643
+ condition: `datediff( minute, GETDATE(), act.deadLine )<= 0`
644
+ }
645
+ await http.load('POST', 'rs/sql/checkuser?pageNo=1&pageSize=999999', {data: data}, {
646
+ resolveMsg: null,
647
+ rejectMsg: '获取语音提醒时间失败'
648
+ }).then((res) => {
649
+ this.guoQiNum = res.data.length
650
+ console.log('guoQi:' + this.guoQiNum);
651
+ })
652
+ },
653
+ eachFind() {
654
+ let arr = this.$refs.cp.$refs.grid.model.rows
655
+ let overNumString1 = ''
656
+ let flagNum1 = 1
657
+ let dbflag = 1
658
+ let dbinfo = []
659
+ let hourfals = 0
660
+ let hourstr = ''
661
+ let guoQi = 0
662
+ let guoQiString = ''
663
+ for (let val of arr) {
664
+ if (val.f_surpervise_type) {
665
+ dbflag = dbflag + 1
666
+ dbinfo.push(val.f_user_name)
667
+ }
668
+ if (val.ishourover == '1') {
669
+ hourfals += 1
670
+ hourstr += hourfals + '条'
671
+ }
672
+ console.log(val.isbeforeover)
673
+ if (val.isbeforeover === '预期提醒') {
674
+ console.log('flagNUm:' + flagNum1);
675
+ if (flagNum1 == 1) {
676
+ overNumString1 = flagNum1 + '条'
677
+ flagNum1 = flagNum1 + 1
678
+ } else {
679
+ overNumString1 = overNumString1 + '和第' + flagNum1 + '条'
680
+ flagNum1 = flagNum1 + 1
681
+ }
682
+ }
683
+ }
684
+ if (hourfals != 0) {
685
+ this.speckText('请注意:第:' + overNumString1 + '数据一小时后过期')
686
+ this.$showMessage("请注意:第:" + overNumString1 + "数据一小时后过期")
687
+ }
688
+ if (!this.$login.f.guoQi) {
689
+ guoQi = this.guoQiNum
690
+ guoQiString = guoQi + '条'
691
+ if (guoQi > 0) {
692
+ this.$login.f.guoQi = true
693
+ this.messageInfo = "请注意:" + guoQiString + "数据已经过期,本次登录只提醒一次"
694
+ this.showMessage = true
695
+ }
696
+ // this.$showMessage("请注意:" + guoQiString + "数据已经过期,本次登录只提醒一次")
697
+ }
698
+ if (flagNum1 != 1) {
699
+ console.log(overNumString1);
700
+ this.speckText('请注意:第:' + overNumString1 + '数据即将过期')
701
+ this.$showMessage("请注意:第:" + overNumString1 + "数据即将过期")
702
+ }
703
+ if (dbflag != 1) {
704
+ this.speckText('请注意: 您有' + dbflag - 1 + '条数据被督办')
705
+ this.$showMessage("用户:" + dbinfo.join(",") + "需要紧急处理!!")
706
+ }
707
+ console.log('语音播放完毕');
708
+ },
709
+ searchCondition (args) {
710
+ if (this.showMessage1){
711
+ args.condition = `datediff( minute, GETDATE(), act.deadLine )<= 0`
712
+ this.showMessage1 = false
713
+ }
714
+
715
+ console.log("args.condition",args.condition)
716
+ this.model.search(args.condition, args.model)
717
+
718
+ console.log("当前数据",this.model)
719
+ },
720
+ search(){
721
+ this.$dispatch('search')
722
+ },
723
+ goToSearch(){
724
+ this.showMessage = false
725
+ this.showMessage1 = true
726
+ this.messageInfo = ''
727
+ this.$refs.cp.$refs.cri.search()
728
+ // this.searchCondition()
729
+ },
730
+ closModal() {
731
+ this.showMessage = false
732
+ this.showMessage1 = true
733
+ this.messageInfo = ''
734
+ },
735
+ closeFile() {
736
+ this.showFile = false
737
+
738
+ // 将选的文件清空
739
+ this.$refs.file.$el.querySelector('input').value = ''
740
+
741
+ this.$dispatch('close')
742
+ }
743
+ },
744
+ created: function() {
745
+ clearInterval(this.timer)
746
+ clearInterval(this.timer1)
747
+ this.timer = null
748
+ this.timer1 = null
749
+ },
750
+ beforeDestroy() {
751
+ clearInterval(this.timer)
752
+ clearInterval(this.timer1)
753
+ this.timer = null
754
+ this.timer1 = null
755
+ },
756
+ events: {
757
+ async 'onFileUpload'(file, result) {
758
+ let data = {
759
+ filepath: result.f_downloadpath,
760
+ user: this.$login.f
761
+ }
762
+ let res = await this.$resetpost(`rs/logic/importApply`, {data:data}, {resolveMsg: null, rejectMsg: '导入失败!!!', silent: true}, 0)
763
+
764
+ this.closeFile()
765
+ }
766
+ },
767
+ computed: {
768
+ date() {
769
+ return getNowDate()
770
+ }
771
+ ,
772
+ selected() {
773
+ return this.$refs.cp.$refs.grid.selected
774
+ }
775
+ }
776
+ }
777
+ </script>
778
+ <style scoped>
779
+ label {
780
+ display: flex;
781
+ justify-content:center;
782
+ align-items:Center;
783
+ padding-top: 8px;
784
+ }
785
+ tr.title {
786
+ background-color: #6666ff;
787
+ }
788
+ td{
789
+ text-align: center;
790
+ }
791
+ /* .active{
792
+ color: Crimson;
793
+ }
794
+ .p{
795
+ color: green;
796
+ }*/
797
+
798
+ .p1 {
799
+ color: #dc0b12;
800
+ font-weight:bold
801
+ }
802
+ .p {
803
+ color: #ffaf4f;
804
+ }
805
+ </style>