From 783bac55d344739c3cb34273647d13d77bf29436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=86=9C=E7=9A=84=E6=98=A5=E5=A4=A9?= <416662981@qq.com> Date: Mon, 23 Oct 2017 23:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=BA=93=E5=AD=98=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/pages/materials/material.jsp | 27 +++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/pages/materials/material.jsp b/src/main/webapp/pages/materials/material.jsp index f672498c..81c11315 100644 --- a/src/main/webapp/pages/materials/material.jsp +++ b/src/main/webapp/pages/materials/material.jsp @@ -604,7 +604,32 @@ { title: '型号',field: 'Model',width:80}, { title: '扩展信息',field: 'MaterialOther',width:150}, { title: '单位',field: 'Unit',width:60}, - { title: '安全存量',field: 'SafetyStock',width:90}, + { title: '安全存量',field: 'SafetyStock',width:70}, + { title: '库存',field: 'abc',width:70, formatter:function(value,rec){ + var monthTime = getNowFormatMonth(); + var mId = rec.Id; //商品id + var thisStock = 0; + //查询库存 + $.ajax({ + type: "get", + url: '<%=path %>/depotItem/findStockNumById.action', + data: { + MaterialId: mId, + MonthTime: monthTime + }, + async: false, + dataType: "json", + success: function (res) { + if (res && res.rows && res.rows[0]) { + thisStock = res.rows[0].thisSum; + } + }, + error:function() { + $.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error'); + } + }); + return thisStock; + }}, { title: '零售价',field: 'RetailPrice',width:60}, { title: '最低售价',field: 'LowPrice',width:70}, { title: '预计采购价',field: 'PresetPriceOne',width:70},