safecheck-client 3.0.39-14 → 3.0.39-15

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