sale-client 4.2.75 → 4.2.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/build/dev-server.js +52 -30
  2. package/index.html +7 -2
  3. package/package.json +1 -1
  4. package/src/App.vue +1 -1
  5. package/src/components/charge/business/IOTMeterCenter.vue +3 -2
  6. package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
  7. package/src/components/revenue/comprehen/ComprehenOperation/QrPay/QrPaymentDetailed.vue +423 -423
  8. package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
  9. package/src/components/revenue/machineHandManage/ArrearsQuery.vue +938 -938
  10. package/src/filiale/alashan/business/IOTMeterCenter.vue +1 -1
  11. package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
  12. package/src/filiale/bayan/ChargeList.vue +1010 -1010
  13. package/src/filiale/bayan/StockListmain.vue +543 -543
  14. package/src/filiale/bazhong/UserInfoDetailManageNew.vue +245 -245
  15. package/src/filiale/bazhong/ic_detail/ChangeMeterQueryUser.vue +370 -370
  16. package/src/filiale/bazhong/sale.js +8 -8
  17. package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
  18. package/src/filiale/fugou/IOTMeterCenter.vue +904 -0
  19. package/src/filiale/fugou/sale.js +2 -0
  20. package/src/filiale/jiaxian/IOTMeterCenter.vue +1 -1
  21. package/src/filiale/jingyang/charge/IOTMeterCenter.vue +1 -1
  22. package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
  23. package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
  24. package/src/filiale/lixianV3/components/charge/IOTMeterCenter.vue +1 -1
  25. package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
  26. package/src/filiale/qianneng/machine/IOTMeterCenter.vue +1 -1
  27. package/src/filiale/qingtongxia/IOTMeterCenter.vue +1 -1
  28. package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
  29. package/src/filiale/ronghao/CardService.js +2144 -2144
  30. package/src/filiale/ronghao/InsuranceManage.vue +58 -58
  31. package/src/filiale/ronghao/MachineChargeService.js +149 -149
  32. package/src/filiale/ronghao/NoCardMeterCenter.vue +534 -534
  33. package/src/filiale/ronghao/PaymentCode.vue +174 -174
  34. package/src/filiale/ronghao/PriceChangeCompensation/CompensationManage.vue +26 -26
  35. package/src/filiale/ronghao/PriceChangeCompensation/IotCompensation.vue +318 -318
  36. package/src/filiale/ronghao/PriceChangeCompensation/JbCompensation.vue +343 -343
  37. package/src/filiale/ronghao/PriceChangeCompensation/SurplusRecordDetail.vue +74 -74
  38. package/src/filiale/ronghao/ReplaceCardManage.vue +415 -415
  39. package/src/filiale/ronghao/Upload.vue +654 -654
  40. package/src/filiale/ronghao/cardDown.vue +1141 -1141
  41. package/src/filiale/ronghao/changemeterOperate.vue +315 -315
  42. package/src/filiale/ronghao/fillgasSpecific.vue +313 -313
  43. package/src/filiale/ronghao/ic_detail/ChargeRecordQuery.vue +106 -106
  44. package/src/filiale/ronghao/ic_detail/WatchCollection.vue +115 -115
  45. package/src/filiale/ronghao/ic_detail/WebHandQueryUser.vue +411 -411
  46. package/src/filiale/ronghao/machineDown.vue +1176 -1176
  47. package/src/filiale/ronghao/replacementSingleInfoOperation.vue +315 -315
  48. package/src/filiale/ronghao/specificInformation.vue +537 -537
  49. package/src/filiale/ruihua/IOTMeterCenter.vue +1 -1
  50. package/src/filiale/shimen/IOTMeterCenter.vue +1 -1
  51. package/src/filiale/shiquan/charge/IOTMeterCenter.vue +1 -1
  52. package/src/filiale/xihu/IOTMeterCenter.vue +1 -1
  53. package/src/filiale/yangchun/ChargeList.vue +954 -954
  54. package/src/filiale/yangchun/IOTMeterCenter.vue +1 -1
  55. package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
  56. package/src/filiale/zhongsheng/BlackListList.vue +293 -293
  57. package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
  58. package/src/main.js +3 -3
  59. package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
  60. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  61. package/.gradle/5.2.1/gc.properties +0 -0
  62. package/.gradle/8.10/checksums/checksums.lock +0 -0
  63. package/.gradle/8.10/dependencies-accessors/gc.properties +0 -0
  64. package/.gradle/8.10/executionHistory/executionHistory.bin +0 -0
  65. package/.gradle/8.10/executionHistory/executionHistory.lock +0 -0
  66. package/.gradle/8.10/fileChanges/last-build.bin +0 -0
  67. package/.gradle/8.10/fileHashes/fileHashes.bin +0 -0
  68. package/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
  69. package/.gradle/8.10/gc.properties +0 -0
  70. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  71. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  72. package/.gradle/file-system.probe +0 -0
  73. package/.gradle/vcs-1/gc.properties +0 -0
@@ -1,726 +1,726 @@
1
- <template>
2
- <div class="flex">
3
- <criteria-paged :model="model" v-ref:paged @sort="sort">
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row" >
7
- <div class="form-group col-sm-4" >
8
- <label class="font_normal_body">客户编号</label>
9
- <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
10
- condition="info.f_userinfo_code = '{}'" @keyup.enter="search()">
11
- </div>
12
- <div class="form-group col-sm-4 button-range" >
13
- <button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
14
- <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.autoMeterBookSort()">表箱号排序</button>
15
- <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.saveSort()">保存当前顺序</button>
16
- <button class="button_search" v-if="$parent.$parent.editsort == false" @click="$parent.$parent.editsort=true" v-el:cba>调整顺序</button>
17
- <button class="button_search" v-if="$parent.$parent.editsort == true" @click="$parent.$parent.saveEditSort" v-el:cba>保存顺序</button>
18
- <export-excel
19
- :data="{condition: $parent.$parent.condition,orderitem: $parent.$parent.orderitem}"
20
- :field="$parent.$parent.getfield"
21
- sqlurl="api/af-revenue/logic/saleExport" sql-name="getMeterBookUser" :template-name="$parent.$parent.model.rows[0].f_book_name+'抄表册名'"
22
- :choose-col="true"></export-excel>
23
- <button class="button_export button_spacing" @click="$parent.$parent.importFile">导入</button>
24
- <div
25
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
26
- @click="$parent.$parent.criteriaShow=!$parent.$parent.criteriaShow"
27
- class="button_spacing"
28
- style="float: right"></div>
29
- </div>
30
- </div>
31
- <div class="row" v-show="$parent.$parent.criteriaShow">
32
- <div class="col-sm-4 form-group">
33
- <label class="font_normal_body">客户姓名</label>
34
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name" placeholder='客户姓名'
35
- condition="info.f_user_name = '{}'">
36
- </div>
37
- <div class="col-sm-4 form-group">
38
- <label class="font_normal_body">客户地址</label>
39
- <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
40
- condition="address.f_address like '%{}%'" placeholder='客户地址'>
41
- </div>
42
- <div class="col-sm-4 form-group">
43
- <label class="font_normal_body">表&emsp;&emsp;号</label>
44
- <input style="width:60%" type="text" class="form-control" v-model="model.f_meternumber"
45
- condition="uf.f_meternumber like '%{}%'" placeholder='表号'
46
- >
47
- </div>
48
- <div class="col-sm-4 form-group">
49
- <label class="font_normal_body">气表品牌</label>
50
- <v-select :value.sync="model.f_gasbrand_id"
51
- v-model="model.f_gasbrand_id"
52
- :options='$parent.$parent.meterbrands' placeholder='请选择'
53
- condition="gb.f_meter_brand = '{}'"
54
- close-on-select></v-select>
55
- </div>
56
- <div class="col-sm-4 form-group">
57
- <label class="font_normal_body">气表类型</label>
58
- <v-select :value.sync="model.f_meter_type"
59
- v-model="model.f_meter_type"
60
- :options='$parent.$parent.meterTypes' placeholder='请选择'
61
- condition="gb.f_meter_type = '{}'"
62
- close-on-select></v-select>
63
- </div>
64
- <div class="col-sm-4 form-group">
65
- <label class="font_normal_body">客户类型</label>
66
- <v-select :value.sync="model.f_user_type"
67
- :options='$parent.$parent.usertypes'
68
- @change="$parent.$parent.userTypeChange()"
69
- placeholder='请选择' v-model="model.f_user_type"
70
- condition="uf.f_user_type = '{}'"
71
- close-on-select></v-select>
72
- </div>
73
- <div class="col-sm-4 form-group">
74
- <label class="font_normal_body">用气性质</label>
75
- <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
76
- :options='$parent.$parent.gasproperties' placeholder='请选择'
77
- condition="uf.f_gasproperties = '{}'"
78
- close-on-select></v-select>
79
- </div>
80
- <div class="col-sm-4 form-group">
81
- <label class="font_normal_body">气价类型</label>
82
- <v-select :value.sync="model.pricetype" v-model="model.pricetype"
83
- placeholder='气价类型' :options="$parent.$parent.pricetypes"
84
- condition="sp.f_price_type = '{}'"
85
- close-on-select v-ref:type>
86
- </v-select>
87
- </div>
88
- <div class="col-sm-4 form-group">
89
- <label class="font_normal_body">气价名称</label>
90
- <v-select :value.sync="model.f_price_id"
91
- v-model="model.f_price_id"
92
- :options="$parent.$parent.getPricenames"
93
- placeholder='请选择'
94
- condition="uf.f_price_id = '{}'"
95
- close-on-select></v-select>
96
- </div>
97
- <div class="col-sm-4 form-group">
98
- <label class="font_normal_body">客户电话</label>
99
- <input class="input_search"
100
- condition="info.f_user_phone = '{}'" placeholder='电话' style="width:60%"
101
- type="text"
102
- v-model="model.f_user_phone">
103
- </div>
104
- <div class="col-sm-4 form-group">
105
- <label class="font_normal_body">小&emsp;&emsp;区</label>
106
- <input style="width:60%" type="text" class="form-control" v-model="model.f_residential_area"
107
- condition="address.f_residential_area like '%{}%'" placeholder='小区'
108
- >
109
- </div>
110
- <div class="col-sm-4 form-group">
111
- <label class="font_normal_body">楼&emsp;&emsp;栋</label>
112
- <input style="width:60%" type="text" class="form-control" v-model="model.f_building"
113
- condition="address.f_building like '%{}%'" placeholder='楼栋'
114
- >
115
- </div>
116
- <div class="col-sm-4 form-group">
117
- <label class="font_normal_body">单&emsp;&emsp;元</label>
118
- <input style="width:60%" type="text" class="form-control" v-model="model.f_unit"
119
- condition="address.f_unit like '%{}%'" placeholder='单元'
120
- >
121
- </div>
122
- <div class="col-sm-4 form-group">
123
- <label class="font_normal_body">表箱号&emsp;</label>
124
- <input style="width:60%" type="text" class="form-control" v-model="model.f_metertitles"
125
- condition="uf.f_metertitles like '%{}%'" placeholder='表箱号'
126
- >
127
- </div>
128
- <div class="col-sm-4 form-group">
129
- <label class="font_normal_body">入户证号</label>
130
- <input style="width:60%" type="text" class="form-control" v-model="model.f_book_no"
131
- condition="info.f_book_no like '%{}%'" placeholder='入户证号'
132
- >
133
- </div>
134
- <div class="col-sm-4 form-group">
135
- <label class="font_normal_body">抄&nbsp;表&nbsp;员&nbsp;</label>
136
- <v-select :value.sync="model.f_inputtor" v-model='model.f_inputtor'
137
- style="width:60%"
138
- multiple="true"
139
- condition="uf.f_inputtor in {}"
140
- :options='$parent.$parent.inputtores' placeholder='抄表员'
141
- close-on-select
142
- v-el:cc></v-select>
143
- </div>
144
- </div>
145
- </div>
146
- </criteria>
147
- <data-grid :model="model" class="table_sy" partial='list' v-ref:grid>
148
- <template partial='head' >
149
- <tr>
150
- <th v-if="$parent.$parent.$parent.editsort"><nobr>排序</nobr></th>
151
- <th v-if="$parent.$parent.$parent.removebook"><nobr>移出</nobr></th>
152
- <th><nobr>客户编号</nobr></th>
153
- <th><nobr>客户名称</nobr></th>
154
- <th>
155
- <data-order field="f_address" name="客户地址"
156
- :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
157
- </th>
158
- <th>
159
- <data-order field="f_street" name="街道"
160
- :order.sync="$parent.$parent.$parent.orderFields.f_street"></data-order>
161
- </th>
162
- <th>
163
- <data-order field="f_residential_area" name="小区"
164
- :order.sync="$parent.$parent.$parent.orderFields.f_residential_area"></data-order>
165
- </th>
166
- <th>
167
- <data-order field="f_building" name="楼栋"
168
- :order.sync="$parent.$parent.$parent.orderFields.f_building"></data-order>
169
- </th>
170
- <th>
171
- <data-order field="f_unit" name="单元"
172
- :order.sync="$parent.$parent.$parent.orderFields.f_unit"></data-order>
173
- </th>
174
- <th>
175
- <data-order field="f_floor" name="楼层"
176
- :order.sync="$parent.$parent.$parent.orderFields.f_floor"></data-order>
177
- </th>
178
- <th>
179
- <data-order field="f_room" name="房间号"
180
- :order.sync="$parent.$parent.$parent.orderFields.f_room"></data-order>
181
- </th>
182
- <th><nobr>客户电话</nobr></th>
183
- <th><nobr>表号</nobr></th>
184
- <th>
185
- <data-order field="f_meter_book_sort" name="册内排序"
186
- :order.sync="$parent.$parent.$parent.orderFields.f_meter_book_sort"></data-order>
187
- </th>
188
- <th><nobr>抄表册名称</nobr></th>
189
- <th><nobr>抄表员</nobr></th>
190
- <th><nobr>表箱号</nobr></th>
191
- <th><nobr>入户证号</nobr></th>
192
- <th><nobr>表底数</nobr></th>
193
- <th><nobr>用户类型</nobr></th>
194
- <th><nobr>用气类型</nobr></th>
195
- <th><nobr>气表品牌</nobr></th>
196
- <th><nobr>气表型号</nobr></th>
197
- <th><nobr>抄表日期</nobr></th>
198
- </tr>
199
- </template>
200
- <template partial='body' >
201
- <tr>
202
- <td style="text-align:center" v-if="$parent.$parent.$parent.editsort">
203
- <nobr>
204
- <span class="glyphicon glyphicon-arrow-up" @click="$parent.$parent.$parent.sortUp($index, row)" v-el:cba></span>
205
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
206
- <span class="glyphicon glyphicon-arrow-down" @click="$parent.$parent.$parent.sortDown($index, row)" v-el:cba></span>
207
- </nobr>
208
- </td>
209
- <td style="text-align:center" v-if="$parent.$parent.$parent.removebook">
210
- <nobr>
211
- <span title="移出表册" class="glyphicon glyphicon-paste" style="font-size: 20px" @click="$parent.$parent.$parent.delete($index, row)" v-el:cba></span>
212
- <!-- <button class="btn btn-deltete width-10" @click="$parent.$parent.$parent.delete($index, row)"><a style="color: #e51a1abf"><b>移出表册</b></a></button>-->
213
- </nobr>
214
- </td>
215
- <td style="text-align:center"><nobr><span @click="$parent.$parent.$parent.dealmsg(row)"><a><b>{{row.f_userinfo_code}}</b></a></span></nobr></td>
216
- <td style="text-align:center"><nobr>{{row.f_user_name}}</nobr></td>
217
- <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_address}}</nobr></td>
218
- <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_street}}</nobr></td>
219
- <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_residential_area}}</nobr></td>
220
- <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_building}}</nobr></td>
221
- <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_unit}}</nobr></td>
222
- <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_floor}}</nobr></td>
223
- <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_room}}</nobr></td>
224
- <td style="text-align:center"><nobr>{{row.f_user_phone}}</nobr></td>
225
- <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_meternumber}}</nobr></td>
226
- <td style="text-align:center;"><nobr>{{row.f_meter_book_sort}}</nobr></td>
227
- <td style="text-align:center"><nobr>{{row.f_book_name}}</nobr></td>
228
- <td style="text-align:center"><nobr>{{row.f_inputtor}}</nobr></td>
229
- <td style="text-align:center"><nobr>{{row.f_metertitles}}</nobr></td>
230
- <td style="text-align:center"><nobr>{{row.f_book_no}}</nobr></td>
231
- <td style="text-align:center"><nobr>{{row.f_meter_base}}</nobr></td>
232
- <td style="text-align:center"><nobr>{{row.f_user_type}}</nobr></td>
233
- <td style="text-align:center"><nobr>{{row.f_gasproperties}}</nobr></td>
234
- <td style="text-align:center"><nobr>{{row.f_meter_brand}}</nobr></td>
235
- <td style="text-align:center"><nobr>{{row.f_meter_style}}</nobr></td>
236
- <td style="text-align:center"><nobr>{{row.f_hand_date}}</nobr></td>
237
- </tr>
238
- </template>
239
- <template partial='foot'></template>
240
- </data-grid>
241
- </criteria-paged>
242
- </div>
243
- <modal :show.sync="sortShow" width="500px" title="修改册内排序" v-ref:modal large backdrop="false">
244
- <article slot="modal-body" class="modal-body">
245
- <div>
246
- <div class="row app-row">
247
- <p class="col-sm-6">客户编号:{{row.f_userinfo_code}}</p>
248
- <p class="col-sm-6">客户姓名:{{row.f_user_name}}</p>
249
- <p class="col-sm-6">所在表册:{{row.f_book_name}}</p>
250
- <p class="col-sm-6">册内排序:{{row.f_meter_book_sort}}</p>
251
- <label for="f_plan_name" class="font text-left">目标用户编号:</label>
252
- <input type="text" @change="getBook()" class="search_input input-font" v-model="fileinfo.code" placeholder='目标用户编号'
253
- >
254
- </div>
255
- <div class="row app-row" v-show="fileinfo.meterbook && fileinfo.sort">
256
- <p class="col-sm-6">表册:{{fileinfo.meterbook}}</p>
257
- <p class="col-sm-6">册内排序:{{fileinfo.sort}}</p>
258
- </div>
259
- <div class="row app-row">
260
- <div class="col-sm-6" style="text-align: center;">
261
-
262
- <button type="button" class="button_search" style="width:40%;background-color: #499EDF;color:#f2f6fa" :disabled="!(fileinfo.meterbook && fileinfo.sort)" @click="sortEdit(0)"><img src="./../../../../static/images/meterBook/up.png" style="width: 20%;margin-left:-10px"></img>&nbsp;前</button>
263
- </div>
264
- <div class="col-sm-6" style="text-align: center;">
265
- <button type="button" class="button_search" style="width:40%;background-color: #499EDF;color:#f2f6fa" :disabled="!(fileinfo.meterbook && fileinfo.sort)" @click="sortEdit(1)">后&nbsp;<img src="./../../../../static/images/meterBook/down.png" style="width: 20%;"></img></button>
266
- </div>
267
- </div>
268
- </div>
269
-
270
-
271
- </article>
272
- <footer slot="modal-footer" class="modal-footer" v-show="false">
273
-
274
- </footer>
275
- </modal>
276
- <modal :show.sync="show" width="800px" title="文件导入" v-ref:modal large backdrop="false">
277
- <article slot="modal-body" class="modal-body">
278
- <file-upload class="my-file-uploader " name="UploadFile" style="border-radius: 2px;"
279
- action="rs/file/uploadFile" tagname="导入表册用户" v-ref:file multiple></file-upload>
280
- </article>
281
- <footer slot="modal-footer" class="modal-footer">
282
- </footer>
283
- </modal>
284
- </template>
285
-
286
- <script>
287
- import {HttpResetClass, PagedList} from 'vue-client'
288
- let readyGen = async function (self) {
289
- self.getfield = self.config.excelHeaders
290
- // await this.$LoadParams.loadParam(this.f_filialeid)
291
- self.search()
292
- await self.$LoadParams.loadParam()
293
- self.initParams()
294
- }
295
-
296
- export default {
297
- title: '',
298
- data () {
299
- return {
300
- model: new PagedList('api/af-revenue/sql/getMeterBookUser', 20, {orderitem: this.orderitem ? '"' + this.orderitem + ' "' : `'f_meter_book_sort asc'`}),
301
- condition: '',
302
- getfield: {},
303
- show: false,
304
- removebook: true,
305
- row: null,
306
- sortShow: false,
307
- fileinfo: {
308
- code: null,
309
- meterbook: null,
310
- booknum: null,
311
- sort: null,
312
- fileid: null,
313
- infoid: null
314
- },
315
- gasproperties: [],
316
- f_filialeid: this.$login.f.orgid,
317
- newinfo: {
318
- f_user_type: '',
319
- f_gasproperties: '',
320
- pricetype: '',
321
- bookname: '',
322
- f_perform_date: this.$login.toStandardDateString() + ' 00:00:00' // 操作时间
323
- },
324
- meterbrands: [],
325
- adjustables: [],
326
- meterstyle: {},
327
- criteriaShow: false,
328
- editsort: false,
329
- // 排序
330
- sortitem: 'f_meter_book_sort',
331
- rule: 'asc',
332
- orderitem: 'f_meter_book_sort asc',
333
- orderFields: {
334
- f_meter_book_sort: 'no'
335
- },
336
- config: {
337
- excelHeaders: {
338
- 'f_userfiles_id': '系统识别号',
339
- 'f_book_name': '抄表册名称',
340
- 'f_userinfo_code': '客户编号',
341
- 'f_user_name': '客户姓名',
342
- 'f_user_phone': '客户电话',
343
- 'f_meternumber': '表号',
344
- 'f_address': '客户地址',
345
- 'f_inputtor': '抄表员',
346
- 'f_meter_book_sort': '册内排序',
347
- 'f_metertitles': '表箱号',
348
- 'f_meter_base': '表底数',
349
- 'f_user_type': '用户类型',
350
- 'f_gasproperties': '用气类型',
351
- 'f_meter_classify': '气表品牌',
352
- 'f_gasmodel_id': '气表型号',
353
- 'f_hand_date': '抄表日期'
354
- }
355
- }
356
- }
357
- },
358
- props: ['f_meterbook_num', 'usercount'],
359
- async ready () {
360
- readyGen(this)
361
- },
362
- methods: {
363
- sort (field, rule) {
364
- // 将所有排序方式设为不排序,实现相互排斥
365
- for (let key in this.orderFields) {
366
- if (key === field) {
367
- this.orderFields[key] = rule
368
- } else {
369
- this.orderFields[key] = 'no'
370
- }
371
- }
372
- // 如果新规则不排序,还原为默认排序
373
- if (rule === 'no') {
374
- this.model.paramSource.orderitem = `'f_meter_book_sort asc'`
375
- this.rule = 'asc'
376
- this.sortitem = 'f_meter_book_sort'
377
- } else {
378
- this.model.paramSource.orderitem = `'${field} ${rule}'`
379
- this.orderitem = this.model.paramSource.orderitem
380
- this.rule = rule
381
- this.sortitem = field
382
- }
383
- this.search()
384
- },
385
- async saveSort () {
386
- if (!this.$login.r.find(value => value == '册内用户排序')) {
387
- this.$showMessage('你没有【册内用户排序】的权限,请联系管理员!')
388
- return
389
- }
390
- if (this.model.count < this.usercount) {
391
- this.$showAlert('该功能适用于给表册内所有用户排序的情况,请去掉查询条件', 'warning', 3000)
392
- } else {
393
- this.$showMessage('此操作会将表册内用户按照现有查询结果的顺序排序,是否继续', ['confirm', 'cancel']).then((res) => {
394
- if (res == 'confirm') {
395
- this.$resetpost('api/af-revenue/logic/changeBookSort',
396
- {
397
- data: {
398
- f_meter_book_num: this.f_meterbook_num,
399
- sortitem: this.sortitem,
400
- rule: this.rule
401
- }
402
- }, {resolveMsg: '已成功修改册内排序!!', rejectMsg: '册内排序修改失败!!'})
403
- this.search()
404
- }
405
- })
406
- }
407
- },
408
- async autoMeterBookSort () {
409
- if (!this.$login.r.find(value => value == '册内用户排序')) {
410
- this.$showMessage('你没有【册内用户排序】的权限,请联系管理员!')
411
- return
412
- }
413
- this.$showMessage('请确认是否按照表箱自动排序?', ['confirm', 'cancel']).then((res) => {
414
- if (res == 'confirm') {
415
- this.$resetpost('api/af-revenue/logic/autoMeterBookSort',
416
- {
417
- data: {
418
- f_meter_book_num: this.f_meterbook_num,
419
- sortitem: this.sortitem,
420
- rule: this.rule
421
- }
422
- }, {resolveMsg: '册内排序完成!!', rejectMsg: '册内排序修改失败!!'})
423
- this.search()
424
- }
425
- })
426
- },
427
- importFile () {
428
- if (!this.$login.r.find(value => value == '表册排序导入')) {
429
- this.$showMessage('你没有【表册排序导入】的权限,请联系管理员!')
430
- return
431
- }
432
- this.show = true
433
- },
434
- async sortEdit (position) {
435
- if (!this.fileinfo.code) {
436
- this.$showMessage('请输入目标用户编号')
437
- return
438
- }
439
- // position:
440
- // 0--将改用户的表册顺序排到目标用户前
441
- // 1--将改用户的表册顺序排到目标用户后
442
- if ((!this.fileinfo.sort) || (!this.fileinfo.booknum)) {
443
- this.$showMessage('目标用户无表册或在表册内无排序')
444
- return
445
- }
446
- let http = new HttpResetClass()
447
- await http.load('POST', 'api/af-revenue/logic/sale_editBookSort', {data: {fileinfo: this.fileinfo, position: position, userfilesid: this.row.f_userfiles_id}}, {resolveMsg: '已成功将改表移到指定的表册位置', rejectMsg: '移动册内位置失败'})
448
- this.fileinfo = {
449
- code: null,
450
- fileid: null,
451
- booknum: null,
452
- meterbook: null,
453
- infoid: null,
454
- sort: null
455
- }
456
- this.sortShow = false
457
- this.search()
458
- },
459
- async getBook () {
460
- if (this.fileinfo.code) {
461
- let http = new HttpResetClass()
462
- let res = await http.load('POST', 'api/af-revenue/sql/sale_getUserMeterBook', {
463
- data: {
464
- condition: `i.f_userinfo_code='${this.fileinfo.code}'`
465
- }
466
- }, {resolveMsg: null, rejectMsg: null})
467
- console.log('-------------------res:', res.data)
468
- if (res.data.length === 1) {
469
- if ((!res.data[0].f_meter_book_sort) || (!res.data[0].f_meter_book_num)) {
470
- this.$showMessage('该用户不在表册内或在表册内无排序')
471
- this.fileinfo = {
472
- code: this.fileinfo.code,
473
- fileid: null,
474
- booknum: null,
475
- meterbook: null,
476
- infoid: null,
477
- sort: null
478
- }
479
- return
480
- }
481
- this.fileinfo.meterbook = res.data[0].f_book_name
482
- this.fileinfo.sort = res.data[0].f_meter_book_sort
483
- this.fileinfo.fileid = res.data[0].f_userfiles_id
484
- this.fileinfo.infoid = res.data[0].f_userinfo_id
485
- this.fileinfo.booknum = res.data[0].f_meter_book_num
486
- } else {
487
- this.$showMessage('请核对输入的用户编号')
488
- this.fileinfo = {
489
- code: this.fileinfo.code,
490
- fileid: null,
491
- booknum: null,
492
- meterbook: null,
493
- infoid: null,
494
- sort: null
495
- }
496
- }
497
- }
498
- },
499
- async saveEditSort () {
500
- for (let item of this.$refs.paged.$refs.grid.model.rows) {
501
- let param = {
502
- f_userfiles_id: item.f_userfiles_id,
503
- version: item.fileversion,
504
- f_meter_book_sort: item.f_meter_book_sort
505
- }
506
- let http = new HttpResetClass()
507
- await http.load('POST', 'api/af-revenue/entity/save/t_userfiles',
508
- param,
509
- {resolveMsg: null, rejectMsg: '保存失败'})
510
- }
511
- this.editsort = false
512
- },
513
- // 下移按钮
514
- sortDown (index, row) {
515
- if (index === (this.model.rows.length - 1)) {
516
- this.$showAlert('已经是本页最后一个了', 'warning', 2000)
517
- } else {
518
- let rows = this.$refs.paged.$refs.grid.model.rows
519
- this.$refs.paged.$refs.grid.model.rows = []
520
- let temp = rows[index + 1]
521
- rows[index + 1] = rows[index]
522
- rows[index] = temp
523
- let tempsort = rows[index + 1].f_meter_book_sort
524
- rows[index + 1].f_meter_book_sort = rows[index].f_meter_book_sort
525
- rows[index].f_meter_book_sort = tempsort
526
- this.$refs.paged.$refs.grid.model.rows = rows
527
- }
528
- },
529
- // 上移按钮
530
- sortUp (index, row) {
531
- if (index === 0) {
532
- this.$showAlert('已经是本页第一个了', 'warning', 2000)
533
- } else {
534
- let rows = this.$refs.paged.$refs.grid.model.rows
535
- this.$refs.paged.$refs.grid.model.rows = []
536
- let temp = rows[index - 1]
537
- rows[index - 1] = rows[index]
538
- rows[index] = temp
539
- console.log('--------------this.$refs.paged.$refs.grid.model.rows,', rows)
540
- let tempsort = rows[index - 1].f_meter_book_sort
541
- rows[index - 1].f_meter_book_sort = rows[index].f_meter_book_sort
542
- rows[index].f_meter_book_sort = tempsort
543
- this.$refs.paged.$refs.grid.model.rows = rows
544
- }
545
- },
546
- // 移出表册
547
- async delete (index, row) {
548
- let param = {
549
- f_userfiles_id: row.f_userfiles_id,
550
- version: row.fileversion,
551
- f_meter_book_sort: '',
552
- f_meter_book_num: ''
553
- }
554
- let http = new HttpResetClass()
555
- await http.load('POST', 'api/af-revenue/entity/save/t_userfiles',
556
- param,
557
- {resolveMsg: null, rejectMsg: '保存失败'})
558
- this.$refs.paged.$refs.criteria.search()
559
- },
560
- close () {
561
- this.show = false
562
- this.newinfo = {
563
- f_user_type: '',
564
- f_gasproperties: '',
565
- pricetype: '',
566
- bookname: ''
567
- }
568
- },
569
- userTypeChange () {
570
- this.gasproperties = []
571
- if (this.$refs.paged.$refs.criteria.model !== null) {
572
- this.$refs.paged.$refs.criteria.model.f_gasproperties = ''
573
- this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0])
574
- } else {
575
- this.gasproperties = [{label: '全部', value: ''}]
576
- }
577
- },
578
- async initParams () {
579
- console.log('=================>加载', this.$GetSaleParam.getGasbrand())
580
- let arr = []
581
- let filter = this.$login.f.orgid
582
- this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
583
- let temp = {}
584
- temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
585
- temp.value = `${item.value.id}`
586
- arr.push(temp)
587
- })
588
- this.adjustables = [{label: '全部', value: ''}, ...arr]
589
- // 初始化气表品牌
590
- let brandArr = []
591
- this.$GetSaleParam.getGasbrand().forEach((item) => {
592
- let temp = {}
593
- temp.label = item.label
594
- temp.value = item.value.id
595
- brandArr.push(temp)
596
- // 取出对应气表型号
597
- let styleArr = []
598
- for (let row of item.value.gasmodel) {
599
- styleArr.push({label: row.label, value: row.value.id})
600
- }
601
- this.meterstyle[temp.value] = styleArr
602
- })
603
- this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
604
- // 初始化气表价格
605
- this.prices = this.$GetSaleParam.getPrice(filter)
606
- },
607
- sortModelval () {
608
- let sortModel = []
609
- Object.keys(this.fields).forEach((key) => {
610
- if (this.modelval.includes(key)) {
611
- sortModel.push(key)
612
- }
613
- })
614
- this.modelval = sortModel
615
- console.log('选择的打印的字段', this.modelval)
616
- },
617
- async updateParams () {
618
- await this.$MagLoadParams.loadParam(this.f_filialeid)
619
- this.initParams()
620
- },
621
-
622
- loadMeterBooks () {
623
- let meterbrand = this.$GetSaleParam.getGasbrand()
624
- for (let row of meterbrand) {
625
- console.log(row)
626
- this.meterbrands.push({label: row.label, value: row.value.id})
627
- }
628
- },
629
- search () {
630
- this.$refs.paged.$refs.criteria.search()
631
- },
632
-
633
- selfSearch (args) {
634
- this.editsort = false
635
- args.condition = `${args.condition} and f_meter_book_num = '${this.f_meterbook_num}'`
636
- this.condition = args.condition
637
- this.model.search(args.condition, args.model)
638
- },
639
- dealmsg (val) {
640
- this.$parent.f_userinfo_id = val.f_userinfo_id
641
- this.$parent.listpage = false
642
- }
643
-
644
- },
645
- watch: {
646
- 'f_meterbook_num' (val) {
647
- this.search()
648
- }
649
- },
650
- events: {
651
- onFileUpload: function (file, res) {
652
- this.$resetpost('api/af-revenue/logic/upLoadBookFile',
653
- {data: {
654
- condition: this.condition,
655
- filepath: res.f_downloadpath
656
- }
657
- },
658
- {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
659
- this.show = false
660
- this.$showAlert(`导入成功`, 'success', 2000)
661
- this.search()
662
- })
663
- }
664
- },
665
- computed: {
666
- inputtores () {
667
- // 获取抄表员
668
- console.log('获取抄表员', this.$login.f)
669
- let rs = []
670
- if (this.$login.f.f_gasman.length > 0) {
671
- for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
672
- let temp = {
673
- label: this.$login.f.f_gasman[i].name,
674
- value: this.$login.f.f_gasman[i].name
675
- }
676
- rs.push(temp)
677
- }
678
- }
679
- return [ ...rs]
680
- },
681
- pricetypes () {
682
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
683
- },
684
- meterTypes () {
685
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
686
- },
687
- usertypes () {
688
- return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
689
- },
690
- getPricenames () {
691
- console.log('getPricenames======')
692
- let f_user_type = this.$refs.paged.$refs.criteria.model.f_user_type
693
- let f_gasproperties = this.$refs.paged.$refs.criteria.model.f_gasproperties
694
- let pricetype = this.$refs.paged.$refs.criteria.model.pricetype
695
- console.log('打印一下:', pricetype)
696
- if (this.$refs.paged.$refs.criteria.model !== null) {
697
- let rs = []
698
- let priceArr = []
699
- if (pricetype.length > 0 && f_user_type.length > 0 && f_gasproperties.length > 0) {
700
- let params = {
701
- f_user_type: f_user_type[0],
702
- f_gasproperties: f_gasproperties[0],
703
- f_price_type: pricetype[0]
704
- }
705
- console.log('params', params)
706
- console.log('getPricenames======', this.$GetSaleParam.getPrice(params))
707
- this.$GetSaleParam.getPrice(params).forEach((item) => {
708
- let temp = {}
709
- temp.label = item.label
710
- temp.value = item.value.f_price_id
711
- priceArr.push(temp)
712
- })
713
- rs = [ ...priceArr]
714
- }
715
- if (rs.length === 0) {
716
- console.log('rs读出来是空')
717
- this.$refs.paged.$refs.criteria.model.f_price_name = ''
718
- }
719
- return rs
720
- }
721
- }
722
-
723
- }
724
-
725
- }
726
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row" >
7
+ <div class="form-group col-sm-4" >
8
+ <label class="font_normal_body">客户编号</label>
9
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
10
+ condition="info.f_userinfo_code = '{}'" @keyup.enter="search()">
11
+ </div>
12
+ <div class="form-group col-sm-4 button-range" >
13
+ <button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
14
+ <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.autoMeterBookSort()">表箱号排序</button>
15
+ <button class="button_search" style="margin-right: 10px" @click="$parent.$parent.saveSort()">保存当前顺序</button>
16
+ <button class="button_search" v-if="$parent.$parent.editsort == false" @click="$parent.$parent.editsort=true" v-el:cba>调整顺序</button>
17
+ <button class="button_search" v-if="$parent.$parent.editsort == true" @click="$parent.$parent.saveEditSort" v-el:cba>保存顺序</button>
18
+ <export-excel
19
+ :data="{condition: $parent.$parent.condition,orderitem: $parent.$parent.orderitem}"
20
+ :field="$parent.$parent.getfield"
21
+ sqlurl="api/af-revenue/logic/saleExport" sql-name="getMeterBookUser" :template-name="$parent.$parent.model.rows[0].f_book_name+'抄表册名'"
22
+ :choose-col="true"></export-excel>
23
+ <button class="button_export button_spacing" @click="$parent.$parent.importFile">导入</button>
24
+ <div
25
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
26
+ @click="$parent.$parent.criteriaShow=!$parent.$parent.criteriaShow"
27
+ class="button_spacing"
28
+ style="float: right"></div>
29
+ </div>
30
+ </div>
31
+ <div class="row" v-show="$parent.$parent.criteriaShow">
32
+ <div class="col-sm-4 form-group">
33
+ <label class="font_normal_body">客户姓名</label>
34
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name" placeholder='客户姓名'
35
+ condition="info.f_user_name = '{}'">
36
+ </div>
37
+ <div class="col-sm-4 form-group">
38
+ <label class="font_normal_body">客户地址</label>
39
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
40
+ condition="address.f_address like '%{}%'" placeholder='客户地址'>
41
+ </div>
42
+ <div class="col-sm-4 form-group">
43
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
44
+ <input style="width:60%" type="text" class="form-control" v-model="model.f_meternumber"
45
+ condition="uf.f_meternumber like '%{}%'" placeholder='表号'
46
+ >
47
+ </div>
48
+ <div class="col-sm-4 form-group">
49
+ <label class="font_normal_body">气表品牌</label>
50
+ <v-select :value.sync="model.f_gasbrand_id"
51
+ v-model="model.f_gasbrand_id"
52
+ :options='$parent.$parent.meterbrands' placeholder='请选择'
53
+ condition="gb.f_meter_brand = '{}'"
54
+ close-on-select></v-select>
55
+ </div>
56
+ <div class="col-sm-4 form-group">
57
+ <label class="font_normal_body">气表类型</label>
58
+ <v-select :value.sync="model.f_meter_type"
59
+ v-model="model.f_meter_type"
60
+ :options='$parent.$parent.meterTypes' placeholder='请选择'
61
+ condition="gb.f_meter_type = '{}'"
62
+ close-on-select></v-select>
63
+ </div>
64
+ <div class="col-sm-4 form-group">
65
+ <label class="font_normal_body">客户类型</label>
66
+ <v-select :value.sync="model.f_user_type"
67
+ :options='$parent.$parent.usertypes'
68
+ @change="$parent.$parent.userTypeChange()"
69
+ placeholder='请选择' v-model="model.f_user_type"
70
+ condition="uf.f_user_type = '{}'"
71
+ close-on-select></v-select>
72
+ </div>
73
+ <div class="col-sm-4 form-group">
74
+ <label class="font_normal_body">用气性质</label>
75
+ <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
76
+ :options='$parent.$parent.gasproperties' placeholder='请选择'
77
+ condition="uf.f_gasproperties = '{}'"
78
+ close-on-select></v-select>
79
+ </div>
80
+ <div class="col-sm-4 form-group">
81
+ <label class="font_normal_body">气价类型</label>
82
+ <v-select :value.sync="model.pricetype" v-model="model.pricetype"
83
+ placeholder='气价类型' :options="$parent.$parent.pricetypes"
84
+ condition="sp.f_price_type = '{}'"
85
+ close-on-select v-ref:type>
86
+ </v-select>
87
+ </div>
88
+ <div class="col-sm-4 form-group">
89
+ <label class="font_normal_body">气价名称</label>
90
+ <v-select :value.sync="model.f_price_id"
91
+ v-model="model.f_price_id"
92
+ :options="$parent.$parent.getPricenames"
93
+ placeholder='请选择'
94
+ condition="uf.f_price_id = '{}'"
95
+ close-on-select></v-select>
96
+ </div>
97
+ <div class="col-sm-4 form-group">
98
+ <label class="font_normal_body">客户电话</label>
99
+ <input class="input_search"
100
+ condition="info.f_user_phone = '{}'" placeholder='电话' style="width:60%"
101
+ type="text"
102
+ v-model="model.f_user_phone">
103
+ </div>
104
+ <div class="col-sm-4 form-group">
105
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
106
+ <input style="width:60%" type="text" class="form-control" v-model="model.f_residential_area"
107
+ condition="address.f_residential_area like '%{}%'" placeholder='小区'
108
+ >
109
+ </div>
110
+ <div class="col-sm-4 form-group">
111
+ <label class="font_normal_body">楼&emsp;&emsp;栋</label>
112
+ <input style="width:60%" type="text" class="form-control" v-model="model.f_building"
113
+ condition="address.f_building like '%{}%'" placeholder='楼栋'
114
+ >
115
+ </div>
116
+ <div class="col-sm-4 form-group">
117
+ <label class="font_normal_body">单&emsp;&emsp;元</label>
118
+ <input style="width:60%" type="text" class="form-control" v-model="model.f_unit"
119
+ condition="address.f_unit like '%{}%'" placeholder='单元'
120
+ >
121
+ </div>
122
+ <div class="col-sm-4 form-group">
123
+ <label class="font_normal_body">表箱号&emsp;</label>
124
+ <input style="width:60%" type="text" class="form-control" v-model="model.f_metertitles"
125
+ condition="uf.f_metertitles like '%{}%'" placeholder='表箱号'
126
+ >
127
+ </div>
128
+ <div class="col-sm-4 form-group">
129
+ <label class="font_normal_body">入户证号</label>
130
+ <input style="width:60%" type="text" class="form-control" v-model="model.f_book_no"
131
+ condition="info.f_book_no like '%{}%'" placeholder='入户证号'
132
+ >
133
+ </div>
134
+ <div class="col-sm-4 form-group">
135
+ <label class="font_normal_body">抄&nbsp;表&nbsp;员&nbsp;</label>
136
+ <v-select :value.sync="model.f_inputtor" v-model='model.f_inputtor'
137
+ style="width:60%"
138
+ multiple="true"
139
+ condition="uf.f_inputtor in {}"
140
+ :options='$parent.$parent.inputtores' placeholder='抄表员'
141
+ close-on-select
142
+ v-el:cc></v-select>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </criteria>
147
+ <data-grid :model="model" class="table_sy" partial='list' v-ref:grid>
148
+ <template partial='head' >
149
+ <tr>
150
+ <th v-if="$parent.$parent.$parent.editsort"><nobr>排序</nobr></th>
151
+ <th v-if="$parent.$parent.$parent.removebook"><nobr>移出</nobr></th>
152
+ <th><nobr>客户编号</nobr></th>
153
+ <th><nobr>客户名称</nobr></th>
154
+ <th>
155
+ <data-order field="f_address" name="客户地址"
156
+ :order.sync="$parent.$parent.$parent.orderFields.f_address"></data-order>
157
+ </th>
158
+ <th>
159
+ <data-order field="f_street" name="街道"
160
+ :order.sync="$parent.$parent.$parent.orderFields.f_street"></data-order>
161
+ </th>
162
+ <th>
163
+ <data-order field="f_residential_area" name="小区"
164
+ :order.sync="$parent.$parent.$parent.orderFields.f_residential_area"></data-order>
165
+ </th>
166
+ <th>
167
+ <data-order field="f_building" name="楼栋"
168
+ :order.sync="$parent.$parent.$parent.orderFields.f_building"></data-order>
169
+ </th>
170
+ <th>
171
+ <data-order field="f_unit" name="单元"
172
+ :order.sync="$parent.$parent.$parent.orderFields.f_unit"></data-order>
173
+ </th>
174
+ <th>
175
+ <data-order field="f_floor" name="楼层"
176
+ :order.sync="$parent.$parent.$parent.orderFields.f_floor"></data-order>
177
+ </th>
178
+ <th>
179
+ <data-order field="f_room" name="房间号"
180
+ :order.sync="$parent.$parent.$parent.orderFields.f_room"></data-order>
181
+ </th>
182
+ <th><nobr>客户电话</nobr></th>
183
+ <th><nobr>表号</nobr></th>
184
+ <th>
185
+ <data-order field="f_meter_book_sort" name="册内排序"
186
+ :order.sync="$parent.$parent.$parent.orderFields.f_meter_book_sort"></data-order>
187
+ </th>
188
+ <th><nobr>抄表册名称</nobr></th>
189
+ <th><nobr>抄表员</nobr></th>
190
+ <th><nobr>表箱号</nobr></th>
191
+ <th><nobr>入户证号</nobr></th>
192
+ <th><nobr>表底数</nobr></th>
193
+ <th><nobr>用户类型</nobr></th>
194
+ <th><nobr>用气类型</nobr></th>
195
+ <th><nobr>气表品牌</nobr></th>
196
+ <th><nobr>气表型号</nobr></th>
197
+ <th><nobr>抄表日期</nobr></th>
198
+ </tr>
199
+ </template>
200
+ <template partial='body' >
201
+ <tr>
202
+ <td style="text-align:center" v-if="$parent.$parent.$parent.editsort">
203
+ <nobr>
204
+ <span class="glyphicon glyphicon-arrow-up" @click="$parent.$parent.$parent.sortUp($index, row)" v-el:cba></span>
205
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
206
+ <span class="glyphicon glyphicon-arrow-down" @click="$parent.$parent.$parent.sortDown($index, row)" v-el:cba></span>
207
+ </nobr>
208
+ </td>
209
+ <td style="text-align:center" v-if="$parent.$parent.$parent.removebook">
210
+ <nobr>
211
+ <span title="移出表册" class="glyphicon glyphicon-paste" style="font-size: 20px" @click="$parent.$parent.$parent.delete($index, row)" v-el:cba></span>
212
+ <!-- <button class="btn btn-deltete width-10" @click="$parent.$parent.$parent.delete($index, row)"><a style="color: #e51a1abf"><b>移出表册</b></a></button>-->
213
+ </nobr>
214
+ </td>
215
+ <td style="text-align:center"><nobr><span @click="$parent.$parent.$parent.dealmsg(row)"><a><b>{{row.f_userinfo_code}}</b></a></span></nobr></td>
216
+ <td style="text-align:center"><nobr>{{row.f_user_name}}</nobr></td>
217
+ <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_address}}</nobr></td>
218
+ <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_street}}</nobr></td>
219
+ <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_residential_area}}</nobr></td>
220
+ <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_building}}</nobr></td>
221
+ <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_unit}}</nobr></td>
222
+ <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_floor}}</nobr></td>
223
+ <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_room}}</nobr></td>
224
+ <td style="text-align:center"><nobr>{{row.f_user_phone}}</nobr></td>
225
+ <td style="text-align:center;white-space: nowrap;"><nobr>{{row.f_meternumber}}</nobr></td>
226
+ <td style="text-align:center;"><nobr>{{row.f_meter_book_sort}}</nobr></td>
227
+ <td style="text-align:center"><nobr>{{row.f_book_name}}</nobr></td>
228
+ <td style="text-align:center"><nobr>{{row.f_inputtor}}</nobr></td>
229
+ <td style="text-align:center"><nobr>{{row.f_metertitles}}</nobr></td>
230
+ <td style="text-align:center"><nobr>{{row.f_book_no}}</nobr></td>
231
+ <td style="text-align:center"><nobr>{{row.f_meter_base}}</nobr></td>
232
+ <td style="text-align:center"><nobr>{{row.f_user_type}}</nobr></td>
233
+ <td style="text-align:center"><nobr>{{row.f_gasproperties}}</nobr></td>
234
+ <td style="text-align:center"><nobr>{{row.f_meter_brand}}</nobr></td>
235
+ <td style="text-align:center"><nobr>{{row.f_meter_style}}</nobr></td>
236
+ <td style="text-align:center"><nobr>{{row.f_hand_date}}</nobr></td>
237
+ </tr>
238
+ </template>
239
+ <template partial='foot'></template>
240
+ </data-grid>
241
+ </criteria-paged>
242
+ </div>
243
+ <modal :show.sync="sortShow" width="500px" title="修改册内排序" v-ref:modal large backdrop="false">
244
+ <article slot="modal-body" class="modal-body">
245
+ <div>
246
+ <div class="row app-row">
247
+ <p class="col-sm-6">客户编号:{{row.f_userinfo_code}}</p>
248
+ <p class="col-sm-6">客户姓名:{{row.f_user_name}}</p>
249
+ <p class="col-sm-6">所在表册:{{row.f_book_name}}</p>
250
+ <p class="col-sm-6">册内排序:{{row.f_meter_book_sort}}</p>
251
+ <label for="f_plan_name" class="font text-left">目标用户编号:</label>
252
+ <input type="text" @change="getBook()" class="search_input input-font" v-model="fileinfo.code" placeholder='目标用户编号'
253
+ >
254
+ </div>
255
+ <div class="row app-row" v-show="fileinfo.meterbook && fileinfo.sort">
256
+ <p class="col-sm-6">表册:{{fileinfo.meterbook}}</p>
257
+ <p class="col-sm-6">册内排序:{{fileinfo.sort}}</p>
258
+ </div>
259
+ <div class="row app-row">
260
+ <div class="col-sm-6" style="text-align: center;">
261
+
262
+ <button type="button" class="button_search" style="width:40%;background-color: #499EDF;color:#f2f6fa" :disabled="!(fileinfo.meterbook && fileinfo.sort)" @click="sortEdit(0)"><img src="./../../../../static/images/meterBook/up.png" style="width: 20%;margin-left:-10px"></img>&nbsp;前</button>
263
+ </div>
264
+ <div class="col-sm-6" style="text-align: center;">
265
+ <button type="button" class="button_search" style="width:40%;background-color: #499EDF;color:#f2f6fa" :disabled="!(fileinfo.meterbook && fileinfo.sort)" @click="sortEdit(1)">后&nbsp;<img src="./../../../../static/images/meterBook/down.png" style="width: 20%;"></img></button>
266
+ </div>
267
+ </div>
268
+ </div>
269
+
270
+
271
+ </article>
272
+ <footer slot="modal-footer" class="modal-footer" v-show="false">
273
+
274
+ </footer>
275
+ </modal>
276
+ <modal :show.sync="show" width="800px" title="文件导入" v-ref:modal large backdrop="false">
277
+ <article slot="modal-body" class="modal-body">
278
+ <file-upload class="my-file-uploader " name="UploadFile" style="border-radius: 2px;"
279
+ action="rs/file/uploadFile" tagname="导入表册用户" v-ref:file multiple></file-upload>
280
+ </article>
281
+ <footer slot="modal-footer" class="modal-footer">
282
+ </footer>
283
+ </modal>
284
+ </template>
285
+
286
+ <script>
287
+ import {HttpResetClass, PagedList} from 'vue-client'
288
+ let readyGen = async function (self) {
289
+ self.getfield = self.config.excelHeaders
290
+ // await this.$LoadParams.loadParam(this.f_filialeid)
291
+ self.search()
292
+ await self.$LoadParams.loadParam()
293
+ self.initParams()
294
+ }
295
+
296
+ export default {
297
+ title: '',
298
+ data () {
299
+ return {
300
+ model: new PagedList('api/af-revenue/sql/getMeterBookUser', 20, {orderitem: this.orderitem ? '"' + this.orderitem + ' "' : `'f_meter_book_sort asc'`}),
301
+ condition: '',
302
+ getfield: {},
303
+ show: false,
304
+ removebook: true,
305
+ row: null,
306
+ sortShow: false,
307
+ fileinfo: {
308
+ code: null,
309
+ meterbook: null,
310
+ booknum: null,
311
+ sort: null,
312
+ fileid: null,
313
+ infoid: null
314
+ },
315
+ gasproperties: [],
316
+ f_filialeid: this.$login.f.orgid,
317
+ newinfo: {
318
+ f_user_type: '',
319
+ f_gasproperties: '',
320
+ pricetype: '',
321
+ bookname: '',
322
+ f_perform_date: this.$login.toStandardDateString() + ' 00:00:00' // 操作时间
323
+ },
324
+ meterbrands: [],
325
+ adjustables: [],
326
+ meterstyle: {},
327
+ criteriaShow: false,
328
+ editsort: false,
329
+ // 排序
330
+ sortitem: 'f_meter_book_sort',
331
+ rule: 'asc',
332
+ orderitem: 'f_meter_book_sort asc',
333
+ orderFields: {
334
+ f_meter_book_sort: 'no'
335
+ },
336
+ config: {
337
+ excelHeaders: {
338
+ 'f_userfiles_id': '系统识别号',
339
+ 'f_book_name': '抄表册名称',
340
+ 'f_userinfo_code': '客户编号',
341
+ 'f_user_name': '客户姓名',
342
+ 'f_user_phone': '客户电话',
343
+ 'f_meternumber': '表号',
344
+ 'f_address': '客户地址',
345
+ 'f_inputtor': '抄表员',
346
+ 'f_meter_book_sort': '册内排序',
347
+ 'f_metertitles': '表箱号',
348
+ 'f_meter_base': '表底数',
349
+ 'f_user_type': '用户类型',
350
+ 'f_gasproperties': '用气类型',
351
+ 'f_meter_classify': '气表品牌',
352
+ 'f_gasmodel_id': '气表型号',
353
+ 'f_hand_date': '抄表日期'
354
+ }
355
+ }
356
+ }
357
+ },
358
+ props: ['f_meterbook_num', 'usercount'],
359
+ async ready () {
360
+ readyGen(this)
361
+ },
362
+ methods: {
363
+ sort (field, rule) {
364
+ // 将所有排序方式设为不排序,实现相互排斥
365
+ for (let key in this.orderFields) {
366
+ if (key === field) {
367
+ this.orderFields[key] = rule
368
+ } else {
369
+ this.orderFields[key] = 'no'
370
+ }
371
+ }
372
+ // 如果新规则不排序,还原为默认排序
373
+ if (rule === 'no') {
374
+ this.model.paramSource.orderitem = `'f_meter_book_sort asc'`
375
+ this.rule = 'asc'
376
+ this.sortitem = 'f_meter_book_sort'
377
+ } else {
378
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
379
+ this.orderitem = this.model.paramSource.orderitem
380
+ this.rule = rule
381
+ this.sortitem = field
382
+ }
383
+ this.search()
384
+ },
385
+ async saveSort () {
386
+ if (!this.$login.r.find(value => value == '册内用户排序')) {
387
+ this.$showMessage('你没有【册内用户排序】的权限,请联系管理员!')
388
+ return
389
+ }
390
+ if (this.model.count < this.usercount) {
391
+ this.$showAlert('该功能适用于给表册内所有用户排序的情况,请去掉查询条件', 'warning', 3000)
392
+ } else {
393
+ this.$showMessage('此操作会将表册内用户按照现有查询结果的顺序排序,是否继续', ['confirm', 'cancel']).then((res) => {
394
+ if (res == 'confirm') {
395
+ this.$resetpost('api/af-revenue/logic/changeBookSort',
396
+ {
397
+ data: {
398
+ f_meter_book_num: this.f_meterbook_num,
399
+ sortitem: this.sortitem,
400
+ rule: this.rule
401
+ }
402
+ }, {resolveMsg: '已成功修改册内排序!!', rejectMsg: '册内排序修改失败!!'})
403
+ this.search()
404
+ }
405
+ })
406
+ }
407
+ },
408
+ async autoMeterBookSort () {
409
+ if (!this.$login.r.find(value => value == '册内用户排序')) {
410
+ this.$showMessage('你没有【册内用户排序】的权限,请联系管理员!')
411
+ return
412
+ }
413
+ this.$showMessage('请确认是否按照表箱自动排序?', ['confirm', 'cancel']).then((res) => {
414
+ if (res == 'confirm') {
415
+ this.$resetpost('api/af-revenue/logic/autoMeterBookSort',
416
+ {
417
+ data: {
418
+ f_meter_book_num: this.f_meterbook_num,
419
+ sortitem: this.sortitem,
420
+ rule: this.rule
421
+ }
422
+ }, {resolveMsg: '册内排序完成!!', rejectMsg: '册内排序修改失败!!'})
423
+ this.search()
424
+ }
425
+ })
426
+ },
427
+ importFile () {
428
+ if (!this.$login.r.find(value => value == '表册排序导入')) {
429
+ this.$showMessage('你没有【表册排序导入】的权限,请联系管理员!')
430
+ return
431
+ }
432
+ this.show = true
433
+ },
434
+ async sortEdit (position) {
435
+ if (!this.fileinfo.code) {
436
+ this.$showMessage('请输入目标用户编号')
437
+ return
438
+ }
439
+ // position:
440
+ // 0--将改用户的表册顺序排到目标用户前
441
+ // 1--将改用户的表册顺序排到目标用户后
442
+ if ((!this.fileinfo.sort) || (!this.fileinfo.booknum)) {
443
+ this.$showMessage('目标用户无表册或在表册内无排序')
444
+ return
445
+ }
446
+ let http = new HttpResetClass()
447
+ await http.load('POST', 'api/af-revenue/logic/sale_editBookSort', {data: {fileinfo: this.fileinfo, position: position, userfilesid: this.row.f_userfiles_id}}, {resolveMsg: '已成功将改表移到指定的表册位置', rejectMsg: '移动册内位置失败'})
448
+ this.fileinfo = {
449
+ code: null,
450
+ fileid: null,
451
+ booknum: null,
452
+ meterbook: null,
453
+ infoid: null,
454
+ sort: null
455
+ }
456
+ this.sortShow = false
457
+ this.search()
458
+ },
459
+ async getBook () {
460
+ if (this.fileinfo.code) {
461
+ let http = new HttpResetClass()
462
+ let res = await http.load('POST', 'api/af-revenue/sql/sale_getUserMeterBook', {
463
+ data: {
464
+ condition: `i.f_userinfo_code='${this.fileinfo.code}'`
465
+ }
466
+ }, {resolveMsg: null, rejectMsg: null})
467
+ console.log('-------------------res:', res.data)
468
+ if (res.data.length === 1) {
469
+ if ((!res.data[0].f_meter_book_sort) || (!res.data[0].f_meter_book_num)) {
470
+ this.$showMessage('该用户不在表册内或在表册内无排序')
471
+ this.fileinfo = {
472
+ code: this.fileinfo.code,
473
+ fileid: null,
474
+ booknum: null,
475
+ meterbook: null,
476
+ infoid: null,
477
+ sort: null
478
+ }
479
+ return
480
+ }
481
+ this.fileinfo.meterbook = res.data[0].f_book_name
482
+ this.fileinfo.sort = res.data[0].f_meter_book_sort
483
+ this.fileinfo.fileid = res.data[0].f_userfiles_id
484
+ this.fileinfo.infoid = res.data[0].f_userinfo_id
485
+ this.fileinfo.booknum = res.data[0].f_meter_book_num
486
+ } else {
487
+ this.$showMessage('请核对输入的用户编号')
488
+ this.fileinfo = {
489
+ code: this.fileinfo.code,
490
+ fileid: null,
491
+ booknum: null,
492
+ meterbook: null,
493
+ infoid: null,
494
+ sort: null
495
+ }
496
+ }
497
+ }
498
+ },
499
+ async saveEditSort () {
500
+ for (let item of this.$refs.paged.$refs.grid.model.rows) {
501
+ let param = {
502
+ f_userfiles_id: item.f_userfiles_id,
503
+ version: item.fileversion,
504
+ f_meter_book_sort: item.f_meter_book_sort
505
+ }
506
+ let http = new HttpResetClass()
507
+ await http.load('POST', 'api/af-revenue/entity/save/t_userfiles',
508
+ param,
509
+ {resolveMsg: null, rejectMsg: '保存失败'})
510
+ }
511
+ this.editsort = false
512
+ },
513
+ // 下移按钮
514
+ sortDown (index, row) {
515
+ if (index === (this.model.rows.length - 1)) {
516
+ this.$showAlert('已经是本页最后一个了', 'warning', 2000)
517
+ } else {
518
+ let rows = this.$refs.paged.$refs.grid.model.rows
519
+ this.$refs.paged.$refs.grid.model.rows = []
520
+ let temp = rows[index + 1]
521
+ rows[index + 1] = rows[index]
522
+ rows[index] = temp
523
+ let tempsort = rows[index + 1].f_meter_book_sort
524
+ rows[index + 1].f_meter_book_sort = rows[index].f_meter_book_sort
525
+ rows[index].f_meter_book_sort = tempsort
526
+ this.$refs.paged.$refs.grid.model.rows = rows
527
+ }
528
+ },
529
+ // 上移按钮
530
+ sortUp (index, row) {
531
+ if (index === 0) {
532
+ this.$showAlert('已经是本页第一个了', 'warning', 2000)
533
+ } else {
534
+ let rows = this.$refs.paged.$refs.grid.model.rows
535
+ this.$refs.paged.$refs.grid.model.rows = []
536
+ let temp = rows[index - 1]
537
+ rows[index - 1] = rows[index]
538
+ rows[index] = temp
539
+ console.log('--------------this.$refs.paged.$refs.grid.model.rows,', rows)
540
+ let tempsort = rows[index - 1].f_meter_book_sort
541
+ rows[index - 1].f_meter_book_sort = rows[index].f_meter_book_sort
542
+ rows[index].f_meter_book_sort = tempsort
543
+ this.$refs.paged.$refs.grid.model.rows = rows
544
+ }
545
+ },
546
+ // 移出表册
547
+ async delete (index, row) {
548
+ let param = {
549
+ f_userfiles_id: row.f_userfiles_id,
550
+ version: row.fileversion,
551
+ f_meter_book_sort: '',
552
+ f_meter_book_num: ''
553
+ }
554
+ let http = new HttpResetClass()
555
+ await http.load('POST', 'api/af-revenue/entity/save/t_userfiles',
556
+ param,
557
+ {resolveMsg: null, rejectMsg: '保存失败'})
558
+ this.$refs.paged.$refs.criteria.search()
559
+ },
560
+ close () {
561
+ this.show = false
562
+ this.newinfo = {
563
+ f_user_type: '',
564
+ f_gasproperties: '',
565
+ pricetype: '',
566
+ bookname: ''
567
+ }
568
+ },
569
+ userTypeChange () {
570
+ this.gasproperties = []
571
+ if (this.$refs.paged.$refs.criteria.model !== null) {
572
+ this.$refs.paged.$refs.criteria.model.f_gasproperties = ''
573
+ this.gasproperties = this.$appdata.getParam(this.$refs.paged.$refs.criteria.model.f_user_type[0])
574
+ } else {
575
+ this.gasproperties = [{label: '全部', value: ''}]
576
+ }
577
+ },
578
+ async initParams () {
579
+ console.log('=================>加载', this.$GetSaleParam.getGasbrand())
580
+ let arr = []
581
+ let filter = this.$login.f.orgid
582
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
583
+ let temp = {}
584
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
585
+ temp.value = `${item.value.id}`
586
+ arr.push(temp)
587
+ })
588
+ this.adjustables = [{label: '全部', value: ''}, ...arr]
589
+ // 初始化气表品牌
590
+ let brandArr = []
591
+ this.$GetSaleParam.getGasbrand().forEach((item) => {
592
+ let temp = {}
593
+ temp.label = item.label
594
+ temp.value = item.value.id
595
+ brandArr.push(temp)
596
+ // 取出对应气表型号
597
+ let styleArr = []
598
+ for (let row of item.value.gasmodel) {
599
+ styleArr.push({label: row.label, value: row.value.id})
600
+ }
601
+ this.meterstyle[temp.value] = styleArr
602
+ })
603
+ this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
604
+ // 初始化气表价格
605
+ this.prices = this.$GetSaleParam.getPrice(filter)
606
+ },
607
+ sortModelval () {
608
+ let sortModel = []
609
+ Object.keys(this.fields).forEach((key) => {
610
+ if (this.modelval.includes(key)) {
611
+ sortModel.push(key)
612
+ }
613
+ })
614
+ this.modelval = sortModel
615
+ console.log('选择的打印的字段', this.modelval)
616
+ },
617
+ async updateParams () {
618
+ await this.$MagLoadParams.loadParam(this.f_filialeid)
619
+ this.initParams()
620
+ },
621
+
622
+ loadMeterBooks () {
623
+ let meterbrand = this.$GetSaleParam.getGasbrand()
624
+ for (let row of meterbrand) {
625
+ console.log(row)
626
+ this.meterbrands.push({label: row.label, value: row.value.id})
627
+ }
628
+ },
629
+ search () {
630
+ this.$refs.paged.$refs.criteria.search()
631
+ },
632
+
633
+ selfSearch (args) {
634
+ this.editsort = false
635
+ args.condition = `${args.condition} and f_meter_book_num = '${this.f_meterbook_num}'`
636
+ this.condition = args.condition
637
+ this.model.search(args.condition, args.model)
638
+ },
639
+ dealmsg (val) {
640
+ this.$parent.f_userinfo_id = val.f_userinfo_id
641
+ this.$parent.listpage = false
642
+ }
643
+
644
+ },
645
+ watch: {
646
+ 'f_meterbook_num' (val) {
647
+ this.search()
648
+ }
649
+ },
650
+ events: {
651
+ onFileUpload: function (file, res) {
652
+ this.$resetpost('api/af-revenue/logic/upLoadBookFile',
653
+ {data: {
654
+ condition: this.condition,
655
+ filepath: res.f_downloadpath
656
+ }
657
+ },
658
+ {resolveMsg: null, rejectMsg: '上传失败'}).then((res) => {
659
+ this.show = false
660
+ this.$showAlert(`导入成功`, 'success', 2000)
661
+ this.search()
662
+ })
663
+ }
664
+ },
665
+ computed: {
666
+ inputtores () {
667
+ // 获取抄表员
668
+ console.log('获取抄表员', this.$login.f)
669
+ let rs = []
670
+ if (this.$login.f.f_gasman.length > 0) {
671
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
672
+ let temp = {
673
+ label: this.$login.f.f_gasman[i].name,
674
+ value: this.$login.f.f_gasman[i].name
675
+ }
676
+ rs.push(temp)
677
+ }
678
+ }
679
+ return [ ...rs]
680
+ },
681
+ pricetypes () {
682
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')]
683
+ },
684
+ meterTypes () {
685
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')]
686
+ },
687
+ usertypes () {
688
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
689
+ },
690
+ getPricenames () {
691
+ console.log('getPricenames======')
692
+ let f_user_type = this.$refs.paged.$refs.criteria.model.f_user_type
693
+ let f_gasproperties = this.$refs.paged.$refs.criteria.model.f_gasproperties
694
+ let pricetype = this.$refs.paged.$refs.criteria.model.pricetype
695
+ console.log('打印一下:', pricetype)
696
+ if (this.$refs.paged.$refs.criteria.model !== null) {
697
+ let rs = []
698
+ let priceArr = []
699
+ if (pricetype.length > 0 && f_user_type.length > 0 && f_gasproperties.length > 0) {
700
+ let params = {
701
+ f_user_type: f_user_type[0],
702
+ f_gasproperties: f_gasproperties[0],
703
+ f_price_type: pricetype[0]
704
+ }
705
+ console.log('params', params)
706
+ console.log('getPricenames======', this.$GetSaleParam.getPrice(params))
707
+ this.$GetSaleParam.getPrice(params).forEach((item) => {
708
+ let temp = {}
709
+ temp.label = item.label
710
+ temp.value = item.value.f_price_id
711
+ priceArr.push(temp)
712
+ })
713
+ rs = [ ...priceArr]
714
+ }
715
+ if (rs.length === 0) {
716
+ console.log('rs读出来是空')
717
+ this.$refs.paged.$refs.criteria.model.f_price_name = ''
718
+ }
719
+ return rs
720
+ }
721
+ }
722
+
723
+ }
724
+
725
+ }
726
+ </script>