safecheck-client 3.0.34-42 → 3.0.34-44

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,444 +1,444 @@
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
- <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
120
- <label class="font_normal_body">客户地址</label>
121
- <input type="text" class="input_search" v-model="model.f_address"
122
- style="width: 60%" placeholder="客户地址" condition="f_address like '%{}%'">
123
- </div>
124
- <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
125
- <div slot="modal-header" class="modal-header">
126
- <h4 class="modal-title">
127
- 选择计划
128
- </h4>
129
- </div>
130
- <div slot="modal-body" class="modal-body">
131
- <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
132
- </div>
133
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
134
- <button class="button_search" @click="$parent.$parent.ok">确认</button>
135
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
136
- </div>
137
- </modal>
138
- </div>
139
- </criteria>
140
- <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid >
141
- <template partial='head'>
142
- <tr>
143
- <th><nobr>客户编号</nobr></th>
144
- <th><nobr>客户名称</nobr></th>
145
- <th><nobr>客户类型</nobr></th>
146
- <th><data-order field="f_address" name="客户地址"></data-order></th>
147
- <th><nobr>安检状态</nobr></th>
148
- <th><data-order field="f_onsite_time" name="入户时间"></data-order></th>
149
- <th><nobr>上传时间</nobr></th>
150
- <th><nobr>安检员</nobr></th>
151
- <th><nobr>操作</nobr></th>
152
- </tr>
153
- </template>
154
- <template partial='body'>
155
-
156
- <td style="text-align: center">{{row.f_userinfo_code}}</td>
157
- <td style="text-align: center">{{row.f_user_name}}</td>
158
- <td style="text-align: center">{{row.f_check_type}}</td>
159
- <td style="text-align: center">{{row.f_address}}</td>
160
- <td style="text-align: center">{{row.f_entry_status}}</td>
161
- <td style="text-align: center">{{row.f_onsite_time}}</td>
162
- <td style="text-align: center">{{row.f_upload_date}}</td>
163
- <td style="text-align: center">{{row.f_checker_name}}</td>
164
- <td style="text-align: center">
165
- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
166
- <button class="button_spacing button_search-1" @click="$parent.$parent.$parent.addpic(row)">添加照片</button>
167
- <!--<button type="button" class="button_new-1 button_spacing" data-toggle="dropdown"
168
- @click="$parent.$parent.$parent.print(row)">
169
- 打印
170
- </button>-->
171
- </td>
172
- </template>
173
- </data-grid>
174
- </criteria-paged>
175
- <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
176
- </div>
177
- <modal :show.sync="pic" v-ref:modal backdrop="true" v-if="pic">
178
- <header slot="modal-header" class="modal-header">
179
- 上传照片
180
- </header>
181
- <article slot="modal-body" class="modal-body">
182
- <div class="from-group">
183
- <safecheck-file-upload
184
- :blodid="bolbid"
185
- :isupload="true"
186
- :isdelete="true"
187
- :isusetype="true"
188
- :isremark="true"
189
- :takeimg="false"
190
- ></safecheck-file-upload>
191
- </div>
192
- </article>
193
- <footer slot="modal-footer" class="modal-footer">
194
- <button type="button" class="btn btn-success" @click='piclose'>关闭</button>
195
- </footer>
196
- </modal>
197
- </div>
198
- </template>
199
-
200
- <script>
201
- import {PagedList} from 'vue-client'
202
- import Vue from 'vue'
203
- import co from 'co'
204
- import AppData from '../../stores/AppData'
205
- import * as Util from '../Util'
206
- import getNowDate from "../../utils/getNowDate";
207
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
208
- import safecheckUpload from "../Util/SafecheckUpload.vue";
209
-
210
- //获取json配置文件
211
- let asyncReady = async function (self) {
212
- // 获取配置信息
213
- try {
214
- let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
215
- Vue.config = res.data
216
- } catch (error) {
217
- // 忽略704,文件找不到异常R
218
- if (error.status !== 704) {
219
- throw error
220
- }
221
- }
222
- }
223
-
224
- let select = function* (self) {
225
- let http = new HttpResetClass()
226
- let getGasman = yield http.load('POST','/rs/search', {
227
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
228
- userid: self.$login.f.id
229
- }, {resolveMsg: null, rejectMsg: null})
230
- //tag
231
- self.checkersid.push({label: '全部', value: ''})
232
- getGasman.data.forEach((checker) => {
233
- self.checkersid.push({label: checker.name, value: checker.id})
234
- })
235
- }
236
-
237
- export default {
238
- title: '民用送气结果查看',
239
- components: {safecheckUpload},
240
- data() {
241
- let model = new PagedList('rs/sql/查找安检单', 20, {
242
- f_plan_id: 'this.f_plan_id',
243
- f_approved: 'this.f_approved',
244
- f_entry_status: 'this.f_entry',
245
- f_no_checkplan: 'this.f_no_checkplan',
246
- f_filialeid: 'this.f_filialeid',
247
- f_street: 'this.f_street',
248
- orderitem: "'f_offsite_time desc'"
249
- })
250
- model.f_plan_id = ''
251
- model.f_approved = ''
252
- model.f_entry = ''
253
- model.f_no_checkplan = ''
254
- model.f_filialeid = this.$login.f.orgid
255
- model.f_check_type='民用'
256
- return {
257
- searchData: {
258
- condition:"1=1",
259
- orderitem: "f_offsite_time desc",
260
- f_plan_id: "",
261
- f_approved: '',
262
- f_entry_status: '',
263
- f_no_checkplan: '',
264
- f_filialeid:this.$login.f.orgid
265
- },
266
- model: model,
267
- //searchData:searchData,
268
- excelHeaders: {
269
- 'f_userinfo_code': '客户编号',
270
- 'f_user_name': '客户姓名',
271
- 'f_user_phone':'客户电话',
272
- 'f_check_type': '客户类型',
273
- 'f_address': '客户地址',
274
- 'f_entry_status':'安检状态',
275
- 'f_offsite_time':'安检时间',
276
- 'f_checker_name': '安检员'
277
- },
278
- fun: this.$login.f,
279
- checkersid: [],
280
- streets:[],
281
- criteriaShow:false,
282
- showModal: false,
283
- f_approval_states: this.$appdata.getParam('安检单审核状态'),
284
- f_entry_status: this.$appdata.getParam('安检状态'),
285
- f_checkplans: this.$appdata.getParam('有无计划'),
286
- showcheckmsg: false,
287
- checkInfo: {},
288
- orderDefault: "'f_offsite_time'",
289
- orderFields: {
290
- f_offsite_time: 'no'
291
- },
292
- bolbid:null,
293
- pic:false,
294
- }
295
- },
296
- methods: {
297
- piclose(){
298
- this.pic=false
299
- },
300
- addpic(row){
301
- this.bolbid=row.id
302
- this.pic=true
303
- },
304
- change(row) {
305
- //Vue.$login = {jwt: row.f_checker_id}
306
- asyncReady(this).then(() => {
307
- row.f_upload_state = '已传'
308
- if (row.f_check_type == '民用') {
309
- this.$goto('Asp-paper-message', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
310
- } else {
311
- this.$goto('Asp-paper-message', {
312
- f_plan_id: row.f_check_plan_id,
313
- item: row,
314
- role: 'view'
315
- }, 'self')
316
- }
317
- }).catch(
318
- (respanse) => {
319
- alert('获取配置文件失败')
320
- })
321
- },
322
- readConfig() {
323
- let gen = asyncReady(this)
324
- return co(gen)
325
- },
326
- showChooser() {
327
- this.showModal = true
328
- },
329
- hidden(){
330
- this.criteriaShow=!this.criteriaShow
331
- },
332
- refresh() {
333
- this.$refs.paged.$refs.criteria.search()
334
- },
335
- ok() {
336
- this.showModal = false
337
- if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
338
- this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
339
- }
340
- },
341
- cancel() {
342
- this.showModal = false
343
- this.model.f_check_plan = {f_plan_name: '', id: ''}
344
- },
345
- print(row) {
346
- this.showcheckmsg = true
347
- this.checkInfo = row
348
- },
349
- sort (field, rule) {
350
- // 将所有排序方式设为不排序,实现相互排斥
351
- for (let key in this.orderFields) {
352
- if (key === field) {
353
- this.orderFields[key] = rule
354
- } else {
355
- this.orderFields[key] = 'no'
356
- }
357
- }
358
- // 如果新规则不排序,还原为默认排序
359
- if (rule === 'no') {
360
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
361
- } else {
362
- this.model.paramSource.orderitem = `'${field} ${rule}'`
363
- }
364
- this.search()
365
- },
366
- search() {
367
- this.$refs.paged.$refs.criteria.search()
368
- },
369
- selfSearch(args){
370
- ////tag
371
- args.condition+=" and f_check_type='民用' and f_safecheck_type='送气类型'"
372
- this.model.search(args.condition, args.model, args.condValue)
373
- },
374
- //初始化街道 添加小区
375
- async initstreets(){
376
- this.streetslist = []
377
- let HttpReset = new HttpResetClass()
378
- let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
379
- data: {
380
- items: '*',
381
- tablename: 't_street',
382
- orderitem: 'id',
383
- condition: `f_orgid = '${this.$login.f.orgid}'`
384
- }
385
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
386
- let redata = []
387
- req.data.forEach((row, n) => {
388
- redata[n] = {
389
- label: row.f_street,
390
- value: row.f_street,
391
- data:row,
392
- id:row.id
393
- }
394
- })
395
- this.streets=redata
396
- }
397
- },
398
-
399
- ready() {
400
- //tag
401
- this.function = this.f
402
- //tag
403
-
404
- let gen = select(this)
405
- co(gen)
406
- this.initstreets()
407
- },
408
- watch: {
409
- 'model.f_no_checkplan'(val) {
410
- if (this.model.f_no_checkplan == '有计划安检') {
411
- this.showChooser()
412
- }
413
- },
414
- 'model.condition'(val) {
415
- if(val){
416
- this.searchData.condition = val
417
- }
418
-
419
- },
420
- 'model.f_entry'(val) {
421
- if(val){
422
- this.searchData.f_entry_status = val
423
-
424
- }
425
- },
426
- 'model.f_plan_id'(val) {
427
- if(val){
428
- this.searchData.f_plan_id = val
429
- }
430
- },
431
- 'model.f_approved'(val) {
432
- if(val){
433
- this.searchData.f_approved = val
434
- }
435
- },
436
- 'model.f_no_checkplan'(val) {
437
- if(val){
438
- this.searchData.f_no_checkplan = val
439
- }
440
- },
441
- }
442
-
443
- }
444
- </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
+ <div class="col-sm-4" style="width: 20%" v-if="$parent.$parent.criteriaShow">
120
+ <label class="font_normal_body">客户地址</label>
121
+ <input type="text" class="input_search" v-model="model.f_address"
122
+ style="width: 60%" placeholder="客户地址" condition="f_address like '%{}%'">
123
+ </div>
124
+ <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
125
+ <div slot="modal-header" class="modal-header">
126
+ <h4 class="modal-title">
127
+ 选择计划
128
+ </h4>
129
+ </div>
130
+ <div slot="modal-body" class="modal-body">
131
+ <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
132
+ </div>
133
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
134
+ <button class="button_search" @click="$parent.$parent.ok">确认</button>
135
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
136
+ </div>
137
+ </modal>
138
+ </div>
139
+ </criteria>
140
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid >
141
+ <template partial='head'>
142
+ <tr>
143
+ <th><nobr>客户编号</nobr></th>
144
+ <th><nobr>客户名称</nobr></th>
145
+ <th><nobr>客户类型</nobr></th>
146
+ <th><data-order field="f_address" name="客户地址"></data-order></th>
147
+ <th><nobr>安检状态</nobr></th>
148
+ <th><data-order field="f_onsite_time" name="入户时间"></data-order></th>
149
+ <th><nobr>上传时间</nobr></th>
150
+ <th><nobr>安检员</nobr></th>
151
+ <th><nobr>操作</nobr></th>
152
+ </tr>
153
+ </template>
154
+ <template partial='body'>
155
+
156
+ <td style="text-align: center">{{row.f_userinfo_code}}</td>
157
+ <td style="text-align: center">{{row.f_user_name}}</td>
158
+ <td style="text-align: center">{{row.f_check_type}}</td>
159
+ <td style="text-align: center">{{row.f_address}}</td>
160
+ <td style="text-align: center">{{row.f_entry_status}}</td>
161
+ <td style="text-align: center">{{row.f_onsite_time}}</td>
162
+ <td style="text-align: center">{{row.f_upload_date}}</td>
163
+ <td style="text-align: center">{{row.f_checker_name}}</td>
164
+ <td style="text-align: center">
165
+ <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.change(row)'>查看</button>
166
+ <button class="button_spacing button_search-1" @click="$parent.$parent.$parent.addpic(row)">添加照片</button>
167
+ <!--<button type="button" class="button_new-1 button_spacing" data-toggle="dropdown"
168
+ @click="$parent.$parent.$parent.print(row)">
169
+ 打印
170
+ </button>-->
171
+ </td>
172
+ </template>
173
+ </data-grid>
174
+ </criteria-paged>
175
+ <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
176
+ </div>
177
+ <modal :show.sync="pic" v-ref:modal backdrop="true" v-if="pic">
178
+ <header slot="modal-header" class="modal-header">
179
+ 上传照片
180
+ </header>
181
+ <article slot="modal-body" class="modal-body">
182
+ <div class="from-group">
183
+ <safecheck-file-upload
184
+ :blodid="bolbid"
185
+ :isupload="true"
186
+ :isdelete="true"
187
+ :isusetype="true"
188
+ :isremark="true"
189
+ :takeimg="false"
190
+ ></safecheck-file-upload>
191
+ </div>
192
+ </article>
193
+ <footer slot="modal-footer" class="modal-footer">
194
+ <button type="button" class="btn btn-success" @click='piclose'>关闭</button>
195
+ </footer>
196
+ </modal>
197
+ </div>
198
+ </template>
199
+
200
+ <script>
201
+ import {PagedList} from 'vue-client'
202
+ import Vue from 'vue'
203
+ import co from 'co'
204
+ import AppData from '../../stores/AppData'
205
+ import * as Util from '../Util'
206
+ import getNowDate from "../../utils/getNowDate";
207
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
208
+ import safecheckUpload from "../Util/SafecheckUpload.vue";
209
+
210
+ //获取json配置文件
211
+ let asyncReady = async function (self) {
212
+ // 获取配置信息
213
+ try {
214
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
215
+ Vue.config = res.data
216
+ } catch (error) {
217
+ // 忽略704,文件找不到异常R
218
+ if (error.status !== 704) {
219
+ throw error
220
+ }
221
+ }
222
+ }
223
+
224
+ let select = function* (self) {
225
+ let http = new HttpResetClass()
226
+ let getGasman = yield http.load('POST','/rs/search', {
227
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
228
+ userid: self.$login.f.id
229
+ }, {resolveMsg: null, rejectMsg: null})
230
+ //tag
231
+ self.checkersid.push({label: '全部', value: ''})
232
+ getGasman.data.forEach((checker) => {
233
+ self.checkersid.push({label: checker.name, value: checker.id})
234
+ })
235
+ }
236
+
237
+ export default {
238
+ title: '民用送气结果查看',
239
+ components: {safecheckUpload},
240
+ data() {
241
+ let model = new PagedList('rs/sql/查找安检单', 20, {
242
+ f_plan_id: 'this.f_plan_id',
243
+ f_approved: 'this.f_approved',
244
+ f_entry_status: 'this.f_entry',
245
+ f_no_checkplan: 'this.f_no_checkplan',
246
+ f_filialeid: 'this.f_filialeid',
247
+ f_street: 'this.f_street',
248
+ orderitem: "'f_offsite_time desc'"
249
+ })
250
+ model.f_plan_id = ''
251
+ model.f_approved = ''
252
+ model.f_entry = ''
253
+ model.f_no_checkplan = ''
254
+ model.f_filialeid = this.$login.f.orgid
255
+ model.f_check_type='民用'
256
+ return {
257
+ searchData: {
258
+ condition:"1=1",
259
+ orderitem: "f_offsite_time desc",
260
+ f_plan_id: "",
261
+ f_approved: '',
262
+ f_entry_status: '',
263
+ f_no_checkplan: '',
264
+ f_filialeid:this.$login.f.orgid
265
+ },
266
+ model: model,
267
+ //searchData:searchData,
268
+ excelHeaders: {
269
+ 'f_userinfo_code': '客户编号',
270
+ 'f_user_name': '客户姓名',
271
+ 'f_user_phone':'客户电话',
272
+ 'f_check_type': '客户类型',
273
+ 'f_address': '客户地址',
274
+ 'f_entry_status':'安检状态',
275
+ 'f_offsite_time':'安检时间',
276
+ 'f_checker_name': '安检员'
277
+ },
278
+ fun: this.$login.f,
279
+ checkersid: [],
280
+ streets:[],
281
+ criteriaShow:false,
282
+ showModal: false,
283
+ f_approval_states: this.$appdata.getParam('安检单审核状态'),
284
+ f_entry_status: this.$appdata.getParam('安检状态'),
285
+ f_checkplans: this.$appdata.getParam('有无计划'),
286
+ showcheckmsg: false,
287
+ checkInfo: {},
288
+ orderDefault: "'f_offsite_time'",
289
+ orderFields: {
290
+ f_offsite_time: 'no'
291
+ },
292
+ bolbid:null,
293
+ pic:false,
294
+ }
295
+ },
296
+ methods: {
297
+ piclose(){
298
+ this.pic=false
299
+ },
300
+ addpic(row){
301
+ this.bolbid=row.id
302
+ this.pic=true
303
+ },
304
+ change(row) {
305
+ //Vue.$login = {jwt: row.f_checker_id}
306
+ asyncReady(this).then(() => {
307
+ row.f_upload_state = '已传'
308
+ if (row.f_check_type == '民用') {
309
+ this.$goto('Asp-paper-message', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
310
+ } else {
311
+ this.$goto('Asp-paper-message', {
312
+ f_plan_id: row.f_check_plan_id,
313
+ item: row,
314
+ role: 'view'
315
+ }, 'self')
316
+ }
317
+ }).catch(
318
+ (respanse) => {
319
+ alert('获取配置文件失败')
320
+ })
321
+ },
322
+ readConfig() {
323
+ let gen = asyncReady(this)
324
+ return co(gen)
325
+ },
326
+ showChooser() {
327
+ this.showModal = true
328
+ },
329
+ hidden(){
330
+ this.criteriaShow=!this.criteriaShow
331
+ },
332
+ refresh() {
333
+ this.$refs.paged.$refs.criteria.search()
334
+ },
335
+ ok() {
336
+ this.showModal = false
337
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
338
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
339
+ }
340
+ },
341
+ cancel() {
342
+ this.showModal = false
343
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
344
+ },
345
+ print(row) {
346
+ this.showcheckmsg = true
347
+ this.checkInfo = row
348
+ },
349
+ sort (field, rule) {
350
+ // 将所有排序方式设为不排序,实现相互排斥
351
+ for (let key in this.orderFields) {
352
+ if (key === field) {
353
+ this.orderFields[key] = rule
354
+ } else {
355
+ this.orderFields[key] = 'no'
356
+ }
357
+ }
358
+ // 如果新规则不排序,还原为默认排序
359
+ if (rule === 'no') {
360
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
361
+ } else {
362
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
363
+ }
364
+ this.search()
365
+ },
366
+ search() {
367
+ this.$refs.paged.$refs.criteria.search()
368
+ },
369
+ selfSearch(args){
370
+ ////tag
371
+ args.condition+=" and f_check_type='民用' and f_safecheck_type='送气类型'"
372
+ this.model.search(args.condition, args.model, args.condValue)
373
+ },
374
+ //初始化街道 添加小区
375
+ async initstreets(){
376
+ this.streetslist = []
377
+ let HttpReset = new HttpResetClass()
378
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
379
+ data: {
380
+ items: '*',
381
+ tablename: 't_street',
382
+ orderitem: 'id',
383
+ condition: `f_orgid = '${this.$login.f.orgid}'`
384
+ }
385
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
386
+ let redata = []
387
+ req.data.forEach((row, n) => {
388
+ redata[n] = {
389
+ label: row.f_street,
390
+ value: row.f_street,
391
+ data:row,
392
+ id:row.id
393
+ }
394
+ })
395
+ this.streets=redata
396
+ }
397
+ },
398
+
399
+ ready() {
400
+ //tag
401
+ this.function = this.f
402
+ //tag
403
+
404
+ let gen = select(this)
405
+ co(gen)
406
+ this.initstreets()
407
+ },
408
+ watch: {
409
+ 'model.f_no_checkplan'(val) {
410
+ if (this.model.f_no_checkplan == '有计划安检') {
411
+ this.showChooser()
412
+ }
413
+ },
414
+ 'model.condition'(val) {
415
+ if(val){
416
+ this.searchData.condition = val
417
+ }
418
+
419
+ },
420
+ 'model.f_entry'(val) {
421
+ if(val){
422
+ this.searchData.f_entry_status = val
423
+
424
+ }
425
+ },
426
+ 'model.f_plan_id'(val) {
427
+ if(val){
428
+ this.searchData.f_plan_id = val
429
+ }
430
+ },
431
+ 'model.f_approved'(val) {
432
+ if(val){
433
+ this.searchData.f_approved = val
434
+ }
435
+ },
436
+ 'model.f_no_checkplan'(val) {
437
+ if(val){
438
+ this.searchData.f_no_checkplan = val
439
+ }
440
+ },
441
+ }
442
+
443
+ }
444
+ </script>