sale-client 4.0.66-preview → 4.0.67-preview

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.
@@ -19,6 +19,12 @@ var devConfig = {
19
19
  children: false // 不输出子模块构建信息
20
20
  },
21
21
  proxy: {
22
+ '/api/af-revenue/sql/getAuditMachineHand': {
23
+ pathRewrite: {
24
+ '/api/af-revenue/sql/getAuditMachineHand': '/rs/sql/getAuditMachineHand'
25
+ },
26
+ target: 'http://localhost:8080/'
27
+ },
22
28
  '/api/af-revenue/logic': {
23
29
  // pathRewrite: {
24
30
  // '/api/af-revenue/logic': '/logic'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.0.66-preview",
3
+ "version": "4.0.67-preview",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,809 @@
1
+ <template>
2
+ <div class="basic-main" style="height: 98%">
3
+ <div class="flex">
4
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
5
+ <criteria partial='criteria' v-ref:cri @condition-changed="$parent.selfSearch">
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <!--<div class="col-sm-6">-->
9
+ <!--style="border: 1px solid #a6d5ea; box-shadow: darkgrey 1px 1px 1px 2px;padding: 0.5%">-->
10
+ <div class="col-sm-2 form-group">
11
+ <label class="font_normal_body">下发日期</label>
12
+ <datepicker placeholder="开始日期"
13
+ style="width:60%"
14
+ class="datepicker"
15
+ v-model="model.startDate"
16
+ :value.sync="model.startDate"
17
+ condition="f_hand_date >='{} 00:00:00'"
18
+ :format="'yyyy-MM-dd'"
19
+ ></datepicker>
20
+ </div>
21
+ <div class="col-sm-2 form-group">
22
+ <label class="font_normal_body">&emsp;&emsp;至&emsp;</label>
23
+ <datepicker placeholder="结束日期"
24
+ style="width:60%"
25
+ v-model="model.endDate"
26
+ :value.sync="model.endDate"
27
+ condition="f_hand_date <='{} 23:59:59'"
28
+ :format="'yyyy-MM-dd'"
29
+ ></datepicker>
30
+ </div>
31
+
32
+ <div class="col-sm-2 form-group">
33
+ <label class="font_normal_body">客户编号</label>
34
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
35
+ condition="f_userinfo_code='{}'" placeholder='客户编号'>
36
+ </div>
37
+
38
+ <div class="span" style="float:right;">
39
+
40
+ <button class="button_search button_spacing" @click="$parent.$parent.search()">查询</button>
41
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
42
+ <export-excel
43
+ :data="{condition: $parent.$parent.excelCondition, orderitem: $parent.$parent.orderCondition}"
44
+ :field="$parent.$parent.fields"
45
+ sqlurl="api/af-revenue/logic/saleExport" progress="saleGetExportProgress" sql-name="getAuditMachineHand"
46
+ template-name='抄表审核导出'
47
+ :choose-col="true">
48
+ </export-excel>
49
+ <button class="button_search button_spacing width-60"
50
+ @click="$parent.$parent.allsuccess()" v-el:cx>全部通过</button>
51
+ <button class="button_search button_spacing width-60"
52
+ @click="$parent.$parent.allfaild()" v-el:cx>全部不通过</button>
53
+ <div
54
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
55
+ @click="$parent.$parent.hidden()" class="button_spacing" style="float: right"></div>
56
+ </div>
57
+ </div>
58
+ <div class="row" v-show="$parent.$parent.criteriaShow">
59
+ <!-- <div class="col-sm-2 form-group">-->
60
+ <!-- <label class="font_normal_body">表&ensp;编&ensp;号</label>-->
61
+ <!-- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_id"-->
62
+ <!-- condition="f_user_id='{}'" placeholder='表编号'>-->
63
+ <!-- </div>-->
64
+ <!-- <div class="col-sm-2 form-group">-->
65
+ <!-- <label class="font_normal_body">抄表状态</label>-->
66
+ <!-- <v-select :value.sync="model.f_audit_state"-->
67
+ <!-- class="select_list select"-->
68
+ <!-- v-model="model.f_audit_state"-->
69
+ <!-- style="width: 60%"-->
70
+ <!-- condition="f_meter_state = '{}'"-->
71
+ <!-- :options='$parent.$parent.auditState' placeholder='请选择'-->
72
+ <!-- close-on-select v-el:cc>-->
73
+ <!-- </v-select>-->
74
+ <!-- </div>-->
75
+ <div class="col-sm-2 form-group">
76
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
77
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meternumber"
78
+ condition="f_meternumber like '%{}%'" placeholder='表号'>
79
+ </div>
80
+ <div class="col-sm-2 form-group">
81
+ <label class="font_normal_body">客户姓名</label>
82
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name" placeholder='客户姓名'
83
+ condition="f_user_name = '{}'">
84
+ </div>
85
+ <div class="col-sm-2 form-group">
86
+ <label class="font_normal_body">小&ensp;&ensp;&ensp;&ensp;区</label>
87
+ <v-select :value.sync="model.f_residential_area"
88
+ class="select_list select"
89
+ enter-push
90
+ v-model="model.f_residential_area"
91
+ style="width: 60%"
92
+ multiple="true"
93
+ :options='$parent.$parent.residentialArea' placeholder='选择小区'
94
+ close-on-select v-el:cc>
95
+ </v-select>
96
+ </div>
97
+ <div class="col-sm-2 form-group">
98
+ <label class="font_normal_body">楼&emsp;&emsp;栋</label>
99
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_building"
100
+ condition="f_building = '{}'" placeholder='楼栋'>
101
+ </div>
102
+ <div class="col-sm-2 form-group">
103
+ <label class="font_normal_body">单&emsp;&emsp;元</label>
104
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_unit"
105
+ condition="f_unit = '{}'" placeholder='单元'>
106
+ </div>
107
+ <div class="col-sm-2 form-group">
108
+ <label class="font_normal_body">楼&emsp;&emsp;层</label>
109
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_floor"
110
+ condition="f_floor = '{}'" placeholder='楼层'>
111
+ </div>
112
+ <div class="col-sm-2 form-group">
113
+ <label class="font_normal_body">门&ensp;牌&ensp;号</label>
114
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_room"
115
+ condition="f_room like '%{}%'" placeholder='门牌号'>
116
+ </div>
117
+ <div class="col-sm-2 form-group">
118
+ <label class="font_normal_body">客户地址</label>
119
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
120
+ condition="f_address like '%{}%'" placeholder='客户地址'>
121
+ </div>
122
+ <div class="col-sm-2 form-group">
123
+ <label class="font_normal_body">抄&ensp;表&ensp;员</label>
124
+ <v-select :value.sync="model.f_inputtor" v-model='model.f_inputtor'
125
+ style="width:60%"
126
+ multiple="true"
127
+ :options='$parent.$parent.inputtores' placeholder='抄表员'
128
+ close-on-select
129
+ v-el:cc></v-select>
130
+ </div>
131
+
132
+ <div class="col-sm-2 form-group">
133
+ <label class="font_normal_body">客户类型</label>
134
+ <v-select :value.sync="model.f_user_type" v-model="model.f_user_type"
135
+ :options='$parent.$parent.usertypes' placeholder='客户类型'
136
+ style="width:60%"
137
+ close-on-select
138
+ condition="f_user_type = '{}'"></v-select>
139
+ </div>
140
+ <div class="col-sm-2 form-group">
141
+ <label class="font_normal_body">用户等级</label>
142
+ <v-select :value.sync="model.f_user_level" v-model="model.f_user_level"
143
+ :options='$parent.$parent.userlevels' placeholder='用户等级'
144
+ style="width:60%"
145
+ close-on-select
146
+ condition="f_user_level = '{}'"></v-select>
147
+ </div>
148
+ <div class="col-sm-2 form-group">
149
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
150
+ <v-select :value.sync="model.f_meter_book" v-model="model.f_meter_book"
151
+ :options='$parent.$parent.meterbooks' placeholder='抄表册'
152
+ style="width:60%"
153
+ :multiple="true"
154
+ condition="f_meter_book_num in {}"></v-select>
155
+ </div>
156
+ <div class="col-sm-2 flex-row" style="white-space: nowrap" >
157
+ <label class="font_normal_body">应交气量</label>
158
+ <div class="row">
159
+ <input type="text" style="width:30%" class="input_search" v-model="model.oughtamountmin"
160
+ condition="f_oughtamount >= {} " placeholder="">
161
+ <label class="font_normal_body"> ≤ x ≤ </label>
162
+ <input type="text" style="width:30%" class="input_search" v-model="model.oughtamountmax"
163
+ condition="f_oughtamount <= {} " placeholder="">
164
+ </div>
165
+ </div>
166
+ <!-- <div class="col-sm-2 form-group">-->
167
+ <!-- <label class="font_normal_body">审核状态</label>-->
168
+ <!-- <v-select :value.sync="model.f_audit_state_1"-->
169
+ <!-- class="select_list select"-->
170
+ <!-- v-model="model.f_audit_state_1"-->
171
+ <!-- style="width: 60%"-->
172
+ <!-- condition="f_audit_state = '{}'"-->
173
+ <!-- :options='$parent.$parent.auditState1' placeholder='请选择'-->
174
+ <!-- close-on-select v-el:cc>-->
175
+ <!-- </v-select>-->
176
+ <!-- </div>-->
177
+ <!-- <div class="col-sm-2 form-group">-->
178
+ <!-- <label class="font_normal_body">调压箱名</label>-->
179
+ <!-- <v-select :value.sync="model.f_adjustable_name" v-model="model.f_adjustable_name"-->
180
+ <!-- :options='$parent.$parent.adjustablename' placeholder='调压箱名称'-->
181
+ <!-- style="width:60%"-->
182
+ <!-- close-on-select-->
183
+ <!-- condition="f_adjustable_name = '{}'"></v-select>-->
184
+ <!-- </div>-->
185
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes"
186
+ v-ref:sel></res-select-group>
187
+ <div class="form-group col-sm-2">
188
+ <label class="font_normal_body">气价名称</label>
189
+ <v-select id="f_price_name"
190
+ v-model="model.price_name"
191
+ placeholder='气价名称'
192
+ style="width: 60%"
193
+ :value.sync="model.price_name"
194
+ :options='$parent.$parent.priceNames'
195
+ condition="f_price_name = '{}'"
196
+ close-on-select></v-select>
197
+ </div>
198
+ </div>
199
+
200
+ </div>
201
+ </criteria>
202
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid id="hand_manager_grid" :optional="true">
203
+ <template partial='head'>
204
+ <tr>
205
+ <th> <nobr>审核</nobr></th>
206
+ <!--<th><input type='checkbox' v-model="$parent.$parent.$parent.all" @change="$parent.$parent.$parent.chooseAll"></th>-->
207
+ <th>
208
+ <nobr>序号</nobr>
209
+ </th>
210
+ <th>
211
+ <nobr>客户编号
212
+ <!-- <data-order field="f_userinfo_code" name="客户编号"-->
213
+ <!-- :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>-->
214
+ </nobr>
215
+ </th>
216
+ <!-- <th>-->
217
+ <!-- <nobr>表编号</nobr>-->
218
+ <!-- </th>-->
219
+ <!-- <th>基本信息</th>-->
220
+ <th>
221
+ <nobr>
222
+ 基本信息
223
+ <!-- <data-order field="f_address" name="基本信息"-->
224
+ <!-- :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>-->
225
+ </nobr>
226
+ </th>
227
+ <th>
228
+ <nobr>用户等级</nobr>
229
+ </th>
230
+ <!--<th><nobr><data-order field="f_building" name="楼号"-->
231
+ <!--:order.sync="$parent.$parent.$parent.orderFields.f_building"></data-order></nobr>-->
232
+ <!--</th>-->
233
+ <!--<th><nobr><data-order field="f_unit" name="单元号"-->
234
+ <!--:order.sync="$parent.$parent.$parent.orderFields.f_unit"></data-order></nobr>-->
235
+ <!--</th>-->
236
+ <!--<th><nobr><data-order field="f_room" name="房号"-->
237
+ <!--:order.sync="$parent.$parent.$parent.orderFields.f_room"></data-order></nobr>-->
238
+ <!--</th>-->
239
+ <th>
240
+ <nobr>上期结余</nobr>
241
+ </th>
242
+ <!-- <th>-->
243
+ <!-- <nobr>平均用气量</nobr>-->
244
+ <!-- </th>-->
245
+ <th>
246
+ <nobr>表号</nobr>
247
+ </th>
248
+ <th>
249
+ <nobr>上期底数</nobr>
250
+ </th>
251
+ <th>
252
+ <nobr>本期底数</nobr>
253
+ </th>
254
+ <th>
255
+ <data-order field="f_oughtamount" name="日均用气量"></data-order>
256
+ </th>
257
+ <th>
258
+ <nobr>应交气量</nobr>
259
+ </th>
260
+ <th>
261
+ <nobr>增量值</nobr>
262
+ </th>
263
+ <!--增加应交金额-->
264
+ <th>
265
+ <nobr>应交金额</nobr>
266
+ </th>
267
+ <th>
268
+ <nobr>抄表结果状态</nobr>
269
+ </th>
270
+ <!-- <th>上次抄表日期</th>-->
271
+ <th>
272
+ <nobr>
273
+ 上次抄表录入日期
274
+ <!-- <data-order field="f_last_input_date" name="上次抄表录入日期"-->
275
+ <!-- :order.sync="$parent.$parent.$parent.orderFields.f_last_input_date"></data-order>-->
276
+ </nobr>
277
+ </th>
278
+ <!-- <th>下发日期</th>-->
279
+ <th>
280
+ <nobr>下发日期
281
+ <!-- <data-order field="f_hand_date" name="下发日期"-->
282
+ <!-- :order.sync="$parent.$parent.$parent.orderFields.f_hand_date"></data-order>-->
283
+ </nobr>
284
+ </th>
285
+ <!-- <th>抄表日期</th>-->
286
+ <th>
287
+ <nobr>抄表录入日期
288
+ <!-- <data-order field="f_input_date" name="抄表录入日期"-->
289
+ <!-- :order.sync="$parent.$parent.$parent.orderFields.f_input_date"></data-order>-->
290
+ </nobr>
291
+ </th>
292
+ <!-- <th>抄表册</th>-->
293
+ <th>
294
+ <nobr>抄表册
295
+ <!-- <data-order field="f_book_name" name="抄表册"-->
296
+ <!-- :order.sync="$parent.$parent.$parent.orderFields.f_book_name"></data-order>-->
297
+ </nobr>
298
+
299
+ </th>
300
+ <th>
301
+ <nobr>调压箱名称</nobr>
302
+ </th>
303
+ <th>
304
+ <nobr>抄表员</nobr>
305
+ </th>
306
+ <th><nobr>附件</nobr></th>
307
+ <!-- <th><nobr>附件</nobr></th>-->
308
+ <!-- f_oughtfee-->
309
+ </tr>
310
+ </template>
311
+ <template partial='body'>
312
+ <td style="text-align: center;" class="row auto">
313
+ <nobr>
314
+ <button type="button" name="button" class="button_search button_spacing width-60"
315
+ @click.stop="$parent.$parent.$parent.pass(row)"
316
+ v-if="row.f_meter_state === '待审核'">通过
317
+ </button>
318
+
319
+ <button type="button" name="button" class="button_search button_spacing width-60"
320
+ @click.stop="$parent.$parent.$parent.nopass(row)"
321
+ v-if="row.f_meter_state === '待审核' ">不通过
322
+ </button>
323
+ </nobr>
324
+ </td>
325
+ <!--<td style="text-align: center;">-->
326
+ <!--<input v-if="row.f_meter_state === '未下发'"-->
327
+ <!--:id="model.pageIndex" type='checkbox' @change="$parent.$parent.$parent.chooseOne($event,row,model.rows)"-->
328
+ <!--:checked="$parent.$parent.$parent.ischecked(row)"/>-->
329
+ <!--</td>-->
330
+ <td style="text-align: center;">{{$index + 1}}</td>
331
+ <td>{{row.f_userinfo_code}}</td>
332
+ <!-- <td>{{row.f_user_id}}</td>-->
333
+ <td> <nobr>{{row.f_user_name}}&nbsp;&nbsp;{{row.f_address}} </nobr></td>
334
+ <td>{{row.f_user_level}}</td>
335
+ <!--<td>{{row.f_building}}</td>-->
336
+ <!--<td>{{row.f_unit}}</td>-->
337
+ <!--<td>{{row.f_room}}</td>-->
338
+ <td>{{row.f_balance}}</td>
339
+ <!-- <td style="text-align: center;">{{Math.round(row.avggas)}}</td>-->
340
+ <td>{{row.f_meternumber}}</td>
341
+ <td>{{row.f_meter_base}}</td>
342
+ <td id="hand-creat" style="display: flex;justify-content: space-between;align-items: center">
343
+ <b>{{row.f_tablebase}}</b>
344
+ <button type="button" name="button" class="button_search button_spacing width-60"
345
+ @click.stop="$parent.$parent.$parent.amend(row)">修正
346
+ </button>
347
+ </td>
348
+ <td style="text-align: center;">{{ row.f_oughtamount && $parent.$parent.$parent.dateDiff ? (row.f_oughtamount / $parent.$parent.$parent.dateDiff).toFixed(2) : 0 }}</td>
349
+ <td style="text-align: center;">{{row.f_oughtamount}}</td>
350
+ <td style="text-align: center;">{{row.f_adjustment_volume}}</td>
351
+ <td style="text-align: center;">{{row.f_oughtfee}}</td>
352
+ <td>{{row.f_result_state}}</td>
353
+ <td><nobr>{{row.f_last_input_date}}</nobr></td>
354
+ <td><nobr>{{row.f_hand_date}}</nobr></td>
355
+ <td><nobr>{{row.f_input_date}}</nobr></td>
356
+ <td> <nobr>{{row.f_book_name}} </nobr></td>
357
+ <td>{{row.f_adjustable_name}}</td>
358
+ <td>{{row.f_inputtor}}</td>
359
+ <td style="text-align: center;"><nobr>
360
+ <img-self :src="row.f_handplan_image" v-if="row.f_handplan_image" :width="50" :height="50"></img-self>
361
+
362
+ <!-- <button v-if="row.is_has_file=='是'" class="btn btn-link" @click.stop="$parent.$parent.$parent.view(row)">查看</button>-->
363
+ <button v-if="row.f_notified_path" class="btn btn-link" @click.stop="$parent.$parent.$parent.imgShow(row.f_notified_path)">图像识别</button>
364
+ </nobr></td>
365
+ </template>
366
+ </data-grid>
367
+ </criteria-paged>
368
+ <!-- <table class="table-hover">-->
369
+ <!-- <tr style="position: relative" class="table-bordered">-->
370
+ <!-- <td-->
371
+ <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">-->
372
+ <!-- 汇总信息-->
373
+ <!-- </td>-->
374
+ <!-- <td-->
375
+ <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">-->
376
+ <!-- 支付宝金额汇总:&emsp;{{sumsmodel.f_total_charge}}-->
377
+ <!-- </td>-->
378
+ <!-- <td-->
379
+ <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">-->
380
+ <!-- 收费金额汇总:&emsp;{{sumsmodel.f_collection}}-->
381
+ <!-- </td>-->
382
+ <!-- <td-->
383
+ <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">-->
384
+ <!-- 差额汇总:&emsp;{{((sumsmodel.f_total_charge -0) - (sumsmodel.f_collection -0)).toFixed(2)}}-->
385
+ <!-- </td>-->
386
+ <!-- </tr>-->
387
+ <!-- </table>-->
388
+ </div>
389
+ </div>
390
+ <modal :show.sync="imgshow" v-ref:modal backdrop="true">
391
+ <header slot="modal-header" class="modal-header">
392
+ 抄表图像识别照片
393
+ </header>
394
+ <article slot="modal-body" class="modal-body">
395
+ <div class="from-group">
396
+ <img-self :src="imgfilename" width="500" height="500"></img-self>
397
+ </div>
398
+ </article>
399
+ <footer slot="modal-footer" class="modal-footer">
400
+ <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
401
+ </footer>
402
+ </modal>
403
+ </template>
404
+ <script>
405
+ import {HttpResetClass, PagedList} from 'vue-client'
406
+ import Vue from 'vue'
407
+ import * as Util from '../../Util'
408
+
409
+ let readyGen = async function (self) {
410
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStartAndEndDateString()[0]
411
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
412
+ await self.$LoadParams.loadMeterBook(self.f_filialeid)
413
+ self.loadMeterBooks()
414
+ self.getaddress()
415
+ await self.$LoadParams.loadParam(self.f_filialeid)
416
+ self.getPricenames()
417
+ }
418
+
419
+ export default {
420
+ title: '机表抄表审核',
421
+ data () {
422
+ return {
423
+ orderDefault: "'id'",
424
+ orderFields: {
425
+ f_userinfo_code: 'no'
426
+ },
427
+ // 请求对象(批量导入,查询进度使用)
428
+ HttpReset: new HttpResetClass(),
429
+ timer: null,
430
+ model: new PagedList('api/af-revenue/sql/getAuditMachineHand', 50, {orderitem: "'id'"}),
431
+ initres: {
432
+ org: [this.$login.f.orgid],
433
+ dep: [],
434
+ user: []
435
+ },
436
+ config: {
437
+ examine: false
438
+ },
439
+ imgfilename: '',
440
+ // 小区
441
+ residentialArea: [],
442
+ inputtouPerson: [],
443
+ imgshow: false,
444
+ criteriaShow: false,
445
+ orgCondtionStr: '',
446
+ excelCondition: '',
447
+ orderCondition: '',
448
+ fields: {
449
+ 'f_userinfo_code': '客户编号',
450
+ 'f_user_name': '客户名称',
451
+ 'f_address': '客户地址',
452
+ 'f_user_level': '用户等级',
453
+ 'f_balance': '上期结余',
454
+ 'f_meternumber': '表号',
455
+ 'f_meter_base': '上期底数',
456
+ 'f_tablebase': '本期底数',
457
+ 'f_oughtamount': '应交气量',
458
+ 'f_adjustment_volume': '增量值',
459
+ 'f_oughtfee': '应交金额',
460
+ 'f_result_state': '抄表结果状态',
461
+ 'f_last_input_date': '上次抄表录入日期',
462
+ 'f_hand_date': '下发日期',
463
+ 'f_input_date': '抄表录入日期',
464
+ 'f_book_name': '抄表册',
465
+ 'f_adjustable_name': '调压箱名称',
466
+ 'f_inputtor': '抄表员'
467
+ },
468
+ auditState: [{label: '全部', value: ''}, {label: '已审核', value: '已抄表'}, {label: '未审核', value: '待审核'}],
469
+ auditState1: [{label: '全部', value: ''}, {label: '审核失败', value: '审核失败'}],
470
+ meters: [{label: '全部', value: ''}, {label: '机表', value: '机表'}, {label: '物联网表', value: '物联网表'}],
471
+ resultstate: this.$appdata.getParam('抄表结果状态'),
472
+ meterstates: this.$appdata.getParam('抄表状态') ? [{
473
+ label: '全部',
474
+ value: ''
475
+ }, ...this.$appdata.getParam('抄表状态')] : [],
476
+ usertypes: this.$appdata.getParam('客户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('客户类型')] : [],
477
+ userlevels: this.$appdata.getParam('用户等级') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户等级')] : [],
478
+ adjustablename: this.$appdata.getParam('调压箱名称') ? [{
479
+ label: '全部',
480
+ value: ''
481
+ }, ...this.$appdata.getParam('调压箱名称')] : [],
482
+ meterbooks: [],
483
+ f_filialeid: this.$login.f.orgid,
484
+ priceNames: [],
485
+ // 公司下拉
486
+ curorgid: [this.$login.f.orgid]
487
+ }
488
+ },
489
+ props: [],
490
+ beforeDestroy () {
491
+ // 销毁定时器
492
+ if (this.timer) clearInterval(this.timer)
493
+ },
494
+ ready () {
495
+ this.model.pageSizeMax = 9999999
496
+ readyGen(this)
497
+ },
498
+ methods: {
499
+ getPricenames () {
500
+ let filialeid = this.f_filialeid
501
+ let result = [{label: '全部', value: ''}]
502
+ console.log('this.$GetSaleParam.prices', this.$GetSaleParam)
503
+ console.log('filialeid', filialeid)
504
+ this.$GetSaleParam.prices.forEach((item) => {
505
+ if (item.f_state === '有效' && filialeid == item.f_filialeid) {
506
+ let value = {
507
+ label: item.f_price_name,
508
+ value: item
509
+ }
510
+ result.push(value)
511
+ }
512
+ })
513
+ this.priceNames = Array.from(new Set(result))
514
+ },
515
+ // 修正本期底数
516
+ amend (row) {
517
+ let tablebase = window.prompt('请输入你要修正的底数值,上期底数:' + row.f_meter_base)
518
+ if (!tablebase) return
519
+ if (tablebase < 0) {
520
+ this.$showAlert(`底数不能小于0,请注意!`, 'warning', 2000)
521
+ return
522
+ } else if (tablebase - parseInt(tablebase) !== 0) {
523
+ this.$showAlert(`底数只能输入整数,请注意!`, 'warning', 2000)
524
+ return
525
+ } else if (tablebase < row.f_last_tablebase && !row.f_capacity) {
526
+ this.$showAlert(`本期表底数不能低于上期表底数`, 'warning', 2000)
527
+ return
528
+ } else {
529
+ if (tablebase < row.f_last_tablebase) {
530
+ this.$showMessage('本次抄表已超越最大量程, 请熟知!')
531
+ }
532
+ }
533
+ let oughtamount = null
534
+ if (tablebase) {
535
+ if (row.f_share_gas) {
536
+ oughtamount = (tablebase - 0 - (row.f_last_tablebase - 0)).toFixed(4) + (row.f_share_gas > 0 ? '+' : '') + row.f_share_gas.toFixed(2)
537
+ } else {
538
+ if (row.f_capacity && row.f_capacity > 0 && tablebase < row.f_last_tablebase) {
539
+ oughtamount = (tablebase - 0 + (row.f_capacity - row.f_last_tablebase)).toFixed(2)
540
+ } else {
541
+ oughtamount = (tablebase - 0 - (row.f_last_tablebase - 0)).toFixed(2)
542
+ }
543
+ }
544
+ } else {
545
+ oughtamount = 0
546
+ }
547
+ let handplan = {
548
+ id: row.id,
549
+ f_tablebase: tablebase,
550
+ f_oughtamount: oughtamount
551
+ }
552
+ this.$resetpost('api/af-revenue/entity/save/t_handplan', handplan, {resolveMsg: '修正成功', rejectMsg: '抄表数据修正出错!!!'}).then((res) => {
553
+ row.f_tablebase = tablebase
554
+ row.f_oughtamount = oughtamount
555
+ })
556
+ },
557
+ async allsuccess () {
558
+ let res = await this.$showMessage('确定通过全部抄表吗?操作后将不可取消', ['confirm', 'cancel'])
559
+ let condition = []
560
+ let uuid = this.$login.guid()
561
+ if (res === 'confirm') {
562
+ let rowdata = this.$refs.paged.$refs.grid.getRowData()
563
+ if (rowdata.length > 0) {
564
+ for (let i = 0; i < rowdata.length; i++) {
565
+ let temp = {
566
+ f_hand_id: rowdata[i].id,
567
+ // 本次表底数
568
+ f_tablebase: rowdata[i].f_tablebase,
569
+ // 表类型
570
+ f_meter_classify: rowdata[i].f_meter_classify,
571
+ // 气表品牌
572
+ f_meter_brand: rowdata[i].f_meter_brand
573
+ }
574
+ condition.push(temp)
575
+ }
576
+ let data = {
577
+ uuid: uuid,
578
+ condition: condition,
579
+ f_audit_person: this.$login.f.name
580
+ }
581
+ try {
582
+ this.$resetpost('api/af-revenue/handPlanAudit/allAudit', data, {resolveMsg: null, rejectMsg: null}, 500)
583
+ } catch (e) {}
584
+ } else {
585
+ let data = {
586
+ uuid: uuid,
587
+ sqlName: 'getAuditMachineHand',
588
+ condition: this.excelCondition,
589
+ data: {
590
+ condition: this.excelCondition
591
+ },
592
+ f_audit_person: this.$login.f.name
593
+ }
594
+ try {
595
+ this.$resetpost('api/af-revenue/handPlanAudit/allAuditByCondition', data, {resolveMsg: null, rejectMsg: null}, 500)
596
+ } catch (e) {}
597
+ }
598
+ this.$showMessage(`正在批量处理中, 请耐心等待...`, [])
599
+ // 启动定时器定时查询处理结果
600
+ this.timer = setInterval(async () => {
601
+ let res = await this.HttpReset.load('POST', 'api/af-revenue/logic/getBatchOperaPro', {data: {uuid: uuid}}, {resolveMsg: null, rejectMsg: null})
602
+ this.$showMessage(`正在批量处理中, 请耐心等待>>>${res.data.n}/${rowdata.length}`, [])
603
+ if (res.data.msg || res.data.error) {
604
+ clearInterval(this.timer)
605
+ this.$closeMessage()
606
+ if (res.data.error) {
607
+ this.$showAlert(`${res.data.error}`, 'danger')
608
+ return
609
+ }
610
+ await this.$showMessage(`审核总条数: ${res.data.sum}, 成功${res.data.success}条, 失败${res.data.fail}条`)
611
+ this.search()
612
+ }
613
+ }, 5000)
614
+ }
615
+ },
616
+ async allfaild () {
617
+ let res = await this.$showMessage('确定作废全部抄表吗?操作后将不可取消', ['confirm', 'cancel'])
618
+ let condition = '('
619
+ if (res === 'confirm') {
620
+ let rowdata = this.$refs.paged.$refs.grid.getRowData()
621
+ if (rowdata.length > 0) {
622
+ for (let i = 0; i < rowdata.length; i++) {
623
+ condition += `'` + rowdata[i].id + `',`
624
+ }
625
+ condition = condition.substring(0, condition.length - 1)
626
+ condition += ')'
627
+ let sql = `UPDATE t_handplan SET f_oughtamount=0,f_tablebase=0,f_input_date=null,f_meter_source=null,f_audit_person = '${this.$login.f.name}',f_audit_date = getDate(),f_meter_state = '未抄表' WHERE id in ${condition}`
628
+ await this.$resetpost('api/af-revenue/logic/runSQL', {sql: sql}, {resolveMsg: '操作成功', rejectMsg: '操作失败'})
629
+ this.search()
630
+ } else {
631
+ this.$showMessage('暂无数据,无法作废当前所有抄表')
632
+ }
633
+ }
634
+ },
635
+ hidden () {
636
+ this.criteriaShow = !this.criteriaShow
637
+ },
638
+ getRes (obj) {
639
+ this.orgCondtionStr = obj
640
+ },
641
+ view (row) {
642
+ this.$parent.showupload = true
643
+ this.$parent.row = row
644
+ },
645
+ imgclose () {
646
+ this.imgshow = false
647
+ },
648
+ imgShow (val) {
649
+ this.imgfilename = `rs/image/file/` + val
650
+ this.imgshow = true
651
+ },
652
+ async getaddress () {
653
+ let HttpReset = new HttpResetClass()
654
+ var data = await HttpReset.load('POST', 'api/af-revenue/sql/manage_getarealist', {
655
+ data: {
656
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
657
+ }
658
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
659
+ console.log('小区', data)
660
+ let house = []
661
+ house.push()
662
+ for (let row of data.data) {
663
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
664
+ }
665
+ this.residentialArea = house
666
+ },
667
+ search () {
668
+ this.$refs.paged.$refs.cri.search()
669
+ },
670
+ clear () {
671
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
672
+ this.$refs.paged.$refs.cri.model[key] = []
673
+ })
674
+ },
675
+ selfSearch (args) {
676
+ if (!this.orgCondtionStr) {
677
+ args.condition = `${args.condition}` + ' and f_orgid = ' + this.$login.f.orgid
678
+ } else {
679
+ args.condition = `${args.condition}` + this.orgCondtionStr
680
+ }
681
+ // 抄表员查询条件
682
+ this.inputtouPerson = this.$refs.paged.$refs.cri.model.f_inputtor
683
+ if (this.inputtouPerson.length !== 0) {
684
+ let str = JSON.stringify(this.inputtouPerson)
685
+ str = str.replace(/"/g, `'`)
686
+ str = str.replace(/\[/g, ``)
687
+ str = str.replace(/\]/g, ``)
688
+ // 查询多个抄表员时条件
689
+ args.condition += ` and f_inputtor in ( ${str} )`
690
+ }
691
+ this.excelCondition = args.condition
692
+ this.orderCondition = this.model.paramSource.orderitem.split("'")[1].split("'")[0]
693
+ this.$refs.paged.$refs.grid.selectInit()
694
+ this.model.search(args.condition, args.model)
695
+ },
696
+ pass (row) {
697
+ let param = {
698
+ f_meter_classify: row.f_meter_classify,
699
+ f_meter_brand: row.f_meter_brand,
700
+ f_hand_id: row.id,
701
+ f_operator: Vue.$login.f.name,
702
+ f_tablebase: row.f_tablebase,
703
+ f_userinfo_id: row.f_userinfo_id,
704
+ f_audit_person: Vue.$login.f.name,
705
+ f_adjustment_volume: row.f_adjustment_volume
706
+ }
707
+ this.$resetpost('api/af-revenue/logic/sale_commonEnter', {data: param}, {resolveMsg: null, rejectMsg: null}).then((res) => {
708
+ row.f_meter_state = res.data.f_meter_state
709
+ row.f_whether_pay = res.data.f_whether_pay
710
+ row.f_oughtfee = res.data.f_oughtfee
711
+ // this.$resetpost('api/af-revenue/logic/getMeterSms', {data: param}, {resolveMsg: null, rejectMsg: null}).then((res) => {
712
+ // this.search()
713
+ let f_result_state = '正常'
714
+ if (row.f_result_state && row.f_result_state != '') {
715
+ f_result_state = row.f_result_state
716
+ }
717
+ let f_input_date = ''
718
+ // if (row.f_input_date && row.f_input_date != '') {
719
+ // f_input_date = ` ,f_input_date = '${row.f_input_date}'`
720
+ // }
721
+ let sqldata = `update t_handplan set f_result_state = '${f_result_state}' ${f_input_date} where id = '${row.id}'`
722
+ this.$resetpost('api/af-revenue/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: '业务单号保存失败'})
723
+ // }).catch((error) => {
724
+ // row.state = '失败'
725
+ // Vue.set(row, 'error', JSON.stringify(error))
726
+ // this.speckText('抄表出错,请注意!')
727
+ // })
728
+ this.search()
729
+ }).catch((error) => {
730
+ row.state = '失败'
731
+ Vue.set(row, 'error', JSON.stringify(error))
732
+ Vue.showAlert(`审核失败: ${JSON.stringify(error)}`, 'danger', 0)
733
+ this.speckText('抄表出错,请注意!')
734
+ })
735
+ },
736
+ nopass (row) {
737
+ console.log('不通过。。。', row)
738
+ let handplan = {
739
+ id: row.id,
740
+ f_oughtamount: 0,
741
+ f_tablebase: 0,
742
+ f_input_date: null,
743
+ f_meter_state: '未抄表',
744
+ f_meter_source: null,
745
+ f_audit_person: Vue.$login.f.name
746
+ }
747
+ this.$resetpost('api/af-revenue/entity/save/t_handplan', handplan, {
748
+ resolveMsg: null,
749
+ rejectMsg: '未通过,抄表数据返回未抄表保存出错!!!'
750
+ }).then((res) => {
751
+ this.search()
752
+ })
753
+ },
754
+ loadMeterBooks () {
755
+ this.meterbooks = this.$GetSaleParam.getMeterBooks()
756
+ },
757
+ sort (field, rule) {
758
+ // 将所有排序方式设为不排序,实现相互排斥
759
+ for (let key in this.orderFields) {
760
+ if (key === field) {
761
+ this.orderFields[key] = rule
762
+ } else {
763
+ this.orderFields[key] = 'no'
764
+ }
765
+ }
766
+ // 如果新规则不排序,还原为默认排序
767
+ if (rule === 'no') {
768
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
769
+ } else {
770
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
771
+ }
772
+
773
+ this.search()
774
+ }
775
+
776
+ },
777
+ computed: {
778
+ dateDiff () {
779
+ if (this.$refs.paged.$refs.cri.model.startDate && this.$refs.paged.$refs.cri.model.endDate) {
780
+ const startDate = new Date(this.$refs.paged.$refs.cri.model.startDate)
781
+ const endDate = new Date(this.$refs.paged.$refs.cri.model.endDate)
782
+ // 计算日期差值,+1是因为日期包括开始和结束日期
783
+ const diffTime = endDate - startDate
784
+ return Math.ceil(diffTime / (1000 * 3600 * 24)) + 1 // 返回天数
785
+ }
786
+ return 0 // 默认返回0天
787
+ },
788
+ inputtores () {
789
+ // 获取抄表员
790
+ console.log('获取抄表员', this.$login.f)
791
+ let rs = []
792
+ if (this.$login.f.f_gasman.length > 0) {
793
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
794
+ let temp = {
795
+ label: this.$login.f.f_gasman[i].name,
796
+ value: this.$login.f.f_gasman[i].name
797
+ }
798
+ rs.push(temp)
799
+ }
800
+ }
801
+ this.inputtores2 = rs
802
+ return [...rs]
803
+ }
804
+ },
805
+ watch: {
806
+
807
+ }
808
+ }
809
+ </script>
@@ -30,4 +30,6 @@ export default function () {
30
30
  Vue.component('iot-refund', (resolve) => { require(['./IOTRefund'], resolve) })
31
31
  // 当前选择用户的用户基本信息
32
32
  Vue.component('sale-userinfo', (resolve) => { require(['./Userinfo'], resolve) })
33
+ // 机表抄表审核
34
+ Vue.component('machine-hand-audit', (resolve) => { require(['./machineHandAudit'], resolve) })
33
35
  }