From cdeb0bf670cea18be70997f174c28804edc01dc4 Mon Sep 17 00:00:00 2001 From: erzhongxmu Date: Thu, 30 Jul 2020 08:22:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=89=8D=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wm/controller/WmOmNoticeHController.java | 6 +- .../webpage/com/zzjee/wm/wmOmNoticeH-add.jsp | 80 +++++++++++++++++-- .../webpage/com/zzjee/wm/wmOmNoticeH.js | 1 + 3 files changed, 79 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java b/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java index 48226923..91351a6e 100644 --- a/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java +++ b/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java @@ -934,10 +934,10 @@ public class WmOmNoticeHController extends BaseController { } } if(StringUtil.isNotEmpty( wmOmNoticeH.getOcusCode())){ - String datecuso[]= wmOmNoticeH.getOcusCode().split("-"); - MdCusOtherEntity mdcusother = systemService.findUniqueByProperty(MdCusOtherEntity.class, "keHuBianMa", datecuso[0]); +// String datecuso[]= wmOmNoticeH.getOcusCode().split("-"); + MdCusOtherEntity mdcusother = systemService.findUniqueByProperty(MdCusOtherEntity.class, "keHuBianMa",wmOmNoticeH.getOcusCode()); if (mdcusother != null) { - wmOmNoticeH.setOcusCode(datecuso[0]); + wmOmNoticeH.setOcusCode(wmOmNoticeH.getOcusCode()); wmOmNoticeH.setOcusName(mdcusother.getZhongWenQch()); } } diff --git a/src/main/webapp/webpage/com/zzjee/wm/wmOmNoticeH-add.jsp b/src/main/webapp/webpage/com/zzjee/wm/wmOmNoticeH-add.jsp index 8e4b4ced..6dad3d3d 100644 --- a/src/main/webapp/webpage/com/zzjee/wm/wmOmNoticeH-add.jsp +++ b/src/main/webapp/webpage/com/zzjee/wm/wmOmNoticeH-add.jsp @@ -192,13 +192,13 @@
- +<%-- --%> - <%-- - <%--dictTable="mv_cus_other" dictField="cus_code" dictText="cus_name" hasLabel="false" title="三方客户编码">--%> - <%----%> - <%----%> + + +
@@ -408,6 +408,76 @@ beforeSubmit: function(curform) { var tag = true; //提交前处理 + + var msghe = ''; + $("#wmOmNoticeI_table tr").each(function(){ + fieldname = $(this).find("td:eq(2)>input").val(); + fieldnamevalue = $(this).find("td:eq(3)>input").val(); + // fieldnamelo = $(this).find("td:eq(6)>input").val(); + if (fieldname !== null && (typeof fieldname != 'undefined') && fieldname !== '') { + // var url = "wmOmNoticeHController.do?doAddcheck&mat_code="+fieldname+"&mat_qty="+fieldnamevalue; + // $.ajax({ + // async : false, + // cache : false, + // type : 'POST', + // url : url,// 请求的action路径 + // error : function() {// 请求失败处理函数 + // }, + // success : function(data) { + // var d = $.parseJSON(data); + // if (d.success) { + // + // }else{ + // flag = false; + // msghe = msghe +"/" + d.msg; + // } + // } + // }); + var strs= new Array(); //定义一数组 + var goods_code; + try{ + strs= fieldname.split('-');// 合计 + goods_code = strs[0]; + }catch(err){ + goods_code = fieldname; + } + + var url = "wmOmNoticeHController.do?docheck&goodscode="+goods_code+"&goodsqua="+fieldnamevalue; + $.ajax({ + async : false, + cache : false, + type : 'POST', + url : url,// 请求的action路径 + error : function() {// 请求失败处理函数 + }, + success : function(data) { + var d = $.parseJSON(data); + if (d.success) { + + }else{ + tag=false; + msghe = msghe +"/" + d.msg; + } + } + }); + + // tWzCkHeadController.do?doAddcheck; + } + + // fieldnamevalue = $(this).find("td:eq(4)>input").val(); + // if (fieldnamevalue !== null || (typeof(fieldnamevalue != 'undefined') || fieldnamevalue !== '') { + // alert(fieldnamevalue); + // } + + }) + if(!tag){ + alert(msghe); + + + } + + + return tag; }, usePlugin: { diff --git a/src/main/webapp/webpage/com/zzjee/wm/wmOmNoticeH.js b/src/main/webapp/webpage/com/zzjee/wm/wmOmNoticeH.js index 6a2edfac..20c57214 100644 --- a/src/main/webapp/webpage/com/zzjee/wm/wmOmNoticeH.js +++ b/src/main/webapp/webpage/com/zzjee/wm/wmOmNoticeH.js @@ -47,6 +47,7 @@ function doAddcheck(name) { if (d.success) { }else{ + flag=false; msghe = msghe +"/" + d.msg; } }