diff --git a/lxapi/com/noblelift/imp/products/mes/api/st/is/IssueBillOtherService.java b/lxapi/com/noblelift/imp/products/mes/api/st/is/IssueBillOtherService.java index 364bb88..e7005b1 100644 --- a/lxapi/com/noblelift/imp/products/mes/api/st/is/IssueBillOtherService.java +++ b/lxapi/com/noblelift/imp/products/mes/api/st/is/IssueBillOtherService.java @@ -335,7 +335,7 @@ public interface IssueBillOtherService { public ServiceResultBean checkIssueIvt(ServiceContext ctx,JSONArray rows); - + public ServiceResultBean excelSave(ServiceContext context, JSONObject accountInfo,String fileid); } diff --git a/lxapp/app/products/mes/st/is/issue_bill_other_forinsert_mater_choice.jsp b/lxapp/app/products/mes/st/is/issue_bill_other_forinsert_mater_choice.jsp index f7ccc61..9830852 100644 --- a/lxapp/app/products/mes/st/is/issue_bill_other_forinsert_mater_choice.jsp +++ b/lxapp/app/products/mes/st/is/issue_bill_other_forinsert_mater_choice.jsp @@ -18,6 +18,7 @@ $('#stor_uuid').val(stor_uuid); loadGrid(); Combo_box_factory(); + excel(); }); //查询类型 //工厂下拉框 @@ -60,9 +61,9 @@ } //查询 - function query() { + function query(result) { //组织参数 - var dataParam = getGridQueryParam(); + var dataParam = getGridQueryParam(result); $.grid_reload({ id : _gridid, queryParams : dataParam @@ -71,7 +72,7 @@ function loadGrid(){ //查询grid数据 //组织参数 - var dataParam = getGridQueryParam(); + var dataParam = getGridQueryParam(null); var gridid = $.grid({ id : _gridid, containerid : 'layout_grid', @@ -93,9 +94,10 @@ } }); } - function getGridQueryParam() { + function getGridQueryParam(result) { //获取form对象值 var FieldValues = $.getFieldValue({formid:'search_form'}); + FieldValues.result = result; //组织参数 var dataParam = { _SRVNAME:'server.store.issueBillOther' @@ -110,7 +112,47 @@ }; return dataParam; } - + function excel(){ + $.exceluploader({ + id:'excel_div' + ,uploadSuccess:function(file,res){ + fileid = res.fileid; + btn_save(fileid); + } + }); + } + function btn_save(fileid) { + $.wait_open(); + $.cuajax({ + url : 'wdk?action=wdk.pub&method=call_service&ajaxparam='+ new Date().getTime(), + method : "post", + timeout : WDK_Timeout, + data : { + _SRVNAME : 'server.store.issueBillOther', + _SRVMETHOD : 'excelSave',// + _DATA : $.json2str({ + accountInfo:$.getSessionUser() //登陆账号的信息 + ,fileid : fileid + }) + }, + success : function(result) { + $.wait_close(); + //返回值字符串转json + var jres = $.str2json(result); + if (jres.code == "1") { //操作成功 + alert(jres.desc); + query(jres.result); + } else { + alert(jres.desc); + } + }, + error : function(result) { + $.wait_close(); + alert('网络错误!result=' + result); + } + }); + + } function save() { var rows = $.grid_getChecked({ @@ -126,7 +168,6 @@ return; } } - debugger; var widc = $.getURLParam("wid"); $.setWinReturn(widc,rows); $.closeWin(widc); @@ -136,40 +177,42 @@
-