safecheck-client 3.0.30-6 → 3.0.30-8

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,727 +1,727 @@
1
- <template>
2
- <div class="flex-row">
3
- <div class="basic-main">
4
- <criteria-paged :model="model" v-ref:paged @sort="sort">
5
- <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <div class="form-group col-sm-2" >
9
- <label class="font_normal_body">模糊查询</label>
10
- <input type="text" class="input_search" v-model="model.f_userinfo"
11
- style="width: 60%" placeholder="编号 名称 电话 表号 地址"
12
- condition="(f_userinfo_code like '%{}%' or f_user_name like '%{}%' or f_user_phone like '%{}%' or f_meternumber like '%{}%' or f_address like '%{}%' or f_zuhu_phone like '%${}%' or f_rent_phone like '%${}%')">
13
- </div>
14
- <div class="form-group col-sm-2" >
15
- <label class="font_normal_body">客户编号</label>
16
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
17
- style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
18
- </div>
19
- <div class="form-group col-sm-2" >
20
- <label class="font_normal_body">客户名称</label>
21
- <input type="text" class="input_search" v-model="model.f_user_name"
22
- style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
23
- </div>
24
- <div class="form-group col-sm-2" >
25
- <label class="font_normal_body">客户电话</label>
26
- <input type="text" class="input_search" v-model="model.f_user_phone"
27
- style="width: 60%" placeholder="客户电话" condition=" ( f_user_phone like '%{}%' or f_zuhu_phone like '%${}%' or f_rent_phone like '%${}%' )">
28
- </div>
29
- <div class="form-group col-sm-2" >
30
- <label class="font_normal_body">客户表号</label>
31
- <input type="text" class="input_search" v-model="model.f_meternumber"
32
- style="width: 60%" placeholder="客户表号" condition="f_meternumber like '%{}%'">
33
- </div>
34
- <div class="form-group col-sm-2" >
35
- <label class="font_normal_body">详细地址</label>
36
- <input type="text" class="input_search" v-model="model.f_address"
37
- style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
38
- </div>
39
- <div class="form-group col-sm-2" style="width: auto;margin-top:8px;float: right">
40
-
41
- <export-excel-safe :data="$parent.$parent.searchData"
42
- :field="$parent.$parent.excelHeaders"
43
- :choose-col="true"
44
- sqlurl="rs/logic/SafeExportExcel" sql-name="查找安检单" template-name='安检结果明细'></export-excel-safe>
45
- <!-- <export-excel :data="$parent.$parent.getCondition" -->
46
- <!-- :field="$parent.$parent.getfield"-->
47
- <!-- sqlurl="rs/logic/exportfile" sql-name="chargeQuery" template-name='收费查询导出'-->
48
- <!-- :choose-col="true"></export-excel>-->
49
- <!-- <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="!$parent.$parent.audioshow">录音</button>-->
50
- <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="$parent.$parent.audioshow">隐藏</button>
51
-
52
- <button class="button_spacing button_search" @click="search()">查询</button>
53
- <div style="float: right" class="button_spacing"
54
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
55
- @click="$parent.$parent.hidden()"></div>
56
- </div>
57
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
58
- <label class="font_normal_body">小&emsp;&emsp;区</label>
59
- <input type="text" class="input_search" v-model="model.f_residential_area"
60
- style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
61
- </div>
62
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
63
- <label class="font_normal_body">安检计划</label>
64
- <input type="text" class="input_search" v-model="$parent.$parent.model.f_check_plan.f_plan_name"
65
- @click="$parent.$parent.showChooser"
66
- style="width: 60%" placeholder="安检计划" readonly="readonly">
67
- </div>
68
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
69
- <label class="font_normal_body">开始时间</label>
70
- <datepicker
71
- :value.sync="model.f_check_start"
72
- placeholder='开始时间' style="width: 60%"
73
- :disabled-days-of-week="[]"
74
- :format="'yyyy-MM-dd'"
75
- :show-rest-button="reset"
76
- v-model="model.f_check_start"
77
- condition="f_offsite_time > ='{} 00:00:00'">
78
- </datepicker>
79
- <!-- <datepicker-->
80
- <!-- class="select_list select"-->
81
- <!-- :value.sync="model.f_check_start"-->
82
- <!-- placeholder='开始时间' style="width: 60%"-->
83
- <!-- :disabled-days-of-week="[]"-->
84
- <!-- :format="'yyyy-MM-dd'"-->
85
- <!-- :show-rest-button="reset"-->
86
- <!-- v-model="model.f_check_start"-->
87
- <!-- condition="f_offsite_time > ='{} 00:00:00'">-->
88
- <!-- </datepicker>-->
89
- </div>
90
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
91
- <label class="font_normal_body">结束时间</label>
92
- <datepicker
93
- :value.sync="model.f_check_end"
94
- placeholder='结束时间' style="width: 60%"
95
- :disabled-days-of-week="[]"
96
- :format="'yyyy-MM-dd'"
97
- :show-rest-button="reset"
98
- v-model="model.f_check_end"
99
- condition="f_offsite_time <= '{} 23:59:59'">
100
- </datepicker>
101
- </div>
102
-
103
-
104
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
105
-
106
- <label class="font_normal_body">安检类型</label>
107
- <v-select :value.sync="model.f_safecheck_type" v-model='model.f_safecheck_type'
108
- :value-single="true" style="width: 60%"
109
- class="select_list select"
110
- :options='$parent.$parent.safetype' placeholder='安检类型'
111
- close-on-select
112
- condition="f_safecheck_type = '{}'"></v-select>
113
- </div>
114
-
115
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
116
-
117
- <label class="font_normal_body">客户类型</label>
118
- <v-select :value.sync="model.f_check_type" v-model='model.f_check_type'
119
- :value-single="true" style="width: 60%"
120
- class="select_list select"
121
- :options='$parent.$parent.checktype' placeholder='客户类型'
122
- close-on-select
123
- condition="f_check_type = '{}'"></v-select>
124
- </div>
125
-
126
-
127
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
128
- <label class="font_normal_body">安检状态</label>
129
- <v-select id="f_entry"
130
- class="select_list select"
131
- placeholder='安检状态' style="width: 60%"
132
- v-model='model.f_entry'
133
- :value.sync="model.f_entry"
134
- :options='$parent.$parent.f_entry_status'
135
- condition=""
136
- :multiple="true"
137
- ></v-select>
138
- </div>
139
-
140
-
141
-
142
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">-->
143
- <!-- <label class="font_normal_body">安&ensp;检&ensp;员</label>-->
144
- <!-- <v-select :value.sync="model.f_checker_id" v-model='model.f_checker_id'-->
145
- <!-- :value-single="true" style="width: 60%"-->
146
- <!-- class="select_list select"-->
147
- <!-- :options='$parent.$parent.checkersid' placeholder='安检员'-->
148
- <!-- close-on-select-->
149
- <!-- condition="f_checker_id = '{}'"></v-select>-->
150
- <!-- </div>-->
151
- <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">-->
152
- <!-- <label class="font_normal_body" style="margin-right: 2px">公&emsp;&emsp;司</label>-->
153
- <!-- <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">-->
154
- <!-- </right-tree>-->
155
- <!-- </div>-->
156
- <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
157
- <role-selector-safe
158
- role-name="安检员"
159
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
160
- @re-res="$parent.$parent.getRes"
161
- :value.sync="model.f_checker_id"
162
- v-model="model.f_checker_id"
163
- :value-multiple="true"
164
- :value-close="false"
165
- condition="f_checker_name in {}">
166
- </role-selector-safe>
167
- </div>
168
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
169
- <label class="font_normal_body">片&emsp;&emsp;区</label>
170
- <v-select class="select_list select"
171
- placeholder='片区/管理站' style="width: 60%"
172
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
173
- :options='$parent.$parent.sliceArea'
174
- filer-key="name"
175
- close-on-select clear-button
176
- condition="f_slice_area='{}'"
177
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
178
- :value-single="true">
179
- </v-select>
180
- </div>
181
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
182
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
183
- <v-select class="select_list select"
184
- placeholder='抄表册' style="width: 60%"
185
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
186
- :options='$parent.$parent.cbc'
187
- filer-key="name"
188
- close-on-select clear-button
189
- condition="f_meter_book_num={}"
190
- :value-single="true">
191
- </v-select>
192
- </div>
193
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
194
- <label class="font_normal_body">省&ensp;市&ensp;区</label>
195
- <v-select class="select_list select"
196
- placeholder='请选择' style="width: 60%"
197
- :value.sync="model.f_pcd" v-model="model.f_pcd"
198
- :options='$parent.$parent.pcds'
199
- filer-key="name"
200
- close-on-select clear-button
201
- condition="f_pcd='{}'"
202
- :value-single="true">
203
- </v-select>
204
- </div>
205
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
206
- <label class="font_normal_body">计划类型</label>
207
- <v-select class="select_list select"
208
- placeholder='请选择' style="width: 60%"
209
- :value.sync="model.f_no_checkplan" v-model="model.f_no_checkplan"
210
- :options='$parent.$parent.no_checkplans'
211
- filer-key="name"
212
- close-on-select clear-button
213
- condition="f_no_checkplan='{}'"
214
- :value-single="true">
215
- </v-select>
216
- </div>
217
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
218
- <label class="font_normal_body">客户卡号</label>
219
- <input type="text" class="input_search" v-model="model.f_card_id"
220
- style="width: 60%" placeholder="客户卡号" condition="f_card_id like '%{}%'">
221
- </div>
222
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
223
- <label class="font_normal_body">部&emsp;&emsp;门</label>
224
- <v-select class="select_list select"
225
- placeholder='请选择' style="width: 60%"
226
- :value.sync="model.f_department_name" v-model="model.f_department_name"
227
- :options='$parent.$parent.departmentArr'
228
- filer-key="name"
229
- close-on-select clear-button
230
- :value-single="true">
231
- </v-select>
232
- </div>
233
- </div>
234
- <modal :show.sync="$parent.$parent.showModal" v-ref:modal backdrop="false">
235
- <div slot="modal-header" class="modal-header">
236
- <h4 class="modal-title">
237
- 选择计划
238
- </h4>
239
- </div>
240
- <div slot="modal-body" class="modal-body">
241
- <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
242
- </div>
243
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
244
- <button class="button_search" @click="$parent.$parent.ok">确认</button>
245
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
246
- </div>
247
- </modal>
248
- </div>
249
- </criteria>
250
- <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
251
- <template partial='head'>
252
- <tr>
253
- <th>
254
- <nobr>客户编号</nobr>
255
- </th>
256
- <th>
257
- <nobr>客户名称</nobr>
258
- </th>
259
- <th>
260
- <nobr>客户表号</nobr>
261
- </th>
262
- <th>
263
- <nobr>客户电话</nobr>
264
- </th>
265
- <th>
266
- <nobr>客户类型</nobr>
267
- </th>
268
- <th>
269
- <nobr>客户地址</nobr>
270
- </th>
271
- <th>
272
- <nobr>安检状态</nobr>
273
- </th>
274
- <th>
275
- <data-order field="f_offsite_time" name="安检时间"></data-order>
276
- </th>
277
- <th>
278
- <nobr>安检员</nobr>
279
- </th>
280
- <th>
281
- <nobr>气表型号</nobr>
282
- </th>
283
- <th>
284
- <nobr>气表品牌</nobr>
285
- </th>
286
- <th>
287
- <nobr>电子读数</nobr>
288
- </th>
289
- <th>
290
- <nobr>机械读数</nobr>
291
- </th>
292
- <th>
293
- <nobr>剩余气量</nobr>
294
- </th>
295
- <th>
296
- <nobr>剩余金额</nobr>
297
- </th>
298
- <th>
299
- <nobr>备注</nobr>
300
- </th>
301
- <th>
302
- <nobr>操作</nobr>
303
- </th>
304
- <th v-if="$parent.$parent.$parent.audioshow">
305
- <nobr>录音</nobr>
306
- </th>
307
- </tr>
308
- </template>
309
- <template partial='body'>
310
-
311
- <td style="text-align: center">{{row.f_userinfo_code}}</td>
312
- <td style="text-align: center">{{row.f_user_name}}</td>
313
- <td style="text-align: center">{{row.f_meternumber}}</td>
314
- <td style="text-align: center">{{row.f_user_phone}}</td>
315
- <td style="text-align: center">{{row.f_check_type}}</td>
316
-
317
- <td style="text-align: center">{{row.f_address}}</td>
318
- <td style="text-align: center">{{row.f_entry_status}}</td>
319
- <td style="text-align: center">{{row.f_offsite_time}}</td>
320
- <td style="text-align: center">{{row.f_checker_name}}</td>
321
- <td style="text-align: center">{{row.f_diaphgram_size}}</td>
322
- <td style="text-align: center">{{row.f_aliasname}}</td>
323
- <td style="text-align: center">{{row.f_electronic_read}}</td>
324
- <td style="text-align: center">{{row.f_mechanical_read}}</td>
325
- <td style="text-align: center">{{row.f_remaining_gas_volume}}</td>
326
- <td style="text-align: center">{{row.f_remaining_amount}}</td>
327
- <td style="text-align: center">{{row.f_repair_approved_note}}</td>
328
- <td style="text-align: center">
329
- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
330
-
331
-
332
- </td>
333
- <td style="text-align: center" v-if="$parent.$parent.$parent.audioshow">
334
- <!-- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>-->
335
- <audio controls="controls" v-if="row.f_recording1_path">
336
- <source type="audio/mpeg" :src="'rs/audio/file/'+row.f_recording1_path">
337
- </audio>
338
- <!--<button type="button" class="button_new-1 button_spacing" data-toggle="dropdown"
339
- @click="$parent.$parent.$parent.print(row)">
340
- 打印
341
- </button>-->
342
- </td>
343
- </template>
344
- </data-grid>
345
- </criteria-paged>
346
- <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
347
- </div>
348
- </div>
349
- </template>
350
-
351
- <script>
352
- import {PagedList} from 'vue-client'
353
- import Vue from 'vue'
354
- import co from 'co'
355
- import AppData from '../../../stores/AppData'
356
- import * as Util from '../../Util'
357
- import getNowDate from "../../../utils/getNowDate";
358
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
359
- import BenzAMRRecorder from 'benz-amr-recorder'
360
-
361
- //获取json配置文件
362
- let asyncReady = async function (self) {
363
- // 获取配置信息
364
- try {
365
- let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
366
- Vue.config = res.data
367
- } catch (error) {
368
- // 忽略704,文件找不到异常R
369
- if (error.status !== 704) {
370
- throw error
371
- }
372
- }
373
- }
374
-
375
- let select = function* (self) {
376
- let http = new HttpResetClass()
377
- let getGasman = yield http.load('POST', '/rs/search', {
378
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
379
- userid: self.$login.f.id
380
- }, {resolveMsg: null, rejectMsg: null})
381
- ////tag
382
- self.checkersid.push({label: '全部', value: ''})
383
- getGasman.data.forEach((checker) => {
384
- self.checkersid.push({label: checker.name, value: checker.id})
385
- })
386
- }
387
-
388
- export default {
389
- title: '安检结果查看',
390
- data() {
391
- let model = new PagedList('rs/sql/查找安检单', 20, {
392
- f_plan_id: 'this.f_plan_id',
393
- f_approved: 'this.f_approved',
394
- f_entry_status: 'this.f_entry',
395
- f_no_checkplan: 'this.f_no_checkplan',
396
- f_filialeid: 'this.f_filialeid',
397
- orderitem: "'f_offsite_time desc'"
398
- })
399
- model.f_check_type=''
400
- model.f_plan_id = ''
401
- model.f_approved = ''
402
- model.f_entry = ''
403
- model.f_no_checkplan = ''
404
- model.f_filialeid = `('${this.$login.f.orgid}')`
405
- //model.f_check_type='民用'
406
- // let searchData={
407
- // f_plan_id: this.model.f_checker_id==undefined?"":this.model.f_checker_id,
408
- // f_approved: this.model.f_approved,
409
- // f_entry_status: this.model.f_entry,
410
- // f_no_checkplan:this.model.f_no_checkplan[0],
411
- // f_filialeid: this.model.f_filialeid,
412
- // //orderitem: this.model.f_offsite_time,
413
- // //condition:this.model.condition
414
- // }
415
- // model.f_subcompany = this.$login.f.f_fengongsi
416
- return {
417
- audioshow:false,
418
- searchData: {
419
- condition: "1=1",
420
- orderitem: "f_offsite_time desc",
421
- f_plan_id: "",
422
- f_approved: '',
423
- f_no_checkplan: '',
424
- f_filialeid: `('${this.$login.f.orgid}')`
425
- },
426
- model: model,
427
- excelHeaders: {
428
- //searchData:searchData,
429
- 'f_userinfo_code': '客户编号',
430
- 'f_user_name': '客户姓名',
431
- 'f_meternumber':'客户表号',
432
- 'f_user_phone':'客户电话',
433
- 'f_check_type': '客户类型',
434
- 'f_residential_area': '小区',
435
- 'f_address': '客户地址',
436
- 'f_entry_status': '安检状态',
437
- 'f_offsite_time': '安检时间',
438
- 'f_checker_name': '安检员',
439
- 'f_diaphgram_size': '气表型号',
440
- 'f_aliasname': '气表品牌',
441
- 'f_electronic_read': '电子读数',
442
- 'f_mechanical_read': '机械读数',
443
- 'f_remaining_gas_volume': '剩余气量',
444
- 'f_remaining_amount': '剩余金额',
445
- 'f_safecheck_type':'安检类型',
446
- 'f_repair_approved_note': '备注',
447
- 'f_plan_name': '计划名称',
448
- },
449
- fun: this.$login.f,
450
- pcds:[],
451
- departmentArr:[],
452
- checkerArr:[],
453
- checkersid: [],
454
- safetype: this.$appdata.getParam('安检类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检类型')]:[{label: '全部', value: ''}],
455
- criteriaShow: false,
456
- checktype: this.$appdata.getParam('用户类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]:[{label: '全部', value: ''}],
457
- f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
458
- showModal: false,
459
- no_checkplans:this.$appdata.getParam('计划类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('计划类型')]:[{label: '全部', value: ''}],
460
- f_approval_states: this.$appdata.getParam('安检单审核状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检单审核状态')]:[{label: '全部', value: ''}],
461
- f_entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
462
- f_checkplans: this.$appdata.getParam('有无计划')?[{label: '全部', value: ''}, ...this.$appdata.getParam('有无计划')]:[{label: '全部', value: ''}],
463
- showcheckmsg: false,
464
- checkInfo: {},
465
- orderDefault: "'f_offsite_time'",
466
- orderFields: {
467
- f_offsite_time: 'no'
468
- },
469
- sliceArea: [],
470
- cbc:[]
471
- }
472
- },
473
- methods: {
474
- //获取省市区列表
475
- getPcd(val){
476
- this.pcds = [{label:'全部',value:''}]
477
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
478
- {data:{items:"*",tablename:"t_pcd",orderitem:"id",condition:`f_orgid in ${val}`}},
479
- {resolveMsg: null, rejectMsg: null}).then((pcdlist)=>{
480
- pcdlist.data.forEach((result)=>{
481
- this.pcds.push({label:result.f_pcd,value:result.f_pcd})
482
- })
483
- })
484
- },
485
- getDepartment(){
486
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
487
- items: '*',
488
- tablename: 't_user',
489
- condition: `rolestr like '%安检员%' and state = '在职'`,
490
- orderitem: '1'
491
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
492
- this.checkerArr = res.data
493
- this.departmentArr = []
494
- let tempArr = []
495
- res.data.forEach((user)=>{
496
- if (!tempArr.includes(user.f_department_name)){
497
- tempArr.push(user.f_department_name)
498
- this.departmentArr.push({label:user.f_department_name,value:user.f_department_name})
499
- }
500
- })
501
- })
502
- },
503
- showaudio(){
504
- //tag
505
- this.audioshow=!this.audioshow
506
- //tag
507
- },
508
- getmeterbook(val){
509
- this.cbc=[]
510
- this.cbc.push({
511
- label:'全部',
512
- value:''
513
- })
514
- if (val==''){
515
-
516
- this.cbcs.forEach(res=>{
517
- this.cbc.push({
518
- label:res.f_book_name,
519
- value:res.id
520
- })
521
- })
522
- }else{
523
- this.cbcs.forEach(res=>{
524
- if (res.f_book_slice_area==val){
525
- this.cbc.push({
526
- label:res.f_book_name,
527
- value:res.id
528
- })
529
- }
530
- })
531
- }
532
- },
533
- Mreadibook(val){
534
- ////tag
535
- ////tag
536
- if (val){
537
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
538
- items: 'name',
539
- tablename: 't_zone',
540
- condition: `parentid in ${val}`,
541
- orderitem: 'id'
542
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
543
- this.sliceArea=[]
544
- this.sliceArea.push({
545
- label:'全部',
546
- value:''
547
- })
548
- res.data.forEach(ress=>{
549
- this.sliceArea.push({
550
- label:ress.name,
551
- value:ress.name
552
- })
553
- })
554
-
555
- })
556
- }
557
- },
558
- getAllMeterBook(val){
559
- ////tag
560
- ////tag
561
- this.cbcs=[]
562
- if (val){
563
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
564
- items: 'f_book_name,f_book_slice_area,id',
565
- tablename: 't_meter_book',
566
- condition: `f_filiale_id in ${val}`,
567
- orderitem: 'id'
568
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
569
- res.data.forEach(ress=>{
570
- this.cbcs.push({
571
- id:ress.id,
572
- f_book_name:ress.f_book_name,
573
- f_book_slice_area:ress.f_book_slice_area
574
- })
575
- })
576
- this.cbc=[]
577
- this.cbc.push({
578
- label:'全部',
579
- value:''
580
- })
581
- this.cbcs.forEach(res=>{
582
- this.cbc.push({
583
- label:res.f_book_name,
584
- value:res.id
585
- })
586
- })
587
- })
588
- }
589
- },
590
- getRes(obj) {
591
- this.model.f_filialeid = this.$login.convertToIn(obj.resids);
592
- this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
593
- this.Mreadibook(this.model.f_filialeid)
594
- this.getAllMeterBook(this.model.f_filialeid)
595
- this.getPcd(this.model.f_filialeid)
596
- //this.$refs.paged.$refs.criteria.search()
597
- },
598
-
599
- change(row) {
600
- // Vue.$login = {jwt: row.f_checker_id}
601
- asyncReady(this).then(() => {
602
- ////tag)
603
- row.f_upload_state = '已传'
604
- this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
605
- }).catch(
606
- (respanse) => {
607
- alert('获取配置文件失败')
608
- })
609
- },
610
- readConfig() {
611
- let gen = asyncReady(this)
612
- return co(gen)
613
- },
614
- showChooser() {
615
- this.showModal = true
616
- },
617
- hidden() {
618
- this.criteriaShow = !this.criteriaShow
619
- },
620
- refresh() {
621
- this.$refs.paged.$refs.criteria.search()
622
- },
623
- ok() {
624
- this.showModal = false
625
- if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
626
- this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
627
- this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
628
- }
629
- },
630
- cancel() {
631
- this.showModal = false
632
- this.model.f_check_plan = {f_plan_name: '', id: ''}
633
- this.model.f_plan_id=''
634
- },
635
- print(row) {
636
- this.showcheckmsg = true
637
- this.checkInfo = row
638
- },
639
-
640
- sort(field, rule) {
641
- // 将所有排序方式设为不排序,实现相互排斥
642
- for (let key in this.orderFields) {
643
- if (key === field) {
644
- this.orderFields[key] = rule
645
- } else {
646
- this.orderFields[key] = 'no'
647
- }
648
- }
649
- // 如果新规则不排序,还原为默认排序
650
- if (rule === 'no') {
651
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
652
- } else {
653
- this.model.paramSource.orderitem = `'${field} ${rule}'`
654
- }
655
- this.search()
656
- },
657
- search() {
658
- this.$refs.paged.$refs.criteria.search()
659
- },
660
- selfSearch(args) {
661
- if (args.model.f_department_name){
662
- const matchedCheckers = this.checkerArr
663
- .filter(user => user.f_department_name === args.model.f_department_name)
664
- .map(user => `'${user.name}'`)
665
- if (matchedCheckers.length > 0) {
666
- args.condition += ` and f_checker_name in (${matchedCheckers.join()})`
667
- }
668
- }
669
- ////tag
670
- //args.condition+=" and f_check_type='民用'"
671
- if (args.model.f_entry && args.model.f_entry.length > 0) {
672
- let valuesele = `(`
673
- for (let i = 0; i < args.model.f_entry.length; i++) {
674
- valuesele += `'${args.model.f_entry[i]}',`
675
- }
676
- args.condition += ' and f_entry_status in ' + valuesele.substring(0, valuesele.length - 1) + ')'
677
- }
678
- this.model.search(args.condition, args.model, args.condValue)
679
- }
680
- },
681
-
682
- ready() {
683
- ////tag
684
- this.function = this.f
685
- ////tag
686
-
687
- let gen = select(this)
688
- //this.pianqu()
689
- this.Mreadibook(`('${this.$login.f.orgid}')`)
690
- co(gen)
691
- this.getDepartment()
692
- },
693
- watch: {
694
- 'model.f_no_checkplan'(val) {
695
- if (this.model.f_no_checkplan){
696
- this.searchData.f_no_checkplan = val
697
- }
698
- if (this.model.f_no_checkplan == '有计划安检') {
699
-
700
- this.showChooser()
701
- }
702
- },
703
- 'model.condition'(val) {
704
- if (val) {
705
- this.searchData.condition = val
706
- }
707
-
708
- },
709
- /*'model.f_entry'(val) {
710
- this.searchData.f_entry_status = val
711
- },*/
712
- 'model.f_plan_id'(val) {
713
- if (val) {
714
- this.searchData.f_plan_id = val
715
- }
716
- },
717
- 'model.f_slice_area'(val) {
718
- },
719
- 'model.f_approved'(val) {
720
- if (val) {
721
- this.searchData.f_approved = val
722
- }
723
- },
724
- }
725
-
726
- }
727
- </script>
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
5
+ <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="form-group col-sm-2" >
9
+ <label class="font_normal_body">模糊查询</label>
10
+ <input type="text" class="input_search" v-model="model.f_userinfo"
11
+ style="width: 60%" placeholder="编号 名称 电话 表号 地址"
12
+ condition="(f_userinfo_code like '%{}%' or f_user_name like '%{}%' or f_user_phone like '%{}%' or f_meternumber like '%{}%' or f_address like '%{}%' or f_zuhu_phone like '%${}%' or f_rent_phone like '%${}%')">
13
+ </div>
14
+ <div class="form-group col-sm-2" >
15
+ <label class="font_normal_body">客户编号</label>
16
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
17
+ style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
18
+ </div>
19
+ <div class="form-group col-sm-2" >
20
+ <label class="font_normal_body">客户名称</label>
21
+ <input type="text" class="input_search" v-model="model.f_user_name"
22
+ style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
23
+ </div>
24
+ <div class="form-group col-sm-2" >
25
+ <label class="font_normal_body">客户电话</label>
26
+ <input type="text" class="input_search" v-model="model.f_user_phone"
27
+ style="width: 60%" placeholder="客户电话" condition=" ( f_user_phone like '%{}%' or f_zuhu_phone like '%${}%' or f_rent_phone like '%${}%' )">
28
+ </div>
29
+ <div class="form-group col-sm-2" >
30
+ <label class="font_normal_body">客户表号</label>
31
+ <input type="text" class="input_search" v-model="model.f_meternumber"
32
+ style="width: 60%" placeholder="客户表号" condition="f_meternumber like '%{}%'">
33
+ </div>
34
+ <div class="form-group col-sm-2" >
35
+ <label class="font_normal_body">详细地址</label>
36
+ <input type="text" class="input_search" v-model="model.f_address"
37
+ style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
38
+ </div>
39
+ <div class="form-group col-sm-2" style="width: auto;margin-top:8px;float: right">
40
+
41
+ <export-excel-safe :data="$parent.$parent.searchData"
42
+ :field="$parent.$parent.excelHeaders"
43
+ :choose-col="true"
44
+ sqlurl="rs/logic/SafeExportExcel" sql-name="查找安检单" template-name='安检结果明细'></export-excel-safe>
45
+ <!-- <export-excel :data="$parent.$parent.getCondition" -->
46
+ <!-- :field="$parent.$parent.getfield"-->
47
+ <!-- sqlurl="rs/logic/exportfile" sql-name="chargeQuery" template-name='收费查询导出'-->
48
+ <!-- :choose-col="true"></export-excel>-->
49
+ <!-- <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="!$parent.$parent.audioshow">录音</button>-->
50
+ <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="$parent.$parent.audioshow">隐藏</button>
51
+
52
+ <button class="button_spacing button_search" @click="search()">查询</button>
53
+ <div style="float: right" class="button_spacing"
54
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
55
+ @click="$parent.$parent.hidden()"></div>
56
+ </div>
57
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
58
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
59
+ <input type="text" class="input_search" v-model="model.f_residential_area"
60
+ style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
61
+ </div>
62
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
63
+ <label class="font_normal_body">安检计划</label>
64
+ <input type="text" class="input_search" v-model="$parent.$parent.model.f_check_plan.f_plan_name"
65
+ @click="$parent.$parent.showChooser"
66
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
67
+ </div>
68
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
69
+ <label class="font_normal_body">开始时间</label>
70
+ <datepicker
71
+ :value.sync="model.f_check_start"
72
+ placeholder='开始时间' style="width: 60%"
73
+ :disabled-days-of-week="[]"
74
+ :format="'yyyy-MM-dd'"
75
+ :show-rest-button="reset"
76
+ v-model="model.f_check_start"
77
+ condition="f_offsite_time > ='{} 00:00:00'">
78
+ </datepicker>
79
+ <!-- <datepicker-->
80
+ <!-- class="select_list select"-->
81
+ <!-- :value.sync="model.f_check_start"-->
82
+ <!-- placeholder='开始时间' style="width: 60%"-->
83
+ <!-- :disabled-days-of-week="[]"-->
84
+ <!-- :format="'yyyy-MM-dd'"-->
85
+ <!-- :show-rest-button="reset"-->
86
+ <!-- v-model="model.f_check_start"-->
87
+ <!-- condition="f_offsite_time > ='{} 00:00:00'">-->
88
+ <!-- </datepicker>-->
89
+ </div>
90
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
91
+ <label class="font_normal_body">结束时间</label>
92
+ <datepicker
93
+ :value.sync="model.f_check_end"
94
+ placeholder='结束时间' style="width: 60%"
95
+ :disabled-days-of-week="[]"
96
+ :format="'yyyy-MM-dd'"
97
+ :show-rest-button="reset"
98
+ v-model="model.f_check_end"
99
+ condition="f_offsite_time <= '{} 23:59:59'">
100
+ </datepicker>
101
+ </div>
102
+
103
+
104
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
105
+
106
+ <label class="font_normal_body">安检类型</label>
107
+ <v-select :value.sync="model.f_safecheck_type" v-model='model.f_safecheck_type'
108
+ :value-single="true" style="width: 60%"
109
+ class="select_list select"
110
+ :options='$parent.$parent.safetype' placeholder='安检类型'
111
+ close-on-select
112
+ condition="f_safecheck_type = '{}'"></v-select>
113
+ </div>
114
+
115
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
116
+
117
+ <label class="font_normal_body">客户类型</label>
118
+ <v-select :value.sync="model.f_check_type" v-model='model.f_check_type'
119
+ :value-single="true" style="width: 60%"
120
+ class="select_list select"
121
+ :options='$parent.$parent.checktype' placeholder='客户类型'
122
+ close-on-select
123
+ condition="f_check_type = '{}'"></v-select>
124
+ </div>
125
+
126
+
127
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
128
+ <label class="font_normal_body">安检状态</label>
129
+ <v-select id="f_entry"
130
+ class="select_list select"
131
+ placeholder='安检状态' style="width: 60%"
132
+ v-model='model.f_entry'
133
+ :value.sync="model.f_entry"
134
+ :options='$parent.$parent.f_entry_status'
135
+ condition=""
136
+ :multiple="true"
137
+ ></v-select>
138
+ </div>
139
+
140
+
141
+
142
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">-->
143
+ <!-- <label class="font_normal_body">安&ensp;检&ensp;员</label>-->
144
+ <!-- <v-select :value.sync="model.f_checker_id" v-model='model.f_checker_id'-->
145
+ <!-- :value-single="true" style="width: 60%"-->
146
+ <!-- class="select_list select"-->
147
+ <!-- :options='$parent.$parent.checkersid' placeholder='安检员'-->
148
+ <!-- close-on-select-->
149
+ <!-- condition="f_checker_id = '{}'"></v-select>-->
150
+ <!-- </div>-->
151
+ <!-- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">-->
152
+ <!-- <label class="font_normal_body" style="margin-right: 2px">公&emsp;&emsp;司</label>-->
153
+ <!-- <right-tree @re-res="$parent.$parent.getRes" :initresid="$parent.$parent.$login.f.orgid">-->
154
+ <!-- </right-tree>-->
155
+ <!-- </div>-->
156
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
157
+ <role-selector-safe
158
+ role-name="安检员"
159
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
160
+ @re-res="$parent.$parent.getRes"
161
+ :value.sync="model.f_checker_id"
162
+ v-model="model.f_checker_id"
163
+ :value-multiple="true"
164
+ :value-close="false"
165
+ condition="f_checker_name in {}">
166
+ </role-selector-safe>
167
+ </div>
168
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
169
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
170
+ <v-select class="select_list select"
171
+ placeholder='片区/管理站' style="width: 60%"
172
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
173
+ :options='$parent.$parent.sliceArea'
174
+ filer-key="name"
175
+ close-on-select clear-button
176
+ condition="f_slice_area='{}'"
177
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
178
+ :value-single="true">
179
+ </v-select>
180
+ </div>
181
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
182
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
183
+ <v-select class="select_list select"
184
+ placeholder='抄表册' style="width: 60%"
185
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
186
+ :options='$parent.$parent.cbc'
187
+ filer-key="name"
188
+ close-on-select clear-button
189
+ condition="f_meter_book_num={}"
190
+ :value-single="true">
191
+ </v-select>
192
+ </div>
193
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
194
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
195
+ <v-select class="select_list select"
196
+ placeholder='请选择' style="width: 60%"
197
+ :value.sync="model.f_pcd" v-model="model.f_pcd"
198
+ :options='$parent.$parent.pcds'
199
+ filer-key="name"
200
+ close-on-select clear-button
201
+ condition="f_pcd='{}'"
202
+ :value-single="true">
203
+ </v-select>
204
+ </div>
205
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
206
+ <label class="font_normal_body">计划类型</label>
207
+ <v-select class="select_list select"
208
+ placeholder='请选择' style="width: 60%"
209
+ :value.sync="model.f_no_checkplan" v-model="model.f_no_checkplan"
210
+ :options='$parent.$parent.no_checkplans'
211
+ filer-key="name"
212
+ close-on-select clear-button
213
+ condition="f_no_checkplan='{}'"
214
+ :value-single="true">
215
+ </v-select>
216
+ </div>
217
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
218
+ <label class="font_normal_body">客户卡号</label>
219
+ <input type="text" class="input_search" v-model="model.f_card_id"
220
+ style="width: 60%" placeholder="客户卡号" condition="f_card_id like '%{}%'">
221
+ </div>
222
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
223
+ <label class="font_normal_body">部&emsp;&emsp;门</label>
224
+ <v-select class="select_list select"
225
+ placeholder='请选择' style="width: 60%"
226
+ :value.sync="model.f_department_name" v-model="model.f_department_name"
227
+ :options='$parent.$parent.departmentArr'
228
+ filer-key="name"
229
+ close-on-select clear-button
230
+ :value-single="true">
231
+ </v-select>
232
+ </div>
233
+ </div>
234
+ <modal :show.sync="$parent.$parent.showModal" v-ref:modal backdrop="false">
235
+ <div slot="modal-header" class="modal-header">
236
+ <h4 class="modal-title">
237
+ 选择计划
238
+ </h4>
239
+ </div>
240
+ <div slot="modal-body" class="modal-body">
241
+ <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
242
+ </div>
243
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
244
+ <button class="button_search" @click="$parent.$parent.ok">确认</button>
245
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
246
+ </div>
247
+ </modal>
248
+ </div>
249
+ </criteria>
250
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
251
+ <template partial='head'>
252
+ <tr>
253
+ <th>
254
+ <nobr>客户编号</nobr>
255
+ </th>
256
+ <th>
257
+ <nobr>客户名称</nobr>
258
+ </th>
259
+ <th>
260
+ <nobr>客户表号</nobr>
261
+ </th>
262
+ <th>
263
+ <nobr>客户电话</nobr>
264
+ </th>
265
+ <th>
266
+ <nobr>客户类型</nobr>
267
+ </th>
268
+ <th>
269
+ <nobr>客户地址</nobr>
270
+ </th>
271
+ <th>
272
+ <nobr>安检状态</nobr>
273
+ </th>
274
+ <th>
275
+ <data-order field="f_offsite_time" name="安检时间"></data-order>
276
+ </th>
277
+ <th>
278
+ <nobr>安检员</nobr>
279
+ </th>
280
+ <th>
281
+ <nobr>气表型号</nobr>
282
+ </th>
283
+ <th>
284
+ <nobr>气表品牌</nobr>
285
+ </th>
286
+ <th>
287
+ <nobr>电子读数</nobr>
288
+ </th>
289
+ <th>
290
+ <nobr>机械读数</nobr>
291
+ </th>
292
+ <th>
293
+ <nobr>剩余气量</nobr>
294
+ </th>
295
+ <th>
296
+ <nobr>剩余金额</nobr>
297
+ </th>
298
+ <th>
299
+ <nobr>备注</nobr>
300
+ </th>
301
+ <th>
302
+ <nobr>操作</nobr>
303
+ </th>
304
+ <th v-if="$parent.$parent.$parent.audioshow">
305
+ <nobr>录音</nobr>
306
+ </th>
307
+ </tr>
308
+ </template>
309
+ <template partial='body'>
310
+
311
+ <td style="text-align: center">{{row.f_userinfo_code}}</td>
312
+ <td style="text-align: center">{{row.f_user_name}}</td>
313
+ <td style="text-align: center">{{row.f_meternumber}}</td>
314
+ <td style="text-align: center">{{row.f_user_phone}}</td>
315
+ <td style="text-align: center">{{row.f_check_type}}</td>
316
+
317
+ <td style="text-align: center">{{row.f_address}}</td>
318
+ <td style="text-align: center">{{row.f_entry_status}}</td>
319
+ <td style="text-align: center">{{row.f_offsite_time}}</td>
320
+ <td style="text-align: center">{{row.f_checker_name}}</td>
321
+ <td style="text-align: center">{{row.f_diaphgram_size}}</td>
322
+ <td style="text-align: center">{{row.f_aliasname}}</td>
323
+ <td style="text-align: center">{{row.f_electronic_read}}</td>
324
+ <td style="text-align: center">{{row.f_mechanical_read}}</td>
325
+ <td style="text-align: center">{{row.f_remaining_gas_volume}}</td>
326
+ <td style="text-align: center">{{row.f_remaining_amount}}</td>
327
+ <td style="text-align: center">{{row.f_repair_approved_note}}</td>
328
+ <td style="text-align: center">
329
+ <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
330
+
331
+
332
+ </td>
333
+ <td style="text-align: center" v-if="$parent.$parent.$parent.audioshow">
334
+ <!-- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>-->
335
+ <audio controls="controls" v-if="row.f_recording1_path">
336
+ <source type="audio/mpeg" :src="'rs/audio/file/'+row.f_recording1_path">
337
+ </audio>
338
+ <!--<button type="button" class="button_new-1 button_spacing" data-toggle="dropdown"
339
+ @click="$parent.$parent.$parent.print(row)">
340
+ 打印
341
+ </button>-->
342
+ </td>
343
+ </template>
344
+ </data-grid>
345
+ </criteria-paged>
346
+ <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
347
+ </div>
348
+ </div>
349
+ </template>
350
+
351
+ <script>
352
+ import {PagedList} from 'vue-client'
353
+ import Vue from 'vue'
354
+ import co from 'co'
355
+ import AppData from '../../../stores/AppData'
356
+ import * as Util from '../../Util'
357
+ import getNowDate from "../../../utils/getNowDate";
358
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
359
+ import BenzAMRRecorder from 'benz-amr-recorder'
360
+
361
+ //获取json配置文件
362
+ let asyncReady = async function (self) {
363
+ // 获取配置信息
364
+ try {
365
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
366
+ Vue.config = res.data
367
+ } catch (error) {
368
+ // 忽略704,文件找不到异常R
369
+ if (error.status !== 704) {
370
+ throw error
371
+ }
372
+ }
373
+ }
374
+
375
+ let select = function* (self) {
376
+ let http = new HttpResetClass()
377
+ let getGasman = yield http.load('POST', '/rs/search', {
378
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
379
+ userid: self.$login.f.id
380
+ }, {resolveMsg: null, rejectMsg: null})
381
+ ////tag
382
+ self.checkersid.push({label: '全部', value: ''})
383
+ getGasman.data.forEach((checker) => {
384
+ self.checkersid.push({label: checker.name, value: checker.id})
385
+ })
386
+ }
387
+
388
+ export default {
389
+ title: '安检结果查看',
390
+ data() {
391
+ let model = new PagedList('rs/sql/查找安检单', 20, {
392
+ f_plan_id: 'this.f_plan_id',
393
+ f_approved: 'this.f_approved',
394
+ f_entry_status: 'this.f_entry',
395
+ f_no_checkplan: 'this.f_no_checkplan',
396
+ f_filialeid: 'this.f_filialeid',
397
+ orderitem: "'f_offsite_time desc'"
398
+ })
399
+ model.f_check_type=''
400
+ model.f_plan_id = ''
401
+ model.f_approved = ''
402
+ model.f_entry = ''
403
+ model.f_no_checkplan = ''
404
+ model.f_filialeid = `('${this.$login.f.orgid}')`
405
+ //model.f_check_type='民用'
406
+ // let searchData={
407
+ // f_plan_id: this.model.f_checker_id==undefined?"":this.model.f_checker_id,
408
+ // f_approved: this.model.f_approved,
409
+ // f_entry_status: this.model.f_entry,
410
+ // f_no_checkplan:this.model.f_no_checkplan[0],
411
+ // f_filialeid: this.model.f_filialeid,
412
+ // //orderitem: this.model.f_offsite_time,
413
+ // //condition:this.model.condition
414
+ // }
415
+ // model.f_subcompany = this.$login.f.f_fengongsi
416
+ return {
417
+ audioshow:false,
418
+ searchData: {
419
+ condition: "1=1",
420
+ orderitem: "f_offsite_time desc",
421
+ f_plan_id: "",
422
+ f_approved: '',
423
+ f_no_checkplan: '',
424
+ f_filialeid: `('${this.$login.f.orgid}')`
425
+ },
426
+ model: model,
427
+ excelHeaders: {
428
+ //searchData:searchData,
429
+ 'f_userinfo_code': '客户编号',
430
+ 'f_user_name': '客户姓名',
431
+ 'f_meternumber':'客户表号',
432
+ 'f_user_phone':'客户电话',
433
+ 'f_check_type': '客户类型',
434
+ 'f_residential_area': '小区',
435
+ 'f_address': '客户地址',
436
+ 'f_entry_status': '安检状态',
437
+ 'f_offsite_time': '安检时间',
438
+ 'f_checker_name': '安检员',
439
+ 'f_diaphgram_size': '气表型号',
440
+ 'f_aliasname': '气表品牌',
441
+ 'f_electronic_read': '电子读数',
442
+ 'f_mechanical_read': '机械读数',
443
+ 'f_remaining_gas_volume': '剩余气量',
444
+ 'f_remaining_amount': '剩余金额',
445
+ 'f_safecheck_type':'安检类型',
446
+ 'f_repair_approved_note': '备注',
447
+ 'f_plan_name': '计划名称',
448
+ },
449
+ fun: this.$login.f,
450
+ pcds:[],
451
+ departmentArr:[],
452
+ checkerArr:[],
453
+ checkersid: [],
454
+ safetype: this.$appdata.getParam('安检类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检类型')]:[{label: '全部', value: ''}],
455
+ criteriaShow: false,
456
+ checktype: this.$appdata.getParam('用户类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]:[{label: '全部', value: ''}],
457
+ f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
458
+ showModal: false,
459
+ no_checkplans:this.$appdata.getParam('计划类型')?[{label: '全部', value: ''}, ...this.$appdata.getParam('计划类型')]:[{label: '全部', value: ''}],
460
+ f_approval_states: this.$appdata.getParam('安检单审核状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检单审核状态')]:[{label: '全部', value: ''}],
461
+ f_entry_status: this.$appdata.getParam('安检状态')?[{label: '全部', value: ''}, ...this.$appdata.getParam('安检状态')]:[{label: '全部', value: ''}],
462
+ f_checkplans: this.$appdata.getParam('有无计划')?[{label: '全部', value: ''}, ...this.$appdata.getParam('有无计划')]:[{label: '全部', value: ''}],
463
+ showcheckmsg: false,
464
+ checkInfo: {},
465
+ orderDefault: "'f_offsite_time'",
466
+ orderFields: {
467
+ f_offsite_time: 'no'
468
+ },
469
+ sliceArea: [],
470
+ cbc:[]
471
+ }
472
+ },
473
+ methods: {
474
+ //获取省市区列表
475
+ getPcd(val){
476
+ this.pcds = [{label:'全部',value:''}]
477
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
478
+ {data:{items:"*",tablename:"t_pcd",orderitem:"id",condition:`f_orgid in ${val}`}},
479
+ {resolveMsg: null, rejectMsg: null}).then((pcdlist)=>{
480
+ pcdlist.data.forEach((result)=>{
481
+ this.pcds.push({label:result.f_pcd,value:result.f_pcd})
482
+ })
483
+ })
484
+ },
485
+ getDepartment(){
486
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
487
+ items: '*',
488
+ tablename: 't_user',
489
+ condition: `rolestr like '%安检员%' and state = '在职'`,
490
+ orderitem: '1'
491
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
492
+ this.checkerArr = res.data
493
+ this.departmentArr = []
494
+ let tempArr = []
495
+ res.data.forEach((user)=>{
496
+ if (!tempArr.includes(user.f_department_name)){
497
+ tempArr.push(user.f_department_name)
498
+ this.departmentArr.push({label:user.f_department_name,value:user.f_department_name})
499
+ }
500
+ })
501
+ })
502
+ },
503
+ showaudio(){
504
+ //tag
505
+ this.audioshow=!this.audioshow
506
+ //tag
507
+ },
508
+ getmeterbook(val){
509
+ this.cbc=[]
510
+ this.cbc.push({
511
+ label:'全部',
512
+ value:''
513
+ })
514
+ if (val==''){
515
+
516
+ this.cbcs.forEach(res=>{
517
+ this.cbc.push({
518
+ label:res.f_book_name,
519
+ value:res.id
520
+ })
521
+ })
522
+ }else{
523
+ this.cbcs.forEach(res=>{
524
+ if (res.f_book_slice_area==val){
525
+ this.cbc.push({
526
+ label:res.f_book_name,
527
+ value:res.id
528
+ })
529
+ }
530
+ })
531
+ }
532
+ },
533
+ Mreadibook(val){
534
+ ////tag
535
+ ////tag
536
+ if (val){
537
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
538
+ items: 'name',
539
+ tablename: 't_zone',
540
+ condition: `parentid in ${val}`,
541
+ orderitem: 'id'
542
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
543
+ this.sliceArea=[]
544
+ this.sliceArea.push({
545
+ label:'全部',
546
+ value:''
547
+ })
548
+ res.data.forEach(ress=>{
549
+ this.sliceArea.push({
550
+ label:ress.name,
551
+ value:ress.name
552
+ })
553
+ })
554
+
555
+ })
556
+ }
557
+ },
558
+ getAllMeterBook(val){
559
+ ////tag
560
+ ////tag
561
+ this.cbcs=[]
562
+ if (val){
563
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
564
+ items: 'f_book_name,f_book_slice_area,id',
565
+ tablename: 't_meter_book',
566
+ condition: `f_filiale_id in ${val}`,
567
+ orderitem: 'id'
568
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
569
+ res.data.forEach(ress=>{
570
+ this.cbcs.push({
571
+ id:ress.id,
572
+ f_book_name:ress.f_book_name,
573
+ f_book_slice_area:ress.f_book_slice_area
574
+ })
575
+ })
576
+ this.cbc=[]
577
+ this.cbc.push({
578
+ label:'全部',
579
+ value:''
580
+ })
581
+ this.cbcs.forEach(res=>{
582
+ this.cbc.push({
583
+ label:res.f_book_name,
584
+ value:res.id
585
+ })
586
+ })
587
+ })
588
+ }
589
+ },
590
+ getRes(obj) {
591
+ this.model.f_filialeid = this.$login.convertToIn(obj.resids);
592
+ this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
593
+ this.Mreadibook(this.model.f_filialeid)
594
+ this.getAllMeterBook(this.model.f_filialeid)
595
+ this.getPcd(this.model.f_filialeid)
596
+ //this.$refs.paged.$refs.criteria.search()
597
+ },
598
+
599
+ change(row) {
600
+ // Vue.$login = {jwt: row.f_checker_id}
601
+ asyncReady(this).then(() => {
602
+ ////tag)
603
+ row.f_upload_state = '已传'
604
+ this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
605
+ }).catch(
606
+ (respanse) => {
607
+ alert('获取配置文件失败')
608
+ })
609
+ },
610
+ readConfig() {
611
+ let gen = asyncReady(this)
612
+ return co(gen)
613
+ },
614
+ showChooser() {
615
+ this.showModal = true
616
+ },
617
+ hidden() {
618
+ this.criteriaShow = !this.criteriaShow
619
+ },
620
+ refresh() {
621
+ this.$refs.paged.$refs.criteria.search()
622
+ },
623
+ ok() {
624
+ this.showModal = false
625
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
626
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
627
+ this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
628
+ }
629
+ },
630
+ cancel() {
631
+ this.showModal = false
632
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
633
+ this.model.f_plan_id=''
634
+ },
635
+ print(row) {
636
+ this.showcheckmsg = true
637
+ this.checkInfo = row
638
+ },
639
+
640
+ sort(field, rule) {
641
+ // 将所有排序方式设为不排序,实现相互排斥
642
+ for (let key in this.orderFields) {
643
+ if (key === field) {
644
+ this.orderFields[key] = rule
645
+ } else {
646
+ this.orderFields[key] = 'no'
647
+ }
648
+ }
649
+ // 如果新规则不排序,还原为默认排序
650
+ if (rule === 'no') {
651
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
652
+ } else {
653
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
654
+ }
655
+ this.search()
656
+ },
657
+ search() {
658
+ this.$refs.paged.$refs.criteria.search()
659
+ },
660
+ selfSearch(args) {
661
+ if (args.model.f_department_name){
662
+ const matchedCheckers = this.checkerArr
663
+ .filter(user => user.f_department_name === args.model.f_department_name)
664
+ .map(user => `'${user.name}'`)
665
+ if (matchedCheckers.length > 0) {
666
+ args.condition += ` and f_checker_name in (${matchedCheckers.join()})`
667
+ }
668
+ }
669
+ ////tag
670
+ //args.condition+=" and f_check_type='民用'"
671
+ if (args.model.f_entry && args.model.f_entry.length > 0) {
672
+ let valuesele = `(`
673
+ for (let i = 0; i < args.model.f_entry.length; i++) {
674
+ valuesele += `'${args.model.f_entry[i]}',`
675
+ }
676
+ args.condition += ' and f_entry_status in ' + valuesele.substring(0, valuesele.length - 1) + ')'
677
+ }
678
+ this.model.search(args.condition, args.model, args.condValue)
679
+ }
680
+ },
681
+
682
+ ready() {
683
+ ////tag
684
+ this.function = this.f
685
+ ////tag
686
+
687
+ let gen = select(this)
688
+ //this.pianqu()
689
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
690
+ co(gen)
691
+ this.getDepartment()
692
+ },
693
+ watch: {
694
+ 'model.f_no_checkplan'(val) {
695
+ if (this.model.f_no_checkplan){
696
+ this.searchData.f_no_checkplan = val
697
+ }
698
+ if (this.model.f_no_checkplan == '有计划安检') {
699
+
700
+ this.showChooser()
701
+ }
702
+ },
703
+ 'model.condition'(val) {
704
+ if (val) {
705
+ this.searchData.condition = val
706
+ }
707
+
708
+ },
709
+ /*'model.f_entry'(val) {
710
+ this.searchData.f_entry_status = val
711
+ },*/
712
+ 'model.f_plan_id'(val) {
713
+ if (val) {
714
+ this.searchData.f_plan_id = val
715
+ }
716
+ },
717
+ 'model.f_slice_area'(val) {
718
+ },
719
+ 'model.f_approved'(val) {
720
+ if (val) {
721
+ this.searchData.f_approved = val
722
+ }
723
+ },
724
+ }
725
+
726
+ }
727
+ </script>