var url = null; var outHandleData = null; var data = { "interfaceId": "5206", "outId": "10206", "reqDateTime": new Date(), "tokenAuth": "", "data": { "deptId": "", "type": "OUT", "plateNum": "", "intelCard": "" } }; //初始化数据 function init() { var user = JSON.parse(localStorage.getItem('user')); var selectDeptId = JSON.parse(localStorage.getItem('selectDeptId')); url = user.url + "/api-phone/v35/gateway"; data.tokenAuth = user.tokenAuth; data.data.deptId = selectDeptId; getOutHandleList(); } //查询出库记录 function getOutHandleList() { outHandleData = null; data.data.plateNum = mui("#plateNum")[0].value; // //请求 // mui.ajax(url, { // type: "POST", // dataType: "json", // crossDomain: true, // contentType: "application/json;charset=utf-8", // data: JSON.stringify(data), // success: function(result) { // if (result.code == "0000") { // outHandleData = result.data; // console.log("if",JSON.stringify(result)) // renderData(); // } else { // renderData(); // mui.toast(result.msg); // console.log("else",JSON.stringify(result)) // } // }, // error: function() { // mui.alert("系统繁忙,请重试!", "提示", ["确定"], function() {}, "div") // } // }) outHandleData = [{ "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" } ] renderData(); } //渲染页面 function renderData() { var html = ''; if (outHandleData) { if (outHandleData && outHandleData.length > 0) { $.each(outHandleData, function(index, item) { html += '
  • '; html += '
    车牌号: ' + (item.plateNum == null ? "" : item.plateNum) + '
    '; html += '值仓'; html += '
    '; html += '
    '; html += '
    ' + (item.depotName == null ? "" : item.depotName) + '
    '; html += '
    目标仓库
    '; html += '
    '; html += '
    ' + (item.foodVarietyName == null ? "" : item.foodVarietyName) + '
    '; html += '
    粮食品种
    '; html += '
    '; html += '
    ' + (item.foodLevelName == null ? "" : item.foodLevelName) + '
    '; html += '
    粮食等级
    '; html += '
  • '; }) } else { html += '
  • 暂无入库待值仓信息
  • '; } } else { html += '
  • 暂无入库待值仓信息
  • '; } $("#handleList").html(html); } //功能模块跳转 mui(".mui-scroll-wrapper").on("tap", ".mui-scroll ul li a", function() { var id = this.getAttribute("id"); var depotName = this.getAttribute("depotName") var plateNum = this.getAttribute("plateNum") var storeKeeperName = this.getAttribute("storeKeeperName") mui.openWindow({ url: "inout-out-handle.html", id: "inout-out-handle", extras: { data:{ serialNumber: id, plateNum: plateNum, depotName: depotName, storeKeeperName:storeKeeperName } } }) }); mui('.mui-scroll-wrapper').scroll({ indicators: false, //是否显示滚动条 deceleration: 0.0006, //阻尼系数,系数越小滑动越灵敏 bounce: false, //是否启用回弹 deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006 });