safecheck-client 3.0.39-1 → 3.0.39-3

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