Index: ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/jsp-temple.jsp =================================================================== diff -u -r24187 -r24526 --- ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/jsp-temple.jsp (.../jsp-temple.jsp) (revision 24187) +++ ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/jsp-temple.jsp (.../jsp-temple.jsp) (revision 24526) @@ -17,6 +17,8 @@ + + <%-- bootstrap-datetimepicker --%> @@ -70,17 +72,23 @@ - + + <%-- bootstrap-datetimepicker --%> - + + + + - - - + + + + + Fisheye: Tag 24526 refers to a dead (removed) revision in file `ssts-web/src/main/webapp/dx-disinfectsystem/js/recyclingApplication/recyclingApplication.js'. Fisheye: No comparison available. Pass `N' to diff? Index: ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/recyclingApplication/goodsApplicationView.jsp =================================================================== diff -u -r24437 -r24526 --- ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/recyclingApplication/goodsApplicationView.jsp (.../goodsApplicationView.jsp) (revision 24437) +++ ssts-web/src/main/webapp/dx-disinfectsystem/pages/disinfectsystem/recyclingApplication/goodsApplicationView.jsp (.../goodsApplicationView.jsp) (revision 24526) @@ -157,7 +157,7 @@
- +
@@ -192,10 +192,14 @@
@@ -816,6 +820,9 @@ <%-- bootstrap-datetimepicker --%> + + + Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r24444 -r24526 --- ssts-web/src/main/webapp/dx-disinfectsystem/js/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 24444) +++ ssts-web/src/main/webapp/dx-disinfectsystem/js/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 24526) @@ -9,23 +9,145 @@ var documentHeight=$(document).height(); var tableHeight=documentHeight-pagiHeight-tableTopL; - var table="
" + var table="
" $('#main').append(table); -/**【借物--按钮】*/ - $("#app_borrowTousse").click(function(){ - $("#borrowTousse_title").text("借物单"); - $("#borrowTousse_modal").modal('show'); - }); - -/**【搜索表单--更多查询】*/ - $("#search_more_btn").click(function(){ - $("#search_more_modal_title").text("更多查询"); - $("#search_more_modal").modal('show'); - }); + //主页面table字段 + var allApplication_columns=[{ + checkbox : true + },{ + field : 'id', + align : 'center', + visible:false + }, + { + field : 'orgUnitCode', + align : 'center', + visible:false + }, +// { +// checkbox:true, +// align:'center', +// valign:"middle", +// width : '3', +// rowspan:3 +// }, + { + title : '流水号', + field : 'serialNumber', + align : 'center', + sortable:true + }, + { + title : '申请科室', + field : 'depart', + align : 'center', + sortable:true + }, + { + title : '申请人', + field : 'applicant', + align : 'center', + sortable:true + }, + { + title : '申请时间', + field : 'applicationTimeStr', + align : 'center', + sortable:true + }, + { + title : '最后修改时间', + field : 'submitTimeStr', + align : 'center', + sortable:true + }, + { + title : '打印时间', + field : 'printTimeStr', + align : 'center', + sortable:true + }, + { + title : '类型', + field : 'type', + align : 'center', + sortable:true + }, + { + title : '已提交', + field : 'committedStatus', + align : 'center', + sortable:true, + formatter:function(value){ + if(value == true){ + return "是"; + }else{ + return "否"; + } + } + }, + { + title : '已打印', + field : 'printed', + align : 'center', + sortable:true, + formatter:function(value){ + if(value == 0){ + return "部分打印"; + }else if(value == 1){ + return "未打印"; + }else if(value == 2){ + return "已打印"; + } + } + }, + { + title : '回收状态', + field : 'recyclingStatus', + align : 'center', + sortable:true + }, + { + title : '发货状态', + field : 'deliverStatus', + align : 'center', + sortable:true + }, + { + title : '归还状态', + field : 'returnStatus', + align : 'center', + sortable:true + }, + { + title : '终止状态', + field : 'endStatus', + align : 'center' + }, + { + title : '备注', + field : 'remark', + align : 'center' + }, + { + title : '操作', + field : 'opera', + align : 'center' + } + ]; - //申请器械包、申请一次性物品、申请消毒物品中table字段 - var appTemplate_columnns=[{ + +/**【表单--申请器械包/一次性物品/消毒物品 begin】*/ + /*申请物品数据 + * 当点击“添加”按钮时,所选择的物品信息会存到appToussesArr中 + */ + var appToussesArr=[]; + //当前操作申请单,比如点击“申请器械包”按钮时此变量值为“器械包申请单” + var currentApplication; + + //表单table字段 + var appTemplate_columns=[{ field : 'id', align : 'center', visible:false @@ -72,6 +194,298 @@ } ]; + /*【下拉框-begin】*/ + + //“申请科室”下拉框 + renderSelect_appDpt('departApp_tousse',1); + //“结算科室”下拉框 + renderSelect_settleDpt('settleDep_tousse',1); + + /*【下拉框-end】*/ + + //"申请器械包"、“申请一次性物品”、“申请消毒物品”表单加载所需要的数据信息 + var toussesJson={ + //是否为IE + isIE:isIE, + //模态框HTML元素ID属性 + modalElementId:"tousseModal", + //当前登陆用户名 + applicant:currentUserFullName, + //当前登陆用户编码 + applicantCode:currentUserCode, + //模态框标题元素ID属性 + modalTileElementId:"application_title", + //模态框“选择物品”下拉框元素ID属性 + tousseSelectElementId:"tousseName_tousse_select", + //“选择物品”下拉框最多可选元素数量 + tousseSelectNum:1, + //申请单类型 + tousseType:Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM, + //申请单表格元素ID + formTableElementId:"tousse_table", + //申请单表格对应的字段 + columns:appTemplate_columns, + //申请单表格需要加载的数据 + appToussesArr:appToussesArr, + //“申请科室”输入框HTML元素ID + departElementId:'departApp_tousse', + //“结算科室”输入框HTML元素ID + settleDepartElementId:'settleDep_tousse', + //“处理科室”输入框HTML元素ID + handlerDepartElementId:'handleDep_tousse', + //表格是否支持子表格 + isExpandRow:false + }; + + //"申请器械包"、“申请一次性物品”、“申请消毒物品”表单提交所需要的数据信息 + var submitJson={ + //“ID”对应的HTML元素ID属性 + idElId:"id", + //“申请人”输入框ID属性 + applicantElId:"applicant", + //当前登陆用户名 + applicant:currentUserFullName, + //当前登陆用户编码 + applicantCode:currentUserCode, + //当前登陆 + //“申请人编号”HTML元素ID + applicantCodeElId:"applicantCode", + //“申请科室”元素ID + departAppElId:"departApp_tousse", + //“结算科室”元素ID + settleDepElId:"settleDep_tousse", + //“处理科室”元素ID + handleDepEl:"handleDep_tousse", + //"申请时间"元素ID + timeElId:"time", + //“备注”元素ID + remarkElId:"remarks", + //当前申请单类型 + currentApplication:currentApplication, + //申请物品数组 + appToussesArr:appToussesArr, + //主页面表格字段 + allApplicationColumns:allApplication_columns, + //是否提交,true为提交,false为暂存 + isCommit:true, + //是否需要立即刷新主页面表格内容 + isRefresh:true + }; + + /*【申请器械包--按钮】*/ + $("#app_tousses").click(function(){ + $("#tousseAppPrintPreview,#tousseAppPrint,#tousseAppReturnEdit,#tousseAppEndTousse").each(function(){ + toggleShow(this,1); + }); + currentApplication=Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM; + toussesJson.tousseType = Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM; + toussesJson.isExpandRow = false; + //清空申请物品数组 + appToussesArr=[]; + showAppForm(toussesJson); + + //“处理科室”下拉框 + renderSelect_handlerDpt('handleDep_tousse',1,"器械包",$('#departApp_tousse').val()); + }); + + /*【申请一次性物品--按钮】*/ + $("#app_disposable").click(function(){ + $("#tousseAppPrintPreview,#tousseAppPrint,#tousseAppReturnEdit,#tousseAppEndTousse").each(function(){ + toggleShow(this,1); + }); + currentApplication=Constants.AppType.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM; + toussesJson.tousseType = Constants.AppType.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM; + toussesJson.isExpandRow = false; + //清空申请物品数组 + appToussesArr=[]; + showAppForm(toussesJson); + }); + + /*【申请消毒物品--按钮】*/ + $("#app_disinfection").click(function(){ + $("#tousseAppPrintPreview,#tousseAppPrint,#tousseAppReturnEdit,#tousseAppEndTousse").each(function(){ + toggleShow(this,1); + }); + currentApplication=Constants.AppType.TYPE_DISINFECT_GOODS_APPLICATION_FORM; + toussesJson.tousseType = Constants.AppType.TYPE_DISINFECT_GOODS_APPLICATION_FORM; + toussesJson.isExpandRow = true; + //清空申请物品数组 + appToussesArr=[]; + showAppForm(toussesJson); + }); + + + + /*【申请器械包/一次性物品/消毒物品--表格--“添加物品”按钮】*/ + $("#tousseAdd").click(function(){ + /*1.不能为空 + * 2.物品列表(物品模板)不存在则在后面追加 + * 3.如果申请模板中存在,那么直接更新申请数量即可 + */ + var tousseName_tousse_select=$("#tousseName_tousse_select"); + var tousseName_tousse_number=$("#tousseName_tousse_number"); + var name=tousseName_tousse_select.text(); + //此处ID + var id=tousseName_tousse_select.val()[0]; + + var num=tousseName_tousse_number.val(); + if(!Tools.StringUtils.isEmpty(name)&&!Tools.StringUtils.isEmpty(num)){ + //1.追加到表格的内容;2.添加后信息会存储在appToussesArr中,申请单保存时可直接获取到需要提交的物品信息 + var appendContent; + //判断当前操作的申请单为以下哪种:“器械包申请单”、“一次性物品申请单”、“消毒物品申请单” + if(currentApplication == Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM){//“器械包申请单” + appendContent={ + "id":null, + "tousseName":name, + "amount":num, + "originalPrice":null, + "price":null, + "rowPrice":null, + "urgentAmount":null, + "isApplyEntireTousse":null, + "expressInvoice":"否", + "diposable":"否", + "tousseType":"器械包", + "unit":null, + "unitCount":null, + "minUnit":null, + "transferScale":null, + "disinfectMaterilas":"", + "tousseDefinitionID":id + }; + }else if(currentApplication == Constants.AppType.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM){//“一次性物品申请单” + appendContent={ + "id":null, + "tousseName":name, + "amount":num, + "originalPrice":null, + "price":null, + "rowPrice":null, + "urgentAmount":null, + "isApplyEntireTousse":null, + "expressInvoice":"否", + "diposable":"是", + "tousseType":Constants.DisposableGoodType.TYPE_NAME, + "unit":null, + "unitCount":null, + "minUnit":null, + "transferScale":null, + "disinfectMaterilas":"", + "disposableGoodsId":id + }; + }else if(currentApplication == Constants.AppType.TYPE_DISINFECT_GOODS_APPLICATION_FORM){//“消毒物品申请单” + var disinfectMaterilas={}; + for(var i = 0;i < disinfectionComboGoodsStore.length;i++){ + var item1=disinfectionComboGoodsStore[i]; + if(id == item1.id){ + disinfectMaterilas=item1.materials; + break; + } + } + + appendContent={ + "id":null, + "tousseName":name, + "amount":num, + "originalPrice":null, + "price":null, + "rowPrice":null, + "urgentAmount":null, + "isApplyEntireTousse":"是", + "expressInvoice":"否", + "diposable":"否", + "tousseType":Constants.TousseType.PACKAGE_TYPE_DISINFECTION, + "unit":null, + "unitCount":null, + "minUnit":null, + "transferScale":null, + "disinfectMaterilas":JSON.stringify(transformDisinfectionMaterial(disinfectMaterilas)), + "tousseDefinitionID":id + }; + } + + $("#tousse_table").bootstrapTable('append',appendContent); + tousseName_tousse_select.text(''); + tousseName_tousse_number.val(''); + appToussesArr.push(appendContent); + } + }); + + /*【申请器械包/一次性物品/消毒物品--“提交”按钮】*/ + $("#tousseSubmit").click(function(){ + submitJson.currentApplication = currentApplication; + submitJson.isCommit = true; + submitJson.appToussesArr = appToussesArr; + confirmSumbitJson(submitJson); + }); + + /*【申请器械包/一次性物品/消毒物品--“提交并新建”按钮】*/ + $("#tousseSubmitAndNewForm").click(function(){ + submitJson.currentApplication = currentApplication; + submitJson.isCommit = true; + submitJson.appToussesArr = appToussesArr; +// submitJson.isRefresh = false; + //提交申请单 + confirmSumbitJson(submitJson); + //新建申请单 + if(currentApplication == Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM){//“器械包申请单” + currentApplication=Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM; + toussesJson.tousseType = Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM; + toussesJson.isExpandRow = false; + //清空申请物品数组 + appToussesArr=[]; + showAppForm(toussesJson); + }else if(currentApplication == Constants.AppType.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM){//“一次性物品申请单” + currentApplication=Constants.AppType.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM; + toussesJson.tousseType = Constants.AppType.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM; + toussesJson.isExpandRow = false; + //清空申请物品数组 + appToussesArr=[]; + showAppForm(toussesJson); + }else if(currentApplication == Constants.AppType.TYPE_DISINFECT_GOODS_APPLICATION_FORM){//“消毒物品申请单” + currentApplication=Constants.AppType.TYPE_DISINFECT_GOODS_APPLICATION_FORM; + toussesJson.tousseType = Constants.AppType.TYPE_DISINFECT_GOODS_APPLICATION_FORM; + toussesJson.isExpandRow = true; + //清空申请物品数组 + appToussesArr=[]; + showAppForm(toussesJson); + } + + }); + + /*【申请器械包/一次性物品/消毒物品--“暂存”按钮】*/ + $("#tousseTemStorage").click(function(){ + submitJson.currentApplication = currentApplication; + submitJson.isCommit = false; + submitJson.appToussesArr = appToussesArr; + confirmSumbitJson(submitJson); + }); + + /*【申请器械包/一次性物品/消毒物品--“取消”按钮】*/ + $("#tousseCancel").click(function(){ + $("#tousseModal").modal('hide'); + }); + +/**【表单--申请器械包/一次性物品/消毒物品 end】*/ + + + + + +/**【借物--按钮】*/ + $("#app_borrowTousse").click(function(){ + $("#borrowTousse_title").text("借物单"); + $("#borrowTousse_modal").modal('show'); + }); + +/**【搜索表单--更多查询】*/ + $("#search_more_btn").click(function(){ + $("#search_more_modal_title").text("更多查询"); + $("#search_more_modal").modal('show'); + }); + + + //申请外来器械中table字段 var foreignTousse_columns=[{ field : 'id', @@ -256,132 +670,7 @@ } ]; - //主页面table字段 - var allApplication_columns=[{ - checkbox : true - },{ - field : 'id', - align : 'center', - visible:false - }, - { - field : 'orgUnitCode', - align : 'center', - visible:false - }, -// { -// checkbox:true, -// align:'center', -// valign:"middle", -// width : '3', -// rowspan:3 -// }, - { - title : '流水号', - field : 'serialNumber', - align : 'center', - sortable:true - }, - { - title : '申请科室', - field : 'depart', - align : 'center', - sortable:true - }, - { - title : '申请人', - field : 'applicant', - align : 'center', - sortable:true - }, - { - title : '申请时间', - field : 'applicationTimeStr', - align : 'center', - sortable:true - }, - { - title : '最后修改时间', - field : 'submitTimeStr', - align : 'center', - sortable:true - }, - { - title : '打印时间', - field : 'printTimeStr', - align : 'center', - sortable:true - }, - { - title : '类型', - field : 'type', - align : 'center', - sortable:true - }, - { - title : '已提交', - field : 'committedStatus', - align : 'center', - sortable:true, - formatter:function(value){ - if(value == true){ - return "是"; - }else{ - return "否"; - } - } - }, - { - title : '已打印', - field : 'printed', - align : 'center', - sortable:true, - formatter:function(value){ - if(value == 0){ - return "部分打印"; - }else if(value == 1){ - return "未打印"; - }else if(value == 2){ - return "已打印"; - } - } - }, - { - title : '回收状态', - field : 'recyclingStatus', - align : 'center', - sortable:true - }, - { - title : '发货状态', - field : 'deliverStatus', - align : 'center', - sortable:true - }, - { - title : '归还状态', - field : 'returnStatus', - align : 'center', - sortable:true - }, - { - title : '终止状态', - field : 'endStatus', - align : 'center' - }, - { - title : '备注', - field : 'remark', - align : 'center' - }, - { - title : '操作', - field : 'opera', - align : 'center' - } - ]; - /*【申请外来器械--下拉框】*/ //申请科室 @@ -530,190 +819,11 @@ alert("yes"); } }); - -/*【表单--申请器械包/一次性物品/消毒物品】*/ - - /*【申请器械包/一次性物品/消毒物品--下拉框】*/ - //申请科室 - renderSelect_appDpt('departApp_tousse',1); - //结算科室 - renderSelect_settleDpt('settleDep_tousse',1); - //处理科室 - renderSelect_handlerDpt('handleDep_tousse',1,"器械包",$('#departApp_tousse').val()); - - var appToussesArr=[]; - - /*【申请器械包--按钮】*/ - $("#app_tousses").click(function(){ - clearForm(isIE,"tousseModal",["tousse_table"]); - appToussesArr=[]; - $("#application_title").text("申请器械包"); - $("#tousseModal").modal('show'); - - //物品列表 - renderSelect_comboGoods("tousseName_tousse_select",1,"器械包申请单",'','',''); - - loadTable("tousse_table","",appTemplate_columnns,false,false,"",false,appToussesArr); - $(".table_div").find(".fixed-table-toolbar").remove(); - $(".form-table").find(".th-inner").css({"padding-top":"0","padding-bottom":"0","margin-bottom":"8"}); - }); - - /*【申请一次性物品--按钮】*/ - $("#app_disposable").click(function(){ - clearForm(isIE,"tousseModal",["tousse_table"],appToussesArr); - $("#application_title").text("申请一次性物品"); - $("#tousseModal").modal('show'); - renderSelect_comboGoods("tousseName_tousse_select",1,"一次性物品申请单",$('#departApp_tousse').val(),$('#settleDep_tousse').val(),$('#handleDep_tousse').val()); - loadTable("tousse_table","",appTemplate_columnns,false,false,"",false,appToussesArr); - $(".table_div").find(".fixed-table-toolbar").remove(); - $(".form-table").find(".th-inner").css({"padding-top":"0","padding-bottom":"0","margin-bottom":"8"}); - }); - - - /*【申请消毒物品--按钮】*/ - $("#app_disinfection").click(function(){ - clearForm(isIE,"tousseModal",["tousse_table"],appToussesArr); - $("#tousseModal").modal('show'); - $("#application_title").text("申请消毒物品"); - //物品列表 - renderSelect_comboGoods("tousseName_tousse_select",1,"消毒物品申请单",$('#departApp_tousse').val(),$('#settleDep_tousse').val(),$('#handleDep_tousse').val()); - loadTable("tousse_table","",appTemplate_columnns,false,false,"",true); - $(".table_div").find(".fixed-table-toolbar").remove(); - $(".form-table").find(".th-inner").css({"padding-top":"0","padding-bottom":"0","margin-bottom":"8"}); - }); - - - - /*【申请器械包/一次性物品/消毒物品--表格--“添加物品”按钮】*/ - $("#tousseAdd").click(function(){ - /*1.不能为空 - * 2.物品列表(物品模板)不存在则在后面追加 - * 3.如果申请模板中存在,那么直接更新申请数量即可 - */ - var tousseName_tousse_select=$("#tousseName_tousse_select"); - var tousseName_tousse_number=$("#tousseName_tousse_number"); - var name=tousseName_tousse_select.text(); - //此处ID - var id=tousseName_tousse_select.val()[0]; - - var num=tousseName_tousse_number.val(); - if(!Tools.StringUtils.isEmpty(name)&&!Tools.StringUtils.isEmpty(num)){ - var appendContent={ - "id":null, - "tousseName":name, - "amount":num, - "originalPrice":null, - "price":null, - "rowPrice":null, - "urgentAmount":null, - "isApplyEntireTousse":null, - "expressInvoice":"否", - "diposable":"否", - "tousseType":"器械包", - "unit":null, - "unitCount":null, - "minUnit":null, - "transferScale":null, - "disinfectMaterilas":"", - "tousseDefinitionID":id - }; - - $("#tousse_table").bootstrapTable('append',appendContent); - tousseName_tousse_select.text(''); - tousseName_tousse_number.val(''); - - appToussesArr.push(appendContent); - } - }); - - /*【申请器械包/一次性物品/消毒物品--“提交”按钮】*/ - $("#tousseSubmit").click(function(){ - //ID - var idEl=$('#id'); - var id=idEl.val(); - //申请人 - var appEl=$('#applicant'); - var applicant=appEl.val(); - var applicantCode=$('#applicantCode').val(); - - //申请科室 - var departAppEl=$('#departApp_tousse') - var departCoding=departAppEl.val()[0]; - var depart=departAppEl.find("option:selected").text(); - //结算科室 - var settleDepEl=$('#settleDep_tousse') - var settleAccountsDepartCoding=settleDepEl.val()[0]; - var settleAccountsDepart=settleDepEl.find("option:selected").text(); - - //处理科室 - var handleDepEl=$('#handleDep_tousse') - var handleDepartCoding=handleDepEl.val()[0]; - var handleDepart=handleDepEl.find("option:selected").text(); - - //时间 - var applicationTimeStr=$("#time").text(); - - //备注 - var remarksEl=$('#remarks'); - var remark=remarksEl.text(); - - //申请单类型 - var type=Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM; - - var commitData = new tousseApplicationData(true,id,applicant,applicantCode,appToussesArr,departCoding,depart,settleAccountsDepartCoding,settleAccountsDepart,handleDepartCoding,handleDepart,type,applicationTimeStr,remark); - - $.ajax({ - url:WWWROOT +'/disinfectSystem/recyclingApplicationAction!saveRecyclingApplication.do', - type:'post', -// contentType:"application/json;charset=utf-8", - dataType:'json', - data:commitData, - success:function(msg){ - if(msg.success == true){ - $("#allApplication_table").bootstrapTable('destroy'); - loadAppListTable("allApplication_table","toolbar_table",allApplication_columns); - $("#tousseModal").modal('hide'); - }else{ - alert(msg.message); - } - }, - error:function(msg){ - alert(msg); - }, - complete:function(){ - - } - }); - - - - }); - - /*【申请器械包/一次性物品/消毒物品--“提交并新建”按钮】*/ - $("#tousseSubmitAndNewForm").click(function(){ - $("#tousseModal").modal('hide'); - }); - - /*【申请器械包/一次性物品/消毒物品--“暂存”按钮】*/ - $("#tousseTemStorage").click(function(){ - $("#tousseModal").modal('hide'); - clearForm("tousseModal",["tousse_table"],appToussesArr); - }); - - /*【申请器械包/一次性物品/消毒物品--“取消”按钮】*/ - $("#tousseCancel").click(function(){ - $("#tousseModal").modal('hide'); - clearForm("tousseModal",["tousse_table"],appToussesArr); - }); - - - - /*【表单--申请外来器械】*/ var foreignTousseItems=[]; $("#app_foreignTousse").click(function(){ @@ -800,10 +910,8 @@ if(!Tools.StringUtils.isEmpty(materialName)&&!Tools.StringUtils.isEmpty(materialNum)){ var appendMaterialContent={materialName:materialName,num:materialNum}; $("#customizeTousse_table").bootstrapTable('append',appendMaterialContent); - customizeTousse_material_name.text(''); customizeTousse_material_num.val(''); - customizeTousseItems.push(appendMaterialContent); } }); @@ -895,7 +1003,6 @@ }else{ alert("不能重复添加!"); } - } } }); @@ -924,10 +1031,8 @@ clearForm("foreignProxyDisinfection_modal",["foreignProxyDisinfection_table"],foreignTousseItems); }); - //借物单 loadTable("borrowTousse_table","",foreignProxyDisinfection_columns,false,false,'',true); - //科室申领页面所有申请单展示 loadAppListTable("allApplication_table","toolbar_table",allApplication_columns); /*【表单--table原插件表头样式调整】*/ @@ -939,6 +1044,10 @@ */ $("#allApplication_table").on("click-row.bs.table",function($element,row){ + $("#tousseAppPrintPreview,#tousseAppPrint,#tousseAppReturnEdit,#tousseAppEndTousse").each(function(){ + toggleShow(this,2); + }); + //loadRecyclingApplicationById(); clearForm(isIE,"tousseModal",["tousse_table"],appToussesArr); $("#application_title").text("申请器械包"); @@ -958,6 +1067,7 @@ //申请科室 $("#departApp_tousse").append(""); + //结算科室 $("#settleDep_tousse").append(""); @@ -971,8 +1081,11 @@ var remarksEl=$('#remarks') var remark=remarksEl.val(row.remark); -// if(row.type == Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM){ - loadTable("tousse_table","",appTemplate_columnns,false,false,"",false,appToussesArr); + if(row.type == Constants.AppType.TYPE_DISINFECT_GOODS_APPLICATION_FORM){ + loadTable("tousse_table","",appTemplate_columns,false,false,"",true,appToussesArr); + }else{ + loadTable("tousse_table","",appTemplate_columns,false,false,"",false,appToussesArr); + } appToussesArr=[]; for(var i=0;i" + -// "
" + -// "
" + repo.full_name + "
"; -// -// if (repo.description) { -// markup += "
" + repo.description + "
"; -// } -// -// markup += "
" + -// "
" + repo.forks_count + " Forks
" + -// "
" + repo.stargazers_count + " Stars
" + -// "
" + repo.watchers_count + " Watchers
" + -// "
" + -// "
"; - return repo; - } - function formatRepoSelection (repo) { -// return repo.full_name || repo.text; - return repo; - } - - - - /** *获取表单物品列表 @@ -1188,39 +1285,57 @@ * spell:搜索过滤关键字 */ function renderSelect_handlerDpt(elementId,maximumSelectionLength,tousseType,applyDepartCode){ + + var result=[]; + $.ajax({ + url:WWWROOT + '/disinfectSystem/core/orgUnitController/searchHandleDepartmentByKeyWord.mhtml', + dataType: 'json', + contentType:"application/json;charset=utf-8", + type:'get', + async:false, + cache: true, + data:{applyDepartCode:applyDepartCode,tousseType:tousseType}, + success:function(msg){ + result=transformJsonArrToSelect2(msg.rows,"departmentCode","departmentName"); + } + }); + $("#"+elementId).select2({ - language : 'zh-CN', - minimumInputLength: 1, - placeholder: "关键词搜索", - maximumSelectionLength:maximumSelectionLength, - allowClear: true, - ajax: { - url: WWWROOT + '/disinfectSystem/core/orgUnitController/searchHandleDepartmentByKeyWord.mhtml', - dataType: 'json', - contentType:"application/json;charset=utf-8", - type:'get', - cache: true, - delay: 1000, - data:function (params) { - return { - applyDepartCode:applyDepartCode, - tousseType:tousseType, - spell: params.term, // search term - limit:20, - page:params.page||1, //第几页返回查询 - offset:((params.page||1)-1) * 20 - }; - }, - processResults: function (data,params) {//结果处理 - var result=[]; - if(data.success == true){ - result=transformJsonArrToSelect2(data.rows,"departmentCode","departmentName"); - } - return {results: result,"pagination": {"more": true}} - } - } - }); + data: result + }) + $("#"+elementId).next().attr('style','width:100%;'); + +// $("#"+elementId).select2({ +// ajax: { +// url: WWWROOT + '/disinfectSystem/core/orgUnitController/searchHandleDepartmentByKeyWord.mhtml', +// dataType: 'json', +// contentType:"application/json;charset=utf-8", +// type:'get', +// cache: true, +// delay: 1000, +// data:function (params) { +// return { +// applyDepartCode:applyDepartCode, +// tousseType:tousseType, +// spell: params.term, // search term +// limit:20, +// page:params.page||1, //第几页返回查询 +// offset:((params.page||1)-1) * 20 +// }; +// }, +// processResults: function (data,params) {//结果处理 +// var result=[]; +// if(data.success == true){ +// result=transformJsonArrToSelect2(data.rows,"departmentCode","departmentName"); +// } +// return {results: result,"pagination": {"more": true}} +// } +// } +// }); +// + + } @@ -1254,9 +1369,9 @@ data:function (params){ return { tousseType:tousseType, - appCode:$('#departApp_tousse').val()[0] || '', - settleAccountsDepartCoding:$('#settleDep_tousse').val()[0] || '', - cssdOrgUnitCode:$('#handleDep_tousse').val()[0] || '', + appCode:Tools.ArrayUtils.isNotEmpty($('#departApp_tousse').val()) ? $('#departApp_tousse').val()[0] : '', + settleAccountsDepartCoding:Tools.ArrayUtils.isNotEmpty($('#settleDep_tousse').val()) ? $('#settleDep_tousse').val()[0] : '', + cssdOrgUnitCode:Tools.ArrayUtils.isNotEmpty($('#handleDep_tousse').val()) ? $('#handleDep_tousse').val()[0] : '', spell: params.term, // search term limit:20, page:params.page||1, //第几页返回查询 @@ -1271,6 +1386,7 @@ processResults: function (data,params) {//结果处理 var result=[]; if(data.success == true){ + $.merge(disinfectionComboGoodsStore,data.rows); result=transformJsonArrToSelect2(data.rows,"id","name"); } return {results: result,"pagination": {"more": true}} @@ -1280,108 +1396,13 @@ $("#"+elementId).next().attr('style','width:100%;'); } -// -///**【“申请一次性物品”-下拉框渲染--申请物品列表】【暂时缺少一次性物品的接口】 -//*tousseType:类型 -//*appCode:申请科室编码 -//*settleAccountsDepartCoding:结算科室编码 -//*cssdOrgUnitCode:处理科室编码 -//*spell:搜索关键字 -//*limit:每页记录数 -//*offset:第多少条起 -// */ -//function renderSelect_comboGoods(elementId,maximumSelectionLength,tousseType,appCode,settleAccountsDepartCoding,cssdOrgUnitCode){ -// $("#"+elementId).select2({ -// language : 'zh-CN', -// minimumInputLength: 1, -// placeholder: "关键词搜索", -// maximumSelectionLength:maximumSelectionLength, -// ajax: { -// url: WWWROOT + '/systemmanage/getCssdsByApplyDepartAndType.do', -// dataType: 'json', -// contentType:"application/json;charset=utf-8", -// type:'POST', -// cache: true, -// delay: 1000, -// data:function (params) { -// return JSON.stringify({ -// tousseType:tousseType, -// appCode:appCode, -// settleAccountsDepartCoding:settleAccountsDepartCoding, -// cssdOrgUnitCode:cssdOrgUnitCode, -// spell: params.term, // search term -// limit:100, -// page:params.page||1, //第几页返回查询 -// offset:(params.page||1) * 100 -// }); -// }, -// processResults: function (data,params) {//结果处理 -// var result=[]; -// if(data.success == true){ -// result=transformJsonArrToSelect2(data.rows,"id","name"); -// } -// return {results: result,"pagination": {"more": true}} -// } -// } -// }); -// $("#"+elementId).next().attr('style','width:100%;'); -//} -// -///**【“申请消毒物品”-下拉框渲染--申请物品列表】【暂时缺少消毒物品的接口】 -//*tousseType:类型 -//*appCode:申请科室编码 -//*settleAccountsDepartCoding:结算科室编码 -//*cssdOrgUnitCode:处理科室编码 -//*spell:搜索关键字 -//*limit:每页记录数 -//*offset:第多少条起 -// */ -//function renderSelect_comboGoods(elementId,maximumSelectionLength,tousseType,appCode,settleAccountsDepartCoding,cssdOrgUnitCode){ -// -// $("#"+elementId).select2({ -// language : 'zh-CN', -// minimumInputLength: 1, -// placeholder: "关键词搜索", -// maximumSelectionLength:maximumSelectionLength, -// ajax: { -// url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchComboGoodsData.do', -// dataType: 'json', -//// contentType:"application/json;charset=utf-8", -// type:'get', -// cache: true, -// delay: 1000, -// data:function (params) { -// return { -// tousseType:tousseType, -// appCode:appCode, -// settleAccountsDepartCoding:settleAccountsDepartCoding, -// cssdOrgUnitCode:cssdOrgUnitCode, -// spell: params.term, // search term -// limit:100, -// page:params.page||1, //第几页返回查询 -// offset:(params.page||1) * 100 -// }; -// }, -// processResults: function (data,params) {//结果处理 -// var result=[]; -// if(data.success == true){ -// $.merge(disinfectionComboGoodsStore,data.rows); -//// disinfectionComboGoodsStore=data.rows -// result=transformJsonArrToSelect2(data.rows,"id","name"); -// } -// return {results: result,"pagination": {"more": true}} -// } -// } -// }); -// $("#"+elementId).next().attr('style','width:100%;'); -//} - /** 加载主页面table列表 * */ function loadAppListTable(tableId,toolbarId,columns){ + $("#"+tableId).bootstrapTable('destroy'); $("#"+tableId).bootstrapTable( { url:WWWROOT +'/disinfectSystem/recyclingApplication/recyclingApplicationController/findRecyclingApplicationList.mhtml', @@ -1477,15 +1498,16 @@ idField : "id", columns : columns, onExpandRow: function (index, row, $detail) { - var disId=row.id; - var item; + var disId=row.tousseDefinitionID; + var item={}; for(var i = 0;i < disinfectionComboGoodsStore.length;i++){ - item=disinfectionComboGoodsStore[i]; - if(disId == item.id){ + var item1=disinfectionComboGoodsStore[i]; + if(disId == item1.id){ + item=item1; break; } } - + var elArr=$("#"+id).find("th"); //通过index获取表头宽度 var table=""; @@ -1557,8 +1579,60 @@ } +function tousseAppSumbmit(){ + + //ID + var idEl=$('#id'); + var id=idEl.val(); + //申请人 + var appEl=$('#applicant'); + var applicant=appEl.val(); + var applicantCode=$('#applicantCode').val(); + + //申请科室 + var departAppEl=$('#departApp_tousse') + var departCoding=departAppEl.val()[0]; + var depart=departAppEl.find("option:selected").text(); + //结算科室 + var settleDepEl=$('#settleDep_tousse') + var settleAccountsDepartCoding=settleDepEl.val()[0]; + var settleAccountsDepart=settleDepEl.find("option:selected").text(); + + //处理科室 + var handleDepEl=$('#handleDep_tousse') + var handleDepartCoding=handleDepEl.val()[0]; + var handleDepart=handleDepEl.find("option:selected").text(); + + //时间 + var applicationTimeStr=$("#time").text(); + + //备注 + var remarksEl=$('#remarks'); + var remark=remarksEl.text(); + + //申请单类型 + var type=Constants.AppType.TYPE_TOUSSE_APPLICATION_FORM; + + var commitData = new tousseApplicationData(true,id,applicant,applicantCode,appToussesArr,departCoding,depart,settleAccountsDepartCoding,settleAccountsDepart,handleDepartCoding,handleDepart,type,applicationTimeStr,remark); + + $.ajax({ + url:WWWROOT +'/disinfectSystem/recyclingApplicationAction!saveRecyclingApplication.do', + type:'post', +// contentType:"application/json;charset=utf-8", + dataType:'json', + data:commitData, + success:function(msg){ + if(msg.success == true){ + loadAppListTable("allApplication_table","toolbar_table",allApplication_columns); + $("#tousseModal").modal('hide'); + }else{ + alert(msg.message); + } + } + }); + +} - /** * 清空表单 * @formId 表单ID @@ -1656,6 +1730,28 @@ } /** + * 一次性物品申请单提交对象 + */ +function disposableGoodApplicationData(comSta,id,appli,appliCode,tousseInstanceInfosArr,departCoding,depart,settleAccountsDepartCoding,settleAccountsDepart,handleDepartCoding,handleDepart,type,applicationTimeStr,remark){ + this.committedStatus=comSta, + this.id=id, + this.applicant=appli, + this.applicantCode=appliCode, + this.tousseInstanceInfos=JSON.stringify(tousseInstanceInfosArr), + this.departCoding=departCoding, + this.depart=depart, + this.settleAccountsDepartCoding=settleAccountsDepartCoding, + this.settleAccountsDepart=settleAccountsDepart, + this.handleDepartCoding=handleDepartCoding, + this.handleDepart=handleDepart, + this.type=type, + this.applicationTimeStr=applicationTimeStr, + this.remark=remark, + this.tousseType='一次性物品' +} + + +/** *申请物品明细对象 */ function tousseInstance(id,tousseName,amount,originalPrice,price,rowPrice,urgentAmount,isApplyEntireTousse,expressInvoice,diposable,tousseType,unit,unitCount,minUnit,transferScale,disinfectMaterilas,tousseDefinitionID){ @@ -1678,5 +1774,295 @@ this.tousseDefinitionID=tousseDefinitionID } +/** + * 查询出来的消毒物品数据jsonArray转换成需要提交的jsonArray格式 + * jsonArray:[{ + "name": "骨刀 (小)[24cm刃8mm]", + "materialDefinitionId": 123, + "tousseType": "器械", + "isDiposable": "否", + "count": 1, + "countBackup": 1, + "totalPrice": 0, + "amount": 1, + "price": 0, + "leaf": true + * + * result:"[{\"name\":\"\壁\式\湿\化\瓶\",\"count\":4,\"tousseType\":\"\器\械\",\"groupNum\":\"\",\"materialDefinitionId\":2257}]", + */ +function transformDisinfectionMaterial(jsonArray){ + var result=[]; + if(Tools.ArrayUtils.isNotEmpty(jsonArray)){ + for(var i = 0;i