Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.js
===================================================================
diff -u -r37410 -r41535
--- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.js (.../operationReservationInvoiceView.js) (revision 37410)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.js (.../operationReservationInvoiceView.js) (revision 41535)
@@ -4,42 +4,42 @@
var TYPE_OPERATION_RESERVATION = '手术预约发货';
var INVOICE_MODE_DEPART = 'invoicePlan';
//明细grid删除按钮
-function renderDeleteButton(v,p,record,rowIndex){
- return "
";
+function renderDeleteButton(v, p, record, rowIndex) {
+ return "
";
}
//删除grid明细
-function deleteItem(tousseDefinitionId){
+function deleteItem(tousseDefinitionId) {
var gridStore = top.Ext.getCmp('operationReservationGrid').getStore();
- for(var i = 0;i < gridStore.getCount();i++){
+ for (var i = 0; i < gridStore.getCount(); i++) {
var record = gridStore.getAt(i);
- if(record.data.tousseDefinitionId == tousseDefinitionId){
+ if (record.data.tousseDefinitionId == tousseDefinitionId) {
gridStore.remove(record);
break;
}
}
}
//Ext.form.DateField在IE8下显示不全
Ext.override(top.Ext.menu.Menu, {
- autoWidth: function() {
- this.width += "px";
- }
+ autoWidth: function () {
+ this.width += "px";
+ }
});
var goodsItemRecord = Ext.data.Record.create([
- {name : 'itemId'},
- {name : 'tousseDefinitionId'},
- {name : 'name'},
- {name : 'amount'}
+ { name: 'itemId' },
+ { name: 'tousseDefinitionId' },
+ { name: 'name' },
+ { name: 'amount' }
]);
-function editOperationReservation(id) {}
+function editOperationReservation(id) { }
// 删除
-function deleteOperationReservation(grid) {}
+function deleteOperationReservation(grid) { }
-function editRecord(id){
-// editOperationReservation(id);
+function editRecord(id) {
+ // editOperationReservation(id);
var records = grid.getSelectionModel().getSelections();
if (records.length == 0) {
showResult("请选择要发货的手术预约单!");
@@ -53,66 +53,66 @@
var depart = records[0].data['depart'];
//提交状态,true表示已提交,false表示未提交
var committedStatus = records[0].data['committedStatus'];
- addAndEditInvoicePlan(departCoding,depart,id,committedStatus,records[0].data);
+ addAndEditInvoicePlan(departCoding, depart, id, committedStatus, records[0].data);
}
-function modify(v,data){
+function modify(v, data) {
editRecord(data['id']);
}
//BJDXZLYY-46:智能货柜查询
-function showOperationReservationStorageTousse(id){
+function showOperationReservationStorageTousse(id) {
var operationReservationStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectsystem/operationReservationAction!loadOperationReservationStorageTousse.do',
- method : 'POST'
- }),
- baseParams : {id : id},
- reader : new Ext.data.JsonReader({
- root : 'data'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectsystem/operationReservationAction!loadOperationReservationStorageTousse.do',
+ method: 'POST'
+ }),
+ baseParams: { id: id },
+ reader: new Ext.data.JsonReader({
+ root: 'data'
}, [
- {name : 'id',mapping : 'id'},
- {name : 'showTousseName',mapping : 'showTousseName'},
- {name : 'barcode',mapping : 'barcode'},
- {name : 'storageLocation',mapping : 'storageLocation'},
- {name : 'validUntilStr',mapping : 'validUntilStr'}
+ { name: 'id', mapping: 'id' },
+ { name: 'showTousseName', mapping: 'showTousseName' },
+ { name: 'barcode', mapping: 'barcode' },
+ { name: 'storageLocation', mapping: 'storageLocation' },
+ { name: 'validUntilStr', mapping: 'validUntilStr' }
])
- });
- operationReservationStore.load();
+ });
+ operationReservationStore.load();
var selectModel = new top.Ext.grid.CheckboxSelectionModel();
-
- var operationReservationGrid = new top.Ext.grid.GridPanel({
- id :'operationReservationlGrid',
- store: operationReservationStore,
- cm: new top.Ext.grid.ColumnModel([selectModel,
+
+ var operationReservationGrid = new top.Ext.grid.GridPanel({
+ id: 'operationReservationlGrid',
+ store: operationReservationStore,
+ cm: new top.Ext.grid.ColumnModel([selectModel,
{
menuDisabled: true,
- header : "器械包名称",
- width:250,
- dataIndex : 'showTousseName'
- },{
+ header: "器械包名称",
+ width: 250,
+ dataIndex: 'showTousseName'
+ }, {
menuDisabled: true,
- header : "器械包条码",
- width:80,
- dataIndex : 'barcode'
- },{
+ header: "器械包条码",
+ width: 80,
+ dataIndex: 'barcode'
+ }, {
menuDisabled: true,
- header : "抽屉名称",
- width:130,
- dataIndex : 'storageLocation'
- },{
+ header: "抽屉名称",
+ width: 130,
+ dataIndex: 'storageLocation'
+ }, {
menuDisabled: true,
- header : "失效日期",
- width:120,
- dataIndex : 'validUntilStr'
+ header: "失效日期",
+ width: 120,
+ dataIndex: 'validUntilStr'
}
- ]),
- sm:selectModel,
- viewConfig: {forceFit:true},
- height: 240,
- frame : false
- });
+ ]),
+ sm: selectModel,
+ viewConfig: { forceFit: true },
+ height: 240,
+ frame: false
+ });
var configWin = new top.Ext.Window({
id: 'configWin',
@@ -123,7 +123,7 @@
border: false,
plain: true,
modal: true,
- buttonAlign:'center',
+ buttonAlign: 'center',
items: [{
region: 'center',
width: 500,
@@ -134,20 +134,20 @@
text: '保存',
handler: function () {
var records = operationReservationGrid.getSelectionModel().getSelections();
- if(records.length > 0){
+ if (records.length > 0) {
var orgUnitCoding = top.Ext.getCmp('orgUnitCoding').getValue();
- for(var i=0;i" + v + "
";
+ return "" + v + "
";
}
-
+
//发货状态
- function renderDeliverStatusColor(v, p, record){
+ function renderDeliverStatusColor(v, p, record) {
var status = record.data['deliverStatus'];
var color = "";
- if("待发货" == status){//待发货 黄色
+ if ("待发货" == status) {//待发货 黄色
color = "yellow";
- }else if("部分发货" == status){ //部分发货 粉红色
+ } else if ("部分发货" == status) { //部分发货 粉红色
color = "#F5A7FA";
}
- return "" + v + "
";
+ return "" + v + "
";
}
-
+
var columns = [
- {header : "流水号",width : 100,dataIndex : 'serialNumber', renderer : modifyRecord},
- {header : "申请科室",width : 120,dataIndex : 'depart'},
- {header : "申请人",width : 60,dataIndex : 'applicant'},
- {header : "申请时间",width : 120,dataIndex : 'applicationTime', renderer : myDateFormatByMinute},
- {header : "医生",width : 120,dataIndex : 'doctors'},
- {header : "手术时间",width : 120,dataIndex : 'operationTime', renderer : myDateFormatByMinute},
- {header : "手术编号",width : 120,dataIndex : 'scheduleId', renderer : myDateFormatByMinute},
- {header : "手术间",width : 120,dataIndex : 'operationRoom'},
- {header : "手术台次",width : 120,dataIndex : 'consoleName', renderer : myDateFormatByMinute},
- {header : "提交状态",width : 65,dataIndex : 'committedStatus', renderer : renderCommittedStatusColor},
- {header : "发货状态",width : 65,dataIndex : 'deliverStatus', renderer : renderDeliverStatusColor},
- {id:'remark',header: "备注", dataIndex: 'remark'}
- ];
+ { header: "流水号", width: 100, dataIndex: 'serialNumber', renderer: modifyRecord },
+ { header: "申请科室", width: 120, dataIndex: 'depart' },
+ { header: "申请人", width: 60, dataIndex: 'applicant' },
+ { header: "申请时间", width: 120, dataIndex: 'applicationTime', renderer: myDateFormatByMinute },
+ { header: "医生", width: 120, dataIndex: 'doctors' },
+ { header: "手术时间", width: 120, dataIndex: 'operationTime', renderer: myDateFormatByMinute },
+ { header: "手术编号", width: 120, dataIndex: 'scheduleId', renderer: myDateFormatByMinute },
+ { header: "手术间", width: 120, dataIndex: 'operationRoom' },
+ { header: "手术台次", width: 120, dataIndex: 'consoleName', renderer: myDateFormatByMinute },
+ { header: "提交状态", width: 65, dataIndex: 'committedStatus', renderer: renderCommittedStatusColor },
+ { header: "发货状态", width: 65, dataIndex: 'deliverStatus', renderer: renderDeliverStatusColor },
+ { id: 'remark', header: "备注", dataIndex: 'remark' }
+ ];
var readerDetail = [
- {name : 'id'},
- {name : 'serialNumber'},
- {name : 'depart'},
- {name : 'departCoding'},
- {name : 'operationTime'},
- {name : 'applicant'},
- {name : 'applicationTime'},
- {name : 'doctors'},
- {name : 'scheduleId'},
- {name : 'patientName'},
- {name : 'operationName'},
- {name : 'operatingRoom'},
- {name : 'consoleName'},
- {name : 'deliverStatus'},
- {name : 'operationRoom'},
- {name : 'committedStatus'},
- {name : 'remark'}
+ { name: 'id' },
+ { name: 'serialNumber' },
+ { name: 'depart' },
+ { name: 'departCoding' },
+ { name: 'operationTime' },
+ { name: 'applicant' },
+ { name: 'applicationTime' },
+ { name: 'doctors' },
+ { name: 'scheduleId' },
+ { name: 'patientName' },
+ { name: 'operationName' },
+ { name: 'operatingRoom' },
+ { name: 'consoleName' },
+ { name: 'deliverStatus' },
+ { name: 'operationRoom' },
+ { name: 'committedStatus' },
+ { name: 'remark' }
];
-
+
var filters = new Ext.grid.GridFilters({
- filters:[
- {type: 'string', dataIndex: 'serialNumber'},
- {type: 'string', dataIndex: 'depart'},
- {type: 'string', dataIndex: 'applicant'},
- {type: 'string', dataIndex: 'doctors'},
- {type: 'string', dataIndex: 'deliverStatus'},
- {type: 'string', dataIndex: 'remark'}
- ]}
+ filters: [
+ { type: 'string', dataIndex: 'serialNumber' },
+ { type: 'string', dataIndex: 'depart' },
+ { type: 'string', dataIndex: 'applicant' },
+ { type: 'string', dataIndex: 'doctors' },
+ { type: 'string', dataIndex: 'deliverStatus' },
+ { type: 'string', dataIndex: 'remark' }
+ ]
+ }
);
var sign = true;
var tbar = [{
- text : '添加',
- hidden : true,
- iconCls : 'btn_ext_application_add',
- handler : function() {
+ text: '添加',
+ hidden: true,
+ iconCls: 'btn_ext_application_add',
+ handler: function () {
editOperationReservation("");
}
}, {
- text : '删除',
- hidden : true,
- iconCls : 'btn_ext_application_del',
- handler : function() {
+ text: '删除',
+ hidden: true,
+ iconCls: 'btn_ext_application_del',
+ handler: function () {
deleteOperationReservation(grid);
}
}, {
- text : '刷新列表',
- iconCls : 'btn_ext_refresh1',
- handler : function() {
+ text: '刷新列表',
+ iconCls: 'btn_ext_refresh1',
+ handler: function () {
grid.dwrReload();
}
}];
- grid = new Ext.ux.ForgonPageGrid( {
- id:'operationReservationInvoiceView_grid',
- tbar : tbar,
- pageSize : 20,
- defaultSortField : 'id',
- title : entityName + '列表',
- defaultSortDirection : 'DESC',
- isCheckboxSelectionModel : true,
- rememberSelected : false,
- isShowSearchField : true,
- columns : columns,
+ grid = new Ext.ux.ForgonPageGrid({
+ id: 'operationReservationInvoiceView_grid',
+ tbar: tbar,
+ pageSize: 20,
+ defaultSortField: 'id',
+ title: entityName + '列表',
+ defaultSortDirection: 'DESC',
+ isCheckboxSelectionModel: true,
+ rememberSelected: false,
+ isShowSearchField: true,
+ columns: columns,
plugins: filters,
- autoExpandColumn : 'remark',
- renderTo : 'gridDiv',
- frame : false
+ autoExpandColumn: 'remark',
+ renderTo: 'gridDiv',
+ frame: false
}, readerDetail,
OperationReservationTableManager.findWaitingForDeliveryOperationReservationTableList,
- null
+ null
);
- var viewport = new Ext.Viewport( {
- layout : 'border',
- items : [{
- region : 'center',
- margins : '0 0 0 0',
- layout : 'fit',
- items : grid
+ var viewport = new Ext.Viewport({
+ layout: 'border',
+ items: [{
+ region: 'center',
+ margins: '0 0 0 0',
+ layout: 'fit',
+ items: grid
}]
});
});
@@ -294,28 +295,28 @@
var lastLoadWarehouseId = null;
var wareHouseStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/wareHouseAction!getWareHouseData.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/wareHouseAction!getWareHouseData.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- totalProperty : 'totalCount',
- root : 'data'
+ reader: new Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
}, [
- {name : 'id',mapping : 'id'},
- {name : 'name',mapping : 'name'},
- {name : 'orgUnitCode',mapping : 'orgUnitCode'}
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' },
+ { name: 'orgUnitCode', mapping: 'orgUnitCode' }
]),
- listeners : {
- load : function(store,records) {
+ listeners: {
+ load: function (store, records) {
var id = top.Ext.getCmp('sourceWarehouseId').getValue();
//var name = top.Ext.getCmp('sourceWarehouseName').getValue();
- if(records.length > 0 && (id == null || id == '')){
+ if (records.length > 0 && (id == null || id == '')) {
//id=records[0].data.id;
//name = records[0].data.name;
var combo = top.Ext.getCmp("warehouse");
// 触发选中事件
- combo.fireEvent('select', combo,records[0],0);
+ combo.fireEvent('select', combo, records[0], 0);
}
//top.Ext.getCmp('warehouse').setValue(id);
//top.Ext.getCmp('sourceWarehouseId').setValue(id);
@@ -325,138 +326,138 @@
});
var storageLocationStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/storageLocationAction!loadStorageLocationByOrgUnitCode.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/storageLocationAction!loadStorageLocationByOrgUnitCode.do',
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- totalProperty : 'totalCount',
- root : 'data'
+ reader: new Ext.data.JsonReader({
+ totalProperty: 'totalCount',
+ root: 'data'
}, [
- {name : 'id',mapping : 'id'},
- {name : 'name',mapping : 'name'},
- {name : 'barcode',mapping : 'barcode'},
- {name : 'storageLocationCode',mapping : 'storageLocationCode'}
+ { name: 'id', mapping: 'id' },
+ { name: 'name', mapping: 'name' },
+ { name: 'barcode', mapping: 'barcode' },
+ { name: 'storageLocationCode', mapping: 'storageLocationCode' }
]),
- listeners : {
- beforeload:function(thiz){
- if(top.Ext.getCmp('orgUnitCoding')){
+ listeners: {
+ beforeload: function (thiz) {
+ if (top.Ext.getCmp('orgUnitCoding')) {
thiz.baseParams["orgUnitCode"] = top.Ext.getCmp('orgUnitCoding').getValue();
}
}
}
});
-if(sstsConfig.disableLoadToVirtualBasket == false){
+if (sstsConfig.disableLoadToVirtualBasket == false) {
beginBarcodeLabel = '条码/篮筐(首):';
hiddenEndBarcode = false;//显示尾篮筐
}
//条码扫描模式(单个条码逐个扫描或首尾条码段扫描两种模式)
var currentScanMode = "single";
-if(sstsConfig.invoicePageScanMode && sstsConfig.invoicePageScanMode != null){
+if (sstsConfig.invoicePageScanMode && sstsConfig.invoicePageScanMode != null) {
currentScanMode = sstsConfig.invoicePageScanMode;
}
-function getDefaultAmount(v,p,record){
- if (v==null || v.length <= 0){
+function getDefaultAmount(v, p, record) {
+ if (v == null || v.length <= 0) {
return 0;
- }else{
- return v;
+ } else {
+ return v;
}
}
-function formatStorage(v,p,record){
- if (v==null || v.length <= 0){
+function formatStorage(v, p, record) {
+ if (v == null || v.length <= 0) {
return '';
- }else{
- return v;
+ } else {
+ return v;
}
}
-function sayGoods(record){
- if(record && record.data){
+function sayGoods(record) {
+ if (record && record.data) {
speaker.speak(record.data.showTousseName + ",数量为" + record.data.count);
}
}
//发货单明细累减
-function updateAmount1(name,amount){
- if(name != null && name.length > 0){
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
- var record = recyclingapplicationStore.getAt(i);
- var tempName = record.get('name');
- var tempAmount = record.get('tempAmount');
- if(tempName == name){
- if(tempAmount==null || tempAmount.length <= 0){
- tempAmount = 0;
- }
- record.set('tempAmount',Number(tempAmount) - Number(amount));
+function updateAmount1(name, amount) {
+ if (name != null && name.length > 0) {
+ for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
+ var record = recyclingapplicationStore.getAt(i);
+ var tempName = record.get('name');
+ var tempAmount = record.get('tempAmount');
+ if (tempName == name) {
+ if (tempAmount == null || tempAmount.length <= 0) {
+ tempAmount = 0;
+ }
+ record.set('tempAmount', Number(tempAmount) - Number(amount));
updateErrorAmount(record);
refreshTotalAmount();
- }
+ }
}
}
return false;
}
//删除发货扫描的物品
-function removeSendOutGoods(id){
+function removeSendOutGoods(id) {
var rows = top.Ext.getCmp('sendOutGoods').getSelectionModel().getSelections();// 返回值为
if (rows) {
- for ( var i = 0; i < rows.length; i++) {
+ for (var i = 0; i < rows.length; i++) {
var name = rows[i].data['name'];
- var amount = rows[i].data['count'];
+ var amount = rows[i].data['count'];
sendOutGoodsStore.remove(rows[i]);
- updateAmount1(name,amount);
+ updateAmount1(name, amount);
sendDeleteScannedGoodsLog(rows[i].data);
}
}
}
//删除发货明细项
-function removeSendOutGoodsDetail(id){
+function removeSendOutGoodsDetail(id) {
var rows = top.Ext.getCmp('sendOutGoodsDetail').getSelectionModel().getSelections();// 返回值为
if (rows) {
- for ( var i = 0; i < rows.length; i++) {
+ for (var i = 0; i < rows.length; i++) {
var name = rows[i].data['name'];
- var amount = rows[i].data['count'];
+ var amount = rows[i].data['count'];
recyclingapplicationStore.remove(rows[i]);
}
}
}
//删除发货明细项
-function removeSendOutTousseByBarcode(barcode){
- var record = findRecordByNameAndValueFromStore(sendOutGoodsStore,'barcode',barcode);
- if(record != null){
+function removeSendOutTousseByBarcode(barcode) {
+ var record = findRecordByNameAndValueFromStore(sendOutGoodsStore, 'barcode', barcode);
+ if (record != null) {
var name = record.data['name'];
- sendOutGoodsStore.remove(record);
- updateAmount1(name,1);
+ sendOutGoodsStore.remove(record);
+ updateAmount1(name, 1);
}
}
//验证条码是否重复扫描
-function isBarcodeRepeat(barcode){
- if(barcode != null && barcode.length > 0){
- for ( var i = 0; i < sendOutGoodsStore.getCount(); i++) {
- var record = sendOutGoodsStore.getAt(i);
- var tempBarcode =record.get('barcode');
- if(barcode == tempBarcode){
- return true;
- break;
- }
+function isBarcodeRepeat(barcode) {
+ if (barcode != null && barcode.length > 0) {
+ for (var i = 0; i < sendOutGoodsStore.getCount(); i++) {
+ var record = sendOutGoodsStore.getAt(i);
+ var tempBarcode = record.get('barcode');
+ if (barcode == tempBarcode) {
+ return true;
+ break;
+ }
}
}
return false;
}
-function removeTousseIfNeeded(goods){
+function removeTousseIfNeeded(goods) {
var barcode = goods.barcode;
- if(isBarcodeRepeat(barcode)){
+ if (isBarcodeRepeat(barcode)) {
var name = goods.name;
for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
var record = recyclingapplicationStore.getAt(i);
var tempName = record.get('name');
var tempAmount = record.get('tempAmount');
- if(tempName == name){
+ if (tempName == name) {
var errorAmount = record.get('errorAmount');
- if(errorAmount < 0){
+ if (errorAmount < 0) {
removeSendOutTousseByBarcode(barcode);
return true;
}
@@ -468,75 +469,75 @@
//扫描的物品是否是待发货物品
//name不是showTousseName字段
-function isInvoiceGoods(name){
- if(name != null && name.length > 0){
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
- var record = recyclingapplicationStore.getAt(i);
- var name1 =record.get('name');
- if(name == name1){
- return true;
- break;
- }
+function isInvoiceGoods(name) {
+ if (name != null && name.length > 0) {
+ for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
+ var record = recyclingapplicationStore.getAt(i);
+ var name1 = record.get('name');
+ if (name == name1) {
+ return true;
+ break;
+ }
}
}
return false;
}
//发货单明细累加
-function updateAmount(name,amount){
- if(name != null && name.length > 0){
+function updateAmount(name, amount) {
+ if (name != null && name.length > 0) {
for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
var record = recyclingapplicationStore.getAt(i);
var tempName = record.get('name');
var tempAmount = record.get('tempAmount');
- if(tempName == name){
- if(tempAmount==null || tempAmount.length <= 0){
+ if (tempName == name) {
+ if (tempAmount == null || tempAmount.length <= 0) {
tempAmount = 0;
}
- record.set('tempAmount',Number(amount) + Number(tempAmount));
+ record.set('tempAmount', Number(amount) + Number(tempAmount));
updateErrorAmount(record);
refreshTotalAmount();
}
}
}
return false;
}
-function updateErrorAmount(record){
+function updateErrorAmount(record) {
var awaitSendingAmount = record.get('count');
var sentAmount = record.get('tempAmount');
- record.set('errorAmount',awaitSendingAmount - sentAmount);
+ record.set('errorAmount', awaitSendingAmount - sentAmount);
}
-function initErrorAmount(){
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
- var record = recyclingapplicationStore.getAt(i);
- var awaitSendingAmount = record.get('count');
- var sentAmount = record.get('tempAmount');
- record.set('errorAmount',awaitSendingAmount - sentAmount);
+function initErrorAmount() {
+ for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
+ var record = recyclingapplicationStore.getAt(i);
+ var awaitSendingAmount = record.get('count');
+ var sentAmount = record.get('tempAmount');
+ record.set('errorAmount', awaitSendingAmount - sentAmount);
}
}
//校验物品数量是否为数字
function validGridAmount() {
//申请的物品
var b = true;
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
- var record = recyclingapplicationStore.getAt(i);
- var count =record.get('count');
- if(/[^0-9]/g.test(count)){
- showResult('['+record.get('name')+'] 申请数量必须是数字,保存失败!');
- top.Ext.getCmp('sendOutGoodsDetail').getView().getRow(i).style.backgroundColor = '#FFB5B5';
- b = false;
- break;
- }
+ for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
+ var record = recyclingapplicationStore.getAt(i);
+ var count = record.get('count');
+ if (/[^0-9]/g.test(count)) {
+ showResult('[' + record.get('name') + '] 申请数量必须是数字,保存失败!');
+ top.Ext.getCmp('sendOutGoodsDetail').getView().getRow(i).style.backgroundColor = '#FFB5B5';
+ b = false;
+ break;
+ }
}
- for ( var i = 0; i < sendOutGoodsStore.getCount(); i++) {
- var record = sendOutGoodsStore.getAt(i);
- var count =record.get('count');
- if(/[^0-9]/g.test(count)){
- showResult('['+record.get('name')+'] 申请数量必须是数字,保存失败!');
- top.Ext.getCmp('sendOutGoods').getView().getRow(i).style.backgroundColor = '#FFB5B5';
- b = false;
- break;
- }
+ for (var i = 0; i < sendOutGoodsStore.getCount(); i++) {
+ var record = sendOutGoodsStore.getAt(i);
+ var count = record.get('count');
+ if (/[^0-9]/g.test(count)) {
+ showResult('[' + record.get('name') + '] 申请数量必须是数字,保存失败!');
+ top.Ext.getCmp('sendOutGoods').getView().getRow(i).style.backgroundColor = '#FFB5B5';
+ b = false;
+ break;
+ }
}
return b;
}
@@ -545,355 +546,376 @@
function validTousseGridData() {
//申请的物品
var b = true;
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
- var record = recyclingapplicationStore.getAt(i);
- var count =record.get('count');
- var tempAmount = record.get('tempAmount');
- var applicationAmount = record.get('applicationAmount');
- if(count != tempAmount){//实际数量要与发货数量相同
- b = false;
- top.Ext.getCmp('sendOutGoodsDetail').getView().getRow(i).style.backgroundColor = '#FFB5B5';
- showResult(record.get('showTousseName')+" 发货数量与实发数量不同!");
- }
- if(Number(count) > Number(applicationAmount)){//发货数量不能大于待发货数量
- b = false;
- top.Ext.getCmp('sendOutGoodsDetail').getView().getRow(i).style.backgroundColor = '#FFB5B5';
- showResult(record.get('name')+" 发货数量不能大于" + applicationAmount);
- }
+ for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
+ var record = recyclingapplicationStore.getAt(i);
+ var count = record.get('count');
+ var tempAmount = record.get('tempAmount');
+ var applicationAmount = record.get('applicationAmount');
+ if (count != tempAmount) {//实际数量要与发货数量相同
+ b = false;
+ top.Ext.getCmp('sendOutGoodsDetail').getView().getRow(i).style.backgroundColor = '#FFB5B5';
+ showResult(record.get('showTousseName') + " 发货数量与实发数量不同!");
+ }
+ if (Number(count) > Number(applicationAmount)) {//发货数量不能大于待发货数量
+ b = false;
+ top.Ext.getCmp('sendOutGoodsDetail').getView().getRow(i).style.backgroundColor = '#FFB5B5';
+ showResult(record.get('name') + " 发货数量不能大于" + applicationAmount);
+ }
}
return b;
}
var addGridItem = Ext.data.Record.create([
- {name : 'id'},
- {name : 'barcode'},
- {name : 'name'},
- {name : 'showTousseName'},
- {name : 'count'},
- {name : 'diposable'},
- {name : 'price'},
- {name : 'fluctuationPrice'},
- {name : 'storage'},
- {name : 'batchNumber'},
- {name : 'tousseType'},
- {name : 'typeInfoOnScanned'},
- {name : 'sterilizerName'},
- {name : 'frequency'},
- {name : 'isTracable'},
- {name : 'tousseDefinitionId'}
- ]);
+ { name: 'id' },
+ { name: 'barcode' },
+ { name: 'name' },
+ { name: 'showTousseName' },
+ { name: 'count' },
+ { name: 'diposable' },
+ { name: 'price' },
+ { name: 'fluctuationPrice' },
+ { name: 'storage' },
+ { name: 'batchNumber' },
+ { name: 'tousseType' },
+ { name: 'typeInfoOnScanned' },
+ { name: 'sterilizerName' },
+ { name: 'frequency' },
+ { name: 'isTracable' },
+ { name: 'tousseDefinitionId' }
+]);
// 根据条码获取发送项
-function getSendOutGoodsByBarcode(barcode){
- if(isUndefinedOrNullOrEmpty(barcode)){
+function getSendOutGoodsByBarcode(barcode) {
+ if (isUndefinedOrNullOrEmpty(barcode)) {
return null;
}
- for ( var i = 0; i < sendOutGoodsStore.getCount(); i++) {
- var record = sendOutGoodsStore.getAt(i);
- var tempBarcode =record.get('barcode');
- if(barcode == tempBarcode){
- return record.data;
- }
+ for (var i = 0; i < sendOutGoodsStore.getCount(); i++) {
+ var record = sendOutGoodsStore.getAt(i);
+ var tempBarcode = record.get('barcode');
+ if (barcode == tempBarcode) {
+ return record.data;
+ }
}
return null;
}
// 名字到数量的map
-function getTousseNameToAmountMap(scannedResult){
+function getTousseNameToAmountMap(scannedResult) {
var map = {};
- for(var i=0;i 0 && notSendAmount < storageAmount){// 待发货数量小于库存
-// count = notSendAmount;
-// }else{
-// count = storageAmount;
-// }
+ // var waitDeliveryCount = record.data['count'];// 申请数量
+ // var sendAmount = Number(record.data['tempAmount']);// 已扫描数量
+ // var notSendAmount = Number(waitDeliveryCount) - Number(sendAmount);// 待发货数量
+ // var sendAmount = 0 ;
+ // if(notSendAmount > 0 && notSendAmount < storageAmount){// 待发货数量小于库存
+ // count = notSendAmount;
+ // }else{
+ // count = storageAmount;
+ // }
count = storageAmount;
-
+
var price = goods.price;
var record = new addGridItem({
- id : 0,
- barcode : goods.barcode,
- name : goods.name,
- showTousseName : goods.showTousseName,
- count : count,
- diposable : goods.diposable,
- price : price,
- fluctuationPrice : goods.fluctuationPrice,
- storage : storageAmount,
- batchNumber : goods.batchNumber,
- tousseType : goods.tousseType,
- typeInfoOnScanned : goods.typeInfoOnScanned,
- sterilizerName : goods.sterilizerName,
- frequency : goods.frequency,
- isTracable : goods.isTracable,
- tousseDefinitionId : goods.tousseDefinitionId,
- externalCode : goods.externalCode,
- isRoutine : goods.isRoutine
+ id: 0,
+ barcode: goods.barcode,
+ name: goods.name,
+ showTousseName: goods.showTousseName,
+ count: count,
+ diposable: goods.diposable,
+ price: price,
+ fluctuationPrice: goods.fluctuationPrice,
+ storage: storageAmount,
+ batchNumber: goods.batchNumber,
+ tousseType: goods.tousseType,
+ typeInfoOnScanned: goods.typeInfoOnScanned,
+ sterilizerName: goods.sterilizerName,
+ frequency: goods.frequency,
+ isTracable: goods.isTracable,
+ tousseDefinitionId: goods.tousseDefinitionId,
+ externalCode: goods.externalCode,
+ isRoutine: goods.isRoutine
});
-// sendOutGoodsStore.add(record);
- sendOutGoodsStore.insert(0,record);
- speakBasket.addGoods('',record.data.showTousseName,record.data.count);
-// clearScanText();
- updateAmount(goods.name,count);
+ // sendOutGoodsStore.add(record);
+ sendOutGoodsStore.insert(0, record);
+ speakBasket.addGoods('', record.data.showTousseName, record.data.count);
+ // clearScanText();
+ updateAmount(goods.name, count);
}
-function clearScanText(){
+function clearScanText() {
var barcodeEnd = top.Ext.getCmp("scanTextEnd").getValue().Trim();
- if(barcodeEnd == ''){
- if(hiddenEndBarcode || currentScanMode == 'single'){
+ if (barcodeEnd == '') {
+ if (hiddenEndBarcode || currentScanMode == 'single') {
top.Ext.getCmp('scanText').setValue("");//如果使用虚拟篮筐机制,扫描成功后需要清除该文本内容
- }else{
+ } else {
top.Ext.getCmp('scanTextEnd').focus();//否则不清除,条码/篮筐(尾)获得焦点
}
}
}
-function getApplicationGoodsByName(goodsName){
- var record = findRecordByNameAndValueFromStore(recyclingapplicationStore,"name",goodsName);
- if(record != null){
+function getApplicationGoodsByName(goodsName) {
+ var record = findRecordByNameAndValueFromStore(recyclingapplicationStore, "name", goodsName);
+ if (record != null) {
return record.data;
}
return null;
}
-function preprocessBeforeGetBarcodeInfo(newBarcode){
+function preprocessBeforeGetBarcodeInfo(newBarcode) {
var barcode = top.Ext.getCmp("scanText").getValue().Trim();
var barcodeEnd = top.Ext.getCmp("scanTextEnd").getValue().Trim();
var singleMode = true;
- if(barcodeEnd != ''){
+ if (barcodeEnd != '') {
singleMode = false;
}
- if(newBarcode){
+ if (newBarcode) {
barcode = newBarcode;
}
var sourceWarehouseId = top.Ext.getCmp("sourceWarehouseId").getValue();
- if(isUndefinedOrNullOrEmpty(sourceWarehouseId)){
+ if (isUndefinedOrNullOrEmpty(sourceWarehouseId)) {
showResult('请先选择仓库!');
return false;
}
- if(singleMode){// 判断是否已经扫描过该条码
+ if (singleMode) {// 判断是否已经扫描过该条码
var goods = getSendOutGoodsByBarcode(barcode);
- if(goods != null){
- if(goods.tousseType == '器械包'){// 目前只处理普通器械包的误差,以及删除
+ if (goods != null) {
+ if (goods.tousseType == '器械包') {// 目前只处理普通器械包的误差,以及删除
var appGoods = getApplicationGoodsByName(goods.name);
- if(appGoods){
- if(appGoods.errorAmount >= 0){// 误差数量大于等于0时,能正常发货,此时重复扫描,按以前的逻辑处理,提示条码已存在
- showResult('条形码:'+barcode+' 已经存在!');
+ if (appGoods) {
+ if (appGoods.errorAmount >= 0) {// 误差数量大于等于0时,能正常发货,此时重复扫描,按以前的逻辑处理,提示条码已存在
+ showResult('条形码:' + barcode + ' 已经存在!');
return false;
- }else{// 误差数量小于0时,说明扫描数量已经大于申请数量,此时重复扫描某个包,需要删除该包。
+ } else {// 误差数量小于0时,说明扫描数量已经大于申请数量,此时重复扫描某个包,需要删除该包。
// 删除该器械包
removeSendOutTousseByBarcode(goods.barcode);
return false;
}
- }else{
- showResult('条形码:'+barcode+' 已经存在!');
+ } else {
+ showResult('条形码:' + barcode + ' 已经存在!');
return false;
}
- }else{
- showResult('条形码:'+barcode+' 已经存在!');
+ } else {
+ showResult('条形码:' + barcode + ' 已经存在!');
return false;
}
}
}
return true;
}
//扫描发货物品
-function loadGoodsByBarcode(orgUnitCoding,newBarcode) {
+function loadGoodsByBarcode(orgUnitCoding, newBarcode) {
var barcode = top.Ext.getCmp("scanText").getValue().Trim();
var barcodeEnd = top.Ext.getCmp("scanTextEnd").getValue().Trim();
var singleMode = true;
- if(barcodeEnd != ''){
+ if (barcodeEnd != '') {
singleMode = false;
}
var sourceWarehouseId = top.Ext.getCmp("sourceWarehouseId").getValue();
- if(!preprocessBeforeGetBarcodeInfo(newBarcode)){
+ if (!preprocessBeforeGetBarcodeInfo(newBarcode)) {
return;
}
// 如果条码/篮筐(尾)不为空
- if(barcodeEnd != ''){
+ if (barcodeEnd != '') {
barcode += ";" + barcodeEnd;
}
- if(newBarcode){
+ if (newBarcode) {
barcode = newBarcode;
}
// 开始查询条码信息
top.Ext.getCmp("sendOutGoods").getEl().mask("后台处理中,请稍候...");
- Ext.Ajax.timeout=300*1000;
+ Ext.Ajax.timeout = 300 * 1000;
clearScanText();// 清除条码
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/invoiceAction!loadGoodsByBarcode.do',
- params : {barcode : barcode,orgUnitCoding : orgUnitCoding,sourceWarehouseId: sourceWarehouseId,invoiceType: TYPE_OPERATION_RESERVATION},
- success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/invoiceAction!loadGoodsByBarcode.do',
+ params: { barcode: barcode, orgUnitCoding: orgUnitCoding, sourceWarehouseId: sourceWarehouseId, invoiceType: TYPE_OPERATION_RESERVATION },
+ success: function (response, options) {
top.Ext.getCmp("sendOutGoods").getEl().unmask();
var result = Ext.decode(response.responseText);
+ if (result.data.length == 0) {
+ showResult("找不到该条码对应的信息。");
+ return;
+ }
// 首先处理错误信息
- if(!isUndefinedOrNullOrEmpty(result.errMsg)){
+ if (!isUndefinedOrNullOrEmpty(result.errMsg)) {
+ if (sstsConfig.enableAbnormalItemListFixedDisplay) {
+ var typeInfoOnScanned = result.data[0].typeInfoOnScanned;
+ if (typeInfoOnScanned !== "orgUnit") {
+ if (sstsConfig.isUseAbnormalGoodsTable && sstsConfig.isUseAbnormalGoodsTable == true) {
+ //加入异常物品列表
+ if (result.data[0].barcode != null) {
+ addAbnormalGoods(result.data[0]);
+ }
+ }
+ }
+ }
showResult(result.errMsg);
return;
}
- if(result.data.length == 0){
- showResult("找不到该条码对应的信息。");
- return;
- }
// 验证灭菌筐内的物品是否符合发货条件,扫描的器械包数量是否大于申请数量
var tousseNameToAmountMap = getTousseNameToAmountMap(result);
var exceedAmountNames = {};// 超过待发数量的包
- if(result.isContainer != undefined && result.isContainer == true){
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
- var record = recyclingapplicationStore.getAt(i);
- var name1 =record.get('name');
- var count =record.get('count');
- var tempAmount = record.get('tempAmount');
- var totalAmount = 0;
- if(tousseNameToAmountMap.hasOwnProperty(name1)){
- totalAmount = tousseNameToAmountMap[name1];
- }
- //待发数量是否大于篮筐内该物品的数量
- var sendAmount = Number(count) - Number(tempAmount);// 待发数量
- if(sendAmount < Number(totalAmount)){
- exceedAmountNames[name1] = {
- scannedAmount: totalAmount
- }
- }
+ if (result.isContainer != undefined && result.isContainer == true) {
+ for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
+ var record = recyclingapplicationStore.getAt(i);
+ var name1 = record.get('name');
+ var count = record.get('count');
+ var tempAmount = record.get('tempAmount');
+ var totalAmount = 0;
+ if (tousseNameToAmountMap.hasOwnProperty(name1)) {
+ totalAmount = tousseNameToAmountMap[name1];
+ }
+ //待发数量是否大于篮筐内该物品的数量
+ var sendAmount = Number(count) - Number(tempAmount);// 待发数量
+ if (sendAmount < Number(totalAmount)) {
+ exceedAmountNames[name1] = {
+ scannedAmount: totalAmount
+ }
+ }
}
}
- for( var name in exceedAmountNames ){
- if(exceedAmountNames.hasOwnProperty(name)){
-// showResult(name + ",篮筐内数量大于申请数量,请逐个扫描!");
+ for (var name in exceedAmountNames) {
+ if (exceedAmountNames.hasOwnProperty(name)) {
+ // showResult(name + ",篮筐内数量大于申请数量,请逐个扫描!");
}
}
-
+
var speakBasket = new SpeakBasket();
- for(var x=0;x 0){
-// showResult(msg);
-// }
-// }
+ addGoods(goods, speakBasket);
+ }
+
+ // for(var x=0;x 0){
+ // showResult(msg);
+ // }
+ // }
speakBasket.speakContent();
-// if(result.data.length > 0 && alreadyAddAmount == 0){
-// showResult("器械包已扫描或不在发货单中");
-// }
+ // if(result.data.length > 0 && alreadyAddAmount == 0){
+ // showResult("器械包已扫描或不在发货单中");
+ // }
},
- failure : function(response, options) {
+ failure: function (response, options) {
top.Ext.getCmp("sendOutGoods").getEl().unmask();
showResult('获取条码信息失败');
}
-
+
});
}
//发货单明细修改
function updateAmount2(name, amount) {
if (name != null && name.length > 0) {
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
+ for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
var record = recyclingapplicationStore.getAt(i);
var tempName = record.get('name');
var tempAmount = record.get('tempAmount');
@@ -917,167 +939,167 @@
//}
//
function findRecordByGoodsVOFromRecyclingApplication(vo) {
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
+ for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
var record = recyclingapplicationStore.getAt(i);
var name = record.get('name');
var diposable = record.get('diposable');
- if(name == vo.name && diposable != vo.diposable){
- var msg = '待发物品['+name+']为一次性物品,请扫描一次性物品条码!';
- if(diposable != '是'){
- msg = '待发物品['+name+']为器械包,请扫描器械包条码!';
+ if (name == vo.name && diposable != vo.diposable) {
+ var msg = '待发物品[' + name + ']为一次性物品,请扫描一次性物品条码!';
+ if (diposable != '是') {
+ msg = '待发物品[' + name + ']为器械包,请扫描器械包条码!';
}
showResult(msg);
return null;
}
- if(name == vo.name && diposable == vo.diposable){
+ if (name == vo.name && diposable == vo.diposable) {
return record;
}
}
return null;
}
//刷新库存
-function refreshStorage(warehouseId){
-// if(lastLoadWarehouseId != null && lastLoadWarehouseId == warehouseId){
-// return;
-// }
+function refreshStorage(warehouseId) {
+ // if(lastLoadWarehouseId != null && lastLoadWarehouseId == warehouseId){
+ // return;
+ // }
var ids = '';
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
- var record = recyclingapplicationStore.getAt(i);
- var data = record.data;
- if(data.diposable != '是'){
- continue;
- }
- var disposableGoodsIdSet = data.disposableGoodsIdSet;
- if(disposableGoodsIdSet.length > 0){
- for(var di=0;di 0) {
+ for (var di = 0; di < disposableGoodsIdSet.length; ++di) {
+ var disposableGoodsId = disposableGoodsIdSet[di];
+ if (ids == '') {
+ ids = disposableGoodsId;
+ } else {
+ ids += ',' + disposableGoodsId;
+ }
+ }
+ }
}
- if(ids == ''){
+ if (ids == '') {
return;
}
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/diposableGoodsAction!getStorageByDisposableGoodsIds.do',
- params : {disposableGoodsIds : ids,warehouseId:warehouseId},
- success : function(response, options) {
+ url: WWWROOT + '/disinfectSystem/diposableGoodsAction!getStorageByDisposableGoodsIds.do',
+ params: { disposableGoodsIds: ids, warehouseId: warehouseId },
+ success: function (response, options) {
lastLoadWarehouseId = warehouseId;
var storages = JSON.parse(response.responseText);
setStorage(storages);
},
- failure : function(form, action) {
+ failure: function (form, action) {
}
});
}
// 刷新总包数
-function refreshTotalAmount(){
+function refreshTotalAmount() {
var appAmount = 0;
var scannedAmount = 0;
- for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) {
- var record = recyclingapplicationStore.getAt(i);
- var tempScannedAmount = record.get('tempAmount');
- var tempAppAmount = record.get('count');
- var diposable = record.get('diposable');
- if('是' == diposable){
- continue;
- }
- tempAppAmount = Number(tempAppAmount);
- tempScannedAmount = Number(tempScannedAmount);
- appAmount += tempAppAmount;
- scannedAmount += tempScannedAmount;
+ for (var i = 0; i < recyclingapplicationStore.getCount(); i++) {
+ var record = recyclingapplicationStore.getAt(i);
+ var tempScannedAmount = record.get('tempAmount');
+ var tempAppAmount = record.get('count');
+ var diposable = record.get('diposable');
+ if ('是' == diposable) {
+ continue;
+ }
+ tempAppAmount = Number(tempAppAmount);
+ tempScannedAmount = Number(tempScannedAmount);
+ appAmount += tempAppAmount;
+ scannedAmount += tempScannedAmount;
}
- var text = '申请总包数:'+appAmount+',已扫总包数:'+scannedAmount;
+ var text = '申请总包数:' + appAmount + ',已扫总包数:' + scannedAmount;
var amountElement = top.Ext.getCmp('tousseAmountInfo');
- if(amountElement != null){
+ if (amountElement != null) {
amountElement.setText(text);
}
}
-function setStorage(storages){
- if(storages.length > 0){
- for ( var i = 0; i < storages.length; i++) {
+function setStorage(storages) {
+ if (storages.length > 0) {
+ for (var i = 0; i < storages.length; i++) {
var storage = storages[i];
- var record = findRecordByNameAndValueFromStore(recyclingapplicationStore,'name',storage.name);
- if(record){
- record.set('storage',storage.storage);
+ var record = findRecordByNameAndValueFromStore(recyclingapplicationStore, 'name', storage.name);
+ if (record) {
+ record.set('storage', storage.storage);
}
}
}
}
-function printInvoiceAfterInvoice(invoiceIds){
- if(!isUndefinedOrNull(invoiceIds)){
- var invoicePrintModule = new InvoicePrintModule(grid,$Id('userName').value);
- if(typeof invoiceIds == 'string'){
- invoicePrintModule.batchPrintInvoiceWithType(invoiceIds,'全部');
- }else {
- invoicePrintModule.batchPrintInvoiceWithType(invoiceIds.join(","),'全部');
+function printInvoiceAfterInvoice(invoiceIds) {
+ if (!isUndefinedOrNull(invoiceIds)) {
+ var invoicePrintModule = new InvoicePrintModule(grid, $Id('userName').value);
+ if (typeof invoiceIds == 'string') {
+ invoicePrintModule.batchPrintInvoiceWithType(invoiceIds, '全部');
+ } else {
+ invoicePrintModule.batchPrintInvoiceWithType(invoiceIds.join(","), '全部');
}
}
}
//BJDXZLYY-42:存储未打印的发货单ID
-function getInvoiceIds(invoiceIds){
+function getInvoiceIds(invoiceIds) {
var hiddenInvoiceIds = top.Ext.getCmp('hiddenInvoiceIds').getValue();
- if(invoiceIds){
- if(hiddenInvoiceIds == ''){
+ if (invoiceIds) {
+ if (hiddenInvoiceIds == '') {
hiddenInvoiceIds = invoiceIds;
- }else {
- hiddenInvoiceIds += ',' + invoiceIds
+ } else {
+ hiddenInvoiceIds += ',' + invoiceIds
}
}
return hiddenInvoiceIds;
}
//发货完成
-function invoiceAfterFun(saveType,invoiceIds,storageLocationName,window){
- if(saveType == 'saveAndPrintPage'){
+function invoiceAfterFun(saveType, invoiceIds, storageLocationName, window) {
+ if (saveType == 'saveAndPrintPage') {
printInvoiceAfterInvoice(invoiceIds);
grid.getStore().reload();
- if(storageLocationName == ''){
+ if (storageLocationName == '') {
window.close();
- }else {
+ } else {
recyclingapplicationStore.load();
sendOutGoodsStore.removeAll();
}
- }else if(saveType == 'saveAndPrintAll'){
+ } else if (saveType == 'saveAndPrintAll') {
var newInvoiceIds = getInvoiceIds(invoiceIds.join(','));
printInvoiceAfterInvoice(newInvoiceIds);
top.Ext.getCmp('hiddenInvoiceIds').setValue('');
grid.getStore().reload();
- if(storageLocationName == ''){
+ if (storageLocationName == '') {
window.close();
- }else {
+ } else {
recyclingapplicationStore.load();
sendOutGoodsStore.removeAll();
}
- }else if(saveType == 'saveAndInvoice'){
+ } else if (saveType == 'saveAndInvoice') {
recyclingapplicationStore.load();
- setTimeout(function(){
- if(recyclingapplicationStore.getCount() > 0){
+ setTimeout(function () {
+ if (recyclingapplicationStore.getCount() > 0) {
var newInvoiceIds = getInvoiceIds(invoiceIds.join(','));
top.Ext.getCmp('hiddenInvoiceIds').setValue(newInvoiceIds);
showResult('发货完成,您可以继续扫描物品进行发货');
sendOutGoodsStore.removeAll();
grid.getStore().reload();
- }else {
+ } else {
showResult('发货成功');
grid.getStore().reload();
- if(storageLocationName == ''){
+ if (storageLocationName == '') {
window.close();
- }else {
+ } else {
sendOutGoodsStore.removeAll();
}
}
}, 500);
- }else {
+ } else {
grid.getStore().reload();
- if(storageLocationName == ''){
+ if (storageLocationName == '') {
window.close();
- }else {
+ } else {
var newInvoiceIds = getInvoiceIds(invoiceIds.join(','));
top.Ext.getCmp('hiddenInvoiceIds').setValue(newInvoiceIds);
recyclingapplicationStore.load();
@@ -1087,85 +1109,85 @@
}
//BJDXZLYY-42:saveType:save保存,saveAndInvoice保存并继续发货,saveAndPrintPage保存并打印当前页,saveAndPrintAll保存并打印所有
-function doSaveAction(form,window,saveType,allowInvoiceStorageLocGoodsWithOutChangeStorageLoc){
+function doSaveAction(form, window, saveType, allowInvoiceStorageLocGoodsWithOutChangeStorageLoc) {
if (!form.getForm().isValid()) {
showResult('请正确填写表单各值');
return false;
}
var bool = validGridAmount();
- if(!bool){
+ if (!bool) {
return false;
}
//BJDXZLYY-46:保存时二次提醒用户相关物品不会更改托盘位置
- if(allowInvoiceStorageLocGoodsWithOutChangeStorageLoc){
+ if (allowInvoiceStorageLocGoodsWithOutChangeStorageLoc) {
top.Ext.getCmp('allowInvoiceStorageLocGoodsWithOutChangeStorageLoc').setValue(true);
}
-
+
getTousseGridData();
-
- Ext.Ajax.timeout = 2.5*60*1000;
- form.form.submit( {
+
+ Ext.Ajax.timeout = 2.5 * 60 * 1000;
+ form.form.submit({
//url : WWWROOT + '/disinfectSystem/invoiceAction!saveDepartInvoice.do',
- url : WWWROOT + '/disinfectSystem/invoiceAction!saveInvoiceByDepartOrInvoicePlanId.do',
- method : 'POST',
- waitMsg : '正在保存数据,请稍候',
- waitTitle : '提交表单',
- timeout:2.5*60*1000,
- success : function(res, action) {
+ url: WWWROOT + '/disinfectSystem/invoiceAction!saveInvoiceByDepartOrInvoicePlanId.do',
+ method: 'POST',
+ waitMsg: '正在保存数据,请稍候',
+ waitTitle: '提交表单',
+ timeout: 2.5 * 60 * 1000,
+ success: function (res, action) {
//BJDXZLYY-46:保存时二次提醒用户相关物品不会更改托盘位置
- if(action.result.alertUserAllowInvoiceStorageLocGoodsWithOutChangeStorageLoc){
+ if (action.result.alertUserAllowInvoiceStorageLocGoodsWithOutChangeStorageLoc) {
top.Ext.Msg.confirm('请确认', '已经存在申请科室库位中的物品,本次发货将不更改库房位置,是否继续?', function (btn) {
if (btn == 'yes') {
- doSaveAction(form,window,saveType,true);
+ doSaveAction(form, window, saveType, true);
}
})
- }else {
+ } else {
showResult(action.result.message);
}
- if(action.result.success){
- if(sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer){
+ if (action.result.success) {
+ if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) {
var storageLocationName = top.Ext.getCmp('storageLocationName').getRawValue();
- invoiceAfterFun(saveType,action.result.invoiceIds,storageLocationName,window);
- }else {
- if(saveType == 'saveAndPrint'){
+ invoiceAfterFun(saveType, action.result.invoiceIds, storageLocationName, window);
+ } else {
+ if (saveType == 'saveAndPrint') {
printInvoiceAfterInvoice(action.result.invoiceIds);
window.close();
grid.getStore().reload();
- }else if(saveType == 'saveAndInvoice'){
+ } else if (saveType == 'saveAndInvoice') {
recyclingapplicationStore.load();
- setTimeout(function(){
- if(recyclingapplicationStore.getCount() > 0){
+ setTimeout(function () {
+ if (recyclingapplicationStore.getCount() > 0) {
showResult('发货完成,您可以继续扫描物品进行发货');
sendOutGoodsStore.removeAll();
grid.getStore().reload();
- }else {
+ } else {
showResult('发货成功');
window.close();
grid.getStore().reload();
}
}, 500);
- }else {
+ } else {
window.close();
grid.getStore().reload();
}
}
}
},
- failure : function(res, action) {
- if(!isUndefinedOrNullOrEmpty(action.result) && !isUndefinedOrNullOrEmpty(action.result.message)){
+ failure: function (res, action) {
+ if (!isUndefinedOrNullOrEmpty(action.result) && !isUndefinedOrNullOrEmpty(action.result.message)) {
//BJDXZLYY-46:保存时二次提醒用户相关物品不会更改托盘位置
- if(action.result.alertUserAllowInvoiceStorageLocGoodsWithOutChangeStorageLoc){
+ if (action.result.alertUserAllowInvoiceStorageLocGoodsWithOutChangeStorageLoc) {
top.Ext.Msg.confirm('请确认', '已经存在申请科室库位中的物品,本次发货将不更改库房位置,是否继续?', function (btn) {
if (btn == 'yes') {
- doSaveAction(form,window,saveType,true);
+ doSaveAction(form, window, saveType, true);
}
})
- }else {
+ } else {
showResult(action.result.message);
}
- }else{
+ } else {
showResult("发货超时,请稍后查看发货单以确定发货是否成功,避免重复发货!");
window.close();
grid.getStore().reload();
@@ -1175,42 +1197,42 @@
}
//取出或存入托盘
-function sendKardexContainerTCPCommand(status){
+function sendKardexContainerTCPCommand(status) {
var storageLocationId = top.Ext.getCmp("storageLocationId").getValue();
var storageLocationAddr = top.Ext.getCmp("storageLocationAddr").getValue();
var kardexContainerHost = top.Ext.getCmp("kardexContainerHost").getValue();
var kardexContainerPort = top.Ext.getCmp("kardexContainerPort").getValue();
- if(storageLocationAddr == ''){
+ if (storageLocationAddr == '') {
showResult('开口不能为空');
return;
}
- if(status == '取出'){
- if(storageLocationId == ''){
+ if (status == '取出') {
+ if (storageLocationId == '') {
showResult('托盘不能为空');
return;
}
- }else {
+ } else {
storageLocationId = 0;
}
var params = {
- storageLocationId:storageLocationId,
- addr:storageLocationAddr,
- status:status,
- host:kardexContainerHost,
- port:kardexContainerPort
+ storageLocationId: storageLocationId,
+ addr: storageLocationAddr,
+ status: status,
+ host: kardexContainerHost,
+ port: kardexContainerPort
}
showResult('已经发送命令给货柜,托盘调度中,请稍候!');
- Ext.Ajax.timeout=2*60*1000;
+ Ext.Ajax.timeout = 2 * 60 * 1000;
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/baseData/storageRecordAction!sendKardexContainerTCPCommand.do',
- async:false,
- params : params,
- timeout: 2*60*1000,
- success : function(response) {
+ url: WWWROOT + '/disinfectSystem/baseData/storageRecordAction!sendKardexContainerTCPCommand.do',
+ async: false,
+ params: params,
+ timeout: 2 * 60 * 1000,
+ success: function (response) {
var result = Ext.decode(response.responseText);
showResult(result.message);
},
- failure : function(response, options) {
+ failure: function (response, options) {
showResult(response.responseText);
}
});
@@ -1223,98 +1245,99 @@
* @param selectedInvoicePlanId 所选申请单的id
* @param committedStatus 提交状态(true表示已提交,false未提交)
*/
-function addAndEditInvoicePlan(orgUnitCoding,depart,selectedInvoicePlanId,committedStatus,operationReservation) {
+function addAndEditInvoicePlan(orgUnitCoding, depart, selectedInvoicePlanId, committedStatus, operationReservation) {
//判断提交状态,true表示已提交,false表示未提交
- if(!committedStatus){
+ if (!committedStatus) {
alert("该手术预约单还未提交,不能发货只能查看!");
}
selectedApplyDate = '';
selectedTousseType = '';
lastLoadWarehouseId = null;
- defaultFocusedFieldOnInvoiceForm = getStrValueFromJs('sstsConfig.defaultFocusedFieldOnInvoiceForm',defaultFocusedFieldOnInvoiceForm);
+ defaultFocusedFieldOnInvoiceForm = getStrValueFromJs('sstsConfig.defaultFocusedFieldOnInvoiceForm', defaultFocusedFieldOnInvoiceForm);
// 发货物品
sendOutGoodsStore = new Ext.data.Store({
- reader : new Ext.data.JsonReader({
- fields : [
- {name : 'id'},
- {name : 'barcode'},
- {name : 'name'},
- {name : 'showTousseName'},
- {name : 'count'},
- {name : 'diposable'},
- {name : 'price'},
- {name : 'fluctuationPrice'},
- {name : 'storage'},
- {name : 'batchNumber'},
- {name : 'sterilizerName'},
- {name : 'frequency'},
- {name : 'externalCode'}
- ]
+ reader: new Ext.data.JsonReader({
+ fields: [
+ { name: 'id' },
+ { name: 'barcode' },
+ { name: 'name' },
+ { name: 'showTousseName' },
+ { name: 'count' },
+ { name: 'diposable' },
+ { name: 'price' },
+ { name: 'fluctuationPrice' },
+ { name: 'storage' },
+ { name: 'batchNumber' },
+ { name: 'sterilizerName' },
+ { name: 'frequency' },
+ { name: 'externalCode' }
+ ]
})
});
-
- var rd = new Ext.data.JsonReader( {
- fields : [
- {name : 'id'},
- {name : 'barcode'},
- {name : 'name'},
- {name : 'showTousseName'},
- {name : 'count'},
- {name : 'middlePackageAmount'},
- {name : 'diposable'},
- {name : 'price'},
- {name : 'urgentAmount'},
- {name : 'tempAmount'},
- {name : 'errorAmount'},
- {name : 'storage'},
- {name : 'amount'},
- {name : 'applicationAmount'},
- {name : 'batchNumber'},
- {name : 'disposableGoodsIdSet'},
- {name : 'invoicePlanIDList'},
- {name : 'invoicePlanType'}
+
+ var rd = new Ext.data.JsonReader({
+ fields: [
+ { name: 'id' },
+ { name: 'barcode' },
+ { name: 'name' },
+ { name: 'showTousseName' },
+ { name: 'count' },
+ { name: 'middlePackageAmount' },
+ { name: 'diposable' },
+ { name: 'price' },
+ { name: 'urgentAmount' },
+ { name: 'tempAmount' },
+ { name: 'errorAmount' },
+ { name: 'storage' },
+ { name: 'amount' },
+ { name: 'applicationAmount' },
+ { name: 'batchNumber' },
+ { name: 'disposableGoodsIdSet' },
+ { name: 'invoicePlanIDList' },
+ { name: 'invoicePlanType' }
]
});
//申请物品
recyclingapplicationStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/invoiceAction!loadDepartApplicationAllGoodsByCondition.do',
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/invoiceAction!loadDepartApplicationAllGoodsByCondition.do',
+ method: 'POST'
}),
- reader : rd,
+ reader: rd,
listeners: {
- load: function(thiz,records,options){
+ load: function (thiz, records, options) {
initErrorAmount();
var sourceWarehouseIdCmp = top.Ext.getCmp('sourceWarehouseId');
- if(sourceWarehouseIdCmp != null){
+ if (sourceWarehouseIdCmp != null) {
var sourceWarehouseId = sourceWarehouseIdCmp.getValue();
refreshTotalAmount();
refreshStorage(sourceWarehouseId);
}
}
}
});
-
+
recyclingapplicationStore.removeAll();
- recyclingapplicationStore.on("beforeload", function(thiz, options) {
+ recyclingapplicationStore.on("beforeload", function (thiz, options) {
thiz.baseParams["orgUnitCoding"] = orgUnitCoding;
recyclingapplicationStore.baseParams['invoicePlanId'] = selectedInvoicePlanId;
-// recyclingapplicationStore.baseParams['applyDate'] = selectedApplyDate;
-// recyclingapplicationStore.baseParams['tousseType'] = encodeURI(selectedTousseType);
+ // recyclingapplicationStore.baseParams['applyDate'] = selectedApplyDate;
+ // recyclingapplicationStore.baseParams['tousseType'] = encodeURI(selectedTousseType);
});
-
+
recyclingapplicationStore.load();
-// sendOutGoodsStore.removeAll();
-// sendOutGoodsStore.on("beforeload", function(thiz, options) {
-// thiz.baseParams["orgUnitCoding"] = orgUnitCoding;
-// });
-// sendOutGoodsStore.load();
-
- var recyclingapplicationCm = new Ext.grid.ColumnModel([
- {header : "申请的物品",dataIndex : 'showTousseName',width : 180,menuDisabled: true},
- {header : "name",dataIndex : 'name',hidden : true,menuDisabled: true},
- {header : "待发",dataIndex : 'count',width : 50, menuDisabled: true/*,
+ // sendOutGoodsStore.removeAll();
+ // sendOutGoodsStore.on("beforeload", function(thiz, options) {
+ // thiz.baseParams["orgUnitCoding"] = orgUnitCoding;
+ // });
+ // sendOutGoodsStore.load();
+
+ var recyclingapplicationCm = new Ext.grid.ColumnModel([
+ { header: "申请的物品", dataIndex: 'showTousseName', width: 180, menuDisabled: true },
+ { header: "name", dataIndex: 'name', hidden: true, menuDisabled: true },
+ {
+ header: "待发", dataIndex: 'count', width: 50, menuDisabled: true/*,
editor : new Ext.form.TextField( {
allowBlank : false,
listeners : {
@@ -1324,276 +1347,280 @@
}
})*/
},
- {header : '加急',id : 'urgentAmount',dataIndex : 'urgentAmount',width : 50,value : 0, menuDisabled: true,renderer:getDefaultAmount},
- {header : '实发',id : 'tempAmount',dataIndex : 'tempAmount',width : 50,value : 0, menuDisabled: true,renderer:getDefaultAmount},
- {header : '误差',id : 'errorAmount',dataIndex : 'errorAmount',width : 50,value : 0, menuDisabled: true,renderer:getDefaultAmount},
- {header : '库存',id : 'storage',dataIndex : 'storage',width : 50,value : 0, menuDisabled: true,renderer:formatStorage},
- {id : 'diposable',header : "是否一次性材料",dataIndex : 'diposable',hidden :true},
- {id :'applicationAmount',header : "最大发货数量",dataIndex : 'applicationAmount',hidden : true,width :150}
-// {id : 'deleteItem',header:'删除',hidden :true,width :40,menuDisabled: true,
-// renderer: function(v,p,record){
-// var str = "
";
-// return str;
-// },
-// dataIndex:'button'
-// }
+ { header: '加急', id: 'urgentAmount', dataIndex: 'urgentAmount', width: 50, value: 0, menuDisabled: true, renderer: getDefaultAmount },
+ { header: '实发', id: 'tempAmount', dataIndex: 'tempAmount', width: 50, value: 0, menuDisabled: true, renderer: getDefaultAmount },
+ { header: '误差', id: 'errorAmount', dataIndex: 'errorAmount', width: 50, value: 0, menuDisabled: true, renderer: getDefaultAmount },
+ { header: '库存', id: 'storage', dataIndex: 'storage', width: 50, value: 0, menuDisabled: true, renderer: formatStorage },
+ { id: 'diposable', header: "是否一次性材料", dataIndex: 'diposable', hidden: true },
+ { id: 'applicationAmount', header: "最大发货数量", dataIndex: 'applicationAmount', hidden: true, width: 150 }
+ // {id : 'deleteItem',header:'删除',hidden :true,width :40,menuDisabled: true,
+ // renderer: function(v,p,record){
+ // var str = "
";
+ // return str;
+ // },
+ // dataIndex:'button'
+ // }
]);
-
+
var recyclingErrorCm = new Ext.grid.ColumnModel([
- {header : "材料名称",dataIndex : 'goodsName',width : 170,menuDisabled: true},
- {header : "缺失数量",dataIndex : 'count',width : 60, menuDisabled: true},
- {header : '单价',id : 'price',dataIndex : 'price',width : 60,value : 0,menuDisabled: true}
+ { header: "材料名称", dataIndex: 'goodsName', width: 170, menuDisabled: true },
+ { header: "缺失数量", dataIndex: 'count', width: 60, menuDisabled: true },
+ { header: '单价', id: 'price', dataIndex: 'price', width: 60, value: 0, menuDisabled: true }
]);
-
+
var cm = new Ext.grid.ColumnModel([
- {header : "条码",dataIndex : 'barcode',width : 65,menuDisabled: true},
- {header : "物品名称",dataIndex : 'showTousseName',width : 190,menuDisabled: true},
- {header : "name",dataIndex : 'name',hidden : true,menuDisabled: true},
- {header : "批次/灭菌日期",dataIndex : 'batchNumber',width : 125,menuDisabled: true},
- {header : "灭菌炉名称",dataIndex : 'sterilizerName',width : 200,menuDisabled: true,hidden :true},
- {header : "炉次",dataIndex : 'frequency',width : 50,menuDisabled: true,hidden :true},
- {id : 'diposable',header : "是否一次性材料",dataIndex : 'diposable',hidden :true,width : 150},
- {header : "单价",dataIndex : 'fluctuationPrice',width : 50, align:'right', menuDisabled: true},
- {header : "数量",dataIndex : 'count',width : 50, align:'right', menuDisabled: true,
- editor : new Ext.form.TextField( {
- allowBlank : false,
- listeners : {
- focus : function(thiz){
+ { header: "条码", dataIndex: 'barcode', width: 65, menuDisabled: true },
+ { header: "物品名称", dataIndex: 'showTousseName', width: 190, menuDisabled: true },
+ { header: "name", dataIndex: 'name', hidden: true, menuDisabled: true },
+ { header: "批次/灭菌日期", dataIndex: 'batchNumber', width: 125, menuDisabled: true },
+ { header: "灭菌炉名称", dataIndex: 'sterilizerName', width: 200, menuDisabled: true, hidden: true },
+ { header: "炉次", dataIndex: 'frequency', width: 50, menuDisabled: true, hidden: true },
+ { id: 'diposable', header: "是否一次性材料", dataIndex: 'diposable', hidden: true, width: 150 },
+ { header: "单价", dataIndex: 'fluctuationPrice', width: 50, align: 'right', menuDisabled: true },
+ {
+ header: "数量", dataIndex: 'count', width: 50, align: 'right', menuDisabled: true,
+ editor: new Ext.form.TextField({
+ allowBlank: false,
+ listeners: {
+ focus: function (thiz) {
thiz.selectText();
}
}
- })},
- {id : 'deleteItem',header:'删除',width : 25, align:'center', menuDisabled: true,
- renderer: function(v,p,record){
- var str = "
";
- return str;
+ })
},
- dataIndex:'button'
- }]);
+ {
+ id: 'deleteItem', header: '删除', width: 25, align: 'center', menuDisabled: true,
+ renderer: function (v, p, record) {
+ var str = "
";
+ return str;
+ },
+ dataIndex: 'button'
+ }]);
//BJDXZLYY-43:卡迪斯智能货柜开口配置
var kardexContainerOpeningStore = [];
- if(sstsConfig.kardexContainerOpeningConfig){
+ if (sstsConfig.kardexContainerOpeningConfig) {
kardexContainerOpeningStore = sstsConfig.kardexContainerOpeningConfig;
}
var hiddenOperationReservation = true;
- if(sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer){
- if(sstsConfig.extendedFunctionalityOfGoodsDepartShareConfig && sstsConfig.extendedFunctionalityOfGoodsDepartShareConfig.indexOf('warehousePosition') >= 0){
- if(operationReservation.deliverStatus == '部分发货' || operationReservation.deliverStatus == '待发货'){
+ if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) {
+ if (sstsConfig.extendedFunctionalityOfGoodsDepartShareConfig && sstsConfig.extendedFunctionalityOfGoodsDepartShareConfig.indexOf('warehousePosition') >= 0) {
+ if (operationReservation.deliverStatus == '部分发货' || operationReservation.deliverStatus == '待发货') {
hiddenOperationReservation = false;
}
}
}
var form = new top.Ext.FormPanel({
- id : 'recyclingApplicationForm',
- frame : true,
- labelSeparator : ':',
- bodyStyle : 'padding:5px 5px 0px 5px',
- width : 1020,
- autoScroll : true,
- labelAlign:'right',
- layout : 'form',
- items : [{
- xtype : "fieldset",
- title : "基础数据",
- layout : 'column',
+ id: 'recyclingApplicationForm',
+ frame: true,
+ region: 'center',
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 5px',
+ width: 1020,
+ height: 450,
+ labelAlign: 'right',
+ layout: 'form',
+ items: [{
+ xtype: "fieldset",
+ title: "基础数据",
+ layout: 'column',
style: 'padding:0px',
- autoHeight : true,
- items : [{
- layout : 'column',
- columnWidth :1,
- items:[{
- xtype : 'hidden',
- name : 'id',
- id : 'id'
- },{
- xtype : 'hidden',
- name : 'sendOutGoodsStoreData',
- id : 'sendOutGoodsStoreData'
- },{
- xtype : 'hidden',
- name : 'allowInvoiceStorageLocGoodsWithOutChangeStorageLoc',
- id : 'allowInvoiceStorageLocGoodsWithOutChangeStorageLoc'
- },{
- xtype :'hidden',
- name : 'recyclingappStoreData',
- id : 'recyclingappStoreData'
- },{
- xtype :'hidden',
- name : 'status',
- id : 'status'
- },{
- xtype :'hidden',
- name : 'orgUnitCoding',
- id : 'orgUnitCoding',
- value:orgUnitCoding
- },{
- xtype :'hidden',
- name : 'applyDate',
- id : 'applyDateHidden',
- value:selectedApplyDate
- },{
- xtype :'hidden',
- name : 'tousseType',
- id : 'tousseTypeHidden',
- value:selectedTousseType
- },{
- xtype :'hidden',
- name : 'invoicePlanId',
- id : 'invoicePlanIdHidden',
- value:selectedInvoicePlanId
- },{
- xtype : 'hidden',
- name : 'invoiceType',
- id : 'invoiceType',
- value:TYPE_OPERATION_RESERVATION
- },{
- xtype : 'hidden',
- name : 'mode',
- id : 'mode',
- value:INVOICE_MODE_DEPART
- },{
- xtype :'hidden',
- name : 'personInChargeCode',
- id : 'personInChargeCode'
- },{
- xtype : 'hidden',
- name : 'sourceWarehouseId',
- id : 'sourceWarehouseId'
- },{
- xtype : 'hidden',
- name : 'sourceWarehouseName',
- id : 'sourceWarehouseName'
- },{
- xtype : 'hidden',
- name : 'warehouseID',
- id : 'warehouseID'
- },{
- xtype : 'hidden',
- name : 'warehouseName',
- id : 'warehouseName'
- },{
- xtype : 'hidden',
- name : 'hiddenInvoiceIds',
- id : 'hiddenInvoiceIds'
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '申请科室',
- maxLength : '100',
- id : 'depart2',
- name : 'depart',
- value : depart,
- readOnly:true,
- anchor : '99%',
- cls:'fieldReadOnlyNoRemove'
-
+ autoHeight: true,
+ items: [{
+ layout: 'column',
+ columnWidth: 1,
+ items: [{
+ xtype: 'hidden',
+ name: 'id',
+ id: 'id'
+ }, {
+ xtype: 'hidden',
+ name: 'sendOutGoodsStoreData',
+ id: 'sendOutGoodsStoreData'
+ }, {
+ xtype: 'hidden',
+ name: 'allowInvoiceStorageLocGoodsWithOutChangeStorageLoc',
+ id: 'allowInvoiceStorageLocGoodsWithOutChangeStorageLoc'
+ }, {
+ xtype: 'hidden',
+ name: 'recyclingappStoreData',
+ id: 'recyclingappStoreData'
+ }, {
+ xtype: 'hidden',
+ name: 'status',
+ id: 'status'
+ }, {
+ xtype: 'hidden',
+ name: 'orgUnitCoding',
+ id: 'orgUnitCoding',
+ value: orgUnitCoding
+ }, {
+ xtype: 'hidden',
+ name: 'applyDate',
+ id: 'applyDateHidden',
+ value: selectedApplyDate
+ }, {
+ xtype: 'hidden',
+ name: 'tousseType',
+ id: 'tousseTypeHidden',
+ value: selectedTousseType
+ }, {
+ xtype: 'hidden',
+ name: 'invoicePlanId',
+ id: 'invoicePlanIdHidden',
+ value: selectedInvoicePlanId
+ }, {
+ xtype: 'hidden',
+ name: 'invoiceType',
+ id: 'invoiceType',
+ value: TYPE_OPERATION_RESERVATION
+ }, {
+ xtype: 'hidden',
+ name: 'mode',
+ id: 'mode',
+ value: INVOICE_MODE_DEPART
+ }, {
+ xtype: 'hidden',
+ name: 'personInChargeCode',
+ id: 'personInChargeCode'
+ }, {
+ xtype: 'hidden',
+ name: 'sourceWarehouseId',
+ id: 'sourceWarehouseId'
+ }, {
+ xtype: 'hidden',
+ name: 'sourceWarehouseName',
+ id: 'sourceWarehouseName'
+ }, {
+ xtype: 'hidden',
+ name: 'warehouseID',
+ id: 'warehouseID'
+ }, {
+ xtype: 'hidden',
+ name: 'warehouseName',
+ id: 'warehouseName'
+ }, {
+ xtype: 'hidden',
+ name: 'hiddenInvoiceIds',
+ id: 'hiddenInvoiceIds'
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '申请科室',
+ maxLength: '100',
+ id: 'depart2',
+ name: 'depart',
+ value: depart,
+ readOnly: true,
+ anchor: '99%',
+ cls: 'fieldReadOnlyNoRemove'
+
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.67,
- items : [{
- xtype : 'textfield',
- fieldLabel : '发货员',
- maxLength : '41',
- id : 'deliveryPerson',
- name : 'deliveryPerson',
- readOnly:true,
- allowBlank : false,
- anchor : '99%',
- value:$Id('userName').value,
- cls:'fieldReadOnlyNoRemove'
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .67,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '发货员',
+ maxLength: '41',
+ id: 'deliveryPerson',
+ name: 'deliveryPerson',
+ readOnly: true,
+ allowBlank: false,
+ anchor: '99%',
+ value: $Id('userName').value,
+ cls: 'fieldReadOnlyNoRemove'
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '病人姓名',
- maxLength : '100',
- id : 'patientName',
- name : 'patientName',
- value : operationReservation.patientName,
- readOnly:true,
- anchor : '99%',
- cls:'fieldReadOnlyNoRemove'
-
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '病人姓名',
+ maxLength: '100',
+ id: 'patientName',
+ name: 'patientName',
+ value: operationReservation.patientName,
+ readOnly: true,
+ anchor: '99%',
+ cls: 'fieldReadOnlyNoRemove'
+
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '手术间',
- maxLength : '100',
- id : 'operatingRoom',
- name : 'operatingRoom',
- value : operationReservation.operatingRoom,
- readOnly:true,
- anchor : '99%',
- cls:'fieldReadOnlyNoRemove'
-
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '手术间',
+ maxLength: '100',
+ id: 'operatingRoom',
+ name: 'operatingRoom',
+ value: operationReservation.operatingRoom,
+ readOnly: true,
+ anchor: '99%',
+ cls: 'fieldReadOnlyNoRemove'
+
}]
- },{
- layout : 'form',
- labelWidth :90,
- columnWidth :.33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '手术台次',
- maxLength : '100',
- id : 'consoleName',
- name : 'consoleName',
- value : operationReservation.consoleName,
- readOnly:true,
- anchor : '99%',
- cls:'fieldReadOnlyNoRemove'
-
+ }, {
+ layout: 'form',
+ labelWidth: 90,
+ columnWidth: .33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '手术台次',
+ maxLength: '100',
+ id: 'consoleName',
+ name: 'consoleName',
+ value: operationReservation.consoleName,
+ readOnly: true,
+ anchor: '99%',
+ cls: 'fieldReadOnlyNoRemove'
+
}]
- },{
- layout : 'form',
- columnWidth : 1,
- labelWidth :70,
- items : [{
- xtype : 'textarea',
- fieldLabel : '手术名称',
- id : 'operationName',
- name : 'operationName',
- value : operationReservation.operationName,
- anchor : '98.5%',
- height : 40,
- readOnly:true
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ labelWidth: 70,
+ items: [{
+ xtype: 'textarea',
+ fieldLabel: '手术名称',
+ id: 'operationName',
+ name: 'operationName',
+ value: operationReservation.operationName,
+ anchor: '98.5%',
+ height: 40,
+ readOnly: true
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '核对员条码',
- maxLength : '16',
- id : 'senderBarcode',
- name : 'senderBarcode',
- anchor : '99%',
- listeners : {
- render : function(p) {
- p.getEl().on('keypress',function(e) {
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '核对员条码',
+ maxLength: '16',
+ id: 'senderBarcode',
+ name: 'senderBarcode',
+ anchor: '99%',
+ listeners: {
+ render: function (p) {
+ p.getEl().on('keypress', function (e) {
if (e.getKey() == 13) {//回车键
- InvoiceTableManager.getUserNameOfCurrentLoginUserOrgsByBarcode(
- top.Ext.getCmp('senderBarcode').getValue(),function(userName) {
+ InvoiceTableManager.getUserNameOfCurrentLoginUserOrgsByBarcode(
+ top.Ext.getCmp('senderBarcode').getValue(), function (userName) {
if (userName != null) {
var resultArray = userName.split(":");
- if(resultArray[0] == "success"){
+ if (resultArray[0] == "success") {
top.Ext.getCmp('sender').setValue(resultArray[1]);
- Ext.state.Manager.getProvider().set('cookieSender',resultArray[1]);
- }else{
+ Ext.state.Manager.getProvider().set('cookieSender', resultArray[1]);
+ } else {
showResult(resultArray[1]);
top.Ext.getCmp('sender').setValue("");
}
@@ -1606,691 +1633,883 @@
}
}
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '核对员',
- maxLength : '41',
- id : 'sender',
- name : 'sender',
- readOnly:true,
- allowBlank : false,
- anchor : '99%',
- cls:'x-item-disabled'
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '核对员',
+ maxLength: '41',
+ id: 'sender',
+ name: 'sender',
+ readOnly: true,
+ allowBlank: false,
+ anchor: '99%',
+ cls: 'x-item-disabled'
}]
- },{
- layout : 'form',
- labelWidth :90,
- columnWidth :.33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '下送责任人条码',
- maxLength : '16',
- id : 'personInChargeBarcode',
- name : 'personInChargeBarcode',
- anchor : '99%',
- listeners : {
- render : function(p) {
- p.getEl().on('keypress',function(e) {
+ }, {
+ layout: 'form',
+ labelWidth: 90,
+ columnWidth: .33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '下送责任人条码',
+ maxLength: '16',
+ id: 'personInChargeBarcode',
+ name: 'personInChargeBarcode',
+ anchor: '99%',
+ listeners: {
+ render: function (p) {
+ p.getEl().on('keypress', function (e) {
if (e.getKey() == 13) {//回车键
var barcode = top.Ext.getCmp('personInChargeBarcode').getValue();
top.Ext.getCmp('personInChargeBarcode').setValue("");
- UserTableManager.getUserByBarcode(barcode,function(responseText){
- if(!isUndefinedOrNullOrEmpty(responseText)){
- var result = top.Ext.decode(responseText);
- if(!result.success){
- showResult(result.message || "输入的条码有误!");
- return;
- }
- top.Ext.getCmp('personInCharge').setValue(result.fullName);
- top.Ext.getCmp('personInChargeCode').setValue(result.name);
- }else{
- showResult('找不到该条码所对应的人员信息');
- }
- });
+ UserTableManager.getUserByBarcode(barcode, function (responseText) {
+ if (!isUndefinedOrNullOrEmpty(responseText)) {
+ var result = top.Ext.decode(responseText);
+ if (!result.success) {
+ showResult(result.message || "输入的条码有误!");
+ return;
+ }
+ top.Ext.getCmp('personInCharge').setValue(result.fullName);
+ top.Ext.getCmp('personInChargeCode').setValue(result.name);
+ } else {
+ showResult('找不到该条码所对应的人员信息');
+ }
+ });
}
});
}
}
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- items : [{
- xtype : 'textfield',
- fieldLabel : '下送责任人',
- maxLength : '41',
- id : 'personInCharge',
- name : 'personInCharge',
- readOnly:true,
- anchor : '99%',
- cls:'x-item-disabled'
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '下送责任人',
+ maxLength: '41',
+ id: 'personInCharge',
+ name: 'personInCharge',
+ readOnly: true,
+ anchor: '99%',
+ cls: 'x-item-disabled'
}]
- },{
- layout : 'form',
- labelWidth :70,
- columnWidth :.33,
- items : [{
- xtype : 'datefieldWithMin',
- fieldLabel : '发货时间',
- id : 'sendTime',
- name : 'sendTime',
- allowBlank : false,
- altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
- format:'Y-m-d H:i',
- value:new Date(),
- anchor : '99%'
+ }, {
+ layout: 'form',
+ labelWidth: 70,
+ columnWidth: .33,
+ items: [{
+ xtype: 'datefieldWithMin',
+ fieldLabel: '发货时间',
+ id: 'sendTime',
+ name: 'sendTime',
+ allowBlank: false,
+ altFormats: 'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j',
+ format: 'Y-m-d H:i',
+ value: new Date(),
+ anchor: '99%'
}]
- },{
- layout : 'form',
- labelWidth : 90,
- columnWidth :.33,
- items:[{
- xtype : 'combo',
- fieldLabel : '仓库',
- id : 'warehouse',
- name : 'warehouse',
- minChars : 0,
- valueField : 'id',
- displayField : 'name',
- store : wareHouseStore,
- forceSelection : true,
- lazyInit : false,
- triggerAction : 'all',
- hideTrigger : true,
- typeAhead : false,
- allowBlank : false,
- anchor : '99%',
- listeners : {
- select : function(combo, record, index) {
+ }, {
+ layout: 'form',
+ labelWidth: 90,
+ columnWidth: .33,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '仓库',
+ id: 'warehouse',
+ name: 'warehouse',
+ minChars: 0,
+ valueField: 'id',
+ displayField: 'name',
+ store: wareHouseStore,
+ forceSelection: true,
+ lazyInit: false,
+ triggerAction: 'all',
+ hideTrigger: true,
+ typeAhead: false,
+ allowBlank: false,
+ anchor: '99%',
+ listeners: {
+ select: function (combo, record, index) {
top.Ext.getCmp('warehouse').setValue(record.data.name);
top.Ext.getCmp('sourceWarehouseId').setValue(record.data.id);
top.Ext.getCmp('sourceWarehouseName').setValue(record.data.name);
// 刷新库存数据
refreshStorage(record.data.id);
-// top.Ext.getCmp('remark2').focus();
+ // top.Ext.getCmp('remark2').focus();
},
- specialkey : function(field, ee) {
+ specialkey: function (field, ee) {
if (ee.getKey() == Ext.EventObject.ENTER) {
-// top.Ext.getCmp('remark2').focus();
+ // top.Ext.getCmp('remark2').focus();
}
}
}
- }]
- },{
- layout : 'form',
- columnWidth :.33,
- labelWidth :70,
- hidden:!sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
- items:[{
- xtype:'hidden',
- id:'storageLocationAddr',
- name:'storageLocationAddr',
- value:kardexContainerAddr
- },{
- xtype : 'combo',
- id : 'storageLocationAddrName',
- name : 'storageLocationAddrName',
- valueField : 'queryValue',
- displayField : 'queryMode',
- width:180,
- fieldLabel : '开口选择',
- mode : 'local',
- readOnly : true,
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ labelWidth: 70,
+ hidden: !sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
+ items: [{
+ xtype: 'hidden',
+ id: 'storageLocationAddr',
+ name: 'storageLocationAddr',
+ value: kardexContainerAddr
+ }, {
+ xtype: 'combo',
+ id: 'storageLocationAddrName',
+ name: 'storageLocationAddrName',
+ valueField: 'queryValue',
+ displayField: 'queryMode',
+ width: 180,
+ fieldLabel: '开口选择',
+ mode: 'local',
+ readOnly: true,
editable: false,
- triggerAction : 'all',
- forceSelection : true,
- anchor : '99%',
- value:kardexContainerAddr,
- store : new Ext.data.SimpleStore({
- fields : ['queryMode','queryValue'],
- data : kardexContainerOpeningStore
+ triggerAction: 'all',
+ forceSelection: true,
+ anchor: '99%',
+ value: kardexContainerAddr,
+ store: new Ext.data.SimpleStore({
+ fields: ['queryMode', 'queryValue'],
+ data: kardexContainerOpeningStore
}),
- listeners:{
- select:function(combo, record, index){
- top.Ext.getCmp('storageLocationAddr').setValue(record.data.queryValue);
- }
+ listeners: {
+ select: function (combo, record, index) {
+ top.Ext.getCmp('storageLocationAddr').setValue(record.data.queryValue);
+ }
}
- }]
- },{
- layout : 'form',
- columnWidth :.33,
- labelWidth :70,
- hidden:!sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
- items:[{
- xtype:'hidden',
- id:'storageLocationId',
- name:'storageLocationId'
- },{
- xtype:'hidden',
- id:'kardexContainerHost',
- name:'kardexContainerHost',
- value:kardexContainerHost
- },{
- xtype:'hidden',
- id:'kardexContainerPort',
- name:'kardexContainerPort',
- value:kardexContainerPort
- },{
- xtype : 'combo',
- fieldLabel : '托盘选择',
- id : 'storageLocationName',
- name : 'storageLocationName',
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ labelWidth: 70,
+ hidden: !sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
+ items: [{
+ xtype: 'hidden',
+ id: 'storageLocationId',
+ name: 'storageLocationId'
+ }, {
+ xtype: 'hidden',
+ id: 'kardexContainerHost',
+ name: 'kardexContainerHost',
+ value: kardexContainerHost
+ }, {
+ xtype: 'hidden',
+ id: 'kardexContainerPort',
+ name: 'kardexContainerPort',
+ value: kardexContainerPort
+ }, {
+ xtype: 'combo',
+ fieldLabel: '托盘选择',
+ id: 'storageLocationName',
+ name: 'storageLocationName',
queryParam: 'spell',
- minChars : 0,
- valueField : 'name',
- displayField : 'name',
- store : storageLocationStore,
- triggerAction : 'all',
- forceSelection : true,
- allowBlank : true,
- anchor : '99%',
- listeners : {
- select : function(combo, record, index) {
+ minChars: 0,
+ valueField: 'name',
+ displayField: 'name',
+ store: storageLocationStore,
+ triggerAction: 'all',
+ forceSelection: true,
+ allowBlank: true,
+ anchor: '99%',
+ listeners: {
+ select: function (combo, record, index) {
top.Ext.getCmp('storageLocationId').setValue(record.data.id);
},
- blur:function(){
+ blur: function () {
var storageLocationName = top.Ext.getCmp('storageLocationName').getRawValue();
- if(storageLocationName == ''){
+ if (storageLocationName == '') {
top.Ext.getCmp('storageLocationId').setValue('');
}
}
}
- }]
- },{
- layout : 'form',
- columnWidth :.1,
- hidden:!sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
- items:[{
- xtype : 'button',
- text : '取出托盘',
- handler : function() {
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .1,
+ hidden: !sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
+ items: [{
+ xtype: 'button',
+ text: '取出托盘',
+ handler: function () {
sendKardexContainerTCPCommand('取出');
}
- }]
- },{
- layout : 'form',
- columnWidth :.1,
- hidden:!sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
- items:[{
- xtype : 'button',
- text : '存入托盘',
- handler : function() {
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .1,
+ hidden: !sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
+ items: [{
+ xtype: 'button',
+ text: '存入托盘',
+ handler: function () {
sendKardexContainerTCPCommand('存入');
}
- }]
- },{
- layout : 'form',
- columnWidth : 1,
- labelWidth :70,
- items : [{
- xtype : 'textarea',
- fieldLabel : '备注',
- id : 'remark2',
- name : 'remark',
- anchor : '98.5%',
- height : 40,
- readOnly:true
}]
+ }, {
+ layout: 'form',
+ columnWidth: 1,
+ labelWidth: 70,
+ items: [{
+ xtype: 'textarea',
+ fieldLabel: '备注',
+ id: 'remark2',
+ name: 'remark',
+ anchor: '98.5%',
+ height: 40,
+ readOnly: true
+ }]
}]
}]
- },{
- layout:'column',
- items:[{
- layout : 'form',
- columnWidth : 0.57,
- items:[
- new top.Ext.grid.EditorGridPanel({
- id : 'sendOutGoods',
- store : sendOutGoodsStore,
- columnWidth : 0.5,
- cm : cm,
- width : 560,
- height : 425,
- autoExpandColumn : 'deleteItem',
- enableHdMenu : false,
- frame : false,
- bodyStyle : 'border:1px solid #afd7af',
- viewConfig: {
- autoFit:true
- },
- clicksToEdit : 1,// 设置点击几次才可编辑
- selModel : new top.Ext.grid.RowSelectionModel({
- singleSelect : false
- }),
- tbar : [{
- text : '扫描模式:',
- hidden : hiddenEndBarcode
- },{
- xtype:'combo',
- id : 'scanMode',
- name : 'scanMode',
- hidden : hiddenEndBarcode,
- fieldLabel : '扫描模式',
- valueField : 'scanModeCode',
- displayField : 'scanModeName',
- triggerAction : 'all',
- width : 80,
- allowBlank : true,
- editable : false,
- value:currentScanMode,
- store : new Ext.data.SimpleStore({
- fields : ['scanModeCode', 'scanModeName' ],
- data : [['single','单个条码'],['area','首尾条码']]
- }),
- mode:'local',
- forceSelection : true,
- triggerAction : 'all',
- listeners : {
- select : function(combo, record, index){
- //alert(record.get("scanModeCode"));
- currentScanMode = record.get("scanModeCode");
+ }, {
+ layout: 'column',
+ items: [{
+ layout: 'form',
+ columnWidth: 0.57,
+ items: [
+ new top.Ext.grid.EditorGridPanel({
+ id: 'sendOutGoods',
+ store: sendOutGoodsStore,
+ columnWidth: 0.5,
+ cm: cm,
+ width: 560,
+ height: 320,
+ autoExpandColumn: 'deleteItem',
+ enableHdMenu: false,
+ frame: false,
+ bodyStyle: 'border:1px solid #afd7af',
+ viewConfig: {
+ autoFit: true
+ },
+ clicksToEdit: 1,// 设置点击几次才可编辑
+ selModel: new top.Ext.grid.RowSelectionModel({
+ singleSelect: false
+ }),
+ tbar: [{
+ text: '扫描模式:',
+ hidden: hiddenEndBarcode
+ }, {
+ xtype: 'combo',
+ id: 'scanMode',
+ name: 'scanMode',
+ hidden: hiddenEndBarcode,
+ fieldLabel: '扫描模式',
+ valueField: 'scanModeCode',
+ displayField: 'scanModeName',
+ triggerAction: 'all',
+ width: 80,
+ allowBlank: true,
+ editable: false,
+ value: currentScanMode,
+ store: new Ext.data.SimpleStore({
+ fields: ['scanModeCode', 'scanModeName'],
+ data: [['single', '单个条码'], ['area', '首尾条码']]
+ }),
+ mode: 'local',
+ forceSelection: true,
+ triggerAction: 'all',
+ listeners: {
+ select: function (combo, record, index) {
+ //alert(record.get("scanModeCode"));
+ currentScanMode = record.get("scanModeCode");
+ }
+ },
+ anchor: '100%'
+ }, {
+ text: beginBarcodeLabel
+ }, {
+ xtype: 'textfield',
+ id: 'scanText',
+ name: 'scanText',
+ width: 90,
+ enableKeyEvents: true,
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e) {
+ if (e.getKey() == 13) {// 输入;号键,grid重新加载
+ if (top.Ext.getCmp("scanText").getValue() != '') {
+ loadGoodsByBarcode(orgUnitCoding);
+ } else {
+ showResult("请扫描输入器械包/篮筐(首)条码!");
+ }
}
- },
- anchor : '100%'
- },{
- text : beginBarcodeLabel
- },{
- xtype : 'textfield',
- id : 'scanText',
- name : 'scanText',
- width : 90,
- enableKeyEvents : true,
- listeners : {
- render : function(c) {
- c.getEl().on('keypress',function(e) {
- if (e.getKey() == 13) {// 输入;号键,grid重新加载
- if(top.Ext.getCmp("scanText").getValue() != ''){
- loadGoodsByBarcode(orgUnitCoding);
- }else{
- showResult("请扫描输入器械包/篮筐(首)条码!");
- }
- }
- });
- c.getEl().on('focus',function(e) {
- top.Ext.getCmp('scanText').setValue('');
- });
+ });
+ c.getEl().on('focus', function (e) {
+ top.Ext.getCmp('scanText').setValue('');
+ });
+ }
+ }
+ }, {
+ text: '条码/篮筐(尾):',
+ hidden: hiddenEndBarcode
+ }, {
+ xtype: 'textfield',
+ id: 'scanTextEnd',
+ name: 'scanTextEnd',
+ hidden: hiddenEndBarcode,
+ width: 90,
+ enableKeyEvents: true,
+ listeners: {
+ render: function (c) {
+ c.getEl().on('keypress', function (e) {
+ if (e.getKey() == 13) {// 输入;号键,grid重新加载
+ if (top.Ext.getCmp("scanTextEnd").getValue() != '') {
+ loadGoodsByBarcode(orgUnitCoding);
+ } else {
+ showResult("请扫描输入器械包/篮筐(尾)条码!");
+ }
}
+ });
+ c.getEl().on('focus', function (e) {
+ top.Ext.getCmp('scanTextEnd').setValue('');
+ });
+ }
+ }
+ }],
+ listeners: {
+ beforeedit: function (grid) {//只有一次性物品才能编辑数量
+ var record = grid.record;
+ if (record.data.diposable == '否') {
+ return false;
+ }
+ },
+ afteredit: function (grid) {
+ var id = grid.record.data['id'];
+ var name = grid.record.data['name'];
+ var count = grid.record.data['count'];
+ var storage = grid.record.data['storage'];
+ var storageInt = parseInt(storage);
+ if (id == 0) {
+ if (parseInt(count) <= storageInt) {
+ updateAmount2(name, count);
+ } else {
+ showResult('库存量为:' + storage + ',已超过库存量!');
+ var index = recyclingapplicationStore.find("name", name);
+ var tempAmount = recyclingapplicationStore.getAt(index).data['tempAmount'];
+ grid.record.set('count', storageInt);
}
- },{
- text : '条码/篮筐(尾):',
- hidden : hiddenEndBarcode
- },{
- xtype : 'textfield',
- id : 'scanTextEnd',
- name : 'scanTextEnd',
- hidden : hiddenEndBarcode,
- width : 90,
- enableKeyEvents : true,
- listeners : {
- render : function(c) {
- c.getEl().on('keypress',function(e) {
- if (e.getKey() == 13) {// 输入;号键,grid重新加载
- if(top.Ext.getCmp("scanTextEnd").getValue() != ''){
- loadGoodsByBarcode(orgUnitCoding);
- }else{
- showResult("请扫描输入器械包/篮筐(尾)条码!");
- }
- }
- });
- c.getEl().on('focus',function(e) {
- top.Ext.getCmp('scanTextEnd').setValue('');
- });
+ } else {
+ var record = getRecord(recyclingapplicationStore, "name", name, 0);
+ if (record != null) {
+ var tempAmount = record.data['tempAmount'];
+ if (parseInt(count) <= (storageInt + parseInt(tempAmount))) {
+ updateAmount2(name, count);
+ } else {
+ showResult('库存量为:' + storage + ',已超过库存量!');
+ grid.record.set('count', tempAmount);
}
}
- }],
- listeners : {
- beforeedit : function(grid){//只有一次性物品才能编辑数量
- var record = grid.record;
- if(record.data.diposable == '否') {
- return false;
- }
- },
- afteredit :function(grid){
- var id = grid.record.data['id'];
- var name = grid.record.data['name'];
- var count = grid.record.data['count'];
- var storage = grid.record.data['storage'];
- var storageInt = parseInt(storage);
- if(id==0){
- if(parseInt(count) <= storageInt){
- updateAmount2(name,count);
- } else {
- showResult('库存量为:' + storage + ',已超过库存量!');
- var index = recyclingapplicationStore.find("name",name);
- var tempAmount = recyclingapplicationStore.getAt(index).data['tempAmount'];
- grid.record.set('count',storageInt);
- }
- } else {
- var record = getRecord(recyclingapplicationStore, "name", name, 0);
- if(record != null) {
- var tempAmount = record.data['tempAmount'];
- if(parseInt(count) <= (storageInt + parseInt(tempAmount))){
- updateAmount2(name,count);
- } else {
- showResult('库存量为:' + storage + ',已超过库存量!');
- grid.record.set('count',tempAmount);
- }
- }
- }
- }
}
}
+ }
+ }
)]
- },{
- layout : 'form',
- columnWidth : 0.43,
- items:[new top.Ext.grid.EditorGridPanel({
- id : 'sendOutGoodsDetail',
- title : '发货单明细',
- store : recyclingapplicationStore,
- cm : recyclingapplicationCm,
- enableHdMenu : false,
- width :423,
- height :425,
- loadMask : true,
- tbar:[{
- text: "",
- id : 'tousseAmountInfo'
- }],
- autoExpandColumn : 'deleteItem',
- frame : false,
- bodyStyle : 'border:1px solid #afd7af',
- viewConfig: {
- forceFit:true,
- getRowClass : function(record,rowIndex,rowParams,store){
- if(record.data.errorAmount < 0){
- return 'my_row_red';
- }else if(record.data.errorAmount > 0){
- return 'my_row_yellow';
- }else{
- return 'my_row_green';
- }
- }
- },
- clicksToEdit:1,
- selModel : new top.Ext.grid.RowSelectionModel({
- singleSelect : false
- }),
- listeners:{
- validateedit : function(o){
- if(!isPositiveInteger(o.value))return false;
- }
+ }, {
+ layout: 'form',
+ columnWidth: 0.43,
+ items: [new top.Ext.grid.EditorGridPanel({
+ id: 'sendOutGoodsDetail',
+ title: '发货单明细',
+ store: recyclingapplicationStore,
+ cm: recyclingapplicationCm,
+ enableHdMenu: false,
+ width: 423,
+ height: 320,
+ loadMask: true,
+ tbar: [{
+ text: "",
+ id: 'tousseAmountInfo'
+ }],
+ autoExpandColumn: 'deleteItem',
+ frame: false,
+ bodyStyle: 'border:1px solid #afd7af',
+ viewConfig: {
+ forceFit: true,
+ getRowClass: function (record, rowIndex, rowParams, store) {
+ if (record.data.errorAmount < 0) {
+ return 'my_row_red';
+ } else if (record.data.errorAmount > 0) {
+ return 'my_row_yellow';
+ } else {
+ return 'my_row_green';
+ }
+ }
+ },
+ clicksToEdit: 1,
+ selModel: new top.Ext.grid.RowSelectionModel({
+ singleSelect: false
+ }),
+ listeners: {
+ validateedit: function (o) {
+ if (!isPositiveInteger(o.value)) return false;
+ }
+ }
+ })]
+ }
+ ]
+ }]
+ });
+
+ Ext.Ajax.request({
+ url: WWWROOT + '/disinfectSystem/invoicePlanAction!loadDepartApplicationInfo.do',
+ params: { orgUnitCoding: orgUnitCoding },
+ success: function (response, options) {
+ var result = Ext.decode(response.responseText);
+ var remark = result.remark;
+ top.Ext.getCmp('remark2').setValue(remark);
+ },
+ failure: function (form, action) {
+ }
+ });
+ var cookieSender = Ext.state.Manager.getProvider().get('cookieSender');
+ if (cookieSender) {
+ top.Ext.getCmp('sender').setValue(cookieSender);
+ }
+ var window;
+ var enableAbnormalItemListFixedDisplay = sstsConfig.enableAbnormalItemListFixedDisplay || false;
+ if (enableAbnormalItemListFixedDisplay && sstsConfig.isUseAbnormalGoodsTable) {
+ var windowW = top.Ext.getBody().dom.clientWidth;
+ var recyclingApplicationWinWidth = windowW < 1280 ? windowW - 4 : 1020;
+ var winWidth = recyclingApplicationWinWidth + 590;
+ var invoicePlan_form = renderRecyclingApplicationForm('operationReservationInvoiceView');
+ window = new top.Ext.Window({
+ id: 'recyclingApplicationWin',
+ layout: 'border',
+ title: '发货单',
+ resizable: false,
+ width: winWidth,
+ height: 650,
+ border: false,
+ modal: true,
+ plain: true,
+ stateful: false,
+ buttonAlign: 'center',
+ items: [form, invoicePlan_form],
+ buttons: [{
+ text: '智能货柜查询',
+ hidden: hiddenOperationReservation,
+ handler: function () {
+ showOperationReservationStorageTousse(operationReservation.id);
+ }
+ }, {
+ text: '保存',
+ disabled: committedStatus ? false : true,//未提交则保存按钮置灰
+ id: 'saveButton',
+ handler: function () {
+ //验证发货物品表格
+ if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) {
+ if ((!recyclingapplicationStore || recyclingapplicationStore.getCount() == 0) && (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0)) {
+ top.Ext.MessageBox.confirm("请确认", "无待发货物品,是否关闭页面?", function (button, text) {
+ if ("yes" == button) {
+ window.close();
}
- })]
+ });
+ } else if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'save');
}
- ]
- }],
- buttons : [{
- text : '智能货柜查询',
- hidden:hiddenOperationReservation,
- handler : function() {
- showOperationReservationStorageTousse(operationReservation.id);
+ } else {
+ if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'save');
+ }
}
- },{
- text : '保存',
- disabled : committedStatus ? false : true,//未提交则保存按钮置灰
- id:'saveButton',
- handler : function() {
- //验证发货物品表格
- if(sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer){
- if((!recyclingapplicationStore || recyclingapplicationStore.getCount() == 0) && (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0)){
- top.Ext.MessageBox.confirm("请确认","无待发货物品,是否关闭页面?", function(button, text) {
- if ("yes" == button){
- window.close();
- }
- });
- }else if(!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0){
- showResult('发货物品不能为空!');
- return false;
- }else {
- doSaveAction(form,window,'save');
- }
- }else {
- if(!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0){
- showResult('发货物品不能为空!');
- return false;
- }else {
- doSaveAction(form,window,'save');
- }
+ }
+ }, {
+ text: '保存并继续发货',
+ disabled: committedStatus ? false : true,//未提交则保存按钮置灰
+ hidden: !sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
+ handler: function () {
+ //验证发货物品表格
+ if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) {
+ if ((!recyclingapplicationStore || recyclingapplicationStore.getCount() == 0) && (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0)) {
+ top.Ext.MessageBox.confirm("请确认", "无待发货物品,是否关闭页面?", function (button, text) {
+ if ("yes" == button) {
+ window.close();
+ }
+ });
+ } else if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'saveAndInvoice');
}
+ } else {
+ if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'saveAndInvoice');
+ }
}
- },{
- text : '保存并继续发货',
- disabled : committedStatus ? false : true,//未提交则保存按钮置灰
- hidden:!sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
- handler : function() {
- //验证发货物品表格
- if(sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer){
- if((!recyclingapplicationStore || recyclingapplicationStore.getCount() == 0) && (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0)){
- top.Ext.MessageBox.confirm("请确认","无待发货物品,是否关闭页面?", function(button, text) {
- if ("yes" == button){
+ }
+ }, {
+ text: '保存并打印',
+ disabled: committedStatus ? false : true,//未提交则保存按钮置灰
+ id: 'saveAndPrintButton',
+ hidden: !sstsConfig.enableSaveAndPrintWhenInvoice,
+ handler: function () {
+ //验证发货物品表格
+ if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) {
+ var hiddenInvoiceIds = top.Ext.getCmp('hiddenInvoiceIds').getValue();
+ if ((!recyclingapplicationStore || recyclingapplicationStore.getCount() == 0) && (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0)) {
+ if (hiddenInvoiceIds !== '') {
+ top.Ext.MessageBox.show({
+ title: '请确认',
+ msg: '无待发货物品,是要打印所有本次未打印的发货单?',
+ buttons: { ok: '打印所有', cancel: '取消' },
+ fn: function (btn) {
+ if (btn == 'ok') {
+ var storageLocationName = top.Ext.getCmp('storageLocationName').getRawValue();
+ if (storageLocationName == '') {
+ printInvoiceAfterInvoice(hiddenInvoiceIds);
+ top.Ext.getCmp('hiddenInvoiceIds').setValue('');
+ window.close();
+ grid.getStore().reload();
+ } else {
+ printInvoiceAfterInvoice(hiddenInvoiceIds);
+ top.Ext.getCmp('hiddenInvoiceIds').setValue('');
+ recyclingapplicationStore.load();
+ sendOutGoodsStore.removeAll();
+ grid.getStore().reload();
+ }
+ }
+ },
+ icon: top.Ext.MessageBox.QUESTION
+ });
+ } else {
+ top.Ext.MessageBox.confirm("请确认", "无待发货物品,是否关闭页面?", function (button, text) {
+ if ("yes" == button) {
window.close();
}
});
- }else if(!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0){
- showResult('发货物品不能为空!');
- return false;
- }else {
- doSaveAction(form,window,'saveAndInvoice');
}
- }else {
- if(!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0){
+ } else if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ if (hiddenInvoiceIds == '') {
showResult('发货物品不能为空!');
return false;
- }else {
- doSaveAction(form,window,'saveAndInvoice');
+ } else {
+ top.Ext.MessageBox.show({
+ title: '请确认',
+ msg: '无待发货物品,是要打印所有本次未打印的发货单?',
+ buttons: { ok: '打印所有', cancel: '取消' },
+ fn: function (btn) {
+ if (btn == 'ok') {
+ var storageLocationName = top.Ext.getCmp('storageLocationName').getRawValue();
+ if (storageLocationName == '') {
+ printInvoiceAfterInvoice(hiddenInvoiceIds);
+ top.Ext.getCmp('hiddenInvoiceIds').setValue('');
+ window.close();
+ grid.getStore().reload();
+ } else {
+ printInvoiceAfterInvoice(hiddenInvoiceIds);
+ top.Ext.getCmp('hiddenInvoiceIds').setValue('');
+ recyclingapplicationStore.load();
+ sendOutGoodsStore.removeAll();
+ grid.getStore().reload();
+ }
+ }
+ },
+ icon: top.Ext.MessageBox.QUESTION
+ });
}
+ } else {
+ top.Ext.MessageBox.show({
+ title: '请确认',
+ msg: '请确认只打印当前发货的物品发货单,还是需要打印本次所有未打印的发货单?',
+ buttons: { ok: '打印所有', yes: '打印当前', cancel: '取消' },
+ fn: function (btn) {
+ if (btn == 'ok') {
+ doSaveAction(form, window, 'saveAndPrintAll');
+ } else if (btn == 'yes') {
+ doSaveAction(form, window, 'saveAndPrintPage');
+ }
+ },
+ icon: top.Ext.MessageBox.QUESTION
+ });
}
+ } else {
+ if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'saveAndPrintPage');
+ }
}
- },{
- text : '保存并打印',
- disabled : committedStatus ? false : true,//未提交则保存按钮置灰
- id:'saveAndPrintButton',
- hidden:!sstsConfig.enableSaveAndPrintWhenInvoice,
- handler : function() {
- //验证发货物品表格
- if(sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer){
- var hiddenInvoiceIds = top.Ext.getCmp('hiddenInvoiceIds').getValue();
- if((!recyclingapplicationStore || recyclingapplicationStore.getCount() == 0) && (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0)){
- if(hiddenInvoiceIds !== ''){
- top.Ext.MessageBox.show({
- title:'请确认',
- msg: '无待发货物品,是要打印所有本次未打印的发货单?',
- buttons: { ok: '打印所有', cancel: '取消' },
- fn: function(btn){
- if(btn == 'ok'){
- var storageLocationName = top.Ext.getCmp('storageLocationName').getRawValue();
- if(storageLocationName == ''){
- printInvoiceAfterInvoice(hiddenInvoiceIds);
- top.Ext.getCmp('hiddenInvoiceIds').setValue('');
- window.close();
- grid.getStore().reload();
- }else {
- printInvoiceAfterInvoice(hiddenInvoiceIds);
- top.Ext.getCmp('hiddenInvoiceIds').setValue('');
- recyclingapplicationStore.load();
- sendOutGoodsStore.removeAll();
- grid.getStore().reload();
- }
- }
- },
- icon: top.Ext.MessageBox.QUESTION
- });
- }else {
- top.Ext.MessageBox.confirm("请确认","无待发货物品,是否关闭页面?", function(button, text) {
- if ("yes" == button){
- window.close();
- }
- });
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ //切记注意:按取消关闭window后,一定要把已选择的申请单号变量清空
+ selectedInvoicePlanId = "";
+ window.close();
+ }
+ }]
+ });
+ } else {
+ window = new top.Ext.Window({
+ id: 'recyclingApplicationWin',
+ layout: 'fit',
+ title: '发货单',
+ width: 1020,
+ height: 620,
+ border: false,
+ modal: true,
+ plain: true,
+ items: [form],
+ buttonAlign: 'center',
+ buttons: [{
+ text: '智能货柜查询',
+ hidden: hiddenOperationReservation,
+ handler: function () {
+ showOperationReservationStorageTousse(operationReservation.id);
+ }
+ }, {
+ text: '保存',
+ disabled: committedStatus ? false : true,//未提交则保存按钮置灰
+ id: 'saveButton',
+ handler: function () {
+ //验证发货物品表格
+ if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) {
+ if ((!recyclingapplicationStore || recyclingapplicationStore.getCount() == 0) && (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0)) {
+ top.Ext.MessageBox.confirm("请确认", "无待发货物品,是否关闭页面?", function (button, text) {
+ if ("yes" == button) {
+ window.close();
}
- }else if(!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0){
- if(hiddenInvoiceIds == ''){
- showResult('发货物品不能为空!');
- return false;
- }else {
- top.Ext.MessageBox.show({
- title:'请确认',
- msg: '无待发货物品,是要打印所有本次未打印的发货单?',
- buttons: { ok: '打印所有', cancel: '取消' },
- fn: function(btn){
- if(btn == 'ok'){
- var storageLocationName = top.Ext.getCmp('storageLocationName').getRawValue();
- if(storageLocationName == ''){
- printInvoiceAfterInvoice(hiddenInvoiceIds);
- top.Ext.getCmp('hiddenInvoiceIds').setValue('');
- window.close();
- grid.getStore().reload();
- }else {
- printInvoiceAfterInvoice(hiddenInvoiceIds);
- top.Ext.getCmp('hiddenInvoiceIds').setValue('');
- recyclingapplicationStore.load();
- sendOutGoodsStore.removeAll();
- grid.getStore().reload();
- }
- }
- },
- icon: top.Ext.MessageBox.QUESTION
- });
+ });
+ } else if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'save');
+ }
+ } else {
+ if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'save');
+ }
+ }
+ }
+ }, {
+ text: '保存并继续发货',
+ disabled: committedStatus ? false : true,//未提交则保存按钮置灰
+ hidden: !sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer,
+ handler: function () {
+ //验证发货物品表格
+ if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) {
+ if ((!recyclingapplicationStore || recyclingapplicationStore.getCount() == 0) && (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0)) {
+ top.Ext.MessageBox.confirm("请确认", "无待发货物品,是否关闭页面?", function (button, text) {
+ if ("yes" == button) {
+ window.close();
}
- }else {
+ });
+ } else if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'saveAndInvoice');
+ }
+ } else {
+ if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'saveAndInvoice');
+ }
+ }
+ }
+ }, {
+ text: '保存并打印',
+ disabled: committedStatus ? false : true,//未提交则保存按钮置灰
+ id: 'saveAndPrintButton',
+ hidden: !sstsConfig.enableSaveAndPrintWhenInvoice,
+ handler: function () {
+ //验证发货物品表格
+ if (sstsConfig.enableOperationReservationShippedToTraysOfKardexContainer) {
+ var hiddenInvoiceIds = top.Ext.getCmp('hiddenInvoiceIds').getValue();
+ if ((!recyclingapplicationStore || recyclingapplicationStore.getCount() == 0) && (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0)) {
+ if (hiddenInvoiceIds !== '') {
top.Ext.MessageBox.show({
- title:'请确认',
- msg: '请确认只打印当前发货的物品发货单,还是需要打印本次所有未打印的发货单?',
- buttons: { ok: '打印所有', yes: '打印当前', cancel: '取消' },
- fn: function(btn){
- if(btn == 'ok'){
- doSaveAction(form,window,'saveAndPrintAll');
- }else if(btn == 'yes'){
- doSaveAction(form,window,'saveAndPrintPage');
+ title: '请确认',
+ msg: '无待发货物品,是要打印所有本次未打印的发货单?',
+ buttons: { ok: '打印所有', cancel: '取消' },
+ fn: function (btn) {
+ if (btn == 'ok') {
+ var storageLocationName = top.Ext.getCmp('storageLocationName').getRawValue();
+ if (storageLocationName == '') {
+ printInvoiceAfterInvoice(hiddenInvoiceIds);
+ top.Ext.getCmp('hiddenInvoiceIds').setValue('');
+ window.close();
+ grid.getStore().reload();
+ } else {
+ printInvoiceAfterInvoice(hiddenInvoiceIds);
+ top.Ext.getCmp('hiddenInvoiceIds').setValue('');
+ recyclingapplicationStore.load();
+ sendOutGoodsStore.removeAll();
+ grid.getStore().reload();
+ }
}
},
icon: top.Ext.MessageBox.QUESTION
});
+ } else {
+ top.Ext.MessageBox.confirm("请确认", "无待发货物品,是否关闭页面?", function (button, text) {
+ if ("yes" == button) {
+ window.close();
+ }
+ });
}
- }else {
- if(!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0){
+ } else if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ if (hiddenInvoiceIds == '') {
showResult('发货物品不能为空!');
return false;
- }else {
- doSaveAction(form,window,'saveAndPrintPage');
+ } else {
+ top.Ext.MessageBox.show({
+ title: '请确认',
+ msg: '无待发货物品,是要打印所有本次未打印的发货单?',
+ buttons: { ok: '打印所有', cancel: '取消' },
+ fn: function (btn) {
+ if (btn == 'ok') {
+ var storageLocationName = top.Ext.getCmp('storageLocationName').getRawValue();
+ if (storageLocationName == '') {
+ printInvoiceAfterInvoice(hiddenInvoiceIds);
+ top.Ext.getCmp('hiddenInvoiceIds').setValue('');
+ window.close();
+ grid.getStore().reload();
+ } else {
+ printInvoiceAfterInvoice(hiddenInvoiceIds);
+ top.Ext.getCmp('hiddenInvoiceIds').setValue('');
+ recyclingapplicationStore.load();
+ sendOutGoodsStore.removeAll();
+ grid.getStore().reload();
+ }
+ }
+ },
+ icon: top.Ext.MessageBox.QUESTION
+ });
}
+ } else {
+ top.Ext.MessageBox.show({
+ title: '请确认',
+ msg: '请确认只打印当前发货的物品发货单,还是需要打印本次所有未打印的发货单?',
+ buttons: { ok: '打印所有', yes: '打印当前', cancel: '取消' },
+ fn: function (btn) {
+ if (btn == 'ok') {
+ doSaveAction(form, window, 'saveAndPrintAll');
+ } else if (btn == 'yes') {
+ doSaveAction(form, window, 'saveAndPrintPage');
+ }
+ },
+ icon: top.Ext.MessageBox.QUESTION
+ });
}
+ } else {
+ if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
+ showResult('发货物品不能为空!');
+ return false;
+ } else {
+ doSaveAction(form, window, 'saveAndPrintPage');
+ }
}
- }, {
- text : '取消',
- handler : function() {
- //切记注意:按取消关闭window后,一定要把已选择的申请单号变量清空
- selectedInvoicePlanId = "";
- window.close();
- }
- }]
- });
-
- Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/invoicePlanAction!loadDepartApplicationInfo.do',
- params : {orgUnitCoding : orgUnitCoding},
- success : function(response, options) {
- var result = Ext.decode(response.responseText);
- var remark = result.remark;
- top.Ext.getCmp('remark2').setValue(remark);
- },
- failure : function(form, action) {
- }
- });
- var cookieSender = Ext.state.Manager.getProvider().get('cookieSender');
- if(cookieSender){
- top.Ext.getCmp('sender').setValue(cookieSender);
+ }
+ }, {
+ text: '取消',
+ handler: function () {
+ //切记注意:按取消关闭window后,一定要把已选择的申请单号变量清空
+ selectedInvoicePlanId = "";
+ window.close();
+ }
+ }]
+ });
}
-//发货单弹窗 weizhenyu
- var window = new top.Ext.Window( {
- id : 'recyclingApplicationWin',
- layout : 'fit',
- title : '发货单',
- width : 1020,
- height : 620,
- border : false,
- modal : true,
- plain : true,
- items : [form]
- });
-
- window.on('close',function(w){
+
+ window.on('close', function (w) {
//切记注意:按取消关闭window后,一定要把已选择的申请单号变量清空
selectedInvoicePlanId = "";
});
window.show();
top.Ext.getCmp(defaultFocusedFieldOnInvoiceForm).focus(false, 100);
-// top.Ext.getCmp('senderBarcode').focus(false, 100);
-
+ // top.Ext.getCmp('senderBarcode').focus(false, 100);
+
var sendOutGoodsDetailGrid = top.Ext.getCmp('sendOutGoodsDetail');
- sendOutGoodsDetailGrid.on('rowdblclick', function(grid, index) {
+ sendOutGoodsDetailGrid.on('rowdblclick', function (grid, index) {
var record = grid.getStore().getAt(index);
- if(record.data.invoicePlanType == invoicePlanType_disinfect){
+ if (record.data.invoicePlanType == invoicePlanType_disinfect) {
var goodsName = record.data.name;
//显示消毒物品材料
showDisinfectMaterial(goodsName);
}
}, this, {
- buffer : 250
+ buffer: 250
});
wareHouseStore.load();
+
+ if (enableAbnormalItemListFixedDisplay && sstsConfig.isUseAbnormalGoodsTable) {
+ var tabs = top.Ext.getCmp('tabpanel')
+ tabs.hideTabStripItem(0);
+ }
}
//展示器械包信息
function showDisinfectMaterial(tousseName) {
- var materialStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getMaterialDefinitionByTousseName.do',
- method : 'POST'
- }),
- baseParams : {tousseName : tousseName},
- reader : new Ext.data.JsonReader({
- fields : [
- {name : 'materialDefinitionId'},
- {name : 'name'},
- {name : 'count'}
- ]
- })
- });
- materialStore.load();
- var materialGrid = new top.Ext.grid.GridPanel({
- id :'materialGrid',
- store: materialStore,
- columns: [
- {hidden : true, dataIndex : 'materialDefinitionId'},
- {header : "材料名称",width : 80, menuDisabled: true,dataIndex : 'name'},
- {header : "数量",width : 27, menuDisabled: true,dataIndex : 'count'}
- ],
- viewConfig: {
- forceFit: true
- },
- autoExpandColumn : 'materialAmount',
- frame:false
- });
-
- var window = new top.Ext.Window({
- title : tousseName + '信息',
- width : 400,
- height :200,
- border : false,
- autoScroll: true,
- layout : 'fit',
- modal : true,
- items : [materialGrid]
- });
- window.show();
+ var materialStore = new Ext.data.Store({
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getMaterialDefinitionByTousseName.do',
+ method: 'POST'
+ }),
+ baseParams: { tousseName: tousseName },
+ reader: new Ext.data.JsonReader({
+ fields: [
+ { name: 'materialDefinitionId' },
+ { name: 'name' },
+ { name: 'count' }
+ ]
+ })
+ });
+ materialStore.load();
+ var materialGrid = new top.Ext.grid.GridPanel({
+ id: 'materialGrid',
+ store: materialStore,
+ columns: [
+ { hidden: true, dataIndex: 'materialDefinitionId' },
+ { header: "材料名称", width: 80, menuDisabled: true, dataIndex: 'name' },
+ { header: "数量", width: 27, menuDisabled: true, dataIndex: 'count' }
+ ],
+ viewConfig: {
+ forceFit: true
+ },
+ autoExpandColumn: 'materialAmount',
+ frame: false
+ });
+
+ var window = new top.Ext.Window({
+ title: tousseName + '信息',
+ width: 400,
+ height: 200,
+ border: false,
+ autoScroll: true,
+ layout: 'fit',
+ modal: true,
+ items: [materialGrid]
+ });
+ window.show();
}
//获取扫描的物品
function getTousseGridData() {
var submitItems = [];
- for ( var i = 0; i < sendOutGoodsStore.getCount(); i++) {
+ for (var i = 0; i < sendOutGoodsStore.getCount(); i++) {
var record = sendOutGoodsStore.getAt(i);
record.data.sendAmount = record.data.count;
submitItems.push(record.data);