Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownOutView.js =================================================================== diff -u -r12979 -r12981 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownOutView.js (.../godownOutView.js) (revision 12979) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownOutView.js (.../godownOutView.js) (revision 12981) @@ -695,21 +695,6 @@ top.Ext.getCmp('name1').focus(false, 100); } -function printBarcode(barcodeStr){ - if(barcodeStr!=null && barcodeStr.length > 0){ - var godownEntryItem = barcodeStr.split(";"); - for ( var i = 0; i < godownEntryItem.length; i++) { - var resultItem = godownEntryItem[i].split("#&"); - var name =resultItem[0]; - var barcode = resultItem[1]; - var expDate = resultItem[2]; - var supplierName = resultItem[3]; - var batchNumber = resultItem[4]; - printDiposableGoodsInfo(barcode,name,expDate,supplierName,batchNumber,0); - } - } -} - // 删除 function deleteGodownEntry(grid) { var records = grid.getSelectionModel().getSelections(); Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/commonEntry.js =================================================================== diff -u -r12965 -r12981 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/commonEntry.js (.../commonEntry.js) (revision 12965) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/commonEntry.js (.../commonEntry.js) (revision 12981) @@ -90,6 +90,9 @@ if(entryType == '退库单'){ godownEntrysInfo.applicationType = "一次性物品退库单"; godownEntrysInfo.formTypeOfPrinted = 'godownOutEntry'; + }else if(entryType == '调拨单'){ + godownEntrysInfo.applicationType = "一次性物品调拨单"; + godownEntrysInfo.formTypeOfPrinted = 'appropriation'; }else{ godownEntrysInfo.applicationType = "一次性物品入库单"; godownEntrysInfo.formTypeOfPrinted = 'godownEntry'; @@ -127,6 +130,8 @@ if(rs.success = true){ if(entryType == '退库单'){ rs.formTypeOfPrinted = 'godownEntryOutList'; + }else if(entryType == '调拨单'){ + rs.formTypeOfPrinted = 'appropriationList'; }else{ rs.formTypeOfPrinted = 'godownEntryList'; } @@ -136,4 +141,45 @@ hideMessageBox(true); }); } + this.printBarcode = function(barcodeStr,saveAndPrintNew){ + if(barcodeStr!=null && barcodeStr != "null" && barcodeStr.length > 0){ + var godownEntryItem = barcodeStr.split(";"); + var exitBatch = true; + + if(saveAndPrintNew){ + for ( var i = 0; i < godownEntryItem.length; i++) { + var resultItem = godownEntryItem[i].split("#&"); + var name =resultItem[0]; + var newBatch =resultItem[1]; + var barcode = resultItem[2]; + var expDate = resultItem[3]; + var supplierName = resultItem[4]; + var batchNumber = resultItem[5]; + var sp = resultItem[6]; + if(newBatch == true || newBatch == 'true'){ + exitBatch = false; + printDiposableGoodsInfo(barcode,name,expDate,supplierName,batchNumber,0,sp); + } + } + if(exitBatch){ + showResult("本次入库物品没有新的批次。"); + } + }else{ + for ( var i = 0; i < godownEntryItem.length; i++) { + var resultItem = godownEntryItem[i].split("#&"); + var name =resultItem[0]; + var barcode = resultItem[1]; + var expDate = resultItem[2]; + var supplierName = resultItem[3]; + var batchNumber = resultItem[4]; + var sp = resultItem[5]; + printDiposableGoodsInfo(barcode,name,expDate,supplierName,batchNumber,0,sp); + } + } + + + }else{ + showResult("本次入库物品没有新的批次。"); + } + } } \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/config/gzfdzl/print/printConfig.js =================================================================== diff -u -r12965 -r12981 --- ssts-web/src/main/webapp/disinfectsystem/config/gzfdzl/print/printConfig.js (.../printConfig.js) (revision 12965) +++ ssts-web/src/main/webapp/disinfectsystem/config/gzfdzl/print/printConfig.js (.../printConfig.js) (revision 12981) @@ -1,3 +1,30 @@ +var appropriationListConfig = { + headerFooter : [ + // 页眉名称 + {label : "复大肿瘤医院调拨单查询", dataIndex : 'depart', fontSize : 15, position : ["0.3cm","30%","99%",5]}, + {label : "调拨日期:", dataIndex : 'date', fontSize : 9, position : ["1cm","38%","99%",5]} + //{label : "科室:", dataIndex : 'depart', fontSize : 9, position : ["30","2%","90%",5]} + ], + //currentPageNumber : {label : "第#页", fontSize : 9, position : ["1cm","40%","90%",5]}, + //totalPageAmount : {label : "共&页", fontSize : 9, position : ["1cm","45%","90%",5]}, + goodsTable :{ + rowHeight : 20, + //position : ["50","1%","96%","6.0cm"], + fontSize:10, + position : ["1.5cm","0.2cm","99%","29cm"], + headRepeat : true, + columns : [ + {header : "单号", dataIndex : 'serialNumber', width : 60, align : 'center'}, + {header : "操作员", dataIndex : 'operator', width : 60, align : 'center'}, + {header : "出库仓库", dataIndex : 'warehouseName', width : 60, align : 'center'}, + {header : "入库仓库", dataIndex : 'targetWareHouseName', width : 60, align : 'center'}, + {header : "操作时间", dataIndex : 'time', width : 110, align : 'center'}, + {header : "金额", dataIndex : 'totalPrice', width : 75, align : 'center'}, + {header : "供应商", dataIndex : 'supplierName', width : 225, align : 'center'}, + {header : "备注", dataIndex : 'remark', width : 100, align : 'center'} + ] + } +} var godownEntryOutListConfig = { headerFooter : [ // 页眉名称 @@ -288,6 +315,48 @@ } } +var appropriationConfig = { + headerFooter : [ + // 标题 + {label : "广州复大肿瘤医院卫生材料调拨单", dataIndex : '', fontSize : 15, position : ["0.2cm","28%","99%",5]}, + {label : "调拨类型:手工调拨", dataIndex : '', fontSize : 9, position : ["1cm","2%","90%",5]}, + {label : "供应商:", dataIndex : 'supplierName', fontSize : 9, position : ["1.5cm","2%","90%",5]}, + {label : "出库仓库:", dataIndex : 'warehouseName', fontSize : 9, position : ["1cm","40%","90%",5]}, + {label : "入库仓库:", dataIndex : 'targetWarehouseName', fontSize : 9, position : ["1cm","75%","90%",5]}, + {label : "操作日期:", dataIndex : 'godownEntryTime', fontSize : 9, position : ["1.5cm","53%","90%",5]}, + {label : "调拨单号:", dataIndex : 'serialNumber', fontSize : 9, position : ["1.5cm","75%","90%",5]}, + + + {label : "小计: ", dataIndex : 'totalPrice', fontSize : 9, position : ["7.5cm","2%","90%",4]}, + {label : "制单日期:", dataIndex : 'printTime', fontSize : 9, position : ["8cm","2%","90%",4]}, + {label : "制单人:", dataIndex : 'printUser', fontSize : 9, position : ["8cm","25%","90%",4]}, + //{label : "验收:", dataIndex : '', fontSize : 9, position : ["8cm","38%","90%",4]}, + //{label : "采购:", dataIndex : '', fontSize : 9, position : ["8cm","51%","90%",4]}, + {label : "复核人:", dataIndex : 'printUser', fontSize : 9, position : ["8cm","64%","90%",4]}, + {label : "总合计: ", dataIndex : 'totalPrice', fontSize : 9, position : ["8cm","77%","99%",4]} + ], + currentPageNumber : {label : "第#页", fontSize : 9, position : ["1.5cm","40%","90%",5]}, + totalPageAmount : {label : "共&页", fontSize : 9, position : ["1.5cm","45%","90%",5]}, + goodsTable :{ + rowHeight : 22, + fontSize:10, + position : ["2cm","0.2cm","100%","5.5cm"], + headRepeat : true, + columns : [ + {header : "编码", dataIndex : 'code', width : '35', align : 'center'}, + {header : "名称", dataIndex : 'name', width : '170', align : 'left'}, + {header : "规格", dataIndex : 'specification', width : '100', align : 'center'}, + {header : "单位", dataIndex : 'unit', width : '30', align : 'center'}, + {header : "数量", dataIndex : 'amount', width : '30', align : 'center'}, + {header : "进价", dataIndex : 'price', width : '40', align : 'right'}, + {header : "进价金额", dataIndex : 'totalPrice', width : '50', align : 'right'}, + {header : "批号", dataIndex : 'batchNumber', width : '60', align : 'right'}, + {header : "产地", dataIndex : 'producingArea', width : '50', align : 'right'}, + {header : "注册证号", dataIndex : 'certification', width : '180', align : 'left'} + ] + } +} + var godownOutEntryConfig = { headerFooter : [ // 标题 @@ -981,6 +1050,8 @@ borrow : borrowPrintConfig, godownEntry: godownEntryConfig,// 一次性物品入库单 godownOutEntry: godownOutEntryConfig,//一次性物品退库单 + //一次性物品调拨单 + appropriation : appropriationConfig, purchasePlan : purchasePlanConfig, @@ -1005,5 +1076,7 @@ // 入库单列表 godownEntryList : godownEntryListPrintConfig, //退库单列表 - godownEntryOutList : godownEntryOutListConfig + godownEntryOutList : godownEntryOutListConfig, + //调拨单 + appropriationList : appropriationListConfig }; \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/appropriationView.js =================================================================== diff -u -r12977 -r12981 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/appropriationView.js (.../appropriationView.js) (revision 12977) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/appropriationView.js (.../appropriationView.js) (revision 12981) @@ -61,7 +61,35 @@ } } } - +//全部一次性物品 +var allDiposableGoodsStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/diposableGoodsAction!getDiposableGoodsData.do?allItems=yes', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + totalProperty : 'totalCount', + root : 'data' + }, [ + {name : 'id',mapping : 'id'}, + {name : 'spelling',mapping : 'spelling'}, + {name : 'name',mapping : 'name'}, + {name : 'displayName',mapping : 'displayName'}, + {name : 'referencePrice',mapping : 'referencePrice'} + ]) +}); +batchNumStore = new top.Ext.data.Store({ + proxy : new top.Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/diposableGoodsAction!getDisposableGoodsBatchList.do', + method : 'POST' + }), + reader : new top.Ext.data.JsonReader({ + fields : [ + {name : 'id'}, + {name : 'batchNumber'} + ] + }) +}); var wareHouseStore = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url : WWWROOT + '/disinfectSystem/baseData/wareHouseAction!getWareHouseData.do', @@ -179,6 +207,7 @@ {name : 'supplierName'}, {name : 'producingArea'} ]); + /** * 设置仓库的id和name的隐藏域的内容 * @param id @@ -721,6 +750,49 @@ }] })], buttons : [{ + text : '选择打印', + handler : function() { + if(!form.getForm().isValid()){ + showResult('请正确填写表单各值'); + return false; + } + var items = null; + var records = top.Ext.getCmp('appropriateItemGrid').getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请选择要打印的一次性物品!"); + return false; + } + for ( var i = 0, len = records.length; i < len; i++) { + if(items != null){ + items += ';' + } + items = records[i].data.id + + ',' + records[i].data.disposableGoodsID + + ',' + records[i].data.amount + + ',' + records[i].data.cost + + ',' + records[i].data.batchNumber + + ',' + records[i].data.expDate + + ',' + records[i].data.supplierName; + } + top.Ext.getCmp("items").setValue(items); + form.form.submit({ + url : WWWROOT + '/disinfectSystem/godownEntryAction!printSomeGodownEntryItem.do', + method : 'POST', + waitMsg : '正在保存数据,请稍候', + waitTitle : '提交表单', + success : function(form, action) { + window.close(); + grid.dwrReload(); + //打印条码 + commonEntry.printBarcode(action.result.barcode,false); + + }, + failure : function(form, action) { + showResult(action.failureType); + } + }); + } + },{ text : '保存', hidden: commonEntry.isOpen(), handler : function() { @@ -784,21 +856,6 @@ top.Ext.getCmp('name1').focus(false, 100); } -function printBarcode(barcodeStr){ - if(barcodeStr!=null && barcodeStr.length > 0){ - var godownEntryItem = barcodeStr.split(";"); - for ( var i = 0; i < godownEntryItem.length; i++) { - var resultItem = godownEntryItem[i].split("#&"); - var name =resultItem[0]; - var barcode = resultItem[1]; - var expDate = resultItem[2]; - var supplierName = resultItem[3]; - var batchNumber = resultItem[4]; - printDiposableGoodsInfo(barcode,name,expDate,supplierName,batchNumber,0); - } - } -} - // 删除 function deleteGodownEntry(grid) { var records = grid.getSelectionModel().getSelections(); @@ -879,7 +936,10 @@ var godownEntryItem = new GodownEntryItemRecord({ localID:g_localID++, id : action.result.data.itemsList[i].id, - disposableGoodsID : action.result.data.itemsList[i].diposableGoods.id, + disposableGoodsID : action.result.data.itemsList[i].disposableGoodsID, + disposableGoodsStockID : action.result.data.itemsList[i].disposableGoodsStockID, + disposableGoodsBatchID : action.result.data.itemsList[i].disposableGoodsBatchID, + disposableGoodsBatchStockID : action.result.data.itemsList[i].disposableGoodsBatchStockID, identificationID : action.result.data.itemsList[i].identificationID, batchID : action.result.data.itemsList[i].batchID, name : action.result.data.itemsList[i].diposableGoods.name + (b == false?"":" ["+specification+"]"), @@ -915,6 +975,7 @@ Ext.onReady(function() { Ext.QuickTips.init(); + commonEntry.setCurrentUserName(curUserName); //单价数据源 if(priceStore == null){ priceStore = new Ext.data.Store({ @@ -939,6 +1000,8 @@ var columns = [sm, {header : "单号",width : 200,dataIndex : 'serialNumber' , renderer : modifyRecord}, {header : "操作员",width : 200,dataIndex : 'operator'}, + {header : "出库仓库",width : 200,dataIndex : 'warehouseName'}, + {header : "入库仓库",width : 200,dataIndex : 'targetWareHouseName'}, {header : "操作时间",width : 200,dataIndex : 'time' , renderer : myDateFormat}, {id : 'operationRemark',header : "备注",width : 120,dataIndex : 'remark'} ]; @@ -947,6 +1010,8 @@ {name : 'id'}, {name : 'serialNumber'}, {name : 'operator'}, + {name : 'warehouseName'}, + {name : 'targetWareHouseName'}, {name : 'time'}, {name : 'remark'} ]; @@ -955,6 +1020,8 @@ filters:[ {type: 'string', dataIndex: 'serialNumber'}, {type: 'string', dataIndex: 'operator'}, + {type: 'string', dataIndex: 'warehouseName'}, + {type: 'string', dataIndex: 'targetWareHouseName'}, {type: 'date', dataIndex: 'time'}, {type: 'string', dataIndex: 'remark'} ]} @@ -983,6 +1050,29 @@ handler : function() { loadFormData(grid); } + },'-',{ + text : '打印', +// hidden : SSTS_WarehouseEntry_Delete, + iconCls : 'icon_print', + handler : function(){ + commonEntry.onPrintEntryDetail(grid,entityName + '单'); + } + },'-',{ + text : '打印列表', +// hidden : SSTS_WarehouseEntry_Delete, + hidden : true, + iconCls : 'icon_print', + handler : function() { + //加载打印数据 + var map = {}; + map["code"] = Ext.getCmp('code').getValue(); + map["batchNumber"] = Ext.getCmp('batchNumber').getValue(); + map["startDate"] = Ext.getCmp('startDate').getRawValue(); + map["endDate"] = Ext.getCmp('endDate').getRawValue(); + map["type"] = entityName + '单'; + + commonEntry.onPrintEntryList(map,entityName + '单'); + } }]; grid = new Ext.ux.ForgonPageGrid( { @@ -1005,9 +1095,171 @@ null ); + function initQueryValueAndReload() { + var startDate = Ext.getCmp('startDate').getRawValue(); + var endDate = Ext.getCmp('endDate').getRawValue(); + var code = Ext.getCmp('code').getValue(); + var batchNumber = Ext.getCmp('batchNumber').getValue(); + if(startDate || endDate){ + if(!compareDate(startDate,endDate)){ + showResult("开始时间不能大于结束时间"); + return; + } + } + + $Id('parm_s_startDate').value = startDate; + $Id('parm_s_endDate').value = endDate; + $Id('parm_s_code').value = code; + $Id('parm_s_batchNumber').value = batchNumber; + grid.dwrReload(); + } + var dt = new Date(); + var v = dt.getMonth()+1; + if(v < 10){ + v = "0" + (dt.getMonth()+1); + } + var startDayofMonth = dt.getFullYear() + "/" + v + "/01"; + var form = new Ext.Panel({ + id : 'northPanel', + layout : 'table', + frame : true, + region : 'north', + border : false, + bodyBorder : false, + layoutConfig : {columns : 2}, + height : 63, + items : [{ + width :900, + layout : 'column', + items:[{ + columnWidth : .73, + layout : 'form', + labelWidth : 60, + items : [{ + fieldLabel : '关键字', + xtype : 'combo', + id : 'code', + name : 'code', + queryParam : 'spell', + minChars : 0, + valueField : 'id', + displayField : 'displayName', + width : 600, + store : allDiposableGoodsStore, + forceSelection : true, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + allowBlank : true, + anchor : '97%', + listeners : { + select : function(combo, record, index) { + Ext.getCmp('batchNumber').setValue(); + Ext.getCmp('code').setValue(record.data.name); + batchNumStore.baseParams['disposableGoodsID'] = record.data.id; + batchNumStore.load(); + } + } + }] + },{ + columnWidth : .25, + layout : 'form', + labelWidth : 60, + items : [{ + xtype : 'combo', + id : 'batchNumber', + name : 'batchNumber', + fieldLabel : '物品批次', + maxLength : '30', + minChars : 0, + valueField : 'batchNumber', + displayField : 'batchNumber', + store : batchNumStore, + forceSelection : true, + lazyInit : false, + triggerAction : 'all', + hideTrigger : false, + typeAhead : false, + selectOnFocus :true, + anchor : '94%', + listeners :{ + select:function(combo, record, index ){ + var batchNumber = record.data.batchNumber; + Ext.getCmp('batchNumber').setValue(batchNumber); + } + } + }] + },{ + columnWidth : .5, + layout : 'form', + labelWidth : 60, + items : [{ + xtype : 'datefield', + fieldLabel : '开始日期', + name : 'startDate', + id : 'startDate', + readOnly : 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', + editable : false, + format : 'Y-m-d', + value:new Date(startDayofMonth), + anchor : '94%' + }] + },{ + columnWidth : .5, + layout : 'form', + labelWidth : 60, + items : [{ + xtype : 'datefield', + fieldLabel : '结束日期', + name : 'endDate', + id : 'endDate', + readOnly : 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', + editable : false, + format : 'Y-m-d', + value:new Date(), + anchor : '94%' + }] + }] + },{ + width :150, + layout : 'column', + items : [{ + columnWidth : .5, + layout :'form', + items : [{ + xtype : 'button', + text : '查询', + minWidth : 70, + iconCls : 'icon_search', + handler : function() { + initQueryValueAndReload(); + } + }] + },{ + columnWidth : .5, + layout :'form', + items : [{ + xtype : 'button', + text : '重置', + minWidth : 70, + iconCls : 'icon_set', + handler : function() { + Ext.getCmp('code').setValue(""); + Ext.getCmp('startDate').setValue(""); + Ext.getCmp('endDate').setValue(""); + Ext.getCmp('batchNumber').setValue(""); + } + }] + }] + }] + }); + var viewport = new Ext.Viewport( { layout : 'border', - items : [{ + items : [form,{ region : 'center', margins : '0 0 0 0', layout : 'fit', Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/appropriationView.jsp =================================================================== diff -u -r12787 -r12981 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/appropriationView.jsp (.../appropriationView.jsp) (revision 12787) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/appropriationView.jsp (.../appropriationView.jsp) (revision 12981) @@ -11,6 +11,7 @@ 调拨单信息 + @@ -26,11 +27,13 @@ +