YYC
2023-06-07 4f20ad52b8d4ab206e3458e488d3950eb2bfb5a3
igds-app/js/admin/grain-history.js
@@ -50,6 +50,7 @@
   $("#depot").val(depotName);
   //获取仓库列表
   getDepotList();
   getHistoryList();
}
//查询历史数据
@@ -171,23 +172,29 @@
   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) {
@@ -210,6 +217,7 @@
      success: function(result) {
         if (result.code == "0000") {
            depotList = result.data;
            // console.log(JSON.stringify(depotList))
            renderDepotData();
         } else {
            mui.toast("没有仓库信息!");
@@ -223,17 +231,18 @@
//渲染仓库选择数据
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