apply-clients 7.1.44 → 7.1.47

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