apply-clients 4.1.73 → 4.1.76

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,354 +1,373 @@
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-4">
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="$parent.$parent.search()" condition=" f_entry_name = '{}' " placeholder='请输入'>
11
- </div>
12
- <div class="form-group col-sm-3">
13
- <label class="font_normal_body">报建编号:</label>
14
- <input type="text" class="input_search" placeholder='报建编号' v-model="model.f_apply_num"
15
- v-on:keyup.enter="$parent.$parent.search()"
16
- condition="f_apply_num = '{}'">
17
- </div>
18
- <div class="form-group col-sm-5 button-range">
19
- <button class="button_new button_spacing" style="width: max-content"
20
- v-if="this.$login.f.rolesnames.indexOf('市场部报装') !== -1 || this.$login.f.rolesnames.indexOf('工程部报装') !== -1"
21
- @click="$parent.$parent.showModal = !$parent.$parent.showModal">工程发起</button>
22
- <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
23
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
24
- <div
25
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
26
- @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"
27
- class="button_spacing"
28
- style="float: right">
29
- </div>
30
- </div>
31
- </div>
32
- <div class="row" v-show="$parent.$parent.criteriaShow">
33
- <div class="form-group col-sm-3">
34
- <label class="font_normal_body">合同编号:</label>
35
- <input type="text" class="input_search" placeholder='合同编号' v-model="model.f_apply_num"
36
- v-on:keyup.enter="$parent.$parent.search()"
37
- condition="f_apply_num = '{}'">
38
- </div>
39
- <div class="form-group col-sm-3">
40
- <label class="font_normal_body">报建类型:</label>
41
- <v-select
42
- v-model="model.f_apply_type"
43
- placeholder='报建类型'
44
- condition="f_apply_type like '%{}%'"
45
- :value.sync="model.f_apply_type"
46
- :options='$parent.$parent.applytype'
47
- class="select select_list"
48
- :value-single="true"
49
- @change="$parent.$parent.applyTypeChange()"
50
- close-on-select ></v-select>
51
- </div>
52
- <div class="form-group col-sm-3">
53
- <label class="font_normal_body">办理环节:</label>
54
- <v-select
55
- v-model="model.defname"
56
- placeholder='办理环节'
57
- condition="defname = '{}'"
58
- :value.sync="model.defname"
59
- :options='$parent.$parent.defnames'
60
- class="select select_list"
61
- :value-single="true"
62
- close-on-select ></v-select>
63
- </div>
64
- <!-- <div class="form-group col-sm-3">-->
65
- <!-- <label class="font_normal_body">联系电话:</label>-->
66
- <!-- <input type="text" class="input_search" placeholder='联系电话' v-model="model.f_phone"-->
67
- <!-- v-on:keyup.enter="$parent.$parent.search()"-->
68
- <!-- condition="f_phone like '%{}%'">-->
69
- <!-- </div>-->
70
- <!-- <div class="form-group col-sm-3">-->
71
- <!-- <label class="font_normal_body">用户地址:</label>-->
72
- <!-- <input type="text" class="input_search" placeholder='用户地址' v-model="model.f_address"-->
73
- <!-- v-on:keyup.enter="$parent.$parent.search()"-->
74
- <!-- condition="f_address like '%{}%'">-->
75
- <!-- </div>-->
76
- <div class="form-group col-sm-3">
77
- <label for="startDate" class="font_normal_body">开始时间:</label>
78
- <datepicker id="startDate" placeholder="开始日期"
79
- style="width: 60%!important;"
80
- v-model="model.startDate"
81
- :value.sync="model.startDate"
82
- :format="'yyyy-MM-dd HH:mm:ss'"
83
- :show-reset-button="true"
84
- condition="f_apply_date >= '{}'">
85
- </datepicker>
86
- </div>
87
- <div class="form-group col-sm-3">
88
- <label for="endDate" class="font_normal_body">结束时间:</label>
89
- <datepicker id="endDate" placeholder="结束日期"
90
- style="width: 60%!important;"
91
- v-model="model.endDate"
92
- :value.sync="model.endDate"
93
- :format="'yyyy-MM-dd HH:mm:ss'"
94
- :show-reset-button="true"
95
- condition="f_apply_date <= '{}'">
96
- </datepicker>
97
- </div>
98
- </div>
99
- </div>
100
- </criteria>
101
- <data-grid v-if="$parent.showData" :model="model" partial='list' v-ref:grid class="list_area table_sy" style="height: 100%">
102
- <template partial='head'>
103
- <tr>
104
- <th style="white-space: nowrap;">序号</th>
105
- <th style="white-space: nowrap;">报建编号</th>
106
- <th style="white-space: nowrap;">项目名称</th>
107
- <th style="white-space: nowrap;">合同编号</th>
108
- <!-- <th style="white-space: nowrap;">电话</th>-->
109
- <!-- <th style="white-space: nowrap;">地址</th>-->
110
- <th style="white-space: nowrap;">报建类型</th>
111
- <th style="white-space: nowrap;">办理环节</th>
112
- <th style="white-space: nowrap;">流程状态</th>
113
- <th style="white-space: nowrap;">报建日期</th>
114
- <th style="white-space: nowrap;">操作</th>
115
- </tr>
116
- </template>
117
- <template partial='body'>
118
- <tr >
119
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
120
- <nobr><font>{{$index+1}}</font></nobr>
121
- </td>
122
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
123
- <nobr><font>{{row.f_apply_num}}</font></nobr>
124
- </td>
125
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
126
- <nobr><font>{{row.f_entry_name}}</font></nobr>
127
- </td>
128
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
129
- <nobr><font>{{row.f_contract_number}}</font></nobr>
130
- </td>
131
- <!-- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">-->
132
- <!-- <nobr><font>{{row.f_phone}}</font></nobr>-->
133
- <!-- </td>-->
134
- <!-- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">-->
135
- <!-- <nobr><font>{{row.f_address}}</font></nobr>-->
136
- <!-- </td>-->
137
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
138
- <nobr><font>{{row.f_apply_type}}</font></nobr>
139
- </td>
140
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
141
- <nobr><font>{{row.defname}}</font></nobr>
142
- </td>
143
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
144
- <nobr><font>{{row.f_sub_state}}</font></nobr>
145
- </td>
146
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
147
- <nobr><font>{{row.f_apply_date}}</font></nobr>
148
- </td>
149
- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
150
- <dropdown>
151
- <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
152
- <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
153
- </button>
154
- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
155
- <li>
156
- <a href="#" @click="$parent.$parent.$parent.click(row)">{{row.defname}}</a>
157
- </li>
158
- </ul>
159
- </dropdown>
160
- </td>
161
- </tr>
162
- </template>
163
- </data-grid>
164
- </criteria-paged>
165
-
166
- <modal
167
- v-if="showModal"
168
- :show.sync="showModal"
169
- backdrop="false"
170
- title="工程类型"
171
- cancel-text="取消"
172
- ok-text="确认"
173
- :callback="apply"
174
- >
175
- <div class="form-horizontal" slot="modal-body">
176
- <div class="form-group" style="margin: 10px auto">
177
- <label class="col-sm-3 control-label">报建类型:</label>
178
- <div class="col-sm-9">
179
- <v-select
180
- v-model="f_apply_type"
181
- placeholder='请选择需要发起的工程类型'
182
- :value.sync="f_apply_type"
183
- :options='$appdata.getParam("报建类型")'
184
- :value-single="true"
185
- class="select select_list"
186
- :search="false"
187
- close-on-select ></v-select>
188
- </div>
189
- </div>
190
- </div>
191
- </modal>
192
- </div>
193
- </template>
194
- <script>
195
- import {PagedList} from 'vue-client'
196
- import {HttpResetClass} from 'vue-client'
197
- import {isEmpty} from '../../Util'
198
- export default {
199
- title: '工程列表',
200
- props: ['showData'],
201
- data () {
202
- return {
203
- // applytype: [{label: '全部', value: ''}, ...this.$appdata.getParam('报建类型')], // 所有报建类型
204
- // applytype: [{label: '散户集体报建', value: '散户集体报建'}, {label: '散户报建', value: '散户报建'}, {label: '开发商集体报建', value: '开发商集体报建'},{label: '工业户报建', value: '工业户报建'}],
205
- defnames: [{label: '全部', value: ''}], // 流程节点
206
- model: new PagedList('rs/sql/checkuser', 20, {
207
- data: {
208
- id: this.$login.f.id,
209
- orgid: this.$login.f.orgid
210
- }
211
- }),
212
- f_apply_type: '', // 报建类型
213
- // startname: null, // 启动节点
214
- criteriaShow: false, // 控制查询条件显示
215
- showModal: false // 控制发起类型选择
216
-
217
- }
218
- },
219
- ready () {
220
- // 调用查询
221
- this.search()
222
- },
223
- methods: {
224
- clear () {
225
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
226
- this.$refs.cp.$refs.cri.model[key] = []
227
- })
228
- },
229
- // 查询
230
- search () {
231
- this.$dispatch('search')
232
- },
233
- // 根据保健类型获取对应的流程节点
234
- applyTypeChange () {
235
- if (!isEmpty(this.$refs.cp.$refs.cri.model.f_apply_type)) {
236
- let http = new HttpResetClass()
237
- http.load('POST', 'rs/logic/getDefnameByType', {
238
- f_apply_type: this.$refs.cp.$refs.cri.model.f_apply_type
239
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
240
- this.defnames = [{label: '全部', value: ''}, ...res.data]
241
- })
242
- } else {
243
- this.defnames = [{label: '全部', value: ''}]
244
- }
245
- },
246
- // 获取流程id
247
- async getProcessId(processname) {
248
- let http = new HttpResetClass()
249
- let data = {
250
- workname: processname
251
- }
252
- let res = await http.load('POST', 'rs/logic/getProcessId', {data: data}, {resolveMsg: null, rejectMsg: null})
253
-
254
- return res.data
255
- },
256
- // 报装申请
257
- async apply () {
258
- if (this.f_apply_type === '' || this.f_apply_type === null) {
259
- this.$showAlert('请选择需要发起的类型', 'warning', 3000)
260
- return
261
- }
262
- let val = {
263
- f_apply_type: this.f_apply_type
264
- }
265
- if (this.f_apply_type === '散户报建') {
266
- val.defname = '报建登记'
267
- val.f_user_type='民用'
268
- val.processname = '散户报建流程'
269
- } else if (this.f_apply_type === '工商户报建') {
270
- val.defname = '报建登记'
271
- val.f_user_type='非民用'
272
- val.processname = '工商户报建流程'
273
- } else if (this.f_apply_type === '散户集体报建') {
274
- val.defname = '报建登记'
275
- val.f_user_type='民用'
276
- val.processname = '散户集体报建流程'
277
- } else if (this.f_apply_type === '开发商集体报建') {
278
- val.f_user_type='民用'
279
- val.defname = '报建登记'
280
- val.processname = '开发商集体报建流程'
281
- } else if (this.f_apply_type === '煤改气报建') {
282
- val.defname = '报建登记'
283
- val.processname = '散户集体报建流程'
284
- } else {
285
- this.$showMessage('暂无此类报装')
286
- return
287
- }
288
- // if (this.f_apply_type === '综合报建') {
289
- // val.defname = '报建登记'
290
- // val.processname = '报建流程'
291
- // } else {
292
- // this.$showMessage('暂无此类报装')
293
- // return
294
- // }
295
-
296
- val.f_sub_state = "新增"
297
- val.f_process_id = await this.getProcessId(val.processname)
298
- // 调用ExplorationUser事件
299
- this.$dispatch('apply', val)
300
- this.f_apply_type = null
301
- this.showModal = false
302
- },
303
- // 点击操作
304
- click (val) {
305
- this.$dispatch('apply', val)
306
- }
307
- },
308
- computed: {
309
- },
310
- watch: {
311
- 'model.rows': {
312
- handler: function () {
313
- let isover = [] // 过期(超时)数据
314
- let isbeforeover = [] // 未过期 提前提醒
315
- for (let i = 0; i < this.model.rows.length; i++) {
316
- let item = this.model.rows[i]
317
- if (item.isover === '过期') {
318
- isover.push(i + 1)
319
- }
320
- if (item.isbeforeover === '预期提醒') {
321
- isbeforeover.push(i + 1)
322
- }
323
- }
324
- let msg = null
325
- if (isover.length > 0) {
326
- msg = `第${isover.toString()}条数据已过期`
327
- this.$showAlert(msg, 'warning', 3000)
328
- }
329
-
330
- if (isbeforeover.length > 0) {
331
- msg = `第${isbeforeover.toString()}条数据即将过期`
332
- if (isover.length > 0) {
333
- setTimeout(() => {
334
- this.$showAlert(msg, 'warning', 3000)
335
- }, 4000)
336
- } else {
337
- this.$showAlert(msg, 'warning', 3000)
338
- }
339
- }
340
- }
341
- }
342
- }
343
- }
344
- </script>
345
- <style scoped>
346
-
347
- .p1 {
348
- color: #dc0b12;
349
- font-weight:bold
350
- }
351
- .p {
352
- color: #ffaf4f;
353
- }
354
- </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-4">
8
+ <label class="font_normal_body">项目名称:</label>
9
+ <input type="text" class="input_search" v-model="model.f_entry_name"
10
+ v-on:keyup.enter="$parent.$parent.search()" condition=" f_entry_name = '{}' " placeholder='请输入'>
11
+ </div>
12
+ <div class="form-group col-sm-3">
13
+ <label class="font_normal_body">报建编号:</label>
14
+ <input type="text" class="input_search" placeholder='报建编号' v-model="model.f_apply_num"
15
+ v-on:keyup.enter="$parent.$parent.search()"
16
+ condition="f_apply_num = '{}'">
17
+ </div>
18
+ <div class="form-group col-sm-5 button-range">
19
+ <button class="button_new button_spacing" style="width: max-content"
20
+ v-if="$parent.$parent.projectStart"
21
+ @click="$parent.$parent.showModal = !$parent.$parent.showModal">工程发起</button>
22
+ <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
23
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
24
+ <div
25
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
26
+ @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"
27
+ class="button_spacing"
28
+ style="float: right">
29
+ </div>
30
+ </div>
31
+ </div>
32
+ <div class="row" v-show="$parent.$parent.criteriaShow">
33
+ <div class="form-group col-sm-3">
34
+ <label class="font_normal_body">合同编号:</label>
35
+ <input type="text" class="input_search" placeholder='合同编号' v-model="model.f_contract_number"
36
+ v-on:keyup.enter="$parent.$parent.search()"
37
+ condition="f_apply_num = '{}'">
38
+ </div>
39
+ <div class="form-group col-sm-3">
40
+ <label class="font_normal_body">报建类型:</label>
41
+ <v-select
42
+ v-model="model.f_apply_type"
43
+ placeholder='报建类型'
44
+ condition="f_apply_type like '%{}%'"
45
+ :value.sync="model.f_apply_type"
46
+ :options='$parent.$parent.applytype'
47
+ class="select select_list"
48
+ :value-single="true"
49
+ @change="$parent.$parent.applyTypeChange()"
50
+ close-on-select ></v-select>
51
+ </div>
52
+ <div class="form-group col-sm-3">
53
+ <label class="font_normal_body">办理环节:</label>
54
+ <v-select
55
+ v-model="model.defname"
56
+ placeholder='办理环节'
57
+ condition="defname = '{}'"
58
+ :value.sync="model.defname"
59
+ :options='$parent.$parent.defnames'
60
+ class="select select_list"
61
+ :value-single="true"
62
+ close-on-select ></v-select>
63
+ </div>
64
+ <div class="form-group col-sm-3">
65
+ <label class="font_normal_body">流程状态:</label>
66
+ <v-select
67
+ v-model="model.f_sub_state"
68
+ placeholder='流程状态'
69
+ condition="f_sub_state = '{}'"
70
+ :value.sync="model.f_sub_state"
71
+ :options='$parent.$parent.f_sub_state'
72
+ class="select select_list"
73
+ :value-single="true"
74
+ close-on-select ></v-select>
75
+ </div>
76
+ <!-- <div class="form-group col-sm-3">-->
77
+ <!-- <label class="font_normal_body">联系电话:</label>-->
78
+ <!-- <input type="text" class="input_search" placeholder='联系电话' v-model="model.f_phone"-->
79
+ <!-- v-on:keyup.enter="$parent.$parent.search()"-->
80
+ <!-- condition="f_phone like '%{}%'">-->
81
+ <!-- </div>-->
82
+ <!-- <div class="form-group col-sm-3">-->
83
+ <!-- <label class="font_normal_body">用户地址:</label>-->
84
+ <!-- <input type="text" class="input_search" placeholder='用户地址' v-model="model.f_address"-->
85
+ <!-- v-on:keyup.enter="$parent.$parent.search()"-->
86
+ <!-- condition="f_address like '%{}%'">-->
87
+ <!-- </div>-->
88
+ <div class="form-group col-sm-3">
89
+ <label for="startDate" class="font_normal_body">开始时间:</label>
90
+ <datepicker id="startDate" placeholder="开始日期"
91
+ style="width: 60%!important;"
92
+ v-model="model.startDate"
93
+ :value.sync="model.startDate"
94
+ :format="'yyyy-MM-dd HH:mm:ss'"
95
+ :show-reset-button="true"
96
+ condition="f_apply_date >= '{}'">
97
+ </datepicker>
98
+ </div>
99
+ <div class="form-group col-sm-3">
100
+ <label for="endDate" class="font_normal_body">结束时间:</label>
101
+ <datepicker id="endDate" placeholder="结束日期"
102
+ style="width: 60%!important;"
103
+ v-model="model.endDate"
104
+ :value.sync="model.endDate"
105
+ :format="'yyyy-MM-dd HH:mm:ss'"
106
+ :show-reset-button="true"
107
+ condition="f_apply_date <= '{}'">
108
+ </datepicker>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </criteria>
113
+ <data-grid v-if="$parent.showData" :model="model" partial='list' v-ref:grid class="list_area table_sy" style="height: 100%">
114
+ <template partial='head'>
115
+ <tr>
116
+ <th style="white-space: nowrap;">序号</th>
117
+ <th style="white-space: nowrap;">报建编号</th>
118
+ <th style="white-space: nowrap;">项目名称</th>
119
+ <th style="white-space: nowrap;">合同编号</th>
120
+ <!-- <th style="white-space: nowrap;">电话</th>-->
121
+ <!-- <th style="white-space: nowrap;">地址</th>-->
122
+ <th style="white-space: nowrap;">报建类型</th>
123
+ <th style="white-space: nowrap;">办理环节</th>
124
+ <th style="white-space: nowrap;">流程状态</th>
125
+ <th style="white-space: nowrap;">报建日期</th>
126
+ <th style="white-space: nowrap;">操作</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 :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
135
+ <nobr><font>{{row.f_apply_num}}</font></nobr>
136
+ </td>
137
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
138
+ <nobr><font>{{row.f_entry_name}}</font></nobr>
139
+ </td>
140
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
141
+ <nobr><font>{{row.f_contract_number}}</font></nobr>
142
+ </td>
143
+ <!-- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">-->
144
+ <!-- <nobr><font>{{row.f_phone}}</font></nobr>-->
145
+ <!-- </td>-->
146
+ <!-- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">-->
147
+ <!-- <nobr><font>{{row.f_address}}</font></nobr>-->
148
+ <!-- </td>-->
149
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
150
+ <nobr><font>{{row.f_apply_type}}</font></nobr>
151
+ </td>
152
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
153
+ <nobr><font>{{row.defname}}</font></nobr>
154
+ </td>
155
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
156
+ <nobr><font>{{row.f_sub_state}}</font></nobr>
157
+ </td>
158
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
159
+ <nobr><font>{{row.f_apply_date}}</font></nobr>
160
+ </td>
161
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
162
+ <dropdown>
163
+ <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
164
+ <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
165
+ </button>
166
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
167
+ <li>
168
+ <a href="#" @click="$parent.$parent.$parent.click(row)">{{row.defname}}</a>
169
+ </li>
170
+ </ul>
171
+ </dropdown>
172
+ </td>
173
+ </tr>
174
+ </template>
175
+ </data-grid>
176
+ </criteria-paged>
177
+
178
+ <modal
179
+ v-if="showModal"
180
+ :show.sync="showModal"
181
+ backdrop="false"
182
+ title="工程类型"
183
+ cancel-text="取消"
184
+ ok-text="确认"
185
+ :callback="apply"
186
+ >
187
+ <div class="form-horizontal" slot="modal-body">
188
+ <div class="form-group" style="margin: 10px auto">
189
+ <label class="col-sm-3 control-label">报建类型:</label>
190
+ <div class="col-sm-9">
191
+ <v-select
192
+ v-model="f_apply_type"
193
+ placeholder='请选择需要发起的工程类型'
194
+ :value.sync="f_apply_type"
195
+ :options='$appdata.getParam("报建类型")'
196
+ :value-single="true"
197
+ class="select select_list"
198
+ :search="false"
199
+ close-on-select ></v-select>
200
+ </div>
201
+ </div>
202
+ </div>
203
+ </modal>
204
+ </div>
205
+ </template>
206
+ <script>
207
+ import {PagedList} from 'vue-client'
208
+ import {HttpResetClass} from 'vue-client'
209
+ import {isEmpty} from '../../Util'
210
+ export default {
211
+ title: '工程列表',
212
+ props: ['showData'],
213
+ data () {
214
+ return {
215
+ applytype: [{label: '全部', value: ''}, ...this.$appdata.getParam('报建类型')], // 所有报建类型
216
+ // applytype: [{label: '散户集体报建', value: '散户集体报建'}, {label: '散户报建', value: '散户报建'}, {label: '开发商集体报建', value: '开发商集体报建'},{label: '工业户报建', value: '工业户报建'}],
217
+ defnames: [{label: '全部', value: ''}, ...this.$appdata.getParam('办理环节')], // 流程节点
218
+ f_sub_state:[{label: '全部', value: ''}, {label: '完工', value: '完工'}, {label: '正在进行', value: '正在进行'}],
219
+ model: new PagedList('rs/sql/checkuser', 20, {
220
+ data: {
221
+ id: this.$login.f.id,
222
+ orgid: this.$login.f.orgid
223
+ }
224
+ }),
225
+ f_apply_type: '', // 报建类型
226
+ // startname: null, // 启动节点
227
+ criteriaShow: false, // 控制查询条件显示
228
+ showModal: false // 控制发起类型选择
229
+
230
+ }
231
+ },
232
+ ready () {
233
+ // 调用查询
234
+ this.search()
235
+ },
236
+ methods: {
237
+ clear () {
238
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
239
+ this.$refs.cp.$refs.cri.model[key] = []
240
+ })
241
+ },
242
+ // 查询
243
+ search () {
244
+ this.$dispatch('search')
245
+ },
246
+ // 根据保健类型获取对应的流程节点
247
+ applyTypeChange () {
248
+ if (!isEmpty(this.$refs.cp.$refs.cri.model.f_apply_type)) {
249
+ let http = new HttpResetClass()
250
+ http.load('POST', 'rs/logic/getDefnameByType', {
251
+ f_apply_type: this.$refs.cp.$refs.cri.model.f_apply_type
252
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
253
+ this.defnames = [{label: '全部', value: ''}, ...res.data]
254
+ })
255
+ } else {
256
+ this.defnames = [{label: '全部', value: ''}, ...this.$appdata.getParam('办理环节')]
257
+ }
258
+ },
259
+ // 获取流程id
260
+ async getProcessId(processname) {
261
+ let http = new HttpResetClass()
262
+ let data = {
263
+ workname: processname
264
+ }
265
+ let res = await http.load('POST', 'rs/logic/getProcessId', {data: data}, {resolveMsg: null, rejectMsg: null})
266
+
267
+ return res.data
268
+ },
269
+ // 报装申请
270
+ async apply () {
271
+ if (this.f_apply_type === '' || this.f_apply_type === null) {
272
+ this.$showAlert('请选择需要发起的类型', 'warning', 3000)
273
+ return
274
+ }
275
+ let val = {
276
+ f_apply_type: this.f_apply_type
277
+ }
278
+ if (this.f_apply_type === '散户报建') {
279
+ val.defname = '报建登记'
280
+ val.f_user_type='民用'
281
+ val.processname = '散户报建流程'
282
+ } else if (this.f_apply_type === '工商户报建') {
283
+ val.defname = '报建登记'
284
+ val.f_user_type='非民用'
285
+ val.processname = '工商户报建流程'
286
+ } else if (this.f_apply_type === '散户集体报建') {
287
+ val.defname = '报建登记'
288
+ val.f_user_type='民用'
289
+ val.processname = '散户集体报建流程'
290
+ } else if (this.f_apply_type === '开发商集体报建') {
291
+ val.f_user_type='民用'
292
+ val.defname = '报建登记'
293
+ val.processname = '开发商集体报建流程'
294
+ } else if (this.f_apply_type === '煤改气报建') {
295
+ val.defname = '报建登记'
296
+ val.processname = '散户集体报建流程'
297
+ } else if (this.f_apply_type === '拆改装报建') {
298
+ val.defname = '业务申请'
299
+ val.processname = '拆改装流程'
300
+ } else {
301
+ this.$showMessage('暂无此类报装')
302
+ return
303
+ }
304
+ // if (this.f_apply_type === '综合报建') {
305
+ // val.defname = '报建登记'
306
+ // val.processname = '报建流程'
307
+ // } else {
308
+ // this.$showMessage('暂无此类报装')
309
+ // return
310
+ // }
311
+
312
+ val.f_sub_state = "新增"
313
+ val.f_process_id = await this.getProcessId(val.processname)
314
+ // 调用ExplorationUser事件
315
+ this.$dispatch('apply', val)
316
+ this.f_apply_type = null
317
+ this.showModal = false
318
+ },
319
+ // 点击操作
320
+ click (val) {
321
+ this.$dispatch('apply', val)
322
+ }
323
+ },
324
+ computed: {
325
+ projectStart () {
326
+ return this.$login.r.includes('报建发起')
327
+ }
328
+ },
329
+ watch: {
330
+ 'model.rows': {
331
+ handler: function () {
332
+ let isover = [] // 过期(超时)数据
333
+ let isbeforeover = [] // 未过期 提前提醒
334
+ for (let i = 0; i < this.model.rows.length; i++) {
335
+ let item = this.model.rows[i]
336
+ if (item.isover === '过期') {
337
+ isover.push(i + 1)
338
+ }
339
+ if (item.isbeforeover === '预期提醒') {
340
+ isbeforeover.push(i + 1)
341
+ }
342
+ }
343
+ let msg = null
344
+ if (isover.length > 0) {
345
+ msg = `第${isover.toString()}条数据已过期`
346
+ this.$showAlert(msg, 'warning', 3000)
347
+ }
348
+
349
+ if (isbeforeover.length > 0) {
350
+ msg = `第${isbeforeover.toString()}条数据即将过期`
351
+ if (isover.length > 0) {
352
+ setTimeout(() => {
353
+ this.$showAlert(msg, 'warning', 3000)
354
+ }, 4000)
355
+ } else {
356
+ this.$showAlert(msg, 'warning', 3000)
357
+ }
358
+ }
359
+ }
360
+ }
361
+ }
362
+ }
363
+ </script>
364
+ <style scoped>
365
+
366
+ .p1 {
367
+ color: #dc0b12;
368
+ font-weight:bold
369
+ }
370
+ .p {
371
+ color: #ffaf4f;
372
+ }
373
+ </style>