Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/RecyclingApplicationManagerImpl.java =================================================================== diff -u -r21763 -r21838 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/RecyclingApplicationManagerImpl.java (.../RecyclingApplicationManagerImpl.java) (revision 21763) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/RecyclingApplicationManagerImpl.java (.../RecyclingApplicationManagerImpl.java) (revision 21838) @@ -1201,7 +1201,7 @@ bindGoodVo.setGoodId(String.valueOf(tousseItem.getTousseDefinitionId())); bindGoodVo.setGoodName(tousseItem.getTousseName()); bindGoodVo.setGoodType(tousseItem.getTousseType()); - JSONArray bindGoodVoJsonArray = tousseDefinitionManager.getBindGoods(bindGoodVo, recyclingApplication.getHandleDepartCoding()); + JSONArray bindGoodVoJsonArray = tousseDefinitionManager.getBindGoods(bindGoodVo, recyclingApplication.getSettleAccountsDepartCoding(), recyclingApplication.getHandleDepartCoding()); if(bindGoodVoJsonArray != null && bindGoodVoJsonArray.size() > 0){ for (int i = 0; i < bindGoodVoJsonArray.size(); i++) { JSONObject jsonObject = bindGoodVoJsonArray.optJSONObject(i); @@ -1265,7 +1265,7 @@ bindGoodVo.setGoodId(String.valueOf(tousseItem.getDisposableGoodsId())); bindGoodVo.setGoodName(tousseItem.getTousseName()); bindGoodVo.setGoodType(tousseItem.getTousseType()); - JSONArray bindGoodVoJsonArray = tousseDefinitionManager.getBindGoods(bindGoodVo, recyclingApplication.getHandleDepartCoding()); + JSONArray bindGoodVoJsonArray = tousseDefinitionManager.getBindGoods(bindGoodVo, recyclingApplication.getSettleAccountsDepartCoding(), recyclingApplication.getHandleDepartCoding()); if(bindGoodVoJsonArray != null && bindGoodVoJsonArray.size() > 0){ for (int i = 0; i < bindGoodVoJsonArray.size(); i++) { JSONObject jsonObject = bindGoodVoJsonArray.optJSONObject(i); Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/action/DiposableGoodsAction.java =================================================================== diff -u -r21274 -r21838 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/action/DiposableGoodsAction.java (.../DiposableGoodsAction.java) (revision 21274) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/action/DiposableGoodsAction.java (.../DiposableGoodsAction.java) (revision 21838) @@ -903,7 +903,7 @@ } // JSONObject json = diposableGoodsManager.searchDisposableGoodsList( // spell, allItems,handleDepartCode,true); - List> reList = diposableGoodsManager.findDisposableGoodsList(spell, allItems, handleDepartCode, canInventory, true); + List> reList = diposableGoodsManager.findDisposableGoodsList(spell, allItems, null, handleDepartCode, canInventory, true); PageUtil.outPutResult(PageUtil.getPagePara(), reList); // HttpServletResponse response = StrutsParamUtils.getResponse(); // response.setCharacterEncoding("UTF-8"); Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js =================================================================== diff -u -r21770 -r21838 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 21770) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 21838) @@ -11,10 +11,10 @@ * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} * @param originalCommittedStatus 原申请单提交状态 * @param handleDepartCoding 处理科室的科室编码(修改才有值) - * @param isInterveneAmount 是否为干预数量操作 + * @param recyclingApplication 申请单对象 */ function comboApplication(id,deptCoding,hiddenCommitButton,hiddenSaveButton,hiddenReturnEditButton,type,tousseGroups,specifyDisposableTypes, - originalCommittedStatus,handleDepartCoding,isInterveneAmount) { + originalCommittedStatus,handleDepartCoding,recyclingApplication) { //器械包申请单的物品视图是否分成两个grid tousseApplicationFormGridSplit = false; if (sstsConfig.tousseApplicationFormGridSplit && type == tousseApplicationForm) { @@ -241,7 +241,7 @@ if (msg.length <= 6){ showResult(action.result.message); if (flag == true){ - openApplication(openFormObj.tousseType, openFormObj.form, openFormObj.tousseGroups, openFormObj.specifyDisposableTypes); + openApplication(openFormObj.form, openFormObj.tousseGroups, openFormObj.specifyDisposableTypes); } }else{ top.Ext4.Msg.show({ @@ -738,6 +738,7 @@ } } else { var params = { + settleAccountsDepartCoding: top.Ext4.getCmp('settleAccountsDepartCoding').getValue(), handleDepartCode: top.Ext4.getCmp('handleDepartCoding').getValue(), goodName: record.get('name'), bindCount: count, @@ -749,6 +750,7 @@ } } else if (depth == 1) { var params = { + settleAccountsDepartCoding: top.Ext4.getCmp('settleAccountsDepartCoding').getValue(), handleDepartCode: top.Ext4.getCmp('handleDepartCoding').getValue(), goodName: record.get('name'), bindCount: count, @@ -773,15 +775,7 @@ //重新设置一次性物品的总价格 setDisposableGoodTotalAmount(rightTemplateStore); - }, - afteredit : function (editor, context) { - //编辑之后定位到下一个物品的那行 - var record = context.record; - if (sstsConfig.enterGoToNextLineOfApply && !top.Ext4.isEmpty(record.get('count'))){ - var nextEditRow = getNextEditRow(record, context.rowIdx); - editor.startEditByPosition(nextEditRow); - } - } + } } }); Ext4.apply(this, { @@ -1033,7 +1027,7 @@ items : [ {xtype : 'hidden',name : 'count',id : 'count',value : '1'}, {xtype : 'hidden',name : 'id',id : 'id'}, - {xtype : 'hidden',name : 'deliverStatus',id : 'deliverStatus'}, + {xtype : 'hidden',name : 'deliverStatus',id : 'deliverStatus'}, //发货状态 {xtype : 'hidden',name : 'tousseInstanceInfos',id : 'tousseInstanceInfos'}, {xtype : 'hidden',name : 'tousseId',id : 'tousseId'}, {xtype : 'hidden',name : 'externalCode',id : 'externalCode'}, @@ -1042,10 +1036,9 @@ {xtype : 'hidden',name : 'returnedItemInfo',id : 'returnedItemInfo'}, {xtype : 'hidden',name : 'isUpateStatus',id : 'isUpateStatus'}, {xtype : 'hidden',name : 'departCoding',id : 'departCoding'}, //申请科室的科室编码 - {xtype : 'hidden',name : 'settleAccountsDepartCoding',id : 'settleAccountsDepartCoding'}, + {xtype : 'hidden',name : 'settleAccountsDepartCoding',id : 'settleAccountsDepartCoding'}, //结算科室的科室编码 {xtype : 'hidden',name : 'handleDepartCoding',id : 'handleDepartCoding'}, //处理科室的科室编码 {xtype : 'hidden',name : 'isDiposableGoods',id : 'isDiposableGoods'}, - {xtype : 'hidden',name : 'tousseType',id : 'tousseType'}, {xtype : 'hidden',name : 'isApplyEntireTousse',id : 'isApplyEntireTousse'}, {xtype : 'hidden',name : 'expressInvoice',id : 'expressInvoice'}, //是否快速发货 {xtype : 'hidden',name : 'materials',id : 'materials'}, @@ -1055,7 +1048,8 @@ {xtype : 'hidden',name : 'middlePackageUnit',id : 'middlePackageUnit'}, {xtype : 'hidden',name : 'transferScale',id : 'transferScale'}, {xtype : 'hidden',name : 'price',id : 'price'}, - {xtype : 'hidden',name : 'type',id : 'type',value : formType}, + {xtype : 'hidden',name : 'tousseType',id : 'tousseType'}, //物品类型 + {xtype : 'hidden',name : 'type',id : 'type',value : formType}, //申请单类型 //1、基础信息的fieldset { @@ -1133,26 +1127,36 @@ listeners:{ select:function(combo, records, index){ var record1 = transformRecords(records); + var reloadComboGoodsStore = false; //是否需要重新加载申请的物品(即:结算科室或者处理科室变了需要重新加载) //1、获取申请科室的名称和编码 var deptName = record1.data.name; var deptCoding = record1.data.id; - //2、设置“申请科室的科室编码”和“结算科室的科室编码” + //2、设置“申请科室的科室” top.Ext4.ComponentQuery.query("#recyclingApplicationForm #departCoding")[0].setValue(deptCoding); - setSettleAccountsDepartDefaultValue(deptName, deptCoding, departJsonStore); + //3、设置“结算科室的科室” + var originalSettleAccountsDepart = top.Ext4.getCmp("settleAccountsDepart").getValue(); + var originalSettleAccountsDepartCoding = top.Ext4.getCmp("settleAccountsDepartCoding").getValue(); + var index = appDepartJsonStore.findExact("name", deptName); + if (index != -1){ + if (deptName != originalSettleAccountsDepart || deptCoding != originalSettleAccountsDepartCoding) { + top.Ext4.getCmp("settleAccountsDepartCoding").setValue(deptCoding); + top.Ext4.getCmp("settleAccountsDepart").setValue(deptName); + reloadComboGoodsStore = true; + } + } + //3、设置处理科室,如果加载后的数量为1,则进行默认处理科室赋值,如果isOpenLoadTemplateByUnit=true需要重新加载申领模板 - handleDepartStore.proxy.extraParams.applyDepartCode = deptCoding; handleDepartStore.load({ callback: function(records, operation, success) { if (records.length == 1){ var record = records[0]; top.Ext4.getCmp("handleDepartCoding").setValue(record.data.cssdOrgUnitCode); top.Ext4.getCmp('handleDepart').setValue(record.data.name); - comboGoodsStore.proxy.extraParams.cssdOrgUnitCode = record.data.cssdOrgUnitCode; - comboGoodsStore.load({params: {cssdOrgUnitCode: record.data.cssdOrgUnitCode}}); + reloadComboGoodsStore = true; var paramete = {applicationType:type, id:id}; //根据所选的科室重新加载模板 @@ -1161,6 +1165,9 @@ } loadProduction(paramete, true); } + if (reloadComboGoodsStore) { + comboGoodsStore.load(); + } } }); @@ -1216,6 +1223,7 @@ select:function(combo, records, index){ var record = transformRecords(records); top.Ext4.getCmp("settleAccountsDepartCoding").setValue(record.data.id); + comboGoodsStore.load(); }, focus : function(thiz){ thiz.selectText(); @@ -1238,8 +1246,10 @@ allowBlank : false, flex : 1, listeners:{ - select:function(combo, record, index){ - reloadGoodsComboStore(); + select:function(combo, records, index){ + var record = transformRecords(records); + top.Ext4.getCmp("handleDepartCoding").setValue(record.data.cssdOrgUnitCode); + comboGoodsStore.load(); loadProduction({applicationType:type, id:id}, true); }, focus : function(thiz){ @@ -1419,6 +1429,61 @@ } } }); + } else if (recyclingApplication) { + //设置“申请单id”、“流水号”、“发货状态”、“申请人”、“住院号”、“申请科室”、“结算科室”、“处理科室”、“申请时间”、“备注”、“仓库编码”、“项目”12个属性 + top.Ext4.getCmp("id").setValue(recyclingApplication.id); + top.Ext4.getCmp("serialNumber").setValue(recyclingApplication.serialNumber); + top.Ext4.getCmp("deliverStatus").setValue(recyclingApplication.deliverStatus); + top.Ext4.getCmp("applicant").setValue(recyclingApplication.applicant); + top.Ext4.getCmp("hospitalNumber").setValue(recyclingApplication.hospitalNumber); + + var departComp = top.Ext4.ComponentQuery.query("#recyclingApplicationForm #depart")[0]; + departComp.forceSelection = false; + departComp.setValue(recyclingApplication.depart); + departComp.forceSelection = true; + top.Ext4.ComponentQuery.query("#recyclingApplicationForm #departCoding")[0].setValue(recyclingApplication.departCoding); + + top.Ext4.getCmp("settleAccountsDepart").forceSelection = false; + top.Ext4.getCmp("settleAccountsDepart").setValue(recyclingApplication.settleAccountsDepart); + top.Ext4.getCmp("settleAccountsDepart").forceSelection = true; + top.Ext4.getCmp("settleAccountsDepartCoding").setValue(recyclingApplication.settleAccountsDepartCoding); + + top.Ext4.getCmp("handleDepart").forceSelection = false; + top.Ext4.getCmp("handleDepart").setValue(recyclingApplication.handleDepart); + top.Ext4.getCmp("handleDepart").setRawValue(recyclingApplication.handleDepart); + top.Ext4.getCmp("handleDepart").forceSelection = true; + top.Ext4.getCmp("handleDepartCoding").setValue(recyclingApplication.handleDepartCoding); + + if(recyclingApplication.applicationTime){ + top.Ext4.getCmp('applicationTimeStr').setValue(Ext.util.Format.date(new Date(recyclingApplication.applicationTime.time),'Y-m-d H:i')); + } + + top.Ext4.getCmp("remark").setValue(recyclingApplication.remark); + top.Ext4.getCmp('storeCode').setValue(recyclingApplication.storeCode); + + //如果启用了课题组接口功能且科室为科教项目经费 + if(sstsConfig.showProjectNameComboWhenApplyDiposableGoods == true){ + if(sstsConfig.departsForInvoicePlanSelectProject + && (";" + sstsConfig.departsForInvoicePlanSelectProject + ";").indexOf(";" + recyclingApplication.depart + ";") != -1){ + top.Ext4.getCmp('projCode').setVisible(true); + projectStore.reload();//加载项目数据 + top.Ext4.getCmp('projCode').setValue(recyclingApplication.projCode); + } + } + + if(recyclingApplication.editable == 'false' || isInterveneAmount){ //不可编辑 + departComp.setReadOnly(true); + top.Ext4.getCmp("settleAccountsDepart").setReadOnly(true); + top.Ext4.getCmp("handleDepart").setReadOnly(true); + top.Ext4.getCmp("remark").setReadOnly(true); + top.Ext4.getCmp('tempSaveBtn').disable(); + top.Ext4.getCmp('package1').disable(); + top.Ext4.getCmp('count1').disable(); + top.Ext4.getCmp('urgentAmount').disable(); + top.Ext4.getCmp('addTousseBt').disable(); + top.Ext4.getCmp('departmentTemplate').disable(); + isInterveneAmount = false; + } } //加载已经申请的物品(包括申领模版的) @@ -1563,41 +1628,6 @@ } /** - * 编辑数量后根据当前行数定位到下一个要定位的行数 - * @param record 当前编辑的数据 - * @param nowRow 当前的行数 - * @returns {{row: *, column: number}} - */ - function getNextEditRow(record, nowRow) { - var tousseType = record.get('tousseType'); - if ('一次性物品' === tousseType){ - return {row: nowRow + 1, column: 7}; - } - var nextSibling = record.nextSibling; - //如果下一个节点为空,则证明当前是非整包申请消毒物品的最后一个节点,所以要用record.parentNode.nextSibling才能获得下一个节点 - nextSibling = top.Ext4.isEmpty(nextSibling) ? record.parentNode.nextSibling : nextSibling; - //如果还是为空,则表示当前节点是最后一个物品并且不是非整包清洗的物品 - if (top.Ext4.isEmpty(nextSibling)){ - return {row: nowRow + 1, column: 7}; - } - //器械包->非整包清洗 或者 非整包清洗(最后一个节点)->非整包清洗,则要往下两个节点 - if ('器械包' === tousseType && isNotApplyEntireTousse(nextSibling) || isNotApplyEntireTousse(record) && isNotApplyEntireTousse(nextSibling) ){ - return {row: nowRow + 2, column: 4}; - } - //整包清洗->器械包 或者 整包清洗->整包清洗,则要往下整包清洗节点的数量+1个节点 - if (isApplyEntireTousse(record) && '器械包' === nextSibling.get('tousseType') || isApplyEntireTousse(record) && isApplyEntireTousse(nextSibling)){ - var len = record.data.children.length; - return {row: nowRow + len + 1, column: 4}; - } - // 整包清洗->非整包清洗,则要往下整包清洗节点的数量+2个节点 - if (isApplyEntireTousse(record) && isNotApplyEntireTousse(nextSibling)){ - var len = record.data.children.length; - return {row: nowRow + len + 2, column: 4}; - } - return {row: nowRow + 1, column: 4}; - } - - /** * 重新计算总价格并重新设置最小单位的数量. * @param record 该行的数据 * @param context @@ -1734,6 +1764,27 @@ } /** + * 设置结算科室,默认值为申请科室,如果申请科室没配置成处理科室,则为让他为空. + * @param deptName 申请科室的科室名称 + * @param deptCoding 申请科室的科室编码 + * @param settleAccountStore 处理科室的store + */ +function setSettleAccountsDepartDefaultValue(deptName, deptCoding, settleAccountStore){ + var cmp = top.Ext4.ComponentQuery.query("#recyclingApplicationForm #settleAccountsDepart")[0]; + var originalSettleAccountsDepart = cmp.getValue(); + var originalSettleAccountsDepartCoding = top.Ext4.getCmp("settleAccountsDepartCoding").getValue(); + + var index = settleAccountStore.findExact("name", deptName); + if (index != -1){ + if (deptName != originalSettleAccountsDepart || deptCoding != originalSettleAccountsDepartCoding) { + top.Ext4.getCmp("settleAccountsDepartCoding").setValue(deptCoding); + cmp.setValue(deptName); + comboGoodsStore.load(); //重新加载物品(因为每个结算科室的一次性物品浮动系数可能会不一样) + } + } +} + +/** * 判断是否需要显示仓库名称的combo * @param deptCoding * @returns {Boolean} Index: ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManager.java =================================================================== diff -u -r21475 -r21838 --- ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManager.java (.../TousseDefinitionManager.java) (revision 21475) +++ ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManager.java (.../TousseDefinitionManager.java) (revision 21838) @@ -160,10 +160,12 @@ * @param tousseType 搜索的物品类型(多样化) * @param showReferencePrice 是否显示参考价格 * @param showExternalCodeOfDisposableGoods 是否显示一次性物品的外部编码 + * @param settleAccountsDepartCoding 结算科室编码 * @param deptCode 处理科室编码 * @return */ - public Map searchComboGoods(String searchString, String tousseType,boolean showReferencePrice,boolean showExternalCodeOfDisposableGoods,String deptCode); + public Map searchComboGoods(String searchString, String tousseType,boolean showReferencePrice,boolean showExternalCodeOfDisposableGoods, + String settleAccountsDepartCoding,String deptCode); /** * 获取某个包定义的所有器械材料实例. @@ -367,6 +369,7 @@ * @param countOfLI 显示数目,当countOfLI为0时查询所有的记录,不分页 * @param showDisableGoods 是否显示禁用物品 * @param showExternalCodeOfDisposableGoods 是否显示一次性物品的外部编码 + * @param settleAccountsDepartCoding 结算科室的科室编码(用于取一次性物品的浮动系数) * @param handleDepartCode * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} * @return @@ -376,7 +379,7 @@ boolean includeCoustomTousse, boolean searchTousseBelonged, boolean onlySearchRecyclingTousse, boolean displayPrice, String pageIndex, String countOfLI, boolean showDisableGoods, - boolean showExternalCodeOfDisposableGoods,String handleDepartCode,String specifyDisposableTypes); + boolean showExternalCodeOfDisposableGoods,String settleAccountsDepartCoding,String handleDepartCode,String specifyDisposableTypes); /** * 根据关键字进行检索,获取器械包或一次性物品..
@@ -394,8 +397,9 @@ * @param countOfLI 显示数目,当countOfLI为0时查询所有的记录,不分页 * @param showDisableGoods 是否显示禁用物品 * @param showExternalCodeOfDisposableGoods 是否显示一次性物品的外部编码 - * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} + * @param settleAccountsDepartCoding * @param handleDepartCode + * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} * * @return */ @@ -405,7 +409,7 @@ boolean onlySearchRecyclingTousse, boolean displayPrice, boolean includeForeignTousse, String pageIndex, String countOfLI, boolean showDisableGoods, - boolean showExternalCodeOfDisposableGoods,String handleDepartCode,String specifyDisposableTypes); + boolean showExternalCodeOfDisposableGoods,String settleAccountsDepartCoding,String handleDepartCode,String specifyDisposableTypes); /** * 根据包定义查找包定义,因为可能会存在多个,这里取id最大的. * @param tousseDefinition @@ -684,8 +688,9 @@ /** * 根据申请的物品获取绑定的物品集合. * @param bindGoodVo 申请的物品{@link BindGoodVo} + * @param settleAccountsDepartCoding 结算科室的科室编码(用于获取一次性物品的浮动系数) * @param handleDepartCode 处理科室的科室编码(计算一次性物品库存时用的,如果你不需要知道库存可以不传此参数) */ - public JSONArray getBindGoods(BindGoodVo bindGoodVo, String handleDepartCode); + public JSONArray getBindGoods(BindGoodVo bindGoodVo, String settleAccountsDepartCoding, String handleDepartCode); } Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/DiposableGoodsManager.java =================================================================== diff -u -r21759 -r21838 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/DiposableGoodsManager.java (.../DiposableGoodsManager.java) (revision 21759) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/DiposableGoodsManager.java (.../DiposableGoodsManager.java) (revision 21838) @@ -34,13 +34,14 @@ /** * 构建一次性物品的部分属性. + * @param settleAccountsDepartCoding 结算科室的科室编码(用于取一次性物品的浮动系数) * @param handleDepartCode 处理科室的科室编码 * @param showReferencePrice 是否显示参考价 * @param showExternalCodeOfDisposableGoods 是否显示外部编码 * @param disposableGoodsList 一次性物品集合 * @return */ - public List> buildDisposableGoodsListInfo(String handleDepartCode, + public List> buildDisposableGoodsListInfo(String settleAccountsDepartCoding, String handleDepartCode, boolean showReferencePrice, boolean showExternalCodeOfDisposableGoods, List disposableGoodsList); @@ -79,28 +80,29 @@ * @param wareHouseId 科室的id,可以为null * @return */ - public JSONObject searchDisposableGoodsList(String simpleSpell, String allItems,String handleDepartCode,boolean showExternalCodeOfDisposableGoods); + public JSONObject searchDisposableGoodsList(String simpleSpell, String allItems,String settleAccountsDepartCoding,String handleDepartCode,boolean showExternalCodeOfDisposableGoods); /** * 获取一次性物品定义的列表(用List返回) * @see DiposableGoodsManager#searchDisposableGoodsList * @param simpleSpell * @param allItems + * @param settleAccountsDepartCoding * @param handleDepartCode * @param canInventory 是否需要盘点 * @param showExternalCodeOfDisposableGoods * @return */ - List> findDisposableGoodsList(String simpleSpell, String allItems, String handleDepartCode,String canInventory,boolean showExternalCodeOfDisposableGoods); + List> findDisposableGoodsList(String simpleSpell, String allItems, String settleAccountsDepartCoding, String handleDepartCode,String canInventory,boolean showExternalCodeOfDisposableGoods); /** * 获取一次性物品定义及材料定义的列表 * @param simpleSpell 拼音或五笔码,或者是物品名称 * @param allItems 是否能被科室申请的标志,值yes表示能 * @param wareHouseId 科室的id,可以为null * @return */ - List> searchDisposableGoodsAndMaterialList(String simpleSpell, String allItems,String handleDepartCode,boolean showExternalCodeOfDisposableGoods); + List> searchDisposableGoodsAndMaterialList(String simpleSpell, String allItems, String settleAccountsDepartCoding, String handleDepartCode,boolean showExternalCodeOfDisposableGoods); // public JSONObject searchDisposableGoodsAndMaterialList(String simpleSpell, String allItems,String handleDepartCode,boolean showExternalCodeOfDisposableGoods); /** @@ -135,7 +137,7 @@ public void updateDiposableGoodsPriceFromExcelFile(); - public List> getDisposableGoodsList(String sql,boolean showReferencePrice,boolean showExternalCodeOfDisposableGoods,String handleDepartCode); + public List> getDisposableGoodsList(String sql,boolean showReferencePrice,boolean showExternalCodeOfDisposableGoods,String settleAccountsDepartCoding,String handleDepartCode); public DisposableGoodsStock getDiposableGoodsByInventorySerialNumber(String inventorySerialNumber); Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion3.js =================================================================== diff -u -r20881 -r21838 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion3.js (.../goodsApplicationViewVersion3.js) (revision 20881) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion3.js (.../goodsApplicationViewVersion3.js) (revision 21838) @@ -12,7 +12,7 @@ if (tousseGroupByApply && tousseGroupByApply.length > 0) { tousseGroups = tousseGroupByApply.join(';'); } - openApplication(invoicePlanForTousseType_Tousse, tousseApplicationForm, tousseGroups, ''); + openApplication(tousseApplicationForm, tousseGroups, ''); }); @@ -26,13 +26,13 @@ //一次性物品申请单 Ext.get('diposableGoodsApplication').addListener('click', function (e) { var specifyDisposableTypes = {include: false, disposableTypes: disposableTypes}; - openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, '', specifyDisposableTypes); + openApplication(diposableGoodsApplicationForm, '', specifyDisposableTypes); }); //一次性物品申请单(申领未消毒敷料) Ext.get('diposableGoodsApplication2').addListener('click', function (e) { var specifyDisposableTypes = {include: true, disposableTypes: disposableTypes}; - openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, '', specifyDisposableTypes); + openApplication(diposableGoodsApplicationForm, '', specifyDisposableTypes); }); } Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/foreignProxyDisinfectionForm.js =================================================================== diff -u -r19753 -r21838 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/foreignProxyDisinfectionForm.js (.../foreignProxyDisinfectionForm.js) (revision 19753) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/foreignProxyDisinfectionForm.js (.../foreignProxyDisinfectionForm.js) (revision 21838) @@ -279,36 +279,6 @@ } } }); - // var foreignProxyHandleDepartStore = new Ext4.data.JsonStore({ - // proxy : { - // type : 'ajax', - // url : WWWROOT + '/systemmanage/getCssdsByApplyDepartAndType.do', - // reader : { - // type : 'json', - // root : 'data' - // } - // }, - // fields : [ - // /*{name : 'cssdOrgUnitId',mapping : 'cssdOrgUnitId'},*/ - // {name : 'cssdOrgUnitCode',mapping : 'cssdOrgUnitCode'}, - // {name : 'name',mapping : 'cssdOrgUnitName'} - // ],listeners:{ - // beforeload : function(store,option) { - // if(top.Ext.getCmp('departCoding').getValue() == ''){ - // alert('请先选择申请科室!'); - // return false; - // } - // store.proxy.extraParams['applyDepartCode'] = top.Ext.getCmp('departCoding').getValue(); - // }, - // load : function(store,option) { - // //如果结果只有一个,默认选中第一条 - // if(store.getCount() == 1){ - // top.Ext.getCmp('handleDepart').setValue(store.getAt(0).data.name); - // top.Ext.getCmp('handleDepartCoding').setValue(store.getAt(0).data.cssdOrgUnitCode); - // } - // } - // } - // }); foreignItemStore.removeAll(); if(id){//修改 Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion2.js =================================================================== diff -u -r20881 -r21838 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion2.js (.../goodsApplicationViewVersion2.js) (revision 20881) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion2.js (.../goodsApplicationViewVersion2.js) (revision 21838) @@ -7,28 +7,28 @@ //器械包申请单 Ext.get('tousseApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Tousse, tousseApplicationForm, '', ''); + openApplication(tousseApplicationForm, '', ''); }); //一次性物品申请单 Ext.get('diposableGoodsApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, '', ''); + openApplication(diposableGoodsApplicationForm, '', ''); }); //消毒物品申请单 Ext.get('disinfectGoodsApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Tousse, disinfectGoodsApplicationForm, '', ''); + openApplication(disinfectGoodsApplicationForm, '', ''); // addAndEditUntracableTousse('', 0, "01", function () { }); }); //敷料包申请单 Ext.get('dressingApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Tousse, dressingApplicationForm, '', ''); + openApplication(dressingApplicationForm, '', ''); }); //专科器械申请单 Ext.get('spInstrumentApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Tousse, spInstrumentApplicationForm, '', ''); + openApplication(spInstrumentApplicationForm, '', ''); }); } }); Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/untracableTousseForm.js =================================================================== diff -u -r18491 -r21838 --- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/untracableTousseForm.js (.../untracableTousseForm.js) (revision 18491) +++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/tousse/untracableTousseForm.js (.../untracableTousseForm.js) (revision 21838) @@ -15,21 +15,6 @@ }); //为了不与通用申请单、一次性服务申请单及器械包申请的变量弄混,现单独声明出来.由于发货单管理也引入了此js文件,且发货单引入Ext2的库,所以store改用Ext2 -/*var untracebleHandleDepartStore = new Ext4.data.JsonStore({ - proxy : { - type : 'ajax', - url : WWWROOT + '/systemmanage/getCssdsByApplyDepartAndType.do', - reader : { - type : 'json', - root : 'data' - } - }, - fields : [ - {name : 'cssdOrgUnitId',mapping : 'cssdOrgUnitId'}, - {name : 'cssdOrgUnitCode',mapping : 'cssdOrgUnitCode'}, - {name : 'name',mapping : 'cssdOrgUnitName'} - ] -});*/ var untracebleHandleDepartStore = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url : WWWROOT + '/systemmanage/getCssdsByApplyDepartAndType.do', Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r21770 -r21838 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 21770) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 21838) @@ -56,67 +56,49 @@ /** * 打开对应的表单(添加申请单操作) * @param form 申请表单类型 - * @param tousseType 器械包类型 - * @param tousseGroups 器械包分组(需要显示的器械包分组,为空则显示全部的器械包分组) + * @param tousseGroups 器械包分组(需要显示的器械包分组用分号分隔,为空则显示全部的器械包分组) * @param specifyDisposableTypes是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} */ -function openApplication(tousseType, form, tousseGroups, specifyDisposableTypes) { - //限制同一个科室(供应室除外)只能申请一张申请单 - if (sstsConfig.limitApply && form == comboApplicationForm && !isSupplyRoomUser) { - var existRecyclingApplication = null; - DWREngine.setAsync(false); - RecyclingApplicationTableManager.getRecyclingApplicationByDepartmentCode($Id('departCoding').value, function(result) { - if (result && result != 'null') { - existRecyclingApplication = result; +function openApplication(form, tousseGroups, specifyDisposableTypes) { + if (!isUndefinedOrNullOrEmpty(form)){ + //1、限制同一个科室(供应室除外)只能申请一张申请单 + if (sstsConfig.limitApply && form == comboApplicationForm && !isSupplyRoomUser) { + var existRecyclingApplication = null; + DWREngine.setAsync(false); + RecyclingApplicationTableManager.getRecyclingApplicationByDepartmentCode($Id('departCoding').value, function(result) { + if (result && result != 'null') { + existRecyclingApplication = result; + } + }); + DWREngine.setAsync(true); + if (existRecyclingApplication) { + showResult('本科室已经申请过物品,请确认申请的物品!'); + setRecyclingApplicationForm(existRecyclingApplication); + return; } - }); - DWREngine.setAsync(true); - if (existRecyclingApplication) { - showResult('本科室已经申请过物品,请确认申请的物品!'); - setRecyclingApplicationForm(existRecyclingApplication); - return; } + + //2、设置“提交并新建”按钮重新打开表单的参数对象 + setOpenFormObj(form, tousseGroups, specifyDisposableTypes); + + comboApplication(0,$Id('departCoding').value,false,false,true,form, tousseGroups, specifyDisposableTypes, false, '', null); } - - //新打开申请对话框时,相关参数调整及清除 - handleDepartStore.proxy.extraParams.tousseType = tousseType; - handleDepartStore.proxy.extraParams.applyDepartCode = ""; - comboGoodsStore.proxy.extraParams.cssdOrgUnitCode = ""; - //设置打开表单的对象 - setOpenFormObj(tousseType, form, tousseGroups, specifyDisposableTypes); - if (!isUndefinedOrNullOrEmpty(form)){ - comboApplication(0,$Id('departCoding').value,false,false,true,form, tousseGroups, specifyDisposableTypes, false, '',false); - } } /** * 设置打开表单的对象,用于保存和新建. - * @param tousseType 类型 * @param form 表单类型 * @param tousseGroups 器械包分组(需要显示的器械包分组,为空则显示全部的器械包分组) * @param specifyDisposableTypes格式:{include:是否包含,disposableTypes:'一次性物品类型'} * */ -function setOpenFormObj(tousseType, form, tousseGroups, specifyDisposableTypes) { - openFormObj.tousseType = tousseType; +function setOpenFormObj(form, tousseGroups, specifyDisposableTypes) { openFormObj.form = form; openFormObj.tousseGroups = tousseGroups; openFormObj.specifyDisposableTypes = specifyDisposableTypes; } /** - * 根据处理科室重新加载comboGoodsStore. - */ -function reloadGoodsComboStore(){ - var deptName = top.Ext4.getCmp("handleDepart").getValue(); - var deptCoding = getHandleDepartCoding(handleDepartStore,deptName); - top.Ext4.getCmp("handleDepartCoding").setValue(deptCoding); - - comboGoodsStore.proxy.extraParams.cssdOrgUnitCode = deptCoding; - comboGoodsStore.load(); -} - -/** * 把消毒物品定义的材料的“数量”和“材料定义id”,更新到新的节点(无论拆不拆包申请的的消毒物品). * @param originalNodes 消毒物品定义的所有材料节点 * @param newNode 新的节点(即:在grid列表的) @@ -386,9 +368,22 @@ fields : [ {name : 'cssdOrgUnitCode',mapping : 'cssdOrgUnitCode'}, {name : 'name',mapping : 'cssdOrgUnitName'} - ] + ], + listeners:{ + beforeload : function(store, operation, eOpts){ + //每次加载之前传“申请科室编码”和“物品类型”两个参数 + store.proxy.extraParams.applyDepartCode = top.Ext4.getCmp('departCoding').getValue(); + var tousseType = tousseType_tousse; + var type = top.Ext4.getCmp('type').getValue(); + if (type == comboApplicationForm) { + tousseType = ''; + } else if (type == diposableGoodsApplicationForm) { + tousseType = tousseType_diposableGoods; + } + store.proxy.extraParams.tousseType = tousseType; + } + } }); -handleDepartStore.reload(); var disinfectStore = new Ext4.data.JsonStore({ fields : [ @@ -446,11 +441,13 @@ proxy : goodProxy, fields : goodModel, listeners:{ - beforeload : function(store, options){ - //申请科室部门编号 - options.params = options.params || {}; - options.params['appCode'] = top.Ext4.getCmp('departCoding').getValue(); - if (!isIE6OrIE7){ + beforeload : function(store, operation, eOpts){ + //每次加载之前传“申请科室编码”、“结算科室编码”、“处理科室编码”三个参数 + store.proxy.extraParams.appCode = top.Ext4.getCmp('departCoding').getValue(); + store.proxy.extraParams.settleAccountsDepartCoding = top.Ext4.getCmp('settleAccountsDepartCoding').getValue(); + store.proxy.extraParams.cssdOrgUnitCode = top.Ext4.getCmp('handleDepartCoding').getValue(); + + if (!isIE6OrIE7){ createExt4Mask.call(objMask,'loadMask','数据处理中,请稍候......', applicationWindow); objMask.loadMask.show(); }else { @@ -948,55 +945,6 @@ return isValid; } -///** -// * 根据科室名称获取科室的编码. -// * @param store 数据仓库 -// * @param deptName 科室名称 -// * @returns {String} -// */ -//function getDepartCoding(store,deptName){ -// var deptCoding = ""; -// for(var i = 0;i