apply-clients 3.5.5-90 → 3.5.5-91

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.5.5-90",
3
+ "version": "3.5.5-91",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,411 +1,421 @@
1
- <template>
2
- <div class="flex-row">
3
- <div class="basic-main">
4
- <criteria-paged :model="model" v-ref:cp>
5
- <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
6
- <div class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <div class="form-group col-sm-3">
9
- <label class="font_normal_body">组织机构:</label>
10
- <res-select
11
- restype='organization'
12
- :initresid='$parent.$parent.curorgid'
13
- @res-select="$parent.$parent.getorg"
14
- is-mul="false"
15
- ></res-select>
16
- </div>
17
- <div class="form-group col-sm-3">
18
- <label class="font_normal_body">工程编号:</label>
19
- <input type="text" style="width: 60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"
20
- v-on:keyup.enter="$parent.$parent.search()"
21
- condition="u.f_apply_num = '{}'">
22
- </div>
23
- <div class="form-group col-sm-3">
24
- <label class="font_normal_body">客户名称:</label>
25
- <input type="text" style="width: 60%" class="input_search" placeholder='客户名称' v-model="model.f_user_name"
26
- v-on:keyup.enter="$parent.$parent.search()"
27
- condition="u.f_user_name = '{}'">
28
- </div>
29
- <div class="form-group col-sm-3 button-range">
30
- <button class="button_export button_spacing" @click="$parent.$parent.batchPrint()">批量打印</button>
31
- <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
32
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
33
- <div
34
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
35
- @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"
36
- class="button_spacing"
37
- style="float: right">
38
- </div>
39
- </div>
40
- </div>
41
- <div class="row" v-show="$parent.$parent.criteriaShow">
42
- <div class="form-group col-sm-3">
43
- <label class="font_normal_body">用户编号:</label>
44
- <input type="text" style="width: 60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"
45
- v-on:keyup.enter="$parent.$parent.search()"
46
- condition="u.f_userinfo_code like '%{}%'">
47
- </div>
48
- <div class="form-group col-sm-3">
49
- <label class="font_normal_body">工单编号:</label>
50
- <input type="text" style="width: 60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"
51
- v-on:keyup.enter="$parent.$parent.search()"
52
- condition="u.f_child_apply_num like '%{}%'">
53
- </div>
54
- <div class="form-group col-sm-3">
55
- <label class="font_normal_body">报建类型:</label>
56
- <v-select
57
- v-model="model.f_apply_type"
58
- placeholder='报建类型'
59
- condition="u.f_apply_type in {}"
60
- :value.sync="model.f_apply_type"
61
- :options='$parent.$parent.applytype'
62
- class="select select_list"
63
- :multiple="true"
64
- ></v-select>
65
- </div>
66
- <div class="form-group col-sm-3">
67
- <label class="font_normal_body">报建性质:</label>
68
- <v-select
69
- v-model="model.f_apply_nature"
70
- placeholder='报建性质'
71
- condition="u.f_apply_nature = '{}'"
72
- :value.sync="model.f_apply_nature"
73
- :options='$parent.$parent.applyNatures'
74
- class="select select_list"
75
- :value-single="true"
76
- close-on-select ></v-select>
77
- </div>
78
- <div class="form-group col-sm-3">
79
- <label class="font_normal_body">施工人:</label>
80
- <input type="text" style="width: 60%" class="input_search"
81
- placeholder='施工人' v-model="model.f_shigong_people"
82
- v-on:keyup.enter="$parent.$parent.search()"
83
- condition="u.f_shigong_people like '%{}%'">
84
- </div>
85
- <div class="form-group col-sm-3">
86
- <label class="font_normal_body">派单人:</label>
87
- <input type="text" style="width: 60%" class="input_search"
88
- placeholder='派单人' v-model="model.sender"
89
- v-on:keyup.enter="$parent.$parent.search()"
90
- condition="act.sender like '%{}%'">
91
- </div>
92
-
93
- <div class="form-group col-sm-3">
94
- <label class="font_normal_body">电&emsp;&emsp;话:</label>
95
- <input type="text" style="width: 60%" class="input_search" placeholder='电话' v-model="model.f_phone"
96
- v-on:keyup.enter="$parent.$parent.search()"
97
- condition="u.f_phone = '{}'">
98
- </div>
99
- <div class="form-group col-sm-3">
100
- <label class="font_normal_body">地&emsp;&emsp;址:</label>
101
- <input type="text" style="width: 60%" class="input_search" placeholder='地址' v-model="model.f_address"
102
- v-on:keyup.enter="$parent.$parent.search()"
103
- condition="u.f_address like '%{}%'">
104
- </div>
105
- <div class="form-group col-sm-3">
106
- <label class="font_normal_body">安装单位:</label>
107
- <input type="text" style="width: 60%" class="input_search" placeholder='安装单位' v-model="model.f_construction_unit"
108
- v-on:keyup.enter="$parent.$parent.search()"
109
- condition="u.f_construction_unit = '{}'">
110
- </div>
111
- <div class="form-group col-sm-3">
112
- <label class="font_normal_body">是否打印:</label>
113
- <v-select
114
- v-model="model.f_prints_number"
115
- placeholder='是否打印'
116
- condition=" u.f_prints_number {}"
117
- :value.sync="model.f_prints_number"
118
- :options='$parent.$parent.isprints'
119
- class="select select_list"
120
- :value-single="true"
121
- close-on-select ></v-select>
122
- </div>
123
- <div class="form-group col-sm-3">
124
- <label for="startDate" class="font_normal_body">开始时间:</label>
125
- <datepicker id="startDate" placeholder="开始日期"
126
- style="width: 60%!important;"
127
- v-model="model.startDate"
128
- :value.sync="model.startDate"
129
- :format="'yyyy-MM-dd 00:00:00'"
130
- :show-reset-button="true"
131
- condition="u.f_construction_date >= '{}'">
132
- </datepicker>
133
- </div>
134
- <div class="form-group col-sm-3">
135
- <label for="endDate" class="font_normal_body">结束时间:</label>
136
- <datepicker id="endDate" placeholder="结束日期"
137
- style="width: 60%!important;"
138
- v-model="model.endDate"
139
- :value.sync="model.endDate"
140
- :format="'yyyy-MM-dd 23:59:59'"
141
- :show-reset-button="true"
142
- condition="u.f_construction_date <= '{}'">
143
- </datepicker>
144
- </div>
145
- <div class="form-group col-sm-3">
146
- <label for="startDate" class="font_normal_body">计划开工时间:</label>
147
- <datepicker id="startconstDate" placeholder="计划开工时间"
148
- style="width: 60%!important;"
149
- v-model="model.startconstDate"
150
- :value.sync="model.starconsttDate"
151
- :format="'yyyy-MM-dd 00:00:00'"
152
- :show-reset-button="true"
153
- condition="u.f_construction_date >= '{}'">
154
- </datepicker>
155
- </div>
156
- <div class="form-group col-sm-3">
157
- <label for="endDate" class="font_normal_body">计划开工时间:</label>
158
- <datepicker id="endconstDate" placeholder="计划开工时间"
159
- style="width: 60%!important;"
160
- v-model="model.endconstDate"
161
- :value.sync="model.endconstDate"
162
- :format="'yyyy-MM-dd 23:59:59'"
163
- :show-reset-button="true"
164
- condition="u.f_release_date <= '{}'">
165
- </datepicker>
166
- </div>
167
- <div class="form-group col-sm-3">
168
- <label for="startDate" class="font_normal_body">打印开始时间:</label>
169
- <datepicker id="startDate1" placeholder="打印开始日期"
170
- style="width: 60%!important;"
171
- v-model="model.startDate1"
172
- :value.sync="model.startDate1"
173
- :format="'yyyy-MM-dd 00:00:00'"
174
- :show-reset-button="true"
175
- condition="u.f_release_date >= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
176
- </datepicker>
177
- </div>
178
- <div class="form-group col-sm-3">
179
- <label for="endDate" class="font_normal_body">打印结束时间:</label>
180
- <datepicker id="endDate1" placeholder="打印结束日期"
181
- style="width: 60%!important;"
182
- v-model="model.endDate2"
183
- :value.sync="model.endDate2"
184
- :format="'yyyy-MM-dd 23:59:59'"
185
- :show-reset-button="true"
186
- condition="u.f_prints_date <= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
187
- </datepicker>
188
- </div>
189
- </div>
190
- </div>
191
- </criteria>
192
- <data-grid :model="model" optional partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
193
- <template partial='head'>
194
- <tr>
195
- <th>序号</th>
196
- <th>工程编号</th>
197
- <th>客户名称</th>
198
- <th>电话</th>
199
- <th>地址</th>
200
- <th>安装单位</th>
201
- <th>安装时间</th>
202
- <th>打印次数</th>
203
- <th>打印时间</th>
204
- </tr>
205
- </template>
206
- <template partial='body'>
207
- <tr>
208
- <td style="text-align: center;">
209
- <nobr><font>{{$index+1}}</font></nobr>
210
- </td>
211
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
212
- <nobr><font>{{row.f_apply_num}}</font></nobr>
213
- </td>
214
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
215
- <nobr><font>{{row.f_user_name}}</font></nobr>
216
- </td>
217
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
218
- <nobr><font>{{row.f_phone}}</font></nobr>
219
- </td>
220
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
221
- <nobr><font>{{row.f_address}}</font></nobr>
222
- </td>
223
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
224
- <nobr><font>{{row.f_construction_unit}}</font></nobr>
225
- </td>
226
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
227
- <nobr><font>{{row.f_construction_date}}</font></nobr>
228
- </td>
229
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
230
- <nobr><font>{{row.f_prints_number}}</font></nobr>
231
- </td>
232
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
233
- <nobr><font>{{row.f_prints_date}}</font></nobr>
234
- </td>
235
- </tr>
236
- </template>
237
- </data-grid>
238
- </criteria-paged>
239
-
240
- <modal :show.sync="showPrint" title="打印预览" v-ref:modal :backdrop="false">
241
- <header slot="modal-header" class="modal-header">
242
- <button type="button" class="close" @click="colseModal()"><span>&times;</span></button>
243
- <h4 class="modal-title">打印预览</h4>
244
- </header>
245
- <article slot="modal-body" class="modal-body">
246
- <print-build-order :selectdata="selectdata" :type="type" v-ref:print></print-build-order>
247
- </article>
248
- <footer slot="modal-footer" class="modal-footer">
249
- <button type="button" class="btn btn-primary" @click="print()">打印</button>
250
- </footer>
251
- </modal>
252
-
253
- <modal :show.sync="showProgress" v-ref:progress :backdrop="false">
254
- <header slot="modal-header" class="modal-header">
255
- <h4 class="modal-title">发送打印指令中,请耐心等待...</h4>
256
- </header>
257
- <article slot="modal-body" class="modal-body">
258
- <div class="progress" style="margin: 20px">
259
- <div class="progress-bar progress-bar-success progress-bar-striped active" :style="{width: percent}">
260
- {{ percent }}
261
- </div>
262
- </div>
263
- </article>
264
- <footer slot="modal-footer" class="modal-footer">
265
- </footer>
266
- </modal>
267
- </div>
268
- </div>
269
- </template>
270
-
271
- <script>
272
- import {PagedList} from 'vue-client'
273
- import {HttpResetClass} from 'vue-client'
274
- export default {
275
- title: '安装项目',
276
- data () {
277
- return {
278
- model: new PagedList('rs/sql/buildOrderList', 30, null),
279
- criteriaShow: false,
280
- curorgid: [this.$login.f.orgid],
281
- selectdata: null,
282
- showPrint: false,
283
- showProgress: false,
284
- percent: 0,
285
- type: 'PREVIEW',
286
- showRow:false,
287
- applytype: [{label: '全部', value: ''}, ...this.$appdata.getParam('报建类型')],
288
- applyNatures: [{label: '全部', value: ''},...this.$appdata.getParam('报建性质')],
289
- isprints: [{label: '全部', value: ''},{label: '是', value: '>0'},{label: '否', value: '=0'}],
290
- }
291
- },
292
- ready () {
293
- // 调用查询
294
- this.search()
295
- },
296
- methods: {
297
- async batchPrint () {
298
- let selectPrint = this.$refs.cp.$refs.grid.getRowData()
299
- if (selectPrint.length > 0) {
300
- let res = await this.$showMessage(`当前数据条数: ${selectPrint.length}, 条数过大时打印时间可能会过长, 是否确认打印?`)
301
- if (res == 'confirm') {
302
- for(var i=0;i<selectPrint.length;i++){
303
- if(selectPrint[i].f_prints_number==null){
304
- selectPrint[i].f_prints_number=0
305
- selectPrint[i].f_prints_number ++
306
- }else{
307
- selectPrint[i].f_prints_number ++
308
- }
309
- }
310
- console.log('打印内容',selectPrint)
311
- let http = new HttpResetClass()
312
- let data = {
313
- selectPrint:selectPrint
314
- }
315
- let res2 = await http.load('POST', 'rs/logic/getPrintsNumber', {data:data}, {
316
- resolveMsg: null,
317
- rejectMsg: '保存次数值失败!!!'
318
- })
319
- this.showProgress = true
320
- for (let i = 0; i < selectPrint.length; i++) {
321
- this.type = 'PRINT'
322
- await this.getData(selectPrint[i])
323
- this.print()
324
- this.percent = this.getPercent(i, selectPrint.length)
325
- console.log('-------------进度-----------')
326
- console.log(this.percent)
327
- }
328
- this.showProgress = false
329
- this.percent = 0
330
- this.$refs.cp.$refs.grid.selectInit()
331
- }
332
- } else {
333
- this.$showAlert('请选择要打印的单子', 'warning', 3000)
334
- }
335
- },
336
- getPercent (num, total){
337
- num = parseFloat(num);
338
- total = parseFloat(total);
339
- if (isNaN(num) || isNaN(total)) {
340
- return "-";
341
- }
342
- return total <= 0? "0%" : Math.round((num / total) * 10000) / 100.0 + "%";
343
- },
344
- print () {
345
- this.$refs.print.print()
346
- },
347
- colseModal () {
348
- this.showPrint = false
349
- this.selectdata = null
350
- },
351
- async click (row) {
352
- console.log("词条数据",row)
353
-
354
- this.type = 'PREVIEW'
355
-
356
- await this.getData(row)
357
-
358
- this.showPrint = true
359
- },
360
- async getData (row) {
361
- this.selectdata = null
362
-
363
- let http = new HttpResetClass()
364
- let data = {
365
- condition: `u.id=${row.id}`,
366
- }
367
- let res = await http.load('POST', 'rs/sql/buildOrderList', {data:data}, {
368
- resolveMsg: null,
369
- rejectMsg: '获取施工单失败!!!'
370
- })
371
-
372
- this.selectdata = res.data[0]
373
- console.log("打印数据 ",this.selectdata)
374
- if(this.selectdata.f_downloadpath !=null){
375
- let temp = this.selectdata.f_downloadpath
376
- let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
377
- this.selectdata.f_downloadpath = "http://" + location.host + "/" + URL
378
- debugger
379
- console.log('打印地址',this.selectdata.f_downloadpath)
380
- }else{
381
- this.selectdata.f_downloadpath=''
382
- }
383
- },
384
- clear () {
385
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
386
- this.$refs.cp.$refs.cri.model[key] = ''
387
- })
388
- },
389
- searchCondition (args) {
390
- args.condition = args.condition + ` and u.f_orgid = '${this.curorgid[0]}'`
391
- this.model.search(args.condition, args.model)
392
- },
393
- // 查询
394
- search () {
395
- this.$refs.cp.$refs.cri.search()
396
- },
397
- getorg (val) {
398
- if (val.length <= 0) {
399
- return
400
- }
401
- this.curorgid = val
402
- this.search()
403
- }
404
- },
405
- computed: {
406
- }
407
- }
408
- </script>
409
-
410
- <style scoped>
411
- </style>
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:cp>
5
+ <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
6
+ <div class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="form-group col-sm-3">
9
+ <label class="font_normal_body">组织机构:</label>
10
+ <res-select
11
+ restype='organization'
12
+ :initresid='$parent.$parent.curorgid'
13
+ @res-select="$parent.$parent.getorg"
14
+ is-mul="false"
15
+ ></res-select>
16
+ </div>
17
+ <div class="form-group col-sm-3">
18
+ <label class="font_normal_body">工程编号:</label>
19
+ <input type="text" style="width: 60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"
20
+ v-on:keyup.enter="$parent.$parent.search()"
21
+ condition="u.f_apply_num = '{}'">
22
+ </div>
23
+ <div class="form-group col-sm-3">
24
+ <label class="font_normal_body">客户名称:</label>
25
+ <input type="text" style="width: 60%" class="input_search" placeholder='客户名称' v-model="model.f_user_name"
26
+ v-on:keyup.enter="$parent.$parent.search()"
27
+ condition="u.f_user_name = '{}'">
28
+ </div>
29
+ <div class="form-group col-sm-3 button-range">
30
+ <button class="button_export button_spacing" @click="$parent.$parent.batchPrint()">批量打印</button>
31
+ <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
32
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
33
+ <div
34
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
35
+ @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"
36
+ class="button_spacing"
37
+ style="float: right">
38
+ </div>
39
+ </div>
40
+ </div>
41
+ <div class="row" v-show="$parent.$parent.criteriaShow">
42
+ <div class="form-group col-sm-3">
43
+ <label class="font_normal_body">用户编号:</label>
44
+ <input type="text" style="width: 60%" class="input_search" placeholder='用户编号' v-model="model.f_userinfo_code"
45
+ v-on:keyup.enter="$parent.$parent.search()"
46
+ condition="u.f_userinfo_code like '%{}%'">
47
+ </div>
48
+ <div class="form-group col-sm-3">
49
+ <label class="font_normal_body">子工单编号:</label>
50
+ <input type="text" style="width: 60%" class="input_search" placeholder='子工单编号' v-model="model.f_child_apply_num"
51
+ v-on:keyup.enter="$parent.$parent.search()"
52
+ condition="u.f_child_apply_num like '%{}%'">
53
+ </div>
54
+ <div class="form-group col-sm-3">
55
+ <label class="font_normal_body">报建类型:</label>
56
+ <v-select
57
+ v-model="model.f_apply_type"
58
+ placeholder='报建类型'
59
+ condition="u.f_apply_type in {}"
60
+ :value.sync="model.f_apply_type"
61
+ :options='$parent.$parent.applytype'
62
+ class="select select_list"
63
+ :multiple="true"
64
+ ></v-select>
65
+ </div>
66
+ <div class="form-group col-sm-3">
67
+ <label class="font_normal_body">报建性质:</label>
68
+ <v-select
69
+ v-model="model.f_apply_nature"
70
+ placeholder='报建性质'
71
+ condition="u.f_apply_nature = '{}'"
72
+ :value.sync="model.f_apply_nature"
73
+ :options='$parent.$parent.applyNatures'
74
+ class="select select_list"
75
+ :value-single="true"
76
+ close-on-select ></v-select>
77
+ </div>
78
+ <div class="form-group col-sm-3">
79
+ <label class="font_normal_body">施工人:</label>
80
+ <input type="text" style="width: 60%" class="input_search"
81
+ placeholder='施工人' v-model="model.f_shigong_people"
82
+ v-on:keyup.enter="$parent.$parent.search()"
83
+ condition="u.f_shigong_people like '%{}%'">
84
+ </div>
85
+ <div class="form-group col-sm-3">
86
+ <label class="font_normal_body">派单人:</label>
87
+ <input type="text" style="width: 60%" class="input_search"
88
+ placeholder='派单人' v-model="model.sender"
89
+ v-on:keyup.enter="$parent.$parent.search()"
90
+ condition="act.sender like '%{}%'">
91
+ </div>
92
+
93
+ <div class="form-group col-sm-3">
94
+ <label class="font_normal_body">电&emsp;&emsp;话:</label>
95
+ <input type="text" style="width: 60%" class="input_search" placeholder='电话' v-model="model.f_phone"
96
+ v-on:keyup.enter="$parent.$parent.search()"
97
+ condition="u.f_phone = '{}'">
98
+ </div>
99
+ <div class="form-group col-sm-3">
100
+ <label class="font_normal_body">地&emsp;&emsp;址:</label>
101
+ <input type="text" style="width: 60%" class="input_search" placeholder='地址' v-model="model.f_address"
102
+ v-on:keyup.enter="$parent.$parent.search()"
103
+ condition="u.f_address like '%{}%'">
104
+ </div>
105
+ <div class="form-group col-sm-3">
106
+ <label class="font_normal_body">安装单位:</label>
107
+ <input type="text" style="width: 60%" class="input_search" placeholder='安装单位' v-model="model.f_construction_unit"
108
+ v-on:keyup.enter="$parent.$parent.search()"
109
+ condition="u.f_construction_unit = '{}'">
110
+ </div>
111
+ <div class="form-group col-sm-3">
112
+ <label class="font_normal_body">是否打印:</label>
113
+ <v-select
114
+ v-model="model.f_prints_number"
115
+ placeholder='是否打印'
116
+ condition=" u.f_prints_number {}"
117
+ :value.sync="model.f_prints_number"
118
+ :options='$parent.$parent.isprints'
119
+ class="select select_list"
120
+ :value-single="true"
121
+ close-on-select ></v-select>
122
+ </div>
123
+ <div class="form-group col-sm-3">
124
+ <label for="startDate" class="font_normal_body">开始时间:</label>
125
+ <datepicker id="startDate" placeholder="开始日期"
126
+ style="width: 60%!important;"
127
+ v-model="model.startDate"
128
+ :value.sync="model.startDate"
129
+ :format="'yyyy-MM-dd 00:00:00'"
130
+ :show-reset-button="true"
131
+ condition="u.f_construction_date >= '{}'">
132
+ </datepicker>
133
+ </div>
134
+ <div class="form-group col-sm-3">
135
+ <label for="endDate" class="font_normal_body">结束时间:</label>
136
+ <datepicker id="endDate" placeholder="结束日期"
137
+ style="width: 60%!important;"
138
+ v-model="model.endDate"
139
+ :value.sync="model.endDate"
140
+ :format="'yyyy-MM-dd 23:59:59'"
141
+ :show-reset-button="true"
142
+ condition="u.f_construction_date <= '{}'">
143
+ </datepicker>
144
+ </div>
145
+ <div class="form-group col-sm-3">
146
+ <label for="startDate" class="font_normal_body">计划开工时间:</label>
147
+ <datepicker id="startconstDate" placeholder="计划开工时间"
148
+ style="width: 60%!important;"
149
+ v-model="model.startconstDate"
150
+ :value.sync="model.starconsttDate"
151
+ :format="'yyyy-MM-dd 00:00:00'"
152
+ :show-reset-button="true"
153
+ condition="u.f_construction_date >= '{}'">
154
+ </datepicker>
155
+ </div>
156
+ <div class="form-group col-sm-3">
157
+ <label for="endDate" class="font_normal_body">计划开工时间:</label>
158
+ <datepicker id="endconstDate" placeholder="计划开工时间"
159
+ style="width: 60%!important;"
160
+ v-model="model.endconstDate"
161
+ :value.sync="model.endconstDate"
162
+ :format="'yyyy-MM-dd 23:59:59'"
163
+ :show-reset-button="true"
164
+ condition="u.f_release_date <= '{}'">
165
+ </datepicker>
166
+ </div>
167
+ <div class="form-group col-sm-3">
168
+ <label for="startDate" class="font_normal_body">打印开始时间:</label>
169
+ <datepicker id="startDate1" placeholder="打印开始日期"
170
+ style="width: 60%!important;"
171
+ v-model="model.startDate1"
172
+ :value.sync="model.startDate1"
173
+ :format="'yyyy-MM-dd 00:00:00'"
174
+ :show-reset-button="true"
175
+ condition="u.f_release_date >= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
176
+ </datepicker>
177
+ </div>
178
+ <div class="form-group col-sm-3">
179
+ <label for="endDate" class="font_normal_body">打印结束时间:</label>
180
+ <datepicker id="endDate1" placeholder="打印结束日期"
181
+ style="width: 60%!important;"
182
+ v-model="model.endDate2"
183
+ :value.sync="model.endDate2"
184
+ :format="'yyyy-MM-dd 23:59:59'"
185
+ :show-reset-button="true"
186
+ condition="u.f_prints_date <= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
187
+ </datepicker>
188
+ </div>
189
+ <div class="form-group col-sm-3">
190
+ <label class="font_normal_body">打印次数:</label>
191
+ <input type="text" style="width: 60%" class="input_search" placeholder='打印次数' v-model="model.f_prints_number"
192
+ v-on:keyup.enter="$parent.$parent.search()"
193
+ condition="u.f_prints_number = '{}'">
194
+ </div>
195
+ </div>
196
+ </div>
197
+ </criteria>
198
+ <data-grid :model="model" optional partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
199
+ <template partial='head'>
200
+ <tr>
201
+ <th>序号</th>
202
+ <th>工程编号</th>
203
+ <th>客户名称</th>
204
+ <th>电话</th>
205
+ <th>地址</th>
206
+ <th>施工内容</th>
207
+ <th>安装单位</th>
208
+ <th>安装时间</th>
209
+ <th>打印次数</th>
210
+ <th>打印时间</th>
211
+ </tr>
212
+ </template>
213
+ <template partial='body'>
214
+ <tr>
215
+ <td style="text-align: center;">
216
+ <nobr><font>{{$index+1}}</font></nobr>
217
+ </td>
218
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
219
+ <nobr><font>{{row.f_apply_num}}</font></nobr>
220
+ </td>
221
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
222
+ <nobr><font>{{row.f_user_name}}</font></nobr>
223
+ </td>
224
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
225
+ <nobr><font>{{row.f_phone}}</font></nobr>
226
+ </td>
227
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
228
+ <nobr><font>{{row.f_address}}</font></nobr>
229
+ </td>
230
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
231
+ <nobr><font>{{row.f_install_situation}}</font></nobr>
232
+ </td>
233
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
234
+ <nobr><font>{{row.f_construction_unit}}</font></nobr>
235
+ </td>
236
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
237
+ <nobr><font>{{row.f_construction_date}}</font></nobr>
238
+ </td>
239
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
240
+ <nobr><font>{{row.f_prints_number}}</font></nobr>
241
+ </td>
242
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
243
+ <nobr><font>{{row.f_prints_date}}</font></nobr>
244
+ </td>
245
+ </tr>
246
+ </template>
247
+ </data-grid>
248
+ </criteria-paged>
249
+
250
+ <modal :show.sync="showPrint" title="打印预览" v-ref:modal :backdrop="false">
251
+ <header slot="modal-header" class="modal-header">
252
+ <button type="button" class="close" @click="colseModal()"><span>&times;</span></button>
253
+ <h4 class="modal-title">打印预览</h4>
254
+ </header>
255
+ <article slot="modal-body" class="modal-body">
256
+ <print-build-order :selectdata="selectdata" :type="type" v-ref:print></print-build-order>
257
+ </article>
258
+ <footer slot="modal-footer" class="modal-footer">
259
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
260
+ </footer>
261
+ </modal>
262
+
263
+ <modal :show.sync="showProgress" v-ref:progress :backdrop="false">
264
+ <header slot="modal-header" class="modal-header">
265
+ <h4 class="modal-title">发送打印指令中,请耐心等待...</h4>
266
+ </header>
267
+ <article slot="modal-body" class="modal-body">
268
+ <div class="progress" style="margin: 20px">
269
+ <div class="progress-bar progress-bar-success progress-bar-striped active" :style="{width: percent}">
270
+ {{ percent }}
271
+ </div>
272
+ </div>
273
+ </article>
274
+ <footer slot="modal-footer" class="modal-footer">
275
+ </footer>
276
+ </modal>
277
+ </div>
278
+ </div>
279
+ </template>
280
+
281
+ <script>
282
+ import {PagedList} from 'vue-client'
283
+ import {HttpResetClass} from 'vue-client'
284
+ export default {
285
+ title: '安装项目',
286
+ data () {
287
+ return {
288
+ model: new PagedList('rs/sql/buildOrderList', 30, null),
289
+ criteriaShow: false,
290
+ curorgid: [this.$login.f.orgid],
291
+ selectdata: null,
292
+ showPrint: false,
293
+ showProgress: false,
294
+ percent: 0,
295
+ type: 'PREVIEW',
296
+ showRow:false,
297
+ applytype: [{label: '全部', value: ''}, ...this.$appdata.getParam('报建类型')],
298
+ applyNatures: [{label: '全部', value: ''},...this.$appdata.getParam('报建性质')],
299
+ isprints: [{label: '全部', value: ''},{label: '是', value: '>0'},{label: '否', value: '=0'}],
300
+ }
301
+ },
302
+ ready () {
303
+ // 调用查询
304
+ this.search()
305
+ },
306
+ methods: {
307
+ async batchPrint () {
308
+ let selectPrint = this.$refs.cp.$refs.grid.getRowData()
309
+ if (selectPrint.length > 0) {
310
+ let res = await this.$showMessage(`当前数据条数: ${selectPrint.length}, 条数过大时打印时间可能会过长, 是否确认打印?`)
311
+ if (res == 'confirm') {
312
+ for(var i=0;i<selectPrint.length;i++){
313
+ if(selectPrint[i].f_prints_number==null){
314
+ selectPrint[i].f_prints_number=0
315
+ selectPrint[i].f_prints_number ++
316
+ }else{
317
+ selectPrint[i].f_prints_number ++
318
+ }
319
+ }
320
+ console.log('打印内容',selectPrint)
321
+ let http = new HttpResetClass()
322
+ let data = {
323
+ selectPrint:selectPrint
324
+ }
325
+ let res2 = await http.load('POST', 'rs/logic/getPrintsNumber', {data:data}, {
326
+ resolveMsg: null,
327
+ rejectMsg: '保存次数值失败!!!'
328
+ })
329
+ this.showProgress = true
330
+ for (let i = 0; i < selectPrint.length; i++) {
331
+ this.type = 'PRINT'
332
+ await this.getData(selectPrint[i])
333
+ this.print()
334
+ this.percent = this.getPercent(i, selectPrint.length)
335
+ console.log('-------------进度-----------')
336
+ console.log(this.percent)
337
+ }
338
+ this.showProgress = false
339
+ this.percent = 0
340
+ this.$refs.cp.$refs.grid.selectInit()
341
+ }
342
+ } else {
343
+ this.$showAlert('请选择要打印的单子', 'warning', 3000)
344
+ }
345
+ },
346
+ getPercent (num, total){
347
+ num = parseFloat(num);
348
+ total = parseFloat(total);
349
+ if (isNaN(num) || isNaN(total)) {
350
+ return "-";
351
+ }
352
+ return total <= 0? "0%" : Math.round((num / total) * 10000) / 100.0 + "%";
353
+ },
354
+ print () {
355
+ this.$refs.print.print()
356
+ },
357
+ colseModal () {
358
+ this.showPrint = false
359
+ this.selectdata = null
360
+ },
361
+ async click (row) {
362
+ console.log("词条数据",row)
363
+
364
+ this.type = 'PREVIEW'
365
+
366
+ await this.getData(row)
367
+
368
+ this.showPrint = true
369
+ },
370
+ async getData (row) {
371
+ this.selectdata = null
372
+
373
+ let http = new HttpResetClass()
374
+ let data = {
375
+ condition: `u.id=${row.id}`,
376
+ }
377
+ let res = await http.load('POST', 'rs/sql/buildOrderList', {data:data}, {
378
+ resolveMsg: null,
379
+ rejectMsg: '获取施工单失败!!!'
380
+ })
381
+
382
+ this.selectdata = res.data[0]
383
+ console.log("打印数据 ",this.selectdata)
384
+ if(this.selectdata.f_downloadpath !=null){
385
+ let temp = this.selectdata.f_downloadpath
386
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
387
+ this.selectdata.f_downloadpath = "http://" + location.host + "/" + URL
388
+ debugger
389
+ console.log('打印地址',this.selectdata.f_downloadpath)
390
+ }else{
391
+ this.selectdata.f_downloadpath=''
392
+ }
393
+ },
394
+ clear () {
395
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
396
+ this.$refs.cp.$refs.cri.model[key] = ''
397
+ })
398
+ },
399
+ searchCondition (args) {
400
+ args.condition = args.condition + ` and u.f_orgid = '${this.curorgid[0]}'`
401
+ this.model.search(args.condition, args.model)
402
+ },
403
+ // 查询
404
+ search () {
405
+ this.$refs.cp.$refs.cri.search()
406
+ },
407
+ getorg (val) {
408
+ if (val.length <= 0) {
409
+ return
410
+ }
411
+ this.curorgid = val
412
+ this.search()
413
+ }
414
+ },
415
+ computed: {
416
+ }
417
+ }
418
+ </script>
419
+
420
+ <style scoped>
421
+ </style>