safecheck-client 3.0.34-34 → 3.0.34-35
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/QRCode/QRCodePage.vue +208 -199
- package/src/components/android/examples/SafeListExamples.vue +96 -95
- package/src/components/android/examples/UserExamples.vue +126 -125
- package/src/filiale/bayan/android/SafecheckOrderV.vue +2866 -2866
- package/src/filiale/huaran/android/SafecheckOrderV.vue +2803 -0
- package/src/filiale/huaran/android.js +12 -0
- package/src/filiale/huaran/pc/CheckBook.vue +313 -0
- package/src/filiale/huaran/pc/CheckBookAll.vue +69 -0
- package/src/filiale/huaran/pc/CheckBookArea.vue +170 -0
- package/src/filiale/huaran/pc/CheckBookCompany.vue +166 -0
- package/src/filiale/huaran/pc/CheckBookDetails.vue +196 -0
- package/src/filiale/huaran/pc/CheckBookEntry.vue +61 -0
- package/src/filiale/huaran/pc/CheckBookList.vue +386 -0
- package/src/filiale/huaran/pc/CheckBookSearchArea.vue +564 -0
- package/src/filiale/huaran/pc/CheckBookSearchUnit.vue +229 -0
- package/src/filiale/huaran/pc/CheckBookSearchUser.vue +604 -0
- package/src/filiale/huaran/pc/CheckBookUser.vue +112 -0
- package/src/filiale/huaran/pc/PaperList.vue +822 -0
- package/src/filiale/huaran/pc/PlanManage.vue +887 -0
- package/src/filiale/huaran/pc/checkPlanList.vue +419 -0
- package/src/filiale/huaran/pc/checkUserList.vue +867 -0
- package/src/filiale/huaran/pc.js +27 -0
- package/src/filiale/jingyang/android/AddPlanItem.vue +458 -458
- package/src/filiale/jingyang/android/CurrentCreate.vue +1080 -1080
- package/src/filiale/jingyang/android/SafecheckOrderV.vue +2734 -2734
- package/src/filiale/jingyang/android.js +15 -15
- package/src/filiale/weinan/android/SafecheckDevices.vue +1295 -1295
- package/src/filiale/weinan/android/SafecheckOrderV.vue +3335 -3335
- package/src/filiale/weinan/pc/DeviceChange.vue +1088 -1088
- package/src/filiale/weinan/pc.js +47 -47
- package/src/filiale/yuansheng/android/SafecheckDevices.vue +1258 -1258
- package/src/filiale/yuansheng/pc/NewCheckpaper.vue +1371 -1371
- package/src/main.js +1 -1
@@ -0,0 +1,564 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="flex-row">
|
3
|
+
<div class="basic-main">
|
4
|
+
<criteria-paged :model="model" v-ref:paged>
|
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
|
+
|
9
|
+
<div class="col-sm-3 form-group" style="margin-bottom: 0px">
|
10
|
+
<label class="font_normal_body">公  司</label>
|
11
|
+
<right-tree-safe @re-res="$parent.$parent.getResm" v-model="model.f_orgid" condition="ta.f_orgid in {}"></right-tree-safe>
|
12
|
+
</div>
|
13
|
+
<div class="form-group col-sm-3">
|
14
|
+
<label class="font_normal_body">小区名称</label>
|
15
|
+
<input type="text" class="input_search" v-model="model.f_residential_area"
|
16
|
+
style="width: 60%" placeholder="小区名称" condition="f_residential_area like '%{}%'">
|
17
|
+
</div>
|
18
|
+
<div class="form-group col-sm-3">
|
19
|
+
<label class="font_normal_body">是否在册</label>
|
20
|
+
<v-select :value.sync="model.f_is_checkbook" v-model='model.f_is_checkbook'
|
21
|
+
:value-single="true" style="width: 60%"
|
22
|
+
class="select_list select"
|
23
|
+
@change="$parent.$parent.changeState"
|
24
|
+
:options='$parent.$parent.isCheckBook' placeholder='有无所属安检册'
|
25
|
+
close-on-select
|
26
|
+
condition="{}"></v-select>
|
27
|
+
</div>
|
28
|
+
<div class="form-group col-sm-3">
|
29
|
+
<button class="button_spacing button_search" @click="search()">查询</button>
|
30
|
+
<!-- <div style="float: right" class="button_spacing"
|
31
|
+
:class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
|
32
|
+
@click="$parent.$parent.hidden()"></div>-->
|
33
|
+
</div>
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</criteria>
|
41
|
+
<data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
|
42
|
+
<template partial='head'>
|
43
|
+
<tr @dblclick.stop="">
|
44
|
+
<th>
|
45
|
+
<nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>
|
46
|
+
</th>
|
47
|
+
<th>
|
48
|
+
<nobr>省/市/区</nobr>
|
49
|
+
</th>
|
50
|
+
<th>
|
51
|
+
<nobr>街道</nobr>
|
52
|
+
</th>
|
53
|
+
<th>
|
54
|
+
<nobr>安检册/管理站</nobr>
|
55
|
+
</th>
|
56
|
+
<th>
|
57
|
+
<nobr>小区(单位)名称</nobr>
|
58
|
+
</th>
|
59
|
+
<th>
|
60
|
+
<nobr>小区(单位)地址</nobr>
|
61
|
+
</th>
|
62
|
+
<th>
|
63
|
+
<nobr>所属安检册</nobr>
|
64
|
+
</th>
|
65
|
+
</tr>
|
66
|
+
</template>
|
67
|
+
<template partial='body'>
|
68
|
+
<td style="text-align: center">
|
69
|
+
<nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
|
70
|
+
@change="$parent.$parent.$parent.checkChange(row, $event)"></input>
|
71
|
+
</nobr>
|
72
|
+
</td>
|
73
|
+
<td style="text-align: center">{{ row.f_pcd }}</td>
|
74
|
+
<td style="text-align: center">{{ row.f_street }}</td>
|
75
|
+
<td style="text-align: center">{{ row.f_slice_area }}</td>
|
76
|
+
<td style="text-align: center">{{ row.f_residential_area }}</td>
|
77
|
+
<td style="text-align: center">{{ row.f_area_address }}</td>
|
78
|
+
<td style="text-align: center">{{ row.f_check_book_name }}</td>
|
79
|
+
</template>
|
80
|
+
</data-grid>
|
81
|
+
</criteria-paged>
|
82
|
+
</div>
|
83
|
+
<modal :show.sync="showModal" :backdrop="false">
|
84
|
+
<div slot="modal-header" class="modal-header">
|
85
|
+
<h4 class="modal-title">
|
86
|
+
创建安检册
|
87
|
+
</h4>
|
88
|
+
</div>
|
89
|
+
<div slot="modal-body" class="modal-body">
|
90
|
+
<div v-if="true">
|
91
|
+
<div class="row" style="margin-top: 10px">
|
92
|
+
|
93
|
+
<div class="col-sm-12 form-group" style="margin: 0">
|
94
|
+
<role-selector-safe
|
95
|
+
@re-res="getRes"
|
96
|
+
role-name="安检员"
|
97
|
+
role-lable="安 检 员 "
|
98
|
+
:value.sync="checkBook.f_checker_name"
|
99
|
+
v-model="checkBook.f_checker_name">
|
100
|
+
</role-selector-safe>
|
101
|
+
</div>
|
102
|
+
<div class="form-group col-sm-6" style="margin-top: 20px">
|
103
|
+
<label class="font_normal_body">安检册名</label>
|
104
|
+
<input type="text" class="input_search" v-model="checkBook.f_check_book_name"
|
105
|
+
style="width: 60%" >
|
106
|
+
</div>
|
107
|
+
<div class="form-group col-sm-6" style="margin-top: 20px">
|
108
|
+
<label class="font_normal_body">执行日期</label>
|
109
|
+
<datepicker
|
110
|
+
:value.sync="checkBook.f_run_date"
|
111
|
+
style="width: 60%"
|
112
|
+
:format="'yyyy-MM-dd'"
|
113
|
+
v-model="checkBook.f_run_date"
|
114
|
+
>
|
115
|
+
</datepicker>
|
116
|
+
</div>
|
117
|
+
<div class="form-group col-sm-6" style="margin-top: 20px">
|
118
|
+
<label class="font_normal_body">执行周期</label>
|
119
|
+
<input type="number" class="input_search" v-model="checkBook.f_around_time"
|
120
|
+
style="width: 60%" >
|
121
|
+
</div>
|
122
|
+
<div class="form-group col-sm-6" style="margin-top: 20px">
|
123
|
+
<label class="font_normal_body">周期单位</label>
|
124
|
+
<v-select :value.sync="checkBook.f_around_unit" v-model='checkBook.f_around_unit'
|
125
|
+
:value-single="true" style="width: 60%"
|
126
|
+
class="select_list select"
|
127
|
+
:options='aroundUnit' placeholder=''
|
128
|
+
close-on-select></v-select>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
134
|
+
<button class="button_search" style="margin-right: 20px" @click="ok">确认</button>
|
135
|
+
<button class="button_search" @click="cancel">取消</button>
|
136
|
+
</div>
|
137
|
+
</modal>
|
138
|
+
<modal :show.sync="showModal2" :backdrop="false">
|
139
|
+
<div slot="modal-header" class="modal-header">
|
140
|
+
<h4 class="modal-title">
|
141
|
+
添加用户
|
142
|
+
</h4>
|
143
|
+
</div>
|
144
|
+
<div slot="modal-body" class="modal-body">
|
145
|
+
<div v-if="true">
|
146
|
+
<div class="row" style="margin-top: 10px">
|
147
|
+
<div class="form-group col-sm-12" style="margin-top: 20px">
|
148
|
+
<label class="font_normal_body">安 检 册</label>
|
149
|
+
<v-select :value.sync="selectBook" v-model='selectBook'
|
150
|
+
:value-single="true" style="width: 80%"
|
151
|
+
class="select_list select"
|
152
|
+
:options='checkBooks' placeholder=''
|
153
|
+
close-on-select></v-select>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
159
|
+
<button class="button_search" style="margin-right: 20px" @click="ok2">确认</button>
|
160
|
+
<button class="button_search" @click="cancel2">取消</button>
|
161
|
+
</div>
|
162
|
+
</modal>
|
163
|
+
<modal :show.sync="showModal3" :backdrop="false">
|
164
|
+
<div slot="modal-header" class="modal-header">
|
165
|
+
<h4 class="modal-title">
|
166
|
+
调整用户
|
167
|
+
</h4>
|
168
|
+
</div>
|
169
|
+
<div slot="modal-body" class="modal-body">
|
170
|
+
<div v-if="true">
|
171
|
+
<div class="row" style="margin-top: 10px;text-align: center">
|
172
|
+
<div class="form-group col-sm-12" style="margin-top: 20px">
|
173
|
+
<label class="font_normal_body">安 检 册</label>
|
174
|
+
<v-select :value.sync="selectBook" v-model='selectBook'
|
175
|
+
:value-single="true" style="width: 80%"
|
176
|
+
class="select_list select"
|
177
|
+
:options='checkBooks' placeholder=''
|
178
|
+
close-on-select></v-select>
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
<div slot="modal-footer" class="modal-footer" style="text-align: center">
|
184
|
+
<button class="button_search" style="margin-right: 20px" @click="ok3">确认</button>
|
185
|
+
<button class="button_search" @click="cancel3">取消</button>
|
186
|
+
</div>
|
187
|
+
</modal>
|
188
|
+
|
189
|
+
</div>
|
190
|
+
</template>
|
191
|
+
|
192
|
+
<script>
|
193
|
+
import {PagedList, HttpResetClass} from 'vue-client'
|
194
|
+
import * as Util from '../../../components/Util'
|
195
|
+
import bus from "../../../bus";
|
196
|
+
|
197
|
+
export default {
|
198
|
+
title: '安检册管理',
|
199
|
+
data () {
|
200
|
+
let model = new PagedList('rs/sql/safe_singleTable_OrderBy', 20,{
|
201
|
+
items: "'ta.*,tcb.f_check_book_name'",
|
202
|
+
tablename: "'t_area ta left join t_check_book tcb on ta.f_check_book_id=tcb.id'",
|
203
|
+
orderitem: "'id desc'"
|
204
|
+
})
|
205
|
+
return {
|
206
|
+
model: model,
|
207
|
+
criteriaShow: false,
|
208
|
+
excelHeaders: {},
|
209
|
+
checkBooks: [],
|
210
|
+
f_orgid: '',
|
211
|
+
bookAll: false,
|
212
|
+
bookList: [],
|
213
|
+
selectBook:'',
|
214
|
+
// init:false,
|
215
|
+
aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '月'}],
|
216
|
+
isCheckBook: [{label: '全部', value: ''}, {label: '是', value: 'f_check_book_id is not null'}, {label: '否', value: 'f_check_book_id is null'}],
|
217
|
+
isSearch: false,
|
218
|
+
checkBook: {
|
219
|
+
f_check_book_name: '',
|
220
|
+
f_run_date: '',
|
221
|
+
f_around_time: '',
|
222
|
+
f_around_unit: '',
|
223
|
+
f_create_date: Util.toStandardDateString(),
|
224
|
+
f_create_person: this.$login.f.name,
|
225
|
+
f_orgid: '',
|
226
|
+
f_checker_name: ''
|
227
|
+
},
|
228
|
+
showModal: false,
|
229
|
+
showModal2: false,
|
230
|
+
showModal3: false
|
231
|
+
}
|
232
|
+
},
|
233
|
+
beforeDestroy() {
|
234
|
+
//tag
|
235
|
+
bus.$off('fresh-area')
|
236
|
+
},
|
237
|
+
computed: {
|
238
|
+
searchData () {
|
239
|
+
return {condition: this.model.condition}
|
240
|
+
},
|
241
|
+
bookCondition () {
|
242
|
+
return this.model.condition
|
243
|
+
},
|
244
|
+
isCreateBook () {
|
245
|
+
return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is null'
|
246
|
+
},
|
247
|
+
isChangeBook () {
|
248
|
+
return this.$refs.paged.$refs.criteria.model.f_is_checkbook === 'f_check_book_name is not null'
|
249
|
+
}
|
250
|
+
},
|
251
|
+
watch:{
|
252
|
+
'bookList'(){
|
253
|
+
this.$emit('book-list',this.bookList)
|
254
|
+
},
|
255
|
+
'bookAll'(val){
|
256
|
+
if(!val){
|
257
|
+
this.bookList=[]
|
258
|
+
}
|
259
|
+
this.$emit('book-all',this.bookAll)
|
260
|
+
}
|
261
|
+
},
|
262
|
+
methods: {
|
263
|
+
async ok2() {
|
264
|
+
if (!this.selectBook) {
|
265
|
+
this.$showMessage('请选择安检册')
|
266
|
+
return
|
267
|
+
}
|
268
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
269
|
+
let userCondition = ''
|
270
|
+
if (this.bookList.length < 1) {
|
271
|
+
//tag
|
272
|
+
userCondition = this.bookCondition
|
273
|
+
} else {
|
274
|
+
//tag)
|
275
|
+
|
276
|
+
userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
277
|
+
userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
|
278
|
+
//tag
|
279
|
+
}
|
280
|
+
let addUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
|
281
|
+
FROM
|
282
|
+
t_userinfo tui
|
283
|
+
LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
|
284
|
+
LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
|
285
|
+
LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
|
286
|
+
WHERE
|
287
|
+
tui.f_user_state = '正常'
|
288
|
+
AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
|
289
|
+
AND ${userCondition}`
|
290
|
+
await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: addUser}},
|
291
|
+
{resolveMsg: null, rejectMsg: '添加用户失败'})
|
292
|
+
this.$showMessage('添加用户成功')
|
293
|
+
this.selectBook = ''
|
294
|
+
this.bookAll = false
|
295
|
+
this.bookList = []
|
296
|
+
this.showModal2 = false
|
297
|
+
this.$refs.paged.$refs.criteria.search()
|
298
|
+
}
|
299
|
+
},
|
300
|
+
async ok3() {
|
301
|
+
if (!this.selectBook) {
|
302
|
+
this.$showMessage('请选择安检册')
|
303
|
+
return
|
304
|
+
}
|
305
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
306
|
+
let userCondition = ''
|
307
|
+
if (this.bookList.length < 1) {
|
308
|
+
//tag
|
309
|
+
userCondition = this.bookCondition
|
310
|
+
} else {
|
311
|
+
//tag)
|
312
|
+
|
313
|
+
userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
314
|
+
userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
|
315
|
+
//tag
|
316
|
+
}
|
317
|
+
let upUser = `update t_user_address set f_check_book_id ='${this.selectBook}'
|
318
|
+
FROM
|
319
|
+
t_userinfo tui
|
320
|
+
LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
|
321
|
+
LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
|
322
|
+
LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
|
323
|
+
WHERE
|
324
|
+
tui.f_user_state = '正常'
|
325
|
+
AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
|
326
|
+
AND ${userCondition}`
|
327
|
+
await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: upUser}},
|
328
|
+
{resolveMsg: null, rejectMsg: '调整用户失败'})
|
329
|
+
this.$showMessage('调整用户成功')
|
330
|
+
this.selectBook = ''
|
331
|
+
this.bookAll = false
|
332
|
+
this.bookList = []
|
333
|
+
this.showModal3 = false
|
334
|
+
this.$refs.paged.$refs.criteria.search()
|
335
|
+
}
|
336
|
+
},
|
337
|
+
cancel2(){
|
338
|
+
this.selectBook = ''
|
339
|
+
this.bookAll = false
|
340
|
+
this.bookList = []
|
341
|
+
this.showModal2 = false
|
342
|
+
this.$refs.paged.$refs.criteria.search()
|
343
|
+
},
|
344
|
+
cancel3(){
|
345
|
+
this.selectBook = ''
|
346
|
+
this.bookAll = false
|
347
|
+
this.bookList = []
|
348
|
+
this.showModal3 = false
|
349
|
+
this.$refs.paged.$refs.criteria.search()
|
350
|
+
},
|
351
|
+
addUser () {
|
352
|
+
if (!this.isCreateBook) {
|
353
|
+
this.$showMessage('请选择查询未划分安检册的用户')
|
354
|
+
return
|
355
|
+
}
|
356
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
357
|
+
this.showModal2 = true
|
358
|
+
this.freshCheckBook()
|
359
|
+
return
|
360
|
+
}
|
361
|
+
this.$showMessage('请选择用户')
|
362
|
+
},
|
363
|
+
upUser () {
|
364
|
+
if (!this.isChangeBook) {
|
365
|
+
this.$showMessage('请选择查询已划分安检册的用户')
|
366
|
+
return
|
367
|
+
}
|
368
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
369
|
+
this.showModal3 = true
|
370
|
+
this.freshCheckBook()
|
371
|
+
return
|
372
|
+
}
|
373
|
+
this.$showMessage('请选择用户')
|
374
|
+
},
|
375
|
+
async delUser () {
|
376
|
+
if (!this.isChangeBook) {
|
377
|
+
this.$showMessage('请选择查询已划分安检册的用户')
|
378
|
+
return
|
379
|
+
}
|
380
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
381
|
+
let userCondition= ''
|
382
|
+
if (this.bookList.length < 1) {
|
383
|
+
//tag
|
384
|
+
userCondition = this.bookCondition
|
385
|
+
} else {
|
386
|
+
//tag)
|
387
|
+
|
388
|
+
userCondition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
389
|
+
userCondition = 'tui.f_userinfo_id in (' + userCondition + ')'
|
390
|
+
//tag
|
391
|
+
}
|
392
|
+
let delUser= `update t_user_address set f_check_book_id =null
|
393
|
+
FROM
|
394
|
+
t_userinfo tui
|
395
|
+
LEFT JOIN t_userfiles tuf ON tui.f_userinfo_id= tuf.f_userinfo_id
|
396
|
+
LEFT JOIN t_user_address tua ON tuf.f_userinfo_id = tua.f_userinfo_id
|
397
|
+
LEFT JOIN t_check_book tcb ON tua.f_check_book_id= tcb.id
|
398
|
+
WHERE
|
399
|
+
tui.f_user_state = '正常'
|
400
|
+
AND ( tuf.f_table_state= '正常' OR tuf.f_table_state= '停用' )
|
401
|
+
AND ${userCondition}`
|
402
|
+
await new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: delUser}},
|
403
|
+
{resolveMsg: null, rejectMsg: '删除安检册失败'})
|
404
|
+
this.$showMessage('从安检册删除所选用户成功')
|
405
|
+
this.selectBook = ''
|
406
|
+
this.bookAll = false
|
407
|
+
this.bookList = []
|
408
|
+
this.showModal3 = false
|
409
|
+
this.$refs.paged.$refs.criteria.search()
|
410
|
+
return
|
411
|
+
}
|
412
|
+
this.$showMessage('请选择用户')
|
413
|
+
},
|
414
|
+
beforeCreateBook () {
|
415
|
+
if (!this.isCreateBook) {
|
416
|
+
this.$showMessage('请选择查询未划分安检册的用户')
|
417
|
+
return
|
418
|
+
}
|
419
|
+
if (this.isSearch && (this.bookAll || this.bookList.length > 0) && this.model.rows.length > 0) {
|
420
|
+
this.showModal = true
|
421
|
+
return
|
422
|
+
}
|
423
|
+
this.$showMessage('请选择用户')
|
424
|
+
},
|
425
|
+
ok () {
|
426
|
+
//tag)
|
427
|
+
let condition = ''
|
428
|
+
if (!this.checkBook.f_check_book_name) {
|
429
|
+
return this.$showMessage('请填写册名')
|
430
|
+
}
|
431
|
+
if (!this.checkBook.f_checker_name) {
|
432
|
+
return this.$showMessage('请选择安检员')
|
433
|
+
}
|
434
|
+
if (!this.checkBook.f_around_time || !this.checkBook.f_around_unit) {
|
435
|
+
return this.$showMessage('请选填写周期信息')
|
436
|
+
}
|
437
|
+
if (!this.checkBook.f_run_date) {
|
438
|
+
return this.$showMessage('执行日期')
|
439
|
+
}
|
440
|
+
if (this.bookList.length < 1) {
|
441
|
+
//tag
|
442
|
+
condition = this.bookCondition
|
443
|
+
} else {
|
444
|
+
//tag)
|
445
|
+
|
446
|
+
condition = JSON.stringify(this.bookList).substring(JSON.stringify(this.bookList).indexOf('[') + 1, JSON.stringify(this.bookList).indexOf(']'))
|
447
|
+
condition = 'tui.f_userinfo_id in (' + condition + ')'
|
448
|
+
//tag
|
449
|
+
}
|
450
|
+
let data = {
|
451
|
+
checkBook: this.checkBook,
|
452
|
+
sqlStr: condition
|
453
|
+
}
|
454
|
+
new HttpResetClass().load('post', 'rs/logic/AddCheckBook', {data}).then(res => {
|
455
|
+
//tag)
|
456
|
+
if (res.data.id) {
|
457
|
+
this.$showMessage('创建成功')
|
458
|
+
this.showModal = false
|
459
|
+
this.isSearch = false
|
460
|
+
this.bookList = []
|
461
|
+
this.bookAll = false
|
462
|
+
this.freshCheckBook()
|
463
|
+
this.$refs.paged.$refs.criteria.search()
|
464
|
+
}
|
465
|
+
})
|
466
|
+
},
|
467
|
+
changeState (val) {
|
468
|
+
//tag
|
469
|
+
//tag
|
470
|
+
this.bookAll = false
|
471
|
+
this.bookList = []
|
472
|
+
if (this.$refs.paged.$refs.criteria.model.f_orgid){
|
473
|
+
this.$refs.paged.$refs.criteria.search()
|
474
|
+
}
|
475
|
+
},
|
476
|
+
cancel () {
|
477
|
+
this.bookAll = false
|
478
|
+
this.bookList = []
|
479
|
+
this.showModal = false
|
480
|
+
this.$refs.paged.$refs.criteria.search()
|
481
|
+
},
|
482
|
+
checkModel (row) {
|
483
|
+
if (this.bookAll) {
|
484
|
+
//tag)
|
485
|
+
return true
|
486
|
+
} else {
|
487
|
+
if (this.bookList.findIndex(res => res === row.id) !== -1) {
|
488
|
+
return true
|
489
|
+
} else {
|
490
|
+
return false
|
491
|
+
}
|
492
|
+
}
|
493
|
+
},
|
494
|
+
checkChange (row, e) {
|
495
|
+
//tag
|
496
|
+
if (e.target.checked) {
|
497
|
+
this.bookList.push(row.id)
|
498
|
+
} else {
|
499
|
+
this.bookList.splice(this.bookList.findIndex(res => res === row.id), 1)
|
500
|
+
}
|
501
|
+
// //tag)
|
502
|
+
},
|
503
|
+
getRes (obj) {
|
504
|
+
this.checkBook.f_orgid = obj.resids[0]
|
505
|
+
},
|
506
|
+
getResm (obj) {
|
507
|
+
this.$refs.paged.$refs.criteria.model.f_orgid = this.$login.convertToIn(obj.resids)
|
508
|
+
},
|
509
|
+
hidden () {
|
510
|
+
this.criteriaShow = !this.criteriaShow
|
511
|
+
},
|
512
|
+
selfSearch (args) {
|
513
|
+
this.isSearch = true
|
514
|
+
this.bookAll = false
|
515
|
+
this.bookList = []
|
516
|
+
|
517
|
+
console.log("查询66666666666666666")
|
518
|
+
this.$emit('book-condition',args.condition)
|
519
|
+
// if (this.$refs.paged.$refs.criteria.model.f_orgid){
|
520
|
+
// args.condition += `f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`
|
521
|
+
// }
|
522
|
+
this.model.search(args.condition, args.model)
|
523
|
+
},
|
524
|
+
freshCheckBook () {
|
525
|
+
this.checkBooks = []
|
526
|
+
new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
|
527
|
+
data: {
|
528
|
+
items: 'id,f_check_book_name',
|
529
|
+
tablename: 't_check_book',
|
530
|
+
condition: this.$refs.paged.$refs.criteria.model.f_orgid?`f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid}`:'1=1',
|
531
|
+
orderitem: 'id desc'
|
532
|
+
}
|
533
|
+
}, {resolveMsg: null, rejectMsg: null}).then(res => {
|
534
|
+
this.checkBooks.push({label: '全部', value: ''})
|
535
|
+
res.data.forEach(ress => {
|
536
|
+
this.checkBooks.push({
|
537
|
+
label: ress.f_check_book_name,
|
538
|
+
value: ress.id
|
539
|
+
})
|
540
|
+
})
|
541
|
+
})
|
542
|
+
}
|
543
|
+
},
|
544
|
+
|
545
|
+
ready () {
|
546
|
+
bus.$on('fresh-area',()=>{
|
547
|
+
console.log("进入方法",this.bookAll,this.bookList)
|
548
|
+
this.bookAll = false
|
549
|
+
this.bookList = []
|
550
|
+
this.$refs.paged.$refs.criteria.search()
|
551
|
+
})
|
552
|
+
this.$refs.paged.$refs.criteria.model.f_is_checkbook = 'f_check_book_id is null'
|
553
|
+
//tag
|
554
|
+
// this.init=true
|
555
|
+
this.freshCheckBook()
|
556
|
+
}
|
557
|
+
}
|
558
|
+
</script>
|
559
|
+
<style scoped>
|
560
|
+
/*.btn-group > .btn:first-child {*/
|
561
|
+
/* margin-left: 0;*/
|
562
|
+
/* width: 100%;*/
|
563
|
+
/*}*/
|
564
|
+
</style>
|