safecheck-client 3.0.33-66 → 3.0.33-69

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,448 +1,450 @@
1
- <template>
2
- <div class="flex-row">
3
- <div class="basic-main">
4
- <criteria-paged :model="model" v-ref:paged @sort="sort">
5
- <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <div class="col-sm-4" style="width: 20%">
9
- <label class="font_normal_body">客户编号</label>
10
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
- style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
12
- </div>
13
- <div class="col-sm-4" style="width: 20%">
14
- <label class="font_normal_body">客户名称</label>
15
- <input type="text" class="input_search" v-model="model.f_user_name"
16
- style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
17
- </div>
18
- <div class="col-sm-4" style="width: 20%">
19
- <label class="font_normal_body">客户电话</label>
20
- <input type="text" class="input_search" v-model="model.f_user_phone"
21
- style="width: 60%" placeholder="客户电话" condition="f_user_phone like '%{}%'">
22
- </div>
23
- <div class="col-sm-4" style="width: 20%">
24
- <label class="font_normal_body">安检计划</label>
25
- <input type="text" class="input_search" v-model="$parent.$parent.model.f_check_plan.f_plan_name"
26
- @click="$parent.$parent.showChooser"
27
- style="width: 60%" placeholder="安检计划" readonly="readonly">
28
- </div>
29
- <div class="col-sm-4" style="width: auto;margin-top:8px;float: right">
30
- <export-excel-safe :data="$parent.$parent.searchData"
31
- :field="$parent.$parent.excelHeaders"
32
- :choose-col="true"
33
- sqlurl="rs/logic/SafeExportExcel" sql-name="查找安检单" template-name='安检计划明细'></export-excel-safe>
34
- <button class="button_spacing button_search" @click="search()">查询</button>
35
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
36
- </div>
37
- </div>
38
-
39
- <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
40
- <label class="font_normal_body">安检状态</label>
41
- <v-select id="f_entry"
42
- class="select_list select"
43
- placeholder='安检状态' style="width: 60%"
44
- v-model='model.f_entry'
45
- :value.sync="$parent.$parent.model.f_entry"
46
- :options='$parent.$parent.f_entry_status'
47
- condition=""
48
- :value-single="true"
49
- close-on-select clear-button></v-select>
50
- </div>
51
- <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
52
- <label class="font_normal_body">入户起始</label>
53
- <datepicker
54
- class="select_list select"
55
- :value.sync="model.f_check_start"
56
- placeholder='开始时间' style="width: 60%"
57
- :disabled-days-of-week="[]"
58
- :format="'yyyy-MM-dd'"
59
- :show-rest-button="reset"
60
- v-model="model.f_check_start"
61
- condition="f_offsite_time > ='{} 00:00:00'">
62
- </datepicker>
63
- </div>
64
- <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
65
- <label class="font_normal_body">入户截止</label>
66
- <datepicker
67
- :value.sync="model.f_check_end"
68
- placeholder='结束时间' style="width: 60%"
69
- :disabled-days-of-week="[]"
70
- :format="'yyyy-MM-dd'"
71
- :show-rest-button="reset"
72
- v-model="model.f_check_end"
73
- condition="f_offsite_time <= '{} 23:59:59'">
74
- </datepicker>
75
- </div>
76
- <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
77
- <label class="font_normal_body">安&nbsp;&nbsp;检&nbsp;员</label>
78
- <v-select :value.sync="model.f_checker_id" v-model='model.f_checker_id'
79
- :value-single="true" style="width: 60%"
80
- class="select_list select"
81
- :options='$parent.$parent.checkersid' placeholder='安检员'
82
- close-on-select
83
- condition="f_checker_id = '{}'"></v-select>
84
- </div>
85
- <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
86
- <label class="font_normal_body">所属区域</label>
87
- <v-select :value.sync="model.f_street" v-model='model.f_street'
88
- :value-single="true" style="width: 60%"
89
- class="select_list select"
90
- :options='$parent.$parent.streets' placeholder='所属区域'
91
- close-on-select
92
- condition="f_street = '{}'"></v-select>
93
- </div>
94
- <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
95
- <label class="font_normal_body">上传起始</label>
96
- <datepicker
97
- class="select_list select"
98
- :value.sync="model.f_check_start1"
99
- placeholder='开始时间' style="width: 60%"
100
- :disabled-days-of-week="[]"
101
- :format="'yyyy-MM-dd 00:00:00'"
102
- :show-rest-button="reset"
103
- v-model="model.f_check_start1"
104
- condition="f_upload_date > ='{}'">
105
- </datepicker>
106
- </div>
107
- <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
108
- <label class="font_normal_body">上传截止</label>
109
- <datepicker
110
- :value.sync="model.f_check_end1"
111
- placeholder='结束时间' style="width: 60%"
112
- :disabled-days-of-week="[]"
113
- :format="'yyyy-MM-dd 23:59:59'"
114
- :show-rest-button="reset"
115
- v-model="model.f_check_end1"
116
- condition="f_upload_date <= '{}'">
117
- </datepicker>
118
- </div>
119
- <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
120
- <div slot="modal-header" class="modal-header">
121
- <h4 class="modal-title">
122
- 选择计划
123
- </h4>
124
- </div>
125
- <div slot="modal-body" class="modal-body">
126
- <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
127
- </div>
128
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
129
- <button class="button_search" @click="$parent.$parent.ok">确认</button>
130
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
131
- </div>
132
- </modal>
133
- </div>
134
- </criteria>
135
- <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid >
136
- <template partial='head'>
137
- <tr>
138
- <th><nobr>客户编号</nobr></th>
139
- <th><nobr>客户名称</nobr></th>
140
- <th><nobr>客户类型</nobr></th>
141
- <th><data-order field="f_address" name="客户地址"></data-order></th>
142
- <th><nobr>安检状态</nobr></th>
143
- <th><data-order field="f_onsite_time" name="入户时间"></data-order></th>
144
- <th><nobr>上传时间</nobr></th>
145
- <th><nobr>安检员</nobr></th>
146
- <th><nobr>操作</nobr></th>
147
- </tr>
148
- </template>
149
- <template partial='body'>
150
-
151
- <td style="text-align: center">{{row.f_userinfo_code}}</td>
152
- <td style="text-align: center">{{row.f_user_name}}</td>
153
- <td style="text-align: center">{{row.f_check_type}}</td>
154
- <td style="text-align: center">{{row.f_address}}</td>
155
- <td style="text-align: center">{{row.f_entry_status}}</td>
156
- <td style="text-align: center">{{row.f_onsite_time}}</td>
157
- <td style="text-align: center">{{row.f_upload_date}}</td>
158
- <td style="text-align: center">{{row.f_checker_name}}</td>
159
- <td style="text-align: center">
160
- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
161
- <button type="button" class="button_export button_spacing" style="float: right;margin-top: 8px" @click="$parent.$parent.$parent.addpic(row)" >添加照片</button>
162
- <!--<button type="button" class="button_new-1 button_spacing" data-toggle="dropdown"
163
- @click="$parent.$parent.$parent.print(row)">
164
- 打印
165
- </button>-->
166
- </td>
167
- </template>
168
- </data-grid>
169
- </criteria-paged>
170
- <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
171
- </div>
172
- <modal :show.sync="pic" v-ref:modal backdrop="true">
173
- <header slot="modal-header" class="modal-header">
174
- 上传照片
175
- </header>
176
- <article slot="modal-body" class="modal-body">
177
- <div class="from-group">
178
- <safecheck-file-upload v-ref:file
179
- :issearch="false"
180
- :blodid="bolbid"
181
- :isupload = "true"
182
- :isdelete="true"
183
- >
184
- </safecheck-file-upload>
185
- </div>
186
- </article>
187
- <footer slot="modal-footer" class="modal-footer">
188
- <button type="button" class="btn btn-success" @click='piclose'>关闭</button>
189
- </footer>
190
- </modal>
191
- </div>
192
- </template>
193
-
194
- <script>
195
- import {PagedList} from 'vue-client'
196
- import Vue from 'vue'
197
- import co from 'co'
198
- import AppData from '../../stores/AppData'
199
- import * as Util from '../Util'
200
- import getNowDate from "../../utils/getNowDate";
201
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
202
-
203
- //获取json配置文件
204
- let asyncReady = async function (self) {
205
- // 获取配置信息
206
- try {
207
- let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
208
- Vue.config = res.data
209
- } catch (error) {
210
- // 忽略704,文件找不到异常R
211
- if (error.status !== 704) {
212
- throw error
213
- }
214
- }
215
- }
216
-
217
- let select = function* (self) {
218
- let http = new HttpResetClass()
219
- let getGasman = yield http.load('POST','/rs/search', {
220
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
221
- userid: self.$login.f.id
222
- }, {resolveMsg: null, rejectMsg: null})
223
- //tag
224
- self.checkersid.push({label: '全部', value: ''})
225
- getGasman.data.forEach((checker) => {
226
- self.checkersid.push({label: checker.name, value: checker.id})
227
- })
228
- }
229
-
230
- export default {
231
- title: '非民用送气结果查看',
232
- data() {
233
- let model = new PagedList('rs/sql/查找安检单', 20, {
234
- f_plan_id: 'this.f_plan_id',
235
- f_approved: 'this.f_approved',
236
- f_entry_status: 'this.f_entry',
237
- f_no_checkplan: 'this.f_no_checkplan',
238
- f_filialeid: 'this.f_filialeid',
239
- f_street: 'this.f_street',
240
- orderitem: "'f_offsite_time desc'"
241
- })
242
- model.f_plan_id = ''
243
- model.f_approved = ''
244
- model.f_entry = ''
245
- model.f_no_checkplan = ''
246
- model.f_filialeid = this.$login.f.orgid
247
- model.f_user_type='非民用'
248
- // let searchData={
249
- // f_plan_id: this.model.f_checker_id==undefined?"":this.model.f_checker_id,
250
- // f_approved: this.model.f_approved,
251
- // f_entry_status: this.model.f_entry,
252
- // f_no_checkplan:this.model.f_no_checkplan[0],
253
- // f_filialeid: this.model.f_filialeid,
254
- // //orderitem: this.model.f_offsite_time,
255
- // //condition:this.model.condition
256
- // }
257
- // model.f_subcompany = this.$login.f.f_fengongsi
258
- return {
259
- searchData: {
260
- condition:"f_check_type='非民用'",
261
- orderitem: "f_offsite_time desc",
262
- f_plan_id: "",
263
- f_approved: '',
264
- f_entry_status: '',
265
- f_no_checkplan: '',
266
- f_filialeid:this.$login.f.orgid
267
- },
268
- model: model,
269
- //searchData:searchData,
270
- excelHeaders: {
271
- 'f_userinfo_code': '客户编号',
272
- 'f_user_name': '客户姓名',
273
- 'f_user_phone':'客户电话',
274
- 'f_check_type': '客户类型',
275
- 'f_address': '客户地址',
276
- 'f_entry_status':'安检状态',
277
- 'f_offsite_time':'安检时间',
278
- 'f_checker_name': '安检员'
279
- },
280
- fun: this.$login.f,
281
- checkersid: [],
282
- safetype:[{label:"全部",value:""},
283
- {label:"送气",value:"送气类型"},
284
- {label:"年度普检",value:"年度普检"}],
285
- criteriaShow:false,
286
- streets:[],
287
- showModal: false,
288
- f_approval_states: this.$appdata.getParam('安检单审核状态'),
289
- f_entry_status: this.$appdata.getParam('安检状态'),
290
- f_checkplans: this.$appdata.getParam('有无计划'),
291
- showcheckmsg: false,
292
- checkInfo: {},
293
- orderDefault: "'f_offsite_time'",
294
- orderFields: {
295
- f_offsite_time: 'no'
296
- },
297
- bolbid:null,
298
- pic:false,
299
- }
300
- },
301
- methods: {
302
- piclose(){
303
- this.pic=false
304
- },
305
- addpic(row){
306
- this.bolbid=row.id
307
- this.pic=true
308
- },
309
- change(row) {
310
- //Vue.$login = {jwt: row.f_checker_id}
311
- asyncReady(this).then(() => {
312
- row.f_upload_state = '已传'
313
- if (row.f_check_type == '民用') {
314
- this.$goto('Asp-paper-message', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
315
- } else {
316
- this.$goto('Asp-paper-message', {
317
- f_plan_id: row.f_check_plan_id,
318
- item: row,
319
- role: 'view'
320
- }, 'self')
321
- }
322
- }).catch(
323
- (respanse) => {
324
- alert('获取配置文件失败')
325
- })
326
- },
327
- readConfig() {
328
- let gen = asyncReady(this)
329
- return co(gen)
330
- },
331
- showChooser() {
332
- this.showModal = true
333
- },
334
- hidden(){
335
- this.criteriaShow=!this.criteriaShow
336
- },
337
- refresh() {
338
- this.$refs.paged.$refs.criteria.search()
339
- },
340
- ok() {
341
- this.showModal = false
342
- if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
343
- this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
344
- }
345
- },
346
- cancel() {
347
- this.showModal = false
348
- this.model.f_check_plan = {f_plan_name: '', id: ''}
349
- },
350
- print(row) {
351
- this.showcheckmsg = true
352
- this.checkInfo = row
353
- },
354
- sort (field, rule) {
355
- // 将所有排序方式设为不排序,实现相互排斥
356
- for (let key in this.orderFields) {
357
- if (key === field) {
358
- this.orderFields[key] = rule
359
- } else {
360
- this.orderFields[key] = 'no'
361
- }
362
- }
363
- // 如果新规则不排序,还原为默认排序
364
- if (rule === 'no') {
365
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
366
- } else {
367
- this.model.paramSource.orderitem = `'${field} ${rule}'`
368
- }
369
- this.search()
370
- },
371
- search() {
372
- this.$refs.paged.$refs.criteria.search()
373
- },
374
- selfSearch(args){
375
- //tag
376
- args.condition+=" and f_check_type='非民用' and f_safecheck_type='送气类型'"
377
- this.model.search(args.condition, args.model, args.condValue)
378
- },
379
- //初始化街道 添加小区
380
- async initstreets(){
381
- this.streetslist = []
382
- let HttpReset = new HttpResetClass()
383
- let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
384
- data: {
385
- items: '*',
386
- tablename: 't_street',
387
- orderitem: 'id',
388
- condition: `f_orgid = '${this.$login.f.orgid}'`
389
- }
390
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
391
- let redata = []
392
- req.data.forEach((row, n) => {
393
- redata[n] = {
394
- label: row.f_street,
395
- value: row.f_street,
396
- data:row,
397
- id:row.id
398
- }
399
- })
400
- this.streets=redata
401
- }
402
- },
403
- ready() {
404
- //tag
405
- this.function = this.f
406
- //tag
407
-
408
- let gen = select(this)
409
- co(gen)
410
- this.initstreets()
411
- },
412
- watch: {
413
- 'model.f_no_checkplan'(val) {
414
- if (this.model.f_no_checkplan == '有计划安检') {
415
- this.showChooser()
416
- }
417
- },
418
- 'model.condition'(val) {
419
- if(val){
420
- this.searchData.condition = val
421
- }
422
-
423
- },
424
- 'model.f_entry'(val) {
425
- if(val){
426
- this.searchData.f_entry_status = val
427
-
428
- }
429
- },
430
- 'model.f_plan_id'(val) {
431
- if(val){
432
- this.searchData.f_plan_id = val
433
- }
434
- },
435
- 'model.f_approved'(val) {
436
- if(val){
437
- this.searchData.f_approved = val
438
- }
439
- },
440
- 'model.f_no_checkplan'(val) {
441
- if(val){
442
- this.searchData.f_no_checkplan = val
443
- }
444
- },
445
- }
446
-
447
- }
448
- </script>
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
5
+ <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="col-sm-4" style="width: 20%">
9
+ <label class="font_normal_body">客户编号</label>
10
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
+ style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
12
+ </div>
13
+ <div class="col-sm-4" style="width: 20%">
14
+ <label class="font_normal_body">客户名称</label>
15
+ <input type="text" class="input_search" v-model="model.f_user_name"
16
+ style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
17
+ </div>
18
+ <div class="col-sm-4" style="width: 20%">
19
+ <label class="font_normal_body">客户电话</label>
20
+ <input type="text" class="input_search" v-model="model.f_user_phone"
21
+ style="width: 60%" placeholder="客户电话" condition="f_user_phone like '%{}%'">
22
+ </div>
23
+ <div class="col-sm-4" style="width: 20%">
24
+ <label class="font_normal_body">安检计划</label>
25
+ <input type="text" class="input_search" v-model="$parent.$parent.model.f_check_plan.f_plan_name"
26
+ @click="$parent.$parent.showChooser"
27
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
28
+ </div>
29
+ <div class="col-sm-4" style="width: auto;margin-top:8px;float: right">
30
+ <export-excel-safe :data="$parent.$parent.searchData"
31
+ :field="$parent.$parent.excelHeaders"
32
+ :choose-col="true"
33
+ sqlurl="rs/logic/SafeExportExcel" sql-name="查找安检单" template-name='安检计划明细'></export-excel-safe>
34
+ <button class="button_spacing button_search" @click="search()">查询</button>
35
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
36
+ </div>
37
+ </div>
38
+
39
+ <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
40
+ <label class="font_normal_body">安检状态</label>
41
+ <v-select id="f_entry"
42
+ class="select_list select"
43
+ placeholder='安检状态' style="width: 60%"
44
+ v-model='model.f_entry'
45
+ :value.sync="$parent.$parent.model.f_entry"
46
+ :options='$parent.$parent.f_entry_status'
47
+ condition=""
48
+ :value-single="true"
49
+ close-on-select clear-button></v-select>
50
+ </div>
51
+ <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
52
+ <label class="font_normal_body">入户起始</label>
53
+ <datepicker
54
+ class="select_list select"
55
+ :value.sync="model.f_check_start"
56
+ placeholder='开始时间' style="width: 60%"
57
+ :disabled-days-of-week="[]"
58
+ :format="'yyyy-MM-dd'"
59
+ :show-rest-button="reset"
60
+ v-model="model.f_check_start"
61
+ condition="f_offsite_time > ='{} 00:00:00'">
62
+ </datepicker>
63
+ </div>
64
+ <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
65
+ <label class="font_normal_body">入户截止</label>
66
+ <datepicker
67
+ :value.sync="model.f_check_end"
68
+ placeholder='结束时间' style="width: 60%"
69
+ :disabled-days-of-week="[]"
70
+ :format="'yyyy-MM-dd'"
71
+ :show-rest-button="reset"
72
+ v-model="model.f_check_end"
73
+ condition="f_offsite_time <= '{} 23:59:59'">
74
+ </datepicker>
75
+ </div>
76
+ <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
77
+ <label class="font_normal_body">安&nbsp;&nbsp;检&nbsp;员</label>
78
+ <v-select :value.sync="model.f_checker_id" v-model='model.f_checker_id'
79
+ :value-single="true" style="width: 60%"
80
+ class="select_list select"
81
+ :options='$parent.$parent.checkersid' placeholder='安检员'
82
+ close-on-select
83
+ condition="f_checker_id = '{}'"></v-select>
84
+ </div>
85
+ <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
86
+ <label class="font_normal_body">所属区域</label>
87
+ <v-select :value.sync="model.f_street" v-model='model.f_street'
88
+ :value-single="true" style="width: 60%"
89
+ class="select_list select"
90
+ :options='$parent.$parent.streets' placeholder='所属区域'
91
+ close-on-select
92
+ condition="f_street = '{}'"></v-select>
93
+ </div>
94
+ <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
95
+ <label class="font_normal_body">上传起始</label>
96
+ <datepicker
97
+ class="select_list select"
98
+ :value.sync="model.f_check_start1"
99
+ placeholder='开始时间' style="width: 60%"
100
+ :disabled-days-of-week="[]"
101
+ :format="'yyyy-MM-dd 00:00:00'"
102
+ :show-rest-button="reset"
103
+ v-model="model.f_check_start1"
104
+ condition="f_upload_date > ='{}'">
105
+ </datepicker>
106
+ </div>
107
+ <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
108
+ <label class="font_normal_body">上传截止</label>
109
+ <datepicker
110
+ :value.sync="model.f_check_end1"
111
+ placeholder='结束时间' style="width: 60%"
112
+ :disabled-days-of-week="[]"
113
+ :format="'yyyy-MM-dd 23:59:59'"
114
+ :show-rest-button="reset"
115
+ v-model="model.f_check_end1"
116
+ condition="f_upload_date <= '{}'">
117
+ </datepicker>
118
+ </div>
119
+ <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
120
+ <div slot="modal-header" class="modal-header">
121
+ <h4 class="modal-title">
122
+ 选择计划
123
+ </h4>
124
+ </div>
125
+ <div slot="modal-body" class="modal-body">
126
+ <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
127
+ </div>
128
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
129
+ <button class="button_search" @click="$parent.$parent.ok">确认</button>
130
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
131
+ </div>
132
+ </modal>
133
+ </div>
134
+ </criteria>
135
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid >
136
+ <template partial='head'>
137
+ <tr>
138
+ <th><nobr>客户编号</nobr></th>
139
+ <th><nobr>客户名称</nobr></th>
140
+ <th><nobr>客户类型</nobr></th>
141
+ <th><data-order field="f_address" name="客户地址"></data-order></th>
142
+ <th><nobr>安检状态</nobr></th>
143
+ <th><data-order field="f_onsite_time" name="入户时间"></data-order></th>
144
+ <th><nobr>上传时间</nobr></th>
145
+ <th><nobr>安检员</nobr></th>
146
+ <th><nobr>操作</nobr></th>
147
+ </tr>
148
+ </template>
149
+ <template partial='body'>
150
+
151
+ <td style="text-align: center">{{row.f_userinfo_code}}</td>
152
+ <td style="text-align: center">{{row.f_user_name}}</td>
153
+ <td style="text-align: center">{{row.f_check_type}}</td>
154
+ <td style="text-align: center">{{row.f_address}}</td>
155
+ <td style="text-align: center">{{row.f_entry_status}}</td>
156
+ <td style="text-align: center">{{row.f_onsite_time}}</td>
157
+ <td style="text-align: center">{{row.f_upload_date}}</td>
158
+ <td style="text-align: center">{{row.f_checker_name}}</td>
159
+ <td style="text-align: center">
160
+ <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
161
+ <button class="button_spacing button_search-1" @click="$parent.$parent.$parent.addpic(row)">添加照片</button>
162
+ <!--<button type="button" class="button_new-1 button_spacing" data-toggle="dropdown"
163
+ @click="$parent.$parent.$parent.print(row)">
164
+ 打印
165
+ </button>-->
166
+ </td>
167
+ </template>
168
+ </data-grid>
169
+ </criteria-paged>
170
+ <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
171
+ </div>
172
+ <modal :show.sync="pic" v-ref:modal backdrop="true">
173
+ <header slot="modal-header" class="modal-header">
174
+ 上传照片
175
+ </header>
176
+ <article slot="modal-body" class="modal-body">
177
+ <div class="from-group">
178
+ <apply-upload v-ref:file
179
+ :blodid="bolbid"
180
+ :isupload = "false"
181
+ :isdelete="true"
182
+ :isremark = "false"
183
+ :takeimg="true"
184
+ fremarks="送气照片"
185
+ >
186
+ </apply-upload>
187
+ </div>
188
+ </article>
189
+ <footer slot="modal-footer" class="modal-footer">
190
+ <button type="button" class="btn btn-success" @click='piclose'>关闭</button>
191
+ </footer>
192
+ </modal>
193
+ </div>
194
+ </template>
195
+
196
+ <script>
197
+ import {PagedList} from 'vue-client'
198
+ import Vue from 'vue'
199
+ import co from 'co'
200
+ import AppData from '../../stores/AppData'
201
+ import * as Util from '../Util'
202
+ import getNowDate from "../../utils/getNowDate";
203
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
204
+
205
+ //获取json配置文件
206
+ let asyncReady = async function (self) {
207
+ // 获取配置信息
208
+ try {
209
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
210
+ Vue.config = res.data
211
+ } catch (error) {
212
+ // 忽略704,文件找不到异常R
213
+ if (error.status !== 704) {
214
+ throw error
215
+ }
216
+ }
217
+ }
218
+
219
+ let select = function* (self) {
220
+ let http = new HttpResetClass()
221
+ let getGasman = yield http.load('POST','/rs/search', {
222
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
223
+ userid: self.$login.f.id
224
+ }, {resolveMsg: null, rejectMsg: null})
225
+ //tag
226
+ self.checkersid.push({label: '全部', value: ''})
227
+ getGasman.data.forEach((checker) => {
228
+ self.checkersid.push({label: checker.name, value: checker.id})
229
+ })
230
+ }
231
+
232
+ export default {
233
+ title: '非民用送气结果查看',
234
+ data() {
235
+ let model = new PagedList('rs/sql/查找安检单', 20, {
236
+ f_plan_id: 'this.f_plan_id',
237
+ f_approved: 'this.f_approved',
238
+ f_entry_status: 'this.f_entry',
239
+ f_no_checkplan: 'this.f_no_checkplan',
240
+ f_filialeid: 'this.f_filialeid',
241
+ f_street: 'this.f_street',
242
+ orderitem: "'f_offsite_time desc'"
243
+ })
244
+ model.f_plan_id = ''
245
+ model.f_approved = ''
246
+ model.f_entry = ''
247
+ model.f_no_checkplan = ''
248
+ model.f_filialeid = this.$login.f.orgid
249
+ model.f_user_type='非民用'
250
+ // let searchData={
251
+ // f_plan_id: this.model.f_checker_id==undefined?"":this.model.f_checker_id,
252
+ // f_approved: this.model.f_approved,
253
+ // f_entry_status: this.model.f_entry,
254
+ // f_no_checkplan:this.model.f_no_checkplan[0],
255
+ // f_filialeid: this.model.f_filialeid,
256
+ // //orderitem: this.model.f_offsite_time,
257
+ // //condition:this.model.condition
258
+ // }
259
+ // model.f_subcompany = this.$login.f.f_fengongsi
260
+ return {
261
+ searchData: {
262
+ condition:"f_check_type='非民用'",
263
+ orderitem: "f_offsite_time desc",
264
+ f_plan_id: "",
265
+ f_approved: '',
266
+ f_entry_status: '',
267
+ f_no_checkplan: '',
268
+ f_filialeid:this.$login.f.orgid
269
+ },
270
+ model: model,
271
+ //searchData:searchData,
272
+ excelHeaders: {
273
+ 'f_userinfo_code': '客户编号',
274
+ 'f_user_name': '客户姓名',
275
+ 'f_user_phone':'客户电话',
276
+ 'f_check_type': '客户类型',
277
+ 'f_address': '客户地址',
278
+ 'f_entry_status':'安检状态',
279
+ 'f_offsite_time':'安检时间',
280
+ 'f_checker_name': '安检员'
281
+ },
282
+ fun: this.$login.f,
283
+ checkersid: [],
284
+ safetype:[{label:"全部",value:""},
285
+ {label:"送气",value:"送气类型"},
286
+ {label:"年度普检",value:"年度普检"}],
287
+ criteriaShow:false,
288
+ streets:[],
289
+ showModal: false,
290
+ f_approval_states: this.$appdata.getParam('安检单审核状态'),
291
+ f_entry_status: this.$appdata.getParam('安检状态'),
292
+ f_checkplans: this.$appdata.getParam('有无计划'),
293
+ showcheckmsg: false,
294
+ checkInfo: {},
295
+ orderDefault: "'f_offsite_time'",
296
+ orderFields: {
297
+ f_offsite_time: 'no'
298
+ },
299
+ bolbid:null,
300
+ pic:false,
301
+ }
302
+ },
303
+ methods: {
304
+ piclose(){
305
+ this.pic=false
306
+ },
307
+ addpic(row){
308
+ this.bolbid=row.id
309
+ this.pic=true
310
+ },
311
+ change(row) {
312
+ //Vue.$login = {jwt: row.f_checker_id}
313
+ asyncReady(this).then(() => {
314
+ row.f_upload_state = '已传'
315
+ if (row.f_check_type == '民用') {
316
+ this.$goto('Asp-paper-message', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
317
+ } else {
318
+ this.$goto('Asp-paper-message', {
319
+ f_plan_id: row.f_check_plan_id,
320
+ item: row,
321
+ role: 'view'
322
+ }, 'self')
323
+ }
324
+ }).catch(
325
+ (respanse) => {
326
+ alert('获取配置文件失败')
327
+ })
328
+ },
329
+ readConfig() {
330
+ let gen = asyncReady(this)
331
+ return co(gen)
332
+ },
333
+ showChooser() {
334
+ this.showModal = true
335
+ },
336
+ hidden(){
337
+ this.criteriaShow=!this.criteriaShow
338
+ },
339
+ refresh() {
340
+ this.$refs.paged.$refs.criteria.search()
341
+ },
342
+ ok() {
343
+ this.showModal = false
344
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
345
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
346
+ }
347
+ },
348
+ cancel() {
349
+ this.showModal = false
350
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
351
+ },
352
+ print(row) {
353
+ this.showcheckmsg = true
354
+ this.checkInfo = row
355
+ },
356
+ sort (field, rule) {
357
+ // 将所有排序方式设为不排序,实现相互排斥
358
+ for (let key in this.orderFields) {
359
+ if (key === field) {
360
+ this.orderFields[key] = rule
361
+ } else {
362
+ this.orderFields[key] = 'no'
363
+ }
364
+ }
365
+ // 如果新规则不排序,还原为默认排序
366
+ if (rule === 'no') {
367
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
368
+ } else {
369
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
370
+ }
371
+ this.search()
372
+ },
373
+ search() {
374
+ this.$refs.paged.$refs.criteria.search()
375
+ },
376
+ selfSearch(args){
377
+ //tag
378
+ args.condition+=" and f_check_type='非民用' and f_safecheck_type='送气类型'"
379
+ this.model.search(args.condition, args.model, args.condValue)
380
+ },
381
+ //初始化街道 添加小区
382
+ async initstreets(){
383
+ this.streetslist = []
384
+ let HttpReset = new HttpResetClass()
385
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
386
+ data: {
387
+ items: '*',
388
+ tablename: 't_street',
389
+ orderitem: 'id',
390
+ condition: `f_orgid = '${this.$login.f.orgid}'`
391
+ }
392
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
393
+ let redata = []
394
+ req.data.forEach((row, n) => {
395
+ redata[n] = {
396
+ label: row.f_street,
397
+ value: row.f_street,
398
+ data:row,
399
+ id:row.id
400
+ }
401
+ })
402
+ this.streets=redata
403
+ }
404
+ },
405
+ ready() {
406
+ //tag
407
+ this.function = this.f
408
+ //tag
409
+
410
+ let gen = select(this)
411
+ co(gen)
412
+ this.initstreets()
413
+ },
414
+ watch: {
415
+ 'model.f_no_checkplan'(val) {
416
+ if (this.model.f_no_checkplan == '有计划安检') {
417
+ this.showChooser()
418
+ }
419
+ },
420
+ 'model.condition'(val) {
421
+ if(val){
422
+ this.searchData.condition = val
423
+ }
424
+
425
+ },
426
+ 'model.f_entry'(val) {
427
+ if(val){
428
+ this.searchData.f_entry_status = val
429
+
430
+ }
431
+ },
432
+ 'model.f_plan_id'(val) {
433
+ if(val){
434
+ this.searchData.f_plan_id = val
435
+ }
436
+ },
437
+ 'model.f_approved'(val) {
438
+ if(val){
439
+ this.searchData.f_approved = val
440
+ }
441
+ },
442
+ 'model.f_no_checkplan'(val) {
443
+ if(val){
444
+ this.searchData.f_no_checkplan = val
445
+ }
446
+ },
447
+ }
448
+
449
+ }
450
+ </script>