作者 lihongjuan

34534534

正在显示 33 个修改的文件 包含 1453 行增加281 行删除
{
"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%;
... ... @@ -227,4 +227,5 @@
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">
<view class="coint" bindtap="godefen">
<text class="cointleft">87</text>
<text class="cointword">分</text>
</view>
<view class="zonghe">综合得分</view>
<view class="container">
</view>
<view class="zonghe">综合得分</view>
<view class="container">
<ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="xian"></view>
<view class="xian"></view>
<view class="middle">
<view class="middle">
<view class="companyname">无锡万峰金属制品有限公司</view>
<view class="middlelist">
<view class="middleitemleft">企业法人</view>
... ... @@ -27,11 +27,11 @@
<view class="middleitemleft">行业标签</view>
<view class="middleitemright">金属加工</view>
</view>
</view>
</view>
<!-- 指数详情 -->
<!-- 指数详情 -->
<view class="zhidetailbox">
<view class="zhidetailbox">
<view class="zhititle">指数详情</view>
<view class="zhilist">
<view class="zhishuitem">
... ... @@ -89,11 +89,11 @@
<view class="zhiname">排污</view>
</view>
</view>
</view>
</view>
<!-- 企业月报 -->
<!-- 企业月报 -->
<view class="monthbao">
<view class="monthbao">
<view class="monthbaotop">
<view class="monthleft">企业月报</view>
<view class="monthright">
... ... @@ -104,15 +104,15 @@
</view>
</view>
</view>
</view>
<view class="containerzhe">
<view class="containerzhe">
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
</view>
</view>
<!-- 预警设置 -->
<!-- 预警设置 -->
<view class="monthbaotop yujing">
<view class="monthbaotop yujing">
<view class="monthleft">预警设置</view>
<view class="monthright">
<view class="rightword">查看详情</view>
... ... @@ -120,10 +120,10 @@
<image src="/img/yourow.png"></image>
</view>
</view>
</view>
<!-- 预警列表 -->
</view>
<!-- 预警列表 -->
<view class='yujinglist'>
<view class='yujinglist'>
<view class="yujingitem">
<view class="yujingcontent kaigong">
连续不开工时长(天):5
... ... @@ -172,6 +172,5 @@
<view class="yuright">删除</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
... ...
... ... @@ -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 {
... ... @@ -220,3 +221,11 @@ word-break: break-all;
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
... ...
... ... @@ -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(),
... ... @@ -190,89 +244,106 @@ Page({
//默认车辆状况日期
var date = new Date();
var month = date.getMonth() + 1;
var year=date.getFullYear();
this.setData({
showdate:year+'年'+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" + ")"
})
} else {
this.setData({
time: "(" + year+"." + month + ".01" + "-2019." + month + ".31" + ")"
})
//获取年份数组
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)
}
} else {
if (month < 10) {
this.setData({
time: "(" + year+"." + "0" + month + ".01" + "-2019." + '0' + month + ".30" + ")"
yeararray: newyeararray,
yearname: newyear
})
} else {
},
//年份选择
bindyearChange(e) {
console.log(e)
this.setData({
time: "(" + year+"." + month + ".01" + "-2019." + month + ".30" + ")"
})
}
}
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) {
... ...
... ... @@ -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,10 +75,10 @@
</view>
<view wx:if="{{showModal==false}}">
<!-- 车辆状况 -->
<!-- 车辆状况 -->
<view class="peoplestate" wx:if="{{state==1}}">
<view class="peoplestate" wx:if="{{state==1}}">
<!-- <view class="date" bindtap="datexianshi">
<view class="dateleft">
<image src="/img/row.png"></image>
... ... @@ -123,11 +129,11 @@
<view class="datetime">{{showdate}}</view>
</view>
</view>
<!-- 车辆流水 -->
<!-- 车辆流水 -->
<view class="lishui" wx:if="{{state==2}}">
<view class="lishui" wx:if="{{state==2}}">
<view class="date" bindtap="datexianshi">
<view class="dateleft">
<image src="/img/row.png"></image>
... ... @@ -181,4 +187,5 @@
</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,7 +135,9 @@ 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');
... ... @@ -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,21 +259,21 @@ 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,
... ... @@ -223,6 +281,111 @@ Page({
})
},
//年份选择
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); //更新数据
}
},
/**
* 生命周期函数--监听页面加载
*/
... ... @@ -231,19 +394,34 @@ 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
})
},
// 跳转详情页
detail(){
detail() {
wx.navigateTo({
url: '/pages/companybox/zhishudetail/chengpindetail/chengpindetail',
})
... ...
... ... @@ -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,8 +141,11 @@
<image src='/img/row.png'></image>
</view>
</view>
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
<view wx:if="{{showModal==false}}">
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
<view class="cp_title">
成品出库信息
</view>
... ... @@ -130,9 +162,9 @@
<view>{{showdate}}</view>
</view>
</view>
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}">
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}">
<view class="second_total">重量总计(吨):1000</view>
<!-- 数据 -->
<view class="table">
... ... @@ -147,4 +179,5 @@
<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({
... ...
... ... @@ -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,22 +80,19 @@
</view>
<view wx:if="{{showModal==false}}">
<!-- 人员状况 -->
<!-- 人员状况 -->
<view class="peoplestate" wx:if="{{state==1}}">
<view class="peoplestate" wx:if="{{state==1}}">
<view class="date">
<view class="date" bindtap="toShowModal">
<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>
{{time}}
</view>
<view class="datepic">
... ... @@ -93,11 +116,11 @@
<view class="datetime">{{showdate}}</view>
</view>
</view>
<!-- 进出流水 -->
<!-- 进出流水 -->
<view class="lishui" wx:if="{{state==2}}">
<view class="lishui" wx:if="{{state==2}}">
<view class="date" bindtap="datexianshi">
<view class="dateleft">
<image src="/img/row.png"></image>
... ... @@ -151,4 +174,6 @@
</view>
</view>
</view>
\ No newline at end of file
... ...
@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'>
... ... @@ -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="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 wx:if="{{showModal==false}}">
<!-- 设备状态 -->
<view class="shebeizhuang" wx:if="{{state==1}}">
<view class="date">
<view class="dateleft">
<image src="/img/row.png"></image>
</view>
<view class="datetime">
<view class="datetime" bindtap='toShowModal'>
<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>
{{time}}
</view>
<view class="datepic">
... ... @@ -34,13 +58,9 @@
<ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec1 }}"></ec-canvas>
</view>
</view>
<!-- 设备详情 -->
<view class="shebeidetail" wx:if="{{state==2}}">
</view>
<!-- 设备详情 -->
<view class="shebeidetail" wx:if="{{state==2}}">
<view class="beginkaiji">开机时间</view>
<view class="hournum">13604.61</view>
<view class="xian"></view>
... ... @@ -70,10 +90,9 @@
</view>
</view>
</view>
<!-- 设备月报 -->
<view class="yuebao" wx:if="{{state==3}}">
</view>
<!-- 设备月报 -->
<view class="yuebao" wx:if="{{state==3}}">
<view class="date">
<view class="dateleft">
<image src="/img/row.png"></image>
... ... @@ -148,4 +167,5 @@
<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
});
},
//跳转详情页
... ...
... ... @@ -10,7 +10,7 @@
</view>
<!-- 选择时间 -->
<view class="timewrap" wx:if="{{modalNum==0}}">
<view class="timewrap1" wx:if="{{modalNum==0}}">
<view class="timewrap">
... ... @@ -80,23 +80,45 @@
</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 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="search_month">
<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="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="picker">
{{statedate}}
</view>
</picker>
<view wx:if="{{tabNum == 0}}" bindtap="toShowModal">
{{time}}
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view>
... ... @@ -107,9 +129,9 @@
<view class="rowimg">
<image src='/img/row.png'></image>
</view>
</view>
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
</view>
<!-- 出库 -->
<view wx:if="{{tabNum == 0}}">
<view class="cp_title">
原料入库信息
</view>
... ... @@ -126,9 +148,9 @@
<view>{{showdate}}</view>
</view>
</view>
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}">
</view>
<!-- 流水 -->
<view wx:if="{{tabNum == 1}}">
<view class="second_total">重量总计(吨):1000</view>
<!-- 数据 -->
<view class="table">
... ... @@ -143,4 +165,6 @@
<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
... ...