合并分支 'lhj' 到 'master'
Lhj 查看合并请求 !20
正在显示
33 个修改的文件
包含
1854 行增加
和
682 行删除
1 | { | 1 | { |
2 | "pages": [ | 2 | "pages": [ |
3 | "pages/companybox/qiyeyuebao/qiyeyuebao", | 3 | "pages/companybox/qiyeyuebao/qiyeyuebao", |
4 | - "pages/companybox/zhishudetail/shebei/shebeidetail/shebeidetail", | ||
5 | - "pages/companybox/zhishudetail/shebei/shebeilist/shebeilist", | ||
6 | - "pages/companybox/qiyedetail/qiyedetail", | ||
7 | - "pages/companybox/zhishudetail/member/member", | 4 | + "pages/changqu/changqu", |
8 | "pages/companybox/zhishudetail/car/car", | 5 | "pages/companybox/zhishudetail/car/car", |
9 | - | ||
10 | - "pages/companybox/defendetail/defendetail", | 6 | + "pages/companybox/zhishudetail/member/member", |
11 | "pages/companybox/zhishudetail/chengpin/chengpin", | 7 | "pages/companybox/zhishudetail/chengpin/chengpin", |
12 | "pages/companybox/zhishudetail/yuanliaomsg/yuanliao/yuanliao", | 8 | "pages/companybox/zhishudetail/yuanliaomsg/yuanliao/yuanliao", |
9 | + "pages/companybox/zhishudetail/shebei/shebeidetail/shebeidetail", | ||
10 | + "pages/companybox/zhishudetail/qiyeyongdian/detail/detail", | ||
11 | + "pages/companybox/zhishudetail/qiyeyongdian/qyyd/qyyd", | ||
12 | + "pages/companybox/defendetail/defendetail", | ||
13 | + "pages/yujing/yujing/yujing", | ||
14 | + "pages/companybox/qiyedetail/qiyedetail", | ||
15 | + "pages/yujing/yujingSet/yujingSet/yujingSet", | ||
16 | + "pages/yujing/yujingsearch/yujingsearch", | ||
17 | + "pages/companybox/zhishudetail/shebei/shebeilist/shebeilist", | ||
13 | "pages/qiye/qiye", | 18 | "pages/qiye/qiye", |
14 | - "pages/changqu/changqu", | ||
15 | - | ||
16 | - | ||
17 | "pages/companybox/zhishudetail/yuanliaomsg/yuanliaoDetail/yuanliaoDetail", | 19 | "pages/companybox/zhishudetail/yuanliaomsg/yuanliaoDetail/yuanliaoDetail", |
18 | - | ||
19 | - "pages/companybox/zhishudetail/qiyeyongdian/detail/detail", | ||
20 | "pages/companybox/jichuxinxi/jichuxinxi", | 20 | "pages/companybox/jichuxinxi/jichuxinxi", |
21 | "pages/login/login", | 21 | "pages/login/login", |
22 | "pages/mine/mine", | 22 | "pages/mine/mine", |
23 | "pages/index/index", | 23 | "pages/index/index", |
24 | "pages/logs/logs", | 24 | "pages/logs/logs", |
25 | - "pages/yujing/yujing/yujing", | ||
26 | - "pages/companybox/zhishudetail/qiyeyongdian/qyyd/qyyd", | ||
27 | - "pages/yujing/yujingSet/yujingSet/yujingSet", | ||
28 | "pages/yujing/yujingSet/yujingAdd/yujingAdd", | 25 | "pages/yujing/yujingSet/yujingAdd/yujingAdd", |
29 | "pages/yujing/yujingSet/yujingType/yujingType", | 26 | "pages/yujing/yujingSet/yujingType/yujingType", |
30 | "pages/yujing/yujingSet/yujingPerson/yujingPerson", | 27 | "pages/yujing/yujingSet/yujingPerson/yujingPerson", |
img/totop.png
0 → 100644
9.8 KB
@@ -13,17 +13,20 @@ function initChart1(canvas, width, height) { | @@ -13,17 +13,20 @@ function initChart1(canvas, width, height) { | ||
13 | var option = { | 13 | var option = { |
14 | title: { | 14 | title: { |
15 | text: '', | 15 | text: '', |
16 | - subtext: '' | ||
17 | - }, | ||
18 | - textStyle: { | ||
19 | - fontSize: 12 | 16 | + subtext: '', |
17 | + | ||
20 | }, | 18 | }, |
19 | + | ||
21 | tooltip: { | 20 | tooltip: { |
22 | trigger: 'axis' | 21 | trigger: 'axis' |
23 | }, | 22 | }, |
24 | legend: { | 23 | legend: { |
25 | - data: ['每月', '平均'] | 24 | + data: ['每月', '平均'], |
25 | + textStyle: { | ||
26 | + fontSize: 13 | ||
27 | + }, | ||
26 | }, | 28 | }, |
29 | + | ||
27 | toolbox: { | 30 | toolbox: { |
28 | 31 | ||
29 | 32 | ||
@@ -34,6 +37,9 @@ function initChart1(canvas, width, height) { | @@ -34,6 +37,9 @@ function initChart1(canvas, width, height) { | ||
34 | data: ['18.11', '18.12', '19.01', '19.02', '19.03', '19.04', '19.05', '19.06', '19.07'], | 37 | data: ['18.11', '18.12', '19.01', '19.02', '19.03', '19.04', '19.05', '19.06', '19.07'], |
35 | axisLabel: { | 38 | axisLabel: { |
36 | interval: 1, | 39 | interval: 1, |
40 | + textStyle: { | ||
41 | + fontSize: 13 | ||
42 | + }, | ||
37 | }, | 43 | }, |
38 | }, | 44 | }, |
39 | yAxis: { | 45 | yAxis: { |
@@ -44,13 +50,17 @@ function initChart1(canvas, width, height) { | @@ -44,13 +50,17 @@ function initChart1(canvas, width, height) { | ||
44 | 50 | ||
45 | 51 | ||
46 | axisLabel: { | 52 | axisLabel: { |
47 | - formatter: '{value}' | 53 | + formatter: '{value}', |
54 | + textStyle: { | ||
55 | + fontSize: 13 | ||
56 | + }, | ||
48 | } | 57 | } |
49 | }, | 58 | }, |
50 | series: [{ | 59 | series: [{ |
51 | name: '每月', | 60 | name: '每月', |
52 | type: 'line', | 61 | type: 'line', |
53 | color: '#FF5345', | 62 | color: '#FF5345', |
63 | + smooth: true, | ||
54 | data: [11, 11, 15, 13, 12, 13, 10], | 64 | data: [11, 11, 15, 13, 12, 13, 10], |
55 | markPoint: { | 65 | markPoint: { |
56 | data: [{ | 66 | data: [{ |
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | 49 | ||
50 | 50 | ||
51 | 51 | ||
52 | -<!-- 车辆状况 --> | 52 | +<!-- 日期头部 --> |
53 | 53 | ||
54 | <view class="peoplestate" wx:if="{{state==1}}"> | 54 | <view class="peoplestate" wx:if="{{state==1}}"> |
55 | <view class="date" bindtap="datexianshi"> | 55 | <view class="date" bindtap="datexianshi"> |
@@ -73,14 +73,10 @@ | @@ -73,14 +73,10 @@ | ||
73 | 73 | ||
74 | 74 | ||
75 | 75 | ||
76 | +<!-- 图表 --> | ||
76 | 77 | ||
77 | - | ||
78 | - <view class="containerzhe"> | 78 | + <view class="containerzhe" wx:if="{{datechu==false}}"> |
79 | <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas> | 79 | <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas> |
80 | </view> | 80 | </view> |
81 | - | ||
82 | - | ||
83 | - | ||
84 | - | ||
85 | </view> | 81 | </view> |
86 | 82 |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | display: block; | 22 | display: block; |
23 | content: ''; | 23 | content: ''; |
24 | width: 60rpx; | 24 | width: 60rpx; |
25 | - height: 1rpx; | 25 | + |
26 | border: 1rpx solid #ff9400; | 26 | border: 1rpx solid #ff9400; |
27 | position: absolute; | 27 | position: absolute; |
28 | left: 50%; | 28 | left: 50%; |
@@ -226,5 +226,6 @@ | @@ -226,5 +226,6 @@ | ||
226 | text-align: center; | 226 | text-align: center; |
227 | line-height: 80rpx; | 227 | line-height: 80rpx; |
228 | margin:8rpx auto 0; | 228 | margin:8rpx auto 0; |
229 | + | ||
229 | 230 | ||
230 | } | 231 | } |
1 | import * as echarts from '../../../ec-canvas/echarts'; | 1 | import * as echarts from '../../../ec-canvas/echarts'; |
2 | 2 | ||
3 | const app = getApp(); | 3 | const app = getApp(); |
4 | +var option1='' | ||
4 | 5 | ||
5 | function initChart(canvas, width, height) { | 6 | function initChart(canvas, width, height) { |
7 | + | ||
8 | + | ||
9 | + | ||
6 | const chart = echarts.init(canvas, null, { | 10 | const chart = echarts.init(canvas, null, { |
7 | width: width, | 11 | width: width, |
8 | height: height | 12 | height: height |
9 | }); | 13 | }); |
10 | canvas.setChart(chart); | 14 | canvas.setChart(chart); |
11 | 15 | ||
12 | - var option = { | 16 | + option1 = { |
13 | 17 | ||
14 | tooltip: { | 18 | tooltip: { |
15 | trigger: 'axis' | 19 | trigger: 'axis' |
@@ -26,25 +30,17 @@ function initChart(canvas, width, height) { | @@ -26,25 +30,17 @@ function initChart(canvas, width, height) { | ||
26 | left: 'center', | 30 | left: 'center', |
27 | top: 'bottom', | 31 | top: 'bottom', |
28 | }, | 32 | }, |
29 | - | ||
30 | - | ||
31 | - | ||
32 | - | ||
33 | legend: { | 33 | legend: { |
34 | enabled: true | 34 | enabled: true |
35 | }, | 35 | }, |
36 | radar: [ | 36 | radar: [ |
37 | 37 | ||
38 | - | ||
39 | { | 38 | { |
40 | indicator: [ | 39 | indicator: [ |
41 | 40 | ||
42 | { | 41 | { |
43 | text: '生产:90分', | 42 | text: '生产:90分', |
44 | max: 100, | 43 | max: 100, |
45 | - | ||
46 | - | ||
47 | - | ||
48 | }, | 44 | }, |
49 | { | 45 | { |
50 | text: '预警:60分', | 46 | text: '预警:60分', |
@@ -63,26 +59,17 @@ function initChart(canvas, width, height) { | @@ -63,26 +59,17 @@ function initChart(canvas, width, height) { | ||
63 | 59 | ||
64 | name: { | 60 | name: { |
65 | textStyle: { | 61 | textStyle: { |
66 | - | ||
67 | fontSize: 14 | 62 | fontSize: 14 |
68 | } | 63 | } |
69 | }, | 64 | }, |
70 | - | ||
71 | }, | 65 | }, |
72 | - | ||
73 | - | ||
74 | - | ||
75 | - | ||
76 | ], | 66 | ], |
77 | series: [{ | 67 | series: [{ |
78 | type: 'radar', | 68 | type: 'radar', |
79 | 69 | ||
80 | legend: { | 70 | legend: { |
81 | 71 | ||
82 | - | ||
83 | }, | 72 | }, |
84 | - | ||
85 | - | ||
86 | itemStyle: { | 73 | itemStyle: { |
87 | normal: { | 74 | normal: { |
88 | color: '#FBCB77', | 75 | color: '#FBCB77', |
@@ -104,19 +91,9 @@ function initChart(canvas, width, height) { | @@ -104,19 +91,9 @@ function initChart(canvas, width, height) { | ||
104 | }] | 91 | }] |
105 | }, | 92 | }, |
106 | 93 | ||
107 | - | ||
108 | - | ||
109 | ] | 94 | ] |
110 | }; | 95 | }; |
111 | - | ||
112 | - | ||
113 | - | ||
114 | - | ||
115 | - | ||
116 | - | ||
117 | - | ||
118 | - chart.setOption(option); | ||
119 | - | 96 | + chart.setOption(option1); |
120 | return chart; | 97 | return chart; |
121 | } | 98 | } |
122 | 99 | ||
@@ -227,7 +204,8 @@ Page({ | @@ -227,7 +204,8 @@ Page({ | ||
227 | } | 204 | } |
228 | }, | 205 | }, |
229 | onLoad: function (options) { | 206 | onLoad: function (options) { |
230 | - console.log(4383489489) | 207 | + console.log(option1) |
208 | + | ||
231 | }, | 209 | }, |
232 | //跳转得分页面 | 210 | //跳转得分页面 |
233 | godefen() { | 211 | godefen() { |
1 | <!--index.wxml--> | 1 | <!--index.wxml--> |
2 | 2 | ||
3 | <view class="detailbox"> | 3 | <view class="detailbox"> |
4 | -<view class="coint" bindtap="godefen"> | ||
5 | - <text class="cointleft">87</text> | ||
6 | - <text class="cointword">分</text> | 4 | + <view class="coint" bindtap="godefen"> |
5 | + <text class="cointleft">87</text> | ||
6 | + <text class="cointword">分</text> | ||
7 | 7 | ||
8 | -</view> | ||
9 | -<view class="zonghe">综合得分</view> | ||
10 | -<view class="container"> | ||
11 | - <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas> | ||
12 | -</view> | ||
13 | - | ||
14 | -<view class="xian"></view> | ||
15 | - | ||
16 | -<view class="middle"> | ||
17 | - <view class="companyname">无锡万峰金属制品有限公司</view> | ||
18 | - <view class="middlelist"> | ||
19 | - <view class="middleitemleft">企业法人</view> | ||
20 | - <view class="middleitemright">王刚</view> | ||
21 | </view> | 8 | </view> |
22 | - <view class="middlelist"> | ||
23 | - <view class="middleitemleft">统一信用代码</view> | ||
24 | - <view class="middleitemright">895597347547548758574</view> | 9 | + <view class="zonghe">综合得分</view> |
10 | + <view class="container"> | ||
11 | + <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas> | ||
25 | </view> | 12 | </view> |
26 | - <view class="middlelist"> | ||
27 | - <view class="middleitemleft">行业标签</view> | ||
28 | - <view class="middleitemright">金属加工</view> | ||
29 | - </view> | ||
30 | -</view> | ||
31 | 13 | ||
32 | -<!-- 指数详情 --> | 14 | + <view class="xian"></view> |
33 | 15 | ||
34 | -<view class="zhidetailbox"> | ||
35 | - <view class="zhititle">指数详情</view> | ||
36 | - <view class="zhilist"> | ||
37 | - <view class="zhishuitem"> | ||
38 | - <view class="zhilistimg"> | ||
39 | - <image src="/img/demo18.png"></image> | ||
40 | - </view> | ||
41 | - <view class="zhiname">开工</view> | 16 | + <view class="middle"> |
17 | + <view class="companyname">无锡万峰金属制品有限公司</view> | ||
18 | + <view class="middlelist"> | ||
19 | + <view class="middleitemleft">企业法人</view> | ||
20 | + <view class="middleitemright">王刚</view> | ||
42 | </view> | 21 | </view> |
43 | - <view class="zhishuitem" bindtap="dian"> | ||
44 | - <view class="zhilistimg dian"> | ||
45 | - <image src="/img/demo19.png"></image> | ||
46 | - </view> | ||
47 | - <view class="zhiname">电量</view> | 22 | + <view class="middlelist"> |
23 | + <view class="middleitemleft">统一信用代码</view> | ||
24 | + <view class="middleitemright">895597347547548758574</view> | ||
48 | </view> | 25 | </view> |
49 | - <view class="zhishuitem"> | ||
50 | - <view class="zhilistimg people"> | ||
51 | - <image src="/img/demo20.png"></image> | ||
52 | - </view> | ||
53 | - <view class="zhiname">人员</view> | 26 | + <view class="middlelist"> |
27 | + <view class="middleitemleft">行业标签</view> | ||
28 | + <view class="middleitemright">金属加工</view> | ||
54 | </view> | 29 | </view> |
55 | - <view class="zhishuitem"> | ||
56 | - <view class="zhilistimg car"> | ||
57 | - <image src="/img/demo21.png"></image> | 30 | + </view> |
31 | + | ||
32 | + <!-- 指数详情 --> | ||
33 | + | ||
34 | + <view class="zhidetailbox"> | ||
35 | + <view class="zhititle">指数详情</view> | ||
36 | + <view class="zhilist"> | ||
37 | + <view class="zhishuitem"> | ||
38 | + <view class="zhilistimg"> | ||
39 | + <image src="/img/demo18.png"></image> | ||
40 | + </view> | ||
41 | + <view class="zhiname">开工</view> | ||
58 | </view> | 42 | </view> |
59 | - <view class="zhiname">车辆</view> | ||
60 | - </view> | ||
61 | - <view class="zhishuitem"> | ||
62 | - <view class="zhilistimg cheng"> | ||
63 | - <image src="/img/demo22.png"></image> | 43 | + <view class="zhishuitem" bindtap="dian"> |
44 | + <view class="zhilistimg dian"> | ||
45 | + <image src="/img/demo19.png"></image> | ||
46 | + </view> | ||
47 | + <view class="zhiname">电量</view> | ||
64 | </view> | 48 | </view> |
65 | - <view class="zhiname">成品</view> | ||
66 | - </view> | ||
67 | - <view class="zhishuitem"> | ||
68 | - <view class="zhilistimg cheng"> | ||
69 | - <image src="/img/demo22.png"></image> | 49 | + <view class="zhishuitem"> |
50 | + <view class="zhilistimg people"> | ||
51 | + <image src="/img/demo20.png"></image> | ||
52 | + </view> | ||
53 | + <view class="zhiname">人员</view> | ||
70 | </view> | 54 | </view> |
71 | - <view class="zhiname">原材料</view> | ||
72 | - </view> | ||
73 | - <view class="zhishuitem"> | ||
74 | - <view class="zhilistimg shui"> | ||
75 | - <image src="/img/demo1.png"></image> | 55 | + <view class="zhishuitem"> |
56 | + <view class="zhilistimg car"> | ||
57 | + <image src="/img/demo21.png"></image> | ||
58 | + </view> | ||
59 | + <view class="zhiname">车辆</view> | ||
76 | </view> | 60 | </view> |
77 | - <view class="zhiname">水量</view> | ||
78 | - </view> | ||
79 | - <view class="zhishuitem"> | ||
80 | - <view class="zhilistimg qi"> | ||
81 | - <image src="/img/demo24.png"></image> | 61 | + <view class="zhishuitem"> |
62 | + <view class="zhilistimg cheng"> | ||
63 | + <image src="/img/demo22.png"></image> | ||
64 | + </view> | ||
65 | + <view class="zhiname">成品</view> | ||
82 | </view> | 66 | </view> |
83 | - <view class="zhiname">气量</view> | ||
84 | - </view> | ||
85 | - <view class="zhishuitem"> | ||
86 | - <view class="zhilistimg wu"> | ||
87 | - <image src="/img/demo23.png"></image> | 67 | + <view class="zhishuitem"> |
68 | + <view class="zhilistimg cheng"> | ||
69 | + <image src="/img/demo22.png"></image> | ||
70 | + </view> | ||
71 | + <view class="zhiname">原材料</view> | ||
72 | + </view> | ||
73 | + <view class="zhishuitem"> | ||
74 | + <view class="zhilistimg shui"> | ||
75 | + <image src="/img/demo1.png"></image> | ||
76 | + </view> | ||
77 | + <view class="zhiname">水量</view> | ||
78 | + </view> | ||
79 | + <view class="zhishuitem"> | ||
80 | + <view class="zhilistimg qi"> | ||
81 | + <image src="/img/demo24.png"></image> | ||
82 | + </view> | ||
83 | + <view class="zhiname">气量</view> | ||
84 | + </view> | ||
85 | + <view class="zhishuitem"> | ||
86 | + <view class="zhilistimg wu"> | ||
87 | + <image src="/img/demo23.png"></image> | ||
88 | + </view> | ||
89 | + <view class="zhiname">排污</view> | ||
88 | </view> | 90 | </view> |
89 | - <view class="zhiname">排污</view> | ||
90 | </view> | 91 | </view> |
91 | </view> | 92 | </view> |
92 | -</view> | ||
93 | 93 | ||
94 | -<!-- 企业月报 --> | 94 | + <!-- 企业月报 --> |
95 | 95 | ||
96 | -<view class="monthbao"> | ||
97 | - <view class="monthbaotop"> | ||
98 | - <view class="monthleft">企业月报</view> | ||
99 | - <view class="monthright"> | ||
100 | - <view class="rightword">查看详情</view> | ||
101 | - <view class="rightimg"> | ||
102 | - <image src="/img/yourow.png"></image> | 96 | + <view class="monthbao"> |
97 | + <view class="monthbaotop"> | ||
98 | + <view class="monthleft">企业月报</view> | ||
99 | + <view class="monthright"> | ||
100 | + <view class="rightword">查看详情</view> | ||
101 | + <view class="rightimg"> | ||
102 | + <image src="/img/yourow.png"></image> | ||
103 | + </view> | ||
103 | </view> | 104 | </view> |
104 | </view> | 105 | </view> |
105 | - </view> | ||
106 | 106 | ||
107 | -</view> | 107 | + </view> |
108 | 108 | ||
109 | -<view class="containerzhe"> | ||
110 | - <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas> | ||
111 | -</view> | 109 | + <view class="containerzhe"> |
110 | + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas> | ||
111 | + </view> | ||
112 | 112 | ||
113 | -<!-- 预警设置 --> | 113 | + <!-- 预警设置 --> |
114 | 114 | ||
115 | -<view class="monthbaotop yujing"> | ||
116 | - <view class="monthleft">预警设置</view> | ||
117 | - <view class="monthright"> | ||
118 | - <view class="rightword">查看详情</view> | ||
119 | - <view class="rightimg"> | ||
120 | - <image src="/img/yourow.png"></image> | 115 | + <view class="monthbaotop yujing"> |
116 | + <view class="monthleft">预警设置</view> | ||
117 | + <view class="monthright"> | ||
118 | + <view class="rightword">查看详情</view> | ||
119 | + <view class="rightimg"> | ||
120 | + <image src="/img/yourow.png"></image> | ||
121 | + </view> | ||
121 | </view> | 122 | </view> |
122 | </view> | 123 | </view> |
123 | -</view> | ||
124 | -<!-- 预警列表 --> | 124 | + <!-- 预警列表 --> |
125 | 125 | ||
126 | -<view class='yujinglist'> | ||
127 | - <view class="yujingitem"> | ||
128 | - <view class="yujingcontent kaigong"> | ||
129 | - 连续不开工时长(天):5 | ||
130 | - </view> | ||
131 | - <view class="yujingcontent tuisong"> | ||
132 | - 推送人员:张三、李四、王五 | ||
133 | - </view> | ||
134 | - <view class="yubottom"> | 126 | + <view class='yujinglist'> |
127 | + <view class="yujingitem"> | ||
128 | + <view class="yujingcontent kaigong"> | ||
129 | + 连续不开工时长(天):5 | ||
130 | + </view> | ||
131 | + <view class="yujingcontent tuisong"> | ||
132 | + 推送人员:张三、李四、王五 | ||
133 | + </view> | ||
134 | + <view class="yubottom"> | ||
135 | <view class="yuleft">修改</view> | 135 | <view class="yuleft">修改</view> |
136 | <view class="yuright">删除</view> | 136 | <view class="yuright">删除</view> |
137 | + </view> | ||
137 | </view> | 138 | </view> |
138 | - </view> | ||
139 | - <view class="yujingitem"> | ||
140 | - <view class="yujingcontent kaigong"> | ||
141 | - 连续不开工时长(天):5 | ||
142 | - </view> | ||
143 | - <view class="yujingcontent tuisong"> | ||
144 | - 推送人员:张三、李四、王五 | ||
145 | - </view> | ||
146 | - <view class="yubottom"> | 139 | + <view class="yujingitem"> |
140 | + <view class="yujingcontent kaigong"> | ||
141 | + 连续不开工时长(天):5 | ||
142 | + </view> | ||
143 | + <view class="yujingcontent tuisong"> | ||
144 | + 推送人员:张三、李四、王五 | ||
145 | + </view> | ||
146 | + <view class="yubottom"> | ||
147 | <view class="yuleft">修改</view> | 147 | <view class="yuleft">修改</view> |
148 | <view class="yuright">删除</view> | 148 | <view class="yuright">删除</view> |
149 | + </view> | ||
149 | </view> | 150 | </view> |
150 | - </view> | ||
151 | - <view class="yujingitem"> | ||
152 | - <view class="yujingcontent kaigong"> | ||
153 | - 连续不开工时长(天):5 | ||
154 | - </view> | ||
155 | - <view class="yujingcontent tuisong"> | ||
156 | - 推送人员:张三、李四、王五 | ||
157 | - </view> | ||
158 | - <view class="yubottom"> | 151 | + <view class="yujingitem"> |
152 | + <view class="yujingcontent kaigong"> | ||
153 | + 连续不开工时长(天):5 | ||
154 | + </view> | ||
155 | + <view class="yujingcontent tuisong"> | ||
156 | + 推送人员:张三、李四、王五 | ||
157 | + </view> | ||
158 | + <view class="yubottom"> | ||
159 | <view class="yuleft">修改</view> | 159 | <view class="yuleft">修改</view> |
160 | <view class="yuright">删除</view> | 160 | <view class="yuright">删除</view> |
161 | + </view> | ||
161 | </view> | 162 | </view> |
162 | - </view> | ||
163 | - <view class="yujingitem"> | ||
164 | - <view class="yujingcontent kaigong"> | ||
165 | - 连续不开工时长(天):5 | ||
166 | - </view> | ||
167 | - <view class="yujingcontent tuisong"> | ||
168 | - 推送人员:张三、李四、王五 | ||
169 | - </view> | ||
170 | - <view class="yubottom"> | 163 | + <view class="yujingitem"> |
164 | + <view class="yujingcontent kaigong"> | ||
165 | + 连续不开工时长(天):5 | ||
166 | + </view> | ||
167 | + <view class="yujingcontent tuisong"> | ||
168 | + 推送人员:张三、李四、王五 | ||
169 | + </view> | ||
170 | + <view class="yubottom"> | ||
171 | <view class="yuleft">修改</view> | 171 | <view class="yuleft">修改</view> |
172 | <view class="yuright">删除</view> | 172 | <view class="yuright">删除</view> |
173 | + </view> | ||
173 | </view> | 174 | </view> |
174 | </view> | 175 | </view> |
175 | -</view> | ||
176 | -</view> | ||
177 | - | 176 | +</view> |
@@ -643,6 +643,7 @@ Page({ | @@ -643,6 +643,7 @@ Page({ | ||
643 | data: { | 643 | data: { |
644 | statedate:"", | 644 | statedate:"", |
645 | state:1, | 645 | state:1, |
646 | + scrollTop: 0, | ||
646 | ec1: { | 647 | ec1: { |
647 | 648 | ||
648 | onInit: initChart1 | 649 | onInit: initChart1 |
@@ -682,6 +683,12 @@ Page({ | @@ -682,6 +683,12 @@ Page({ | ||
682 | }) | 683 | }) |
683 | 684 | ||
684 | }, | 685 | }, |
686 | + //回到顶部 | ||
687 | + goTop: function (e) { | ||
688 | + this.setData({ | ||
689 | + scrollTop: 0 | ||
690 | + }) | ||
691 | + }, | ||
685 | // 顶部tab切换 | 692 | // 顶部tab切换 |
686 | selectshebei(e){ | 693 | selectshebei(e){ |
687 | this.setData({ | 694 | this.setData({ |
@@ -6,7 +6,6 @@ | @@ -6,7 +6,6 @@ | ||
6 | <view class="datetime"> | 6 | <view class="datetime"> |
7 | <picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month"> | 7 | <picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month"> |
8 | <view class="datesel"> | 8 | <view class="datesel"> |
9 | - | ||
10 | <view class="picker"> | 9 | <view class="picker"> |
11 | {{statedate}} | 10 | {{statedate}} |
12 | </view> | 11 | </view> |
@@ -25,8 +24,6 @@ | @@ -25,8 +24,6 @@ | ||
25 | 24 | ||
26 | 25 | ||
27 | </view> | 26 | </view> |
28 | - | ||
29 | - | ||
30 | <!-- 顶部tab切换 --> | 27 | <!-- 顶部tab切换 --> |
31 | <view class="detailhead"> | 28 | <view class="detailhead"> |
32 | <view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">生产总评</view> | 29 | <view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">生产总评</view> |
@@ -35,10 +32,10 @@ | @@ -35,10 +32,10 @@ | ||
35 | <view class="detailname {{state==3?'selactive':''}}" bindtap="selectshebei" data-id="3">生产预警</view> | 32 | <view class="detailname {{state==3?'selactive':''}}" bindtap="selectshebei" data-id="3">生产预警</view> |
36 | 33 | ||
37 | </view> | 34 | </view> |
35 | +<!-- 生产总评 --> | ||
38 | 36 | ||
39 | - | ||
40 | -<!-- 客观信息 --> | ||
41 | -<view class="keguaninfo" wx:if="{{state==1}}"> | 37 | +<scroll-view class="bigWrap" scroll-y="true" scroll-top="{{scrollTop}}" bindscroll="scroll" bindscrolltolower= "scrolltolower" style="position: absolute; left: 0; top:148rpx; bottom: 0; right: 0;" wx:if="{{state==1}}"> |
38 | +<view class="keguaninfo" > | ||
42 | <!-- 企业开工时间 --> | 39 | <!-- 企业开工时间 --> |
43 | <view class="worktime"> | 40 | <view class="worktime"> |
44 | <!-- 头部日期 --> | 41 | <!-- 头部日期 --> |
@@ -93,6 +90,7 @@ | @@ -93,6 +90,7 @@ | ||
93 | 在分析无锡市好事达供应链管理有限公司时,综合考虑无锡好事达供应链管理有限公司于2019年4月,目前处于 | 90 | 在分析无锡市好事达供应链管理有限公司时,综合考虑无锡好事达供应链管理有限公司于2019年4月,目前处于 |
94 | <text class="commonstate">正常状态</text> | 91 | <text class="commonstate">正常状态</text> |
95 | </view> | 92 | </view> |
93 | + | ||
96 | </view> | 94 | </view> |
97 | </view> | 95 | </view> |
98 | 96 | ||
@@ -179,13 +177,19 @@ | @@ -179,13 +177,19 @@ | ||
179 | 177 | ||
180 | 178 | ||
181 | </view> | 179 | </view> |
180 | + | ||
181 | + <view class='totop' bindtap="goTop"> | ||
182 | + <image src="/img/totop.png"></image> | ||
183 | + </view> | ||
182 | </view> | 184 | </view> |
183 | </view> | 185 | </view> |
184 | 186 | ||
185 | </view> | 187 | </view> |
186 | 188 | ||
187 | -<!-- 生产总评 --> | 189 | +</scroll-view> |
190 | + | ||
188 | 191 | ||
192 | +<!-- 客观信息 --> | ||
189 | <view class="shengchanzog" wx:if="{{state==2}}"> | 193 | <view class="shengchanzog" wx:if="{{state==2}}"> |
190 | <!-- 企业生产总评--> | 194 | <!-- 企业生产总评--> |
191 | 195 | ||
@@ -221,12 +225,10 @@ | @@ -221,12 +225,10 @@ | ||
221 | <view class="desboxhead">分析</view> | 225 | <view class="desboxhead">分析</view> |
222 | <view class="destext"> | 226 | <view class="destext"> |
223 | 在分析无锡市好事达供应链管理有限公司时,综合考虑该公司客观生产信息、生产稳定性、预警提示信息等维度,进行主客观综合评分。 | 227 | 在分析无锡市好事达供应链管理有限公司时,综合考虑该公司客观生产信息、生产稳定性、预警提示信息等维度,进行主客观综合评分。 |
224 | - | ||
225 | </view> | 228 | </view> |
226 | </view> | 229 | </view> |
227 | </view> | 230 | </view> |
228 | <!-- 生产预警 --> | 231 | <!-- 生产预警 --> |
229 | - | ||
230 | <view class="yujing" wx:if="{{state==3}}"> | 232 | <view class="yujing" wx:if="{{state==3}}"> |
231 | <view class="yujinghead"> | 233 | <view class="yujinghead"> |
232 | <view class="yuitem xuhao">序号</view> | 234 | <view class="yuitem xuhao">序号</view> |
@@ -93,6 +93,7 @@ word-break: break-all; | @@ -93,6 +93,7 @@ word-break: break-all; | ||
93 | padding-bottom: 20rpx; | 93 | padding-bottom: 20rpx; |
94 | box-sizing: border-box; | 94 | box-sizing: border-box; |
95 | margin-top: 50rpx; | 95 | margin-top: 50rpx; |
96 | + position: relative | ||
96 | } | 97 | } |
97 | 98 | ||
98 | .destext { | 99 | .destext { |
@@ -219,4 +220,12 @@ word-break: break-all; | @@ -219,4 +220,12 @@ word-break: break-all; | ||
219 | right: 50%; | 220 | right: 50%; |
220 | transform: translate(-50%); | 221 | transform: translate(-50%); |
221 | bottom: -20rpx; | 222 | bottom: -20rpx; |
223 | +} | ||
224 | +.totop{ | ||
225 | + width:110rpx; | ||
226 | + height:110rpx; | ||
227 | + font-size: 0; | ||
228 | + position: absolute; | ||
229 | + top:-50rpx; | ||
230 | + right:0 | ||
222 | } | 231 | } |
@@ -15,7 +15,7 @@ function initChart1(canvas, width, height) { | @@ -15,7 +15,7 @@ function initChart1(canvas, width, height) { | ||
15 | text: '', | 15 | text: '', |
16 | subtext: '' | 16 | subtext: '' |
17 | }, | 17 | }, |
18 | - | 18 | + |
19 | tooltip: { | 19 | tooltip: { |
20 | trigger: 'axis' | 20 | trigger: 'axis' |
21 | }, | 21 | }, |
@@ -44,11 +44,11 @@ function initChart1(canvas, width, height) { | @@ -44,11 +44,11 @@ function initChart1(canvas, width, height) { | ||
44 | 44 | ||
45 | color: '#333', | 45 | color: '#333', |
46 | fontStyle: 'normal', | 46 | fontStyle: 'normal', |
47 | - | 47 | + |
48 | 48 | ||
49 | }, | 49 | }, |
50 | - | ||
51 | - | 50 | + |
51 | + | ||
52 | }, | 52 | }, |
53 | yAxis: { | 53 | yAxis: { |
54 | type: 'value', | 54 | type: 'value', |
@@ -97,7 +97,7 @@ function initChart1(canvas, width, height) { | @@ -97,7 +97,7 @@ function initChart1(canvas, width, height) { | ||
97 | name: '周最低', | 97 | name: '周最低', |
98 | value: 10, | 98 | value: 10, |
99 | xAxis: 1, | 99 | xAxis: 1, |
100 | - yAxis:10 | 100 | + yAxis: 10 |
101 | }] | 101 | }] |
102 | }, | 102 | }, |
103 | markLine: { | 103 | markLine: { |
@@ -171,9 +171,61 @@ Page({ | @@ -171,9 +171,61 @@ Page({ | ||
171 | 171 | ||
172 | // 车辆状况日期 | 172 | // 车辆状况日期 |
173 | showModal: false, | 173 | showModal: false, |
174 | - monthList: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], | ||
175 | - time: '', | ||
176 | - year:'' | 174 | + monthList: [{ |
175 | + sel: false, | ||
176 | + name: '1月' | ||
177 | + }, | ||
178 | + { | ||
179 | + sel: false, | ||
180 | + name: '2月' | ||
181 | + }, | ||
182 | + { | ||
183 | + sel: false, | ||
184 | + name: '3月' | ||
185 | + }, | ||
186 | + { | ||
187 | + sel: false, | ||
188 | + name: '4月' | ||
189 | + }, | ||
190 | + { | ||
191 | + sel: false, | ||
192 | + name: '5月' | ||
193 | + }, | ||
194 | + { | ||
195 | + sel: false, | ||
196 | + name: '6月' | ||
197 | + }, | ||
198 | + { | ||
199 | + sel: false, | ||
200 | + name: '7月' | ||
201 | + }, | ||
202 | + { | ||
203 | + sel: false, | ||
204 | + name: '8月' | ||
205 | + }, | ||
206 | + { | ||
207 | + sel: false, | ||
208 | + name: '9月' | ||
209 | + }, | ||
210 | + { | ||
211 | + sel: false, | ||
212 | + name: '10月' | ||
213 | + }, | ||
214 | + { | ||
215 | + sel: false, | ||
216 | + name: '11月' | ||
217 | + }, | ||
218 | + { | ||
219 | + sel: false, | ||
220 | + name: '12月' | ||
221 | + }, | ||
222 | + ], | ||
223 | + showt: true, | ||
224 | + time: '近30天', | ||
225 | + year: '', | ||
226 | + yeararray: [], | ||
227 | + yearname: '', | ||
228 | + | ||
177 | 229 | ||
178 | }, | 230 | }, |
179 | 231 | ||
@@ -181,6 +233,8 @@ Page({ | @@ -181,6 +233,8 @@ Page({ | ||
181 | * 生命周期函数--监听页面加载 | 233 | * 生命周期函数--监听页面加载 |
182 | */ | 234 | */ |
183 | onLoad: function(options) { | 235 | onLoad: function(options) { |
236 | + | ||
237 | + | ||
184 | this.setData({ | 238 | this.setData({ |
185 | statedate: app.monthnowDate(), | 239 | statedate: app.monthnowDate(), |
186 | watertime: app.newnowDate() + '-' + app.endate(), | 240 | watertime: app.newnowDate() + '-' + app.endate(), |
@@ -188,91 +242,108 @@ Page({ | @@ -188,91 +242,108 @@ Page({ | ||
188 | enddate: app.endate() | 242 | enddate: app.endate() |
189 | }) | 243 | }) |
190 | 244 | ||
191 | - | ||
192 | 245 | ||
193 | - //默认车辆状况日期 | ||
194 | - var date = new Date(); | ||
195 | - var month = date.getMonth() + 1; | ||
196 | - var year=date.getFullYear(); | 246 | + |
247 | + //获取年份数组 | ||
248 | + var newdate = new Date(); | ||
249 | + var newyear = newdate.getFullYear(); | ||
250 | + let newyeararray = this.data.yeararray; | ||
251 | + console.log(typeof(newyear)) | ||
252 | + | ||
253 | + | ||
254 | + for (var i = 1990; i <= newyear; i++) { | ||
255 | + newyeararray.push(i) | ||
256 | + } | ||
257 | + | ||
197 | this.setData({ | 258 | this.setData({ |
198 | - showdate:year+'年'+month+'月' | 259 | + yeararray: newyeararray, |
260 | + yearname: newyear | ||
261 | + | ||
199 | }) | 262 | }) |
200 | - if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { | ||
201 | - if (month < 10) { | ||
202 | - this.setData({ | ||
203 | - time: "(" + year+"." + "0" + month + ".01" + "-2019." + '0' + month + ".31" + ")" | ||
204 | - }) | ||
205 | - } else { | ||
206 | - this.setData({ | ||
207 | - time: "(" + year+"." + month + ".01" + "-2019." + month + ".31" + ")" | ||
208 | - }) | ||
209 | - } | 263 | + }, |
210 | 264 | ||
211 | - } else { | ||
212 | - if (month < 10) { | ||
213 | - this.setData({ | ||
214 | - time: "(" + year+"." + "0" + month + ".01" + "-2019." + '0' + month + ".30" + ")" | ||
215 | - }) | ||
216 | - } else { | ||
217 | - this.setData({ | ||
218 | - time: "(" + year+"." + month + ".01" + "-2019." + month + ".30" + ")" | ||
219 | - }) | ||
220 | - } | 265 | + //年份选择 |
266 | + bindyearChange(e) { | ||
267 | + console.log(e) | ||
268 | + this.setData({ | ||
221 | 269 | ||
222 | - } | 270 | + yearname: this.data.yeararray[e.detail.value] |
271 | + }) | ||
223 | 272 | ||
273 | + this.chosemonth() | ||
224 | }, | 274 | }, |
225 | 275 | ||
226 | //车辆状况日期 | 276 | //车辆状况日期 |
227 | choice(e) { | 277 | choice(e) { |
278 | + let index = e.currentTarget.dataset.id; | ||
279 | + this.setData({ | ||
280 | + showt: false, | ||
281 | + monthindex: index | ||
282 | + }) | ||
228 | 283 | ||
229 | - //默认显示当前月份 | ||
230 | 284 | ||
285 | + let newmonthList = this.data.monthList; | ||
286 | + for (var i = 0; i < newmonthList.length; i++) { | ||
287 | + | ||
288 | + if (i == index) { | ||
289 | + | ||
290 | + console.log(3489894) | ||
291 | + newmonthList[index].sel = !newmonthList[index].sel; | ||
292 | + } else { | ||
293 | + | ||
294 | + newmonthList[i].sel = false | ||
295 | + } | ||
296 | + } | ||
231 | 297 | ||
232 | this.setData({ | 298 | this.setData({ |
233 | - showt: false | 299 | + monthList: newmonthList |
234 | }) | 300 | }) |
235 | 301 | ||
236 | - var date = new Date(); | ||
237 | - | ||
238 | - var year = date.getFullYear() | ||
239 | - let index = e.currentTarget.dataset.id; | 302 | + |
303 | + this.chosemonth() | ||
304 | + | ||
305 | + console.log(this.data.time) | ||
306 | + }, | ||
307 | + | ||
308 | + | ||
309 | + //选择月份 | ||
310 | + chosemonth() { | ||
311 | + let index = this.data.monthindex; | ||
240 | index = index + 1 | 312 | index = index + 1 |
241 | if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) { | 313 | if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) { |
242 | - if (month < 10) { | 314 | + if (index < 10) { |
243 | this.setData({ | 315 | this.setData({ |
244 | - time: "(" + year + "." + "0" + index + ".01" + "-2019." + '0' + index + ".31" + ")" | 316 | + time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31" + ")" |
245 | }) | 317 | }) |
246 | } else { | 318 | } else { |
247 | this.setData({ | 319 | this.setData({ |
248 | - time: "(" + year + "." + index + ".01" + "-2019." + index + ".31" + ")" | 320 | + time: "(" + this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31" + ")" |
249 | }) | 321 | }) |
250 | } | 322 | } |
251 | 323 | ||
252 | } else { | 324 | } else { |
253 | if (index < 10) { | 325 | if (index < 10) { |
254 | this.setData({ | 326 | this.setData({ |
255 | - time: "(" + year + "." + "0" + index + ".01" + "-2019." + '0' + index + ".30" + ")" | 327 | + time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30" + ")" |
256 | }) | 328 | }) |
257 | } else { | 329 | } else { |
258 | this.setData({ | 330 | this.setData({ |
259 | - time: "(" + year + "." + index + ".01" + "-2019." + index + ".30" + ")" | 331 | + time: "(" + this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30" + ")" |
260 | }) | 332 | }) |
261 | } | 333 | } |
262 | 334 | ||
263 | } | 335 | } |
264 | - this.setData({ | ||
265 | - changeColor: index - 1, | ||
266 | - showdate: year + '年' + index + '月' | ||
267 | - | ||
268 | - }) | ||
269 | - | ||
270 | }, | 336 | }, |
271 | three() { | 337 | three() { |
338 | + | ||
339 | + let newmonthList = this.data.monthList; | ||
340 | + for (var obj of newmonthList) { | ||
341 | + obj.sel = false | ||
342 | + } | ||
272 | this.setData({ | 343 | this.setData({ |
273 | time: '近30天', | 344 | time: '近30天', |
274 | - showt: !this.data.showt, | ||
275 | - changeColor: -1 | 345 | + monthList: newmonthList, |
346 | + showt: !this.data.showt | ||
276 | }) | 347 | }) |
277 | }, | 348 | }, |
278 | toShowModal(e) { | 349 | toShowModal(e) { |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | </view> | 22 | </view> |
23 | </view> | 23 | </view> |
24 | 24 | ||
25 | - <view class="timebox" wx:if="{{currentdate}}"> | 25 | + <view class="timebox" wx:if="{{currentdate}}"> |
26 | <view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key=""> | 26 | <view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key=""> |
27 | <view class="itemcontent">{{item.year}}</view> | 27 | <view class="itemcontent">{{item.year}}</view> |
28 | <view class="itemcontent">{{item.month}}</view> | 28 | <view class="itemcontent">{{item.month}}</view> |
@@ -33,10 +33,10 @@ | @@ -33,10 +33,10 @@ | ||
33 | </view> | 33 | </view> |
34 | <view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view> | 34 | <view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view> |
35 | 35 | ||
36 | - | 36 | + |
37 | <view wx:if="{{currentdate}}"> | 37 | <view wx:if="{{currentdate}}"> |
38 | 38 | ||
39 | - <date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" /> | 39 | + <date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" /> |
40 | 40 | ||
41 | </view> | 41 | </view> |
42 | </view> | 42 | </view> |
@@ -48,10 +48,16 @@ | @@ -48,10 +48,16 @@ | ||
48 | <view wx:if="{{showModal}}"> | 48 | <view wx:if="{{showModal}}"> |
49 | <view class="modal-content"> | 49 | <view class="modal-content"> |
50 | <!-- 年份 --> | 50 | <!-- 年份 --> |
51 | - <view class="modal_year">2019年</view> | 51 | + <view class="modal_year"> |
52 | + <picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}"> | ||
53 | + <view class="picker"> | ||
54 | + {{yearname}}年 | ||
55 | + </view> | ||
56 | + </picker> | ||
57 | + </view> | ||
52 | <!-- 月份 --> | 58 | <!-- 月份 --> |
53 | <view class="modal_month"> | 59 | <view class="modal_month"> |
54 | - <view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view> | 60 | + <view class="month_single {{item.sel==true?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item.name}}</view> |
55 | </view> | 61 | </view> |
56 | <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view> | 62 | <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view> |
57 | <view class='btns'> | 63 | <view class='btns'> |
@@ -69,11 +75,11 @@ | @@ -69,11 +75,11 @@ | ||
69 | 75 | ||
70 | </view> | 76 | </view> |
71 | 77 | ||
78 | +<view wx:if="{{showModal==false}}"> | ||
79 | + <!-- 车辆状况 --> | ||
72 | 80 | ||
73 | -<!-- 车辆状况 --> | ||
74 | - | ||
75 | -<view class="peoplestate" wx:if="{{state==1}}"> | ||
76 | - <!-- <view class="date" bindtap="datexianshi"> | 81 | + <view class="peoplestate" wx:if="{{state==1}}"> |
82 | + <!-- <view class="date" bindtap="datexianshi"> | ||
77 | <view class="dateleft"> | 83 | <view class="dateleft"> |
78 | <image src="/img/row.png"></image> | 84 | <image src="/img/row.png"></image> |
79 | </view> | 85 | </view> |
@@ -92,93 +98,94 @@ | @@ -92,93 +98,94 @@ | ||
92 | </view> | 98 | </view> |
93 | </view> --> | 99 | </view> --> |
94 | 100 | ||
95 | - <view class="date" bindtap='toShowModal'> | ||
96 | - <view class="dateleft"> | ||
97 | - <image src="/img/row.png"></image> | ||
98 | - </view> | ||
99 | - <view class="datetime"> | ||
100 | - <view class="datesel"> | ||
101 | - {{time}} | 101 | + <view class="date" bindtap='toShowModal'> |
102 | + <view class="dateleft"> | ||
103 | + <image src="/img/row.png"></image> | ||
104 | + </view> | ||
105 | + <view class="datetime"> | ||
106 | + <view class="datesel"> | ||
107 | + {{time}} | ||
108 | + </view> | ||
109 | + | ||
110 | + <view class="datepic"> | ||
111 | + <image src="/img/row.png"></image> | ||
112 | + </view> | ||
102 | </view> | 113 | </view> |
103 | 114 | ||
104 | - <view class="datepic"> | 115 | + <view class="dateright"> |
105 | <image src="/img/row.png"></image> | 116 | <image src="/img/row.png"></image> |
106 | </view> | 117 | </view> |
107 | </view> | 118 | </view> |
108 | 119 | ||
109 | - <view class="dateright"> | ||
110 | - <image src="/img/row.png"></image> | ||
111 | - </view> | ||
112 | - </view> | ||
113 | - | ||
114 | 120 | ||
115 | - <view class="shebeinum"> | ||
116 | - <text class="she">车辆进出信息</text> | ||
117 | - </view> | 121 | + <view class="shebeinum"> |
122 | + <text class="she">车辆进出信息</text> | ||
123 | + </view> | ||
118 | 124 | ||
119 | - <view class="containerzhe"> | ||
120 | - <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas> | ||
121 | - </view> | 125 | + <view class="containerzhe"> |
126 | + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas> | ||
127 | + </view> | ||
122 | 128 | ||
123 | - <view class="datetime">{{showdate}}</view> | 129 | + <view class="datetime">{{showdate}}</view> |
124 | 130 | ||
125 | 131 | ||
126 | -</view> | 132 | + </view> |
127 | 133 | ||
128 | -<!-- 车辆流水 --> | 134 | + <!-- 车辆流水 --> |
129 | 135 | ||
130 | -<view class="lishui" wx:if="{{state==2}}"> | ||
131 | - <view class="date" bindtap="datexianshi"> | ||
132 | - <view class="dateleft"> | ||
133 | - <image src="/img/row.png"></image> | ||
134 | - </view> | ||
135 | - <view class="datetime"> | ||
136 | - <view class="datesel"> | ||
137 | - {{watertime}} | 136 | + <view class="lishui" wx:if="{{state==2}}"> |
137 | + <view class="date" bindtap="datexianshi"> | ||
138 | + <view class="dateleft"> | ||
139 | + <image src="/img/row.png"></image> | ||
140 | + </view> | ||
141 | + <view class="datetime"> | ||
142 | + <view class="datesel"> | ||
143 | + {{watertime}} | ||
144 | + </view> | ||
145 | + | ||
146 | + <view class="datepic"> | ||
147 | + <image src="/img/row.png"></image> | ||
148 | + </view> | ||
138 | </view> | 149 | </view> |
139 | 150 | ||
140 | - <view class="datepic"> | 151 | + <view class="dateright"> |
141 | <image src="/img/row.png"></image> | 152 | <image src="/img/row.png"></image> |
142 | </view> | 153 | </view> |
143 | </view> | 154 | </view> |
144 | 155 | ||
145 | - <view class="dateright"> | ||
146 | - <image src="/img/row.png"></image> | ||
147 | - </view> | ||
148 | - </view> | ||
149 | - | ||
150 | - <view class="shuibox"> | 156 | + <view class="shuibox"> |
151 | 157 | ||
152 | - <view class="shihead"> | ||
153 | - <view class="headitem shijian">时间</view> | ||
154 | - <view class="headitem shexiang">摄像头</view> | ||
155 | - <view class="headitem derition">方向</view> | 158 | + <view class="shihead"> |
159 | + <view class="headitem shijian">时间</view> | ||
160 | + <view class="headitem shexiang">摄像头</view> | ||
161 | + <view class="headitem derition">方向</view> | ||
156 | 162 | ||
157 | - </view> | ||
158 | - <view class="shuicontent"> | ||
159 | - <view class="shuiitem"> | ||
160 | - <view class="shuiitemleft shijian">06.01</view> | ||
161 | - <view class="shuiitemleft shexiang">大厅左上角</view> | ||
162 | - <view class="shuiitemleft derition">进</view> | ||
163 | </view> | 163 | </view> |
164 | - <view class="shuiitem"> | ||
165 | - <view class="shuiitemleft shijian">06.01</view> | ||
166 | - <view class="shuiitemleft shexiang">大厅左上角</view> | ||
167 | - <view class="shuiitemleft derition">进</view> | 164 | + <view class="shuicontent"> |
165 | + <view class="shuiitem"> | ||
166 | + <view class="shuiitemleft shijian">06.01</view> | ||
167 | + <view class="shuiitemleft shexiang">大厅左上角</view> | ||
168 | + <view class="shuiitemleft derition">进</view> | ||
169 | + </view> | ||
170 | + <view class="shuiitem"> | ||
171 | + <view class="shuiitemleft shijian">06.01</view> | ||
172 | + <view class="shuiitemleft shexiang">大厅左上角</view> | ||
173 | + <view class="shuiitemleft derition">进</view> | ||
174 | + </view> | ||
175 | + | ||
176 | + <view class="shuiitem"> | ||
177 | + <view class="shuiitemleft shijian">06.01</view> | ||
178 | + <view class="shuiitemleft shexiang">大厅左上角</view> | ||
179 | + <view class="shuiitemleft derition">进</view> | ||
180 | + </view> | ||
181 | + <view class="shuiitem"> | ||
182 | + <view class="shuiitemleft shijian">06.01</view> | ||
183 | + <view class="shuiitemleft shexiang">车间后方大转盘</view> | ||
184 | + <view class="shuiitemleft derition">进</view> | ||
185 | + </view> | ||
168 | </view> | 186 | </view> |
169 | 187 | ||
170 | - <view class="shuiitem"> | ||
171 | - <view class="shuiitemleft shijian">06.01</view> | ||
172 | - <view class="shuiitemleft shexiang">大厅左上角</view> | ||
173 | - <view class="shuiitemleft derition">进</view> | ||
174 | - </view> | ||
175 | - <view class="shuiitem"> | ||
176 | - <view class="shuiitemleft shijian">06.01</view> | ||
177 | - <view class="shuiitemleft shexiang">车间后方大转盘</view> | ||
178 | - <view class="shuiitemleft derition">进</view> | ||
179 | - </view> | ||
180 | </view> | 188 | </view> |
181 | 189 | ||
182 | </view> | 190 | </view> |
183 | - | ||
184 | </view> | 191 | </view> |
@@ -10,11 +10,61 @@ Page({ | @@ -10,11 +10,61 @@ Page({ | ||
10 | * 页面的初始数据 | 10 | * 页面的初始数据 |
11 | */ | 11 | */ |
12 | data: { | 12 | data: { |
13 | + montharr: [{ | ||
14 | + sel: false, | ||
15 | + name: '1月' | ||
16 | + }, | ||
17 | + { | ||
18 | + sel: false, | ||
19 | + name: '2月' | ||
20 | + }, | ||
21 | + { | ||
22 | + sel: false, | ||
23 | + name: '3月' | ||
24 | + }, | ||
25 | + { | ||
26 | + sel: false, | ||
27 | + name: '4月' | ||
28 | + }, | ||
29 | + { | ||
30 | + sel: false, | ||
31 | + name: '5月' | ||
32 | + }, | ||
33 | + { | ||
34 | + sel: false, | ||
35 | + name: '6月' | ||
36 | + }, | ||
37 | + { | ||
38 | + sel: false, | ||
39 | + name: '7月' | ||
40 | + }, | ||
41 | + { | ||
42 | + sel: false, | ||
43 | + name: '8月' | ||
44 | + }, | ||
45 | + { | ||
46 | + sel: false, | ||
47 | + name: '9月' | ||
48 | + }, | ||
49 | + { | ||
50 | + sel: false, | ||
51 | + name: '10月' | ||
52 | + }, | ||
53 | + { | ||
54 | + sel: false, | ||
55 | + name: '11月' | ||
56 | + }, | ||
57 | + { | ||
58 | + sel: false, | ||
59 | + name: '12月' | ||
60 | + }, | ||
61 | + ], | ||
13 | showModal: false, | 62 | showModal: false, |
63 | + showt: true, | ||
14 | modalTitle: ["选择时间", "选择地磅", "选择货物"], | 64 | modalTitle: ["选择时间", "选择地磅", "选择货物"], |
15 | modalNum: 0, | 65 | modalNum: 0, |
16 | monthList: ["货物名字", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", ], | 66 | monthList: ["货物名字", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", ], |
17 | - time: '2019.01.01-2019.01.31', | 67 | + time: '近30天', |
18 | changeColor: 0, | 68 | changeColor: 0, |
19 | tabList: ["出库", "流水"], | 69 | tabList: ["出库", "流水"], |
20 | tabNum: 0, | 70 | tabNum: 0, |
@@ -42,16 +92,20 @@ Page({ | @@ -42,16 +92,20 @@ Page({ | ||
42 | }, | 92 | }, |
43 | ], | 93 | ], |
44 | 94 | ||
45 | - watertime:'', | 95 | + watertime: '', |
46 | 96 | ||
47 | 97 | ||
48 | //出库日期 | 98 | //出库日期 |
49 | statedate: '', | 99 | statedate: '', |
50 | 100 | ||
51 | - timestate:1, | ||
52 | - timesel:1, | 101 | + timestate: 1, |
102 | + timesel: 1, | ||
53 | startdate: '', | 103 | startdate: '', |
54 | enddate: '', | 104 | enddate: '', |
105 | + yeararray: [], | ||
106 | + yearname: '', | ||
107 | + | ||
108 | + | ||
55 | ec: { | 109 | ec: { |
56 | 110 | ||
57 | onInit: function(canvas, width, height) { | 111 | onInit: function(canvas, width, height) { |
@@ -71,7 +125,9 @@ Page({ | @@ -71,7 +125,9 @@ Page({ | ||
71 | }, | 125 | }, |
72 | 126 | ||
73 | lazyLoad: true, // 延迟加载 | 127 | lazyLoad: true, // 延迟加载 |
74 | - showt: false | 128 | + |
129 | + shodate: true, | ||
130 | + | ||
75 | }, | 131 | }, |
76 | 132 | ||
77 | }, | 133 | }, |
@@ -79,8 +135,10 @@ Page({ | @@ -79,8 +135,10 @@ Page({ | ||
79 | this.setData({ | 135 | this.setData({ |
80 | tabNum: e.currentTarget.dataset.id | 136 | tabNum: e.currentTarget.dataset.id |
81 | }) | 137 | }) |
82 | - if(this.data.tabNum==0){ | ||
83 | - | 138 | + |
139 | + console.log(this.data.tabNum) | ||
140 | + if (this.data.tabNum == 0) { | ||
141 | + | ||
84 | this.echartsComponnet = this.selectComponent('#mychart'); | 142 | this.echartsComponnet = this.selectComponent('#mychart'); |
85 | 143 | ||
86 | 144 | ||
@@ -104,7 +162,7 @@ Page({ | @@ -104,7 +162,7 @@ Page({ | ||
104 | }) | 162 | }) |
105 | }, | 163 | }, |
106 | //显示日期弹层 | 164 | //显示日期弹层 |
107 | - | 165 | + |
108 | datexianshi() { | 166 | datexianshi() { |
109 | this.setData({ | 167 | this.setData({ |
110 | datechu: true, | 168 | datechu: true, |
@@ -125,10 +183,10 @@ Page({ | @@ -125,10 +183,10 @@ Page({ | ||
125 | day = "0" + day | 183 | day = "0" + day |
126 | } | 184 | } |
127 | console.log() | 185 | console.log() |
128 | - if (typeof (day) == 'number') { | 186 | + if (typeof(day) == 'number') { |
129 | day = day.toString() | 187 | day = day.toString() |
130 | } | 188 | } |
131 | - console.log(typeof (day)) | 189 | + console.log(typeof(day)) |
132 | this.setData({ | 190 | this.setData({ |
133 | datePickerValue: [year, month, day], | 191 | datePickerValue: [year, month, day], |
134 | }) | 192 | }) |
@@ -137,9 +195,9 @@ Page({ | @@ -137,9 +195,9 @@ Page({ | ||
137 | 195 | ||
138 | // 时间地磅货物选择 | 196 | // 时间地磅货物选择 |
139 | 197 | ||
140 | - selectbang(e){ | 198 | + selectbang(e) { |
141 | this.setData({ | 199 | this.setData({ |
142 | - modalNum:e.currentTarget.dataset.index | 200 | + modalNum: e.currentTarget.dataset.index |
143 | }) | 201 | }) |
144 | }, | 202 | }, |
145 | 203 | ||
@@ -155,7 +213,7 @@ Page({ | @@ -155,7 +213,7 @@ Page({ | ||
155 | 213 | ||
156 | this.datexianshi() | 214 | this.datexianshi() |
157 | }, | 215 | }, |
158 | - datePickerOnSureClick: function (e) { | 216 | + datePickerOnSureClick: function(e) { |
159 | console.log('datePickerOnSureClick'); | 217 | console.log('datePickerOnSureClick'); |
160 | 218 | ||
161 | if (this.data.timesel == 1) { | 219 | if (this.data.timesel == 1) { |
@@ -182,7 +240,7 @@ Page({ | @@ -182,7 +240,7 @@ Page({ | ||
182 | 240 | ||
183 | }, | 241 | }, |
184 | 242 | ||
185 | - datePickerOnCancelClick: function (event) { | 243 | + datePickerOnCancelClick: function(event) { |
186 | console.log('datePickerOnCancelClick'); | 244 | console.log('datePickerOnCancelClick'); |
187 | console.log(event); | 245 | console.log(event); |
188 | this.setData({ | 246 | this.setData({ |
@@ -201,55 +259,175 @@ Page({ | @@ -201,55 +259,175 @@ Page({ | ||
201 | }) | 259 | }) |
202 | }, | 260 | }, |
203 | 261 | ||
204 | -// 选择地磅 | ||
205 | - quedibang(){ | 262 | + // 选择地磅 |
263 | + quedibang() { | ||
206 | this.setData({ | 264 | this.setData({ |
207 | datechu: false | 265 | datechu: false |
208 | }) | 266 | }) |
209 | }, | 267 | }, |
210 | // 取消选择 | 268 | // 取消选择 |
211 | - quxiaobang(){ | 269 | + quxiaobang() { |
212 | this.setData({ | 270 | this.setData({ |
213 | datechu: false, | 271 | datechu: false, |
214 | watertime: app.newnowDate() + '-' + app.endate(), | 272 | watertime: app.newnowDate() + '-' + app.endate(), |
215 | }) | 273 | }) |
216 | }, | 274 | }, |
217 | choice(e) { | 275 | choice(e) { |
218 | - let index = e.currentTarget.dataset.id | 276 | + let index = e.currentTarget.dataset.id; |
219 | 277 | ||
220 | this.setData({ | 278 | this.setData({ |
221 | changeColor: e.currentTarget.dataset.id, | 279 | changeColor: e.currentTarget.dataset.id, |
222 | watertime: this.data.monthList[index], | 280 | watertime: this.data.monthList[index], |
223 | - | 281 | + |
282 | + }) | ||
283 | + }, | ||
284 | + //年份选择 | ||
285 | + bindyearChange(e) { | ||
286 | + console.log(e) | ||
287 | + this.setData({ | ||
288 | + | ||
289 | + yearname: this.data.yeararray[e.detail.value] | ||
290 | + }) | ||
291 | + | ||
292 | + this.chosemonth() | ||
293 | + }, | ||
294 | + | ||
295 | + | ||
296 | + | ||
297 | + choicemonth(e) { | ||
298 | + let index = e.currentTarget.dataset.id; | ||
299 | + this.setData({ | ||
300 | + showt: false, | ||
301 | + monthindex: index | ||
302 | + }) | ||
303 | + | ||
304 | + | ||
305 | + let newmonthList = this.data.montharr; | ||
306 | + for (var i = 0; i < newmonthList.length; i++) { | ||
307 | + | ||
308 | + if (i == index) { | ||
309 | + | ||
310 | + console.log(3489894) | ||
311 | + newmonthList[index].sel = !newmonthList[index].sel; | ||
312 | + } else { | ||
313 | + | ||
314 | + newmonthList[i].sel = false | ||
315 | + } | ||
316 | + } | ||
317 | + | ||
318 | + this.setData({ | ||
319 | + montharr: newmonthList | ||
224 | }) | 320 | }) |
321 | + | ||
322 | + | ||
323 | + this.chosemonth() | ||
324 | + | ||
325 | + console.log(this.data.time) | ||
326 | + }, | ||
327 | + | ||
328 | + | ||
329 | + //选择月份 | ||
330 | + chosemonth() { | ||
331 | + let index = this.data.monthindex; | ||
332 | + index = index + 1 | ||
333 | + if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) { | ||
334 | + if (index < 10) { | ||
335 | + this.setData({ | ||
336 | + time: this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31" | ||
337 | + }) | ||
338 | + } else { | ||
339 | + this.setData({ | ||
340 | + time: this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31" | ||
341 | + }) | ||
342 | + } | ||
343 | + | ||
344 | + } else { | ||
345 | + if (index < 10) { | ||
346 | + this.setData({ | ||
347 | + time: +this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30" | ||
348 | + }) | ||
349 | + } else { | ||
350 | + this.setData({ | ||
351 | + time: +this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30" | ||
352 | + }) | ||
353 | + } | ||
354 | + | ||
355 | + } | ||
356 | + }, | ||
357 | + three() { | ||
358 | + | ||
359 | + let newmonthList = this.data.montharr; | ||
360 | + for (var obj of newmonthList) { | ||
361 | + obj.sel = false | ||
362 | + } | ||
363 | + this.setData({ | ||
364 | + time: '近30天', | ||
365 | + montharr: newmonthList, | ||
366 | + showt: !this.data.showt | ||
367 | + }) | ||
368 | + }, | ||
369 | + | ||
370 | + hideModal() { | ||
371 | + this.setData({ | ||
372 | + showModal: false | ||
373 | + }); | ||
374 | + this.echartsComponnet = this.selectComponent('#mychart'); | ||
375 | + | ||
376 | + | ||
377 | + //如果是第一次绘制 | ||
378 | + | ||
379 | + if (!Chart) { | ||
380 | + this.init_echarts(); //初始化图表 | ||
381 | + | ||
382 | + | ||
383 | + } else { | ||
384 | + | ||
385 | + this.setOption(Chart); //更新数据 | ||
386 | + | ||
387 | + } | ||
225 | }, | 388 | }, |
226 | /** | 389 | /** |
227 | * 生命周期函数--监听页面加载 | 390 | * 生命周期函数--监听页面加载 |
228 | */ | 391 | */ |
229 | onLoad: function(options) { | 392 | onLoad: function(options) { |
230 | - | 393 | + |
231 | this.setData({ | 394 | this.setData({ |
232 | statedate: app.monthnowDate(), | 395 | statedate: app.monthnowDate(), |
233 | startdate: app.newnowDate(), | 396 | startdate: app.newnowDate(), |
234 | - enddate: app.endate() | 397 | + enddate: app.endate(), |
398 | + watertime: app.newnowDate() + '-' + app.endate(), | ||
235 | }) | 399 | }) |
236 | - let newdate = this.data.statedate.split("-"); | 400 | + |
401 | + | ||
402 | + | ||
403 | + //获取年份数组 | ||
404 | + var newdate = new Date(); | ||
405 | + var newyear = newdate.getFullYear(); | ||
406 | + let newyeararray = this.data.yeararray; | ||
407 | + console.log(typeof(newyear)) | ||
408 | + | ||
409 | + | ||
410 | + for (var i = 1990; i <= newyear; i++) { | ||
411 | + newyeararray.push(i) | ||
412 | + } | ||
413 | + | ||
237 | this.setData({ | 414 | this.setData({ |
238 | - showdate: newdate[0] + '年' + newdate[1] + '月', | ||
239 | - watertime: app.newnowDate() + '-' + app.endate(), | 415 | + yeararray: newyeararray, |
416 | + yearname: newyear | ||
417 | + | ||
240 | }) | 418 | }) |
241 | 419 | ||
242 | - | 420 | + |
243 | 421 | ||
244 | }, | 422 | }, |
245 | // 跳转详情页 | 423 | // 跳转详情页 |
246 | - detail(){ | 424 | + detail() { |
247 | wx.navigateTo({ | 425 | wx.navigateTo({ |
248 | url: '/pages/companybox/zhishudetail/chengpindetail/chengpindetail', | 426 | url: '/pages/companybox/zhishudetail/chengpindetail/chengpindetail', |
249 | }) | 427 | }) |
250 | }, | 428 | }, |
251 | 429 | ||
252 | - | 430 | + |
253 | // 选择日期 | 431 | // 选择日期 |
254 | bindstateDateChange(e) { | 432 | bindstateDateChange(e) { |
255 | console.log('picker发送选择改变,携带值为', e.detail.value) | 433 | console.log('picker发送选择改变,携带值为', e.detail.value) |
@@ -412,7 +590,7 @@ Page({ | @@ -412,7 +590,7 @@ Page({ | ||
412 | * 生命周期函数--监听页面显示 | 590 | * 生命周期函数--监听页面显示 |
413 | */ | 591 | */ |
414 | onShow: function() { | 592 | onShow: function() { |
415 | - | 593 | + |
416 | this.echartsComponnet = this.selectComponent('#mychart'); | 594 | this.echartsComponnet = this.selectComponent('#mychart'); |
417 | 595 | ||
418 | 596 |
1 | <!--pages/qiyeyongdian/detail/detail.wxml--> | 1 | <!--pages/qiyeyongdian/detail/detail.wxml--> |
2 | <!-- 货物信息 --> | 2 | <!-- 货物信息 --> |
3 | -<view class="modal-mask" bindtap="hideModal" wx:if="{{datechu}}"></view> | 3 | +<view class="modal-mask" bindtap="hideModal" wx:if="{{datechu}}"></view> |
4 | <view wx:if="{{datechu}}"> | 4 | <view wx:if="{{datechu}}"> |
5 | <view class="modal-content"> | 5 | <view class="modal-content"> |
6 | - <!-- 时间 地磅 货物 选项卡 --> | 6 | + <!-- 时间 地磅 货物 选项卡 --> |
7 | 7 | ||
8 | <view class="modal_year"> | 8 | <view class="modal_year"> |
9 | <view class="modal_single {{modalNum == index ?'modal_choice':''}}" wx:for="{{modalTitle}}" wx:key="" bindtap='selectbang' data-index="{{index}}">{{item}}</view> | 9 | <view class="modal_single {{modalNum == index ?'modal_choice':''}}" wx:for="{{modalTitle}}" wx:key="" bindtap='selectbang' data-index="{{index}}">{{item}}</view> |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | <view class="timewrap" wx:if="{{modalNum==0}}"> | 13 | <view class="timewrap" wx:if="{{modalNum==0}}"> |
14 | 14 | ||
15 | <view class="timewrap"> | 15 | <view class="timewrap"> |
16 | - | 16 | + |
17 | 17 | ||
18 | <!-- 开始时间和结束时间 --> | 18 | <!-- 开始时间和结束时间 --> |
19 | 19 | ||
@@ -81,12 +81,45 @@ | @@ -81,12 +81,45 @@ | ||
81 | </view> | 81 | </view> |
82 | 82 | ||
83 | 83 | ||
84 | +<!-- 出库日期弹出层 --> | ||
85 | + | ||
86 | +<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view> | ||
87 | +<view wx:if="{{showModal}}"> | ||
88 | + <view class="modal-content"> | ||
89 | + <!-- 年份 --> | ||
90 | + <view class="modal_year"> | ||
91 | + <picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}"> | ||
92 | + <view class="picker"> | ||
93 | + {{yearname}}年 | ||
94 | + </view> | ||
95 | + </picker> | ||
96 | + </view> | ||
97 | + <!-- 月份 --> | ||
98 | + <view class="modal_month"> | ||
99 | + | ||
100 | + <view class="month_yue {{item.sel==true?'change':''}}" wx:for="{{montharr}}" wx:key="" data-id="{{index}}" catchtap="choicemonth">{{item.name}}</view> | ||
101 | + </view> | ||
102 | + <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view> | ||
103 | + <view class='btns'> | ||
104 | + <view class="cacle" bindtap="hideModal">取消</view> | ||
105 | + <view class="cacle sure" bindtap="hideModal">确定</view> | ||
106 | + </view> | ||
107 | + </view> | ||
108 | +</view> | ||
109 | + | ||
110 | + | ||
111 | + | ||
84 | 112 | ||
85 | 113 | ||
86 | 114 | ||
87 | <!-- 出库 流水选项卡 --> | 115 | <!-- 出库 流水选项卡 --> |
88 | <view class="tab"> | 116 | <view class="tab"> |
89 | - <view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view> | 117 | + <view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}"> |
118 | + | ||
119 | + | ||
120 | + {{item}} | ||
121 | + | ||
122 | + </view> | ||
90 | </view> | 123 | </view> |
91 | <!-- 月份 --> | 124 | <!-- 月份 --> |
92 | <view class="search_month"> | 125 | <view class="search_month"> |
@@ -95,12 +128,8 @@ | @@ -95,12 +128,8 @@ | ||
95 | </view> | 128 | </view> |
96 | <view class="date_time"> | 129 | <view class="date_time"> |
97 | <!-- 出库 --> | 130 | <!-- 出库 --> |
98 | - <view wx:if="{{tabNum == 0}}"> | ||
99 | - <picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month"> | ||
100 | - <view class="picker"> | ||
101 | - {{statedate}} | ||
102 | - </view> | ||
103 | - </picker> | 131 | + <view wx:if="{{tabNum == 0}}" bindtap='toShowModal'> |
132 | + {{time}} | ||
104 | </view> | 133 | </view> |
105 | <!-- 流水 --> | 134 | <!-- 流水 --> |
106 | <view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view> | 135 | <view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view> |
@@ -112,39 +141,43 @@ | @@ -112,39 +141,43 @@ | ||
112 | <image src='/img/row.png'></image> | 141 | <image src='/img/row.png'></image> |
113 | </view> | 142 | </view> |
114 | </view> | 143 | </view> |
115 | -<!-- 出库 --> | ||
116 | -<view wx:if="{{tabNum == 0}}"> | ||
117 | - <view class="cp_title"> | ||
118 | - 成品出库信息 | ||
119 | - </view> | ||
120 | - <view class="total"> | ||
121 | - 重量总计(吨) | ||
122 | - <text>1000</text> | ||
123 | - </view> | ||
124 | - <!-- 折线图 --> | ||
125 | - <view class="charts_line"> | ||
126 | - <view class="chart"> | ||
127 | - <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas> | 144 | + |
145 | + | ||
146 | +<view wx:if="{{showModal==false}}"> | ||
147 | + <!-- 出库 --> | ||
148 | + <view wx:if="{{tabNum == 0}}"> | ||
149 | + <view class="cp_title"> | ||
150 | + 成品出库信息 | ||
128 | </view> | 151 | </view> |
129 | - <view class="total_power"> | ||
130 | - <view>{{showdate}}</view> | 152 | + <view class="total"> |
153 | + 重量总计(吨) | ||
154 | + <text>1000</text> | ||
131 | </view> | 155 | </view> |
132 | - </view> | ||
133 | -</view> | ||
134 | -<!-- 流水 --> | ||
135 | -<view wx:if="{{tabNum == 1}}"> | ||
136 | - <view class="second_total">重量总计(吨):1000</view> | ||
137 | - <!-- 数据 --> | ||
138 | - <view class="table"> | ||
139 | - <view class="table_title"> | ||
140 | - <view wx:for="{{tableTitle}}" wx:key="">{{item}}</view> | 156 | + <!-- 折线图 --> |
157 | + <view class="charts_line"> | ||
158 | + <view class="chart"> | ||
159 | + <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas> | ||
160 | + </view> | ||
161 | + <view class="total_power"> | ||
162 | + <view>{{showdate}}</view> | ||
163 | + </view> | ||
141 | </view> | 164 | </view> |
142 | - <view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="detail"> | ||
143 | - <view class="tr_time">{{item.date}}</view> | ||
144 | - <view class="tr_pos">{{item.position}}</view> | ||
145 | - <view class="tr_name">{{item.name}}</view> | ||
146 | - <view class="tr_time">{{item.num}}</view> | ||
147 | - <view class="tr_btn">{{item.btn}}</view> | 165 | + </view> |
166 | + <!-- 流水 --> | ||
167 | + <view wx:if="{{tabNum == 1}}"> | ||
168 | + <view class="second_total">重量总计(吨):1000</view> | ||
169 | + <!-- 数据 --> | ||
170 | + <view class="table"> | ||
171 | + <view class="table_title"> | ||
172 | + <view wx:for="{{tableTitle}}" wx:key="">{{item}}</view> | ||
173 | + </view> | ||
174 | + <view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="detail"> | ||
175 | + <view class="tr_time">{{item.date}}</view> | ||
176 | + <view class="tr_pos">{{item.position}}</view> | ||
177 | + <view class="tr_name">{{item.name}}</view> | ||
178 | + <view class="tr_time">{{item.num}}</view> | ||
179 | + <view class="tr_btn">{{item.btn}}</view> | ||
180 | + </view> | ||
148 | </view> | 181 | </view> |
149 | </view> | 182 | </view> |
150 | </view> | 183 | </view> |
1 | /* pages/qiyeyongdian/detail/detail.wxss */ | 1 | /* pages/qiyeyongdian/detail/detail.wxss */ |
2 | @import "../member/member.wxss"; | 2 | @import "../member/member.wxss"; |
3 | 3 | ||
4 | + | ||
4 | .search_month { | 5 | .search_month { |
5 | width: 686rpx; | 6 | width: 686rpx; |
6 | padding: 0 30rpx; | 7 | padding: 0 30rpx; |
@@ -174,7 +175,7 @@ ec-canvas { | @@ -174,7 +175,7 @@ ec-canvas { | ||
174 | 175 | ||
175 | .change { | 176 | .change { |
176 | background-color: #ff9400; | 177 | background-color: #ff9400; |
177 | - color: #fff; | 178 | + color: #fff!important; |
178 | } | 179 | } |
179 | 180 | ||
180 | .date_descript { | 181 | .date_descript { |
@@ -308,3 +309,12 @@ ec-canvas { | @@ -308,3 +309,12 @@ ec-canvas { | ||
308 | overflow: hidden; | 309 | overflow: hidden; |
309 | text-overflow: ellipsis; | 310 | text-overflow: ellipsis; |
310 | } | 311 | } |
312 | +.month_yue{ | ||
313 | + width: 33.333%; | ||
314 | + height: 120rpx; | ||
315 | + text-align: center; | ||
316 | + border-radius: 6rpx; | ||
317 | + font-size: 32rpx; | ||
318 | + color: #333; | ||
319 | + line-height: 120rpx; | ||
320 | +} |
@@ -134,6 +134,60 @@ Page({ | @@ -134,6 +134,60 @@ Page({ | ||
134 | startdate:'', | 134 | startdate:'', |
135 | //结束日期 | 135 | //结束日期 |
136 | enddate:'', | 136 | enddate:'', |
137 | + showModal:false, | ||
138 | + time:'近30天', | ||
139 | + yearname: '', | ||
140 | + showt: true, | ||
141 | + yeararray:[], | ||
142 | + monthList: [{ | ||
143 | + sel: false, | ||
144 | + name: '1月' | ||
145 | + }, | ||
146 | + { | ||
147 | + sel: false, | ||
148 | + name: '2月' | ||
149 | + }, | ||
150 | + { | ||
151 | + sel: false, | ||
152 | + name: '3月' | ||
153 | + }, | ||
154 | + { | ||
155 | + sel: false, | ||
156 | + name: '4月' | ||
157 | + }, | ||
158 | + { | ||
159 | + sel: false, | ||
160 | + name: '5月' | ||
161 | + }, | ||
162 | + { | ||
163 | + sel: false, | ||
164 | + name: '6月' | ||
165 | + }, | ||
166 | + { | ||
167 | + sel: false, | ||
168 | + name: '7月' | ||
169 | + }, | ||
170 | + { | ||
171 | + sel: false, | ||
172 | + name: '8月' | ||
173 | + }, | ||
174 | + { | ||
175 | + sel: false, | ||
176 | + name: '9月' | ||
177 | + }, | ||
178 | + { | ||
179 | + sel: false, | ||
180 | + name: '10月' | ||
181 | + }, | ||
182 | + { | ||
183 | + sel: false, | ||
184 | + name: '11月' | ||
185 | + }, | ||
186 | + { | ||
187 | + sel: false, | ||
188 | + name: '12月' | ||
189 | + }, | ||
190 | + ], | ||
137 | }, | 191 | }, |
138 | 192 | ||
139 | /** | 193 | /** |
@@ -148,13 +202,136 @@ Page({ | @@ -148,13 +202,136 @@ Page({ | ||
148 | }) | 202 | }) |
149 | 203 | ||
150 | console.log(this.data.statedate) | 204 | console.log(this.data.statedate) |
151 | - let newdate = this.data.statedate.split("-"); | 205 | + |
206 | + | ||
207 | + | ||
208 | + //获取年份数组 | ||
209 | + var newdate = new Date(); | ||
210 | + var newyear = newdate.getFullYear(); | ||
211 | + let newyeararray = this.data.yeararray; | ||
212 | + console.log(typeof (newyear)) | ||
213 | + | ||
214 | + | ||
215 | + for (var i = 1990; i <= newyear; i++) { | ||
216 | + newyeararray.push(i) | ||
217 | + } | ||
218 | + | ||
152 | this.setData({ | 219 | this.setData({ |
153 | - showdate: newdate[0] + '年' + newdate[1] + '月' | 220 | + yeararray: newyeararray, |
221 | + yearname: newyear | ||
222 | + | ||
223 | + }) | ||
224 | + | ||
225 | + | ||
226 | + | ||
227 | + | ||
228 | + | ||
229 | + | ||
230 | + }, | ||
231 | + | ||
232 | + toShowModal(e) { | ||
233 | + this.setData({ | ||
234 | + showModal: true | ||
235 | + | ||
236 | + }) | ||
237 | + | ||
238 | + var date = new Date(); | ||
239 | + | ||
240 | + var mon = date.getMonth(); | ||
241 | + console.log(mon) | ||
242 | + this.setData({ | ||
243 | + changeColor: mon | ||
244 | + }) | ||
245 | + }, | ||
246 | + | ||
247 | + //年份选择 | ||
248 | + bindyearChange(e) { | ||
249 | + console.log(e) | ||
250 | + this.setData({ | ||
251 | + | ||
252 | + yearname: this.data.yeararray[e.detail.value] | ||
253 | + }) | ||
254 | + | ||
255 | + this.chosemonth() | ||
256 | + }, | ||
257 | +// 选择日期 | ||
258 | + choice(e) { | ||
259 | + let index = e.currentTarget.dataset.id; | ||
260 | + this.setData({ | ||
261 | + showt: false, | ||
262 | + monthindex: index | ||
263 | + }) | ||
264 | + | ||
265 | + | ||
266 | + let newmonthList = this.data.monthList; | ||
267 | + for (var i = 0; i < newmonthList.length; i++) { | ||
268 | + | ||
269 | + if (i == index) { | ||
270 | + | ||
271 | + console.log(3489894) | ||
272 | + newmonthList[index].sel = !newmonthList[index].sel; | ||
273 | + } else { | ||
274 | + | ||
275 | + newmonthList[i].sel = false | ||
276 | + } | ||
277 | + } | ||
278 | + | ||
279 | + this.setData({ | ||
280 | + monthList: newmonthList | ||
154 | }) | 281 | }) |
155 | 282 | ||
283 | + | ||
284 | + this.chosemonth() | ||
285 | + | ||
286 | + console.log(this.data.time) | ||
156 | }, | 287 | }, |
157 | 288 | ||
289 | + //选择月份 | ||
290 | + chosemonth() { | ||
291 | + let index = this.data.monthindex; | ||
292 | + index = index + 1 | ||
293 | + if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) { | ||
294 | + if (index < 10) { | ||
295 | + this.setData({ | ||
296 | + time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31" + ")" | ||
297 | + }) | ||
298 | + } else { | ||
299 | + this.setData({ | ||
300 | + time: "(" + this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31" + ")" | ||
301 | + }) | ||
302 | + } | ||
303 | + | ||
304 | + } else { | ||
305 | + if (index < 10) { | ||
306 | + this.setData({ | ||
307 | + time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30" + ")" | ||
308 | + }) | ||
309 | + } else { | ||
310 | + this.setData({ | ||
311 | + time: "(" + this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30" + ")" | ||
312 | + }) | ||
313 | + } | ||
314 | + | ||
315 | + } | ||
316 | + }, | ||
317 | + | ||
318 | + hideModal() { | ||
319 | + this.setData({ | ||
320 | + showModal: false | ||
321 | + }); | ||
322 | + }, | ||
323 | + three() { | ||
324 | + | ||
325 | + let newmonthList = this.data.monthList; | ||
326 | + for (var obj of newmonthList) { | ||
327 | + obj.sel = false | ||
328 | + } | ||
329 | + this.setData({ | ||
330 | + time: '近30天', | ||
331 | + monthList: newmonthList, | ||
332 | + showt: !this.data.showt | ||
333 | + }) | ||
334 | + }, | ||
158 | showDatePicker: function(e) { | 335 | showDatePicker: function(e) { |
159 | // this.data.datePicker.show(this); | 336 | // this.data.datePicker.show(this); |
160 | this.setData({ | 337 | this.setData({ |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | </view> | 22 | </view> |
23 | </view> | 23 | </view> |
24 | 24 | ||
25 | - <view class="timebox" wx:if="{{currentdate}}"> | 25 | + <view class="timebox" wx:if="{{currentdate}}"> |
26 | <view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key=""> | 26 | <view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key=""> |
27 | <view class="itemcontent">{{item.year}}</view> | 27 | <view class="itemcontent">{{item.year}}</view> |
28 | <view class="itemcontent">{{item.month}}</view> | 28 | <view class="itemcontent">{{item.month}}</view> |
@@ -33,10 +33,10 @@ | @@ -33,10 +33,10 @@ | ||
33 | </view> | 33 | </view> |
34 | <view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view> | 34 | <view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view> |
35 | 35 | ||
36 | - | 36 | + |
37 | <view wx:if="{{currentdate}}"> | 37 | <view wx:if="{{currentdate}}"> |
38 | 38 | ||
39 | - <date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" /> | 39 | + <date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" /> |
40 | 40 | ||
41 | </view> | 41 | </view> |
42 | 42 | ||
@@ -47,6 +47,32 @@ | @@ -47,6 +47,32 @@ | ||
47 | 47 | ||
48 | 48 | ||
49 | </view> | 49 | </view> |
50 | +<!-- 年月日日期弹出层 --> | ||
51 | + | ||
52 | +<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view> | ||
53 | +<view wx:if="{{showModal}}"> | ||
54 | + <view class="modal-content"> | ||
55 | + <!-- 年份 --> | ||
56 | + <view class="modal_year"> | ||
57 | + <picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}"> | ||
58 | + <view class="picker"> | ||
59 | + {{yearname}}年 | ||
60 | + </view> | ||
61 | + </picker> | ||
62 | + </view> | ||
63 | + <!-- 月份 --> | ||
64 | + <view class="modal_month"> | ||
65 | + <view class="month_single {{item.sel==true?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item.name}}</view> | ||
66 | + </view> | ||
67 | + <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view> | ||
68 | + <view class='btns'> | ||
69 | + <view class="cacle" bindtap="hideModal">取消</view> | ||
70 | + <view class="cacle sure" bindtap="hideModal">确定</view> | ||
71 | + </view> | ||
72 | + </view> | ||
73 | +</view> | ||
74 | + | ||
75 | + | ||
50 | 76 | ||
51 | <view class="detailhead"> | 77 | <view class="detailhead"> |
52 | <view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">人员状况</view> | 78 | <view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">人员状况</view> |
@@ -54,99 +80,98 @@ | @@ -54,99 +80,98 @@ | ||
54 | 80 | ||
55 | </view> | 81 | </view> |
56 | 82 | ||
83 | +<view wx:if="{{showModal==false}}"> | ||
84 | + <!-- 人员状况 --> | ||
57 | 85 | ||
58 | -<!-- 人员状况 --> | 86 | + <view class="peoplestate" wx:if="{{state==1}}"> |
59 | 87 | ||
60 | -<view class="peoplestate" wx:if="{{state==1}}"> | 88 | + <view class="date" bindtap="toShowModal"> |
89 | + <view class="dateleft"> | ||
90 | + <image src="/img/row.png"></image> | ||
91 | + </view> | ||
92 | + <view class="datetime"> | ||
93 | + <view class="datesel"> | ||
94 | + {{time}} | ||
61 | 95 | ||
62 | - <view class="date"> | ||
63 | - <view class="dateleft"> | ||
64 | - <image src="/img/row.png"></image> | ||
65 | - </view> | ||
66 | - <view class="datetime"> | ||
67 | - <view class="datesel"> | ||
68 | - <picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month"> | ||
69 | - <view class="picker"> | ||
70 | - {{statedate}} | ||
71 | - </view> | ||
72 | - </picker> | 96 | + </view> |
97 | + | ||
98 | + <view class="datepic"> | ||
99 | + <image src="/img/row.png"></image> | ||
100 | + </view> | ||
73 | </view> | 101 | </view> |
74 | 102 | ||
75 | - <view class="datepic"> | 103 | + <view class="dateright"> |
76 | <image src="/img/row.png"></image> | 104 | <image src="/img/row.png"></image> |
77 | </view> | 105 | </view> |
78 | </view> | 106 | </view> |
79 | 107 | ||
80 | - <view class="dateright"> | ||
81 | - <image src="/img/row.png"></image> | 108 | + <view class="shebeinum"> |
109 | + <text class="she">人员进出信息</text> | ||
82 | </view> | 110 | </view> |
83 | - </view> | ||
84 | - | ||
85 | - <view class="shebeinum"> | ||
86 | - <text class="she">人员进出信息</text> | ||
87 | - </view> | ||
88 | 111 | ||
89 | - <view class="containerzhe"> | ||
90 | - <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas> | ||
91 | - </view> | 112 | + <view class="containerzhe"> |
113 | + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas> | ||
114 | + </view> | ||
92 | 115 | ||
93 | - <view class="datetime">{{showdate}}</view> | 116 | + <view class="datetime">{{showdate}}</view> |
94 | 117 | ||
95 | 118 | ||
96 | -</view> | 119 | + </view> |
97 | 120 | ||
98 | -<!-- 进出流水 --> | 121 | + <!-- 进出流水 --> |
99 | 122 | ||
100 | -<view class="lishui" wx:if="{{state==2}}"> | ||
101 | - <view class="date" bindtap="datexianshi"> | ||
102 | - <view class="dateleft"> | ||
103 | - <image src="/img/row.png"></image> | ||
104 | - </view> | ||
105 | - <view class="datetime"> | ||
106 | - <view class="datesel"> | ||
107 | - {{watertime}} | 123 | + <view class="lishui" wx:if="{{state==2}}"> |
124 | + <view class="date" bindtap="datexianshi"> | ||
125 | + <view class="dateleft"> | ||
126 | + <image src="/img/row.png"></image> | ||
127 | + </view> | ||
128 | + <view class="datetime"> | ||
129 | + <view class="datesel"> | ||
130 | + {{watertime}} | ||
131 | + </view> | ||
132 | + | ||
133 | + <view class="datepic"> | ||
134 | + <image src="/img/row.png"></image> | ||
135 | + </view> | ||
108 | </view> | 136 | </view> |
109 | 137 | ||
110 | - <view class="datepic"> | 138 | + <view class="dateright"> |
111 | <image src="/img/row.png"></image> | 139 | <image src="/img/row.png"></image> |
112 | </view> | 140 | </view> |
113 | </view> | 141 | </view> |
114 | 142 | ||
115 | - <view class="dateright"> | ||
116 | - <image src="/img/row.png"></image> | ||
117 | - </view> | ||
118 | - </view> | ||
119 | - | ||
120 | - <view class="shuibox"> | 143 | + <view class="shuibox"> |
121 | 144 | ||
122 | - <view class="shihead"> | ||
123 | - <view class="headitem shijian">时间</view> | ||
124 | - <view class="headitem shexiang">摄像头</view> | ||
125 | - <view class="headitem derition">方向</view> | 145 | + <view class="shihead"> |
146 | + <view class="headitem shijian">时间</view> | ||
147 | + <view class="headitem shexiang">摄像头</view> | ||
148 | + <view class="headitem derition">方向</view> | ||
126 | 149 | ||
127 | - </view> | ||
128 | - <view class="shuicontent"> | ||
129 | - <view class="shuiitem"> | ||
130 | - <view class="shuiitemleft shijian">06.01</view> | ||
131 | - <view class="shuiitemleft shexiang">大厅左上角</view> | ||
132 | - <view class="shuiitemleft derition">进</view> | ||
133 | </view> | 150 | </view> |
134 | - <view class="shuiitem"> | ||
135 | - <view class="shuiitemleft shijian">06.01</view> | ||
136 | - <view class="shuiitemleft shexiang">大厅左上角</view> | ||
137 | - <view class="shuiitemleft derition">进</view> | 151 | + <view class="shuicontent"> |
152 | + <view class="shuiitem"> | ||
153 | + <view class="shuiitemleft shijian">06.01</view> | ||
154 | + <view class="shuiitemleft shexiang">大厅左上角</view> | ||
155 | + <view class="shuiitemleft derition">进</view> | ||
156 | + </view> | ||
157 | + <view class="shuiitem"> | ||
158 | + <view class="shuiitemleft shijian">06.01</view> | ||
159 | + <view class="shuiitemleft shexiang">大厅左上角</view> | ||
160 | + <view class="shuiitemleft derition">进</view> | ||
161 | + </view> | ||
162 | + | ||
163 | + <view class="shuiitem"> | ||
164 | + <view class="shuiitemleft shijian">06.01</view> | ||
165 | + <view class="shuiitemleft shexiang">大厅左上角</view> | ||
166 | + <view class="shuiitemleft derition">进</view> | ||
167 | + </view> | ||
168 | + <view class="shuiitem"> | ||
169 | + <view class="shuiitemleft shijian">06.01</view> | ||
170 | + <view class="shuiitemleft shexiang">车间后方大转盘</view> | ||
171 | + <view class="shuiitemleft derition">进</view> | ||
172 | + </view> | ||
138 | </view> | 173 | </view> |
139 | 174 | ||
140 | - <view class="shuiitem"> | ||
141 | - <view class="shuiitemleft shijian">06.01</view> | ||
142 | - <view class="shuiitemleft shexiang">大厅左上角</view> | ||
143 | - <view class="shuiitemleft derition">进</view> | ||
144 | - </view> | ||
145 | - <view class="shuiitem"> | ||
146 | - <view class="shuiitemleft shijian">06.01</view> | ||
147 | - <view class="shuiitemleft shexiang">车间后方大转盘</view> | ||
148 | - <view class="shuiitemleft derition">进</view> | ||
149 | - </view> | ||
150 | </view> | 175 | </view> |
151 | 176 | ||
152 | </view> | 177 | </view> |
1 | +@import "../qiyeyongdian/detail/detail.wxss"; | ||
2 | + | ||
1 | .detailhead { | 3 | .detailhead { |
2 | display: flex; | 4 | display: flex; |
3 | align-items: center; | 5 | align-items: center; |
@@ -20,7 +22,6 @@ | @@ -20,7 +22,6 @@ | ||
20 | display: block; | 22 | display: block; |
21 | content: ''; | 23 | content: ''; |
22 | width: 60rpx; | 24 | width: 60rpx; |
23 | - | ||
24 | border: 1rpx solid #ff9400; | 25 | border: 1rpx solid #ff9400; |
25 | position: absolute; | 26 | position: absolute; |
26 | left: 50%; | 27 | left: 50%; |
@@ -109,9 +110,13 @@ | @@ -109,9 +110,13 @@ | ||
109 | 110 | ||
110 | .timewrap { | 111 | .timewrap { |
111 | background: #fff; | 112 | background: #fff; |
112 | - /* height: 700rpx; */ | ||
113 | padding-bottom: 40rpx; | 113 | padding-bottom: 40rpx; |
114 | - box-sizing: border-box | 114 | + box-sizing: border-box; |
115 | + height:645rpx; | ||
116 | +} | ||
117 | + | ||
118 | +.timewrap1 { | ||
119 | + height: 645rpx; | ||
115 | } | 120 | } |
116 | 121 | ||
117 | .timetwo { | 122 | .timetwo { |
@@ -218,10 +223,9 @@ | @@ -218,10 +223,9 @@ | ||
218 | background: rgba(255, 148, 0, 1); | 223 | background: rgba(255, 148, 0, 1); |
219 | opacity: 1; | 224 | opacity: 1; |
220 | border-radius: 10rpx; | 225 | border-radius: 10rpx; |
221 | - color:#fff; | 226 | + color: #fff; |
222 | font-size: 30rpx; | 227 | font-size: 30rpx; |
223 | text-align: center; | 228 | text-align: center; |
224 | line-height: 80rpx; | 229 | line-height: 80rpx; |
225 | - margin:8rpx auto 0; | ||
226 | - | 230 | + margin: 8rpx auto 0; |
227 | } | 231 | } |
@@ -11,8 +11,57 @@ Page({ | @@ -11,8 +11,57 @@ Page({ | ||
11 | */ | 11 | */ |
12 | data: { | 12 | data: { |
13 | showModal: false, | 13 | showModal: false, |
14 | - monthList: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], | ||
15 | - time: '2019.01.01-2019.01.31', | 14 | + monthList: [{ |
15 | + sel: false, | ||
16 | + name: '1月' | ||
17 | + }, | ||
18 | + { | ||
19 | + sel: false, | ||
20 | + name: '2月' | ||
21 | + }, | ||
22 | + { | ||
23 | + sel: false, | ||
24 | + name: '3月' | ||
25 | + }, | ||
26 | + { | ||
27 | + sel: false, | ||
28 | + name: '4月' | ||
29 | + }, | ||
30 | + { | ||
31 | + sel: false, | ||
32 | + name: '5月' | ||
33 | + }, | ||
34 | + { | ||
35 | + sel: false, | ||
36 | + name: '6月' | ||
37 | + }, | ||
38 | + { | ||
39 | + sel: false, | ||
40 | + name: '7月' | ||
41 | + }, | ||
42 | + { | ||
43 | + sel: false, | ||
44 | + name: '8月' | ||
45 | + }, | ||
46 | + { | ||
47 | + sel: false, | ||
48 | + name: '9月' | ||
49 | + }, | ||
50 | + { | ||
51 | + sel: false, | ||
52 | + name: '10月' | ||
53 | + }, | ||
54 | + { | ||
55 | + sel: false, | ||
56 | + name: '11月' | ||
57 | + }, | ||
58 | + { | ||
59 | + sel: false, | ||
60 | + name: '12月' | ||
61 | + }, | ||
62 | + ], | ||
63 | + time: '', | ||
64 | + monthindex: 0, | ||
16 | changeColor: -1, | 65 | changeColor: -1, |
17 | ec: { | 66 | ec: { |
18 | 67 | ||
@@ -36,45 +85,79 @@ Page({ | @@ -36,45 +85,79 @@ Page({ | ||
36 | showt: false | 85 | showt: false |
37 | }, | 86 | }, |
38 | 87 | ||
88 | + yeararray: [], | ||
89 | + yearname: '' | ||
90 | + | ||
39 | }, | 91 | }, |
40 | choice(e) { | 92 | choice(e) { |
93 | + let index = e.currentTarget.dataset.id; | ||
41 | this.setData({ | 94 | this.setData({ |
42 | - showt:false | 95 | + showt: false, |
96 | + monthindex: index | ||
43 | }) | 97 | }) |
44 | - let index = e.currentTarget.dataset.id; | 98 | + |
99 | + | ||
100 | + let newmonthList = this.data.monthList; | ||
101 | + for (var i = 0; i < newmonthList.length; i++) { | ||
102 | + | ||
103 | + if (i == index) { | ||
104 | + | ||
105 | + console.log(3489894) | ||
106 | + newmonthList[index].sel = !newmonthList[index].sel; | ||
107 | + } else { | ||
108 | + | ||
109 | + newmonthList[i].sel = false | ||
110 | + } | ||
111 | + } | ||
112 | + | ||
113 | + this.setData({ | ||
114 | + monthList: newmonthList | ||
115 | + }) | ||
116 | + | ||
117 | + | ||
118 | + this.chosemonth() | ||
119 | + | ||
120 | + console.log(this.data.time) | ||
121 | + }, | ||
122 | + | ||
123 | + //选择月份 | ||
124 | + chosemonth() { | ||
125 | + let index = this.data.monthindex; | ||
45 | index = index + 1 | 126 | index = index + 1 |
46 | if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) { | 127 | if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) { |
47 | if (index < 10) { | 128 | if (index < 10) { |
48 | this.setData({ | 129 | this.setData({ |
49 | - time: "(" + "2019." + "0" + index + ".01" + "-2019." + '0' + index + ".31" + ")" | 130 | + time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31" + ")" |
50 | }) | 131 | }) |
51 | } else { | 132 | } else { |
52 | this.setData({ | 133 | this.setData({ |
53 | - time: "(" + "2019." + index + ".01" + "-2019." + index + ".31" + ")" | 134 | + time: "(" + this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31" + ")" |
54 | }) | 135 | }) |
55 | } | 136 | } |
56 | 137 | ||
57 | } else { | 138 | } else { |
58 | if (index < 10) { | 139 | if (index < 10) { |
59 | this.setData({ | 140 | this.setData({ |
60 | - time: "(" + "2019." + "0" + index + ".01" + "-2019." + '0' + index + ".30" + ")" | 141 | + time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30" + ")" |
61 | }) | 142 | }) |
62 | } else { | 143 | } else { |
63 | this.setData({ | 144 | this.setData({ |
64 | - time: "(" + "2019." + index + ".01" + "-2019." + index + ".30" + ")" | 145 | + time: "(" + this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30" + ")" |
65 | }) | 146 | }) |
66 | } | 147 | } |
67 | 148 | ||
68 | } | 149 | } |
69 | - this.setData({ | ||
70 | - changeColor: index - 1 | ||
71 | - }) | ||
72 | }, | 150 | }, |
73 | three() { | 151 | three() { |
152 | + | ||
153 | + let newmonthList = this.data.monthList; | ||
154 | + for (var obj of newmonthList) { | ||
155 | + obj.sel = false | ||
156 | + } | ||
74 | this.setData({ | 157 | this.setData({ |
75 | time: '近30天', | 158 | time: '近30天', |
76 | - showt: !this.data.showt, | ||
77 | - changeColor:-1 | 159 | + monthList: newmonthList, |
160 | + showt: !this.data.showt | ||
78 | }) | 161 | }) |
79 | }, | 162 | }, |
80 | toShowModal(e) { | 163 | toShowModal(e) { |
@@ -86,7 +169,7 @@ Page({ | @@ -86,7 +169,7 @@ Page({ | ||
86 | showModal: true, | 169 | showModal: true, |
87 | 170 | ||
88 | changeColor: mon, | 171 | changeColor: mon, |
89 | - showt:false | 172 | + showt: false |
90 | 173 | ||
91 | 174 | ||
92 | }) | 175 | }) |
@@ -96,57 +179,119 @@ Page({ | @@ -96,57 +179,119 @@ Page({ | ||
96 | this.setData({ | 179 | this.setData({ |
97 | showModal: false | 180 | showModal: false |
98 | }); | 181 | }); |
182 | + this.echartsComponnet = this.selectComponent('#mychart'); | ||
183 | + | ||
184 | + | ||
185 | + //如果是第一次绘制 | ||
186 | + | ||
187 | + if (!Chart) { | ||
188 | + this.init_echarts(); //初始化图表 | ||
189 | + | ||
190 | + | ||
191 | + } else { | ||
192 | + | ||
193 | + this.setOption(Chart); //更新数据 | ||
194 | + | ||
195 | + } | ||
196 | + | ||
99 | }, | 197 | }, |
100 | /** | 198 | /** |
101 | * 生命周期函数--监听页面加载 | 199 | * 生命周期函数--监听页面加载 |
102 | */ | 200 | */ |
103 | onLoad: function(options) { | 201 | onLoad: function(options) { |
202 | + | ||
203 | + | ||
204 | + this.echartsComponnet = this.selectComponent('#mychart'); | ||
205 | + | ||
206 | + //如果是第一次绘制 | ||
207 | + | ||
208 | + if (!Chart) { | ||
209 | + | ||
210 | + this.init_echarts(); //初始化图表 | ||
211 | + | ||
212 | + } else { | ||
213 | + | ||
214 | + this.setOption(Chart); //更新数据 | ||
215 | + | ||
216 | + } | ||
217 | + | ||
218 | + | ||
219 | + //获取年份数组 | ||
220 | + var newdate = new Date(); | ||
221 | + var newyear = newdate.getFullYear(); | ||
222 | + let newyeararray = this.data.yeararray; | ||
223 | + console.log(typeof(newyear)) | ||
224 | + | ||
225 | + | ||
226 | + for (var i = 1990; i <= newyear; i++) { | ||
227 | + newyeararray.push(i) | ||
228 | + } | ||
229 | + | ||
230 | + this.setData({ | ||
231 | + yeararray: newyeararray, | ||
232 | + yearname: newyear | ||
233 | + | ||
234 | + }) | ||
235 | + | ||
236 | + | ||
104 | // 获取默认的月份 | 237 | // 获取默认的月份 |
105 | 238 | ||
106 | var date = new Date(); | 239 | var date = new Date(); |
107 | var month = date.getMonth() + 1; | 240 | var month = date.getMonth() + 1; |
108 | - var year = date.getFullYear(); | 241 | + console.log(month + '月') |
242 | + | ||
109 | this.setData({ | 243 | this.setData({ |
110 | - showdate: year + '年' + month + '月' | 244 | + showdate: this.data.yearname + '年' + month + '月' |
111 | }) | 245 | }) |
112 | if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { | 246 | if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { |
113 | if (month < 10) { | 247 | if (month < 10) { |
114 | this.setData({ | 248 | this.setData({ |
115 | - time: "(" + year + "." + "0" + month + ".01" + "-2019." + '0' + month + ".31" + ")" | 249 | + time: "(" + this.data.yearname + "." + "0" + month + ".01" + "-" + this.data.yearname + "." + '0' + month + ".31" + ")" |
116 | }) | 250 | }) |
117 | } else { | 251 | } else { |
118 | this.setData({ | 252 | this.setData({ |
119 | - time: "(" + year + "." + month + ".01" + "-2019." + month + ".31" + ")" | 253 | + time: "(" + this.data.yearname + "." + month + ".01" + "-" + this.data.yearname + "." + month + ".31" + ")" |
120 | }) | 254 | }) |
121 | } | 255 | } |
122 | 256 | ||
123 | } else { | 257 | } else { |
124 | if (month < 10) { | 258 | if (month < 10) { |
125 | this.setData({ | 259 | this.setData({ |
126 | - time: "(" + year + "." + "0" + month + ".01" + "-2019." + '0' + month + ".30" + ")" | 260 | + time: "(" + this.data.yearname + "." + "0" + month + ".01" + "-" + this.data.yearname + "." + '0' + month + ".30" + ")" |
127 | }) | 261 | }) |
128 | } else { | 262 | } else { |
129 | this.setData({ | 263 | this.setData({ |
130 | - time: "(" + year + "." + month + ".01" + "-2019." + month + ".30" + ")" | 264 | + time: "(" + this.data.yearname + "." + month + ".01" + "-" + this.data.yearname + "." + month + ".30" + ")" |
131 | }) | 265 | }) |
132 | } | 266 | } |
133 | 267 | ||
134 | } | 268 | } |
135 | 269 | ||
136 | - this.echartsComponnet = this.selectComponent('#mychart'); | ||
137 | 270 | ||
138 | - //如果是第一次绘制 | 271 | + //默认选择月份 |
272 | + let newmonthList = this.data.monthList; | ||
139 | 273 | ||
140 | - if (!Chart) { | 274 | + for (var obj of newmonthList) { |
275 | + if (month + '月' == obj.name) { | ||
276 | + obj.sel = true | ||
277 | + } | ||
278 | + } | ||
279 | + this.setData({ | ||
280 | + monthList: newmonthList | ||
281 | + }) | ||
141 | 282 | ||
142 | - this.init_echarts(); //初始化图表 | ||
143 | 283 | ||
144 | - } else { | 284 | + }, |
145 | 285 | ||
146 | - this.setOption(Chart); //更新数据 | 286 | + //年份选择 |
287 | + bindyearChange(e) { | ||
288 | + console.log(e) | ||
289 | + this.setData({ | ||
147 | 290 | ||
148 | - } | 291 | + yearname: this.data.yeararray[e.detail.value] |
292 | + }) | ||
149 | 293 | ||
294 | + this.chosemonth() | ||
150 | }, | 295 | }, |
151 | //初始化图表 | 296 | //初始化图表 |
152 | 297 |
@@ -4,10 +4,18 @@ | @@ -4,10 +4,18 @@ | ||
4 | <view wx:if="{{showModal}}"> | 4 | <view wx:if="{{showModal}}"> |
5 | <view class="modal-content"> | 5 | <view class="modal-content"> |
6 | <!-- 年份 --> | 6 | <!-- 年份 --> |
7 | - <view class="modal_year">2019年</view> | 7 | + |
8 | + <view class="modal_year"> | ||
9 | + <picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}"> | ||
10 | + <view class="picker"> | ||
11 | + {{yearname}}年 | ||
12 | + </view> | ||
13 | + </picker> | ||
14 | + <!-- 2019年 --> | ||
15 | + </view> | ||
8 | <!-- 月份 --> | 16 | <!-- 月份 --> |
9 | <view class="modal_month"> | 17 | <view class="modal_month"> |
10 | - <view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view> | 18 | + <view class="month_single {{item.sel==true?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item.name}}</view> |
11 | </view> | 19 | </view> |
12 | <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view> | 20 | <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view> |
13 | <view class='btns'> | 21 | <view class='btns'> |
@@ -22,8 +30,8 @@ | @@ -22,8 +30,8 @@ | ||
22 | <image src='/img/row.png' class="left"></image> | 30 | <image src='/img/row.png' class="left"></image> |
23 | </view> | 31 | </view> |
24 | <view class="date_time" bindtap='toShowModal'> | 32 | <view class="date_time" bindtap='toShowModal'> |
25 | - <!-- 近30天(2019.03.01-2019.03.30) --> | ||
26 | - {{time}} | 33 | + <!-- 近30天(2019.03.01-2019.03.30) --> |
34 | + {{time}} | ||
27 | <view class="rowimg"> | 35 | <view class="rowimg"> |
28 | <image src='/img/row.png' class="down"></image> | 36 | <image src='/img/row.png' class="down"></image> |
29 | </view> | 37 | </view> |
@@ -33,10 +41,10 @@ | @@ -33,10 +41,10 @@ | ||
33 | </view> | 41 | </view> |
34 | </view> | 42 | </view> |
35 | <!-- 折线图 --> | 43 | <!-- 折线图 --> |
36 | -<view class="charts_line"> | 44 | +<view class="charts_line" wx:if="{{showModal==false}}"> |
37 | <view class="chart"> | 45 | <view class="chart"> |
38 | <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas> | 46 | <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas> |
39 | -<!-- <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ec}}"></ec-canvas> --> | 47 | + <!-- <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ec}}"></ec-canvas> --> |
40 | </view> | 48 | </view> |
41 | 49 | ||
42 | <view class="total_power"> | 50 | <view class="total_power"> |
@@ -222,6 +222,61 @@ Page({ | @@ -222,6 +222,61 @@ Page({ | ||
222 | statedate: "", | 222 | statedate: "", |
223 | date: '', | 223 | date: '', |
224 | 224 | ||
225 | + showModal:false, | ||
226 | + time:'近30天', | ||
227 | + yearname:'', | ||
228 | + yeararray: [], | ||
229 | + monthList: [{ | ||
230 | + sel: false, | ||
231 | + name: '1月' | ||
232 | + }, | ||
233 | + { | ||
234 | + sel: false, | ||
235 | + name: '2月' | ||
236 | + }, | ||
237 | + { | ||
238 | + sel: false, | ||
239 | + name: '3月' | ||
240 | + }, | ||
241 | + { | ||
242 | + sel: false, | ||
243 | + name: '4月' | ||
244 | + }, | ||
245 | + { | ||
246 | + sel: false, | ||
247 | + name: '5月' | ||
248 | + }, | ||
249 | + { | ||
250 | + sel: false, | ||
251 | + name: '6月' | ||
252 | + }, | ||
253 | + { | ||
254 | + sel: false, | ||
255 | + name: '7月' | ||
256 | + }, | ||
257 | + { | ||
258 | + sel: false, | ||
259 | + name: '8月' | ||
260 | + }, | ||
261 | + { | ||
262 | + sel: false, | ||
263 | + name: '9月' | ||
264 | + }, | ||
265 | + { | ||
266 | + sel: false, | ||
267 | + name: '10月' | ||
268 | + }, | ||
269 | + { | ||
270 | + sel: false, | ||
271 | + name: '11月' | ||
272 | + }, | ||
273 | + { | ||
274 | + sel: false, | ||
275 | + name: '12月' | ||
276 | + }, | ||
277 | + ], | ||
278 | + | ||
279 | + | ||
225 | ec: { | 280 | ec: { |
226 | onInit: initChart1, | 281 | onInit: initChart1, |
227 | 282 | ||
@@ -244,7 +299,57 @@ Page({ | @@ -244,7 +299,57 @@ Page({ | ||
244 | statedate: app.monthnowDate(), | 299 | statedate: app.monthnowDate(), |
245 | date: app.monthnowDate() | 300 | date: app.monthnowDate() |
246 | }) | 301 | }) |
302 | + | ||
303 | + | ||
304 | + | ||
305 | + | ||
306 | + //获取年份数组 | ||
307 | + var newdate = new Date(); | ||
308 | + var newyear = newdate.getFullYear(); | ||
309 | + let newyeararray = this.data.yeararray; | ||
310 | + console.log(typeof (newyear)) | ||
311 | + | ||
312 | + | ||
313 | + for (var i = 1990; i <= newyear; i++) { | ||
314 | + newyeararray.push(i) | ||
315 | + } | ||
316 | + | ||
317 | + this.setData({ | ||
318 | + yeararray: newyeararray, | ||
319 | + yearname: newyear | ||
320 | + | ||
321 | + }) | ||
247 | }, | 322 | }, |
323 | + | ||
324 | + //年份选择 | ||
325 | + bindyearChange(e) { | ||
326 | + console.log(e) | ||
327 | + this.setData({ | ||
328 | + | ||
329 | + yearname: this.data.yeararray[e.detail.value] | ||
330 | + }) | ||
331 | + | ||
332 | + this.chosemonth() | ||
333 | + }, | ||
334 | + | ||
335 | + | ||
336 | + toShowModal(e) { | ||
337 | + this.setData({ | ||
338 | + showModal: true | ||
339 | + | ||
340 | + }) | ||
341 | + | ||
342 | + var date = new Date(); | ||
343 | + | ||
344 | + var mon = date.getMonth(); | ||
345 | + console.log(mon) | ||
346 | + this.setData({ | ||
347 | + changeColor: mon | ||
348 | + }) | ||
349 | + }, | ||
350 | + | ||
351 | + | ||
352 | + | ||
248 | selectshebei(e) { | 353 | selectshebei(e) { |
249 | this.setData({ | 354 | this.setData({ |
250 | state: e.currentTarget.dataset.id | 355 | state: e.currentTarget.dataset.id |
@@ -263,6 +368,100 @@ Page({ | @@ -263,6 +368,100 @@ Page({ | ||
263 | date: e.detail.value | 368 | date: e.detail.value |
264 | }) | 369 | }) |
265 | }, | 370 | }, |
371 | + | ||
372 | + | ||
373 | + choice(e) { | ||
374 | + let index = e.currentTarget.dataset.id; | ||
375 | + this.setData({ | ||
376 | + showt: false, | ||
377 | + monthindex: index | ||
378 | + }) | ||
379 | + | ||
380 | + | ||
381 | + let newmonthList = this.data.monthList; | ||
382 | + for (var i = 0; i < newmonthList.length; i++) { | ||
383 | + | ||
384 | + if (i == index) { | ||
385 | + | ||
386 | + console.log(3489894) | ||
387 | + newmonthList[index].sel = !newmonthList[index].sel; | ||
388 | + } else { | ||
389 | + | ||
390 | + newmonthList[i].sel = false | ||
391 | + } | ||
392 | + } | ||
393 | + | ||
394 | + this.setData({ | ||
395 | + monthList: newmonthList | ||
396 | + }) | ||
397 | + | ||
398 | + | ||
399 | + this.chosemonth() | ||
400 | + | ||
401 | + console.log(this.data.time) | ||
402 | + }, | ||
403 | + | ||
404 | + | ||
405 | + //选择月份 | ||
406 | + chosemonth() { | ||
407 | + let index = this.data.monthindex; | ||
408 | + index = index + 1 | ||
409 | + if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) { | ||
410 | + if (index < 10) { | ||
411 | + this.setData({ | ||
412 | + time: this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31" | ||
413 | + }) | ||
414 | + } else { | ||
415 | + this.setData({ | ||
416 | + time: this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31" | ||
417 | + }) | ||
418 | + } | ||
419 | + | ||
420 | + } else { | ||
421 | + if (index < 10) { | ||
422 | + this.setData({ | ||
423 | + time: this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30" | ||
424 | + }) | ||
425 | + } else { | ||
426 | + this.setData({ | ||
427 | + time: this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30" | ||
428 | + }) | ||
429 | + } | ||
430 | + | ||
431 | + } | ||
432 | + }, | ||
433 | + three() { | ||
434 | + | ||
435 | + let newmonthList = this.data.monthList; | ||
436 | + for (var obj of newmonthList) { | ||
437 | + obj.sel = false | ||
438 | + } | ||
439 | + this.setData({ | ||
440 | + time: '近30天', | ||
441 | + monthList: newmonthList, | ||
442 | + showt: !this.data.showt | ||
443 | + }) | ||
444 | + }, | ||
445 | + toShowModal(e) { | ||
446 | + this.setData({ | ||
447 | + showModal: true | ||
448 | + | ||
449 | + }) | ||
450 | + | ||
451 | + var date = new Date(); | ||
452 | + | ||
453 | + var mon = date.getMonth(); | ||
454 | + console.log(mon) | ||
455 | + this.setData({ | ||
456 | + changeColor: mon | ||
457 | + }) | ||
458 | + }, | ||
459 | + | ||
460 | + hideModal() { | ||
461 | + this.setData({ | ||
462 | + showModal: false | ||
463 | + }); | ||
464 | + }, | ||
266 | /** | 465 | /** |
267 | * 生命周期函数--监听页面初次渲染完成 | 466 | * 生命周期函数--监听页面初次渲染完成 |
268 | */ | 467 | */ |
1 | <view class="detailhead"> | 1 | <view class="detailhead"> |
2 | - <view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">设备状态</view> | ||
3 | - <view class="detailname {{state==2?'selactive':''}}" bindtap="selectshebei" data-id="2">设备详情</view> | ||
4 | - <view class="detailname {{state==3?'selactive':''}}" bindtap="selectshebei" data-id="3">设备月报</view> | 2 | + <view class="detailname {{state==1?'sheactive':''}}" bindtap="selectshebei" data-id="1">设备状态</view> |
3 | + <view class="detailname {{state==2?'sheactive':''}}" bindtap="selectshebei" data-id="2">设备详情</view> | ||
4 | + <view class="detailname {{state==3?'sheactive':''}}" bindtap="selectshebei" data-id="3">设备月报</view> | ||
5 | </view> | 5 | </view> |
6 | 6 | ||
7 | -<!-- 设备状态 --> | 7 | +<!-- 日期弹出层 --> |
8 | 8 | ||
9 | -<view class="shebeizhuang" wx:if="{{state==1}}"> | ||
10 | 9 | ||
11 | - <view class="date"> | ||
12 | - <view class="dateleft"> | ||
13 | - <image src="/img/row.png"></image> | 10 | +<!-- 车辆状况日期弹出层 --> |
11 | +<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view> | ||
12 | +<view wx:if="{{showModal}}"> | ||
13 | + <view class="modal-content"> | ||
14 | + <!-- 年份 --> | ||
15 | + <view class="modal_year"> | ||
16 | + <picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}"> | ||
17 | + <view class="picker"> | ||
18 | + {{yearname}}年 | ||
19 | + </view> | ||
20 | + </picker> | ||
14 | </view> | 21 | </view> |
15 | - <view class="datetime"> | ||
16 | - <view class="datesel"> | ||
17 | - <picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindstateDateChange" fields="month"> | ||
18 | - <view class="picker"> | ||
19 | - {{statedate}} | ||
20 | - </view> | ||
21 | - </picker> | ||
22 | - </view> | ||
23 | - | ||
24 | - <view class="datepic"> | ||
25 | - <image src="/img/row.png"></image> | ||
26 | - </view> | 22 | + <!-- 月份 --> |
23 | + <view class="modal_month"> | ||
24 | + <view class="month_single {{item.sel==true?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item.name}}</view> | ||
27 | </view> | 25 | </view> |
28 | - | ||
29 | - <view class="dateright"> | ||
30 | - <image src="/img/row.png"></image> | 26 | + <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view> |
27 | + <view class='btns'> | ||
28 | + <view class="cacle" bindtap="hideModal">取消</view> | ||
29 | + <view class="cacle sure" bindtap="hideModal">确定</view> | ||
31 | </view> | 30 | </view> |
32 | </view> | 31 | </view> |
33 | - <view class="containerzhu"> | ||
34 | - <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec1 }}"></ec-canvas> | ||
35 | - </view> | ||
36 | - | ||
37 | </view> | 32 | </view> |
33 | +<view wx:if="{{showModal==false}}"> | ||
34 | + <!-- 设备状态 --> | ||
35 | + <view class="shebeizhuang" wx:if="{{state==1}}"> | ||
38 | 36 | ||
39 | - | ||
40 | - | ||
41 | -<!-- 设备详情 --> | ||
42 | - | ||
43 | -<view class="shebeidetail" wx:if="{{state==2}}"> | ||
44 | - <view class="beginkaiji">开机时间</view> | ||
45 | - <view class="hournum">13604.61</view> | ||
46 | - <view class="xian"></view> | ||
47 | - | ||
48 | - <view class="desbox"> | ||
49 | - <view class="desboxhead">设备描述</view> | ||
50 | - <view class="destext"> | ||
51 | - 该公司的生产线是专业设备,大设备中有小设备,小设备中还有更小的设备,而且这些设备并不是成套购买的,组装成生产线后不容易清点。在本案中,原本是两条生产线都抵押给银行了,但在法院现场清点中,我们发现还有相当数量的设备未设定抵押。在法院委托评估的报告中罗列了110项设备,而两家银行合计抵 | ||
52 | - </view> | ||
53 | - </view> | ||
54 | - | ||
55 | - <view class="shepic"> | ||
56 | - <view class="pictitle">设备照片</view> | ||
57 | - <view class="piclist"> | ||
58 | - <view class="listitem"> | ||
59 | - <image src="/img/logo3.png"></image> | ||
60 | - </view> | ||
61 | - <view class="listitem"> | ||
62 | - <image src="/img/logo3.png"></image> | ||
63 | - </view> | ||
64 | - <view class="listitem"> | ||
65 | - <image src="/img/logo3.png"></image> | ||
66 | - </view> | ||
67 | - <view class="listitem"> | ||
68 | - <image src="/img/logo3.png"></image> | 37 | + <view class="date"> |
38 | + <view class="dateleft"> | ||
39 | + <image src="/img/row.png"></image> | ||
69 | </view> | 40 | </view> |
70 | - </view> | 41 | + <view class="datetime" bindtap='toShowModal'> |
42 | + <view class="datesel"> | ||
71 | 43 | ||
72 | - </view> | ||
73 | -</view> | ||
74 | -<!-- 设备月报 --> | 44 | + {{time}} |
75 | 45 | ||
76 | -<view class="yuebao" wx:if="{{state==3}}"> | ||
77 | - <view class="date"> | ||
78 | - <view class="dateleft"> | ||
79 | - <image src="/img/row.png"></image> | ||
80 | - </view> | ||
81 | - <view class="datetime"> | ||
82 | - <view class="datesel"> | ||
83 | - <picker mode="date" value="{{date}}" start="" end="" bindchange="bindDateChange" fields="month"> | ||
84 | - <view class="picker"> | ||
85 | - {{date}} | ||
86 | - </view> | ||
87 | - </picker> | 46 | + </view> |
47 | + | ||
48 | + <view class="datepic"> | ||
49 | + <image src="/img/row.png"></image> | ||
50 | + </view> | ||
88 | </view> | 51 | </view> |
89 | 52 | ||
90 | - <view class="datepic"> | 53 | + <view class="dateright"> |
91 | <image src="/img/row.png"></image> | 54 | <image src="/img/row.png"></image> |
92 | </view> | 55 | </view> |
93 | </view> | 56 | </view> |
94 | - | ||
95 | - <view class="dateright"> | ||
96 | - <image src="/img/row.png"></image> | 57 | + <view class="containerzhu"> |
58 | + <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec1 }}"></ec-canvas> | ||
97 | </view> | 59 | </view> |
60 | + | ||
98 | </view> | 61 | </view> |
62 | + <!-- 设备详情 --> | ||
63 | + <view class="shebeidetail" wx:if="{{state==2}}"> | ||
64 | + <view class="beginkaiji">开机时间</view> | ||
65 | + <view class="hournum">13604.61</view> | ||
66 | + <view class="xian"></view> | ||
99 | 67 | ||
100 | - <view class='shebeiworktime'> | ||
101 | - <view class="tophour"> | ||
102 | - 设备工作总时长(小时) | 68 | + <view class="desbox"> |
69 | + <view class="desboxhead">设备描述</view> | ||
70 | + <view class="destext"> | ||
71 | + 该公司的生产线是专业设备,大设备中有小设备,小设备中还有更小的设备,而且这些设备并不是成套购买的,组装成生产线后不容易清点。在本案中,原本是两条生产线都抵押给银行了,但在法院现场清点中,我们发现还有相当数量的设备未设定抵押。在法院委托评估的报告中罗列了110项设备,而两家银行合计抵 | ||
72 | + </view> | ||
103 | </view> | 73 | </view> |
104 | 74 | ||
105 | - <view class="timenum"> | ||
106 | - <text class="timeleft">13604.61</text> | ||
107 | - <text class="timeright">4.1%</text> | 75 | + <view class="shepic"> |
76 | + <view class="pictitle">设备照片</view> | ||
77 | + <view class="piclist"> | ||
78 | + <view class="listitem"> | ||
79 | + <image src="/img/logo3.png"></image> | ||
80 | + </view> | ||
81 | + <view class="listitem"> | ||
82 | + <image src="/img/logo3.png"></image> | ||
83 | + </view> | ||
84 | + <view class="listitem"> | ||
85 | + <image src="/img/logo3.png"></image> | ||
86 | + </view> | ||
87 | + <view class="listitem"> | ||
88 | + <image src="/img/logo3.png"></image> | ||
89 | + </view> | ||
90 | + </view> | ||
91 | + | ||
108 | </view> | 92 | </view> |
109 | </view> | 93 | </view> |
110 | - | ||
111 | - <view class="timelist"> | ||
112 | - <view class="timeitem"> | ||
113 | - <view class="timetop"> | ||
114 | - 18044.32 | ||
115 | - </view> | ||
116 | - <view class="timebottom"> | ||
117 | - 总工作时长(h) | 94 | + <!-- 设备月报 --> |
95 | + <view class="yuebao" wx:if="{{state==3}}"> | ||
96 | + <view class="date"> | ||
97 | + <view class="dateleft"> | ||
98 | + <image src="/img/row.png"></image> | ||
118 | </view> | 99 | </view> |
119 | - </view> | ||
120 | - <view class="timeitem"> | ||
121 | - <view class="timetop"> | ||
122 | - 18044.32 | 100 | + <view class="datetime"> |
101 | + <view class="datesel"> | ||
102 | + <picker mode="date" value="{{date}}" start="" end="" bindchange="bindDateChange" fields="month"> | ||
103 | + <view class="picker"> | ||
104 | + {{date}} | ||
105 | + </view> | ||
106 | + </picker> | ||
107 | + </view> | ||
108 | + | ||
109 | + <view class="datepic"> | ||
110 | + <image src="/img/row.png"></image> | ||
111 | + </view> | ||
123 | </view> | 112 | </view> |
124 | - <view class="timebottom"> | ||
125 | - 日均工作时长(h) | 113 | + |
114 | + <view class="dateright"> | ||
115 | + <image src="/img/row.png"></image> | ||
126 | </view> | 116 | </view> |
127 | </view> | 117 | </view> |
128 | - <view class="timeitem"> | ||
129 | - <view class="timetop"> | ||
130 | - 18044.32 | 118 | + |
119 | + <view class='shebeiworktime'> | ||
120 | + <view class="tophour"> | ||
121 | + 设备工作总时长(小时) | ||
131 | </view> | 122 | </view> |
132 | - <view class="timebottom"> | ||
133 | - 低于上月总工作时长(h) | 123 | + |
124 | + <view class="timenum"> | ||
125 | + <text class="timeleft">13604.61</text> | ||
126 | + <text class="timeright">4.1%</text> | ||
134 | </view> | 127 | </view> |
135 | </view> | 128 | </view> |
136 | - <view class="timeitem"> | ||
137 | - <view class="timetop"> | ||
138 | - 18044.32 | ||
139 | - </view> | ||
140 | - <view class="timebottom"> | ||
141 | - 低于上月日均工作时长(h) | 129 | + |
130 | + <view class="timelist"> | ||
131 | + <view class="timeitem"> | ||
132 | + <view class="timetop"> | ||
133 | + 18044.32 | ||
134 | + </view> | ||
135 | + <view class="timebottom"> | ||
136 | + 总工作时长(h) | ||
137 | + </view> | ||
138 | + </view> | ||
139 | + <view class="timeitem"> | ||
140 | + <view class="timetop"> | ||
141 | + 18044.32 | ||
142 | + </view> | ||
143 | + <view class="timebottom"> | ||
144 | + 日均工作时长(h) | ||
145 | + </view> | ||
146 | + </view> | ||
147 | + <view class="timeitem"> | ||
148 | + <view class="timetop"> | ||
149 | + 18044.32 | ||
150 | + </view> | ||
151 | + <view class="timebottom"> | ||
152 | + 低于上月总工作时长(h) | ||
153 | + </view> | ||
154 | + </view> | ||
155 | + <view class="timeitem"> | ||
156 | + <view class="timetop"> | ||
157 | + 18044.32 | ||
158 | + </view> | ||
159 | + <view class="timebottom"> | ||
160 | + 低于上月日均工作时长(h) | ||
161 | + </view> | ||
142 | </view> | 162 | </view> |
143 | </view> | 163 | </view> |
144 | - </view> | ||
145 | 164 | ||
146 | - <!-- 半年度开工曲线 --> | 165 | + <!-- 半年度开工曲线 --> |
147 | 166 | ||
148 | - <view class="container"> | ||
149 | - <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas> | 167 | + <view class="container"> |
168 | + <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas> | ||
169 | + </view> | ||
150 | </view> | 170 | </view> |
151 | </view> | 171 | </view> |
1 | +@import "../../member/member.wxss"; | ||
2 | + | ||
1 | .detailhead { | 3 | .detailhead { |
2 | display: flex; | 4 | display: flex; |
3 | align-items: center; | 5 | align-items: center; |
@@ -12,11 +14,11 @@ | @@ -12,11 +14,11 @@ | ||
12 | font-size: 28rpx; | 14 | font-size: 28rpx; |
13 | } | 15 | } |
14 | 16 | ||
15 | -.selactive { | 17 | +.sheactive { |
16 | position: relative; | 18 | position: relative; |
17 | } | 19 | } |
18 | 20 | ||
19 | -.selactive::after { | 21 | +.sheactive::after { |
20 | display: block; | 22 | display: block; |
21 | content: ''; | 23 | content: ''; |
22 | width: 130rpx; | 24 | width: 130rpx; |
@@ -10,11 +10,63 @@ Page({ | @@ -10,11 +10,63 @@ Page({ | ||
10 | * 页面的初始数据 | 10 | * 页面的初始数据 |
11 | */ | 11 | */ |
12 | data: { | 12 | data: { |
13 | + montharr: [{ | ||
14 | + sel: false, | ||
15 | + name: '1月' | ||
16 | + }, | ||
17 | + { | ||
18 | + sel: false, | ||
19 | + name: '2月' | ||
20 | + }, | ||
21 | + { | ||
22 | + sel: false, | ||
23 | + name: '3月' | ||
24 | + }, | ||
25 | + { | ||
26 | + sel: false, | ||
27 | + name: '4月' | ||
28 | + }, | ||
29 | + { | ||
30 | + sel: false, | ||
31 | + name: '5月' | ||
32 | + }, | ||
33 | + { | ||
34 | + sel: false, | ||
35 | + name: '6月' | ||
36 | + }, | ||
37 | + { | ||
38 | + sel: false, | ||
39 | + name: '7月' | ||
40 | + }, | ||
41 | + { | ||
42 | + sel: false, | ||
43 | + name: '8月' | ||
44 | + }, | ||
45 | + { | ||
46 | + sel: false, | ||
47 | + name: '9月' | ||
48 | + }, | ||
49 | + { | ||
50 | + sel: false, | ||
51 | + name: '10月' | ||
52 | + }, | ||
53 | + { | ||
54 | + sel: false, | ||
55 | + name: '11月' | ||
56 | + }, | ||
57 | + { | ||
58 | + sel: false, | ||
59 | + name: '12月' | ||
60 | + }, | ||
61 | + ], | ||
62 | + yeararray: [], | ||
63 | + yearname: '', | ||
64 | + | ||
13 | showModal: false, | 65 | showModal: false, |
14 | modalTitle: ["选择时间", "选择地磅", "选择货物"], | 66 | modalTitle: ["选择时间", "选择地磅", "选择货物"], |
15 | modalNum: 0, | 67 | modalNum: 0, |
16 | monthList: ["货物名字", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘",], | 68 | monthList: ["货物名字", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘",], |
17 | - time: '2019.01.01-2019.01.31', | 69 | + time: '近30天', |
18 | changeColor: 0, | 70 | changeColor: 0, |
19 | tabList: ["入库", "流水"], | 71 | tabList: ["入库", "流水"], |
20 | tabNum: 0, | 72 | tabNum: 0, |
@@ -43,6 +95,8 @@ Page({ | @@ -43,6 +95,8 @@ Page({ | ||
43 | ], | 95 | ], |
44 | 96 | ||
45 | watertime: '', | 97 | watertime: '', |
98 | + showModal:false, | ||
99 | + showt: true, | ||
46 | 100 | ||
47 | 101 | ||
48 | //出库日期 | 102 | //出库日期 |
@@ -71,7 +125,7 @@ Page({ | @@ -71,7 +125,7 @@ Page({ | ||
71 | }, | 125 | }, |
72 | 126 | ||
73 | lazyLoad: true, // 延迟加载 | 127 | lazyLoad: true, // 延迟加载 |
74 | - showt: false | 128 | + |
75 | }, | 129 | }, |
76 | 130 | ||
77 | }, | 131 | }, |
@@ -231,16 +285,122 @@ Page({ | @@ -231,16 +285,122 @@ Page({ | ||
231 | this.setData({ | 285 | this.setData({ |
232 | statedate: app.monthnowDate(), | 286 | statedate: app.monthnowDate(), |
233 | startdate: app.newnowDate(), | 287 | startdate: app.newnowDate(), |
234 | - enddate: app.endate() | 288 | + enddate: app.endate(), |
289 | + watertime: app.newnowDate() + '-' + app.endate(), | ||
235 | }) | 290 | }) |
236 | - let newdate = this.data.statedate.split("-"); | 291 | + |
292 | + | ||
293 | + //获取年份数组 | ||
294 | + var newdate = new Date(); | ||
295 | + var newyear = newdate.getFullYear(); | ||
296 | + let newyeararray = this.data.yeararray; | ||
297 | + console.log(typeof (newyear)) | ||
298 | + | ||
299 | + | ||
300 | + for (var i = 1990; i <= newyear; i++) { | ||
301 | + newyeararray.push(i) | ||
302 | + } | ||
303 | + | ||
237 | this.setData({ | 304 | this.setData({ |
238 | - showdate: newdate[0] + '年' + newdate[1] + '月', | ||
239 | - watertime: app.newnowDate() + '-' + app.endate(), | 305 | + yeararray: newyeararray, |
306 | + yearname: newyear | ||
307 | + | ||
308 | + }) | ||
309 | + | ||
310 | + | ||
311 | + | ||
312 | + | ||
313 | + | ||
314 | + }, | ||
315 | + | ||
316 | + //年份选择 | ||
317 | + bindyearChange(e) { | ||
318 | + console.log(e) | ||
319 | + this.setData({ | ||
320 | + | ||
321 | + yearname: this.data.yeararray[e.detail.value] | ||
322 | + }) | ||
323 | + | ||
324 | + this.chosemonth() | ||
325 | + }, | ||
326 | + | ||
327 | + choicemonth(e) { | ||
328 | + let index = e.currentTarget.dataset.id; | ||
329 | + this.setData({ | ||
330 | + showt: false, | ||
331 | + monthindex: index | ||
332 | + }) | ||
333 | + | ||
334 | + | ||
335 | + let newmonthList = this.data.montharr; | ||
336 | + for (var i = 0; i < newmonthList.length; i++) { | ||
337 | + | ||
338 | + if (i == index) { | ||
339 | + | ||
340 | + console.log(3489894) | ||
341 | + newmonthList[index].sel = !newmonthList[index].sel; | ||
342 | + } else { | ||
343 | + | ||
344 | + newmonthList[i].sel = false | ||
345 | + } | ||
346 | + } | ||
347 | + | ||
348 | + this.setData({ | ||
349 | + montharr: newmonthList | ||
240 | }) | 350 | }) |
241 | 351 | ||
242 | 352 | ||
353 | + this.chosemonth() | ||
243 | 354 | ||
355 | + console.log(this.data.time) | ||
356 | + }, | ||
357 | + | ||
358 | + | ||
359 | + //选择月份 | ||
360 | + chosemonth() { | ||
361 | + let index = this.data.monthindex; | ||
362 | + index = index + 1 | ||
363 | + if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) { | ||
364 | + if (index < 10) { | ||
365 | + this.setData({ | ||
366 | + time: this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31" | ||
367 | + }) | ||
368 | + } else { | ||
369 | + this.setData({ | ||
370 | + time: this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31" | ||
371 | + }) | ||
372 | + } | ||
373 | + | ||
374 | + } else { | ||
375 | + if (index < 10) { | ||
376 | + this.setData({ | ||
377 | + time: +this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30" | ||
378 | + }) | ||
379 | + } else { | ||
380 | + this.setData({ | ||
381 | + time: +this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30" | ||
382 | + }) | ||
383 | + } | ||
384 | + | ||
385 | + } | ||
386 | + }, | ||
387 | + three() { | ||
388 | + | ||
389 | + let newmonthList = this.data.montharr; | ||
390 | + for (var obj of newmonthList) { | ||
391 | + obj.sel = false | ||
392 | + } | ||
393 | + this.setData({ | ||
394 | + time: '近30天', | ||
395 | + montharr: newmonthList, | ||
396 | + showt: !this.data.showt | ||
397 | + }) | ||
398 | + }, | ||
399 | + | ||
400 | + hideModal() { | ||
401 | + this.setData({ | ||
402 | + showModal: false | ||
403 | + }); | ||
244 | }, | 404 | }, |
245 | 405 | ||
246 | //跳转详情页 | 406 | //跳转详情页 |
1 | <!--pages/qiyeyongdian/detail/detail.wxml--> | 1 | <!--pages/qiyeyongdian/detail/detail.wxml--> |
2 | <!-- 货物信息 --> | 2 | <!-- 货物信息 --> |
3 | -<view class="modal-mask" bindtap="hideModal" wx:if="{{datechu}}"></view> | 3 | +<view class="modal-mask" bindtap="hideModal" wx:if="{{datechu}}"></view> |
4 | <view wx:if="{{datechu}}"> | 4 | <view wx:if="{{datechu}}"> |
5 | <view class="modal-content"> | 5 | <view class="modal-content"> |
6 | - <!-- 时间 地磅 货物 选项卡 --> | 6 | + <!-- 时间 地磅 货物 选项卡 --> |
7 | 7 | ||
8 | <view class="modal_year"> | 8 | <view class="modal_year"> |
9 | <view class="modal_single {{modalNum == index ?'modal_choice':''}}" wx:for="{{modalTitle}}" wx:key="" bindtap='selectbang' data-index="{{index}}">{{item}}</view> | 9 | <view class="modal_single {{modalNum == index ?'modal_choice':''}}" wx:for="{{modalTitle}}" wx:key="" bindtap='selectbang' data-index="{{index}}">{{item}}</view> |
10 | </view> | 10 | </view> |
11 | 11 | ||
12 | <!-- 选择时间 --> | 12 | <!-- 选择时间 --> |
13 | - <view class="timewrap" wx:if="{{modalNum==0}}"> | 13 | + <view class="timewrap1" wx:if="{{modalNum==0}}"> |
14 | 14 | ||
15 | <view class="timewrap"> | 15 | <view class="timewrap"> |
16 | - | 16 | + |
17 | 17 | ||
18 | <!-- 开始时间和结束时间 --> | 18 | <!-- 开始时间和结束时间 --> |
19 | 19 | ||
@@ -80,67 +80,91 @@ | @@ -80,67 +80,91 @@ | ||
80 | </view> | 80 | </view> |
81 | </view> | 81 | </view> |
82 | 82 | ||
83 | -<!-- 出库 流水选项卡 --> | ||
84 | -<view class="tab"> | ||
85 | - <view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view> | ||
86 | -</view> | ||
87 | -<!-- 月份 --> | ||
88 | -<view class="search_month"> | ||
89 | - <view class="rowimg"> | ||
90 | - <image src='/img/row.png' class="left"></image> | ||
91 | - </view> | ||
92 | - <view class="date_time"> | ||
93 | - <!-- 出库 --> | ||
94 | - <view wx:if="{{tabNum == 0}}"> | ||
95 | - <picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month"> | 83 | +<!-- 日期弹层 --> |
84 | + | ||
85 | +<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view> | ||
86 | +<view wx:if="{{showModal}}"> | ||
87 | + <view class="modal-content"> | ||
88 | + <!-- 年份 --> | ||
89 | + <view class="modal_year"> | ||
90 | + <picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}"> | ||
96 | <view class="picker"> | 91 | <view class="picker"> |
97 | - {{statedate}} | 92 | + {{yearname}}年 |
98 | </view> | 93 | </view> |
99 | </picker> | 94 | </picker> |
100 | </view> | 95 | </view> |
101 | - <!-- 流水 --> | ||
102 | - <view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view> | ||
103 | - <view class="rowimg"> | ||
104 | - <image src='/img/row.png' class="down"></image> | 96 | + <!-- 月份 --> |
97 | + <view class="modal_month"> | ||
98 | + <view class="month_yue {{item.sel==true?'change':''}}" wx:for="{{montharr}}" wx:key="" data-id="{{index}}" catchtap="choicemonth">{{item.name}}</view> | ||
99 | + </view> | ||
100 | + <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view> | ||
101 | + <view class='btns'> | ||
102 | + <view class="cacle" bindtap="hideModal">取消</view> | ||
103 | + <view class="cacle sure" bindtap="hideModal">确定</view> | ||
105 | </view> | 104 | </view> |
106 | - </view> | ||
107 | - <view class="rowimg"> | ||
108 | - <image src='/img/row.png'></image> | ||
109 | </view> | 105 | </view> |
110 | </view> | 106 | </view> |
111 | -<!-- 出库 --> | ||
112 | -<view wx:if="{{tabNum == 0}}"> | ||
113 | - <view class="cp_title"> | ||
114 | - 原料入库信息 | ||
115 | - </view> | ||
116 | - <view class="total"> | ||
117 | - 重量总计(吨) | ||
118 | - <text>1000</text> | 107 | + |
108 | +<view wx:if="{{showModal==false}}"> | ||
109 | + <!-- 出库 流水选项卡 --> | ||
110 | + <view class="tab"> | ||
111 | + <view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view> | ||
119 | </view> | 112 | </view> |
120 | - <!-- 折线图 --> | ||
121 | - <view class="charts_line"> | ||
122 | - <view class="chart"> | ||
123 | - <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas> | 113 | + <!-- 月份 --> |
114 | + <view class="search_month"> | ||
115 | + <view class="rowimg"> | ||
116 | + <image src='/img/row.png' class="left"></image> | ||
124 | </view> | 117 | </view> |
125 | - <view class="total_power"> | ||
126 | - <view>{{showdate}}</view> | 118 | + <view class="date_time"> |
119 | + <!-- 出库 --> | ||
120 | + <view wx:if="{{tabNum == 0}}" bindtap="toShowModal"> | ||
121 | + {{time}} | ||
122 | + </view> | ||
123 | + <!-- 流水 --> | ||
124 | + <view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view> | ||
125 | + <view class="rowimg"> | ||
126 | + <image src='/img/row.png' class="down"></image> | ||
127 | + </view> | ||
128 | + </view> | ||
129 | + <view class="rowimg"> | ||
130 | + <image src='/img/row.png'></image> | ||
127 | </view> | 131 | </view> |
128 | </view> | 132 | </view> |
129 | -</view> | ||
130 | -<!-- 流水 --> | ||
131 | -<view wx:if="{{tabNum == 1}}"> | ||
132 | - <view class="second_total">重量总计(吨):1000</view> | ||
133 | - <!-- 数据 --> | ||
134 | - <view class="table"> | ||
135 | - <view class="table_title"> | ||
136 | - <view wx:for="{{tableTitle}}" wx:key="">{{item}}</view> | 133 | + <!-- 出库 --> |
134 | + <view wx:if="{{tabNum == 0}}"> | ||
135 | + <view class="cp_title"> | ||
136 | + 原料入库信息 | ||
137 | + </view> | ||
138 | + <view class="total"> | ||
139 | + 重量总计(吨) | ||
140 | + <text>1000</text> | ||
141 | + </view> | ||
142 | + <!-- 折线图 --> | ||
143 | + <view class="charts_line"> | ||
144 | + <view class="chart"> | ||
145 | + <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas> | ||
146 | + </view> | ||
147 | + <view class="total_power"> | ||
148 | + <view>{{showdate}}</view> | ||
149 | + </view> | ||
137 | </view> | 150 | </view> |
138 | - <view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="godetail"> | ||
139 | - <view class="tr_time">{{item.date}}</view> | ||
140 | - <view class="tr_pos">{{item.position}}</view> | ||
141 | - <view class="tr_name">{{item.name}}</view> | ||
142 | - <view class="tr_time">{{item.num}}</view> | ||
143 | - <view class="tr_btn">{{item.btn}}</view> | 151 | + </view> |
152 | + <!-- 流水 --> | ||
153 | + <view wx:if="{{tabNum == 1}}"> | ||
154 | + <view class="second_total">重量总计(吨):1000</view> | ||
155 | + <!-- 数据 --> | ||
156 | + <view class="table"> | ||
157 | + <view class="table_title"> | ||
158 | + <view wx:for="{{tableTitle}}" wx:key="">{{item}}</view> | ||
159 | + </view> | ||
160 | + <view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="godetail"> | ||
161 | + <view class="tr_time">{{item.date}}</view> | ||
162 | + <view class="tr_pos">{{item.position}}</view> | ||
163 | + <view class="tr_name">{{item.name}}</view> | ||
164 | + <view class="tr_time">{{item.num}}</view> | ||
165 | + <view class="tr_btn">{{item.btn}}</view> | ||
166 | + </view> | ||
144 | </view> | 167 | </view> |
145 | </view> | 168 | </view> |
169 | + | ||
146 | </view> | 170 | </view> |
1 | /* pages/qiyeyongdian/detail/detail.wxss */ | 1 | /* pages/qiyeyongdian/detail/detail.wxss */ |
2 | @import "../../member/member.wxss"; | 2 | @import "../../member/member.wxss"; |
3 | 3 | ||
4 | + | ||
4 | .search_month { | 5 | .search_month { |
5 | width: 686rpx; | 6 | width: 686rpx; |
6 | padding: 0 30rpx; | 7 | padding: 0 30rpx; |
@@ -174,7 +175,7 @@ ec-canvas { | @@ -174,7 +175,7 @@ ec-canvas { | ||
174 | 175 | ||
175 | .change { | 176 | .change { |
176 | background-color: #ff9400; | 177 | background-color: #ff9400; |
177 | - color: #fff; | 178 | + color: #fff!important; |
178 | } | 179 | } |
179 | 180 | ||
180 | .date_descript { | 181 | .date_descript { |
@@ -308,3 +309,12 @@ ec-canvas { | @@ -308,3 +309,12 @@ ec-canvas { | ||
308 | overflow: hidden; | 309 | overflow: hidden; |
309 | text-overflow: ellipsis; | 310 | text-overflow: ellipsis; |
310 | } | 311 | } |
312 | +.month_yue{ | ||
313 | + width: 33.333%; | ||
314 | + height: 120rpx; | ||
315 | + text-align: center; | ||
316 | + border-radius: 6rpx; | ||
317 | + font-size: 32rpx; | ||
318 | + color: #333; | ||
319 | + line-height: 120rpx; | ||
320 | +} |
@@ -5,7 +5,8 @@ Page({ | @@ -5,7 +5,8 @@ Page({ | ||
5 | * 页面的初始数据 | 5 | * 页面的初始数据 |
6 | */ | 6 | */ |
7 | data: { | 7 | data: { |
8 | - | 8 | + sub:true, |
9 | + infoword:'' | ||
9 | }, | 10 | }, |
10 | submit(){ | 11 | submit(){ |
11 | wx.redirectTo({ | 12 | wx.redirectTo({ |
@@ -19,6 +20,23 @@ Page({ | @@ -19,6 +20,23 @@ Page({ | ||
19 | 20 | ||
20 | }, | 21 | }, |
21 | 22 | ||
23 | + enterinfo(e){ | ||
24 | + | ||
25 | + console.log(e) | ||
26 | + this.setData({ | ||
27 | + infoword:e.detail.value | ||
28 | + }) | ||
29 | + | ||
30 | + if (e.detail.value.length>0){ | ||
31 | + this.setData({ | ||
32 | + sub:false | ||
33 | + }) | ||
34 | + } | ||
35 | + | ||
36 | + | ||
37 | + console.log(this.data.sub) | ||
38 | + }, | ||
39 | + | ||
22 | /** | 40 | /** |
23 | * 生命周期函数--监听页面初次渲染完成 | 41 | * 生命周期函数--监听页面初次渲染完成 |
24 | */ | 42 | */ |
1 | <!--pages/yujing/yujingDetail/yujingRemark/yujingRemark.wxml--> | 1 | <!--pages/yujing/yujingDetail/yujingRemark/yujingRemark.wxml--> |
2 | <view class="ramark_area"> | 2 | <view class="ramark_area"> |
3 | <view class="reamrk_box"> | 3 | <view class="reamrk_box"> |
4 | - <textarea placeholder='输入备注信息'></textarea> | 4 | + <textarea placeholder='输入备注信息' bindinput="enterinfo" placeholder-class='shuru' value="{{infoword}}"></textarea> |
5 | </view> | 5 | </view> |
6 | </view> | 6 | </view> |
7 | <view class="submit_btn"> | 7 | <view class="submit_btn"> |
8 | - <view class="btn" bindtap='submit'>提交</view> | 8 | + <view class="btn" wx:if="{{sub}}">提交</view> |
9 | + | ||
10 | + <view class='btn submit' bindtap='submit' wx:else>提交</view> | ||
9 | </view> | 11 | </view> |
@@ -20,6 +20,10 @@ textarea { | @@ -20,6 +20,10 @@ textarea { | ||
20 | color: #b1b1b1; | 20 | color: #b1b1b1; |
21 | font-size: 24rpx; | 21 | font-size: 24rpx; |
22 | } | 22 | } |
23 | +.shuru{ | ||
24 | + color: #b1b1b1; | ||
25 | + font-size: 24rpx; | ||
26 | +} | ||
23 | 27 | ||
24 | .submit_btn { | 28 | .submit_btn { |
25 | padding: 0 30rpx; | 29 | padding: 0 30rpx; |
@@ -34,3 +38,7 @@ textarea { | @@ -34,3 +38,7 @@ textarea { | ||
34 | color: #fff; | 38 | color: #fff; |
35 | font-size: 32rpx; | 39 | font-size: 32rpx; |
36 | } | 40 | } |
41 | +.submit{ | ||
42 | + background: #FF9400; | ||
43 | + | ||
44 | +} |
1 | +// pages/yujing/yujingSet/yujingsearch/yujingsearch.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + | ||
11 | + /** | ||
12 | + * 生命周期函数--监听页面加载 | ||
13 | + */ | ||
14 | + onLoad: function (options) { | ||
15 | + | ||
16 | + }, | ||
17 | + | ||
18 | + /** | ||
19 | + * 生命周期函数--监听页面初次渲染完成 | ||
20 | + */ | ||
21 | + onReady: function () { | ||
22 | + | ||
23 | + }, | ||
24 | + | ||
25 | + /** | ||
26 | + * 生命周期函数--监听页面显示 | ||
27 | + */ | ||
28 | + onShow: function () { | ||
29 | + | ||
30 | + }, | ||
31 | + | ||
32 | + /** | ||
33 | + * 生命周期函数--监听页面隐藏 | ||
34 | + */ | ||
35 | + onHide: function () { | ||
36 | + | ||
37 | + }, | ||
38 | + | ||
39 | + /** | ||
40 | + * 生命周期函数--监听页面卸载 | ||
41 | + */ | ||
42 | + onUnload: function () { | ||
43 | + | ||
44 | + }, | ||
45 | + | ||
46 | + /** | ||
47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | + */ | ||
49 | + onPullDownRefresh: function () { | ||
50 | + | ||
51 | + }, | ||
52 | + | ||
53 | + /** | ||
54 | + * 页面上拉触底事件的处理函数 | ||
55 | + */ | ||
56 | + onReachBottom: function () { | ||
57 | + | ||
58 | + }, | ||
59 | + | ||
60 | + /** | ||
61 | + * 用户点击右上角分享 | ||
62 | + */ | ||
63 | + onShareAppMessage: function () { | ||
64 | + | ||
65 | + } | ||
66 | +}) |
1 | +/* pages/yujing/yujingSet/yujingsearch/yujingsearch.wxss */ |
-
请 注册 或 登录 后发表评论