| | |
| | | $("#depot").val(depotName); |
| | | //获取仓库列表 |
| | | getDepotList(); |
| | | getHistoryList(); |
| | | } |
| | | |
| | | //查询历史数据 |
| | |
| | | date = new Date(date); |
| | | dateTime = getDate(date); |
| | | $("#dateTime").val(dateTime); |
| | | getHistoryList() |
| | | } |
| | | |
| | | //选择日期 |
| | | function chooseDate() { |
| | | var dtpicker = new mui.DtPicker({ |
| | | type: "month", //设置日历初始视图模式 |
| | | value: dateTime |
| | | }) |
| | | var time = dateTime |
| | | dtpicker.show(function(e) { |
| | | dateTime = e.value; |
| | | $("#dateTime").val(dateTime); |
| | | }) |
| | | if(time != dateTime){ |
| | | getHistoryList() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //选择仓库 |
| | | function chooseDepot() { |
| | | var groupPicker = new mui.PopPicker(); |
| | | |
| | | console.log(JSON.stringify(depotData)) |
| | | groupPicker.setData(depotData); |
| | | |
| | | groupPicker.show(function(items) { |
| | |
| | | depotName = items[0].text; |
| | | |
| | | $("#depot").val(depotName); |
| | | mui.toast(depotId + "-" + dateTime); |
| | | // mui.toast(depotId + "-" + dateTime); |
| | | }); |
| | | } |
| | | |
| | |
| | | success: function(result) { |
| | | if (result.code == "0000") { |
| | | depotList = result.data; |
| | | // console.log(JSON.stringify(depotList)) |
| | | renderDepotData(); |
| | | } else { |
| | | mui.toast("没有仓库信息!"); |
| | |
| | | |
| | | //渲染仓库选择数据 |
| | | function renderDepotData() { |
| | | depotData = []; |
| | | var fenl = {}; |
| | | $.each(depotList, function(index, item) { |
| | | depotData.push({ |
| | | value: item.depotId, |
| | | text: item.depotName |
| | | }); |
| | | fenl = { |
| | | value: item.id, |
| | | text: item.name, |
| | | } |
| | | depotData.push(fenl); |
| | | }) |
| | | } |
| | | |
| | | mui('.mui-scroll-wrapper').scroll({ |
| | | indicators: false, //是否显示滚动条 |
| | | indicators: true, //是否显示滚动条 |
| | | deceleration: 0.0006, //阻尼系数,系数越小滑动越灵敏 |
| | | bounce: false, //是否启用回弹 |
| | | deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006 |
| | |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | }); |