safecheck-client 3.0.34-2 → 3.0.34-21

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 (80) hide show
  1. package/package.json +3 -3
  2. package/src/App.vue +31 -31
  3. package/src/components/android/AndroidDefectDeal.vue +1 -0
  4. package/src/components/android/AreaPlan.vue +1 -7
  5. package/src/components/android/ImgSelfAndroid.vue +181 -181
  6. package/src/components/android/PaperFeedback.vue +1 -1
  7. package/src/components/android/PaperFeedbackTemp.vue +1 -1
  8. package/src/components/android/SafePlanItem.vue +509 -509
  9. package/src/components/android/SafecheckDevices.vue +2 -2
  10. package/src/components/android/SafecheckDevicesTemp.vue +1 -1
  11. package/src/components/android/userinfo/SafecheckUserInfo.vue +1 -1
  12. package/src/components/safecheckNew/android/SafecheckOrderV.vue +2731 -2731
  13. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -633
  14. package/src/filiale/baiyin/android/SafecheckOrderV.vue +2798 -0
  15. package/src/filiale/baiyin/android.js +1 -0
  16. package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -485
  17. package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -1067
  18. package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
  19. package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -63
  20. package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -1052
  21. package/src/filiale/baiyin/pc/PaperList.vue +790 -790
  22. package/src/filiale/baiyin/pc/PlanChooser.vue +167 -167
  23. package/src/filiale/baiyin/pc/PlanManage.vue +834 -834
  24. package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -348
  25. package/src/filiale/baiyin/pc/RoleSelector.vue +160 -160
  26. package/src/filiale/bayan/android/PaperFeedback.vue +1 -1
  27. package/src/filiale/bayan/android/SafecheckDevices.vue +1 -1
  28. package/src/filiale/bayan/android/SafecheckUserInfo.vue +1 -1
  29. package/src/filiale/dexin/android/SafecheckDevices.vue +1 -1
  30. package/src/filiale/hanzhong/android/PaperFeedback.vue +1 -1
  31. package/src/filiale/hanzhong/android/SafecheckDevices.vue +1 -1
  32. package/src/filiale/hanzhong/android/SafecheckUserInfo.vue +1 -1
  33. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -0
  34. package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -1298
  35. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2811 -0
  36. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -0
  37. package/src/filiale/jiaxian/android.js +13 -10
  38. package/src/filiale/jiaxian/pc.js +12 -12
  39. package/src/filiale/jingyang/android/PaperFeedback.vue +1 -1
  40. package/src/filiale/jingyang/android/SafecheckUserInfo.vue +1 -1
  41. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +476 -468
  42. package/src/filiale/pingxiang/android/PaperFeedback.vue +1 -1
  43. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1270
  44. package/src/filiale/qingjian/android/SafecheckDevices.vue +1 -1
  45. package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2844
  46. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +1 -1
  47. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +2696 -2696
  48. package/src/filiale/shiquan/android/SafecheckDevices.vue +1 -1
  49. package/src/filiale/siyang/android/SafecheckUserInfo.vue +1 -1
  50. package/src/filiale/siyang/pc/NewCheckpaper.vue +1938 -1938
  51. package/src/filiale/siyang/pc/checkUserList.vue +786 -786
  52. package/src/filiale/siyang/pc.js +16 -16
  53. package/src/filiale/weinan/android/SafecheckDevices.vue +1307 -1295
  54. package/src/filiale/weinan/android/SafecheckOrderV.vue +11 -1
  55. package/src/filiale/weinan/pc/DefectPaperNew.vue +31 -0
  56. package/src/filiale/wuan/android/SafecheckOrderV.vue +4 -1
  57. package/src/filiale/wuan/android/SafecheckUserInfo.vue +6 -5
  58. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +8 -11
  59. package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +8 -13
  60. package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
  61. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1 -1
  62. package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
  63. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +2 -2
  64. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2845 -2845
  65. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +1 -1
  66. package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +8 -13
  67. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +269 -269
  68. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
  69. package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1128 -1128
  70. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +972 -972
  71. package/src/filiale/yangchunboneng/pc/PaperList.vue +773 -773
  72. package/src/filiale/yongzhou/android/PaperFeedback.vue +1 -1
  73. package/src/filiale/yongzhou/android/SafecheckDevices.vue +1 -1
  74. package/src/filiale/yongzhou/android/SafecheckUserInfo.vue +1 -1
  75. package/src/filiale/yuansheng/android/SwitchValve.vue +322 -322
  76. package/src/filiale/yuansheng/android.js +17 -17
  77. package/src/filiale/yunchengminsheng/android/PaperFeedback.vue +1 -1
  78. package/src/filiale/yunchengminsheng/android/SafecheckDevices.vue +1 -1
  79. package/src/filiale/yunchengminsheng/android/SafecheckUserInfo.vue +1 -1
  80. package/src/main.js +1 -1
@@ -505,7 +505,6 @@ export default {
505
505
  HostApp.__this__ = null
506
506
  },
507
507
  takePic (type ,prop, title) {
508
- const obj = HostApp.getGpsDetailAddress()
509
508
  HostApp.__callback__ = this.cameraCallBack
510
509
  HostApp.__this__ = this
511
510
  //tag
@@ -531,6 +530,7 @@ export default {
531
530
  }
532
531
  let jingweidu = ''
533
532
  if (this.$parent.$parent.is_has_jingweidu == 'true'){
533
+ const obj = HostApp.getGpsDetailAddress()
534
534
  jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
535
535
  }
536
536
  let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
@@ -303,15 +303,7 @@ export default {
303
303
  {label: '左表', value: '左表'},
304
304
  {label: '右表', value: '右表'}
305
305
  ],
306
- check_states: [
307
- {label: '请选择安检状态', value: ''},
308
- {label: '入户', value: '入户'},
309
- {label: '到访不遇', value: '到访不遇'},
310
- {label: '拒检', value: '拒检'},
311
- {label: '停用', value: '停用'},
312
- {label: '未通气', value: '未通气'},
313
- {label: '拆除', value: '拆除'}
314
- ],
306
+ check_states: Vue.$appdata.getParam('安检状态'),
315
307
  last_check_states: [
316
308
  {label: '请选择上次安检状态', value: ''},
317
309
  {label: '入户', value: '入户'},
@@ -437,10 +429,13 @@ export default {
437
429
  condition += " and f_offsite_time < '"+this.$refs.paged.$refs.cri.model.f_end_date +"'"
438
430
  }
439
431
  }
440
- if(this.$refs.paged.$refs.cri.model.f_state){
441
- if(this.$refs.paged.$refs.cri.model.f_state.toString().trim()){
442
- condition += " and f_entry_status = '"+this.$refs.paged.$refs.cri.model.f_state +"'"
443
- }
432
+ if(this.$refs.paged.$refs.cri.model.f_state.length > 0){
433
+ let last_check_state = ''
434
+ this.$refs.paged.$refs.cri.model.f_state.forEach((item) => {
435
+ last_check_state = last_check_state + `'${item}',`
436
+ })
437
+ last_check_state = last_check_state.slice(0, -1)
438
+ condition += " and f_entry_status in ("+last_check_state+")"
444
439
  }
445
440
  if(this.$refs.paged.$refs.cri.model.f_user_type){
446
441
  if(this.$refs.paged.$refs.cri.model.f_user_type.toString().trim()){
@@ -1,269 +1,269 @@
1
- <template>
2
- <div class="auto select-overspread">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div class="form-group col-sm-3" >
8
- <label class="font_normal_body">客户编号</label>
9
- <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
10
- condition="tui.f_userinfo_code = '{}'" @keyup.enter="search()">
11
- </div>
12
- <div class="form-group col-sm-3">
13
- <label class="font_normal_body">客户名称</label>
14
- <input type="text" class="input_search" v-model="model.f_user_name"
15
- style="width: 60%" placeholder="客户名称" condition="tui.f_user_name like '%{}%'">
16
- </div>
17
- <div class="form-group col-sm-3" >
18
- <label class="font_normal_body">地址</label>
19
- <input type="text" class="input_search" v-model="model.f_address"
20
- style="width: 60%" placeholder="地址" condition="tua.f_address like '%{}%'">
21
- </div>
22
- <div class="form-group col-sm-3" >
23
- <label class="font_normal_body">小区名称</label>
24
- <input type="text" class="input_search" v-model="model.f_residential_area"
25
- style="width: 60%" placeholder="小区名称" condition="tua.f_residential_area like '%{}%'">
26
- </div>
27
- </div>
28
- <div class="row">
29
- <div class="form-group col-sm-3" >
30
- <label class="font_normal_body">客户类型</label>
31
- <v-select :value.sync="model.f_user_type" v-model='model.f_user_type'
32
- :value-single="true" style="width: 60%"
33
- class="select_list select"
34
- :options='$parent.$parent.userTypes' placeholder='客户类型'
35
- close-on-select
36
- condition="tuf.f_user_type ='{}'"></v-select>
37
- </div>
38
- <div class="form-group col-sm-3">
39
- <label class="font_normal_body">通气开始</label>
40
- <datepicker
41
- :value.sync="model.f_gas_start"
42
- placeholder='开始时间' style="width: 60%"
43
- :disabled-days-of-week="[]"
44
- :format="'yyyy-MM-dd'"
45
- :show-rest-button="reset"
46
- v-model="model.f_gas_start"
47
- condition="tui.f_uservent_date > ='{} 00:00:00'">
48
- </datepicker>
49
- </div>
50
- <div class="form-group col-sm-3">
51
- <label class="font_normal_body">通气结束</label>
52
- <datepicker
53
- :value.sync="model.f_gas_end"
54
- placeholder='结束时间' style="width: 60%"
55
- :disabled-days-of-week="[]"
56
- :format="'yyyy-MM-dd'"
57
- :show-rest-button="reset"
58
- v-model="model.f_gas_end"
59
- condition="tui.f_uservent_date <= '{} 23:59:59'">
60
- </datepicker>
61
- </div>
62
- </div>
63
- <div class="row">
64
- <div class="form-group col-sm-2 button-range" >
65
- <export-excel-safe :data="$parent.$parent.searchData"
66
- :field="$parent.$parent.excelHeaders"
67
- :choose-col="true"
68
- sqlurl="rs/logic/SafeExportExcel" sql-name="getUserByCheckBook" template-name='安检册明细'></export-excel-safe>
69
- <button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
70
- <button class="button_spacing button_search-1" @click='$parent.$parent.removes()' v-if="$parent.$parent.bookList.length>0" >移出安检册</button>
71
- </div>
72
- </div>
73
- </div>
74
- </criteria>
75
- <data-grid :model="model" class="table_sy" partial='list' v-ref:grid >
76
- <template partial='head' >
77
- <tr>
78
- <th>
79
- <nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"></input>全选</nobr>
80
- </th>
81
- <th><nobr>序号</nobr></th>
82
- <th><nobr>用户编号</nobr></th>
83
- <th><nobr>用户姓名</nobr></th>
84
- <th><nobr>用户电话</nobr></th>
85
- <th><nobr>用户地址</nobr></th>
86
- <th><nobr>通气日期</nobr></th>
87
- <th><nobr>操作</nobr></th>
88
- </tr>
89
- </template>
90
- <template partial='body' >
91
- <tr >
92
- <td style="text-align: center">
93
- <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
94
- @change="$parent.$parent.$parent.checkChange(row, $event)"></input>
95
- </nobr>
96
- </td>
97
- <td style="text-align:center;">{{$index+1}}</td>
98
- <td style="text-align:center">{{row.f_userinfo_code}}</td>
99
- <td style="text-align:center">{{row.f_user_name}}</td>
100
- <td style="text-align:center">{{row.f_user_phone}}</td>
101
- <td style="text-align:center">{{row.f_address}}</td>
102
- <td style="text-align:center">{{row.f_uservent_date}}</td>
103
- <td style="text-align: center">
104
- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.remove(row)'>移出安检册</button>
105
- </td>
106
- </tr>
107
- </template>
108
- <template partial='foot'></template>
109
- </data-grid>
110
- </criteria-paged>
111
- </div>
112
- </template>
113
-
114
- <script>
115
- import {PagedList} from 'vue-client'
116
- import bus from "../../../bus";
117
-
118
- export default {
119
- title: '安检记录列表',
120
- props: ['row'],
121
- data () {
122
- return {
123
- checkAll:false,
124
- rowdata: this.row,
125
- bookList: [],
126
- searchData: {
127
- condition: "1=1"
128
- },
129
- excelHeaders: {
130
- 'f_userinfo_code': '客户编号',
131
- 'f_user_name': '客户姓名',
132
- 'f_user_phone':'客户电话',
133
- 'f_address': '客户地址',
134
- 'f_uservent_date': '通气日期'
135
- },
136
- userTypes: [{label: '全部', value: ''},{label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
137
- model: new PagedList('rs/sql/getUserByCheckBook', 50)
138
- }
139
- },
140
- ready(){
141
- if(this.row){
142
- let condition=''
143
- if(this.row.id){
144
-
145
- condition = `tua.f_check_book_id ='${this.row.id}'`
146
- }else{
147
- condition = `1=1`
148
- }
149
-
150
- // if(this.row.f_check_book_type1=='小区'){
151
- // this.model.url = 'rs/sql/getUserByCheckBook'
152
- // condition = `ta.f_check_book_id =${this.row.f_check_book_id} and ta.id=${this.row.id}`
153
- // }else{
154
- // this.model.url = 'rs/sql/getUserByCheckBookCompany'
155
- // condition = `tc.f_check_book_id =${this.row.f_check_book_id} and tc.id=${this.row.id}`
156
- // }
157
- this.model.search(condition)
158
- this.searchData.condition = condition
159
- //只显示用户页面
160
- this.row.f_check_book_type='用户'
161
- }
162
- },
163
- watch: {
164
- 'checkAll'(val){
165
- if(!val){
166
- this.bookList=[]
167
- }
168
- //如果是全选,则查询这个安检册下的用户
169
-
170
- if(val){
171
- //遍历this.model.rows
172
- this.model.rows.forEach(res=>{
173
- this.bookList.push(res.f_userinfo_id)
174
- })
175
- }
176
- },
177
- 'row' (val) {
178
- if (val) {
179
- this.rowdata = val
180
- let condition=''
181
- condition = `tua.f_check_book_id ='${val.id}'`
182
- // if(this.row.f_check_book_type1=='小区'){
183
- // condition = `ta.f_check_book_id =${val.f_check_book_id} and ta.id=${val.id}`
184
- // }else{
185
- // condition = `tc.f_check_book_id =${val.f_check_book_id} and tc.id=${val.id}`
186
- // }
187
- this.model.search(condition)
188
- }
189
- }
190
- },
191
- methods: {
192
- setCheckAll() {
193
- this.checkAll=this.checkAll?false:true;
194
- // 全选改变后,清空选中数据
195
- this.bookList = []
196
- },
197
- checkModel (row) {
198
- if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
199
- return true
200
- } else {
201
- return false
202
- }
203
- },
204
- checkChange (row, e) {
205
- if (e.target.checked) {
206
- this.bookList.push(row.f_userinfo_id)
207
- } else {
208
- this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
209
- }
210
- },
211
- removes(){
212
-
213
- if(this.bookList.length===0){
214
- this.$showMessage('请选择用户')
215
- return
216
- }
217
- this.$showMessage("确认将用户移出此安检册?",['confirm']).then(res=>{
218
- if(res==='confirm'){
219
- //for遍历this.bookList,将每个用户移出安检册
220
- var c="("
221
- for(var i=0;i<this.bookList.length;i++){
222
- c+=`'${this.bookList[i]}'`+","
223
- }
224
- //去掉最后一个逗号
225
- c=c.substring(0,c.length-1)
226
- c+=")"
227
- let data = {
228
- condition: c,
229
- f_book_id: this.row.id
230
- }
231
- this.$http.post('rs/logic/removesCheckBookUser', {data: data}).then(res=>{
232
- this.$showMessage('移出成功')
233
- this.$refs.paged.$refs.criteria.search()
234
- })
235
- }
236
- })
237
- },
238
- remove(row){
239
-
240
- this.$showMessage("确认移出此安检册?",['confirm']).then(res=>{
241
- if(res==='confirm'){
242
- let data = {
243
- f_userinfo_id: row.f_userinfo_id,
244
- f_book_id: this.row.id
245
- }
246
- this.$http.post('rs/logic/removeUserByCheckBook', {data: data}).then(res=>{
247
- this.$showMessage('移出成功')
248
- this.$refs.paged.$refs.criteria.search()
249
- })
250
- }
251
- })
252
- },
253
- selfSearch (args) {
254
- if (this.rowdata.id) {
255
- args.condition +=` and tua.f_check_book_id ='${this.rowdata.id}'`
256
- // if(this.rowdata.f_check_book_type1=='小区'){
257
- // args.condition += `and ta.f_check_book_id =${this.rowdata.f_check_book_id} and ta.id=${this.rowdata.id}`
258
- // }else{
259
- // args.condition += `and tc.f_check_book_id =${this.rowdata.f_check_book_id} and tc.id=${this.rowdata.id}`
260
- // }
261
- this.model.search(args.condition)
262
- this.searchData.condition = args.condition
263
- } else {
264
- this.$showMessage('请选择片区')
265
- }
266
- }
267
- }
268
- }
269
- </script>
1
+ <template>
2
+ <div class="auto select-overspread">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div class="form-group col-sm-3" >
8
+ <label class="font_normal_body">客户编号</label>
9
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
10
+ condition="tui.f_userinfo_code = '{}'" @keyup.enter="search()">
11
+ </div>
12
+ <div class="form-group col-sm-3">
13
+ <label class="font_normal_body">客户名称</label>
14
+ <input type="text" class="input_search" v-model="model.f_user_name"
15
+ style="width: 60%" placeholder="客户名称" condition="tui.f_user_name like '%{}%'">
16
+ </div>
17
+ <div class="form-group col-sm-3" >
18
+ <label class="font_normal_body">地址</label>
19
+ <input type="text" class="input_search" v-model="model.f_address"
20
+ style="width: 60%" placeholder="地址" condition="tua.f_address like '%{}%'">
21
+ </div>
22
+ <div class="form-group col-sm-3" >
23
+ <label class="font_normal_body">小区名称</label>
24
+ <input type="text" class="input_search" v-model="model.f_residential_area"
25
+ style="width: 60%" placeholder="小区名称" condition="tua.f_residential_area like '%{}%'">
26
+ </div>
27
+ </div>
28
+ <div class="row">
29
+ <div class="form-group col-sm-3" >
30
+ <label class="font_normal_body">客户类型</label>
31
+ <v-select :value.sync="model.f_user_type" v-model='model.f_user_type'
32
+ :value-single="true" style="width: 60%"
33
+ class="select_list select"
34
+ :options='$parent.$parent.userTypes' placeholder='客户类型'
35
+ close-on-select
36
+ condition="tuf.f_user_type ='{}'"></v-select>
37
+ </div>
38
+ <div class="form-group col-sm-3">
39
+ <label class="font_normal_body">通气开始</label>
40
+ <datepicker
41
+ :value.sync="model.f_gas_start"
42
+ placeholder='开始时间' style="width: 60%"
43
+ :disabled-days-of-week="[]"
44
+ :format="'yyyy-MM-dd'"
45
+ :show-rest-button="reset"
46
+ v-model="model.f_gas_start"
47
+ condition="tui.f_uservent_date > ='{} 00:00:00'">
48
+ </datepicker>
49
+ </div>
50
+ <div class="form-group col-sm-3">
51
+ <label class="font_normal_body">通气结束</label>
52
+ <datepicker
53
+ :value.sync="model.f_gas_end"
54
+ placeholder='结束时间' style="width: 60%"
55
+ :disabled-days-of-week="[]"
56
+ :format="'yyyy-MM-dd'"
57
+ :show-rest-button="reset"
58
+ v-model="model.f_gas_end"
59
+ condition="tui.f_uservent_date <= '{} 23:59:59'">
60
+ </datepicker>
61
+ </div>
62
+ </div>
63
+ <div class="row">
64
+ <div class="form-group col-sm-2 button-range" >
65
+ <export-excel-safe :data="$parent.$parent.searchData"
66
+ :field="$parent.$parent.excelHeaders"
67
+ :choose-col="true"
68
+ sqlurl="rs/logic/SafeExportExcel" sql-name="getUserByCheckBook" template-name='安检册明细'></export-excel-safe>
69
+ <button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
70
+ <button class="button_spacing button_search-1" @click='$parent.$parent.removes()' v-if="$parent.$parent.bookList.length>0" >移出安检册</button>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </criteria>
75
+ <data-grid :model="model" class="table_sy" partial='list' v-ref:grid >
76
+ <template partial='head' >
77
+ <tr>
78
+ <th>
79
+ <nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"></input>全选</nobr>
80
+ </th>
81
+ <th><nobr>序号</nobr></th>
82
+ <th><nobr>用户编号</nobr></th>
83
+ <th><nobr>用户姓名</nobr></th>
84
+ <th><nobr>用户电话</nobr></th>
85
+ <th><nobr>用户地址</nobr></th>
86
+ <th><nobr>通气日期</nobr></th>
87
+ <th><nobr>操作</nobr></th>
88
+ </tr>
89
+ </template>
90
+ <template partial='body' >
91
+ <tr >
92
+ <td style="text-align: center">
93
+ <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
94
+ @change="$parent.$parent.$parent.checkChange(row, $event)"></input>
95
+ </nobr>
96
+ </td>
97
+ <td style="text-align:center;">{{$index+1}}</td>
98
+ <td style="text-align:center">{{row.f_userinfo_code}}</td>
99
+ <td style="text-align:center">{{row.f_user_name}}</td>
100
+ <td style="text-align:center">{{row.f_user_phone}}</td>
101
+ <td style="text-align:center">{{row.f_address}}</td>
102
+ <td style="text-align:center">{{row.f_uservent_date}}</td>
103
+ <td style="text-align: center">
104
+ <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.remove(row)'>移出安检册</button>
105
+ </td>
106
+ </tr>
107
+ </template>
108
+ <template partial='foot'></template>
109
+ </data-grid>
110
+ </criteria-paged>
111
+ </div>
112
+ </template>
113
+
114
+ <script>
115
+ import {PagedList} from 'vue-client'
116
+ import bus from "../../../bus";
117
+
118
+ export default {
119
+ title: '安检记录列表',
120
+ props: ['row'],
121
+ data () {
122
+ return {
123
+ checkAll:false,
124
+ rowdata: this.row,
125
+ bookList: [],
126
+ searchData: {
127
+ condition: "1=1"
128
+ },
129
+ excelHeaders: {
130
+ 'f_userinfo_code': '客户编号',
131
+ 'f_user_name': '客户姓名',
132
+ 'f_user_phone':'客户电话',
133
+ 'f_address': '客户地址',
134
+ 'f_uservent_date': '通气日期'
135
+ },
136
+ userTypes: [{label: '全部', value: ''},{label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
137
+ model: new PagedList('rs/sql/getUserByCheckBook', 50)
138
+ }
139
+ },
140
+ ready(){
141
+ if(this.row){
142
+ let condition=''
143
+ if(this.row.id){
144
+
145
+ condition = `tua.f_check_book_id ='${this.row.id}'`
146
+ }else{
147
+ condition = `1=1`
148
+ }
149
+
150
+ // if(this.row.f_check_book_type1=='小区'){
151
+ // this.model.url = 'rs/sql/getUserByCheckBook'
152
+ // condition = `ta.f_check_book_id =${this.row.f_check_book_id} and ta.id=${this.row.id}`
153
+ // }else{
154
+ // this.model.url = 'rs/sql/getUserByCheckBookCompany'
155
+ // condition = `tc.f_check_book_id =${this.row.f_check_book_id} and tc.id=${this.row.id}`
156
+ // }
157
+ this.model.search(condition)
158
+ this.searchData.condition = condition
159
+ //只显示用户页面
160
+ this.row.f_check_book_type='用户'
161
+ }
162
+ },
163
+ watch: {
164
+ 'checkAll'(val){
165
+ if(!val){
166
+ this.bookList=[]
167
+ }
168
+ //如果是全选,则查询这个安检册下的用户
169
+
170
+ if(val){
171
+ //遍历this.model.rows
172
+ this.model.rows.forEach(res=>{
173
+ this.bookList.push(res.f_userinfo_id)
174
+ })
175
+ }
176
+ },
177
+ 'row' (val) {
178
+ if (val) {
179
+ this.rowdata = val
180
+ let condition=''
181
+ condition = `tua.f_check_book_id ='${val.id}'`
182
+ // if(this.row.f_check_book_type1=='小区'){
183
+ // condition = `ta.f_check_book_id =${val.f_check_book_id} and ta.id=${val.id}`
184
+ // }else{
185
+ // condition = `tc.f_check_book_id =${val.f_check_book_id} and tc.id=${val.id}`
186
+ // }
187
+ this.model.search(condition)
188
+ }
189
+ }
190
+ },
191
+ methods: {
192
+ setCheckAll() {
193
+ this.checkAll=this.checkAll?false:true;
194
+ // 全选改变后,清空选中数据
195
+ this.bookList = []
196
+ },
197
+ checkModel (row) {
198
+ if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
199
+ return true
200
+ } else {
201
+ return false
202
+ }
203
+ },
204
+ checkChange (row, e) {
205
+ if (e.target.checked) {
206
+ this.bookList.push(row.f_userinfo_id)
207
+ } else {
208
+ this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
209
+ }
210
+ },
211
+ removes(){
212
+
213
+ if(this.bookList.length===0){
214
+ this.$showMessage('请选择用户')
215
+ return
216
+ }
217
+ this.$showMessage("确认将用户移出此安检册?",['confirm']).then(res=>{
218
+ if(res==='confirm'){
219
+ //for遍历this.bookList,将每个用户移出安检册
220
+ var c="("
221
+ for(var i=0;i<this.bookList.length;i++){
222
+ c+=`'${this.bookList[i]}'`+","
223
+ }
224
+ //去掉最后一个逗号
225
+ c=c.substring(0,c.length-1)
226
+ c+=")"
227
+ let data = {
228
+ condition: c,
229
+ f_book_id: this.row.id
230
+ }
231
+ this.$http.post('rs/logic/removesCheckBookUser', {data: data}).then(res=>{
232
+ this.$showMessage('移出成功')
233
+ this.$refs.paged.$refs.criteria.search()
234
+ })
235
+ }
236
+ })
237
+ },
238
+ remove(row){
239
+
240
+ this.$showMessage("确认移出此安检册?",['confirm']).then(res=>{
241
+ if(res==='confirm'){
242
+ let data = {
243
+ f_userinfo_id: row.f_userinfo_id,
244
+ f_book_id: this.row.id
245
+ }
246
+ this.$http.post('rs/logic/removeUserByCheckBook', {data: data}).then(res=>{
247
+ this.$showMessage('移出成功')
248
+ this.$refs.paged.$refs.criteria.search()
249
+ })
250
+ }
251
+ })
252
+ },
253
+ selfSearch (args) {
254
+ if (this.rowdata.id) {
255
+ args.condition +=` and tua.f_check_book_id ='${this.rowdata.id}'`
256
+ // if(this.rowdata.f_check_book_type1=='小区'){
257
+ // args.condition += `and ta.f_check_book_id =${this.rowdata.f_check_book_id} and ta.id=${this.rowdata.id}`
258
+ // }else{
259
+ // args.condition += `and tc.f_check_book_id =${this.rowdata.f_check_book_id} and tc.id=${this.rowdata.id}`
260
+ // }
261
+ this.model.search(args.condition)
262
+ this.searchData.condition = args.condition
263
+ } else {
264
+ this.$showMessage('请选择片区')
265
+ }
266
+ }
267
+ }
268
+ }
269
+ </script>