apply-clients 3.4.52 → 3.4.54

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.
Files changed (59) hide show
  1. package/build/dev-server.js +4 -4
  2. package/package.json +2 -2
  3. package/src/App.vue +21 -20
  4. package/src/apply.js +113 -113
  5. package/src/applyAndroid.js +53 -53
  6. package/src/components/android/AppServiceView.vue +745 -745
  7. package/src/components/android/AppSign.vue +154 -154
  8. package/src/components/android/Process/AppExplorationUser.vue +507 -507
  9. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  10. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  11. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  12. package/src/components/android/Process/Processes/AppInstallationDetails.vue +482 -482
  13. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  14. package/src/components/product/Business/BusinessApply.vue +269 -269
  15. package/src/components/product/Business/CivilApply.vue +269 -269
  16. package/src/components/product/GroupByApply/ApplyGroupByList.vue +253 -253
  17. package/src/components/product/GroupByApply/ApplyGroupByMain.vue +53 -53
  18. package/src/components/product/GroupByApply/ApplyGroupByPaper.vue +376 -376
  19. package/src/components/product/Material/MaterialDetailed.vue +262 -262
  20. package/src/components/product/OldApply/Monitor/MonitorApply.vue +360 -360
  21. package/src/components/product/Print/BuildOrder/printBuildOrder.vue +157 -157
  22. package/src/components/product/Print/IgnitionBill/IgnitionBill.vue +259 -259
  23. package/src/components/product/Print/IgnitionBill/printIgnitionBill.vue +168 -168
  24. package/src/components/product/Process/ExplorationSelect.vue +495 -495
  25. package/src/components/product/Process/ExplorationUser.vue +189 -189
  26. package/src/components/product/Process/Processes/InstallationDetails.vue +610 -610
  27. package/src/components/product/Process/Processes/Print/printCharge.vue +166 -166
  28. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  29. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +211 -211
  30. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  31. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  32. package/src/components/product/Process/Service/ServiceControl.vue +1923 -1923
  33. package/src/components/product/ServiceView.vue +981 -981
  34. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +10 -4
  35. package/src/components/product/Supervisory/SupervisoryControl.vue +137 -137
  36. package/src/components/product/Supervisory/SupervisoryList.vue +404 -404
  37. package/src/components/product/VueUtils/ApplyUpload.vue +292 -275
  38. package/src/filiale/gehua/pc/ExplorationSelect.vue +483 -483
  39. package/src/filiale/gehua/pc/ServiceControl.vue +1929 -1929
  40. package/src/filiale/gehua/pc/SupervisoryControl.vue +137 -137
  41. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  42. package/src/filiale/gehua/pc/buildOrderList.vue +339 -339
  43. package/src/filiale/gehua/pc/printBuildOrder.vue +243 -243
  44. package/src/filiale/gehua/pc.js +11 -11
  45. package/src/filiale/guangxi/android/Process/AppExplorationUser.vue +503 -503
  46. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +470 -470
  47. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  48. package/src/filiale/guangxi/android/Process/Processes/AppInstallationDetails.vue +482 -482
  49. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  50. package/src/filiale/guangxi/android/Process/Processes/AppServiceView.vue +766 -766
  51. package/src/filiale/guangxi/android.js +9 -9
  52. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  53. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +702 -702
  54. package/src/filiale/guangxi/pc/Process/ExplorationSelect.vue +538 -538
  55. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  56. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  57. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +482 -482
  58. package/src/filiale/guangxi/pc.js +15 -15
  59. package/src/main.js +23 -23
@@ -1,339 +1,339 @@
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="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">电&emsp;&emsp;话:</label>
44
- <input type="text" style="width: 60%" class="input_search" placeholder='电话' v-model="model.f_phone"
45
- v-on:keyup.enter="$parent.$parent.search()"
46
- condition="f_phone = '{}'">
47
- </div>
48
- <div class="form-group col-sm-3">
49
- <label class="font_normal_body">地&emsp;&emsp;址:</label>
50
- <input type="text" style="width: 60%" class="input_search" placeholder='地址' v-model="model.f_address"
51
- v-on:keyup.enter="$parent.$parent.search()"
52
- condition="f_address like '%{}%'">
53
- </div>
54
- <div class="form-group col-sm-3">
55
- <label class="font_normal_body">安装单位:</label>
56
- <input type="text" style="width: 60%" class="input_search" placeholder='安装单位' v-model="model.f_construction_unit"
57
- v-on:keyup.enter="$parent.$parent.search()"
58
- condition="f_construction_unit = '{}'">
59
- </div>
60
- <div class="form-group col-sm-3">
61
- <label class="font_normal_body">是否打印:</label>
62
- <v-select
63
- v-model="model.f_prints_number"
64
- placeholder='是否打印'
65
- condition=" f_prints_number {}"
66
- :value.sync="model.f_prints_number"
67
- :options='$parent.$parent.isprints'
68
- class="select select_list"
69
- :value-single="true"
70
- close-on-select ></v-select>
71
- </div>
72
- <div class="form-group col-sm-3">
73
- <label for="startDate" class="font_normal_body">开始时间:</label>
74
- <datepicker id="startDate" placeholder="开始日期"
75
- style="width: 60%!important;"
76
- v-model="model.startDate"
77
- :value.sync="model.startDate"
78
- :format="'yyyy-MM-dd 00:00:00'"
79
- :show-reset-button="true"
80
- condition="f_construction_date >= '{}'">
81
- </datepicker>
82
- </div>
83
- <div class="form-group col-sm-3">
84
- <label for="endDate" class="font_normal_body">结束时间:</label>
85
- <datepicker id="endDate" placeholder="结束日期"
86
- style="width: 60%!important;"
87
- v-model="model.endDate"
88
- :value.sync="model.endDate"
89
- :format="'yyyy-MM-dd 23:59:59'"
90
- :show-reset-button="true"
91
- condition="f_construction_date <= '{}'">
92
- </datepicker>
93
- </div>
94
-
95
- <div class="form-group col-sm-3">
96
- <label for="startDate" class="font_normal_body">打印开始时间:</label>
97
- <datepicker id="startDate1" placeholder="打印开始日期"
98
- style="width: 60%!important;"
99
- v-model="model.startDate1"
100
- :value.sync="model.startDate1"
101
- :format="'yyyy-MM-dd 00:00:00'"
102
- :show-reset-button="true"
103
- condition="f_prints_date >= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
104
- </datepicker>
105
- </div>
106
- <div class="form-group col-sm-3">
107
- <label for="endDate" class="font_normal_body">打印结束时间:</label>
108
- <datepicker id="endDate1" placeholder="打印结束日期"
109
- style="width: 60%!important;"
110
- v-model="model.endDate2"
111
- :value.sync="model.endDate2"
112
- :format="'yyyy-MM-dd 23:59:59'"
113
- :show-reset-button="true"
114
- condition="f_prints_date <= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
115
- </datepicker>
116
- </div>
117
- </div>
118
- </div>
119
- </criteria>
120
- <data-grid :model="model" optional partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
121
- <template partial='head'>
122
- <tr>
123
- <th>序号</th>
124
- <th>工程编号</th>
125
- <th>客户名称</th>
126
- <th>电话</th>
127
- <th>地址</th>
128
- <th>安装单位</th>
129
- <th>安装时间</th>
130
- <th>打印次数</th>
131
- <th>打印时间</th>
132
- </tr>
133
- </template>
134
- <template partial='body'>
135
- <tr >
136
- <td v-if="row.f_back_reason ? showRow: !showRow" style="text-align: center;">
137
- <nobr><font>{{$index+1}}</font></nobr>
138
- </td>
139
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
140
- <nobr><font>{{row.f_apply_num}}</font></nobr>
141
- </td>
142
- <td v-if="row.f_back_reason ? showRow: !showRow" style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
143
- <nobr><font>{{row.f_user_name}}</font></nobr>
144
- </td>
145
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
146
- <nobr><font>{{row.f_phone}}</font></nobr>
147
- </td>
148
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
149
- <nobr><font>{{row.f_address}}</font></nobr>
150
- </td>
151
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
152
- <nobr><font>{{row.f_construction_unit}}</font></nobr>
153
- </td>
154
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
155
- <nobr><font>{{row.f_construction_date}}</font></nobr>
156
- </td>
157
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
158
- <nobr><font>{{row.f_prints_number}}</font></nobr>
159
- </td>
160
- <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
161
- <nobr><font>{{row.f_prints_date}}</font></nobr>
162
- </td>
163
- </tr>
164
- </template>
165
- </data-grid>
166
- </criteria-paged>
167
-
168
- <modal :show.sync="showPrint" title="打印预览" v-ref:modal :backdrop="false">
169
- <header slot="modal-header" class="modal-header">
170
- <button type="button" class="close" @click="colseModal()"><span>&times;</span></button>
171
- <h4 class="modal-title">打印预览</h4>
172
- </header>
173
- <article slot="modal-body" class="modal-body">
174
- <print-build-order :selectdata="selectdata" :type="type" v-ref:print></print-build-order>
175
- </article>
176
- <footer slot="modal-footer" class="modal-footer">
177
- <button type="button" class="btn btn-primary" @click="print()">打印</button>
178
- </footer>
179
- </modal>
180
-
181
- <modal :show.sync="showProgress" v-ref:progress :backdrop="false">
182
- <header slot="modal-header" class="modal-header">
183
- <h4 class="modal-title">发送打印指令中,请耐心等待...</h4>
184
- </header>
185
- <article slot="modal-body" class="modal-body">
186
- <div class="progress" style="margin: 20px">
187
- <div class="progress-bar progress-bar-success progress-bar-striped active" :style="{width: percent}">
188
- {{ percent }}
189
- </div>
190
- </div>
191
- </article>
192
- <footer slot="modal-footer" class="modal-footer">
193
- </footer>
194
- </modal>
195
- </div>
196
- </div>
197
- </template>
198
-
199
- <script>
200
- import {PagedList} from 'vue-client'
201
- import {HttpResetClass} from 'vue-client'
202
- export default {
203
- title: '安装项目',
204
- data () {
205
- return {
206
- model: new PagedList('rs/sql/buildOrderList', 30, null),
207
- criteriaShow: false,
208
- curorgid: [this.$login.f.orgid],
209
- selectdata: null,
210
- showPrint: false,
211
- showProgress: false,
212
- percent: 0,
213
- type: 'PREVIEW',
214
- showRow:false,
215
- isprints: [{label: '全部', value: ''},{label: '是', value: '>0'},{label: '否', value: '=0'}],
216
- }
217
- },
218
- ready () {
219
- // 调用查询
220
- this.search()
221
- },
222
- methods: {
223
- async batchPrint () {
224
- let selectPrint = this.$refs.cp.$refs.grid.getRowData()
225
- if (selectPrint.length > 0) {
226
- let res = await this.$showMessage(`当前数据条数: ${selectPrint.length}, 条数过大时打印时间可能会过长, 是否确认打印?`)
227
- if (res == 'confirm') {
228
- for(var i=0;i<selectPrint.length;i++){
229
- if(selectPrint[i].f_prints_number==null){
230
- selectPrint[i].f_prints_number=0
231
- selectPrint[i].f_prints_number ++
232
- }else{
233
- selectPrint[i].f_prints_number ++
234
- }
235
- }
236
- console.log('打印内容',selectPrint)
237
- let http = new HttpResetClass()
238
- let data = {
239
- selectPrint:selectPrint
240
- }
241
- let res2 = await http.load('POST', 'rs/logic/getPrintsNumber', {data:data}, {
242
- resolveMsg: null,
243
- rejectMsg: '保存次数值失败!!!'
244
- })
245
- this.showProgress = true
246
- for (let i = 0; i < selectPrint.length; i++) {
247
- this.type = 'PRINT'
248
- await this.getData(selectPrint[i])
249
- this.print()
250
- this.percent = this.getPercent(i, selectPrint.length)
251
- console.log('-------------进度-----------')
252
- console.log(this.percent)
253
- }
254
- this.showProgress = false
255
- this.percent = 0
256
- this.$refs.cp.$refs.grid.selectInit()
257
- }
258
- } else {
259
- this.$showAlert('请选择要打印的单子', 'warning', 3000)
260
- }
261
- },
262
- getPercent (num, total){
263
- num = parseFloat(num);
264
- total = parseFloat(total);
265
- if (isNaN(num) || isNaN(total)) {
266
- return "-";
267
- }
268
- return total <= 0? "0%" : Math.round((num / total) * 10000) / 100.0 + "%";
269
- },
270
- print () {
271
- this.$refs.print.print()
272
- },
273
- colseModal () {
274
- this.showPrint = false
275
- this.selectdata = null
276
- },
277
- async click (row) {
278
- console.log("词条数据",row)
279
-
280
- this.type = 'PREVIEW'
281
-
282
- await this.getData(row)
283
-
284
- this.showPrint = true
285
- },
286
- async getData (row) {
287
- this.selectdata = null
288
-
289
- let http = new HttpResetClass()
290
- let data = {
291
- f_process_id: row.f_process_id,
292
- actid: row.actid
293
- }
294
- let res = await http.load('POST', 'rs/sql/getBuildOrder', {data:data}, {
295
- resolveMsg: null,
296
- rejectMsg: '获取施工单失败!!!'
297
- })
298
-
299
- this.selectdata = res.data[0]
300
- debugger
301
- console.log("打印数据 ",this.selectdata)
302
- if(this.selectdata.f_downloadpath !=null){
303
- let temp = this.selectdata.f_downloadpath
304
- let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
305
- this.selectdata.f_downloadpath = "http://" + location.host + "/" + URL
306
- debugger
307
- console.log('打印地址',this.selectdata.f_downloadpath)
308
- }else{
309
- this.selectdata.f_downloadpath=''
310
- }
311
- },
312
- clear () {
313
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
314
- this.$refs.cp.$refs.cri.model[key] = ''
315
- })
316
- },
317
- searchCondition (args) {
318
- args.condition = args.condition + ` and u.f_orgid = '${this.curorgid[0]}'`
319
- this.model.search(args.condition, args.model)
320
- },
321
- // 查询
322
- search () {
323
- this.$refs.cp.$refs.cri.search()
324
- },
325
- getorg (val) {
326
- if (val.length <= 0) {
327
- return
328
- }
329
- this.curorgid = val
330
- this.search()
331
- }
332
- },
333
- computed: {
334
- }
335
- }
336
- </script>
337
-
338
- <style scoped>
339
- </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="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">电&emsp;&emsp;话:</label>
44
+ <input type="text" style="width: 60%" class="input_search" placeholder='电话' v-model="model.f_phone"
45
+ v-on:keyup.enter="$parent.$parent.search()"
46
+ condition="f_phone = '{}'">
47
+ </div>
48
+ <div class="form-group col-sm-3">
49
+ <label class="font_normal_body">地&emsp;&emsp;址:</label>
50
+ <input type="text" style="width: 60%" class="input_search" placeholder='地址' v-model="model.f_address"
51
+ v-on:keyup.enter="$parent.$parent.search()"
52
+ condition="f_address like '%{}%'">
53
+ </div>
54
+ <div class="form-group col-sm-3">
55
+ <label class="font_normal_body">安装单位:</label>
56
+ <input type="text" style="width: 60%" class="input_search" placeholder='安装单位' v-model="model.f_construction_unit"
57
+ v-on:keyup.enter="$parent.$parent.search()"
58
+ condition="f_construction_unit = '{}'">
59
+ </div>
60
+ <div class="form-group col-sm-3">
61
+ <label class="font_normal_body">是否打印:</label>
62
+ <v-select
63
+ v-model="model.f_prints_number"
64
+ placeholder='是否打印'
65
+ condition=" f_prints_number {}"
66
+ :value.sync="model.f_prints_number"
67
+ :options='$parent.$parent.isprints'
68
+ class="select select_list"
69
+ :value-single="true"
70
+ close-on-select ></v-select>
71
+ </div>
72
+ <div class="form-group col-sm-3">
73
+ <label for="startDate" class="font_normal_body">开始时间:</label>
74
+ <datepicker id="startDate" placeholder="开始日期"
75
+ style="width: 60%!important;"
76
+ v-model="model.startDate"
77
+ :value.sync="model.startDate"
78
+ :format="'yyyy-MM-dd 00:00:00'"
79
+ :show-reset-button="true"
80
+ condition="f_construction_date >= '{}'">
81
+ </datepicker>
82
+ </div>
83
+ <div class="form-group col-sm-3">
84
+ <label for="endDate" class="font_normal_body">结束时间:</label>
85
+ <datepicker id="endDate" placeholder="结束日期"
86
+ style="width: 60%!important;"
87
+ v-model="model.endDate"
88
+ :value.sync="model.endDate"
89
+ :format="'yyyy-MM-dd 23:59:59'"
90
+ :show-reset-button="true"
91
+ condition="f_construction_date <= '{}'">
92
+ </datepicker>
93
+ </div>
94
+
95
+ <div class="form-group col-sm-3">
96
+ <label for="startDate" class="font_normal_body">打印开始时间:</label>
97
+ <datepicker id="startDate1" placeholder="打印开始日期"
98
+ style="width: 60%!important;"
99
+ v-model="model.startDate1"
100
+ :value.sync="model.startDate1"
101
+ :format="'yyyy-MM-dd 00:00:00'"
102
+ :show-reset-button="true"
103
+ condition="f_prints_date >= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
104
+ </datepicker>
105
+ </div>
106
+ <div class="form-group col-sm-3">
107
+ <label for="endDate" class="font_normal_body">打印结束时间:</label>
108
+ <datepicker id="endDate1" placeholder="打印结束日期"
109
+ style="width: 60%!important;"
110
+ v-model="model.endDate2"
111
+ :value.sync="model.endDate2"
112
+ :format="'yyyy-MM-dd 23:59:59'"
113
+ :show-reset-button="true"
114
+ condition="f_prints_date <= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
115
+ </datepicker>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </criteria>
120
+ <data-grid :model="model" optional partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
121
+ <template partial='head'>
122
+ <tr>
123
+ <th>序号</th>
124
+ <th>工程编号</th>
125
+ <th>客户名称</th>
126
+ <th>电话</th>
127
+ <th>地址</th>
128
+ <th>安装单位</th>
129
+ <th>安装时间</th>
130
+ <th>打印次数</th>
131
+ <th>打印时间</th>
132
+ </tr>
133
+ </template>
134
+ <template partial='body'>
135
+ <tr >
136
+ <td v-if="row.f_back_reason ? showRow: !showRow" style="text-align: center;">
137
+ <nobr><font>{{$index+1}}</font></nobr>
138
+ </td>
139
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
140
+ <nobr><font>{{row.f_apply_num}}</font></nobr>
141
+ </td>
142
+ <td v-if="row.f_back_reason ? showRow: !showRow" style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
143
+ <nobr><font>{{row.f_user_name}}</font></nobr>
144
+ </td>
145
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
146
+ <nobr><font>{{row.f_phone}}</font></nobr>
147
+ </td>
148
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
149
+ <nobr><font>{{row.f_address}}</font></nobr>
150
+ </td>
151
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
152
+ <nobr><font>{{row.f_construction_unit}}</font></nobr>
153
+ </td>
154
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
155
+ <nobr><font>{{row.f_construction_date}}</font></nobr>
156
+ </td>
157
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
158
+ <nobr><font>{{row.f_prints_number}}</font></nobr>
159
+ </td>
160
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
161
+ <nobr><font>{{row.f_prints_date}}</font></nobr>
162
+ </td>
163
+ </tr>
164
+ </template>
165
+ </data-grid>
166
+ </criteria-paged>
167
+
168
+ <modal :show.sync="showPrint" title="打印预览" v-ref:modal :backdrop="false">
169
+ <header slot="modal-header" class="modal-header">
170
+ <button type="button" class="close" @click="colseModal()"><span>&times;</span></button>
171
+ <h4 class="modal-title">打印预览</h4>
172
+ </header>
173
+ <article slot="modal-body" class="modal-body">
174
+ <print-build-order :selectdata="selectdata" :type="type" v-ref:print></print-build-order>
175
+ </article>
176
+ <footer slot="modal-footer" class="modal-footer">
177
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
178
+ </footer>
179
+ </modal>
180
+
181
+ <modal :show.sync="showProgress" v-ref:progress :backdrop="false">
182
+ <header slot="modal-header" class="modal-header">
183
+ <h4 class="modal-title">发送打印指令中,请耐心等待...</h4>
184
+ </header>
185
+ <article slot="modal-body" class="modal-body">
186
+ <div class="progress" style="margin: 20px">
187
+ <div class="progress-bar progress-bar-success progress-bar-striped active" :style="{width: percent}">
188
+ {{ percent }}
189
+ </div>
190
+ </div>
191
+ </article>
192
+ <footer slot="modal-footer" class="modal-footer">
193
+ </footer>
194
+ </modal>
195
+ </div>
196
+ </div>
197
+ </template>
198
+
199
+ <script>
200
+ import {PagedList} from 'vue-client'
201
+ import {HttpResetClass} from 'vue-client'
202
+ export default {
203
+ title: '安装项目',
204
+ data () {
205
+ return {
206
+ model: new PagedList('rs/sql/buildOrderList', 30, null),
207
+ criteriaShow: false,
208
+ curorgid: [this.$login.f.orgid],
209
+ selectdata: null,
210
+ showPrint: false,
211
+ showProgress: false,
212
+ percent: 0,
213
+ type: 'PREVIEW',
214
+ showRow:false,
215
+ isprints: [{label: '全部', value: ''},{label: '是', value: '>0'},{label: '否', value: '=0'}],
216
+ }
217
+ },
218
+ ready () {
219
+ // 调用查询
220
+ this.search()
221
+ },
222
+ methods: {
223
+ async batchPrint () {
224
+ let selectPrint = this.$refs.cp.$refs.grid.getRowData()
225
+ if (selectPrint.length > 0) {
226
+ let res = await this.$showMessage(`当前数据条数: ${selectPrint.length}, 条数过大时打印时间可能会过长, 是否确认打印?`)
227
+ if (res == 'confirm') {
228
+ for(var i=0;i<selectPrint.length;i++){
229
+ if(selectPrint[i].f_prints_number==null){
230
+ selectPrint[i].f_prints_number=0
231
+ selectPrint[i].f_prints_number ++
232
+ }else{
233
+ selectPrint[i].f_prints_number ++
234
+ }
235
+ }
236
+ console.log('打印内容',selectPrint)
237
+ let http = new HttpResetClass()
238
+ let data = {
239
+ selectPrint:selectPrint
240
+ }
241
+ let res2 = await http.load('POST', 'rs/logic/getPrintsNumber', {data:data}, {
242
+ resolveMsg: null,
243
+ rejectMsg: '保存次数值失败!!!'
244
+ })
245
+ this.showProgress = true
246
+ for (let i = 0; i < selectPrint.length; i++) {
247
+ this.type = 'PRINT'
248
+ await this.getData(selectPrint[i])
249
+ this.print()
250
+ this.percent = this.getPercent(i, selectPrint.length)
251
+ console.log('-------------进度-----------')
252
+ console.log(this.percent)
253
+ }
254
+ this.showProgress = false
255
+ this.percent = 0
256
+ this.$refs.cp.$refs.grid.selectInit()
257
+ }
258
+ } else {
259
+ this.$showAlert('请选择要打印的单子', 'warning', 3000)
260
+ }
261
+ },
262
+ getPercent (num, total){
263
+ num = parseFloat(num);
264
+ total = parseFloat(total);
265
+ if (isNaN(num) || isNaN(total)) {
266
+ return "-";
267
+ }
268
+ return total <= 0? "0%" : Math.round((num / total) * 10000) / 100.0 + "%";
269
+ },
270
+ print () {
271
+ this.$refs.print.print()
272
+ },
273
+ colseModal () {
274
+ this.showPrint = false
275
+ this.selectdata = null
276
+ },
277
+ async click (row) {
278
+ console.log("词条数据",row)
279
+
280
+ this.type = 'PREVIEW'
281
+
282
+ await this.getData(row)
283
+
284
+ this.showPrint = true
285
+ },
286
+ async getData (row) {
287
+ this.selectdata = null
288
+
289
+ let http = new HttpResetClass()
290
+ let data = {
291
+ f_process_id: row.f_process_id,
292
+ actid: row.actid
293
+ }
294
+ let res = await http.load('POST', 'rs/sql/getBuildOrder', {data:data}, {
295
+ resolveMsg: null,
296
+ rejectMsg: '获取施工单失败!!!'
297
+ })
298
+
299
+ this.selectdata = res.data[0]
300
+ debugger
301
+ console.log("打印数据 ",this.selectdata)
302
+ if(this.selectdata.f_downloadpath !=null){
303
+ let temp = this.selectdata.f_downloadpath
304
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
305
+ this.selectdata.f_downloadpath = "http://" + location.host + "/" + URL
306
+ debugger
307
+ console.log('打印地址',this.selectdata.f_downloadpath)
308
+ }else{
309
+ this.selectdata.f_downloadpath=''
310
+ }
311
+ },
312
+ clear () {
313
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
314
+ this.$refs.cp.$refs.cri.model[key] = ''
315
+ })
316
+ },
317
+ searchCondition (args) {
318
+ args.condition = args.condition + ` and u.f_orgid = '${this.curorgid[0]}'`
319
+ this.model.search(args.condition, args.model)
320
+ },
321
+ // 查询
322
+ search () {
323
+ this.$refs.cp.$refs.cri.search()
324
+ },
325
+ getorg (val) {
326
+ if (val.length <= 0) {
327
+ return
328
+ }
329
+ this.curorgid = val
330
+ this.search()
331
+ }
332
+ },
333
+ computed: {
334
+ }
335
+ }
336
+ </script>
337
+
338
+ <style scoped>
339
+ </style>