apply-clients 3.0.5-21 → 3.0.5-23

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,592 +1,592 @@
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='search' v-ref:cri style="padding: 20px;background-color: #f6f6f6;">
6
- <form novalidate class="" partial>
7
- <div class="col-sm-12">
8
- <div class="form-group col-sm-4">
9
- <label class=" col-sm-6" style="padding-top: 8px">联系人/项目名称/用户名称:</label>
10
- <div class="col-sm-6">
11
- <input type="text" class="form-control" v-model="model.f_user_name"
12
- condition=" (f_user_name like '%{}%' or f_entry_name like '%{}%' or f_company_name like '%{}%') " placeholder='三选一输入'>
13
- </div>
14
- </div>
15
- <div class="col-sm-1">
16
- <!--<label class="col-sm-6">合同编号</label>-->
17
- <div class="col-sm-12">
18
- <input type="text" class="form-control" placeholder='合同编号' v-model="model.f_contract_number"
19
- v-on:keyup.enter="search"
20
- condition="f_contract_number like '%{}%'">
21
- </div>
22
- </div>
23
- <div class="col-sm-1">
24
- <!--<label class="col-sm-6">用户地址</label>-->
25
- <div class="col-sm-12">
26
- <input type="text" class="form-control" placeholder='用户地址' v-model="model.f_address"
27
- v-on:keyup.enter="search"
28
- condition="f_address like '%{}%'">
29
- </div>
30
- </div>
31
- <div class="col-sm-1">
32
- <!--<label class="col-sm-6"> 报建类型:</label>-->
33
- <div class="col-sm-12" v-if="!this.$login.f.f_fengongsi.includes('中燃')">
34
- <v-select :width ="'100%'" style="width: 100%" :options="$parent.$parent.applytype" placeholder='报建类型' condition="f_apply_type like '%{}%'"
35
- v-model="model.f_apply_type" :value.sync="model.f_apply_type" close-on-select>
36
- </v-select>
37
- </div>
38
- </div>
39
- <div class="col-sm-2">
40
- <!--<label class="col-sm-6">办理环节:</label>-->
41
- <div class="col-sm-12">
42
- <v-select :width ="'90%'" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.defnames"
43
- condition="defname = '{}'" placeholder='办理环节'
44
- v-model="model.defname" :value.sync="model.defname" close-on-select>
45
- </v-select>
46
- </div>
47
- </div>
48
- <div class="col-sm-1">
49
- <input type="text" class="form-control" placeholder='经办人' v-model="model.f_survey_name"
50
- v-on:keyup.enter="search"
51
- condition=" (f_apply_kefu_employee like '%{}%' or f_survey_name like '%{}%') ">
52
- </div>
53
- </div>
54
- <div class="col-sm-12">
55
- <div class="col-sm-offset-9">
56
- <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(1)">
57
- <span class="glyphicon glyphicon-plus" ></span>散户报装
58
- </button>
59
- <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(2)">
60
- <span class="glyphicon glyphicon-plus" ></span>民用报装
61
- </button>
62
- <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(3)">
63
- <span class="glyphicon glyphicon-plus" ></span>工业报装
64
- </button>
65
- <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(4)">
66
- <span class="glyphicon glyphicon-plus" ></span>商业报装
67
- </button>
68
- <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(5)">
69
- <span class="glyphicon glyphicon-plus" ></span>管道移改
70
- </button>
71
- <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(6)">
72
- <span class="glyphicon glyphicon-plus" ></span>中压管线
73
- </button>
74
- <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(7)">
75
- <span class="glyphicon glyphicon-plus" ></span>企业报装
76
- </button>
77
- <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.searchNow(),$parent.$parent.close()">
78
- <span class="glyphicon glyphicon-search"></span>查询
79
- </button>
80
- <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.close()">
81
- <span class="glyphicon glyphicon-repeat"></span>返回
82
- </button>
83
- </div>
84
- </div>
85
- </form>
86
- </criteria>
87
- <data-grid :model="model" partial='list' v-ref:grid class="data-grid" is-fixed='false' style="overflow-x:auto">
88
- <template partial='head'>
89
- <tr class="title">
90
- <th>
91
- <nobr>序号</nobr>
92
- </th>
93
- <th></th>
94
-
95
- <th>
96
- <nobr>操作</nobr>
97
- </th>
98
-
99
- <th>
100
- <nobr>当前状态</nobr>
101
- </th>
102
- <th><nobr>联系人/项目名称/用户名称</nobr></th>
103
- <th>
104
- <nobr>合同编号</nobr>
105
- </th>
106
- <th>
107
- <nobr>流程状态</nobr>
108
- </th>
109
- <th v-if="!this.$login.f.f_fengongsi.includes('中燃')">
110
- <nobr>用户类型</nobr>
111
- </th>
112
- <th>
113
- <nobr>电话</nobr>
114
- </th>
115
- <th style="width: 250px">
116
- <nobr>地址</nobr>
117
- </th>
118
- <th>
119
- <nobr>报建类型</nobr>
120
- </th>
121
- <th>
122
- <nobr>预约来源</nobr>
123
- </th>
124
- <th>
125
- <nobr>报建日期</nobr>
126
- </th>
127
- </tr>
128
- </template>
129
- <template partial='body'>
130
- <tr >
131
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
132
- <nobr><font>{{$index+1}}</font></nobr>
133
- </td>
134
- <td></td>
135
-
136
- <td style="text-align: center;">
137
- <dropdown v-if="row.defname != '完工'">
138
- <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
139
- <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
140
- </button>
141
- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
142
- <li>
143
- <a href="#" @click="$parent.$parent.$parent.check(row)">{{row.defname}}</a>
144
- </li>
145
- </ul>
146
- </dropdown>
147
- </td>
148
-
149
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
150
- <nobr><font>{{row.f_sub_state}}</font></nobr>
151
- </td>
152
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
153
- <nobr><font>{{row.f_user_name}}/{{row.f_entry_name}}/{{row.f_company_name}}</font></nobr>
154
- </td>
155
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
156
- <nobr><font>{{row.f_contract_number}}</font></nobr>
157
- </td>
158
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
159
- <nobr><font>{{row.defname}}</font></nobr>
160
- </td>
161
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
162
- <nobr><font>{{row.f_user_type}}</font></nobr>
163
- </td>
164
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
165
- <nobr><font>{{row.f_phone}}</font></nobr>
166
- </td>
167
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="width: 250px; white-space: normal;">
168
- <font>{{row.f_address}}</font>
169
- </td>
170
- <td style="text-align: center;">
171
- <nobr><font>{{$parent.$parent.$parent.getApplyType(row.f_user_type,row.f_apply_type)}}</font></nobr>
172
- </td>
173
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
174
- <nobr><font>{{row.f_order_source}}</font></nobr>
175
- </td>
176
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
177
- <nobr><font>{{row.f_apply_date}}</font></nobr>
178
- </td>
179
- </tr>
180
- </template>
181
- </data-grid>
182
- </criteria-paged>
183
- </div>
184
- </div>
185
- </template>
186
- <script>
187
- import * as Util from '../../Util'
188
- import {
189
- PagedList
190
- } from 'vue-client'
191
- import getNowDate from '../../getNowDate.js'
192
- import {HttpResetClass} from 'vue-client'
193
- import Vue from "vue";
194
- export default {
195
- title: '勘探详情',
196
- data() {
197
- return {
198
- // applytype: [{label:"全部",value:''},...this.$appdata.getParam('报建类型')],
199
- applytype: [{label:"全部",value:''}],
200
- timer: null,
201
- timer1:null,
202
- remindTime:5,//超时提醒时间
203
- isOverNum:0,//报建是否提醒过
204
- defnames:[],
205
- model: new PagedList('rs/sql/checkuser', 20, {
206
- data: {
207
- id: this.$login.f.id,
208
- fengongsi: this.$login.f.f_fengongsi,
209
- f_filialeid: this.$login.f.f_orgids
210
- }
211
- }),
212
- condition: '',
213
- select: '',
214
- urlname: '',
215
- workflow_name:['',''],
216
- xmlname: '',
217
- startname: '客户申请',
218
- f_apply_type: ''
219
- }
220
- },
221
- ready() {
222
- console.log("--------------进入ready---------------")
223
- let str='报建语音提醒时间'
224
- this.$refs.cp.$refs.cri.search()
225
- str='超时提前提醒时间'
226
- this.loadSingleValue(str)
227
- let http = new HttpResetClass()
228
- console.log("--------------进入load---------------")
229
- http.load('POST', 'rs/sql/getDefnamesForActivityins', {data:{}}, {
230
- resolveMsg: null,
231
- rejectMsg: null
232
- }).then((res)=>{
233
- // 先获取所有流程环节
234
- this.defnames = [{label: '全部', value: ''}]
235
- for(let i=0;i<res.data.length;i++){
236
- this.defnames.push({label:res.data[i].defname,value:res.data[i].defname})
237
- }
238
- })
239
- let self = this
240
- console.log("--------------ready结束---------------")
241
- },
242
- methods: {
243
- getApplyType(userType,applyType){
244
- if(userType=='民用'&&applyType=='民用报建'){
245
- return '个人报建'
246
- }else if(userType=='民用'&&applyType=='微信对接'){
247
- return '个人报建'
248
- }else if(userType=='非民用'&&applyType=='微信对接'){
249
- return '企业报建'
250
- }else if(userType=='非民用'&&applyType=='企业报建'){
251
- return '企业报建'
252
- }else{
253
- return applyType
254
- }
255
- },
256
- generateUUID() {
257
- console.log("--------------进入generateUUID---------------")
258
- var d = new Date().getTime()
259
- var uuid = 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
260
- var r = (d + Math.random() * 16) % 16 | 0
261
- d = Math.floor(d / 16)
262
- return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
263
- })
264
- return uuid
265
- },
266
- searchNow(){
267
- console.log("--------------进入searchNow---------------")
268
- this.$refs.cp.$refs.cri.search()
269
- this.eachFind()
270
- },
271
- loadName(){
272
- //获取庭院楼盘工程json
273
- console.log("--------------进入json获取---------------")
274
- let http = new HttpResetClass()
275
- console.log("--------------开始加载load---------------")
276
- let data = {
277
- data:{...this.$login.f,parent:{},functions:[]},
278
- workname: this.urlname
279
- }
280
- console.log("获取流程信息:" + JSON.stringify(data))
281
- http.load('POST','rs/logic/ApplyGetConfigs', {data: data}, {resolveMsg: null, rejectMsg: null}
282
- ).then((res)=>{
283
-
284
- if(res.data.code && res.data.code == 200){
285
- Vue.workflow_vue = Vue.prototype.$workflow_vue = res.data.workflow_vue
286
-
287
- // console.log("workflow_vue有没有值:"+JSON.stringify(this.workflow_vue))
288
- if(res.data.msg){
289
- console.log('获取配置文件信息:',res.data.msg)
290
- }
291
- }else{
292
- this.$showMessage('获取报建配置失败,原因:' + res.data.msg)
293
- return
294
- }
295
- })
296
- console.log("Vue.$workflow_vue:"+JSON.stringify(this.$workflow_vue))
297
- console.log("--------------结束获取---------------")
298
-
299
- },
300
- async addactive(modify) {
301
- console.log("-------------modify:"+modify)
302
- if (modify == '1'){
303
- console.log("进来了没有--------------")
304
- this.urlname = "散户报建流程"
305
- this.xmlname = "散户报建流程"
306
- this.f_apply_type = '散户报建'
307
- this.startname = '客户申请'
308
- console.log("获取部门:" + this.$login.f.f_parentname)
309
- // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
310
- // this.$showMessage("只能由客户服务部和市场部发起报建申请")
311
- // return
312
- // }
313
- this.loadName()
314
- }
315
- if (modify == '2'){
316
- console.log("进来了没有--------------")
317
- this.urlname = "民用报建流程"
318
- this.xmlname = "民用报建流程"
319
- this.f_apply_type = '民用报建'
320
- this.startname = '客户申请'
321
- // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
322
- // this.$showMessage("只能由客户服务部和市场部发起报建申请")
323
- // return
324
- // }
325
- this.loadName()
326
- }
327
- if (modify == '3' || modify == '4'){
328
- console.log("进来了没有--------------")
329
- this.urlname = "工商业报建流程"
330
- this.xmlname = "工商业报建流程"
331
- // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
332
- // this.$showMessage("只能由客户服务部和市场部发起报建申请")
333
- // return
334
- // }
335
- if (modify == '3') {
336
- this.f_apply_type = '工业报建'
337
- }
338
- if (modify == '4') {
339
- this.f_apply_type = '商业报建'
340
- }
341
- this.startname = '客户申请'
342
- this.loadName()
343
- }
344
- if (modify == '5'){
345
- console.log("进来了没有--------------")
346
- this.urlname = "管道移改报建流程"
347
- this.xmlname = "管道移改报建流程"
348
- this.f_apply_type = '管道移改'
349
- this.startname = '客户申请'
350
- // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
351
- // this.$showMessage("只能由客户服务部和市场部发起报建申请")
352
- // return
353
- // }
354
- this.loadName()
355
- }
356
- if (modify == '6'){
357
- console.log("进来了没有--------------")
358
- this.urlname = "中压管线报建流程"
359
- this.xmlname = "中压管线报建流程"
360
- this.f_apply_type = '中压管线'
361
- this.startname = '申请部门'
362
- this.loadName()
363
- }
364
- if (modify == '7'){
365
- console.log("进企业报建--------------")
366
- this.urlname = "企业报建流程"
367
- this.xmlname = "企业报建流程"
368
- this.f_apply_type = '企业报建'
369
- this.startname = '客户申请'
370
- // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
371
- // this.$showMessage("只能由客户服务部和市场部发起报建申请")
372
- // return
373
- // }
374
- this.loadName()
375
- }
376
- // let workflowXml_name= this.workflow_name
377
- // console.log("$workflow_vue"+this.$workflow_vue.workflow_xmlfilename)
378
- console.log("--------------进入addactive---------------")
379
- let http = new HttpResetClass()
380
- let res = await http.load('POST','rs/logic/ApplyGetProcessID',{data:{filename:this.xmlname,start_activity:this.startname}}, {resolveMsg: null, rejectMsg: '获取流程ID失败,请联系开发人员'})
381
- this.$refs.cp.pager = false
382
- let val = {
383
- defname: this.startname,
384
- f_process_id: res.data.f_process_id,
385
- f_apply_date: Util.toStandardTimeString(),
386
- f_apply_num: this.generateUUID(),
387
- f_apply_operator_telephone: this.$login.f.f_fgsdianhua,
388
- f_apply_type: this.f_apply_type
389
- }
390
- // 如果是改装,将modify装入val
391
- // if(modify){
392
- // modify.f_customer_type = '个人'
393
- // modify.f_apply_type = '改装登记'
394
- // modify.f_phone = modify.f_user_phone
395
- // let temp = modify.f_residential_area
396
- // modify.f_residential_area = modify.f_area
397
- // modify.f_area = temp
398
- // Object.assign(val,modify)
399
- // }
400
-
401
- console.log(112 + JSON.stringify(this.$login.f.f_apply_department))
402
- this.$dispatch('check', val)
403
- this.$dispatch('changeheight')
404
- this.$dispatch('addactive')
405
- },
406
- // 改装申请
407
- modify(){
408
- console.log("--------------进入modify---------------")
409
- // 调出改装申请界面
410
- this.$parent.show = false
411
- }
412
- ,
413
- check(val) {
414
- console.log("--------------进入check---------------")
415
- this.$dispatch('check', val)
416
- this.$dispatch('addactive')
417
- }
418
- ,
419
- close() {
420
- console.log("--------------进入close---------------")
421
- this.$dispatch('close')
422
- }
423
- ,
424
- compare(val) {
425
- console.log("--------------进入compare---------------")
426
- val === '完工'
427
- console.log('完工', val)
428
- return false
429
- },
430
-
431
- // 获取数据
432
- loadSingleValue(str) {
433
- console.log("--------------进入loadSingleValue---------------")
434
- let http = new HttpResetClass()
435
- let data = {
436
- singlename: str,
437
- //预先提醒时间
438
-
439
- }
440
- http.load('POST', 'rs/sql/findsingle', {data: data}, {resolveMsg: null, rejectMsg: '获取语音提醒时间失败'}).then((res) => {
441
- console.log('-----------------进去之前-----------'+JSON.stringify(res))
442
- let flag1=false
443
- let flag2=false
444
- if (res.data.length==0){
445
- flag1=true
446
- console.log('没有单值'+flag1)
447
- flag2=false
448
- }else if (res.data[0].value==0) {
449
- flag2=true
450
- console.log('为0')
451
- flag1=false
452
- }else{
453
- if (str==='报建语音提醒时间'){
454
- this.remindTime = res.data[0].value
455
- }
456
- console.log('为'+res.data[0].value)
457
- flag1=false
458
- flag2=false
459
- }
460
-
461
- if (this.isOverNum==0){
462
- if (flag1){
463
- console.log('不启动定时器')
464
-
465
- }else if (flag2) {
466
- console.log('启动定时器out')
467
- this.setOut()
468
- }else{
469
- console.log('启动定时器timer和out')
470
- this.setTimer()
471
- this.setOut()
472
- }
473
- this.isOverNum++;
474
- } else{
475
- this.isOverNum=0;
476
- }
477
-
478
-
479
- },(res)=>{
480
- //响应错误回调
481
- console.log('响应错误')
482
- })
483
-
484
- },
485
- setTimer() {
486
- console.log("--------------进入setTimer---------------")
487
- if(this.timer == null) {
488
- this.timer = setInterval( () => {
489
- console.log('开始定时...每过5秒执行一次')
490
- this.$refs.cp.$refs.cri.search()
491
- console.log('数据已刷新')
492
- this.eachFind()
493
- console.log('eachfind完毕');
494
- }, 60*1000*this.remindTime)
495
- }
496
- },
497
- setOut() {
498
- console.log("--------------进入setOut---------------")
499
- if(this.timer1 == null) {
500
- this.timer1 = setTimeout( () => {
501
- console.log('开始setTimeout')
502
- this.eachFind()
503
- console.log('setTimeout完毕');
504
- }, 1000)
505
- }
506
- },
507
- //语音提醒
508
- speckText(str) {
509
- console.log("--------------进入speckText---------------")
510
- var url= "http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=" + encodeURI(str);
511
- new Audio(url).play();
512
-
513
- },
514
-
515
- eachFind() {
516
- console.log("--------------进入eachfind---------------")
517
- let arr = this.$refs.cp.$refs.grid.model.rows
518
- let overNumString1=''
519
- let flagNum1=1
520
- for(let val of arr) {
521
- console.log(val.isbeforeover)
522
- if (val.isbeforeover==='预期提醒'){
523
- console.log('flagNUm:'+flagNum1);
524
- if (flagNum1==1){
525
- overNumString1=flagNum1+'条'
526
- flagNum1=flagNum1+1
527
- }else{
528
- overNumString1=overNumString1+'和第'+flagNum1+'条'
529
- flagNum1=flagNum1+1
530
- }
531
- }
532
- }
533
- if (flagNum1!=1){
534
- console.log(overNumString1);
535
- this.speckText('请注意:第:'+overNumString1+'数据即将过期')
536
- }
537
- console.log('语音播放完毕');
538
- }
539
- },
540
- created: function() {
541
- console.log("--------------进入select-created---------------")
542
- clearInterval(this.timer)
543
- clearInterval(this.timer1)
544
- this.timer = null
545
- this.timer1 = null
546
- },
547
- beforeDestroy() {
548
- console.log("--------------进入beforeDestroy---------------")
549
- clearInterval(this.timer)
550
- clearInterval(this.timer1)
551
- this.timer = null
552
- this.timer1 = null
553
- },
554
- computed: {
555
- date() {
556
- return getNowDate()
557
- }
558
- ,
559
- selected() {
560
- return this.$refs.cp.$refs.grid.selected
561
- }
562
- }
563
- }
564
- </script>
565
- <style scoped>
566
- label {
567
- display: flex;
568
- justify-content:center;
569
- align-items:Center;
570
- padding-top: 8px;
571
- }
572
- tr.title {
573
- background-color: #6666ff;
574
- }
575
- td{
576
- text-align: center;
577
- }
578
- /* .active{
579
- color: Crimson;
580
- }
581
- .p{
582
- color: green;
583
- }*/
584
-
585
- .p1 {
586
- color: #dc0b12;
587
- font-weight:bold
588
- }
589
- .p {
590
- color: #ffaf4f;
591
- }
592
- </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='search' v-ref:cri style="padding: 20px;background-color: #f6f6f6;">
6
+ <form novalidate class="" partial>
7
+ <div class="col-sm-12">
8
+ <div class="form-group col-sm-4">
9
+ <label class=" col-sm-6" style="padding-top: 8px">联系人/项目名称/用户名称:</label>
10
+ <div class="col-sm-6">
11
+ <input type="text" class="form-control" v-model="model.f_user_name"
12
+ condition=" (f_user_name like '%{}%' or f_entry_name like '%{}%' or f_company_name like '%{}%') " placeholder='三选一输入'>
13
+ </div>
14
+ </div>
15
+ <div class="col-sm-1">
16
+ <!--<label class="col-sm-6">合同编号</label>-->
17
+ <div class="col-sm-12">
18
+ <input type="text" class="form-control" placeholder='合同编号' v-model="model.f_contract_number"
19
+ v-on:keyup.enter="search"
20
+ condition="f_contract_number like '%{}%'">
21
+ </div>
22
+ </div>
23
+ <div class="col-sm-1">
24
+ <!--<label class="col-sm-6">用户地址</label>-->
25
+ <div class="col-sm-12">
26
+ <input type="text" class="form-control" placeholder='用户地址' v-model="model.f_address"
27
+ v-on:keyup.enter="search"
28
+ condition="f_address like '%{}%'">
29
+ </div>
30
+ </div>
31
+ <div class="col-sm-1">
32
+ <!--<label class="col-sm-6"> 报建类型:</label>-->
33
+ <div class="col-sm-12" v-if="!this.$login.f.f_fengongsi.includes('中燃')">
34
+ <v-select :width ="'100%'" style="width: 100%" :options="$parent.$parent.applytype" placeholder='报建类型' condition="f_apply_type like '%{}%'"
35
+ v-model="model.f_apply_type" :value.sync="model.f_apply_type" close-on-select>
36
+ </v-select>
37
+ </div>
38
+ </div>
39
+ <div class="col-sm-2">
40
+ <!--<label class="col-sm-6">办理环节:</label>-->
41
+ <div class="col-sm-12">
42
+ <v-select :width ="'90%'" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.defnames"
43
+ condition="defname = '{}'" placeholder='办理环节'
44
+ v-model="model.defname" :value.sync="model.defname" close-on-select>
45
+ </v-select>
46
+ </div>
47
+ </div>
48
+ <div class="col-sm-1">
49
+ <input type="text" class="form-control" placeholder='经办人' v-model="model.f_survey_name"
50
+ v-on:keyup.enter="search"
51
+ condition=" (f_apply_kefu_employee like '%{}%' or f_survey_name like '%{}%') ">
52
+ </div>
53
+ </div>
54
+ <div class="col-sm-12">
55
+ <div class="col-sm-offset-9">
56
+ <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(1)">
57
+ <span class="glyphicon glyphicon-plus" ></span>散户报装
58
+ </button>
59
+ <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(2)">
60
+ <span class="glyphicon glyphicon-plus" ></span>民用报装
61
+ </button>
62
+ <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(3)">
63
+ <span class="glyphicon glyphicon-plus" ></span>工业报装
64
+ </button>
65
+ <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(4)">
66
+ <span class="glyphicon glyphicon-plus" ></span>商业报装
67
+ </button>
68
+ <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(5)">
69
+ <span class="glyphicon glyphicon-plus" ></span>管道移改
70
+ </button>
71
+ <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(6)">
72
+ <span class="glyphicon glyphicon-plus" ></span>中压管线
73
+ </button>
74
+ <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.addactive(7)">
75
+ <span class="glyphicon glyphicon-plus" ></span>企业报装
76
+ </button>
77
+ <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.searchNow(),$parent.$parent.close()">
78
+ <span class="glyphicon glyphicon-search"></span>查询
79
+ </button>
80
+ <button class="btn btn-primary btn-sm col-sm-1" type="button" @click="$parent.$parent.close()">
81
+ <span class="glyphicon glyphicon-repeat"></span>返回
82
+ </button>
83
+ </div>
84
+ </div>
85
+ </form>
86
+ </criteria>
87
+ <data-grid :model="model" partial='list' v-ref:grid class="data-grid" is-fixed='false' style="overflow-x:auto">
88
+ <template partial='head'>
89
+ <tr class="title">
90
+ <th>
91
+ <nobr>序号</nobr>
92
+ </th>
93
+ <th></th>
94
+
95
+ <th>
96
+ <nobr>操作</nobr>
97
+ </th>
98
+
99
+ <th>
100
+ <nobr>当前状态</nobr>
101
+ </th>
102
+ <th><nobr>联系人/项目名称/用户名称</nobr></th>
103
+ <th>
104
+ <nobr>合同编号</nobr>
105
+ </th>
106
+ <th>
107
+ <nobr>流程状态</nobr>
108
+ </th>
109
+ <th v-if="!this.$login.f.f_fengongsi.includes('中燃')">
110
+ <nobr>用户类型</nobr>
111
+ </th>
112
+ <th>
113
+ <nobr>电话</nobr>
114
+ </th>
115
+ <th style="width: 250px">
116
+ <nobr>地址</nobr>
117
+ </th>
118
+ <th>
119
+ <nobr>报建类型</nobr>
120
+ </th>
121
+ <th>
122
+ <nobr>预约来源</nobr>
123
+ </th>
124
+ <th>
125
+ <nobr>报建日期</nobr>
126
+ </th>
127
+ </tr>
128
+ </template>
129
+ <template partial='body'>
130
+ <tr >
131
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
132
+ <nobr><font>{{$index+1}}</font></nobr>
133
+ </td>
134
+ <td></td>
135
+
136
+ <td style="text-align: center;">
137
+ <dropdown v-if="row.defname != '完工'">
138
+ <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
139
+ <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
140
+ </button>
141
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
142
+ <li>
143
+ <a href="#" @click="$parent.$parent.$parent.check(row)">{{row.defname}}</a>
144
+ </li>
145
+ </ul>
146
+ </dropdown>
147
+ </td>
148
+
149
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
150
+ <nobr><font>{{row.f_sub_state}}</font></nobr>
151
+ </td>
152
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
153
+ <nobr><font>{{row.f_user_name}}/{{row.f_entry_name}}/{{row.f_company_name}}</font></nobr>
154
+ </td>
155
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
156
+ <nobr><font>{{row.f_contract_number}}</font></nobr>
157
+ </td>
158
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
159
+ <nobr><font>{{row.defname}}</font></nobr>
160
+ </td>
161
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
162
+ <nobr><font>{{row.f_user_type}}</font></nobr>
163
+ </td>
164
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
165
+ <nobr><font>{{row.f_phone}}</font></nobr>
166
+ </td>
167
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="width: 250px; white-space: normal;">
168
+ <font>{{row.f_address}}</font>
169
+ </td>
170
+ <td style="text-align: center;">
171
+ <nobr><font>{{$parent.$parent.$parent.getApplyType(row.f_user_type,row.f_apply_type)}}</font></nobr>
172
+ </td>
173
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
174
+ <nobr><font>{{row.f_order_source}}</font></nobr>
175
+ </td>
176
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
177
+ <nobr><font>{{row.f_apply_date}}</font></nobr>
178
+ </td>
179
+ </tr>
180
+ </template>
181
+ </data-grid>
182
+ </criteria-paged>
183
+ </div>
184
+ </div>
185
+ </template>
186
+ <script>
187
+ import * as Util from '../../Util'
188
+ import {
189
+ PagedList
190
+ } from 'vue-client'
191
+ import getNowDate from '../../getNowDate.js'
192
+ import {HttpResetClass} from 'vue-client'
193
+ import Vue from "vue";
194
+ export default {
195
+ title: '勘探详情',
196
+ data() {
197
+ return {
198
+ // applytype: [{label:"全部",value:''},...this.$appdata.getParam('报建类型')],
199
+ applytype: [{label:"全部",value:''}],
200
+ timer: null,
201
+ timer1:null,
202
+ remindTime:5,//超时提醒时间
203
+ isOverNum:0,//报建是否提醒过
204
+ defnames:[],
205
+ model: new PagedList('rs/sql/checkuser', 20, {
206
+ data: {
207
+ id: this.$login.f.id,
208
+ fengongsi: this.$login.f.f_fengongsi,
209
+ f_filialeid: this.$login.f.f_orgids
210
+ }
211
+ }),
212
+ condition: '',
213
+ select: '',
214
+ urlname: '',
215
+ workflow_name:['',''],
216
+ xmlname: '',
217
+ startname: '客户申请',
218
+ f_apply_type: ''
219
+ }
220
+ },
221
+ ready() {
222
+ console.log("--------------进入ready---------------")
223
+ let str='报建语音提醒时间'
224
+ this.$refs.cp.$refs.cri.search()
225
+ str='超时提前提醒时间'
226
+ this.loadSingleValue(str)
227
+ let http = new HttpResetClass()
228
+ console.log("--------------进入load---------------")
229
+ http.load('POST', 'rs/sql/getDefnamesForActivityins', {data:{}}, {
230
+ resolveMsg: null,
231
+ rejectMsg: null
232
+ }).then((res)=>{
233
+ // 先获取所有流程环节
234
+ this.defnames = [{label: '全部', value: ''}]
235
+ for(let i=0;i<res.data.length;i++){
236
+ this.defnames.push({label:res.data[i].defname,value:res.data[i].defname})
237
+ }
238
+ })
239
+ let self = this
240
+ console.log("--------------ready结束---------------")
241
+ },
242
+ methods: {
243
+ getApplyType(userType,applyType){
244
+ if(userType=='民用'&&applyType=='民用报建'){
245
+ return '个人报建'
246
+ }else if(userType=='民用'&&applyType=='微信对接'){
247
+ return '个人报建'
248
+ }else if(userType=='非民用'&&applyType=='微信对接'){
249
+ return '企业报建'
250
+ }else if(userType=='非民用'&&applyType=='企业报建'){
251
+ return '企业报建'
252
+ }else{
253
+ return applyType
254
+ }
255
+ },
256
+ generateUUID() {
257
+ console.log("--------------进入generateUUID---------------")
258
+ var d = new Date().getTime()
259
+ var uuid = 'xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
260
+ var r = (d + Math.random() * 16) % 16 | 0
261
+ d = Math.floor(d / 16)
262
+ return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
263
+ })
264
+ return uuid
265
+ },
266
+ searchNow(){
267
+ console.log("--------------进入searchNow---------------")
268
+ this.$refs.cp.$refs.cri.search()
269
+ this.eachFind()
270
+ },
271
+ loadName(){
272
+ //获取庭院楼盘工程json
273
+ console.log("--------------进入json获取---------------")
274
+ let http = new HttpResetClass()
275
+ console.log("--------------开始加载load---------------")
276
+ let data = {
277
+ data:{...this.$login.f,parent:{},functions:[]},
278
+ workname: this.urlname
279
+ }
280
+ console.log("获取流程信息:" + JSON.stringify(data))
281
+ http.load('POST','rs/logic/ApplyGetConfigs', {data: data}, {resolveMsg: null, rejectMsg: null}
282
+ ).then((res)=>{
283
+
284
+ if(res.data.code && res.data.code == 200){
285
+ Vue.workflow_vue = Vue.prototype.$workflow_vue = res.data.workflow_vue
286
+
287
+ // console.log("workflow_vue有没有值:"+JSON.stringify(this.workflow_vue))
288
+ if(res.data.msg){
289
+ console.log('获取配置文件信息:',res.data.msg)
290
+ }
291
+ }else{
292
+ this.$showMessage('获取报建配置失败,原因:' + res.data.msg)
293
+ return
294
+ }
295
+ })
296
+ console.log("Vue.$workflow_vue:"+JSON.stringify(this.$workflow_vue))
297
+ console.log("--------------结束获取---------------")
298
+
299
+ },
300
+ async addactive(modify) {
301
+ console.log("-------------modify:"+modify)
302
+ if (modify == '1'){
303
+ console.log("进来了没有--------------")
304
+ this.urlname = "散户报建流程"
305
+ this.xmlname = "散户报建流程"
306
+ this.f_apply_type = '散户报建'
307
+ this.startname = '客户申请'
308
+ console.log("获取部门:" + this.$login.f.f_parentname)
309
+ // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
310
+ // this.$showMessage("只能由客户服务部和市场部发起报建申请")
311
+ // return
312
+ // }
313
+ this.loadName()
314
+ }
315
+ if (modify == '2'){
316
+ console.log("进来了没有--------------")
317
+ this.urlname = "民用报建流程"
318
+ this.xmlname = "民用报建流程"
319
+ this.f_apply_type = '民用报建'
320
+ this.startname = '客户申请'
321
+ // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
322
+ // this.$showMessage("只能由客户服务部和市场部发起报建申请")
323
+ // return
324
+ // }
325
+ this.loadName()
326
+ }
327
+ if (modify == '3' || modify == '4'){
328
+ console.log("进来了没有--------------")
329
+ this.urlname = "工商业报建流程"
330
+ this.xmlname = "工商业报建流程"
331
+ // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
332
+ // this.$showMessage("只能由客户服务部和市场部发起报建申请")
333
+ // return
334
+ // }
335
+ if (modify == '3') {
336
+ this.f_apply_type = '工业报建'
337
+ }
338
+ if (modify == '4') {
339
+ this.f_apply_type = '商业报建'
340
+ }
341
+ this.startname = '客户申请'
342
+ this.loadName()
343
+ }
344
+ if (modify == '5'){
345
+ console.log("进来了没有--------------")
346
+ this.urlname = "管道移改报建流程"
347
+ this.xmlname = "管道移改报建流程"
348
+ this.f_apply_type = '管道移改'
349
+ this.startname = '客户申请'
350
+ // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
351
+ // this.$showMessage("只能由客户服务部和市场部发起报建申请")
352
+ // return
353
+ // }
354
+ this.loadName()
355
+ }
356
+ if (modify == '6'){
357
+ console.log("进来了没有--------------")
358
+ this.urlname = "中压管线报建流程"
359
+ this.xmlname = "中压管线报建流程"
360
+ this.f_apply_type = '中压管线'
361
+ this.startname = '申请部门'
362
+ this.loadName()
363
+ }
364
+ if (modify == '7'){
365
+ console.log("进企业报建--------------")
366
+ this.urlname = "企业报建流程"
367
+ this.xmlname = "企业报建流程"
368
+ this.f_apply_type = '企业报建'
369
+ this.startname = '客户申请'
370
+ // if (this.$login.f.f_parentname != '客户服务部' && this.$login.f.f_parentname != '市场部') {
371
+ // this.$showMessage("只能由客户服务部和市场部发起报建申请")
372
+ // return
373
+ // }
374
+ this.loadName()
375
+ }
376
+ // let workflowXml_name= this.workflow_name
377
+ // console.log("$workflow_vue"+this.$workflow_vue.workflow_xmlfilename)
378
+ console.log("--------------进入addactive---------------")
379
+ let http = new HttpResetClass()
380
+ let res = await http.load('POST','rs/logic/ApplyGetProcessID',{data:{filename:this.xmlname,start_activity:this.startname}}, {resolveMsg: null, rejectMsg: '获取流程ID失败,请联系开发人员'})
381
+ this.$refs.cp.pager = false
382
+ let val = {
383
+ defname: this.startname,
384
+ f_process_id: res.data.f_process_id,
385
+ f_apply_date: Util.toStandardTimeString(),
386
+ f_apply_num: this.generateUUID(),
387
+ f_apply_operator_telephone: this.$login.f.f_fgsdianhua,
388
+ f_apply_type: this.f_apply_type
389
+ }
390
+ // 如果是改装,将modify装入val
391
+ // if(modify){
392
+ // modify.f_customer_type = '个人'
393
+ // modify.f_apply_type = '改装登记'
394
+ // modify.f_phone = modify.f_user_phone
395
+ // let temp = modify.f_residential_area
396
+ // modify.f_residential_area = modify.f_area
397
+ // modify.f_area = temp
398
+ // Object.assign(val,modify)
399
+ // }
400
+
401
+ console.log(112 + JSON.stringify(this.$login.f.f_apply_department))
402
+ this.$dispatch('check', val)
403
+ this.$dispatch('changeheight')
404
+ this.$dispatch('addactive')
405
+ },
406
+ // 改装申请
407
+ modify(){
408
+ console.log("--------------进入modify---------------")
409
+ // 调出改装申请界面
410
+ this.$parent.show = false
411
+ }
412
+ ,
413
+ check(val) {
414
+ console.log("--------------进入check---------------")
415
+ this.$dispatch('check', val)
416
+ this.$dispatch('addactive')
417
+ }
418
+ ,
419
+ close() {
420
+ console.log("--------------进入close---------------")
421
+ this.$dispatch('close')
422
+ }
423
+ ,
424
+ compare(val) {
425
+ console.log("--------------进入compare---------------")
426
+ val === '完工'
427
+ console.log('完工', val)
428
+ return false
429
+ },
430
+
431
+ // 获取数据
432
+ loadSingleValue(str) {
433
+ console.log("--------------进入loadSingleValue---------------")
434
+ let http = new HttpResetClass()
435
+ let data = {
436
+ singlename: str,
437
+ //预先提醒时间
438
+
439
+ }
440
+ http.load('POST', 'rs/sql/findsingle', {data: data}, {resolveMsg: null, rejectMsg: '获取语音提醒时间失败'}).then((res) => {
441
+ console.log('-----------------进去之前-----------'+JSON.stringify(res))
442
+ let flag1=false
443
+ let flag2=false
444
+ if (res.data.length==0){
445
+ flag1=true
446
+ console.log('没有单值'+flag1)
447
+ flag2=false
448
+ }else if (res.data[0].value==0) {
449
+ flag2=true
450
+ console.log('为0')
451
+ flag1=false
452
+ }else{
453
+ if (str==='报建语音提醒时间'){
454
+ this.remindTime = res.data[0].value
455
+ }
456
+ console.log('为'+res.data[0].value)
457
+ flag1=false
458
+ flag2=false
459
+ }
460
+
461
+ if (this.isOverNum==0){
462
+ if (flag1){
463
+ console.log('不启动定时器')
464
+
465
+ }else if (flag2) {
466
+ console.log('启动定时器out')
467
+ this.setOut()
468
+ }else{
469
+ console.log('启动定时器timer和out')
470
+ this.setTimer()
471
+ this.setOut()
472
+ }
473
+ this.isOverNum++;
474
+ } else{
475
+ this.isOverNum=0;
476
+ }
477
+
478
+
479
+ },(res)=>{
480
+ //响应错误回调
481
+ console.log('响应错误')
482
+ })
483
+
484
+ },
485
+ setTimer() {
486
+ console.log("--------------进入setTimer---------------")
487
+ if(this.timer == null) {
488
+ this.timer = setInterval( () => {
489
+ console.log('开始定时...每过5秒执行一次')
490
+ this.$refs.cp.$refs.cri.search()
491
+ console.log('数据已刷新')
492
+ this.eachFind()
493
+ console.log('eachfind完毕');
494
+ }, 60*1000*this.remindTime)
495
+ }
496
+ },
497
+ setOut() {
498
+ console.log("--------------进入setOut---------------")
499
+ if(this.timer1 == null) {
500
+ this.timer1 = setTimeout( () => {
501
+ console.log('开始setTimeout')
502
+ this.eachFind()
503
+ console.log('setTimeout完毕');
504
+ }, 1000)
505
+ }
506
+ },
507
+ //语音提醒
508
+ speckText(str) {
509
+ console.log("--------------进入speckText---------------")
510
+ var url= "http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=" + encodeURI(str);
511
+ new Audio(url).play();
512
+
513
+ },
514
+
515
+ eachFind() {
516
+ console.log("--------------进入eachfind---------------")
517
+ let arr = this.$refs.cp.$refs.grid.model.rows
518
+ let overNumString1=''
519
+ let flagNum1=1
520
+ for(let val of arr) {
521
+ console.log(val.isbeforeover)
522
+ if (val.isbeforeover==='预期提醒'){
523
+ console.log('flagNUm:'+flagNum1);
524
+ if (flagNum1==1){
525
+ overNumString1=flagNum1+'条'
526
+ flagNum1=flagNum1+1
527
+ }else{
528
+ overNumString1=overNumString1+'和第'+flagNum1+'条'
529
+ flagNum1=flagNum1+1
530
+ }
531
+ }
532
+ }
533
+ if (flagNum1!=1){
534
+ console.log(overNumString1);
535
+ this.speckText('请注意:第:'+overNumString1+'数据即将过期')
536
+ }
537
+ console.log('语音播放完毕');
538
+ }
539
+ },
540
+ created: function() {
541
+ console.log("--------------进入select-created---------------")
542
+ clearInterval(this.timer)
543
+ clearInterval(this.timer1)
544
+ this.timer = null
545
+ this.timer1 = null
546
+ },
547
+ beforeDestroy() {
548
+ console.log("--------------进入beforeDestroy---------------")
549
+ clearInterval(this.timer)
550
+ clearInterval(this.timer1)
551
+ this.timer = null
552
+ this.timer1 = null
553
+ },
554
+ computed: {
555
+ date() {
556
+ return getNowDate()
557
+ }
558
+ ,
559
+ selected() {
560
+ return this.$refs.cp.$refs.grid.selected
561
+ }
562
+ }
563
+ }
564
+ </script>
565
+ <style scoped>
566
+ label {
567
+ display: flex;
568
+ justify-content:center;
569
+ align-items:Center;
570
+ padding-top: 8px;
571
+ }
572
+ tr.title {
573
+ background-color: #6666ff;
574
+ }
575
+ td{
576
+ text-align: center;
577
+ }
578
+ /* .active{
579
+ color: Crimson;
580
+ }
581
+ .p{
582
+ color: green;
583
+ }*/
584
+
585
+ .p1 {
586
+ color: #dc0b12;
587
+ font-weight:bold
588
+ }
589
+ .p {
590
+ color: #ffaf4f;
591
+ }
592
+ </style>