safecheck-client 3.0.34-52 → 3.0.34-53

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,455 +1,455 @@
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" v-if="pic">
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
179
- :blodid="blodid"
180
- :isupload="true"
181
- :isdelete="true"
182
- :isusetype="true"
183
- :isremark="true"
184
- :takeimg="false"
185
- isusetype="送气照片"
186
- ></safecheck-file-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
- import safecheckUpload from "../Util/SafecheckUpload.vue";
205
-
206
- //获取json配置文件
207
- let asyncReady = async function (self) {
208
- // 获取配置信息
209
- try {
210
- let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
211
- Vue.config = res.data
212
- } catch (error) {
213
- // 忽略704,文件找不到异常R
214
- if (error.status !== 704) {
215
- throw error
216
- }
217
- }
218
- }
219
-
220
- let select = function* (self) {
221
- let http = new HttpResetClass()
222
- let getGasman = yield http.load('POST','/rs/search', {
223
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
224
- userid: self.$login.f.id
225
- }, {resolveMsg: null, rejectMsg: null})
226
- //tag
227
- self.checkersid.push({label: '全部', value: ''})
228
- getGasman.data.forEach((checker) => {
229
- self.checkersid.push({label: checker.name, value: checker.id})
230
- })
231
- }
232
-
233
- export default {
234
- title: '非民用送气结果查看',
235
- components: {
236
- safecheckUpload
237
- },
238
- data() {
239
- let model = new PagedList('rs/sql/查找安检单', 20, {
240
- f_plan_id: 'this.f_plan_id',
241
- f_approved: 'this.f_approved',
242
- f_entry_status: 'this.f_entry',
243
- f_no_checkplan: 'this.f_no_checkplan',
244
- f_filialeid: 'this.f_filialeid',
245
- f_street: 'this.f_street',
246
- orderitem: "'f_offsite_time desc'"
247
- })
248
- model.f_plan_id = ''
249
- model.f_approved = ''
250
- model.f_entry = ''
251
- model.f_no_checkplan = ''
252
- model.f_filialeid = this.$login.f.orgid
253
- model.f_user_type='非民用'
254
- // let searchData={
255
- // f_plan_id: this.model.f_checker_id==undefined?"":this.model.f_checker_id,
256
- // f_approved: this.model.f_approved,
257
- // f_entry_status: this.model.f_entry,
258
- // f_no_checkplan:this.model.f_no_checkplan[0],
259
- // f_filialeid: this.model.f_filialeid,
260
- // //orderitem: this.model.f_offsite_time,
261
- // //condition:this.model.condition
262
- // }
263
- // model.f_subcompany = this.$login.f.f_fengongsi
264
- return {
265
- searchData: {
266
- condition:"f_check_type='非民用'",
267
- orderitem: "f_offsite_time desc",
268
- f_plan_id: "",
269
- f_approved: '',
270
- f_entry_status: '',
271
- f_no_checkplan: '',
272
- f_filialeid:this.$login.f.orgid
273
- },
274
- model: model,
275
- //searchData:searchData,
276
- excelHeaders: {
277
- 'f_userinfo_code': '客户编号',
278
- 'f_user_name': '客户姓名',
279
- 'f_user_phone':'客户电话',
280
- 'f_check_type': '客户类型',
281
- 'f_address': '客户地址',
282
- 'f_entry_status':'安检状态',
283
- 'f_offsite_time':'安检时间',
284
- 'f_checker_name': '安检员'
285
- },
286
- fun: this.$login.f,
287
- checkersid: [],
288
- safetype:[{label:"全部",value:""},
289
- {label:"送气",value:"送气类型"},
290
- {label:"年度普检",value:"年度普检"}],
291
- criteriaShow:false,
292
- streets:[],
293
- showModal: false,
294
- f_approval_states: this.$appdata.getParam('安检单审核状态'),
295
- f_entry_status: this.$appdata.getParam('安检状态'),
296
- f_checkplans: this.$appdata.getParam('有无计划'),
297
- showcheckmsg: false,
298
- checkInfo: {},
299
- orderDefault: "'f_offsite_time'",
300
- orderFields: {
301
- f_offsite_time: 'no'
302
- },
303
- blodid:null,
304
- pic:false,
305
- }
306
- },
307
- methods: {
308
- piclose(){
309
- this.pic=false
310
- },
311
- addpic(row){
312
- this.blodid=row.id
313
- this.pic=true
314
- debugger
315
- },
316
- change(row) {
317
- //Vue.$login = {jwt: row.f_checker_id}
318
- asyncReady(this).then(() => {
319
- row.f_upload_state = '已传'
320
- if (row.f_check_type == '民用') {
321
- this.$goto('Asp-paper-message', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
322
- } else {
323
- this.$goto('Asp-paper-message', {
324
- f_plan_id: row.f_check_plan_id,
325
- item: row,
326
- role: 'view'
327
- }, 'self')
328
- }
329
- }).catch(
330
- (respanse) => {
331
- alert('获取配置文件失败')
332
- })
333
- },
334
- readConfig() {
335
- let gen = asyncReady(this)
336
- return co(gen)
337
- },
338
- showChooser() {
339
- this.showModal = true
340
- },
341
- hidden(){
342
- this.criteriaShow=!this.criteriaShow
343
- },
344
- refresh() {
345
- this.$refs.paged.$refs.criteria.search()
346
- },
347
- ok() {
348
- this.showModal = false
349
- if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
350
- this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
351
- }
352
- },
353
- cancel() {
354
- this.showModal = false
355
- this.model.f_check_plan = {f_plan_name: '', id: ''}
356
- },
357
- print(row) {
358
- this.showcheckmsg = true
359
- this.checkInfo = row
360
- },
361
- sort (field, rule) {
362
- // 将所有排序方式设为不排序,实现相互排斥
363
- for (let key in this.orderFields) {
364
- if (key === field) {
365
- this.orderFields[key] = rule
366
- } else {
367
- this.orderFields[key] = 'no'
368
- }
369
- }
370
- // 如果新规则不排序,还原为默认排序
371
- if (rule === 'no') {
372
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
373
- } else {
374
- this.model.paramSource.orderitem = `'${field} ${rule}'`
375
- }
376
- this.search()
377
- },
378
- search() {
379
- this.$refs.paged.$refs.criteria.search()
380
- },
381
- selfSearch(args){
382
- //tag
383
- args.condition+=" and f_check_type='非民用' and f_safecheck_type='送气类型'"
384
- this.model.search(args.condition, args.model, args.condValue)
385
- },
386
- //初始化街道 添加小区
387
- async initstreets(){
388
- this.streetslist = []
389
- let HttpReset = new HttpResetClass()
390
- let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
391
- data: {
392
- items: '*',
393
- tablename: 't_street',
394
- orderitem: 'id',
395
- condition: `f_orgid = '${this.$login.f.orgid}'`
396
- }
397
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
398
- let redata = []
399
- req.data.forEach((row, n) => {
400
- redata[n] = {
401
- label: row.f_street,
402
- value: row.f_street,
403
- data:row,
404
- id:row.id
405
- }
406
- })
407
- this.streets=redata
408
- }
409
- },
410
- ready() {
411
- //tag
412
- this.function = this.f
413
- //tag
414
-
415
- let gen = select(this)
416
- co(gen)
417
- this.initstreets()
418
- },
419
- watch: {
420
- 'model.f_no_checkplan'(val) {
421
- if (this.model.f_no_checkplan == '有计划安检') {
422
- this.showChooser()
423
- }
424
- },
425
- 'model.condition'(val) {
426
- if(val){
427
- this.searchData.condition = val
428
- }
429
-
430
- },
431
- 'model.f_entry'(val) {
432
- if(val){
433
- this.searchData.f_entry_status = val
434
-
435
- }
436
- },
437
- 'model.f_plan_id'(val) {
438
- if(val){
439
- this.searchData.f_plan_id = val
440
- }
441
- },
442
- 'model.f_approved'(val) {
443
- if(val){
444
- this.searchData.f_approved = val
445
- }
446
- },
447
- 'model.f_no_checkplan'(val) {
448
- if(val){
449
- this.searchData.f_no_checkplan = val
450
- }
451
- },
452
- }
453
-
454
- }
455
- </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" v-if="pic">
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
179
+ :blodid="blodid"
180
+ :isupload="true"
181
+ :isdelete="true"
182
+ :isusetype="true"
183
+ :isremark="true"
184
+ :takeimg="false"
185
+ isusetype="送气照片"
186
+ ></safecheck-file-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
+ import safecheckUpload from "../Util/SafecheckUpload.vue";
205
+
206
+ //获取json配置文件
207
+ let asyncReady = async function (self) {
208
+ // 获取配置信息
209
+ try {
210
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
211
+ Vue.config = res.data
212
+ } catch (error) {
213
+ // 忽略704,文件找不到异常R
214
+ if (error.status !== 704) {
215
+ throw error
216
+ }
217
+ }
218
+ }
219
+
220
+ let select = function* (self) {
221
+ let http = new HttpResetClass()
222
+ let getGasman = yield http.load('POST','/rs/search', {
223
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
224
+ userid: self.$login.f.id
225
+ }, {resolveMsg: null, rejectMsg: null})
226
+ //tag
227
+ self.checkersid.push({label: '全部', value: ''})
228
+ getGasman.data.forEach((checker) => {
229
+ self.checkersid.push({label: checker.name, value: checker.id})
230
+ })
231
+ }
232
+
233
+ export default {
234
+ title: '非民用送气结果查看',
235
+ components: {
236
+ safecheckUpload
237
+ },
238
+ data() {
239
+ let model = new PagedList('rs/sql/查找安检单', 20, {
240
+ f_plan_id: 'this.f_plan_id',
241
+ f_approved: 'this.f_approved',
242
+ f_entry_status: 'this.f_entry',
243
+ f_no_checkplan: 'this.f_no_checkplan',
244
+ f_filialeid: 'this.f_filialeid',
245
+ f_street: 'this.f_street',
246
+ orderitem: "'f_offsite_time desc'"
247
+ })
248
+ model.f_plan_id = ''
249
+ model.f_approved = ''
250
+ model.f_entry = ''
251
+ model.f_no_checkplan = ''
252
+ model.f_filialeid = this.$login.f.orgid
253
+ model.f_user_type='非民用'
254
+ // let searchData={
255
+ // f_plan_id: this.model.f_checker_id==undefined?"":this.model.f_checker_id,
256
+ // f_approved: this.model.f_approved,
257
+ // f_entry_status: this.model.f_entry,
258
+ // f_no_checkplan:this.model.f_no_checkplan[0],
259
+ // f_filialeid: this.model.f_filialeid,
260
+ // //orderitem: this.model.f_offsite_time,
261
+ // //condition:this.model.condition
262
+ // }
263
+ // model.f_subcompany = this.$login.f.f_fengongsi
264
+ return {
265
+ searchData: {
266
+ condition:"f_check_type='非民用'",
267
+ orderitem: "f_offsite_time desc",
268
+ f_plan_id: "",
269
+ f_approved: '',
270
+ f_entry_status: '',
271
+ f_no_checkplan: '',
272
+ f_filialeid:this.$login.f.orgid
273
+ },
274
+ model: model,
275
+ //searchData:searchData,
276
+ excelHeaders: {
277
+ 'f_userinfo_code': '客户编号',
278
+ 'f_user_name': '客户姓名',
279
+ 'f_user_phone':'客户电话',
280
+ 'f_check_type': '客户类型',
281
+ 'f_address': '客户地址',
282
+ 'f_entry_status':'安检状态',
283
+ 'f_offsite_time':'安检时间',
284
+ 'f_checker_name': '安检员'
285
+ },
286
+ fun: this.$login.f,
287
+ checkersid: [],
288
+ safetype:[{label:"全部",value:""},
289
+ {label:"送气",value:"送气类型"},
290
+ {label:"年度普检",value:"年度普检"}],
291
+ criteriaShow:false,
292
+ streets:[],
293
+ showModal: false,
294
+ f_approval_states: this.$appdata.getParam('安检单审核状态'),
295
+ f_entry_status: this.$appdata.getParam('安检状态'),
296
+ f_checkplans: this.$appdata.getParam('有无计划'),
297
+ showcheckmsg: false,
298
+ checkInfo: {},
299
+ orderDefault: "'f_offsite_time'",
300
+ orderFields: {
301
+ f_offsite_time: 'no'
302
+ },
303
+ blodid:null,
304
+ pic:false,
305
+ }
306
+ },
307
+ methods: {
308
+ piclose(){
309
+ this.pic=false
310
+ },
311
+ addpic(row){
312
+ this.blodid=row.id
313
+ this.pic=true
314
+ debugger
315
+ },
316
+ change(row) {
317
+ //Vue.$login = {jwt: row.f_checker_id}
318
+ asyncReady(this).then(() => {
319
+ row.f_upload_state = '已传'
320
+ if (row.f_check_type == '民用') {
321
+ this.$goto('Asp-paper-message', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
322
+ } else {
323
+ this.$goto('Asp-paper-message', {
324
+ f_plan_id: row.f_check_plan_id,
325
+ item: row,
326
+ role: 'view'
327
+ }, 'self')
328
+ }
329
+ }).catch(
330
+ (respanse) => {
331
+ alert('获取配置文件失败')
332
+ })
333
+ },
334
+ readConfig() {
335
+ let gen = asyncReady(this)
336
+ return co(gen)
337
+ },
338
+ showChooser() {
339
+ this.showModal = true
340
+ },
341
+ hidden(){
342
+ this.criteriaShow=!this.criteriaShow
343
+ },
344
+ refresh() {
345
+ this.$refs.paged.$refs.criteria.search()
346
+ },
347
+ ok() {
348
+ this.showModal = false
349
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
350
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
351
+ }
352
+ },
353
+ cancel() {
354
+ this.showModal = false
355
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
356
+ },
357
+ print(row) {
358
+ this.showcheckmsg = true
359
+ this.checkInfo = row
360
+ },
361
+ sort (field, rule) {
362
+ // 将所有排序方式设为不排序,实现相互排斥
363
+ for (let key in this.orderFields) {
364
+ if (key === field) {
365
+ this.orderFields[key] = rule
366
+ } else {
367
+ this.orderFields[key] = 'no'
368
+ }
369
+ }
370
+ // 如果新规则不排序,还原为默认排序
371
+ if (rule === 'no') {
372
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
373
+ } else {
374
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
375
+ }
376
+ this.search()
377
+ },
378
+ search() {
379
+ this.$refs.paged.$refs.criteria.search()
380
+ },
381
+ selfSearch(args){
382
+ //tag
383
+ args.condition+=" and f_check_type='非民用' and f_safecheck_type='送气类型'"
384
+ this.model.search(args.condition, args.model, args.condValue)
385
+ },
386
+ //初始化街道 添加小区
387
+ async initstreets(){
388
+ this.streetslist = []
389
+ let HttpReset = new HttpResetClass()
390
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
391
+ data: {
392
+ items: '*',
393
+ tablename: 't_street',
394
+ orderitem: 'id',
395
+ condition: `f_orgid = '${this.$login.f.orgid}'`
396
+ }
397
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
398
+ let redata = []
399
+ req.data.forEach((row, n) => {
400
+ redata[n] = {
401
+ label: row.f_street,
402
+ value: row.f_street,
403
+ data:row,
404
+ id:row.id
405
+ }
406
+ })
407
+ this.streets=redata
408
+ }
409
+ },
410
+ ready() {
411
+ //tag
412
+ this.function = this.f
413
+ //tag
414
+
415
+ let gen = select(this)
416
+ co(gen)
417
+ this.initstreets()
418
+ },
419
+ watch: {
420
+ 'model.f_no_checkplan'(val) {
421
+ if (this.model.f_no_checkplan == '有计划安检') {
422
+ this.showChooser()
423
+ }
424
+ },
425
+ 'model.condition'(val) {
426
+ if(val){
427
+ this.searchData.condition = val
428
+ }
429
+
430
+ },
431
+ 'model.f_entry'(val) {
432
+ if(val){
433
+ this.searchData.f_entry_status = val
434
+
435
+ }
436
+ },
437
+ 'model.f_plan_id'(val) {
438
+ if(val){
439
+ this.searchData.f_plan_id = val
440
+ }
441
+ },
442
+ 'model.f_approved'(val) {
443
+ if(val){
444
+ this.searchData.f_approved = val
445
+ }
446
+ },
447
+ 'model.f_no_checkplan'(val) {
448
+ if(val){
449
+ this.searchData.f_no_checkplan = val
450
+ }
451
+ },
452
+ }
453
+
454
+ }
455
+ </script>