| | |
| | | |
| | | function DataShow(type,no) { |
| | | this.type=type; |
| | | this.no=no; |
| | | this.colRowDistributionChart = null; |
| | | this.RowDistributionChart = null; |
| | | function DataShow(type, uuid) { |
| | | this.type = type; |
| | | this.uuid = uuid; |
| | | } |
| | | DataShow.prototype.showHint=function(){ |
| | | let htmltext=''; |
| | | return htmltext='<p>仓库编码:'+ 12312 +'</p>'; |
| | | |
| | | let dataAnalyze = new DataAnalyze(this.no); |
| | | if(this.type=='StoreSign'||this.type=='Store') |
| | | { |
| | | let store= dataAnalyze.getStore(this.no); |
| | | htmltext='<p>仓库编码:'+store.No +'</p>'; |
| | | htmltext+='<p>仓库名称:'+store.Name +'</p>'; |
| | | htmltext+='<p>总库存:'+dataAnalyze.getStoreTotalBin(this.no) +'</p>'; |
| | | htmltext+='<p>已占库存:'+dataAnalyze.getStoreOccurpyBin(this.no) +'</p>'; |
| | | htmltext+='<p>今日入库:'+dataAnalyze.getStoreTotalBin(this.no) +'</p>'; |
| | | htmltext+='<p>今日出库:'+dataAnalyze.getStoreOccurpyBin(this.no) +'</p>'; |
| | | htmltext+='<p1>提示:双击可查看详细信息</p1>'; |
| | | } |
| | | else if(this.type=='StoreGroup') |
| | | { |
| | | let group= dataAnalyze.getGroup(this.no); |
| | | htmltext='<p>编码:'+group.No +'</p>'; |
| | | htmltext+='<p>名称:'+group.Name +'</p>'; |
| | | htmltext+='<p>总库存:'+dataAnalyze.getGroupTotalBin(this.no) +'</p>'; |
| | | htmltext+='<p>已占库存:'+dataAnalyze.getGroupOccurpyBin(this.no) +'</p>'; |
| | | htmltext+='<p>今日入库:'+dataAnalyze.getGroupTotalBin(this.no) +'</p>'; |
| | | htmltext+='<p>今日出库:'+dataAnalyze.getGroupOccurpyBin(this.no) +'</p>'; |
| | | htmltext+='<p1>提示:双击可查看详细信息</p1>'; |
| | | DataShow.prototype.showHint = function(){ |
| | | let htmlText=''; |
| | | switch (this.type) { |
| | | case 'locNo': |
| | | htmlText += '<p>库位编号:'+ this.uuid +'</p>'; |
| | | $.ajax({ |
| | | url: top.baseUrl + '/three/query/loc/detl/v1?locNo=' + this.uuid, |
| | | type: "GET", |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | let data = res.data; |
| | | htmlText += '<p>库位状态:'+ data.locSts +'</p>'; |
| | | if (data.locDetls) { |
| | | for (let locDetl of data.locDetls) { |
| | | htmlText += '<p>————————————————</p>'; |
| | | htmlText += '<p>商品编号:'+ locDetl.matnr +'</p>'; |
| | | htmlText += '<p>商品名称:'+ locDetl.maktx +'</p>'; |
| | | if (locDetl.batch) { |
| | | htmlText += '<p>批号:'+ locDetl.batch +'</p>'; |
| | | } |
| | | htmlText += '<p>库存数量:'+ locDetl.anfme + "" + (locDetl.unit?locDetl.unit:"") +'</p>'; |
| | | } |
| | | } |
| | | } else { |
| | | console.error(res.msg); |
| | | } |
| | | } |
| | | }) |
| | | break |
| | | case "wrkNo": |
| | | htmlText+='<p>任务编号:'+ this.uuid +'</p>'; |
| | | $.ajax({ |
| | | url: top.baseUrl + '/three/query/wrk/detl/v1?wrkNo=' + this.uuid, |
| | | type: "GET", |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | let data = res.data; |
| | | htmlText += '<p>任务状态:'+ data.wrkSts +'</p>'; |
| | | if (data.sourceLocNo) { |
| | | htmlText += '<p>源库位:'+ data.sourceLocNo +'</p>'; |
| | | } |
| | | if (data.destLocNo) { |
| | | htmlText += '<p>目标库位:'+ data.destLocNo +'</p>'; |
| | | } |
| | | if (data.wrkDetls) { |
| | | for (let wrkDetl of data.wrkDetls) { |
| | | htmlText += '<p>————————————————</p>'; |
| | | htmlText += '<p>商品编号:'+ wrkDetl.matnr +'</p>'; |
| | | htmlText += '<p>商品名称:'+ wrkDetl.maktx +'</p>'; |
| | | if (wrkDetl.batch) { |
| | | htmlText += '<p>批号:'+ wrkDetl.batch +'</p>'; |
| | | } |
| | | htmlText += '<p>任务数量:'+ wrkDetl.anfme + "" + (wrkDetl.unit?wrkDetl.unit:"") +'</p>'; |
| | | } |
| | | } |
| | | } else { |
| | | console.error(res.msg); |
| | | } |
| | | } |
| | | }) |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | else if(this.type=='StoreGoods') |
| | | { |
| | | let bin= dataAnalyze.getBin(this.no); |
| | | htmltext='<p>编码:'+bin.No +'</p>'; |
| | | htmltext+='<p>名称:'+bin.Name +'</p>'; |
| | | htmltext+='<p>条码号:'+bin.Barcode +'</p>'; |
| | | htmltext+='<p>状态:'+bin.State +'</p>'; |
| | | } |
| | | return htmltext; |
| | | return htmlText; |
| | | } |
| | | |
| | | |