Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js
===================================================================
diff -u -r38844 -r38941
--- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 38844)
+++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.js (.../packingView.js) (revision 38941)
@@ -4108,6 +4108,10 @@
}
});
+ //ZSWY-242:查询区域按钮兼容不同分辨率
+
+ var tbarMaxWidth = parseInt($('#mainPackingView').width()*0.42);
+
var waitPackingTbar = [new Ext4.form.field.Checkbox({
boxLabel: '全选',
name: 'dealStatues',
@@ -4168,146 +4172,460 @@
handler: function () {
reflushWaitPackingTreeGrid();
}
- }, "-", {
+ },{
text: '添加报损器械',
hidden: SSTS_QualityRecord_Create,
iconCls: 'btn_ext_application_add',
handler: function () {
var materialGrid = Ext4.getCmp("materialGrid").getSelectionModel().getSelection();
addAndEditRecyclingDamageRecord('', LINKTYPE_PACKINGRECORD, {}, materialGrid, lastSelectTousseName);
}
- }, "-", {
+ },{
text: '添加丢失器械',
- //hidden : SSTS_QualityRecord_Create,
+ width:100,
+ hidden : SSTS_QualityRecord_Create,
iconCls: 'btn_ext_application_add',
handler: function () {
var materialGrid = Ext4.getCmp("materialGrid").getSelectionModel().getSelection();
addAndEditRecyclingLostRecord('', LINKTYPE_PACKINGRECORD_ERROR, {}, materialGrid, lastSelectTousseName, lastSelectTaskId);
}
- }, "-", {
- text: '质量监测',
- hidden: SSTS_QualityRecord_Create,
- iconCls: 'btn_ext_application_add',
- handler: function () {
- materialCountRecords = Ext4.getCmp("materialGrid").getSelectionModel().getSelection();
- otherPartAddQM = true;
- var washRecordIds = getWashRecordIds();
- var records = Ext4.getCmp('waitPackingTreeGrid').getView().getChecked();
- var map = {}, tousseItems = [];
- Ext4.each(records, function (pNode) {
- if (pNode.childNodes.length == 0) {
- var ai = pNode;
- if (!map[ai.get('tousseName')]) {
- tousseItems.push({
- tousseName: ai.parentNode.get('tousseName'),
- tousseID: ai.parentNode.get('tousseID')
- });
- map[ai.get('tousseName')] = ai;
+ }];
+
+ var waitPackingTbarWidth = 440;
+
+ var waitPackingTbar2 = [];
+
+ if(!SSTS_QualityRecord_Create){
+ if(waitPackingTbarWidth + 80 > tbarMaxWidth){
+ waitPackingTbar2.push({
+ text: '质量监测',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ materialCountRecords = Ext4.getCmp("materialGrid").getSelectionModel().getSelection();
+ otherPartAddQM = true;
+ var washRecordIds = getWashRecordIds();
+ var records = Ext4.getCmp('waitPackingTreeGrid').getView().getChecked();
+ var map = {}, tousseItems = [];
+ Ext4.each(records, function (pNode) {
+ if (pNode.childNodes.length == 0) {
+ var ai = pNode;
+ if (!map[ai.get('tousseName')]) {
+ tousseItems.push({
+ tousseName: ai.parentNode.get('tousseName'),
+ tousseID: ai.parentNode.get('tousseID')
+ });
+ map[ai.get('tousseName')] = ai;
+ }
+ }
+ });
+ if (washRecordIds.length > 1) {
+ addQualityMonitoringByResponPart(responsibilityPart, washRecordIds[0], tousseItems);
+ showMultipleResult('所选择的物品关联到了多条清洗记录,清洗信息将自动填写最早的清洗记录!');
+ } else if (washRecordIds.length == 1) {
+ addQualityMonitoringByResponPart(responsibilityPart, washRecordIds[0], tousseItems);
+ } else {
+ addQualityMonitoringByResponPart(responsibilityPart, '', tousseItems);
}
}
- });
- if (washRecordIds.length > 1) {
- addQualityMonitoringByResponPart(responsibilityPart, washRecordIds[0], tousseItems);
- showMultipleResult('所选择的物品关联到了多条清洗记录,清洗信息将自动填写最早的清洗记录!');
- } else if (washRecordIds.length == 1) {
- addQualityMonitoringByResponPart(responsibilityPart, washRecordIds[0], tousseItems);
- } else {
- addQualityMonitoringByResponPart(responsibilityPart, '', tousseItems);
- }
- }
- }, "-", {
- text: '删除',
- hidden: sstsConfig.enableReduceSendAmountAfterTerminatePackAmountFunction ? true : SSTS_PackingTask_Delete,
- iconCls: 'btn_ext_application_del',
- handler: function () {
- var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
- var selNodes = waitPackingTreeGrid.getView().getChecked();
- if (selNodes.length == 0) {
- showMultipleResult('请先选择需要删除的待装配任务');
- return;
- }
- var ids = "";
- var idsArr = [];
- Ext4.each(selNodes, function (pNode) {
- if (pNode.childNodes.length > 0) {
- Ext4.each(pNode.childNodes, function (cNode) {
- var taskId = cNode.get('taskId');
- if(idsArr.indexOf('taskId') == -1){
-
+ })
+ }else {
+ waitPackingTbar.push({
+ text: '质量监测',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ materialCountRecords = Ext4.getCmp("materialGrid").getSelectionModel().getSelection();
+ otherPartAddQM = true;
+ var washRecordIds = getWashRecordIds();
+ var records = Ext4.getCmp('waitPackingTreeGrid').getView().getChecked();
+ var map = {}, tousseItems = [];
+ Ext4.each(records, function (pNode) {
+ if (pNode.childNodes.length == 0) {
+ var ai = pNode;
+ if (!map[ai.get('tousseName')]) {
+ tousseItems.push({
+ tousseName: ai.parentNode.get('tousseName'),
+ tousseID: ai.parentNode.get('tousseID')
+ });
+ map[ai.get('tousseName')] = ai;
+ }
}
- if (ids != "") {
- ids += ";";
- }
- ids += taskId;
});
- } else {
- var taskId = pNode.get('taskId');
- if (ids != "") {
- ids += ";";
+ if (washRecordIds.length > 1) {
+ addQualityMonitoringByResponPart(responsibilityPart, washRecordIds[0], tousseItems);
+ showMultipleResult('所选择的物品关联到了多条清洗记录,清洗信息将自动填写最早的清洗记录!');
+ } else if (washRecordIds.length == 1) {
+ addQualityMonitoringByResponPart(responsibilityPart, washRecordIds[0], tousseItems);
+ } else {
+ addQualityMonitoringByResponPart(responsibilityPart, '', tousseItems);
}
- ids += taskId;
}
- });
- deletePackingTask(ids, null, null, true, null);
+ })
}
- }, {
- text: '终止',
- iconCls: 'btn_ext_pause',
- hidden: !sstsConfig.enableReduceSendAmountAfterTerminatePackAmountFunction,
- handler: function () {
- var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
- var selNodes = waitPackingTreeGrid.getView().getChecked();
- if (selNodes.length == 0) {
- showMultipleResult('请先选择需要终止的待装配任务');
- return;
- }
- var arr = [];
- Ext4.each(selNodes, function (pNode) {
- if (pNode.childNodes.length == 0) {
- var notLossReport = true;
- var damages = pNode.data.damages;
- var errors = pNode.data.errors;
- if(damages.length > 0 || errors.length > 0){
- notLossReport = false;
+ waitPackingTbarWidth += 80;
+ }
+
+ if(sstsConfig.enableReduceSendAmountAfterTerminatePackAmountFunction){
+ if(waitPackingTbarWidth + 55 > tbarMaxWidth){
+ waitPackingTbar2.push({
+ text: '终止',
+ iconCls: 'btn_ext_pause',
+ handler: function () {
+ var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
+ var selNodes = waitPackingTreeGrid.getView().getChecked();
+ if (selNodes.length == 0) {
+ showMultipleResult('请先选择需要终止的待装配任务');
+ return;
}
- arr.push({
- tousseName:pNode.data.tousseName,
- amount:pNode.data.amount,
- basketName:pNode.data.basketName,
- department:pNode.data.department,
- packingTaskId:pNode.data.taskId,
- notLossReport:notLossReport
- })
+ var arr = [];
+ Ext4.each(selNodes, function (pNode) {
+ if (pNode.childNodes.length == 0) {
+ var notLossReport = true;
+ var damages = pNode.data.damages;
+ var errors = pNode.data.errors;
+ if(damages.length > 0 || errors.length > 0){
+ notLossReport = false;
+ }
+ arr.push({
+ tousseName:pNode.data.tousseName,
+ amount:pNode.data.amount,
+ basketName:pNode.data.basketName,
+ department:pNode.data.department,
+ packingTaskId:pNode.data.taskId,
+ notLossReport:notLossReport
+ })
+ }
+ });
+ deleteTaskRecord(arr);
}
- });
- deleteTaskRecord(arr);
+ })
+ }else {
+ waitPackingTbar.push({
+ text: '终止',
+ iconCls: 'btn_ext_pause',
+ handler: function () {
+ var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
+ var selNodes = waitPackingTreeGrid.getView().getChecked();
+ if (selNodes.length == 0) {
+ showMultipleResult('请先选择需要终止的待装配任务');
+ return;
+ }
+ var arr = [];
+ Ext4.each(selNodes, function (pNode) {
+ if (pNode.childNodes.length == 0) {
+ var notLossReport = true;
+ var damages = pNode.data.damages;
+ var errors = pNode.data.errors;
+ if(damages.length > 0 || errors.length > 0){
+ notLossReport = false;
+ }
+ arr.push({
+ tousseName:pNode.data.tousseName,
+ amount:pNode.data.amount,
+ basketName:pNode.data.basketName,
+ department:pNode.data.department,
+ packingTaskId:pNode.data.taskId,
+ notLossReport:notLossReport
+ })
+ }
+ });
+ deleteTaskRecord(arr);
+ }
+ })
}
- }, "-", {
- xtype: 'triggerfield',
- id: 'tousseOrDepart',
- emptyText: '搜索物品或科室',
- triggerCls: 'x-form-clear-trigger',
- trigger2Cls: 'x-form-search-trigger',
+
+ waitPackingTbarWidth += 55;
+ }else {
+ if(!SSTS_PackingTask_Delete){
+ if(waitPackingTbarWidth + 55 > tbarMaxWidth){
+ waitPackingTbar2.push({
+ text: '删除',
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
+ var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
+ var selNodes = waitPackingTreeGrid.getView().getChecked();
+ if (selNodes.length == 0) {
+ showMultipleResult('请先选择需要删除的待装配任务');
+ return;
+ }
+ var ids = "";
+ var idsArr = [];
+ Ext4.each(selNodes, function (pNode) {
+ if (pNode.childNodes.length > 0) {
+ Ext4.each(pNode.childNodes, function (cNode) {
+ var taskId = cNode.get('taskId');
+ if(idsArr.indexOf('taskId') == -1){
+
+ }
+ if (ids != "") {
+ ids += ";";
+ }
+ ids += taskId;
+ });
+ } else {
+ var taskId = pNode.get('taskId');
+ if (ids != "") {
+ ids += ";";
+ }
+ ids += taskId;
+ }
+ });
+ deletePackingTask(ids, null, null, true, null);
+ }
+ })
+ }else {
+ waitPackingTbar.push({
+ text: '删除',
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
+ var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
+ var selNodes = waitPackingTreeGrid.getView().getChecked();
+ if (selNodes.length == 0) {
+ showMultipleResult('请先选择需要删除的待装配任务');
+ return;
+ }
+ var ids = "";
+ var idsArr = [];
+ Ext4.each(selNodes, function (pNode) {
+ if (pNode.childNodes.length > 0) {
+ Ext4.each(pNode.childNodes, function (cNode) {
+ var taskId = cNode.get('taskId');
+ if(idsArr.indexOf('taskId') == -1){
+
+ }
+ if (ids != "") {
+ ids += ";";
+ }
+ ids += taskId;
+ });
+ } else {
+ var taskId = pNode.get('taskId');
+ if (ids != "") {
+ ids += ";";
+ }
+ ids += taskId;
+ }
+ });
+ deletePackingTask(ids, null, null, true, null);
+ }
+ })
+ }
+
+ waitPackingTbarWidth += 55;
+ }
+ }
+
+ if(waitPackingTbarWidth + 160 > tbarMaxWidth){
+ waitPackingTbar2.push({
+ xtype: 'triggerfield',
+ id: 'tousseOrDepart',
+ emptyText: '搜索物品或科室',
+ triggerCls: 'x-form-clear-trigger',
+ trigger2Cls: 'x-form-search-trigger',
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e) {
+ if (e.getKey() == 13) {
+ Ext4.getCmp('pageNow').setValue(1);
+ waitPackingTaskStore.load();
+ }
+ });
+ }
+ },
+ onTriggerClick: function () {
+ Ext4.getCmp('tousseOrDepart').setValue('');
+ Ext4.getCmp('pageNow').setValue(1);
+ waitPackingTaskStore.load();
+ },
+ onTrigger2Click: function () {
+ Ext4.getCmp('pageNow').setValue(1);
+ waitPackingTaskStore.load();
+ }
+ })
+ }else {
+ waitPackingTbar.push({
+ xtype: 'triggerfield',
+ id: 'tousseOrDepart',
+ emptyText: '搜索物品或科室',
+ triggerCls: 'x-form-clear-trigger',
+ trigger2Cls: 'x-form-search-trigger',
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e) {
+ if (e.getKey() == 13) {
+ Ext4.getCmp('pageNow').setValue(1);
+ waitPackingTaskStore.load();
+ }
+ });
+ }
+ },
+ onTriggerClick: function () {
+ Ext4.getCmp('tousseOrDepart').setValue('');
+ Ext4.getCmp('pageNow').setValue(1);
+ waitPackingTaskStore.load();
+ },
+ onTrigger2Click: function () {
+ Ext4.getCmp('pageNow').setValue(1);
+ waitPackingTaskStore.load();
+ }
+ })
+ }
+
+ var basketPackingTbar = [{
+ text: "扫描篮筐条码:"
+ }, {
+ xtype: 'textfield',
+ id: 'basketBarcodeInput',
+ name: 'basketBarcodeInput',
+ // hidden:true,
+ width: 130,
listeners: {
render: function (c) {
c.getEl().on('keypress', function (e) {
if (e.getKey() == 13) {
- Ext4.getCmp('pageNow').setValue(1);
- waitPackingTaskStore.load();
+ if (processActionBarcode(Ext4.getCmp('basketBarcodeInput'))) {
+ return;
+ }
+ var basketBarcode = Ext4.getCmp('basketBarcodeInput').getValue();
+ if (basketBarcode == '') {
+ showMultipleResult('篮筐条码为空', null, sstsConfig.messagePauseTimeOnPackingPage);
+ return;
+ }
+ scanBasketBarcodes(basketBarcode, 1);
}
});
}
+ }
+ }, '-', {
+ text: ' '
+ }, new Ext4.form.field.Checkbox({
+ boxLabel: '全选',
+ name: 'dealStatues',
+ id: 'checkAllTaskNode',
+ inputValue: '0',
+ checked: false,
+ listeners: {
+ afterrender: function (obj) {
+ obj.getEl().dom.onclick = function () {
+ var checked = Ext4.getCmp('checkAllTaskNode').getValue();
+ checkedAllNode(checked);
+ var rootNode = Ext4.getCmp('basketTreeGrid').getRootNode();
+ if(rootNode.childNodes.length > 0 && checked){
+ itemClickFunction(rootNode.childNodes[0], 'basketTreeGrid', 0);
+ setTimeout(function () {
+ updatePackageType('basketTreeGrid');
+ if (sstsConfig.enablePackingMaterialsCheckFunction) {
+ getPackingMaterialsForCheckFun(rootNode.childNodes[0]);
+ }
+ }, 200);
+ if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && sstsConfig.foreignTousseAddWeight){
+ if(rootNode.childNodes[0].data.tousseType == '外来器械包'){
+ Ext4.getCmp('weight').show();
+ if(rootNode.childNodes.length == 1 && rootNode.childNodes[0].childNodes.length == 1){
+ Ext4.getCmp('weight').enable();
+ Ext4.getCmp('weight').setValue(rootNode.childNodes[0].childNodes[0].data.weight || '');
+ }else {
+ Ext4.getCmp('weight').disable();
+ Ext4.getCmp('weight').setValue('');
+ }
+ }else {
+ Ext4.getCmp('weight').hide();
+ }
+ }
+ }
+ showOrHidePrintBtn();
+ resetScanIDCardBarcodeVisibility();
+ var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
+ var selNodes = waitPackingTreeGrid.getView().getChecked();
+ Ext4.each(selNodes, function (pNode) {
+ pNode.set('checked', false);
+ Ext4.each(pNode.childNodes, function (node) {
+ node.set('checked', false);
+ })
+ });
+ };
+ }
+ }
+ }), "-", {
+ text: '一键展开',
+ id:'basketTreeExpandAll',
+ handler: function () {
+ var basketTreeGrid = Ext4.getCmp('basketTreeGrid');
+ basketTreeGrid.expandAll();
+ Ext4.getCmp('basketTreeExpandAll').hide();
+ Ext4.getCmp('basketTreeCollapseAll').show();
+ }
+ }, {
+ text: '一键折叠',
+ id:'basketTreeCollapseAll',
+ hidden:true,
+ handler: function () {
+ var basketTreeGrid = Ext4.getCmp('basketTreeGrid');
+ basketTreeGrid.collapseAll();
+ Ext4.getCmp('basketTreeExpandAll').show();
+ Ext4.getCmp('basketTreeCollapseAll').hide();
+ }
+ }, "-", {
+ text: '清除已选',
+ handler: function () {
+ var basketTreeGrid = Ext4.getCmp('basketTreeGrid');
+ var selNodes = basketTreeGrid.getView().getChecked();
+ Ext4.each(selNodes, function (pNode) {
+ pNode.set('checked', false);
+ Ext4.each(pNode.childNodes, function (node) {
+ node.set('checked', false);
+ })
+ });
+ Ext4.getCmp('checkAllTaskNode').setValue(false);
+ }
+ }]
+
+ var basketPackingTbarWidth = 420;
+
+ var basketPackingTbar2 = [];
+
+ if(basketPackingTbarWidth + 252 > tbarMaxWidth){
+ basketPackingTbar2.push({
+ text: '打印分组类型:'
},
- onTriggerClick: function () {
- Ext4.getCmp('tousseOrDepart').setValue('');
- Ext4.getCmp('pageNow').setValue(1);
- waitPackingTaskStore.load();
+ {
+ xtype: 'combo',
+ id: 'printGroupType',
+ name: 'printGroupType',
+ editable: false,
+ valueField: 'value',
+ displayField: 'value',
+ store: new Ext4.data.ArrayStore({
+ fields: ['value'],
+ data: [['默认'], ['按科室分组'], ['科室包名']]
+ }),
+ value: taskGroupObj.printGroupType,
+ forceSelection: true,
+ mode: 'local',
+ triggerAction: 'all',
+ anchor: '100%'
+ })
+ }else {
+ basketPackingTbar.push({
+ text: '打印分组类型:'
},
- onTrigger2Click: function () {
- Ext4.getCmp('pageNow').setValue(1);
- waitPackingTaskStore.load();
- }
- }];
+ {
+ xtype: 'combo',
+ id: 'printGroupType',
+ name: 'printGroupType',
+ editable: false,
+ valueField: 'value',
+ displayField: 'value',
+ store: new Ext4.data.ArrayStore({
+ fields: ['value'],
+ data: [['默认'], ['按科室分组'], ['科室包名']]
+ }),
+ value: taskGroupObj.printGroupType,
+ forceSelection: true,
+ mode: 'local',
+ triggerAction: 'all',
+ anchor: '100%'
+ })
+ }
var basketStore = new Ext4.data.TreeStore({
model: cModel,
@@ -4337,11 +4655,15 @@
beforeload: function (store, operation) {
var pageNow = Ext4.getCmp('pageNow').getValue();
var waitPackingPageSize = Ext4.getCmp('waitPackingPageSize').getValue();
+ var tousseOrDepart = '';
+ if(Ext4.getCmp('tousseOrDepart')){
+ tousseOrDepart = Ext4.getCmp('tousseOrDepart').getValue();
+ }
var params = {//参数
taskGroup: taskGroup,
node: 'root',
pageIndex: pageNow,
- tousseOrDepart: Ext4.getCmp('tousseOrDepart').getValue(),
+ tousseOrDepart: tousseOrDepart,
pageSize: waitPackingPageSize
};
Ext4.apply(store.proxy.extraParams, params);
@@ -4382,7 +4704,10 @@
}
var pageNow = Ext4.getCmp('pageNow').getValue();
var waitPackingPageSize = Ext4.getCmp('waitPackingPageSize').getValue();
- var tousseOrDepart = Ext4.getCmp('tousseOrDepart').getValue();
+ var tousseOrDepart = '';
+ if(Ext4.getCmp('tousseOrDepart')){
+ tousseOrDepart = Ext4.getCmp('tousseOrDepart').getValue();
+ }
Ext4.Ajax.request({
url: WWWROOT + '/disinfectSystem/packingAction!loadWaitPackingTaskPageJson.do',
params: { taskGroup: taskGroup, pageSize: waitPackingPageSize, tousseOrDepart: tousseOrDepart },
@@ -7493,6 +7818,147 @@
}
}
+ var basketPackingDockedItems = [{
+ xtype: 'toolbar',
+ dock: 'bottom',
+ padding: '0 0 0 0',
+ border: false,
+ id: 'dockedItems',
+ items: [{
+ id: 'addErrorMaterial',
+ text: "补充丢失器械",
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ additionalMaterial(type_lost, "");
+ }
+ }, {
+ id: 'addDamageMaterial',
+ text: '补充报损器械',
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
+ additionalMaterial(type_damage, "");
+ }
+ }, {
+ id: 'packingComboTousseBtn',
+ text: '装配聚合包',
+ iconCls: 'btn_ext_application_todo',
+ hidden: !(sstsConfig.enableComboTousse),
+ handler: function () {
+ packingComboTousse();
+ }
+ }, {
+ text: '打印回收清单',
+ hidden: SSTS_RecyclingDetail_Print,
+ iconCls: 'icon_print',
+ handler: function () {
+ recyclingDetailWindow();
+ }
+ }, {
+ text: '打印材料清单',
+ hidden: !(sstsConfig.showPrintBOMButton),
+ iconCls: 'icon_print',
+ handler: function () {
+ var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
+ var selNodes = waitPackingTreeGrid.getView().getChecked();
+ if (selNodes.length == 0) {
+ showMultipleResult('请选择需要打印的包');
+ return;
+ }
+ var ids = [];
+ Ext4.each(selNodes, function (pNode) {
+ Ext4.each(pNode.childNodes, function (cNode) {
+ var tousseID = cNode.get('tousseID');
+ ids.push(tousseID);
+ });
+ });
+ printTousseDefinitionMaterial(ids.join(';'), false, null, 1, 'packingView');
+ }
+ }, {
+ text: '加急',
+ hidden: !sstsConfig.enableSetUrgentOfPackin,
+ iconCls: 'btn_ext_application_edit',
+ handler: function () {
+ var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
+ var selNodes = waitPackingTreeGrid.getView().getChecked();
+ var arr = [];
+ Ext4.each(selNodes, function (pNode) {
+ if (pNode.childNodes.length == 0) {
+ var notLossReport = true;
+ var damages = pNode.data.damages;
+ var errors = pNode.data.errors;
+ if(damages.length > 0 || errors.length > 0){
+ notLossReport = false;
+ }
+ arr.push(pNode.data)
+ }
+ });
+ if (arr.length == 0) {
+ showMultipleResult('请选择需要加急的待装配物品。');
+ return;
+ }
+ if (arr.length > 1) {
+ showMultipleResult('不支持多选操作,请修改后再操作。');
+ return;
+ }
+ updateUrgentLevelOfPackingTask(arr[0]);
+ }
+ }
+ ]
+ }, {
+ xtype: 'toolbar',
+ dock: 'bottom',
+ padding: '0 0 0 0',
+ border: false,
+ id: 'dockedItemsHidden',
+ hidden: !sstsConfig.tousseSizeColor,
+ items: [
+ {
+ id: 'superBigTousse',
+ xtype: 'button',
+ text: '超大包',
+ hidden: !sstsConfig.tousseSizeColor
+ }, {
+ id: 'bigTousse',
+ xtype: 'button',
+ text: '大包',
+ hidden: !sstsConfig.tousseSizeColor
+ }, {
+ id: 'middleTousse',
+ xtype: 'button',
+ text: '中包',
+ hidden: !sstsConfig.tousseSizeColor
+ }, {
+ id: 'smallTousse',
+ xtype: 'button',
+ text: '小包',
+ hidden: !sstsConfig.tousseSizeColor
+ }
+ ]
+ },{
+ xtype: 'toolbar',
+ dock: 'top',
+ padding: '0 0 0 0',
+ border: false,
+ items:basketPackingTbar
+ }]
+
+ if(basketPackingTbar2.length){
+ basketPackingDockedItems.push({
+ xtype: 'toolbar',
+ dock: 'top',
+ padding: '0 0 0 0',
+ border: false,
+ items:basketPackingTbar2
+ })
+ }
+
+ var waitPackingTbarTool = new Ext4.Toolbar({items: waitPackingTbar});
+ var waitPackingDockedItems = [waitPackingTbarTool];
+ if(waitPackingTbar2.length > 0){
+ var waitPackingTbarTool2 = new Ext4.Toolbar({items: waitPackingTbar2});
+ waitPackingDockedItems = [waitPackingTbarTool,waitPackingTbarTool2];
+ }
+
basketColumnTreeGrid = Ext4.create('columnTreeGrid', {
id: 'basketTreeGrid',
height: (document.body.clientHeight - 30) / 2,
@@ -7581,254 +8047,10 @@
},
itemcontextmenu: taskItemMenu
},
- tbar: [{
- text: "扫描篮筐条码:"
- }, {
- xtype: 'textfield',
- id: 'basketBarcodeInput',
- name: 'basketBarcodeInput',
- // hidden:true,
- width: 130,
- listeners: {
- render: function (c) {
- c.getEl().on('keypress', function (e) {
- if (e.getKey() == 13) {
- if (processActionBarcode(Ext4.getCmp('basketBarcodeInput'))) {
- return;
- }
- var basketBarcode = Ext4.getCmp('basketBarcodeInput').getValue();
- if (basketBarcode == '') {
- showMultipleResult('篮筐条码为空', null, sstsConfig.messagePauseTimeOnPackingPage);
- return;
- }
- scanBasketBarcodes(basketBarcode, 1);
- }
- });
- }
- }
- }, '-', {
- text: ' '
- }, new Ext4.form.field.Checkbox({
- boxLabel: '全选',
- name: 'dealStatues',
- id: 'checkAllTaskNode',
- inputValue: '0',
- checked: false,
- listeners: {
- afterrender: function (obj) {
- obj.getEl().dom.onclick = function () {
- var checked = Ext4.getCmp('checkAllTaskNode').getValue();
- checkedAllNode(checked);
- var rootNode = Ext4.getCmp('basketTreeGrid').getRootNode();
- if(rootNode.childNodes.length > 0 && checked){
- itemClickFunction(rootNode.childNodes[0], 'basketTreeGrid', 0);
- setTimeout(function () {
- updatePackageType('basketTreeGrid');
- if (sstsConfig.enablePackingMaterialsCheckFunction) {
- getPackingMaterialsForCheckFun(rootNode.childNodes[0]);
- }
- }, 200);
- if(sstsConfig.enableModifyWeightOfForeignTousseAfterApply && sstsConfig.foreignTousseAddWeight){
- if(rootNode.childNodes[0].data.tousseType == '外来器械包'){
- Ext4.getCmp('weight').show();
- if(rootNode.childNodes.length == 1 && rootNode.childNodes[0].childNodes.length == 1){
- Ext4.getCmp('weight').enable();
- Ext4.getCmp('weight').setValue(rootNode.childNodes[0].childNodes[0].data.weight || '');
- }else {
- Ext4.getCmp('weight').disable();
- Ext4.getCmp('weight').setValue('');
- }
- }else {
- Ext4.getCmp('weight').hide();
- }
- }
- }
- showOrHidePrintBtn();
- resetScanIDCardBarcodeVisibility();
- var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
- var selNodes = waitPackingTreeGrid.getView().getChecked();
- Ext4.each(selNodes, function (pNode) {
- pNode.set('checked', false);
- Ext4.each(pNode.childNodes, function (node) {
- node.set('checked', false);
- })
- });
- };
- }
- }
- }), "-", {
- text: '一键展开',
- id:'basketTreeExpandAll',
- handler: function () {
- var basketTreeGrid = Ext4.getCmp('basketTreeGrid');
- basketTreeGrid.expandAll();
- Ext4.getCmp('basketTreeExpandAll').hide();
- Ext4.getCmp('basketTreeCollapseAll').show();
- }
- }, {
- text: '一键折叠',
- id:'basketTreeCollapseAll',
- hidden:true,
- handler: function () {
- var basketTreeGrid = Ext4.getCmp('basketTreeGrid');
- basketTreeGrid.collapseAll();
- Ext4.getCmp('basketTreeExpandAll').show();
- Ext4.getCmp('basketTreeCollapseAll').hide();
- }
- }, "-", {
- text: '清除已选',
- handler: function () {
- var basketTreeGrid = Ext4.getCmp('basketTreeGrid');
- var selNodes = basketTreeGrid.getView().getChecked();
- Ext4.each(selNodes, function (pNode) {
- pNode.set('checked', false);
- Ext4.each(pNode.childNodes, function (node) {
- node.set('checked', false);
- })
- });
- Ext4.getCmp('checkAllTaskNode').setValue(false);
- }
- }, '-',
- {
- text: '打印分组类型:'
- },
- {
- xtype: 'combo',
- id: 'printGroupType',
- name: 'printGroupType',
- editable: false,
- valueField: 'value',
- displayField: 'value',
- store: new Ext4.data.ArrayStore({
- fields: ['value'],
- data: [['默认'], ['按科室分组'], ['科室包名']]
- }),
- value: taskGroupObj.printGroupType,
- forceSelection: true,
- mode: 'local',
- triggerAction: 'all',
- anchor: '100%'
- }],
- dockedItems: [{
- xtype: 'toolbar',
- dock: 'bottom',
- padding: '0 0 0 0',
- border: false,
- id: 'dockedItems',
- items: [{
- id: 'addErrorMaterial',
- text: "补充丢失器械",
- iconCls: 'btn_ext_application_add',
- handler: function () {
- additionalMaterial(type_lost, "");
- }
- }, {
- id: 'addDamageMaterial',
- text: '补充报损器械',
- iconCls: 'btn_ext_application_add',
- handler: function () {
- additionalMaterial(type_damage, "");
- }
- }, {
- id: 'packingComboTousseBtn',
- text: '装配聚合包',
- iconCls: 'btn_ext_application_todo',
- hidden: !(sstsConfig.enableComboTousse),
- handler: function () {
- packingComboTousse();
- }
- }, {
- text: '打印回收清单',
- hidden: SSTS_RecyclingDetail_Print,
- iconCls: 'icon_print',
- handler: function () {
- recyclingDetailWindow();
- }
- }, {
- text: '打印材料清单',
- hidden: !(sstsConfig.showPrintBOMButton),
- iconCls: 'icon_print',
- handler: function () {
- var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
- var selNodes = waitPackingTreeGrid.getView().getChecked();
- if (selNodes.length == 0) {
- showMultipleResult('请选择需要打印的包');
- return;
- }
- var ids = [];
- Ext4.each(selNodes, function (pNode) {
- Ext4.each(pNode.childNodes, function (cNode) {
- var tousseID = cNode.get('tousseID');
- ids.push(tousseID);
- });
- });
- printTousseDefinitionMaterial(ids.join(';'), false, null, 1, 'packingView');
- }
- }, {
- text: '加急',
- hidden: !sstsConfig.enableSetUrgentOfPackin,
- iconCls: 'btn_ext_application_edit',
- handler: function () {
- var waitPackingTreeGrid = Ext4.getCmp('waitPackingTreeGrid');
- var selNodes = waitPackingTreeGrid.getView().getChecked();
- var arr = [];
- Ext4.each(selNodes, function (pNode) {
- if (pNode.childNodes.length == 0) {
- var notLossReport = true;
- var damages = pNode.data.damages;
- var errors = pNode.data.errors;
- if(damages.length > 0 || errors.length > 0){
- notLossReport = false;
- }
- arr.push(pNode.data)
- }
- });
- if (arr.length == 0) {
- showMultipleResult('请选择需要加急的待装配物品。');
- return;
- }
- if (arr.length > 1) {
- showMultipleResult('不支持多选操作,请修改后再操作。');
- return;
- }
- updateUrgentLevelOfPackingTask(arr[0]);
- }
- }
- ]
- }, {
- xtype: 'toolbar',
- dock: 'bottom',
- padding: '0 0 0 0',
- border: false,
- id: 'dockedItemsHidden',
- hidden: !sstsConfig.tousseSizeColor,
- items: [
- {
- id: 'superBigTousse',
- xtype: 'button',
- text: '超大包',
- hidden: !sstsConfig.tousseSizeColor
- }, {
- id: 'bigTousse',
- xtype: 'button',
- text: '大包',
- hidden: !sstsConfig.tousseSizeColor
- }, {
- id: 'middleTousse',
- xtype: 'button',
- text: '中包',
- hidden: !sstsConfig.tousseSizeColor
- }, {
- id: 'smallTousse',
- xtype: 'button',
- text: '小包',
- hidden: !sstsConfig.tousseSizeColor
- }
- ]
- }
- ]
+ dockedItems: basketPackingDockedItems
});
+
var waitPackColumnTreeGrid = Ext4.create('columnTreeGrid', {
id: 'waitPackingTreeGrid',
border: false,
@@ -7903,7 +8125,7 @@
itemcontextmenu: taskItemMenu
},
store: waitPackingTaskStore,
- tbar: waitPackingTbar,
+ dockedItems: waitPackingDockedItems,
bbar: [{
xtype: 'button',
text: '',