From c3a0c89ec1271c72647d065c9d2ddcb36e2df707 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 22:27:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0jdbc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/common/jdbc.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/common/jdbc.properties b/src/main/resources/common/jdbc.properties index 19baf067..662148d1 100644 --- a/src/main/resources/common/jdbc.properties +++ b/src/main/resources/common/jdbc.properties @@ -1,4 +1,4 @@ -jdbcUrl= jdbc\:mysql\://localhost\:3306/jsh_erp?useUnicode\=true&characterEncoding\=UTF-8 +jdbcUrl= jdbc\:mysql\://localhost\:3306/jsh_erp_guoku1009?useUnicode\=true&characterEncoding\=UTF-8 driverClass= com.mysql.jdbc.Driver user= root password=1234 \ No newline at end of file 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 2/3] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A2=9E=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}, From 2cfdd6c2f00f1ed29e853d771b0cec6d1709f016 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:30:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0JDBC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/common/jdbc.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/common/jdbc.properties b/src/main/resources/common/jdbc.properties index 662148d1..19baf067 100644 --- a/src/main/resources/common/jdbc.properties +++ b/src/main/resources/common/jdbc.properties @@ -1,4 +1,4 @@ -jdbcUrl= jdbc\:mysql\://localhost\:3306/jsh_erp_guoku1009?useUnicode\=true&characterEncoding\=UTF-8 +jdbcUrl= jdbc\:mysql\://localhost\:3306/jsh_erp?useUnicode\=true&characterEncoding\=UTF-8 driverClass= com.mysql.jdbc.Driver user= root password=1234 \ No newline at end of file