safecheck-client 3.0.33-87 → 3.0.33-88

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.
@@ -1,347 +1,347 @@
1
- <template>
2
- <div class="flex">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row" v-show="!$parent.$parent.$parent.showItemAll">
7
- <div :class="$parent.$parent.style2" style="margin: 0px">
8
- <role-selector-safe
9
- role-name="安检员"
10
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
11
- @re-res="$parent.$parent.getRes"
12
- :value.sync="model.f_checker_id"
13
- v-model="model.f_checker_id"
14
- :value-multiple="true"
15
- condition=" f_checker_name in {}">
16
- </role-selector-safe>
17
- </div>
18
- <div :class="$parent.$parent.style">
19
- <label class="font_normal_body">安检册名称</label>
20
- <v-select :value.sync="model.f_check_book_id" v-model='model.f_check_book_id'
21
- :value-single="true" style="width: 60%"
22
- class="select_list select"
23
- :options='$parent.$parent.checkBooks' placeholder='安检册名称'
24
- close-on-select
25
- condition="tcb.id ='{}'"></v-select>
26
- </div>
27
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
28
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
29
- <button type="button" class="button_new button_spacing" @click="$parent.$parent.add()">新增安检册</button>
30
- <button type="button" class="button_new button_spacing" @click="$parent.$parent.showModal = true">安检册用户管理</button>
31
- <div style="float: right" class="button_spacing"
32
- v-show="$parent.$parent.$parent.showItem ||$parent.$parent.$parent.showItemUser"
33
- :class="{'button_shrink_left':$parent.$parent.$parent.showItemAll,'button_shrink_right':!$parent.$parent.$parent.showItemAll}"
34
- @click="($parent.$parent.$parent.showItem =false) || ($parent.$parent.$parent.showItemUser =false)"></div>
35
- </div>
36
- </div>
37
-
38
-
39
- <div class="row" v-show="$parent.$parent.$parent.showItemAll">
40
- <div :class="$parent.$parent.style2" style="margin: 0px">
41
- <role-selector-safe
42
- role-name="安检员"
43
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
44
- @re-res="$parent.$parent.getRes"
45
- :value.sync="model.f_checker_id"
46
- v-model="model.f_checker_id"
47
- :value-multiple="true"
48
- condition=" f_checker_name in {}">
49
- </role-selector-safe>
50
- </div>
51
- <div :class="$parent.$parent.style">
52
- <label class="font_normal_body">片区名</label>
53
- <v-select :value.sync="model.f_check_book_id" v-model='model.f_check_book_id'
54
- :value-single="true" style="width: 60%"
55
- class="select_list select"
56
- :options='$parent.$parent.checkBooks' placeholder='片区名称'
57
- close-on-select
58
- condition="tcb.id ='{}'"></v-select>
59
- </div>
60
- <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
61
- <button type="button" class="button_search button_spacing" @click="search()">查询</button>
62
- <button type="button" class="button_new button_spacing" @click="$parent.$parent.add()">新增片区</button>
63
- <button type="button" class="button_new button_spacing" @click="$parent.$parent.showModal = true">片区用户管理</button>
64
- <div style="float: right" class="button_spacing"
65
- v-show="$parent.$parent.$parent.showItem ||$parent.$parent.$parent.showItemUser"
66
- :class="{'button_shrink_left':$parent.$parent.$parent.showItemAll,'button_shrink_right':!$parent.$parent.$parent.showItemAll}"
67
- @click="($parent.$parent.$parent.showItem =false) || ($parent.$parent.$parent.showItemUser =false)"></div>
68
- <!-- <div style="float: right" class="button_spacing"-->
69
- <!-- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"-->
70
- <!-- @click="$parent.$parent.hidden()">-->
71
- <!-- </div>-->
72
- </div>
73
-
74
- </div>
75
-
76
- </div>
77
- </criteria>
78
- <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
79
- <template partial='head'>
80
- <tr>
81
- <th>
82
- <nobr>所属安检员</nobr>
83
- </th>
84
- <th>
85
- <nobr>安检册名称</nobr>
86
- </th>
87
- <th>
88
- <nobr>用户类型</nobr>
89
- </th>
90
- <th>
91
- <nobr>创建日期</nobr>
92
- </th>
93
- <th>
94
- <nobr>创建人</nobr>
95
- </th>
96
- <th>
97
- <nobr>执行日期</nobr>
98
- </th>
99
- <th>
100
- <nobr>执行周期</nobr>
101
- </th>
102
- <th>
103
- <nobr>用户数量</nobr>
104
- </th>
105
- <!-- <th>-->
106
- <!-- <nobr>已下发</nobr>-->
107
- <!-- </th>-->
108
- <!-- <th>-->
109
- <!-- <nobr>未下发</nobr>-->
110
- <!-- </th>-->
111
- <th>
112
- <nobr>已检</nobr>
113
- </th>
114
- <th>
115
- <nobr>未检</nobr>
116
- </th>
117
- </tr>
118
- </template>
119
- <template partial='body'>
120
- <td style="text-align: center;">{{ row.f_checker_name }}</td>
121
- <td style="text-align: center;">{{ row.f_check_book_name }}</td>
122
- <td style="text-align: center;">{{ row.f_user_type }}</td>
123
- <td style="text-align: center;">{{ row.f_create_date }}</td>
124
- <td style="text-align: center;">{{ row.f_create_person }}</td>
125
- <td style="text-align: center;">{{ row.f_run_date }}</td>
126
- <td style="text-align: center;">{{ row.f_around_time }}{{ row.f_around_unit }}</td>
127
- <td style="text-align: center;"><button @click.stop="$parent.$parent.$parent.details(row)" class="btn btn-link"><b>{{row.num}}</b></button></td>
128
- <!-- <td style="text-align: center;">{{ row.xiafa }}</td>-->
129
- <!-- <td style="text-align: center;">{{ row.f_user_type =='民用'?row.num-row.xiafa:row.num4-row.xiafa }}</td>-->
130
- <td style="text-align: center;">{{ row.yijian }}</td>
131
- <td style="text-align: center;">{{ row.weijian }}</td>
132
- </template>
133
- </data-grid>
134
- </criteria-paged>
135
- <modal :show.sync="showModal" :backdrop="false" id="checkbookEntryShow">
136
- <article slot="modal-body" class="modal-body">
137
- <check-book-entry v-if="showModal" @select-changed="selectedEntry"></check-book-entry>
138
- </article>
139
- <footer slot="modal-footer">
140
- </footer>
141
-
142
- </modal>
143
- <modal :show.sync="showSendModal" :backdrop="false" width="90%" height="90%">
144
- <article slot="modal-body" class="modal-body" style="height: 80vh">
145
- <check-book-search-user-list v-if="showSendModal" :row="checkBookRow" :bookrow="checkBookRow" :needprops="needprops":userlogin="userlogin"></check-book-search-user-list>
146
- </article>
147
- <footer slot="modal-footer">
148
- </footer>
149
-
150
- </modal>
151
- </div>
152
- </template>
153
-
154
- <script>
155
- import {PagedList} from 'vue-client'
156
- import {HttpResetClass} from 'vue-client'
157
- import bus from '../../../bus'
158
- export default {
159
- title: '用户安检情况',
160
- data () {
161
- return {
162
- showSendModal:false,
163
- searchData: {
164
- condition: '1=1'
165
- },
166
- showCaoZuo:false,
167
- userlogin:{
168
- id:this.$login.f.id,
169
- name:this.$login.f.name,
170
- orgid:this.$login.f.orgid,
171
- orgstr:this.$login.f.orgs,
172
- },
173
- checkBooks:[],
174
- bookTypes: [{label: '全部', value: ''}, {label: '用户', value: '用户'}, {label: '小区', value: '小区'}],
175
- userTypes: [{label: '全部', value: ''}, {label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
176
- aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '日'}],
177
- showModal:false,
178
- excelHeaders: {
179
-
180
- 'f_userinfo_code': '用户编号',
181
- 'f_user_name': '用户名称',
182
- 'f_user_phone': '用户电话',
183
- 'f_meternumber': '用户表号',
184
- 'f_user_type': '用户类型',
185
- 'f_last_checker': '安检员',
186
- 'f_residential_area': '小区名称',
187
- 'f_address': '地址',
188
- 'f_last_check_date': '安检日期',
189
- 'f_last_check_state': '安检状态',
190
- 'f_last_check_result': '安检结果'
191
- },
192
- model: new PagedList('rs/sql/QueryCheckBook', 20),
193
- checkBookRow:{},
194
- checkBook :{
195
- f_check_book_name: '',
196
- f_run_date: '',
197
- f_around_time: '',
198
- f_around_unit: '',
199
- f_create_date: '',
200
- f_create_person: '',
201
- f_orgid: '',
202
- f_checker_name: ''
203
- }
204
- }
205
- },
206
- props: {
207
- style: {
208
- type: String,
209
- default: 'col-sm-2 form-group'
210
- },
211
- style2: {
212
- type: String,
213
- default: 'col-sm-4 form-group'
214
- },
215
- needprops:{
216
- type: Object,
217
- default:{}
218
- },
219
- showtype:{
220
- type: String
221
- }
222
- },
223
- ready () {
224
- bus.$on('fresh-main',()=>{
225
- console.log("进入方法")
226
- this.$refs.paged.$refs.criteria.search()
227
- })
228
- this.freshCheckBook()
229
- },
230
- beforeDestroy() {
231
- //tag
232
- bus.$off('fresh-main')
233
- },
234
- methods: {
235
- send(row){
236
- console.log("7758521",row)
237
- this.checkBookRow = row
238
- this.showSendModal = true
239
- },
240
- freshCheckBook () {
241
- this.checkBooks = []
242
- new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
243
- data: {
244
- items: 'id,f_check_book_name',
245
- tablename: 't_check_book',
246
- condition: this.$refs.paged.$refs.criteria.model.f_orgid?`f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid} `:`1=1`,
247
- orderitem: 'id desc'
248
- }
249
- }, {resolveMsg: null, rejectMsg: null}).then(res => {
250
- this.checkBooks.push({label: '全部', value: ''})
251
- res.data.forEach(ress => {
252
- this.checkBooks.push({
253
- label: ress.f_check_book_name,
254
- value: ress.id
255
- })
256
- })
257
- })
258
- },
259
- selectedEntry(){
260
- console.log("666666666666666666")
261
- },
262
- details(row){
263
-
264
- this.$emit('showdetails' ,row)
265
- },
266
- add(){
267
- this.$emit('addbook')
268
- },
269
- ok (){
270
- //tag
271
- let http = new HttpResetClass()
272
- http.load('POST', 'rs/logic/safeEntity', {data:{tableName:'t_check_book',entityData:this.checkBook}},
273
- {resolveMsg: '更新片区信息成功', rejectMsg: '保存片区信息成功'}).then(res=>{
274
- if (res.data.code===200){
275
- this.$showMessage('修改成功')
276
- this.showModal = false
277
- this.checkBook= {}
278
- }
279
- })
280
- },
281
- cancel () {
282
- this.showModal = false
283
- this.checkBook= {}
284
- },
285
- updateCheckBook(val){
286
- this.checkBook=val
287
- this.showModal = true
288
- },
289
- search (args) {
290
- // //tag
291
- this.$parent.showItem = false
292
- this.$parent.showItemUser = false
293
- args.condition += ` and f_orgid in ${this.model.f_filialeids}`
294
- // args.condition += ` and (tcb.f_user_type ='民用' or tcb.f_user_type ='非民用') `
295
- return this.model.search(args.condition, args.model)
296
- },
297
- getRes (obj) {
298
- this.model.f_filialeids = this.$login.convertToIn(obj.resids)
299
- },
300
- async deleteCheckBook (val) {
301
- try {
302
- //tag
303
- let http = new HttpResetClass()
304
- let upAddress = `update t_user_address set f_check_book_id = null where f_check_book_id = '${val.id}'`
305
- let delCheckBook= `delete from t_check_book where id ='${val.id}'`
306
- await http.load('POST', 'rs/logic/runSQL', {data: {sql: upAddress}},
307
- {resolveMsg: null, rejectMsg: '删除片区失败'})
308
- await http.load('POST', 'rs/logic/runSQL', {data: {sql: delCheckBook}},
309
- {resolveMsg: null, rejectMsg: '删除片区失败'})
310
- this.$showMessage('删除成功')
311
- this.$refs.paged.$refs.criteria.search()
312
- }catch (e) {
313
- this.$showMessage('删除失败',e)
314
- }
315
- }
316
- },
317
-
318
- watch: {
319
- 'model.rows'(val){
320
- console.log("997997",val)
321
- this.showCaoZuo = val.filter(item=>item.f_check_book_type!='小区').length>0
322
- }
323
- },
324
- computed: {
325
- selected () {
326
- return this.$refs.paged.$refs.grid.selected
327
- }
328
- }
329
- }
330
- </script>
331
- <style scoped>
332
- .newcolor {
333
- color: red;
334
- }
335
-
336
- .table th {
337
- background-color: #f2f6fa;
338
- color: black;
339
- }
340
- </style>
341
- <style lang="less">
342
- #checkbookEntryShow {
343
- .modal-dialog {
344
- width: 80%;
345
- }
346
- }
347
- </style>
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row" v-show="!$parent.$parent.$parent.showItemAll">
7
+ <div :class="$parent.$parent.style2" style="margin: 0px">
8
+ <role-selector-safe
9
+ role-name="安检员"
10
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
11
+ @re-res="$parent.$parent.getRes"
12
+ :value.sync="model.f_checker_id"
13
+ v-model="model.f_checker_id"
14
+ :value-multiple="true"
15
+ condition=" f_checker_name in {}">
16
+ </role-selector-safe>
17
+ </div>
18
+ <div :class="$parent.$parent.style">
19
+ <label class="font_normal_body">安检册名称</label>
20
+ <v-select :value.sync="model.f_check_book_id" v-model='model.f_check_book_id'
21
+ :value-single="true" style="width: 60%"
22
+ class="select_list select"
23
+ :options='$parent.$parent.checkBooks' placeholder='安检册名称'
24
+ close-on-select
25
+ condition="tcb.id ='{}'"></v-select>
26
+ </div>
27
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
28
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
29
+ <button type="button" class="button_new button_spacing" @click="$parent.$parent.add()">新增安检册</button>
30
+ <button type="button" class="button_new button_spacing" @click="$parent.$parent.showModal = true">安检册用户管理</button>
31
+ <div style="float: right" class="button_spacing"
32
+ v-show="$parent.$parent.$parent.showItem ||$parent.$parent.$parent.showItemUser"
33
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItemAll,'button_shrink_right':!$parent.$parent.$parent.showItemAll}"
34
+ @click="($parent.$parent.$parent.showItem =false) || ($parent.$parent.$parent.showItemUser =false)"></div>
35
+ </div>
36
+ </div>
37
+
38
+
39
+ <div class="row" v-show="$parent.$parent.$parent.showItemAll">
40
+ <div :class="$parent.$parent.style2" style="margin: 0px">
41
+ <role-selector-safe
42
+ role-name="安检员"
43
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
44
+ @re-res="$parent.$parent.getRes"
45
+ :value.sync="model.f_checker_id"
46
+ v-model="model.f_checker_id"
47
+ :value-multiple="true"
48
+ condition=" f_checker_name in {}">
49
+ </role-selector-safe>
50
+ </div>
51
+ <div :class="$parent.$parent.style">
52
+ <label class="font_normal_body">片区名</label>
53
+ <v-select :value.sync="model.f_check_book_id" v-model='model.f_check_book_id'
54
+ :value-single="true" style="width: 60%"
55
+ class="select_list select"
56
+ :options='$parent.$parent.checkBooks' placeholder='片区名称'
57
+ close-on-select
58
+ condition="tcb.id ='{}'"></v-select>
59
+ </div>
60
+ <div :class="$parent.$parent.style" style="width: auto;margin-top:8px;float: right">
61
+ <button type="button" class="button_search button_spacing" @click="search()">查询</button>
62
+ <button type="button" class="button_new button_spacing" @click="$parent.$parent.add()">新增片区</button>
63
+ <button type="button" class="button_new button_spacing" @click="$parent.$parent.showModal = true">片区用户管理</button>
64
+ <div style="float: right" class="button_spacing"
65
+ v-show="$parent.$parent.$parent.showItem ||$parent.$parent.$parent.showItemUser"
66
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItemAll,'button_shrink_right':!$parent.$parent.$parent.showItemAll}"
67
+ @click="($parent.$parent.$parent.showItem =false) || ($parent.$parent.$parent.showItemUser =false)"></div>
68
+ <!-- <div style="float: right" class="button_spacing"-->
69
+ <!-- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"-->
70
+ <!-- @click="$parent.$parent.hidden()">-->
71
+ <!-- </div>-->
72
+ </div>
73
+
74
+ </div>
75
+
76
+ </div>
77
+ </criteria>
78
+ <data-grid :model="model" partial="list" class="list_area table_sy" v-ref:grid>
79
+ <template partial='head'>
80
+ <tr>
81
+ <th>
82
+ <nobr>所属安检员</nobr>
83
+ </th>
84
+ <th>
85
+ <nobr>安检册名称</nobr>
86
+ </th>
87
+ <th>
88
+ <nobr>用户类型</nobr>
89
+ </th>
90
+ <th>
91
+ <nobr>创建日期</nobr>
92
+ </th>
93
+ <th>
94
+ <nobr>创建人</nobr>
95
+ </th>
96
+ <th>
97
+ <nobr>执行日期</nobr>
98
+ </th>
99
+ <th>
100
+ <nobr>执行周期</nobr>
101
+ </th>
102
+ <th>
103
+ <nobr>用户数量</nobr>
104
+ </th>
105
+ <!-- <th>-->
106
+ <!-- <nobr>已下发</nobr>-->
107
+ <!-- </th>-->
108
+ <!-- <th>-->
109
+ <!-- <nobr>未下发</nobr>-->
110
+ <!-- </th>-->
111
+ <th>
112
+ <nobr>已入户</nobr>
113
+ </th>
114
+ <th>
115
+ <nobr>未入户</nobr>
116
+ </th>
117
+ </tr>
118
+ </template>
119
+ <template partial='body'>
120
+ <td style="text-align: center;">{{ row.f_checker_name }}</td>
121
+ <td style="text-align: center;">{{ row.f_check_book_name }}</td>
122
+ <td style="text-align: center;">{{ row.f_user_type }}</td>
123
+ <td style="text-align: center;">{{ row.f_create_date }}</td>
124
+ <td style="text-align: center;">{{ row.f_create_person }}</td>
125
+ <td style="text-align: center;">{{ row.f_run_date }}</td>
126
+ <td style="text-align: center;">{{ row.f_around_time }}{{ row.f_around_unit }}</td>
127
+ <td style="text-align: center;"><button @click.stop="$parent.$parent.$parent.details(row)" class="btn btn-link"><b>{{row.num}}</b></button></td>
128
+ <!-- <td style="text-align: center;">{{ row.xiafa }}</td>-->
129
+ <!-- <td style="text-align: center;">{{ row.f_user_type =='民用'?row.num-row.xiafa:row.num4-row.xiafa }}</td>-->
130
+ <td style="text-align: center;">{{ row.num3 }}</td>
131
+ <td style="text-align: center;">{{ row.num4 }}</td>
132
+ </template>
133
+ </data-grid>
134
+ </criteria-paged>
135
+ <modal :show.sync="showModal" :backdrop="false" id="checkbookEntryShow">
136
+ <article slot="modal-body" class="modal-body">
137
+ <check-book-entry v-if="showModal" @select-changed="selectedEntry"></check-book-entry>
138
+ </article>
139
+ <footer slot="modal-footer">
140
+ </footer>
141
+
142
+ </modal>
143
+ <modal :show.sync="showSendModal" :backdrop="false" width="90%" height="90%">
144
+ <article slot="modal-body" class="modal-body" style="height: 80vh">
145
+ <check-book-search-user-list v-if="showSendModal" :row="checkBookRow" :bookrow="checkBookRow" :needprops="needprops":userlogin="userlogin"></check-book-search-user-list>
146
+ </article>
147
+ <footer slot="modal-footer">
148
+ </footer>
149
+
150
+ </modal>
151
+ </div>
152
+ </template>
153
+
154
+ <script>
155
+ import {PagedList} from 'vue-client'
156
+ import {HttpResetClass} from 'vue-client'
157
+ import bus from '../../../bus'
158
+ export default {
159
+ title: '用户安检情况',
160
+ data () {
161
+ return {
162
+ showSendModal:false,
163
+ searchData: {
164
+ condition: '1=1'
165
+ },
166
+ showCaoZuo:false,
167
+ userlogin:{
168
+ id:this.$login.f.id,
169
+ name:this.$login.f.name,
170
+ orgid:this.$login.f.orgid,
171
+ orgstr:this.$login.f.orgs,
172
+ },
173
+ checkBooks:[],
174
+ bookTypes: [{label: '全部', value: ''}, {label: '用户', value: '用户'}, {label: '小区', value: '小区'}],
175
+ userTypes: [{label: '全部', value: ''}, {label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
176
+ aroundUnit: [{label: '年', value: '年'}, {label: '月', value: '月'}, {label: '日', value: '日'}],
177
+ showModal:false,
178
+ excelHeaders: {
179
+
180
+ 'f_userinfo_code': '用户编号',
181
+ 'f_user_name': '用户名称',
182
+ 'f_user_phone': '用户电话',
183
+ 'f_meternumber': '用户表号',
184
+ 'f_user_type': '用户类型',
185
+ 'f_last_checker': '安检员',
186
+ 'f_residential_area': '小区名称',
187
+ 'f_address': '地址',
188
+ 'f_last_check_date': '安检日期',
189
+ 'f_last_check_state': '安检状态',
190
+ 'f_last_check_result': '安检结果'
191
+ },
192
+ model: new PagedList('rs/sql/QueryCheckBook', 20),
193
+ checkBookRow:{},
194
+ checkBook :{
195
+ f_check_book_name: '',
196
+ f_run_date: '',
197
+ f_around_time: '',
198
+ f_around_unit: '',
199
+ f_create_date: '',
200
+ f_create_person: '',
201
+ f_orgid: '',
202
+ f_checker_name: ''
203
+ }
204
+ }
205
+ },
206
+ props: {
207
+ style: {
208
+ type: String,
209
+ default: 'col-sm-2 form-group'
210
+ },
211
+ style2: {
212
+ type: String,
213
+ default: 'col-sm-4 form-group'
214
+ },
215
+ needprops:{
216
+ type: Object,
217
+ default:{}
218
+ },
219
+ showtype:{
220
+ type: String
221
+ }
222
+ },
223
+ ready () {
224
+ bus.$on('fresh-main',()=>{
225
+ console.log("进入方法")
226
+ this.$refs.paged.$refs.criteria.search()
227
+ })
228
+ this.freshCheckBook()
229
+ },
230
+ beforeDestroy() {
231
+ //tag
232
+ bus.$off('fresh-main')
233
+ },
234
+ methods: {
235
+ send(row){
236
+ console.log("7758521",row)
237
+ this.checkBookRow = row
238
+ this.showSendModal = true
239
+ },
240
+ freshCheckBook () {
241
+ this.checkBooks = []
242
+ new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
243
+ data: {
244
+ items: 'id,f_check_book_name',
245
+ tablename: 't_check_book',
246
+ condition: this.$refs.paged.$refs.criteria.model.f_orgid?`f_orgid in ${this.$refs.paged.$refs.criteria.model.f_orgid} `:`1=1`,
247
+ orderitem: 'id desc'
248
+ }
249
+ }, {resolveMsg: null, rejectMsg: null}).then(res => {
250
+ this.checkBooks.push({label: '全部', value: ''})
251
+ res.data.forEach(ress => {
252
+ this.checkBooks.push({
253
+ label: ress.f_check_book_name,
254
+ value: ress.id
255
+ })
256
+ })
257
+ })
258
+ },
259
+ selectedEntry(){
260
+ console.log("666666666666666666")
261
+ },
262
+ details(row){
263
+
264
+ this.$emit('showdetails' ,row)
265
+ },
266
+ add(){
267
+ this.$emit('addbook')
268
+ },
269
+ ok (){
270
+ //tag
271
+ let http = new HttpResetClass()
272
+ http.load('POST', 'rs/logic/safeEntity', {data:{tableName:'t_check_book',entityData:this.checkBook}},
273
+ {resolveMsg: '更新片区信息成功', rejectMsg: '保存片区信息成功'}).then(res=>{
274
+ if (res.data.code===200){
275
+ this.$showMessage('修改成功')
276
+ this.showModal = false
277
+ this.checkBook= {}
278
+ }
279
+ })
280
+ },
281
+ cancel () {
282
+ this.showModal = false
283
+ this.checkBook= {}
284
+ },
285
+ updateCheckBook(val){
286
+ this.checkBook=val
287
+ this.showModal = true
288
+ },
289
+ search (args) {
290
+ // //tag
291
+ this.$parent.showItem = false
292
+ this.$parent.showItemUser = false
293
+ args.condition += ` and f_orgid in ${this.model.f_filialeids}`
294
+ // args.condition += ` and (tcb.f_user_type ='民用' or tcb.f_user_type ='非民用') `
295
+ return this.model.search(args.condition, args.model)
296
+ },
297
+ getRes (obj) {
298
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids)
299
+ },
300
+ async deleteCheckBook (val) {
301
+ try {
302
+ //tag
303
+ let http = new HttpResetClass()
304
+ let upAddress = `update t_user_address set f_check_book_id = null where f_check_book_id = '${val.id}'`
305
+ let delCheckBook= `delete from t_check_book where id ='${val.id}'`
306
+ await http.load('POST', 'rs/logic/runSQL', {data: {sql: upAddress}},
307
+ {resolveMsg: null, rejectMsg: '删除片区失败'})
308
+ await http.load('POST', 'rs/logic/runSQL', {data: {sql: delCheckBook}},
309
+ {resolveMsg: null, rejectMsg: '删除片区失败'})
310
+ this.$showMessage('删除成功')
311
+ this.$refs.paged.$refs.criteria.search()
312
+ }catch (e) {
313
+ this.$showMessage('删除失败',e)
314
+ }
315
+ }
316
+ },
317
+
318
+ watch: {
319
+ 'model.rows'(val){
320
+ console.log("997997",val)
321
+ this.showCaoZuo = val.filter(item=>item.f_check_book_type!='小区').length>0
322
+ }
323
+ },
324
+ computed: {
325
+ selected () {
326
+ return this.$refs.paged.$refs.grid.selected
327
+ }
328
+ }
329
+ }
330
+ </script>
331
+ <style scoped>
332
+ .newcolor {
333
+ color: red;
334
+ }
335
+
336
+ .table th {
337
+ background-color: #f2f6fa;
338
+ color: black;
339
+ }
340
+ </style>
341
+ <style lang="less">
342
+ #checkbookEntryShow {
343
+ .modal-dialog {
344
+ width: 80%;
345
+ }
346
+ }
347
+ </style>