作者 李洪娟

合并分支 'lhj' 到 'master'

Lhj



查看合并请求 !20
正在显示 33 个修改的文件 包含 1854 行增加682 行删除
{
"pages": [
"pages/companybox/qiyeyuebao/qiyeyuebao",
"pages/companybox/zhishudetail/shebei/shebeidetail/shebeidetail",
"pages/companybox/zhishudetail/shebei/shebeilist/shebeilist",
"pages/companybox/qiyedetail/qiyedetail",
"pages/companybox/zhishudetail/member/member",
"pages/changqu/changqu",
"pages/companybox/zhishudetail/car/car",
"pages/companybox/defendetail/defendetail",
"pages/companybox/zhishudetail/member/member",
"pages/companybox/zhishudetail/chengpin/chengpin",
"pages/companybox/zhishudetail/yuanliaomsg/yuanliao/yuanliao",
"pages/companybox/zhishudetail/shebei/shebeidetail/shebeidetail",
"pages/companybox/zhishudetail/qiyeyongdian/detail/detail",
"pages/companybox/zhishudetail/qiyeyongdian/qyyd/qyyd",
"pages/companybox/defendetail/defendetail",
"pages/yujing/yujing/yujing",
"pages/companybox/qiyedetail/qiyedetail",
"pages/yujing/yujingSet/yujingSet/yujingSet",
"pages/yujing/yujingsearch/yujingsearch",
"pages/companybox/zhishudetail/shebei/shebeilist/shebeilist",
"pages/qiye/qiye",
"pages/changqu/changqu",
"pages/companybox/zhishudetail/yuanliaomsg/yuanliaoDetail/yuanliaoDetail",
"pages/companybox/zhishudetail/qiyeyongdian/detail/detail",
"pages/companybox/jichuxinxi/jichuxinxi",
"pages/login/login",
"pages/mine/mine",
"pages/index/index",
"pages/logs/logs",
"pages/yujing/yujing/yujing",
"pages/companybox/zhishudetail/qiyeyongdian/qyyd/qyyd",
"pages/yujing/yujingSet/yujingSet/yujingSet",
"pages/yujing/yujingSet/yujingAdd/yujingAdd",
"pages/yujing/yujingSet/yujingType/yujingType",
"pages/yujing/yujingSet/yujingPerson/yujingPerson",
... ...
... ... @@ -13,17 +13,20 @@ function initChart1(canvas, width, height) {
var option = {
title: {
text: '',
subtext: ''
},
textStyle: {
fontSize: 12
subtext: '',
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ['每月', '平均']
data: ['每月', '平均'],
textStyle: {
fontSize: 13
},
},
toolbox: {
... ... @@ -34,6 +37,9 @@ function initChart1(canvas, width, height) {
data: ['18.11', '18.12', '19.01', '19.02', '19.03', '19.04', '19.05', '19.06', '19.07'],
axisLabel: {
interval: 1,
textStyle: {
fontSize: 13
},
},
},
yAxis: {
... ... @@ -44,13 +50,17 @@ function initChart1(canvas, width, height) {
axisLabel: {
formatter: '{value}'
formatter: '{value}',
textStyle: {
fontSize: 13
},
}
},
series: [{
name: '每月',
type: 'line',
color: '#FF5345',
smooth: true,
data: [11, 11, 15, 13, 12, 13, 10],
markPoint: {
data: [{
... ...
... ... @@ -49,7 +49,7 @@
<!-- 车辆状况 -->
<!-- 日期头部 -->
<view class="peoplestate" wx:if="{{state==1}}">
<view class="date" bindtap="datexianshi">
... ... @@ -73,14 +73,10 @@
<!-- 图表 -->
<view class="containerzhe">
<view class="containerzhe" wx:if="{{datechu==false}}">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
</view>
</view>
... ...
... ... @@ -22,7 +22,7 @@
display: block;
content: '';
width: 60rpx;
height: 1rpx;
border: 1rpx solid #ff9400;
position: absolute;
left: 50%;
... ... @@ -226,5 +226,6 @@
text-align: center;
line-height: 80rpx;
margin:8rpx auto 0;
}
... ...
import * as echarts from '../../../ec-canvas/echarts';
const app = getApp();
var option1=''
function initChart(canvas, width, height) {
const chart = echarts.init(canvas, null, {
width: width,
height: height
});
canvas.setChart(chart);
var option = {
option1 = {
tooltip: {
trigger: 'axis'
... ... @@ -26,25 +30,17 @@ function initChart(canvas, width, height) {
left: 'center',
top: 'bottom',
},
legend: {
enabled: true
},
radar: [
{
indicator: [
{
text: '生产:90分',
max: 100,
},
{
text: '预警:60分',
... ... @@ -63,26 +59,17 @@ function initChart(canvas, width, height) {
name: {
textStyle: {
fontSize: 14
}
},
},
],
series: [{
type: 'radar',
legend: {
},
itemStyle: {
normal: {
color: '#FBCB77',
... ... @@ -104,19 +91,9 @@ function initChart(canvas, width, height) {
}]
},
]
};
chart.setOption(option);
chart.setOption(option1);
return chart;
}
... ... @@ -227,7 +204,8 @@ Page({
}
},
onLoad: function (options) {
console.log(4383489489)
console.log(option1)
},
//跳转得分页面
godefen() {
... ...
<!--index.wxml-->
<view class="detailbox">
<view class="coint" bindtap="godefen">
<text class="cointleft">87</text>
<text class="cointword">分</text>
<view class="coint" bindtap="godefen">
<text class="cointleft">87</text>
<text class="cointword">分</text>
</view>
<view class="zonghe">综合得分</view>
<view class="container">
<ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas>
</view>
<view class="xian"></view>
<view class="middle">
<view class="companyname">无锡万峰金属制品有限公司</view>
<view class="middlelist">
<view class="middleitemleft">企业法人</view>
<view class="middleitemright">王刚</view>
</view>
<view class="middlelist">
<view class="middleitemleft">统一信用代码</view>
<view class="middleitemright">895597347547548758574</view>
<view class="zonghe">综合得分</view>
<view class="container">
<ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas>
</view>
<view class="middlelist">
<view class="middleitemleft">行业标签</view>
<view class="middleitemright">金属加工</view>
</view>
</view>
<!-- 指数详情 -->
<view class="xian"></view>
<view class="zhidetailbox">
<view class="zhititle">指数详情</view>
<view class="zhilist">
<view class="zhishuitem">
<view class="zhilistimg">
<image src="/img/demo18.png"></image>
</view>
<view class="zhiname">开工</view>
<view class="middle">
<view class="companyname">无锡万峰金属制品有限公司</view>
<view class="middlelist">
<view class="middleitemleft">企业法人</view>
<view class="middleitemright">王刚</view>
</view>
<view class="zhishuitem" bindtap="dian">
<view class="zhilistimg dian">
<image src="/img/demo19.png"></image>
</view>
<view class="zhiname">电量</view>
<view class="middlelist">
<view class="middleitemleft">统一信用代码</view>
<view class="middleitemright">895597347547548758574</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg people">
<image src="/img/demo20.png"></image>
</view>
<view class="zhiname">人员</view>
<view class="middlelist">
<view class="middleitemleft">行业标签</view>
<view class="middleitemright">金属加工</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg car">
<image src="/img/demo21.png"></image>
</view>
<!-- 指数详情 -->
<view class="zhidetailbox">
<view class="zhititle">指数详情</view>
<view class="zhilist">
<view class="zhishuitem">
<view class="zhilistimg">
<image src="/img/demo18.png"></image>
</view>
<view class="zhiname">开工</view>
</view>
<view class="zhiname">车辆</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg cheng">
<image src="/img/demo22.png"></image>
<view class="zhishuitem" bindtap="dian">
<view class="zhilistimg dian">
<image src="/img/demo19.png"></image>
</view>
<view class="zhiname">电量</view>
</view>
<view class="zhiname">成品</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg cheng">
<image src="/img/demo22.png"></image>
<view class="zhishuitem">
<view class="zhilistimg people">
<image src="/img/demo20.png"></image>
</view>
<view class="zhiname">人员</view>
</view>
<view class="zhiname">原材料</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg shui">
<image src="/img/demo1.png"></image>
<view class="zhishuitem">
<view class="zhilistimg car">
<image src="/img/demo21.png"></image>
</view>
<view class="zhiname">车辆</view>
</view>
<view class="zhiname">水量</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg qi">
<image src="/img/demo24.png"></image>
<view class="zhishuitem">
<view class="zhilistimg cheng">
<image src="/img/demo22.png"></image>
</view>
<view class="zhiname">成品</view>
</view>
<view class="zhiname">气量</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg wu">
<image src="/img/demo23.png"></image>
<view class="zhishuitem">
<view class="zhilistimg cheng">
<image src="/img/demo22.png"></image>
</view>
<view class="zhiname">原材料</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg shui">
<image src="/img/demo1.png"></image>
</view>
<view class="zhiname">水量</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg qi">
<image src="/img/demo24.png"></image>
</view>
<view class="zhiname">气量</view>
</view>
<view class="zhishuitem">
<view class="zhilistimg wu">
<image src="/img/demo23.png"></image>
</view>
<view class="zhiname">排污</view>
</view>
<view class="zhiname">排污</view>
</view>
</view>
</view>
<!-- 企业月报 -->
<!-- 企业月报 -->
<view class="monthbao">
<view class="monthbaotop">
<view class="monthleft">企业月报</view>
<view class="monthright">
<view class="rightword">查看详情</view>
<view class="rightimg">
<image src="/img/yourow.png"></image>
<view class="monthbao">
<view class="monthbaotop">
<view class="monthleft">企业月报</view>
<view class="monthright">
<view class="rightword">查看详情</view>
<view class="rightimg">
<image src="/img/yourow.png"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="containerzhe">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
</view>
<view class="containerzhe">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
</view>
<!-- 预警设置 -->
<!-- 预警设置 -->
<view class="monthbaotop yujing">
<view class="monthleft">预警设置</view>
<view class="monthright">
<view class="rightword">查看详情</view>
<view class="rightimg">
<image src="/img/yourow.png"></image>
<view class="monthbaotop yujing">
<view class="monthleft">预警设置</view>
<view class="monthright">
<view class="rightword">查看详情</view>
<view class="rightimg">
<image src="/img/yourow.png"></image>
</view>
</view>
</view>
</view>
<!-- 预警列表 -->
<!-- 预警列表 -->
<view class='yujinglist'>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class='yujinglist'>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yuleft">修改</view>
<view class="yuright">删除</view>
</view>
</view>
</view>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yuleft">修改</view>
<view class="yuright">删除</view>
</view>
</view>
</view>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yuleft">修改</view>
<view class="yuright">删除</view>
</view>
</view>
</view>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
</view>
<view class="yujingcontent tuisong">
推送人员:张三、李四、王五
</view>
<view class="yubottom">
<view class="yuleft">修改</view>
<view class="yuright">删除</view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -643,6 +643,7 @@ Page({
data: {
statedate:"",
state:1,
scrollTop: 0,
ec1: {
onInit: initChart1
... ... @@ -682,6 +683,12 @@ Page({
})
},
//回到顶部
goTop: function (e) {
this.setData({
scrollTop: 0
})
},
// 顶部tab切换
selectshebei(e){
this.setData({
... ...
... ... @@ -6,7 +6,6 @@
<view class="datetime">
<picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month">
<view class="datesel">
<view class="picker">
{{statedate}}
</view>
... ... @@ -25,8 +24,6 @@
</view>
<!-- 顶部tab切换 -->
<view class="detailhead">
<view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">生产总评</view>
... ... @@ -35,10 +32,10 @@
<view class="detailname {{state==3?'selactive':''}}" bindtap="selectshebei" data-id="3">生产预警</view>
</view>
<!-- 生产总评 -->
<!-- 客观信息 -->
<view class="keguaninfo" wx:if="{{state==1}}">
<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}}">
<view class="keguaninfo" >
<!-- 企业开工时间 -->
<view class="worktime">
<!-- 头部日期 -->
... ... @@ -93,6 +90,7 @@
在分析无锡市好事达供应链管理有限公司时,综合考虑无锡好事达供应链管理有限公司于2019年4月,目前处于
<text class="commonstate">正常状态</text>
</view>
</view>
</view>
... ... @@ -179,13 +177,19 @@
</view>
<view class='totop' bindtap="goTop">
<image src="/img/totop.png"></image>
</view>
</view>
</view>
</view>
<!-- 生产总评 -->
</scroll-view>
<!-- 客观信息 -->
<view class="shengchanzog" wx:if="{{state==2}}">
<!-- 企业生产总评-->
... ... @@ -221,12 +225,10 @@
<view class="desboxhead">分析</view>
<view class="destext">
在分析无锡市好事达供应链管理有限公司时,综合考虑该公司客观生产信息、生产稳定性、预警提示信息等维度,进行主客观综合评分。
</view>
</view>
</view>
<!-- 生产预警 -->
<view class="yujing" wx:if="{{state==3}}">
<view class="yujinghead">
<view class="yuitem xuhao">序号</view>
... ...
... ... @@ -93,6 +93,7 @@ word-break: break-all;
padding-bottom: 20rpx;
box-sizing: border-box;
margin-top: 50rpx;
position: relative
}
.destext {
... ... @@ -219,4 +220,12 @@ word-break: break-all;
right: 50%;
transform: translate(-50%);
bottom: -20rpx;
}
.totop{
width:110rpx;
height:110rpx;
font-size: 0;
position: absolute;
top:-50rpx;
right:0
}
\ No newline at end of file
... ...
... ... @@ -15,7 +15,7 @@ function initChart1(canvas, width, height) {
text: '',
subtext: ''
},
tooltip: {
trigger: 'axis'
},
... ... @@ -44,11 +44,11 @@ function initChart1(canvas, width, height) {
color: '#333',
fontStyle: 'normal',
},
},
yAxis: {
type: 'value',
... ... @@ -97,7 +97,7 @@ function initChart1(canvas, width, height) {
name: '周最低',
value: 10,
xAxis: 1,
yAxis:10
yAxis: 10
}]
},
markLine: {
... ... @@ -171,9 +171,61 @@ Page({
// 车辆状况日期
showModal: false,
monthList: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
time: '',
year:''
monthList: [{
sel: false,
name: '1月'
},
{
sel: false,
name: '2月'
},
{
sel: false,
name: '3月'
},
{
sel: false,
name: '4月'
},
{
sel: false,
name: '5月'
},
{
sel: false,
name: '6月'
},
{
sel: false,
name: '7月'
},
{
sel: false,
name: '8月'
},
{
sel: false,
name: '9月'
},
{
sel: false,
name: '10月'
},
{
sel: false,
name: '11月'
},
{
sel: false,
name: '12月'
},
],
showt: true,
time: '近30天',
year: '',
yeararray: [],
yearname: '',
},
... ... @@ -181,6 +233,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.setData({
statedate: app.monthnowDate(),
watertime: app.newnowDate() + '-' + app.endate(),
... ... @@ -188,91 +242,108 @@ Page({
enddate: app.endate()
})
//默认车辆状况日期
var date = new Date();
var month = date.getMonth() + 1;
var year=date.getFullYear();
//获取年份数组
var newdate = new Date();
var newyear = newdate.getFullYear();
let newyeararray = this.data.yeararray;
console.log(typeof(newyear))
for (var i = 1990; i <= newyear; i++) {
newyeararray.push(i)
}
this.setData({
showdate:year+'年'+month+'月'
yeararray: newyeararray,
yearname: newyear
})
if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
if (month < 10) {
this.setData({
time: "(" + year+"." + "0" + month + ".01" + "-2019." + '0' + month + ".31" + ")"
})
} else {
this.setData({
time: "(" + year+"." + month + ".01" + "-2019." + month + ".31" + ")"
})
}
},
} else {
if (month < 10) {
this.setData({
time: "(" + year+"." + "0" + month + ".01" + "-2019." + '0' + month + ".30" + ")"
})
} else {
this.setData({
time: "(" + year+"." + month + ".01" + "-2019." + month + ".30" + ")"
})
}
//年份选择
bindyearChange(e) {
console.log(e)
this.setData({
}
yearname: this.data.yeararray[e.detail.value]
})
this.chosemonth()
},
//车辆状况日期
choice(e) {
let index = e.currentTarget.dataset.id;
this.setData({
showt: false,
monthindex: index
})
//默认显示当前月份
let newmonthList = this.data.monthList;
for (var i = 0; i < newmonthList.length; i++) {
if (i == index) {
console.log(3489894)
newmonthList[index].sel = !newmonthList[index].sel;
} else {
newmonthList[i].sel = false
}
}
this.setData({
showt: false
monthList: newmonthList
})
var date = new Date();
var year = date.getFullYear()
let index = e.currentTarget.dataset.id;
this.chosemonth()
console.log(this.data.time)
},
//选择月份
chosemonth() {
let index = this.data.monthindex;
index = index + 1
if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) {
if (month < 10) {
if (index < 10) {
this.setData({
time: "(" + year + "." + "0" + index + ".01" + "-2019." + '0' + index + ".31" + ")"
time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31" + ")"
})
} else {
this.setData({
time: "(" + year + "." + index + ".01" + "-2019." + index + ".31" + ")"
time: "(" + this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31" + ")"
})
}
} else {
if (index < 10) {
this.setData({
time: "(" + year + "." + "0" + index + ".01" + "-2019." + '0' + index + ".30" + ")"
time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30" + ")"
})
} else {
this.setData({
time: "(" + year + "." + index + ".01" + "-2019." + index + ".30" + ")"
time: "(" + this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30" + ")"
})
}
}
this.setData({
changeColor: index - 1,
showdate: year + '年' + index + '月'
})
},
three() {
let newmonthList = this.data.monthList;
for (var obj of newmonthList) {
obj.sel = false
}
this.setData({
time: '近30天',
showt: !this.data.showt,
changeColor: -1
monthList: newmonthList,
showt: !this.data.showt
})
},
toShowModal(e) {
... ...
... ... @@ -22,7 +22,7 @@
</view>
</view>
<view class="timebox" wx:if="{{currentdate}}">
<view class="timebox" wx:if="{{currentdate}}">
<view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key="">
<view class="itemcontent">{{item.year}}</view>
<view class="itemcontent">{{item.month}}</view>
... ... @@ -33,10 +33,10 @@
</view>
<view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view>
<view wx:if="{{currentdate}}">
<date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" />
<date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" />
</view>
</view>
... ... @@ -48,10 +48,16 @@
<view wx:if="{{showModal}}">
<view class="modal-content">
<!-- 年份 -->
<view class="modal_year">2019年</view>
<view class="modal_year">
<picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}">
<view class="picker">
{{yearname}}年
</view>
</picker>
</view>
<!-- 月份 -->
<view class="modal_month">
<view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view>
<view class="month_single {{item.sel==true?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item.name}}</view>
</view>
<view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view>
<view class='btns'>
... ... @@ -69,11 +75,11 @@
</view>
<view wx:if="{{showModal==false}}">
<!-- 车辆状况 -->
<!-- 车辆状况 -->
<view class="peoplestate" wx:if="{{state==1}}">
<!-- <view class="date" bindtap="datexianshi">
<view class="peoplestate" wx:if="{{state==1}}">
<!-- <view class="date" bindtap="datexianshi">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
... ... @@ -92,93 +98,94 @@
</view>
</view> -->
<view class="date" bindtap='toShowModal'>
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datesel">
{{time}}
<view class="date" bindtap='toShowModal'>
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datesel">
{{time}}
</view>
<view class="datepic">
<image src="/img/row.png"></image>
</view>
</view>
<view class="datepic">
<view class="dateright">
<image src="/img/row.png"></image>
</view>
</view>
<view class="dateright">
<image src="/img/row.png"></image>
</view>
</view>
<view class="shebeinum">
<text class="she">车辆进出信息</text>
</view>
<view class="shebeinum">
<text class="she">车辆进出信息</text>
</view>
<view class="containerzhe">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
</view>
<view class="containerzhe">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
</view>
<view class="datetime">{{showdate}}</view>
<view class="datetime">{{showdate}}</view>
</view>
</view>
<!-- 车辆流水 -->
<!-- 车辆流水 -->
<view class="lishui" wx:if="{{state==2}}">
<view class="date" bindtap="datexianshi">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datesel">
{{watertime}}
<view class="lishui" wx:if="{{state==2}}">
<view class="date" bindtap="datexianshi">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datesel">
{{watertime}}
</view>
<view class="datepic">
<image src="/img/row.png"></image>
</view>
</view>
<view class="datepic">
<view class="dateright">
<image src="/img/row.png"></image>
</view>
</view>
<view class="dateright">
<image src="/img/row.png"></image>
</view>
</view>
<view class="shuibox">
<view class="shuibox">
<view class="shihead">
<view class="headitem shijian">时间</view>
<view class="headitem shexiang">摄像头</view>
<view class="headitem derition">方向</view>
<view class="shihead">
<view class="headitem shijian">时间</view>
<view class="headitem shexiang">摄像头</view>
<view class="headitem derition">方向</view>
</view>
<view class="shuicontent">
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
<view class="shuicontent">
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">车间后方大转盘</view>
<view class="shuiitemleft derition">进</view>
</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">车间后方大转盘</view>
<view class="shuiitemleft derition">进</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -10,11 +10,61 @@ Page({
* 页面的初始数据
*/
data: {
montharr: [{
sel: false,
name: '1月'
},
{
sel: false,
name: '2月'
},
{
sel: false,
name: '3月'
},
{
sel: false,
name: '4月'
},
{
sel: false,
name: '5月'
},
{
sel: false,
name: '6月'
},
{
sel: false,
name: '7月'
},
{
sel: false,
name: '8月'
},
{
sel: false,
name: '9月'
},
{
sel: false,
name: '10月'
},
{
sel: false,
name: '11月'
},
{
sel: false,
name: '12月'
},
],
showModal: false,
showt: true,
modalTitle: ["选择时间", "选择地磅", "选择货物"],
modalNum: 0,
monthList: ["货物名字", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", ],
time: '2019.01.01-2019.01.31',
time: '近30天',
changeColor: 0,
tabList: ["出库", "流水"],
tabNum: 0,
... ... @@ -42,16 +92,20 @@ Page({
},
],
watertime:'',
watertime: '',
//出库日期
statedate: '',
timestate:1,
timesel:1,
timestate: 1,
timesel: 1,
startdate: '',
enddate: '',
yeararray: [],
yearname: '',
ec: {
onInit: function(canvas, width, height) {
... ... @@ -71,7 +125,9 @@ Page({
},
lazyLoad: true, // 延迟加载
showt: false
shodate: true,
},
},
... ... @@ -79,8 +135,10 @@ Page({
this.setData({
tabNum: e.currentTarget.dataset.id
})
if(this.data.tabNum==0){
console.log(this.data.tabNum)
if (this.data.tabNum == 0) {
this.echartsComponnet = this.selectComponent('#mychart');
... ... @@ -104,7 +162,7 @@ Page({
})
},
//显示日期弹层
datexianshi() {
this.setData({
datechu: true,
... ... @@ -125,10 +183,10 @@ Page({
day = "0" + day
}
console.log()
if (typeof (day) == 'number') {
if (typeof(day) == 'number') {
day = day.toString()
}
console.log(typeof (day))
console.log(typeof(day))
this.setData({
datePickerValue: [year, month, day],
})
... ... @@ -137,9 +195,9 @@ Page({
// 时间地磅货物选择
selectbang(e){
selectbang(e) {
this.setData({
modalNum:e.currentTarget.dataset.index
modalNum: e.currentTarget.dataset.index
})
},
... ... @@ -155,7 +213,7 @@ Page({
this.datexianshi()
},
datePickerOnSureClick: function (e) {
datePickerOnSureClick: function(e) {
console.log('datePickerOnSureClick');
if (this.data.timesel == 1) {
... ... @@ -182,7 +240,7 @@ Page({
},
datePickerOnCancelClick: function (event) {
datePickerOnCancelClick: function(event) {
console.log('datePickerOnCancelClick');
console.log(event);
this.setData({
... ... @@ -201,55 +259,175 @@ Page({
})
},
// 选择地磅
quedibang(){
// 选择地磅
quedibang() {
this.setData({
datechu: false
})
},
// 取消选择
quxiaobang(){
quxiaobang() {
this.setData({
datechu: false,
watertime: app.newnowDate() + '-' + app.endate(),
})
},
choice(e) {
let index = e.currentTarget.dataset.id
let index = e.currentTarget.dataset.id;
this.setData({
changeColor: e.currentTarget.dataset.id,
watertime: this.data.monthList[index],
})
},
//年份选择
bindyearChange(e) {
console.log(e)
this.setData({
yearname: this.data.yeararray[e.detail.value]
})
this.chosemonth()
},
choicemonth(e) {
let index = e.currentTarget.dataset.id;
this.setData({
showt: false,
monthindex: index
})
let newmonthList = this.data.montharr;
for (var i = 0; i < newmonthList.length; i++) {
if (i == index) {
console.log(3489894)
newmonthList[index].sel = !newmonthList[index].sel;
} else {
newmonthList[i].sel = false
}
}
this.setData({
montharr: newmonthList
})
this.chosemonth()
console.log(this.data.time)
},
//选择月份
chosemonth() {
let index = this.data.monthindex;
index = index + 1
if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) {
if (index < 10) {
this.setData({
time: this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31"
})
} else {
this.setData({
time: this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31"
})
}
} else {
if (index < 10) {
this.setData({
time: +this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30"
})
} else {
this.setData({
time: +this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30"
})
}
}
},
three() {
let newmonthList = this.data.montharr;
for (var obj of newmonthList) {
obj.sel = false
}
this.setData({
time: '近30天',
montharr: newmonthList,
showt: !this.data.showt
})
},
hideModal() {
this.setData({
showModal: false
});
this.echartsComponnet = this.selectComponent('#mychart');
//如果是第一次绘制
if (!Chart) {
this.init_echarts(); //初始化图表
} else {
this.setOption(Chart); //更新数据
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.setData({
statedate: app.monthnowDate(),
startdate: app.newnowDate(),
enddate: app.endate()
enddate: app.endate(),
watertime: app.newnowDate() + '-' + app.endate(),
})
let newdate = this.data.statedate.split("-");
//获取年份数组
var newdate = new Date();
var newyear = newdate.getFullYear();
let newyeararray = this.data.yeararray;
console.log(typeof(newyear))
for (var i = 1990; i <= newyear; i++) {
newyeararray.push(i)
}
this.setData({
showdate: newdate[0] + '年' + newdate[1] + '月',
watertime: app.newnowDate() + '-' + app.endate(),
yeararray: newyeararray,
yearname: newyear
})
},
// 跳转详情页
detail(){
detail() {
wx.navigateTo({
url: '/pages/companybox/zhishudetail/chengpindetail/chengpindetail',
})
},
// 选择日期
bindstateDateChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
... ... @@ -412,7 +590,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.echartsComponnet = this.selectComponent('#mychart');
... ...
<!--pages/qiyeyongdian/detail/detail.wxml-->
<!-- 货物信息 -->
<view class="modal-mask" bindtap="hideModal" wx:if="{{datechu}}"></view>
<view class="modal-mask" bindtap="hideModal" wx:if="{{datechu}}"></view>
<view wx:if="{{datechu}}">
<view class="modal-content">
<!-- 时间 地磅 货物 选项卡 -->
<!-- 时间 地磅 货物 选项卡 -->
<view class="modal_year">
<view class="modal_single {{modalNum == index ?'modal_choice':''}}" wx:for="{{modalTitle}}" wx:key="" bindtap='selectbang' data-index="{{index}}">{{item}}</view>
... ... @@ -13,7 +13,7 @@
<view class="timewrap" wx:if="{{modalNum==0}}">
<view class="timewrap">
<!-- 开始时间和结束时间 -->
... ... @@ -81,12 +81,45 @@
</view>
<!-- 出库日期弹出层 -->
<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view>
<view wx:if="{{showModal}}">
<view class="modal-content">
<!-- 年份 -->
<view class="modal_year">
<picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}">
<view class="picker">
{{yearname}}年
</view>
</picker>
</view>
<!-- 月份 -->
<view class="modal_month">
<view class="month_yue {{item.sel==true?'change':''}}" wx:for="{{montharr}}" wx:key="" data-id="{{index}}" catchtap="choicemonth">{{item.name}}</view>
</view>
<view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view>
<view class='btns'>
<view class="cacle" bindtap="hideModal">取消</view>
<view class="cacle sure" bindtap="hideModal">确定</view>
</view>
</view>
</view>
<!-- 出库 流水选项卡 -->
<view class="tab">
<view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view>
<view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">
{{item}}
</view>
</view>
<!-- 月份 -->
<view class="search_month">
... ... @@ -95,12 +128,8 @@
</view>
<view class="date_time">
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
<picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month">
<view class="picker">
{{statedate}}
</view>
</picker>
<view wx:if="{{tabNum == 0}}" bindtap='toShowModal'>
{{time}}
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view>
... ... @@ -112,39 +141,43 @@
<image src='/img/row.png'></image>
</view>
</view>
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
<view class="cp_title">
成品出库信息
</view>
<view class="total">
重量总计(吨)
<text>1000</text>
</view>
<!-- 折线图 -->
<view class="charts_line">
<view class="chart">
<ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
<view wx:if="{{showModal==false}}">
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
<view class="cp_title">
成品出库信息
</view>
<view class="total_power">
<view>{{showdate}}</view>
<view class="total">
重量总计(吨)
<text>1000</text>
</view>
</view>
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}">
<view class="second_total">重量总计(吨):1000</view>
<!-- 数据 -->
<view class="table">
<view class="table_title">
<view wx:for="{{tableTitle}}" wx:key="">{{item}}</view>
<!-- 折线图 -->
<view class="charts_line">
<view class="chart">
<ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
</view>
<view class="total_power">
<view>{{showdate}}</view>
</view>
</view>
<view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="detail">
<view class="tr_time">{{item.date}}</view>
<view class="tr_pos">{{item.position}}</view>
<view class="tr_name">{{item.name}}</view>
<view class="tr_time">{{item.num}}</view>
<view class="tr_btn">{{item.btn}}</view>
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}">
<view class="second_total">重量总计(吨):1000</view>
<!-- 数据 -->
<view class="table">
<view class="table_title">
<view wx:for="{{tableTitle}}" wx:key="">{{item}}</view>
</view>
<view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="detail">
<view class="tr_time">{{item.date}}</view>
<view class="tr_pos">{{item.position}}</view>
<view class="tr_name">{{item.name}}</view>
<view class="tr_time">{{item.num}}</view>
<view class="tr_btn">{{item.btn}}</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/qiyeyongdian/detail/detail.wxss */
@import "../member/member.wxss";
.search_month {
width: 686rpx;
padding: 0 30rpx;
... ... @@ -174,7 +175,7 @@ ec-canvas {
.change {
background-color: #ff9400;
color: #fff;
color: #fff!important;
}
.date_descript {
... ... @@ -308,3 +309,12 @@ ec-canvas {
overflow: hidden;
text-overflow: ellipsis;
}
.month_yue{
width: 33.333%;
height: 120rpx;
text-align: center;
border-radius: 6rpx;
font-size: 32rpx;
color: #333;
line-height: 120rpx;
}
\ No newline at end of file
... ...
... ... @@ -134,6 +134,60 @@ Page({
startdate:'',
//结束日期
enddate:'',
showModal:false,
time:'近30天',
yearname: '',
showt: true,
yeararray:[],
monthList: [{
sel: false,
name: '1月'
},
{
sel: false,
name: '2月'
},
{
sel: false,
name: '3月'
},
{
sel: false,
name: '4月'
},
{
sel: false,
name: '5月'
},
{
sel: false,
name: '6月'
},
{
sel: false,
name: '7月'
},
{
sel: false,
name: '8月'
},
{
sel: false,
name: '9月'
},
{
sel: false,
name: '10月'
},
{
sel: false,
name: '11月'
},
{
sel: false,
name: '12月'
},
],
},
/**
... ... @@ -148,13 +202,136 @@ Page({
})
console.log(this.data.statedate)
let newdate = this.data.statedate.split("-");
//获取年份数组
var newdate = new Date();
var newyear = newdate.getFullYear();
let newyeararray = this.data.yeararray;
console.log(typeof (newyear))
for (var i = 1990; i <= newyear; i++) {
newyeararray.push(i)
}
this.setData({
showdate: newdate[0] + '年' + newdate[1] + '月'
yeararray: newyeararray,
yearname: newyear
})
},
toShowModal(e) {
this.setData({
showModal: true
})
var date = new Date();
var mon = date.getMonth();
console.log(mon)
this.setData({
changeColor: mon
})
},
//年份选择
bindyearChange(e) {
console.log(e)
this.setData({
yearname: this.data.yeararray[e.detail.value]
})
this.chosemonth()
},
// 选择日期
choice(e) {
let index = e.currentTarget.dataset.id;
this.setData({
showt: false,
monthindex: index
})
let newmonthList = this.data.monthList;
for (var i = 0; i < newmonthList.length; i++) {
if (i == index) {
console.log(3489894)
newmonthList[index].sel = !newmonthList[index].sel;
} else {
newmonthList[i].sel = false
}
}
this.setData({
monthList: newmonthList
})
this.chosemonth()
console.log(this.data.time)
},
//选择月份
chosemonth() {
let index = this.data.monthindex;
index = index + 1
if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) {
if (index < 10) {
this.setData({
time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31" + ")"
})
} else {
this.setData({
time: "(" + this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31" + ")"
})
}
} else {
if (index < 10) {
this.setData({
time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30" + ")"
})
} else {
this.setData({
time: "(" + this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30" + ")"
})
}
}
},
hideModal() {
this.setData({
showModal: false
});
},
three() {
let newmonthList = this.data.monthList;
for (var obj of newmonthList) {
obj.sel = false
}
this.setData({
time: '近30天',
monthList: newmonthList,
showt: !this.data.showt
})
},
showDatePicker: function(e) {
// this.data.datePicker.show(this);
this.setData({
... ...
... ... @@ -22,7 +22,7 @@
</view>
</view>
<view class="timebox" wx:if="{{currentdate}}">
<view class="timebox" wx:if="{{currentdate}}">
<view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key="">
<view class="itemcontent">{{item.year}}</view>
<view class="itemcontent">{{item.month}}</view>
... ... @@ -33,10 +33,10 @@
</view>
<view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view>
<view wx:if="{{currentdate}}">
<date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" />
<date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" />
</view>
... ... @@ -47,6 +47,32 @@
</view>
<!-- 年月日日期弹出层 -->
<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view>
<view wx:if="{{showModal}}">
<view class="modal-content">
<!-- 年份 -->
<view class="modal_year">
<picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}">
<view class="picker">
{{yearname}}年
</view>
</picker>
</view>
<!-- 月份 -->
<view class="modal_month">
<view class="month_single {{item.sel==true?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item.name}}</view>
</view>
<view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view>
<view class='btns'>
<view class="cacle" bindtap="hideModal">取消</view>
<view class="cacle sure" bindtap="hideModal">确定</view>
</view>
</view>
</view>
<view class="detailhead">
<view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">人员状况</view>
... ... @@ -54,99 +80,98 @@
</view>
<view wx:if="{{showModal==false}}">
<!-- 人员状况 -->
<!-- 人员状况 -->
<view class="peoplestate" wx:if="{{state==1}}">
<view class="peoplestate" wx:if="{{state==1}}">
<view class="date" bindtap="toShowModal">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datesel">
{{time}}
<view class="date">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datesel">
<picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month">
<view class="picker">
{{statedate}}
</view>
</picker>
</view>
<view class="datepic">
<image src="/img/row.png"></image>
</view>
</view>
<view class="datepic">
<view class="dateright">
<image src="/img/row.png"></image>
</view>
</view>
<view class="dateright">
<image src="/img/row.png"></image>
<view class="shebeinum">
<text class="she">人员进出信息</text>
</view>
</view>
<view class="shebeinum">
<text class="she">人员进出信息</text>
</view>
<view class="containerzhe">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
</view>
<view class="containerzhe">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
</view>
<view class="datetime">{{showdate}}</view>
<view class="datetime">{{showdate}}</view>
</view>
</view>
<!-- 进出流水 -->
<!-- 进出流水 -->
<view class="lishui" wx:if="{{state==2}}">
<view class="date" bindtap="datexianshi">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datesel">
{{watertime}}
<view class="lishui" wx:if="{{state==2}}">
<view class="date" bindtap="datexianshi">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datesel">
{{watertime}}
</view>
<view class="datepic">
<image src="/img/row.png"></image>
</view>
</view>
<view class="datepic">
<view class="dateright">
<image src="/img/row.png"></image>
</view>
</view>
<view class="dateright">
<image src="/img/row.png"></image>
</view>
</view>
<view class="shuibox">
<view class="shuibox">
<view class="shihead">
<view class="headitem shijian">时间</view>
<view class="headitem shexiang">摄像头</view>
<view class="headitem derition">方向</view>
<view class="shihead">
<view class="headitem shijian">时间</view>
<view class="headitem shexiang">摄像头</view>
<view class="headitem derition">方向</view>
</view>
<view class="shuicontent">
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
<view class="shuicontent">
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">车间后方大转盘</view>
<view class="shuiitemleft derition">进</view>
</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">大厅左上角</view>
<view class="shuiitemleft derition">进</view>
</view>
<view class="shuiitem">
<view class="shuiitemleft shijian">06.01</view>
<view class="shuiitemleft shexiang">车间后方大转盘</view>
<view class="shuiitemleft derition">进</view>
</view>
</view>
</view>
... ...
@import "../qiyeyongdian/detail/detail.wxss";
.detailhead {
display: flex;
align-items: center;
... ... @@ -20,7 +22,6 @@
display: block;
content: '';
width: 60rpx;
border: 1rpx solid #ff9400;
position: absolute;
left: 50%;
... ... @@ -109,9 +110,13 @@
.timewrap {
background: #fff;
/* height: 700rpx; */
padding-bottom: 40rpx;
box-sizing: border-box
box-sizing: border-box;
height:645rpx;
}
.timewrap1 {
height: 645rpx;
}
.timetwo {
... ... @@ -218,10 +223,9 @@
background: rgba(255, 148, 0, 1);
opacity: 1;
border-radius: 10rpx;
color:#fff;
color: #fff;
font-size: 30rpx;
text-align: center;
line-height: 80rpx;
margin:8rpx auto 0;
margin: 8rpx auto 0;
}
... ...
... ... @@ -11,8 +11,57 @@ Page({
*/
data: {
showModal: false,
monthList: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
time: '2019.01.01-2019.01.31',
monthList: [{
sel: false,
name: '1月'
},
{
sel: false,
name: '2月'
},
{
sel: false,
name: '3月'
},
{
sel: false,
name: '4月'
},
{
sel: false,
name: '5月'
},
{
sel: false,
name: '6月'
},
{
sel: false,
name: '7月'
},
{
sel: false,
name: '8月'
},
{
sel: false,
name: '9月'
},
{
sel: false,
name: '10月'
},
{
sel: false,
name: '11月'
},
{
sel: false,
name: '12月'
},
],
time: '',
monthindex: 0,
changeColor: -1,
ec: {
... ... @@ -36,45 +85,79 @@ Page({
showt: false
},
yeararray: [],
yearname: ''
},
choice(e) {
let index = e.currentTarget.dataset.id;
this.setData({
showt:false
showt: false,
monthindex: index
})
let index = e.currentTarget.dataset.id;
let newmonthList = this.data.monthList;
for (var i = 0; i < newmonthList.length; i++) {
if (i == index) {
console.log(3489894)
newmonthList[index].sel = !newmonthList[index].sel;
} else {
newmonthList[i].sel = false
}
}
this.setData({
monthList: newmonthList
})
this.chosemonth()
console.log(this.data.time)
},
//选择月份
chosemonth() {
let index = this.data.monthindex;
index = index + 1
if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) {
if (index < 10) {
this.setData({
time: "(" + "2019." + "0" + index + ".01" + "-2019." + '0' + index + ".31" + ")"
time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31" + ")"
})
} else {
this.setData({
time: "(" + "2019." + index + ".01" + "-2019." + index + ".31" + ")"
time: "(" + this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31" + ")"
})
}
} else {
if (index < 10) {
this.setData({
time: "(" + "2019." + "0" + index + ".01" + "-2019." + '0' + index + ".30" + ")"
time: "(" + this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30" + ")"
})
} else {
this.setData({
time: "(" + "2019." + index + ".01" + "-2019." + index + ".30" + ")"
time: "(" + this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30" + ")"
})
}
}
this.setData({
changeColor: index - 1
})
},
three() {
let newmonthList = this.data.monthList;
for (var obj of newmonthList) {
obj.sel = false
}
this.setData({
time: '近30天',
showt: !this.data.showt,
changeColor:-1
monthList: newmonthList,
showt: !this.data.showt
})
},
toShowModal(e) {
... ... @@ -86,7 +169,7 @@ Page({
showModal: true,
changeColor: mon,
showt:false
showt: false
})
... ... @@ -96,57 +179,119 @@ Page({
this.setData({
showModal: false
});
this.echartsComponnet = this.selectComponent('#mychart');
//如果是第一次绘制
if (!Chart) {
this.init_echarts(); //初始化图表
} else {
this.setOption(Chart); //更新数据
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.echartsComponnet = this.selectComponent('#mychart');
//如果是第一次绘制
if (!Chart) {
this.init_echarts(); //初始化图表
} else {
this.setOption(Chart); //更新数据
}
//获取年份数组
var newdate = new Date();
var newyear = newdate.getFullYear();
let newyeararray = this.data.yeararray;
console.log(typeof(newyear))
for (var i = 1990; i <= newyear; i++) {
newyeararray.push(i)
}
this.setData({
yeararray: newyeararray,
yearname: newyear
})
// 获取默认的月份
var date = new Date();
var month = date.getMonth() + 1;
var year = date.getFullYear();
console.log(month + '月')
this.setData({
showdate: year + '年' + month + '月'
showdate: this.data.yearname + '年' + month + '月'
})
if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
if (month < 10) {
this.setData({
time: "(" + year + "." + "0" + month + ".01" + "-2019." + '0' + month + ".31" + ")"
time: "(" + this.data.yearname + "." + "0" + month + ".01" + "-" + this.data.yearname + "." + '0' + month + ".31" + ")"
})
} else {
this.setData({
time: "(" + year + "." + month + ".01" + "-2019." + month + ".31" + ")"
time: "(" + this.data.yearname + "." + month + ".01" + "-" + this.data.yearname + "." + month + ".31" + ")"
})
}
} else {
if (month < 10) {
this.setData({
time: "(" + year + "." + "0" + month + ".01" + "-2019." + '0' + month + ".30" + ")"
time: "(" + this.data.yearname + "." + "0" + month + ".01" + "-" + this.data.yearname + "." + '0' + month + ".30" + ")"
})
} else {
this.setData({
time: "(" + year + "." + month + ".01" + "-2019." + month + ".30" + ")"
time: "(" + this.data.yearname + "." + month + ".01" + "-" + this.data.yearname + "." + month + ".30" + ")"
})
}
}
this.echartsComponnet = this.selectComponent('#mychart');
//如果是第一次绘制
//默认选择月份
let newmonthList = this.data.monthList;
if (!Chart) {
for (var obj of newmonthList) {
if (month + '月' == obj.name) {
obj.sel = true
}
}
this.setData({
monthList: newmonthList
})
this.init_echarts(); //初始化图表
} else {
},
this.setOption(Chart); //更新数据
//年份选择
bindyearChange(e) {
console.log(e)
this.setData({
}
yearname: this.data.yeararray[e.detail.value]
})
this.chosemonth()
},
//初始化图表
... ...
... ... @@ -4,10 +4,18 @@
<view wx:if="{{showModal}}">
<view class="modal-content">
<!-- 年份 -->
<view class="modal_year">2019年</view>
<view class="modal_year">
<picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}">
<view class="picker">
{{yearname}}年
</view>
</picker>
<!-- 2019年 -->
</view>
<!-- 月份 -->
<view class="modal_month">
<view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view>
<view class="month_single {{item.sel==true?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item.name}}</view>
</view>
<view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view>
<view class='btns'>
... ... @@ -22,8 +30,8 @@
<image src='/img/row.png' class="left"></image>
</view>
<view class="date_time" bindtap='toShowModal'>
<!-- 近30天(2019.03.01-2019.03.30) -->
{{time}}
<!-- 近30天(2019.03.01-2019.03.30) -->
{{time}}
<view class="rowimg">
<image src='/img/row.png' class="down"></image>
</view>
... ... @@ -33,10 +41,10 @@
</view>
</view>
<!-- 折线图 -->
<view class="charts_line">
<view class="charts_line" wx:if="{{showModal==false}}">
<view class="chart">
<ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
<!-- <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ec}}"></ec-canvas> -->
<!-- <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ec}}"></ec-canvas> -->
</view>
<view class="total_power">
... ...
... ... @@ -222,6 +222,61 @@ Page({
statedate: "",
date: '',
showModal:false,
time:'近30天',
yearname:'',
yeararray: [],
monthList: [{
sel: false,
name: '1月'
},
{
sel: false,
name: '2月'
},
{
sel: false,
name: '3月'
},
{
sel: false,
name: '4月'
},
{
sel: false,
name: '5月'
},
{
sel: false,
name: '6月'
},
{
sel: false,
name: '7月'
},
{
sel: false,
name: '8月'
},
{
sel: false,
name: '9月'
},
{
sel: false,
name: '10月'
},
{
sel: false,
name: '11月'
},
{
sel: false,
name: '12月'
},
],
ec: {
onInit: initChart1,
... ... @@ -244,7 +299,57 @@ Page({
statedate: app.monthnowDate(),
date: app.monthnowDate()
})
//获取年份数组
var newdate = new Date();
var newyear = newdate.getFullYear();
let newyeararray = this.data.yeararray;
console.log(typeof (newyear))
for (var i = 1990; i <= newyear; i++) {
newyeararray.push(i)
}
this.setData({
yeararray: newyeararray,
yearname: newyear
})
},
//年份选择
bindyearChange(e) {
console.log(e)
this.setData({
yearname: this.data.yeararray[e.detail.value]
})
this.chosemonth()
},
toShowModal(e) {
this.setData({
showModal: true
})
var date = new Date();
var mon = date.getMonth();
console.log(mon)
this.setData({
changeColor: mon
})
},
selectshebei(e) {
this.setData({
state: e.currentTarget.dataset.id
... ... @@ -263,6 +368,100 @@ Page({
date: e.detail.value
})
},
choice(e) {
let index = e.currentTarget.dataset.id;
this.setData({
showt: false,
monthindex: index
})
let newmonthList = this.data.monthList;
for (var i = 0; i < newmonthList.length; i++) {
if (i == index) {
console.log(3489894)
newmonthList[index].sel = !newmonthList[index].sel;
} else {
newmonthList[i].sel = false
}
}
this.setData({
monthList: newmonthList
})
this.chosemonth()
console.log(this.data.time)
},
//选择月份
chosemonth() {
let index = this.data.monthindex;
index = index + 1
if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) {
if (index < 10) {
this.setData({
time: this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31"
})
} else {
this.setData({
time: this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31"
})
}
} else {
if (index < 10) {
this.setData({
time: this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30"
})
} else {
this.setData({
time: this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30"
})
}
}
},
three() {
let newmonthList = this.data.monthList;
for (var obj of newmonthList) {
obj.sel = false
}
this.setData({
time: '近30天',
monthList: newmonthList,
showt: !this.data.showt
})
},
toShowModal(e) {
this.setData({
showModal: true
})
var date = new Date();
var mon = date.getMonth();
console.log(mon)
this.setData({
changeColor: mon
})
},
hideModal() {
this.setData({
showModal: false
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ...
<view class="detailhead">
<view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">设备状态</view>
<view class="detailname {{state==2?'selactive':''}}" bindtap="selectshebei" data-id="2">设备详情</view>
<view class="detailname {{state==3?'selactive':''}}" bindtap="selectshebei" data-id="3">设备月报</view>
<view class="detailname {{state==1?'sheactive':''}}" bindtap="selectshebei" data-id="1">设备状态</view>
<view class="detailname {{state==2?'sheactive':''}}" bindtap="selectshebei" data-id="2">设备详情</view>
<view class="detailname {{state==3?'sheactive':''}}" bindtap="selectshebei" data-id="3">设备月报</view>
</view>
<!-- 设备状态 -->
<!-- 日期弹出层 -->
<view class="shebeizhuang" wx:if="{{state==1}}">
<view class="date">
<view class="dateleft">
<image src="/img/row.png"></image>
<!-- 车辆状况日期弹出层 -->
<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view>
<view wx:if="{{showModal}}">
<view class="modal-content">
<!-- 年份 -->
<view class="modal_year">
<picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}">
<view class="picker">
{{yearname}}年
</view>
</picker>
</view>
<view class="datetime">
<view class="datesel">
<picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindstateDateChange" fields="month">
<view class="picker">
{{statedate}}
</view>
</picker>
</view>
<view class="datepic">
<image src="/img/row.png"></image>
</view>
<!-- 月份 -->
<view class="modal_month">
<view class="month_single {{item.sel==true?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item.name}}</view>
</view>
<view class="dateright">
<image src="/img/row.png"></image>
<view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view>
<view class='btns'>
<view class="cacle" bindtap="hideModal">取消</view>
<view class="cacle sure" bindtap="hideModal">确定</view>
</view>
</view>
<view class="containerzhu">
<ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec1 }}"></ec-canvas>
</view>
</view>
<view wx:if="{{showModal==false}}">
<!-- 设备状态 -->
<view class="shebeizhuang" wx:if="{{state==1}}">
<!-- 设备详情 -->
<view class="shebeidetail" wx:if="{{state==2}}">
<view class="beginkaiji">开机时间</view>
<view class="hournum">13604.61</view>
<view class="xian"></view>
<view class="desbox">
<view class="desboxhead">设备描述</view>
<view class="destext">
该公司的生产线是专业设备,大设备中有小设备,小设备中还有更小的设备,而且这些设备并不是成套购买的,组装成生产线后不容易清点。在本案中,原本是两条生产线都抵押给银行了,但在法院现场清点中,我们发现还有相当数量的设备未设定抵押。在法院委托评估的报告中罗列了110项设备,而两家银行合计抵
</view>
</view>
<view class="shepic">
<view class="pictitle">设备照片</view>
<view class="piclist">
<view class="listitem">
<image src="/img/logo3.png"></image>
</view>
<view class="listitem">
<image src="/img/logo3.png"></image>
</view>
<view class="listitem">
<image src="/img/logo3.png"></image>
</view>
<view class="listitem">
<image src="/img/logo3.png"></image>
<view class="date">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
</view>
<view class="datetime" bindtap='toShowModal'>
<view class="datesel">
</view>
</view>
<!-- 设备月报 -->
{{time}}
<view class="yuebao" wx:if="{{state==3}}">
<view class="date">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datesel">
<picker mode="date" value="{{date}}" start="" end="" bindchange="bindDateChange" fields="month">
<view class="picker">
{{date}}
</view>
</picker>
</view>
<view class="datepic">
<image src="/img/row.png"></image>
</view>
</view>
<view class="datepic">
<view class="dateright">
<image src="/img/row.png"></image>
</view>
</view>
<view class="dateright">
<image src="/img/row.png"></image>
<view class="containerzhu">
<ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec1 }}"></ec-canvas>
</view>
</view>
<!-- 设备详情 -->
<view class="shebeidetail" wx:if="{{state==2}}">
<view class="beginkaiji">开机时间</view>
<view class="hournum">13604.61</view>
<view class="xian"></view>
<view class='shebeiworktime'>
<view class="tophour">
设备工作总时长(小时)
<view class="desbox">
<view class="desboxhead">设备描述</view>
<view class="destext">
该公司的生产线是专业设备,大设备中有小设备,小设备中还有更小的设备,而且这些设备并不是成套购买的,组装成生产线后不容易清点。在本案中,原本是两条生产线都抵押给银行了,但在法院现场清点中,我们发现还有相当数量的设备未设定抵押。在法院委托评估的报告中罗列了110项设备,而两家银行合计抵
</view>
</view>
<view class="timenum">
<text class="timeleft">13604.61</text>
<text class="timeright">4.1%</text>
<view class="shepic">
<view class="pictitle">设备照片</view>
<view class="piclist">
<view class="listitem">
<image src="/img/logo3.png"></image>
</view>
<view class="listitem">
<image src="/img/logo3.png"></image>
</view>
<view class="listitem">
<image src="/img/logo3.png"></image>
</view>
<view class="listitem">
<image src="/img/logo3.png"></image>
</view>
</view>
</view>
</view>
<view class="timelist">
<view class="timeitem">
<view class="timetop">
18044.32
</view>
<view class="timebottom">
总工作时长(h)
<!-- 设备月报 -->
<view class="yuebao" wx:if="{{state==3}}">
<view class="date">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
</view>
<view class="timeitem">
<view class="timetop">
18044.32
<view class="datetime">
<view class="datesel">
<picker mode="date" value="{{date}}" start="" end="" bindchange="bindDateChange" fields="month">
<view class="picker">
{{date}}
</view>
</picker>
</view>
<view class="datepic">
<image src="/img/row.png"></image>
</view>
</view>
<view class="timebottom">
日均工作时长(h)
<view class="dateright">
<image src="/img/row.png"></image>
</view>
</view>
<view class="timeitem">
<view class="timetop">
18044.32
<view class='shebeiworktime'>
<view class="tophour">
设备工作总时长(小时)
</view>
<view class="timebottom">
低于上月总工作时长(h)
<view class="timenum">
<text class="timeleft">13604.61</text>
<text class="timeright">4.1%</text>
</view>
</view>
<view class="timeitem">
<view class="timetop">
18044.32
</view>
<view class="timebottom">
低于上月日均工作时长(h)
<view class="timelist">
<view class="timeitem">
<view class="timetop">
18044.32
</view>
<view class="timebottom">
总工作时长(h)
</view>
</view>
<view class="timeitem">
<view class="timetop">
18044.32
</view>
<view class="timebottom">
日均工作时长(h)
</view>
</view>
<view class="timeitem">
<view class="timetop">
18044.32
</view>
<view class="timebottom">
低于上月总工作时长(h)
</view>
</view>
<view class="timeitem">
<view class="timetop">
18044.32
</view>
<view class="timebottom">
低于上月日均工作时长(h)
</view>
</view>
</view>
</view>
<!-- 半年度开工曲线 -->
<!-- 半年度开工曲线 -->
<view class="container">
<ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas>
<view class="container">
<ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas>
</view>
</view>
</view>
\ No newline at end of file
... ...
@import "../../member/member.wxss";
.detailhead {
display: flex;
align-items: center;
... ... @@ -12,11 +14,11 @@
font-size: 28rpx;
}
.selactive {
.sheactive {
position: relative;
}
.selactive::after {
.sheactive::after {
display: block;
content: '';
width: 130rpx;
... ...
... ... @@ -10,11 +10,63 @@ Page({
* 页面的初始数据
*/
data: {
montharr: [{
sel: false,
name: '1月'
},
{
sel: false,
name: '2月'
},
{
sel: false,
name: '3月'
},
{
sel: false,
name: '4月'
},
{
sel: false,
name: '5月'
},
{
sel: false,
name: '6月'
},
{
sel: false,
name: '7月'
},
{
sel: false,
name: '8月'
},
{
sel: false,
name: '9月'
},
{
sel: false,
name: '10月'
},
{
sel: false,
name: '11月'
},
{
sel: false,
name: '12月'
},
],
yeararray: [],
yearname: '',
showModal: false,
modalTitle: ["选择时间", "选择地磅", "选择货物"],
modalNum: 0,
monthList: ["货物名字", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘",],
time: '2019.01.01-2019.01.31',
time: '近30天',
changeColor: 0,
tabList: ["入库", "流水"],
tabNum: 0,
... ... @@ -43,6 +95,8 @@ Page({
],
watertime: '',
showModal:false,
showt: true,
//出库日期
... ... @@ -71,7 +125,7 @@ Page({
},
lazyLoad: true, // 延迟加载
showt: false
},
},
... ... @@ -231,16 +285,122 @@ Page({
this.setData({
statedate: app.monthnowDate(),
startdate: app.newnowDate(),
enddate: app.endate()
enddate: app.endate(),
watertime: app.newnowDate() + '-' + app.endate(),
})
let newdate = this.data.statedate.split("-");
//获取年份数组
var newdate = new Date();
var newyear = newdate.getFullYear();
let newyeararray = this.data.yeararray;
console.log(typeof (newyear))
for (var i = 1990; i <= newyear; i++) {
newyeararray.push(i)
}
this.setData({
showdate: newdate[0] + '年' + newdate[1] + '月',
watertime: app.newnowDate() + '-' + app.endate(),
yeararray: newyeararray,
yearname: newyear
})
},
//年份选择
bindyearChange(e) {
console.log(e)
this.setData({
yearname: this.data.yeararray[e.detail.value]
})
this.chosemonth()
},
choicemonth(e) {
let index = e.currentTarget.dataset.id;
this.setData({
showt: false,
monthindex: index
})
let newmonthList = this.data.montharr;
for (var i = 0; i < newmonthList.length; i++) {
if (i == index) {
console.log(3489894)
newmonthList[index].sel = !newmonthList[index].sel;
} else {
newmonthList[i].sel = false
}
}
this.setData({
montharr: newmonthList
})
this.chosemonth()
console.log(this.data.time)
},
//选择月份
chosemonth() {
let index = this.data.monthindex;
index = index + 1
if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) {
if (index < 10) {
this.setData({
time: this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".31"
})
} else {
this.setData({
time: this.data.yearname + "." + index + ".01" + '-' + this.data.yearname + "." + index + ".31"
})
}
} else {
if (index < 10) {
this.setData({
time: +this.data.yearname + "." + "0" + index + ".01" + "-" + this.data.yearname + "." + '0' + index + ".30"
})
} else {
this.setData({
time: +this.data.yearname + "." + index + ".01" + "-" + this.data.yearname + "." + index + ".30"
})
}
}
},
three() {
let newmonthList = this.data.montharr;
for (var obj of newmonthList) {
obj.sel = false
}
this.setData({
time: '近30天',
montharr: newmonthList,
showt: !this.data.showt
})
},
hideModal() {
this.setData({
showModal: false
});
},
//跳转详情页
... ...
<!--pages/qiyeyongdian/detail/detail.wxml-->
<!-- 货物信息 -->
<view class="modal-mask" bindtap="hideModal" wx:if="{{datechu}}"></view>
<view class="modal-mask" bindtap="hideModal" wx:if="{{datechu}}"></view>
<view wx:if="{{datechu}}">
<view class="modal-content">
<!-- 时间 地磅 货物 选项卡 -->
<!-- 时间 地磅 货物 选项卡 -->
<view class="modal_year">
<view class="modal_single {{modalNum == index ?'modal_choice':''}}" wx:for="{{modalTitle}}" wx:key="" bindtap='selectbang' data-index="{{index}}">{{item}}</view>
</view>
<!-- 选择时间 -->
<view class="timewrap" wx:if="{{modalNum==0}}">
<view class="timewrap1" wx:if="{{modalNum==0}}">
<view class="timewrap">
<!-- 开始时间和结束时间 -->
... ... @@ -80,67 +80,91 @@
</view>
</view>
<!-- 出库 流水选项卡 -->
<view class="tab">
<view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view>
</view>
<!-- 月份 -->
<view class="search_month">
<view class="rowimg">
<image src='/img/row.png' class="left"></image>
</view>
<view class="date_time">
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
<picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month">
<!-- 日期弹层 -->
<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view>
<view wx:if="{{showModal}}">
<view class="modal-content">
<!-- 年份 -->
<view class="modal_year">
<picker bindchange="bindyearChange" value="{{index}}" range="{{yeararray}}">
<view class="picker">
{{statedate}}
{{yearname}}年
</view>
</picker>
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view>
<view class="rowimg">
<image src='/img/row.png' class="down"></image>
<!-- 月份 -->
<view class="modal_month">
<view class="month_yue {{item.sel==true?'change':''}}" wx:for="{{montharr}}" wx:key="" data-id="{{index}}" catchtap="choicemonth">{{item.name}}</view>
</view>
<view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view>
<view class='btns'>
<view class="cacle" bindtap="hideModal">取消</view>
<view class="cacle sure" bindtap="hideModal">确定</view>
</view>
</view>
<view class="rowimg">
<image src='/img/row.png'></image>
</view>
</view>
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
<view class="cp_title">
原料入库信息
</view>
<view class="total">
重量总计(吨)
<text>1000</text>
<view wx:if="{{showModal==false}}">
<!-- 出库 流水选项卡 -->
<view class="tab">
<view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view>
</view>
<!-- 折线图 -->
<view class="charts_line">
<view class="chart">
<ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
<!-- 月份 -->
<view class="search_month">
<view class="rowimg">
<image src='/img/row.png' class="left"></image>
</view>
<view class="total_power">
<view>{{showdate}}</view>
<view class="date_time">
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}" bindtap="toShowModal">
{{time}}
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view>
<view class="rowimg">
<image src='/img/row.png' class="down"></image>
</view>
</view>
<view class="rowimg">
<image src='/img/row.png'></image>
</view>
</view>
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}">
<view class="second_total">重量总计(吨):1000</view>
<!-- 数据 -->
<view class="table">
<view class="table_title">
<view wx:for="{{tableTitle}}" wx:key="">{{item}}</view>
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
<view class="cp_title">
原料入库信息
</view>
<view class="total">
重量总计(吨)
<text>1000</text>
</view>
<!-- 折线图 -->
<view class="charts_line">
<view class="chart">
<ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
</view>
<view class="total_power">
<view>{{showdate}}</view>
</view>
</view>
<view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="godetail">
<view class="tr_time">{{item.date}}</view>
<view class="tr_pos">{{item.position}}</view>
<view class="tr_name">{{item.name}}</view>
<view class="tr_time">{{item.num}}</view>
<view class="tr_btn">{{item.btn}}</view>
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}">
<view class="second_total">重量总计(吨):1000</view>
<!-- 数据 -->
<view class="table">
<view class="table_title">
<view wx:for="{{tableTitle}}" wx:key="">{{item}}</view>
</view>
<view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="godetail">
<view class="tr_time">{{item.date}}</view>
<view class="tr_pos">{{item.position}}</view>
<view class="tr_name">{{item.name}}</view>
<view class="tr_time">{{item.num}}</view>
<view class="tr_btn">{{item.btn}}</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/qiyeyongdian/detail/detail.wxss */
@import "../../member/member.wxss";
.search_month {
width: 686rpx;
padding: 0 30rpx;
... ... @@ -174,7 +175,7 @@ ec-canvas {
.change {
background-color: #ff9400;
color: #fff;
color: #fff!important;
}
.date_descript {
... ... @@ -308,3 +309,12 @@ ec-canvas {
overflow: hidden;
text-overflow: ellipsis;
}
.month_yue{
width: 33.333%;
height: 120rpx;
text-align: center;
border-radius: 6rpx;
font-size: 32rpx;
color: #333;
line-height: 120rpx;
}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,8 @@ Page({
* 页面的初始数据
*/
data: {
sub:true,
infoword:''
},
submit(){
wx.redirectTo({
... ... @@ -19,6 +20,23 @@ Page({
},
enterinfo(e){
console.log(e)
this.setData({
infoword:e.detail.value
})
if (e.detail.value.length>0){
this.setData({
sub:false
})
}
console.log(this.data.sub)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ...
<!--pages/yujing/yujingDetail/yujingRemark/yujingRemark.wxml-->
<view class="ramark_area">
<view class="reamrk_box">
<textarea placeholder='输入备注信息'></textarea>
<textarea placeholder='输入备注信息' bindinput="enterinfo" placeholder-class='shuru' value="{{infoword}}"></textarea>
</view>
</view>
<view class="submit_btn">
<view class="btn" bindtap='submit'>提交</view>
<view class="btn" wx:if="{{sub}}">提交</view>
<view class='btn submit' bindtap='submit' wx:else>提交</view>
</view>
\ No newline at end of file
... ...
... ... @@ -20,6 +20,10 @@ textarea {
color: #b1b1b1;
font-size: 24rpx;
}
.shuru{
color: #b1b1b1;
font-size: 24rpx;
}
.submit_btn {
padding: 0 30rpx;
... ... @@ -34,3 +38,7 @@ textarea {
color: #fff;
font-size: 32rpx;
}
.submit{
background: #FF9400;
}
\ No newline at end of file
... ...
// pages/yujing/yujingSet/yujingsearch/yujingsearch.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/yujing/yujingSet/yujingsearch/yujingsearch.wxml-->
<text>pages/yujing/yujingSet/yujingsearch/yujingsearch.wxml</text>
... ...
/* pages/yujing/yujingSet/yujingsearch/yujingsearch.wxss */
\ No newline at end of file
... ...