Index: ssts-web/src/main/webapp/ext-4.2.3/resources/ext-theme-green/green-theme-sandbox-all-fontSize15.css =================================================================== diff -u -r30577 -r39353 --- ssts-web/src/main/webapp/ext-4.2.3/resources/ext-theme-green/green-theme-sandbox-all-fontSize15.css (.../green-theme-sandbox-all-fontSize15.css) (revision 30577) +++ ssts-web/src/main/webapp/ext-4.2.3/resources/ext-theme-green/green-theme-sandbox-all-fontSize15.css (.../green-theme-sandbox-all-fontSize15.css) (revision 39353) @@ -501,7 +501,7 @@ padding-left: 20px; white-space: nowrap; color: #000; - font: normal 15px 宋体; + font: normal 15px 楷体; border: 1px solid; border-color: #ddd #bbb #bbb #ddd; background-color: #fff @@ -1473,7 +1473,7 @@ .x4-body { color: black; font-size: 15px; - font-family: 宋体 + font-family: 楷体 } .x4-animating-size, .x4-collapsed { @@ -1540,7 +1540,7 @@ border-color: #b7d0bb; background-color: #eee; color: #222; - font: normal 15px 宋体 + font: normal 15px 楷体 } .x4-mask-msg-text { @@ -1583,7 +1583,7 @@ color: white; font-weight: bold; font-size: 15px; - font-family: 宋体; + font-family: 楷体; text-align: center; line-height: 18px } @@ -1733,7 +1733,7 @@ .x4-btn-default-small .x4-btn-inner { font-size: 15px; font-weight: normal; - font-family: 宋体; + font-family: 楷体; color: #333; padding: 0 4px } @@ -2196,7 +2196,7 @@ .x4-btn-default-medium .x4-btn-inner { font-size: 15px; font-weight: normal; - font-family: 宋体; + font-family: 楷体; color: #333; padding: 0 3px } @@ -2661,7 +2661,7 @@ .x4-btn-default-large .x4-btn-inner { font-size: 15px; font-weight: normal; - font-family: 宋体; + font-family: 楷体; color: #333; padding: 0 3px } @@ -3099,7 +3099,7 @@ .x4-btn-default-toolbar-small .x4-btn-inner { font-size: 15px; font-weight: normal; - font-family: 宋体; + font-family: 楷体; color: #333; padding: 0 4px } @@ -3552,7 +3552,7 @@ .x4-btn-default-toolbar-medium .x4-btn-inner { font-size: 15px; font-weight: normal; - font-family: 宋体; + font-family: 楷体; color: #333; padding: 0 3px } @@ -4007,7 +4007,7 @@ .x4-btn-default-toolbar-large .x4-btn-inner { font-size: 15px; font-weight: normal; - font-family: 宋体; + font-family: 楷体; color: #333; padding: 0 3px } @@ -4410,7 +4410,7 @@ margin: 0 6px 0 4px; color: #4c4c4c; line-height: 16px; - font-family: 宋体; + font-family: 楷体; font-size: 15px; font-weight: normal } @@ -4580,7 +4580,7 @@ color: #158623; font-size: 15px; font-weight: bold; - font-family: 宋体; + font-family: 楷体; line-height: 15px; padding: 0 2px 1px; text-transform: none @@ -4592,7 +4592,7 @@ color: black; font-size: 15px; font-weight: normal; - font-family: 宋体; + font-family: 楷体; border-width: 1px; border-style: solid } @@ -4818,7 +4818,7 @@ color: #158623; font-size: 15px; font-weight: bold; - font-family: 宋体; + font-family: 楷体; line-height: 15px; padding: 0 2px 1px; text-transform: none @@ -4830,7 +4830,7 @@ color: black; font-size: 15px; font-weight: normal; - font-family: 宋体; + font-family: 楷体; border-width: 0; border-style: solid } @@ -6699,7 +6699,7 @@ } .x4-btn-group-header-text-container-default { - font: normal 15px 宋体; + font: normal 15px 楷体; line-height: 15px; color: #5b9965 } @@ -6973,7 +6973,7 @@ } .x4-btn-group-header-text-container-default-framed { - font: normal 15px 宋体; + font: normal 15px 楷体; line-height: 15px; color: #5b9965 } @@ -7122,7 +7122,7 @@ color: black; font-size: 15px; font-weight: normal; - font-family: 宋体 + font-family: 楷体 } .x4-window-header-default { @@ -7157,7 +7157,7 @@ color: #15861e; font-weight: bold; line-height: 15px; - font-family: 宋体; + font-family: 楷体; font-size: 15px; padding: 0 2px 1px; text-transform: none @@ -8233,7 +8233,7 @@ .x4-form-invalid-under { padding: 2px 2px 2px 20px; color: #c0272b; - font: normal 15px 宋体; + font: normal 15px 楷体; line-height: 16px; background: no-repeat 0 2px; background-image: url(images/form/exclamation.gif) @@ -8253,12 +8253,12 @@ .x4-form-item-label { color: black; - font: normal 15px/15px 宋体; + font: normal 15px/15px 楷体; margin-top: 4px } .x4-toolbar-item .x4-form-item-label { - font: normal 15px/15px 宋体; + font: normal 15px/15px 楷体; margin-top: 3px } @@ -8280,7 +8280,7 @@ } .x4-form-item, .x4-form-field { - font: normal 15px 宋体 + font: normal 15px 楷体 } .x4-form-type-text textarea.x4-form-invalid-field, .x4-form-type-text input.x4-form-invalid-field, @@ -8362,14 +8362,14 @@ } .x4-form-display-field { - font: normal 15px/15px 宋体; + font: normal 15px/15px 楷体; color: black; margin-top: 4px } .x4-toolbar-item .x4-form-display-field { margin-top: 3px; - font: normal 15px/15px 宋体 + font: normal 15px/15px 楷体 } .x4-message-box .x4-window-body { @@ -8435,11 +8435,11 @@ .x4-form-cb-label { margin-top: 4px; - font: normal 15px/15px 宋体 + font: normal 15px/15px 楷体 } .x4-toolbar-item .x4-form-cb-label { - font: normal 15px/15px 宋体; + font: normal 15px/15px 楷体; margin-top: 3px } @@ -8528,7 +8528,7 @@ } .x4-fieldset-header-text { - font: normal 15px/15px 宋体; + font: normal 15px/15px 楷体; color: #29823a; padding: 1px 0 } @@ -8804,7 +8804,7 @@ .x4-boundlist-item { padding: 0 3px; - font: normal 15px 宋体; + font: normal 15px 楷体; line-height: 20px; cursor: pointer; cursor: hand; @@ -8903,7 +8903,7 @@ .x4-datepicker-column-header { width: 25px; color: #366540; - font: normal 10px 宋体; + font: normal 10px 楷体; text-align: right; border-width: 0 0 1px; border-style: solid; @@ -8933,7 +8933,7 @@ .x4-datepicker-date { padding: 0 4px 0 0; - font: normal 15px 宋体; + font: normal 15px 楷体; color: black; cursor: pointer; line-height: 18px @@ -9025,7 +9025,7 @@ .x4-monthpicker-item { margin: 5px 0 4px; - font: normal 15px 宋体; + font: normal 15px 楷体; text-align: center } @@ -9271,7 +9271,7 @@ } .x4-html-editor-wrap textarea { - font: normal 15px 宋体; + font: normal 15px 楷体; background-color: white; resize: none } @@ -9287,12 +9287,12 @@ padding: 10px; color: gray; background-color: white; - font: normal 15px 宋体 + font: normal 15px 楷体 } .x4-grid-cell { color: "none"; - font: normal 15px/15px 宋体; + font: normal 15px/15px 楷体; background-color: white; border-color: #ededed #d6d6d6 #ededed #d6d6d6; border-style: solid @@ -9547,7 +9547,7 @@ .x4-column-header { border-right: 1px solid #c5c5c5; color: black; - font: normal 15px/15px 宋体; + font: normal 15px/15px 楷体; background-image: none; background-color: #c5c5c5; background-image: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(0%, #f9f9f9), @@ -9717,7 +9717,7 @@ .x4-grid-group-title { color: #52905b; - font: bold 15px/15px 宋体 + font: bold 15px/15px 楷体 } .x4-grid-group-hd-collapsed .x4-grid-group-title { @@ -9742,7 +9742,7 @@ } .x4-grid-rowbody { - font: normal 15px/15px 宋体; + font: normal 15px/15px 楷体; padding: 5px 6px 5px 6px } @@ -9765,7 +9765,7 @@ border-color: #ededed #d6d6d6 #ededed #d6d6d6; background-color: transparent !important; border-top-width: 0; - font: normal 15px/15px 宋体 + font: normal 15px/15px 楷体 } .x4-docked-summary-bottom .x4-grid-row-summary .x4-grid-cell { @@ -9804,7 +9804,7 @@ } .x4-grid-editor .x4-form-text { - font: normal 15px/16px 宋体; + font: normal 15px/16px 楷体; padding: 1px 5px 2px 5px; height: 21px } @@ -9840,7 +9840,7 @@ } .x4-grid-editor .x4-form-display-field { - font: normal 15px/16px 宋体; + font: normal 15px/16px 楷体; padding: 2px 6px 3px 6px; text-overflow: ellipsis } @@ -10202,7 +10202,7 @@ .x4-accordion-hd .x4-panel-header-text-container { color: black; font-weight: normal; - font-family: 宋体; + font-family: 楷体; text-transform: none } @@ -10416,7 +10416,7 @@ } .x4-menu-item-text { - font: normal 15px 宋体; + font: normal 15px 楷体; line-height: 21px; padding-top: 1px; color: #222; @@ -11565,7 +11565,7 @@ .x4-tab-default .x4-tab-inner { font-size: 15px; font-weight: bold; - font-family: 宋体; + font-family: 楷体; color: #5e9164; line-height: 13px } @@ -12815,4 +12815,15 @@ } .x-tab-strip span.x-tab-strip-text { font-size: 15px; +} +#foreignTousseUsedAgainWin { + z-index: 7800 !important; +} +#foreignAgainForm .x4-panel-body-default{ + background:none; + border-width: 0px; +} +#foreignAgainTreeGridForm .x4-panel-body-default{ + background:white; + border-width: 0px; } \ No newline at end of file Index: ssts-web/src/main/webapp/ext-4.2.3/resources/ext-theme-green/green-theme-sandbox-all-fontSize12.css =================================================================== diff -u -r27922 -r39353 --- ssts-web/src/main/webapp/ext-4.2.3/resources/ext-theme-green/green-theme-sandbox-all-fontSize12.css (.../green-theme-sandbox-all-fontSize12.css) (revision 27922) +++ ssts-web/src/main/webapp/ext-4.2.3/resources/ext-theme-green/green-theme-sandbox-all-fontSize12.css (.../green-theme-sandbox-all-fontSize12.css) (revision 39353) @@ -12812,4 +12812,15 @@ #foreignTousseTreeGridForm .x4-panel-body-default{ background:white; border-width: 0px; +} +#foreignTousseUsedAgainWin { + z-index: 7800 !important; +} +#foreignAgainForm .x4-panel-body-default{ + background:none; + border-width: 0px; +} +#foreignAgainTreeGridForm .x4-panel-body-default{ + background:white; + border-width: 0px; } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js =================================================================== diff -u -r39352 -r39353 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 39352) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 39353) @@ -398,6 +398,15 @@ { header: "外来器械包条码", width: 150, dataIndex: 'barcodes', hidden: !sstsConfig.showForeignTousseApplicationBarcode, sortable: false }, { header: "供应商", width: 150, dataIndex: 'supplierName' }, { header: surgeryName, width: 150, dataIndex: 'surgery' }, + { + header: '是否翻包申请', width: 120, dataIndex: 'isUsedAgain', align: 'center', renderer: function (v) { + if (v == '是') { + return v; + } else { + return ''; + } + } + }, { header: "包状态", width: 100, dataIndex: 'packageStatus', renderer: renderPackageStatusColor }, { header: "审核状态", width: 70, dataIndex: 'reviewStatus', renderer: renderReviewStatusColor, hidden: !sstsConfig.enableReviewOfForeignTousseApplicationFunction }, { header: recyclingStatusName, width: 70, dataIndex: 'recyclingStatus', renderer: renderRecyclingStatusColor }, @@ -450,6 +459,7 @@ { name: 'packageStatus' }, { name: 'hospitalNumber' }, { name: 'chargeStatus' }, + { name: 'isUsedAgain' }, { name: 'patient' }, { name: 'doctor' }, { name: 'tousseName' }, @@ -495,264 +505,336 @@ ] }); - var tbar = [{ - text: '添加', - id: 'applyForeign', - iconCls: 'btn_ext_application_add', - hidden: SSTS_ForeignTousseApplication_Create, - handler: function () { - Ext.Ajax.request({ - url: WWWROOT + '/disinfectSystem/recyclingApplicationAction!verifyAddForeignTousse.do', - success: function (response, options) { - var result = Ext.decode(response.responseText); - if (result.success) { - openForeignTousseForm("", "apply"); - } else { - showResult(result.message); + var tbar = []; + + if (!SSTS_ForeignTousseApplication_Create) { + tbar.push({ + text: '添加', + id: 'applyForeign', + iconCls: 'btn_ext_application_add', + hidden: SSTS_ForeignTousseApplication_Create, + handler: function () { + Ext.Ajax.request({ + url: WWWROOT + '/disinfectSystem/recyclingApplicationAction!verifyAddForeignTousse.do', + success: function (response, options) { + var result = Ext.decode(response.responseText); + if (result.success) { + openForeignTousseForm("", "apply"); + } else { + showResult(result.message); + } } - } - }); - } - }, '-', { - text: '修改', - iconCls: 'btn_ext_application_edit', - id: 'editTbar', - hidden: SSTS_ForeignTousseApplication_Update, - handler: function () { - loadFormData(grid, false); - } - }, '-', { - text: '删除', - iconCls: 'btn_ext_application_del', - hidden: SSTS_ForeignTousseApplication_Delete, - handler: function () { - deleteForeignTousseApplication(grid); - } - }, '-', { - text: '终止', - iconCls: 'btn_ext_application_del', - hidden: SSTS_ForeignTousseApplication_Terminate, - handler: function () { - terminateInvoicePlan(grid, foreignTousseApplicationForm); - } - }, '-', { - text: '批量确认归还', - iconCls: 'btn_ext_application_go', - hidden: SSTS_ForeignTousseApplication_Return, - handler: function () { - var records = grid.getSelectionModel().getSelections(); + }); + } + }) + } - if (records.length == 0) { - showResult("请选择要确认归还的记录!"); - return false; + if (!SSTS_ForeignTousseApplication_Update) { + tbar.push('-', { + text: '修改', + iconCls: 'btn_ext_application_edit', + id: 'editTbar', + hidden: SSTS_ForeignTousseApplication_Update, + handler: function () { + loadFormData(grid, false); } + }) + } - var supplierNames = []; + if (!SSTS_ForeignTousseApplication_Delete) { + tbar.push('-', { + text: '删除', + iconCls: 'btn_ext_application_del', + hidden: SSTS_ForeignTousseApplication_Delete, + handler: function () { + deleteForeignTousseApplication(grid); + } + }) + } - for (var i = 0; i < records.length; i++) { - var supplierName = records[i].data.supplierName; - if (supplierName.split(';').length == 1) { - if (supplierNames.indexOf(supplierName.split(';')[0]) == -1) { - supplierNames.push(supplierName.split(';')[0]) - } - } else { - var arr = supplierName.split(';'); - for (var j = 0; j < arr.length; j++) { - if (supplierNames.indexOf(arr[j]) == -1) { - supplierNames.push(arr[j]) + if (!SSTS_ForeignTousseApplication_Terminate) { + tbar.push('-', { + text: '终止', + iconCls: 'btn_ext_application_del', + hidden: SSTS_ForeignTousseApplication_Terminate, + handler: function () { + terminateInvoicePlan(grid, foreignTousseApplicationForm); + } + }) + } + + if (!SSTS_ForeignTousseApplication_Return) { + tbar.push('-', { + text: '批量确认归还', + iconCls: 'btn_ext_application_go', + hidden: SSTS_ForeignTousseApplication_Return, + handler: function () { + var records = grid.getSelectionModel().getSelections(); + + if (records.length == 0) { + showResult("请选择要确认归还的记录!"); + return false; + } + + var supplierNames = []; + + for (var i = 0; i < records.length; i++) { + var supplierName = records[i].data.supplierName; + if (supplierName.split(';').length == 1) { + if (supplierNames.indexOf(supplierName.split(';')[0]) == -1) { + supplierNames.push(supplierName.split(';')[0]) } + } else { + var arr = supplierName.split(';'); + for (var j = 0; j < arr.length; j++) { + if (supplierNames.indexOf(arr[j]) == -1) { + supplierNames.push(arr[j]) + } + } } } - } - if (sstsConfig.enableReturneeOfForeignTousseSupplier) { - if (supplierNames.length > 1) { - showResult('请选择同一供应商的外来器械进行归还!'); - return + if (sstsConfig.enableReturneeOfForeignTousseSupplier) { + if (supplierNames.length > 1) { + showResult('请选择同一供应商的外来器械进行归还!'); + return + } + returnFunction(2, '', records[0].data.handleDepartCoding, records[0].data.supplierContactName, records[0].data.supplierName); + } else { + comfirmReturnOrEarlyReturn(ACTION_TYPE_CONFIRM_RETURN); } - returnFunction(2, '', records[0].data.handleDepartCoding, records[0].data.supplierContactName, records[0].data.supplierName); - } else { - comfirmReturnOrEarlyReturn(ACTION_TYPE_CONFIRM_RETURN); } - } - }, '-', { - text: '批量提前归还', - iconCls: 'btn_ext_application_go', - hidden: SSTS_ForeignTousseApplication_Return, - handler: function () { - var records = grid.getSelectionModel().getSelections(); - if (records.length == 0) { - showResult("请选择要提前归还的记录!"); - return false; - } + }) + } - var supplierNames = []; + if (!SSTS_ForeignTousseApplication_Return) { + tbar.push('-', { + text: '批量提前归还', + iconCls: 'btn_ext_application_go', + hidden: SSTS_ForeignTousseApplication_Return, + handler: function () { + var records = grid.getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请选择要提前归还的记录!"); + return false; + } - for (var i = 0; i < records.length; i++) { - var supplierName = records[i].data.supplierName; - if (supplierName.split(';').length == 1) { - if (supplierNames.indexOf(supplierName.split(';')[0]) == -1) { - supplierNames.push(supplierName.split(';')[0]) - } - } else { - var arr = supplierName.split(';'); - for (var j = 0; j < arr.length; j++) { - if (supplierNames.indexOf(arr[j]) == -1) { - supplierNames.push(arr[j]) + var supplierNames = []; + + for (var i = 0; i < records.length; i++) { + var supplierName = records[i].data.supplierName; + if (supplierName.split(';').length == 1) { + if (supplierNames.indexOf(supplierName.split(';')[0]) == -1) { + supplierNames.push(supplierName.split(';')[0]) } + } else { + var arr = supplierName.split(';'); + for (var j = 0; j < arr.length; j++) { + if (supplierNames.indexOf(arr[j]) == -1) { + supplierNames.push(arr[j]) + } + } } } - } - if (sstsConfig.enableReturneeOfForeignTousseSupplier) { - if (supplierNames.length > 1) { - showResult('请选择同一供应商的外来器械进行归还!'); - return + if (sstsConfig.enableReturneeOfForeignTousseSupplier) { + if (supplierNames.length > 1) { + showResult('请选择同一供应商的外来器械进行归还!'); + return + } + returnFunction(3, '', records[0].data.handleDepartCoding, records[0].data.supplierContactName, records[0].data.supplierName); + } else { + comfirmReturnOrEarlyReturn(ACTION_TYPE_EARLY_RETURN); } - returnFunction(3, '', records[0].data.handleDepartCoding, records[0].data.supplierContactName, records[0].data.supplierName); - } else { - comfirmReturnOrEarlyReturn(ACTION_TYPE_EARLY_RETURN); } - } - }, '-', { - text: '更改病人信息', - iconCls: 'btn_ext_application_edit', - id: 'editTbar', - hidden: SSTS_ForeignTousseApplication_Update, - handler: function () { - var records = grid.getSelectionModel().getSelections(); + }) + } - if (records.length == 0) { - showResult("请选择要修改的" + entityName + "!"); - return false; - } else if (records.length != 1) { - showResult("一次只能修改一个" + entityName + "!"); - return false; + if (!SSTS_ForeignTousseApplication_Update) { + tbar.push('-', { + text: '更改病人信息', + iconCls: 'btn_ext_application_edit', + id: 'editTbar', + hidden: SSTS_ForeignTousseApplication_Update, + handler: function () { + var records = grid.getSelectionModel().getSelections(); + + if (records.length == 0) { + showResult("请选择要修改的" + entityName + "!"); + return false; + } else if (records.length != 1) { + showResult("一次只能修改一个" + entityName + "!"); + return false; + } + modifyPatientInfo(records[0].data.id); } - modifyPatientInfo(records[0].data.id); - } - }, '-', { - type: 'button', - text: '打印待处理外来器械统计表', - iconCls: 'icon_print', - id: 'printTbar', - hidden: !sstsConfig.enableTheFunctionOfPrintProcessingOfForeignTousse, - menu: new Ext.menu.Menu({ - items: [ - { - text: '打印指定时间段内的待处理申请单', - handler: function () { - openPrintForeignTousseWindow('待处理外来器械统计表'); - } - }, - { - text: '打印选中的申请单', - handler: function () { - var records = grid.getSelectionModel().getSelections(); - if (records.length == 0) { - showResult("请先选中需要打印的申请单!"); - return false; + }) + } + + if (sstsConfig.enableTheFunctionOfPrintProcessingOfForeignTousse) { + tbar.push('-', { + type: 'button', + text: '打印待处理外来器械统计表', + iconCls: 'icon_print', + id: 'printTbar', + hidden: !sstsConfig.enableTheFunctionOfPrintProcessingOfForeignTousse, + menu: new Ext.menu.Menu({ + items: [ + { + text: '打印指定时间段内的待处理申请单', + handler: function () { + openPrintForeignTousseWindow('待处理外来器械统计表'); } - Ext.MessageBox.confirm("请确认", "是否打印已选中的申请单?", function (button, text) { - if ("yes" == button) { - var idsArr = []; - for (var i = 0; i < records.length; i++) { - idsArr[i] = records[i].data.id; - } - var ids = idsArr.join(';'); - getForeignTousseForReceivedData(0, ids, '待处理外来器械统计表'); - grid.dwrReload(); + }, + { + text: '打印选中的申请单', + handler: function () { + var records = grid.getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请先选中需要打印的申请单!"); + return false; } - }) - } - }] + Ext.MessageBox.confirm("请确认", "是否打印已选中的申请单?", function (button, text) { + if ("yes" == button) { + var idsArr = []; + for (var i = 0; i < records.length; i++) { + idsArr[i] = records[i].data.id; + } + var ids = idsArr.join(';'); + getForeignTousseForReceivedData(0, ids, '待处理外来器械统计表'); + grid.dwrReload(); + } + }) + } + }] + }) }) - }, '-', { - text: '收费设置', - iconCls: 'btn_ext_chargeSetting', - id: 'chargeSetting', - hidden: !SSTS_ShowForeignTousseApplication_ChargeSet, - handler: function () { - var records = grid.getSelectionModel().getSelections(); + } - if (records.length == 0) { - showResult("请选择要设置的" + entityName + "!"); - return false; - } else if (records.length != 1) { - showResult("一次只能设置一个" + entityName + "!"); - return false; - } + if (!SSTS_ShowForeignTousseApplication_ChargeSet) { + tbar.push('-', { + text: '收费设置', + iconCls: 'btn_ext_chargeSetting', + id: 'chargeSetting', + hidden: !SSTS_ShowForeignTousseApplication_ChargeSet, + handler: function () { + var records = grid.getSelectionModel().getSelections(); - var form = new top.Ext4.Panel({ - frame: false,//渲染面板 - autoScroll: true,//自动显示滚动条 - collapsible: false,//允许展开和收缩 - bodyPadding: 0, - buttonAlign: 'center', - html: '', - buttons: [{ - id: 'confirmBtn', - text: '保存', - handler: function () { - top.window.frames["thisTable"].save(chargeSetWin, grid); - } - }, { - text: '取消', - handler: function () { - chargeSetWin.close(); - } - }] - }); + if (records.length == 0) { + showResult("请选择要设置的" + entityName + "!"); + return false; + } else if (records.length != 1) { + showResult("一次只能设置一个" + entityName + "!"); + return false; + } - chargeSetWin = new top.Ext4.window.Window({ - id: 'chargeSetWin', - title: '外来器械包收费设置(' + records[0].data.depart + '-' + records[0].json.serialNumber + ')', - height: 500, - width: 880, - resizable: false, - modal: true, - border: false, - plain: true, - layout: 'fit', - items: [form] - }); + var form = new top.Ext4.Panel({ + frame: false,//渲染面板 + autoScroll: true,//自动显示滚动条 + collapsible: false,//允许展开和收缩 + bodyPadding: 0, + buttonAlign: 'center', + html: '', + buttons: [{ + id: 'confirmBtn', + text: '保存', + handler: function () { + top.window.frames["thisTable"].save(chargeSetWin, grid); + } + }, { + text: '取消', + handler: function () { + chargeSetWin.close(); + } + }] + }); - chargeSetWin.show(); - } - }, '-', { - text: '外来器械处理汇总单', - iconCls: 'icon_print', - hidden: !sstsConfig.enableForeignTousseProcessingSummaryReports, - handler: function () { - openPrintForeignTousseWindow('外来器械处理汇总单'); - } - }, '-', { - text: '审核', - iconCls: 'icon_set', - hidden: !SSTS_ForeignTousseApplication_Review, - handler: function () { - var records = grid.getSelectionModel().getSelections(); + chargeSetWin = new top.Ext4.window.Window({ + id: 'chargeSetWin', + title: '外来器械包收费设置(' + records[0].data.depart + '-' + records[0].json.serialNumber + ')', + height: 500, + width: 880, + resizable: false, + modal: true, + border: false, + plain: true, + layout: 'fit', + items: [form] + }); - if (records.length == 0) { - showResult("请选择要审核的" + entityName + "!"); - return false; - } else if (records.length != 1) { - showResult("一次只能审核一个" + entityName + "!"); - return false; + chargeSetWin.show(); } + }) + } - if (records[0].data.reviewStatus == '' || records[0].data.reviewStatus == '已通过' || records[0].data.reviewStatus == '已否决') { - showResult('该申请单的状态为通过或否决,不能审核!'); - return + if (sstsConfig.enableForeignTousseProcessingSummaryReports) { + tbar.push('-', { + text: '外来器械处理汇总单', + iconCls: 'icon_print', + hidden: !sstsConfig.enableForeignTousseProcessingSummaryReports, + handler: function () { + openPrintForeignTousseWindow('外来器械处理汇总单'); } + }) + } - foreignTousseApplicationReview(records[0].data); - } - }]; + if (!SSTS_ForeignTousseApplication_Review) { + tbar.push('-', { + text: '审核', + iconCls: 'icon_set', + hidden: SSTS_ForeignTousseApplication_Review, + handler: function () { + var records = grid.getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请选择要审核的" + entityName + "!"); + return false; + } else if (records.length != 1) { + showResult("一次只能审核一个" + entityName + "!"); + return false; + } + + if (records[0].data.reviewStatus == '' || records[0].data.reviewStatus == '已通过' || records[0].data.reviewStatus == '已否决') { + showResult('该申请单的状态为通过或否决,不能审核!'); + return + } + + foreignTousseApplicationReview(records[0].data); + } + }) + } + + if (!SSTS_ForeignTousseApplication_Update && sstsConfig.enableForeignTousseUsedAgainFunction) { + tbar.push('-', { + text: '再次翻包申请', + iconCls: 'btn_ext_application_edit', + hidden: !(!SSTS_ForeignTousseApplication_Update && sstsConfig.enableForeignTousseUsedAgainFunction), + handler: function () { + var records = grid.getSelectionModel().getSelections(); + + if (records.length == 0) { + showResult("请选择要再次申请的" + entityName + "!"); + return false; + } else if (records.length > 1) { + showResult("一次只能申请一个" + entityName + "!"); + return false; + } + + var packageStatus = records[0].data.packageStatus; + var recyclingStatus = records[0].data.recyclingStatus; + if (packageStatus !== '待二次回收' || recyclingStatus !== '待回收') { + showResult("外来器械包的状态不是“待二次回收”或所属的外来器械单的“回收状态”不是“待回收”,无法进行再次翻包申请操作。"); + return false; + } + + foreignTousseUsedAgainFun(records[0].data.id, records[0].json.serialNumber); + } + }) + } + var defaultSortField = 'applicationTime'; - if (SSTS_ForeignTousseApplication_Review) { + if (!SSTS_ForeignTousseApplication_Review) { defaultSortField = "expression case when reviewStatus = '待审核' then 0 when reviewStatus = '已通过' then 1 when reviewStatus = '已否决' then 2 else 1 end, applicationTime desc "; } @@ -1196,4 +1278,954 @@ }); reviewFormWin.show(); +} + +// ZSYY-368:再次翻包申请 +function foreignTousseUsedAgainFun(id, serialNumber) { + var foreignTousseUsedAgainWin; + var urgentLevelStore = new Ext4.data.Store({ + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/urgentLevelAction!getUrgentsForSelect.do', + reader: { + type: 'json', + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'urgentLevel', mapping: 'urgentLevel' }, + { name: 'urgentDefaultValue', mapping: 'urgentDefaultValue' } + ] + }); + urgentLevelStore.load(); + + var foreignTousseColumns = [{ + dataIndex: 'tousseDefinitionId', + hidden: true + }, { + header: '供应商', + width: 200, + sortable: true, + xtype: 'treecolumn', + dataIndex: 'supplierName', + renderer: function (v, p, record, rowIndex, columnIndex, store) { + var isLeaf = record.get('leaf'); + if (isLeaf) { + var arr = []; + if (record.raw.tousseInstanceArr) { + for (var i = 0; i < record.raw.tousseInstanceArr.length; i++) { + var tousseInstanceItem = record.raw.tousseInstanceArr[i]; + var barcode = tousseInstanceItem.supplierName; + var id = tousseInstanceItem.tousseInstanceId; + var isComboTousse = tousseInstanceItem.isComboTousse; + var tdName = tousseInstanceItem.tdName; + var tousseDefinitionId = tousseInstanceItem.tousseDefinitionId; + var tousseType = tousseInstanceItem.tousseType; + var isSplit = tousseInstanceItem.isSplit; + if (isSplit) { + tousseType = '外来器械拆分小包'; + } + var html = "" + barcode + ""; + arr[i] = html; + } + + return arr.join(','); + } + } else { + return v; + } + } + }, { + header: '器械包/材料名称', + width: 200, + align: 'center', + sortable: true, + dataIndex: 'tousseName', + renderer: function (v, p, record) { + //SZSZYY-34:“外来器械通用包”不能修改编辑 + if (sstsConfig.enableThirdPartySystemApplyUnnamedForeignTousse) { + if (record.get('foreignComTousse') == true) { + return "" + v + ""; + } else { + return v; + } + } else { + return v; + } + } + }, { + header: '是否临购', + width: 75, + align: 'center', + sortable: true, + hidden: !sstsConfig.enableForeignTousseIsTemporaryPurchaseField, + dataIndex: 'temporaryPurchase', + editor: { + xtype: 'combo', + width: 130, + valueField: 'value', + displayField: 'value', + editable: false, + store: new top.Ext4.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + allowBlank: true, + forceSelection: true + } + }, { + header: '包状态', + width: 60, + align: 'center', + sortable: true, + dataIndex: 'packageStatus', + editor: { + xtype: 'textfield', + allowBlank: true, + listeners: { + 'focus': function () { + this.selectText(); + } + } + } + }, { + header: '是否植入物', + width: 75, + align: 'center', + sortable: true, + dataIndex: 'includeImplant', + editor: { + xtype: 'combo', + width: 130, + valueField: 'yesOrNo', + displayField: 'yesOrNo', + store: new top.Ext4.data.SimpleStore({ + fields: ['yesOrNo'], + data: [['是'], ['否']] + }), + allowBlank: true, + forceSelection: true + } + }, { + header: '数量', + width: 50, + align: 'center', + sortable: true, + dataIndex: 'amount', + editor: { + xtype: 'numberfield', + allowBlank: true, + allowDecimals: false, + minValue: 0, + maxValue: 9999, + listeners: { + 'focus': function () { + this.selectText(); + }, + blur: function (field, event, eOpts) { + if (sstsConfig.enableTotalPriceCalculatedBasedOnTheUnitPriceOfTheMaterialOfForeignTousseFunction) { + setTimeout(function () { + var sumPrice = setParentPrice(currentRecord.parentNode.childNodes, 0); + currentRecord.parentNode.set('price', sumPrice) + }, 200); + } + } + } + } + }, { + header: '单价', + width: 50, + align: 'center', + sortable: true, + dataIndex: 'price', + editor: { + xtype: 'numberfield', + allowBlank: true, + allowDecimals: true, + decimalPrecision: 2, + minValue: 0, + listeners: { + 'focus': function () { + this.selectText(); + } + } + }, + renderer: function (v, p, record, rowIndex, columnIndex, store) { + var isLeaf = record.get('leaf'); + if (isLeaf) { + return v; + } else { + if (sstsConfig.enableTotalPriceCalculatedBasedOnTheUnitPriceOfTheMaterialOfForeignTousseFunction) { + var sum = 0; + if (record.childNodes.length > 0) { + for (var i = 0; i < record.childNodes.length; i++) { + var price = record.childNodes[i].data.price; + var amount = record.childNodes[i].data.amount; + sum += parseFloat(price * amount); + } + } + if (sum == 0) { + return 0 + } else { + return parseFloat(sum).toFixed(2); + } + } else { + return v; + } + } + } + }, { + header: '加急级别', + width: 60, + align: 'center', + sortable: true, + dataIndex: 'urgentLevel', + hidden: !SSTS_ShowUrgentLevelAndUrgentAmount, + editor: { + xtype: 'combo', + valueField: 'urgentLevel', + displayField: 'urgentLevel', + store: urgentLevelStore, + allowBlank: true, + forceSelection: true, + listeners: { + select: function (v, r, p) { + currentRecord.set("urgentLevel", r[0].data.urgentLevel); + currentRecord.set("urgentLevelId", r[0].data.id); + }, + blur: function (thiz) { + if (thiz.getValue() == null) { + currentRecord.set('urgentLevelId', null); + } + } + } + } + }, { + header: '可拆卸数量', + width: 75, + align: 'center', + sortable: true, + dataIndex: 'minDismantleAmount', + editor: { + xtype: 'numberfield', + allowBlank: true, + allowDecimals: false, + minValue: 0, + listeners: { + 'focus': function () { + this.selectText(); + } + } + } + }, { + header: '拆包份数', + width: 75, + align: 'center', + sortable: true, + hidden: !sstsConfig.enableForeignTousseSplitNumberProperty, + dataIndex: 'splitNumber', + editor: { + xtype: 'numberfield', + allowBlank: true, + allowDecimals: false, + minValue: 0, + listeners: { + 'focus': function () { + this.selectText(); + } + } + } + }, { + header: '大小', + width: 60, + align: 'center', + sortable: true, + dataIndex: 'packageSize', + editor: { + xtype: 'combo', + valueField: 'value', + displayField: 'value', + editable: false, + store: new top.Ext4.data.SimpleStore({ + fields: ['value'], + data: packageSizeArray + }), + allowBlank: true, + forceSelection: true + } + }, { + dataIndex: 'urgentLevelId', + hidden: true + }, { + header: '图片', + width: 80, + align: 'center', + sortable: true, + dataIndex: 'type', + renderer: function (v, p, record, rowIndex, columnIndex, store) { + var isLeaf = record.get('leaf'); + var tousseName = record.get('tousseName'); + var tousseDefinitionId = record.get('tousseDefinitionId'); + if (!isLeaf) { + var currentPage = 1; + var materialId = ""; + var imgName = IMAGE_TYPE_TOUSSE; + var iframeHeight = window.screen.height; + var tousseId = tousseDefinitionId; + if (tousseDefinitionId == '') { + tousseId = record.get('tousseId') || ''; + } + var url = WWWROOT + '/disinfectsystem/touchScreen/recycle/tousseImage.jsp?resolution=1980&clientHeight=' + iframeHeight + '&parentPageName=application&tousseDefinitionID=' + tousseId + '&materialId=' + materialId + '&tousseName=' + encodeURIComponent(tousseName) + '&imgName=' + encodeURIComponent(imgName) + '&number=' + currentPage; + var supplierName = record.get('supplierName'); + var packageStatus = record.get('packageStatus'); + //ZJYY-140:显示手写签名的图标 + var btnHtml = ''; + if (sstsConfig.enableReturnHandoverOfForeignTousseFunction && (packageStatus == '提前归还' || packageStatus == '已归还')) { + var objId = record.get('id'); + btnHtml += ""; + } + + btnHtml += ""; + if (sstsConfig.showCameraPhoto) { + if (id == "") { + tousseDefinitionId = null; + } + btnHtml += ""; + } + return btnHtml; + } + } + }]; + //增加重量字段 + if (sstsConfig.foreignTousseAddWeight) { + foreignTousseColumns.splice(3, 0, { + header: '重量(公斤)', + width: 70, + align: 'center', + sortable: true, + dataIndex: 'weight', + editor: { + xtype: 'numberfield', + allowBlank: false, + allowNegative: false, // 不允许负数 + allowDecimals: true, // 允许小数点 + minValue: 0, + listeners: { + 'focus': function () { + this.selectText(); + } + } + } + }); + } + foreignTousseStore = new Ext4.data.TreeStore({ + model: foreignTousseItemModel, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!loadForeignTousseItems.do' + }, + listeners: { + beforeload: function (store, operation) { + var params = {//参数 + applicationId: id, + confirmRecycle: false + }; + Ext4.apply(store.proxy.extraParams, params); + }, + load: function (store, record) { + if (record.childNodes.length > 1) { + showResult('操作失败,外来器械申请单(' + serialNumber + ')中申请了多套外来器械包,无法进行再次翻包申请。'); + } else if (record.childNodes.length == 1) { + record.childNodes[0].set('checked', true); + foreignTousseUsedAgainWin.show(); + } + } + }, + folderSort: true + }); + + //结算科室 + var settleDepartJsonStore = new Ext4.data.JsonStore({ + autoLoad: true, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSettleAccountsDepartJson.do?showDisableOrgUnit=false', + reader: { + type: 'json', + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); + + //申请科室的store + var applyDepartJsonStore = new Ext4.data.Store({ + //limit参数,每页显示条数,默认为25 + pageSize: isIE6OrIE7 ? 15 : 50, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getApplicationDepartJson.do?showDisableOrgUnit=false', + reader: { + type: 'json', + totalProperty: 'totalCount', + root: 'data' + } + }, + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] + }); + + //处理科室 + var handleDepartmentStore = new Ext4.data.JsonStore({ + autoLoad: true, + proxy: { + type: 'ajax', + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getfTHandleDepartAndTaskGroupJsonArray.do', + reader: { + type: 'json', + root: 'data' + } + }, + fields: [ + { name: 'handleDepartCoding', mapping: 'departCode' }, + { name: 'handleDepart', mapping: 'departName' }, + { name: 'taskGroup', mapping: 'taskGroup' } + ], + listeners: { + load: function (records) { + //simon-add:items为外来器械配置的处理科室,高级视图中"科室供应室配置"中“外来器械参数设置” + var handleDeparts = records.data.items; + var HDLength = handleDeparts.length; + var handleDepartStore = new Ext4.data.JsonStore({ + autoLoad: true, + proxy: { + type: 'ajax', + url: WWWROOT + '/systemmanage/getCssdsByApplyDepartAndType.do', + reader: { + type: 'json', + root: 'data' + } + }, + fields: [ + { name: 'defaultHandleDepart', mapping: 'defaultHandleDepart' }, + { name: 'cssdOrgUnitCode', mapping: 'cssdOrgUnitCode' }, + { name: 'name', mapping: 'cssdOrgUnitName' } + ], + listeners: { + beforeload: function (store, operation, eOpts) { + //每次加载之前传“申请科室编码”和“物品类型”两个参数 + if (top.Ext4.getCmp('departCoding')) { + store.proxy.extraParams.applyDepartCode = top.Ext4.getCmp('departCoding').getValue(); + } + store.proxy.extraParams.tousseType = "器械包"; + }, + load: function (records) { + //simon-add:defualtHandleDeparts为可服务此申请科室的供应室,高级视图中"供应室服务临床科室配置" + var defualtHandleDeparts = records.data.items; + var DHDLength = defualtHandleDeparts.length; + //外来器械配置的处理科室handleDeparts数量为1则选择此科室 + if (HDLength == 1) { + var handleDepart = handleDeparts[0].data.handleDepart; + var handleDepartCoding = handleDeparts[0].data.handleDepartCoding; + if (top.Ext4.getCmp('handleDepart')) { + top.Ext4.getCmp("handleDepart").setValue(handleDepart); + } + if (top.Ext4.getCmp('handleDepartCoding')) { + top.Ext4.getCmp("handleDepartCoding").setValue(handleDepartCoding); + } + } else if (HDLength > 1) { + //handleDeparts与服务此申请科室的供应室defualtHandleDeparts的交集 + var sameArray = new Array(); + //“是否默认处理科室”参数为“是”的科室在sameArray中的index + var indexArray = new Array(); + for (var h = 0; h < HDLength; h++) { + var same = {}; + var departCoding = handleDeparts[h].data.handleDepartCoding; + for (var d = 0; d < DHDLength; d++) { + if (departCoding == defualtHandleDeparts[d].data.cssdOrgUnitCode) { + same.departCoding = departCoding; + same.handleDepart = defualtHandleDeparts[d].data.name; + var isDefaultHandleDepart = defualtHandleDeparts[d].data.defaultHandleDepart; + same.isDefaultHandleDepart = isDefaultHandleDepart; + sameArray.push(same); + if (isDefaultHandleDepart == "是") { + indexArray.push(sameArray.length - 1); + } + } + } + } + //交集为1,则设置此科室 + if (sameArray.length == 1) { + var handleDepart = sameArray[0].handleDepart; + var handleDepartCoding = sameArray[0].handleDepartCoding; + top.Ext4.getCmp("handleDepart").setValue(handleDepart); + top.Ext4.getCmp("handleDepartCoding").setValue(handleDepartCoding); + } else if (sameArray.length > 1) { + /*交集大于1,再判断其中有没有“是否默认处理科室”参数为“是”的科室,如果参数为“是”的科室数量为1则设置为此科室 + * 其他情况,不设置。 + */ + if (indexArray.length == 1) { + var index = indexArray[0]; + var handleDepart = sameArray[index].handleDepart; + var handleDepartCoding = sameArray[index].handleDepartCoding; + top.Ext4.getCmp("handleDepart").setValue(handleDepart); + top.Ext4.getCmp("handleDepartCoding").setValue(handleDepartCoding); + } + } + } + } + } + }); + } + } + }); + + //ZJYY-53:外来器械包申请单界面字段别名设置 + var configureObj = replaceName('aliasNameOfForeignTousseApplicationForm'); + var applicantName = configureObj.applicant; + var applicationTimeName = configureObj.applicationTime; + var serialNumberName = configureObj.serialNumber; + var departName = configureObj.depart; + var settleAccountsDepartName = configureObj.settleAccountsDepart; + var handleDepartName = configureObj.handleDepart; + var supplierContactName = configureObj.supplierContactName; + var supplierPhoneNumberName = configureObj.supplierPhoneNumber; + var remarkName = configureObj.remark; + + var foreignAgainForm = new top.Ext4.form.Panel({ + id: 'foreignAgainForm', + frame: true, + border: 0, + labelSeparator: ':', + bodyPadding: '5 5 0', + buttonAlign: 'center', + fieldDefaults: { + labelAlign: 'right' + }, + layout: 'form', + items: [{ + xtype: 'fieldset', + title: '基础信息', + collapsible: false, + width: top.screen.width > 1280 ? 930 : 920, + items: [{ + xtype: 'hidden', + id: 'usedAgainForeignTousseApplicationId', + name: 'usedAgainForeignTousseApplicationId', + value: id + }, { + xtype: 'hidden', + id: 'foreignTousseInfo_again', + name: 'foreignTousseInfo' + }, { + layout: 'column', + columnWidth: 1, + items: [{ + layout: 'form', + labelWidth: 70, + columnWidth: .33, + height: 26, + items: [{ + xtype: 'textfield', + fieldLabel: applicantName, + id: 'applicant_again', + name: 'applicant', + readOnly: true, + fieldCls: 'fieldReadOnlyNoRemoveAndTop' + }] + }, { + layout: 'form', + labelWidth: 70, + columnWidth: .33, + height: 26, + items: [{ + xtype: 'textfield', + fieldLabel: applicationTimeName, + id: 'applicationTime_again', + name: 'applicationTime', + readOnly: true, + fieldCls: 'fieldReadOnlyNoRemoveAndTop' + }] + }, { + layout: 'form', + labelWidth: 70, + columnWidth: .33, + height: 26, + items: [{ + xtype: 'textfield', + fieldLabel: serialNumberName, + id: 'serialNumber_again', + name: 'serialNumber', + readOnly: true, + fieldCls: 'fieldReadOnlyNoRemoveAndTop' + }] + }, { + layout: 'form', + labelWidth: 70, + columnWidth: .33, + height: 26, + items: [{ + xtype: 'hidden', + id: 'departCoding_again', + name: 'departCoding' + }, { + xtype: 'combo', + fieldLabel: departName, + id: 'depart_again', + name: 'depart', + queryParam: 'spell', + minChars: 0, + valueField: 'name', + displayField: 'name', + store: applyDepartJsonStore, + pageSize: 100, + matchFieldWidth: false, + listConfig: { width: 300 }, + queryDelay: 1300, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + hideTrigger: false, + typeAhead: false, + allowBlank: true, + listeners: { + select: function (combo, record, index) { + var setObj = { + 'departCoding': 'id', + 'settleAccountsDepart': 'name', + 'settleAccountsDepartCoding': 'id' + } + + resetComboData({ val: record[0].get('name'), property: 'name' }, settleDepartJsonStore, setObj); + Ext4.Ajax.request({ + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSupplyRoomConfigByCoding.do', + params: { 'orgUnitCode': record[0].get('id'), 'type': 3 }, + timeout: 600000, + success: function (response, options) { + var result = Ext4.JSON.decode(response.responseText); + //simon-add:如果申请科室配置的默认结算科室不为空,那么设置此值为页面结算科室默认值 + if (!isUndefinedOrNullOrEmpty(result.settleAccountsDepart) && !isUndefinedOrNullOrEmpty(result.settleAccountsDepartCoding)) { + top.Ext4.getCmp('settleAccountsDepart').setValue(result.settleAccountsDepart); + top.Ext4.getCmp('settleAccountsDepartCoding').setValue(result.settleAccountsDepartCoding); + } + }, + failure: function (response, opts) { + showResult(response.responseText); + } + }); + } + } + }] + }, { + layout: 'form', + labelWidth: 70, + columnWidth: .33, + height: 26, + items: [{ + xtype: 'hidden', + id: 'settleAccountsDepartCoding_again', + name: 'settleAccountsDepartCoding' + }, { + xtype: 'combo', + fieldLabel: settleAccountsDepartName, + id: 'settleAccountsDepart_again', + name: 'settleAccountsDepart', + queryParam: 'spell', + minChars: 0, + valueField: 'name', + displayField: 'name', + store: settleDepartJsonStore, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + queryDelay: 1300, + hideTrigger: false, + typeAhead: false, + allowBlank: true, + listeners: { + select: function (combo, record, index) { + resetComboData({ val: record[0].get('name'), property: 'name' }, settleDepartJsonStore, { 'settleAccountsDepartCoding': 'id' }); + } + } + }] + }, { + layout: 'form', + labelWidth: 70, + columnWidth: .33, + height: 26, + items: [{ + xtype: 'hidden', + id: 'handleDepartCoding_again', + name: 'handleDepartCoding' + }, { + xtype: 'combo', + fieldLabel: handleDepartName, + id: 'handleDepart_again', + name: 'handleDepart', + minChars: 0, + valueField: 'handleDepart', + displayField: 'handleDepart', + store: handleDepartmentStore, + forceSelection: false, + lazyInit: true, + triggerAction: 'all', + hideTrigger: false, + typeAhead: false, + allowBlank: true, + listeners: { + select: function (combo, records, index) { + var record = transformRecords(records); + var handleDepart = record.data.handleDepart; + var handleDepartCoding = record.data.handleDepartCoding; + top.Ext4.getCmp("handleDepart").setValue(handleDepart); + top.Ext4.getCmp("handleDepartCoding").setValue(handleDepartCoding); + } + } + }] + }, { + layout: 'form', + labelWidth: 70, + columnWidth: .33, + height: 26, + hidden: sstsConfig.hiddenFieldsOnForeignTousseInfoPage && sstsConfig.hiddenFieldsOnForeignTousseInfoPage.indexOf('supplierContactName') >= 0, + items: [{ + xtype: 'textfield', + fieldLabel: supplierContactName, + id: 'supplierContactName_again', + name: 'supplierContactName', + readOnly: true, + fieldCls: 'fieldReadOnlyNoRemoveAndTop' + }] + }, { + layout: 'form', + labelWidth: 70, + columnWidth: .33, + height: 26, + hidden: sstsConfig.hiddenFieldsOnForeignTousseInfoPage && sstsConfig.hiddenFieldsOnForeignTousseInfoPage.indexOf('supplierPhoneNumber') >= 0, + items: [{ + xtype: 'textfield', + fieldLabel: supplierPhoneNumberName, + id: 'supplierPhoneNumber_again', + name: 'supplierPhoneNumber', + readOnly: true, + fieldCls: 'fieldReadOnlyNoRemoveAndTop' + }] + }, { + layout: 'form', + columnWidth: 1, + labelWidth: 70, + hidden: sstsConfig.hiddenFieldsOnForeignTousseInfoPage && sstsConfig.hiddenFieldsOnForeignTousseInfoPage.indexOf('remark') >= 0, + items: [{ + xtype: 'textfield', + fieldLabel: remarkName, + id: 'remark_again', + name: 'remark' + }] + } + ] + }] + }, { + layout: 'column', + items: [{ + layout: 'form', + columnWidth: 1, + items: [ + top.Ext4.create('foreignTousseTreeGrid', { + id: 'foreignAgainTreeGridForm', + columns: foreignTousseColumns, + flex: 1, + border: true, + store: foreignTousseStore, + width: 980, + height: 200, + autoHeight: true, + forceFit: true, + viewConfig: { + getRowClass: function (record) { + if (!record.data.leaf && record.data.isTerminated) { + return 'terminated-row'; + } + } + }, + listeners: { + 'itemcontextmenu': function (menutree, record, items, index, e) { + e.preventDefault(); + e.stopEvent(); + var isRecycled = false; + var foreignComTousse = false; + if (record.childNodes.length > 0) { + isRecycled = record.get("isRecycled"); + } else { + isRecycled = record.parentNode.get("isRecycled"); + } + + if (sstsConfig.enableThirdPartySystemApplyUnnamedForeignTousse) { + foreignComTousse = record.get("foreignComTousse"); + } + + var menuArray = []; + + var leaf = record.get("leaf"); + if (leaf) { + menuArray.push({ + text: "删除", + iconCls: 'btn_ext_pause', + handler: function () { + var parentNode = record.parentNode; + var ids = record.get("id"); + var price = record.get("price"); + var amount = record.get("amount"); + var sumPrice = parentNode.get("price"); + if (sstsConfig.disableModifyExistMaterilaOfForeignTousse) { + if (ids == 0) { + parentNode.removeChild(record); + parentNode.set('price', sumPrice - (price * amount)) + } else { + showResult('已经存在的材料不能删除', null, sstsConfig.messagePauseTimeOnPackingPage); + } + } else { + parentNode.removeChild(record); + parentNode.set('price', sumPrice - (price * amount)) + } + } + }); + } else { + menuArray.push({ + text: "添加材料", + iconCls: 'btn_ext_add', + handler: function () { + addForeignTousseMaterial(record); + } + }, { + text: "删除", + hidden: (isShowDeleteButton == false) ? (!isShowDeleteButton) : (id != "" && true), + iconCls: 'btn_ext_pause', + handler: function () { + var parentNode = record.parentNode; + var price = record.get("price"); + var amount = record.get("amount"); + var sumPrice = parentNode.get("price"); + parentNode.removeChild(record); + parentNode.set('price', sumPrice - (price * amount)) + } + }); + } + + //SZSZYY-34:外来器械通用包删除 + if (foreignComTousse) { + menuArray = [{ + text: "删除", + iconCls: 'btn_ext_pause', + handler: function () { + var parentNode = record.parentNode; + parentNode.removeChild(record); + } + }]; + } + + var nodemenu = new top.Ext4.menu.Menu({ + items: menuArray + }); + + if (isShowMenuButton) { + nodemenu.showAt(e.getXY()); + } else { + if (!isRecycled) { + nodemenu.showAt(e.getXY()); + } + } + }, + celldblclick: function (grid, td, cellIndex, record, tr, rowIndex, e, eOpts) { + var record = grid.getStore().getAt(rowIndex); + if (record.data.leaf && record.data.isTerminated) { + showResult('已终止的物品不能修改。'); + return false + } + } + } + }) + ] + }] + }], + buttons: [{ + text: '提交', + handler: function () { + var success = getForeignTousseInfo('foreignTousseInfo_again'); + if (success) { + foreignAgainForm.form.submit({ + url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!foreignTousseApplicationUsedAgain.do', + method: 'POST', + waitMsg: '正在保存数据,请稍候', + waitTitle: '提交表单', + success: function (form, action) { + showResult(action.result.message); + if (grid) { + grid.dwrReload() + } + foreignTousseUsedAgainWin.close(); + if (tmpWindow) { + tmpWindow.close(); + } + }, + failure: function (form, action) { + showResult(action.result.message); + } + }); + } + } + }, { + text: '取消', + handler: function () { + foreignTousseUsedAgainWin.close(); + } + }] + }); + + foreignTousseUsedAgainWin = new top.Ext4.window.Window({ + id: 'foreignTousseUsedAgainWin', + title: '外来器械单-再次翻包申请', + height: 450, + width: 1010, + resizable: false, + modal: true, + border: false, + plain: false, + layout: 'fit', + items: [foreignAgainForm] + }); + + foreignAgainForm.form.load({ + url: WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!loadForeignTousseApplication.do', + method: 'GET', + waitMsg: '正在加载数据,请稍候', + success: function (form, action) { + //设置申请科室 + var depart = action.result.data.depart; + var departCoding = action.result.data.departCoding; + + top.Ext4.getCmp("applicationTime_again").setValue(''); + top.Ext4.getCmp("applicant_again").setValue($Id('userName').value); + applyDepartJsonStore.load({ + params: { spell: depart, departmentCode: departCoding }, + callback: function (records, operation, success) { + if (records && records.length > 0) { + top.Ext4.getCmp("depart_again").setValue(depart); + top.Ext4.getCmp("departCoding_again").setValue(departCoding); + } + } + }); + }, + failure: function (form, action) { + showResult("加载失败,请联系管理员!"); + }, + params: { + id: id + } + }); } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp =================================================================== diff -u -r38897 -r39353 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 38897) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 39353) @@ -107,9 +107,9 @@ //外来器械申请单收费设置 - var SSTS_ShowForeignTousseApplication_ChargeSet = false; + var SSTS_ShowForeignTousseApplication_ChargeSet = true; - SSTS_ShowForeignTousseApplication_ChargeSet = true; + SSTS_ShowForeignTousseApplication_ChargeSet = false; var SSTS_ForeignTousseApplication_Terminate = true; @@ -124,15 +124,13 @@ //外来器械单审核管理 - var SSTS_ForeignTousseApplication_Review = false; + var SSTS_ForeignTousseApplication_Review = true; - SSTS_ForeignTousseApplication_Review = true; + if(sstsConfig.enableReviewOfForeignTousseApplicationFunction){ + SSTS_ForeignTousseApplication_Review = false + } - if(!sstsConfig.enableReviewOfForeignTousseApplicationFunction){ - SSTS_ForeignTousseApplication_Review = false; - } - var today = '<%=request.getAttribute("today")%>'; var nowToday = '<%=request.getAttribute("nowToday")%>'; var curUserName = '<%=request.getAttribute("userName")%>'; Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js =================================================================== diff -u -r38991 -r39353 --- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 38991) +++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 39353) @@ -936,7 +936,7 @@ * 获取申请的“外来器械包”的信息. * return 验证合法返回true,并且把获取申请的“外来器械包”的信息设置到隐藏域foreignTousseInfo,否则返回false */ -function getForeignTousseInfo(){ +function getForeignTousseInfo(domId){ var foreignTousseInfo = []; var nodes = foreignTousseStore.getRootNode().childNodes; var msg = ""; @@ -1061,7 +1061,11 @@ }); } if(msg == ""){ - top.Ext4.getCmp('foreignTousseInfo').setValue(JSON.stringify(foreignTousseInfo)); + if(domId){ + top.Ext4.getCmp(domId).setValue(JSON.stringify(foreignTousseInfo)); + }else { + top.Ext4.getCmp('foreignTousseInfo').setValue(JSON.stringify(foreignTousseInfo)); + } return true; }else{ showResult(msg); @@ -2295,6 +2299,13 @@ foreignTousseApplicationReview(item,true); } },{ + text : '再次翻包申请', + id : 'foreignTousseUsedAgainBtn', + hidden:true, + handler : function() { + foreignTousseUsedAgainFun(id); + } + },{ text : '打印包外标签', hidden : (id == "" ? true : false), handler : function() { @@ -3013,8 +3024,16 @@ refreshMaterialAmountInfo(); }, load:function(store,record){ - if(record.childNodes.length > 0){ + if(record.childNodes.length > 1){ record.childNodes[0].set('checked',true) + }else if(record.childNodes.length == 1){ + record.childNodes[0].set('checked',true) + if (!SSTS_ForeignTousseApplication_Update && sstsConfig.enableForeignTousseUsedAgainFunction) { + var packageStatus = record.childNodes[0].data.packageStatus; + if (packageStatus == '待二次回收' && recyclingStatus == '待回收') { + top.Ext4.getCmp('foreignTousseUsedAgainBtn').show(); + } + } } } }, @@ -4557,7 +4576,7 @@ } if(top.Ext4.getCmp('reviewBtn') && top.Ext4.getCmp('reviewStatus')){ - if(action.result.data.reviewStatus == '待审核' && SSTS_ForeignTousseApplication_Review){ + if(action.result.data.reviewStatus == '待审核' && !SSTS_ForeignTousseApplication_Review){ top.Ext4.getCmp('reviewBtn').show(); }else { top.Ext4.getCmp('reviewBtn').hide();