zhugauntaizhang.vue
14.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
<template>
<view class="box">
<view class="topheadk">
<view class="shaiselecttop">
<view class='shaiselect' @click="shai">筛选</view>
</view>
<view class="head">
<view class="headitem">
<view class="headitemtop">在审项目数</view>
<view class="headitembot">{{end==''?'':end[0].ftrialcount}}</view>
</view>
<view class="headitem">
<view class="headitemtop">审结项目数</view>
<view class="headitembot">{{end==''?'':end[0].fconcludecount}}</view>
</view>
<view class="headitem">
<view class="headitemtop">总项目数</view>
<view class="headitembot">{{end==''?'':end[0].fcount}}</view>
</view>
</view>
</view>
<view class="nodata" v-if="xiangmulist.length==0">暂无数据</view>
<view class="taizhang" v-else>
<view class="taizhanghead">
<view class="taizhangitem">项目编号</view>
<view class="taizhangitem">项目名称</view>
<view class="taizhangitem">操作</view>
</view>
<view class="taizhangbox">
<view class="taiboxitem" v-for="(item,index) in xiangmulist" :key="index">
<view class="taizhangleft" v-if="item.fnumber==null">暂无</view>
<view class="taizhangleft" v-else>{{item.fnumber}}</view>
<view class="taizhangmiddle" v-if="item.fname==null">暂无</view>
<view class="taizhangmiddle" v-else>{{item.fname}}</view>
<view class="taizhangright" @click="taizhangdetail" :data-item="item">详情</view>
</view>
</view>
</view>
<!-- 底部 -->
<!-- <view class="dibu">
<view class="dibuleft">
<view class="dibuliteml">上一页</view>
<view class="dibulitemm">
<view class="di">第</view>
<view class="dishu">
<input type="number">
</view>
<view class="ye">页</view>
</view>
<view class="dibulitemx ">下一页</view>
</view>
<view class="diburight">
共30页
</view>
</view>
-->
<view class="register" v-if="tizhangshow" @click="hide">
<view class="taizhangwrap" @click.stop="hidek">
<view class="wrapbox">
<view class="wrapitem">
<view class="wrapitemleft">项目类型</view>
<picker @change="bindPickerChange" :value="index" :range="projectlist" range-key="fname">
<view class="wrapitemright">
<view class="uni-input projectname">{{projectname}}</view>
<!-- <input type="text" /> -->
</view>
</picker>
</view>
<view class="wrapitem">
<view class="wrapitemleft">主管部门</view>
<picker @change="bindstationrChange" :value="stationindex" :range="stationlist" range-key="fname">
<view class="wrapitemright">
<view class="uni-input projectname">{{stationname}}</view>
<!-- <input type="text" /> -->
</view>
</picker>
</view>
<view class="wrapitem">
<view class="wrapitemleft">年度</view>
<picker @change="yearchange" :value="yearindex" :range="yeararr">
<view class="wrapitemright">
<view class="nianduleft">
<view class="uni-input projectname">{{yearname}}</view>
<!-- <input type="text" /> -->
</view>
<view class="nianduright">
<image src="../../static/img/number.png" mode=""></image>
</view>
</view>
</picker>
</view>
<view class="wrapitem">
<view class="wrapitemleft">时间</view>
<view class="time">
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="timeleft">
{{startdate}}
<!-- <input placeholder="" /> -->
<!-- <input type="text" placeholder="" /> -->
</view>
</picker>
<view class="timemiddle"></view>
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="endDateChange">
<view class="timeleft">
{{endate}}
<!-- <input placeholder="" /> -->
<!-- <input type="text" placeholder="" /> -->
</view>
</picker>
</view>
</view>
</view>
<view class="zibot">
<view class="reset" @click="reset">重置</view>
<view class="chaxun" @click="search">查询</view>
</view>
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
tizhangshow: false,
fprojectcategory: '',
fintorg: '',
sendyear: '',
submitdateone: '',
submitdatetwo: '',
xiangmulist: [],
projectlist: [],
index: 0,
// 咨询单位
danweilist: [],
danweiindex: 0,
end: '',
yeararr: [],
yearindex: -1,
startdate: '开始时间',
endate: '结束时间',
projectname: '项目类型',
danweiname: '主管部门',
stationname: '请选择主管部门',
stationindex: 0,
document: '',
stationlist: [],
yearname: '请选择年度',
}
},
onLoad() {
// 获取今年
var date = new Date();
var jinyear = date.getFullYear();
console.log(jinyear);
var qianyear = jinyear - 19
for (var i = qianyear; i <= jinyear; i++) {
this.yeararr.push(i)
}
// var sdate = new Date();
// let syear = date.getFullYear();
// let smonth = date.getMonth() + 1;
// let sday = date.getDate();
// let sday = date.getDate();
// this.startdate=syear+'-'+smonth+'-'+sday;
// this.endate=syear+'-'+smonth+'-'+sday
//获取项目类型
this.getprojectkind();
// 获取咨询单位列表
this.getzixundanwei();
this.getzhugaunlist()
},
computed: {
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
}
},
// computed: {
// startDate() {
// return this.getDate('start');
// },
// endDate() {
// return this.getDate('end');
// }
// },
methods: {
hide(){
this.tizhangshow=false
},
hidek(){
},
// 获取主管部门列表
getzhugaunlist() {
let that = this;
console.log(9988776655)
let url = "project/Get_ComDepartment";
// console.log('8877665544',param)
app.post(url, '', 'get').then(r => {
console.log(r);
that.stationlist = r.data
}).catch(err => {
console.log(err)
})
},
bindstationrChange: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value)
this.stationindex = e.target.value;
this.stationname = this.stationlist[e.target.value].fname;
this.document = this.stationlist[e.target.value].fid;
console.log(this.document)
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
// 筛选
shai() {
this.tizhangshow = !this.tizhangshow
// 点击筛选
},
reset() {
this.startdate = '开始时间';
this.endate = '结束时间';
this.projectname = '项目类型';
this.danweiname = '主管部门',
this.yearindex = -1
},
// 显示项目类型
getprojectkind() {
let url = "project/Get_ProjectType";
app.post(url, '', 'get').then(r => {
console.log(r)
this.projectlist = r.data;
console.log(this.projectlist);
// this.xiangmulist=r.data;
// console.log(this.xiangmulist)
}).catch(err => {
console.log(err)
})
},
// 选择项目
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value)
this.index = e.target.value;
this.fprojectcategory = this.projectlist[e.target.value].fname;
this.projectname = this.projectlist[e.target.value].fname
},
// 修改日期
bindDateChange: function(e) {
this.startdate = e.target.value;
this.submitdateone = e.target.value;
},
endDateChange(e) {
this.endate = e.target.value;
this.submitdatetwo = e.target.value;
},
//获取主管部门
getzixundanwei() {
let that = this;
console.log(9988776655)
let url = "project/Get_Document";
app.post(url, '', 'get').then(r => {
console.log(r);
that.danweilist = r.data;
// that.danweilist=JSON.stringify(that.danweilist)
console.log(that.danweilist)
// that.ftrialnumber=r.data[0].ftrialnumber;
// that.fconcludenumber=r.data[0].fconcludenumber;
// console.log('1234567890',JSON.stringify(r))
// that.rizhilist = r.data;
// console.log(that.rizhilist)
}).catch(err => {
console.log(err)
})
},
danweichange: function(e) {
console.log('picker发送选择改变,携带值为', e.target.value)
this.danweiindex = e.target.value;
this.fintorg = this.danweilist[e.target.value].fname;
this.danweiname = this.danweilist[e.target.value].fname;
},
// 年改变
yearchange(e) {
this.yearindex = e.target.value;
this.sendyear = this.yeararr[e.target.value];
this.yearname = this.yeararr[e.target.value];
},
gettiazhanglist() {
let that = this;
console.log(9988776543)
let url = "project/Get_GetRptaudit";
let param = {
toaudit: 'document',
fprojectcategory: that.fprojectcategory,
document: that.fintorg,
sendyear: that.sendyear,
submitdateone: that.submitdateone,
submitdatetwo: that.submitdatetwo,
fteam: '',
fintorg: '',
document:that.document
};
console.log('8877665544', param)
app.post(url, param, 'get').then(r => {
console.log(r)
// console.log('1234567890',r)
// let data=JSON.stringify(r)
// console.log(JSON.stringify(r))
this.xiangmulist = r.data;
let newxiangmulist = this.xiangmulist;
let xiangmu = []
for (var obj of newxiangmulist) {
// console.log(obj)
xiangmu.push(obj)
}
// console.log(xiangmu)
var end = xiangmu.splice(-1);
that.end = end;
console.log('3783747494389', this.end)
var len = xiangmu.length;
len = len - 1;
console.log(len)
xiangmu.splice(len, 1);
console.log(xiangmu)
this.xiangmulist = xiangmu;
console.log(typeof(xiangmu))
}).catch(err => {
console.log(err)
})
},
search() {
console.log(7766554)
this.gettiazhanglist();
this.tizhangshow = false
},
// 项目台账详情
taizhangdetail(e) {
console.log(e)
let item = e.target.dataset.item;
console.log(item)
item = JSON.stringify(item);
uni.navigateTo({
url: '../zhugauntaidetail/zhugauntaidetail?item=' + item + "&type=" + 5
})
},
},
onShow() {
// 获取台账列表
this.gettiazhanglist()
},
//上拉触底事件
onReachBottom: function() {
console.log(999)
// let page=this.page;
// page++;
// this.page=page;
// this.get_shuban_infor()
},
}
</script>
<style>
page {
background: #F9F9F9;
}
.topheadk{
position: fixed;
top:0;
left:0;
background: #fff;
width:750rpx;
}
.head {
width: 750rpx;
margin: 0 auto;
display: flex;
justify-content: space-around;
align-items: center;
padding: 32rpx 0;
box-sizing: border-box;
background: #fff;
}
.taizhang{
margin-top:250rpx!important
}
.headitem {
width: 350rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0 40rpx;
box-sizing: border-box;
border-right: 1rpx solid #BDC4CE;
}
.headitem:last-child {
border-right: none
}
.headitemtop {
color: #06121E;
font-size: 28rpx;
}
.headitembot {
color: #0093FF;
font-size: 32rpx;
margin-top: 15rpx;
}
.taizhangbox {
padding: 0 34rpx;
box-sizing: border-box;
}
.taizhang {
/* padding: 32rpx;
box-sizing: border-box; */
width: 686rpx;
margin: 32rpx auto 0;
background: #fff;
box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.03);
opacity: 1;
border-radius: 20px;
padding-bottom: 28rpx;
box-sizing: border-box;
margin-bottom: 200rpx;
}
.taizhanghead {
display: flex;
align-items: center;
justify-content: space-between;
padding: 28rpx 50rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #eee;
}
.taizhangitem {
color: #06121E;
font-size: 28rpx;
font-weight: bold;
}
.taiboxitem {
display: flex;
align-items: center;
padding: 20rpx 0;
box-sizing: border-box;
border-bottom: 1rpx solid #EEEEEE;
}
.taiboxitem:last-child {
border-bottom: none
}
.taizhangleft {
color: #06121E;
font-size: 28rpx;
}
.taizhangmiddle {
color: #06121E;
font-size: 28rpx;
width: 284rpx;
margin-left: 62rpx;
line-height: 1.3;
text-align: center;
}
.taizhangright {
color: #0093FF;
font-size: 28rpx;
margin-left: 56rpx;
}
.dibu {
display: flex;
align-items: center;
justify-content: flex-end;
width: 750rpx;
height: 104rpx;
padding: 0 32rpx;
box-sizing: border-box;
background: #fff;
position: fixed;
bottom: 0;
left: 0
}
.dibuleft {
display: flex;
align-items: center;
margin-right: 72rpx;
}
.dibulitemm {
display: flex;
align-items: center;
}
.dishu {
width: 40rpx;
height: 30rpx;
border: 1rpx solid #707070;
border-radius: 4rpx;
margin: 0 6rpx;
font-size: 0;
display: flex;
align-items: center;
justify-content: center;
}
.dishu input {
width: 100%;
height: 30rpx;
line-height: 30rpx;
padding: 5rpx 0;
box-sizing: border-box;
text-align: center;
font-size: 26rpx;
color: #8C9198;
/* height:20rpx; */
}
.dibuliteml,
.di,
.ye,
.dibulitemx,
.diburight {
color: #06121E;
font-size: 28rpx;
}
.dibuliteml {
margin-right: 36rpx
}
.dibulitemx {
margin-left: 36rpx
}
/* 评审类型 */
.wrapitem {
display: flex;
align-items: center;
margin-top: 40rpx;
}
.wrapitemleft {
width: 120rpx;
}
.wrapitemleft {
color: #06121E;
font-size: 28rpx
}
.wrapitemright {
width: 544rpx;
height: 76rpx;
background: rgba(238, 238, 238, 1);
opacity: 1;
border-radius: 8rpx;
margin-left: 18rpx;
display: flex;
align-items: center;
padding: 20rpx;
box-sizing: border-box;
}
.wrapitemright input {
width: 100%;
color: #8C9198;
font-size: 28rpx;
}
.nianduright {
width: 14rpx;
height: 22rpx;
font-size: 0;
}
.nianduleft {
width: 500rpx;
}
.nianduright image {
width: 100%;
height: 100%;
}
.time {
display: flex;
align-items: center;
margin-left: 18rpx;
}
.timeleft {
width: 232rpx;
height: 76rpx;
background: rgba(238, 238, 238, 1);
opacity: 1;
border-radius: 8rpx;
padding: 15rpx 20rpx;
box-sizing: border-box;
color: #8C9198;
font-size: 28rpx;
}
.timeleft input {
width: 100%;
color: #8C9198;
fotn-size: 28rpx;
}
.timemiddle {
width: 39rpx;
background: rgba(189, 196, 206, 1);
border: 1rpx solid rgba(189, 196, 206, 1);
opacity: 1;
margin: 0 20rpx;
}
.chaxun {
width: 200rpx;
height: 64rpx;
background: rgba(0, 147, 255, 1);
opacity: 1;
border-radius: 8rpx;
color: #F9F9F9;
font-size: 24rpx;
text-align: center;
line-height: 64rpx;
}
.projectname {
color: #8C9198;
font-size: 28rpx;
}
</style>