safecheck-client 3.0.34-1 → 3.0.34-2
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.
- package/package.json +1 -1
- package/src/components/android/ImgSelfAndroid.vue +181 -181
- package/src/components/android/SafePlanItem.vue +509 -509
- package/src/components/safecheckNew/android/SafecheckOrderV.vue +2731 -2731
- package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -633
- package/src/filiale/baiyin/android.js +10 -10
- package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -485
- package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -1067
- package/src/filiale/baiyin/pc/DefectListNew.vue +597 -597
- package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -63
- package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -1052
- package/src/filiale/baiyin/pc/PaperList.vue +790 -790
- package/src/filiale/baiyin/pc/PlanChooser.vue +167 -167
- package/src/filiale/baiyin/pc/PlanManage.vue +834 -834
- package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -348
- package/src/filiale/baiyin/pc/RoleSelector.vue +160 -160
- package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -1298
- package/src/filiale/jiaxian/android.js +10 -10
- package/src/filiale/jiaxian/pc.js +12 -12
- package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1270
- package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2844
- package/src/filiale/rongchuang/android/SafecheckOrderV.vue +2696 -2696
- package/src/filiale/siyang/pc/NewCheckpaper.vue +1938 -1938
- package/src/filiale/siyang/pc/checkUserList.vue +786 -786
- package/src/filiale/siyang/pc.js +16 -16
- package/src/filiale/weinan/android/SafecheckDevices.vue +1295 -1295
- package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
- package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1731 -1731
- package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
- package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1332 -1332
- package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2845 -2845
- package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -887
- package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +269 -269
- package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
- package/src/filiale/yangchunboneng/pc/DefectPaperNew.vue +1128 -1077
- package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +29 -1
- package/src/filiale/yangchunboneng/pc/PaperList.vue +773 -744
- package/src/filiale/yuansheng/android/SwitchValve.vue +322 -322
- package/src/filiale/yuansheng/android.js +17 -17
- package/src/main.js +1 -1
@@ -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="
|
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="
|
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.
|
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
|
-
'
|
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>
|