YYC
2023-05-29 397dbf892f842c834af17a91c788c94fd96003f8
igds-app/js/admin/inout-in-record.js
@@ -35,7 +35,7 @@
   
   //赋值参数的日期
   data.data.dateTime = dateTime;
   console.log(JSON.stringify(data), "inout-in-record")
   //请求
   mui.ajax(url, {
      type: "POST",
@@ -48,14 +48,41 @@
            inRecordData = result.data;
            renderData();
         } else {
            renderData();
            mui.toast(result.mag);
            mui.toast(result.msg);
            console.log(JSON.stringify(result))
         }
      },
      error: function() {
         mui.alert("系统繁忙,请重试!", "提示", ["确定"], function() {}, "div")
      }
   })
   inRecordData = {
      "sum": "55",
      "listInout": [{
            "id": "98",
            "plateNum": "39",
            "depotId": "83",
            "depotName": "能始际法高等",
            "foodVariety": "quis Ut",
            "foodVarietyName": "被龙济来",
            "recordWeight": "25",
            "completeTime": "1971-10-20 14:45:38"
         },
         {
            "id": "37",
            "plateNum": "50",
            "depotId": "16",
            "depotName": "准民青共工",
            "foodVariety": "aliquip eiusmod laborum nulla",
            "foodVarietyName": "号走根形",
            "recordWeight": "30",
            "completeTime": "1971-04-09 06:42:06"
         }
      ],
   }
}
//渲染页面
@@ -65,8 +92,8 @@
   var sumHtml = '0';
   if(inRecordData){
      sumHtml = inRecordData.sum;
      var inRecordList = inRecordData.listInout;
      console.log(JSON.stringify(inRecordList))
      if (inRecordList && inRecordList.length > 0) {
         $.each(inRecordList, function(index, item) {
            html += '<div class="item">';
@@ -77,9 +104,11 @@
            html += '<li><div class="con" style="background-image: url(images/icons/g-i25.png);">';
            html += '仓库名称:<b>' + (item.depotName == null ? "" : item.depotName) + '</b></div></li>';
            html += '<li><div class="con" style="background-image: url(images/icons/g-i32.png);">';
            html += '粮食品种:<b>' + (item.foodVarietyName == null ? "" : item.foodVarietyName) + '</b></div></li>';
            html += '粮食品种:<b>' + (item.foodVarietyName == null ? "" : item.foodVarietyName) +
               '</b></div></li>';
            html += '<li><div class="con" style="background-image: url(images/icons/g-i24.png);">';
            html += '结算重量:<span><em>' + (item.recordWeight == null ? "0" : item.recordWeight) + '</em>KG</span></div></li>';
            html += '结算重量:<span><em>' + (item.recordWeight == null ? "0" : item.recordWeight) +
               '</em>KG</span></div></li>';
            html += '</ul><div class="time">完成时间:' + getStrDate(item.completeTime) + '</div></div>';
         })
      } else {
@@ -107,7 +136,8 @@
//选择日期
function chooseDate() {
   var dtpicker = new mui.DtPicker({
      type: "date" //设置日历初始视图模式
      type: "date" ,//设置日历初始视图模式
      value: dateTime
   })
   dtpicker.show(function(e) {
      dateTime = e.value;
@@ -163,4 +193,3 @@
   bounce: false, //是否启用回弹
   deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
});