apply-clients 3.1.68 → 3.1.70

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,420 +1,420 @@
1
- <template>
2
- <div>
3
- <criteria-paged :model="model" v-ref:cp>
4
- <criteria partial='criteria' @condition-changed='search' v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div class="form-group col-sm-3">
8
- <label class="font_normal_body">客户名称:</label>
9
- <input type="text" class="input_search" v-model="model.f_user_name"
10
- v-on:keyup.enter="search"
11
- condition=" (f_user_name like '%{}%' or f_contact like '%{}%') " placeholder='二选一输入'>
12
- </div>
13
- <div class="form-group col-sm-3">
14
- <label class="font_normal_body">报建编号:</label>
15
- <input type="text" class="input_search" placeholder='报建编号' v-model="model.f_apply_num"
16
- v-on:keyup.enter="search"
17
- condition="u.f_apply_num like '%{}%'">
18
- </div>
19
- <div class="form-group col-sm-3">
20
- <label class="font_normal_body">合同编号:</label>
21
- <input type="text" class="input_search" placeholder='合同编号' v-model="model.f_contract_number"
22
- v-on:keyup.enter="search"
23
- condition="f_contract_number like '%{}%'">
24
- </div>
25
- <div class="form-group col-sm-2 operate">
26
- <button type="button" class="btn btn-info head-but" @click="$parent.$parent.show = !$parent.$parent.show">工程发起</button>
27
- <button type="button" class="btn btn-info head-but" @click="search(),$parent.$parent.close()" v-el:cx>查询</button>
28
- <button type="button" class="btn btn-info head-but" @click="$parent.$parent.loadPage()">返回</button>
29
- <button type="button" class="btn btn-info head-but" @click="$parent.$parent.clear()">清空</button>
30
- <button type="button" class="btn btn-info head-but" @click="$parent.$parent.applySendAll()" >批量回访</button>
31
- <div
32
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
33
- @click="$parent.$parent.hidden()"
34
- class="button_spacing"
35
- style="float: right">
36
- </div>
37
- </div>
38
- </div>
39
- <div class="row" v-show="$parent.$parent.criteriaShow">
40
- <div class="form-group col-sm-3">
41
- <label class="font_normal_body">用户地址:</label>
42
- <input type="text" class="input_search" placeholder='用户地址' v-model="model.f_address"
43
- v-on:keyup.enter="search"
44
- condition="f_address like '%{}%'">
45
- </div>
46
- <div class="form-group col-sm-3">
47
- <label class="font_normal_body">小&emsp;&emsp;区:</label>
48
- <v-select
49
- v-model="model.f_residential_area"
50
- placeholder='请选择'
51
- condition="u.f_residential_area = '{}'"
52
- :value.sync="model.f_residential_area"
53
- :options='$parent.$parent.area'
54
- class="select select_list"
55
- search="true"
56
- :value-single="true"
57
- close-on-select ></v-select>
58
- </div>
59
- <div class="form-group col-sm-3">
60
- <label class="font_normal_body">票&emsp;&emsp;号:</label>
61
- <input type="text" class="input_search" placeholder='票号' v-model="model.f_ticket_number"
62
- v-on:keyup.enter="search"
63
- condition="c.f_ticket_number like '%{}%'">
64
- </div>
65
- <div class="col-sm-3 form-group">
66
- <label class="font_normal_body">报建类型:</label>
67
- <v-select
68
- v-model="model.f_apply_type"
69
- placeholder='报建类型'
70
- condition="f_apply_type like '%{}%'"
71
- :value.sync="model.f_apply_type"
72
- :options='$parent.$parent.completionApplytype'
73
- class="select select_list"
74
- :value-single="true"
75
- close-on-select ></v-select>
76
- </div>
77
- <div class="col-sm-3 form-group">
78
- <label class="font_normal_body">办理环节:</label>
79
- <v-select
80
- v-model="model.defname"
81
- placeholder='办理环节'
82
- condition="defname = '{}'"
83
- :value.sync="model.defname"
84
- :options='$parent.$parent.defnames'
85
- class="select select_list"
86
- :value-single="true"
87
- close-on-select ></v-select>
88
- </div>
89
- <div class="form-group col-sm-3">
90
- <label for="startDate" class="font_normal_body">开始时间:</label>
91
- <datepicker id="startDate" placeholder="开始日期"
92
- style="width: 60%!important;"
93
- v-model="model.startDate"
94
- :value.sync="model.startDate"
95
- :format="'yyyy-MM-dd 00:00:00'"
96
- :show-reset-button="true"
97
- condition="f_apply_date >= '{}'">
98
- </datepicker>
99
- </div>
100
- <div class="form-group col-sm-3">
101
- <label for="endDate" class="font_normal_body">结束时间:</label>
102
- <datepicker id="endDate" placeholder="结束日期"
103
- style="width: 60%!important;"
104
- v-model="model.endDate"
105
- :value.sync="model.endDate"
106
- :format="'yyyy-MM-dd 23:59:59'"
107
- :show-reset-button="true"
108
- condition="f_apply_date <= '{}'">
109
- </datepicker>
110
- </div>
111
- <div class="form-group col-sm-3">
112
- <label for="endDate" class="font_normal_body">收费日期:</label>
113
- <datepicker id="f_charge_date" placeholder="收费日期"
114
- style="width: 60%!important;"
115
- v-model="model.f_charge_date"
116
- :value.sync="model.f_charge_date"
117
- :format="'yyyy-MM-dd'"
118
- :show-reset-button="true"
119
- condition="c.f_charge_date <= '{} 23:59:59' and c.f_charge_date >= '{} 00:00:00'">
120
- </datepicker>
121
- </div>
122
- </div>
123
- </div>
124
- </criteria>
125
- <data-grid :model="model" optional partial='list' v-ref:grid class="list_area table_sy">
126
- <template partial='head'>
127
- <tr>
128
- <!-- <th>-->
129
- <!-- <nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"/> 全选</nobr>-->
130
- <!-- </th>-->
131
- <th></th>
132
- <th>序号</th>
133
- <th>流程操作</th>
134
- <th>报建编号</th>
135
- <th>客户名称/联系人</th>
136
- <th>当前状态</th>
137
- <th>合同编号</th>
138
- <th>流程状态</th>
139
- <th>电话</th>
140
- <th>地址</th>
141
- <th>报建类型</th>
142
- <th>报建日期</th>
143
- </tr>
144
- </template>
145
- <template partial='body'>
146
- <tr >
147
- <td style="text-align: center;white-space:nowrap;">
148
- <input type="checkbox" v-if="row.defname=='回访'" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.isChecked(row)" @change="$parent.$parent.$parent.setCheckes(row)" />
149
- </td>
150
- <td style="text-align: center;">
151
- <nobr><font>{{$index+1}}</font></nobr>
152
- </td>
153
- <td style="text-align: center;">
154
- <dropdown>
155
- <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
156
- <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
157
- </button>
158
- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
159
- <li>
160
- <a href="#" @click="$parent.$parent.$parent.click(row)">{{row.defname}}</a>
161
- </li>
162
- </ul>
163
- </dropdown>
164
- </td>
165
- <td style="text-align: center;">
166
- <nobr><font>{{row.f_apply_num}}</font></nobr>
167
- </td>
168
- <td style="text-align: center;">
169
- <nobr><font>{{row.f_user_name}}/{{row.f_contact}}</font></nobr>
170
- </td>
171
- <td style="text-align: center;">
172
- <nobr><font>{{row.f_sub_state}}</font></nobr>
173
- </td>
174
- <td style="text-align: center;">
175
- <nobr><font>{{row.f_contract_number}}</font></nobr>
176
- </td>
177
- <td style="text-align: center;">
178
- <nobr><font>{{row.defname}}</font></nobr>
179
- </td>
180
- <td style="text-align: center;">
181
- <nobr><font>{{row.f_phone}}</font></nobr>
182
- </td>
183
- <td style="text-align: center;">
184
- <nobr><font>{{row.f_address}}</font></nobr>
185
- </td>
186
- <td style="text-align: center;">
187
- <nobr><font>{{row.f_apply_type}}</font></nobr>
188
- </td>
189
- <td style="text-align: center;">
190
- <nobr><font>{{row.f_apply_date}}</font></nobr>
191
- </td>
192
- </tr>
193
- </template>
194
- </data-grid>
195
- </criteria-paged>
196
-
197
- <modal
198
- v-if="show"
199
- :show.sync="show"
200
- backdrop="false"
201
- title="工程类型"
202
- >
203
- <div class="form-horizontal" slot="modal-body">
204
- <div class="form-group" style="margin: 10px auto">
205
- <label class="col-sm-3 control-label">报建类型:</label>
206
- <div class="col-sm-9">
207
- <v-select
208
- v-model="f_apply_type"
209
- placeholder='请选择需要发起的工程类型'
210
- :value.sync="f_apply_type"
211
- :options='applytype'
212
- :value-single="true"
213
- class="select select_list"
214
- :search="false"
215
- close-on-select ></v-select>
216
- </div>
217
- </div>
218
- </div>
219
- <footer slot="modal-footer" class="modal-footer">
220
- <button
221
- class="btn btn-default"
222
- @click="this.show = !this.show">
223
- 取消
224
- </button>
225
- <button
226
- class="btn btn-primary"
227
- type="button"
228
- :disabled="applyButton_disabled"
229
- @click="apply()">
230
- 确认
231
- </button>
232
- </footer>
233
- </modal>
234
- </div>
235
- </template>
236
- <script>
237
- import {PagedList} from 'vue-client'
238
- import {HttpResetClass} from 'vue-client'
239
- export default {
240
- title: '工程列表',
241
- data() {
242
- return {
243
- applytype: [{label:"集中报建",value:'集中报建'},{label:"非民用报建",value:'非民用报建'},{label:"散户报建",value:'散户报建'}], // 所有报建类型
244
- defnames: [{label: '请先选择报建类型', value: ''}], // 所有办理环节
245
- model: new PagedList('rs/sql/checkuser', 20, {
246
- data: {
247
- id: this.$login.f.id,
248
- org: this.$login.f.orgs
249
- }
250
- }),
251
- condition: '', // 查询条件
252
- applys:[], // 选择的报建
253
- checkAll: false, // 全选
254
- f_apply_type: null, // 报建类型
255
- startname: null, // 启动节点
256
- criteriaShow: false,
257
- show: false,
258
- applyButton_disabled: true,
259
- area:[]
260
- }
261
- },
262
- ready() {
263
- // 调用查询
264
- this.$refs.cp.$refs.cri.search()
265
- // 获取所有办理环节
266
- this.getDefnames()
267
- this.getAreaAll()
268
- },
269
- methods: {
270
- applySendAll () {
271
- if(this.applys.length==0){
272
- this.$showMessage("请选择需要回访的报建")
273
- return
274
- }
275
- //将选中的回访环节的数据,走到下一步
276
- new HttpResetClass().load('post','rs/logic/CompleteVisit',
277
- {data:{
278
- apply:this.applys,
279
- name:this.$login.f.name,
280
- id:this.$login.f.id
281
- }
282
- },{resolveMsg:null,rejectMsg:null}).then(res=>{
283
- this.$showMessage("回访成功")
284
- this.$refs.cp.$refs.cri.search()
285
- })
286
- },
287
- isChecked(v) {
288
- // 如果全选,不在的按选中算,否则,在的按选中算
289
- if (this.checkAll) {
290
- return this.applys.indexOf(v.f_process_id) == -1
291
- } else {
292
- return this.applys.indexOf(v.f_process_id) != -1
293
- }
294
- },
295
- setCheckes(row) {
296
- if (!this.checkAll){
297
- let index=this.applys.indexOf(row.f_process_id)
298
- if(index<0){
299
- this.applys.push(row.f_process_id)
300
- }else{
301
- this.applys.splice(index,1)
302
- }
303
- }
304
- },
305
- loadPage () {
306
- this.$dispatch('loadPage')
307
- },
308
- clear () {
309
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
310
- this.$refs.cp.$refs.cri.model[key] = ''
311
- })
312
- },
313
- hidden() {
314
- this.$dispatch('hidden', this.criteriaShow)
315
- this.criteriaShow = !this.criteriaShow
316
- },
317
- // 获取所有办理环节
318
- getDefnames() {
319
- let http = new HttpResetClass()
320
- http.load('POST', 'rs/logic/getAllDefname', {}, {
321
- resolveMsg: null,
322
- rejectMsg: null
323
- }).then((res) => {
324
- this.defnames = [{label: '全部', value: ''}, ...res.data]
325
- })
326
- console.log("this.defname",this.defnames)
327
- },
328
- // 报装申请
329
- async apply () {
330
- this.applyButton_disabled = true
331
-
332
- if (this.f_apply_type === '集中报建') {
333
- this.startname = '申请登记'
334
- if (this.$login.f.deps !== '市场部') {
335
- this.$showMessage("只能由市场部受理")
336
- return
337
- }
338
- }
339
- if (this.f_apply_type === '散户报建') {
340
- this.startname = '申请登记'
341
- if (this.$login.f.deps !== '销售客服部') {
342
- this.$showMessage("只能由销售客服部受理")
343
- return
344
- }
345
- }
346
- if (this.f_apply_type === '非民用报建') {
347
- this.startname = '申请登记'
348
- if (this.$login.f.deps !== '市场部') {
349
- this.$showMessage("只能由市场部受理")
350
- return
351
- }
352
- }
353
-
354
- let val = {
355
- f_apply_type: this.f_apply_type,
356
- defname: this.startname
357
- }
358
- // 调用ExplorationUser事件
359
- this.$dispatch('apply', val)
360
-
361
- this.show = false
362
- this.f_apply_type = null
363
- },
364
- async getAreaAll () {
365
- let http = new HttpResetClass()
366
- let condition = "f_filialeid = " + this.$login.f.orgid
367
- let res = await http.load('POST','rs/logic/apply_queryArea',{data:{condition:condition}}, {resolveMsg: null, rejectMsg: null})
368
-
369
- this.area = res.data.queryArea.map(item => {
370
- return {
371
- 'label': item.f_residential_area,
372
- 'value': item.f_residential_area,
373
- }
374
- })
375
- },
376
- // ExplorationUser 关闭组件
377
- close() {
378
- this.$dispatch('close')
379
- },
380
- // 点击操作
381
- click(val) {
382
- this.criteriaShow = false
383
- this.$dispatch('apply', val)
384
- }
385
- },
386
- computed: {
387
- completionApplytype() {
388
- return [{label:"全部",value:''},...this.applytype]
389
- }
390
- },
391
- watch: {
392
- deep: true,
393
- immediate: true,
394
- f_apply_type: function() {
395
- if (this.f_apply_type === "" || this.f_apply_type === null || this.f_apply_type === undefined){
396
- this.applyButton_disabled = true
397
- return
398
- }
399
- this.applyButton_disabled = false
400
- }
401
- }
402
- }
403
- </script>
404
- <style scoped>
405
- .operate{
406
- text-align: right;
407
- display: flex;
408
- align-items: center; /*子元素中线居中*/
409
- justify-content: flex-end; /*子元素靠右*/
410
- margin-top: 7px;
411
- }
412
- .head-but{
413
- margin-left: 5px;
414
- height: 34px;
415
- background-color: #6aa6e2;
416
- border-radius: 4px;
417
- font-family: PingFang;
418
- color: #ffffff;
419
- }
420
- </style>
1
+ <template>
2
+ <div>
3
+ <criteria-paged :model="model" v-ref:cp>
4
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div class="form-group col-sm-3">
8
+ <label class="font_normal_body">客户名称:</label>
9
+ <input type="text" class="input_search" v-model="model.f_user_name"
10
+ v-on:keyup.enter="search"
11
+ condition=" (f_user_name like '%{}%' or f_contact like '%{}%') " placeholder='二选一输入'>
12
+ </div>
13
+ <div class="form-group col-sm-3">
14
+ <label class="font_normal_body">报建编号:</label>
15
+ <input type="text" class="input_search" placeholder='报建编号' v-model="model.f_apply_num"
16
+ v-on:keyup.enter="search"
17
+ condition="u.f_apply_num like '%{}%'">
18
+ </div>
19
+ <div class="form-group col-sm-3">
20
+ <label class="font_normal_body">合同编号:</label>
21
+ <input type="text" class="input_search" placeholder='合同编号' v-model="model.f_contract_number"
22
+ v-on:keyup.enter="search"
23
+ condition="f_contract_number like '%{}%'">
24
+ </div>
25
+ <div class="form-group col-sm-3 button-range">
26
+ <button type="button" class="btn btn-info head-but" @click="$parent.$parent.show = !$parent.$parent.show">工程发起</button>
27
+ <button type="button" class="btn btn-info head-but" @click="search(),$parent.$parent.close()" v-el:cx>查询</button>
28
+ <button type="button" class="btn btn-info head-but" @click="$parent.$parent.loadPage()">返回</button>
29
+ <button type="button" class="btn btn-info head-but" @click="$parent.$parent.clear()">清空</button>
30
+ <button type="button" class="btn btn-info head-but" @click="$parent.$parent.applySendAll()" >批量回访</button>
31
+ <div
32
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
33
+ @click="$parent.$parent.hidden()"
34
+ class="button_spacing"
35
+ style="float: right">
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div class="row" v-show="$parent.$parent.criteriaShow">
40
+ <div class="form-group col-sm-3">
41
+ <label class="font_normal_body">用户地址:</label>
42
+ <input type="text" class="input_search" placeholder='用户地址' v-model="model.f_address"
43
+ v-on:keyup.enter="search"
44
+ condition="f_address like '%{}%'">
45
+ </div>
46
+ <div class="form-group col-sm-3">
47
+ <label class="font_normal_body">小&emsp;&emsp;区:</label>
48
+ <v-select
49
+ v-model="model.f_residential_area"
50
+ placeholder='请选择'
51
+ condition="u.f_residential_area = '{}'"
52
+ :value.sync="model.f_residential_area"
53
+ :options='$parent.$parent.area'
54
+ class="select select_list"
55
+ search="true"
56
+ :value-single="true"
57
+ close-on-select ></v-select>
58
+ </div>
59
+ <div class="form-group col-sm-3">
60
+ <label class="font_normal_body">票&emsp;&emsp;号:</label>
61
+ <input type="text" class="input_search" placeholder='票号' v-model="model.f_ticket_number"
62
+ v-on:keyup.enter="search"
63
+ condition="c.f_ticket_number like '%{}%'">
64
+ </div>
65
+ <div class="col-sm-3 form-group">
66
+ <label class="font_normal_body">报建类型:</label>
67
+ <v-select
68
+ v-model="model.f_apply_type"
69
+ placeholder='报建类型'
70
+ condition="f_apply_type like '%{}%'"
71
+ :value.sync="model.f_apply_type"
72
+ :options='$parent.$parent.completionApplytype'
73
+ class="select select_list"
74
+ :value-single="true"
75
+ close-on-select ></v-select>
76
+ </div>
77
+ <div class="col-sm-3 form-group">
78
+ <label class="font_normal_body">办理环节:</label>
79
+ <v-select
80
+ v-model="model.defname"
81
+ placeholder='办理环节'
82
+ condition="defname = '{}'"
83
+ :value.sync="model.defname"
84
+ :options='$parent.$parent.defnames'
85
+ class="select select_list"
86
+ :value-single="true"
87
+ close-on-select ></v-select>
88
+ </div>
89
+ <div class="form-group col-sm-3">
90
+ <label for="startDate" class="font_normal_body">开始时间:</label>
91
+ <datepicker id="startDate" placeholder="开始日期"
92
+ style="width: 60%!important;"
93
+ v-model="model.startDate"
94
+ :value.sync="model.startDate"
95
+ :format="'yyyy-MM-dd 00:00:00'"
96
+ :show-reset-button="true"
97
+ condition="f_apply_date >= '{}'">
98
+ </datepicker>
99
+ </div>
100
+ <div class="form-group col-sm-3">
101
+ <label for="endDate" class="font_normal_body">结束时间:</label>
102
+ <datepicker id="endDate" placeholder="结束日期"
103
+ style="width: 60%!important;"
104
+ v-model="model.endDate"
105
+ :value.sync="model.endDate"
106
+ :format="'yyyy-MM-dd 23:59:59'"
107
+ :show-reset-button="true"
108
+ condition="f_apply_date <= '{}'">
109
+ </datepicker>
110
+ </div>
111
+ <div class="form-group col-sm-3">
112
+ <label for="endDate" class="font_normal_body">收费日期:</label>
113
+ <datepicker id="f_charge_date" placeholder="收费日期"
114
+ style="width: 60%!important;"
115
+ v-model="model.f_charge_date"
116
+ :value.sync="model.f_charge_date"
117
+ :format="'yyyy-MM-dd'"
118
+ :show-reset-button="true"
119
+ condition="c.f_charge_date <= '{} 23:59:59' and c.f_charge_date >= '{} 00:00:00'">
120
+ </datepicker>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </criteria>
125
+ <data-grid :model="model" optional partial='list' v-ref:grid class="list_area table_sy">
126
+ <template partial='head'>
127
+ <tr>
128
+ <!-- <th>-->
129
+ <!-- <nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"/> 全选</nobr>-->
130
+ <!-- </th>-->
131
+ <th></th>
132
+ <th>序号</th>
133
+ <th>流程操作</th>
134
+ <th>报建编号</th>
135
+ <th>客户名称/联系人</th>
136
+ <th>当前状态</th>
137
+ <th>合同编号</th>
138
+ <th>流程状态</th>
139
+ <th>电话</th>
140
+ <th>地址</th>
141
+ <th>报建类型</th>
142
+ <th>报建日期</th>
143
+ </tr>
144
+ </template>
145
+ <template partial='body'>
146
+ <tr >
147
+ <td style="text-align: center;white-space:nowrap;">
148
+ <input type="checkbox" v-if="row.defname=='回访'" onClick="event.cancelBubble = true" :checked="$parent.$parent.$parent.isChecked(row)" @change="$parent.$parent.$parent.setCheckes(row)" />
149
+ </td>
150
+ <td style="text-align: center;">
151
+ <nobr><font>{{$index+1}}</font></nobr>
152
+ </td>
153
+ <td style="text-align: center;">
154
+ <dropdown>
155
+ <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
156
+ <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
157
+ </button>
158
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
159
+ <li>
160
+ <a href="#" @click="$parent.$parent.$parent.click(row)">{{row.defname}}</a>
161
+ </li>
162
+ </ul>
163
+ </dropdown>
164
+ </td>
165
+ <td style="text-align: center;">
166
+ <nobr><font>{{row.f_apply_num}}</font></nobr>
167
+ </td>
168
+ <td style="text-align: center;">
169
+ <nobr><font>{{row.f_user_name}}/{{row.f_contact}}</font></nobr>
170
+ </td>
171
+ <td style="text-align: center;">
172
+ <nobr><font>{{row.f_sub_state}}</font></nobr>
173
+ </td>
174
+ <td style="text-align: center;">
175
+ <nobr><font>{{row.f_contract_number}}</font></nobr>
176
+ </td>
177
+ <td style="text-align: center;">
178
+ <nobr><font>{{row.defname}}</font></nobr>
179
+ </td>
180
+ <td style="text-align: center;">
181
+ <nobr><font>{{row.f_phone}}</font></nobr>
182
+ </td>
183
+ <td style="text-align: center;">
184
+ <nobr><font>{{row.f_address}}</font></nobr>
185
+ </td>
186
+ <td style="text-align: center;">
187
+ <nobr><font>{{row.f_apply_type}}</font></nobr>
188
+ </td>
189
+ <td style="text-align: center;">
190
+ <nobr><font>{{row.f_apply_date}}</font></nobr>
191
+ </td>
192
+ </tr>
193
+ </template>
194
+ </data-grid>
195
+ </criteria-paged>
196
+
197
+ <modal
198
+ v-if="show"
199
+ :show.sync="show"
200
+ backdrop="false"
201
+ title="工程类型"
202
+ >
203
+ <div class="form-horizontal" slot="modal-body">
204
+ <div class="form-group" style="margin: 10px auto">
205
+ <label class="col-sm-3 control-label">报建类型:</label>
206
+ <div class="col-sm-9">
207
+ <v-select
208
+ v-model="f_apply_type"
209
+ placeholder='请选择需要发起的工程类型'
210
+ :value.sync="f_apply_type"
211
+ :options='applytype'
212
+ :value-single="true"
213
+ class="select select_list"
214
+ :search="false"
215
+ close-on-select ></v-select>
216
+ </div>
217
+ </div>
218
+ </div>
219
+ <footer slot="modal-footer" class="modal-footer">
220
+ <button
221
+ class="btn btn-default"
222
+ @click="this.show = !this.show">
223
+ 取消
224
+ </button>
225
+ <button
226
+ class="btn btn-primary"
227
+ type="button"
228
+ :disabled="applyButton_disabled"
229
+ @click="apply()">
230
+ 确认
231
+ </button>
232
+ </footer>
233
+ </modal>
234
+ </div>
235
+ </template>
236
+ <script>
237
+ import {PagedList} from 'vue-client'
238
+ import {HttpResetClass} from 'vue-client'
239
+ export default {
240
+ title: '工程列表',
241
+ data() {
242
+ return {
243
+ applytype: [{label:"集中报建",value:'集中报建'},{label:"非民用报建",value:'非民用报建'},{label:"散户报建",value:'散户报建'}], // 所有报建类型
244
+ defnames: [{label: '请先选择报建类型', value: ''}], // 所有办理环节
245
+ model: new PagedList('rs/sql/checkuser', 20, {
246
+ data: {
247
+ id: this.$login.f.id,
248
+ org: this.$login.f.orgs
249
+ }
250
+ }),
251
+ condition: '', // 查询条件
252
+ applys:[], // 选择的报建
253
+ checkAll: false, // 全选
254
+ f_apply_type: null, // 报建类型
255
+ startname: null, // 启动节点
256
+ criteriaShow: false,
257
+ show: false,
258
+ applyButton_disabled: true,
259
+ area:[]
260
+ }
261
+ },
262
+ ready() {
263
+ // 调用查询
264
+ this.$refs.cp.$refs.cri.search()
265
+ // 获取所有办理环节
266
+ this.getDefnames()
267
+ this.getAreaAll()
268
+ },
269
+ methods: {
270
+ applySendAll () {
271
+ if(this.applys.length==0){
272
+ this.$showMessage("请选择需要回访的报建")
273
+ return
274
+ }
275
+ //将选中的回访环节的数据,走到下一步
276
+ new HttpResetClass().load('post','rs/logic/CompleteVisit',
277
+ {data:{
278
+ apply:this.applys,
279
+ name:this.$login.f.name,
280
+ id:this.$login.f.id
281
+ }
282
+ },{resolveMsg:null,rejectMsg:null}).then(res=>{
283
+ this.$showMessage("回访成功")
284
+ this.$refs.cp.$refs.cri.search()
285
+ })
286
+ },
287
+ isChecked(v) {
288
+ // 如果全选,不在的按选中算,否则,在的按选中算
289
+ if (this.checkAll) {
290
+ return this.applys.indexOf(v.f_process_id) == -1
291
+ } else {
292
+ return this.applys.indexOf(v.f_process_id) != -1
293
+ }
294
+ },
295
+ setCheckes(row) {
296
+ if (!this.checkAll){
297
+ let index=this.applys.indexOf(row.f_process_id)
298
+ if(index<0){
299
+ this.applys.push(row.f_process_id)
300
+ }else{
301
+ this.applys.splice(index,1)
302
+ }
303
+ }
304
+ },
305
+ loadPage () {
306
+ this.$dispatch('loadPage')
307
+ },
308
+ clear () {
309
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
310
+ this.$refs.cp.$refs.cri.model[key] = ''
311
+ })
312
+ },
313
+ hidden() {
314
+ this.$dispatch('hidden', this.criteriaShow)
315
+ this.criteriaShow = !this.criteriaShow
316
+ },
317
+ // 获取所有办理环节
318
+ getDefnames() {
319
+ let http = new HttpResetClass()
320
+ http.load('POST', 'rs/logic/getAllDefname', {}, {
321
+ resolveMsg: null,
322
+ rejectMsg: null
323
+ }).then((res) => {
324
+ this.defnames = [{label: '全部', value: ''}, ...res.data]
325
+ })
326
+ console.log("this.defname",this.defnames)
327
+ },
328
+ // 报装申请
329
+ async apply () {
330
+ this.applyButton_disabled = true
331
+
332
+ if (this.f_apply_type === '集中报建') {
333
+ this.startname = '申请登记'
334
+ if (this.$login.f.deps !== '市场部') {
335
+ this.$showMessage("只能由市场部受理")
336
+ return
337
+ }
338
+ }
339
+ if (this.f_apply_type === '散户报建') {
340
+ this.startname = '申请登记'
341
+ if (this.$login.f.deps !== '销售客服部') {
342
+ this.$showMessage("只能由销售客服部受理")
343
+ return
344
+ }
345
+ }
346
+ if (this.f_apply_type === '非民用报建') {
347
+ this.startname = '申请登记'
348
+ if (this.$login.f.deps !== '市场部') {
349
+ this.$showMessage("只能由市场部受理")
350
+ return
351
+ }
352
+ }
353
+
354
+ let val = {
355
+ f_apply_type: this.f_apply_type,
356
+ defname: this.startname
357
+ }
358
+ // 调用ExplorationUser事件
359
+ this.$dispatch('apply', val)
360
+
361
+ this.show = false
362
+ this.f_apply_type = null
363
+ },
364
+ async getAreaAll () {
365
+ let http = new HttpResetClass()
366
+ let condition = "f_filialeid = " + this.$login.f.orgid
367
+ let res = await http.load('POST','rs/logic/apply_queryArea',{data:{condition:condition}}, {resolveMsg: null, rejectMsg: null})
368
+
369
+ this.area = res.data.queryArea.map(item => {
370
+ return {
371
+ 'label': item.f_residential_area,
372
+ 'value': item.f_residential_area,
373
+ }
374
+ })
375
+ },
376
+ // ExplorationUser 关闭组件
377
+ close() {
378
+ this.$dispatch('close')
379
+ },
380
+ // 点击操作
381
+ click(val) {
382
+ this.criteriaShow = false
383
+ this.$dispatch('apply', val)
384
+ }
385
+ },
386
+ computed: {
387
+ completionApplytype() {
388
+ return [{label:"全部",value:''},...this.applytype]
389
+ }
390
+ },
391
+ watch: {
392
+ deep: true,
393
+ immediate: true,
394
+ f_apply_type: function() {
395
+ if (this.f_apply_type === "" || this.f_apply_type === null || this.f_apply_type === undefined){
396
+ this.applyButton_disabled = true
397
+ return
398
+ }
399
+ this.applyButton_disabled = false
400
+ }
401
+ }
402
+ }
403
+ </script>
404
+ <style scoped>
405
+ .operate{
406
+ text-align: right;
407
+ display: flex;
408
+ align-items: center; /*子元素中线居中*/
409
+ justify-content: flex-end; /*子元素靠右*/
410
+ margin-top: 7px;
411
+ }
412
+ .head-but{
413
+ margin-left: 5px;
414
+ height: 34px;
415
+ background-color: #6aa6e2;
416
+ border-radius: 4px;
417
+ font-family: PingFang;
418
+ color: #ffffff;
419
+ }
420
+ </style>