Index: ssts-web/src/main/webapp/homepage/menuconfigure.js
===================================================================
diff -u -r35069 -r35217
--- ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 35069)
+++ ssts-web/src/main/webapp/homepage/menuconfigure.js (.../menuconfigure.js) (revision 35217)
@@ -137,7 +137,14 @@
{hidden :SSTS_OperationReservationDelivery_Menu,text:"手术预约发货",href:WWWROOT+'/disinfectsystem/invoice/operationReservationInvoiceView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true},
{hidden :SSTS_OperationReservationDelivery_Menu,text:"手术预约汇总发货",href:WWWROOT+'/disinfectsystem/invoice/operationReservationMergeInvoiceView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true},
{hidden :SSTS_CustomDelivery_Manager,text:"自定义发货",href:WWWROOT+'/disinfectsystem/invoice/customInvoiceForm.jsp?editMode=true',hrefTarget:linkTarget,leaf:true},
- {hidden :SSTS_Invoice_Menu,text:"快速发货",href:WWWROOT+'/disinfectsystem/invoice/expressInvoiceView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true},
+ {hidden :SSTS_CustomDelivery_BatchInvoice,text:"一次性物品自定义批量发货",href:'javascript:void(0);',leaf:true,listeners:{
+ click:function(node, e){
+ var url = WWWROOT+'/disinfectsystem/invoice/batchInvoice.jsp';
+ top.recyclingWindow = openFullSizeWindowWithName(url,null,"batchInvoiceWindow");
+ return;
+ }
+ }},
+ {hidden :SSTS_Invoice_Menu,text:"快速发货",href:WWWROOT+'/disinfectsystem/invoice/expressInvoiceView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true},
{hidden :SSTS_Invoice_Menu,text:"发货科室分组设置",href:WWWROOT+'/disinfectsystem/invoice/invoiceDepartmentView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true},
{hidden :SSTS_Invoice_Menu,text:"发货单管理",href:WWWROOT+'/disinfectsystem/invoice/invoiceView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true},
{hidden :SSTS_Invoice_Menu,text:"材料发货管理",href:WWWROOT+'/disinfectsystem/invoice/materialInvoiceView.jsp?editMode=true',hrefTarget:linkTarget,leaf:true},
@@ -789,7 +796,7 @@
{hidden :false,text:"数据实时看板汇总",href:'javascript:void(0);',leaf:true,listeners:{
click:function(node, e){
var url = WWWROOT+'/disinfectsystem/config/'+profile+'/realTimeDashboards/index.jsp';
- top.realTimeDashboardsWindow = openFullSizeWindowWithName(url,null,"realTimeDashboardsWindow");
+ top.realTimeDashboardsWindow = openFullSizeWindowWithName(url,null,"realTimeDashboardsWindow");
return;
}
}}
Index: ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/selectDepartExt4.js
===================================================================
diff -u -r32177 -r35217
--- ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/selectDepartExt4.js (.../selectDepartExt4.js) (revision 32177)
+++ ssts-web/src/main/webapp/disinfectsystem/basedatamanager/departmentgroup/selectDepartExt4.js (.../selectDepartExt4.js) (revision 35217)
@@ -1,5 +1,7 @@
var departWin;
var departListStore;
+var tousseWin;
+var tousseListStore;
//删除选择的科室
function removeDepartItem(departCode) {
@@ -26,7 +28,7 @@
}
//添加科室
-function addDepartItem(code, name) {
+function addDepartItem(code, name, orgUnitId) {
if (name == null || name == '') {
showResult('请选择科室!');
return false;
@@ -39,21 +41,23 @@
}
var record = {
departCode: code,
- name: name
+ name: name,
+ orgUnitId: orgUnitId || ''
};
departListStore.add(record)
top.Ext4.getCmp("departName2").setValue("");
}
//添加搜索结果的科室
-function addDepartItems(code, name) {
+function addDepartItems(code, name, orgUnitId) {
var b = isDepartRepeat(name);
if (b) {
return;
}
var record = {
departCode: code,
- name: name
+ name: name,
+ orgUnitId: orgUnitId || ''
};
departListStore.add(record)
}
@@ -86,7 +90,7 @@
top.Ext.getCmp("readersForDisplay").setValue(nameString);
top.Ext.getCmp("readers").setValue(codeString);
}
- } else if(formName == 'useToRecycleDepart'){
+ } else if (formName == 'useToRecycleDepart') {
for (var i = 0; i < departListStore.getCount(); i++) {
var record = departListStore.getAt(i);
nameArr[i] = record.get('name');
@@ -102,6 +106,19 @@
Ext4.getCmp("useToRecycleDepartNames").setValue(nameString);
Ext4.getCmp("useToRecycleDepartCodes").setValue(codeString);
}
+ } else if (formName == 'batchInvoice') {
+ var idArr = [];
+ var ids = '';
+ for (var i = 0; i < departListStore.getCount(); i++) {
+ var record = departListStore.getAt(i);
+ idArr[i] = record.get('orgUnitId');
+ }
+
+ if (idArr.length !== 0) {
+ ids = idArr.join(',')
+ }
+
+ saveDeparts(ids)
} else {
for (var i = 0; i < departListStore.getCount(); i++) {
var record = departListStore.getAt(i);
@@ -134,7 +151,7 @@
}
//打开选择科室的窗口
-function openSelectReceiverOrganization(departNames, codes, formName) {
+function openSelectReceiverOrganization(departNames, codes, formName, orgUnitIds) {
var departJsonStore = new top.Ext4.data.Store({
proxy: {
type: 'ajax',
@@ -152,6 +169,7 @@
},
fields: [
{ name: 'id' },
+ { name: 'orgUnitId' },
{ name: 'departCode' },
{ name: 'name' }
]
@@ -167,6 +185,8 @@
}
},
fields: [
+ { name: 'id' },
+ { name: 'orgUnitId' },
{ name: 'departCode' },
{ name: 'name' }
]
@@ -177,8 +197,13 @@
if (((departNames || '') !== '') && ((codes || '') !== '')) {
var departNameArr = departNames.split(';');
var codeArr = codes.split(';');
+ var orgUnitIdArr = [];
+ if (orgUnitIds) {
+ orgUnitIdArr = orgUnitIds.split(';');
+ }
for (var i = 0; i < departNameArr.length; i++) {
var record = {
+ orgUnitId: orgUnitIdArr[i] || '',
departCode: codeArr[i],
name: departNameArr[i]
};
@@ -203,7 +228,8 @@
select: function (combo, record, index) {
var tem = record[0].data.departCode;
var name = record[0].data.name;
- addDepartItem(tem, name);
+ var orgUnitId = record[0].raw.orgUnitId;
+ addDepartItem(tem, name, orgUnitId);
}
}
}, {
@@ -213,7 +239,8 @@
for (var i = 0; i < departJsonStore.getCount(); i++) {
var departCode = departJsonStore.getAt(i).get('departCode');
var name = departJsonStore.getAt(i).get('name');
- addDepartItems(departCode, name)
+ var orgUnitId = departJsonStore.getAt(i).get('orgUnitId');
+ addDepartItems(departCode, name, orgUnitId)
}
top.Ext4.getCmp("departName2").setValue("");
}
@@ -227,7 +254,8 @@
for (var i = 0; i < departJsonStore.getCount(); i++) {
var departCode = departJsonStore.getAt(i).get('departCode');
var name = departJsonStore.getAt(i).get('name');
- addDepartItems(departCode, name)
+ var orgUnitId = departJsonStore.getAt(i).get('orgUnitId');
+ addDepartItems(departCode, name, orgUnitId)
}
}, 200);
}
@@ -246,12 +274,12 @@
}, {
header: "科室名称",
dataIndex: 'name',
- width: 500,
+ width: 480,
menuDisabled: true
}, {
id: 'deleteItem',
header: '操作',
- width: 40,
+ width: 60,
menuDisabled: true,
dataIndex: 'button',
renderer: function (v, p, record, index) {
@@ -311,4 +339,268 @@
});
departWin.show();
-}
\ No newline at end of file
+}
+
+//删除选择的物品
+function removeTousseItem(id) {
+ for (var i = 0; i < tousseListStore.getCount(); i++) {
+ var item = tousseListStore.data.items[i];
+ if (item.data.id == id) {
+ tousseListStore.remove(item)
+ }
+ }
+}
+
+//检查物品是否存在
+function isTousseRepeat(name) {
+ if (name != null && name.length > 0) {
+ for (var i = 0; i < tousseListStore.getCount(); i++) {
+ var record = tousseListStore.getAt(i);
+ var tempName = record.get('name');
+ if (name == tempName) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+//添加物品
+function addTousseItem(id, name) {
+ if (name == null || name == '') {
+ showResult('请选择物品!');
+ return false;
+ }
+ var b = isTousseRepeat(name);
+ if (b) {
+ showResult('物品:[' + name + '] 已存在!');
+ top.Ext4.getCmp('tousseName2').setValue("");
+ return false;
+ }
+ var record = {
+ id: id,
+ name: name
+ };
+ tousseListStore.add(record)
+ top.Ext4.getCmp("tousseName2").setValue("");
+}
+
+//添加搜索结果的物品
+function addTousseItems(id, name) {
+ var b = isTousseRepeat(name);
+ if (b) {
+ return;
+ }
+ var record = {
+ id: id,
+ name: name
+ };
+ tousseListStore.add(record)
+}
+
+//保存选择的物品
+function saveTousseName(formName) {
+ var idArr = [];
+ var nameArr = [];
+
+ for (var i = 0; i < tousseListStore.getCount(); i++) {
+ var record = tousseListStore.getAt(i);
+ idArr[i] = record.get('id');
+ nameArr[i] = record.get('name');
+ }
+
+ if (idArr.length == 0) {
+ showResult('请选择一个物品');
+ return
+ }
+
+ var ids = idArr.join(',');
+
+ if (formName == 'batchInvoice') {
+ saveTousses(ids);
+ tousseWin.close();
+ return;
+ }
+
+ Ext4.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!updateTousseInspectMaterials.do',
+ async: false,
+ params: {
+ ids: ids,
+ operationType: 'add'
+ },
+ success: function (response) {
+ var result = Ext4.decode(response.responseText);
+ if (result.success) {
+ showResult('添加成功');
+ tousseWin.close();
+ listStore.reload();
+ } else {
+ showResult(result.msg);
+ }
+ }
+ });
+}
+
+//打开选择物品的窗口
+function openSelectTousse(names, ids, formName) {
+ var tousseJsonStore = new top.Ext4.data.Store({
+ pageSize: 9999,
+ proxy: {
+ type: 'ajax',
+ url: WWWROOT + '/disinfectSystem/diposableGoodsAction!searchDisposableGoods.do',
+ reader: {
+ type: 'json',
+ totalProperty: 'totalCount',
+ root: 'data'
+ }
+ },
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
+ ]
+ });
+
+ tousseListStore = new top.Ext4.data.Store({
+ fields: [
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' }
+ ]
+ });
+
+ tousseJsonStore.load();
+
+ if (((names || '') !== '') && ((ids || '') !== '')) {
+ var nameArr = names.split(';');
+ var idArr = ids.split(';');
+ for (var i = 0; i < nameArr.length; i++) {
+ var record = {
+ name: nameArr[i],
+ id: idArr[i]
+ };
+ tousseListStore.add(record)
+ }
+ }
+
+ var tbar = [{
+ text: '选择物品:'
+ }, {
+ xtype: 'combo',
+ id: 'tousseName2',
+ name: 'tousseName2',
+ queryParam: 'spell',
+ fieldLabel: '',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ width: 320,
+ store: tousseJsonStore,
+ listeners: {
+ select: function (combo, record, index) {
+ var id = record[0].data.id;
+ var name = record[0].data.name;
+ addTousseItem(id, name);
+ }
+ }
+ }, {
+ text: '添加物品',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ for (var i = 0; i < tousseJsonStore.getCount(); i++) {
+ var id = tousseJsonStore.getAt(i).get('id');
+ var name = tousseJsonStore.getAt(i).get('name');
+ addTousseItems(id, name)
+ }
+ top.Ext4.getCmp("tousseName2").setValue("");
+ }
+ }, {
+ text: '添加所有',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ tousseJsonStore.load();
+ top.Ext4.getCmp("tousseName2").setValue("");
+ setTimeout(function () {
+ for (var i = 0; i < tousseJsonStore.getCount(); i++) {
+ var id = tousseJsonStore.getAt(i).get('id');
+ var name = tousseJsonStore.getAt(i).get('name');
+ addTousseItems(id, name)
+ }
+ }, 200);
+ }
+ }, {
+ text: '清空所有',
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
+ tousseListStore.removeAll();
+ }
+ }]
+
+ var columns = [{
+ header: "物品名称",
+ dataIndex: 'name',
+ width: 585,
+ menuDisabled: true
+ }, {
+ id: 'deleteItem',
+ header: '操作',
+ width: 100,
+ menuDisabled: true,
+ dataIndex: 'button',
+ renderer: function (v, p, record, index) {
+ return "";
+ }
+ }]
+
+ var grid = new top.Ext4.grid.GridPanel({
+ title: '',
+ id: 'girdID',
+ columns: columns,
+ frame: false,
+ width: 710,
+ height: 400,
+ store: tousseListStore,
+ tbar: tbar,
+ viewConfig: {
+ autoFill: true
+ }
+ });
+
+ tousseWin = new top.Ext4.window.Window({
+ id: 'tousseWin',
+ layout: 'border',
+ title: '添加物品',
+ width: 760,
+ height: 500,
+ border: 0,
+ modal: true,
+ defaults: {
+ bodyStyle: "background-color: none",
+ frame: true,
+ border: false
+ },
+ style: 'padding:20px',
+ items: [{
+ region: "west",
+ width: 720,
+ border: 0,
+ title: '',
+ items: [grid]
+ }],
+ buttonAlign: 'center',
+ buttons: [{
+ id: 'confirmBtn',
+ text: '确定',
+ handler: function () {
+ saveTousseName(formName);
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ tousseWin.close();
+ }
+ }]
+ });
+
+ tousseWin.show();
+}
+
Index: ssts-web/src/main/webapp/disinfectsystem/invoice/batchInvoice.jsp
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/invoice/batchInvoice.jsp (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/batchInvoice.jsp (revision 35217)
@@ -0,0 +1,61 @@
+<%@ page contentType="text/html; charset=UTF-8"%>
+<%@page import="com.forgon.disinfectsystem.entity.invoicemanager.Invoice"%>
+<%@ include file="/common/taglibs.jsp"%>
+<%
+ LoginUserData loginUser = AcegiHelper.getLoginUser();
+ request.setAttribute("userName",loginUser.getUserFullName());
+ request.setAttribute("currentOrgUnitCode",loginUser.getCurrentOrgUnitCode());
+ request.setAttribute("fontSize",(loginUser == null || loginUser.getFontSize() == null) ? "12" : loginUser.getFontSize());
+%>
+
+
+
+
+ 一次性物品自定义批量发货 + |
+ |
+ + | +