safecheck-client 4.0.1-4 → 4.0.1-41

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