YYC
2023-06-19 0b27b9263ce721844d124ec4541a83b0f6db6c13
igds-app/js/admin/inout-in-handle-list.js
@@ -32,15 +32,18 @@
   data.tokenAuth = user.tokenAuth;
   data1.tokenAuth = user.tokenAuth;
   data.data.deptId = selectDeptId;
   //获取入库待值仓列表
   getInHandleList();
}
window.addEventListener('refresh2', function(e){//执行刷新
    getInHandleList();
});
//查询入库记录
function getInHandleList() {
   inHandleData = null;
   //查询的车牌号
   data.data.plateNum = mui("#plateNum")[0].value;
@@ -55,7 +58,6 @@
         if (result.code == "0000") {
            inHandleData = result.data;
            renderData();
            mui.toast(result.msg);
         } else {
            renderData();
            mui.toast(result.msg);
@@ -65,56 +67,6 @@
         mui.alert("系统繁忙,请重试!", "提示", ["确定"], function() {}, "div")
      }
   })
   // inHandleData = [{
   //       "id": "44",
   //       "plateNum": "97",
   //       "deHandle": "ut",
   //       "depotId": "16",
   //       "depotName": "青张列做总",
   //       "foodVariety": "magna pariatur laboris sunt dolor",
   //       "foodVarietyName": "提清除",
   //       "foodLevel": "fugiat",
   //       "foodLevelName": "应发热四民是始",
   //       "storeKeeperName": ""
   //    },
   //    {
   //       "id": "62",
   //       "plateNum": "71",
   //       "deHandle": "dolore ut non",
   //       "depotId": "79",
   //       "depotName": "增象定立样",
   //       "foodVariety": "Lorem est",
   //       "foodVarietyName": "市条群求被团两",
   //       "foodLevel": "ex labore",
   //       "foodLevelName": "持在写称情并",
   //       "storeKeeperName": "2"
   //    },
   //    {
   //       "id": "96",
   //       "plateNum": "61",
   //       "deHandle": "nulla magna ut proident cillum",
   //       "depotId": "42",
   //       "depotName": "条全他",
   //       "foodVariety": "aliquip",
   //       "foodVarietyName": "连开阶动际干",
   //       "foodLevel": "in id sunt",
   //       "foodLevelName": "没置定使文",
   //       "storeKeeperName": "3"
   //    },
   //    {
   //       "id": "61",
   //       "plateNum": "17",
   //       "deHandle": "commodo",
   //       "depotId": "80",
   //       "depotName": "展观快火全领",
   //       "foodVariety": "voluptate eu Lorem",
   //       "foodVarietyName": "他边派斯重离",
   //       "foodLevel": "dolor",
   //       "foodLevelName": "装第上",
   //       "storeKeeperName": "4"
   //    }
   // ]
}
//渲染页面
@@ -123,23 +75,28 @@
   if (inHandleData && inHandleData.length > 0) {
      $.each(inHandleData, function(index, item) {
         html += '<li><div class="con"><div class="top">';
         html += '<div class="info">车牌号: <b>' + (item.plateNum == null ? "" : item.plateNum) +'</b></div>';
         html += '<a href="" id = "' + item.id + '" plateNum = "' + item.plateNum + '" depotName = "' + item.depotName + '" storeKeeperName = "' + (item.storeKeeperName == "" || item
               .storeKeeperName == "" ? '--' : item.storeKeeperName) + '" class="link">值仓<span class="mui-icon mui-icon-arrowright"></span></a>';
         html += '<div class="info">车牌号: <b>' + (item.plateNum == null ? "" : item.plateNum) + '</b></div>';
         html += '<a href="" id = "' + item.id + '" plateNum = "' + item.plateNum + '" depotName = "' + (item.depotName == null ? "" : item.depotName) +
               '" storeKeeperName = "' + (item.storeKeeperName == null ? '' : item.storeKeeperName) +
            '" class="link">值仓<span class="mui-icon mui-icon-arrowright"></span></a>';
         html += '</div><div class="box">';
         html += '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i19.png);">';
         html +=
            '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i19.png);">';
         html += '<div class="h3">' + (item.depotName == null ? "" : item.depotName) + '</div>';
         html += '<div class="bot">目标仓库</div></div></div>';
         html += '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i20.png);">';
         html +=
            '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i20.png);">';
         html += '<div class="h3">' + (item.foodVarietyName == null ? "" : item.foodVarietyName) + '</div>';
         html += '<div class="bot">粮食品种</div></div></div>';
         html += '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i21.png);">';
         html +=
            '<div class="item"><div class="conbox" style="background-image: url(images/icons/g-i21.png);">';
         html += '<div class="h3">' + (item.foodLevelName == null ? "" : item.foodLevelName) + '</div>';
         html += '<div class="bot">粮食等级</div></div></div>';
         html += '</div></div></li>';
      })
   } else {
      html += '<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 18px;">暂无入库待值仓信息</div></div></li>';
      html +=
         '<li><div class="con"><div style="text-align: center;font-size: 20px;color:#dd524d;padding-top: 18px;">暂无入库待值仓信息</div></div></li>';
   }
   $("#handleList").html(html);
}
@@ -150,12 +107,12 @@
   var depotName = this.getAttribute("depotName")
   var plateNum = this.getAttribute("plateNum")
   var storeKeeperName = this.getAttribute("storeKeeperName")
console.log(JSON.stringify(storeKeeperName))
   var picker = new mui.PopPicker();
   picker.setData([{
      value: "photo",
      text: "现场值仓"
   }, {
      value: "snap",
      text: "远程值仓"
@@ -164,7 +121,7 @@
   picker.show(function(SelectedItem) {
      console.log(JSON.stringify(SelectedItem));
      //现场值仓
      if(SelectedItem[0].value == 'photo'){
      if (SelectedItem[0].value == 'photo') {
         mui.openWindow({
            url: "inout-in-handle.html",
            id: "inout-in-handle",
@@ -177,7 +134,7 @@
               }
            }
         })
      }else{ //远程值仓
      } else { //远程值仓
         mui.openWindow({
            url: "inout-in-handle.html",
            id: "inout-in-handle",
@@ -328,7 +285,8 @@
         if (result.code == "0000") {
            //弹窗信息:单子车牌跟仓库,去值仓则进入值仓页面,传递单子id;
            var btnArray = ["去值仓", "取消"];
            var text = '值仓仓库:' + result.data.depotName + '<br/>车牌号:' + result.data.plateNum + '<br/>保管员:' + result.data.plateNum
            var text = '值仓仓库:' + result.data.depotName + '<br/>车牌号:' + result.data.plateNum +
               '<br/>保管员:' + result.data.plateNum
            mui.confirm(text, "检测到待值仓信息如下", btnArray, function(e) {
               if (e.index == 0) {
                  //先判断单子是否在值仓状态