Index: ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceView.jsp
===================================================================
diff -u -r33038 -r36441
--- ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceView.jsp (.../forminstanceView.jsp) (revision 33038)
+++ ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceView.jsp (.../forminstanceView.jsp) (revision 36441)
@@ -35,15 +35,15 @@
var enableEditBtn = false;
var enableSaveBtn = false;
var enableSaveAndNewBtn = false;
-
-enableEditBtn = true;
-
-
-enableSaveBtn = true;
-
+var SSTS_CustomForm_Review = true;
+
+ SSTS_CustomForm_Review = false;
+
+if(!sstsConfig.enableReviewOfFormDefinitionFunction){
+ SSTS_CustomForm_Review = true;
+}
-
Index: ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceForm.js
===================================================================
diff -u -r33047 -r36441
--- ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceForm.js (.../forminstanceForm.js) (revision 33047)
+++ ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceForm.js (.../forminstanceForm.js) (revision 36441)
@@ -52,6 +52,57 @@
});
}
+//ZSRY-56:审核
+function reviewFormInstance(id){
+ var ids = '';
+ if(id){
+ ids = id;
+ }else {
+ var records = grid.getSelectionModel().getSelections();
+
+ if (records.length == 0) {
+ showResult("请选择要审核的记录!");
+ return false;
+ }
+
+ var ids = '';
+ for ( var i = 0, len = records.length; i < len; i++) {
+ if (ids == '') {
+ ids = records[i].data['id'];
+ } else {
+ ids = ids + ';' + records[i].data['id'];
+ }
+ }
+ }
+
+ top.Ext.MessageBox.confirm("请确认","是否确认审核?",function(button, text) {
+ if ("yes" == button){
+ Ext.Ajax.request({
+ url : WWWROOT + '/disinfectSystem/formInstanceAction!reviewFormInstance.do',
+ params : {ids : ids},
+ success : function(response, options) {
+ var result = Ext.decode(response.responseText);
+ var success = result.success;
+ if(success){
+ showResult('审核成功!');
+ if(id){
+ cancelFormInstance();
+ }
+ grid.dwrReload();
+ }else {
+ showResult(result.message);
+ return;
+ }
+ },
+ failure : function(response, options) {
+ var result = Ext.decode(response.responseText);
+ alert(result.message);
+ }
+ });
+ }
+ });
+}
+
function addFormInstanceWin(id) {
if (id == null || id == 'undentified') {
id = "";
@@ -176,6 +227,20 @@
}]
}, {
layout: 'form',
+ columnWidth: .5,
+ labelWidth: 90,
+ hidden:!sstsConfig.enableReviewOfFormDefinitionFunction,
+ items: [{
+ xtype: 'textfield',
+ name: 'reviewStatus',
+ id: 'reviewStatus',
+ fieldLabel: "审核状态",
+ anchor: '95%',
+ readOnly: true,
+ cls: 'fieldReadOnlyNoRemove'
+ }]
+ }, {
+ layout: 'form',
columnWidth: 1,
labelWidth: 90,
items: [{
@@ -190,6 +255,13 @@
}]
}],
buttons: [{
+ id: 'reviewBtn',
+ text: '审核',
+ hidden:SSTS_CustomForm_Review,
+ handler: function () {
+ reviewFormInstance(id);
+ }
+ }, {
id: 'saveBtn',
text: '保存',
handler: function () {
@@ -238,6 +310,14 @@
top.Ext.getCmp("remark").setValue(result.data.remark);
renderFormInstance(result.data.items, 'addFormInstanceForm', 'formDefinitionItemIds');
+ if(sstsConfig.enableReviewOfFormDefinitionFunction){
+ if(result.data.status == '已审核'){
+ top.Ext.getCmp('saveBtn').hide();
+ top.Ext.getCmp('saveAndCreateBtn').hide();
+ top.Ext.getCmp('reviewBtn').hide();
+ }
+ top.Ext.getCmp("reviewStatus").setValue(result.data.status);
+ }
},
failure: function (response, options) {
showResult('系统加载出错,请稍候再试');
Index: ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceView.js
===================================================================
diff -u -r32364 -r36441
--- ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceView.js (.../forminstanceView.js) (revision 32364)
+++ ssts-web/src/main/webapp/disinfectsystem/customform/forminstanceView.js (.../forminstanceView.js) (revision 36441)
@@ -53,6 +53,9 @@
var columns = [
{header : "表单名称",width : 250,dataIndex : 'formDefinition.formName', renderer : modifyRecord},
+ {header : "状态",width : 80,dataIndex : 'status'},
+ {header : "审核时间",width : 160,dataIndex : 'reviewTime',renderer : myDateFormatByMinute},
+ {header : "审核人",width : 120,dataIndex : 'reviewer'},
{header : "登记时间",width : 160,dataIndex : 'createDate',renderer : myDateFormatByMinute},
{header : "登记人",width : 120,dataIndex : 'createUserName'},
{header : "版本号",width : 120,dataIndex : 'version', renderer:function(v,p,record){
@@ -77,6 +80,9 @@
var readerDetail = [
{name : 'id'},
{name : 'formDefinition.formName'},
+ {name : 'status'},
+ {name : 'reviewer'},
+ {name : 'reviewTime'},
{name : 'createDate'},
{name : 'createUserName'},
{name : 'version'},
@@ -95,6 +101,13 @@
handler : function() {
deleteFormInstance(grid);
}
+ }, '-', {
+ text : '审核',
+ iconCls : 'icon_set',
+ hidden:SSTS_CustomForm_Review,
+ handler : function() {
+ reviewFormInstance();
+ }
}];
var dwrCallParams = null;
Index: ssts-web/src/main/webapp/disinfectsystem/config/zsdxfsdeyy/config.js
===================================================================
diff -u -r36313 -r36441
--- ssts-web/src/main/webapp/disinfectsystem/config/zsdxfsdeyy/config.js (.../config.js) (revision 36313)
+++ ssts-web/src/main/webapp/disinfectsystem/config/zsdxfsdeyy/config.js (.../config.js) (revision 36441)
@@ -283,6 +283,8 @@
enableAvailableSterilizationProgramsOfTousseFunction:true,
//器械维修管理功能
enableInstrumentRepairManagement : true,
+ //启用自定义表单的审核功能
+ enableReviewOfFormDefinitionFunction : true,
//启用灭菌双人核对功能
enableDoubleCheckOfSterilizationFunction : true
}
\ No newline at end of file
Index: ssts-web/src/main/resources/systemset/operationDefine.xml
===================================================================
diff -u -r36254 -r36441
--- ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 36254)
+++ ssts-web/src/main/resources/systemset/operationDefine.xml (.../operationDefine.xml) (revision 36441)
@@ -461,6 +461,7 @@
+