Index: ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.js
===================================================================
diff -u -r32872 -r33249
--- ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.js (.../useRecordView.js) (revision 32872)
+++ ssts-web/src/main/webapp/disinfectsystem/useRecord/useRecordView.js (.../useRecordView.js) (revision 33249)
@@ -6,54 +6,54 @@
var formSubmitResultSucc = "1";
var formSubmitResultFail = "-1";
-var setRecyclingStatusName = sstsConfig.monitorGoodsRecyclingStatusForUseRecord ?"设置已回收":""
+var setRecyclingStatusName = sstsConfig.monitorGoodsRecyclingStatusForUseRecord ? "设置已回收" : ""
//添加使用记录
-function newUseRecord(){
- addAndEditUseRecord('', '','');
+function newUseRecord() {
+ addAndEditUseRecord('', '', '');
setTimeout("top.Ext.getCmp('hospitalNum').focus(true)", 500);
}
var departJsonStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do?related=false',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getAllOrgUnitName.do?related=false',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- root : 'data'
+ reader: new Ext.data.JsonReader({
+ root: 'data'
},
- [{name : 'id',mapping : 'id'},{name : 'name',mapping : 'name'}])
+ [{ name: 'id', mapping: 'id' }, { name: 'name', mapping: 'name' }])
});
departJsonStore.load();
/**
* 批量设置状态为已回收
* @param ids
*/
-function batchSetRectgled(ids){
- var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"正在修改状态...."});
+function batchSetRectgled(ids) {
+ var myMask = new Ext.LoadMask(Ext.getBody(), { msg: "正在修改状态...." });
myMask.show();
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/useRecordAction!batchSetRectgled.do',
- method:'POST',
- params : {
- ids:ids
- },
- success : function(response, options) {
- var result = Ext.decode(response.responseText);
- myMask.hide();
- if(result.message){
- showResult(result.message);
- }
- grid.dwrReload();
- },
- failure : function(response, options) {
- myMask.hide();
- var result = Ext.decode(response.responseText);
- if(result.message){
- showResult(result.message);
- }
- }
- });
-
+ url: WWWROOT + '/disinfectSystem/useRecordAction!batchSetRectgled.do',
+ method: 'POST',
+ params: {
+ ids: ids
+ },
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ myMask.hide();
+ if (result.message) {
+ showResult(result.message);
+ }
+ grid.dwrReload();
+ },
+ failure: function (response, options) {
+ myMask.hide();
+ var result = Ext.decode(response.responseText);
+ if (result.message) {
+ showResult(result.message);
+ }
+ }
+ });
+
}
// 删除
@@ -64,10 +64,10 @@
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++) {
if (records[i].data['status'] != '未审核') {
showResult('病人名称为“' + records[i].data['patientName'] + '”的使用记录'
- + records[i].data['status'] + '不能删除');
+ + records[i].data['status'] + '不能删除');
return false;
}
if (ids == null) {
@@ -76,13 +76,13 @@
ids = ids + ';' + records[i].data['id'];
}
}
- top.Ext.MessageBox.confirm("请确认","是否确定要删除选中的" + entityName + "信息?",
- function(button, text) {
+ top.Ext.MessageBox.confirm("请确认", "是否确定要删除选中的" + entityName + "信息?",
+ function (button, text) {
if ("yes" == button) {
Ext.Ajax.request({
- url : WWWROOT+ '/disinfectSystem/useRecordAction!deleteUseRecord.do',
- params : {ids : ids},
- success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/useRecordAction!deleteUseRecord.do',
+ params: { ids: ids },
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
var success = result.success;
if (true != success && result.message) {
@@ -92,7 +92,7 @@
grid.dwrReload();
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult('删除失败,服务器正忙,请稍候再试!');
}
});
@@ -101,10 +101,10 @@
}
var mask = null;
-function getMask(){
- if(!mask){
+function getMask() {
+ if (!mask) {
mask = new Ext.LoadMask(Ext.getBody(), {
- msg : '正在处理打印请求,请稍候...'
+ msg: '正在处理打印请求,请稍候...'
});
}
return mask;
@@ -117,51 +117,51 @@
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++) {
if (records[i].data['status'] != '已审核' && records[i].data['status'] != '已申请') {
if (ids == null) {
ids = records[i].data['id'];
} else {
ids = ids + ';' + records[i].data['id'];
}
- }else{
+ } else {
showResult("所选的记录已经审核,请选择未审核记录!");
return false;
}
}
-
- top.Ext.MessageBox.confirm("请确认","确定要审核所选的使用记录吗?",
- function(button, text) {
- if ("yes" == button) {
-// var mask = new Ext.LoadMask(Ext.getBody(),
-// {msg:'正在处理审核请求,请稍候...'}
-// );
- getMask();
- mask.msg = '正在处理审核请求,请稍候...';
- mask.show();
- Ext.Ajax.request({
- url : WWWROOT+ '/disinfectSystem/useRecordAction!updateRecordStatus.do',
- params : {ids : ids},
- success : function(response, options) {
- mask.hide();
- var result = Ext.decode(response.responseText);
- if(result.msg && result.msg.length!=0){
- showResult(result.msg);
- }else{
- MsgTip.msg('提示', '审核成功!', true, 3);
- grid.dwrReload();
+ top.Ext.MessageBox.confirm("请确认", "确定要审核所选的使用记录吗?",
+ function (button, text) {
+ if ("yes" == button) {
+
+ // var mask = new Ext.LoadMask(Ext.getBody(),
+ // {msg:'正在处理审核请求,请稍候...'}
+ // );
+ getMask();
+ mask.msg = '正在处理审核请求,请稍候...';
+ mask.show();
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/useRecordAction!updateRecordStatus.do',
+ params: { ids: ids },
+ success: function (response, options) {
+ mask.hide();
+ var result = Ext.decode(response.responseText);
+ if (result.msg && result.msg.length != 0) {
+ showResult(result.msg);
+ } else {
+ MsgTip.msg('提示', '审核成功!', true, 3);
+ grid.dwrReload();
+ }
+ },
+ failure: function (response, options) {
+ mask.hide();
+ var result = Ext.decode(response.responseText);
+ MsgTip.msg('提示', result.cause, true, 3);
}
- },
- failure : function(response, options) {
- mask.hide();
- var result = Ext.decode(response.responseText);
- MsgTip.msg('提示', result.cause, true, 3);
- }
- });
- }
- });
+ });
+ }
+ });
}
@@ -184,45 +184,45 @@
} else {
ids = ids + ';' + records[i].data['id'];
}
- }else{
+ } else {
showResult("所选的记录不是已审核状态,请选择已审核的记录!");
return false;
}
}
-
-
- top.Ext.MessageBox.confirm("请确认","确定要返回成未审核状态吗?", function(button, text) {
+
+
+ top.Ext.MessageBox.confirm("请确认", "确定要返回成未审核状态吗?", function (button, text) {
if ("yes" == button) {
-
-// var mask = new Ext.LoadMask(Ext.getBody(),
-// {msg:'正在处理请求,请稍候...'}
-// );
+
+ // var mask = new Ext.LoadMask(Ext.getBody(),
+ // {msg:'正在处理请求,请稍候...'}
+ // );
getMask();
mask.msg = '正在处理请求,请稍候...';
mask.show();
Ext.Ajax.request({
- url : WWWROOT+ '/disinfectSystem/useRecordAction!updateRecordStatus.do',
- params : {ids : ids, type : 'becomeNotAudited'},
- success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/useRecordAction!updateRecordStatus.do',
+ params: { ids: ids, type: 'becomeNotAudited' },
+ success: function (response, options) {
mask.hide();
var result = Ext.decode(response.responseText);
- if(!result.success){
+ if (!result.success) {
showResult("所选的记录不是已审核状态,请选择已审核的记录!");
- }else{
+ } else {
MsgTip.msg('提示', '所选的记录已成功返回成未审核状态!', true, 3);
grid.dwrReload();
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
mask.hide();
var result = Ext.decode(response.responseText);
MsgTip.msg('提示', result.cause, true, 3);
}
});
}
-
+
});
-
+
}
/**
@@ -232,27 +232,27 @@
function renderCallModifyFunction(v, p, record) {
var data = record.data;
return "" + v + " ";
-
+ + data['status'] + "','" + data['recyclingStatus'] + "');return false;\">" + v + "";
+
}
function rendererColor(v, p, record) {
var data = record.data;
var result = "";
//点击使用记录列表的状态列,可以打开该条使用记录,即在状态列上增加打开该条使用记录的链接
if (audited == data['status']) {
- result +="
" ;
+ result += "
";
result += "";
+ result += data['status'] + "','" + data['recyclingStatus'] + "');return false;\">";
result += v + "
";
- }else if(unAudited == data['status']){
+ } else if (unAudited == data['status']) {
result += "";
result += "";
+ result += data['status'] + "','" + data['recyclingStatus'] + "');return false;\">";
result += v + "
";
} else {
result += "";
+ result += data['status'] + "','" + data['recyclingStatus'] + "');return false;\">";
result += v + " ";
}
return result;
@@ -268,15 +268,15 @@
}
var ids = null;
var departMap = new Map();
- for ( var i = 0, len = records.length; i < len; i++) {
+ for (var i = 0, len = records.length; i < len; i++) {
if (records[i].data['status'] != '已审核') {
showResult('病人名称为“' + records[i].data['patientName']
- + '”的使用记录不能生成申请单,请确认使用记录已审核且未转化成申请单');
+ + '”的使用记录不能生成申请单,请确认使用记录已审核且未转化成申请单');
return false;
}
- if((records[i].data['recyclingStatus'] == "已回收" || records[i].data['recyclingStatus'] == '部分回收') && sstsConfig.monitorGoodsRecyclingStatusForUseRecord){
+ if ((records[i].data['recyclingStatus'] == "已回收" || records[i].data['recyclingStatus'] == '部分回收') && sstsConfig.monitorGoodsRecyclingStatusForUseRecord) {
showResult('病人名称为[' + records[i].data['patientName']
- + ']的记录不能生成申请单,请确认该条记录为未回收状态或空');
+ + ']的记录不能生成申请单,请确认该条记录为未回收状态或空');
return false;
}
if (ids == null) {
@@ -286,24 +286,24 @@
}
departMap.put(records[i].data['depart'], records[i].data['depart']);
}
-
- if (departMap.size() > 1){
+
+ if (departMap.size() > 1) {
top.Ext.MessageBox.alert("请确认", "所选择的使用记录的录入科室不一致,不能转换!");
return false;
}
var operatorStr = grid.getSelectionModel()
- .getSelections()[0].data.operator;
+ .getSelections()[0].data.operator;
var departStr = grid.getSelectionModel()
- .getSelections()[0].data.depart;
+ .getSelections()[0].data.depart;
var departCodingStr = grid.getSelectionModel()
- .getSelections()[0].data.departCoding;
-
+ .getSelections()[0].data.departCoding;
+
var confirmMessage = "是否确定要将选中的" + entityName + "信息生成申请单?";
- if(sstsConfig.auditAndConvertUseRecordConfirmMessage){
+ if (sstsConfig.auditAndConvertUseRecordConfirmMessage) {
confirmMessage = "手术是否已完成,不需要追加器械包?";
}
- top.Ext.MessageBox.confirm("请确认",confirmMessage,
- function(button, text) {
+ top.Ext.MessageBox.confirm("请确认", confirmMessage,
+ function (button, text) {
if ("yes" == button) {
convertUseRecordToApplication(null, ids, operatorStr, departStr, departCodingStr, null);
}
@@ -312,55 +312,55 @@
function convertUseRecordToApplication(button, ids, operatorStr, departStr, departCodingStr, win) {
- if (button != null){
- button.disable(); // 防止重复点击
+ if (button != null) {
+ button.disable(); // 防止重复点击
+ }
+
+ // var mask = new Ext.LoadMask(Ext.getBody(),
+ // {msg:'正在生成申请单,请稍候...'}
+ // );
+ getMask();
+ mask.msg = '正在生成申请单,请稍候...';
+ mask.show();
+
+ Ext.Ajax.request({
+ url: WWWROOT
+ + '/disinfectSystem/useRecordAction!createRecyclingApplicationByUseRecords.do',
+ params: {
+ ids: ids,
+ operator: operatorStr,
+ depart: departStr,
+ departCoding: departCodingStr,
+ applicationFormType: sstsConfig.applicationFormType
+ },
+ success: function (response, options) {
+ mask.hide();
+ var result = Ext.decode(response.responseText);
+ if (result.msg.length != 0) {
+ showResult(result.msg);
+ if (button != null) {
+ button.enable();
}
-
-// var mask = new Ext.LoadMask(Ext.getBody(),
-// {msg:'正在生成申请单,请稍候...'}
-// );
- getMask();
- mask.msg = '正在生成申请单,请稍候...';
- mask.show();
-
- Ext.Ajax.request({
- url : WWWROOT
- + '/disinfectSystem/useRecordAction!createRecyclingApplicationByUseRecords.do',
- params : {
- ids : ids,
- operator : operatorStr,
- depart : departStr,
- departCoding : departCodingStr,
- applicationFormType : sstsConfig.applicationFormType
- },
- success : function(response, options) {
- mask.hide();
- var result = Ext.decode(response.responseText);
- if(result.msg.length!=0){
- showResult(result.msg);
- if (button != null){
- button.enable();
- }
- Ext.getCmp("formSubmitResult").setValue(formSubmitResultFail);
- }else{
- showResult("申请成功!");
- Ext.getCmp("formSubmitResult").setValue(formSubmitResultSucc);
- // 关闭使用记录的窗口,打开单张使用记录进行审核
- if (win != null){
- win.close();
- }
- grid.dwrReload();
- }
- },
- failure : function(response, options) {
- mask.hide();
- Ext.getCmp("formSubmitResult").setValue(formSubmitResultFail);
- if (button != null){
- button.enable();
- }
- }
- });
-
+ Ext.getCmp("formSubmitResult").setValue(formSubmitResultFail);
+ } else {
+ showResult("申请成功!");
+ Ext.getCmp("formSubmitResult").setValue(formSubmitResultSucc);
+ // 关闭使用记录的窗口,打开单张使用记录进行审核
+ if (win != null) {
+ win.close();
+ }
+ grid.dwrReload();
+ }
+ },
+ failure: function (response, options) {
+ mask.hide();
+ Ext.getCmp("formSubmitResult").setValue(formSubmitResultFail);
+ if (button != null) {
+ button.enable();
+ }
+ }
+ });
+
}
// 审核并生成申请单按钮被点击
@@ -374,10 +374,10 @@
}
var ids = null;
var departMap = new Map();
- for ( var i = 0, len = records.length; i < len; i++) {
+ for (var i = 0, len = records.length; i < len; i++) {
if (records[i].data['status'] == '已申请') {
showResult('病人名称为“' + records[i].data['patientName']
- + '”的使用记录已经生成申请单,不能重复申请');
+ + '”的使用记录已经生成申请单,不能重复申请');
return false;
}
if (ids == null) {
@@ -387,31 +387,31 @@
}
departMap.put(records[i].data['depart'], records[i].data['depart']);
}
-
- if (departMap.size() > 1){
+
+ if (departMap.size() > 1) {
top.Ext.MessageBox.alert("请确认", "所选择的使用记录的录入科室不一致,不能转换!");
return false;
}
-
+
var operatorStr = grid.getSelectionModel()
.getSelections()[0].data.operator;
var departStr = grid.getSelectionModel()
.getSelections()[0].data.depart;
var departCodingStr = grid.getSelectionModel()
.getSelections()[0].data.departCoding;
-
+
var confirmMessage = "是否确定要将选中的" + entityName + "信息生成申请单?";
- if(sstsConfig.auditAndConvertUseRecordConfirmMessage){
+ if (sstsConfig.auditAndConvertUseRecordConfirmMessage) {
confirmMessage = "手术是否已完成,不需要追加器械包?";
}
-
- top.Ext.MessageBox.confirm("请确认",confirmMessage,
- function(button, text) {
- if ("yes" == button) {
- convertUseRecordToApplication(null, ids, operatorStr, departStr, departCodingStr, null);
-
- }
- });
+
+ top.Ext.MessageBox.confirm("请确认", confirmMessage,
+ function (button, text) {
+ if ("yes" == button) {
+ convertUseRecordToApplication(null, ids, operatorStr, departStr, departCodingStr, null);
+
+ }
+ });
}
/**
@@ -428,51 +428,51 @@
}
var useRecordIdArray = [];
var departJson = {};
- for ( var i = 0, len = records.length; i < len; i++) {
+ for (var i = 0, len = records.length; i < len; i++) {
if (records[i].data['priorConvertStatus'] == '已转换') {
showResult('病人名称为【' + records[i].data['patientName']
- + '】的使用记录已被优先转换申请单,不能重复优先转换申请单');
+ + '】的使用记录已被优先转换申请单,不能重复优先转换申请单');
return false;
}
if (records[i].data['status'] == '已申请') {
showResult('病人名称为【' + records[i].data['patientName']
- + '】的使用记录已经生成申请单,不能优先转换申请单');
+ + '】的使用记录已经生成申请单,不能优先转换申请单');
return false;
}
useRecordIdArray.push(records[i].data['id']);
departJson[records[i].data['depart']] = records[i].data['depart'];
}
-
- if (departJson.length > 1){
+
+ if (departJson.length > 1) {
top.Ext.MessageBox.alert("请确认", "所选择的使用记录的录入科室不一致,不能优先转换!");
return false;
}
-
- top.Ext.MessageBox.confirm("请确认", "是否优先转换所选择的申请单", function(button, text) {
+
+ top.Ext.MessageBox.confirm("请确认", "是否优先转换所选择的申请单", function (button, text) {
if ("yes" == button) {
- var myMask = new Ext.LoadMask(Ext.getBody(), {msg:"正在修改状态...."});
+ var myMask = new Ext.LoadMask(Ext.getBody(), { msg: "正在修改状态...." });
myMask.show();
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/useRecordAction!priorConvertApplyGoods.do',
- method:'POST',
- params : {
- ids:useRecordIdArray.join(",")
- },
- success : function(response, options) {
- myMask.hide();
- var result = Ext.decode(response.responseText);
- if(result.message){
- showResult(result.message);
- }
- grid.dwrReload();
- },
- failure : function(response, options) {
- myMask.hide();
- var result = Ext.decode(response.responseText);
- if(result.message){
- showResult(result.message);
- }
- }
+ url: WWWROOT + '/disinfectSystem/useRecordAction!priorConvertApplyGoods.do',
+ method: 'POST',
+ params: {
+ ids: useRecordIdArray.join(",")
+ },
+ success: function (response, options) {
+ myMask.hide();
+ var result = Ext.decode(response.responseText);
+ if (result.message) {
+ showResult(result.message);
+ }
+ grid.dwrReload();
+ },
+ failure: function (response, options) {
+ myMask.hide();
+ var result = Ext.decode(response.responseText);
+ if (result.message) {
+ showResult(result.message);
+ }
+ }
});
}
});
@@ -483,86 +483,86 @@
* */
-function getUseRecordRows(grid,printType){
- var records=grid.getSelectionModel().getSelections()
- if(records.length==0){
- showResult("请选择需要打印的数据!");
- return false;
- }else{
- var itemId = [];
- for ( var i = 0, len = records.length; i < len; i++) {
- itemId.push(records[i].data['id'])
- }
- Ext.Ajax.request({
- url: WWWROOT+'/disinfectSystem/useRecord/useRecordController/loadUseRecordListByIds.mhtml',
- params: {useRecordIds: JSON.stringify(itemId)},
- success: function (response) {
- var obj = JSON.parse(response.responseText);
+function getUseRecordRows(grid, printType) {
+ var records = grid.getSelectionModel().getSelections()
+ if (records.length == 0) {
+ showResult("请选择需要打印的数据!");
+ return false;
+ } else {
+ var itemId = [];
+ for (var i = 0, len = records.length; i < len; i++) {
+ itemId.push(records[i].data['id'])
+ }
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/useRecord/useRecordController/loadUseRecordListByIds.mhtml',
+ params: { useRecordIds: JSON.stringify(itemId) },
+ success: function (response) {
+ var obj = JSON.parse(response.responseText);
- if(obj.success){
- printUseRecordRows(obj,printType)
- }else{
- showResult(obj.message);
- }
- },
- failure: function () {
- Ext.Msg.alert("提示", "登陆失败,请与管理员联系!");
- }
+ if (obj.success) {
+ printUseRecordRows(obj, printType)
+ } else {
+ showResult(obj.message);
+ }
+ },
+ failure: function () {
+ Ext.Msg.alert("提示", "登陆失败,请与管理员联系!");
+ }
})
}
}
-function printUseRecordRows(obj,printType){
+function printUseRecordRows(obj, printType) {
- var objData =obj.rows;
- for(var i=0;i" +
- "住院号 " +
- ""+objData[i].hospitalNum+" " +
- "病人 " +
- ""+objData[i].patientName+" " +
- "巡回护士 " +
- ""+objData[i].circuitNurse+" " +
- "" +
- "" +
- "手术间 " +
- ""+objData[i].operationRoom+" " +
- "洗手护士 " +
- ""+objData[i].washHandNurse+" " +
- " " +
- " " +
- " "
- //各科室的器械包(一行抬头+多行数据(每个科室1行、需要遍历))
- if(tousseInstanceList && tousseInstanceList.length > 0){
- for(var j=0;j" +
- ""+tousseInstanceList[j].tousseName+" " +
- ""+tousseInstanceList[j].amount+" " +
- ""
- sum+=tousseInstanceList[j].amount
- }
- htmlTable+="" +
- "合计 " +
- ""+sum+" " +
- " "
+ var htmlTable = "";
+ htmlTable += "" +
+ "住院号 " +
+ "" + objData[i].hospitalNum + " " +
+ "病人 " +
+ "" + objData[i].patientName + " " +
+ "巡回护士 " +
+ "" + objData[i].circuitNurse + " " +
+ " " +
+ "" +
+ "手术间 " +
+ "" + objData[i].operationRoom + " " +
+ "洗手护士 " +
+ "" + objData[i].washHandNurse + " " +
+ " " +
+ " " +
+ " "
+ //各科室的器械包(一行抬头+多行数据(每个科室1行、需要遍历))
+ if (tousseInstanceList && tousseInstanceList.length > 0) {
+ for (var j = 0; j < tousseInstanceList.length; j++) {
+ htmlTable += "" +
+ "" + tousseInstanceList[j].tousseName + " " +
+ "" + tousseInstanceList[j].amount + " " +
+ " "
+ sum += tousseInstanceList[j].amount
+ }
+ htmlTable += "" +
+ "合计 " +
+ "" + sum + " " +
+ " "
}
- htmlContent = "" + htmlTable + "";
- LODOP.ADD_PRINT_HTM(55,5,"99%","99%",htmlContent);
+ htmlContent = "" + htmlTable + "";
+ LODOP.ADD_PRINT_HTM(55, 5, "99%", "99%", htmlContent);
- if(printType == 0){//直接打印
- LODOP.PRINT();
- }else{//打印预览
- LODOP.SET_SHOW_MODE("HIDE_PAPER_BOARD",1);
- LODOP.PREVIEW();
- }
- }
+ if (printType == 0) {//直接打印
+ LODOP.PRINT();
+ } else {//打印预览
+ LODOP.SET_SHOW_MODE("HIDE_PAPER_BOARD", 1);
+ LODOP.PREVIEW();
+ }
+ }
@@ -573,25 +573,25 @@
* @param useRecordId 使用记录id
* @param recyclingStatus 回收状态
*/
-function viewRecycling(useRecordId , recyclingStatus){
+function viewRecycling(useRecordId, recyclingStatus) {
//alert(useRecordId + '=' + recyclingStatus);
- if(!recyclingStatus){
+ if (!recyclingStatus) {
return "";
}
- if(recyclingStatus == awaitRecycle){
+ if (recyclingStatus == awaitRecycle) {
/*top.Ext.MessageBox.confirm("请确认","该使用记录的回收状态为" + recyclingStatus + ",是否立即查询实时信息?",
function(button, text) {
if ("yes" == button) {
showRecycling(useRecordId);
var resultData = [
- {supplyRoomName:"供应室1名称",recyclingTime:"2019-08-14",rows:[{serialNumber:"2019-08-11",rows:[{tousseName:"包1名称","amount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包2名称","amount":3,"tallyAmount":4,"recyclingAmount":2},{tousseName:"包4名称","amount":6,"tallyAmount":4,"recyclingAmount":2}]},{serialNumber:"2019-08-12",rows:[{tousseName:"包1名称","amount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包3名称","amount":5,"amount":7,"recyclingAmount":2},{tousseName:"包6名称","amount":8,"amount":7,"recyclingAmount":2}]}]}
- ,{supplyRoomName:"供应室2名称",recyclingTime:"2019-08-15",rows:[{serialNumber:"2019-08-11",rows:[{tousseName:"包1名称","amount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包2名称","amount":3,"tallyAmount":4,"recyclingAmount":2}]},{serialNumber:"2019-08-12",rows:[{tousseName:"包1名称","amount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包3名称","amount":5,"amount":7,"recyclingAmount":2}]}]}
- ];
+ {supplyRoomName:"供应室1名称",recyclingTime:"2019-08-14",rows:[{serialNumber:"2019-08-11",rows:[{tousseName:"包1名称","amount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包2名称","amount":3,"tallyAmount":4,"recyclingAmount":2},{tousseName:"包4名称","amount":6,"tallyAmount":4,"recyclingAmount":2}]},{serialNumber:"2019-08-12",rows:[{tousseName:"包1名称","amount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包3名称","amount":5,"amount":7,"recyclingAmount":2},{tousseName:"包6名称","amount":8,"amount":7,"recyclingAmount":2}]}]}
+ ,{supplyRoomName:"供应室2名称",recyclingTime:"2019-08-15",rows:[{serialNumber:"2019-08-11",rows:[{tousseName:"包1名称","amount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包2名称","amount":3,"tallyAmount":4,"recyclingAmount":2}]},{serialNumber:"2019-08-12",rows:[{tousseName:"包1名称","amount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包3名称","amount":5,"amount":7,"recyclingAmount":2}]}]}
+ ];
//displayRecyclingInfo(resultData);
}
});*/
showResult("该使用记录【" + recyclingStatus + "】");
- }else{
+ } else {
showRecycling(useRecordId);
}
}
@@ -600,38 +600,38 @@
* 查询回收信息-SZSZLYY-31 使用记录监控回收状态功能优化
* @useRecordId 使用记录id
*/
-function showRecycling(useRecordId){
+function showRecycling(useRecordId) {
Ext.Ajax.request({
- url : WWWROOT+ '/disinfectSystem/useRecordAction!showApplicationAndRecyclingItems.do',
- params : {useRecordId : useRecordId},
- success : function(response, options) {
- if(response.responseText == ''){
+ url: WWWROOT + '/disinfectSystem/useRecordAction!showApplicationAndRecyclingItems.do',
+ params: { useRecordId: useRecordId },
+ success: function (response, options) {
+ if (response.responseText == '') {
showResult('无回收信息');
return;
}
var result = Ext.decode(response.responseText);
var success = result.success;
if (!success) {
- if(result.message){
+ if (result.message) {
showResult(result.message);
- }else{
+ } else {
showResult("查询结果失败,请稍后再试");
}
} else {
//显示回收信息(数据格式:[{supplyRoomName:"供应室1名称",recyclingTime:"最后回收时间",rows:[{serialNumber:"2019-08-11",rows:[{tousseName:"包1名称","applyAmount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包2名称","applyAmount":3,"tallyAmount":4,"recyclingAmount":2}]},{serialNumber:"2019-08-12",rows:[{tousseName:"包1名称","applyAmount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包3名称","applyAmount":5,"tallyAmount":7,"recyclingAmount":2}]}]},{supplyRoomName:"供应室2名称",recyclingTime:"最后回收时间",rows:[{serialNumber:"2019-08-11",rows:[{tousseName:"包1名称","applyAmount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包2名称","applyAmount":3,"tallyAmount":4,"recyclingAmount":2}]},{serialNumber:"2019-08-12",rows:[{tousseName:"包1名称","applyAmount":2,"tallyAmount":2,"recyclingAmount":2},{tousseName:"包3名称","applyAmount":5,"tallyAmount":7,"recyclingAmount":2}]}]}])
- if(result.rows && result.rows.length > 0
- || result.recycledTousses && result.recycledTousses.length > 0){
+ if (result.rows && result.rows.length > 0
+ || result.recycledTousses && result.recycledTousses.length > 0) {
displayRecyclingInfo(result);
- }else{
+ } else {
var noticeMessage = "无回收信息";
- if(result.data &&
- (result.data.manualSetRecyclingStatusUser
- || result.data.manualSetRecyclingStatusTime)){
+ if (result.data &&
+ (result.data.manualSetRecyclingStatusUser
+ || result.data.manualSetRecyclingStatusTime)) {
noticeMessage += ",";
- if(result.data.manualSetRecyclingStatusTime){
+ if (result.data.manualSetRecyclingStatusTime) {
noticeMessage += " " + new Date(result.data.manualSetRecyclingStatusTime.time).format("Y-m-d H:i:s");
}
- if(result.data.manualSetRecyclingStatusUser){
+ if (result.data.manualSetRecyclingStatusUser) {
noticeMessage += " " + result.data.manualSetRecyclingStatusUser;
}
noticeMessage += " 手工设置为已回收";
@@ -640,7 +640,7 @@
}
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult('操作失败,服务器正忙,请稍候再试!');
}
});
@@ -658,183 +658,187 @@
* @param recyclingData 返回的数据
* SZSZLYY-31 使用记录监控回收状态功能优化
*/
-function displayRecyclingInfo(recyclingData){
+function displayRecyclingInfo(recyclingData) {
var windowWidth = 850;
var windowHeight = 550;
-
+
var typeInvoicePlan = "invoicePlan";
var typeTousseItem = "tousseItem";
var typeTousseInstanceRoot = "tousseInstanceRoot";
var typeTousseInstance = "tousseInstance";
- var applicationItemsRd = new Ext.data.JsonReader( {
- fields : [
- {name : 'tousseName'},
- {name : 'type'},//类型,分为invoicePlan、tousseItem、tousseInstanceRoot、tousseInstance
- {name : 'amount'},
- {name : 'tallyAmount'},
- {name : 'recyclingAmount'},
+ var applicationItemsRd = new Ext.data.JsonReader({
+ fields: [
+ { name: 'tousseName' },
+ { name: 'type' },//类型,分为invoicePlan、tousseItem、tousseInstanceRoot、tousseInstance
+ { name: 'amount' },
+ { name: 'tallyAmount' },
+ { name: 'recyclingAmount' },
]
});
/**
* 使用记录的申请及回收信息
*/
var applicationItemsStore = new Ext.data.Store({
- reader : applicationItemsRd
+ reader: applicationItemsRd
});
-
+
var tousseCm = [
- {header : "申请单/包名称/条码",dataIndex : 'tousseName',id:'tousseName',align:"left",width : 155,menuDisabled : true,renderer:function(v,i,r){
- var recordType = r.get("type");
- if(recordType == typeInvoicePlan || recordType == typeTousseInstanceRoot){
- v = "" + v + "
";
- }else if(recordType == typeTousseItem || recordType == typeTousseInstance){
- v = " " + v + "
";
- }
- return v;
- }},
- {header : "申请数量",dataIndex : 'amount',align:"center",width : 70,menuDisabled : true},
- {header : "清点数量",dataIndex : 'tallyAmount',align:"center",width : 70,menuDisabled : true},
- {header : "回收数量",dataIndex : 'recyclingAmount',align:"center",width : 70,menuDisabled : true}
- ];
+ {
+ header: "申请单/包名称/条码", dataIndex: 'tousseName', id: 'tousseName', align: "left", width: 155, menuDisabled: true, renderer: function (v, i, r) {
+ var recordType = r.get("type");
+ if (recordType == typeInvoicePlan || recordType == typeTousseInstanceRoot) {
+ v = "" + v + "
";
+ } else if (recordType == typeTousseItem || recordType == typeTousseInstance) {
+ v = " " + v + "
";
+ }
+ return v;
+ }
+ },
+ { header: "申请数量", dataIndex: 'amount', align: "center", width: 70, menuDisabled: true },
+ { header: "清点数量", dataIndex: 'tallyAmount', align: "center", width: 70, menuDisabled: true },
+ { header: "回收数量", dataIndex: 'recyclingAmount', align: "center", width: 70, menuDisabled: true }
+ ];
var recyclingPanel;
//判断数量(如果大于1条,则使用标签面板;否则用普通面板即可)-后续完善(暂时只显示第一个供应室的)
//if(recyclingData.length > 1){
-
+
//}else{
- recyclingPanel = new top.Ext.grid.GridPanel({
- id : 'recyclingPanel',
- store : applicationItemsStore,
- columns : tousseCm,
- width:windowWidth-10,
- height : windowHeight-68,
- textAlign:"center",
- autoScroll:true,
- frame : false,
- viewConfig: {
- forceFit:true
- },
- autoExpandColumn:"tousseName",
- bodyStyle : 'border:1px solid #afd7af',
- bbar : [{
- id:"lastRecyclingTime"
- }]
- });
- var lastRecyclingTime;
- if(recyclingData.rows && recyclingData.rows.length > 0){
- for(var h = 0;h < recyclingData.rows.length;h++){
- var recyclingTime = recyclingData.rows[h].recyclingTime;
- if(!lastRecyclingTime){
- lastRecyclingTime = recyclingTime;
- }else if(lastRecyclingTime < recyclingTime){
- lastRecyclingTime = recyclingTime;
- }
- var recyclingDataRows = recyclingData.rows[h].rows;
- for(var i = 0;i < recyclingDataRows.length;i++){
+ recyclingPanel = new top.Ext.grid.GridPanel({
+ id: 'recyclingPanel',
+ store: applicationItemsStore,
+ columns: tousseCm,
+ width: windowWidth - 10,
+ height: windowHeight - 68,
+ textAlign: "center",
+ autoScroll: true,
+ frame: false,
+ viewConfig: {
+ forceFit: true
+ },
+ autoExpandColumn: "tousseName",
+ bodyStyle: 'border:1px solid #afd7af',
+ bbar: [{
+ id: "lastRecyclingTime"
+ }]
+ });
+ var lastRecyclingTime;
+ if (recyclingData.rows && recyclingData.rows.length > 0) {
+ for (var h = 0; h < recyclingData.rows.length; h++) {
+ var recyclingTime = recyclingData.rows[h].recyclingTime;
+ if (!lastRecyclingTime) {
+ lastRecyclingTime = recyclingTime;
+ } else if (lastRecyclingTime < recyclingTime) {
+ lastRecyclingTime = recyclingTime;
+ }
+ var recyclingDataRows = recyclingData.rows[h].rows;
+ for (var i = 0; i < recyclingDataRows.length; i++) {
+ applicationItemsStore.add(new top.Ext.data.Record({
+ tousseName: "申请单流水号:" + recyclingDataRows[i].serialNumber,
+ type: typeInvoicePlan
+ }));
+ for (var j = 0; j < recyclingDataRows[i].rows.length; j++) {
applicationItemsStore.add(new top.Ext.data.Record({
- tousseName:"申请单流水号:"+recyclingDataRows[i].serialNumber,
- type:typeInvoicePlan
+ tousseName: recyclingDataRows[i].rows[j].tousseName,
+ amount: recyclingDataRows[i].rows[j].amount,
+ tallyAmount: recyclingDataRows[i].rows[j].tallyAmount,
+ recyclingAmount: recyclingDataRows[i].rows[j].recyclingAmount,
+ type: typeTousseItem
}));
- for(var j = 0;j < recyclingDataRows[i].rows.length;j++){
- applicationItemsStore.add(new top.Ext.data.Record({
- tousseName:recyclingDataRows[i].rows[j].tousseName,
- amount:recyclingDataRows[i].rows[j].amount,
- tallyAmount:recyclingDataRows[i].rows[j].tallyAmount,
- recyclingAmount:recyclingDataRows[i].rows[j].recyclingAmount,
- type:typeTousseItem
- }));
- }
}
}
}
- if(recyclingData.recycledTousses && recyclingData.recycledTousses.length > 0){
+ }
+ if (recyclingData.recycledTousses && recyclingData.recycledTousses.length > 0) {
+ applicationItemsStore.add(new top.Ext.data.Record({
+ tousseName: "已回收的器械包",
+ type: typeTousseInstanceRoot
+ }));
+ for (var h = 0; h < recyclingData.recycledTousses.length; h++) {
+ var tousseName = recyclingData.recycledTousses[h].tousseName + "" + recyclingData.recycledTousses[h].tousseBarcode;
+ if (recyclingData.recycledTousses[h].idcardBarcode) {
+ tousseName += "(标识牌条码:" + recyclingData.recycledTousses[h].idcardBarcode + ")";
+ }
applicationItemsStore.add(new top.Ext.data.Record({
- tousseName:"已回收的器械包",
- type:typeTousseInstanceRoot
+ tousseName: tousseName,
+ recyclingAmount: 1,
+ type: typeTousseInstance
}));
- for(var h = 0;h < recyclingData.recycledTousses.length;h++){
- var tousseName = recyclingData.recycledTousses[h].tousseName + "" + recyclingData.recycledTousses[h].tousseBarcode;
- if(recyclingData.recycledTousses[h].idcardBarcode){
- tousseName += "(标识牌条码:" + recyclingData.recycledTousses[h].idcardBarcode + ")";
- }
- applicationItemsStore.add(new top.Ext.data.Record({
- tousseName:tousseName,
- recyclingAmount:1,
- type:typeTousseInstance
- }));
- }
}
+ }
//}
-
+
var recyclingWin = new top.Ext.Window({
- title:"详细信息",
- width:windowWidth,
- modal:true,
- height : windowHeight,
- items:[recyclingPanel],
- buttonAlign:"center",
- buttons:[{text:"关闭",handler:function(){
- recyclingWin.close();
- }}]
+ title: "详细信息",
+ width: windowWidth,
+ modal: true,
+ height: windowHeight,
+ items: [recyclingPanel],
+ buttonAlign: "center",
+ buttons: [{
+ text: "关闭", handler: function () {
+ recyclingWin.close();
+ }
+ }]
});
recyclingWin.show();
-
+
var displayMessage = "";
- if(recyclingData.data &&
- (recyclingData.data.manualSetRecyclingStatusUser
- || recyclingData.data.manualSetRecyclingStatusTime)){
- if(recyclingData.data.manualSetRecyclingStatusTime){
+ if (recyclingData.data &&
+ (recyclingData.data.manualSetRecyclingStatusUser
+ || recyclingData.data.manualSetRecyclingStatusTime)) {
+ if (recyclingData.data.manualSetRecyclingStatusTime) {
displayMessage += new Date(recyclingData.data.manualSetRecyclingStatusTime.time).format("Y-m-d H:i:s");
}
- if(recyclingData.data.manualSetRecyclingStatusUser){
- if(displayMessage){
+ if (recyclingData.data.manualSetRecyclingStatusUser) {
+ if (displayMessage) {
displayMessage += " " + recyclingData.data.manualSetRecyclingStatusUser;
- }else{
+ } else {
displayMessage = recyclingData.data.manualSetRecyclingStatusUser;
}
}
displayMessage += " 手工设置为已回收";
}
- if(displayMessage && lastRecyclingTime){
- displayMessage += ",最后回收时间:"+lastRecyclingTime;
- }else if(lastRecyclingTime){
- displayMessage = "最后回收时间:"+lastRecyclingTime;
+ if (displayMessage && lastRecyclingTime) {
+ displayMessage += ",最后回收时间:" + lastRecyclingTime;
+ } else if (lastRecyclingTime) {
+ displayMessage = "最后回收时间:" + lastRecyclingTime;
}
top.Ext.getCmp('lastRecyclingTime').setText(displayMessage);
}
/*Annie-e*/
//DGSETYY-13:增加使用到回收超时提醒
-function getUnRecycleUseRecordAlarmWarning(){
+function getUnRecycleUseRecordAlarmWarning() {
var params = '';
- if(fromDepartmentUseRecord){
+ if (fromDepartmentUseRecord) {
params += '?dataType=1';
}
Ext.Ajax.request({
- url : WWWROOT+ '/system/systemWarningAction!getUnRecycleUseRecordAlarmWarning.do'+params,
- success : function(response, options) {
+ url: WWWROOT + '/system/systemWarningAction!getUnRecycleUseRecordAlarmWarning.do' + params,
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
var success = result.success;
if (success && result.message) {
showResult(result.message);
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult('操作失败,服务器正忙,请稍候再试!');
}
});
}
-Ext.onReady(function() {
+Ext.onReady(function () {
Ext.QuickTips.init();
top.Ext.QuickTips.init();
-
+
top.Ext4.tip.QuickTipManager.init();
top.Ext4.apply(top.Ext4.tip.QuickTipManager.getQuickTip(), {
- dismissDelay: 0,
- showDelay: 0
+ dismissDelay: 0,
+ showDelay: 0
});
//隐藏列名
var hiddenColumnsOfUseRecordListView = sstsConfig.hiddenColumnsOfUseRecordListView;
@@ -855,106 +859,110 @@
var remarkColumnHeader = "备注";
var columns = [
- {header : patientNameColumnHeader,width : 70,dataIndex : 'patientName',hidden:fromDepartmentUseRecord || existsObjInArray(patientNameColumnHeader,hiddenColumnsOfUseRecordListView),renderer : renderCallModifyFunction},
- {header : statusColumnHeader,width : 50,dataIndex : 'status',hidden:existsObjInArray(statusColumnHeader,hiddenColumnsOfUseRecordListView),renderer : rendererColor},
- {header : '是否已推送',width : 78,dataIndex : 'finishPush',hidden:!sstsConfig.enableUseRecordTransportToThirdPartySystem},
- {header : '最后推送时间',width : 128,dataIndex : 'lastPushDateTime',hidden:!sstsConfig.enableUseRecordTransportToThirdPartySystem},
- {header : hospitalNumColumnHeader,width : 90,dataIndex : 'hospitalNum',hidden:fromDepartmentUseRecord || existsObjInArray(hospitalNumColumnHeader,hiddenColumnsOfUseRecordListView),renderer : renderCallModifyFunction},
- {header : treatmentNumColumnHeader,width : 90,dataIndex : 'treatmentNum',hidden:fromDepartmentUseRecord || existsObjInArray(treatmentNumColumnHeader,hiddenColumnsOfUseRecordListView),renderer : renderCallModifyFunction},
- {header : operationRoomColumnHeader,width : 90,dataIndex : 'operationRoom',hidden:fromDepartmentUseRecord || existsObjInArray(operationRoomColumnHeader,hiddenColumnsOfUseRecordListView),renderer : renderCallModifyFunction},
- {header : patientAgeColumnHeader,width : 40,dataIndex : 'patientAge',hidden:fromDepartmentUseRecord || existsObjInArray(patientAgeColumnHeader,hiddenColumnsOfUseRecordListView)},
- {header : patientIDCardColumnHeader,width : 120,dataIndex : 'patientIDCard',hidden:fromDepartmentUseRecord || existsObjInArray(patientIDCardColumnHeader,hiddenColumnsOfUseRecordListView)},
- {header : doctorNameColumnHeader,width : 70,dataIndex : 'doctorName',hidden:fromDepartmentUseRecord || existsObjInArray(doctorNameColumnHeader,hiddenColumnsOfUseRecordListView)},
- {header : operationColumnHeader,width : 150,dataIndex : 'operation',hidden:fromDepartmentUseRecord || existsObjInArray(operationColumnHeader,hiddenColumnsOfUseRecordListView)},
- {header : recyclingStatusColumnHeader,width : 150,dataIndex : 'recyclingStatus',hidden:fromDepartmentUseRecord || (sstsConfig.monitorGoodsRecyclingStatusForUseRecord ? false :true),renderer:function(v , p , rec){
- //SZSZLYY-31 使用记录监控回收状态功能优化
- if(v == awaitRecycle || v == partRecycle || v == recycled){
- return ''+v+' ';
- }else {
- return v;
+ { header: patientNameColumnHeader, width: 70, dataIndex: 'patientName', hidden: fromDepartmentUseRecord || existsObjInArray(patientNameColumnHeader, hiddenColumnsOfUseRecordListView), renderer: renderCallModifyFunction },
+ { header: statusColumnHeader, width: 50, dataIndex: 'status', hidden: existsObjInArray(statusColumnHeader, hiddenColumnsOfUseRecordListView), renderer: rendererColor },
+ { header: '是否已推送', width: 78, dataIndex: 'finishPush', hidden: !sstsConfig.enableUseRecordTransportToThirdPartySystem },
+ { header: '最后推送时间', width: 128, dataIndex: 'lastPushDateTime', hidden: !sstsConfig.enableUseRecordTransportToThirdPartySystem },
+ { header: hospitalNumColumnHeader, width: 90, dataIndex: 'hospitalNum', hidden: fromDepartmentUseRecord || existsObjInArray(hospitalNumColumnHeader, hiddenColumnsOfUseRecordListView), renderer: renderCallModifyFunction },
+ { header: treatmentNumColumnHeader, width: 90, dataIndex: 'treatmentNum', hidden: fromDepartmentUseRecord || existsObjInArray(treatmentNumColumnHeader, hiddenColumnsOfUseRecordListView), renderer: renderCallModifyFunction },
+ { header: operationRoomColumnHeader, width: 90, dataIndex: 'operationRoom', hidden: fromDepartmentUseRecord || existsObjInArray(operationRoomColumnHeader, hiddenColumnsOfUseRecordListView), renderer: renderCallModifyFunction },
+ { header: patientAgeColumnHeader, width: 40, dataIndex: 'patientAge', hidden: fromDepartmentUseRecord || existsObjInArray(patientAgeColumnHeader, hiddenColumnsOfUseRecordListView) },
+ { header: patientIDCardColumnHeader, width: 120, dataIndex: 'patientIDCard', hidden: fromDepartmentUseRecord || existsObjInArray(patientIDCardColumnHeader, hiddenColumnsOfUseRecordListView) },
+ { header: doctorNameColumnHeader, width: 70, dataIndex: 'doctorName', hidden: fromDepartmentUseRecord || existsObjInArray(doctorNameColumnHeader, hiddenColumnsOfUseRecordListView) },
+ { header: operationColumnHeader, width: 150, dataIndex: 'operation', hidden: fromDepartmentUseRecord || existsObjInArray(operationColumnHeader, hiddenColumnsOfUseRecordListView) },
+ {
+ header: recyclingStatusColumnHeader, width: 150, dataIndex: 'recyclingStatus', hidden: fromDepartmentUseRecord || (sstsConfig.monitorGoodsRecyclingStatusForUseRecord ? false : true), renderer: function (v, p, rec) {
+ //SZSZLYY-31 使用记录监控回收状态功能优化
+ if (v == awaitRecycle || v == partRecycle || v == recycled) {
+ return '' + v + ' ';
+ } else {
+ return v;
+ }
}
- }},
- {header : "优先转换状态",width : 150,dataIndex : 'priorConvertStatus',hidden:fromDepartmentUseRecord || (sstsConfig.enablePriorConvertApplyGoods ? false :true)},
- {header : operatorColumnHeader,width : 60,dataIndex : 'operator',hidden:existsObjInArray(operatorColumnHeader,hiddenColumnsOfUseRecordListView)},
- {header : departColumnHeader,width : 80,dataIndex : 'depart',hidden:existsObjInArray(departColumnHeader,hiddenColumnsOfUseRecordListView)},
- {header : '病人所在科室',width : 150,dataIndex : 'departNameOfpatient',sortable: false},
- {header : enteringDateColumnHeader,width : 120,dataIndex : 'enteringDate',hidden:existsObjInArray(enteringDateColumnHeader,hiddenColumnsOfUseRecordListView),renderer : function(v , p , rec){
- //DGSETYY-13:增加使用到回收超时提醒
- if (v == null) {
- return "";
- } else {
- var isUseToRecycleWarn = rec.data.isUseToRecycleWarn;
- var status = rec.data.status;
- if((isUseToRecycleWarn == 'true' || isUseToRecycleWarn == true) && status !== '已申请'){
- return ''+v.substring(0, 16)+' ';
- }else {
- return v.substring(0, 16);
+ },
+ { header: "优先转换状态", width: 150, dataIndex: 'priorConvertStatus', hidden: fromDepartmentUseRecord || (sstsConfig.enablePriorConvertApplyGoods ? false : true) },
+ { header: operatorColumnHeader, width: 60, dataIndex: 'operator', hidden: existsObjInArray(operatorColumnHeader, hiddenColumnsOfUseRecordListView) },
+ { header: departColumnHeader, width: 80, dataIndex: 'depart', hidden: existsObjInArray(departColumnHeader, hiddenColumnsOfUseRecordListView) },
+ { header: '病人所在科室', width: 150, dataIndex: 'departNameOfpatient', sortable: false },
+ {
+ header: enteringDateColumnHeader, width: 120, dataIndex: 'enteringDate', hidden: existsObjInArray(enteringDateColumnHeader, hiddenColumnsOfUseRecordListView), renderer: function (v, p, rec) {
+ //DGSETYY-13:增加使用到回收超时提醒
+ if (v == null) {
+ return "";
+ } else {
+ var isUseToRecycleWarn = rec.data.isUseToRecycleWarn;
+ var status = rec.data.status;
+ if ((isUseToRecycleWarn == 'true' || isUseToRecycleWarn == true) && status !== '已申请') {
+ return '' + v.substring(0, 16) + ' ';
+ } else {
+ return v.substring(0, 16);
+ }
}
}
- }},
- {header : applicationTimeColumnHeader,width : 120,dataIndex : 'applicationTime',hidden:fromDepartmentUseRecord || existsObjInArray(applicationTimeColumnHeader,hiddenColumnsOfUseRecordListView),renderer : myDateFormatByMinute},
- {header : remarkColumnHeader,width : 120,dataIndex : 'remark',id : 'autoWidth',hidden:existsObjInArray(remarkColumnHeader,hiddenColumnsOfUseRecordListView)}
+ },
+ { header: applicationTimeColumnHeader, width: 120, dataIndex: 'applicationTime', hidden: fromDepartmentUseRecord || existsObjInArray(applicationTimeColumnHeader, hiddenColumnsOfUseRecordListView), renderer: myDateFormatByMinute },
+ { header: remarkColumnHeader, width: 120, dataIndex: 'remark', id: 'autoWidth', hidden: existsObjInArray(remarkColumnHeader, hiddenColumnsOfUseRecordListView) }
];
var filters = new Ext.grid.GridFilters({
- filters : [
- {type : 'string',dataIndex : 'treatmentNum'},
- {type : 'string',dataIndex : 'hospitalNum'},
- {type : 'string',dataIndex : 'patientName'},
- {type : 'string',dataIndex : 'operationRoom'},
- {type : 'numeric',dataIndex : 'patientAge'},
- {type : 'string',dataIndex : 'patientIDCard'},
- {type : 'string',dataIndex : 'doctorName'},
- {type : 'string',dataIndex : 'operation'},
- {type : 'string',dataIndex : 'recyclingStatus'},
- {type : 'string',dataIndex : 'priorConvertStatus'},
- {type : 'string',dataIndex : 'operator'},
- {type : 'date',dataIndex : 'enteringDate'},
- {type : 'date',dataIndex : 'applicationTime'},
- {type : 'list',dataIndex : 'status',options : [ unAudited, audited,applied ],phpMode : true},
- {type : 'string',dataIndex : 'remark'},
- {type : 'string',dataIndex : 'depart'}
+ filters: [
+ { type: 'string', dataIndex: 'treatmentNum' },
+ { type: 'string', dataIndex: 'hospitalNum' },
+ { type: 'string', dataIndex: 'patientName' },
+ { type: 'string', dataIndex: 'operationRoom' },
+ { type: 'numeric', dataIndex: 'patientAge' },
+ { type: 'string', dataIndex: 'patientIDCard' },
+ { type: 'string', dataIndex: 'doctorName' },
+ { type: 'string', dataIndex: 'operation' },
+ { type: 'string', dataIndex: 'recyclingStatus' },
+ { type: 'string', dataIndex: 'priorConvertStatus' },
+ { type: 'string', dataIndex: 'operator' },
+ { type: 'date', dataIndex: 'enteringDate' },
+ { type: 'date', dataIndex: 'applicationTime' },
+ { type: 'list', dataIndex: 'status', options: [unAudited, audited, applied], phpMode: true },
+ { type: 'string', dataIndex: 'remark' },
+ { type: 'string', dataIndex: 'depart' }
]
});
var readerDetail = [
- {name : 'id'},
- {name : 'treatmentNum'},
- {name : 'hospitalNum'},
- {name : 'patientName'},
- {name : 'operationRoom'},
- {name : 'patientAge'},
- {name : 'patientIDCard'},
- {name : 'doctorName'},
- {name : 'operation'},
- {name : 'departNameOfpatient'},
- {name : 'recyclingStatus'},
- {name : 'priorConvertStatus'},
- {name : 'depart'},
- {name : 'operator'},
- {name : 'enteringDate'},
- {name : 'applicationTime'},
- {name : 'status'},
- {name : 'isUseToRecycleWarn'},
- {name : 'finishPush'},
- {name : 'lastPushDateTime'},
- {name : 'remark'},
- {name : 'departCoding'}
+ { name: 'id' },
+ { name: 'treatmentNum' },
+ { name: 'hospitalNum' },
+ { name: 'patientName' },
+ { name: 'operationRoom' },
+ { name: 'patientAge' },
+ { name: 'patientIDCard' },
+ { name: 'doctorName' },
+ { name: 'operation' },
+ { name: 'departNameOfpatient' },
+ { name: 'recyclingStatus' },
+ { name: 'priorConvertStatus' },
+ { name: 'depart' },
+ { name: 'operator' },
+ { name: 'enteringDate' },
+ { name: 'applicationTime' },
+ { name: 'status' },
+ { name: 'isUseToRecycleWarn' },
+ { name: 'finishPush' },
+ { name: 'lastPushDateTime' },
+ { name: 'remark' },
+ { name: 'departCoding' }
];
- var tbar = [ {
- text : '添加',
- hidden : fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Create : SSTS_UseRecord_Create,
- iconCls : 'btn_ext_application_add',
- handler : function() {
+ var tbar = [{
+ text: '添加',
+ hidden: fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Create : SSTS_UseRecord_Create,
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
newUseRecord();
}
}, '-', {
- text : '修改',
- hidden : fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Update : SSTS_UseRecord_Update,
- iconCls : 'btn_ext_application_edit',
- id : 'editTbar',
- handler : function() {
+ text: '修改',
+ hidden: fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Update : SSTS_UseRecord_Update,
+ iconCls: 'btn_ext_application_edit',
+ id: 'editTbar',
+ handler: function () {
var records = grid.getSelectionModel().getSelections();
if (records.length == 0) {
showResult("请选择需要修改的使用记录信息!");
@@ -965,157 +973,157 @@
return false;
}
var d = records[0];
- addAndEditUseRecord(d.data['id'],d.data['status'],d.data['recyclingStatus']);
+ addAndEditUseRecord(d.data['id'], d.data['status'], d.data['recyclingStatus']);
}
}, '-', {
- text : '删除',
- hidden : fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Delete : SSTS_UseRecord_Delete,
- iconCls : 'btn_ext_application_del',
- handler : function() {
+ text: '删除',
+ hidden: fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Delete : SSTS_UseRecord_Delete,
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
deleteUseRecord(grid);
}
}, '-', {
- text : '审核',
- hidden : fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Review || sstsConfig.useRecordAuditMode != 1) : (SSTS_UseRecord_Review || sstsConfig.useRecordAuditMode != 1),
- iconCls : 'btn_ext_application_edit',
- handler : function() {
+ text: '审核',
+ hidden: fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Review || sstsConfig.useRecordAuditMode != 1) : (SSTS_UseRecord_Review || sstsConfig.useRecordAuditMode != 1),
+ iconCls: 'btn_ext_application_edit',
+ handler: function () {
audit(grid);
}
}, '-', {
- text : sstsConfig.useRecordAuditMode == 1 ? '优先转换申请单' : '审核并优先转换申请单',
- hidden : fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_PriorConvert : SSTS_UseRecord_PriorConvert,
- iconCls : 'btn_ext_refresh',
- handler : function() {
+ text: sstsConfig.useRecordAuditMode == 1 ? '优先转换申请单' : '审核并优先转换申请单',
+ hidden: fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_PriorConvert : SSTS_UseRecord_PriorConvert,
+ iconCls: 'btn_ext_refresh',
+ handler: function () {
priorConvertApplyGoods(grid);
}
}, '-', {
- text : '返回',
- iconCls : 'btn_ext_refresh',
- hidden : sstsConfig.enableBecomeNotAuditedButton ? false : true,
- handler : function() {
+ text: '返回',
+ iconCls: 'btn_ext_refresh',
+ hidden: sstsConfig.enableBecomeNotAuditedButton ? false : true,
+ handler: function () {
becomeNotAudited(grid);
}
}, {
- text : '生成申请单',
- hidden : fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 1) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 1),
- iconCls : 'btn_ext_refresh',
- handler : function() {
+ text: '生成申请单',
+ hidden: fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 1) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 1),
+ iconCls: 'btn_ext_refresh',
+ handler: function () {
convertButtonClicked(grid);
}
- },{
- text : setRecyclingStatusName,
- hidden : sstsConfig.monitorGoodsRecyclingStatusForUseRecord ? false :true,
- iconCls : 'btn_ext_application_edit',
- handler : function() {
- var selectionModel = grid.getSelectionModel();
- var selections = [];
- var isReturn = false;
- selectionModel.each(function(row){
- selections.push(row.data.id);
- if("已回收"==row.data.recyclingStatus){
- showResult("病人名称为【"+row.data.patientName+"】的数据已经是已回收状态了!");
- isReturn = true;
- return;
- }
- });
- if(isReturn){
- return;
- }
- var ids = selections.join(',');
+ }, {
+ text: setRecyclingStatusName,
+ hidden: sstsConfig.monitorGoodsRecyclingStatusForUseRecord ? false : true,
+ iconCls: 'btn_ext_application_edit',
+ handler: function () {
+ var selectionModel = grid.getSelectionModel();
+ var selections = [];
+ var isReturn = false;
+ selectionModel.each(function (row) {
+ selections.push(row.data.id);
+ if ("已回收" == row.data.recyclingStatus) {
+ showResult("病人名称为【" + row.data.patientName + "】的数据已经是已回收状态了!");
+ isReturn = true;
+ return;
+ }
+ });
+ if (isReturn) {
+ return;
+ }
+ var ids = selections.join(',');
batchSetRectgled(ids);
}
-
+
}, {
- text : '审核并生成申请单',
- hidden : fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 2) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 2),
- iconCls : 'btn_ext_refresh',
- handler : function() {
+ text: '审核并生成申请单',
+ hidden: fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 2) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 2),
+ iconCls: 'btn_ext_refresh',
+ handler: function () {
auditAndConvertBtnClicked(grid);
}
- },{
- text : '合并转换申请单',
- hidden : fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_MergeConvert || sstsConfig.enableMultiUseRecordMergeConvert != true) : (SSTS_UseRecord_MergeConvert || sstsConfig.enableMultiUseRecordMergeConvert != true),
- iconCls : 'btn_ext_refresh',
- handler : function() {
+ }, {
+ text: '合并转换申请单',
+ hidden: fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_MergeConvert || sstsConfig.enableMultiUseRecordMergeConvert != true) : (SSTS_UseRecord_MergeConvert || sstsConfig.enableMultiUseRecordMergeConvert != true),
+ iconCls: 'btn_ext_refresh',
+ handler: function () {
openUseRecordMergeConvertWin();
}
- },'-',{
- text : '打印',
- hidden : fromDepartmentUseRecord ? (!sstsConfig.ControlUseRecordprint && !SSTS_DepartmentUseRecord_Create) : (!sstsConfig.ControlUseRecordprint && !SSTS_UseRecord_Create),
- iconCls : 'icon_print',
- handler : function() {
- getUseRecordRows(grid,0)
- }
- },'-',{
- text : '导出',
- hidden : fromDepartmentUseRecord,
- iconCls : 'btn_ext_download',
- handler : function() {
+ }, '-', {
+ text: '打印',
+ hidden: fromDepartmentUseRecord ? (!sstsConfig.ControlUseRecordprint && !SSTS_DepartmentUseRecord_Create) : (!sstsConfig.ControlUseRecordprint && !SSTS_UseRecord_Create),
+ iconCls: 'icon_print',
+ handler: function () {
+ getUseRecordRows(grid, 0)
+ }
+ }, '-', {
+ text: '导出',
+ hidden: fromDepartmentUseRecord,
+ iconCls: 'btn_ext_download',
+ handler: function () {
var records = grid.getSelectionModel().getSelections();
if (records.length == 0) {
showResult("请选择要导出的使用记录!");
return false;
}
var useRecordIds = '';
var message = '';
- for(var i=0;i 0){
- for(var i=0;i 0) {
+ for (var i = 0; i < sstsConfig.notAllowBlankFieldsOnUseRecordPage.length; i++) {
+ var fieldName = sstsConfig.notAllowBlankFieldsOnUseRecordPage[i];
+ if (fieldName == 'hospitalNum') {
+ hospitalNumAllowBlank = false;
}
+ if (fieldName == 'treatmentNum') {
+ treatmentNumAllowBlank = false;
+ }
+ if (fieldName == 'washHandNurse') {
+ washHandNurseAllowBlank = false;
+ }
+ if (fieldName == 'circuitNurse') {
+ circuitNurseAllowBlank = false;
+ }
+ if (fieldName == 'operationRoom') {
+ operationRoomAllowBlank = false;
+ }
+ if (fieldName == 'patientName') {
+ patientNameAllowBlank = false;
+ }
+ if (fieldName == 'patientAge') {
+ patientAgeAllowBlank = false;
+ }
+ if (fieldName == 'patientSex') {
+ patientSexAllowBlank = false;
+ }
+ if (fieldName == 'patientArea') {
+ patientAreaAllowBlank = false;
+ }
+ if (fieldName == 'departNameOfpatient') {
+ departNameOfpatientAllowBlank = false;
+ }
+ if (fieldName == 'roomNumber') {
+ roomNumberAllowBlank = false;
+ }
+ if (fieldName == 'bedNumber') {
+ bedNumberAllowBlank = false;
+ }
+ if (fieldName == 'patientIDCard') {
+ patientIDCardAllowBlank = false;
+ }
+ if (fieldName == 'doctorName') {
+ doctorNameAllowBlank = false;
+ }
+ if (fieldName == 'surgeon') {
+ surgeonAllowBlank = false;
+ }
+ if (fieldName == 'anesthetist') {
+ anesthetistAllowBlank = false;
+ }
+ if (fieldName == 'anesthesiaMode') {
+ anesthesiaModeAllowBlank = false;
+ }
+ if (fieldName == 'operation') {
+ operationNameAllowBlank = false;
+ }
+ if (fieldName == 'operationScheduleId') {
+ operationScheduleIdAllowBlank = false;
+ }
+ if (fieldName == 'operationTime') {
+ operationTimeAllowBlank = false;
+ }
+ if (fieldName == 'visitId') {
+ visitIdAllowBlank = false;
+ }
+ if (fieldName == 'specialInfection') {
+ specialInfectionAllowBlank = false;
+ }
+ if (fieldName == 'doctorAccountDepart') {
+ doctorAccountDepartAllowBlank = false;
+ }
+ if (fieldName == 'remark') {
+ remarkAllowBlank = false;
+ }
}
- }else {
- hospitalNumAllowBlank = fromDepartmentUseRecord || getBoolValueFromJs('sstsConfig.useRecordHospitalNumAllowBlank',true);
- washHandNurseAllowBlank = fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : getBoolValueFromJs('sstsConfig.useRecordWashHandNurseAllowBlank',false));
- circuitNurseAllowBlank = fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : getBoolValueFromJs('sstsConfig.useRecordCircuitNurseAllowBlank',false));
- operationRoomAllowBlank = fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : useRecordOperationRoomAllowBlank)
}
+} else {
+ hospitalNumAllowBlank = fromDepartmentUseRecord || getBoolValueFromJs('sstsConfig.useRecordHospitalNumAllowBlank', true);
+ washHandNurseAllowBlank = fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : getBoolValueFromJs('sstsConfig.useRecordWashHandNurseAllowBlank', false));
+ circuitNurseAllowBlank = fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : getBoolValueFromJs('sstsConfig.useRecordCircuitNurseAllowBlank', false));
+ operationRoomAllowBlank = fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : useRecordOperationRoomAllowBlank)
+}
/**
* 加急加急级别数据,格式如下:
@@ -167,456 +167,456 @@
//加急急别的json键值对,key为加急急别的id,值为加载对象的json
var urgentLevelDataMap = {};
-var rd = new Ext.data.JsonReader( {
- fields : [
- {name : 'id'},
- {name : 'barcode'},
- {name : 'tousseDefinitionName'},
- {name : 'amount'},
- {name : 'idCardUseAmount'},
- {name : 'batchNo'},
- {name : 'packageType'},
- {name : 'goodsType'},
- {name : 'validUntil'},
- {name : 'showTousseName'},
- {name : 'tousseType'},
- {name : 'foreignTousseApp_id'},
- {name : 'urgentLevel'},
- {name : 'urgentLevelForUseRecord'},
- {name : 'urgentLevelIdForUseRecord'},//由是否加急改为加急急别
- {name : 'includeImplant'},
- {name : 'actualUsed'},
- {name : 'isRecycling'},
- {name : 'status'},//状态列,用于判断该录入的包是否为新扫描的包还是已保存的使用记录里录入了包
- {name : 'isConvertApplyGoods'},
- {name : 'haveUnSupplementMaterials'},
- {name : 'tousseMaterialErrorDamageJsonData'},
+var rd = new Ext.data.JsonReader({
+ fields: [
+ { name: 'id' },
+ { name: 'barcode' },
+ { name: 'tousseDefinitionName' },
+ { name: 'amount' },
+ { name: 'idCardUseAmount' },
+ { name: 'batchNo' },
+ { name: 'packageType' },
+ { name: 'goodsType' },
+ { name: 'validUntil' },
+ { name: 'showTousseName' },
+ { name: 'tousseType' },
+ { name: 'foreignTousseApp_id' },
+ { name: 'urgentLevel' },
+ { name: 'urgentLevelForUseRecord' },
+ { name: 'urgentLevelIdForUseRecord' },//由是否加急改为加急急别
+ { name: 'includeImplant' },
+ { name: 'actualUsed' },
+ { name: 'isRecycling' },
+ { name: 'status' },//状态列,用于判断该录入的包是否为新扫描的包还是已保存的使用记录里录入了包
+ { name: 'isConvertApplyGoods' },
+ { name: 'haveUnSupplementMaterials' },
+ { name: 'tousseMaterialErrorDamageJsonData' },
//病人名称,住院号,诊疗号
- {name : 'hospitalNumber'},
- {name : 'clinicNumber'},
- {name : 'patient'},
- //聚合包需要用到的一些属性
- {name : 'subTousseDefinitionId'},//聚合包里的子包包定义id
- {name : 'comboTousseInstanceId'},//聚合包的包实例id
- {name : 'usedAmount'},//已使用数量
- {name : 'recyclingStatus'}//回收状态
+ { name: 'hospitalNumber' },
+ { name: 'clinicNumber' },
+ { name: 'patient' },
+ //聚合包需要用到的一些属性
+ { name: 'subTousseDefinitionId' },//聚合包里的子包包定义id
+ { name: 'comboTousseInstanceId' },//聚合包的包实例id
+ { name: 'usedAmount' },//已使用数量
+ { name: 'recyclingStatus' }//回收状态
]
});
//手术间的store
var operationRoomJsonStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/operationRoomAction!getOperationRoomByCurrentOrgUnitCode.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/operationRoomAction!getOperationRoomByCurrentOrgUnitCode.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- root : 'data',
- fields : [
- {name : 'id'},
- {name : 'operationRoomName'}
+ reader: new Ext.data.JsonReader({
+ root: 'data',
+ fields: [
+ { name: 'id' },
+ { name: 'operationRoomName' }
]
})
});
-
-
+
+
/**
* 使用记录录入的物品信息(含录入的器械包、一次性物品(普通物品与高值耗材)、器械材料(仅类型为高值耗材)、高值耗材等)
*/
var useItemsStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/useRecordAction!loadUseItemsByUseRecordId.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/useRecordAction!loadUseItemsByUseRecordId.do',
+ method: 'POST'
}),
- reader : rd
+ reader: rd
});
//器械材料数据源
var materialStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/useRecordAction!loadMaterialGoodsByUseRecordId.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/useRecordAction!loadMaterialGoodsByUseRecordId.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- fields : [
- {name : 'externalCode'},
- {name : 'name'},
- {name : 'amount'},
- {name : 'goodsType'},
- {name : 'materialInvoiceSerialNumber'}
- ]
- })
+ reader: new Ext.data.JsonReader({
+ fields: [
+ { name: 'externalCode' },
+ { name: 'name' },
+ { name: 'amount' },
+ { name: 'goodsType' },
+ { name: 'materialInvoiceSerialNumber' }
+ ]
+ })
});
-var userReader = new Ext.data.JsonReader( {
- fields : [
- {name : 'id'},
- {name : 'fullName'},
- {name : 'orgUnitName'}
+var userReader = new Ext.data.JsonReader({
+ fields: [
+ { name: 'id' },
+ { name: 'fullName' },
+ { name: 'orgUnitName' }
]
});
// 查找某科室的人员的store
var departUsersStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/systemmanage/user/userAction!loadUsersBySearchString.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/systemmanage/user/userAction!loadUsersBySearchString.do',
+ method: 'POST'
}),
- reader : userReader
+ reader: userReader
});
var departUsersStore2 = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/systemmanage/user/userAction!loadUsersBySearchString.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/systemmanage/user/userAction!loadUsersBySearchString.do',
+ method: 'POST'
}),
- reader : userReader
+ reader: userReader
});
var addTousseInstance = Ext.data.Record.create([
- {name : 'id'},
- {name : 'barcode'},
- {name : 'tousseDefinitionName'},
- {name : 'showTousseName'},
- {name : 'packageType'},
- {name : 'validUntil'},
- {name : 'showTousseName'},
- {name : 'idCardUseAmount'},
- {name : 'amount'},
- {name : 'batchNo'},
- {name : 'includeImplant'},
- {name : 'haveUnSupplementMaterials'},
- {name : 'urgentLevel'},
- //聚合包的子包需要用到的
- {name : 'subTousseDefinitionId'},//聚合包里的子包包定义id
- {name : 'comboTousseInstanceId'},//聚合包的包实例id
- {name : 'usedAmount'},//已使用数量
- {name : 'recyclingStatus'}//回收状态
+ { name: 'id' },
+ { name: 'barcode' },
+ { name: 'tousseDefinitionName' },
+ { name: 'showTousseName' },
+ { name: 'packageType' },
+ { name: 'validUntil' },
+ { name: 'showTousseName' },
+ { name: 'idCardUseAmount' },
+ { name: 'amount' },
+ { name: 'batchNo' },
+ { name: 'includeImplant' },
+ { name: 'haveUnSupplementMaterials' },
+ { name: 'urgentLevel' },
+ //聚合包的子包需要用到的
+ { name: 'subTousseDefinitionId' },//聚合包里的子包包定义id
+ { name: 'comboTousseInstanceId' },//聚合包的包实例id
+ { name: 'usedAmount' },//已使用数量
+ { name: 'recyclingStatus' }//回收状态
]);
-function getDispCureInfo(){
- openDevice(function(){
- readopencardno(function(res){
+function getDispCureInfo() {
+ openDevice(function () {
+ readopencardno(function (res) {
var value = res.cardInfoCardNo || '';
closeDevice();
var jsonStr = "{\"patientNum\":\"" + value
- + "\",\"numType\":\"treatmentNum\",\"sourcePage\":\"1\"}";
+ + "\",\"numType\":\"treatmentNum\",\"sourcePage\":\"1\"}";
loadPatientInfoByValAndType(jsonStr);
})
});
}
//扫描三个自身条码的事件
-function onScanBodyCode(sf,f){
+function onScanBodyCode(sf, f) {
var sfCmp = top.Ext.getCmp(sf);
var fCmp = top.Ext.getCmp(f);
fCmp.setValue(sfCmp.getValue());
sfCmp.setValue("");
-
+
var firstBodyCodeCmp = top.Ext.getCmp("firstBodyCode");
var secondBodyCodeCmp = top.Ext.getCmp("secondBodyCode");
var thirdBodyCodeCmp = top.Ext.getCmp("thirdBodyCode");
-
+
var firstBodyCode = firstBodyCodeCmp.getValue();
var secondBodyCode = secondBodyCodeCmp.getValue();
var thirdBodyCode = thirdBodyCodeCmp.getValue();
-
- if(!isUndefinedOrNullOrEmpty(firstBodyCode) && !isUndefinedOrNullOrEmpty(secondBodyCode) && !isUndefinedOrNullOrEmpty(thirdBodyCode)){
- processScanBodyCode(firstBodyCode,secondBodyCode,thirdBodyCode);
- }else{
- if(sf == 'scanFirstBodyCode'){
+
+ if (!isUndefinedOrNullOrEmpty(firstBodyCode) && !isUndefinedOrNullOrEmpty(secondBodyCode) && !isUndefinedOrNullOrEmpty(thirdBodyCode)) {
+ processScanBodyCode(firstBodyCode, secondBodyCode, thirdBodyCode);
+ } else {
+ if (sf == 'scanFirstBodyCode') {
top.Ext.getCmp('scanSecondBodyCode').focus();
- }else if(sf == 'scanSecondBodyCode'){
+ } else if (sf == 'scanSecondBodyCode') {
top.Ext.getCmp('scanThirdBodyCode').focus();
- }else{
+ } else {
top.Ext.getCmp('scanFirstBodyCode').focus();
}
}
}
//处理三个自身条码的扫描
-function processScanBodyCode(firstBodyCode,secondBodyCode,thirdBodyCode){
- var goods = getScanedGoodsByBodyCode(firstBodyCode,secondBodyCode,thirdBodyCode);
- if(goods != null){
- showResult('自身条码为'+firstBodyCode+','+secondBodyCode+','+thirdBodyCode+'的实例已经存在!');
+function processScanBodyCode(firstBodyCode, secondBodyCode, thirdBodyCode) {
+ var goods = getScanedGoodsByBodyCode(firstBodyCode, secondBodyCode, thirdBodyCode);
+ if (goods != null) {
+ showResult('自身条码为' + firstBodyCode + ',' + secondBodyCode + ',' + thirdBodyCode + '的实例已经存在!');
return false;
}
// 开始查询条码信息
top.Ext.getCmp("tousseInstanceGrid").getEl().mask("后台处理中,请稍候...");
- Ext.Ajax.timeout=300*1000;
+ Ext.Ajax.timeout = 300 * 1000;
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/useRecordAction!loadGoodsByBodyCode.do',
- params : {firstBodyCode : firstBodyCode,secondBodyCode : secondBodyCode,thirdBodyCode : thirdBodyCode},
- success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/useRecordAction!loadGoodsByBodyCode.do',
+ params: { firstBodyCode: firstBodyCode, secondBodyCode: secondBodyCode, thirdBodyCode: thirdBodyCode },
+ success: function (response, options) {
top.Ext.getCmp("tousseInstanceGrid").getEl().unmask();
-
+
top.Ext.getCmp('firstBodyCode').setValue("");
top.Ext.getCmp('secondBodyCode').setValue("");
top.Ext.getCmp('thirdBodyCode').setValue("");
top.Ext.getCmp('firstBodyCode').focus();
var goodsInfo = Ext.decode(response.responseText);
// 首先处理错误信息
- if(goodsInfo){
- if(goodsInfo.message){
+ if (goodsInfo) {
+ if (goodsInfo.message) {
showResult(goodsInfo.message);
}
- if(goodsInfo.success){
+ if (goodsInfo.success) {
//判断列表中是否已存在该条码
if (checkBarcodeIsExist(goodsInfo.barcode)) {
showResult('条码为' + goodsInfo.barcode + '的物品已在当前扫描物品里!');
return;
}
//高值耗材(非一次性物品的高值耗材)
var record = new addTousseInstance({
- id : goodsInfo.id,
- barcode : goodsInfo.barcode,
- tousseDefinitionName : '',
- amount : 1,
- batchNo : goodsInfo.batchNo,
- showTousseName : goodsInfo.showTousseName,
- packageType : '',
- validUntil : goodsInfo.validUntil,
- tousseType : goodsInfo.tousseType,
- goodsType : goodsInfo.goodsType,
- foreignTousseApp_id : '',
- includeImplant : '否',
- actualUsed:'是',
- urgentLevel:goodsInfo.urgentLevel,
- haveUnSupplementMaterials : false
+ id: goodsInfo.id,
+ barcode: goodsInfo.barcode,
+ tousseDefinitionName: '',
+ amount: 1,
+ batchNo: goodsInfo.batchNo,
+ showTousseName: goodsInfo.showTousseName,
+ packageType: '',
+ validUntil: goodsInfo.validUntil,
+ tousseType: goodsInfo.tousseType,
+ goodsType: goodsInfo.goodsType,
+ foreignTousseApp_id: '',
+ includeImplant: '否',
+ actualUsed: '是',
+ urgentLevel: goodsInfo.urgentLevel,
+ haveUnSupplementMaterials: false
});
useItemsStore.add(record);
useAmount++;
top.Ext.getCmp('useAmount').setValue(useAmount);
}
}
-
+
},
- failure : function(response, options) {
+ failure: function (response, options) {
top.Ext.getCmp("tousseInstanceGrid").getEl().unmask();
showResult('获取条码信息失败');
}
});
}
//根据三个自身条码查找已扫描的物品
-function getScanedGoodsByBodyCode(firstBodyCode,secondBodyCode,thirdBodyCode){
-
- for ( var i = 0; i < useItemsStore.getCount(); i++) {
- var record = useItemsStore.getAt(i);
- var tempFirstBodyCode = record.get('firstBodyCode');
- var tempSecondBodyCode = record.get('secondBodyCode');
- var tempThirdBodyCode = record.get('thirdBodyCode');
-
- if((tempFirstBodyCode == firstBodyCode) && (tempSecondBodyCode == secondBodyCode) && (tempThirdBodyCode == thirdBodyCode)){
- return record.data;
- }
+function getScanedGoodsByBodyCode(firstBodyCode, secondBodyCode, thirdBodyCode) {
+
+ for (var i = 0; i < useItemsStore.getCount(); i++) {
+ var record = useItemsStore.getAt(i);
+ var tempFirstBodyCode = record.get('firstBodyCode');
+ var tempSecondBodyCode = record.get('secondBodyCode');
+ var tempThirdBodyCode = record.get('thirdBodyCode');
+
+ if ((tempFirstBodyCode == firstBodyCode) && (tempSecondBodyCode == secondBodyCode) && (tempThirdBodyCode == thirdBodyCode)) {
+ return record.data;
+ }
}
return null;
}
//根据条码获取器械包类型和状态
-function loadTousseDefintionByBarcod(barcode){
+function loadTousseDefintionByBarcod(barcode) {
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/tousseInstanceAction!loadTousseDefintionByBarcode.do',
- params : {barcode : barcode},
- async : false,
- success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/tousseInstanceAction!loadTousseDefintionByBarcode.do',
+ params: { barcode: barcode },
+ async: false,
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
- if((result.data.tousseType == "外来器械包" || result.data.tousseType == "外来器械拆分小包") && ((result.data.status == "已发货" || result.data.status == "已签收"))){
- if(result.data.tousseType == "外来器械包"){
- loadingVideoAndImg(result.data.tousseInstanceId, "装配采集图片",barcode);
- }else if(result.data.tousseType == "外来器械拆分小包"){
- loadingVideoAndImg(result.data.tousseInstanceId, "包实例装配采集图片",barcode);
+ if ((result.data.tousseType == "外来器械包" || result.data.tousseType == "外来器械拆分小包") && ((result.data.status == "已发货" || result.data.status == "已签收"))) {
+ if (result.data.tousseType == "外来器械包") {
+ loadingVideoAndImg(result.data.tousseInstanceId, "装配采集图片", barcode);
+ } else if (result.data.tousseType == "外来器械拆分小包") {
+ loadingVideoAndImg(result.data.tousseInstanceId, "包实例装配采集图片", barcode);
}
- }else{
- loadScanGoods(false,barcode);
+ } else {
+ loadScanGoods(false, barcode);
}
}
})
}
//加载装配拍摄的图片
-function loadingVideoAndImg(objectId, imageType,barcode){
+function loadingVideoAndImg(objectId, imageType, barcode) {
Ext.Ajax.request({
- url : WWWROOT +'/disinfectSystem/baseData/uploadImageAndVideoAction!getImageAndVideoInfo.do',
- params : {
- objectId:objectId,
- imageType:imageType,
- videoType:"装配采集视频"
+ url: WWWROOT + '/disinfectSystem/baseData/uploadImageAndVideoAction!getImageAndVideoInfo.do',
+ params: {
+ objectId: objectId,
+ imageType: imageType,
+ videoType: "装配采集视频"
},
- async : false,
- success : function(response, options) {
+ async: false,
+ success: function (response, options) {
var data = Ext.decode(response.responseText);
- if(data.success){
+ if (data.success) {
var imgArray = [];
- if(data.imageArray.length > 0){
- for(var i = 0;i < data.imageArray.length; i++){
- var imgUrl = WWWROOT +'/disinfectSystem/baseData/uploadImageAndVideoAction!getImageById.do?imageId='+ data.imageArray[i].id+'&original=true';
+ if (data.imageArray.length > 0) {
+ for (var i = 0; i < data.imageArray.length; i++) {
+ var imgUrl = WWWROOT + '/disinfectSystem/baseData/uploadImageAndVideoAction!getImageById.do?imageId=' + data.imageArray[i].id + '&original=true';
imgArray.push(imgUrl);
}
- }
- showImg(imgArray,barcode);
+ }
+ showImg(imgArray, barcode);
}
}
});
}
//显示图片
-function showImg(imgArray,barcode){
+function showImg(imgArray, barcode) {
var page = 1;
var totalPage = imgArray.length;
var toolbarPage = new top.Ext.Toolbar.TextItem({
- text : '第1页'
+ text: '第1页'
});
var toolbarTotalPage = new top.Ext.Toolbar.TextItem({
- text : '共'+totalPage+'页'
+ text: '共' + totalPage + '页'
});
-
+
var imagePanel = new top.Ext.Panel({
- id : 'imagePanel',
- layout : 'fit',
- height : 440,
- items : [{
- xtype : 'box',
- id : 'browseImage',
- fieldLabel : "预览图片",
- autoEl : {
- id : 'imageBrowse',
- tag : 'img',
- autoHeight:true,
- src : Ext.BLANK_IMAGE_URL,
- style : 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);',
- complete : 'off'
- }
+ id: 'imagePanel',
+ layout: 'fit',
+ height: 440,
+ items: [{
+ xtype: 'box',
+ id: 'browseImage',
+ fieldLabel: "预览图片",
+ autoEl: {
+ id: 'imageBrowse',
+ tag: 'img',
+ autoHeight: true,
+ src: Ext.BLANK_IMAGE_URL,
+ style: 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);',
+ complete: 'off'
+ }
}]
});
var browseImage = imagePanel.findById('browseImage');
- var url = imgArray[page-1] || WWWROOT+'/images/default.jpg';
- browseImage.autoEl.src=url;
+ var url = imgArray[page - 1] || WWWROOT + '/images/default.jpg';
+ browseImage.autoEl.src = url;
var showTousseImage = new top.Ext.Panel({
- items : [{
- xtype : 'panel',
- id : 'pageToolbar',
- bbar : ['->',{
- xtype : 'button',
- text : '<<',
- tooltip :"上一页",
- handler : function(){
- if (page - 1 <= 0) {
- showResult('已是第一页');
- return;
- }
- page = page - 1;
- var url = imgArray[page-1];
- var imageBrowse = top.Ext.get('imageBrowse');
- var image = imageBrowse.dom;
- image.src = url;// 覆盖原来的图片
- var element = top.Ext.get(toolbarPage.el);
- element.update('第' + page + '页');
- }
+ items: [{
+ xtype: 'panel',
+ id: 'pageToolbar',
+ bbar: ['->', {
+ xtype: 'button',
+ text: '<<',
+ tooltip: "上一页",
+ handler: function () {
+ if (page - 1 <= 0) {
+ showResult('已是第一页');
+ return;
+ }
+ page = page - 1;
+ var url = imgArray[page - 1];
+ var imageBrowse = top.Ext.get('imageBrowse');
+ var image = imageBrowse.dom;
+ image.src = url;// 覆盖原来的图片
+ var element = top.Ext.get(toolbarPage.el);
+ element.update('第' + page + '页');
+ }
},
- toolbarPage,
- toolbarTotalPage,{
- xtype : 'button',
- text : '>>',
- tooltip :"下一页",
- handler : function() {
- if (page + 1 > totalPage) {
- showResult('已是最后一页');
- return;
- }
- page = page + 1;
- var url = imgArray[page-1];
- var imageBrowse = top.Ext.get('imageBrowse');
- var image = imageBrowse.dom;
- image.src = url;// 覆盖原来的图片
- var element = top.Ext.get(toolbarPage.el);
- element.update('第' + page + '页');
- }
- }]
- },imagePanel]
+ toolbarPage,
+ toolbarTotalPage, {
+ xtype: 'button',
+ text: '>>',
+ tooltip: "下一页",
+ handler: function () {
+ if (page + 1 > totalPage) {
+ showResult('已是最后一页');
+ return;
+ }
+ page = page + 1;
+ var url = imgArray[page - 1];
+ var imageBrowse = top.Ext.get('imageBrowse');
+ var image = imageBrowse.dom;
+ image.src = url;// 覆盖原来的图片
+ var element = top.Ext.get(toolbarPage.el);
+ element.update('第' + page + '页');
+ }
+ }]
+ }, imagePanel]
});
var signGoodsWin = new top.Ext.Window({
- id : 'signGoodsWin',
- title : '请根据下图核对包内材料,确认无误再点击录入使用记录!',
+ id: 'signGoodsWin',
+ title: '请根据下图核对包内材料,确认无误再点击录入使用记录!',
resizable: false,
- width : 800,
- height : 500,
- border : false,
- modal : true,
- plain : true,
+ width: 800,
+ height: 500,
+ border: false,
+ modal: true,
+ plain: true,
stateful: false,
- items : [showTousseImage],
- buttonAlign : 'center',
- buttons : [{
- text:"录入使用记录",
- handler:function(){
- loadScanGoods(false,barcode);
+ items: [showTousseImage],
+ buttonAlign: 'center',
+ buttons: [{
+ text: "录入使用记录",
+ handler: function () {
+ loadScanGoods(false, barcode);
signGoodsWin.close();
- }
- },{
- text:"取消录入",
- handler:function(){
- signGoodsWin.close();
- }
+ }
+ }, {
+ text: "取消录入",
+ handler: function () {
+ signGoodsWin.close();
+ }
}]
});
-
+
signGoodsWin.show();
}
//GDSZYY-88:验证外来器械包的病人信息与使用记录中的病人信息是否一致
-function validPatientInfo(arr){
+function validPatientInfo(arr) {
var hospitalNum = top.Ext.getCmp('hospitalNum').getValue() || '';
var treatmentNum = top.Ext.getCmp('treatmentNum').getValue() || '';
var patientName = top.Ext.getCmp('patientName').getValue() || '';
var nameArr = [];
- if(arr){
- for(var i=0;i 0){
- showResult('请注意,以下外来器械包的病人信息与使用记录中的病人信息不一致:'+nameArr.join(",")+'!');
+ if (nameArr.length > 0) {
+ showResult('请注意,以下外来器械包的病人信息与使用记录中的病人信息不一致:' + nameArr.join(",") + '!');
}
}
@@ -626,12 +626,12 @@
* 可以扫描的条码有器械包(类型有器械包、敷料包、消毒物品、外部代理灭菌、外来器械包及外来器械拆分小包、自定义器械包、聚合包)、一次性物品(普通物品与高值耗材)
* 针对聚合包条码的扫描时还需判断是新增使用记录还是修改使用记录、需要传递使用记录的id
*/
-function loadScanGoods(isValid,barcode) {
+function loadScanGoods(isValid, barcode) {
var barcode = barcode || top.Ext.getCmp('tempBarcode').getValue();
top.Ext.getCmp('tempBarcode').setValue('');
if (barcode != '') {
//对扫描的条码进行去前辍处理(如中大附一的扫描枪扫描我们的条码010035998,实际上有可能读到的信息为{z#xy*984},Q,010035998)
- if(barcode.indexOf(",")){
+ if (barcode.indexOf(",")) {
var barcodeArray = barcode.split(",");
barcode = barcodeArray[barcodeArray.length - 1];
}
@@ -642,17 +642,17 @@
}
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/useRecordAction!loadScanedGoods.do',
- params : {
- barcode : barcode,
- useRecordId : currentUseRecordId,
- scanedBarcodes : getTousseGridData()
+ url: WWWROOT + '/disinfectSystem/useRecordAction!loadScanedGoods.do',
+ params: {
+ barcode: barcode,
+ useRecordId: currentUseRecordId,
+ scanedBarcodes: getTousseGridData()
},
- success : function(response, options) {
+ success: function (response, options) {
var result = response.responseText;
if (result) {
var goodsInfo = Ext.util.JSON.decode(result);
- if(goodsInfo.success != true){
+ if (goodsInfo.success != true) {
showResult(goodsInfo.message);
return;
}
@@ -663,171 +663,171 @@
return;
}
- if(sstsConfig.mustViewPackingPhotoBeforeForeignTousseSignAndUse && isValid){
+ if (sstsConfig.mustViewPackingPhotoBeforeForeignTousseSignAndUse && isValid) {
loadTousseDefintionByBarcod(barcode);
return
}
- if(goodsInfo.tousseType == "外来器械包" || goodsInfo.tousseType == '外来器械拆分小包'){
+ if (goodsInfo.tousseType == "外来器械包" || goodsInfo.tousseType == '外来器械拆分小包') {
var arr = [{
- newHospitalNumber:goodsInfo.hospitalNumber || '',
- newClinicNumber:goodsInfo.clinicNumber || '',
- newPatient:goodsInfo.patient || '',
- showTousseName:goodsInfo.showTousseName
+ newHospitalNumber: goodsInfo.hospitalNumber || '',
+ newClinicNumber: goodsInfo.clinicNumber || '',
+ newPatient: goodsInfo.patient || '',
+ showTousseName: goodsInfo.showTousseName
}]
validPatientInfo(arr);
}
- if(goodsInfo.tousseType != '一次性物品' && goodsInfo.tousseType != '高值耗材'){
+ if (goodsInfo.tousseType != '一次性物品' && goodsInfo.tousseType != '高值耗材') {
var validTime = goodsInfo.validUntil;
var currentTime = Ext.util.Format.date(new Date(),
- 'Y-m-d');
-
+ 'Y-m-d');
+
// 未签收的器械包不能登记使用记录 //江门市中心医院JMSZXYY-88,废弃notSignedItemsCanRegistUseRecord这个配置项
/* if(goodsInfo.status == hadShipped && sstsConfig.notSignedItemsCanRegistUseRecord == false){
showResult('该器械包未签收,不能被使用!');
return;
} */
-
+
//if ((goodsInfo.status == hadShipped && sstsConfig.notSignedItemsCanRegistUseRecord != false)|| goodsInfo.status == hadSigned) {
- if ((goodsInfo.status == hadShipped && goodsInfo.registUseRecordAfterSigned == '否')|| goodsInfo.status == hadSigned) {
+ if ((goodsInfo.status == hadShipped && goodsInfo.registUseRecordAfterSigned == '否') || goodsInfo.status == hadSigned) {
if (validTime && !compareDate(currentTime, validTime)) {
showResult('该器械包已过期!');
} else {
- if(goodsInfo.idCardMsg && goodsInfo.idCardMsg != ""){//SSTS-139 使用记录增加标识牌使用次数提示
+ if (goodsInfo.idCardMsg && goodsInfo.idCardMsg != "") {//SSTS-139 使用记录增加标识牌使用次数提示
showResult(goodsInfo.idCardMsg);
}
-
- function addTousse(){
+
+ function addTousse() {
var record = new addTousseInstance({
- id : goodsInfo.id,
- barcode : goodsInfo.barcode,
- amount : 1,
- batchNo : '',
- tousseDefinitionName : goodsInfo.tousseDefinitionName,
- showTousseName : goodsInfo.showTousseName,
- idCardUseAmount : goodsInfo.idCardUseAmount,
- packageType : goodsInfo.packageType,
- validUntil : validTime,
- tousseType : goodsInfo.tousseType,
- foreignTousseApp_id : goodsInfo.foreignTousseApp_id,
- includeImplant : goodsInfo.includeImplant,
- actualUsed : goodsInfo.actualUsed,
- isRecycling : goodsInfo.isRecycling,
- isConvertApplyGoods : goodsInfo.isConvertApplyGoods,
- haveUnSupplementMaterials : goodsInfo.haveUnSupplementMaterials,
- recyclingStatus : goodsInfo.recyclingStatus,
- urgentLevel:goodsInfo.urgentLevel,
- hospitalNumber:goodsInfo.hospitalNumber,
- clinicNumber:goodsInfo.clinicNumber,
- patient:goodsInfo.patient
+ id: goodsInfo.id,
+ barcode: goodsInfo.barcode,
+ amount: 1,
+ batchNo: '',
+ tousseDefinitionName: goodsInfo.tousseDefinitionName,
+ showTousseName: goodsInfo.showTousseName,
+ idCardUseAmount: goodsInfo.idCardUseAmount,
+ packageType: goodsInfo.packageType,
+ validUntil: validTime,
+ tousseType: goodsInfo.tousseType,
+ foreignTousseApp_id: goodsInfo.foreignTousseApp_id,
+ includeImplant: goodsInfo.includeImplant,
+ actualUsed: goodsInfo.actualUsed,
+ isRecycling: goodsInfo.isRecycling,
+ isConvertApplyGoods: goodsInfo.isConvertApplyGoods,
+ haveUnSupplementMaterials: goodsInfo.haveUnSupplementMaterials,
+ recyclingStatus: goodsInfo.recyclingStatus,
+ urgentLevel: goodsInfo.urgentLevel,
+ hospitalNumber: goodsInfo.hospitalNumber,
+ clinicNumber: goodsInfo.clinicNumber,
+ patient: goodsInfo.patient
});
- useItemsStore.insert(0 , record);
+ useItemsStore.insert(0, record);
useAmount++;
top.Ext.getCmp('useAmount').setValue(useAmount);
var msg = goodsInfo.showTousseName;
- newAddAudioTips("useRecordAudio",msg,"");
-
+ newAddAudioTips("useRecordAudio", msg, "");
+
}
- if(sstsConfig.olderTousseComfirmForUserecord && goodsInfo.older){
- if(confirm(goodsInfo.older.tousseName+"[条码:"+goodsInfo.older.barcode+"]更接近失效期,是否继续?")){
+ if (sstsConfig.olderTousseComfirmForUserecord && goodsInfo.older) {
+ if (confirm(goodsInfo.older.tousseName + "[条码:" + goodsInfo.older.barcode + "]更接近失效期,是否继续?")) {
addTousse();
}
- }else{
+ } else {
addTousse();
//如果有返回聚合包内的子包数据时,追加到该聚合包之后
- if(goodsInfo.dataSubTousseArray && goodsInfo.dataSubTousseArray.length > 0){
- for(var i = 0;i < goodsInfo.dataSubTousseArray.length;i++){
+ if (goodsInfo.dataSubTousseArray && goodsInfo.dataSubTousseArray.length > 0) {
+ for (var i = 0; i < goodsInfo.dataSubTousseArray.length; i++) {
var subTousse = goodsInfo.dataSubTousseArray[i];
var record = new addTousseInstance({
- subTousseDefinitionId : subTousse.subTousseDefinitionId,
- amount : subTousse.amount,
- tousseDefinitionName : subTousse.showTousseName,
- showTousseName : subTousse.showTousseName,
- comboTousseInstanceId : subTousse.comboTousseInstanceId,
- urgentLevel:subTousse.urgentLevel
+ subTousseDefinitionId: subTousse.subTousseDefinitionId,
+ amount: subTousse.amount,
+ tousseDefinitionName: subTousse.showTousseName,
+ showTousseName: subTousse.showTousseName,
+ comboTousseInstanceId: subTousse.comboTousseInstanceId,
+ urgentLevel: subTousse.urgentLevel
});
- useItemsStore.insert(i+1 , record);
+ useItemsStore.insert(i + 1, record);
}
}
}
}
} else {
//if (sstsConfig.notSignedItemsCanRegistUseRecord == false){
- if (goodsInfo.registUseRecordAfterSigned == '是'){
+ if (goodsInfo.registUseRecordAfterSigned == '是') {
showResult('器械包状态为【' + goodsInfo.status + '】,只能登记已签收并且未被使用的器械包!');
}
- else{
+ else {
showResult('器械包状态为【' + goodsInfo.status + '】,只能登记已发货并且未被使用的器械包!');
}
}
- }else if(goodsInfo.tousseType == '高值耗材'){
+ } else if (goodsInfo.tousseType == '高值耗材') {
//高值耗材(非一次性物品的高值耗材)
var record = new addTousseInstance({
- id : goodsInfo.id,
- barcode : goodsInfo.barcode,
- tousseDefinitionName : '',
- amount : 1,
- batchNo : goodsInfo.batchNo,
- showTousseName : goodsInfo.showTousseName,
- idCardUseAmount : goodsInfo.idCardUseAmount,
- packageType : '',
- validUntil : goodsInfo.validUntil,
- tousseType : goodsInfo.tousseType,
- goodsType : goodsInfo.goodsType,
- foreignTousseApp_id : '',
- includeImplant : '否',
- actualUsed:'是',
- urgentLevel:goodsInfo.urgentLevel,
- haveUnSupplementMaterials : false,
- hospitalNumber:goodsInfo.hospitalNumber,
- clinicNumber:goodsInfo.clinicNumber,
- patient:goodsInfo.patient
+ id: goodsInfo.id,
+ barcode: goodsInfo.barcode,
+ tousseDefinitionName: '',
+ amount: 1,
+ batchNo: goodsInfo.batchNo,
+ showTousseName: goodsInfo.showTousseName,
+ idCardUseAmount: goodsInfo.idCardUseAmount,
+ packageType: '',
+ validUntil: goodsInfo.validUntil,
+ tousseType: goodsInfo.tousseType,
+ goodsType: goodsInfo.goodsType,
+ foreignTousseApp_id: '',
+ includeImplant: '否',
+ actualUsed: '是',
+ urgentLevel: goodsInfo.urgentLevel,
+ haveUnSupplementMaterials: false,
+ hospitalNumber: goodsInfo.hospitalNumber,
+ clinicNumber: goodsInfo.clinicNumber,
+ patient: goodsInfo.patient
});
useItemsStore.add(record);
useAmount++;
top.Ext.getCmp('useAmount').setValue(useAmount);
var msg = goodsInfo.showTousseName;
- newAddAudioTips("useRecordAudio",msg,"");
- }else if(goodsInfo.tousseType == '一次性物品'){
+ newAddAudioTips("useRecordAudio", msg, "");
+ } else if (goodsInfo.tousseType == '一次性物品') {
//一次性物品
var record = new addTousseInstance({
- id : '',
- barcode : goodsInfo.barcode,
- tousseDefinitionName : '',
- amount : 1,
- batchNo : goodsInfo.batchNo,
- showTousseName : goodsInfo.showTousseName,
- idCardUseAmount : goodsInfo.idCardUseAmount,
- packageType : '',
- validUntil : goodsInfo.validUntil,
- tousseType : goodsInfo.tousseType,
- goodsType : goodsInfo.goodsType,
- foreignTousseApp_id : '',
- includeImplant : '否',
- actualUsed:'是',
- urgentLevel:goodsInfo.urgentLevel,
- haveUnSupplementMaterials : false,
- hospitalNumber:goodsInfo.hospitalNumber,
- clinicNumber:goodsInfo.clinicNumber,
- patient:goodsInfo.patient
+ id: '',
+ barcode: goodsInfo.barcode,
+ tousseDefinitionName: '',
+ amount: 1,
+ batchNo: goodsInfo.batchNo,
+ showTousseName: goodsInfo.showTousseName,
+ idCardUseAmount: goodsInfo.idCardUseAmount,
+ packageType: '',
+ validUntil: goodsInfo.validUntil,
+ tousseType: goodsInfo.tousseType,
+ goodsType: goodsInfo.goodsType,
+ foreignTousseApp_id: '',
+ includeImplant: '否',
+ actualUsed: '是',
+ urgentLevel: goodsInfo.urgentLevel,
+ haveUnSupplementMaterials: false,
+ hospitalNumber: goodsInfo.hospitalNumber,
+ clinicNumber: goodsInfo.clinicNumber,
+ patient: goodsInfo.patient
});
useItemsStore.add(record);
useAmount++;
top.Ext.getCmp('useAmount').setValue(useAmount);
var ttsName = goodsInfo.ttsName || '';
- var msg = (ttsName == '')?goodsInfo.showTousseName:ttsName;
- newAddAudioTips("useRecordAudio",msg,"");
+ var msg = (ttsName == '') ? goodsInfo.showTousseName : ttsName;
+ newAddAudioTips("useRecordAudio", msg, "");
}
} else {
- if(sstsConfig.enableExpensiveGoods){
+ if (sstsConfig.enableExpensiveGoods) {
showResult('找不到该条码的器械包或一次性物品或高值耗材!');
- }else{
+ } else {
showResult('找不到该条码的器械包或一次性物品!');
}
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult('加载出错!请稍候再试。');
}
});
@@ -838,27 +838,27 @@
function loadPatientInfoByValAndType(jsonStr) {
if (jsonStr != '') {
DataSynchronizationTableManager.getPatientInfoByNumberAndType(jsonStr, {
- callback:function(responseText){
+ callback: function (responseText) {
var result = JSON.parse(responseText);
iskeypress = false;
- if (result.success){
+ if (result.success) {
var patientInfo = result.patientInfo;
- if(patientInfo){
+ if (patientInfo) {
showPatientInfo(patientInfo);
- }else{
+ } else {
showResult('找不到该号码所对应的病人信息!');
validPatientInfo();
}
}
- else{
+ else {
showResult(result.msg);
}
- },
- timeout:45000,
- errorHandler:function(msg){
- showResult('网络加载异常,请稍候重试! 异常信息:' + msg);
- }
+ },
+ timeout: 45000,
+ errorHandler: function (msg) {
+ showResult('网络加载异常,请稍候重试! 异常信息:' + msg);
+ }
});
}
}
@@ -887,54 +887,54 @@
* operationTime:""
* }
*/
-function showPatientInfo(patientInfo){
- if(patientInfo){
- if(patientInfo.clinicNumber){
+function showPatientInfo(patientInfo) {
+ if (patientInfo) {
+ if (patientInfo.clinicNumber) {
top.Ext.getCmp('treatmentNum').setValue(patientInfo.clinicNumber);
}
- if(patientInfo.hospitalNumber){
+ if (patientInfo.hospitalNumber) {
top.Ext.getCmp('hospitalNum').setValue(patientInfo.hospitalNumber);
}
- if(patientInfo.patientName){
+ if (patientInfo.patientName) {
top.Ext.getCmp('patientName').setValue(patientInfo.patientName);
speaker.speak("病人:" + patientInfo.patientName);
}
- if(patientInfo.patientAge){
+ if (patientInfo.patientAge) {
top.Ext.getCmp('patientAge').setValue(patientInfo.patientAge);
}
- if(patientInfo.patientIDCard){
+ if (patientInfo.patientIDCard) {
top.Ext.getCmp('patientIDCard').setValue(patientInfo.patientIDCard);
}
- if(patientInfo.patientSex){
- if(patientInfo.patientSex == '男'){
+ if (patientInfo.patientSex) {
+ if (patientInfo.patientSex == '男') {
top.Ext.getCmp('patientSex').setValue('男');
- }else if(patientInfo.patientSex == '女'){
+ } else if (patientInfo.patientSex == '女') {
top.Ext.getCmp('patientSex').setValue('女');
- }else{
+ } else {
top.Ext.getCmp('patientSex').setValue('');
}
}
- if(patientInfo.bedNumber){
+ if (patientInfo.bedNumber) {
top.Ext.getCmp('bedNumber').setValue(patientInfo.bedNumber);
}
- if(patientInfo.doctorName){
+ if (patientInfo.doctorName) {
top.Ext.getCmp('doctorName').setValue(patientInfo.doctorName);
}
- if(patientInfo.anesthetist){
+ if (patientInfo.anesthetist) {
top.Ext.getCmp('anesthetist').setValue(patientInfo.anesthetist);
}
- if(patientInfo.anesthesiaMode){
+ if (patientInfo.anesthesiaMode) {
top.Ext.getCmp('anesthesiaMode').setValue(patientInfo.anesthesiaMode);
}
- if(patientInfo.operation){
+ if (patientInfo.operation) {
top.Ext.getCmp('operation').setValue(patientInfo.operation);
}
- if(patientInfo.patientArea){
+ if (patientInfo.patientArea) {
top.Ext.getCmp('patientArea').setValue(patientInfo.patientArea);
}
//病人所属科室
var ascriptionDepartment = patientInfo.ascriptionDepartment;
- if(ascriptionDepartment){
+ if (ascriptionDepartment) {
top.Ext.getCmp('departNameOfpatient').setValue('');
//store的find方法不是精确匹配,模糊匹配会有问题,改用后面的each循环判断了
/*var ascriptionDepartmentIndex = departJsonStore.find("name",ascriptionDepartment,0,false,true);
@@ -943,49 +943,49 @@
//设置病人所在科室的编码
top.Ext.getCmp('departCodeOfpatient').setValue(departJsonStore.getAt(ascriptionDepartmentIndex).get("id"));
}*/
- departJsonStore.each(function(record){
+ departJsonStore.each(function (record) {
var nameOfDepartJsonStore = record.get("name");
- if(nameOfDepartJsonStore == ascriptionDepartment){
+ if (nameOfDepartJsonStore == ascriptionDepartment) {
top.Ext.getCmp('departNameOfpatient').setValue(ascriptionDepartment);
//设置病人所在科室的编码
top.Ext.getCmp('departCodeOfpatient').setValue(record.get("id"));
return false;
}
});
}
- if(patientInfo.roomNumber){
+ if (patientInfo.roomNumber) {
top.Ext.getCmp('roomNumber').setValue(patientInfo.roomNumber);
}
- if(patientInfo.visitId){
+ if (patientInfo.visitId) {
top.Ext.getCmp('visitId').setValue(patientInfo.visitId);
}
- if(patientInfo.remark){
+ if (patientInfo.remark) {
top.Ext.getCmp('remark').setValue(patientInfo.remark);
}
- if(patientInfo.circuitNurse){
+ if (patientInfo.circuitNurse) {
top.Ext.getCmp('circuitNurse').setValue(patientInfo.circuitNurse);
}
- if(patientInfo.washHandNurse){
+ if (patientInfo.washHandNurse) {
top.Ext.getCmp('washHandNurse').setValue(patientInfo.washHandNurse);
}
- if(patientInfo.specialInfection){
+ if (patientInfo.specialInfection) {
top.Ext.getCmp('specialInfection').setValue(patientInfo.specialInfection);
}
- if(patientInfo.opRoomId){
+ if (patientInfo.opRoomId) {
top.Ext.getCmp('operationRoom').setValue(patientInfo.opRoomId);
}
- if(patientInfo.operationTime){
+ if (patientInfo.operationTime) {
var operationTime = patientInfo.operationTime;
var hour = operationTime.split(':')[0];
var min = operationTime.split(':')[1];
- var resultTime = hour+':'+min;
+ var resultTime = hour + ':' + min;
top.Ext.getCmp('operationTime').setValue(resultTime);
}
- if(patientInfo.operationScheduleId){
+ if (patientInfo.operationScheduleId) {
top.Ext.getCmp('operationScheduleId').setValue(patientInfo.operationScheduleId);
}
- if(sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('主刀医生核算科室')){
- if(patientInfo.doctorAccountDepartCode && patientInfo.doctorAccountDepart){
+ if (sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('主刀医生核算科室')) {
+ if (patientInfo.doctorAccountDepartCode && patientInfo.doctorAccountDepart) {
top.Ext.getCmp('doctorAccountDepartCode').setValue(patientInfo.doctorAccountDepartCode);
top.Ext.getCmp('doctorAccountDepart').setRawValue(patientInfo.doctorAccountDepart);
}
@@ -997,10 +997,10 @@
// 获取扫描的物品所有条码
function getTousseGridData() {
var tousseInstanceBarcodes = "";
- for ( var i = 0; i < useItemsStore.getCount(); i++) {
+ for (var i = 0; i < useItemsStore.getCount(); i++) {
var barcode = useItemsStore.getAt(i).get('barcode');
//对于聚合包的子包的这种情况,则跳过,重新下一轮循环
- if(!barcode){
+ if (!barcode) {
continue;
}
if (tousseInstanceBarcodes == "") {
@@ -1018,7 +1018,7 @@
var exist = false;
if (currentBarcode == "")
return exist;
- for ( var i = 0; i < useItemsStore.getCount(); i++) {
+ for (var i = 0; i < useItemsStore.getCount(); i++) {
var barcode = useItemsStore.getAt(i).get('barcode');
if (currentBarcode == barcode) {
exist = true;
@@ -1031,26 +1031,26 @@
// 检测器械包当前状态是否为已发货
function checkTousseInstanceIsHaveShipped(barcodes, id, callBack) {
var pass = true;
- Ext.Ajax.request( {
- url : WWWROOT + '/disinfectSystem/tousseInstanceAction!checkTousseInstancesStatus.do',
- params : {
- tousseInstanceBarcodes : barcodes,
- useRecordID : id
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/tousseInstanceAction!checkTousseInstancesStatus.do',
+ params: {
+ tousseInstanceBarcodes: barcodes,
+ useRecordID: id
},
- success : function(response, options) {
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
var success = result.success;
if (false == success) {
showResult('条码为:' + result.barcode + '的' + result.tousseType + '状态必须为'
- + hadShipped + '。');
+ + hadShipped + '。');
pass = false;
}
callBack(pass);
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult('检测条码状态出错!请稍候再试。');
pass = false;
- callBack(pass);
+ callBack(pass);
}
});
}
@@ -1063,7 +1063,7 @@
var count = tousseGridStore.getCount();
for (var i = 0; i < count; i++) {
var record = tousseGridStore.getAt(i);
- if(record.get('comboTousseInstanceId') == id || record.data.id == id){
+ if (record.get('comboTousseInstanceId') == id || record.data.id == id) {
needRemoveRecord.push(record);
}
}
@@ -1073,8 +1073,8 @@
}
function loadTousseImages(tousseName) {
- if(tousseName.indexOf('_') != -1){
- tousseName = tousseName.substring(0,tousseName.lastIndexOf('_'));
+ if (tousseName.indexOf('_') != -1) {
+ tousseName = tousseName.substring(0, tousseName.lastIndexOf('_'));
}
showTousseImageWin(tousseName);
}
@@ -1093,192 +1093,192 @@
* @param includeReview 是否包含有审核
* @returns {success:Boolean,alreadyConfirmNotice:Boolean}
*/
-function checkForSave(btObj , includeReview){
+function checkForSave(btObj, includeReview) {
//返回结果
var result = {
- //是否通用验证,true表示通过
- success:false,
- //是否已经确认过提示,如果为true,则后面调用的地方不需要再提示
- alreadyConfirmNotice:false
+ //是否通用验证,true表示通过
+ success: false,
+ //是否已经确认过提示,如果为true,则后面调用的地方不需要再提示
+ alreadyConfirmNotice: false
};
//改成各元素单独验证的方式
/*if (!formObj.getForm().isValid()) {
showResult('请正确填写表单各值');
return false;
}*/
//如果不为科室使用记录时
- if(!fromDepartmentUseRecord){
- if(sstsConfig.notAllowBlankFieldsOnUseRecordPage && typeof sstsConfig.notAllowBlankFieldsOnUseRecordPage == 'object'){
- if(!hospitalNumAllowBlank && top.Ext.getCmp('hospitalNum').getValue() == ''){
+ if (!fromDepartmentUseRecord) {
+ if (sstsConfig.notAllowBlankFieldsOnUseRecordPage && typeof sstsConfig.notAllowBlankFieldsOnUseRecordPage == 'object') {
+ if (!hospitalNumAllowBlank && top.Ext.getCmp('hospitalNum').getValue() == '') {
btObj.enable();
top.Ext.getCmp('hospitalNum').focus();
showResult('住院号不能为空');
return result;
}
- if(!treatmentNumAllowBlank && top.Ext.getCmp('treatmentNum').getValue() == ''){
+ if (!treatmentNumAllowBlank && top.Ext.getCmp('treatmentNum').getValue() == '') {
btObj.enable();
top.Ext.getCmp('treatmentNum').focus();
showResult('诊疗号不能为空');
return result;
}
- if(!washHandNurseAllowBlank && top.Ext.getCmp('washHandNurse').getValue() == ''){
+ if (!washHandNurseAllowBlank && top.Ext.getCmp('washHandNurse').getValue() == '') {
btObj.enable();
top.Ext.getCmp('washHandNurse').focus();
showResult('洗手护士不能为空');
return result;
}
- if(!circuitNurseAllowBlank && top.Ext.getCmp('circuitNurse').getValue() == ''){
+ if (!circuitNurseAllowBlank && top.Ext.getCmp('circuitNurse').getValue() == '') {
btObj.enable();
top.Ext.getCmp('circuitNurse').focus();
- showResult(circuitNurseLabelName+'不能为空');
+ showResult(circuitNurseLabelName + '不能为空');
return result;
}
- if(!operationRoomAllowBlank && top.Ext.getCmp('operationRoom').getValue() == ''){
+ if (!operationRoomAllowBlank && top.Ext.getCmp('operationRoom').getValue() == '') {
btObj.enable();
top.Ext.getCmp('operationRoom').focus();
showResult('手术间不能为空');
return result;
}
- if(!patientNameAllowBlank && top.Ext.getCmp('patientName').getValue() == ''){
+ if (!patientNameAllowBlank && top.Ext.getCmp('patientName').getValue() == '') {
btObj.enable();
top.Ext.getCmp('patientName').focus();
showResult('姓名不能为空');
return result;
}
- if(!patientAgeAllowBlank && top.Ext.getCmp('patientAge').getValue() == ''){
+ if (!patientAgeAllowBlank && top.Ext.getCmp('patientAge').getValue() == '') {
btObj.enable();
top.Ext.getCmp('patientAge').focus();
showResult('年龄不能为空');
return result;
}
- if(!patientSexAllowBlank && top.Ext.getCmp('patientSex').getValue() == ''){
+ if (!patientSexAllowBlank && top.Ext.getCmp('patientSex').getValue() == '') {
btObj.enable();
top.Ext.getCmp('patientSex').focus();
showResult('性别不能为空');
return result;
}
- if(!patientAreaAllowBlank && top.Ext.getCmp('patientArea').getValue() == ''){
+ if (!patientAreaAllowBlank && top.Ext.getCmp('patientArea').getValue() == '') {
btObj.enable();
top.Ext.getCmp('patientArea').focus();
showResult('病区不能为空');
return result;
}
- if(!departNameOfpatientAllowBlank && top.Ext.getCmp('departNameOfpatient').getValue() == ''){
+ if (!departNameOfpatientAllowBlank && top.Ext.getCmp('departNameOfpatient').getValue() == '') {
btObj.enable();
top.Ext.getCmp('departNameOfpatient').focus();
showResult('病人所在科室不能为空');
return result;
}
- if(!roomNumberAllowBlank && top.Ext.getCmp('roomNumber').getValue() == ''){
+ if (!roomNumberAllowBlank && top.Ext.getCmp('roomNumber').getValue() == '') {
btObj.enable();
top.Ext.getCmp('roomNumber').focus();
showResult('病室不能为空');
return result;
}
- if(!bedNumberAllowBlank && top.Ext.getCmp('bedNumber').getValue() == ''){
+ if (!bedNumberAllowBlank && top.Ext.getCmp('bedNumber').getValue() == '') {
btObj.enable();
top.Ext.getCmp('bedNumber').focus();
showResult('床位不能为空');
return result;
}
- if(!patientIDCardAllowBlank && top.Ext.getCmp('patientIDCard').getValue() == ''){
+ if (!patientIDCardAllowBlank && top.Ext.getCmp('patientIDCard').getValue() == '') {
btObj.enable();
top.Ext.getCmp('patientIDCard').focus();
showResult('身份证不能为空');
return result;
}
- if(!doctorNameAllowBlank && top.Ext.getCmp('doctorName').getValue() == ''){
+ if (!doctorNameAllowBlank && top.Ext.getCmp('doctorName').getValue() == '') {
btObj.enable();
top.Ext.getCmp('doctorName').focus();
showResult('手术医生不能为空');
return result;
}
- if(!surgeonAllowBlank && top.Ext.getCmp('surgeon').getValue() == ''){
+ if (!surgeonAllowBlank && top.Ext.getCmp('surgeon').getValue() == '') {
btObj.enable();
top.Ext.getCmp('surgeon').focus();
showResult('主刀医生不能为空');
return result;
}
- if(!anesthetistAllowBlank && top.Ext.getCmp('anesthetist').getValue() == ''){
+ if (!anesthetistAllowBlank && top.Ext.getCmp('anesthetist').getValue() == '') {
btObj.enable();
top.Ext.getCmp('anesthetist').focus();
showResult('麻醉医生不能为空');
return result;
}
- if(!anesthesiaModeAllowBlank && top.Ext.getCmp('anesthesiaMode').getValue() == ''){
+ if (!anesthesiaModeAllowBlank && top.Ext.getCmp('anesthesiaMode').getValue() == '') {
btObj.enable();
top.Ext.getCmp('anesthesiaMode').focus();
showResult('麻醉方式不能为空');
return result;
}
- if(!operationNameAllowBlank && top.Ext.getCmp('operation').getValue() == ''){
+ if (!operationNameAllowBlank && top.Ext.getCmp('operation').getValue() == '') {
btObj.enable();
top.Ext.getCmp('operation').focus();
showResult('手术名称不能为空');
return result;
}
- if(!operationScheduleIdAllowBlank && top.Ext.getCmp('operationScheduleId').getValue() == ''){
+ if (!operationScheduleIdAllowBlank && top.Ext.getCmp('operationScheduleId').getValue() == '') {
btObj.enable();
top.Ext.getCmp('operationScheduleId').focus();
showResult('手术单号不能为空');
return result;
}
- if(!operationTimeAllowBlank && top.Ext.getCmp('operationTime').getValue() == ''){
+ if (!operationTimeAllowBlank && top.Ext.getCmp('operationTime').getValue() == '') {
btObj.enable();
top.Ext.getCmp('operationTime').focus();
showResult('手术时间不能为空');
return result;
}
- if(!visitIdAllowBlank && top.Ext.getCmp('visitId').getValue() == ''){
+ if (!visitIdAllowBlank && top.Ext.getCmp('visitId').getValue() == '') {
btObj.enable();
top.Ext.getCmp('visitId').focus();
showResult('住院次数不能为空');
return result;
}
- if(!specialInfectionAllowBlank && top.Ext.getCmp('specialInfection').getValue() == ''){
+ if (!specialInfectionAllowBlank && top.Ext.getCmp('specialInfection').getValue() == '') {
btObj.enable();
top.Ext.getCmp('specialInfection').focus();
showResult('特殊感染类型不能为空');
return result;
}
- if(!doctorAccountDepartAllowBlank && top.Ext.getCmp('doctorAccountDepart').getValue() == ''){
+ if (!doctorAccountDepartAllowBlank && top.Ext.getCmp('doctorAccountDepart').getValue() == '') {
btObj.enable();
top.Ext.getCmp('doctorAccountDepart').focus();
showResult('主刀医生核算科室不能为空');
return result;
}
- if(!remarkAllowBlank && top.Ext.getCmp('remark').getValue() == ''){
+ if (!remarkAllowBlank && top.Ext.getCmp('remark').getValue() == '') {
btObj.enable();
top.Ext.getCmp('remark').focus();
showResult('备注不能为空');
return result;
}
- }else {
- if(getBoolValueFromJs('sstsConfig.useRecordHospitalNumAllowBlank',true) == false && top.Ext.getCmp('hospitalNum').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields){
+ } else {
+ if (getBoolValueFromJs('sstsConfig.useRecordHospitalNumAllowBlank', true) == false && top.Ext.getCmp('hospitalNum').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields) {
btObj.enable();
top.Ext.getCmp('hospitalNum').focus();
showResult('住院号不能为空');
return result;
}
- if(getBoolValueFromJs('sstsConfig.useRecordWashHandNurseAllowBlank',false) == false && top.Ext.getCmp('washHandNurse').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields){
+ if (getBoolValueFromJs('sstsConfig.useRecordWashHandNurseAllowBlank', false) == false && top.Ext.getCmp('washHandNurse').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields) {
btObj.enable();
top.Ext.getCmp('washHandNurse').focus();
showResult('洗手护士不能为空');
return result;
}
- if(getBoolValueFromJs('sstsConfig.useRecordCircuitNurseAllowBlank',false) == false && top.Ext.getCmp('circuitNurse').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields){
+ if (getBoolValueFromJs('sstsConfig.useRecordCircuitNurseAllowBlank', false) == false && top.Ext.getCmp('circuitNurse').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields) {
btObj.enable();
top.Ext.getCmp('circuitNurse').focus();
showResult(circuitNurseLabelName + '不能为空');
return result;
}
- if(useRecordOperationRoomAllowBlank == false && top.Ext.getCmp('operationRoom').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields){
+ if (useRecordOperationRoomAllowBlank == false && top.Ext.getCmp('operationRoom').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields) {
btObj.enable();
top.Ext.getCmp('operationRoom').focus();
showResult('手术间不能为空');
return result;
}
- if(!sstsConfig.noInputTreatmentNumOrHospitalNum && top.Ext.getCmp('treatmentNum').getValue() == '' && top.Ext.getCmp('hospitalNum').getValue() == '' && top.Ext.getCmp('patientName').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields){
+ if (!sstsConfig.noInputTreatmentNumOrHospitalNum && top.Ext.getCmp('treatmentNum').getValue() == '' && top.Ext.getCmp('hospitalNum').getValue() == '' && top.Ext.getCmp('patientName').getValue() == '' && !sstsConfig.allowAllBlankExceptThreeSpecialFields) {
btObj.enable();
showResult('请输入诊疗号或者住院号或者病人姓名');
return result;
@@ -1291,50 +1291,50 @@
//定义聚合包的各子包使用数量{聚合包实例id:子包使用数量总和}
var comboTousseUsedAmountJsonObject = {};
//如果有录入聚合包内子包,则判断有无录入使用数量
- for ( var i = 0; i < useItemsStore.getCount(); i++) {
+ for (var i = 0; i < useItemsStore.getCount(); i++) {
var currentRecord = useItemsStore.getAt(i);
//如果是聚合包
- if(currentRecord.get('tousseType') == '聚合包'){
+ if (currentRecord.get('tousseType') == '聚合包') {
var tousseInstanceId = currentRecord.get('id');
- if(!comboTousseUsedAmountJsonObject.hasOwnProperty(tousseInstanceId)){
+ if (!comboTousseUsedAmountJsonObject.hasOwnProperty(tousseInstanceId)) {
comboTousseUsedAmountJsonObject[tousseInstanceId] = null;
}
}
var comboTousseInstanceId = currentRecord.get('comboTousseInstanceId');
//对于聚合包的子包的这种情况,则跳过,重新下一轮循环
- if(comboTousseInstanceId){
- if(!currentRecord.get('usedAmount') && currentRecord.get('usedAmount') !== 0){
+ if (comboTousseInstanceId) {
+ if (!currentRecord.get('usedAmount') && currentRecord.get('usedAmount') !== 0) {
btObj.enable();
- showResult('请输入'+ currentRecord.get('tousseDefinitionName') +'的使用数量');
+ showResult('请输入' + currentRecord.get('tousseDefinitionName') + '的使用数量');
return result;
}
- if(currentRecord.get('usedAmount') > 0){
- if(comboTousseUsedAmountJsonObject.hasOwnProperty(comboTousseInstanceId) && !comboTousseUsedAmountJsonObject[comboTousseInstanceId]){
+ if (currentRecord.get('usedAmount') > 0) {
+ if (comboTousseUsedAmountJsonObject.hasOwnProperty(comboTousseInstanceId) && !comboTousseUsedAmountJsonObject[comboTousseInstanceId]) {
comboTousseUsedAmountJsonObject[comboTousseInstanceId] = currentRecord.get('usedAmount');
}
}
}
}
//如果启用了聚合包内子包数量修改功能,则进行验证的提示,否则不提示
- if(sstsConfig.comboTousseRegistUseRecordCanModifySubTousseAmount){
- for(var prop in comboTousseUsedAmountJsonObject){
- if(!comboTousseUsedAmountJsonObject[prop]){
+ if (sstsConfig.comboTousseRegistUseRecordCanModifySubTousseAmount) {
+ for (var prop in comboTousseUsedAmountJsonObject) {
+ if (!comboTousseUsedAmountJsonObject[prop]) {
btObj.enable();
showResult('聚合包的子包至少需要有一个子包使用数量大于0');
return result;
}
}
}
result.success = true;
- }else{
- if(!fromDepartmentUseRecord){
- if(!validateUseRecordItemsWhenReviewing(btObj,includeReview)){
+ } else {
+ if (!fromDepartmentUseRecord) {
+ if (!validateUseRecordItemsWhenReviewing(btObj, includeReview)) {
return result;
}
btObj.disable();
var confirmResult = window.confirm("该使用记录没有登记使用的物品,要继续吗?");
btObj.enable();
- if(confirmResult){
+ if (confirmResult) {
result.success = true;
result.alreadyConfirmNotice = true;
}
@@ -1346,7 +1346,7 @@
btObj.enable();
return false;
});*/
- }else{
+ } else {
showResult('器械包列表信息不能为空');
btObj.enable();
return result;
@@ -1358,11 +1358,11 @@
/**
* 判断如果使用物品明细为空,且有包含审核(如审核、保存并审核、审核并转换申请单、保存审核并转换申请单等操作时,不一一列举)的操作,则进行提示
*/
-function validateUseRecordItemsWhenReviewing(btObj , includeReview){
+function validateUseRecordItemsWhenReviewing(btObj, includeReview) {
btObj.disable();
// 获取扫描的物品所有条码
var barcodes = getTousseGridData();
- if(!barcodes && includeReview){
+ if (!barcodes && includeReview) {
showResult("该使用记录没有登记使用的物品,不能进行审核和申请");
btObj.enable();
return false;
@@ -1374,7 +1374,7 @@
/**
* 关闭表单数据录入窗口,刷新grid列表
*/
-function closeWinAndRefreshGrid(win){
+function closeWinAndRefreshGrid(win) {
win.close();
grid.dwrReload();
}
@@ -1389,30 +1389,30 @@
* @param callback 回调函数,此处的回调函数审核与审核并转换申请单的函数
* @returns {Boolean}
*/
-function submitUseRecordForm(btObj, win, id, createNew , includeReview , callback) {
+function submitUseRecordForm(btObj, win, id, createNew, includeReview, callback) {
btObj.disable();
- var result = checkForSave(btObj,includeReview);
+ var result = checkForSave(btObj, includeReview);
if (result.success) {
var barcodes = getTousseGridData();
// 保存时,检测当前所有器械包的状态是否为已发货
- checkTousseInstanceIsHaveShipped(barcodes,id,function callBack(pass){
+ checkTousseInstanceIsHaveShipped(barcodes, id, function callBack(pass) {
if (!pass) {
btObj.enable();
return false;
}
-
+
btObj.disable();
//如果有回调函数
- if(callback){
- submitFormForSave(btObj, win, id, createNew , callback);
- }else{
- if(result.alreadyConfirmNotice){
+ if (callback) {
+ submitFormForSave(btObj, win, id, createNew, callback);
+ } else {
+ if (result.alreadyConfirmNotice) {
submitFormForSaveAfterConfirm(btObj, win, id, createNew);
- }else{
- top.Ext.MessageBox.confirm("请确认","是否提交"+entityName+"信息?",function(btn) {
- if(btn=='yes') {
+ } else {
+ top.Ext.MessageBox.confirm("请确认", "是否提交" + entityName + "信息?", function (btn) {
+ if (btn == 'yes') {
submitFormForSaveAfterConfirm(btObj, win, id, createNew);
- }else{
+ } else {
btObj.enable();
return false;
}
@@ -1431,7 +1431,7 @@
* @param id 使用记录id,用于区分是新增还是修改
* @param createNew 是否新创建
*/
-function submitFormForSaveAfterConfirm(btObj, win, id, createNew){
+function submitFormForSaveAfterConfirm(btObj, win, id, createNew) {
if (sstsConfig.saveUseRecordPrompt && !id) {
if (sstsConfig.useRecordAuditMode == 3) {
alert('请点击"保存并审核生成申请单"按钮,否则无法发送供应室');
@@ -1452,66 +1452,66 @@
* @param createNew 是否新建,true表示新建
* @param callback 回调函数,此处的回调函数审核与审核并转换申请单的函数
*/
-function submitFormForSave(btObj, win, id, createNew , callback){
+function submitFormForSave(btObj, win, id, createNew, callback) {
top.Ext.getCmp('depart').enable();
- setFormParams(formObj.form, [ 'id', 'washHandNurse','circuitNurse', 'operationRoom','treatmentNum',
- 'hospitalNum', 'patientName','patientAge', 'patientSex', 'roomNumber',
- 'bedNumber', 'patientIDCard', 'doctorName', 'surgeon','operationName','specialInfection','operationTime','operationScheduleId', 'remark','departCodeOfpatient' ]);
+ setFormParams(formObj.form, ['id', 'washHandNurse', 'circuitNurse', 'operationRoom', 'treatmentNum',
+ 'hospitalNum', 'patientName', 'patientAge', 'patientSex', 'roomNumber',
+ 'bedNumber', 'patientIDCard', 'doctorName', 'surgeon', 'operationName', 'specialInfection', 'operationTime', 'operationScheduleId', 'remark', 'departCodeOfpatient']);
// 设置表单上的item参数(因为struts2版本会对前台传过来日期的时分秒部分截掉,所以手术时间需要单独传)
- if(top.Ext.getCmp('departNameOfpatient').getRawValue() == ''){
+ if (top.Ext.getCmp('departNameOfpatient').getRawValue() == '') {
top.Ext.getCmp('departCodeOfpatient').setValue("");
}
var tousseInstanceMaterialErrorDamageItems = top.Ext.getCmp('tousseInstanceMaterialErrorDamageItems').getValue();
- if(tousseInstanceMaterialErrorDamageItems !== ''){
+ if (tousseInstanceMaterialErrorDamageItems !== '') {
tousseInstanceMaterialErrorDamageItems = JSON.parse(tousseInstanceMaterialErrorDamageItems);
- for(var i=0;i 0){
+ if (result.data && result.data.length > 0) {
urgentLevelData.lowestGradeUrgentLevel = result.data[0];
- for(var i = 0;i < result.data.length;i++){
+ for (var i = 0; i < result.data.length; i++) {
var urgentLevelDataItem = result.data[i];
- if(!urgentLevelData.defaultUrgentLevel && urgentLevelDataItem.urgentDefaultValue == '是'){
+ if (!urgentLevelData.defaultUrgentLevel && urgentLevelDataItem.urgentDefaultValue == '是') {
urgentLevelData.defaultUrgentLevel = urgentLevelDataItem;
}
urgentLevelDataMap[urgentLevelDataItem.id] = urgentLevelDataItem;
}
}
- addAndEditUseRecordAfterUrgentLevelDataLoaded(id, status,recyclingStatus);
- }else{
- if(!result.message){
+ addAndEditUseRecordAfterUrgentLevelDataLoaded(id, status, recyclingStatus);
+ } else {
+ if (!result.message) {
showResult("加载加急级别失败.");
}
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult("加载加急级别失败.");
}
});
- }else{
- addAndEditUseRecordAfterUrgentLevelDataLoaded(id, status,recyclingStatus);
+ } else {
+ addAndEditUseRecordAfterUrgentLevelDataLoaded(id, status, recyclingStatus);
}
}
@@ -1809,1488 +1809,1500 @@
* 审核状态
* @return
*/
-function addAndEditUseRecordAfterUrgentLevelDataLoaded(id, status,recyclingStatus) {
+function addAndEditUseRecordAfterUrgentLevelDataLoaded(id, status, recyclingStatus) {
currentUseRecordId = id;
- useRecordOperationRoomAllowBlank = getBoolValueFromJs('sstsConfig.useRecordOperationRoomAllowBlank',true);
+ useRecordOperationRoomAllowBlank = getBoolValueFromJs('sstsConfig.useRecordOperationRoomAllowBlank', true);
useItemsStore.removeAll();
useAmount = 0;
var tbar;
var saveBtn = {
- text : '保存',
- hidden : id ? (fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Update : SSTS_UseRecord_Update) : (fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Create : SSTS_UseRecord_Create),
- handler : function() {
- top.Ext.getCmp("audited").setValue("");
- submitUseRecordForm(this, useRecordWin, id, false, false);
- }
- };
+ text: '保存',
+ hidden: id ? (fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Update : SSTS_UseRecord_Update) : (fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Create : SSTS_UseRecord_Create),
+ handler: function () {
+ top.Ext.getCmp("audited").setValue("");
+ submitUseRecordForm(this, useRecordWin, id, false, false);
+ }
+ };
var saveAndNewBtn = {
- text : '保存并新建',
- hidden : id ? (fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Update : SSTS_UseRecord_Update) : (fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Create : SSTS_UseRecord_Create),
- handler : function() {
- top.Ext.getCmp("audited").setValue("");
- submitUseRecordForm(this, useRecordWin, id, true, false);
- }
- };
+ text: '保存并新建',
+ hidden: id ? (fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Update : SSTS_UseRecord_Update) : (fromDepartmentUseRecord ? SSTS_DepartmentUseRecord_Create : SSTS_UseRecord_Create),
+ handler: function () {
+ top.Ext.getCmp("audited").setValue("");
+ submitUseRecordForm(this, useRecordWin, id, true, false);
+ }
+ };
var reviewBtn = {
- text : '审核',
- hidden : fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Review || sstsConfig.useRecordAuditMode != 1) : (SSTS_UseRecord_Review || sstsConfig.useRecordAuditMode != 1),
- handler : function() {
- top.Ext.getCmp("audited").setValue("true");// action里则会根据audited的值判断用户是点击申述还是保存按钮,true为审核
- submitUseRecordForm(this, useRecordWin, id, false , true, reviewUseRecordForm);
- }
- };
+ text: '审核',
+ hidden: fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Review || sstsConfig.useRecordAuditMode != 1) : (SSTS_UseRecord_Review || sstsConfig.useRecordAuditMode != 1),
+ handler: function () {
+ top.Ext.getCmp("audited").setValue("true");// action里则会根据audited的值判断用户是点击申述还是保存按钮,true为审核
+ submitUseRecordForm(this, useRecordWin, id, false, true, reviewUseRecordForm);
+ }
+ };
var createApplicationBtn = {
- text : '生成申请单',
- hidden : fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 1) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 1),
- handler : function() {
- if((recyclingStatus == "已回收" || recyclingStatus == "部分回收") && sstsConfig.monitorGoodsRecyclingStatusForUseRecord){
- showResult('不能生成申请单,请确认该条记录为未回收状态或空');
- return;
- }
- if(!validateUseRecordItemsWhenReviewing(this,true)){
- return;
- }
- var operatorStr = top.Ext.getCmp('operator').getValue();
- var departStr = top.Ext.getCmp('depart').getValue();
- var departCodingStr = top.Ext.getCmp('departCoding').getValue();
- var btn = this;
- var confirmMessage = "确定要将本使用记录生成申请单吗?";
- if(sstsConfig.auditAndConvertUseRecordConfirmMessage){
- confirmMessage = "手术是否已完成,不需要追加器械包?";
- }
- top.Ext.MessageBox.confirm("请确认",confirmMessage,
- function(button, text) {
- if ("yes" == button) {
- convertUseRecordToApplication(btn, id, operatorStr, departStr, departCodingStr, useRecordWin);
- }
- });
-
+ text: '生成申请单',
+ hidden: fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 1) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 1),
+ handler: function () {
+ if ((recyclingStatus == "已回收" || recyclingStatus == "部分回收") && sstsConfig.monitorGoodsRecyclingStatusForUseRecord) {
+ showResult('不能生成申请单,请确认该条记录为未回收状态或空');
+ return;
}
+ if (!validateUseRecordItemsWhenReviewing(this, true)) {
+ return;
+ }
+ var operatorStr = top.Ext.getCmp('operator').getValue();
+ var departStr = top.Ext.getCmp('depart').getValue();
+ var departCodingStr = top.Ext.getCmp('departCoding').getValue();
+ var btn = this;
+ var confirmMessage = "确定要将本使用记录生成申请单吗?";
+ if (sstsConfig.auditAndConvertUseRecordConfirmMessage) {
+ confirmMessage = "手术是否已完成,不需要追加器械包?";
+ }
+ top.Ext.MessageBox.confirm("请确认", confirmMessage,
+ function (button, text) {
+ if ("yes" == button) {
+ convertUseRecordToApplication(btn, id, operatorStr, departStr, departCodingStr, useRecordWin);
+ }
+ });
+
+ }
}
- var reviewAndConvertBtn = {
- text : '审核并生成申请单',
- hidden : fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 2) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 2),
- handler : function() {
- top.Ext.getCmp("audited").setValue("true");// action里则会根据audited的值判断用户是点击审核还是保存按钮,true为审核
- submitUseRecordForm(this, useRecordWin, id, false ,true , reviewAndConvertUseRecordForm);
- }
- };
- var saveAndReviewAndConvertBtn = {
- text : '保存并审核生成申请单',
- hidden : fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 3) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 3),
- handler : function() {
- if(!validateUseRecordItemsWhenReviewing(this,true)){
- return;
- }
- top.Ext.getCmp("audited").setValue("true");// action里则会根据audited的值判断用户是点击审核还是保存按钮,true为审核
- saveAndReviewAndConvertUseRecordForm(this,useRecordWin,false);
- }
- };
+ var reviewAndConvertBtn = {
+ text: '审核并生成申请单',
+ hidden: fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 2) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 2),
+ handler: function () {
+ top.Ext.getCmp("audited").setValue("true");// action里则会根据audited的值判断用户是点击审核还是保存按钮,true为审核
+ submitUseRecordForm(this, useRecordWin, id, false, true, reviewAndConvertUseRecordForm);
+ }
+ };
+ var saveAndReviewAndConvertBtn = {
+ text: '保存并审核生成申请单',
+ hidden: fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 3) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 3),
+ handler: function () {
+ if (!validateUseRecordItemsWhenReviewing(this, true)) {
+ return;
+ }
+ top.Ext.getCmp("audited").setValue("true");// action里则会根据audited的值判断用户是点击审核还是保存按钮,true为审核
+ saveAndReviewAndConvertUseRecordForm(this, useRecordWin, false);
+ }
+ };
var saveAndReviewAndConvertAndNewBtn = {
- text : '保存并审核生成申请单并新建',
- hidden : fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 3) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 3),
- handler : function() {
- if(!validateUseRecordItemsWhenReviewing(this,true)){
- return;
- }
- top.Ext.getCmp("audited").setValue("true");// action里则会根据audited的值判断用户是点击审核还是保存按钮,true为审核
- saveAndReviewAndConvertUseRecordForm(this,useRecordWin,true);
- }
+ text: '保存并审核生成申请单并新建',
+ hidden: fromDepartmentUseRecord ? (SSTS_DepartmentUseRecord_Convert || sstsConfig.useRecordAuditMode != 3) : (SSTS_UseRecord_Convert || sstsConfig.useRecordAuditMode != 3),
+ handler: function () {
+ if (!validateUseRecordItemsWhenReviewing(this, true)) {
+ return;
+ }
+ top.Ext.getCmp("audited").setValue("true");// action里则会根据audited的值判断用户是点击审核还是保存按钮,true为审核
+ saveAndReviewAndConvertUseRecordForm(this, useRecordWin, true);
+ }
}
var fastRecyclingBtn = {
- text : '快速回收',
- id:'quickRecycingID',
- hidden : sstsConfig.disableUseRecordQuickRecycling,
- handler : function() {
- var records = top.Ext.getCmp('tousseInstanceGrid').getSelectionModel().getSelections();
- if(records.length == 0){
- showResult('请选择要快速回收的器械包。');
- return false;
+ text: '快速回收',
+ id: 'quickRecycingID',
+ hidden: sstsConfig.disableUseRecordQuickRecycling,
+ handler: function () {
+ var records = top.Ext.getCmp('tousseInstanceGrid').getSelectionModel().getSelections();
+ if (records.length == 0) {
+ showResult('请选择要快速回收的器械包。');
+ return false;
+ }
+ var barcodes = "";
+ for (var i = 0; i < records.length; i++) {
+ var currentRecord = records[i];
+ if (currentRecord.data.tousseType == '聚合包') {
+ alert(currentRecord.data.showTousseName + "是聚合包,不能进行快速回收");
+ return;
}
- var barcodes = "";
- for(var i=0;i 0){
+ if (count > 0) {
for (var i = 0; i < count; i++) {
- try{
+ try {
var tousseMaterialErrorDamageJsonData = store.data.items[i].data["tousseMaterialErrorDamageJsonData"];
- if(tousseMaterialErrorDamageJsonData){
+ if (tousseMaterialErrorDamageJsonData) {
tousseInstanceMaterialErrorDamageArray.push(tousseMaterialErrorDamageJsonData);
}
- }catch (e) {
+ } catch (e) {
// TODO: handle exception
}
}
}
});
useItemsStore.load();
if (status == unAudited) {// 未审核
- if(!SSTS_UseRecord_Review){
- if (sstsConfig.useRecordAuditMode == 2){
- tbar = [printBtn,fastRecyclingBtn, reviewAndConvertBtn, saveBtn, saveAndNewBtn, cancelBtn ];
+ if (!SSTS_UseRecord_Review) {
+ if (sstsConfig.useRecordAuditMode == 2) {
+ tbar = [printBtn, fastRecyclingBtn, reviewAndConvertBtn, saveBtn, saveAndNewBtn, cancelBtn];
}
- else{
- tbar = [printBtn,fastRecyclingBtn, reviewBtn, saveBtn, saveAndNewBtn, cancelBtn ];
+ else {
+ tbar = [printBtn, fastRecyclingBtn, reviewBtn, saveBtn, saveAndNewBtn, cancelBtn];
}
- }else{
- tbar = [printBtn,saveBtn, saveAndNewBtn, cancelBtn];
+ } else {
+ tbar = [printBtn, saveBtn, saveAndNewBtn, cancelBtn];
}
- }
- else if (status == audited){ // 已审核,则不显示保存按钮
- if (sstsConfig.useRecordAuditMode == 2){
- tbar = [ printBtn,reviewAndConvertBtn, cancelBtn ];
+ }
+ else if (status == audited) { // 已审核,则不显示保存按钮
+ if (sstsConfig.useRecordAuditMode == 2) {
+ tbar = [printBtn, reviewAndConvertBtn, cancelBtn];
}
- else{
- tbar = [ printBtn,createApplicationBtn, cancelBtn ];
+ else {
+ tbar = [printBtn, createApplicationBtn, cancelBtn];
}
}
else {// 已申请,只显示取消按钮
- tbar = [ printBtn, cancelBtn ];
+ tbar = [printBtn, cancelBtn];
}
-
- materialStore.on("beforeload", function(thiz, options) {
+
+ materialStore.on("beforeload", function (thiz, options) {
thiz.baseParams["useRecordId"] = id;
});
- materialStore.on("load", function(store,recordArry, options) {
+ materialStore.on("load", function (store, recordArry, options) {
var count = materialStore.getCount();
- if(count > 0){
+ if (count > 0) {
top.Ext.getCmp('tousseInstanceGrid').setHeight(165);
top.Ext.getCmp('materialGridFieldset').show();
}
});
materialStore.load();
} else {// 添加
- if (sstsConfig.useRecordAuditMode == 3){
- if(sstsConfig.useRecordNewAfterSubmit == 1){
+ if (sstsConfig.useRecordAuditMode == 3) {
+ if (sstsConfig.useRecordNewAfterSubmit == 1) {
tbar = [saveAndReviewAndConvertAndNewBtn, cancelBtn];
- }else{
+ } else {
tbar = [saveAndReviewAndConvertBtn, cancelBtn];
}
- }else if (sstsConfig.useRecordAuditMode == 2){
- if(sstsConfig.useRecordNewAfterSubmit == 1){
- tbar = [ saveBtn, saveAndNewBtn, cancelBtn];
- }else{
- tbar = [ saveBtn, saveAndNewBtn, cancelBtn];
+ } else if (sstsConfig.useRecordAuditMode == 2) {
+ if (sstsConfig.useRecordNewAfterSubmit == 1) {
+ tbar = [saveBtn, saveAndNewBtn, cancelBtn];
+ } else {
+ tbar = [saveBtn, saveAndNewBtn, cancelBtn];
}
- }else{
- tbar = [ saveBtn, saveAndNewBtn, cancelBtn];
+ } else {
+ tbar = [saveBtn, saveAndNewBtn, cancelBtn];
}
-
+
}
- var sexArray = [['男'],['女']];
+ var sexArray = [['男'], ['女']];
//手术状态
- var operationStatusArray = [[OPERATION_STATUS_PRE_OPERATION],[OPERATION_STATUS_BEGIN_OPERATION],[OPERATION_STATUS_IN_OPERATION],[OPERATION_STATUS_END_OPERATION]];
+ var operationStatusArray = [[OPERATION_STATUS_PRE_OPERATION], [OPERATION_STATUS_BEGIN_OPERATION], [OPERATION_STATUS_IN_OPERATION], [OPERATION_STATUS_END_OPERATION]];
var operationNameStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectsystem/basedatamanager/operationOrgAction!findOrgUnitOperationName.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectsystem/basedatamanager/operationOrgAction!findOrgUnitOperationName.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- totalProperty : 'totalCount',
- root : 'data'
+ reader: new Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
}, [
- {name : 'id',mapping : 'id'},
- {name : 'operationName',mapping : 'operationName'}]
+ { name: 'id', mapping: 'id' },
+ { name: 'operationName', mapping: 'operationName' }]
)
});
-
+
var tousseCm = new Ext.grid.ColumnModel([sm,
- {id : 'id',dataIndex : 'id',hidden : true},
- {header : "条码",dataIndex : 'barcode',width : 60,menuDisabled : true,renderer : renderTousseInstanceInfoShowFun},
- {header : "name",dataIndex : 'tousseDefinitionName',hidden : true,menuDisabled : true},
- {header : "名称",dataIndex : 'showTousseName',width : 150,menuDisabled : true,renderer : renderTousseInstanceNameForUrgent},
- {header : "使用次数",dataIndex : 'idCardUseAmount',width : 50,hidden : sstsConfig.disableIdCard},
- {header : '加急',width : 60,hidden : (!sstsConfig.enableUrgentFunction),
- renderer : function(v, p, record,rowIndex, colIndex) {
- /*var imgName = (record.data.isUrgentForUseRecord=='是')?'arrow_down':'arrow_top';
- var str = "";
- //对于聚合包内的子包所在的行,不提供加急选择
- if(!record.get("comboTousseInstanceId")){
- str += " ";
- }
- str += " ";
- return str;*/
-
- //由图标按钮调整为下拉框
- if(!record.get("comboTousseInstanceId")){
- var useRecordBarcode = record.data.barcode;
- var selectElementId = "select_"+useRecordBarcode;
- var urgentLevelComboHtml = "";
- urgentLevelComboHtml += "不加急 ";
-
- //遍历所配置的所有启用的加急级别
- if(urgentLevelData.data && urgentLevelData.data.length > 0){
- var status = record.data.status;
- var urgentLevelIdForUseRecord = record.data.urgentLevelIdForUseRecord;
- //默认级别的加急
- var defaultUrgentLevel = urgentLevelData.defaultUrgentLevel;
- //最低级别的加急
- var lowestGradeUrgentLevel = urgentLevelData.lowestGradeUrgentLevel;
- for(var i = 0;i < urgentLevelData.data.length;i++){
- var urgentLevelDataId = urgentLevelData.data[i]["id"];
- //如果为新扫描的包,即包实例的status不为“已使用”时(新添加使用记录录入器械包时或打开已有的使用记录新扫描包时):加急级别下拉框的默认选中值的顺序为默认级别的加急、最低级别的加急
- //如果为已经录入到使用记录的包时,即包实例的status为“已使用”时(打开已有的使用记录加载使用记录已录入的包时),默认选中值为包实例 录使用记录时的加急级别
- if(status == '已使用' || urgentLevelIdForUseRecord){
- urgentLevelComboHtml += ""+ urgentLevelData.data[i]["urgentLevel"] +" ";
- }else{
- var selected = "";
- //加急后的值为默认的加急级别,如果没有默认的加急级别,则为最低的加急级别的值.这一段需求已经不需要了,代码已写好先注释掉
- /*if(defaultUrgentLevel){
- if(defaultUrgentLevel.id == urgentLevelDataId){
- selected = "selected";
- }
- }else if(lowestGradeUrgentLevel && lowestGradeUrgentLevel.id == urgentLevelDataId){
- selected = "selected";
- }*/
- urgentLevelComboHtml += ""+ urgentLevelData.data[i]["urgentLevel"] +" ";
- }
- }
- }
- urgentLevelComboHtml += " ";
- return urgentLevelComboHtml;
- }
- //对于聚合包内的子包所在的行,只进行相关字段的显示,不提供加急选择
- return "";
- },
- menuDisabled : true
- },{header : "是否真正使用",dataIndex : 'actualUsed',width : 70,menuDisabled : true,hidden:!sstsConfig.enableActualUsed,
- renderer: function(v, p, record,rowIndex, colIndex){
- //对于聚合包内的子包所在的行,不提供选择
- if(!record.get("comboTousseInstanceId")){
- var str = v;
- var id = record.id;
- if(record.data.actualUsed == '否'){
- str = " 是 否";
- }else if(record.data.actualUsed == '是'){
- str = " 是 否";
+ { id: 'id', dataIndex: 'id', hidden: true },
+ { header: "条码", dataIndex: 'barcode', width: 60, menuDisabled: true, renderer: renderTousseInstanceInfoShowFun },
+ { header: "name", dataIndex: 'tousseDefinitionName', hidden: true, menuDisabled: true },
+ { header: "名称", dataIndex: 'showTousseName', width: 150, menuDisabled: true, renderer: renderTousseInstanceNameForUrgent },
+ { header: "使用次数", dataIndex: 'idCardUseAmount', width: 50, hidden: sstsConfig.disableIdCard },
+ {
+ header: '加急', width: 60, hidden: (!sstsConfig.enableUrgentFunction),
+ renderer: function (v, p, record, rowIndex, colIndex) {
+ /*var imgName = (record.data.isUrgentForUseRecord=='是')?'arrow_down':'arrow_top';
+ var str = "";
+ //对于聚合包内的子包所在的行,不提供加急选择
+ if(!record.get("comboTousseInstanceId")){
+ str += " ";
}
- return str;
- }else{
- return "";
- }
- }},
- {header : "数量",dataIndex : 'amount',width : 30,menuDisabled : true,editor : new Ext.form.NumberField({
- allowBlank : false,
- listeners : {
- focus : function(thiz){
- var record = top.Ext.getCmp('tousseInstanceGrid').getSelectionModel().getSelected();
- if(record.data.tousseType == '一次性物品' && record.data.goodsType != '高值耗材'){
- thiz.selectText();
- }else if(record.data.tousseType != '一次性物品'){
- top.Ext.MessageBox.alert("提示","不能修改器械包数量!");
- }else if(record.data.goodsType == '高值耗材'){
- top.Ext.MessageBox.alert("提示","不能修改高值耗材数量!");
- }
- }
- }
- })},
- {header : "使用数量",dataIndex : 'usedAmount',width : 50,hidden:(sstsConfig.comboTousseRegistUseRecordCanModifySubTousseAmount != true),menuDisabled : true,editor : new Ext.form.NumberField({
- allowBlank : false,
- width:30,
- //不允许负数、不允许小数
- allowNegative : false,
- allowDecimals : false,
- listeners : {
- focus : function(thiz){
- //只有聚合包内的子包才可以录入使用数量
- var record = top.Ext.getCmp('tousseInstanceGrid').getSelectionModel().getSelected();
- if(record.data.comboTousseInstanceId){
- thiz.selectText();
- }else {
- top.Ext.MessageBox.alert("提示","只有聚合包内的子包才可以录入使用数量!");
- }
- }
- }
- })},
- {header : "包装类型",dataIndex : 'packageType',width : 55,menuDisabled : true},
- {header : "物品类型",dataIndex : 'goodsType',hidden : true},
- {header : "批次",dataIndex : 'batchNo',width : 60,menuDisabled : true},
- {header : "失效日期",dataIndex : 'validUntil',menuDisabled : true,width : 60},
- {header : "图片",dataIndex : 'tousseDefinitionName',menuDisabled : true,width : 35,renderer : function(v, p, record){
- if(record.data.tousseType != '一次性物品'){
- var str = " ";
- return str;
- }
- }},
- {header : "植入物使用情况",dataIndex : 'tousseDefinitionName',menuDisabled : true,width : 80,renderer : function(v, p, record){
- var tousseType = record.get("tousseType");
- var includeImplant = record.get("includeImplant");
- var tousseBarcode = record.get("barcode");
- if("外来器械包" == tousseType || "外来器械拆分小包" == tousseType || "是" == includeImplant){
- var app_id = record.get("foreignTousseApp_id");
- if(app_id == undefined){
- app_id = "";
- }
- var str = " ";
- return str;
- }
- return "";
- }},
- {header : '操作',id : 'delAction',width : 90,
- renderer : function(v, p, record,rowIndex) {
+ str += " ";
+ return str;*/
+
+ //由图标按钮调整为下拉框
+ if (!record.get("comboTousseInstanceId")) {
+ var useRecordBarcode = record.data.barcode;
+ var selectElementId = "select_" + useRecordBarcode;
+ var urgentLevelComboHtml = "";
+ urgentLevelComboHtml += "不加急 ";
+
+ //遍历所配置的所有启用的加急级别
+ if (urgentLevelData.data && urgentLevelData.data.length > 0) {
+ var status = record.data.status;
+ var urgentLevelIdForUseRecord = record.data.urgentLevelIdForUseRecord;
+ //默认级别的加急
+ var defaultUrgentLevel = urgentLevelData.defaultUrgentLevel;
+ //最低级别的加急
+ var lowestGradeUrgentLevel = urgentLevelData.lowestGradeUrgentLevel;
+ for (var i = 0; i < urgentLevelData.data.length; i++) {
+ var urgentLevelDataId = urgentLevelData.data[i]["id"];
+ //如果为新扫描的包,即包实例的status不为“已使用”时(新添加使用记录录入器械包时或打开已有的使用记录新扫描包时):加急级别下拉框的默认选中值的顺序为默认级别的加急、最低级别的加急
+ //如果为已经录入到使用记录的包时,即包实例的status为“已使用”时(打开已有的使用记录加载使用记录已录入的包时),默认选中值为包实例 录使用记录时的加急级别
+ if (status == '已使用' || urgentLevelIdForUseRecord) {
+ urgentLevelComboHtml += "" + urgentLevelData.data[i]["urgentLevel"] + " ";
+ } else {
+ var selected = "";
+ //加急后的值为默认的加急级别,如果没有默认的加急级别,则为最低的加急级别的值.这一段需求已经不需要了,代码已写好先注释掉
+ /*if(defaultUrgentLevel){
+ if(defaultUrgentLevel.id == urgentLevelDataId){
+ selected = "selected";
+ }
+ }else if(lowestGradeUrgentLevel && lowestGradeUrgentLevel.id == urgentLevelDataId){
+ selected = "selected";
+ }*/
+ urgentLevelComboHtml += "" + urgentLevelData.data[i]["urgentLevel"] + " ";
+ }
+ }
+ }
+ urgentLevelComboHtml += " ";
+ return urgentLevelComboHtml;
+ }
+ //对于聚合包内的子包所在的行,只进行相关字段的显示,不提供加急选择
+ return "";
+ },
+ menuDisabled: true
+ }, {
+ header: "是否真正使用", dataIndex: 'actualUsed', width: 70, menuDisabled: true, hidden: !sstsConfig.enableActualUsed,
+ renderer: function (v, p, record, rowIndex, colIndex) {
+ //对于聚合包内的子包所在的行,不提供选择
+ if (!record.get("comboTousseInstanceId")) {
+ var str = v;
+ var id = record.id;
+ if (record.data.actualUsed == '否') {
+ str = " 是 否";
+ } else if (record.data.actualUsed == '是') {
+ str = " 是 否";
+ }
+ return str;
+ } else {
+ return "";
+ }
+ }
+ },
+ {
+ header: "数量", dataIndex: 'amount', width: 30, menuDisabled: true, editor: new Ext.form.NumberField({
+ allowBlank: false,
+ listeners: {
+ focus: function (thiz) {
+ var record = top.Ext.getCmp('tousseInstanceGrid').getSelectionModel().getSelected();
+ if (record.data.tousseType == '一次性物品' && record.data.goodsType != '高值耗材') {
+ thiz.selectText();
+ } else if (record.data.tousseType != '一次性物品') {
+ top.Ext.MessageBox.alert("提示", "不能修改器械包数量!");
+ } else if (record.data.goodsType == '高值耗材') {
+ top.Ext.MessageBox.alert("提示", "不能修改高值耗材数量!");
+ }
+ }
+ }
+ })
+ },
+ {
+ header: "使用数量", dataIndex: 'usedAmount', width: 50, hidden: (sstsConfig.comboTousseRegistUseRecordCanModifySubTousseAmount != true), menuDisabled: true, editor: new Ext.form.NumberField({
+ allowBlank: false,
+ width: 30,
+ //不允许负数、不允许小数
+ allowNegative: false,
+ allowDecimals: false,
+ listeners: {
+ focus: function (thiz) {
+ //只有聚合包内的子包才可以录入使用数量
+ var record = top.Ext.getCmp('tousseInstanceGrid').getSelectionModel().getSelected();
+ if (record.data.comboTousseInstanceId) {
+ thiz.selectText();
+ } else {
+ top.Ext.MessageBox.alert("提示", "只有聚合包内的子包才可以录入使用数量!");
+ }
+ }
+ }
+ })
+ },
+ { header: "包装类型", dataIndex: 'packageType', width: 55, menuDisabled: true },
+ { header: "物品类型", dataIndex: 'goodsType', hidden: true },
+ { header: "批次", dataIndex: 'batchNo', width: 60, menuDisabled: true },
+ { header: "失效日期", dataIndex: 'validUntil', menuDisabled: true, width: 60 },
+ {
+ header: "图片", dataIndex: 'tousseDefinitionName', menuDisabled: true, width: 35, renderer: function (v, p, record) {
+ if (record.data.tousseType != '一次性物品') {
+ var str = " ";
+ return str;
+ }
+ }
+ },
+ {
+ header: "植入物使用情况", dataIndex: 'tousseDefinitionName', menuDisabled: true, width: 80, renderer: function (v, p, record) {
+ var tousseType = record.get("tousseType");
+ var includeImplant = record.get("includeImplant");
+ var tousseBarcode = record.get("barcode");
+ if ("外来器械包" == tousseType || "外来器械拆分小包" == tousseType || "是" == includeImplant) {
+ var app_id = record.get("foreignTousseApp_id");
+ if (app_id == undefined) {
+ app_id = "";
+ }
+ var str = " ";
+ return str;
+ }
+ return "";
+ }
+ },
+ {
+ header: '操作', id: 'delAction', width: 90,
+ renderer: function (v, p, record, rowIndex) {
var id = record.get('id');
- var str = "";
- //对于聚合包内的子包所在的行,不提供删除,但如果删除的是聚合包所在的行,则需要同时删除聚合包下属的子包行
- if(!record.get("comboTousseInstanceId")){
- str += " ";
- }
-
- //如果配置启用使用记录录入丢失报损功能且该包类型为器械包、且是否回收为是、且是否转换申请单为是时,提供丢失和报损按钮
- if(sstsConfig.enableUseRecordMaterialErrorDamage && ((record.get("tousseType") == '器械包' && record.get("isRecycling") == '是' && record.get("isConvertApplyGoods") == '是')
- || record.get("tousseType") == '自定义器械包')){
- str += " ";
- str += " ";
- }
- str += " ";
- return str;
- },
- menuDisabled : true,
- dataIndex : 'button'
- },{
- header : "回收状态",dataIndex : 'recyclingStatus',width : 50,menuDisabled : true,hidden : sstsConfig.monitorGoodsRecyclingStatusForUseRecord ? false :true
- }]);
-
+ var str = "";
+ //对于聚合包内的子包所在的行,不提供删除,但如果删除的是聚合包所在的行,则需要同时删除聚合包下属的子包行
+ if (!record.get("comboTousseInstanceId")) {
+ str += " ";
+ }
+
+ //如果配置启用使用记录录入丢失报损功能且该包类型为器械包、且是否回收为是、且是否转换申请单为是时,提供丢失和报损按钮
+ if (sstsConfig.enableUseRecordMaterialErrorDamage && ((record.get("tousseType") == '器械包' && record.get("isRecycling") == '是' && record.get("isConvertApplyGoods") == '是')
+ || record.get("tousseType") == '自定义器械包')) {
+ str += " ";
+ str += " ";
+ }
+ str += " ";
+ return str;
+ },
+ menuDisabled: true,
+ dataIndex: 'button'
+ }, {
+ header: "回收状态", dataIndex: 'recyclingStatus', width: 50, menuDisabled: true, hidden: sstsConfig.monitorGoodsRecyclingStatusForUseRecord ? false : true
+ }]);
+
//器械材料
var materialCm = new Ext.grid.ColumnModel([materialGridSm,
- {header : "外部编码",dataIndex : 'externalCode',hidden : true,width : 150},
- {header : "名称",dataIndex : 'name',id:'name',width : 380},
- {header : "数量",dataIndex : 'amount',width : 100},
- {header : "物品类型",dataIndex : 'goodsType',width : 150},
- {header : "器械材料发货单号",dataIndex : 'materialInvoiceSerialNumber',id:'materialInvoiceSerialNumber',width : 150}
- ]);
-
+ { header: "外部编码", dataIndex: 'externalCode', hidden: true, width: 150 },
+ { header: "名称", dataIndex: 'name', id: 'name', width: 380 },
+ { header: "数量", dataIndex: 'amount', width: 100 },
+ { header: "物品类型", dataIndex: 'goodsType', width: 150 },
+ { header: "器械材料发货单号", dataIndex: 'materialInvoiceSerialNumber', id: 'materialInvoiceSerialNumber', width: 150 }
+ ]);
+
var formWidth = 930;
var windowWidth = 960;
var windowHeight = top.screen.height - 120;
- if(top.screen.height > 800){
+ if (top.screen.height > 800) {
windowHeight = 720;
}
formObj = new top.Ext.FormPanel({
- id : 'useRecordForm',
- frame : true,
- labelSeparator : ':',
- bodyStyle : 'padding:5px 5px 0px 5px',
- labelAlign : 'right',
- width : formWidth,
-// autoHeight : true,
- autoScroll : true,
- labelWidth : 90,
- items : [ {
- xtype : "fieldset",
- title : "基础数据",
- layout : 'column',
- autoHeight : true,
- id:"tops",
- items : [ {
- xtype : 'hidden',
- name : 'id',
- id : 'id'
- },{
- xtype : 'hidden',
- name : 'items',
- id : 'items'
- },{
- xtype : 'hidden',
- name : 'tousseInstanceMaterialErrorDamageItems',
- id : 'tousseInstanceMaterialErrorDamageItems'
- },{
- xtype : 'hidden',
- name : 'originalItems',
- id : 'originalItems'
- },{
- xtype : 'hidden',
- name : 'formParams',
- id : 'formParams'
- },{
- xtype : 'hidden',
- name : 'originalFormParams',
- id : 'originalFormParams'
- },{
- xtype : 'hidden',
- name : 'departCodeOfpatient',
- id : 'departCodeOfpatient'
- },{
- xtype : 'hidden',
- name : 'tousseInstanceBarcodes',
- id : 'tousseInstanceBarcodes'
+ id: 'useRecordForm',
+ frame: true,
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 5px',
+ labelAlign: 'right',
+ width: formWidth,
+ // autoHeight : true,
+ autoScroll: true,
+ labelWidth: 90,
+ items: [{
+ xtype: "fieldset",
+ title: "基础数据",
+ layout: 'column',
+ autoHeight: true,
+ id: "tops",
+ items: [{
+ xtype: 'hidden',
+ name: 'id',
+ id: 'id'
}, {
- xtype : 'hidden',
- name : 'applicationFormType',
- id : 'applicationFormType',
- value : sstsConfig.applicationFormType
+ xtype: 'hidden',
+ name: 'items',
+ id: 'items'
}, {
- xtype : 'hidden',
- name : 'audited',
- id : 'audited'
- },{
- xtype : 'hidden',
- name : 'departCoding',
- id : 'departCoding',
- value : $Id("currentOrgUnitCode").value
- },{
- xtype : 'hidden',
- name : 'dataType',
- id : 'dataType',
- value : $Id("parm_s_dataType").value
+ xtype: 'hidden',
+ name: 'tousseInstanceMaterialErrorDamageItems',
+ id: 'tousseInstanceMaterialErrorDamageItems'
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '住院号',
- id : 'hospitalNum',
- name : 'hospitalNum',
- allowBlank : hospitalNumAllowBlank,
- enableKeyEvents : true,
- maxLength:20,
- maxLengthText :'长度超过限制,不能保存!',
- listeners : {
- render : function(c){
- c.getEl().on('keypress',function(e,thiz){
- if(e.getKey() == 13){
+ xtype: 'hidden',
+ name: 'originalItems',
+ id: 'originalItems'
+ }, {
+ xtype: 'hidden',
+ name: 'formParams',
+ id: 'formParams'
+ }, {
+ xtype: 'hidden',
+ name: 'originalFormParams',
+ id: 'originalFormParams'
+ }, {
+ xtype: 'hidden',
+ name: 'departCodeOfpatient',
+ id: 'departCodeOfpatient'
+ }, {
+ xtype: 'hidden',
+ name: 'tousseInstanceBarcodes',
+ id: 'tousseInstanceBarcodes'
+ }, {
+ xtype: 'hidden',
+ name: 'applicationFormType',
+ id: 'applicationFormType',
+ value: sstsConfig.applicationFormType
+ }, {
+ xtype: 'hidden',
+ name: 'audited',
+ id: 'audited'
+ }, {
+ xtype: 'hidden',
+ name: 'departCoding',
+ id: 'departCoding',
+ value: $Id("currentOrgUnitCode").value
+ }, {
+ xtype: 'hidden',
+ name: 'dataType',
+ id: 'dataType',
+ value: $Id("parm_s_dataType").value
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '住院号',
+ id: 'hospitalNum',
+ name: 'hospitalNum',
+ allowBlank: hospitalNumAllowBlank,
+ enableKeyEvents: true,
+ maxLength: 20,
+ maxLengthText: '长度超过限制,不能保存!',
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e, thiz) {
+ if (e.getKey() == 13) {
iskeypress = true;
- var value = thiz.value.replace(/"/g,'\\"');
+ var value = thiz.value.replace(/"/g, '\\"');
var jsonStr = "{\"patientNum\":\"" + value
- + "\",\"numType\":\""+thiz.id+"\",\"sourcePage\":\""
- + sourcePage_useRecord + "\"}";
+ + "\",\"numType\":\"" + thiz.id + "\",\"sourcePage\":\""
+ + sourcePage_useRecord + "\"}";
loadPatientInfoByValAndType(jsonStr);
-
- // 如果洗手护士输入框隐藏,则聚焦到巡回护士输入框,否则聚焦到洗手护士输入框
- if (sstsConfig.hideWashHandNurseOfUseRecord == true){
- top.Ext.getCmp('circuitNurse').focus();
- }
- else{
- top.Ext.getCmp('washHandNurse').focus();
- }
+
+ // 如果洗手护士输入框隐藏,则聚焦到巡回护士输入框,否则聚焦到洗手护士输入框
+ if (sstsConfig.hideWashHandNurseOfUseRecord == true) {
+ top.Ext.getCmp('circuitNurse').focus();
+ }
+ else {
+ top.Ext.getCmp('washHandNurse').focus();
+ }
}
});
},
- blur:function(){
- if(!iskeypress){
+ blur: function () {
+ if (!iskeypress) {
validPatientInfo();
}
}
},
- anchor : '96%'
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden : fromDepartmentUseRecord || sstsConfig.hideTreatmentNumOfUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '诊疗号',
- id : 'treatmentNum',
- name : 'treatmentNum',
- allowBlank : treatmentNumAllowBlank,
- maxLength:20,
- maxLengthText :'长度超过限制,不能保存!',
- enableKeyEvents : true,
- listeners : {
- render : function(c){
- c.getEl().on('keypress',function(e,thiz){
- if(e.getKey() == 13){
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord || sstsConfig.hideTreatmentNumOfUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '诊疗号',
+ id: 'treatmentNum',
+ name: 'treatmentNum',
+ allowBlank: treatmentNumAllowBlank,
+ maxLength: 20,
+ maxLengthText: '长度超过限制,不能保存!',
+ enableKeyEvents: true,
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e, thiz) {
+ if (e.getKey() == 13) {
iskeypress = true;
- var value = thiz.value.replace(/"/g,'\\"');
+ var value = thiz.value.replace(/"/g, '\\"');
var jsonStr = "{\"patientNum\":\"" + value
- + "\",\"numType\":\""+thiz.id+"\",\"sourcePage\":\""
- + sourcePage_useRecord + "\"}";
+ + "\",\"numType\":\"" + thiz.id + "\",\"sourcePage\":\""
+ + sourcePage_useRecord + "\"}";
loadPatientInfoByValAndType(jsonStr);
-
+
// 如果洗手护士输入框隐藏,则聚焦到巡回护士输入框,否则聚焦到洗手护士输入框
- if (sstsConfig.hideWashHandNurseOfUseRecord == true){
+ if (sstsConfig.hideWashHandNurseOfUseRecord == true) {
top.Ext.getCmp('circuitNurse').focus();
}
- else{
+ else {
top.Ext.getCmp('washHandNurse').focus();
}
}
});
- if(sstsConfig.enableYLZCardReader){
+ if (sstsConfig.enableYLZCardReader) {
var _parentNode = top.Ext.getDom('treatmentNum').parentNode;
top.Ext.get(_parentNode).createChild({
- tag : 'span',
- html : ' '
+ tag: 'span',
+ html: ' '
});
}
},
- blur:function(){
- if(!iskeypress){
+ blur: function () {
+ if (!iskeypress) {
validPatientInfo();
}
}
},
- anchor : sstsConfig.enableYLZCardReader?'88%':'96%'
+ anchor: sstsConfig.enableYLZCardReader ? '88%' : '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden : fromDepartmentUseRecord || sstsConfig.hideWashHandNurseOfUseRecord,
- items : [{
- xtype : 'combo',
- fieldLabel : '洗手护士',
- id : 'washHandNurse',
- name : 'washHandNurse',
-// disabled : !fillTousseName,
- queryParam : 'spell',
- minChars : 0,
- displayField : 'fullName',
- store : departUsersStore,
- forceSelection : false,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : true,
- typeAhead : false,
- allowBlank : washHandNurseAllowBlank,
- anchor : '96%',
- listeners : {
- render : function(c){
- c.getEl().on('keypress',function(e,thiz){
- if(e.getKey() == 13){
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord || sstsConfig.hideWashHandNurseOfUseRecord,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '洗手护士',
+ id: 'washHandNurse',
+ name: 'washHandNurse',
+ // disabled : !fillTousseName,
+ queryParam: 'spell',
+ minChars: 0,
+ displayField: 'fullName',
+ store: departUsersStore,
+ forceSelection: false,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ allowBlank: washHandNurseAllowBlank,
+ anchor: '96%',
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e, thiz) {
+ if (e.getKey() == 13) {
var washHandNurseBox = top.Ext.getCmp('washHandNurse');
var text = washHandNurseBox.getValue();
- getUserObjByBarcode(text,washHandNurseBox,'',function(userName){
- if(userName !== ''){
+ getUserObjByBarcode(text, washHandNurseBox, '', function (userName) {
+ if (userName !== '') {
washHandNurseBox.setValue(userName);
top.Ext.getCmp('circuitNurse').focus();
}
})
}
});
- c.getEl().on('dblclick',function(e,thiz){
+ c.getEl().on('dblclick', function (e, thiz) {
c.doQuery(c.allQuery, true);
c.expand();
});
}
}
}]
- },{
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'combo',
- fieldLabel : circuitNurseLabelName,
- id : 'circuitNurse',
- name : 'circuitNurse',
-// disabled : !fillTousseName,
- queryParam : 'spell',
- minChars : 0,
- displayField : 'fullName',
- store : departUsersStore2,
- forceSelection : false,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : true,
- typeAhead : false,
- allowBlank : circuitNurseAllowBlank,
- anchor : '96%',
- listeners : {
- render : function(c){
- c.getEl().on('keypress',function(e,thiz){
- if(e.getKey() == 13){
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: circuitNurseLabelName,
+ id: 'circuitNurse',
+ name: 'circuitNurse',
+ // disabled : !fillTousseName,
+ queryParam: 'spell',
+ minChars: 0,
+ displayField: 'fullName',
+ store: departUsersStore2,
+ forceSelection: false,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ allowBlank: circuitNurseAllowBlank,
+ anchor: '96%',
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e, thiz) {
+ if (e.getKey() == 13) {
var circuitNurseBox = top.Ext.getCmp('circuitNurse');
var text = circuitNurseBox.getValue();
- getUserObjByBarcode(text,circuitNurseBox,'',function(userName){
- if(userName !== ''){
+ getUserObjByBarcode(text, circuitNurseBox, '', function (userName) {
+ if (userName !== '') {
circuitNurseBox.setValue(userName);
top.Ext.getCmp('operationRoom').focus();
top.Ext.getCmp("tempBarcode").focus();
}
})
}
});
- c.getEl().on('dblclick',function(e,thiz){
+ c.getEl().on('dblclick', function (e, thiz) {
c.doQuery(c.allQuery, true);
c.expand();
});
}
}
}]
- },{
- layout : 'form',
- columnWidth : .33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '科室',
- id : 'depart',
- name : 'depart',
- disabled : true,
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '科室',
+ id: 'depart',
+ name: 'depart',
+ disabled: true,
//allowBlank : false,
- anchor : '96%'
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : sstsConfig.onlySelectExistedOperationRoom ? 'combo' :'textfield',
- fieldLabel : '手术间',
- id : 'operationRoom',
- name : 'operationRoom',
- maxLength:10,
- maxLengthText :'长度超过限制,不能保存!',
- allowBlank : operationRoomAllowBlank,
- anchor : '96%',
- valueField : 'operationRoomName',
- displayField : 'operationRoomName',
- listConfig: {width : 193},
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: sstsConfig.onlySelectExistedOperationRoom ? 'combo' : 'textfield',
+ fieldLabel: '手术间',
+ id: 'operationRoom',
+ name: 'operationRoom',
+ maxLength: 10,
+ maxLengthText: '长度超过限制,不能保存!',
+ allowBlank: operationRoomAllowBlank,
+ anchor: '96%',
+ valueField: 'operationRoomName',
+ displayField: 'operationRoomName',
+ listConfig: { width: 193 },
matchFieldWidth: false,
- store : sstsConfig.onlySelectExistedOperationRoom ? operationRoomJsonStore : "",
- lazyInit : true,
- triggerAction : sstsConfig.onlySelectExistedOperationRoom ? 'all' : "",
- hideTrigger : sstsConfig.onlySelectExistedOperationRoom ? false: true,//隐藏向下箭头
- typeAhead : false,
+ store: sstsConfig.onlySelectExistedOperationRoom ? operationRoomJsonStore : "",
+ lazyInit: true,
+ triggerAction: sstsConfig.onlySelectExistedOperationRoom ? 'all' : "",
+ hideTrigger: sstsConfig.onlySelectExistedOperationRoom ? false : true,//隐藏向下箭头
+ typeAhead: false,
editable: sstsConfig.onlySelectExistedOperationRoom ? false : true,
- forceSelection : sstsConfig.onlySelectExistedOperationRoom ? true: false,
- listeners:{
- render : function(c) {
- c.getEl().on('keypress', function(e) {
+ forceSelection: sstsConfig.onlySelectExistedOperationRoom ? true : false,
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e) {
if (e.getKey() == 13) {
top.Ext.getCmp("hospitalNum").focus();
}
- });
- }
- }
- /* xtype : 'textfield',
- fieldLabel : '手术间',
- id : 'operationRoom',
- name : 'operationRoom',
- maxLength:10,
- maxLengthText :'长度超过限制,不能保存!',
- allowBlank : fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : useRecordOperationRoomAllowBlank),
- anchor : '96%',
- listeners:{
- render : function(c) {
- c.getEl().on('keypress', function(e) {
- if (e.getKey() == 13) {//
- top.Ext.getCmp("hospitalNum").focus();
- }
});
}
- } */
+ }
+ /* xtype : 'textfield',
+ fieldLabel : '手术间',
+ id : 'operationRoom',
+ name : 'operationRoom',
+ maxLength:10,
+ maxLengthText :'长度超过限制,不能保存!',
+ allowBlank : fromDepartmentUseRecord || (sstsConfig.allowAllBlankExceptThreeSpecialFields ? true : useRecordOperationRoomAllowBlank),
+ anchor : '96%',
+ listeners:{
+ render : function(c) {
+ c.getEl().on('keypress', function(e) {
+ if (e.getKey() == 13) {//
+ top.Ext.getCmp("hospitalNum").focus();
+ }
+ });
+ }
+ } */
}]
- },{
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '姓名',
- maxLength : '100',
- id : 'patientName',
- name : 'patientName',
- anchor : '96%',
- allowBlank : patientNameAllowBlank,
- listeners : {
- blur:function(){
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '姓名',
+ maxLength: '100',
+ id: 'patientName',
+ name: 'patientName',
+ anchor: '96%',
+ allowBlank: patientNameAllowBlank,
+ listeners: {
+ blur: function () {
validPatientInfo();
}
}
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '年龄',
- maxLength : '10',
- id : 'patientAge',
- name : 'patientAge',
- allowBlank : patientAgeAllowBlank,
- anchor : '96%'
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '年龄',
+ maxLength: '10',
+ id: 'patientAge',
+ name: 'patientAge',
+ allowBlank: patientAgeAllowBlank,
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : .33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'combo',
- fieldLabel : '性别',
- valueField : 'typeName',
- displayField : 'typeName',
- id : 'patientSex',
- name : 'patientSex',
- mode : 'local',
- triggerAction : 'all',
- forceSelection : true,
- editable : false,
- allowBlank : patientSexAllowBlank,
- store : new Ext.data.SimpleStore( {
- fields : [ 'typeName' ],
- autoLoad : true,
- data : sexArray
+ layout: 'form',
+ columnWidth: .33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '性别',
+ valueField: 'typeName',
+ displayField: 'typeName',
+ id: 'patientSex',
+ name: 'patientSex',
+ mode: 'local',
+ triggerAction: 'all',
+ forceSelection: true,
+ editable: false,
+ allowBlank: patientSexAllowBlank,
+ store: new Ext.data.SimpleStore({
+ fields: ['typeName'],
+ autoLoad: true,
+ data: sexArray
}),
- anchor : '96%'
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'combo',
- fieldLabel : '病区',
- valueField : 'patientArea',
- displayField : 'patientArea',
- id : 'patientArea',
- name : 'patientArea',
- mode : 'local',
- listWidth :'200',
- triggerAction : 'all',
- forceSelection : false,
- editable : true,
- allowBlank : patientAreaAllowBlank,
- store : new Ext.data.SimpleStore({
- fields : [ 'patientArea' ],
- autoLoad : false,
- data :patientAreaList
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '病区',
+ valueField: 'patientArea',
+ displayField: 'patientArea',
+ id: 'patientArea',
+ name: 'patientArea',
+ mode: 'local',
+ listWidth: '200',
+ triggerAction: 'all',
+ forceSelection: false,
+ editable: true,
+ allowBlank: patientAreaAllowBlank,
+ store: new Ext.data.SimpleStore({
+ fields: ['patientArea'],
+ autoLoad: false,
+ data: patientAreaList
}),
- anchor : '96%'
+ anchor: '96%'
}]
- },{
- columnWidth : .33,
- layout : 'form',
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'combo',
- id : 'departNameOfpatient',
- name : 'departNameOfpatient',
- queryParam : 'spell',
- fieldLabel : '病人所在科室',
- minChars : 0,
- valueField : 'id',
- displayField : 'name',
- store : departJsonStore,
- forceSelection : true,
- lazyInit : true,
- triggerAction : 'all',
- typeAhead : false,
- allowBlank : departNameOfpatientAllowBlank,
- anchor : '96%',
- listeners : {
- select : function(combo, record, index) {
- top.Ext.getCmp('departCodeOfpatient').setValue(record.data.id);
- }
- }
+ }, {
+ columnWidth: .33,
+ layout: 'form',
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'combo',
+ id: 'departNameOfpatient',
+ name: 'departNameOfpatient',
+ queryParam: 'spell',
+ fieldLabel: '病人所在科室',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ store: departJsonStore,
+ forceSelection: true,
+ lazyInit: true,
+ triggerAction: 'all',
+ typeAhead: false,
+ allowBlank: departNameOfpatientAllowBlank,
+ anchor: '96%',
+ listeners: {
+ select: function (combo, record, index) {
+ top.Ext.getCmp('departCodeOfpatient').setValue(record.data.id);
+ }
+ }
}]
- },{
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '病室',
- maxLength : '16',
- id : 'roomNumber',
- name : 'roomNumber',
- allowBlank : roomNumberAllowBlank,
- anchor : '96%'
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '病室',
+ maxLength: '16',
+ id: 'roomNumber',
+ name: 'roomNumber',
+ allowBlank: roomNumberAllowBlank,
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '床位',
- maxLength : '16',
- id : 'bedNumber',
- name : 'bedNumber',
- allowBlank : bedNumberAllowBlank,
- anchor : '96%'
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '床位',
+ maxLength: '16',
+ id: 'bedNumber',
+ name: 'bedNumber',
+ allowBlank: bedNumberAllowBlank,
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '身份证',
- maxLength : '19',
- id : 'patientIDCard',
- name : 'patientIDCard',
- allowDecimals : false,
- allowNegative : false,
- allowBlank : patientIDCardAllowBlank,
- anchor : '96%'
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '身份证',
+ maxLength: '19',
+ id: 'patientIDCard',
+ name: 'patientIDCard',
+ allowDecimals: false,
+ allowNegative: false,
+ allowBlank: patientIDCardAllowBlank,
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '手术医生',
- maxLength : '16',
- id : 'doctorName',
- name : 'doctorName',
- allowBlank : doctorNameAllowBlank,
- anchor : '96%'
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '手术医生',
+ maxLength: '16',
+ id: 'doctorName',
+ name: 'doctorName',
+ allowBlank: doctorNameAllowBlank,
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord || !sstsConfig.showSurgeonOfUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '主刀医生',
- maxLength : '16',
- id : 'surgeon',
- name : 'surgeon',
- allowBlank : surgeonAllowBlank,
- anchor : '96%'
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord || !sstsConfig.showSurgeonOfUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '主刀医生',
+ maxLength: '16',
+ id: 'surgeon',
+ name: 'surgeon',
+ allowBlank: surgeonAllowBlank,
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden : fromDepartmentUseRecord || !(sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('麻醉医生')),
- items : [{
- xtype : 'textfield',
- fieldLabel : '麻醉医生',
- maxLength : '16',
- id : 'anesthetist',
- name : 'anesthetist',
- allowBlank : anesthetistAllowBlank,
- anchor : '96%'
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord || !(sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('麻醉医生')),
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '麻醉医生',
+ maxLength: '16',
+ id: 'anesthetist',
+ name: 'anesthetist',
+ allowBlank: anesthetistAllowBlank,
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- hidden : fromDepartmentUseRecord || !(sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('麻醉方式')),
- items : [{
- xtype : 'textfield',
- fieldLabel : '麻醉方式',
- maxLength : '16',
- id : 'anesthesiaMode',
- name : 'anesthesiaMode',
- allowBlank : anesthesiaModeAllowBlank,
- anchor : '96%'
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord || !(sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('麻醉方式')),
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '麻醉方式',
+ maxLength: '16',
+ id: 'anesthesiaMode',
+ name: 'anesthesiaMode',
+ allowBlank: anesthesiaModeAllowBlank,
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.66,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'combo',
- fieldLabel : "手术名称",
- queryParam : 'spell',
- minChars : 0,
- valueField : 'operationName',
- displayField : 'operationName',
- store : operationNameStore,
- forceSelection : false,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : true,
- typeAhead : false,
- allowBlank : operationNameAllowBlank,
- editable : true,
- name : "operation",
- id : "operation",
- anchor : '98%'
+ layout: 'form',
+ columnWidth: 0.66,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: "手术名称",
+ queryParam: 'spell',
+ minChars: 0,
+ valueField: 'operationName',
+ displayField: 'operationName',
+ store: operationNameStore,
+ forceSelection: false,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ allowBlank: operationNameAllowBlank,
+ editable: true,
+ name: "operation",
+ id: "operation",
+ anchor: '98%'
}]
- },{
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'textfield',
- fieldLabel : '手术单号',
- maxLength : '16',
- id : 'operationScheduleId',
- name : 'operationScheduleId',
- allowBlank : operationScheduleIdAllowBlank,
- anchor : '96%'
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '手术单号',
+ maxLength: '16',
+ id: 'operationScheduleId',
+ name: 'operationScheduleId',
+ allowBlank: operationScheduleIdAllowBlank,
+ anchor: '96%'
}]
- },{
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'datefieldWithMin',
- fieldLabel : '手术时间',
- id : 'operationTime',
- name : 'operationTime',
- altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
- format : 'Y-m-d H:i',
- readOnly : true,
- allowBlank : operationTimeAllowBlank,
- width : 150
- }]
- },{
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'numberfield',
- fieldLabel : '住院次数',
- id : 'visitId',
- name : 'visitId',
- allowBlank : visitIdAllowBlank,
- anchor : '96%'
- }]
- },{
- layout : 'form',
- columnWidth : 0.33,
- height:26,
- items : [{
- xtype : 'textfield',
- fieldLabel : '录入人',
- maxLength : '41',
- id : 'operator',
- name : 'operator',
- readOnly : true,
- //allowBlank : false,
- anchor : '96%',
- cls : 'fieldReadOnlyNoRemove',
- height:26
- }]
}, {
- layout : 'form',
- columnWidth : 0.33,
- items : [{
- xtype : 'datefieldWithMin',
- fieldLabel : '录入时间',
- id : 'enteringTime',
- name : 'enteringTime',
- altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
- format : 'Y-m-d H:i',
- readOnly : true,
- width : 150
- }]
- },{
- layout : 'form',
- columnWidth : 0.33,
- hidden:fromDepartmentUseRecord,
- height:26,
- items : [{
- xtype : 'textfield',
- fieldLabel : '审核人',
- maxLength : '41',
- id : 'reviewer',
- name : 'reviewer',
- readOnly : true,
- allowBlank : true,
- anchor : '96%',
- cls : 'fieldReadOnlyNoRemove'
- }]
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'datefieldWithMin',
+ fieldLabel: '手术时间',
+ id: 'operationTime',
+ name: 'operationTime',
+ altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
+ format: 'Y-m-d H:i',
+ readOnly: true,
+ allowBlank: operationTimeAllowBlank,
+ width: 150
+ }]
}, {
- layout : 'form',
- columnWidth : 0.33,
- height:26,
- items : [{
- xtype : 'textfield',
- fieldLabel : '审核时间',
- maxLength : '41',
- id : 'reviewTime',
- name : 'reviewTime',
- readOnly : true,
- anchor : '96%',
- cls : 'fieldReadOnlyNoRemove'
- }]
- }, {
- layout : 'form',
- columnWidth : 0.33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '申请时间',
- maxLength : '41',
- id : 'applicationTime',
- name : 'applicationTime',
- readOnly : true,
- anchor : '96%',
- cls : 'fieldReadOnlyNoRemove'
- }]
- }, {
- layout : 'form',
- columnWidth : .33,
- hidden:fromDepartmentUseRecord,
- items : [{
- xtype : 'combo',
- fieldLabel : '特殊感染类型',
- valueField : 'specialInfection',
- displayField : 'specialInfection',
- id : 'specialInfection',
- name : 'specialInfection',
- mode : 'local',
- listWidth :'200',
- triggerAction : 'all',
- forceSelection : true,
- editable : false,
- allowBlank : specialInfectionAllowBlank,
- store : new Ext.data.SimpleStore({
- fields : [ 'specialInfection' ],
- autoLoad : false,
- data :specialInfectionList
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'numberfield',
+ fieldLabel: '住院次数',
+ id: 'visitId',
+ name: 'visitId',
+ allowBlank: visitIdAllowBlank,
+ anchor: '96%'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ height: 26,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '录入人',
+ maxLength: '41',
+ id: 'operator',
+ name: 'operator',
+ readOnly: true,
+ //allowBlank : false,
+ anchor: '96%',
+ cls: 'fieldReadOnlyNoRemove',
+ height: 26
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ items: [{
+ xtype: 'datefieldWithMin',
+ fieldLabel: '录入时间',
+ id: 'enteringTime',
+ name: 'enteringTime',
+ altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
+ format: 'Y-m-d H:i',
+ readOnly: true,
+ width: 150
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ hidden: fromDepartmentUseRecord,
+ height: 26,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '审核人',
+ maxLength: '41',
+ id: 'reviewer',
+ name: 'reviewer',
+ readOnly: true,
+ allowBlank: true,
+ anchor: '96%',
+ cls: 'fieldReadOnlyNoRemove'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ height: 26,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '审核时间',
+ maxLength: '41',
+ id: 'reviewTime',
+ name: 'reviewTime',
+ readOnly: true,
+ anchor: '96%',
+ cls: 'fieldReadOnlyNoRemove'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: 0.33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '申请时间',
+ maxLength: '41',
+ id: 'applicationTime',
+ name: 'applicationTime',
+ readOnly: true,
+ anchor: '96%',
+ cls: 'fieldReadOnlyNoRemove'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ hidden: fromDepartmentUseRecord,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '特殊感染类型',
+ valueField: 'specialInfection',
+ displayField: 'specialInfection',
+ id: 'specialInfection',
+ name: 'specialInfection',
+ mode: 'local',
+ listWidth: '200',
+ triggerAction: 'all',
+ forceSelection: true,
+ editable: false,
+ allowBlank: specialInfectionAllowBlank,
+ store: new Ext.data.SimpleStore({
+ fields: ['specialInfection'],
+ autoLoad: false,
+ data: specialInfectionList
}),
- anchor : '96%'
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 0.33,
- labelWidth:120,
- hidden : !(sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('主刀医生核算科室')),
- items : [{
- xtype : 'hidden',
- id : 'doctorAccountDepartCode',
- name : 'doctorAccountDepartCode'
- },{
- xtype : 'combo',
- id : 'doctorAccountDepart',
- name : 'doctorAccountDepart',
- queryParam : 'spell',
- fieldLabel : '主刀医生核算科室',
- minChars : 0,
- valueField : 'id',
- displayField : 'name',
- store : departJsonStore,
- forceSelection : true,
- lazyInit : true,
- triggerAction : 'all',
- typeAhead : false,
- anchor : '96%',
- allowBlank : doctorAccountDepartAllowBlank,
- listeners : {
- select : function(combo, record, index) {
- top.Ext.getCmp('doctorAccountDepartCode').setValue(record.data.id);
- }
- }
+ layout: 'form',
+ columnWidth: 0.33,
+ labelWidth: 120,
+ hidden: !(sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('主刀医生核算科室')),
+ items: [{
+ xtype: 'hidden',
+ id: 'doctorAccountDepartCode',
+ name: 'doctorAccountDepartCode'
+ }, {
+ xtype: 'combo',
+ id: 'doctorAccountDepart',
+ name: 'doctorAccountDepart',
+ queryParam: 'spell',
+ fieldLabel: '主刀医生核算科室',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ store: departJsonStore,
+ forceSelection: true,
+ lazyInit: true,
+ triggerAction: 'all',
+ typeAhead: false,
+ anchor: '96%',
+ allowBlank: doctorAccountDepartAllowBlank,
+ listeners: {
+ select: function (combo, record, index) {
+ top.Ext.getCmp('doctorAccountDepartCode').setValue(record.data.id);
+ }
+ }
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- hidden : !(sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('手术状态')),
- items : [{
- xtype : 'combo',
- fieldLabel : '手术状态',
- valueField : 'operationStatus',
- displayField : 'operationStatus',
- id : 'operationStatus',
- name : 'operationStatus',
- mode : 'local',
- triggerAction : 'all',
- forceSelection : true,
- editable : true,
- store : new Ext.data.SimpleStore( {
- fields : [ 'operationStatus' ],
- autoLoad : true,
- data : operationStatusArray
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ hidden: !(sstsConfig.enableUseRecordFormExtensionFields && sstsConfig.enableUseRecordFormExtensionFields.contains('手术状态')),
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '手术状态',
+ valueField: 'operationStatus',
+ displayField: 'operationStatus',
+ id: 'operationStatus',
+ name: 'operationStatus',
+ mode: 'local',
+ triggerAction: 'all',
+ forceSelection: true,
+ editable: true,
+ store: new Ext.data.SimpleStore({
+ fields: ['operationStatus'],
+ autoLoad: true,
+ data: operationStatusArray
}),
- anchor : '96%'
+ anchor: '96%'
}]
}, {
- layout : 'form',
- columnWidth : 1,
- items : [{
- xtype : 'textfield',
- fieldLabel : '备注',
- id : 'remark',
- name : 'remark',
- anchor : '97%',
- allowBlank : remarkAllowBlank,
- height : 25
+ layout: 'form',
+ columnWidth: 1,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '备注',
+ id: 'remark',
+ name: 'remark',
+ anchor: '97%',
+ allowBlank: remarkAllowBlank,
+ height: 25
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- hidden:fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
- items : [{
- xtype : 'textfield',
- fieldLabel : '扫描条码1',
- maxLength : '16',
- id : 'scanFirstBodyCode',
- name : 'scanFirstBodyCode',
- anchor : '99%',
- listeners : {
- render : function(p) {
- p.getEl().on('keypress',function(e) {
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ hidden: fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '扫描条码1',
+ maxLength: '16',
+ id: 'scanFirstBodyCode',
+ name: 'scanFirstBodyCode',
+ anchor: '99%',
+ listeners: {
+ render: function (p) {
+ p.getEl().on('keypress', function (e) {
if (e.getKey() == 13) {//回车键
- onScanBodyCode('scanFirstBodyCode','firstBodyCode');
+ onScanBodyCode('scanFirstBodyCode', 'firstBodyCode');
}
});
}
}
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- hidden:fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
- items : [{
- xtype : 'textfield',
- fieldLabel : '自身条码1',
- maxLength : '41',
- id : 'firstBodyCode',
- name : 'firstBodyCode',
- readOnly:true,
-// allowBlank : false,
- anchor : '99%',
- cls:'x-item-disabled'
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ hidden: fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '自身条码1',
+ maxLength: '41',
+ id: 'firstBodyCode',
+ name: 'firstBodyCode',
+ readOnly: true,
+ // allowBlank : false,
+ anchor: '99%',
+ cls: 'x-item-disabled'
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- hidden:fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
- items : [{
- xtype : 'textfield',
- fieldLabel : '扫描条码2',
- maxLength : '16',
- id : 'scanSecondBodyCode',
- name : 'scanSecondBodyCode',
- anchor : '99%',
- listeners : {
- render : function(p) {
- p.getEl().on('keypress',function(e) {
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ hidden: fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '扫描条码2',
+ maxLength: '16',
+ id: 'scanSecondBodyCode',
+ name: 'scanSecondBodyCode',
+ anchor: '99%',
+ listeners: {
+ render: function (p) {
+ p.getEl().on('keypress', function (e) {
if (e.getKey() == 13) {//回车键
- onScanBodyCode('scanSecondBodyCode','secondBodyCode');
+ onScanBodyCode('scanSecondBodyCode', 'secondBodyCode');
}
});
}
}
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- hidden:fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
- items : [{
- xtype : 'textfield',
- fieldLabel : '自身条码2',
- maxLength : '41',
- id : 'secondBodyCode',
- name : 'secondBodyCode',
- readOnly:true,
-// allowBlank : false,
- anchor : '99%',
- cls:'x-item-disabled'
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ hidden: fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '自身条码2',
+ maxLength: '41',
+ id: 'secondBodyCode',
+ name: 'secondBodyCode',
+ readOnly: true,
+ // allowBlank : false,
+ anchor: '99%',
+ cls: 'x-item-disabled'
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- hidden:fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
- items : [{
- xtype : 'textfield',
- fieldLabel : '扫描条码3',
- maxLength : '16',
- id : 'scanThirdBodyCode',
- name : 'scanThirdBodyCode',
- anchor : '99%',
- listeners : {
- render : function(p) {
- p.getEl().on('keypress',function(e) {
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ hidden: fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '扫描条码3',
+ maxLength: '16',
+ id: 'scanThirdBodyCode',
+ name: 'scanThirdBodyCode',
+ anchor: '99%',
+ listeners: {
+ render: function (p) {
+ p.getEl().on('keypress', function (e) {
if (e.getKey() == 13) {//回车键
- onScanBodyCode('scanThirdBodyCode','thirdBodyCode');
+ onScanBodyCode('scanThirdBodyCode', 'thirdBodyCode');
}
});
}
}
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- hidden:fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
- items : [{
- xtype : 'textfield',
- fieldLabel : '自身条码3',
- maxLength : '41',
- id : 'thirdBodyCode',
- name : 'thirdBodyCode',
- readOnly:true,
-// allowBlank : false,
- anchor : '99%',
- cls:'x-item-disabled'
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ hidden: fromDepartmentUseRecord || !sstsConfig.enableExpensiveGoods,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '自身条码3',
+ maxLength: '41',
+ id: 'thirdBodyCode',
+ name: 'thirdBodyCode',
+ readOnly: true,
+ // allowBlank : false,
+ anchor: '99%',
+ cls: 'x-item-disabled'
}]
}]
}, {
- xtype : "fieldset",
- title : "使用物品信息",
- layout : 'column',
- autoHeight : true,
- items : [new top.Ext.grid.EditorGridPanel({
- id : 'tousseInstanceGrid',
- store : useItemsStore,
- cm : tousseCm,
+ xtype: "fieldset",
+ title: "使用物品信息",
+ layout: 'column',
+ autoHeight: true,
+ items: [new top.Ext.grid.EditorGridPanel({
+ id: 'tousseInstanceGrid',
+ store: useItemsStore,
+ cm: tousseCm,
//height:200,
- width:900,
+ width: 900,
//autoHeight : true,
- autoExpandColumn : 'delAction',
- frame : false,
+ autoExpandColumn: 'delAction',
+ frame: false,
viewConfig: {
- forceFit:true,
- getRowClass : function(record,rowIndex,rowParams,store){
+ forceFit: true,
+ getRowClass: function (record, rowIndex, rowParams, store) {
return 'my_row_color';
}
},
- bodyStyle : 'border:1px solid #afd7af',
- selModel :sm,
- tbar : [{
- text : '扫描条码:'
+ bodyStyle: 'border:1px solid #afd7af',
+ selModel: sm,
+ tbar: [{
+ text: '扫描条码:'
}, {
- xtype : 'textfield',
- fieldLabel : '扫描条码',
- id : 'tempBarcode',
- name : 'tempBarcode',
- width : 200,
- anchor : '99%',
- enableKeyEvents : true,
- listeners : {
- render : function(c) {
- c.getEl().on('keypress', function(e) {
+ xtype: 'textfield',
+ fieldLabel: '扫描条码',
+ id: 'tempBarcode',
+ name: 'tempBarcode',
+ width: 200,
+ anchor: '99%',
+ enableKeyEvents: true,
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e) {
if (e.getKey() == 13) {
//判断是否开启有加急级别功能,并且还未加载过
- if(sstsConfig.enableUrgentFunction && !urgentLevelData.hasLoaded){
+ if (sstsConfig.enableUrgentFunction && !urgentLevelData.hasLoaded) {
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/baseData/urgentLevelAction!getUrgentsForSelect.do',
- success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/baseData/urgentLevelAction!getUrgentsForSelect.do',
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
- if(result.message){
+ if (result.message) {
showResult(result.message);
}
- if(result.success){
+ if (result.success) {
urgentLevelData.hasLoaded = true;
urgentLevelData.data = result.data;
loadScanGoods(true);
- }else{
- if(!result.message){
+ } else {
+ if (!result.message) {
showResult("加载加急级别失败.");
}
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult("加载加急级别失败.");
}
});
- }else{
+ } else {
loadScanGoods(true);
}
}
});
}
}
- },{
- text : '已扫描数量:'
}, {
- xtype : 'textfield',
- id : 'useAmount',
- name : 'useAmount',
- cls : 'fieldReadOnlyNoRemove',
- width : 70,
- value:0,
- anchor : '99%'
+ text: '已扫描数量:'
+ }, {
+ xtype: 'textfield',
+ id: 'useAmount',
+ name: 'useAmount',
+ cls: 'fieldReadOnlyNoRemove',
+ width: 70,
+ value: 0,
+ anchor: '99%'
}]
})]
}, {
- xtype : "fieldset",
- id : "materialGridFieldset",
- hidden : true,
- title : "器械材料信息",
- layout : 'column',
- autoHeight : true,
- items : [new top.Ext.grid.EditorGridPanel({
- id : 'materialGrid',
- store : materialStore,
- cm : materialCm,
- height : 120,
- width:835,
- autoHeight : true,
- autoExpandColumn : 'materialInvoiceSerialNumber',
- frame : false,
+ xtype: "fieldset",
+ id: "materialGridFieldset",
+ hidden: true,
+ title: "器械材料信息",
+ layout: 'column',
+ autoHeight: true,
+ items: [new top.Ext.grid.EditorGridPanel({
+ id: 'materialGrid',
+ store: materialStore,
+ cm: materialCm,
+ height: 120,
+ width: 835,
+ autoHeight: true,
+ autoExpandColumn: 'materialInvoiceSerialNumber',
+ frame: false,
viewConfig: {
- forceFit:true
+ forceFit: true
},
- bodyStyle : 'border:1px solid #afd7af',
- selModel :materialGridSm
+ bodyStyle: 'border:1px solid #afd7af',
+ selModel: materialGridSm
})]
}],
- buttons : tbar
+ buttons: tbar
});
var winG = new Ext.WindowGroup();
winG.zseed = 7500;
- var useRecordWin = new top.Ext.Window( {
- id : 'useRecordApplicationWin',
- layout : 'fit',
- title : '使用记录',
- width : windowWidth,
- height : windowHeight,
+ var useRecordWin = new top.Ext.Window({
+ id: 'useRecordApplicationWin',
+ layout: 'fit',
+ title: '使用记录',
+ width: windowWidth,
+ height: windowHeight,
manager: winG,
- border : false,
- modal : true,
- plain : true,
- items : [ formObj ]
+ border: false,
+ modal: true,
+ plain: true,
+ items: [formObj]
});
useRecordWin.show();
var topsHeight = top.Ext.getCmp("tops").el.dom.offsetHeight;
- var tousseInstanceGridHeight = windowHeight - topsHeight -145;
- if(top.screen.height == 600){
- top.Ext.getCmp("tousseInstanceGrid").setHeight(100);
- }else{
- top.Ext.getCmp("tousseInstanceGrid").setHeight(tousseInstanceGridHeight);
+ var tousseInstanceGridHeight = windowHeight - topsHeight - 145;
+ if (top.screen.height == 600) {
+ top.Ext.getCmp("tousseInstanceGrid").setHeight(100);
+ } else {
+ top.Ext.getCmp("tousseInstanceGrid").setHeight(tousseInstanceGridHeight);
}
-
+
var tousseInstanceGrid = top.Ext.getCmp("tousseInstanceGrid");
//阻止所有的事件(后面添加的监听器将不生效)
//tousseInstanceGrid.suspendEvents();
//清除所有的监听器(后面添加的监听器有效)
tousseInstanceGrid.purgeListeners();
//单元格点击事件
- tousseInstanceGrid.on('cellclick',function(grid,rowIndex,columnIndex) {// 添加cellclick事件
+ tousseInstanceGrid.on('cellclick', function (grid, rowIndex, columnIndex) {// 添加cellclick事件
//如果点击的元素不为复选框和下拉框时,则选中当前行
- if(columnIndex !== 0 && columnIndex !== 6){
+ if (columnIndex !== 0 && columnIndex !== 6) {
grid.getSelectionModel().selectRow(rowIndex);
}
});
//单元格双击事件(用于解决一次性物品数量不能修改的问题)
- tousseInstanceGrid.on('celldblclick',function(grid,rowIndex,columnIndex,e) {// 添加celldblclick事件
- tousseInstanceGrid.startEditing(rowIndex,columnIndex);
+ tousseInstanceGrid.on('celldblclick', function (grid, rowIndex, columnIndex, e) {// 添加celldblclick事件
+ tousseInstanceGrid.startEditing(rowIndex, columnIndex);
});
if (id != '') {// 编辑
formObj.form.load({
- url : WWWROOT + '/disinfectSystem/useRecordAction!loadUseRecord.do',
- method : 'GET',
- waitMsg : '正在加载数据,请稍候',
- success : function(form, action) {
+ url: WWWROOT + '/disinfectSystem/useRecordAction!loadUseRecord.do',
+ method: 'GET',
+ waitMsg: '正在加载数据,请稍候',
+ success: function (form, action) {
top.Ext.getCmp('enteringTime').setValue(formatDateYear(action.result.data.enteringDate));
- top.Ext.getCmp('reviewTime').setValue(formatDateYear(action.result.data.reviewTime));
- top.Ext.getCmp('applicationTime').setValue(formatDateYear(action.result.data.applicationTime));
- top.Ext.getCmp('operationTime').setValue(formatDateYear(action.result.data.operationTime));
- //ext下拉框赋值前先判空,防止出现漏洞导致广医二院的情况(病人所在科室显示为"番禺。。。",实际值为空)
- var departCodeOfpatientValue = action.result.data.departCodeOfpatient;
- if(departCodeOfpatientValue){
- top.Ext.getCmp('departNameOfpatient').setValue(departCodeOfpatientValue);
- }else{
- // 病人所在科室的名称有值,病人所在科室编码没值的情况
- var ascriptionDepartment = action.result.data.ascriptionDepartment;
- if(ascriptionDepartment){
- departJsonStore.each(function(record){
- var nameOfDepartJsonStore = record.get("name");
- if(nameOfDepartJsonStore == ascriptionDepartment){
- top.Ext.getCmp('departNameOfpatient').setValue(ascriptionDepartment);
- //设置病人所在科室的编码
- top.Ext.getCmp('departCodeOfpatient').setValue(record.get("id"));
- return false;
- }
- });
- }
- }
- top.Ext.getCmp('tempBarcode').focus(true);
+ top.Ext.getCmp('reviewTime').setValue(formatDateYear(action.result.data.reviewTime));
+ top.Ext.getCmp('applicationTime').setValue(formatDateYear(action.result.data.applicationTime));
+ top.Ext.getCmp('operationTime').setValue(formatDateYear(action.result.data.operationTime));
+ //ext下拉框赋值前先判空,防止出现漏洞导致广医二院的情况(病人所在科室显示为"番禺。。。",实际值为空)
+ var departCodeOfpatientValue = action.result.data.departCodeOfpatient;
+ if (departCodeOfpatientValue) {
+ top.Ext.getCmp('departNameOfpatient').setValue(departCodeOfpatientValue);
+ } else {
+ // 病人所在科室的名称有值,病人所在科室编码没值的情况
+ var ascriptionDepartment = action.result.data.ascriptionDepartment;
+ if (ascriptionDepartment) {
+ departJsonStore.each(function (record) {
+ var nameOfDepartJsonStore = record.get("name");
+ if (nameOfDepartJsonStore == ascriptionDepartment) {
+ top.Ext.getCmp('departNameOfpatient').setValue(ascriptionDepartment);
+ //设置病人所在科室的编码
+ top.Ext.getCmp('departCodeOfpatient').setValue(record.get("id"));
+ return false;
+ }
+ });
+ }
+ }
+ top.Ext.getCmp('tempBarcode').focus(true);
top.Ext.getCmp('doctorAccountDepart').setValue(action.result.data.doctorAccountDepart);
top.Ext.getCmp('doctorAccountDepartCode').setValue(action.result.data.doctorAccountDepartCode);
-
+
// 保存原始数据,只需要保存需要修改的属性
- setOriginalFormParams(form, [ 'id', 'washHandNurse','circuitNurse', 'operationRoom','treatmentNum',
- 'hospitalNum', 'patientName','patientAge', 'patientSex', 'roomNumber',
- 'bedNumber', 'patientIDCard', 'doctorName', 'surgeon','operationName','specialInfection', 'remark','departCodeOfpatient' ]);
+ setOriginalFormParams(form, ['id', 'washHandNurse', 'circuitNurse', 'operationRoom', 'treatmentNum',
+ 'hospitalNum', 'patientName', 'patientAge', 'patientSex', 'roomNumber',
+ 'bedNumber', 'patientIDCard', 'doctorName', 'surgeon', 'operationName', 'specialInfection', 'remark', 'departCodeOfpatient']);
},
- failure : function(form, action) {
+ failure: function (form, action) {
},
- params : {
- id : id
+ params: {
+ id: id
}
});
} else {// 添加
top.Ext.getCmp('operator').setValue($Id('userName').value);
top.Ext.getCmp('depart').setValue($Id('currentOrgUnitName').value);
-// top.Ext.getCmp('enteringTime').setValue(Ext.util.Format.date(new Date(), 'Y-m-d H:i'));
+ // top.Ext.getCmp('enteringTime').setValue(Ext.util.Format.date(new Date(), 'Y-m-d H:i'));
setStartDate(top.Ext, 'yyyy/MM/dd HH:mm', 'enteringTime'); //(录入时间,取服务器时间 cjr)
}
-
- function printUseRecord(useRecordId){
+
+ function printUseRecord(useRecordId) {
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/useRecordAction!getUseRecordPrintData.do',
- params : {
- useRecordId : useRecordId
+ url: WWWROOT + '/disinfectSystem/useRecordAction!getUseRecordPrintData.do',
+ params: {
+ useRecordId: useRecordId
},
- success : function(response, options) {
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
- if(result.success){
+ if (result.success) {
doGetLodop();
formTypeOfPrinted = 'useRecord';
setPrinterByConfig();
print2(result.data);
LODOP.PRINT();
- }else{
- if(result.message){
+ } else {
+ if (result.message) {
showResult(result.message);
- }else{
+ } else {
showResult("处理打印失败");
}
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
var result = Ext.decode(response.responseText);
- if(result && result.message){
+ if (result && result.message) {
showResult(result.message);
- }else{
+ } else {
showResult("打印失败");
}
}
@@ -3305,45 +3317,45 @@
* @param record
* @returns
*/
-function renderTousseInstanceInfoShowFun(v, p, record){
+function renderTousseInstanceInfoShowFun(v, p, record) {
var id = record.data['id'];
var tousseType = record.data['tousseType'];
var tousseDefinitionName = record.data['tousseDefinitionName'];
var barcode = v ? v : "";
var content = ""
- if(tousseType != '一次性物品'){
+ if (tousseType != '一次性物品') {
var isComboTousse = (tousseType == '聚合包');
//点击条码链接显示器械包实例的追溯信息
- content = "" + barcode + " ";
- }else{
+ content = "" + barcode + " ";
+ } else {
content = barcode;
}
- if(tousseType == '外来器械包' || tousseType == '外来器械拆分小包'){
+ if (tousseType == '外来器械包' || tousseType == '外来器械拆分小包') {
var hospitalNumber = record.get('hospitalNumber') || '';
var clinicNumber = record.get('clinicNumber') || '';
var patient = record.get('patient') || '';
var hospitalNum = top.Ext.getCmp('hospitalNum').getValue() || '';
var treatmentNum = top.Ext.getCmp('treatmentNum').getValue() || '';
var patientName = top.Ext.getCmp('patientName').getValue() || '';
var isShowColor = false;
- if(hospitalNum !== '' && hospitalNumber !== '' && hospitalNum !== hospitalNumber){
+ if (hospitalNum !== '' && hospitalNumber !== '' && hospitalNum !== hospitalNumber) {
isShowColor = true;
- }else if(treatmentNum !== '' && clinicNumber !== '' && treatmentNum !== clinicNumber){
+ } else if (treatmentNum !== '' && clinicNumber !== '' && treatmentNum !== clinicNumber) {
isShowColor = true;
- }else if(patientName !== '' && patient !== '' && patientName !== patient){
+ } else if (patientName !== '' && patient !== '' && patientName !== patient) {
isShowColor = true;
}
- if(isShowColor){
- if(tousseType != '一次性物品'){
+ if (isShowColor) {
+ if (tousseType != '一次性物品') {
var isComboTousse = (tousseType == '聚合包');
- content = "" + barcode + " ";
+ content = "" + barcode + " ";
}
- return ''+content+'
';
- }else {
- return ''+content+'
';
+ return '' + content + '
';
+ } else {
+ return '' + content + '
';
}
- }else {
- return ''+content+'
';
+ } else {
+ return '' + content + '
';
}
}
/**
@@ -3353,95 +3365,95 @@
* @param record
* @returns {String}
*/
-function renderTousseInstanceNameForUrgent(v, p, record){
+function renderTousseInstanceNameForUrgent(v, p, record) {
var isUrgent = record.data['isUrgentForUseRecord'];
var tousseType = record.data['tousseType'];
var tousseDefinitionName = record.data['tousseDefinitionName'];
var urgentLevel = record.data['urgentLevel'];
var urgentLevelForUseRecord = record.data['urgentLevelForUseRecord'];
var haveUnSupplementMaterials = record.data.haveUnSupplementMaterials;
- if(haveUnSupplementMaterials == true){
+ if (haveUnSupplementMaterials == true) {
v = "◆ " + v;
}
//如果包类型为聚合包,则名称加粗
- if(tousseType == '聚合包'){
+ if (tousseType == '聚合包') {
v = "" + v + " ";
}
- if(tousseType != '一次性物品'){
- if(urgentLevelForUseRecord && urgentLevelForUseRecord.colorCode){
- return "" + v + "
";
+ if (tousseType != '一次性物品') {
+ if (urgentLevelForUseRecord && urgentLevelForUseRecord.colorCode) {
+ return "" + v + "
";
}
//加急后的值为默认的加急级别,如果没有默认的加急级别,则为最低的加急级别的值.这一段需求已经不需要了,代码已写好先注释掉
/*if(urgentLevel && urgentLevel.colorCode){
return "" + v + "
";
}*/
return v;
- }else{
+ } else {
return v;
}
}
var htmlContentErrorArray = [];
var htmlContentDamageArray = [];
-function getErrorDamageMaterial(event,type , tousseInstanceId , tousseName,rowIndex){
+function getErrorDamageMaterial(event, type, tousseInstanceId, tousseName, rowIndex) {
var typeName = "丢失";
var tableContent = '';
var errorDamageType = '';
var tousseInstanceGrid = top.Ext.getCmp("tousseInstanceGrid");
- for(var i=0;i 0){
+ if (result.data && result.data.length > 0) {
var tableContent = "材料名称 数量 ";
- for ( var i = 0; i < result.data.length; i++) {
- var amount = parseInt(result.data[i].errorDamageAmount)+parseInt(result.data[i].unconfirmedAmount);
+ for (var i = 0; i < result.data.length; i++) {
+ var amount = parseInt(result.data[i].errorDamageAmount) + parseInt(result.data[i].unconfirmedAmount);
tableContent += " "
- + result.data[i].name
- + " "
- + amount
- + " ";
+ + result.data[i].name
+ + ""
+ + amount
+ + " ";
}
tableContent += "
";
- if(type == 'error'){
- record.set("htmlContentErrorArray",tableContent);
- }else {
- record.set("htmlContentDamageArray",tableContent);
+ if (type == 'error') {
+ record.set("htmlContentErrorArray", tableContent);
+ } else {
+ record.set("htmlContentDamageArray", tableContent);
}
target.setAttribute('data-qtip', tableContent);
- target.setAttribute('data-qtitle', ' '+typeName+'材料列表: ');
+ target.setAttribute('data-qtitle', ' ' + typeName + '材料列表: ');
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
}
});
} else {
target.setAttribute('data-qtip', tableContent);
- target.setAttribute('data-qtitle', ' '+typeName+'材料列表: ');
+ target.setAttribute('data-qtitle', ' ' + typeName + '材料列表: ');
}
}
/**
@@ -3454,249 +3466,252 @@
* @param tousseInstanceId 包实例id
* @param tousseName 包实例名称
*/
-function addErrorDamageMaterial(type , tousseInstanceId , tousseName,rowIndex){
+function addErrorDamageMaterial(type, tousseInstanceId, tousseName, rowIndex) {
var typeName = "丢失";
- if(type == 'damage'){
+ if (type == 'damage') {
typeName = "报损";
}
//器械包的材料丢失报损Record类
var addMaterialErroDamageRecord = Ext.data.Record.create([
- {name : 'materialId'},
- {name : 'name'},
- {name : 'amount'},
- {name : 'errorAmount'},
- {name : 'errorDamageAmount'},
- {name : 'unconfirmedAmount'}
+ { name: 'materialId' },
+ { name: 'name' },
+ { name: 'amount' },
+ { name: 'errorAmount' },
+ { name: 'errorDamageAmount' },
+ { name: 'unconfirmedAmount' }
]);
//表单表格面板
var materialErrorDamageFormPanel = new top.Ext.FormPanel({
- id : 'materialErrorDamageFormPanel',
- frame : true,
- labelSeparator : '',
- bodyStyle : 'padding:5px 5px 0px 25px',
- width : 800,
- autoHeight : true,
- autoScroll : true,
- labelAlign : 'left',
- items:[new top.Ext.grid.EditorGridPanel({
- id : 'materialErrorDamageGrid',
- bodyStyle : 'border:1px solid #afd7af',
- frame :false,
+ id: 'materialErrorDamageFormPanel',
+ frame: true,
+ labelSeparator: '',
+ bodyStyle: 'padding:5px 5px 0px 25px',
+ width: 800,
+ autoHeight: true,
+ autoScroll: true,
+ labelAlign: 'left',
+ items: [new top.Ext.grid.EditorGridPanel({
+ id: 'materialErrorDamageGrid',
+ bodyStyle: 'border:1px solid #afd7af',
+ frame: false,
viewConfig: {
- forceFit:true,
- getRowClass:function(record, rowIndex, rowParams, store){
- if((record.data.unconfirmedAmount+record.data.errorDamageAmount) > 0){
- if(typeName == '丢失'){
+ forceFit: true,
+ getRowClass: function (record, rowIndex, rowParams, store) {
+ if ((record.data.unconfirmedAmount + record.data.errorDamageAmount) > 0) {
+ if (typeName == '丢失') {
return "bgYellow";
- }else {
+ } else {
return "bgBrown";
}
- }else {
+ } else {
return "bgWhite";
}
}
},
- store : new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/tousseInstanceAction!loadMaterialErrorDamageId.do',
- method : 'POST'
+ store: new Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/tousseInstanceAction!loadMaterialErrorDamageId.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- fields : [
- {name : 'materialId'},
- {name : 'name'},
- {name : 'amount'},
- {name : 'unconfirmedAmount'},
- {name : 'errorDamageAmount'}
- ]
+ reader: new Ext.data.JsonReader({
+ fields: [
+ { name: 'materialId' },
+ { name: 'name' },
+ { name: 'amount' },
+ { name: 'unconfirmedAmount' },
+ { name: 'errorDamageAmount' }
+ ]
})
}),
- cm : new top.Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),
- {header : "materialId",dataIndex : 'materialId',hidden : true},
- {header : "名称",dataIndex : 'name',width : 180,menuDisabled : true},
- /*{header : "规定数量",dataIndex : 'defineAmount',width : 80,menuDisabled : true},
- {header : "接收数量",dataIndex : 'actualAmount',width : 80,menuDisabled : true},*/
- {header : "数量",dataIndex : 'amount',width : 50,menuDisabled : true},
- {header : typeName + "数量",width : 50,menuDisabled : true,
- editor : new top.Ext.form.NumberField({
- regex: /^\d+$/,
- regexText:'只能输入数字',
- width : 50,
- allowBlank : true,
- allowNegative : false,//不允许输入负数
- allowDecimals : false,//不允许输入小数
- listeners : {
- blur : function(thiz){
-
- }
- }
- }),
- renderer:function(v,p,record){
- var errorDamageAmount = record.data.errorDamageAmount || 0;
- var unconfirmedAmount = record.data.unconfirmedAmount || 0;
- return parseInt(errorDamageAmount)+parseInt(unconfirmedAmount);
+ cm: new top.Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),
+ { header: "materialId", dataIndex: 'materialId', hidden: true },
+ { header: "名称", dataIndex: 'name', width: 180, menuDisabled: true },
+ /*{header : "规定数量",dataIndex : 'defineAmount',width : 80,menuDisabled : true},
+ {header : "接收数量",dataIndex : 'actualAmount',width : 80,menuDisabled : true},*/
+ { header: "数量", dataIndex: 'amount', width: 50, menuDisabled: true },
+ {
+ header: typeName + "数量", width: 50, menuDisabled: true,
+ editor: new top.Ext.form.NumberField({
+ regex: /^\d+$/,
+ regexText: '只能输入数字',
+ width: 50,
+ allowBlank: true,
+ allowNegative: false,//不允许输入负数
+ allowDecimals: false,//不允许输入小数
+ listeners: {
+ blur: function (thiz) {
+
+ }
}
- },
- {header : "操作",dataIndex : 'opAction',width : 60,menuDisabled : true,renderer:function(v,p,record){
- var str = " ";
- str += " ";
- return str;
- }}
- ]),
- width :735,
- height : 220,
- clicksToEdit : 1,// 设置点击几次才可编辑
- selModel : new top.Ext.grid.RowSelectionModel({
- singleSelect : false
+ }),
+ renderer: function (v, p, record) {
+ var errorDamageAmount = record.data.errorDamageAmount || 0;
+ var unconfirmedAmount = record.data.unconfirmedAmount || 0;
+ return parseInt(errorDamageAmount) + parseInt(unconfirmedAmount);
+ }
+ },
+ {
+ header: "操作", dataIndex: 'opAction', width: 60, menuDisabled: true, renderer: function (v, p, record) {
+ var str = " ";
+ str += " ";
+ return str;
+ }
+ }
+ ]),
+ width: 735,
+ height: 220,
+ clicksToEdit: 1,// 设置点击几次才可编辑
+ selModel: new top.Ext.grid.RowSelectionModel({
+ singleSelect: false
})
- }),{
- xtype:'panel',
- height:10
- },{
- xtype : "panel",
- title : "",
- layout : 'form',
- width:735,
- height : 70,
- items : [{
- xtype : 'textarea',
- fieldLabel : typeName + '原因说明',
- height : 50,
- id : 'materialErrorDamageRemark',
- name : 'materialErrorDamageRemark',
- width:750,
- maxLength : 665,
- allowBlank : true,
- anchor : '100%',
- listeners : {
- render : function(c){
+ }), {
+ xtype: 'panel',
+ height: 10
+ }, {
+ xtype: "panel",
+ title: "",
+ layout: 'form',
+ width: 735,
+ height: 70,
+ items: [{
+ xtype: 'textarea',
+ fieldLabel: typeName + '原因说明',
+ height: 50,
+ id: 'materialErrorDamageRemark',
+ name: 'materialErrorDamageRemark',
+ width: 750,
+ maxLength: 665,
+ allowBlank: true,
+ anchor: '100%',
+ listeners: {
+ render: function (c) {
var timeoutHandler = null;
//单击弹出窗口选反对或输入备注
- c.getEl().on('click',function(e,thiz){
+ c.getEl().on('click', function (e, thiz) {
clearTimeout(timeoutHandler);
-
- timeoutHandler = setTimeout(function(){
+
+ timeoutHandler = setTimeout(function () {
//弹出窗口录入相关的备注信息(传当前备注文本域对象(用于接收编辑的值)、参数类型(用于过滤相关的备注选项)等)
var optionArray = [];
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/core/httpOptionAction!getHttpOptionsById.do',
- params : {"optionId":errorDamageRemark},
- success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/core/httpOptionAction!getHttpOptionsById.do',
+ params: { "optionId": errorDamageRemark },
+ success: function (response, options) {
var result = Ext.decode(response.responseText);
- if(result.success){
- if(result.data && result.data.length > 0){
- for(var i = 0;i < result.data.length;i++){
+ if (result.success) {
+ if (result.data && result.data.length > 0) {
+ for (var i = 0; i < result.data.length; i++) {
optionArray.push(result.data[i].value);
}
- openHttpOptionSelectExt2Window(top.Ext , c , optionArray , '请选择/输入' + typeName + '原因说明');
- }else{
+ openHttpOptionSelectExt2Window(top.Ext, c, optionArray, '请选择/输入' + typeName + '原因说明');
+ } else {
showResult("系统未配置丢失报损常用备注,请直接输入备注");
}
- }else{
- if(result.message){
+ } else {
+ if (result.message) {
showResult(result.message);
}
}
- },failure:function(response){
+ }, failure: function (response) {
showResult("服务器正忙,请稍候再试!");
}
});
- } , 300);
+ }, 300);
});
//双击事件(屏蔽单击),进入编辑
- c.getEl().on('dblclick',function(e,thiz){
+ c.getEl().on('dblclick', function (e, thiz) {
clearTimeout(timeoutHandler);
c.focus();
});
}
}
}]
- }],
- buttons : [{
- id : 'btnSave',
- text : '保存',
- handler : function() {
+ }],
+ buttons: [{
+ id: 'btnSave',
+ text: '保存',
+ handler: function () {
var currentErrorDamageData;
var dataExists;
var dataIndexInArray;
- if(tousseInstanceMaterialErrorDamageArray.length > 0){
- for(var j = 0 ;j < tousseInstanceMaterialErrorDamageArray.length;j++){
+ if (tousseInstanceMaterialErrorDamageArray.length > 0) {
+ for (var j = 0; j < tousseInstanceMaterialErrorDamageArray.length; j++) {
var tousseInstanceMaterialErrorDamageData = tousseInstanceMaterialErrorDamageArray[j];
- if(tousseInstanceId == tousseInstanceMaterialErrorDamageData.id){
+ if (tousseInstanceId == tousseInstanceMaterialErrorDamageData.id) {
currentErrorDamageData = tousseInstanceMaterialErrorDamageData;
dataExists = true;
dataIndexInArray = j;
break;
}
}
}
-
- if(!currentErrorDamageData){
+
+ if (!currentErrorDamageData) {
currentErrorDamageData = {};
currentErrorDamageData.id = tousseInstanceId;
}
-
+
//表格中录入的丢失报损数据
var jsonArray = [];
var store = top.Ext.getCmp("materialErrorDamageGrid").getStore();
//验证提交的丢失(报损)数据,如果有录备注原因时,必须确保至少有录一条丢失/报损数量
- for(var i = 0;i < store.getCount();i++){
+ for (var i = 0; i < store.getCount(); i++) {
var record = store.getAt(i);
var errorDamageAmount = record.data.errorDamageAmount || 0;
var unconfirmedAmount = record.data.unconfirmedAmount || 0;
var errorAmount = record.data.errorAmount || 0;
-
- jsonArray.push({materialId:record.data.materialId,errorAmount:errorAmount, name:record.data.name,errorDamageAmount:errorDamageAmount,unconfirmedAmount:unconfirmedAmount});
+
+ jsonArray.push({ materialId: record.data.materialId, errorAmount: errorAmount, name: record.data.name, errorDamageAmount: errorDamageAmount, unconfirmedAmount: unconfirmedAmount });
}
//定义临时变量用于存储当前的材料相关的数量值,如果验证通过再设置到正式变量,否则不设置到正式变量
var tempErrorDamageData = {};
tempErrorDamageData.errorData = currentErrorDamageData.errorData;
tempErrorDamageData.damageData = currentErrorDamageData.damageData;
- if(type == 'error'){
+ if (type == 'error') {
tempErrorDamageData.errorData = jsonArray;
- }else if(type == 'damage'){
+ } else if (type == 'damage') {
tempErrorDamageData.damageData = jsonArray;
}
//判断该包的材料丢失报损数量有无超过最大可丢失报损数量
- if(tousseCanErrorDamageMaxAmountArray.length > 0){
+ if (tousseCanErrorDamageMaxAmountArray.length > 0) {
for (var i = 0; i < tousseCanErrorDamageMaxAmountArray.length; i++) {
var tousseCanErrorDamageMaxAmount = tousseCanErrorDamageMaxAmountArray[i];
- if(tousseCanErrorDamageMaxAmount.id == tousseInstanceId){
+ if (tousseCanErrorDamageMaxAmount.id == tousseInstanceId) {
//1.先验证单丢失的材料数量是否超过最大可丢失报损数量
- if(tempErrorDamageData.errorData && tempErrorDamageData.errorData.length > 0){
+ if (tempErrorDamageData.errorData && tempErrorDamageData.errorData.length > 0) {
for (var j = 0; j < tempErrorDamageData.errorData.length; j++) {
var tempErrorData = tempErrorDamageData.errorData[j];
- if(tempErrorData.unconfirmedAmount > tousseCanErrorDamageMaxAmount["" + tempErrorData.materialId]){
- alert("【"+ tempErrorData.name +"】丢失数量已大于最大可丢失报损数量,请重新填写");
+ if (tempErrorData.unconfirmedAmount > tousseCanErrorDamageMaxAmount["" + tempErrorData.materialId]) {
+ alert("【" + tempErrorData.name + "】丢失数量已大于最大可丢失报损数量,请重新填写");
return false;
}
}
}
//2.再验证单报损的材料数量是否超过最大可丢失报损数量
- if(tempErrorDamageData.damageData && tempErrorDamageData.damageData.length > 0){
+ if (tempErrorDamageData.damageData && tempErrorDamageData.damageData.length > 0) {
for (var j = 0; j < tempErrorDamageData.damageData.length; j++) {
var tempDamageData = tempErrorDamageData.damageData[j];
- if(tempDamageData.unconfirmedAmount > tousseCanErrorDamageMaxAmount["" + tempDamageData.materialId]){
- alert("【"+ tempDamageData.name +"】报损数量已大于最大可丢失报损数量,请重新填写");
+ if (tempDamageData.unconfirmedAmount > tousseCanErrorDamageMaxAmount["" + tempDamageData.materialId]) {
+ alert("【" + tempDamageData.name + "】报损数量已大于最大可丢失报损数量,请重新填写");
return false;
}
}
}
-
+
//3.最后验证丢失与报损的同一材料数量之和是否超过最大可丢失报损数量
- if(tempErrorDamageData.errorData && tempErrorDamageData.errorData.length > 0){
+ if (tempErrorDamageData.errorData && tempErrorDamageData.errorData.length > 0) {
for (var j = 0; j < tempErrorDamageData.errorData.length; j++) {
var tempErrorData = tempErrorDamageData.errorData[j];
var tempMaterialId = tempErrorData.materialId
var totalErrorAmount = tempErrorData.unconfirmedAmount;
-
- if(tempErrorDamageData.damageData && tempErrorDamageData.damageData.length > 0){
+
+ if (tempErrorDamageData.damageData && tempErrorDamageData.damageData.length > 0) {
for (var k = 0; k < tempErrorDamageData.damageData.length; k++) {
var tempDamageData = tempErrorDamageData.damageData[k];
- if(tempMaterialId == tempDamageData.materialId){
+ if (tempMaterialId == tempDamageData.materialId) {
totalErrorAmount = totalErrorAmount + tempDamageData.unconfirmedAmount;
- if(totalErrorAmount > tousseCanErrorDamageMaxAmount["" + tempMaterialId]){
- alert("【"+ tempDamageData.name +"】丢失与报损数量之和已大于最大可丢失报损数量,请重新填写");
+ if (totalErrorAmount > tousseCanErrorDamageMaxAmount["" + tempMaterialId]) {
+ alert("【" + tempDamageData.name + "】丢失与报损数量之和已大于最大可丢失报损数量,请重新填写");
return false;
}
break;
@@ -3708,55 +3723,55 @@
}
}
}
-
- if(top.Ext.getCmp("materialErrorDamageRemark").getValue() && jsonArray.length == 0){
- alert("如果有录入"+ typeName +"原因,至少需要录入一条材料"+ typeName +"数据");
+
+ if (top.Ext.getCmp("materialErrorDamageRemark").getValue() && jsonArray.length == 0) {
+ alert("如果有录入" + typeName + "原因,至少需要录入一条材料" + typeName + "数据");
return false;
}
- if(type == 'error'){
+ if (type == 'error') {
currentErrorDamageData.errorRemark = top.Ext.getCmp("materialErrorDamageRemark").getValue();
currentErrorDamageData.errorData = jsonArray;
- }else if(type == 'damage'){
+ } else if (type == 'damage') {
currentErrorDamageData.damageRemark = top.Ext.getCmp("materialErrorDamageRemark").getValue();
currentErrorDamageData.damageData = jsonArray;
}
-
- if(!dataExists){
+
+ if (!dataExists) {
tousseInstanceMaterialErrorDamageArray.push(currentErrorDamageData);
}
var tousseInstanceGrid = top.Ext.getCmp("tousseInstanceGrid");
- for(var i=0;i "
+ jsonArray[i].name
+ " "
- + (errorDamageAmount+unconfirmedAmount)
+ + (errorDamageAmount + unconfirmedAmount)
+ " ";
}
}
tableContent += "
";
- if(type == 'error'){
- record.set("htmlContentErrorArray",tableContent);
- }else {
- record.set("htmlContentDamageArray",tableContent);
+ if (type == 'error') {
+ record.set("htmlContentErrorArray", tableContent);
+ } else {
+ record.set("htmlContentDamageArray", tableContent);
}
top.Ext.getCmp("tousseInstanceMaterialErrorDamageItems").setValue(Ext.encode(tousseInstanceMaterialErrorDamageArray));
materialErrorDamageWindow.close();
}
- },{
- text : '取消',
- handler : function() {
+ }, {
+ text: '取消',
+ handler: function () {
materialErrorDamageWindow.close();
}
}]
@@ -3765,122 +3780,122 @@
var materialErrorDamageGrid = top.Ext.getCmp("materialErrorDamageGrid");
var materialErrorDamageGridCurrentRowNumber;
var materialErrorDamageGridCurrentAmount;
- materialErrorDamageGrid.on('rowclick',function(Grid, rowIdx, e){
+ materialErrorDamageGrid.on('rowclick', function (Grid, rowIdx, e) {
materialErrorDamageGridCurrentRowNumber = rowIdx;
var store = materialErrorDamageGrid.store;
var currentRowNum = materialErrorDamageGridCurrentRowNumber; //当前行号
var currentRowData = store.getAt(currentRowNum);
materialErrorDamageGridCurrentAmount = currentRowData.data.amount;
});
- materialErrorDamageGrid.on('afteredit',function(e){
+ materialErrorDamageGrid.on('afteredit', function (e) {
var store = materialErrorDamageGrid.store;
var currentRowNum = materialErrorDamageGridCurrentRowNumber; //当前行号
var currentRowData = store.getAt(currentRowNum);
var name = currentRowData.data.name;
var amount = currentRowData.data.amount;
var materialId = currentRowData.data.materialId;
var errorAmount = currentRowData.data.errorAmount;
- if(errorAmount > materialErrorDamageGridCurrentAmount){
- alert("【"+ name +"】"+ typeName +"已大于最大可丢失报损数量,请重新填写");
- currentRowData.set("errorAmount","0");
+ if (errorAmount > materialErrorDamageGridCurrentAmount) {
+ alert("【" + name + "】" + typeName + "已大于最大可丢失报损数量,请重新填写");
+ currentRowData.set("errorAmount", "0");
return false;
}
});
//丢失报损表格的丢失/报损数量验证代码 end
-
+
var materialErrorDamageWindow = new top.Ext.Window({
- id : 'materialErrorDamageWindow',
- layout : 'fit',
- title : "【"+ tousseName +"】" + '材料'+ typeName +'信息',
- width : 810,
- modal : true,
- autoHeight : true,
- border :false,
- plain : true,
- items : [ materialErrorDamageFormPanel ]
+ id: 'materialErrorDamageWindow',
+ layout: 'fit',
+ title: "【" + tousseName + "】" + '材料' + typeName + '信息',
+ width: 810,
+ modal: true,
+ autoHeight: true,
+ border: false,
+ plain: true,
+ items: [materialErrorDamageFormPanel]
});
materialErrorDamageWindow.show();
-
+
//记录每个包实例的最大可丢失/报损数量,格式为:[{id:包实例id1值,materialId1值:amount1值,materialId2值:amount2值},{id:包实例id2值,,materialId1值:amount1值,materialId2值:amount2值}]
var tousseCanErrorDamageMaxAmountArray = [];
materialErrorDamageFormPanel.getEl().mask("正在加载,请稍候...");
//通过dwr或ajax请求及同本地变量的计算生成列表数据显示
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/tousseInstanceAction!loadMaterialErrorDamageDataById.do',
- params : {
- id : tousseInstanceId,
- type : type
+ url: WWWROOT + '/disinfectSystem/tousseInstanceAction!loadMaterialErrorDamageDataById.do',
+ params: {
+ id: tousseInstanceId,
+ type: type
},
- success : function(response, options) {
+ success: function (response, options) {
materialErrorDamageFormPanel.getEl().unmask();
//数据格式:{remark:"原因说明",[{name:"材料1",defineAmount:2,amount:2,errorAmount:1},{name:"材料2",defineAmount:1,amount:1,errorAmount:0},...{name:"材料3",defineAmount:4,amount:3,errorAmount:1}]}
var result = Ext.decode(response.responseText);
var currentErrorDamageData;
- if(tousseInstanceMaterialErrorDamageArray.length > 0){
- for(var j = 0 ;j < tousseInstanceMaterialErrorDamageArray.length;j++){
+ if (tousseInstanceMaterialErrorDamageArray.length > 0) {
+ for (var j = 0; j < tousseInstanceMaterialErrorDamageArray.length; j++) {
var tousseInstanceMaterialErrorDamageData = tousseInstanceMaterialErrorDamageArray[j];
- if(tousseInstanceId == tousseInstanceMaterialErrorDamageData.id){
+ if (tousseInstanceId == tousseInstanceMaterialErrorDamageData.id) {
currentErrorDamageData = tousseInstanceMaterialErrorDamageData;
break;
}
}
}
var remark;
var currentErrorDamageDetailData;
- if(type == 'error' && currentErrorDamageData && currentErrorDamageData.errorData){
+ if (type == 'error' && currentErrorDamageData && currentErrorDamageData.errorData) {
remark = currentErrorDamageData.errorRemark;
currentErrorDamageDetailData = currentErrorDamageData.errorData;
- }else if(type == 'damage' && currentErrorDamageData && currentErrorDamageData.damageData){
+ } else if (type == 'damage' && currentErrorDamageData && currentErrorDamageData.damageData) {
remark = currentErrorDamageData.damageRemark;
currentErrorDamageDetailData = currentErrorDamageData.damageData;
- }else{
+ } else {
remark = result.remark;
}
top.Ext.getCmp("materialErrorDamageRemark").setValue(remark);
- if(result.data && result.data.length > 0){
+ if (result.data && result.data.length > 0) {
var store = top.Ext.getCmp("materialErrorDamageGrid").getStore();
- for(var i = 0 ;i < result.data.length;i++){
+ for (var i = 0; i < result.data.length; i++) {
var resultData = result.data[i];
var materialId = resultData.materialId;
var errorAmount = resultData.errorAmount;
var errorDamageAmount = resultData.errorDamageAmount;
var unconfirmedAmount = resultData.unconfirmedAmount;
-
+
//记录每个包实例的材料最大可丢失/报损数量
- if(tousseCanErrorDamageMaxAmountArray.length > 0){
+ if (tousseCanErrorDamageMaxAmountArray.length > 0) {
var foundData = false;
for (var j = 0; j < tousseCanErrorDamageMaxAmountArray.length; j++) {
var tousseCanErrorDamageMaxAmount = tousseCanErrorDamageMaxAmountArray[j];
- if(tousseInstanceId == tousseCanErrorDamageMaxAmount.id){
- for(var p in tousseCanErrorDamageMaxAmount){
- if(materialId == p){
+ if (tousseInstanceId == tousseCanErrorDamageMaxAmount.id) {
+ for (var p in tousseCanErrorDamageMaxAmount) {
+ if (materialId == p) {
tousseCanErrorDamageMaxAmount[p] = resultData.amount;
foundData = true;
break;
}
}
}
}
- if(!foundData){
+ if (!foundData) {
var newTousseCanErrorDamageMaxAmount = {};
newTousseCanErrorDamageMaxAmount.id = tousseInstanceId;
- newTousseCanErrorDamageMaxAmount[""+ materialId +""] = resultData.amount;
+ newTousseCanErrorDamageMaxAmount["" + materialId + ""] = resultData.amount;
tousseCanErrorDamageMaxAmountArray.push(newTousseCanErrorDamageMaxAmount);
}
- }else{
+ } else {
var newTousseCanErrorDamageMaxAmount = {};
newTousseCanErrorDamageMaxAmount.id = tousseInstanceId;
- newTousseCanErrorDamageMaxAmount[""+ materialId +""] = resultData.amount;
+ newTousseCanErrorDamageMaxAmount["" + materialId + ""] = resultData.amount;
tousseCanErrorDamageMaxAmountArray.push(newTousseCanErrorDamageMaxAmount);
}
- if(currentErrorDamageDetailData){
- if(currentErrorDamageDetailData.length > 0){
+ if (currentErrorDamageDetailData) {
+ if (currentErrorDamageDetailData.length > 0) {
var existsErrorAmount = false;
- for(var k = 0;k < currentErrorDamageDetailData.length ;k++){
- if(materialId == currentErrorDamageDetailData[k].materialId){
+ for (var k = 0; k < currentErrorDamageDetailData.length; k++) {
+ if (materialId == currentErrorDamageDetailData[k].materialId) {
errorAmount = currentErrorDamageDetailData[k].errorAmount;
- if(currentErrorDamageDetailData[k].errorDamageAmount == undefined){
+ if (currentErrorDamageDetailData[k].errorDamageAmount == undefined) {
existsErrorAmount = true;
break;
}
@@ -3890,33 +3905,33 @@
break;
}
}
- }else {
+ } else {
errorDamageAmount = 0;
unconfirmedAmount = 0;
errorAmount = 0;
}
- if(!existsErrorAmount){
+ if (!existsErrorAmount) {
errorAmount = "";
}
}
var storeData = new addMaterialErroDamageRecord({
- materialId : materialId,
- name : resultData.name,
- amount : resultData.amount,
- errorDamageAmount:errorDamageAmount,
- errorAmount : errorAmount,
- unconfirmedAmount:unconfirmedAmount
+ materialId: materialId,
+ name: resultData.name,
+ amount: resultData.amount,
+ errorDamageAmount: errorDamageAmount,
+ errorAmount: errorAmount,
+ unconfirmedAmount: unconfirmedAmount
});
store.add(storeData);
}
}
},
- failure : function(response, options) {
+ failure: function (response, options) {
materialErrorDamageFormPanel.getEl().unmask();
}
});
-
+
}
/**
@@ -3925,27 +3940,27 @@
* @param materialId
* @param name
*/
-function changeMaterialErrorAmount(type , materialId , name){
+function changeMaterialErrorAmount(type, materialId, name) {
var store = top.Ext.getCmp("materialErrorDamageGrid").getStore();
- for(var i = 0 ;i < store.getCount();i++){
+ for (var i = 0; i < store.getCount(); i++) {
var record = store.getAt(i);
- if(materialId == record.get("materialId")){
+ if (materialId == record.get("materialId")) {
var errorDamageAmount = parseInt(record.get("errorDamageAmount")) || 0;
var unconfirmedAmount = parseInt(record.get("unconfirmedAmount")) || 0;
var amount = record.get("amount");
- if(type == 'add'){
- if((errorDamageAmount+unconfirmedAmount) >= amount){
+ if (type == 'add') {
+ if ((errorDamageAmount + unconfirmedAmount) >= amount) {
showResult("误差数量已经达到原数量,不能再加");
- }else{
- record.set("unconfirmedAmount",unconfirmedAmount + 1);
+ } else {
+ record.set("unconfirmedAmount", unconfirmedAmount + 1);
}
- }else if(type == 'sub'){
- if((errorDamageAmount+unconfirmedAmount) == 0){
+ } else if (type == 'sub') {
+ if ((errorDamageAmount + unconfirmedAmount) == 0) {
showResult("误差数量已经为0,不能再减");
- }else if(unconfirmedAmount == 0){
+ } else if (unconfirmedAmount == 0) {
showResult("减少到的最小数量不能超过已有的丢失数量!");
- }else{
- record.set("unconfirmedAmount",unconfirmedAmount - 1);
+ } else {
+ record.set("unconfirmedAmount", unconfirmedAmount - 1);
}
}
break;