apply-clients 3.5.5-70 → 3.5.5-71

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 (28) hide show
  1. package/build/dev-server.js +11 -7
  2. package/package.json +1 -1
  3. package/src/components/android/Process/AppChargeList.vue +391 -391
  4. package/src/components/android/Process/AppExplorationUser.vue +508 -508
  5. package/src/components/product/Supervisory/SupervisoryControl.vue +141 -141
  6. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +860 -860
  7. package/src/filiale/jinhuang/pc/ServiceControl.vue +1932 -1932
  8. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +527 -524
  9. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +585 -585
  10. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +1116 -1116
  11. package/src/filiale/yangchunboneng/android/AppProcessSupervisory.vue +331 -331
  12. package/src/filiale/yangchunboneng/android/AppSuperServiceControl.vue +1524 -1524
  13. package/src/filiale/yangchunboneng/android/AppUpload.vue +205 -205
  14. package/src/filiale/yangchunboneng/android.js +21 -21
  15. package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +392 -392
  16. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +612 -612
  17. package/src/filiale/yangchunboneng/pc/ExplorationUser.vue +191 -191
  18. package/src/filiale/yangchunboneng/pc/InstallInfoSelect.vue +365 -365
  19. package/src/filiale/yangchunboneng/pc/StopApplyList.vue +294 -294
  20. package/src/filiale/yangchunboneng/pc/SupervisoryControlNew.vue +142 -142
  21. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +617 -617
  22. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControl.vue +902 -902
  23. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControlNew.vue +901 -901
  24. package/src/filiale/yangchunboneng/pc/buildOrderList.vue +337 -337
  25. package/src/filiale/yangchunboneng/pc/constructionInfo.vue +84 -84
  26. package/src/filiale/yangchunboneng/pc/printBuildOrder.vue +175 -175
  27. package/src/filiale/yangchunboneng/pc.js +28 -28
  28. package/src/main.js +23 -23
@@ -1,337 +1,337 @@
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">电&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="u.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="u.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="u.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=" u.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="u.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="u.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="u.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="u.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 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 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
- condition: `u.id=${row.id}`,
292
- }
293
- let res = await http.load('POST', 'rs/sql/buildOrderList', {data:data}, {
294
- resolveMsg: null,
295
- rejectMsg: '获取施工单失败!!!'
296
- })
297
-
298
- this.selectdata = res.data[0]
299
- console.log("打印数据 ",this.selectdata)
300
- if(this.selectdata.f_downloadpath !=null){
301
- let temp = this.selectdata.f_downloadpath
302
- let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
303
- this.selectdata.f_downloadpath = "http://" + location.host + "/" + URL
304
- debugger
305
- console.log('打印地址',this.selectdata.f_downloadpath)
306
- }else{
307
- this.selectdata.f_downloadpath=''
308
- }
309
- },
310
- clear () {
311
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
312
- this.$refs.cp.$refs.cri.model[key] = ''
313
- })
314
- },
315
- searchCondition (args) {
316
- args.condition = args.condition + ` and u.f_orgid = '${this.curorgid[0]}'`
317
- this.model.search(args.condition, args.model)
318
- },
319
- // 查询
320
- search () {
321
- this.$refs.cp.$refs.cri.search()
322
- },
323
- getorg (val) {
324
- if (val.length <= 0) {
325
- return
326
- }
327
- this.curorgid = val
328
- this.search()
329
- }
330
- },
331
- computed: {
332
- }
333
- }
334
- </script>
335
-
336
- <style scoped>
337
- </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">电&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="u.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="u.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="u.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=" u.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="u.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="u.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="u.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="u.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 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 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
+ condition: `u.id=${row.id}`,
292
+ }
293
+ let res = await http.load('POST', 'rs/sql/buildOrderList', {data:data}, {
294
+ resolveMsg: null,
295
+ rejectMsg: '获取施工单失败!!!'
296
+ })
297
+
298
+ this.selectdata = res.data[0]
299
+ console.log("打印数据 ",this.selectdata)
300
+ if(this.selectdata.f_downloadpath !=null){
301
+ let temp = this.selectdata.f_downloadpath
302
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
303
+ this.selectdata.f_downloadpath = "http://" + location.host + "/" + URL
304
+ debugger
305
+ console.log('打印地址',this.selectdata.f_downloadpath)
306
+ }else{
307
+ this.selectdata.f_downloadpath=''
308
+ }
309
+ },
310
+ clear () {
311
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
312
+ this.$refs.cp.$refs.cri.model[key] = ''
313
+ })
314
+ },
315
+ searchCondition (args) {
316
+ args.condition = args.condition + ` and u.f_orgid = '${this.curorgid[0]}'`
317
+ this.model.search(args.condition, args.model)
318
+ },
319
+ // 查询
320
+ search () {
321
+ this.$refs.cp.$refs.cri.search()
322
+ },
323
+ getorg (val) {
324
+ if (val.length <= 0) {
325
+ return
326
+ }
327
+ this.curorgid = val
328
+ this.search()
329
+ }
330
+ },
331
+ computed: {
332
+ }
333
+ }
334
+ </script>
335
+
336
+ <style scoped>
337
+ </style>