Index: ssts-web/src/main/webapp/js/common.js
===================================================================
diff -u -r32113 -r32339
--- ssts-web/src/main/webapp/js/common.js (.../common.js) (revision 32113)
+++ ssts-web/src/main/webapp/js/common.js (.../common.js) (revision 32339)
@@ -4275,4 +4275,20 @@
}
}, 1000);
}
+}
+
+//GDSZYY-102:删除器械包
+function deleteProxyDisinfectionItem(nodeId){
+ var proxyDisinfectionTree = top.Ext.getCmp('proxyDisinfectionTree');
+ var item = proxyDisinfectionTree.getNodeById(nodeId);
+ if (item.attributes.type == '器械包') {
+ top.Ext.getCmp('totalAmountOfTousses').setValue(parseInt(top.Ext.getCmp('totalAmountOfTousses').getValue(), 10) - 1);
+ } else {
+ var count = 0;
+ item.eachChild(function (pNode) {
+ count++;
+ });
+ top.Ext.getCmp('totalAmountOfTousses').setValue(parseInt(top.Ext.getCmp('totalAmountOfTousses').getValue(), 10) - count);
+ }
+ item.remove();
}
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js
===================================================================
diff -u -r32294 -r32339
--- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 32294)
+++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 32339)
@@ -385,6 +385,7 @@
fields: [
{name: 'id',type: "int" },
{name: 'packTimeStr'},
+ {name: 'sterilingMode'},
{name: 'orgUnitName'},
{name: 'depart'},
{name: 'packer'},
@@ -395,12 +396,14 @@
{name: 'packageType'},
{name: 'foreignMaterialsAmount'},
{name: 'splitTousseName'},
+ {name: 'isTran'},
{name: 'amount'}
]
});
var readerDetail = [
{name: 'id',type: "int" },
{name: 'packTimeStr'},
+ {name: 'sterilingMode'},
{name: 'orgUnitName'},
{name: 'depart'},
{name: 'packer'},
@@ -409,6 +412,7 @@
{name: 'supplierName'},
{name: 'doctor'},
{name: 'packageType'},
+ {name: 'isTran'},
{name: 'foreignMaterialsAmount'},
{name: 'splitTousseName'},
{name: 'amount'}
@@ -419,6 +423,20 @@
{type: 'string', dataIndex: 'reviewer'}
]
});
+
+ //是否一级供应室用户
+ var isFirstRoomPeople = false;
+ DWREngine.setAsync(false);
+ //验证当前登录用户属于一级供应室还是二级供应室
+ UserTableManager.checkForSupplyType(function(data){
+ var result = Ext.decode(data);
+ if(result.result){//一级供应室
+ isFirstRoomPeople = true;
+ }else{//二级供应室
+ isFirstRoomPeople = false;
+ }
+ });
+ DWREngine.setAsync(true);
var columns =[
{header: '科室', dataIndex: 'depart',width: 200},
@@ -430,6 +448,8 @@
{header: ''+reviewViewText+'人', dataIndex: 'reviewer',width: 100},
{header: '包装类型', dataIndex: 'packageType'},
{header: '装配时间', dataIndex: 'packTimeStr',width: 150},
+ {header: '灭菌方式', dataIndex: 'sterilingMode',width: 120,hidden:!(sstsConfig.generateProxySterilizationFormFunctionInHistoricalAssemblyRecords && !isFirstRoomPeople)},
+ {header: '已生成代理灭菌单', dataIndex: 'isTran',width: 120,hidden:!(sstsConfig.generateProxySterilizationFormFunctionInHistoricalAssemblyRecords && isFirstRoomPeople)},
{header: '材料汇总', dataIndex: 'foreignMaterialsAmount',width: 200},
{header: '医生', dataIndex: 'doctor',width: 100}
]
@@ -5475,6 +5495,15 @@
}
},{
xtype:'button',
+ text : '生成代理灭菌单',
+ hidden:!(sstsConfig.generateProxySterilizationFormFunctionInHistoricalAssemblyRecords && !isFirstRoomPeople),
+ id:"createProxyDisinfection",
+ handler: function(){
+ var selectedRecords = Ext4.getCmp("todayHisPackingRecordPanel").getSelectionModel().getSelection();
+ addAndEditProxyDisinfection(0,selectedRecords);
+ }
+ },{
+ xtype:'button',
text : '打印装配物品表',
hidden: !sstsConfig.packingView_currentTaskGroup_showPrintBtn,
id:"printPackingRecords",
@@ -5763,6 +5792,9 @@
},
listeners: {
itemclick: function (dv, record, item, index, e) {
+ if(e.target.className == 'x4-grid-row-checker'){
+ return;
+ }
var packingRecordId = record.get('id');
var cfg = {
packingRecordId:packingRecordId,
Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js
===================================================================
diff -u -r32056 -r32339
--- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 32056)
+++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationRecordForm.js (.../sterilizationRecordForm.js) (revision 32339)
@@ -3126,6 +3126,14 @@
} else {
top.Ext.getCmp("btnBatchAddTousse").enable();
}
+ if(response.responseText == ''){
+ top.Ext.getCmp('saveBtn').enable();
+ top.Ext.getCmp('save2').enable();
+ top.Ext.getCmp('monitorBtn').enable();
+ top.Ext.getCmp('saveAndNewBtn').enable();
+ pendingSterilizationColumnTree.getEl().unmask();
+ return;
+ }
var result = Ext.decode(response.responseText);
for (var i = 0; i < result.length; i++) {
if (result[i].isTraceable == '否') {
Index: ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/config.js
===================================================================
diff -u -r32294 -r32339
--- ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/config.js (.../config.js) (revision 32294)
+++ ssts-web/src/main/webapp/disinfectsystem/config/gdszyy/config.js (.../config.js) (revision 32339)
@@ -223,6 +223,8 @@
enableForgotPasswordFunction:true,
//待装配物品列表显示回收人列
showRecyclingPeopleColumnInPackingTasksList:true,
+ //开启在历史装配记录生成代理灭菌单功能
+ generateProxySterilizationFormFunctionInHistoricalAssemblyRecords:true,
//用户登录成功后如果检查密码到不符合复杂度要求,则强制用户修改密码
forceUserChangePwdWhenNotMeetPwdComplexityReq:true
}
\ No newline at end of file
Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/proxyDisinfectionView.jsp
===================================================================
diff -u -r29513 -r32339
--- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/proxyDisinfectionView.jsp (.../proxyDisinfectionView.jsp) (revision 29513)
+++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/proxyDisinfectionView.jsp (.../proxyDisinfectionView.jsp) (revision 32339)
@@ -16,9 +16,11 @@
+
+
Index: ssts-web/src/main/webapp/disinfectsystem/packing/historyPackingView.js
===================================================================
diff -u -r27770 -r32339
--- ssts-web/src/main/webapp/disinfectsystem/packing/historyPackingView.js (.../historyPackingView.js) (revision 27770)
+++ ssts-web/src/main/webapp/disinfectsystem/packing/historyPackingView.js (.../historyPackingView.js) (revision 32339)
@@ -120,6 +120,20 @@
}
}
});
+
+ //是否一级供应室用户
+ var isFirstRoomPeople = false;
+ DWREngine.setAsync(false);
+ //验证当前登录用户属于一级供应室还是二级供应室
+ UserTableManager.checkForSupplyType(function(data){
+ var result = Ext.decode(data);
+ if(result.result){//一级供应室
+ isFirstRoomPeople = true;
+ }else{//二级供应室
+ isFirstRoomPeople = false;
+ }
+ });
+ DWREngine.setAsync(true);
var recordColumns = [
{header : "科室",width : 200,dataIndex : 'depart'},
@@ -130,7 +144,9 @@
{id:'operationRemark',header : "配包人",width : 100,dataIndex : 'packer'},
{header: '审核人', dataIndex: 'reviewer',width: 100},
{header : "装配时间",width : 150,dataIndex : 'packTime',renderer:myDateFormatBySecond},
- {header: '材料汇总', dataIndex: 'foreignMaterialsAmount',width: 200},
+ {header: '灭菌方式', dataIndex: 'sterilingMode',width: 120,hidden:!(sstsConfig.generateProxySterilizationFormFunctionInHistoricalAssemblyRecords && !isFirstRoomPeople)},
+ {header: '已生成代理灭菌单', dataIndex: 'isTran',width: 120,hidden:!(sstsConfig.generateProxySterilizationFormFunctionInHistoricalAssemblyRecords && isFirstRoomPeople)},
+ {header: '材料汇总', dataIndex: 'foreignMaterialsAmount',width: 200},
{header: '医生', dataIndex: 'doctor',width: 100}
];
@@ -139,6 +155,7 @@
{name : 'orgUnitName'},
{name : 'depart'},
{name : 'packTime'},
+ {name: 'sterilingMode'},
{name : 'packer'},
{name : 'tousseName'},
{name : 'isTraceable'},
@@ -147,13 +164,15 @@
{name: 'doctor'},
{name: 'foreignMaterialsAmount'},
{name: 'splitTousseName'},
+ {name: 'isTran'},
{name : 'amount'}
];
var recordFilters = new Ext.grid.GridFilters({
filters:[
{type: 'numeric', dataIndex: 'id'},
{type: 'date', dataIndex: 'packTime'},
+ {type: 'string', dataIndex: 'sterilingMode'},
{type: 'string', dataIndex: 'packer'},
{type: 'string', dataIndex: 'depart'},
{type: 'string', dataIndex: 'tousseName'},
@@ -165,7 +184,7 @@
pageSize : 20,
defaultSortField : 'packTime',
defaultSortDirection : 'DESC',
- isCheckboxSelectionModel : false,
+ isCheckboxSelectionModel : true,
rememberSelected : false,
isShowSearchField : false,
columns : recordColumns,
@@ -191,6 +210,15 @@
location.href = WWWROOT + "/disinfectsystem/packing/exportPackingRecord.jsp?params="+encodeURI(s);
}
},{
+ xtype:'button',
+ text : '生成代理灭菌单',
+ hidden:!(sstsConfig.generateProxySterilizationFormFunctionInHistoricalAssemblyRecords && !isFirstRoomPeople),
+ id:"createProxyDisinfection",
+ handler: function(){
+ var records = recordGrid.getSelectionModel().getSelections();
+ addAndEditProxyDisinfection(0,records);
+ }
+ },{
xtype:'button',
text : '打印',
hidden: !sstsConfig.packingView_currentTaskGroup_showPrintBtn,
@@ -597,6 +625,9 @@
});
recordGrid.on("rowclick",function(thiz, rowIndex, e){
+ if(e.target.className == 'x-grid3-row-checker'){
+ return;
+ }
var record = this.getStore().getAt(rowIndex);
var packingRecordId = record.get('id');
var cfg = {
Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/proxyDisinfectionView.js
===================================================================
diff -u -r31886 -r32339
--- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/proxyDisinfectionView.js (.../proxyDisinfectionView.js) (revision 31886)
+++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/proxyDisinfectionView.js (.../proxyDisinfectionView.js) (revision 32339)
@@ -1,165 +1,6 @@
var entityName = "代理灭菌";
var grid;
-var editMode = true;
-function formatDateYear(v, p, record) {
- try {
- return Ext.util.Format.date(new Date(v.time), 'Y-m-d H:i');
- } catch (e) {
- }
-}
-
-function createNode(isParentNode,id,barcode,name,type,status){
- var node;
- if(isParentNode){
- //创建父节点
- node = new top.Ext.tree.TreeNode({
- id:Ext.id(),
- text:barcode,
- cls:'master-task',
- iconCls:'task-folder',
- uiProvider:top.Ext.tree.ColumnNodeUI,
- leaf:false,
- expanded:true
- });
- }else{
- //创建子节点
- node = new top.Ext.tree.TreeNode({
- id:Ext.id(),
- text:barcode,
- iconCls:'task',
- uiProvider:top.Ext.tree.ColumnNodeUI,
- leaf:true,
- expanded:true
- });
- }
- //********************** 节点保存的属性值 ****************************//
- node.attributes.id = id;
- node.attributes.barcode = barcode;
- node.attributes.name = name;
- node.attributes.type = type;
- node.attributes.operation='';
- node.attributes.status = status;
- return node;
-}
-
-function addTousseInstance(id,barcode,name,status){
- var basketBarcode = top.Ext.getCmp('basketBarcode').getValue();
- var rootNode = top.Ext.getCmp('proxyDisinfectionTree').getRootNode();
- var tousseNode;
- if(basketBarcode == null || basketBarcode == ''){
- tousseNode = createNode(false,id,barcode,name,'器械包',status);
- }else{
- tousseNode = createNode(false,id,barcode,name,'器械包',status);
- }
- rootNode.insertBefore(tousseNode,rootNode.item(0));
- top.Ext.getCmp('totalAmountOfTousses').setValue(parseInt(top.Ext.getCmp('totalAmountOfTousses').getValue(),10)+1);
-}
-/**
- * 将器械包实例绑定到篮筐。如果篮筐还没有创建节点,则需要创建节点,如果包实例已经有节点了,就将对应的节点与篮筐绑定
- */
-function bindTousseToBaseket(reviewedBasketId,basketBarcode,reviewedBasketName,tousses){
- if(!basketBarcode || !tousses || tousses.length <= 0){
- return;
- }
- var rootNode = top.Ext.getCmp('proxyDisinfectionTree').getRootNode();
- var basketNode = null;
- var tousseNodes = [];
- rootNode.eachChild(function(pNode){
- if(pNode.attributes.type == '容器' && pNode.attributes.barcode == basketBarcode){
- basketNode = pNode;
- }else if(pNode.attributes.type == '器械包'){
- for(var i = 0;i < tousses.length;++i){
- if(pNode.attributes.barcode == tousses[i].barcode){
- tousses[i].tousseNode = pNode;
- }
- }
- }
- });
- for(var i = 0;i < tousses.length;++i){
- var tousseNode = tousses[i].tousseNode;
- if(!tousseNode){
- tousseNode = createNode(false,tousses[i].id,tousses[i].barcode,tousses[i].name,'器械包',tousses[i].status);
- }
- tousseNodes.push(tousseNode);
- }
- if(basketNode == null){
- basketNode = createNode(true,reviewedBasketId,basketBarcode,reviewedBasketName,'容器','');
- }
- rootNode.insertBefore(basketNode,rootNode.item(0));
- basketNode.appendChild(tousseNodes);
- top.Ext.getCmp('totalAmountOfTousses').setValue(parseInt(top.Ext.getCmp('totalAmountOfTousses').getValue(),10)+tousseNodes.length);
-}
-function checkEmptyBasket(){
- var rootNode = top.Ext.getCmp('proxyDisinfectionTree').getRootNode();
- var basketNode = null;
- var tousseNodes = new Array();
- rootNode.eachChild(function(pNode){
- if(pNode.attributes.type == '容器' && pNode.childNodes.length <= 0){
- return pNode.attributes.name;
- }
- });
- return null;
-}
-function checkExistBasket(basketBarcode){
- var ret = false;
- var rootNode = top.Ext.getCmp('proxyDisinfectionTree').getRootNode();
- var basketNode = null;
- var tousseNodes = new Array();
- rootNode.eachChild(function(pNode){
- if(pNode.attributes.type == '容器' && pNode.attributes.barcode == basketBarcode){
- ret = true;
- return;
- }
- });
- return ret;
-}
-function putTousseInBasket(){
- var basketBarcode = top.Ext.getCmp('basketBarcode').getValue();
- if(basketBarcode == null || basketBarcode == ''){
- showResult('请先扫描篮筐条码。');
- return false;
- }else{
- var rootNode = top.Ext.getCmp('proxyDisinfectionTree').getRootNode();
- var basketNode = null;
- var tousseNodes = new Array();
- rootNode.eachChild(function(pNode){
- if(pNode.attributes.type == '容器' && pNode.attributes.barcode == basketBarcode){
- basketNode = pNode;
- }else if(pNode.attributes.type == '器械包'){
- tousseNodes.push(pNode);
- }
- });
- if(basketNode == null){
- basketNode = createNode(true,top.Ext.getCmp('reviewedBasketId').getValue(),basketBarcode,top.Ext.getCmp('basketName').getValue(),'容器','');
- }
- if(tousseNodes.length>0){
- rootNode.insertBefore(basketNode,rootNode.item(0));
- basketNode.appendChild(tousseNodes);
- top.Ext.getCmp('reviewedBasketId').setValue('');
- top.Ext.getCmp('basketBarcode').setValue('');
- top.Ext.getCmp('basketName').setValue('');
- }else{
- showResult("请扫描器械包条码。");
- }
- }
-}
-
-function deleteItem(nodeId){
- var proxyDisinfectionTree = top.Ext.getCmp('proxyDisinfectionTree');
- var item = proxyDisinfectionTree.getNodeById(nodeId);
- if(item.attributes.type == '器械包'){
- top.Ext.getCmp('totalAmountOfTousses').setValue(parseInt(top.Ext.getCmp('totalAmountOfTousses').getValue(),10)-1);
- }else{
- var count = 0;
- item.eachChild(function(pNode){
- count++;
- });
- top.Ext.getCmp('totalAmountOfTousses').setValue(parseInt(top.Ext.getCmp('totalAmountOfTousses').getValue(),10)-count);
- }
- item.remove();
-}
-
// 删除
function deleteProxyDisinfection(grid) {
var records = grid.getSelectionModel().getSelections();
@@ -169,9 +10,9 @@
return false;
}
var ids = null;
- for ( var i = 0, len = records.length; i < len; i++) {
+ for (var i = 0, len = records.length; i < len; i++) {
var status = records[i].data['deliverStatus'];
- if(status != '待发货'){
+ if (status != '待发货') {
showResult("不能删除状态为已发货或部分发货的灭菌记录信息!");
return false;
}
@@ -181,48 +22,48 @@
ids = ids + ';' + records[i].data['id'];
}
}
-
+
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/proxyDisinfectionAction!testProxyDisinfectionHasSterilizationToussInstance.do',
- params : {
- ids : ids
- },success : function(response, options) {
- var result = Ext.decode(response.responseText);
- var hasSterilizationToussInstance = result.hasSterilizationToussInstance;
- if (true == hasSterilizationToussInstance) {//是否有已灭菌器械包
- showResult("不能删除已灭菌或者灭菌中的器械包");
- return;
- }
- top.Ext.MessageBox.confirm("请确认","是否确定要删除选中的灭菌记录信息?",
- function(button, text) {
- if ("yes" == button){
- Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/proxyDisinfectionAction!deleteProxyDisinfection.do',
- params : {
- ids : ids
- },success : function(response, options) {
- var result = Ext.decode(response.responseText);
- var success = result.success;
- if (true != success) {
- MsgTip.msg('提示', result.cause,true,3);
- return;
- } else {
- MsgTip.msg('提示','删除成功',true,3);
- grid.dwrReload();
- }
- },
- failure : function(response, options) {
- var result = Ext.decode(response.responseText);
- MsgTip.msg('提示', result.cause,true,3);
+ url: WWWROOT + '/disinfectSystem/proxyDisinfectionAction!testProxyDisinfectionHasSterilizationToussInstance.do',
+ params: {
+ ids: ids
+ }, success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ var hasSterilizationToussInstance = result.hasSterilizationToussInstance;
+ if (true == hasSterilizationToussInstance) {//是否有已灭菌器械包
+ showResult("不能删除已灭菌或者灭菌中的器械包");
+ return;
+ }
+ top.Ext.MessageBox.confirm("请确认", "是否确定要删除选中的灭菌记录信息?",
+ function (button, text) {
+ if ("yes" == button) {
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/proxyDisinfectionAction!deleteProxyDisinfection.do',
+ params: {
+ ids: ids
+ }, success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ var success = result.success;
+ if (true != success) {
+ MsgTip.msg('提示', result.cause, true, 3);
+ return;
+ } else {
+ MsgTip.msg('提示', '删除成功', true, 3);
+ grid.dwrReload();
}
- });
- }
+ },
+ failure: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ MsgTip.msg('提示', result.cause, true, 3);
+ }
+ });
+ }
});
- },
- failure : function(response, options) {
- showResult("删除出错!请稍候再试!");
- }
- });
+ },
+ failure: function (response, options) {
+ showResult("删除出错!请稍候再试!");
+ }
+ });
}
//终止
@@ -234,63 +75,63 @@
return false;
}
var ids = null;
- for ( var i = 0, len = records.length; i < len; i++) {
+ for (var i = 0, len = records.length; i < len; i++) {
var status = records[i].data['deliverStatus'];
- if(status=='已发货'|| status=='已终止'){
+ if (status == '已发货' || status == '已终止') {
//serialNumber在data属性下为空,改为json属性,如下:records[i].json['serialNumber']
- showResult("流水号为【"+records[i].json['serialNumber']+"】的单已发货或已终止,不能被终止!");
+ showResult("流水号为【" + records[i].json['serialNumber'] + "】的单已发货或已终止,不能被终止!");
return;
- }else{
+ } else {
if (ids == null) {
ids = records[i].data['id'];
} else {
ids = ids + ';' + records[i].data['id'];
}
}
}
- top.Ext.MessageBox.confirm("请确认","是否确定要终止选中的灭菌记录信息?",function(button, text) {
- if(button == 'yes'){
+ top.Ext.MessageBox.confirm("请确认", "是否确定要终止选中的灭菌记录信息?", function (button, text) {
+ if (button == 'yes') {
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/proxyDisinfectionAction!endProxyDisinfection.do',
- params : {
- ids : ids
- },success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/proxyDisinfectionAction!endProxyDisinfection.do',
+ params: {
+ ids: ids
+ }, success: function (response, options) {
var result = Ext.decode(response.responseText);
var success = result.success;
if (true != success) {
- MsgTip.msg('提示', result.cause,true,3);
+ MsgTip.msg('提示', result.cause, true, 3);
return;
} else {
- MsgTip.msg('提示','终止成功',true,3);
+ MsgTip.msg('提示', '终止成功', true, 3);
grid.dwrReload();
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
var result = Ext.decode(response.responseText);
- MsgTip.msg('提示', result.cause,true,3);
+ MsgTip.msg('提示', result.cause, true, 3);
}
});
}
});
}
var departJsonStore = new Ext.data.SimpleStore({
- fields : [ 'name','id' ],
- url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do'
+ fields: ['name', 'id'],
+ url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do'
});
//完成灭菌
-function sterilizationEnd(grid){
+function sterilizationEnd(grid) {
var records = grid.getSelectionModel().getSelections();
if (records.length == 0) {
showResult("请至少选中一条灭菌记录!");
return false;
}
-
+
var ids = null;
for (var i = 0, len = records.length; i < len; i++) {
- if ('灭菌完成'==records[i].data['status']){
+ if ('灭菌完成' == records[i].data['status']) {
showResult('已完成灭菌的记录不能重复提交');
return false;
}
@@ -300,34 +141,34 @@
ids = ids + ';' + records[i].data['id'];
}
}
-
- top.Ext.MessageBox.confirm("请确认","确定完成灭菌吗?",
- function(button, text) {
- if ("yes" == button){
+
+ top.Ext.MessageBox.confirm("请确认", "确定完成灭菌吗?",
+ function (button, text) {
+ if ("yes" == button) {
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/sterilization/sterilizationRecordAction!completeSterilization.do',
- params : {
- ids : ids
- },success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/sterilization/sterilizationRecordAction!completeSterilization.do',
+ params: {
+ ids: ids
+ }, success: function (response, options) {
var result = Ext.decode(response.responseText);
- MsgTip.msg('提示', result.message,true,3);
+ MsgTip.msg('提示', result.message, true, 3);
var success = result.success;
if (success) {
grid.dwrReload();
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
var result = Ext.decode(response.responseText);
- if(result && result.message){
- MsgTip.msg('提示', result.message,true,3);
+ if (result && result.message) {
+ MsgTip.msg('提示', result.message, true, 3);
}
}
});
}
});
}
-var loadFormData = function(grid) {
+var loadFormData = function (grid) {
var records = grid.getSelectionModel().getSelections();
if (records.length == 0) {
showResult("请选择要修改的灭菌记录!");
@@ -342,1164 +183,542 @@
};
var rd = new Ext.data.JsonReader({
- fields : [
- {name : 'id'},
- {name : 'barcode'},
- {name : 'name'}
+ fields: [
+ { name: 'id' },
+ { name: 'barcode' },
+ { name: 'name' }
]
});
-//验证条码是否重复扫描
-function isBarcodeRepeat(barcode){
- var isRepeat = false;
- if(barcode != null && barcode.length > 0){
- var rootNode = top.Ext.getCmp('proxyDisinfectionTree').getRootNode();
- rootNode.eachChild(function(pNode){
- if(pNode != null && pNode.attributes.type == '容器'){
- pNode.eachChild(function(tNode){
- if(tNode != null && tNode.attributes.barcode == barcode) {
- isRepeat = true;
- return false;
- }
- });
- } else if (pNode != null && pNode.attributes.type == '器械包') {
- if(pNode.attributes.barcode == barcode) {
- isRepeat = true;
- return false;
- }
- }
- });
- }
- return isRepeat;
-}
-
-function getBasketAndTousseInfo(){
- var rootNode = top.Ext.getCmp('proxyDisinfectionTree').getRootNode();
- var basketsArray = [];
- var tousseIdsArray = [];
-
- var returnValue = null;
- if(rootNode.item(0) == null){
- returnValue = '该代理灭菌单没有任何器械包,请扫描器械包条码。';
- return returnValue;
- }
- rootNode.eachChild(function(pNode){
- if(pNode.attributes.type == '容器'){
- if(!pNode.hasChildNodes()){
- returnValue = '请将器械包装入'+pNode.attributes.name+',或者删除该篮筐。';
- }
- var basket = {};
- basket.id = "" + pNode.attributes.id;
- basket.basketBarcode = pNode.attributes.barcode;
- basket.name = pNode.attributes.name;
-
-
- var tousseInstanceIdsInsideBasket = [];
-
- var tousseItemsInfo = null;
- pNode.eachChild(function(cNode){
-
- tousseInstanceIdsInsideBasket.push("" + cNode.attributes.id);
- });
-
- basket.tousseInstanceIdStrs = tousseInstanceIdsInsideBasket;
-
- basketsArray.push(basket);
-
- }else{
- tousseIdsArray.push("" + pNode.attributes.id);
- }
- });
- top.Ext.getCmp('toussesInfo').setValue(JSON.stringify(tousseIdsArray));
- top.Ext.getCmp('basketsInfo').setValue(JSON.stringify(basketsArray));
- return returnValue;
-}
-
-function addAndEditProxyDisinfection(id) {
-
- var resendoutStore = new Ext.data.SimpleStore( {
- fields : ['value'],
- data : [ ['是'],['否']]
- });
-
- var form = new top.Ext.FormPanel( {
- id : 'proxyDisinfectionForm',
- frame : true,
- border : 0,
- labelSeparator : ':',
- bodyStyle : 'padding:5px 5px 0px 5px',
- width : 400,
- labelAlign:'right',
- autoHeight : true,
- autoScroll : true,
- items : [{
- xtype:"fieldset",
- layout:'column',
- title :'基础信息',
- autoHeight:true,
- items:[{
- layout : 'column',
- items : [{
- xtype : 'hidden',
- name : 'id',
- id : 'id'
- },{
- xtype : 'hidden',
- name : 'toussesInfo',
- id : 'toussesInfo'
- },{
- xtype : 'hidden',
- name : 'basketsInfo',
- id : 'basketsInfo'
- },{
- xtype : 'hidden',
- name : 'departCoding',
- id : 'departCoding'
- },{
- columnWidth : .5,
- layout : 'form',
- labelWidth : 70,
- items : [{
- xtype : 'textfield',
- fieldLabel : '操作员',
- maxLength : '16',
- id : 'applicant',
- name : 'applicant',
- value : $Id('userName').value,
- cls : 'fieldReadOnlyNoRemove',
- readOnly : true,
- allowBlank : false,
- anchor : '98%'
- }]
- },{
- id:'serialNum',
- columnWidth : .5,
- layout : 'form',
- labelWidth : 90,
- items : [{
- xtype : 'textfield',
- fieldLabel : '流水号',
- maxLength : '41',
- id : 'serialNumber',
- name : 'serialNumber',
- allowBlank : true,
- anchor : '98%',
- readOnly:true,
- cls:'fieldReadOnlyNoRemove'
- }]
- }, {
- columnWidth : .5,
- layout : 'form',
- labelWidth : 70,
- items : [{
- xtype : 'textfield',
- fieldLabel : "申请科室",
- editable : false,
- name : "depart",
- id : "depart",
- anchor : '98%',
- readOnly : true,
- cls : 'fieldReadOnlyNoRemove',
- allowBlank : false
- }]
- },{
- columnWidth : .5,
- layout : 'form',
- labelWidth : 90,
- items : [{
- xtype : 'textfield',
- fieldLabel : '器械包总数',
- maxLength : '41',
- id : 'totalAmountOfTousses',
- name : 'totalAmountOfTousses',
- allowBlank : true,
- anchor : '98%',
- value : '0',
- readOnly : true,
- cls:'fieldReadOnlyNoRemove'
- }]
- }, {
- columnWidth : .5,
- layout : 'form',
- labelWidth : 70,
- items : [{
- xtype : 'datefieldWithMin',
- fieldLabel : '申请时间',
- id : 'applicationTime',
- name : 'applicationTime',
- allowBlank: false,
- editable : false,
- format : 'Y-m-d H:i',
-// value : new Date(),
- readOnly:true,
- anchor : '98%'
- }]
- },{
- columnWidth : .5,
- layout : 'form',
- labelWidth : 90,
- items : [{
- xtype : 'combo',
- fieldLabel : '是否二次发货',
- id : 'canResendout',
- name : 'canResendout',
- valueField : 'value',
- displayField : 'value',
- store : resendoutStore,
- forceSelection : true,
- editable : false,
- mode : 'local',
- value : (sstsConfig.canResendoutDefaultValueIsYes ? '是' : '否'),
- triggerAction : 'all',
- anchor : '95%'
- }]
- }, {
- columnWidth : 1,
- layout : 'form',
- labelWidth : 70,
- items : [{
- xtype : 'textarea',
- height : 45,
- fieldLabel : '备注',
- id : 'remark',
- name : 'remark',
- allowBlank : true,
- anchor : '99%'
- }]
- }]
- }]
- },{
- xtype:"fieldset",
- layout:'column',
- title :entityName + '单明细',
- autoHeight:true,
- items:[{
- layout : 'form',
- columnWidth : 1,
- items :[
- new top.Ext.tree.ColumnTree({
- id : 'proxyDisinfectionTree',
- width :660,
- height : 340,
- bodyStyle : 'border:1px solid #afd7af',
- rootVisible:false,
- autoScroll:true,
- containerScroll : true,
- columns:[
- {header:'条码',dataIndex:'barcode',width:150},
- {header:'名称',dataIndex:'name',width:230},
- {header:'状态',dataIndex:'status',width:100},
- {header:'id',dataIndex:'id',width:0,hidden:true},
- {header:'类型',dataIndex:'type',width:90},
- {header:"操作",dataIndex:'operation',hidden:!editMode, width:70,
- renderer:function(v,p,record){
- return "";
- }}
- ],
- loader: new top.Ext.tree.TreeLoader({
- uiProviders:{'col': top.Ext.tree.ColumnNodeUI}
- }),
- root: new top.Ext.tree.AsyncTreeNode({
- text:'容器'
- }),
- tbar : [{
- xtype : 'hidden',
- name : 'isDiposableGoods',
- id : 'isDiposableGoods'
- },{
- xtype : 'hidden',
- name : 'diposableGoodsAmount',
- id : 'diposableGoodsAmount'
- },{
- text : '扫描条码 :'
- },{
- xtype : 'textfield',
- id : 'package1',
- name : 'package1',
- width : 173,
- anchor : '100%',
- listeners : {
- specialkey : function(field, ee) {
- if (ee.getKey() == Ext.EventObject.ENTER) {
- loadBasketOrTousseInstance();
- }
- }
- }
- },{
- text : '容器名称:'
- },{
- xtype : 'textfield',
- id : 'basketName',
- name : 'basketName',
- width : 130,
- readOnly : true
- },{
- xtype : 'textfield',
- hidden : true,
- id : 'basketBarcode',
- name : 'basketBarcode'
- },{
- xtype : 'textfield',
- hidden : true,
- id : 'reviewedBasketId',
- name : 'reviewedBasketId'
- },{
- text : '放入容器',
- iconCls : 'btn_ext_add',
- handler : function() {
- putTousseInBasket();
- }
- }]
- })]
- }]
- }],
- buttonAlign :'center',
- buttons : [{
- id :'saveBtn',
- text : '保存',
- disabled : SSTS_ProxyDisinfection_Update,
- handler : function(){
- if(!form.getForm().isValid()){
- showResult('请正确填写表单各值');
- return false;
- }
-
- var basketName = checkEmptyBasket();
- if(basketName){
- var msg = basketName + "中还未放入任何器械包,是否提交?";
- var r = confirm(msg)
- if (r != true)
- {
- return false;
- }
- }
-
- // 开始:判断是否有器械包未入筐
- var rootNode = top.Ext.getCmp('proxyDisinfectionTree').getRootNode();
- var isExistNotInBasketTousseInstance = false;
- rootNode.eachChild(function(pNode){
- if(pNode.attributes.type == '器械包'){
- isExistNotInBasketTousseInstance = true;
- }
- });
- if (isExistNotInBasketTousseInstance){
- var r = confirm("有器械包未放入灭菌筐,是否继续?")
- if (r != true)
- {
- return false;
- }
- }
-
- // 结束:判断是否有器械包未入筐
- var confirmMessage = "是否提交"+entityName+"单信息?";
- top.Ext.MessageBox.confirm("请确认",confirmMessage,function(btn) {
- if(btn=='yes') {
- var validation = getBasketAndTousseInfo();
- if(validation!=null){
- showResult(validation);
- return false;
- }
-
- var submitActionUrl = WWWROOT + '/disinfectSystem/proxyDisinfectionAction!saveProxyDisinfection.do';
- form.form.submit({
- url : submitActionUrl,
- method : 'POST',
- waitMsg : '正在保存数据,请稍候',
- waitTitle : '提交表单',
- success : function(form, action) {
- showResult(action.result.message);
- grid.dwrReload();
- window.close();
- },
- failure : function(form, action) {
- if(action.result && action.result.message){
- showResult(action.result.message);
- }
- }
- });
- }
- });
- }
- },{
- text : '取消',
- handler : function() {
- window.close();
- }
- }]
- });
- function clearGoodsGrid(){
- top.Ext.getCmp('totalAmountOfTousses').setValue('0');
- var childNodes = top.Ext.getCmp('proxyDisinfectionTree').getRootNode().childNodes;
- //并清空器械包明细列表
- if(childNodes && childNodes.length > 0){
- for(var len=childNodes.length-1;len>=0;len--){
- childNodes[len].remove();
- }
- }
- }
- //根据条码获取包信息
- function loadBasketOrTousseInstance() {
- var barcode = top.Ext.getCmp('package1').getValue();
- top.Ext.getCmp('package1').setValue("");
- var b = isBarcodeRepeat(barcode);
- if(b){
- showResult('条形码:'+barcode+' 已经存在!');
- return false;
- }
- Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/proxyDisinfectionAction!loadBasketOrTousseInstance.do',
- params : {id:top.Ext.getCmp('id').getValue(),barcode : barcode},
- success : function(response, options) {
- var result = Ext.decode(response.responseText);
- if (result.success) {
- if(result.type == "器械包"){
- if(result.isProxyed == true){
- showResult('该器械包已经申请代理灭菌,不能重复申请。');
- return false;
- }else{
- var orgUnitCode = result.produceDeptCode;
- var orgUnitName = result.produceDeptName;
- var departCodingCmp = top.Ext.getCmp('departCoding');
- if(departCodingCmp.getValue() == ''){
- departCodingCmp.setValue(orgUnitCode);
- top.Ext.getCmp('depart').setValue(orgUnitName);
- addTousseInstance(result.id,barcode,result.name,result.status);
- }else if(departCodingCmp.getValue() != orgUnitCode){
- top.Ext.MessageBox.confirm("请确认","该器械包属于"+orgUnitName+",是否将申请科室改为"+orgUnitName+"并清空器械包明细列表?",
- function(button, text) {
- if ("yes" == button){
- top.Ext.getCmp('departCoding').setValue(orgUnitCode);
- top.Ext.getCmp('depart').setValue(orgUnitName);
- clearGoodsGrid();
- addTousseInstance(result.id,barcode,result.name,result.status);
- }
- }
- );
- }else{
- addTousseInstance(result.id,barcode,result.name,result.status);
- }
- }
- }else if(result.type == "容器"){
- var containerType = result.purpose;
- if(containerType == '灭菌筐'){
- var notDeliverTousseAmount = result.notDeliverTousseAmount;
- if(checkExistBasket(barcode)){
- showResult(result.containerName + "已经扫描");
- return false;
- }
- if(notDeliverTousseAmount > 0){
- if(sstsConfig.disableGoodsNotShippedAlert){
- top.Ext.getCmp('basketBarcode').setValue(barcode);
- var remark = top.Ext.getCmp('remark').getValue();
- remark = barcode+";"+remark;
- top.Ext.getCmp('remark').setValue(remark);
- top.Ext.getCmp('reviewedBasketId').setValue(result.basketId);
- top.Ext.getCmp('basketName').setValue(result.containerName);
-
- var orgUnitCode = result.produceDeptCode;
- var orgUnitName = result.produceDeptName;
- if(currentDepartCoding != orgUnitCode){
- var departCodingCmp = top.Ext.getCmp('departCoding');
- if(departCodingCmp.getValue() == ''){
- departCodingCmp.setValue(orgUnitCode);
- top.Ext.getCmp('depart').setValue(orgUnitName);
- bindTousseToBaseket(result.basketId,barcode,result.containerName,result.instances);
- }else if(departCodingCmp.getValue() != orgUnitCode){
- top.Ext.MessageBox.confirm("请确认","该灭菌筐属于"+orgUnitName+",是否将申请科室改为"+orgUnitName+"并清空器械包明细列表?",
- function(button, text) {
- if ("yes" == button){
- departCodingCmp.setValue(orgUnitCode);
- top.Ext.getCmp('depart').setValue(orgUnitName);
- clearGoodsGrid();
- bindTousseToBaseket(result.basketId,barcode,result.containerName,result.instances);
- }
- }
- );
- }else{
- bindTousseToBaseket(result.basketId,barcode,result.containerName,result.instances);
- }
- }
- }else {
- top.Ext.MessageBox.confirm("请确认","【"+result.containerName+"】内有"+notDeliverTousseAmount+"个未发货的包,继续使用会导致不能扫描篮筐条码发货,是否继续?",function(button, text) {
- if ("yes" == button){
- top.Ext.getCmp('basketBarcode').setValue(barcode);
- var remark = top.Ext.getCmp('remark').getValue();
- remark = barcode+";"+remark;
- top.Ext.getCmp('remark').setValue(remark);
- top.Ext.getCmp('reviewedBasketId').setValue(result.basketId);
- top.Ext.getCmp('basketName').setValue(result.containerName);
-
- var orgUnitCode = result.produceDeptCode;
- var orgUnitName = result.produceDeptName;
- if(currentDepartCoding != orgUnitCode){
- var departCodingCmp = top.Ext.getCmp('departCoding');
- if(departCodingCmp.getValue() == ''){
- departCodingCmp.setValue(orgUnitCode);
- top.Ext.getCmp('depart').setValue(orgUnitName);
- bindTousseToBaseket(result.basketId,barcode,result.containerName,result.instances);
- }else if(departCodingCmp.getValue() != orgUnitCode){
- top.Ext.MessageBox.confirm("请确认","该灭菌筐属于"+orgUnitName+",是否将申请科室改为"+orgUnitName+"并清空器械包明细列表?",
- function(button, text) {
- if ("yes" == button){
- departCodingCmp.setValue(orgUnitCode);
- top.Ext.getCmp('depart').setValue(orgUnitName);
- clearGoodsGrid();
- bindTousseToBaseket(result.basketId,barcode,result.containerName,result.instances);
- }
- }
- );
- }else{
- bindTousseToBaseket(result.basketId,barcode,result.containerName,result.instances);
- }
- }
- }
- });
- }
- }else {
- top.Ext.getCmp('basketBarcode').setValue(barcode);
- var remark = top.Ext.getCmp('remark').getValue();
- remark = barcode+";"+remark;
- top.Ext.getCmp('remark').setValue(remark);
- top.Ext.getCmp('reviewedBasketId').setValue(result.basketId);
- top.Ext.getCmp('basketName').setValue(result.containerName);
-
- var orgUnitCode = result.produceDeptCode;
- var orgUnitName = result.produceDeptName;
- if(currentDepartCoding != orgUnitCode){
- var departCodingCmp = top.Ext.getCmp('departCoding');
- if(departCodingCmp.getValue() == ''){
- departCodingCmp.setValue(orgUnitCode);
- top.Ext.getCmp('depart').setValue(orgUnitName);
- bindTousseToBaseket(result.basketId,barcode,result.containerName,result.instances);
- }else if(departCodingCmp.getValue() != orgUnitCode){
- top.Ext.MessageBox.confirm("请确认","该灭菌筐属于"+orgUnitName+",是否将申请科室改为"+orgUnitName+"并清空器械包明细列表?",
- function(button, text) {
- if ("yes" == button){
- departCodingCmp.setValue(orgUnitCode);
- top.Ext.getCmp('depart').setValue(orgUnitName);
- clearGoodsGrid();
- bindTousseToBaseket(result.basketId,barcode,result.containerName,result.instances);
- }
- }
- );
- }else{
- bindTousseToBaseket(result.basketId,barcode,result.containerName,result.instances);
- }
- }
- }
- }else{
- if(result.message){
- showResult(result.message);
- }else{
- showResult('代理灭菌入筐只能使用灭菌筐。');
- }
-
- }
-
- }
- }else{
- if(result.message){
- showResult(result.message);
- }else{
- showResult('请扫描器械包或者篮筐条码!');
- }
- }
-
- },
- failure : function(response, options) {
- var result = Ext.decode(response.responseText);
- showResult(result);
- }
- });
- }
-
- var window = new top.Ext.Window( {
- id : 'recyclingApplicationWin',
- layout : 'fit',
- title : entityName + '单信息',
- width : 720,
- modal : true,
- border : false,
- plain : true,
- items : [ form ]
- });
- window.show();
-
- if(id != 0){
- form.form.load( {
- url : WWWROOT + '/disinfectSystem/proxyDisinfectionAction!loadProxyDisinfection.do',
- method : 'GET',
- waitMsg : '正在加载数据,请稍候',
- success : function(form, action) {
- top.Ext.getCmp('applicationTime').setValue(formatDateYear(action.result.data.applicationTime));
- var status = action.result.data.deliverStatus;
- editMode = action.result.editMode;
- if(status != '待发货' || editMode == false){
- top.Ext.getCmp('saveBtn').disable();
- }
- var rootNode = top.Ext.getCmp('proxyDisinfectionTree').getRootNode();
- var instancesBarcodeInBasket = ';';
- for(var i = 0 ;i < action.result.baskets.length; i++){
- var basket = action.result.baskets[i];
- var basketNode = createNode(true,basket.id,basket.barcode,basket.name,'容器','');
- rootNode.appendChild(basketNode);
- for(var j = 0 ; j < basket.instances.length ; j++){
- var instance = basket.instances[j];
- instancesBarcodeInBasket += instance.barcode + ';';
- var instanceNode = createNode(false,instance.id,instance.barcode,instance.name,'器械包',instance.status);
- basketNode.appendChild(instanceNode);
- }
- }
-
- for(var i = 0 ;i < action.result.instances.length; i++){
- var instance = action.result.instances[i];
- if(instancesBarcodeInBasket.indexOf(';' + instance.barcode + ';') < 0){
- var instanceNode = createNode(false,instance.id,instance.barcode,instance.name,'器械包',instance.status);
- rootNode.appendChild(instanceNode);
- }
- }
-
- },
- failure : function(form, action) {
- },
- params : {
- id : id
- }
- });
- }
-
- if (!id) {
- setStartDate(top.Ext, 'yyyy/MM/dd HH:mm', 'applicationTime'); //(设置申请时间,取服务器时间 cjr)
- }
-
- top.Ext.getCmp('package1').focus(false, 100);
-}
-
/**
* 修改记录
* modifyRecord函数 触发modify函数调用,并传入当前列的值以及record.data对象
* 页面中需要定义 modify(v,data) 函数
*/
-function modify(v,data){
- var records = grid.getSelectionModel().getSelections();
- var id = records[0].data['id'];
- addAndEditProxyDisinfection(id);
+function modify(v, data) {
+ var records = grid.getSelectionModel().getSelections();
+ var id = records[0].data['id'];
+ addAndEditProxyDisinfection(id);
}
//发货单
-function searchInvoice(id){
+function searchInvoice(id) {
$Id('parm_s_recyclingApplicantID').value = id;
- var rd = new Ext.data.JsonReader( {
- fields : [{
- name : 'id'
- },{
- name : 'barcode'
+ var rd = new Ext.data.JsonReader({
+ fields: [{
+ name: 'id'
}, {
- name : 'name'
+ name: 'barcode'
}, {
- name : 'count'
+ name: 'name'
}, {
- name : 'diposable'
- },{
- name : 'price'
- },{
- name : 'tempAmount'
- },{
- name : 'amount'
- },{
- name : 'applicationAmount'
+ name: 'count'
+ }, {
+ name: 'diposable'
+ }, {
+ name: 'price'
+ }, {
+ name: 'tempAmount'
+ }, {
+ name: 'amount'
+ }, {
+ name: 'applicationAmount'
}]
});
-
- var invoiceColumns = [ {
- header : "流水号",
- width : 120,
- dataIndex : 'serialNumber'
- },{
- header : "申请科室",
- width : 120,
- hidden : true,
- dataIndex : 'depart'
- },{
- header : "发货员",
- width : 70,
- dataIndex : 'sender'
+
+ var invoiceColumns = [{
+ header: "流水号",
+ width: 120,
+ dataIndex: 'serialNumber'
}, {
- header : "发货时间",
- width : 120,
- dataIndex : 'sendTime',
- renderer : myDateFormatByMinute
+ header: "申请科室",
+ width: 120,
+ hidden: true,
+ dataIndex: 'depart'
}, {
- header : "状态",
- width : 120,
- dataIndex : 'status'
+ header: "发货员",
+ width: 70,
+ dataIndex: 'sender'
}, {
- id : 'remark',
- header : "备注",
- width : 120,
- hidden : true,
- dataIndex : 'remark'
- } ];
-
+ header: "发货时间",
+ width: 120,
+ dataIndex: 'sendTime',
+ renderer: myDateFormatByMinute
+ }, {
+ header: "状态",
+ width: 120,
+ dataIndex: 'status'
+ }, {
+ id: 'remark',
+ header: "备注",
+ width: 120,
+ hidden: true,
+ dataIndex: 'remark'
+ }];
+
//申请的物品
var recyclingapplicationStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/invoiceAction!loadRecyclingApplicationByid.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/invoiceAction!loadRecyclingApplicationByid.do',
+ method: 'POST'
}),
- reader : rd
+ reader: rd
});
-
- var recyclingapplicationCm = new Ext.grid.ColumnModel( [{
- id :'id',
- dataIndex :'id',
- hidden :true
- },{
- header : "物品名称",
- dataIndex : 'name',
- width : 140,
- sortable : true
+
+ var recyclingapplicationCm = new Ext.grid.ColumnModel([{
+ id: 'id',
+ dataIndex: 'id',
+ hidden: true
}, {
- header : "发货数量",
- dataIndex : 'count',
- width : 60
- },{
- header : '实发数量',
- dataIndex : 'tempAmount',
- width : 60,
- value : 0,
- hidden : true
- },{
- id : 'diposable',
- header : "是否一次性材料",
- dataIndex : 'diposable'
+ header: "物品名称",
+ dataIndex: 'name',
+ width: 140,
+ sortable: true
}, {
+ header: "发货数量",
+ dataIndex: 'count',
+ width: 60
+ }, {
+ header: '实发数量',
+ dataIndex: 'tempAmount',
+ width: 60,
+ value: 0,
+ hidden: true
+ }, {
+ id: 'diposable',
+ header: "是否一次性材料",
+ dataIndex: 'diposable'
+ }, {
id: 'amount',
- header : '待发数量',
- dataIndex : 'amount',
- width : 100,
- hidden : true
- },{
- id :'applicationAmount',
- header : "申请数量",
- dataIndex : 'applicationAmount',
- hidden : true,
- width :150
- } ]);
- var readerDetail2 = [ {
- name : 'id'
- },{
- name : 'serialNumber'
- },{
- name : 'depart'
+ header: '待发数量',
+ dataIndex: 'amount',
+ width: 100,
+ hidden: true
}, {
- name : 'sender'
+ id: 'applicationAmount',
+ header: "申请数量",
+ dataIndex: 'applicationAmount',
+ hidden: true,
+ width: 150
+ }]);
+ var readerDetail2 = [{
+ name: 'id'
}, {
- name : 'sendTime'
+ name: 'serialNumber'
}, {
- name : 'status'
+ name: 'depart'
}, {
- name : 'remark'
- } ];
-
- var filters2 = new Ext.grid.GridFilters( {
- filters : [{
- type : 'string',
- dataIndex : 'sender'
- },{
- type : 'date',
- dataIndex : 'sendTime'
- },{
- type : 'string',
- dataIndex : 'remark'
+ name: 'sender'
+ }, {
+ name: 'sendTime'
+ }, {
+ name: 'status'
+ }, {
+ name: 'remark'
+ }];
+
+ var filters2 = new Ext.grid.GridFilters({
+ filters: [{
+ type: 'string',
+ dataIndex: 'sender'
+ }, {
+ type: 'date',
+ dataIndex: 'sendTime'
+ }, {
+ type: 'string',
+ dataIndex: 'remark'
}]
});
-
+
//发货单
- var invoiceGrid = new Ext.ux.ForgonPageGrid( {
- tbar : null,
- pageSize : 20,
- defaultSortField : 'id',
- defaultSortDirection : 'ASC',
- isCheckboxSelectionModel : true,
- rememberSelected : false,
- isShowSearchField : false,
- columns : invoiceColumns,
- plugins : filters2,
- autoExpandColumn : 'remark',
- renderTo : 'gridDiv',
- frame : false
+ var invoiceGrid = new Ext.ux.ForgonPageGrid({
+ tbar: null,
+ pageSize: 20,
+ defaultSortField: 'id',
+ defaultSortDirection: 'ASC',
+ isCheckboxSelectionModel: true,
+ rememberSelected: false,
+ isShowSearchField: false,
+ columns: invoiceColumns,
+ plugins: filters2,
+ autoExpandColumn: 'remark',
+ renderTo: 'gridDiv',
+ frame: false
}, readerDetail2, InvoiceTableManager.findInvoiceTableList, null);
-
- invoiceGrid.on('rowclick', function(grid, index) {
+
+ invoiceGrid.on('rowclick', function (grid, index) {
var record = grid.getSelectionModel().getSelected();
var invoiceID = record.data.id;
- invoiceFormPanel.form.load( {
- url : WWWROOT + '/disinfectSystem/invoiceAction!loadInvoice.do',
- method : 'GET',
- waitMsg : '正在加载数据,请稍候',
- success : function(form, action) {
+ invoiceFormPanel.form.load({
+ url: WWWROOT + '/disinfectSystem/invoiceAction!loadInvoice.do',
+ method: 'GET',
+ waitMsg: '正在加载数据,请稍候',
+ success: function (form, action) {
Ext.getCmp('applicationTime').setValue(formatDateYear(action.result.data.applicationTime));
Ext.getCmp('sendTime').setValue(formatDateYear(action.result.data.sendTime));
Ext.getCmp('receiptingTime').setRawValue(formatDateYear(action.result.data.receiptingTime));
var status = action.result.data.status;
- if(status != '收货签收'){
+ if (status != '收货签收') {
Ext.getCmp('receiptingTime').setValue(new Date());
Ext.getCmp('receiptor').setValue(document.getElementById('userName').value);
}
- if(status == '收货签收'){
+ if (status == '收货签收') {
Ext.getCmp('saveBtn').disable();
- }else{
+ } else {
Ext.getCmp('saveBtn').enable();
}
},
- failure : function(form, action) {
+ failure: function (form, action) {
},
- params : {
- id : invoiceID
+ params: {
+ id: invoiceID
}
});
-
- recyclingapplicationStore.on("beforeload", function(thiz, options) {
+
+ recyclingapplicationStore.on("beforeload", function (thiz, options) {
thiz.baseParams["id"] = invoiceID;
});
recyclingapplicationStore.load();
-
-
-
+
+
+
}, this, {
- buffer : 250
+ buffer: 250
});
//发货单表单明细
- var invoiceFormPanel = new Ext.FormPanel( {
- id : 'invoiceForm',
- frame : true,
- border : 0,
- labelSeparator : ':',
- bodyStyle : 'padding:5px 5px 0px 5px',
- width : 400,
- labelAlign:'left',
- autoHeight : true,
- autoScroll : true,
- items : [{
- layout : 'column',
- items :[{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 60,
- items :[{
- xtype : 'textfield',
- fieldLabel : '流水号',
- maxLength : '41',
- id : 'serialNumber',
- name : 'serialNumber',
- readOnly:true,
- anchor : '99%'
- }]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 60,
- items :[{
- xtype : 'textfield',
- fieldLabel : '操作员',
- maxLength : '41',
- id : 'applicant',
- name : 'applicant',
- readOnly:true,
- anchor : '99%'
- }]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 60,
- items :[{
- xtype : 'textfield',
- fieldLabel : '申请科室',
- maxLength : '100',
- id : 'depart',
- name : 'depart',
- readOnly:true,
- anchor : '99%'
- }]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth : 60,
- items :[{
- xtype : 'textfield',
- fieldLabel : '申请时间',
- id : 'applicationTime',
- name : 'applicationTime',
- readOnly:true,
- format : 'Y-m-d',
- anchor : '99%'
- }]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth :60,
- items : [{
- xtype : 'textfield',
- fieldLabel : '发货时间',
- id : 'sendTime',
- name : 'sendTime',
- editable : false,
- format : 'Y-m-d',
- anchor : '99%',
- readOnly : true
+ var invoiceFormPanel = new Ext.FormPanel({
+ id: 'invoiceForm',
+ frame: true,
+ border: 0,
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 5px',
+ width: 400,
+ labelAlign: 'left',
+ autoHeight: true,
+ autoScroll: true,
+ items: [{
+ layout: 'column',
+ items: [{
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 60,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '流水号',
+ maxLength: '41',
+ id: 'serialNumber',
+ name: 'serialNumber',
+ readOnly: true,
+ anchor: '99%'
}]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth :60,
- items : [{
- xtype : 'textfield',
- fieldLabel : '发货员',
- maxLength : '16',
- id : 'sender',
- name : 'sender',
- anchor : '99%',
- readOnly : true
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 60,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '操作员',
+ maxLength: '41',
+ id: 'applicant',
+ name: 'applicant',
+ readOnly: true,
+ anchor: '99%'
}]
- },{
- layout : 'form',
- columnWidth : 1,
- labelWidth :60,
- items : [{
- xtype : 'textfield',
- fieldLabel : '备注',
- id : 'remark',
- name : 'remark',
- anchor : '99%',
- height : 40,
- readOnly : true
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 60,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '申请科室',
+ maxLength: '100',
+ id: 'depart',
+ name: 'depart',
+ readOnly: true,
+ anchor: '99%'
}]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth :60,
- items : [{
- xtype : 'textfield',
- fieldLabel : '签收人',
- maxLength : '16',
- id : 'receiptor',
- name : 'receiptor',
- readOnly : true,
- anchor : '99%'
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 60,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '申请时间',
+ id: 'applicationTime',
+ name: 'applicationTime',
+ readOnly: true,
+ format: 'Y-m-d',
+ anchor: '99%'
}]
- },{
- layout : 'form',
- columnWidth : 0.5,
- labelWidth :60,
- items : [{
- xtype : 'datefield',
- fieldLabel : '签收时间',
- id : 'receiptingTime',
- name : 'receiptingTime',
- editable : false,
- format : 'Y-m-d',
- readOnly : true,
- anchor : '99%'
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 60,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '发货时间',
+ id: 'sendTime',
+ name: 'sendTime',
+ editable: false,
+ format: 'Y-m-d',
+ anchor: '99%',
+ readOnly: true
}]
- },{
- layout : 'form',
- columnWidth : 1,
- labelWidth :50,
- items : [new Ext.grid.EditorGridPanel({
- id : 'recyclingGrid1',
- title : '发货单',
- store : recyclingapplicationStore,
- cm : recyclingapplicationCm,
- width : '100%',
- height : 250,
- autoExpandColumn : 'diposable',
- frame : false,
- bodyStyle : 'border:1px solid #afd7af',
- clicksToEdit:1,
- selModel : new Ext.grid.RowSelectionModel({
- singleSelect : false
- })
- })
- ]
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 60,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '发货员',
+ maxLength: '16',
+ id: 'sender',
+ name: 'sender',
+ anchor: '99%',
+ readOnly: true
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ labelWidth: 60,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '备注',
+ id: 'remark',
+ name: 'remark',
+ anchor: '99%',
+ height: 40,
+ readOnly: true
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 60,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '签收人',
+ maxLength: '16',
+ id: 'receiptor',
+ name: 'receiptor',
+ readOnly: true,
+ anchor: '99%'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.5,
+ labelWidth: 60,
+ items: [{
+ xtype: 'datefield',
+ fieldLabel: '签收时间',
+ id: 'receiptingTime',
+ name: 'receiptingTime',
+ editable: false,
+ format: 'Y-m-d',
+ readOnly: true,
+ anchor: '99%'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ labelWidth: 50,
+ items: [new Ext.grid.EditorGridPanel({
+ id: 'recyclingGrid1',
+ title: '发货单',
+ store: recyclingapplicationStore,
+ cm: recyclingapplicationCm,
+ width: '100%',
+ height: 250,
+ autoExpandColumn: 'diposable',
+ frame: false,
+ bodyStyle: 'border:1px solid #afd7af',
+ clicksToEdit: 1,
+ selModel: new Ext.grid.RowSelectionModel({
+ singleSelect: false
+ })
+ })
+ ]
}]
}],
- buttons : [{
- id : 'saveBtn',
- text : '签收保存',
- handler : function() {
- var receiptor = Ext.getCmp('receiptor').getValue();
- var receiptingTime = Ext.getCmp('receiptingTime').getValue();
- var record = invoiceGrid.getSelectionModel().getSelected();
- var invoiceId = record==null?null:record.data.id;
- if(invoiceId != null){
- DWREngine.setAsync(false);
- InvoiceTableManager.updateInvoiceStatus(invoiceId,function(){
- /*invoiceGrid.dwrReload();
- grid.getStore().reload();
- MsgTip.msg('提示', '签收保存成功!',true,3);
- this.disable();*/
- });
- invoiceGrid.dwrReload();
- grid.getStore().reload();
- MsgTip.msg('提示', '签收保存成功!',true,3);
- this.disable();
- DWREngine.setAsync(true);
- }else{
- showResult("请选择待签收的发货单!");
- }
+ buttons: [{
+ id: 'saveBtn',
+ text: '签收保存',
+ handler: function () {
+ var receiptor = Ext.getCmp('receiptor').getValue();
+ var receiptingTime = Ext.getCmp('receiptingTime').getValue();
+ var record = invoiceGrid.getSelectionModel().getSelected();
+ var invoiceId = record == null ? null : record.data.id;
+ if (invoiceId != null) {
+ DWREngine.setAsync(false);
+ InvoiceTableManager.updateInvoiceStatus(invoiceId, function () {
+ /*invoiceGrid.dwrReload();
+ grid.getStore().reload();
+ MsgTip.msg('提示', '签收保存成功!',true,3);
+ this.disable();*/
+ });
+ invoiceGrid.dwrReload();
+ grid.getStore().reload();
+ MsgTip.msg('提示', '签收保存成功!', true, 3);
+ this.disable();
+ DWREngine.setAsync(true);
+ } else {
+ showResult("请选择待签收的发货单!");
+ }
}
}]
- });
-
+ });
+
var invoiceWindow = new Ext.Window({
- id : 'invoiceWin',
- layout : 'border',
- title : '发货单列表',
- width : 850,
- autoHeight : false,
- border : false,
- height:480,
- plain : true,
- modal :true,
- items : [{
- region:'west',
+ id: 'invoiceWin',
+ layout: 'border',
+ title: '发货单列表',
+ width: 850,
+ autoHeight: false,
+ border: false,
+ height: 480,
+ plain: true,
+ modal: true,
+ items: [{
+ region: 'west',
width: '55%',
- items:[invoiceGrid]
- },{
- region:'center'
- },{
- region:'east',
- width: '45%',
- layout :'fit',
- items:[invoiceFormPanel]
+ items: [invoiceGrid]
+ }, {
+ region: 'center'
+ }, {
+ region: 'east',
+ width: '45%',
+ layout: 'fit',
+ items: [invoiceFormPanel]
}]
});
invoiceWindow.show();
}
-Ext.onReady(function() {
+Ext.onReady(function () {
Ext.QuickTips.init();
-
+
var columns = [
- {header : "操作员",width : 120,dataIndex : 'applicant', renderer : modifyRecord},
- {header : "申请时间",width : 120,dataIndex : 'applicationTime',renderer : myDateFormatByMinute},
- {header : "申请部门",width : 120,dataIndex : 'depart'},
- {header : "器械包总数",width : 100,dataIndex : 'totalAmountOfTousses'},
- {header : "状态",width : 80,dataIndex : 'deliverStatus'},
- {header:'查看发货单',align :'center',renderer: function(v,p,record){
- var status = record.data.deliverStatus;
- if(status == '已发货'){
- var str = "
";
- return str;
- }else if(status == '部分发货'){
- var str = "
";
- return str;
- }else{
- var str = null;
- return str;
+ { header: "操作员", width: 120, dataIndex: 'applicant', renderer: modifyRecord },
+ { header: "申请时间", width: 120, dataIndex: 'applicationTime', renderer: myDateFormatByMinute },
+ { header: "申请部门", width: 120, dataIndex: 'depart' },
+ { header: "器械包总数", width: 100, dataIndex: 'totalAmountOfTousses' },
+ { header: "状态", width: 80, dataIndex: 'deliverStatus' },
+ {
+ header: '查看发货单', align: 'center', renderer: function (v, p, record) {
+ var status = record.data.deliverStatus;
+ if (status == '已发货') {
+ var str = "
";
+ return str;
+ } else if (status == '部分发货') {
+ var str = "
";
+ return str;
+ } else {
+ var str = null;
+ return str;
+ }
}
- }},
- {id :'remark',header : "备注",width : 120,dataIndex : 'remark'}
+ },
+ { id: 'remark', header: "备注", width: 120, dataIndex: 'remark' }
];
-
+
var readerDetail = [
- {name : 'id'},
- {name : 'applicant'},
- {name : 'applicationTime'},
- {name : 'depart'},
- {name : 'totalAmountOfTousses'},
- {name : 'remark'},
- {name : 'deliverStatus'}
+ { name: 'id' },
+ { name: 'applicant' },
+ { name: 'applicationTime' },
+ { name: 'depart' },
+ { name: 'totalAmountOfTousses' },
+ { name: 'remark' },
+ { name: 'deliverStatus' }
];
-
+
+ var optionsArray = ['待接收', '部分接收', '待发货', '已发货', '已终止']
+
var filters = new Ext.grid.GridFilters({
- filters : [
- {type : 'string',dataIndex : 'applicant'},
- {type : 'string',dataIndex : 'deliverStatus'},
- {type : 'string',dataIndex : 'depart'},
- {type : 'numeric',dataIndex : 'totalAmountOfTousses'},
- {type : 'string',dataIndex : 'remark'},
- {type : 'date',dataIndex : 'applicationTime'}
+ filters: [
+ { type: 'string', dataIndex: 'applicant' },
+ { type: 'list', dataIndex: 'deliverStatus', phpMode: true, options: optionsArray },
+ { type: 'string', dataIndex: 'depart' },
+ { type: 'numeric', dataIndex: 'totalAmountOfTousses' },
+ { type: 'string', dataIndex: 'remark' },
+ { type: 'date', dataIndex: 'applicationTime' }
]
});
-
+
var tbar = [{
- text : '添加',
- hidden : SSTS_ProxyDisinfection_Create,
- iconCls : 'btn_ext_application_add',
- handler : function(){
+ text: '添加',
+ hidden: SSTS_ProxyDisinfection_Create,
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
addAndEditProxyDisinfection(0);
}
}, '-', {
- text : '修改',
- hidden : SSTS_ProxyDisinfection_Update,
- iconCls : 'btn_ext_application_edit',
- id : 'editTbar',
- handler : function(){
+ text: '修改',
+ hidden: SSTS_ProxyDisinfection_Update,
+ iconCls: 'btn_ext_application_edit',
+ id: 'editTbar',
+ handler: function () {
var records = grid.getSelectionModel().getSelections();
id = records[0].data['id'];
addAndEditProxyDisinfection(id);
}
}, '-', {
- text : '删除',
- hidden : SSTS_ProxyDisinfection_Delete,
- iconCls : 'btn_ext_application_del',
- handler : function(){
+ text: '删除',
+ hidden: SSTS_ProxyDisinfection_Delete,
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
deleteProxyDisinfection(grid);
}
}, '-', {
- text : '终止',
- hidden : SSTS_ProxyDisinfection_Delete,
- iconCls : 'btn_ext_application_del',
- handler : function(){
+ text: '终止',
+ hidden: SSTS_ProxyDisinfection_Delete,
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
endProxyDisinfection(grid);
}
}];
-
- Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function() {};
- grid = new Ext.ux.ForgonPageGrid( {
- title : '代理灭菌列表',
- tbar : tbar,
- pageSize : 20,
- defaultSortField : 'applicationTime',
- defaultSortDirection : 'DESC',
- isCheckboxSelectionModel : true,
- rememberSelected : false,
- isShowSearchField : true,
- columns : columns,
- plugins : filters,
- autoExpandColumn : 'remark',
- renderTo : 'gridDiv',
- frame : false
+ Ext.ux.ForgonPageGrid.prototype.getGridParameterMap = function () { };
+
+ grid = new Ext.ux.ForgonPageGrid({
+ title: '代理灭菌列表',
+ tbar: tbar,
+ pageSize: 20,
+ defaultSortField: 'applicationTime',
+ defaultSortDirection: 'DESC',
+ isCheckboxSelectionModel: true,
+ rememberSelected: false,
+ isShowSearchField: true,
+ columns: columns,
+ plugins: filters,
+ autoExpandColumn: 'remark',
+ renderTo: 'gridDiv',
+ frame: false
}, readerDetail,
ProxyDisinfectionTableManager.findProxyDisinfectionTableList,
null // 这个参数只是占位作用
);
-
- grid.on('mouseover', function(e) {
+
+ grid.on('mouseover', function (e) {
var index = grid.getView().findRowIndex(e.getTarget());
if (index !== false) {
var record = this.getStore().getAt(index);
var tableContent = record.data['htmlContent'];
- if(!tableContent){
+ if (!tableContent) {
var content = "";
DWREngine.setAsync(false);
- ProxyDisinfectionTableManager.getProxyDisinfectionItems(record.data['id'],function(jsonAarry){
+ ProxyDisinfectionTableManager.getProxyDisinfectionItems(record.data['id'], function (jsonAarry) {
var result = Ext.decode(jsonAarry);
for (var i = 1; i <= result.length; i++) {
- var tousseName = result[i-1].tousseName;
- var amount = result[i-1].amount;
- if(i % 2 != 0){
+ var tousseName = result[i - 1].tousseName;
+ var amount = result[i - 1].amount;
+ if (i % 2 != 0) {
content += "