sale-client 3.6.19 → 3.6.21

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,2068 +1,2068 @@
1
- <template>
2
- <div class="flex-row" id="machineHandManager">
3
- <div class="basic-main">
4
- <criteria-paged :model="model" v-ref:paged @sort="sort">
5
- <criteria partial='criteria' v-ref:criteria @condition-changed="$parent.selfSearch">
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <modal :show.sync="$parent.$parent.upshow" width="500px" title="文件导入" v-ref:modal large backdrop="false">
8
- <article slot="modal-body" class="modal-body">
9
- <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success"
10
- style="border-radius: 2px;"
11
- action="rs/file/uploadFile" tagname="导入" v-ref:filebattch :headers="headers"
12
- multiple></file-upload>
13
- </article>
14
- <footer slot="modal-footer" class="modal-footer">
15
- </footer>
16
- </modal>
17
- <div class="row">
18
- <!--<div class="col-sm-6">-->
19
- <!--style="border: 1px solid #a6d5ea; box-shadow: darkgrey 1px 1px 1px 2px;padding: 0.5%">-->
20
- <div class="col-sm-2 form-group">
21
- <label class="font_normal_body color-red">归属起始</label>
22
- <datepicker placeholder="开始日期"
23
- style="width:60%"
24
- class="datepicker"
25
- v-model="model.startDate"
26
- condition="f_hand_date >='{} 00:00:00'"
27
-
28
- :value.sync="model.startDate"
29
- :format="'yyyy-MM-dd'"
30
- ></datepicker>
31
- </div>
32
- <div class="col-sm-2 form-group">
33
- <label class="font_normal_body color-red">归属结束</label>
34
- <datepicker placeholder="结束日期"
35
- style="width:60%"
36
- v-model="model.endDate"
37
- :value.sync="model.endDate"
38
- condition="f_hand_date <='{} 23:59:59'"
39
- :format="'yyyy-MM-dd'"
40
- ></datepicker>
41
- </div>
42
-
43
- <div class="col-sm-2 form-group">
44
- <label class="font_normal_body">客户编号</label>
45
- <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
46
- condition="f_userinfo_code='{}'" placeholder='客户编号'>
47
- </div>
48
-
49
- <div class="span" style="float:right;">
50
- <button v-if="$parent.$parent.jurisdiction.includes('单户抄表')"
51
- class="button_search button_spacing" style="width:90px" @click="$parent.$parent.danhuShow()">
52
- 单户抄表
53
- </button>
54
-
55
- <button class="button_search button_spacing" @click="$parent.$parent.search()">查询</button>
56
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
57
- <button class="button_delete button_spacing" @click="$parent.$parent.deletehand()">删除抄表</button>
58
- <button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.downloadFiles()">模板下载
59
- </button>
60
- <button class="button_search button_spacing" @click="$parent.$parent.clickupshow()">导入抄表</button>
61
-
62
- <export-excel
63
- :data="$parent.$parent.getCondition"
64
- :field="$parent.$parent.getfield"
65
- sqlurl="rs/logic/saleExport" sql-name="getPlan" template-name='抄表导出'
66
- :choose-col="true">
67
- </export-excel>
68
- <div
69
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
70
- @click="$parent.$parent.hidden()" class="button_spacing" style="float: right"></div>
71
- </div>
72
- </div>
73
- <div class="row" v-show="$parent.$parent.criteriaShow">
74
- <!-- <div class="col-sm-2 form-group">-->
75
- <!-- <label class="font_normal_body">表&ensp;编&ensp;号</label>-->
76
- <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_id"-->
77
- <!-- condition="f_user_id='{}'" placeholder='表编号'>-->
78
- <!-- </div>-->
79
- <div class="col-sm-2 form-group">
80
- <label class="font_normal_body">抄表状态</label>
81
- <v-select :value.sync="model.f_audit_state"
82
- class="select_list select"
83
- v-model="model.f_audit_state"
84
- style="width: 60%"
85
- condition="f_meter_state = '{}'"
86
- :options='$parent.$parent.auditState' placeholder='抄表状态'
87
- close-on-select v-el:cc>
88
- </v-select>
89
- </div>
90
- <div class="col-sm-2 form-group">
91
- <label class="font_normal_body">表&emsp;&emsp;号</label>
92
- <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
93
- condition="f_meternumber like '%{}%'" placeholder='表号'>
94
- </div>
95
- <div class="col-sm-2 form-group">
96
- <label class="font_normal_body">客户姓名</label>
97
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name" placeholder='客户姓名'
98
- condition="f_user_name = '{}'">
99
- </div>
100
- <div class="col-sm-2 form-group">
101
- <label class="font_normal_body">小&ensp;&ensp;&ensp;&ensp;区</label>
102
- <v-select :value.sync="model.f_residential_area"
103
- class="select_list select"
104
- enter-push
105
- v-model="model.f_residential_area"
106
- style="width: 60%"
107
- multiple="true"
108
- :options='$parent.$parent.residentialArea' placeholder='选择小区'
109
- close-on-select v-el:cc>
110
- </v-select>
111
- </div>
112
- <div class="col-sm-2 form-group">
113
- <label class="font_normal_body">楼&emsp;&emsp;栋</label>
114
- <input type="text" style="width:60%" class="input_search" v-model="model.f_building"
115
- condition="f_building = '{}'" placeholder='楼栋'>
116
- </div>
117
- <div class="col-sm-2 form-group">
118
- <label class="font_normal_body">单&emsp;&emsp;元</label>
119
- <input type="text" style="width:60%" class="input_search" v-model="model.f_unit"
120
- condition="f_unit = '{}'" placeholder='单元'>
121
- </div>
122
- <div class="col-sm-2 form-group">
123
- <label class="font_normal_body">楼&emsp;&emsp;层</label>
124
- <input type="text" style="width:60%" class="input_search" v-model="model.f_floor"
125
- condition="f_floor = '{}'" placeholder='楼层'>
126
- </div>
127
- <div class="col-sm-2 form-group">
128
- <label class="font_normal_body">门&ensp;牌&ensp;号</label>
129
- <input type="text" style="width:60%" class="input_search" v-model="model.f_room"
130
- condition="f_room like '%{}%'" placeholder='门牌号'>
131
- </div>
132
- <div class="col-sm-2 form-group">
133
- <label class="font_normal_body">客户地址</label>
134
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
135
- condition="f_address like '%{}%'" placeholder='客户地址'>
136
- </div>
137
- <div class="col-sm-2 form-group">
138
- <label class="font_normal_body">抄&ensp;表&ensp;员</label>
139
- <v-select :value.sync="model.f_inputtor" v-model='model.f_inputtor'
140
- style="width:60%"
141
- multiple="true"
142
- :options='$parent.$parent.inputtores' placeholder='抄表员'
143
- close-on-select
144
- v-el:cc></v-select>
145
- </div>
146
- <!-- <div class="col-sm-2 form-group">-->
147
- <!-- <label class="font_normal_body">是否缴费</label>-->
148
- <!-- <v-select :value.sync="model.f_whether_pay" v-model='model.f_whether_pay'-->
149
- <!-- style="width:60%"-->
150
- <!-- :options='$parent.$parent.whetherpaies' placeholder='是否缴费'-->
151
- <!-- close-on-select-->
152
- <!-- condition="f_whether_pay = '{}'"></v-select>-->
153
- <!-- </div>-->
154
- <div class="col-sm-2 form-group">
155
- <label class="font_normal_body">抄表单状态</label>
156
- <v-select :value.sync="model.f_meter_state" v-model='model.f_meter_state'
157
- style="width:60%"
158
- :options='$parent.$parent.meterstates' placeholder='抄表单状态'
159
- close-on-select
160
- condition="f_meter_state = '{}'"></v-select>
161
- </div>
162
-
163
- <div class="col-sm-2 form-group">
164
- <label for="belongmonth" class="font_normal_body">所属年月</label>
165
- <datepicker placeholder="所属年月" style="width:60%"
166
- v-model="model.belongmonth"
167
- :value.sync="model.belongmonth"
168
- :format="'yyyy-MM'"
169
- :show-reset-button="true"
170
- condition="belongmonth = '{}'"
171
- :select-month="true">
172
- </datepicker>
173
- </div>
174
- <div class="col-sm-2 form-group">
175
- <label class="font_normal_body">客户类型</label>
176
- <v-select :value.sync="model.f_user_type" v-model="model.f_user_type"
177
- :options='$parent.$parent.usertypes' placeholder='客户类型'
178
- style="width:60%"
179
- close-on-select
180
- condition="f_user_type = '{}'"></v-select>
181
- </div>
182
- <div class="col-sm-2 form-group">
183
- <label class="font_normal_body">用户等级</label>
184
- <v-select :value.sync="model.f_user_level" v-model="model.f_user_level"
185
- :options='$parent.$parent.userlevels' placeholder='用户等级'
186
- style="width:60%"
187
- close-on-select
188
- condition="f_user_level = '{}'"></v-select>
189
- </div>
190
- <div class="col-sm-2 form-group">
191
- <label class="font_normal_body color-red">抄&ensp;表&ensp;册</label>
192
- <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
193
- :options='$parent.$parent.meterbooks' placeholder='抄表册'
194
- :multiple="true"
195
- style="width:60%"
196
- condition="f_meter_book_num in {}"></v-select>
197
- </div>
198
- <div class="col-sm-2 form-group">
199
- <label class="font_normal_body">调压箱名</label>
200
- <v-select :value.sync="model.f_adjustable_name" v-model="model.f_adjustable_name"
201
- :options='$parent.$parent.adjustablename' placeholder='调压箱名称'
202
- style="width:60%"
203
- close-on-select
204
- condition="f_adjustable_name = '{}'"></v-select>
205
- </div>
206
- <div class="col-sm-2 flex-row" style="white-space: nowrap" >
207
- <label class="font_normal_body">应交气量</label>
208
- <div class="row">
209
- <input type="text" style="width:30%" class="input_search" v-model="model.oughtamountmin"
210
- condition="f_oughtamount >= {} " placeholder="">
211
- <label class="font_normal_body"> ≤ x ≤ </label>
212
- <input type="text" style="width:30%" class="input_search" v-model="model.oughtamountmax"
213
- condition="f_oughtamount <= {} " placeholder="">
214
- </div>
215
- </div>
216
- <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"
217
- v-ref:sel></res-select-group>
218
- </div>
219
-
220
-
221
- <!-- 多选框 -->
222
- <!--<div class="col-sm-2 form-group">-->
223
- <!--<button class="btn btn-success" @click="$parent.$parent.batchDownHand()">计划下发</button>-->
224
- <!--</div>-->
225
-
226
- <!--<div class="form-group" v-if="$parent.$parent.meter_state">-->
227
- <!--<button class="btn btn-success" @click="$parent.$parent.allDownHand()" >全部下发</button>-->
228
- <!--</div>-->
229
- <!-- 多选框结束 -->
230
-
231
- <!--<div class="col-sm-2 form-group">-->
232
- <!--<button class="btn btn-success" @click="$parent.$parent.adjust()">抄表员调整</button>-->
233
- <!--</div>-->
234
- <!--<div class="col-sm-2 form-group">-->
235
- <!--<button class="btn btn-success" @click="$parent.$parent.fileUpload()">文件上传</button>-->
236
- <!--</div>-->
237
- <!--<div class="col-sm-2 form-group">-->
238
- <!--<button class="btn btn-success" @click="search(), $parent.$parent.clean()">打印</button>-->
239
- <!--</div>-->
240
-
241
- </div>
242
- </criteria>
243
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid id="hand_manager_grid">
244
- <template partial='head'>
245
- <tr>
246
- <!--<th><input type='checkbox' v-model="$parent.$parent.$parent.all" @change="$parent.$parent.$parent.chooseAll"></th>-->
247
- <th>
248
- <nobr>序号</nobr>
249
- </th>
250
- <th>
251
- <nobr>
252
- <data-order field="f_userinfo_code" name="客户编号"
253
- :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
254
- </nobr>
255
- </th>
256
- <!-- <th>-->
257
- <!-- <nobr>表编号</nobr>-->
258
- <!-- </th>-->
259
- <!-- <th>基本信息</th>-->
260
- <th>
261
- <nobr>
262
- <data-order field="f_address" name="基本信息"
263
- :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
264
- </nobr>
265
- </th>
266
- <th>
267
- <nobr>用户等级</nobr>
268
- </th>
269
- <!--<th><nobr><data-order field="f_building" name="楼号"-->
270
- <!--:order.sync="$parent.$parent.$parent.orderFields.f_building"></data-order></nobr>-->
271
- <!--</th>-->
272
- <!--<th><nobr><data-order field="f_unit" name="单元号"-->
273
- <!--:order.sync="$parent.$parent.$parent.orderFields.f_unit"></data-order></nobr>-->
274
- <!--</th>-->
275
- <!--<th><nobr><data-order field="f_room" name="房号"-->
276
- <!--:order.sync="$parent.$parent.$parent.orderFields.f_room"></data-order></nobr>-->
277
- <!--</th>-->
278
- <th>
279
- <nobr>所属年月</nobr>
280
- </th>
281
- <th>
282
- <nobr>上期结余</nobr>
283
- </th>
284
- <th>
285
- <nobr>平均用气量</nobr>
286
- </th>
287
- <th>
288
- <nobr>表号</nobr>
289
- </th>
290
- <th>
291
- <nobr>上期底数</nobr>
292
- </th>
293
- <th>
294
- <nobr>本期底数</nobr>
295
- </th>
296
-
297
-
298
- <th>
299
- <nobr>应交气量</nobr>
300
- </th>
301
- <th>
302
- <nobr>增量值</nobr>
303
- </th>
304
- <th>
305
- <nobr>应交金额</nobr>
306
- </th>
307
- <th>
308
- <nobr>抄表结果状态</nobr>
309
- </th>
310
- <th>
311
- <nobr>是否缴费</nobr>
312
- </th>
313
- <!-- <th>上次抄表日期</th>-->
314
- <th>
315
- <nobr>
316
- <data-order field="f_last_input_date" name="上次抄表录入日期"
317
- :order.sync="$parent.$parent.$parent.orderFields.f_last_input_date"></data-order>
318
- </nobr>
319
- </th>
320
- <!-- <th>下发日期</th>-->
321
- <th>
322
- <nobr>
323
- <data-order field="f_hand_date" name="下发日期"
324
- :order.sync="$parent.$parent.$parent.orderFields.f_hand_date"></data-order>
325
- </nobr>
326
- </th>
327
- <!-- <th>抄表日期</th>-->
328
- <th>
329
- <nobr>
330
- <data-order field="f_input_date" name="抄表录入日期"
331
- :order.sync="$parent.$parent.$parent.orderFields.f_input_date"></data-order>
332
- </nobr>
333
- </th>
334
- <!-- <th>抄表册</th>-->
335
- <th>
336
- <nobr>
337
- <data-order field="f_book_name" name="抄表册"
338
- :order.sync="$parent.$parent.$parent.orderFields.f_book_name"></data-order>
339
- </nobr>
340
-
341
- </th>
342
- <th>
343
- <nobr>调压箱名称</nobr>
344
- </th>
345
- <th>
346
- <nobr>抄表员</nobr>
347
- </th>
348
- <th>
349
- <nobr>录入人员</nobr>
350
- </th>
351
- <th>
352
- <nobr>下发人员</nobr>
353
- </th>
354
- <th>
355
- <nobr>操作</nobr>
356
- </th>
357
- <!-- f_oughtfee-->
358
- </tr>
359
- </template>
360
- <template partial='body'>
361
- <!--<td style="text-align: center;">-->
362
- <!--<input v-if="row.f_meter_state === '未下发'"-->
363
- <!--:id="model.pageIndex" type='checkbox' @change="$parent.$parent.$parent.chooseOne($event,row,model.rows)"-->
364
- <!--:checked="$parent.$parent.$parent.ischecked(row)"/>-->
365
- <!--</td>-->
366
- <td style="text-align: center;">{{$index + 1}}</td>
367
- <td>{{row.f_userinfo_code}}</td>
368
- <!-- <td>{{row.f_user_id}}</td>-->
369
- <td>{{row.f_user_name}}&nbsp;&nbsp;{{row.f_address}}</td>
370
- <td>{{row.f_user_level}}</td>
371
- <!--<td>{{row.f_building}}</td>-->
372
- <!--<td>{{row.f_unit}}</td>-->
373
- <!--<td>{{row.f_room}}</td>-->
374
- <td>{{row.belongmonth}}</td>
375
- <td style="text-align: center;">{{row.f_balance}}</td>
376
- <td style="text-align: center;">{{Math.round(row.avggas)}}</td>
377
- <td>{{row.f_meternumber}}</td>
378
- <td>{{row.f_last_tablebase}}</td>
379
- <td id="hand-creat" v-if="row.f_meter_state === '未抄表' ">
380
- <div class="form-group" style="margin-bottom:0px;display: contents;" :class="{
381
- 'has-success has-feedback': !row.error,
382
- 'has-error has-feedback': row.error}"
383
- >
384
-
385
- <input title="只能录入整数" type="text" class="input_search" v-model="row.f_tablebase"
386
- @blur="$parent.$parent.$parent.beforenter($index, row)"
387
- v-next-el="{id: $index+2}" :id="$index+1" style="width: 100px;padding: 6px;"
388
- @focus="$parent.$parent.$parent.clearError(row)"
389
- :disabled="row.state === '开始'">
390
- </div>
391
-
392
- <span v-if="row.error && row.error !== ''" style="color: #ff0000;">{{row.error}}</span>
393
- </td>
394
- <td id="hand-creat" v-if="row.f_meter_state !== '未抄表' ">
395
- {{row.f_tablebase}}
396
- </td>
397
- <!--<td style="text-align: center;" v-if="row.f_oughtamount">{{ row.f_oughtamount }}</td>-->
398
- <td style="text-align: center;">{{$parent.$parent.$parent.calculationBase(row)}}</td>
399
- <td style="text-align: center;">
400
- <div class="form-group" style="margin-bottom:0px;display: contents;" :class="{'has-success has-feedback': !row.error,'has-error has-feedback': row.error}"
401
- v-if="row.f_meter_state === '未抄表' && row.states !== 0 && $parent.$parent.$parent.jurisdiction.includes('增量录入')">
402
- <input title="只能录入整数" type="number" class="input_search" v-model="row.f_adjustment_volume"
403
- style="width: 100px;padding: 6px;"
404
- :disabled="row.state === '开始'">
405
- </div>
406
- <div v-else>
407
- {{row.f_adjustment_volume}}
408
- </div>
409
- </td>
410
- <td style="text-align: center;">{{row.f_oughtfee}}</td>
411
-
412
- <td>
413
- <div class="form-group" style="margin-bottom:0px;display: contents;" :class="{
414
- 'has-success has-feedback': !row.error,
415
- 'has-error has-feedback': row.error}"
416
- v-if="row.f_meter_state === '未抄表' && row.states !== 0">
417
- <v-select :value.sync="row.f_result_state" v-model="row.f_result_state"
418
- :options='$parent.$parent.$parent.resultstate' placeholder='抄表结果状态'
419
- style="margin-right:90px" width="100%"
420
- :value-single="true"
421
- close-on-select
422
- condition="f_adjustable_name = '{}'"></v-select>
423
- <!-- <span id="inputError2Status" class="sr-only">(error)</span> -->
424
- </div>
425
- <div style="text-align: center;" v-else>
426
- {{row.f_result_state}}
427
- </div>
428
- </td>
429
- <td style="text-align: center;">{{row.f_whether_pay}}</td>
430
- <td>{{row.f_last_input_date}}</td>
431
- <td>{{row.f_hand_date}}</td>
432
- <td>
433
- <div class="form-group" style="margin-bottom:0px;display: contents;" :class="{
434
- 'has-success has-feedback': !row.error,
435
- 'has-error has-feedback': row.error}"
436
- v-if="row.f_meter_state === '未抄表' && row.states !== 0 && $parent.$parent.$parent.jurisdiction.includes('录入日期修正')">
437
- <datepicker id="endDate" placeholder="抄表时间"
438
- v-model="row.f_input_date"
439
- :value.sync="row.f_input_date"
440
- :format="'yyyy-MM-dd HH:mm:ss'"
441
- :show-reset-button="true">
442
- </datepicker>
443
- </div>
444
- <div v-else>
445
- {{row.f_input_date}}
446
- </div>
447
- </td>
448
- <td>{{row.f_book_name}}</td>
449
- <td>{{row.f_adjustable_name}}</td>
450
- <td>{{row.f_inputtor}}</td>
451
- <td>{{row.f_input_person}}</td>
452
- <td>{{row.f_operator}}</td>
453
- <td style="text-align: center;"><nobr>
454
- <!-- 已抄表,还没审核-->
455
- <button type="button" name="button" class="button_search button_spacing width-60"
456
- v-if="row.f_meter_state === '待审核' && (row.id == row.maxid || !row.maxid)"
457
- @click.stop="$parent.$parent.$parent.cancelAuditHand(row)">撤销
458
- </button>
459
- <!-- 未抄表,删除计划,直接删表内数据-->
460
- <button type="button" name="button" class="btn btn-danger"
461
- v-if="row.f_meter_state === '未抄表'"
462
- @click.stop="$parent.$parent.$parent.delectHand(row) && row.states === 1"
463
- >删除
464
- </button>
465
- <!-- 已抄表,已审核,冲正(状态改为冲正,添加负记录,需要重新下发)-->
466
- <button type="button" name="button" class="button_search button_spacing width-60"
467
- @click.stop="$parent.$parent.$parent.cancelHand(row)"
468
- v-if="row.f_meter_state === '已抄表' && row.maxid==row.id && (row.f_whether_pay === '否' || row.f_accounts_state === '自动下账' || (row.f_whether_pay === '是' && row.f_oughtfee == 0 ))" >冲正
469
- </button>
470
-
471
- <!-- <button type="button" name="button" class="btn btn-link"-->
472
- <!-- v-if="row.f_meter_state === '待审核' ">待审核-->
473
- <!-- </button>-->
474
-
475
-
476
- </nobr>
477
- </td>
478
- </template>
479
- </data-grid>
480
- </criteria-paged>
481
- <table class="table-hover">
482
- <tr style="position: relative" class="table-bordered">
483
- <td
484
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
485
- 汇总信息
486
- </td>
487
- <td
488
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
489
- 应缴气量:&emsp;{{sumsmodel.f_oughtamount}}
490
- </td>
491
- <td
492
- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
493
- 应缴金额:&emsp;{{sumsmodel.f_oughtfee}}
494
- </td>
495
- </tr>
496
- </table>
497
- <split-price :showdata="splitdata" :pricesplit="priceSplit" v-if="priceSplit"></split-price>
498
-
499
- <modal :show.sync="danhu.show" :title='danhutitle' backdrop="false" coverstyle="danhumodal">
500
- <article slot="modal-body" class="modal-body">
501
- <div class="panel panel-primary datapanel">
502
- <div class="row">
503
- <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">客户姓名:{{danhu.info.f_user_name}}</label>
504
- <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">客户编号:{{danhu.info.f_userinfo_code}}</label>
505
- <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">用户证号:{{danhu.info.f_book_no}}</label>
506
- <label class="control-label col-sm-12 flex-row" style="transform: translate(0,8px)">客户地址:{{danhu.info.f_address}}</label>
507
- <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">上次抄表日期:{{danhu.info.f_hand_date}}</label>
508
- <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">上期底数:{{danhu.info.f_tablebase}}</label>
509
- </div>
510
- </div>
511
- <div class="panel panel-primary datapanel">
512
- <div class="row">
513
- <div class="col-sm-6 flex-row" style="margin-top: 2px">
514
- <label for="danhucode" class="control-label" style="transform: translate(0,8px)">客户编号</label>
515
- <input id="danhucode" type="text" class="input_search " style="width: 60% !important;"
516
- v-model="danhu.f_userinfo_code" v-ref:danhucode @keyup.enter.stop="danhuCodeSearch"
517
- placeholder='客户编号'/>
518
- </div>
519
- <div class="col-sm-6 flex-row" style="margin-top: 2px">
520
- <label for="danhubase" class="control-label" style="transform: translate(0,8px)">本期底数</label>
521
- <input id="danhubase" type="number" class="input_search " style="width: 60% !important;"
522
- v-model="danhu.f_tablebase" @keyup.enter.stop="downAndHand"
523
- placeholder='本期底数'/>
524
- </div>
525
- </div>
526
- </div>
527
- </article>
528
- <footer slot="modal-footer">
529
- </footer>
530
- </modal>
531
-
532
- <modal :show.sync="uploadshow" v-ref:modal backdrop="false">
533
- <header slot="modal-header" class="modal-header">
534
- <button type="button" class="close" @click="close"><span>&times;</span></button>
535
- <h4 class="modal-title">文件上传</h4>
536
- </header>
537
- <article slot="modal-body" class="modal-body">
538
- <div class="col-sm-2 form-group">
539
- <file-upload class="my-file-uploader" name="myFile"
540
- action="rs/file/upload" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
541
- </div>
542
- </article>
543
-
544
- <footer slot="modal-footer" class="modal-footer">
545
- <!-- <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
546
- <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button> -->
547
- </footer>
548
- </modal>
549
- <modal :show.sync="examineshow" v-ref:modal backdrop="false">
550
- <header slot="modal-header" class="modal-header">
551
- <button type="button" class="close" @click="close"><span>&times;</span></button>
552
- <h4 class="modal-title">冲正审核</h4>
553
- </header>
554
- <article slot="modal-body" class="modal-body">
555
- <div class="row">
556
- <div class="col-sm-12 form-group">
557
- <label class="font_normal_body">冲正原因</label>
558
- <input type="text" style="width:90%" class="input_search" :disabled="examinetype"
559
- v-model="examinerow.f_examinereason"
560
- placeholder='冲正原因'>
561
- </div>
562
- <upload :blodid="examinerow.id" v-ref:upload :fusetype="uploadText" isremark="true"
563
- style="width:auto"></upload>
564
- </div>
565
-
566
- </article>
567
-
568
- <footer slot="modal-footer" class="modal-footer">
569
- <button v-show="examineshow" type="button" class="btn btn-default" @click='close'>取消</button>
570
- <button v-show="!examinetype" type="button" class="btn btn-success" @click='examineconfirm()'>确认</button>
571
- <button type="button" v-show="examinetype" class="btn btn-success" @click='cancelHand5()'>审核通过</button>
572
- </footer>
573
- </modal>
574
-
575
- <modal :show.sync="showerr" backdrop="false">
576
- <header slot="modal-header" class="modal-header">
577
- <button type="button" class="close" @click="closeerr"><span>&times;</span></button>
578
- <h4 class="modal-title">抄表出错!</h4>
579
- </header>
580
- <article slot="modal-body" class="modal-body">
581
- <div class="row">
582
- <p> {{err}}</p>
583
- <input type="text" class="form-control" @blur="paycodefocus" v-el:paycode>
584
- </div>
585
-
586
- </article>
587
-
588
- <footer slot="modal-footer" class="modal-footer">
589
- <button v-show="showerr" type="button" class="btn btn-default" @click='closeerr'>关闭</button>
590
- </footer>
591
- </modal>
592
-
593
- <modal :show.sync="detailsShow" v-ref:model_details backdrop="true" width="700px">
594
- <article slot="modal-body" class="modal-body">
595
- <div class="flex-row">
596
- <div style="width: 50%">
597
- <mix-price-info :data="row" v-if="row.f_price_type === '固定气价'" v-ref:mix_price></mix-price-info>
598
- <stairinfo :data="row" v-if="row.f_price_type === '阶梯气价'" v-ref:statir></stairinfo>
599
- </div>
600
- <div style="width: 50%" class="panel">
601
- <div class="panel-heading detail-panel">
602
- <h4>计算工具</h4>
603
- </div>
604
- <form class="form-horizontal" style="padding: 10px">
605
- <div class="form-group">
606
- <label class="col-sm-4 col-md-4 control-label" style="text-align: left">预购金额:</label>
607
- <div class="col-sm-8 col-md-8">
608
- <input type="number" class="form-control" placeholder="预购金额" @blur="computeAmount" v-el:inputmoney>
609
- </div>
610
- </div>
611
- <div class="form-group">
612
- <label class="col-sm-4 col-md-4 control-label" style="text-align: left">当前底数:</label>
613
- <div class="col-sm-8 col-md-8">
614
- <input type="number" class="form-control" placeholder="当前底数" v-model="row.f_last_tablebase" disabled>
615
- </div>
616
- </div>
617
- <div class="form-group">
618
- <label class="col-sm-4 col-md-4 control-label" style="text-align: left">应抄底数:</label>
619
- <div class="col-sm-8 col-md-8">
620
- <input type="number" class="form-control" placeholder="应抄底数" v-model="should_base" disabled>
621
- </div>
622
- </div>
623
- <div class="form-group">
624
- <label class="col-sm-12 col-md-12 control-label" style="text-align: center">计算公式</label>
625
- <div class="col-sm-12 col-md-12">
626
- <input type="text" class="form-control" placeholder="计算公式" v-model="designFormulas" disabled>
627
- </div>
628
- </div>
629
- </form>
630
- </div>
631
- </div>
632
- </article>
633
- <footer slot="modal-footer" class="modal-footer">
634
- <button type="button" class="button_search button_spacing" @click='customPricing()'>自定义划价</button>
635
- </footer>
636
- </modal>
637
-
638
- <modal :show.sync="priceModel" v-ref:modal backdrop="false">
639
- <header slot="modal-header" class="modal-header">
640
- <h4 class="modal-title">自定义划价</h4>
641
- </header>
642
- <article slot="modal-body" class="modal-body">
643
- <div>
644
- <mix-price-info :data="row" v-if="row.f_price_type === '固定气价'" v-ref:mix_price></mix-price-info>
645
- <stairinfo :data="row" v-if="row.f_price_type === '阶梯气价'" v-ref:statir></stairinfo>
646
- </div>
647
- <div class="row">
648
- <template v-if="row.f_price_type === '固定气价'">
649
- <div class="col-sm-4 form-group">
650
- <label class="font_normal_body">单价</label>
651
- <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_price1" placeholder='单价'></input>
652
- </div>
653
- <div class="col-sm-4 form-group">
654
- <label class="font_normal_body">数量</label>
655
- <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_gas1" placeholder='数量'></input>
656
- </div>
657
- <div class="col-sm-4 form-group">
658
- <label class="font_normal_body">金额</label>
659
- <p class="form-control" style="width:60%" disabled>{{ row.f_stair_money1 = stairMoney(row.f_stair_price1, row.f_stair_gas1) }}</p>
660
- </div>
661
- </template>
662
-
663
- <template v-if="row.f_price_type === '阶梯气价'">
664
- <div class="col-sm-4 form-group" >
665
- <label class="font_normal_body">阶梯一单价</label>
666
- <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_price1" placeholder='阶梯一单价'></input>
667
- </div>
668
- <div class="col-sm-4 form-group">
669
- <label class="font_normal_body">阶梯一数量</label>
670
- <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_gas1" placeholder='阶梯一数量'></input>
671
- </div>
672
- <div class="col-sm-4 form-group">
673
- <label class="font_normal_body">阶梯一金额</label>
674
- <p class="form-control" style="width:60%" disabled>{{ row.f_stair_money1 = stairMoney(row.f_stair_price1, row.f_stair_gas1) }}</p>
675
- </div>
676
- <div class="col-sm-4 form-group" >
677
- <label class="font_normal_body">阶梯二单价</label>
678
- <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_price2" placeholder='阶梯二单价'></input>
679
- </div>
680
- <div class="col-sm-4 form-group">
681
- <label class="font_normal_body">阶梯二数量</label>
682
- <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_gas2" placeholder='阶梯二数量'></input>
683
- </div>
684
- <div class="col-sm-4 form-group">
685
- <label class="font_normal_body">阶梯二金额</label>
686
- <p class="form-control" style="width:60%" disabled>{{ row.f_stair_money2 = stairMoney(row.f_stair_price2, row.f_stair_gas2) }}</p>
687
- </div>
688
- <div class="col-sm-4 form-group" >
689
- <label class="font_normal_body">阶梯三单价</label>
690
- <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_price3" placeholder='阶梯三单价'></input>
691
- </div>
692
- <div class="col-sm-4 form-group">
693
- <label class="font_normal_body">阶梯三数量</label>
694
- <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_gas3" placeholder='阶梯三数量'></input>
695
- </div>
696
- <div class="col-sm-4 form-group">
697
- <label class="font_normal_body">阶梯三金额</label>
698
- <p class="form-control" style="width:60%" disabled>{{ row.f_stair_money3 = stairMoney(row.f_stair_price3, row.f_stair_gas3) }}</p>
699
- </div>
700
- </template>
701
- <div class="col-sm-4 form-group" >
702
- </div>
703
- <div class="col-sm-4 form-group">
704
- <label class="font_normal_body">总用气量</label>
705
- <p class="form-control" style="width:60%" disabled>{{ ((row.f_stair_gas1 - 0)+(row.f_stair_gas2 - 0)+(row.f_stair_gas3 - 0)).toFixed(2) }}</p>
706
- </div>
707
- <div class="col-sm-4 form-group">
708
- <label class="font_normal_body">总用气金额</label>
709
- <p class="form-control" style="width:60%" disabled>{{ row.f_oughtfee = ((row.f_stair_money1 - 0)+(row.f_stair_money2 - 0)+(row.f_stair_money3 - 0)).toFixed(2) }}</p>
710
- </div>
711
- <p style="color: red">注意: 自定义气量总量必须等于本次抄表用气量, 本次抄表总量: {{row.f_oughtamount}}</p>
712
- </div>
713
- </article>
714
- <footer slot="modal-footer" class="modal-footer">
715
- <button type="button" class="button_clear button_spacing" @click="close()">取消</button>
716
- <button type="button" class="button_search button_spacing" @click='customPricingConfirm()'>确认</button>
717
- </footer>
718
- </modal>
719
- </div>
720
- </div>
721
- </template>
722
- <script>
723
- import MixPriceInfo from '../../revenue/base/leftview/MixPriceInfo'
724
- import {PagedList, HttpResetClass} from 'vue-client'
725
- import Vue from 'vue'
726
- import co from 'co'
727
-
728
- let readyGen = async function (self) {
729
- await self.$getConfig(self, 'HandManager')
730
- await self.$LoadParams.loadMeterBook(self.f_filialeid)
731
- self.loadMeterBooks()
732
- self.getfield = self.config.excelHeaders
733
- self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
734
- self.reflash()
735
- }
736
-
737
- let downGen = function* (type, condition, data, self) {
738
- // if(data == 0 ) {
739
- // self.$showAlert('下发计划户数为0!请选择需要下发的计划!!', 'danger', 0)
740
- // return
741
- // }
742
- self.condition = condition
743
- self.msg = '确认下发计划'
744
- // 判断之前是否有未抄表数据
745
- let getUnhand = null
746
- // let getUnhand = yield Vue.resetpost('rs/sql/getUnhand', {data: {startDate: self.startDate, condition: self.condition}}, {resolveMsg: null, rejectMsg: '获取未抄表数据异常!!'})
747
- // if (type === 'batch' || type === 'single') {
748
- if (type === 'single') {
749
- getUnhand = yield Vue.resetpost('rs/sql/getUnhand', {
750
- data: {
751
- startDate: self.model.params.startDate,
752
- condition: condition
753
- }
754
- }, {resolveMsg: null, rejectMsg: '获取未抄表数据异常!!'})
755
- self.msg = `下发客户编号为${data.f_userinfo_code}的抄表计划?`
756
- // } else if (type === 'all') {
757
- } else if (type === 'batch') {
758
- let tempCondition = condition.replace("and f_meter_state = '未下发'", '')
759
- getUnhand = yield Vue.resetpost('rs/sql/getUnhand', {
760
- data: {
761
- startDate: self.model.params.startDate,
762
- condition: tempCondition
763
- }
764
- }, {resolveMsg: null, rejectMsg: '获取未抄表数据异常!!'})
765
- self.msg = `确认下发当前总计: ${data} 户计划`
766
- }
767
- for (let i = 0; i < getUnhand.data.length; i++) {
768
- let temp = {
769
- id: getUnhand.data[i].id,
770
- f_user_id: getUnhand.data[i].f_user_id,
771
- f_userfiles_id: getUnhand.data[i].f_userfiles_id,
772
- f_adjustable_id: getUnhand.data[i].f_adjustable_id,
773
- f_adjustable_name: getUnhand.data[i].f_adjustable_name
774
- }
775
- console.log('=================================================================================')
776
- console.log('下发计划查看调压箱和调压箱编号', temp)
777
- console.log('========================================================================================')
778
- self.unhandplan.push(temp)
779
- }
780
- if (getUnhand.data.length > 0) {
781
- self.msg = self.msg + `, 警告: 之前有 ${getUnhand.data.length} 条未抄表数据`
782
- }
783
- self.show = true
784
- }
785
-
786
- let beforenterGen = async function (self, index, row) {
787
- // 验证是不是总表
788
- // self.enter(index, row)
789
- if (row.f_totalsplit_type === '总表') {
790
- let hasUnHand = await self.$HandService.getSplitInfo(row.f_userfiles_id)
791
- if (hasUnHand) {
792
- self.$showAlert('该表下面有未抄或未审核的分表信息!!请先抄录或审核分表信息!', 'danger', 0)
793
- row.f_tablebase = null
794
- } else {
795
- self.enter(index, row)
796
- }
797
- } else {
798
- self.enter(index, row)
799
- }
800
- }
801
-
802
- export default {
803
- title: '机表抄表',
804
- components: { MixPriceInfo },
805
- data () {
806
- return {
807
- priceModel: false,
808
- initres: {
809
- org: [this.$login.f.orgid],
810
- dep: [],
811
- user: []
812
- },
813
- sumsmodel: [],
814
- orgCondtionStr: '',
815
- priceSplit: false,
816
- deletestate: false,
817
- criteriaShow: false,
818
- model: new PagedList('rs/sql/getPlan', 50, {orderitem: this.orderDefault ? '"' + this.orderDefault + ' "' : `'f_hand_date desc'`}, {
819
- f_oughtamount: 0,
820
- f_oughtfee: 0
821
- }),
822
- config: {
823
-
824
- // 导出列要和查询列相同
825
- excelHeaders: {
826
- 'f_user_id': '表编号',
827
- 'f_meternumber': '表号',
828
- 'f_inputtor': '抄表员',
829
- 'f_balance': '上期结余',
830
- 'f_last_input_date': '上次抄表',
831
- 'f_hand_date': '下发时间',
832
- 'f_input_date': '抄表日期',
833
- 'f_userinfo_code': '客户编号',
834
- 'f_address': '客户地址',
835
- 'f_residential_area': '小区名称',
836
- 'f_user_name': '客户姓名',
837
- 'f_last_tablebase': '上期底数',
838
- 'f_tablebase': '本期指数',
839
- 'f_oughtfee': '应交金额',
840
- 'f_oughtamount': '应交气量',
841
- 'f_whether_pay': '是否缴费',
842
- 'f_book_name': '抄表册',
843
- 'f_input_person': '录入人员',
844
- 'f_operator': '下发人员',
845
- 'f_meter_classify': '气表分类',
846
- 'f_meter_style': '气表型号',
847
- 'f_accounts_state': '下账标识',
848
- 'f_user_phone': '客户电话',
849
- 'f_adjustable_id': '表箱号'
850
- },
851
- examine: true,
852
- customCal: false
853
- },
854
- meter_state: false, // 是否显示计划下发按钮
855
- downModel: {
856
- downDate: Vue.$login.toStandardTimeString(),
857
- downWay: 'downWithUserfiles',
858
- downInputtor: []
859
- },
860
- inputtorModel: {
861
- inputtor: [],
862
- reason: ''
863
- },
864
- auditState: [{label: '全部', value: ''}, {label: '未抄表', value: '未抄表'}, {label: '待审核', value: '待审核'}, {label: '已抄表', value: '已抄表'}],
865
-
866
- plans: [], // 记录当前行是否被勾选
867
- all: false, // 是否全选
868
- show: false, // 下发日期模态框显示
869
- unhandplan: [], // 之前是否有未抄表记录
870
- downConfirm: false, // 下发若有未抄记录,确认框
871
- uploadshow: false,
872
- // 小区
873
- residentialArea: [],
874
-
875
- // downDate: this.$login.toStandardYearMonth().replace("-", ""),
876
- msg: '',
877
- condition: '',
878
- headers: {'username': Vue.$login.f.name, 'blodid': Vue.$login.guid()},
879
- orderDefault: 'f_hand_date',
880
- orderFields: {
881
- f_userinfo_id: 'no'
882
- },
883
- getfield: {},
884
- outlet: '',
885
- filiale: '',
886
- condition2: '',
887
- area: [],
888
- inputtouPerson: [],
889
- meters: [{label: '全部', value: ''}, {label: '机表', value: '机表'}, {label: '物联网表', value: '物联网表'}],
890
- resultstate: this.$appdata.getParam('抄表结果状态'),
891
- meterstates: this.$appdata.getParam('抄表状态') ? [{
892
- label: '全部',
893
- value: ''
894
- }, ...this.$appdata.getParam('抄表状态')] : [],
895
- usertypes: this.$appdata.getParam('客户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('客户类型')] : [],
896
- userlevels: this.$appdata.getParam('用户等级') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')] : [],
897
- adjustablename: this.$appdata.getParam('调压箱名称') ? [{
898
- label: '全部',
899
- value: ''
900
- }, ...this.$appdata.getParam('调压箱名称')] : [],
901
- inputtores2: [], // 下发时使用自定义抄表员,
902
- splitdata: '',
903
- f_filialeid: this.$login.f.orgid,
904
- meterbooks: [],
905
- upshow: false,
906
- inputid: 0,
907
- examineshow: false,
908
- examinerow: null,
909
- showfiles: false,
910
- uploadText: '抄表',
911
- examinetype: false,
912
- danhu: {
913
- show: false,
914
- f_userinfo_code: '',
915
- f_tablebase: '',
916
- info: {}
917
- },
918
- showerr: false,
919
- err: '',
920
- // 请求对象(批量导入,查询进度使用)
921
- HttpReset: new HttpResetClass(),
922
- // 气价使用详情展示
923
- detailsShow: false,
924
- row: null,
925
- // 应抄底数
926
- should_base: 0,
927
- // 计算公式
928
- designFormulas: null,
929
- usermlimit: this.$appdata.getSingleValue('民用自动审核区间'),
930
- userfmlimit: this.$appdata.getSingleValue('非民用自动审核区间')
931
- }
932
- },
933
- ready () {
934
- this.getaddress()
935
- readyGen(this)
936
- },
937
- mounted () {
938
- console.log(this.inputid)
939
- document.getElementById(this.inputid).focus()
940
- },
941
- methods: {
942
- stairMoney (price, gas) {
943
- return (price * gas).toFixed(2) - 0
944
- },
945
- async customPricingConfirm () {
946
- let sumGas = (this.row.f_stair_gas1 - 0) + (this.row.f_stair_gas2 - 0) + (this.row.f_stair_gas3 - 0)
947
- if (sumGas !== (this.row.f_oughtamount - 0)) {
948
- this.$showMessage('自定义划价总气量不符, 请检查')
949
- return
950
- }
951
- let row = {
952
- id: this.row.id,
953
- f_oughtfee: this.row.f_oughtfee,
954
- f_stair_price1: this.row.f_stair_price1,
955
- f_stair_gas1: this.row.f_stair_gas1,
956
- f_stair_money1: this.row.f_stair_money1,
957
- f_stair_price2: this.row.f_stair_price2,
958
- f_stair_gas2: this.row.f_stair_gas2,
959
- f_stair_money2: this.row.f_stair_money2,
960
- f_stair_price3: this.row.f_stair_price3,
961
- f_stair_gas3: this.row.f_stair_gas3,
962
- f_stair_money3: this.row.f_stair_money3
963
- }
964
- await this.$resetpost('rs/logic/customPricing', {data: row}, {resolveMsg: '保存成功', rejectMsg: '保存失败'}).then(res => {
965
- this.close()
966
- this.search()
967
- })
968
- },
969
- customPricing () {
970
- if (!this.$login.r.find(value => value == '抄表自定义划价')) {
971
- this.$showMessage('当前登录用户没有【抄表自定义划价】权限, 请联系管理员!')
972
- return
973
- }
974
- if (this.row.f_meter_state !== '已抄表') {
975
- this.$showMessage('当前抄表单不是已抄表状态,无法进行自定义划价!')
976
- return
977
- }
978
- if (this.row.f_whether_pay !== '否') {
979
- this.$showMessage('当前抄表单已经缴费,无法进行自定义划价!')
980
- return
981
- }
982
- this.detailsShow = false
983
- this.priceModel = true
984
- },
985
- downloadFiles () {
986
- let downurl = 'rs/downloadfile/file?filename=机表抄表导入Excel模板'
987
- this.$resetget(downurl, {}).then(res => {
988
- var link = document.createElement('a')
989
- link.target = '_blank'
990
- link.href = downurl
991
- link.setAttribute('download', '机表抄表导入Excel模板.xlsx') // 指定下载后的文件名,防跳转
992
- document.body.appendChild(link)
993
- link.click()
994
- })
995
- },
996
- calculationBase (row) {
997
- let oughtamount = null
998
- if (row.f_tablebase) {
999
- if (row.f_share_gas) {
1000
- oughtamount = (row.f_tablebase - 0 - (row.f_last_tablebase - 0)).toFixed(4) + (row.f_share_gas > 0 ? '+' : '') + row.f_share_gas.toFixed(2)
1001
- } else {
1002
- if (row.f_capacity && row.f_capacity > 0 && row.f_tablebase < row.f_last_tablebase) {
1003
- oughtamount = (row.f_tablebase - 0 + (row.f_capacity - row.f_last_tablebase)).toFixed(2)
1004
- } else {
1005
- oughtamount = (row.f_tablebase - 0 - (row.f_last_tablebase - 0)).toFixed(2)
1006
- }
1007
- }
1008
- } else {
1009
- oughtamount = 0
1010
- }
1011
- row.f_oughtamount = oughtamount
1012
- return oughtamount
1013
- },
1014
- cancelHand (row) {
1015
- if (this.config.examine) {
1016
- let handdate = new Date(row.f_hand_date)
1017
- let ima = new Date()
1018
- if (handdate.getMonth() == ima.getMonth()) {
1019
- this.cancelHand3(row)
1020
- } else {
1021
- if (!this.$login.r.find(value => value == '抄表隔月冲正')) {
1022
- this.$showMessage('当前登录用户没有【抄表隔月冲正】权限, 请联系管理员!')
1023
- } else {
1024
- this.cancelHand3(row)
1025
- }
1026
- }
1027
- } else {
1028
- this.cancelHand3(row)
1029
- }
1030
- },
1031
-
1032
- cancelHand3 (row) {
1033
- // 抄表加入权限
1034
- if (!this.$login.r.find(value => value == '机表抄表冲正')) {
1035
- this.$showMessage('当前登录用户没有冲正权限, 请联系管理员!')
1036
- return
1037
- }
1038
- // console.log('抄表冲正。、。。、', row)
1039
- let param = {
1040
- f_hand_id: row.id,
1041
- operInfo: {
1042
- f_operator: this.$login.f.name,
1043
- f_operatorid: this.$login.f.id,
1044
- f_orgid: this.$login.f.orgid,
1045
- f_orgname: this.$login.f.orgs,
1046
- f_depid: this.$login.f.depids,
1047
- f_depname: this.$login.f.deps
1048
- }
1049
- }
1050
- let url = 'rs/logic/sale_commonEnterCancel'
1051
- this.$resetpost(url, {data: param}, {warnMsg: '确定对这条记录进行撤销吗?'}).then(() => {
1052
- this.search()
1053
- this.close()
1054
- })
1055
- },
1056
- cancelAuditHand (row) {
1057
- console.log('撤回本次录入。。。', row)
1058
- let handplan = {
1059
- id: row.id,
1060
- f_oughtamount: 0,
1061
- f_tablebase: 0,
1062
- f_input_date: null,
1063
- f_meter_state: '未抄表',
1064
- f_meter_source: null
1065
- }
1066
- this.$resetpost('rs/entity/t_handplan', handplan, {
1067
- resolveMsg: null,
1068
- rejectMsg: '撤回失败'
1069
- }).then((res) => {
1070
- this.search()
1071
- })
1072
- },
1073
- async danhuCodeSearch () {
1074
- this.danhu.f_userinfo_code = this.danhu.f_userinfo_code.replace(/(^\s*)|(\s*$)/g, '')
1075
- await this.$resetpost('rs/sql/getInfoOfDanhu', {
1076
- data: {
1077
- f_userinfo_code: this.danhu.f_userinfo_code,
1078
- f_orgid: this.f_filialeid
1079
- }
1080
- },
1081
- {resolveMsg: null, rejectMsg: '查询用户信息失败,网络错误'}).then(res => {
1082
- if (res.data.length !== 1) {
1083
- this.$showAlert(res.data.length === 0 ? '没有查询到用户' : '查询到多条用户信息', 'warning', 3000)
1084
- return
1085
- }
1086
- if (res.data[0].f_meter_state === '待审核') {
1087
- this.$showAlert('用户有待审核的记录', 'warning', 3000)
1088
- return
1089
- }
1090
- if (res.data[0].f_whether_pay === '否') {
1091
- this.$showAlert('用户有未缴费的抄表记录', 'warning', 3000)
1092
- }
1093
- this.danhu.info = res.data[0]
1094
- // = Object.assign(this.danhu,{info:res.data[0]})
1095
- document.getElementById('danhubase').focus()
1096
- })
1097
- },
1098
- // 单户抄表 下发计划并抄表
1099
- async downAndHand () {
1100
- if (!this.danhu.info.f_userinfo_code || this.danhu.info.f_userinfo_code === '') {
1101
- this.$showAlert(`请先查询用户信息`, 'warning', 2000)
1102
- return
1103
- }
1104
-
1105
- if (this.danhu.f_tablebase < 0) {
1106
- this.$showAlert(`底数不能小于0,请注意!`, 'warning', 2000)
1107
- return
1108
- } else if (this.danhu.f_tablebase - parseInt(this.danhu.f_tablebase) !== 0) {
1109
- this.$showAlert(`底数只能输入整数,请注意!`, 'warning', 2000)
1110
- return
1111
- } else if (this.danhu.f_tablebase < this.danhu.info.f_tablebase && !this.danhu.info.f_capacity) {
1112
- this.$showAlert(`本期表底数不能低于上期表底数`, 'warning', 2000)
1113
- return
1114
- } else {
1115
- if (this.danhu.f_tablebase < this.danhu.info.f_tablebase) {
1116
- this.$showMessage('本次抄表已超越最大量程, 请熟知!')
1117
- }
1118
- }
1119
- let param = {
1120
- downDate: this.downModel.downDate,
1121
- startDate: this.model.params.startDate,
1122
- endDate: this.model.params.endDate,
1123
- condition: ` f_userfiles_id = '${this.danhu.info.f_userfiles_id}' `,
1124
- f_operator: this.$login.f.name,
1125
- f_operatorid: this.$login.f.id,
1126
- danhu: true,
1127
- userfilesid: this.danhu.info.f_userfiles_id
1128
- }
1129
- console.log('下发参数:', param)
1130
- this.$resetpost('rs/logic/downHand', {data: param}, {resolveMsg: null, rejectMsg: '下发失败,请检查该用户是否在该归属期内已有抄表记录'}).then((res) => {
1131
- console.log('下发计划成功', res)
1132
- this.$resetpost('/rs/sql/querySingleTable', {
1133
- data: {
1134
- items: 'max(id) id',
1135
- tablename: 't_handplan',
1136
- condition: ` f_userfiles_id = '${this.danhu.info.f_userfiles_id}' `
1137
- }
1138
- }, {resolveMsg: null, rejectMsg: '查询抄表信息失败'}).then((res2) => {
1139
- let handParam = {
1140
- f_meter_classify: this.danhu.info.f_meter_classify,
1141
- f_meter_brand: this.danhu.info.f_meter_brand,
1142
- f_hand_id: res2.data[0].id,
1143
- f_tablebase: this.danhu.f_tablebase,
1144
- f_userinfo_id: this.danhu.info.f_userinfo_id
1145
- }
1146
- this.$resetpost('rs/logic/sale_commonEnter', {data: handParam}, {
1147
- resolveMsg: null,
1148
- rejectMsg: null
1149
- })
1150
- }).then((res) => {
1151
- this.$showAlert(`单户抄表成功!`, 'success', 2000)
1152
- this.danhuShow()
1153
- }).catch((error) => {
1154
- this.danhu.show = false
1155
- this.$showAlert(`单户抄表失败!` + JSON.toString(error), 'danger', 2000)
1156
- })
1157
- }).catch((error) => {
1158
- this.danhu.show = false
1159
- this.$showAlert(`抄表失败,请注意查看,失败原因:` + JSON.toString(error), 'danger', 2000)
1160
- })
1161
- },
1162
- // 获得本月的最后一天。
1163
- getLastDayOfMonth (year, month) {
1164
- let new_year = year // 取当前的年份
1165
- let new_month = month++// 取下一个月的第一天,方便计算(最后一天不固定)
1166
- if (month > 12) // 如果当前大于12月,则年份转到下一年
1167
- {
1168
- new_month -= 12 // 月份减
1169
- new_year++ // 年份增
1170
- }
1171
- let new_date = new Date(new_year, new_month, 1) // 取当年当月中的第一天
1172
- let date_count = (new Date(new_date.getTime() - 1000 * 60 * 60 * 24)).getDate()// 获取当月的天数
1173
- // let last_date = new Date(new_date.getTime() - 1000 * 60 * 60 * 24);//获得当月最后一天的日期
1174
- return date_count
1175
- },
1176
- danhuShow () {
1177
- this.model.params.startDate = this.$refs.paged.$refs.criteria.model.startDate
1178
- this.model.params.endDate = this.$refs.paged.$refs.criteria.model.endDate
1179
- this.downModel.downDate = this.$login.toStandardTimeString()
1180
- this.danhu = {
1181
- show: true,
1182
- f_userinfo_code: '',
1183
- f_tablebase: '',
1184
- info: {}
1185
- }
1186
- setTimeout(() => {
1187
- document.getElementById('danhucode').focus()
1188
- this.$refs.paged.$refs.criteria.search()
1189
- }, 100)
1190
- },
1191
- paycodefocus () {
1192
- this.$nextTick(() => {
1193
- this.$els.paycode.focus()
1194
- })
1195
- },
1196
- getRes (obj) {
1197
- this.orgCondtionStr = obj
1198
- },
1199
- async getaddress () {
1200
- console.log('开始获取小区')
1201
- let HttpReset = new HttpResetClass()
1202
- var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
1203
- data: {
1204
- condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
1205
- }
1206
- }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
1207
- console.log('小区', data)
1208
- let house = []
1209
- house.push()
1210
- for (let row of data.data) {
1211
- console.log('开始保存小区')
1212
- house.push({label: row.f_residential_area, value: row.f_residential_area})
1213
- }
1214
- this.residentialArea = house
1215
- },
1216
- loadMeterBooks () {
1217
- this.meterbooks = this.$GetSaleParam.getMeterBooks()
1218
- },
1219
-
1220
- fileterprice (row) {
1221
- this.splitdata = row
1222
- this.priceSplit = true
1223
- console.log('row==>', row)
1224
- },
1225
- hidden () {
1226
- this.criteriaShow = !this.criteriaShow
1227
- },
1228
- clear () {
1229
- Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
1230
- this.$refs.paged.$refs.criteria.model[key] = []
1231
- })
1232
- },
1233
-
1234
- // 判断当前页是否全选
1235
- isChooseAll (rows) {
1236
- if (this.plans.length == 0 && rows.length == 0) {
1237
- return false
1238
- }
1239
- for (var i = 0; i < rows.length; i++) {
1240
- let flag = false
1241
- if (rows[i].f_meter_state == '未下发') {
1242
- for (let plan of this.plans) {
1243
- if (plan.id == rows[i].f_userfiles_id) {
1244
- flag = true
1245
- if (!plan.state) {
1246
- return false
1247
- }
1248
- }
1249
- }
1250
- if (!flag) {
1251
- return false
1252
- }
1253
- }
1254
- }
1255
- return true
1256
- },
1257
- // 选择需要下发的计划
1258
- chooseOne (e, row, rows) {
1259
- console.log('row', row)
1260
- let checked = e.target.checked
1261
- console.log('state', e.target.checked)
1262
- // 判断当前行是否被选中
1263
- if (checked) {
1264
- let onePlan = {
1265
- id: row.f_userfiles_id,
1266
- state: true
1267
- }
1268
- // 记录被选中计划的状态
1269
- let flag = false
1270
- for (let plan of this.plans) {
1271
- if (plan.id == row.f_userfiles_id) {
1272
- flag = true
1273
- plan.state = true
1274
- }
1275
- }
1276
- if (!flag) {
1277
- this.plans.push(onePlan)
1278
- }
1279
- } else {
1280
- for (let plan of this.plans) {
1281
- if (plan.id == row.f_userfiles_id) {
1282
- plan.state = false
1283
- }
1284
- }
1285
- }
1286
- // let param = {id:row.id,isChoose:true}
1287
-
1288
- if (this.isChooseAll(rows)) {
1289
- this.all = true
1290
- } else {
1291
- this.all = false
1292
- }
1293
- // this.delRepetition()
1294
- },
1295
- uploadFiles () {
1296
- this.showfiles = !this.showfiles
1297
- },
1298
- chooseAll () {
1299
- if (this.all) {
1300
- // this.chooseInfo[index-1] = []
1301
- // for (let row of this.model.rows){
1302
- // this.chooseInfo[index-1].push(row)
1303
- // }
1304
- // this.chooseInfo = Object.assign([],this.chooseInfo,this.model.rows)
1305
-
1306
- for (let row of this.model.rows) {
1307
- if (row.f_meter_state == '未下发') {
1308
- let onePlan = {
1309
- id: row.f_userfiles_id,
1310
- state: true
1311
- }
1312
- let flag = false
1313
- for (let plan of this.plans) {
1314
- if (plan.id == row.f_userfiles_id) {
1315
- flag = true
1316
- plan.state = true
1317
- }
1318
- }
1319
- if (!flag) {
1320
- this.plans.push(onePlan)
1321
- }
1322
- }
1323
- }
1324
- } else {
1325
- // this.chooseInfo[index-1] = []
1326
- // console.log("this.chooseInfo[index-1]",this.chooseInfo[index-1])
1327
- for (let row of this.model.rows) {
1328
- if (row.f_meter_state == '未下发') {
1329
- for (let plan of this.plans) {
1330
- if (plan.id == row.f_userfiles_id) {
1331
- plan.state = false
1332
- }
1333
- }
1334
- }
1335
- }
1336
- }
1337
- },
1338
- search () {
1339
- // 查询前清空选择项
1340
- this.plans = []
1341
- this.$refs.paged.$refs.criteria.search()
1342
- },
1343
- clickupshow () {
1344
- if (!this.$login.r.find(value => value == '机表抄表导入抄表')) {
1345
- this.$showMessage('你没有机表抄表导入抄表的权限,请联系管理员!')
1346
- return
1347
- }
1348
- this.upshow = !this.upshow
1349
- },
1350
- deletehand () {
1351
- if (!this.$login.r.find(value => value == '抄表计划删除')) {
1352
- this.$showMessage('你没有【抄表计划删除】的权限,请联系管理员!')
1353
- } else {
1354
- if (this.deletestate) {
1355
- console.log('mode', this.model)
1356
- let cons = this.model.params
1357
- this.$showMessage('删除后不可恢复,确认删除该批未抄表计划吗?', ['confirm', 'cancel']).then((res) => {
1358
- if (res === 'confirm') {
1359
- this.$resetpost('rs/logic/deletePlanAll', {data: cons}).then((res) => {
1360
- this.$dispatch('refresh', '删除计划', cons)
1361
- console.log('ressss:', res)
1362
- this.$showAlert(`共计删除${res.data.index}条记录`, 'success', 2000)
1363
- this.search()
1364
- })
1365
- }
1366
- })
1367
- } else {
1368
- this.$showMessage('为保证误删操作,请先选择抄表单查询条件为未抄表,查询后,再点击删除计划按钮!')
1369
- }
1370
- }
1371
- },
1372
- searchPrint () {
1373
- console.log('mode', this.model)
1374
- let cons = this.model.params
1375
- let data = {
1376
- 'body': {
1377
- 'data': {
1378
- 'condition': ''
1379
- },
1380
- 'field': [],
1381
- 'templateName': '',
1382
- 'sqlName': ''
1383
- },
1384
- 'condition': cons,
1385
- 'sqlname': 'periodAlreadyIssuedOrder'
1386
- }
1387
- this.$resetpost('rs/logic/allExportExcel', {data: data}, {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
1388
- if (res.data === 'no user') {
1389
- this.$showAlert(`无匹配用户,无法导出对应excel`, 'warning', 2000)
1390
- } else {
1391
- var link = document.createElement('a')
1392
- res.data.forEach((item) => {
1393
- console.log('导出路径', item.filename)
1394
- let path = item.filename
1395
- // 本地
1396
- // let pathName = "http://" + location.host + "/excel" + path.split('excel')[1]
1397
- // 服务器
1398
- let pathName = 'http://' + location.host + '/webapps' + path.split('webapps')[1]
1399
- link.href = pathName
1400
- console.log('=============================', path.split('excel/')[1])
1401
- link.download = path.split('excel/')[1]
1402
- link.dispatchEvent(new MouseEvent('click'))
1403
- })
1404
- }
1405
- })
1406
- },
1407
- selfSearch (args) {
1408
- this.meter_state = args.condition.includes('未下发')
1409
- this.inputtor_change = args.condition.includes('未抄表')
1410
- console.log('=====抄表1====', args.condition.includes('未抄表'))
1411
- console.log('=====抄表1====', this.deletestate)
1412
- if (args.condition.includes('未抄表')) {
1413
- this.deletestate = true
1414
- } else {
1415
- this.deletestate = false
1416
- }
1417
- console.log('=====抄表1====', this.deletestate)
1418
- if (!this.orgCondtionStr) {
1419
- args.condition = `${args.condition}` + ' and f_orgid = ' + this.$login.f.orgid
1420
- } else {
1421
- args.condition = `${args.condition}` + this.orgCondtionStr
1422
- }
1423
-
1424
- // 抄表员查询条件
1425
- this.inputtouPerson = this.$refs.paged.$refs.criteria.model.f_inputtor
1426
- if (this.inputtouPerson.length !== 0) {
1427
- let str = JSON.stringify(this.inputtouPerson)
1428
- str = str.replace(/"/g, `'`)
1429
- str = str.replace(/\[/g, ``)
1430
- str = str.replace(/\]/g, ``)
1431
- console.log('=====抄表员model22222222222绑定====', str)
1432
- // 查询多个抄表员时条件
1433
- args.condition += ` and f_inputtor in ( ${str} )`
1434
- }
1435
- // 小区查询条件
1436
- this.area = this.$refs.paged.$refs.criteria.model.f_residential_area
1437
- console.log('=====小区model绑定====', this.area)
1438
- if (this.area.length !== 0) {
1439
- let str = JSON.stringify(this.area)
1440
- str = str.replace(/"/g, `'`)
1441
- str = str.replace(/\[/g, ``)
1442
- str = str.replace(/\]/g, ``)
1443
- console.log('=====小区model22222222222绑定====', str)
1444
- // 查询多个小区时条件
1445
- args.condition += ` and f_residential_area in ( ${str} )`
1446
- }
1447
-
1448
- if (args.model.f_meter_brand && args.model.f_meter_brand.length > 0) {
1449
- if (args.model.f_meter_brand[0].f_meter_brand) {
1450
- args.condition = `${args.condition} and f_meter_brand = '${args.model.f_meter_brand[0].f_meter_brand}'`
1451
- }
1452
- }
1453
- this.model.params.startDate = this.$refs.paged.$refs.criteria.model.startDate
1454
- this.model.params.endDate = this.$refs.paged.$refs.criteria.model.endDate
1455
- this.condition2 = args.condition
1456
- console.log('selfsearch..', args.condition, this.model)
1457
- this.model.search(args.condition, this.model)
1458
- },
1459
- reflash () {
1460
- this.$refs.paged.$refs.criteria.model.f_orgid = `${Vue.$login.f.orgid}`
1461
- this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStartAndEndDateString()[0]
1462
- this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStartAndEndDateString()[1]
1463
- this.search()
1464
- },
1465
- beforenter (index, row) {
1466
- this.inputid = index + 1
1467
- // 限制本次抄表不能低于上次
1468
- if (row.f_tablebase) {
1469
- if (row.f_tablebase < 0) {
1470
- row.state = '失败'
1471
- Vue.set(row, 'error', '底数不能小于0')
1472
- this.speckText('底数不能小于0,请注意!')
1473
- } else if (row.f_tablebase - parseInt(row.f_tablebase) !== 0) {
1474
- row.state = '失败'
1475
- Vue.set(row, 'error', '底数只能输入整数')
1476
- this.speckText('底数只能输入整数,请注意!')
1477
- } else if (row.f_tablebase < row.f_last_tablebase && !row.f_capacity) {
1478
- row.state = '失败'
1479
- Vue.set(row, 'error', '本期表底数不能低于上期表底数')
1480
- this.speckText('本期表底数不能低于上期表底数,请注意!')
1481
- } else {
1482
- if (row.f_tablebase < row.f_last_tablebase) {
1483
- this.$showMessage('本次抄表已超越最大量程, 请熟知!')
1484
- }
1485
- // 抄表结果状态没选默认给正常
1486
- row.f_result_state = row.f_result_state ? row.f_result_state : '正常'
1487
- beforenterGen(this, index, row)
1488
- }
1489
- }
1490
- },
1491
- enter (index, row) {
1492
- console.log('录入数据。..', row)
1493
- let auditFlag = false
1494
- let num = (row.f_tablebase - row.f_last_tablebase)
1495
- let reg = /^\d+,\d+$/
1496
- if (row.f_user_type === '民用' && this.usermlimit) {
1497
- if (!reg.test(this.usermlimit)) {
1498
- this.$showMessage('民用自动审核区间参数设置有误, 请检查!')
1499
- return
1500
- }
1501
- let limit = this.usermlimit.split(',')
1502
- if (!(limit[0] - 0 <= num && num <= limit[1] - 0)) {
1503
- auditFlag = true
1504
- }
1505
- } else if (row.f_user_type === '非民用' && this.userfmlimit) {
1506
- if (!reg.test(this.userfmlimit)) {
1507
- this.$showMessage('非民用自动审核区间参数设置有误, 请检查!')
1508
- return
1509
- }
1510
- let limit = this.userfmlimit.split(',')
1511
- if (!(limit[0] - 0 <= num && num <= limit[1] - 0)) {
1512
- auditFlag = true
1513
- }
1514
- } else if (this.$appdata.getSingleValue('抄表审核') === '启用') {
1515
- auditFlag = true
1516
- }
1517
- if (auditFlag) {
1518
- let f_input_date = Vue.$login.toStandardDateString()
1519
- if (row.f_input_date && row.f_input_date != '') {
1520
- f_input_date = row.f_input_date
1521
- }
1522
- let handplan = {
1523
- id: row.id,
1524
- f_oughtamount: row.f_oughtamount,
1525
- f_adjustment_volume: row.f_adjustment_volume ? row.f_adjustment_volume : 0,
1526
- f_tablebase: row.f_tablebase,
1527
- f_hand_date: row.f_hand_date,
1528
- f_input_date: f_input_date,
1529
- f_input_person: Vue.$login.f.name,
1530
- f_meter_state: '待审核',
1531
- f_meter_source: '手动录入',
1532
-
1533
- f_operator: Vue.$login.f.name,
1534
- f_operatorid: Vue.$login.f.id,
1535
- f_orgid: Vue.$login.f.orgid,
1536
- f_orgname: Vue.$login.f.orgs,
1537
- f_depid: Vue.$login.f.depids,
1538
- f_depname: Vue.$login.f.deps
1539
-
1540
- }
1541
- console.log('抄表负数。。0', handplan)
1542
- this.$resetpost('rs/entity/t_handplan', handplan, {
1543
- resolveMsg: null,
1544
- rejectMsg: '抄表数据保存出错!!!'
1545
- }).then((res) => {
1546
- row.f_meter_state = '待审核'
1547
- row.f_whether_pay = '否'
1548
- row.f_input_date = res.data.f_input_date
1549
- // this.search()
1550
- }).catch((error) => {
1551
- row.state = '失败'
1552
- Vue.set(row, 'error', JSON.stringify(error))
1553
- this.speckText('抄表录入出错,请注意!')
1554
- })
1555
- } else {
1556
- // 没有启用抄表审核功能
1557
- row.f_input_person = this.$login.f.name
1558
- row.f_inputtor = row.f_inputtor
1559
- row.f_userinfo_id = row.f_userinfo_id + ''
1560
- row.f_userfiles_id = row.f_userfiles_id + ''
1561
- this.pass(row)
1562
- }
1563
- },
1564
- pass (row) {
1565
- let param = {
1566
- f_meter_classify: row.f_meter_classify,
1567
- f_meter_brand: row.f_meter_brand,
1568
- f_hand_id: row.id,
1569
- f_operator: Vue.$login.f.name,
1570
- f_tablebase: row.f_tablebase,
1571
- f_userinfo_id: row.f_userinfo_id,
1572
- f_adjustment_volume: row.f_adjustment_volume ? row.f_adjustment_volume : 0
1573
- }
1574
- this.$resetpost('rs/logic/sale_commonEnter', {data: param}, {resolveMsg: null, rejectMsg: null}).then((res) => {
1575
- row.f_meter_state = res.data.f_meter_state
1576
- row.f_whether_pay = res.data.f_whether_pay
1577
- row.f_oughtfee = res.data.f_oughtfee
1578
- row.f_oughtamount = res.data.f_oughtamount
1579
- // this.$resetpost('rs/logic/getMeterSms', {data: param}, {resolveMsg: null, rejectMsg: null}).then((res) => {
1580
- // this.search()
1581
- let f_result_state = '正常'
1582
- if (row.f_result_state && row.f_result_state != '') {
1583
- f_result_state = row.f_result_state
1584
- }
1585
- let f_input_date = ''
1586
- if (row.f_input_date && row.f_input_date != '') {
1587
- f_input_date = ` ,f_input_date = '${row.f_input_date}'`
1588
- }
1589
- let sqldata = `update t_handplan set f_result_state = '${f_result_state}' ${f_input_date} where id = '${row.id}'`
1590
- this.$resetpost('rs/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: '业务单号保存失败'})
1591
- // }).catch((error) => {
1592
- // row.state = '失败'
1593
- // Vue.set(row, 'error', JSON.stringify(error))
1594
- // this.speckText('抄表出错,请注意!')
1595
- // })
1596
- // this.search()
1597
- }).catch((error) => {
1598
- row.state = '失败'
1599
- Vue.set(row, 'error', JSON.stringify(error))
1600
- this.speckText('抄表出错,请注意!')
1601
- })
1602
- },
1603
- nopass (row) {
1604
- console.log('不通过。。。', row)
1605
- let handplan = {
1606
- id: row.id,
1607
- f_oughtamount: 0,
1608
- f_tablebase: 0,
1609
- f_input_date: null,
1610
- f_meter_state: '未抄表',
1611
- f_meter_source: null
1612
- }
1613
- this.$resetpost('rs/entity/t_handplan', handplan, {
1614
- resolveMsg: null,
1615
- rejectMsg: '未通过,抄表数据返回未抄表保存出错!!!'
1616
- }).then((res) => {
1617
- row.f_tablebase = null
1618
- row.f_meter_state = '未抄表'
1619
- row.f_whether_pay = '否'
1620
- this.search()
1621
- }).catch((error) => {
1622
- row.state = '失败'
1623
- Vue.set(row, 'error', JSON.stringify(error))
1624
- this.speckText('抄表录入出错,请注意!')
1625
- })
1626
- },
1627
- clearError (row) {
1628
- if (row.f_tablebase === 0) {
1629
- row.f_tablebase = ''
1630
- }
1631
- Vue.set(row, 'error', null)
1632
- },
1633
- async speckText (str) {
1634
- var url = 'http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=' + encodeURI(str)
1635
- await new Audio(url).play()
1636
- this.err = str
1637
- this.showerr = true
1638
- this.paycodefocus()
1639
- },
1640
- closeerr () {
1641
- this.showerr = false
1642
- },
1643
- fileUpload () {
1644
- this.uploadshow = true
1645
- },
1646
- // 删除这条计划
1647
- delectHand (row) {
1648
- this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
1649
- if (res === 'confirm') {
1650
- this.$resetpost('rs/logic/deletePlan', {data: row}).then(() => {
1651
- this.$dispatch('refresh', '删除计划', row)
1652
- this.search()
1653
- })
1654
- }
1655
- })
1656
- },
1657
- cancelHand4 (row) {
1658
- this.examinerow = row
1659
- this.examineshow = true
1660
- this.examinetype = true
1661
- },
1662
- cancelHand2 (row) {
1663
- if (this.config.examine) {
1664
- let handdate = new Date(row.f_hand_date)
1665
- console.log('获取月份', handdate.getMonth())
1666
- let ima = new Date()
1667
- console.log('获取月份', ima.getMonth())
1668
- if (handdate.getMonth() == ima.getMonth()) {
1669
- this.cancelHand3(row)
1670
- } else {
1671
- if (!this.$login.r.find(value => value == '抄表隔月冲正')) {
1672
- this.$showMessage('当前登录用户没有隔月冲正权限, 请联系管理员!')
1673
- } else {
1674
- this.cancelHand3(row)
1675
- }
1676
- }
1677
- } else {
1678
- this.cancelHand3(row)
1679
- }
1680
- },
1681
- async cancelHand5 () {
1682
- let sqldata = `update t_handplan set f_audit_state ='已审核',f_audit_person='${this.$login.f.name}',
1683
- f_audit_date='${this.$login.toStandardTimeString()}' where id ='${this.examinerow.id}'`
1684
- await this.$resetpost('rs/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: '更新收费记录订单号失败'})
1685
-
1686
- this.cancelHand3(this.examinerow)
1687
- },
1688
- cancelHand3 (row) {
1689
- // 抄表加入权限
1690
- if (!this.$login.r.find(value => value == '机表抄表冲正')) {
1691
- this.$showMessage('当前登录用户没有冲正权限, 请联系管理员!')
1692
- return
1693
- }
1694
- // console.log('抄表冲正。、。。、', row)
1695
- let param = {
1696
- f_hand_id: row.id,
1697
- operInfo: {
1698
- f_operator: this.$login.f.name,
1699
- f_operatorid: this.$login.f.id,
1700
- f_orgid: this.$login.f.orgid,
1701
- f_orgname: this.$login.f.orgs,
1702
- f_depid: this.$login.f.depids,
1703
- f_depname: this.$login.f.deps
1704
- }
1705
- }
1706
- let url = 'rs/logic/sale_commonEnterCancel'
1707
- this.$resetpost(url, {data: param}, {warnMsg: '确定对这条记录进行撤销吗?'}).then(() => {
1708
- this.search()
1709
- this.close()
1710
- })
1711
- },
1712
- down (type, condition, data) {
1713
- co(downGen(type, condition, data, this))
1714
- },
1715
- // 单条下发计划
1716
- downHand (row) {
1717
- console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' + row.f_userfiles_id)
1718
- this.down('single', `f_userfiles_id = '${row.f_userfiles_id}'`, row)
1719
- },
1720
- // 批量下发计划
1721
- batchDownHand () {
1722
- this.down('batch', this.model.condition, this.model.count)
1723
- },
1724
- // batchDownHand () {
1725
- // this.condition = ''
1726
- // let count = 0
1727
- // for (let plan of this.plans){
1728
- // if(plan.state){
1729
- // this.condition = this.condition + plan.id + ','
1730
- // count = count + 1
1731
- // }
1732
- // }
1733
- // this.down('batch', `f_user_id in (${this.condition.substring(0,this.condition.length-1)})`,count)
1734
- // },
1735
- // allDownHand () {
1736
- // this.down('all', this.model.condition, this.model.count)
1737
- // },
1738
-
1739
- validateDate () {
1740
- let currentDown = new Date(this.downModel.downDate)
1741
- console.log(new Date(this.$refs.paged.$refs.criteria.model.startDate))
1742
- console.log(new Date(this.$refs.paged.$refs.criteria.model.endDate))
1743
- return currentDown >= new Date(this.$refs.paged.$refs.criteria.model.startDate + ' 00:00:00') && currentDown <= new Date(this.$refs.paged.$refs.criteria.model.endDate + ' 23:59:59')
1744
- },
1745
-
1746
- async examineconfirm () {
1747
- let sqldata = `update t_handplan set f_audit_state ='审核中',f_examinereason='${this.examinerow.f_examinereason}' where id ='${this.examinerow.id}'`
1748
- await this.$resetpost('rs/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: null})
1749
- this.close()
1750
- this.search()
1751
- },
1752
- // 关闭下发计划得弹出框
1753
- close () {
1754
- this.show = false
1755
- this.inputtor_show = false
1756
- this.downConfirm = false
1757
- this.examineshow = false
1758
- this.examinetype = false
1759
- this.detailsShow = false
1760
- this.priceModel = false
1761
- // 初始化模态框数据
1762
- this.initModal()
1763
- if (this.uploadshow) {
1764
- this.uploadshow = false
1765
- // 讲选的文件清空
1766
- this.$refs.file.$el.querySelector('input').value = ''
1767
- }
1768
- },
1769
- initModal () {
1770
- this.downModel = {
1771
- downDate: Vue.$login.toStandardDateString(),
1772
- downWay: 'downWithUserfiles',
1773
- downInputtor: []
1774
- }
1775
- this.inputtorModel = {
1776
- inputtor: [],
1777
- reason: ''
1778
- }
1779
- },
1780
- // 判断当前登陆人是不是子公司的人员
1781
- isHead () {
1782
- return this.$login.f.parent.parent.name.includes('统一资源管理')
1783
- },
1784
- sort (field, rule) {
1785
- // 将所有排序方式设为不排序,实现相互排斥
1786
- for (let key in this.orderFields) {
1787
- if (key === field) {
1788
- this.orderFields[key] = rule
1789
- } else {
1790
- this.orderFields[key] = 'no'
1791
- }
1792
- }
1793
- // 如果新规则不排序,还原为默认排序
1794
- if (rule === 'no') {
1795
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
1796
- } else {
1797
- this.model.paramSource.orderitem = `'${field} ${rule}'`
1798
- }
1799
- this.search()
1800
- },
1801
- guid () {
1802
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
1803
- let r = Math.random() * 16 | 0,
1804
- v = c == 'x' ? r : (r & 0x3 | 0x8)
1805
- return v.toString(16)
1806
- })
1807
- },
1808
- computeAmount (event) {
1809
- let money = event.target.value
1810
- if (this.row.f_price_type === '固定气价') {
1811
- let price = this.$refs.mix_price.model.f_price
1812
- // 可以购买的总气量
1813
- let purchaseSum = (money / price).toFixed(2)
1814
- // 计算应抄底数
1815
- this.should_base = (this.row.f_last_tablebase - 0) + (purchaseSum - 0)
1816
- // 计算公式
1817
- this.designFormulas = `${purchaseSum}X${price}`
1818
- } else {
1819
- let mydata = this.$refs.statir.mydata
1820
- // 剩余1阶气量
1821
- let surplus1 = (mydata.f_stair1ceiling - (mydata.f_hasuse1 > 0 ? mydata.f_hasuse1 : 0))
1822
- // 把1阶买完的钱
1823
- let price1 = surplus1 * mydata.f_stair1price
1824
- // 剩余2阶气量
1825
- let surplus2 = (mydata.f_stair2ceiling - mydata.f_stair1ceiling - (mydata.f_hasuse2 > 0 ? mydata.f_hasuse2 : 0)).toFixed(2)
1826
- // 把2阶买完的钱
1827
- let price2 = surplus2 * mydata.f_stair2price
1828
- // 兼容一下
1829
- if (this.$refs.statir.jt != 3) {
1830
- this.$showMessage('暂不支持该气价类型的运算,请联系开发人员!')
1831
- }
1832
- // 开始计算
1833
- // 可以购买各阶梯量
1834
- let purchase1 = 0
1835
- let purchase2 = 0
1836
- let purchase3 = 0
1837
- if (money <= price1) {
1838
- purchase1 = (money / mydata.f_stair1price).toFixed(2)
1839
- } else if (money <= (price1 + price2)) {
1840
- purchase1 = surplus1
1841
- purchase2 = ((money - price1) / mydata.f_stair2price).toFixed(2)
1842
- } else {
1843
- purchase1 = surplus1
1844
- purchase2 = surplus2
1845
- purchase3 = ((money - price1 - price2) / mydata.f_stair3price).toFixed(2)
1846
- }
1847
- // 可以购买的总气量
1848
- let purchaseSum = (purchase1 - 0) + (purchase2 - 0) + (purchase3 - 0)
1849
- // 计算应抄底数
1850
- this.should_base = (this.row.f_last_tablebase - 0) + purchaseSum
1851
- // 计算公式
1852
- this.designFormulas = `${purchase1}X${mydata.f_stair1price} + ${purchase2}X${mydata.f_stair2price} + ${purchase3}X${mydata.f_stair3price}`
1853
- }
1854
- this.should_base = this.should_base.toFixed(2) - 0
1855
- }
1856
- },
1857
- watch: {
1858
- 'downModel.downWay' (val) {
1859
- if (val === 'downWithSelf') {
1860
- console.log('抄表员。。', this.inputtores2)
1861
- if (this.inputtores2.length > 0) {
1862
- this.downModel.downInputtor = [this.inputtores2[0].value]
1863
- }
1864
- }
1865
- },
1866
- 'detailsShow' (val) {
1867
- if (!val) {
1868
- this.should_base = 0
1869
- this.designFormulas = null
1870
- this.$els.inputmoney.value = 0
1871
- }
1872
- }
1873
- // 'model.rows'(val){
1874
- // console.log('页面切换',val)
1875
- // if(this.isChooseAll(val)){
1876
- // this.all = true
1877
- // }else{
1878
- // this.all = false
1879
- // }
1880
- // },
1881
- },
1882
- computed: {
1883
- danhutitle () {
1884
- return '单户抄表 当前计划年月:' + this.downModel.downDate
1885
- },
1886
- getCondition () {
1887
- // return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
1888
- return {
1889
- startDate: this.$refs.paged.$refs.criteria.model.startDate,
1890
- endDate: this.$refs.paged.$refs.criteria.model.endDate,
1891
- orderitem: this.orderDefault ? this.orderDefault : 'id',
1892
- condition: this.condition2
1893
- }
1894
- },
1895
-
1896
- inputtores () {
1897
- // 获取抄表员
1898
- console.log('获取抄表员', this.$login.f)
1899
- let rs = []
1900
- if (this.$login.f.f_gasman.length > 0) {
1901
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
1902
- let temp = {
1903
- label: this.$login.f.f_gasman[i].name,
1904
- value: this.$login.f.f_gasman[i].name
1905
- }
1906
- rs.push(temp)
1907
- }
1908
- }
1909
- this.inputtores2 = rs
1910
- return [...rs]
1911
- },
1912
- whetherpaies () {
1913
- return [
1914
- {label: '全部', value: ''},
1915
- {label: '已缴费', value: '是'},
1916
- {label: '未缴费', value: '否'}
1917
- ]
1918
- },
1919
- // 界面细节权限
1920
- jurisdiction () {
1921
- console.log('抄表界面细节', this.$login.r)
1922
- return this.$login.r ? this.$login.r : []
1923
- },
1924
- firestates () {
1925
- return [
1926
- {label: '全部', value: ''},
1927
- {label: '已点火', value: '1'},
1928
- {label: '未点火', value: '0'}
1929
- ]
1930
- },
1931
- ischecked () {
1932
- return function (row) {
1933
- for (let plan of this.plans) {
1934
- if (plan.id == row.f_userfiles_id) {
1935
- return plan.state
1936
- }
1937
- }
1938
- }
1939
- }
1940
- },
1941
- events: {
1942
- onFileUpload: async function (file, res) {
1943
- if (this.upshow) {
1944
- let uuid = this.guid()
1945
- let data = {
1946
- model: {
1947
- f_operator: this.$login.f.name,
1948
- f_end_date: this.$login.nextMonth20(this.$login.toStandardTimeString()),
1949
- f_operatorid: this.$login.f.id,
1950
- f_orgid: this.$login.f.orgid,
1951
- f_orgname: this.$login.f.orgs,
1952
- f_depid: this.$login.f.depids,
1953
- f_depname: this.$login.f.deps
1954
- },
1955
- uuid: uuid,
1956
- filepath: res.f_downloadpath
1957
- }
1958
- try {
1959
- await this.HttpReset.load('POST', 'rs/logic/batchSettleFileupdate', data, {resolveMsg: null, rejectMsg: null}, 1000)
1960
- } catch (e) {}
1961
- this.$showAlert(`文件上传成功,正在后台批量结算, 请耐心等待结果......`, 'success')
1962
- // 启动定时器定时查询上传结果
1963
- let timer = setInterval(async () => {
1964
- let res = await this.HttpReset.load('POST', 'rs/logic/getBatchOperaPro', {data: {uuid: uuid}}, {resolveMsg: null, rejectMsg: null})
1965
- console.log('查询进度返回: ', res)
1966
- if (res.data.msg || res.data.error) {
1967
- res.data.msg ? this.$showAlert(`${res.data.msg}`, 'success', 2000) : this.$showAlert(`${res.data.error}`, 'danger')
1968
- this.upshow = false
1969
- this.search()
1970
- clearInterval(timer)
1971
- }
1972
- }, 5000)
1973
- return
1974
- }
1975
- let data = {
1976
- model: {
1977
- f_operator: this.$login.f.name,
1978
- f_end_date: this.$login.nextMonth20(this.$login.toStandardTimeString())
1979
- },
1980
- filepath: res.path
1981
- }
1982
- if (res.f_downloadpath.includes('抄表数据')) {
1983
- console.log('进入了抄表上传')
1984
- let data1 = {
1985
- filepath: res.f_downloadpath
1986
- }
1987
- this.$resetpost('rs/logic/upLoadHand', data1, {resolveMsg: null, rejectMsg: '上传失败'}, 0).then((res) => {
1988
- // console.log('终于成功了', res)
1989
- this.upshow = false
1990
- // this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条, 未抄下发${res.data.nohandnum}条, 失败下发${res.data.failednum}条, 异常下发${res.data.exceptionnum}条`, 'success', 2000)
1991
- // this.$parent.search()
1992
- })
1993
- } else if (data.filepath.includes('先锋')) {
1994
- this.$resetpost('rs/logic/xfimport', data, {resolveMsg: null, rejectMsg: '上传失败'}, 0).then((res) => {
1995
- // console.log('终于成功了', res)
1996
- this.uploadshow = false
1997
- this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条, 未抄下发${res.data.nohandnum}条, 失败下发${res.data.failednum}条, 异常下发${res.data.exceptionnum}条`, 'success', 2000)
1998
- this.$parent.search()
1999
- })
2000
- } else if (data.filepath.includes('伦力')) {
2001
- this.$resetpost('rs/logic/llimport', data, {resolveMsg: null, rejectMsg: '上传失败'}, 0).then((res) => {
2002
- // console.log('终于成功了', res)
2003
- this.uploadshow = false
2004
- this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条, 未抄下发${res.data.nohandnum}条, 失败下发${res.data.failednum}条, 异常下发${res.data.exceptionnum}条`, 'success', 2000)
2005
- this.$parent.search()
2006
- })
2007
- }
2008
- },
2009
- dblclick: function (row, index) {
2010
- this.row = row
2011
- this.detailsShow = true
2012
- }
2013
- }
2014
- }
2015
- </script>
2016
- <style lang="less">
2017
- #handManager {
2018
- display: flex;
2019
- justify-content: space-around;
2020
- align-items: center;
2021
-
2022
- .btn {
2023
- margin: 0px;
2024
- }
2025
-
2026
- .hand-loading {
2027
- border: 3px solid #ccc;
2028
- border-right-color: #337ab7;
2029
- border-radius: 50%;
2030
- animation: spin 0.6s linear;
2031
- position: absolute;
2032
- animation-iteration-count: infinite;
2033
- top: 0;
2034
- right: 50%;
2035
- z-index: 2;
2036
- display: block;
2037
- width: 28px;
2038
- height: 28px;
2039
- line-height: 28px;
2040
- text-align: center;
2041
- pointer-events: none;
2042
- }
2043
-
2044
- @keyframes spin {
2045
- 100% {
2046
- transform: rotate(360deg);
2047
- }
2048
- }
2049
- .detail-panel {
2050
- text-align: center;
2051
- color: #31708f;
2052
- background-color: #e8f1f9;
2053
- border-color: #F2F6FA;
2054
- }
2055
- }
2056
-
2057
- #hand_manager_grid {
2058
- thead {
2059
- position: relative;
2060
- z-index: 2;
2061
- }
2062
- }
2063
- #machineHandManager {
2064
- .color-red {
2065
- color: red;
2066
- }
2067
- }
2068
- </style>
1
+ <template>
2
+ <div class="flex-row" id="machineHandManager">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
5
+ <criteria partial='criteria' v-ref:criteria @condition-changed="$parent.selfSearch">
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <modal :show.sync="$parent.$parent.upshow" width="500px" title="文件导入" v-ref:modal large backdrop="false">
8
+ <article slot="modal-body" class="modal-body">
9
+ <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success"
10
+ style="border-radius: 2px;"
11
+ action="rs/file/uploadFile" tagname="导入" v-ref:filebattch :headers="headers"
12
+ multiple></file-upload>
13
+ </article>
14
+ <footer slot="modal-footer" class="modal-footer">
15
+ </footer>
16
+ </modal>
17
+ <div class="row">
18
+ <!--<div class="col-sm-6">-->
19
+ <!--style="border: 1px solid #a6d5ea; box-shadow: darkgrey 1px 1px 1px 2px;padding: 0.5%">-->
20
+ <div class="col-sm-2 form-group">
21
+ <label class="font_normal_body color-red">归属起始</label>
22
+ <datepicker placeholder="开始日期"
23
+ style="width:60%"
24
+ class="datepicker"
25
+ v-model="model.startDate"
26
+ condition="f_hand_date >='{} 00:00:00'"
27
+
28
+ :value.sync="model.startDate"
29
+ :format="'yyyy-MM-dd'"
30
+ ></datepicker>
31
+ </div>
32
+ <div class="col-sm-2 form-group">
33
+ <label class="font_normal_body color-red">归属结束</label>
34
+ <datepicker placeholder="结束日期"
35
+ style="width:60%"
36
+ v-model="model.endDate"
37
+ :value.sync="model.endDate"
38
+ condition="f_hand_date <='{} 23:59:59'"
39
+ :format="'yyyy-MM-dd'"
40
+ ></datepicker>
41
+ </div>
42
+
43
+ <div class="col-sm-2 form-group">
44
+ <label class="font_normal_body">客户编号</label>
45
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
46
+ condition="f_userinfo_code='{}'" placeholder='客户编号'>
47
+ </div>
48
+
49
+ <div class="span" style="float:right;">
50
+ <button v-if="$parent.$parent.jurisdiction.includes('单户抄表')"
51
+ class="button_search button_spacing" style="width:90px" @click="$parent.$parent.danhuShow()">
52
+ 单户抄表
53
+ </button>
54
+
55
+ <button class="button_search button_spacing" @click="$parent.$parent.search()">查询</button>
56
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
57
+ <button class="button_delete button_spacing" @click="$parent.$parent.deletehand()">删除抄表</button>
58
+ <button class="button_search button_spacing" style="width: 90px" @click="$parent.$parent.downloadFiles()">模板下载
59
+ </button>
60
+ <button class="button_search button_spacing" @click="$parent.$parent.clickupshow()">导入抄表</button>
61
+
62
+ <export-excel
63
+ :data="$parent.$parent.getCondition"
64
+ :field="$parent.$parent.getfield"
65
+ sqlurl="rs/logic/saleExport" sql-name="getPlan" template-name='抄表导出'
66
+ :choose-col="true">
67
+ </export-excel>
68
+ <div
69
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
70
+ @click="$parent.$parent.hidden()" class="button_spacing" style="float: right"></div>
71
+ </div>
72
+ </div>
73
+ <div class="row" v-show="$parent.$parent.criteriaShow">
74
+ <!-- <div class="col-sm-2 form-group">-->
75
+ <!-- <label class="font_normal_body">表&ensp;编&ensp;号</label>-->
76
+ <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_id"-->
77
+ <!-- condition="f_user_id='{}'" placeholder='表编号'>-->
78
+ <!-- </div>-->
79
+ <div class="col-sm-2 form-group">
80
+ <label class="font_normal_body">抄表状态</label>
81
+ <v-select :value.sync="model.f_audit_state"
82
+ class="select_list select"
83
+ v-model="model.f_audit_state"
84
+ style="width: 60%"
85
+ condition="f_meter_state = '{}'"
86
+ :options='$parent.$parent.auditState' placeholder='抄表状态'
87
+ close-on-select v-el:cc>
88
+ </v-select>
89
+ </div>
90
+ <div class="col-sm-2 form-group">
91
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
92
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
93
+ condition="f_meternumber like '%{}%'" placeholder='表号'>
94
+ </div>
95
+ <div class="col-sm-2 form-group">
96
+ <label class="font_normal_body">客户姓名</label>
97
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name" placeholder='客户姓名'
98
+ condition="f_user_name = '{}'">
99
+ </div>
100
+ <div class="col-sm-2 form-group">
101
+ <label class="font_normal_body">小&ensp;&ensp;&ensp;&ensp;区</label>
102
+ <v-select :value.sync="model.f_residential_area"
103
+ class="select_list select"
104
+ enter-push
105
+ v-model="model.f_residential_area"
106
+ style="width: 60%"
107
+ multiple="true"
108
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
109
+ close-on-select v-el:cc>
110
+ </v-select>
111
+ </div>
112
+ <div class="col-sm-2 form-group">
113
+ <label class="font_normal_body">楼&emsp;&emsp;栋</label>
114
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_building"
115
+ condition="f_building = '{}'" placeholder='楼栋'>
116
+ </div>
117
+ <div class="col-sm-2 form-group">
118
+ <label class="font_normal_body">单&emsp;&emsp;元</label>
119
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_unit"
120
+ condition="f_unit = '{}'" placeholder='单元'>
121
+ </div>
122
+ <div class="col-sm-2 form-group">
123
+ <label class="font_normal_body">楼&emsp;&emsp;层</label>
124
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_floor"
125
+ condition="f_floor = '{}'" placeholder='楼层'>
126
+ </div>
127
+ <div class="col-sm-2 form-group">
128
+ <label class="font_normal_body">门&ensp;牌&ensp;号</label>
129
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_room"
130
+ condition="f_room like '%{}%'" placeholder='门牌号'>
131
+ </div>
132
+ <div class="col-sm-2 form-group">
133
+ <label class="font_normal_body">客户地址</label>
134
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
135
+ condition="f_address like '%{}%'" placeholder='客户地址'>
136
+ </div>
137
+ <div class="col-sm-2 form-group">
138
+ <label class="font_normal_body">抄&ensp;表&ensp;员</label>
139
+ <v-select :value.sync="model.f_inputtor" v-model='model.f_inputtor'
140
+ style="width:60%"
141
+ multiple="true"
142
+ :options='$parent.$parent.inputtores' placeholder='抄表员'
143
+ close-on-select
144
+ v-el:cc></v-select>
145
+ </div>
146
+ <!-- <div class="col-sm-2 form-group">-->
147
+ <!-- <label class="font_normal_body">是否缴费</label>-->
148
+ <!-- <v-select :value.sync="model.f_whether_pay" v-model='model.f_whether_pay'-->
149
+ <!-- style="width:60%"-->
150
+ <!-- :options='$parent.$parent.whetherpaies' placeholder='是否缴费'-->
151
+ <!-- close-on-select-->
152
+ <!-- condition="f_whether_pay = '{}'"></v-select>-->
153
+ <!-- </div>-->
154
+ <div class="col-sm-2 form-group">
155
+ <label class="font_normal_body">抄表单状态</label>
156
+ <v-select :value.sync="model.f_meter_state" v-model='model.f_meter_state'
157
+ style="width:60%"
158
+ :options='$parent.$parent.meterstates' placeholder='抄表单状态'
159
+ close-on-select
160
+ condition="f_meter_state = '{}'"></v-select>
161
+ </div>
162
+
163
+ <div class="col-sm-2 form-group">
164
+ <label for="belongmonth" class="font_normal_body">所属年月</label>
165
+ <datepicker placeholder="所属年月" style="width:60%"
166
+ v-model="model.belongmonth"
167
+ :value.sync="model.belongmonth"
168
+ :format="'yyyy-MM'"
169
+ :show-reset-button="true"
170
+ condition="belongmonth = '{}'"
171
+ :select-month="true">
172
+ </datepicker>
173
+ </div>
174
+ <div class="col-sm-2 form-group">
175
+ <label class="font_normal_body">客户类型</label>
176
+ <v-select :value.sync="model.f_user_type" v-model="model.f_user_type"
177
+ :options='$parent.$parent.usertypes' placeholder='客户类型'
178
+ style="width:60%"
179
+ close-on-select
180
+ condition="f_user_type = '{}'"></v-select>
181
+ </div>
182
+ <div class="col-sm-2 form-group">
183
+ <label class="font_normal_body">用户等级</label>
184
+ <v-select :value.sync="model.f_user_level" v-model="model.f_user_level"
185
+ :options='$parent.$parent.userlevels' placeholder='用户等级'
186
+ style="width:60%"
187
+ close-on-select
188
+ condition="f_user_level = '{}'"></v-select>
189
+ </div>
190
+ <div class="col-sm-2 form-group">
191
+ <label class="font_normal_body color-red">抄&ensp;表&ensp;册</label>
192
+ <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
193
+ :options='$parent.$parent.meterbooks' placeholder='抄表册'
194
+ :multiple="true"
195
+ style="width:60%"
196
+ condition="f_meter_book_num in {}"></v-select>
197
+ </div>
198
+ <div class="col-sm-2 form-group">
199
+ <label class="font_normal_body">调压箱名</label>
200
+ <v-select :value.sync="model.f_adjustable_name" v-model="model.f_adjustable_name"
201
+ :options='$parent.$parent.adjustablename' placeholder='调压箱名称'
202
+ style="width:60%"
203
+ close-on-select
204
+ condition="f_adjustable_name = '{}'"></v-select>
205
+ </div>
206
+ <div class="col-sm-2 flex-row" style="white-space: nowrap" >
207
+ <label class="font_normal_body">应交气量</label>
208
+ <div class="row">
209
+ <input type="text" style="width:30%" class="input_search" v-model="model.oughtamountmin"
210
+ condition="f_oughtamount >= {} " placeholder="">
211
+ <label class="font_normal_body"> ≤ x ≤ </label>
212
+ <input type="text" style="width:30%" class="input_search" v-model="model.oughtamountmax"
213
+ condition="f_oughtamount <= {} " placeholder="">
214
+ </div>
215
+ </div>
216
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"
217
+ v-ref:sel></res-select-group>
218
+ </div>
219
+
220
+
221
+ <!-- 多选框 -->
222
+ <!--<div class="col-sm-2 form-group">-->
223
+ <!--<button class="btn btn-success" @click="$parent.$parent.batchDownHand()">计划下发</button>-->
224
+ <!--</div>-->
225
+
226
+ <!--<div class="form-group" v-if="$parent.$parent.meter_state">-->
227
+ <!--<button class="btn btn-success" @click="$parent.$parent.allDownHand()" >全部下发</button>-->
228
+ <!--</div>-->
229
+ <!-- 多选框结束 -->
230
+
231
+ <!--<div class="col-sm-2 form-group">-->
232
+ <!--<button class="btn btn-success" @click="$parent.$parent.adjust()">抄表员调整</button>-->
233
+ <!--</div>-->
234
+ <!--<div class="col-sm-2 form-group">-->
235
+ <!--<button class="btn btn-success" @click="$parent.$parent.fileUpload()">文件上传</button>-->
236
+ <!--</div>-->
237
+ <!--<div class="col-sm-2 form-group">-->
238
+ <!--<button class="btn btn-success" @click="search(), $parent.$parent.clean()">打印</button>-->
239
+ <!--</div>-->
240
+
241
+ </div>
242
+ </criteria>
243
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid id="hand_manager_grid">
244
+ <template partial='head'>
245
+ <tr>
246
+ <!--<th><input type='checkbox' v-model="$parent.$parent.$parent.all" @change="$parent.$parent.$parent.chooseAll"></th>-->
247
+ <th>
248
+ <nobr>序号</nobr>
249
+ </th>
250
+ <th>
251
+ <nobr>
252
+ <data-order field="f_userinfo_code" name="客户编号"
253
+ :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
254
+ </nobr>
255
+ </th>
256
+ <!-- <th>-->
257
+ <!-- <nobr>表编号</nobr>-->
258
+ <!-- </th>-->
259
+ <!-- <th>基本信息</th>-->
260
+ <th>
261
+ <nobr>
262
+ <data-order field="f_address" name="基本信息"
263
+ :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
264
+ </nobr>
265
+ </th>
266
+ <th>
267
+ <nobr>用户等级</nobr>
268
+ </th>
269
+ <!--<th><nobr><data-order field="f_building" name="楼号"-->
270
+ <!--:order.sync="$parent.$parent.$parent.orderFields.f_building"></data-order></nobr>-->
271
+ <!--</th>-->
272
+ <!--<th><nobr><data-order field="f_unit" name="单元号"-->
273
+ <!--:order.sync="$parent.$parent.$parent.orderFields.f_unit"></data-order></nobr>-->
274
+ <!--</th>-->
275
+ <!--<th><nobr><data-order field="f_room" name="房号"-->
276
+ <!--:order.sync="$parent.$parent.$parent.orderFields.f_room"></data-order></nobr>-->
277
+ <!--</th>-->
278
+ <th>
279
+ <nobr>所属年月</nobr>
280
+ </th>
281
+ <th>
282
+ <nobr>上期结余</nobr>
283
+ </th>
284
+ <th>
285
+ <nobr>平均用气量</nobr>
286
+ </th>
287
+ <th>
288
+ <nobr>表号</nobr>
289
+ </th>
290
+ <th>
291
+ <nobr>上期底数</nobr>
292
+ </th>
293
+ <th>
294
+ <nobr>本期底数</nobr>
295
+ </th>
296
+
297
+
298
+ <th>
299
+ <nobr>应交气量</nobr>
300
+ </th>
301
+ <th>
302
+ <nobr>增量值</nobr>
303
+ </th>
304
+ <th>
305
+ <nobr>应交金额</nobr>
306
+ </th>
307
+ <th>
308
+ <nobr>抄表结果状态</nobr>
309
+ </th>
310
+ <th>
311
+ <nobr>是否缴费</nobr>
312
+ </th>
313
+ <!-- <th>上次抄表日期</th>-->
314
+ <th>
315
+ <nobr>
316
+ <data-order field="f_last_input_date" name="上次抄表录入日期"
317
+ :order.sync="$parent.$parent.$parent.orderFields.f_last_input_date"></data-order>
318
+ </nobr>
319
+ </th>
320
+ <!-- <th>下发日期</th>-->
321
+ <th>
322
+ <nobr>
323
+ <data-order field="f_hand_date" name="下发日期"
324
+ :order.sync="$parent.$parent.$parent.orderFields.f_hand_date"></data-order>
325
+ </nobr>
326
+ </th>
327
+ <!-- <th>抄表日期</th>-->
328
+ <th>
329
+ <nobr>
330
+ <data-order field="f_input_date" name="抄表录入日期"
331
+ :order.sync="$parent.$parent.$parent.orderFields.f_input_date"></data-order>
332
+ </nobr>
333
+ </th>
334
+ <!-- <th>抄表册</th>-->
335
+ <th>
336
+ <nobr>
337
+ <data-order field="f_book_name" name="抄表册"
338
+ :order.sync="$parent.$parent.$parent.orderFields.f_book_name"></data-order>
339
+ </nobr>
340
+
341
+ </th>
342
+ <th>
343
+ <nobr>调压箱名称</nobr>
344
+ </th>
345
+ <th>
346
+ <nobr>抄表员</nobr>
347
+ </th>
348
+ <th>
349
+ <nobr>录入人员</nobr>
350
+ </th>
351
+ <th>
352
+ <nobr>下发人员</nobr>
353
+ </th>
354
+ <th>
355
+ <nobr>操作</nobr>
356
+ </th>
357
+ <!-- f_oughtfee-->
358
+ </tr>
359
+ </template>
360
+ <template partial='body'>
361
+ <!--<td style="text-align: center;">-->
362
+ <!--<input v-if="row.f_meter_state === '未下发'"-->
363
+ <!--:id="model.pageIndex" type='checkbox' @change="$parent.$parent.$parent.chooseOne($event,row,model.rows)"-->
364
+ <!--:checked="$parent.$parent.$parent.ischecked(row)"/>-->
365
+ <!--</td>-->
366
+ <td style="text-align: center;">{{$index + 1}}</td>
367
+ <td>{{row.f_userinfo_code}}</td>
368
+ <!-- <td>{{row.f_user_id}}</td>-->
369
+ <td>{{row.f_user_name}}&nbsp;&nbsp;{{row.f_address}}</td>
370
+ <td>{{row.f_user_level}}</td>
371
+ <!--<td>{{row.f_building}}</td>-->
372
+ <!--<td>{{row.f_unit}}</td>-->
373
+ <!--<td>{{row.f_room}}</td>-->
374
+ <td>{{row.belongmonth}}</td>
375
+ <td style="text-align: center;">{{row.f_balance}}</td>
376
+ <td style="text-align: center;">{{Math.round(row.avggas)}}</td>
377
+ <td>{{row.f_meternumber}}</td>
378
+ <td>{{row.f_last_tablebase}}</td>
379
+ <td id="hand-creat" v-if="row.f_meter_state === '未抄表' ">
380
+ <div class="form-group" style="margin-bottom:0px;display: contents;" :class="{
381
+ 'has-success has-feedback': !row.error,
382
+ 'has-error has-feedback': row.error}"
383
+ >
384
+
385
+ <input title="只能录入整数" type="text" class="input_search" v-model="row.f_tablebase"
386
+ @blur="$parent.$parent.$parent.beforenter($index, row)"
387
+ v-next-el="{id: $index+2}" :id="$index+1" style="width: 100px;padding: 6px;"
388
+ @focus="$parent.$parent.$parent.clearError(row)"
389
+ :disabled="row.state === '开始'">
390
+ </div>
391
+
392
+ <span v-if="row.error && row.error !== ''" style="color: #ff0000;">{{row.error}}</span>
393
+ </td>
394
+ <td id="hand-creat" v-if="row.f_meter_state !== '未抄表' ">
395
+ {{row.f_tablebase}}
396
+ </td>
397
+ <!--<td style="text-align: center;" v-if="row.f_oughtamount">{{ row.f_oughtamount }}</td>-->
398
+ <td style="text-align: center;">{{$parent.$parent.$parent.calculationBase(row)}}</td>
399
+ <td style="text-align: center;">
400
+ <div class="form-group" style="margin-bottom:0px;display: contents;" :class="{'has-success has-feedback': !row.error,'has-error has-feedback': row.error}"
401
+ v-if="row.f_meter_state === '未抄表' && row.states !== 0 && $parent.$parent.$parent.jurisdiction.includes('增量录入')">
402
+ <input title="只能录入整数" type="number" class="input_search" v-model="row.f_adjustment_volume"
403
+ style="width: 100px;padding: 6px;"
404
+ :disabled="row.state === '开始'">
405
+ </div>
406
+ <div v-else>
407
+ {{row.f_adjustment_volume}}
408
+ </div>
409
+ </td>
410
+ <td style="text-align: center;">{{row.f_oughtfee}}</td>
411
+
412
+ <td>
413
+ <div class="form-group" style="margin-bottom:0px;display: contents;" :class="{
414
+ 'has-success has-feedback': !row.error,
415
+ 'has-error has-feedback': row.error}"
416
+ v-if="row.f_meter_state === '未抄表' && row.states !== 0">
417
+ <v-select :value.sync="row.f_result_state" v-model="row.f_result_state"
418
+ :options='$parent.$parent.$parent.resultstate' placeholder='抄表结果状态'
419
+ style="margin-right:90px" width="100%"
420
+ :value-single="true"
421
+ close-on-select
422
+ condition="f_adjustable_name = '{}'"></v-select>
423
+ <!-- <span id="inputError2Status" class="sr-only">(error)</span> -->
424
+ </div>
425
+ <div style="text-align: center;" v-else>
426
+ {{row.f_result_state}}
427
+ </div>
428
+ </td>
429
+ <td style="text-align: center;">{{row.f_whether_pay}}</td>
430
+ <td>{{row.f_last_input_date}}</td>
431
+ <td>{{row.f_hand_date}}</td>
432
+ <td>
433
+ <div class="form-group" style="margin-bottom:0px;display: contents;" :class="{
434
+ 'has-success has-feedback': !row.error,
435
+ 'has-error has-feedback': row.error}"
436
+ v-if="row.f_meter_state === '未抄表' && row.states !== 0 && $parent.$parent.$parent.jurisdiction.includes('录入日期修正')">
437
+ <datepicker id="endDate" placeholder="抄表时间"
438
+ v-model="row.f_input_date"
439
+ :value.sync="row.f_input_date"
440
+ :format="'yyyy-MM-dd HH:mm:ss'"
441
+ :show-reset-button="true">
442
+ </datepicker>
443
+ </div>
444
+ <div v-else>
445
+ {{row.f_input_date}}
446
+ </div>
447
+ </td>
448
+ <td>{{row.f_book_name}}</td>
449
+ <td>{{row.f_adjustable_name}}</td>
450
+ <td>{{row.f_inputtor}}</td>
451
+ <td>{{row.f_input_person}}</td>
452
+ <td>{{row.f_operator}}</td>
453
+ <td style="text-align: center;"><nobr>
454
+ <!-- 已抄表,还没审核-->
455
+ <button type="button" name="button" class="button_search button_spacing width-60"
456
+ v-if="row.f_meter_state === '待审核' && (row.id == row.maxid || !row.maxid)"
457
+ @click.stop="$parent.$parent.$parent.cancelAuditHand(row)">撤销
458
+ </button>
459
+ <!-- 未抄表,删除计划,直接删表内数据-->
460
+ <button type="button" name="button" class="btn btn-danger"
461
+ v-if="row.f_meter_state === '未抄表'"
462
+ @click.stop="$parent.$parent.$parent.delectHand(row) && row.states === 1"
463
+ >删除
464
+ </button>
465
+ <!-- 已抄表,已审核,冲正(状态改为冲正,添加负记录,需要重新下发)-->
466
+ <button type="button" name="button" class="button_search button_spacing width-60"
467
+ @click.stop="$parent.$parent.$parent.cancelHand(row)"
468
+ v-if="row.f_meter_state === '已抄表' && row.maxid==row.id && (row.f_whether_pay === '否' || row.f_accounts_state === '自动下账' || (row.f_whether_pay === '是' && row.f_oughtfee == 0 ))" >冲正
469
+ </button>
470
+
471
+ <!-- <button type="button" name="button" class="btn btn-link"-->
472
+ <!-- v-if="row.f_meter_state === '待审核' ">待审核-->
473
+ <!-- </button>-->
474
+
475
+
476
+ </nobr>
477
+ </td>
478
+ </template>
479
+ </data-grid>
480
+ </criteria-paged>
481
+ <table class="table-hover">
482
+ <tr style="position: relative" class="table-bordered">
483
+ <td
484
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
485
+ 汇总信息
486
+ </td>
487
+ <td
488
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
489
+ 应缴气量:&emsp;{{sumsmodel.f_oughtamount}}
490
+ </td>
491
+ <td
492
+ style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">
493
+ 应缴金额:&emsp;{{sumsmodel.f_oughtfee}}
494
+ </td>
495
+ </tr>
496
+ </table>
497
+ <split-price :showdata="splitdata" :pricesplit="priceSplit" v-if="priceSplit"></split-price>
498
+
499
+ <modal :show.sync="danhu.show" :title='danhutitle' backdrop="false" coverstyle="danhumodal">
500
+ <article slot="modal-body" class="modal-body">
501
+ <div class="panel panel-primary datapanel">
502
+ <div class="row">
503
+ <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">客户姓名:{{danhu.info.f_user_name}}</label>
504
+ <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">客户编号:{{danhu.info.f_userinfo_code}}</label>
505
+ <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">用户证号:{{danhu.info.f_book_no}}</label>
506
+ <label class="control-label col-sm-12 flex-row" style="transform: translate(0,8px)">客户地址:{{danhu.info.f_address}}</label>
507
+ <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">上次抄表日期:{{danhu.info.f_hand_date}}</label>
508
+ <label class="control-label col-sm-6 flex-row" style="transform: translate(0,8px)">上期底数:{{danhu.info.f_tablebase}}</label>
509
+ </div>
510
+ </div>
511
+ <div class="panel panel-primary datapanel">
512
+ <div class="row">
513
+ <div class="col-sm-6 flex-row" style="margin-top: 2px">
514
+ <label for="danhucode" class="control-label" style="transform: translate(0,8px)">客户编号</label>
515
+ <input id="danhucode" type="text" class="input_search " style="width: 60% !important;"
516
+ v-model="danhu.f_userinfo_code" v-ref:danhucode @keyup.enter.stop="danhuCodeSearch"
517
+ placeholder='客户编号'/>
518
+ </div>
519
+ <div class="col-sm-6 flex-row" style="margin-top: 2px">
520
+ <label for="danhubase" class="control-label" style="transform: translate(0,8px)">本期底数</label>
521
+ <input id="danhubase" type="number" class="input_search " style="width: 60% !important;"
522
+ v-model="danhu.f_tablebase" @keyup.enter.stop="downAndHand"
523
+ placeholder='本期底数'/>
524
+ </div>
525
+ </div>
526
+ </div>
527
+ </article>
528
+ <footer slot="modal-footer">
529
+ </footer>
530
+ </modal>
531
+
532
+ <modal :show.sync="uploadshow" v-ref:modal backdrop="false">
533
+ <header slot="modal-header" class="modal-header">
534
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
535
+ <h4 class="modal-title">文件上传</h4>
536
+ </header>
537
+ <article slot="modal-body" class="modal-body">
538
+ <div class="col-sm-2 form-group">
539
+ <file-upload class="my-file-uploader" name="myFile"
540
+ action="rs/file/upload" tagname="文件上传" :headers="headers" multiple v-ref:file></file-upload>
541
+ </div>
542
+ </article>
543
+
544
+ <footer slot="modal-footer" class="modal-footer">
545
+ <!-- <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
546
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button> -->
547
+ </footer>
548
+ </modal>
549
+ <modal :show.sync="examineshow" v-ref:modal backdrop="false">
550
+ <header slot="modal-header" class="modal-header">
551
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
552
+ <h4 class="modal-title">冲正审核</h4>
553
+ </header>
554
+ <article slot="modal-body" class="modal-body">
555
+ <div class="row">
556
+ <div class="col-sm-12 form-group">
557
+ <label class="font_normal_body">冲正原因</label>
558
+ <input type="text" style="width:90%" class="input_search" :disabled="examinetype"
559
+ v-model="examinerow.f_examinereason"
560
+ placeholder='冲正原因'>
561
+ </div>
562
+ <upload :blodid="examinerow.id" v-ref:upload :fusetype="uploadText" isremark="true"
563
+ style="width:auto"></upload>
564
+ </div>
565
+
566
+ </article>
567
+
568
+ <footer slot="modal-footer" class="modal-footer">
569
+ <button v-show="examineshow" type="button" class="btn btn-default" @click='close'>取消</button>
570
+ <button v-show="!examinetype" type="button" class="btn btn-success" @click='examineconfirm()'>确认</button>
571
+ <button type="button" v-show="examinetype" class="btn btn-success" @click='cancelHand5()'>审核通过</button>
572
+ </footer>
573
+ </modal>
574
+
575
+ <modal :show.sync="showerr" backdrop="false">
576
+ <header slot="modal-header" class="modal-header">
577
+ <button type="button" class="close" @click="closeerr"><span>&times;</span></button>
578
+ <h4 class="modal-title">抄表出错!</h4>
579
+ </header>
580
+ <article slot="modal-body" class="modal-body">
581
+ <div class="row">
582
+ <p> {{err}}</p>
583
+ <input type="text" class="form-control" @blur="paycodefocus" v-el:paycode>
584
+ </div>
585
+
586
+ </article>
587
+
588
+ <footer slot="modal-footer" class="modal-footer">
589
+ <button v-show="showerr" type="button" class="btn btn-default" @click='closeerr'>关闭</button>
590
+ </footer>
591
+ </modal>
592
+
593
+ <modal :show.sync="detailsShow" v-ref:model_details backdrop="true" width="700px">
594
+ <article slot="modal-body" class="modal-body">
595
+ <div class="flex-row">
596
+ <div style="width: 50%">
597
+ <mix-price-info :data="row" v-if="row.f_price_type === '固定气价'" v-ref:mix_price></mix-price-info>
598
+ <stairinfo :data="row" v-if="row.f_price_type === '阶梯气价'" v-ref:statir></stairinfo>
599
+ </div>
600
+ <div style="width: 50%" class="panel">
601
+ <div class="panel-heading detail-panel">
602
+ <h4>计算工具</h4>
603
+ </div>
604
+ <form class="form-horizontal" style="padding: 10px">
605
+ <div class="form-group">
606
+ <label class="col-sm-4 col-md-4 control-label" style="text-align: left">预购金额:</label>
607
+ <div class="col-sm-8 col-md-8">
608
+ <input type="number" class="form-control" placeholder="预购金额" @blur="computeAmount" v-el:inputmoney>
609
+ </div>
610
+ </div>
611
+ <div class="form-group">
612
+ <label class="col-sm-4 col-md-4 control-label" style="text-align: left">当前底数:</label>
613
+ <div class="col-sm-8 col-md-8">
614
+ <input type="number" class="form-control" placeholder="当前底数" v-model="row.f_last_tablebase" disabled>
615
+ </div>
616
+ </div>
617
+ <div class="form-group">
618
+ <label class="col-sm-4 col-md-4 control-label" style="text-align: left">应抄底数:</label>
619
+ <div class="col-sm-8 col-md-8">
620
+ <input type="number" class="form-control" placeholder="应抄底数" v-model="should_base" disabled>
621
+ </div>
622
+ </div>
623
+ <div class="form-group">
624
+ <label class="col-sm-12 col-md-12 control-label" style="text-align: center">计算公式</label>
625
+ <div class="col-sm-12 col-md-12">
626
+ <input type="text" class="form-control" placeholder="计算公式" v-model="designFormulas" disabled>
627
+ </div>
628
+ </div>
629
+ </form>
630
+ </div>
631
+ </div>
632
+ </article>
633
+ <footer slot="modal-footer" class="modal-footer">
634
+ <button type="button" class="button_search button_spacing" @click='customPricing()'>自定义划价</button>
635
+ </footer>
636
+ </modal>
637
+
638
+ <modal :show.sync="priceModel" v-ref:modal backdrop="false">
639
+ <header slot="modal-header" class="modal-header">
640
+ <h4 class="modal-title">自定义划价</h4>
641
+ </header>
642
+ <article slot="modal-body" class="modal-body">
643
+ <div>
644
+ <mix-price-info :data="row" v-if="row.f_price_type === '固定气价'" v-ref:mix_price></mix-price-info>
645
+ <stairinfo :data="row" v-if="row.f_price_type === '阶梯气价'" v-ref:statir></stairinfo>
646
+ </div>
647
+ <div class="row">
648
+ <template v-if="row.f_price_type === '固定气价'">
649
+ <div class="col-sm-4 form-group">
650
+ <label class="font_normal_body">单价</label>
651
+ <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_price1" placeholder='单价'></input>
652
+ </div>
653
+ <div class="col-sm-4 form-group">
654
+ <label class="font_normal_body">数量</label>
655
+ <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_gas1" placeholder='数量'></input>
656
+ </div>
657
+ <div class="col-sm-4 form-group">
658
+ <label class="font_normal_body">金额</label>
659
+ <p class="form-control" style="width:60%" disabled>{{ row.f_stair_money1 = stairMoney(row.f_stair_price1, row.f_stair_gas1) }}</p>
660
+ </div>
661
+ </template>
662
+
663
+ <template v-if="row.f_price_type === '阶梯气价'">
664
+ <div class="col-sm-4 form-group" >
665
+ <label class="font_normal_body">阶梯一单价</label>
666
+ <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_price1" placeholder='阶梯一单价'></input>
667
+ </div>
668
+ <div class="col-sm-4 form-group">
669
+ <label class="font_normal_body">阶梯一数量</label>
670
+ <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_gas1" placeholder='阶梯一数量'></input>
671
+ </div>
672
+ <div class="col-sm-4 form-group">
673
+ <label class="font_normal_body">阶梯一金额</label>
674
+ <p class="form-control" style="width:60%" disabled>{{ row.f_stair_money1 = stairMoney(row.f_stair_price1, row.f_stair_gas1) }}</p>
675
+ </div>
676
+ <div class="col-sm-4 form-group" >
677
+ <label class="font_normal_body">阶梯二单价</label>
678
+ <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_price2" placeholder='阶梯二单价'></input>
679
+ </div>
680
+ <div class="col-sm-4 form-group">
681
+ <label class="font_normal_body">阶梯二数量</label>
682
+ <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_gas2" placeholder='阶梯二数量'></input>
683
+ </div>
684
+ <div class="col-sm-4 form-group">
685
+ <label class="font_normal_body">阶梯二金额</label>
686
+ <p class="form-control" style="width:60%" disabled>{{ row.f_stair_money2 = stairMoney(row.f_stair_price2, row.f_stair_gas2) }}</p>
687
+ </div>
688
+ <div class="col-sm-4 form-group" >
689
+ <label class="font_normal_body">阶梯三单价</label>
690
+ <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_price3" placeholder='阶梯三单价'></input>
691
+ </div>
692
+ <div class="col-sm-4 form-group">
693
+ <label class="font_normal_body">阶梯三数量</label>
694
+ <input type="text" class="form-control" style="width:60%" v-model="row.f_stair_gas3" placeholder='阶梯三数量'></input>
695
+ </div>
696
+ <div class="col-sm-4 form-group">
697
+ <label class="font_normal_body">阶梯三金额</label>
698
+ <p class="form-control" style="width:60%" disabled>{{ row.f_stair_money3 = stairMoney(row.f_stair_price3, row.f_stair_gas3) }}</p>
699
+ </div>
700
+ </template>
701
+ <div class="col-sm-4 form-group" >
702
+ </div>
703
+ <div class="col-sm-4 form-group">
704
+ <label class="font_normal_body">总用气量</label>
705
+ <p class="form-control" style="width:60%" disabled>{{ ((row.f_stair_gas1 - 0)+(row.f_stair_gas2 - 0)+(row.f_stair_gas3 - 0)).toFixed(2) }}</p>
706
+ </div>
707
+ <div class="col-sm-4 form-group">
708
+ <label class="font_normal_body">总用气金额</label>
709
+ <p class="form-control" style="width:60%" disabled>{{ row.f_oughtfee = ((row.f_stair_money1 - 0)+(row.f_stair_money2 - 0)+(row.f_stair_money3 - 0)).toFixed(2) }}</p>
710
+ </div>
711
+ <p style="color: red">注意: 自定义气量总量必须等于本次抄表用气量, 本次抄表总量: {{row.f_oughtamount}}</p>
712
+ </div>
713
+ </article>
714
+ <footer slot="modal-footer" class="modal-footer">
715
+ <button type="button" class="button_clear button_spacing" @click="close()">取消</button>
716
+ <button type="button" class="button_search button_spacing" @click='customPricingConfirm()'>确认</button>
717
+ </footer>
718
+ </modal>
719
+ </div>
720
+ </div>
721
+ </template>
722
+ <script>
723
+ import MixPriceInfo from '../../revenue/base/leftview/MixPriceInfo'
724
+ import {PagedList, HttpResetClass} from 'vue-client'
725
+ import Vue from 'vue'
726
+ import co from 'co'
727
+
728
+ let readyGen = async function (self) {
729
+ await self.$getConfig(self, 'HandManager')
730
+ await self.$LoadParams.loadMeterBook(self.f_filialeid)
731
+ self.loadMeterBooks()
732
+ self.getfield = self.config.excelHeaders
733
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
734
+ self.reflash()
735
+ }
736
+
737
+ let downGen = function* (type, condition, data, self) {
738
+ // if(data == 0 ) {
739
+ // self.$showAlert('下发计划户数为0!请选择需要下发的计划!!', 'danger', 0)
740
+ // return
741
+ // }
742
+ self.condition = condition
743
+ self.msg = '确认下发计划'
744
+ // 判断之前是否有未抄表数据
745
+ let getUnhand = null
746
+ // let getUnhand = yield Vue.resetpost('rs/sql/getUnhand', {data: {startDate: self.startDate, condition: self.condition}}, {resolveMsg: null, rejectMsg: '获取未抄表数据异常!!'})
747
+ // if (type === 'batch' || type === 'single') {
748
+ if (type === 'single') {
749
+ getUnhand = yield Vue.resetpost('rs/sql/getUnhand', {
750
+ data: {
751
+ startDate: self.model.params.startDate,
752
+ condition: condition
753
+ }
754
+ }, {resolveMsg: null, rejectMsg: '获取未抄表数据异常!!'})
755
+ self.msg = `下发客户编号为${data.f_userinfo_code}的抄表计划?`
756
+ // } else if (type === 'all') {
757
+ } else if (type === 'batch') {
758
+ let tempCondition = condition.replace("and f_meter_state = '未下发'", '')
759
+ getUnhand = yield Vue.resetpost('rs/sql/getUnhand', {
760
+ data: {
761
+ startDate: self.model.params.startDate,
762
+ condition: tempCondition
763
+ }
764
+ }, {resolveMsg: null, rejectMsg: '获取未抄表数据异常!!'})
765
+ self.msg = `确认下发当前总计: ${data} 户计划`
766
+ }
767
+ for (let i = 0; i < getUnhand.data.length; i++) {
768
+ let temp = {
769
+ id: getUnhand.data[i].id,
770
+ f_user_id: getUnhand.data[i].f_user_id,
771
+ f_userfiles_id: getUnhand.data[i].f_userfiles_id,
772
+ f_adjustable_id: getUnhand.data[i].f_adjustable_id,
773
+ f_adjustable_name: getUnhand.data[i].f_adjustable_name
774
+ }
775
+ console.log('=================================================================================')
776
+ console.log('下发计划查看调压箱和调压箱编号', temp)
777
+ console.log('========================================================================================')
778
+ self.unhandplan.push(temp)
779
+ }
780
+ if (getUnhand.data.length > 0) {
781
+ self.msg = self.msg + `, 警告: 之前有 ${getUnhand.data.length} 条未抄表数据`
782
+ }
783
+ self.show = true
784
+ }
785
+
786
+ let beforenterGen = async function (self, index, row) {
787
+ // 验证是不是总表
788
+ // self.enter(index, row)
789
+ if (row.f_totalsplit_type === '总表') {
790
+ let hasUnHand = await self.$HandService.getSplitInfo(row.f_userfiles_id)
791
+ if (hasUnHand) {
792
+ self.$showAlert('该表下面有未抄或未审核的分表信息!!请先抄录或审核分表信息!', 'danger', 0)
793
+ row.f_tablebase = null
794
+ } else {
795
+ self.enter(index, row)
796
+ }
797
+ } else {
798
+ self.enter(index, row)
799
+ }
800
+ }
801
+
802
+ export default {
803
+ title: '机表抄表',
804
+ components: { MixPriceInfo },
805
+ data () {
806
+ return {
807
+ priceModel: false,
808
+ initres: {
809
+ org: [this.$login.f.orgid],
810
+ dep: [],
811
+ user: []
812
+ },
813
+ sumsmodel: [],
814
+ orgCondtionStr: '',
815
+ priceSplit: false,
816
+ deletestate: false,
817
+ criteriaShow: false,
818
+ model: new PagedList('rs/sql/getPlan', 50, {orderitem: this.orderDefault ? '"' + this.orderDefault + ' "' : `'f_hand_date desc'`}, {
819
+ f_oughtamount: 0,
820
+ f_oughtfee: 0
821
+ }),
822
+ config: {
823
+
824
+ // 导出列要和查询列相同
825
+ excelHeaders: {
826
+ 'f_user_id': '表编号',
827
+ 'f_meternumber': '表号',
828
+ 'f_inputtor': '抄表员',
829
+ 'f_balance': '上期结余',
830
+ 'f_last_input_date': '上次抄表',
831
+ 'f_hand_date': '下发时间',
832
+ 'f_input_date': '抄表日期',
833
+ 'f_userinfo_code': '客户编号',
834
+ 'f_address': '客户地址',
835
+ 'f_residential_area': '小区名称',
836
+ 'f_user_name': '客户姓名',
837
+ 'f_last_tablebase': '上期底数',
838
+ 'f_tablebase': '本期指数',
839
+ 'f_oughtfee': '应交金额',
840
+ 'f_oughtamount': '应交气量',
841
+ 'f_whether_pay': '是否缴费',
842
+ 'f_book_name': '抄表册',
843
+ 'f_input_person': '录入人员',
844
+ 'f_operator': '下发人员',
845
+ 'f_meter_classify': '气表分类',
846
+ 'f_meter_style': '气表型号',
847
+ 'f_accounts_state': '下账标识',
848
+ 'f_user_phone': '客户电话',
849
+ 'f_adjustable_id': '表箱号'
850
+ },
851
+ examine: true,
852
+ customCal: false
853
+ },
854
+ meter_state: false, // 是否显示计划下发按钮
855
+ downModel: {
856
+ downDate: Vue.$login.toStandardTimeString(),
857
+ downWay: 'downWithUserfiles',
858
+ downInputtor: []
859
+ },
860
+ inputtorModel: {
861
+ inputtor: [],
862
+ reason: ''
863
+ },
864
+ auditState: [{label: '全部', value: ''}, {label: '未抄表', value: '未抄表'}, {label: '待审核', value: '待审核'}, {label: '已抄表', value: '已抄表'}],
865
+
866
+ plans: [], // 记录当前行是否被勾选
867
+ all: false, // 是否全选
868
+ show: false, // 下发日期模态框显示
869
+ unhandplan: [], // 之前是否有未抄表记录
870
+ downConfirm: false, // 下发若有未抄记录,确认框
871
+ uploadshow: false,
872
+ // 小区
873
+ residentialArea: [],
874
+
875
+ // downDate: this.$login.toStandardYearMonth().replace("-", ""),
876
+ msg: '',
877
+ condition: '',
878
+ headers: {'username': Vue.$login.f.name, 'blodid': Vue.$login.guid()},
879
+ orderDefault: 'f_hand_date',
880
+ orderFields: {
881
+ f_userinfo_id: 'no'
882
+ },
883
+ getfield: {},
884
+ outlet: '',
885
+ filiale: '',
886
+ condition2: '',
887
+ area: [],
888
+ inputtouPerson: [],
889
+ meters: [{label: '全部', value: ''}, {label: '机表', value: '机表'}, {label: '物联网表', value: '物联网表'}],
890
+ resultstate: this.$appdata.getParam('抄表结果状态'),
891
+ meterstates: this.$appdata.getParam('抄表状态') ? [{
892
+ label: '全部',
893
+ value: ''
894
+ }, ...this.$appdata.getParam('抄表状态')] : [],
895
+ usertypes: this.$appdata.getParam('客户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('客户类型')] : [],
896
+ userlevels: this.$appdata.getParam('用户等级') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')] : [],
897
+ adjustablename: this.$appdata.getParam('调压箱名称') ? [{
898
+ label: '全部',
899
+ value: ''
900
+ }, ...this.$appdata.getParam('调压箱名称')] : [],
901
+ inputtores2: [], // 下发时使用自定义抄表员,
902
+ splitdata: '',
903
+ f_filialeid: this.$login.f.orgid,
904
+ meterbooks: [],
905
+ upshow: false,
906
+ inputid: 0,
907
+ examineshow: false,
908
+ examinerow: null,
909
+ showfiles: false,
910
+ uploadText: '抄表',
911
+ examinetype: false,
912
+ danhu: {
913
+ show: false,
914
+ f_userinfo_code: '',
915
+ f_tablebase: '',
916
+ info: {}
917
+ },
918
+ showerr: false,
919
+ err: '',
920
+ // 请求对象(批量导入,查询进度使用)
921
+ HttpReset: new HttpResetClass(),
922
+ // 气价使用详情展示
923
+ detailsShow: false,
924
+ row: null,
925
+ // 应抄底数
926
+ should_base: 0,
927
+ // 计算公式
928
+ designFormulas: null,
929
+ usermlimit: this.$appdata.getSingleValue('民用自动审核区间'),
930
+ userfmlimit: this.$appdata.getSingleValue('非民用自动审核区间')
931
+ }
932
+ },
933
+ ready () {
934
+ this.getaddress()
935
+ readyGen(this)
936
+ },
937
+ mounted () {
938
+ console.log(this.inputid)
939
+ document.getElementById(this.inputid).focus()
940
+ },
941
+ methods: {
942
+ stairMoney (price, gas) {
943
+ return (price * gas).toFixed(2) - 0
944
+ },
945
+ async customPricingConfirm () {
946
+ let sumGas = (this.row.f_stair_gas1 - 0) + (this.row.f_stair_gas2 - 0) + (this.row.f_stair_gas3 - 0)
947
+ if (sumGas !== (this.row.f_oughtamount - 0)) {
948
+ this.$showMessage('自定义划价总气量不符, 请检查')
949
+ return
950
+ }
951
+ let row = {
952
+ id: this.row.id,
953
+ f_oughtfee: this.row.f_oughtfee,
954
+ f_stair_price1: this.row.f_stair_price1,
955
+ f_stair_gas1: this.row.f_stair_gas1,
956
+ f_stair_money1: this.row.f_stair_money1,
957
+ f_stair_price2: this.row.f_stair_price2,
958
+ f_stair_gas2: this.row.f_stair_gas2,
959
+ f_stair_money2: this.row.f_stair_money2,
960
+ f_stair_price3: this.row.f_stair_price3,
961
+ f_stair_gas3: this.row.f_stair_gas3,
962
+ f_stair_money3: this.row.f_stair_money3
963
+ }
964
+ await this.$resetpost('rs/logic/customPricing', {data: row}, {resolveMsg: '保存成功', rejectMsg: '保存失败'}).then(res => {
965
+ this.close()
966
+ this.search()
967
+ })
968
+ },
969
+ customPricing () {
970
+ if (!this.$login.r.find(value => value == '抄表自定义划价')) {
971
+ this.$showMessage('当前登录用户没有【抄表自定义划价】权限, 请联系管理员!')
972
+ return
973
+ }
974
+ if (this.row.f_meter_state !== '已抄表') {
975
+ this.$showMessage('当前抄表单不是已抄表状态,无法进行自定义划价!')
976
+ return
977
+ }
978
+ if (this.row.f_whether_pay !== '否') {
979
+ this.$showMessage('当前抄表单已经缴费,无法进行自定义划价!')
980
+ return
981
+ }
982
+ this.detailsShow = false
983
+ this.priceModel = true
984
+ },
985
+ downloadFiles () {
986
+ let downurl = 'rs/downloadfile/file?filename=机表抄表导入Excel模板'
987
+ this.$resetget(downurl, {}).then(res => {
988
+ var link = document.createElement('a')
989
+ link.target = '_blank'
990
+ link.href = downurl
991
+ link.setAttribute('download', '机表抄表导入Excel模板.xlsx') // 指定下载后的文件名,防跳转
992
+ document.body.appendChild(link)
993
+ link.click()
994
+ })
995
+ },
996
+ calculationBase (row) {
997
+ let oughtamount = null
998
+ if (row.f_tablebase) {
999
+ if (row.f_share_gas) {
1000
+ oughtamount = (row.f_tablebase - 0 - (row.f_last_tablebase - 0)).toFixed(4) + (row.f_share_gas > 0 ? '+' : '') + row.f_share_gas.toFixed(2)
1001
+ } else {
1002
+ if (row.f_capacity && row.f_capacity > 0 && row.f_tablebase < row.f_last_tablebase) {
1003
+ oughtamount = (row.f_tablebase - 0 + (row.f_capacity - row.f_last_tablebase)).toFixed(2)
1004
+ } else {
1005
+ oughtamount = (row.f_tablebase - 0 - (row.f_last_tablebase - 0)).toFixed(2)
1006
+ }
1007
+ }
1008
+ } else {
1009
+ oughtamount = 0
1010
+ }
1011
+ row.f_oughtamount = oughtamount
1012
+ return oughtamount
1013
+ },
1014
+ cancelHand (row) {
1015
+ if (this.config.examine) {
1016
+ let handdate = new Date(row.f_hand_date)
1017
+ let ima = new Date()
1018
+ if (handdate.getMonth() == ima.getMonth()) {
1019
+ this.cancelHand3(row)
1020
+ } else {
1021
+ if (!this.$login.r.find(value => value == '抄表隔月冲正')) {
1022
+ this.$showMessage('当前登录用户没有【抄表隔月冲正】权限, 请联系管理员!')
1023
+ } else {
1024
+ this.cancelHand3(row)
1025
+ }
1026
+ }
1027
+ } else {
1028
+ this.cancelHand3(row)
1029
+ }
1030
+ },
1031
+
1032
+ cancelHand3 (row) {
1033
+ // 抄表加入权限
1034
+ if (!this.$login.r.find(value => value == '机表抄表冲正')) {
1035
+ this.$showMessage('当前登录用户没有冲正权限, 请联系管理员!')
1036
+ return
1037
+ }
1038
+ // console.log('抄表冲正。、。。、', row)
1039
+ let param = {
1040
+ f_hand_id: row.id,
1041
+ operInfo: {
1042
+ f_operator: this.$login.f.name,
1043
+ f_operatorid: this.$login.f.id,
1044
+ f_orgid: this.$login.f.orgid,
1045
+ f_orgname: this.$login.f.orgs,
1046
+ f_depid: this.$login.f.depids,
1047
+ f_depname: this.$login.f.deps
1048
+ }
1049
+ }
1050
+ let url = 'rs/logic/sale_commonEnterCancel'
1051
+ this.$resetpost(url, {data: param}, {warnMsg: '确定对这条记录进行撤销吗?'}).then(() => {
1052
+ this.search()
1053
+ this.close()
1054
+ })
1055
+ },
1056
+ cancelAuditHand (row) {
1057
+ console.log('撤回本次录入。。。', row)
1058
+ let handplan = {
1059
+ id: row.id,
1060
+ f_oughtamount: 0,
1061
+ f_tablebase: 0,
1062
+ f_input_date: null,
1063
+ f_meter_state: '未抄表',
1064
+ f_meter_source: null
1065
+ }
1066
+ this.$resetpost('rs/entity/t_handplan', handplan, {
1067
+ resolveMsg: null,
1068
+ rejectMsg: '撤回失败'
1069
+ }).then((res) => {
1070
+ this.search()
1071
+ })
1072
+ },
1073
+ async danhuCodeSearch () {
1074
+ this.danhu.f_userinfo_code = this.danhu.f_userinfo_code.replace(/(^\s*)|(\s*$)/g, '')
1075
+ await this.$resetpost('rs/sql/getInfoOfDanhu', {
1076
+ data: {
1077
+ f_userinfo_code: this.danhu.f_userinfo_code,
1078
+ f_orgid: this.f_filialeid
1079
+ }
1080
+ },
1081
+ {resolveMsg: null, rejectMsg: '查询用户信息失败,网络错误'}).then(res => {
1082
+ if (res.data.length !== 1) {
1083
+ this.$showAlert(res.data.length === 0 ? '没有查询到用户' : '查询到多条用户信息', 'warning', 3000)
1084
+ return
1085
+ }
1086
+ if (res.data[0].f_meter_state === '待审核') {
1087
+ this.$showAlert('用户有待审核的记录', 'warning', 3000)
1088
+ return
1089
+ }
1090
+ if (res.data[0].f_whether_pay === '否') {
1091
+ this.$showAlert('用户有未缴费的抄表记录', 'warning', 3000)
1092
+ }
1093
+ this.danhu.info = res.data[0]
1094
+ // = Object.assign(this.danhu,{info:res.data[0]})
1095
+ document.getElementById('danhubase').focus()
1096
+ })
1097
+ },
1098
+ // 单户抄表 下发计划并抄表
1099
+ async downAndHand () {
1100
+ if (!this.danhu.info.f_userinfo_code || this.danhu.info.f_userinfo_code === '') {
1101
+ this.$showAlert(`请先查询用户信息`, 'warning', 2000)
1102
+ return
1103
+ }
1104
+
1105
+ if (this.danhu.f_tablebase < 0) {
1106
+ this.$showAlert(`底数不能小于0,请注意!`, 'warning', 2000)
1107
+ return
1108
+ } else if (this.danhu.f_tablebase - parseInt(this.danhu.f_tablebase) !== 0) {
1109
+ this.$showAlert(`底数只能输入整数,请注意!`, 'warning', 2000)
1110
+ return
1111
+ } else if (this.danhu.f_tablebase < this.danhu.info.f_tablebase && !this.danhu.info.f_capacity) {
1112
+ this.$showAlert(`本期表底数不能低于上期表底数`, 'warning', 2000)
1113
+ return
1114
+ } else {
1115
+ if (this.danhu.f_tablebase < this.danhu.info.f_tablebase) {
1116
+ this.$showMessage('本次抄表已超越最大量程, 请熟知!')
1117
+ }
1118
+ }
1119
+ let param = {
1120
+ downDate: this.downModel.downDate,
1121
+ startDate: this.model.params.startDate,
1122
+ endDate: this.model.params.endDate,
1123
+ condition: ` f_userfiles_id = '${this.danhu.info.f_userfiles_id}' `,
1124
+ f_operator: this.$login.f.name,
1125
+ f_operatorid: this.$login.f.id,
1126
+ danhu: true,
1127
+ userfilesid: this.danhu.info.f_userfiles_id
1128
+ }
1129
+ console.log('下发参数:', param)
1130
+ this.$resetpost('rs/logic/downHand', {data: param}, {resolveMsg: null, rejectMsg: '下发失败,请检查该用户是否在该归属期内已有抄表记录'}).then((res) => {
1131
+ console.log('下发计划成功', res)
1132
+ this.$resetpost('/rs/sql/querySingleTable', {
1133
+ data: {
1134
+ items: 'max(id) id',
1135
+ tablename: 't_handplan',
1136
+ condition: ` f_userfiles_id = '${this.danhu.info.f_userfiles_id}' `
1137
+ }
1138
+ }, {resolveMsg: null, rejectMsg: '查询抄表信息失败'}).then((res2) => {
1139
+ let handParam = {
1140
+ f_meter_classify: this.danhu.info.f_meter_classify,
1141
+ f_meter_brand: this.danhu.info.f_meter_brand,
1142
+ f_hand_id: res2.data[0].id,
1143
+ f_tablebase: this.danhu.f_tablebase,
1144
+ f_userinfo_id: this.danhu.info.f_userinfo_id
1145
+ }
1146
+ this.$resetpost('rs/logic/sale_commonEnter', {data: handParam}, {
1147
+ resolveMsg: null,
1148
+ rejectMsg: null
1149
+ })
1150
+ }).then((res) => {
1151
+ this.$showAlert(`单户抄表成功!`, 'success', 2000)
1152
+ this.danhuShow()
1153
+ }).catch((error) => {
1154
+ this.danhu.show = false
1155
+ this.$showAlert(`单户抄表失败!` + JSON.toString(error), 'danger', 2000)
1156
+ })
1157
+ }).catch((error) => {
1158
+ this.danhu.show = false
1159
+ this.$showAlert(`抄表失败,请注意查看,失败原因:` + JSON.toString(error), 'danger', 2000)
1160
+ })
1161
+ },
1162
+ // 获得本月的最后一天。
1163
+ getLastDayOfMonth (year, month) {
1164
+ let new_year = year // 取当前的年份
1165
+ let new_month = month++// 取下一个月的第一天,方便计算(最后一天不固定)
1166
+ if (month > 12) // 如果当前大于12月,则年份转到下一年
1167
+ {
1168
+ new_month -= 12 // 月份减
1169
+ new_year++ // 年份增
1170
+ }
1171
+ let new_date = new Date(new_year, new_month, 1) // 取当年当月中的第一天
1172
+ let date_count = (new Date(new_date.getTime() - 1000 * 60 * 60 * 24)).getDate()// 获取当月的天数
1173
+ // let last_date = new Date(new_date.getTime() - 1000 * 60 * 60 * 24);//获得当月最后一天的日期
1174
+ return date_count
1175
+ },
1176
+ danhuShow () {
1177
+ this.model.params.startDate = this.$refs.paged.$refs.criteria.model.startDate
1178
+ this.model.params.endDate = this.$refs.paged.$refs.criteria.model.endDate
1179
+ this.downModel.downDate = this.$login.toStandardTimeString()
1180
+ this.danhu = {
1181
+ show: true,
1182
+ f_userinfo_code: '',
1183
+ f_tablebase: '',
1184
+ info: {}
1185
+ }
1186
+ setTimeout(() => {
1187
+ document.getElementById('danhucode').focus()
1188
+ this.$refs.paged.$refs.criteria.search()
1189
+ }, 100)
1190
+ },
1191
+ paycodefocus () {
1192
+ this.$nextTick(() => {
1193
+ this.$els.paycode.focus()
1194
+ })
1195
+ },
1196
+ getRes (obj) {
1197
+ this.orgCondtionStr = obj
1198
+ },
1199
+ async getaddress () {
1200
+ console.log('开始获取小区')
1201
+ let HttpReset = new HttpResetClass()
1202
+ var data = await HttpReset.load('POST', 'rs/sql/manage_getarealist', {
1203
+ data: {
1204
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
1205
+ }
1206
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
1207
+ console.log('小区', data)
1208
+ let house = []
1209
+ house.push()
1210
+ for (let row of data.data) {
1211
+ console.log('开始保存小区')
1212
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
1213
+ }
1214
+ this.residentialArea = house
1215
+ },
1216
+ loadMeterBooks () {
1217
+ this.meterbooks = this.$GetSaleParam.getMeterBooks()
1218
+ },
1219
+
1220
+ fileterprice (row) {
1221
+ this.splitdata = row
1222
+ this.priceSplit = true
1223
+ console.log('row==>', row)
1224
+ },
1225
+ hidden () {
1226
+ this.criteriaShow = !this.criteriaShow
1227
+ },
1228
+ clear () {
1229
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
1230
+ this.$refs.paged.$refs.criteria.model[key] = []
1231
+ })
1232
+ },
1233
+
1234
+ // 判断当前页是否全选
1235
+ isChooseAll (rows) {
1236
+ if (this.plans.length == 0 && rows.length == 0) {
1237
+ return false
1238
+ }
1239
+ for (var i = 0; i < rows.length; i++) {
1240
+ let flag = false
1241
+ if (rows[i].f_meter_state == '未下发') {
1242
+ for (let plan of this.plans) {
1243
+ if (plan.id == rows[i].f_userfiles_id) {
1244
+ flag = true
1245
+ if (!plan.state) {
1246
+ return false
1247
+ }
1248
+ }
1249
+ }
1250
+ if (!flag) {
1251
+ return false
1252
+ }
1253
+ }
1254
+ }
1255
+ return true
1256
+ },
1257
+ // 选择需要下发的计划
1258
+ chooseOne (e, row, rows) {
1259
+ console.log('row', row)
1260
+ let checked = e.target.checked
1261
+ console.log('state', e.target.checked)
1262
+ // 判断当前行是否被选中
1263
+ if (checked) {
1264
+ let onePlan = {
1265
+ id: row.f_userfiles_id,
1266
+ state: true
1267
+ }
1268
+ // 记录被选中计划的状态
1269
+ let flag = false
1270
+ for (let plan of this.plans) {
1271
+ if (plan.id == row.f_userfiles_id) {
1272
+ flag = true
1273
+ plan.state = true
1274
+ }
1275
+ }
1276
+ if (!flag) {
1277
+ this.plans.push(onePlan)
1278
+ }
1279
+ } else {
1280
+ for (let plan of this.plans) {
1281
+ if (plan.id == row.f_userfiles_id) {
1282
+ plan.state = false
1283
+ }
1284
+ }
1285
+ }
1286
+ // let param = {id:row.id,isChoose:true}
1287
+
1288
+ if (this.isChooseAll(rows)) {
1289
+ this.all = true
1290
+ } else {
1291
+ this.all = false
1292
+ }
1293
+ // this.delRepetition()
1294
+ },
1295
+ uploadFiles () {
1296
+ this.showfiles = !this.showfiles
1297
+ },
1298
+ chooseAll () {
1299
+ if (this.all) {
1300
+ // this.chooseInfo[index-1] = []
1301
+ // for (let row of this.model.rows){
1302
+ // this.chooseInfo[index-1].push(row)
1303
+ // }
1304
+ // this.chooseInfo = Object.assign([],this.chooseInfo,this.model.rows)
1305
+
1306
+ for (let row of this.model.rows) {
1307
+ if (row.f_meter_state == '未下发') {
1308
+ let onePlan = {
1309
+ id: row.f_userfiles_id,
1310
+ state: true
1311
+ }
1312
+ let flag = false
1313
+ for (let plan of this.plans) {
1314
+ if (plan.id == row.f_userfiles_id) {
1315
+ flag = true
1316
+ plan.state = true
1317
+ }
1318
+ }
1319
+ if (!flag) {
1320
+ this.plans.push(onePlan)
1321
+ }
1322
+ }
1323
+ }
1324
+ } else {
1325
+ // this.chooseInfo[index-1] = []
1326
+ // console.log("this.chooseInfo[index-1]",this.chooseInfo[index-1])
1327
+ for (let row of this.model.rows) {
1328
+ if (row.f_meter_state == '未下发') {
1329
+ for (let plan of this.plans) {
1330
+ if (plan.id == row.f_userfiles_id) {
1331
+ plan.state = false
1332
+ }
1333
+ }
1334
+ }
1335
+ }
1336
+ }
1337
+ },
1338
+ search () {
1339
+ // 查询前清空选择项
1340
+ this.plans = []
1341
+ this.$refs.paged.$refs.criteria.search()
1342
+ },
1343
+ clickupshow () {
1344
+ if (!this.$login.r.find(value => value == '机表抄表导入抄表')) {
1345
+ this.$showMessage('你没有机表抄表导入抄表的权限,请联系管理员!')
1346
+ return
1347
+ }
1348
+ this.upshow = !this.upshow
1349
+ },
1350
+ deletehand () {
1351
+ if (!this.$login.r.find(value => value == '抄表计划删除')) {
1352
+ this.$showMessage('你没有【抄表计划删除】的权限,请联系管理员!')
1353
+ } else {
1354
+ if (this.deletestate) {
1355
+ console.log('mode', this.model)
1356
+ let cons = this.model.params
1357
+ this.$showMessage('删除后不可恢复,确认删除该批未抄表计划吗?', ['confirm', 'cancel']).then((res) => {
1358
+ if (res === 'confirm') {
1359
+ this.$resetpost('rs/logic/deletePlanAll', {data: cons}).then((res) => {
1360
+ this.$dispatch('refresh', '删除计划', cons)
1361
+ console.log('ressss:', res)
1362
+ this.$showAlert(`共计删除${res.data.index}条记录`, 'success', 2000)
1363
+ this.search()
1364
+ })
1365
+ }
1366
+ })
1367
+ } else {
1368
+ this.$showMessage('为保证误删操作,请先选择抄表单查询条件为未抄表,查询后,再点击删除计划按钮!')
1369
+ }
1370
+ }
1371
+ },
1372
+ searchPrint () {
1373
+ console.log('mode', this.model)
1374
+ let cons = this.model.params
1375
+ let data = {
1376
+ 'body': {
1377
+ 'data': {
1378
+ 'condition': ''
1379
+ },
1380
+ 'field': [],
1381
+ 'templateName': '',
1382
+ 'sqlName': ''
1383
+ },
1384
+ 'condition': cons,
1385
+ 'sqlname': 'periodAlreadyIssuedOrder'
1386
+ }
1387
+ this.$resetpost('rs/logic/allExportExcel', {data: data}, {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
1388
+ if (res.data === 'no user') {
1389
+ this.$showAlert(`无匹配用户,无法导出对应excel`, 'warning', 2000)
1390
+ } else {
1391
+ var link = document.createElement('a')
1392
+ res.data.forEach((item) => {
1393
+ console.log('导出路径', item.filename)
1394
+ let path = item.filename
1395
+ // 本地
1396
+ // let pathName = "http://" + location.host + "/excel" + path.split('excel')[1]
1397
+ // 服务器
1398
+ let pathName = 'http://' + location.host + '/webapps' + path.split('webapps')[1]
1399
+ link.href = pathName
1400
+ console.log('=============================', path.split('excel/')[1])
1401
+ link.download = path.split('excel/')[1]
1402
+ link.dispatchEvent(new MouseEvent('click'))
1403
+ })
1404
+ }
1405
+ })
1406
+ },
1407
+ selfSearch (args) {
1408
+ this.meter_state = args.condition.includes('未下发')
1409
+ this.inputtor_change = args.condition.includes('未抄表')
1410
+ console.log('=====抄表1====', args.condition.includes('未抄表'))
1411
+ console.log('=====抄表1====', this.deletestate)
1412
+ if (args.condition.includes('未抄表')) {
1413
+ this.deletestate = true
1414
+ } else {
1415
+ this.deletestate = false
1416
+ }
1417
+ console.log('=====抄表1====', this.deletestate)
1418
+ if (!this.orgCondtionStr) {
1419
+ args.condition = `${args.condition}` + ' and f_orgid = ' + this.$login.f.orgid
1420
+ } else {
1421
+ args.condition = `${args.condition}` + this.orgCondtionStr
1422
+ }
1423
+
1424
+ // 抄表员查询条件
1425
+ this.inputtouPerson = this.$refs.paged.$refs.criteria.model.f_inputtor
1426
+ if (this.inputtouPerson.length !== 0) {
1427
+ let str = JSON.stringify(this.inputtouPerson)
1428
+ str = str.replace(/"/g, `'`)
1429
+ str = str.replace(/\[/g, ``)
1430
+ str = str.replace(/\]/g, ``)
1431
+ console.log('=====抄表员model22222222222绑定====', str)
1432
+ // 查询多个抄表员时条件
1433
+ args.condition += ` and f_inputtor in ( ${str} )`
1434
+ }
1435
+ // 小区查询条件
1436
+ this.area = this.$refs.paged.$refs.criteria.model.f_residential_area
1437
+ console.log('=====小区model绑定====', this.area)
1438
+ if (this.area.length !== 0) {
1439
+ let str = JSON.stringify(this.area)
1440
+ str = str.replace(/"/g, `'`)
1441
+ str = str.replace(/\[/g, ``)
1442
+ str = str.replace(/\]/g, ``)
1443
+ console.log('=====小区model22222222222绑定====', str)
1444
+ // 查询多个小区时条件
1445
+ args.condition += ` and f_residential_area in ( ${str} )`
1446
+ }
1447
+
1448
+ if (args.model.f_meter_brand && args.model.f_meter_brand.length > 0) {
1449
+ if (args.model.f_meter_brand[0].f_meter_brand) {
1450
+ args.condition = `${args.condition} and f_meter_brand = '${args.model.f_meter_brand[0].f_meter_brand}'`
1451
+ }
1452
+ }
1453
+ this.model.params.startDate = this.$refs.paged.$refs.criteria.model.startDate
1454
+ this.model.params.endDate = this.$refs.paged.$refs.criteria.model.endDate
1455
+ this.condition2 = args.condition
1456
+ console.log('selfsearch..', args.condition, this.model)
1457
+ this.model.search(args.condition, this.model)
1458
+ },
1459
+ reflash () {
1460
+ this.$refs.paged.$refs.criteria.model.f_orgid = `${Vue.$login.f.orgid}`
1461
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStartAndEndDateString()[0]
1462
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStartAndEndDateString()[1]
1463
+ this.search()
1464
+ },
1465
+ beforenter (index, row) {
1466
+ this.inputid = index + 1
1467
+ // 限制本次抄表不能低于上次
1468
+ if (row.f_tablebase) {
1469
+ if (row.f_tablebase < 0) {
1470
+ row.state = '失败'
1471
+ Vue.set(row, 'error', '底数不能小于0')
1472
+ this.speckText('底数不能小于0,请注意!')
1473
+ } else if (row.f_tablebase - parseInt(row.f_tablebase) !== 0) {
1474
+ row.state = '失败'
1475
+ Vue.set(row, 'error', '底数只能输入整数')
1476
+ this.speckText('底数只能输入整数,请注意!')
1477
+ } else if (row.f_tablebase < row.f_last_tablebase && !row.f_capacity) {
1478
+ row.state = '失败'
1479
+ Vue.set(row, 'error', '本期表底数不能低于上期表底数')
1480
+ this.speckText('本期表底数不能低于上期表底数,请注意!')
1481
+ } else {
1482
+ if (row.f_tablebase < row.f_last_tablebase) {
1483
+ this.$showMessage('本次抄表已超越最大量程, 请熟知!')
1484
+ }
1485
+ // 抄表结果状态没选默认给正常
1486
+ row.f_result_state = row.f_result_state ? row.f_result_state : '正常'
1487
+ beforenterGen(this, index, row)
1488
+ }
1489
+ }
1490
+ },
1491
+ enter (index, row) {
1492
+ console.log('录入数据。..', row)
1493
+ let auditFlag = false
1494
+ let num = (row.f_tablebase - row.f_last_tablebase)
1495
+ let reg = /^\d+,\d+$/
1496
+ if (row.f_user_type === '民用' && this.usermlimit) {
1497
+ if (!reg.test(this.usermlimit)) {
1498
+ this.$showMessage('民用自动审核区间参数设置有误, 请检查!')
1499
+ return
1500
+ }
1501
+ let limit = this.usermlimit.split(',')
1502
+ if (!(limit[0] - 0 <= num && num <= limit[1] - 0)) {
1503
+ auditFlag = true
1504
+ }
1505
+ } else if (row.f_user_type === '非民用' && this.userfmlimit) {
1506
+ if (!reg.test(this.userfmlimit)) {
1507
+ this.$showMessage('非民用自动审核区间参数设置有误, 请检查!')
1508
+ return
1509
+ }
1510
+ let limit = this.userfmlimit.split(',')
1511
+ if (!(limit[0] - 0 <= num && num <= limit[1] - 0)) {
1512
+ auditFlag = true
1513
+ }
1514
+ } else if (this.$appdata.getSingleValue('抄表审核') === '启用') {
1515
+ auditFlag = true
1516
+ }
1517
+ if (auditFlag) {
1518
+ let f_input_date = Vue.$login.toStandardDateString()
1519
+ if (row.f_input_date && row.f_input_date != '') {
1520
+ f_input_date = row.f_input_date
1521
+ }
1522
+ let handplan = {
1523
+ id: row.id,
1524
+ f_oughtamount: row.f_oughtamount,
1525
+ f_adjustment_volume: row.f_adjustment_volume ? row.f_adjustment_volume : 0,
1526
+ f_tablebase: row.f_tablebase,
1527
+ f_hand_date: row.f_hand_date,
1528
+ f_input_date: f_input_date,
1529
+ f_input_person: Vue.$login.f.name,
1530
+ f_meter_state: '待审核',
1531
+ f_meter_source: '手动录入',
1532
+
1533
+ f_operator: Vue.$login.f.name,
1534
+ f_operatorid: Vue.$login.f.id,
1535
+ f_orgid: Vue.$login.f.orgid,
1536
+ f_orgname: Vue.$login.f.orgs,
1537
+ f_depid: Vue.$login.f.depids,
1538
+ f_depname: Vue.$login.f.deps
1539
+
1540
+ }
1541
+ console.log('抄表负数。。0', handplan)
1542
+ this.$resetpost('rs/entity/t_handplan', handplan, {
1543
+ resolveMsg: null,
1544
+ rejectMsg: '抄表数据保存出错!!!'
1545
+ }).then((res) => {
1546
+ row.f_meter_state = '待审核'
1547
+ row.f_whether_pay = '否'
1548
+ row.f_input_date = res.data.f_input_date
1549
+ // this.search()
1550
+ }).catch((error) => {
1551
+ row.state = '失败'
1552
+ Vue.set(row, 'error', JSON.stringify(error))
1553
+ this.speckText('抄表录入出错,请注意!')
1554
+ })
1555
+ } else {
1556
+ // 没有启用抄表审核功能
1557
+ row.f_input_person = this.$login.f.name
1558
+ row.f_inputtor = row.f_inputtor
1559
+ row.f_userinfo_id = row.f_userinfo_id + ''
1560
+ row.f_userfiles_id = row.f_userfiles_id + ''
1561
+ this.pass(row)
1562
+ }
1563
+ },
1564
+ pass (row) {
1565
+ let param = {
1566
+ f_meter_classify: row.f_meter_classify,
1567
+ f_meter_brand: row.f_meter_brand,
1568
+ f_hand_id: row.id,
1569
+ f_operator: Vue.$login.f.name,
1570
+ f_tablebase: row.f_tablebase,
1571
+ f_userinfo_id: row.f_userinfo_id,
1572
+ f_adjustment_volume: row.f_adjustment_volume ? row.f_adjustment_volume : 0
1573
+ }
1574
+ this.$resetpost('rs/logic/sale_commonEnter', {data: param}, {resolveMsg: null, rejectMsg: null,newly:true}).then((res) => {
1575
+ row.f_meter_state = res.data.f_meter_state
1576
+ row.f_whether_pay = res.data.f_whether_pay
1577
+ row.f_oughtfee = res.data.f_oughtfee
1578
+ row.f_oughtamount = res.data.f_oughtamount
1579
+ // this.$resetpost('rs/logic/getMeterSms', {data: param}, {resolveMsg: null, rejectMsg: null}).then((res) => {
1580
+ // this.search()
1581
+ let f_result_state = '正常'
1582
+ if (row.f_result_state && row.f_result_state != '') {
1583
+ f_result_state = row.f_result_state
1584
+ }
1585
+ let f_input_date = ''
1586
+ if (row.f_input_date && row.f_input_date != '') {
1587
+ f_input_date = ` ,f_input_date = '${row.f_input_date}'`
1588
+ }
1589
+ let sqldata = `update t_handplan set f_result_state = '${f_result_state}' ${f_input_date} where id = '${row.id}'`
1590
+ this.$resetpost('rs/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: '业务单号保存失败',newly:true})
1591
+ // }).catch((error) => {
1592
+ // row.state = '失败'
1593
+ // Vue.set(row, 'error', JSON.stringify(error))
1594
+ // this.speckText('抄表出错,请注意!')
1595
+ // })
1596
+ // this.search()
1597
+ }).catch((error) => {
1598
+ row.state = '失败'
1599
+ Vue.set(row, 'error', JSON.stringify(error))
1600
+ this.speckText('抄表出错,请注意!')
1601
+ })
1602
+ },
1603
+ nopass (row) {
1604
+ console.log('不通过。。。', row)
1605
+ let handplan = {
1606
+ id: row.id,
1607
+ f_oughtamount: 0,
1608
+ f_tablebase: 0,
1609
+ f_input_date: null,
1610
+ f_meter_state: '未抄表',
1611
+ f_meter_source: null
1612
+ }
1613
+ this.$resetpost('rs/entity/t_handplan', handplan, {
1614
+ resolveMsg: null,
1615
+ rejectMsg: '未通过,抄表数据返回未抄表保存出错!!!'
1616
+ }).then((res) => {
1617
+ row.f_tablebase = null
1618
+ row.f_meter_state = '未抄表'
1619
+ row.f_whether_pay = '否'
1620
+ this.search()
1621
+ }).catch((error) => {
1622
+ row.state = '失败'
1623
+ Vue.set(row, 'error', JSON.stringify(error))
1624
+ this.speckText('抄表录入出错,请注意!')
1625
+ })
1626
+ },
1627
+ clearError (row) {
1628
+ if (row.f_tablebase === 0) {
1629
+ row.f_tablebase = ''
1630
+ }
1631
+ Vue.set(row, 'error', null)
1632
+ },
1633
+ async speckText (str) {
1634
+ var url = 'http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=6&text=' + encodeURI(str)
1635
+ await new Audio(url).play()
1636
+ this.err = str
1637
+ this.showerr = true
1638
+ this.paycodefocus()
1639
+ },
1640
+ closeerr () {
1641
+ this.showerr = false
1642
+ },
1643
+ fileUpload () {
1644
+ this.uploadshow = true
1645
+ },
1646
+ // 删除这条计划
1647
+ delectHand (row) {
1648
+ this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
1649
+ if (res === 'confirm') {
1650
+ this.$resetpost('rs/logic/deletePlan', {data: row}).then(() => {
1651
+ this.$dispatch('refresh', '删除计划', row)
1652
+ this.search()
1653
+ })
1654
+ }
1655
+ })
1656
+ },
1657
+ cancelHand4 (row) {
1658
+ this.examinerow = row
1659
+ this.examineshow = true
1660
+ this.examinetype = true
1661
+ },
1662
+ cancelHand2 (row) {
1663
+ if (this.config.examine) {
1664
+ let handdate = new Date(row.f_hand_date)
1665
+ console.log('获取月份', handdate.getMonth())
1666
+ let ima = new Date()
1667
+ console.log('获取月份', ima.getMonth())
1668
+ if (handdate.getMonth() == ima.getMonth()) {
1669
+ this.cancelHand3(row)
1670
+ } else {
1671
+ if (!this.$login.r.find(value => value == '抄表隔月冲正')) {
1672
+ this.$showMessage('当前登录用户没有隔月冲正权限, 请联系管理员!')
1673
+ } else {
1674
+ this.cancelHand3(row)
1675
+ }
1676
+ }
1677
+ } else {
1678
+ this.cancelHand3(row)
1679
+ }
1680
+ },
1681
+ async cancelHand5 () {
1682
+ let sqldata = `update t_handplan set f_audit_state ='已审核',f_audit_person='${this.$login.f.name}',
1683
+ f_audit_date='${this.$login.toStandardTimeString()}' where id ='${this.examinerow.id}'`
1684
+ await this.$resetpost('rs/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: '更新收费记录订单号失败'})
1685
+
1686
+ this.cancelHand3(this.examinerow)
1687
+ },
1688
+ cancelHand3 (row) {
1689
+ // 抄表加入权限
1690
+ if (!this.$login.r.find(value => value == '机表抄表冲正')) {
1691
+ this.$showMessage('当前登录用户没有冲正权限, 请联系管理员!')
1692
+ return
1693
+ }
1694
+ // console.log('抄表冲正。、。。、', row)
1695
+ let param = {
1696
+ f_hand_id: row.id,
1697
+ operInfo: {
1698
+ f_operator: this.$login.f.name,
1699
+ f_operatorid: this.$login.f.id,
1700
+ f_orgid: this.$login.f.orgid,
1701
+ f_orgname: this.$login.f.orgs,
1702
+ f_depid: this.$login.f.depids,
1703
+ f_depname: this.$login.f.deps
1704
+ }
1705
+ }
1706
+ let url = 'rs/logic/sale_commonEnterCancel'
1707
+ this.$resetpost(url, {data: param}, {warnMsg: '确定对这条记录进行撤销吗?'}).then(() => {
1708
+ this.search()
1709
+ this.close()
1710
+ })
1711
+ },
1712
+ down (type, condition, data) {
1713
+ co(downGen(type, condition, data, this))
1714
+ },
1715
+ // 单条下发计划
1716
+ downHand (row) {
1717
+ console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' + row.f_userfiles_id)
1718
+ this.down('single', `f_userfiles_id = '${row.f_userfiles_id}'`, row)
1719
+ },
1720
+ // 批量下发计划
1721
+ batchDownHand () {
1722
+ this.down('batch', this.model.condition, this.model.count)
1723
+ },
1724
+ // batchDownHand () {
1725
+ // this.condition = ''
1726
+ // let count = 0
1727
+ // for (let plan of this.plans){
1728
+ // if(plan.state){
1729
+ // this.condition = this.condition + plan.id + ','
1730
+ // count = count + 1
1731
+ // }
1732
+ // }
1733
+ // this.down('batch', `f_user_id in (${this.condition.substring(0,this.condition.length-1)})`,count)
1734
+ // },
1735
+ // allDownHand () {
1736
+ // this.down('all', this.model.condition, this.model.count)
1737
+ // },
1738
+
1739
+ validateDate () {
1740
+ let currentDown = new Date(this.downModel.downDate)
1741
+ console.log(new Date(this.$refs.paged.$refs.criteria.model.startDate))
1742
+ console.log(new Date(this.$refs.paged.$refs.criteria.model.endDate))
1743
+ return currentDown >= new Date(this.$refs.paged.$refs.criteria.model.startDate + ' 00:00:00') && currentDown <= new Date(this.$refs.paged.$refs.criteria.model.endDate + ' 23:59:59')
1744
+ },
1745
+
1746
+ async examineconfirm () {
1747
+ let sqldata = `update t_handplan set f_audit_state ='审核中',f_examinereason='${this.examinerow.f_examinereason}' where id ='${this.examinerow.id}'`
1748
+ await this.$resetpost('rs/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: null})
1749
+ this.close()
1750
+ this.search()
1751
+ },
1752
+ // 关闭下发计划得弹出框
1753
+ close () {
1754
+ this.show = false
1755
+ this.inputtor_show = false
1756
+ this.downConfirm = false
1757
+ this.examineshow = false
1758
+ this.examinetype = false
1759
+ this.detailsShow = false
1760
+ this.priceModel = false
1761
+ // 初始化模态框数据
1762
+ this.initModal()
1763
+ if (this.uploadshow) {
1764
+ this.uploadshow = false
1765
+ // 讲选的文件清空
1766
+ this.$refs.file.$el.querySelector('input').value = ''
1767
+ }
1768
+ },
1769
+ initModal () {
1770
+ this.downModel = {
1771
+ downDate: Vue.$login.toStandardDateString(),
1772
+ downWay: 'downWithUserfiles',
1773
+ downInputtor: []
1774
+ }
1775
+ this.inputtorModel = {
1776
+ inputtor: [],
1777
+ reason: ''
1778
+ }
1779
+ },
1780
+ // 判断当前登陆人是不是子公司的人员
1781
+ isHead () {
1782
+ return this.$login.f.parent.parent.name.includes('统一资源管理')
1783
+ },
1784
+ sort (field, rule) {
1785
+ // 将所有排序方式设为不排序,实现相互排斥
1786
+ for (let key in this.orderFields) {
1787
+ if (key === field) {
1788
+ this.orderFields[key] = rule
1789
+ } else {
1790
+ this.orderFields[key] = 'no'
1791
+ }
1792
+ }
1793
+ // 如果新规则不排序,还原为默认排序
1794
+ if (rule === 'no') {
1795
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
1796
+ } else {
1797
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
1798
+ }
1799
+ this.search()
1800
+ },
1801
+ guid () {
1802
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
1803
+ let r = Math.random() * 16 | 0,
1804
+ v = c == 'x' ? r : (r & 0x3 | 0x8)
1805
+ return v.toString(16)
1806
+ })
1807
+ },
1808
+ computeAmount (event) {
1809
+ let money = event.target.value
1810
+ if (this.row.f_price_type === '固定气价') {
1811
+ let price = this.$refs.mix_price.model.f_price
1812
+ // 可以购买的总气量
1813
+ let purchaseSum = (money / price).toFixed(2)
1814
+ // 计算应抄底数
1815
+ this.should_base = (this.row.f_last_tablebase - 0) + (purchaseSum - 0)
1816
+ // 计算公式
1817
+ this.designFormulas = `${purchaseSum}X${price}`
1818
+ } else {
1819
+ let mydata = this.$refs.statir.mydata
1820
+ // 剩余1阶气量
1821
+ let surplus1 = (mydata.f_stair1ceiling - (mydata.f_hasuse1 > 0 ? mydata.f_hasuse1 : 0))
1822
+ // 把1阶买完的钱
1823
+ let price1 = surplus1 * mydata.f_stair1price
1824
+ // 剩余2阶气量
1825
+ let surplus2 = (mydata.f_stair2ceiling - mydata.f_stair1ceiling - (mydata.f_hasuse2 > 0 ? mydata.f_hasuse2 : 0)).toFixed(2)
1826
+ // 把2阶买完的钱
1827
+ let price2 = surplus2 * mydata.f_stair2price
1828
+ // 兼容一下
1829
+ if (this.$refs.statir.jt != 3) {
1830
+ this.$showMessage('暂不支持该气价类型的运算,请联系开发人员!')
1831
+ }
1832
+ // 开始计算
1833
+ // 可以购买各阶梯量
1834
+ let purchase1 = 0
1835
+ let purchase2 = 0
1836
+ let purchase3 = 0
1837
+ if (money <= price1) {
1838
+ purchase1 = (money / mydata.f_stair1price).toFixed(2)
1839
+ } else if (money <= (price1 + price2)) {
1840
+ purchase1 = surplus1
1841
+ purchase2 = ((money - price1) / mydata.f_stair2price).toFixed(2)
1842
+ } else {
1843
+ purchase1 = surplus1
1844
+ purchase2 = surplus2
1845
+ purchase3 = ((money - price1 - price2) / mydata.f_stair3price).toFixed(2)
1846
+ }
1847
+ // 可以购买的总气量
1848
+ let purchaseSum = (purchase1 - 0) + (purchase2 - 0) + (purchase3 - 0)
1849
+ // 计算应抄底数
1850
+ this.should_base = (this.row.f_last_tablebase - 0) + purchaseSum
1851
+ // 计算公式
1852
+ this.designFormulas = `${purchase1}X${mydata.f_stair1price} + ${purchase2}X${mydata.f_stair2price} + ${purchase3}X${mydata.f_stair3price}`
1853
+ }
1854
+ this.should_base = this.should_base.toFixed(2) - 0
1855
+ }
1856
+ },
1857
+ watch: {
1858
+ 'downModel.downWay' (val) {
1859
+ if (val === 'downWithSelf') {
1860
+ console.log('抄表员。。', this.inputtores2)
1861
+ if (this.inputtores2.length > 0) {
1862
+ this.downModel.downInputtor = [this.inputtores2[0].value]
1863
+ }
1864
+ }
1865
+ },
1866
+ 'detailsShow' (val) {
1867
+ if (!val) {
1868
+ this.should_base = 0
1869
+ this.designFormulas = null
1870
+ this.$els.inputmoney.value = 0
1871
+ }
1872
+ }
1873
+ // 'model.rows'(val){
1874
+ // console.log('页面切换',val)
1875
+ // if(this.isChooseAll(val)){
1876
+ // this.all = true
1877
+ // }else{
1878
+ // this.all = false
1879
+ // }
1880
+ // },
1881
+ },
1882
+ computed: {
1883
+ danhutitle () {
1884
+ return '单户抄表 当前计划年月:' + this.downModel.downDate
1885
+ },
1886
+ getCondition () {
1887
+ // return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr}
1888
+ return {
1889
+ startDate: this.$refs.paged.$refs.criteria.model.startDate,
1890
+ endDate: this.$refs.paged.$refs.criteria.model.endDate,
1891
+ orderitem: this.orderDefault ? this.orderDefault : 'id',
1892
+ condition: this.condition2
1893
+ }
1894
+ },
1895
+
1896
+ inputtores () {
1897
+ // 获取抄表员
1898
+ console.log('获取抄表员', this.$login.f)
1899
+ let rs = []
1900
+ if (this.$login.f.f_gasman.length > 0) {
1901
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
1902
+ let temp = {
1903
+ label: this.$login.f.f_gasman[i].name,
1904
+ value: this.$login.f.f_gasman[i].name
1905
+ }
1906
+ rs.push(temp)
1907
+ }
1908
+ }
1909
+ this.inputtores2 = rs
1910
+ return [...rs]
1911
+ },
1912
+ whetherpaies () {
1913
+ return [
1914
+ {label: '全部', value: ''},
1915
+ {label: '已缴费', value: '是'},
1916
+ {label: '未缴费', value: '否'}
1917
+ ]
1918
+ },
1919
+ // 界面细节权限
1920
+ jurisdiction () {
1921
+ console.log('抄表界面细节', this.$login.r)
1922
+ return this.$login.r ? this.$login.r : []
1923
+ },
1924
+ firestates () {
1925
+ return [
1926
+ {label: '全部', value: ''},
1927
+ {label: '已点火', value: '1'},
1928
+ {label: '未点火', value: '0'}
1929
+ ]
1930
+ },
1931
+ ischecked () {
1932
+ return function (row) {
1933
+ for (let plan of this.plans) {
1934
+ if (plan.id == row.f_userfiles_id) {
1935
+ return plan.state
1936
+ }
1937
+ }
1938
+ }
1939
+ }
1940
+ },
1941
+ events: {
1942
+ onFileUpload: async function (file, res) {
1943
+ if (this.upshow) {
1944
+ let uuid = this.guid()
1945
+ let data = {
1946
+ model: {
1947
+ f_operator: this.$login.f.name,
1948
+ f_end_date: this.$login.nextMonth20(this.$login.toStandardTimeString()),
1949
+ f_operatorid: this.$login.f.id,
1950
+ f_orgid: this.$login.f.orgid,
1951
+ f_orgname: this.$login.f.orgs,
1952
+ f_depid: this.$login.f.depids,
1953
+ f_depname: this.$login.f.deps
1954
+ },
1955
+ uuid: uuid,
1956
+ filepath: res.f_downloadpath
1957
+ }
1958
+ try {
1959
+ await this.HttpReset.load('POST', 'rs/logic/batchSettleFileupdate', data, {resolveMsg: null, rejectMsg: null}, 1000)
1960
+ } catch (e) {}
1961
+ this.$showAlert(`文件上传成功,正在后台批量结算, 请耐心等待结果......`, 'success')
1962
+ // 启动定时器定时查询上传结果
1963
+ let timer = setInterval(async () => {
1964
+ let res = await this.HttpReset.load('POST', 'rs/logic/getBatchOperaPro', {data: {uuid: uuid}}, {resolveMsg: null, rejectMsg: null})
1965
+ console.log('查询进度返回: ', res)
1966
+ if (res.data.msg || res.data.error) {
1967
+ res.data.msg ? this.$showAlert(`${res.data.msg}`, 'success', 2000) : this.$showAlert(`${res.data.error}`, 'danger')
1968
+ this.upshow = false
1969
+ this.search()
1970
+ clearInterval(timer)
1971
+ }
1972
+ }, 5000)
1973
+ return
1974
+ }
1975
+ let data = {
1976
+ model: {
1977
+ f_operator: this.$login.f.name,
1978
+ f_end_date: this.$login.nextMonth20(this.$login.toStandardTimeString())
1979
+ },
1980
+ filepath: res.path
1981
+ }
1982
+ if (res.f_downloadpath.includes('抄表数据')) {
1983
+ console.log('进入了抄表上传')
1984
+ let data1 = {
1985
+ filepath: res.f_downloadpath
1986
+ }
1987
+ this.$resetpost('rs/logic/upLoadHand', data1, {resolveMsg: null, rejectMsg: '上传失败'}, 0).then((res) => {
1988
+ // console.log('终于成功了', res)
1989
+ this.upshow = false
1990
+ // this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条, 未抄下发${res.data.nohandnum}条, 失败下发${res.data.failednum}条, 异常下发${res.data.exceptionnum}条`, 'success', 2000)
1991
+ // this.$parent.search()
1992
+ })
1993
+ } else if (data.filepath.includes('先锋')) {
1994
+ this.$resetpost('rs/logic/xfimport', data, {resolveMsg: null, rejectMsg: '上传失败'}, 0).then((res) => {
1995
+ // console.log('终于成功了', res)
1996
+ this.uploadshow = false
1997
+ this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条, 未抄下发${res.data.nohandnum}条, 失败下发${res.data.failednum}条, 异常下发${res.data.exceptionnum}条`, 'success', 2000)
1998
+ this.$parent.search()
1999
+ })
2000
+ } else if (data.filepath.includes('伦力')) {
2001
+ this.$resetpost('rs/logic/llimport', data, {resolveMsg: null, rejectMsg: '上传失败'}, 0).then((res) => {
2002
+ // console.log('终于成功了', res)
2003
+ this.uploadshow = false
2004
+ this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条, 未抄下发${res.data.nohandnum}条, 失败下发${res.data.failednum}条, 异常下发${res.data.exceptionnum}条`, 'success', 2000)
2005
+ this.$parent.search()
2006
+ })
2007
+ }
2008
+ },
2009
+ dblclick: function (row, index) {
2010
+ this.row = row
2011
+ this.detailsShow = true
2012
+ }
2013
+ }
2014
+ }
2015
+ </script>
2016
+ <style lang="less">
2017
+ #handManager {
2018
+ display: flex;
2019
+ justify-content: space-around;
2020
+ align-items: center;
2021
+
2022
+ .btn {
2023
+ margin: 0px;
2024
+ }
2025
+
2026
+ .hand-loading {
2027
+ border: 3px solid #ccc;
2028
+ border-right-color: #337ab7;
2029
+ border-radius: 50%;
2030
+ animation: spin 0.6s linear;
2031
+ position: absolute;
2032
+ animation-iteration-count: infinite;
2033
+ top: 0;
2034
+ right: 50%;
2035
+ z-index: 2;
2036
+ display: block;
2037
+ width: 28px;
2038
+ height: 28px;
2039
+ line-height: 28px;
2040
+ text-align: center;
2041
+ pointer-events: none;
2042
+ }
2043
+
2044
+ @keyframes spin {
2045
+ 100% {
2046
+ transform: rotate(360deg);
2047
+ }
2048
+ }
2049
+ .detail-panel {
2050
+ text-align: center;
2051
+ color: #31708f;
2052
+ background-color: #e8f1f9;
2053
+ border-color: #F2F6FA;
2054
+ }
2055
+ }
2056
+
2057
+ #hand_manager_grid {
2058
+ thead {
2059
+ position: relative;
2060
+ z-index: 2;
2061
+ }
2062
+ }
2063
+ #machineHandManager {
2064
+ .color-red {
2065
+ color: red;
2066
+ }
2067
+ }
2068
+ </style>