Index: ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.jsp
===================================================================
diff -u -r29513 -r41535
--- ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.jsp (.../customInvoiceForm.jsp) (revision 29513)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.jsp (.../customInvoiceForm.jsp) (revision 41535)
@@ -54,6 +54,7 @@
+
Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.jsp
===================================================================
diff -u -r37356 -r41535
--- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.jsp (.../operationReservationInvoiceView.jsp) (revision 37356)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.jsp (.../operationReservationInvoiceView.jsp) (revision 41535)
@@ -37,6 +37,7 @@
+
Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.jsp
===================================================================
diff -u -r40459 -r41535
--- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.jsp (.../invoicePlanExtractedView.jsp) (revision 40459)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.jsp (.../invoicePlanExtractedView.jsp) (revision 41535)
@@ -175,7 +175,7 @@
-
+
Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js
===================================================================
diff -u -r41520 -r41535
--- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 41520)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 41535)
@@ -14,7 +14,6 @@
var isScanAmountEqualsAppAmountConfirmed = false;
var EXPENSIVEGOODS_TYPE_NAME = '高值耗材';
var goodsInfo;
-var sendOutAbnormalGoodsStore;//异常物品列表参数
var allBarcodeArr = [];//异常物品列表参数
var invoiceFormWindowTwo;
var barcodeBtn;
@@ -128,30 +127,6 @@
});
top.Ext.getCmp('sendOutGoodsSourceTree').show();
}
-//异常物品列表删除选中的物品
-function removeSendOutAbnormalGoods(newBarcode) {
- var rows = top.Ext.getCmp('sendOutAbnormalGoods').getSelectionModel().getSelections();
- if (newBarcode) {
- rows = top.Ext.getCmp('sendOutAbnormalGoods').getStore().data.items;
- }
- if (rows && rows.length > 0) {
- for (var i = 0; i < rows.length; i++) {
- if (newBarcode) {
- if (rows[i].data.barcode == newBarcode) {
- sendOutAbnormalGoodsStore.remove(rows[i]);
- return;
- }
- } else {
- //DGSETYY-80:4.4在“异常物品列表”或“物品发货计划”列表中删除了相关的物品时,也需要实时将对应页面的物品进行删除
- if (sstsConfig.enableTraceableToussesShippedBackToTheOriginalApplyInfoFunction) {
- removeSendOutGoods(rows[i].data.barcode);
- }
- sendOutAbnormalGoodsStore.remove(rows[i]);
- return;
- }
- }
- }
-}
//删除发货扫描的物品
function removeSendOutGoods(newBarcode) {
//左边已扫物品的已选项
@@ -736,20 +711,6 @@
{ name: 'tousseDefinitionId' }
]);
-//异常物品列表
-var addAbnormalGridItem = Ext.data.Record.create([
- { name: 'id' },
- { name: 'barcode' },
- { name: 'name' },
- { name: 'appRecord' },
- { name: 'tousseFixedBarcode' },
- { name: 'showTousseName' },
- { name: 'status' },
- { name: 'depart' },
- { name: 'batchNumber' }
-]);
-
-
var AppGoodsItem = Ext.data.Record.create([
{ name: 'showTousseName' },
{ name: 'applicationAmount' },
@@ -801,26 +762,6 @@
}
var barcodeToAppRecordMap = {};
var barcodeToScanGoodsMap = {};
-//异常物品列表
-function addAbnormalGoods(goods) {
- var goodsName = goods.name;
- var record = findRecordByGoodsVOFromRecyclingApplication(goods);
- var add = true;
- if (add) {
- var newRecord = new addAbnormalGridItem({
- id: 0,
- barcode: goods.barcode,
- name: goods.name,
- ttsName: goods.ttsName,
- tousseFixedBarcode: goods.tousseFixedBarcode,
- showTousseName: goods.showTousseName,
- status: goods.status,
- depart: goods.depart,
- batchNumber: goods.batchNumber
- });
- sendOutAbnormalGoodsStore.insert(0, newRecord);
- }
-}
/**
* 添加至已扫物品列表
@@ -1276,7 +1217,7 @@
})
}
//扫描发货物品
-function loadGoodsByBarcode(orgUnitCoding,newBarcode) {
+function loadGoodsByBarcode(orgUnitCoding, newBarcode) {
var barcode = newBarcode || top.Ext.getCmp("scanText").getValue().Trim();
var barcodeEnd = top.Ext.getCmp("scanTextEnd").getValue().Trim();
var singleMode = true;
@@ -1566,80 +1507,82 @@
var dataInfoWin;
//GYSDERMYY-24:第三方器械包
-function loadTousseInstanceByBarcode(barcode,isThirdPartyTousse){
+function loadTousseInstanceByBarcode(barcode, isThirdPartyTousse) {
Ext.Ajax.request({
url: WWWROOT + '/disinfectSystem/baseData/thirdPartyTousseReceiveRecordController/loadTousseInstanceByBarcode.mhtml',
- params: { barcode: barcode, isThirdPartyTousse: isThirdPartyTousse},
+ params: { barcode: barcode, isThirdPartyTousse: isThirdPartyTousse },
success: function (response, options) {
var result = Ext.decode(response.responseText);
- if(result.data){
+ if (result.data) {
top.Ext.getCmp('scanText').setValue("");
var orgUnitCoding = top.Ext.getCmp("orgUnitCoding").getValue();
- if(result.data.length > 0){
- if(result.data.length == 1){
- loadGoodsByBarcode(orgUnitCoding,result.data[0].barcode);
- }else {
+ if (result.data.length > 0) {
+ if (result.data.length == 1) {
+ loadGoodsByBarcode(orgUnitCoding, result.data[0].barcode);
+ } else {
showMultiDataInfoWin(result.data);
}
- }else {
+ } else {
if (!barcodeBtn.processBarcode(barcode)) {
loadGoodsByBarcode(orgUnitCoding);
}
}
- }else {
+ } else {
showResult(result.message);
}
}
});
}
//GYSDERMYY-24:显示多个第三方器械包
-function showMultiDataInfoWin(dataInfoArray){
+function showMultiDataInfoWin(dataInfoArray) {
var dataInfoStore = new top.Ext.data.Store({
- data:dataInfoArray,
- reader : new top.Ext.data.JsonReader({
- fields : [
- {name: 'barcode'},
- {name: 'thirdPartyBarcode'},
- {name: 'tousseName'}
+ data: dataInfoArray,
+ reader: new top.Ext.data.JsonReader({
+ fields: [
+ { name: 'barcode' },
+ { name: 'thirdPartyBarcode' },
+ { name: 'tousseName' }
]
})
});
var dataInfoGrid = new top.Ext.grid.GridPanel({
- store:dataInfoStore,
+ store: dataInfoStore,
columns: [
- {header: "器械包名称", width: 130, dataIndex: 'tousseName'},
- {header: "条码", width: 80,dataIndex: 'barcode'},
- {header: "第三方条码", width: 80,dataIndex: 'thirdPartyBarcode'},
- {header: "操作", width: 70,dataIndex: 'id',renderer : function(v, p, record){
- var barcode = record.data.barcode;
- return "选择";
- }}
+ { header: "器械包名称", width: 130, dataIndex: 'tousseName' },
+ { header: "条码", width: 80, dataIndex: 'barcode' },
+ { header: "第三方条码", width: 80, dataIndex: 'thirdPartyBarcode' },
+ {
+ header: "操作", width: 70, dataIndex: 'id', renderer: function (v, p, record) {
+ var barcode = record.data.barcode;
+ return "选择";
+ }
+ }
],
stripeRows: true,
viewConfig: {
- forceFit:true
+ forceFit: true
},
- height:200,
- width:600
+ height: 200,
+ width: 600
});
dataInfoWin = new top.Ext.Window({
- autoHeight:true,
- title : '器械包选择',
- width:615,
- draggable:true,
- modal:true,
- closeAction:'close',
- items:[dataInfoGrid]
- });
- dataInfoWin.show();
+ autoHeight: true,
+ title: '器械包选择',
+ width: 615,
+ draggable: true,
+ modal: true,
+ closeAction: 'close',
+ items: [dataInfoGrid]
+ });
+ dataInfoWin.show();
}
//GYSDERMYY-24:选择第三方器械包
-function getdataInfo(barcode){
+function getdataInfo(barcode) {
if (!barcodeBtn.processBarcode(barcode)) {
var orgUnitCoding = top.Ext.getCmp("orgUnitCoding").getValue();
- loadGoodsByBarcode(orgUnitCoding,barcode);
+ loadGoodsByBarcode(orgUnitCoding, barcode);
dataInfoWin.close();
}
}
@@ -1830,9 +1773,9 @@
}
//GZFDZL-157:显示查询周期
-function showQueryTime(tousseDefinitionID,rowIndex){
+function showQueryTime(tousseDefinitionID, rowIndex) {
var form = new top.Ext4.Panel({
- id:'configForm',
+ id: 'configForm',
region: 'north',
buttonAlign: 'center',
border: 0,
@@ -1845,14 +1788,14 @@
},
items: [{
layout: 'column',
- border:0,
- style:'background:none',
+ border: 0,
+ style: 'background:none',
items: [{
layout: 'form',
columnWidth: 0.18,
border: 0,
style: 'margin-bottom:10px',
- height:21,
+ height: 21,
items: [{
xtype: 'displayfield',
fieldLabel: '查询周期',
@@ -1894,7 +1837,7 @@
allowBlank: false,
anchor: '95%'
}]
- },{
+ }, {
layout: 'form',
columnWidth: 0.18,
border: 0,
@@ -1906,7 +1849,7 @@
labelAlign: 'right',
anchor: '100%'
}]
- },{
+ }, {
layout: 'form',
columnWidth: 0.15,
border: 0,
@@ -1921,7 +1864,7 @@
top.Ext4.getCmp('endDate').setRawValue(endDate);
}
}]
- },{
+ }, {
layout: 'form',
columnWidth: 0.15,
border: 0,
@@ -1936,7 +1879,7 @@
top.Ext4.getCmp('endDate').setRawValue(endDate);
}
}]
- },{
+ }, {
layout: 'form',
columnWidth: 0.15,
border: 0,
@@ -1959,13 +1902,13 @@
handler: function () {
var startDate = top.Ext4.getCmp('startDate').getRawValue();
var endDate = top.Ext4.getCmp('endDate').getRawValue();
- if(startDate || endDate){
- if(!compareDate(startDate,endDate)){
+ if (startDate || endDate) {
+ if (!compareDate(startDate, endDate)) {
showResult("开始时间不能大于结束时间");
return;
}
}
- getDisposableGoodsUseAmountByDiposableGoodsIds(startDate,endDate,tousseDefinitionID,rowIndex);
+ getDisposableGoodsUseAmountByDiposableGoodsIds(startDate, endDate, tousseDefinitionID, rowIndex);
}
}, {
xtype: 'button',
@@ -1980,49 +1923,49 @@
});
var window = new top.Ext4.Window({
- id:'queryTime',
- autoHeight:true,
- title : '查询周期设置',
- width:600,
- draggable:true,
- modal:true,
+ id: 'queryTime',
+ autoHeight: true,
+ title: '查询周期设置',
+ width: 600,
+ draggable: true,
+ modal: true,
items: [form]
- });
+ });
window.show();
- var startDate = getDefaultDate(newDate,1) + dayStartTime;
+ var startDate = getDefaultDate(newDate, 1) + dayStartTime;
var endDate = getDefaultDate(newDate) + dayStartTime;
top.Ext4.getCmp('startDate').setRawValue(startDate);
top.Ext4.getCmp('endDate').setRawValue(endDate);
}
//GZFDZL-157:获取历史使用量
-function getDisposableGoodsUseAmountByDiposableGoodsIds(startDate,endDate,tousseDefinitionID,rowIndex){
+function getDisposableGoodsUseAmountByDiposableGoodsIds(startDate, endDate, tousseDefinitionID, rowIndex) {
var departCode = top.Ext.getCmp("orgUnitCoding").getValue();
- if(departCode == ''){
+ if (departCode == '') {
showResult('请选择申请科室');
return
}
var params = {
- departCode:departCode,
- startDate:startDate,
- endDate:endDate,
- diposableGoodsIds:tousseDefinitionID
+ departCode: departCode,
+ startDate: startDate,
+ endDate: endDate,
+ diposableGoodsIds: tousseDefinitionID
}
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/diposablegoods/disposableGoodsController/getDisposableGoodsUseAmountByDiposableGoodsIds.mhtml',
- params : params,
- success : function(response, options) {
- var result = Ext.util.JSON.decode(response.responseText);
- if(result.success){
- if(result.rows.length > 0){
+ url: WWWROOT + '/disinfectSystem/diposablegoods/disposableGoodsController/getDisposableGoodsUseAmountByDiposableGoodsIds.mhtml',
+ params: params,
+ success: function (response, options) {
+ var result = Ext.util.JSON.decode(response.responseText);
+ if (result.success) {
+ if (result.rows.length > 0) {
var record = recyclingapplicationStore1.getAt(rowIndex);
- record.set('useAmount',result.rows[0].useAmount);
+ record.set('useAmount', result.rows[0].useAmount);
top.Ext4.getCmp('queryTime').close();
- }else {
+ } else {
showResult('查询不到数据');
}
- }else {
+ } else {
showResult(result.message);
}
}
@@ -2046,22 +1989,6 @@
invoicePlanFormOpened = true;
lastLoadWarehouseId = null;
defaultFocusedFieldOnInvoiceForm = getStrValueFromJs('sstsConfig.defaultFocusedFieldOnInvoiceForm', defaultFocusedFieldOnInvoiceForm);
- //异常物品列表--Ext.data.Store
- sendOutAbnormalGoodsStore = new Ext.data.Store({
- reader: new Ext.data.JsonReader({
- fields: [
- { name: 'id' },
- { name: 'barcode' },
- { name: 'name' },
- { name: 'ttsName' },
- { name: 'appRecord' },
- { name: 'showTousseName' },
- { name: 'status' },
- { name: 'depart' },
- { name: 'batchNumber' }
- ]
- })
- });
// 发货物品
sendOutGoodsStore1 = new Ext.data.Store({
reader: new Ext.data.JsonReader({
@@ -2264,35 +2191,35 @@
} else {
top.Ext.getCmp('btnBatchScanDisposableGoods').setVisible(false);
}
-
- if(top.Ext.getCmp('orgUnitCoding').getValue() !== '' && ids.length > 0 && sstsConfig.enableTheHistoricalUsageStatisticsFeature){
+
+ if (top.Ext.getCmp('orgUnitCoding').getValue() !== '' && ids.length > 0 && sstsConfig.enableTheHistoricalUsageStatisticsFeature) {
var startDate = getDefaultDate(newDate, 1) + dayStartTime;
var endDate = getDefaultDate(newDate) + dayStartTime;
var params = {
- departCode:top.Ext.getCmp('orgUnitCoding').getValue(),
- startDate:startDate,
- endDate:endDate,
- diposableGoodsIds:ids.join(',')
+ departCode: top.Ext.getCmp('orgUnitCoding').getValue(),
+ startDate: startDate,
+ endDate: endDate,
+ diposableGoodsIds: ids.join(',')
}
Ext.Ajax.request({
- url : WWWROOT + '/disinfectSystem/diposablegoods/disposableGoodsController/getDisposableGoodsUseAmountByDiposableGoodsIds.mhtml',
- params : params,
- success : function(response, options) {
- var res = Ext.util.JSON.decode(response.responseText);
- if(res.success){
- if(res.rows.length > 0){
- for(var z=0;z";
- return str;
- },
- dataIndex: 'button'
- },
- { header: "包状态", dataIndex: 'status', width: 80, menuDisabled: true },
- { header: "回收科室", dataIndex: 'depart', width: 125, menuDisabled: true },
- { header: "name", dataIndex: 'name', hidden: true, menuDisabled: true },
- { header: "批次/灭菌日期", dataIndex: 'batchNumber', width: 110, menuDisabled: true }
- ]);
var sendOutGoodsColumnModel = new Ext.grid.ColumnModel([
{
header: "条码", dataIndex: 'barcode', align: 'center', width: 72, menuDisabled: true,
@@ -2462,10 +2372,6 @@
]
});
- //申请物品
- var invoicePlan_recyclingapplicationStore = new Ext.data.Store({
- reader: invoicePlan_rd
- });
//申请物品(新加了一个带1的store,之前应该是受到待发物品的重名影响,会报未定义)
var invoicePlan_recyclingapplicationStore1 = new Ext.data.Store({
reader: invoicePlan_rd
@@ -2521,7 +2427,7 @@
isScanAmountEqualsAppAmountConfirmed = false;
getTousseGridData1();
var signStorageLocationId = '';
- if(sstsConfig.enableDesignatedWarehouseReceiving){
+ if (sstsConfig.enableDesignatedWarehouseReceiving) {
signStorageLocationId = top.Ext.getCmp("storageLocationName").getValue()
}
form.form.submit({
@@ -2545,12 +2451,14 @@
for (var k = 0; k < result.resultData.length; k++) {
if (result.resultData[k].barcode == barcode) {
showMultipleResult(result.resultData[k].invoiceFailReason);
- var doc = documentGetElementsByClassName('x-grid3-body',top.document.getElementById('sendOutGoods'))[0];
- documentGetElementsByClassName('x-grid3-row',doc)[i].style.backgroundColor = 'red';
+ var doc = documentGetElementsByClassName('x-grid3-body', top.document.getElementById('sendOutGoods'))[0];
+ documentGetElementsByClassName('x-grid3-row', doc)[i].style.backgroundColor = 'red';
if (sstsConfig.isUseAbnormalGoodsTable) {
//加入异常物品列表
addAbnormalGoods(tousseInstancesBelongToThisComboTousse[j]);
- top.Ext.getCmp('invoicePlan_recyclingApplicationForm').expand();
+ if (!sstsConfig.enableAbnormalItemListFixedDisplay) {
+ top.Ext.getCmp('invoicePlan_recyclingApplicationForm').expand();
+ }
top.Ext.getCmp('tabpanel').activeTab = 1;
top.Ext.getCmp('tabpanel').render();
}
@@ -2562,12 +2470,14 @@
for (var k = 0; k < result.resultData.length; k++) {
if (result.resultData[k].barcode == barcode) {
showMultipleResult(result.resultData[k].invoiceFailReason);
- var doc = documentGetElementsByClassName('x-grid3-body',top.document.getElementById('sendOutGoods'))[0];
- documentGetElementsByClassName('x-grid3-row',doc)[i].style.backgroundColor = 'red';
+ var doc = documentGetElementsByClassName('x-grid3-body', top.document.getElementById('sendOutGoods'))[0];
+ documentGetElementsByClassName('x-grid3-row', doc)[i].style.backgroundColor = 'red';
if (sstsConfig.isUseAbnormalGoodsTable) {
//加入异常物品列表
addAbnormalGoods(record.data);
- top.Ext.getCmp('invoicePlan_recyclingApplicationForm').expand();
+ if (!sstsConfig.enableAbnormalItemListFixedDisplay) {
+ top.Ext.getCmp('invoicePlan_recyclingApplicationForm').expand();
+ }
top.Ext.getCmp('tabpanel').activeTab = 1;
top.Ext.getCmp('tabpanel').render();
}
@@ -3164,15 +3074,15 @@
if (e.getKey() == 13) {// 输入;号键,grid重新加载
var scanText = top.Ext.getCmp("scanText").getValue();
if (scanText != '') {
- if(sstsConfig.enbaleThirdPartyTousseManagementFunction){
+ if (sstsConfig.enbaleThirdPartyTousseManagementFunction) {
var barcode = scanText;
var isThirdPartyTousse = '否';
- if(scanText.indexOf('@@') >= 0){
+ if (scanText.indexOf('@@') >= 0) {
barcode = scanText.split('@@')[0];
isThirdPartyTousse = '是';
}
- loadTousseInstanceByBarcode(barcode,isThirdPartyTousse);
- }else {
+ loadTousseInstanceByBarcode(barcode, isThirdPartyTousse);
+ } else {
if (!barcodeBtn.processBarcode(scanText)) {
loadGoodsByBarcode(orgUnitCoding);
}
@@ -3431,15 +3341,15 @@
recalcDisposableGoodsAmount(name);
}
},
- render : function() {
- if(sstsConfig.enableDesignatedWarehouseReceiving){
+ render: function () {
+ if (sstsConfig.enableDesignatedWarehouseReceiving) {
var orgUnitCoding = top.Ext.getCmp('orgUnitCoding').getValue()
var warseHouseStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: WWWROOT + '/disinfectSystem/baseData/storageLocationAction!searchStorageLocationByKeyword.do',
method: 'POST'
}),
- baseParams: { orgUnitCode: orgUnitCoding,searchLeafStorageLocation:true },
+ baseParams: { orgUnitCode: orgUnitCoding, searchLeafStorageLocation: true },
reader: new Ext.data.JsonReader({
totalProperty: 'totalCount',
root: 'data'
@@ -3450,9 +3360,9 @@
])
})
var tbar = new top.Ext.Toolbar({
- items :[{
- text : '签收库房:'
- },{
+ items: [{
+ text: '签收库房:'
+ }, {
xtype: 'combo',
id: 'storageLocationName',
name: 'storageLocationName',
@@ -3461,7 +3371,7 @@
valueField: 'id',
displayField: 'storageLocationPath',
anchor: '95%',
- width:500,
+ width: 500,
store: warseHouseStore,
forceSelection: true,
lazyInit: true,
@@ -3471,7 +3381,7 @@
listWidth: 400
}]
});
- tbar.render(this.tbar);
+ tbar.render(this.tbar);
}
}
}
@@ -3497,8 +3407,9 @@
showResult('请先选择申请单!', null, sstsConfig.messagePauseTimeOnInvoiceplanPage);
return;
}
- var w = top.Ext.getCmp('invoicePlan_recyclingApplicationForm');
- w.expand();
+ if (!sstsConfig.enableAbnormalItemListFixedDisplay) {
+ top.Ext.getCmp('invoicePlan_recyclingApplicationForm').expand();
+ }
}
}, {
xtype: 'combo',
@@ -3544,8 +3455,6 @@
params: { id: selectedInvoicePlanId },
success: function (response, options) {
var obj = JSON.parse(response.responseText);
- // openInvoicePlanWindow(obj);
- // top.Ext.getCmp('invoicePlan_recyclingApplicationForm').show();
top.Ext.getCmp('invoicePlan_applicant').setValue(obj.applicant);
top.Ext.getCmp('invoicePlan_applicationTime').setValue(obj.applicationTime);
@@ -3601,7 +3510,51 @@
}
})]
}]
- }],
+ }]
+ });
+
+ // 发货员
+ var cookieSender = Ext.state.Manager.getProvider().get('cookieSender');
+ if (getSystemSetConfig('rememberLastInvoiceSender', false) && cookieSender) {
+ top.Ext.getCmp('sender').setValue(cookieSender);
+ }
+ // 核对员
+ var cookieAssistantSender = Ext.state.Manager.getProvider().get('cookieAssistantSender');
+ if (getSystemSetConfig('rememberLastInvoiceAssistantSender', false) && cookieAssistantSender) {
+ top.Ext.getCmp('assistantSender').setValue(cookieAssistantSender);
+ }
+ var cookiePersonInCharge = Ext.state.Manager.getProvider().get('cookiePersonInCharge');
+ var cookiePersonInChargeCode = Ext.state.Manager.getProvider().get('cookiePersonInChargeCode');
+ var rememberLastInvoicePersonInCharge = getSystemSetConfig('rememberLastInvoicePersonInCharge', false);
+ if (rememberLastInvoicePersonInCharge) {
+ if (cookiePersonInCharge) {
+ top.Ext.getCmp('personInCharge').setValue(cookiePersonInCharge);
+ }
+ if (cookiePersonInChargeCode) {
+ top.Ext.getCmp('personInChargeCode').setValue(cookiePersonInChargeCode);
+ }
+ }
+
+ var enableAbnormalItemListFixedDisplay = sstsConfig.enableAbnormalItemListFixedDisplay || false;
+ var invoicePlan_form = renderRecyclingApplicationForm();
+ var winWidth = recyclingApplicationWinWidth;
+ if (enableAbnormalItemListFixedDisplay && sstsConfig.isUseAbnormalGoodsTable) {
+ winWidth = recyclingApplicationWinWidth + 590;
+ }
+
+ invoiceFormWindowTwo = new top.Ext.Window({
+ id: 'recyclingApplicationWin',
+ layout: 'border',
+ title: '科室发货计划',
+ resizable: false,
+ width: winWidth,
+ height: recyclingApplicationWinHeight,
+ border: false,
+ modal: true,
+ plain: true,
+ stateful: false,
+ items: [form, invoicePlan_form],
+ buttonAlign: 'center',
buttons: [{
text: sstsConfig.aliasNameOfSaveKeywordInInvoiceForm ? sstsConfig.aliasNameOfSaveKeywordInInvoiceForm : '保存',
id: 'saveButton',
@@ -3643,262 +3596,12 @@
disabled: true,
handler: function () {
top.Ext.getCmp("recyclingApplicationWin").hide();
- openCanInvoiceTousseListForm(orgUnitCoding, depart, invoicePlanId,getWaitInvoiceGoodsGridData());
+ openCanInvoiceTousseListForm(orgUnitCoding, depart, invoicePlanId, getWaitInvoiceGoodsGridData());
}
}]
});
- // 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 (getSystemSetConfig('rememberLastInvoiceSender', false) && cookieSender) {
- top.Ext.getCmp('sender').setValue(cookieSender);
- }
- // 核对员
- var cookieAssistantSender = Ext.state.Manager.getProvider().get('cookieAssistantSender');
- if (getSystemSetConfig('rememberLastInvoiceAssistantSender', false) && cookieAssistantSender) {
- top.Ext.getCmp('assistantSender').setValue(cookieAssistantSender);
- }
- var cookiePersonInCharge = Ext.state.Manager.getProvider().get('cookiePersonInCharge');
- var cookiePersonInChargeCode = Ext.state.Manager.getProvider().get('cookiePersonInChargeCode');
- var rememberLastInvoicePersonInCharge = getSystemSetConfig('rememberLastInvoicePersonInCharge', false);
- if (rememberLastInvoicePersonInCharge) {
- if (cookiePersonInCharge) {
- top.Ext.getCmp('personInCharge').setValue(cookiePersonInCharge);
- }
- if (cookiePersonInChargeCode) {
- top.Ext.getCmp('personInChargeCode').setValue(cookiePersonInChargeCode);
- }
- }
- /////
-
- // recyclingapplicationStore1.removeAll();
- // recyclingapplicationStore1.load();
-
- var invoicePlan_recyclingapplicationCm = new Ext.grid.ColumnModel([
- { header: "申请的物品", dataIndex: 'showTousseName', width: 180, menuDisabled: true },
- { header: "数量", dataIndex: 'applicationAmount', width: 50, menuDisabled: true },
- { header: "已发", dataIndex: 'sendAmount', width: 50, menuDisabled: true },
- { header: "待发", dataIndex: 'count', width: 50, menuDisabled: true }
- ]);
-
-
- //异常物品列表Panel面板
- var sendOutAbnormalGoods_form = new top.Ext.Panel({
- id: 'sendOutAbnormalGoodsWin',
- frame: true,
- columnWidth: .20,
- labelSeparator: ':',
- bodyStyle: 'padding:5px 5px 0px 5px',
- width: 590,
- height: 480,
- autoScroll: true,
- labelAlign: 'right',
- layout: 'form',
- items: [
- new top.Ext.grid.EditorGridPanel({
- id: 'sendOutAbnormalGoods',
- store: sendOutAbnormalGoodsStore,
- style: 'padding:0px',
- autoHeight: true,
- columnWidth: 0.5,
- cm: abnormalCm,
- width: 580,
- 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: !sstsConfig.showButtonOfDeleteAllAbnormalGoods,
- iconCls: 'btn_ext_application_del',
- handler: function () {
- sendOutAbnormalGoodsStore.removeAll();
- }
- }]
- })
- ]
- });
-
- var invoicePlan_form = new top.Ext.FormPanel({
- id: 'invoicePlan_recyclingApplicationForm',
- frame: true,
- region: 'east',
- columnWidth: .20,
- labelSeparator: ':',
- bodyStyle: 'padding:5px 5px 0px 5px',
- width: 590,
- height: 580,
- autoScroll: true,
- labelAlign: 'right',
- collapsible: true,
- stateful: false,
- collapsed: true,
- title: '申请单信息',
- layout: 'form',
- items: [
- {
- xtype: 'tabpanel',
- id: 'tabpanel',
- activeTab: 0,
- autoHeight: true,
- deferredRender: false,
- items: [
- {
- title: '申请单信息',
- itemId: 'sq',
- autoHeight: true,
- items: [
- {
- xtype: "fieldset",
- title: "基础数据",
- layout: 'column',
- style: 'padding:0px',
- autoHeight: true,
- items: [{
- layout: 'column',
- columnWidth: 1,
- items: [{
- layout: 'form',
- labelWidth: 100,
- columnWidth: 1,
- items: [{
- xtype: 'textfield',
- fieldLabel: '申请时间',
- maxLength: '100',
- id: 'invoicePlan_applicationTime',
- name: 'invoicePlan_applicationTime',
- // value : depart,
- readOnly: true,
- anchor: '99%',
- cls: 'fieldReadOnlyNoRemove'
- }]
- }, {
- layout: 'form',
- labelWidth: 100,
- columnWidth: 1,
- items: [{
- xtype: 'textfield',
- fieldLabel: '回收时间',
- maxLength: '41',
- id: 'invoicePlan_recyclingTime',
- name: 'invoicePlan_recyclingTime',
- readOnly: true,
- // allowBlank : false,
- anchor: '99%',
- // value:$Id('userName').value,
- cls: 'fieldReadOnlyNoRemove'
- }]
- }, {
- layout: 'form',
- labelWidth: 100,
- columnWidth: 1,
- items: [{
- xtype: 'textfield',
- fieldLabel: '回收状态',
- maxLength: '41',
- id: 'invoicePlan_recyclingStatus',
- name: 'invoicePlan_recyclingStatus',
- readOnly: true,
- // allowBlank : false,
- anchor: '99%',
- // value:$Id('userName').value,
- cls: 'fieldReadOnlyNoRemove'
- }]
- }, {
- layout: 'form',
- labelWidth: 100,
- columnWidth: 1,
- items: [{
- xtype: 'textfield',
- fieldLabel: '申请人',
- maxLength: '41',
- id: 'invoicePlan_applicant',
- name: 'invoicePlan_applicant',
- readOnly: true,
- //allowBlank : false,
- anchor: '99%',
- //value:$Id('userName').value,
- cls: 'fieldReadOnlyNoRemove'
- }]
- }]
- }]
- }, {
- layout: 'column',
- items: [{
- layout: 'form',
- columnWidth: 0.99,
- items: [new top.Ext.grid.EditorGridPanel({
- id: 'invoicePlan_appGoodsDetail',
- title: '物品明细',
- store: invoicePlan_recyclingapplicationStore,
- cm: invoicePlan_recyclingapplicationCm,
- enableHdMenu: false,
- width: 590,
- height: 425,
- loadMask: true,
- autoExpandColumn: 'deleteItem',
- frame: false,
- bodyStyle: 'padding:0px;border:1px solid #afd7af',
- viewConfig: {
- forceFit: true
- },
- selModel: new top.Ext.grid.RowSelectionModel({
- singleSelect: false
- }),
- listeners: {
- validateedit: function (o) {
- }
- }
- })]
- }]
- }
- ]
- }, {
- title: '异常物品列表',
- itemId: 'yc',
- autoHeight: true,
- items: [sendOutAbnormalGoods_form]
- }
- ]
- }
- ]
- });
-
- invoiceFormWindowTwo = new top.Ext.Window({
- id: 'recyclingApplicationWin',
- layout: 'border',
- title: '科室发货计划',
- resizable: false,
- width: recyclingApplicationWinWidth,
- height: recyclingApplicationWinHeight,
- border: false,
- modal: true,
- plain: true,
- stateful: false,
- items: [form, invoicePlan_form]
- });
-
-
invoiceFormWindowTwo.on('close', function (w) {
//切记注意:按取消关闭window后,一定要把已选择的申请单号变量清空
selectedInvoicePlanId = "";
@@ -3964,18 +3667,7 @@
postInitDataTimer = setInterval("postInitData()", 500);
}
}
-// 打开申请单信息
-function openInvoicePlanWindow(invoicePlanId) {
- var recyclingApplicationWin = top.Ext.getCmp('recyclingApplicationWin');
- var invoicePlan_recyclingApplicationForm = top.Ext.getCmp('invoicePlan_recyclingApplicationForm');
- if (invoicePlan_recyclingApplicationForm) {
- recyclingApplicationWin.remove(invoicePlan_recyclingApplicationForm);
- return;
- }
- recyclingApplicationWin.add(invoicePlan_form);
-}
-
function postInitData() {
// alert('wareHouseStoreLoaded='+wareHouseStoreLoaded+',recyclingapplicationStoreLoaded='+recyclingapplicationStoreLoaded)
if (!wareHouseStoreLoaded || !recyclingapplicationStoreLoaded) {
Index: ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.js
===================================================================
diff -u -r40302 -r41535
--- ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.js (.../customInvoiceForm.js) (revision 40302)
+++ ssts-web/src/main/webapp/disinfectsystem/invoice/customInvoiceForm.js (.../customInvoiceForm.js) (revision 41535)
@@ -14,43 +14,43 @@
//申请科室Store
var appDepartJsonStore = new Ext.data.Store({
- proxy : new Ext.data.HttpProxy({
- url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getApplicationDepartJson.do?showDisableOrgUnit=false&dataIsolationModule='+dataIsolationModule,
- method : 'POST'
+ proxy: new Ext.data.HttpProxy({
+ url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getApplicationDepartJson.do?showDisableOrgUnit=false&dataIsolationModule=' + dataIsolationModule,
+ method: 'POST'
}),
- reader : new Ext.data.JsonReader({
- root : 'data'
- },[
- {name : 'id',mapping : 'id'},
- {name : 'departCode',mapping : 'departCode'},
- {name : 'name',mapping : 'name'}
- ]
+ reader: new Ext.data.JsonReader({
+ root: 'data'
+ }, [
+ { name: 'id', mapping: 'id' },
+ { name: 'departCode', mapping: 'departCode' },
+ { name: 'name', mapping: 'name' }
+ ]
)
});
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);
@@ -59,44 +59,44 @@
}
});
-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 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]);
refreshSumInfo();
sendDeleteScannedGoodsLog(rows[i].data);
@@ -105,67 +105,67 @@
}
// 刷新汇总信息
-function refreshSumInfo(){
+function refreshSumInfo() {
var map = {};
var submitItems = [];
recyclingapplicationStore.removeAll();
- for ( var i = 0; i < sendOutGoodsStore.getCount(); i++) {
+ for (var i = 0; i < sendOutGoodsStore.getCount(); i++) {
var scanItem = sendOutGoodsStore.getAt(i).data;
var showTousseName = scanItem.showTousseName;
var amount = scanItem.count;
var fluctuationPrice = parseFloat(scanItem.fluctuationPrice);
var item = map[showTousseName];
- if(item){
-// item.fluctuationPrice += fluctuationPrice;
+ if (item) {
+ // item.fluctuationPrice += fluctuationPrice;
item.itemTotalFluctuationPrice += fluctuationPrice;
item.amount += amount;
- }else{
+ } else {
item = {
- showTousseName:showTousseName,
- fluctuationPrice:fluctuationPrice,
- itemTotalFluctuationPrice:fluctuationPrice,
- amount:amount
+ showTousseName: showTousseName,
+ fluctuationPrice: fluctuationPrice,
+ itemTotalFluctuationPrice: fluctuationPrice,
+ amount: amount
}
map[showTousseName] = item;
}
}
var totalFluctuationPrice = 0;
var totalAmount = 0;
- for( var showTousseName in map ){
- if(map.hasOwnProperty(showTousseName)){
+ for (var showTousseName in map) {
+ if (map.hasOwnProperty(showTousseName)) {
var item = map[showTousseName];
- totalFluctuationPrice += item.itemTotalFluctuationPrice ;
+ totalFluctuationPrice += item.itemTotalFluctuationPrice;
totalAmount += item.amount;
- item.fluctuationPrice = Ext.util.Format.usMoney(item.itemTotalFluctuationPrice/item.amount);
+ item.fluctuationPrice = Ext.util.Format.usMoney(item.itemTotalFluctuationPrice / item.amount);
var record = new SumGridItem(item);
- recyclingapplicationStore.insert(0,record);
+ recyclingapplicationStore.insert(0, record);
}
}
- top.Ext.getCmp('sum_price').setText("总价:"+Ext.util.Format.usMoney(totalFluctuationPrice));
- top.Ext.getCmp('sum_amount').setText("数量:"+totalAmount);
+ top.Ext.getCmp('sum_price').setText("总价:" + Ext.util.Format.usMoney(totalFluctuationPrice));
+ top.Ext.getCmp('sum_amount').setText("数量:" + totalAmount);
}
//删除发货明细项
-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);
-
- refreshSumInfo();
+ sendOutGoodsStore.remove(record);
+
+ refreshSumInfo();
}
}
//验证条码是否重复扫描
-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;
@@ -175,242 +175,242 @@
function validGridAmount() {
//申请的物品
var b = true;
- 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;
}
//获取代理灭菌物品
function getProxySterileTousse() {
var proxySterileTousseArray = [];
- for ( var i = 0; i < sendOutGoodsStore.getCount(); i++) {
- var record = sendOutGoodsStore.getAt(i);
- if(record.get('proxyDisinfection_id')){
- proxySterileTousseArray.push(record);
- }
+ for (var i = 0; i < sendOutGoodsStore.getCount(); i++) {
+ var record = sendOutGoodsStore.getAt(i);
+ if (record.get('proxyDisinfection_id')) {
+ proxySterileTousseArray.push(record);
+ }
}
return proxySterileTousseArray;
}
var addGridItem = Ext.data.Record.create([
- {name : 'id'},
- {name : 'barcode'},
- {name : 'name'},
- {name : 'tousseFixedBarcode'},
- {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 : 'proxyDisinfection_id'}
- ]);
+ { name: 'id' },
+ { name: 'barcode' },
+ { name: 'name' },
+ { name: 'tousseFixedBarcode' },
+ { 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: 'proxyDisinfection_id' }
+]);
var SumGridItem = Ext.data.Record.create([
- {name : 'id'},
- {name : 'name'},
- {name : 'showTousseName'},
- {name : 'amount'},
- {name : 'price'},
- {name : 'fluctuationPrice'}
- ]);
+ { name: 'id' },
+ { name: 'name' },
+ { name: 'showTousseName' },
+ { name: 'amount' },
+ { name: 'price' },
+ { name: 'fluctuationPrice' }
+]);
// 根据条码获取发送项
-function getSendOutGoodsRecordByBarcode(barcode){
- if(isUndefinedOrNullOrEmpty(barcode)){
+function getSendOutGoodsRecordByBarcode(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;
- }
+ for (var i = 0; i < sendOutGoodsStore.getCount(); i++) {
+ var record = sendOutGoodsStore.getAt(i);
+ var tempBarcode = record.get('barcode');
+ if (barcode == tempBarcode) {
+ return record;
+ }
}
return null;
}
-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
";
- return str;
+ })
},
- dataIndex:'button'
- }]);
- function callback_yes(){
+ {
+ id: 'deleteItem', header: '删除', width: 25, align: 'center', menuDisabled: true,
+ renderer: function (v, p, record) {
+ var str = "
";
+ return str;
+ },
+ dataIndex: 'button'
+ }]);
+ function callback_yes() {
doSaveAction();
}
- function callback_no(){
+ function callback_no() {
doCancelAction();
}
- var barcodeBtn = new BarcodeBtn(function(){callback_yes();},function(){callback_no();});
+ var recyclingApplicationWinWidth = windowW < 1280 ? windowW - 4 : 1280;
+ var barcodeBtn = new BarcodeBtn(function () { callback_yes(); }, function () { callback_no(); });
var form = new top.Ext.FormPanel({
- id : 'recyclingApplicationForm',
- frame : true,
- labelSeparator : ':',
- bodyStyle : 'padding:5px 5px 0px 5px',
- width : 1020,
- autoHeight:true,
- autoScroll : true,
- labelAlign:'right',
- labelWidth :120,
- layout : 'form',
- items : [{
- xtype : "fieldset",
- title : "基础数据",
- layout : 'column',
+ id: 'recyclingApplicationForm',
+ frame: true,
+ region: 'center',
+ labelSeparator: ':',
+ bodyStyle: 'padding:5px 5px 0px 5px',
+ width: windowW < 1280 ? windowW - 4 : 1280,
+ autoHeight: true,
+ // autoScroll : true,
+ 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 : '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_CUSTOM
- },{
- 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'
- },{
- layout : 'form',
- columnWidth :.33,
- height:26,
- items : [{
- xtype : 'textfield',
- fieldLabel : '科室条码',
- maxLength : '16',
- id : 'departBarcode',
- name : 'departBarcode',
- anchor : '100%',
- listeners : {
- render : function(p) {
- p.getEl().on('keypress',function(e) {
+ autoHeight: true,
+ items: [{
+ layout: 'column',
+ columnWidth: 1,
+ items: [{
+ xtype: 'hidden',
+ name: 'id',
+ id: 'id'
+ }, {
+ xtype: 'hidden',
+ name: 'sendOutGoodsStoreData',
+ id: 'sendOutGoodsStoreData'
+ }, {
+ 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_CUSTOM
+ }, {
+ 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'
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ height: 26,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '科室条码',
+ maxLength: '16',
+ id: 'departBarcode',
+ name: 'departBarcode',
+ anchor: '100%',
+ listeners: {
+ render: function (p) {
+ p.getEl().on('keypress', function (e) {
if (e.getKey() == 13) {//回车键
- InvoiceTableManager.getApplicationOrgByBarcode(
- top.Ext.getCmp('departBarcode').getValue(),function(orgStr) {
+ InvoiceTableManager.getApplicationOrgByBarcode(
+ top.Ext.getCmp('departBarcode').getValue(), function (orgStr) {
if (orgStr != null) {
var result = top.Ext.decode(orgStr);
- if(!result.success){
- showResult(result.message);
- return;
- }
- var deptCoding = result.orgUnitCoding;
+ if (!result.success) {
+ showResult(result.message);
+ return;
+ }
+ var deptCoding = result.orgUnitCoding;
top.Ext.getCmp("depart").setValue(result.name);
top.Ext.getCmp("orgUnitCoding").setValue(result.orgUnitCoding);
- if(top.Ext.getCmp('assistantSenderBarcode_parent').isVisible()){
+ if (top.Ext.getCmp('assistantSenderBarcode_parent').isVisible()) {
top.Ext.getCmp('assistantSenderBarcode').focus();
- }else if(top.Ext.getCmp('personInChargeBarcode_parent').isVisible()){
+ } else if (top.Ext.getCmp('personInChargeBarcode_parent').isVisible()) {
top.Ext.getCmp('personInChargeBarcode').focus();
- }else{
+ } else {
top.Ext.getCmp('scanText').focus();
}
//根据申请科室设置其默认结算科室
- if(deptCoding){
+ if (deptCoding) {
setDefaultSettleAccountDepartByDeptCoding(deptCoding);
}
}
-
+
});
- top.Ext.getCmp('departBarcode').setValue("");
+ top.Ext.getCmp('departBarcode').setValue("");
}
});
}
}
}]
- },{
- layout : 'form',
- columnWidth :.33,
- height:26,
- items : [{
- xtype : 'combo',
- fieldLabel : '申请科室',
- id : 'depart',
- name : 'depart',
- queryParam : 'spell',
- minChars : 0,
- valueField : 'name',
- displayField : 'name',
- store : appDepartJsonStore,
- forceSelection : true,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : false,
- typeAhead : false,
- allowBlank : false,
- anchor : '100%',
- listeners:{
- select:function(combo, record, index){
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ height: 26,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '申请科室',
+ id: 'depart',
+ name: 'depart',
+ queryParam: 'spell',
+ minChars: 0,
+ valueField: 'name',
+ displayField: 'name',
+ store: appDepartJsonStore,
+ forceSelection: true,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: false,
+ typeAhead: false,
+ allowBlank: false,
+ anchor: '100%',
+ listeners: {
+ select: function (combo, record, index) {
var deptCoding = record.data.departCode;
top.Ext.getCmp("orgUnitCoding").setValue(deptCoding);
//根据申请科室设置其默认结算科室
setDefaultSettleAccountDepartByDeptCoding(deptCoding);
},
- focus : function(thiz){
+ focus: function (thiz) {
thiz.selectText();
}
- }
+ }
}]
}, {
//结算科室编码
xtype: 'hidden',
name: 'settleAccountsDepartCoding',
id: 'settleAccountsDepartCoding'
- },{
- layout : 'form',
- columnWidth :.33,
- height:26,
- items : [{
- xtype : 'combo',
- fieldLabel : '结算科室',
- id : 'settleAccountsDepart',
- name : 'settleAccountsDepart',
- queryParam : 'spell',
- minChars : 0,
- valueField : 'name',
- displayField : 'name',
- store : appDepartJsonStore,
- forceSelection : true,
- lazyInit : true,
- triggerAction : 'all',
- hideTrigger : false,
- typeAhead : false,
- allowBlank : false,
- anchor : '100%',
- listeners:{
- select:function(combo, record, index){
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ height: 26,
+ items: [{
+ xtype: 'combo',
+ fieldLabel: '结算科室',
+ id: 'settleAccountsDepart',
+ name: 'settleAccountsDepart',
+ queryParam: 'spell',
+ minChars: 0,
+ valueField: 'name',
+ displayField: 'name',
+ store: appDepartJsonStore,
+ forceSelection: true,
+ lazyInit: true,
+ triggerAction: 'all',
+ hideTrigger: false,
+ typeAhead: false,
+ allowBlank: false,
+ anchor: '100%',
+ listeners: {
+ select: function (combo, record, index) {
var deptCoding = record.data.departCode;
top.Ext.getCmp("settleAccountsDepartCoding").setValue(deptCoding);
},
- focus : function(thiz){
+ focus: function (thiz) {
thiz.selectText();
}
- }
- }]
- }]
- },{
- layout : 'form',
- columnWidth :.33,
- height:26,
- items : [{
- xtype : 'textfield',
- fieldLabel : '发货员',
- maxLength : '41',
- id : 'sender',
- name : 'sender',
- readOnly:true,
- allowBlank : false,
- anchor : '100%',
- value:$Id('userName').value,
- cls:'fieldReadOnlyNoRemove'
+ }
}]
- },{
- layout : 'form',
- columnWidth :.33,
- id : 'assistantSenderBarcode_parent',
- name : 'assistantSenderBarcode_parent',
- hidden: !getSystemSetConfig('showInvoiceAssistantSender',true),
- height:26,
- items : [{
- xtype : 'textfield',
- fieldLabel : '核对员条码',
- maxLength : '16',
- id : 'assistantSenderBarcode',
- name : 'assistantSenderBarcode',
- anchor : '100%',
- listeners : {
- render : function(p) {
- p.getEl().on('keypress',function(e) {
- if (e.getKey() == 13) {//回车键
- InvoiceTableManager.getUserNameOfCurrentLoginUserOrgsByBarcode(
- top.Ext.getCmp('assistantSenderBarcode').getValue(),function(userName) {
- if (userName != null) {
- var resultArray = userName.split(":");
- if(resultArray[0] == "success"){
- top.Ext.getCmp('assistantSender').setValue(resultArray[1]);
- Ext.state.Manager.getProvider().set('cookieAssistantSender',resultArray[1]);
- }else{
- showResult(resultArray[1]);
- top.Ext.getCmp('assistantSender').setValue("");
- }
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ height: 26,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '发货员',
+ maxLength: '41',
+ id: 'sender',
+ name: 'sender',
+ readOnly: true,
+ allowBlank: false,
+ anchor: '100%',
+ value: $Id('userName').value,
+ cls: 'fieldReadOnlyNoRemove'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ id: 'assistantSenderBarcode_parent',
+ name: 'assistantSenderBarcode_parent',
+ hidden: !getSystemSetConfig('showInvoiceAssistantSender', true),
+ height: 26,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '核对员条码',
+ maxLength: '16',
+ id: 'assistantSenderBarcode',
+ name: 'assistantSenderBarcode',
+ anchor: '100%',
+ listeners: {
+ render: function (p) {
+ p.getEl().on('keypress', function (e) {
+ if (e.getKey() == 13) {//回车键
+ InvoiceTableManager.getUserNameOfCurrentLoginUserOrgsByBarcode(
+ top.Ext.getCmp('assistantSenderBarcode').getValue(), function (userName) {
+ if (userName != null) {
+ var resultArray = userName.split(":");
+ if (resultArray[0] == "success") {
+ top.Ext.getCmp('assistantSender').setValue(resultArray[1]);
+ Ext.state.Manager.getProvider().set('cookieAssistantSender', resultArray[1]);
+ } else {
+ showResult(resultArray[1]);
+ top.Ext.getCmp('assistantSender').setValue("");
}
- top.Ext.getCmp('assistantSenderBarcode').setValue("");
-// top.Ext.getCmp('personInChargeBarcode').focus();
- if(top.Ext.getCmp('personInChargeBarcode_parent').isVisible()){
- top.Ext.getCmp('personInChargeBarcode').focus();
- }else{
- top.Ext.getCmp('scanText').focus();
- }
- });
- }
- });
- }
+ }
+ top.Ext.getCmp('assistantSenderBarcode').setValue("");
+ // top.Ext.getCmp('personInChargeBarcode').focus();
+ if (top.Ext.getCmp('personInChargeBarcode_parent').isVisible()) {
+ top.Ext.getCmp('personInChargeBarcode').focus();
+ } else {
+ top.Ext.getCmp('scanText').focus();
+ }
+ });
+ }
+ });
}
- }]
- },{
- layout : 'form',
- columnWidth :.33,
- hidden: !getSystemSetConfig('showInvoiceAssistantSender',true),
- height:26,
- items : [{
- xtype : 'textfield',
- fieldLabel : '核对员',
- maxLength : '41',
- id : 'assistantSender',
- name : 'assistantSender',
- readOnly:true,
- allowBlank : false,
- allowBlank : !getSystemSetConfig('showInvoiceAssistantSender',true) || !getSystemSetConfig('invoiceAssistantSenderRequired',true),
- anchor : '100%',
- cls:'x-item-disabled'
- }]
- },{
- layout : 'form',
- columnWidth :.33,
- id : 'personInChargeBarcode_parent',
- name : 'personInChargeBarcode_parent',
- hidden: !getSystemSetConfig('showInvoicePersonInCharge',true),
- height:26,
- items : [{
- xtype : 'textfield',
- fieldLabel : '下送责任人条码',
- maxLength : '16',
- id : 'personInChargeBarcode',
- name : 'personInChargeBarcode',
- anchor : '100%',
- 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('找不到该条码所对应的人员信息');
- }
- });
- }
- });
- }
+ }
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ hidden: !getSystemSetConfig('showInvoiceAssistantSender', true),
+ height: 26,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '核对员',
+ maxLength: '41',
+ id: 'assistantSender',
+ name: 'assistantSender',
+ readOnly: true,
+ allowBlank: false,
+ allowBlank: !getSystemSetConfig('showInvoiceAssistantSender', true) || !getSystemSetConfig('invoiceAssistantSenderRequired', true),
+ anchor: '100%',
+ cls: 'x-item-disabled'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ id: 'personInChargeBarcode_parent',
+ name: 'personInChargeBarcode_parent',
+ hidden: !getSystemSetConfig('showInvoicePersonInCharge', true),
+ height: 26,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '下送责任人条码',
+ maxLength: '16',
+ id: 'personInChargeBarcode',
+ name: 'personInChargeBarcode',
+ anchor: '100%',
+ 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('找不到该条码所对应的人员信息');
+ }
+ });
+ }
+ });
}
- }]
- },{
- layout : 'form',
- columnWidth :.33,
- hidden: !getSystemSetConfig('showInvoicePersonInCharge',true),
- height:26,
- items : [{
- xtype : 'textfield',
- fieldLabel : '下送责任人',
- maxLength : '41',
- id : 'personInCharge',
- name : 'personInCharge',
- readOnly:true,
- allowBlank : !getSystemSetConfig('showInvoicePersonInCharge',true) || !getSystemSetConfig('invoicePersonInChargeRequired',false),
- anchor : '100%',
- cls:'x-item-disabled'
- }]
- },{
- layout : 'form',
- columnWidth :.33,
- height:26,
- 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 : '100%',
- listeners : {
- render : function() {
- setStartDate(top.Ext, 'yyyy/MM/dd HH:mm', 'sendTime'); //(发货时间,取服务器时间 cjr)
- }
+ }
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ hidden: !getSystemSetConfig('showInvoicePersonInCharge', true),
+ height: 26,
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: '下送责任人',
+ maxLength: '41',
+ id: 'personInCharge',
+ name: 'personInCharge',
+ readOnly: true,
+ allowBlank: !getSystemSetConfig('showInvoicePersonInCharge', true) || !getSystemSetConfig('invoicePersonInChargeRequired', false),
+ anchor: '100%',
+ cls: 'x-item-disabled'
+ }]
+ }, {
+ layout: 'form',
+ columnWidth: .33,
+ height: 26,
+ 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: '100%',
+ listeners: {
+ render: function () {
+ setStartDate(top.Ext, 'yyyy/MM/dd HH:mm', 'sendTime'); //(发货时间,取服务器时间 cjr)
}
- }]
- },{
- columnWidth : .5,
- layout : 'form',
- columnWidth :.33,
- height:26,
- 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 : '100%',
- 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);
-// top.Ext.getCmp('remark2').focus();
- },
- specialkey : function(field, ee) {
- if (ee.getKey() == Ext.EventObject.ENTER) {
-// top.Ext.getCmp('remark2').focus();
- }
+ }
+ }]
+ }, {
+ columnWidth: .5,
+ layout: 'form',
+ columnWidth: .33,
+ height: 26,
+ 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: '100%',
+ 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);
+ // top.Ext.getCmp('remark2').focus();
+ },
+ specialkey: function (field, ee) {
+ if (ee.getKey() == Ext.EventObject.ENTER) {
+ // top.Ext.getCmp('remark2').focus();
}
}
- }]
- },{
- layout : 'form',
- columnWidth : 1,
- items : [{
- xtype : 'textarea',
- fieldLabel : '备注',
- id : 'remark2',
- name : 'invoiceRemark',
- anchor : '98.5%',
- height : 40
- }]
+ }
}]
-
- },{
- layout:'column',
- items:[{
- layout : 'form',
- columnWidth : top.screen.width < 1280 ? 0.57 : 0.55,
- items:[
- new top.Ext.grid.EditorGridPanel({
- id : 'sendOutGoods',
- store : sendOutGoodsStore,
- columnWidth : 0.5,
- cm : cm,
- width : top.screen.width < 1280 ? top.screen.width*0.57-25 : 680,
- height : top.screen.height < 864 ? windowH-250 : 445,
- 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: 'form',
+ columnWidth: 1,
+ items: [{
+ xtype: 'textarea',
+ fieldLabel: '备注',
+ id: 'remark2',
+ name: 'invoiceRemark',
+ anchor: '98.5%',
+ height: 40
+ }]
+ }]
+
+ }, {
+ layout: 'column',
+ items: [{
+ layout: 'form',
+ columnWidth: top.screen.width < 1280 ? 0.57 : 0.55,
+ items: [
+ new top.Ext.grid.EditorGridPanel({
+ id: 'sendOutGoods',
+ store: sendOutGoodsStore,
+ columnWidth: 0.5,
+ cm: cm,
+ width: top.screen.width < 1280 ? top.screen.width * 0.57 - 25 : 680,
+ height: top.screen.height < 864 ? windowH - 250 : 445,
+ 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() != '') {
+ if (barcodeBtn.processBarcode(top.Ext.getCmp("scanText").getValue())) {
+ return;
+ }
+ 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() != ''){
- if(barcodeBtn.processBarcode(top.Ext.getCmp("scanText").getValue())){
- return;
- }
- loadGoodsByBarcode(orgUnitCoding);
- }else{
- showResult("请扫描输入器械包/篮筐(首)条码!");
- }
+ });
+ 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() != '') {
+ if (barcodeBtn.processBarcode(top.Ext.getCmp("scanTextEnd").getValue())) {
+ return;
}
- });
- c.getEl().on('focus',function(e) {
- top.Ext.getCmp('scanText').setValue('');
- });
+ 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() != ''){
- if(barcodeBtn.processBarcode(top.Ext.getCmp("scanTextEnd").getValue())){
- return;
- }
- 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 : top.screen.width < 1280 ? 0.43 : 0.45,
- items:[new top.Ext.grid.EditorGridPanel({
- id : 'sendOutGoodsDetail',
- title : '发货单明细',
- store : recyclingapplicationStore,
- cm : recyclingapplicationCm,
- enableHdMenu : false,
- width : top.screen.width < 1280 ? top.screen.width*0.43-20 : 560,
- height : top.screen.height < 864 ? windowH-250 : 445,
- loadMask : true,
- tbar:[{
- text:'发货汇总'
- },{
- text: "",
- id : 'tousseAmountInfo'
- }],
- bbar:[{
- text:'合计'
- },{
- id : 'sum_price',
- text:'总价:0.0'
- },{
- id : 'sum_amount',
- text:'数量:0'
- }],
-// autoExpandColumn : 'sum_tousseName',
- frame : false,
- bodyStyle : 'border:1px solid #afd7af',
- viewConfig: {
- forceFit:true
- },
- selModel : new top.Ext.grid.RowSelectionModel({
- singleSelect : false
- }),
- listeners:{
- validateedit : function(o){
- if(!isPositiveInteger(o.value))return false;
- }
- }
- })]
+ }, {
+ layout: 'form',
+ columnWidth: top.screen.width < 1280 ? 0.43 : 0.45,
+ items: [new top.Ext.grid.EditorGridPanel({
+ id: 'sendOutGoodsDetail',
+ title: '发货单明细',
+ store: recyclingapplicationStore,
+ cm: recyclingapplicationCm,
+ enableHdMenu: false,
+ width: top.screen.width < 1280 ? top.screen.width * 0.43 - 20 : 560,
+ height: top.screen.height < 864 ? windowH - 250 : 445,
+ loadMask: true,
+ tbar: [{
+ text: '发货汇总'
+ }, {
+ text: "",
+ id: 'tousseAmountInfo'
+ }],
+ bbar: [{
+ text: '合计'
+ }, {
+ id: 'sum_price',
+ text: '总价:0.0'
+ }, {
+ id: 'sum_amount',
+ text: '数量:0'
+ }],
+ // autoExpandColumn : 'sum_tousseName',
+ frame: false,
+ bodyStyle: 'border:1px solid #afd7af',
+ viewConfig: {
+ forceFit: true
+ },
+ selModel: new top.Ext.grid.RowSelectionModel({
+ singleSelect: false
+ }),
+ listeners: {
+ validateedit: function (o) {
+ if (!isPositiveInteger(o.value)) return false;
}
- ]
- }],
- buttons : [{
- text : sstsConfig.aliasNameOfSaveKeywordInInvoiceForm ? sstsConfig.aliasNameOfSaveKeywordInInvoiceForm : '保存',
- id:'saveButton',
- handler : function() {
- doSaveAction();
}
- },{
- text : sstsConfig.aliasNameOfSaveKeywordInInvoiceForm ? sstsConfig.aliasNameOfSaveKeywordInInvoiceForm+'并打印' : '保存并打印',
- id:'saveAndPrintButton',
-// hidden:!sstsConfig.enableSaveAndPrintWhenInvoice,
- handler : function(){doSaveAction(printInvoiceAfterInvoice);}
- }, {
- text : '取消',
- id:'cancelButton',
- handler : function() {
- doCancelAction();
- }
- }]
- });
-
- function doSaveAction(printInvoiceCallback){
+ })]
+ }
+ ]
+ }],
+ });
+ function doSaveAction(printInvoiceCallback) {
+
if (!form.getForm().isValid()) {
showResult('请正确填写表单各值');
return false;
}
//验证发货物品表格
- if(!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0){
+ if (!sendOutGoodsStore || sendOutGoodsStore.getCount() == 0) {
showResult('发货物品不能为空!');
return false;
}
-
+
var bool = validGridAmount();
- if(!bool){
+ if (!bool) {
return false;
}
//代理灭菌的器械包
var proxySterileTousseArray = getProxySterileTousse();
var proxySterileTousseArrayLength = proxySterileTousseArray.length;
- if(proxySterileTousseArray.length > 0){
- if(sstsConfig.enableProxyDisinfectionToussesCustomInvoice){
+ if (proxySterileTousseArray.length > 0) {
+ if (sstsConfig.enableProxyDisinfectionToussesCustomInvoice) {
top.Ext.MessageBox.confirm("请确认", "本次发货含有进行了代理灭菌的器械包,是否继续操作?", function (button, text) {
if ("yes" == button) {
doSubmitForm(printInvoiceCallback);
} else {
return false;
}
});
- }else{
+ } else {
var proxySterileTousseBarcodeArray = [];
- for(var i = 0;i < proxySterileTousseArrayLength;i++){
+ for (var i = 0; i < proxySterileTousseArrayLength; i++) {
proxySterileTousseBarcodeArray.push(proxySterileTousseArray[i].get("barcode"));
}
var proxySterileTousseBarcodes = proxySterileTousseBarcodeArray.join(",") + (proxySterileTousseArrayLength > 5) ? "..." : "";
showResult("本次发货含有以下条码代理灭菌的器械包,请移除后再保存!
" + proxySterileTousseBarcodes);
}
- }else{
+ } else {
doSubmitForm(printInvoiceCallback);
}
}
/**
* 表章提交
*/
- function doSubmitForm(printInvoiceCallback){
+ function doSubmitForm(printInvoiceCallback) {
getTousseGridData();
- form.form.submit( {
+ form.form.submit({
//url : WWWROOT + '/disinfectSystem/invoiceAction!saveDepartInvoice.do',
- url : WWWROOT + '/disinfectSystem/invoiceAction!saveInvoiceByDepartOrInvoicePlanId.do',
- method : 'POST',
- waitMsg : '正在保存数据,请稍候',
- waitTitle : '提交表单',
- success : function(form, action) {
+ url: WWWROOT + '/disinfectSystem/invoiceAction!saveInvoiceByDepartOrInvoicePlanId.do',
+ method: 'POST',
+ waitMsg: '正在保存数据,请稍候',
+ waitTitle: '提交表单',
+ success: function (form, action) {
// 一定要事务提交成功才返回发货计划列表界面
showResult(action.result.message);
- if(action.result.success){
- if(printInvoiceCallback != null){
+ if (action.result.success) {
+ if (printInvoiceCallback != null) {
printInvoiceCallback(action.result.invoiceIds);
}
window.close();
reloadSelf();
}
},
- failure : function(form, action) {
- if(!isUndefinedOrNullOrEmpty(action.result) && !isUndefinedOrNullOrEmpty(action.result.message)){
+ failure: function (form, action) {
+ if (!isUndefinedOrNullOrEmpty(action.result) && !isUndefinedOrNullOrEmpty(action.result.message)) {
showResult(action.result.message);
- }else{
+ } else {
showResult("发货超时,请稍后查看发货单以确定发货是否成功,避免重复发货!");
//window.close();
}
}
});
}
- function doCancelAction(){
+ function doCancelAction() {
//切记注意:按取消关闭window后,一定要把已选择的申请单号变量清空
selectedInvoicePlanId = "";
window.close();
-// reloadSelf();
+ // reloadSelf();
}
-
- function printInvoiceAfterInvoice(invoiceIds){
- if(!isUndefinedOrNull(invoiceIds)){
- var invoicePrintModule = new InvoicePrintModule(null,$Id('userName').value);
- invoicePrintModule.batchPrintInvoiceWithType_dwr(invoiceIds.join(","),'全部');
+
+ function printInvoiceAfterInvoice(invoiceIds) {
+ if (!isUndefinedOrNull(invoiceIds)) {
+ var invoicePrintModule = new InvoicePrintModule(null, $Id('userName').value);
+ invoicePrintModule.batchPrintInvoiceWithType_dwr(invoiceIds.join(","), '全部');
}
}
-
+
var cookieAssistantSender = Ext.state.Manager.getProvider().get('cookieAssistantSender');
- if(getSystemSetConfig('rememberLastInvoiceAssistantSender',false) && cookieAssistantSender){
+ if (getSystemSetConfig('rememberLastInvoiceAssistantSender', false) && cookieAssistantSender) {
top.Ext.getCmp('assistantSender').setValue(cookieAssistantSender);
}
var currentHeight;
- if(!getSystemSetConfig('showInvoiceAssistantSender',true)){
- currentHeight = top.screen.height < 854 ? windowH-10 : 690;
- }else {
- currentHeight = top.screen.height < 864 ? windowH+10 : 710;
+ if (!getSystemSetConfig('showInvoiceAssistantSender', true)) {
+ currentHeight = top.screen.height < 854 ? windowH - 10 : 690;
+ } else {
+ currentHeight = top.screen.height < 864 ? windowH + 10 : 710;
}
- var window = new top.Ext.Window( {
- id : 'recyclingApplicationWin',
- layout : 'fit',
- title : '发货单',
- width : top.screen.width < 1280 ? windowW : 1280,
- height:currentHeight,
- border : false,
- modal : true,
- plain : true,
- items : [form]
- });
-
- window.on('close',function(w){
+ var window;
+ var enableAbnormalItemListFixedDisplay = sstsConfig.enableAbnormalItemListFixedDisplay || false;
+ if (enableAbnormalItemListFixedDisplay && sstsConfig.isUseAbnormalGoodsTable) {
+ var winWidth = recyclingApplicationWinWidth + 590;
+ var invoicePlan_form = renderRecyclingApplicationForm('customInvoiceForm');
+ window = new top.Ext.Window({
+ id: 'recyclingApplicationWin',
+ layout: 'border',
+ title: '发货单',
+ resizable: false,
+ width: winWidth,
+ height: currentHeight,
+ border: false,
+ modal: true,
+ plain: true,
+ stateful: false,
+ buttonAlign: 'center',
+ items: [form, invoicePlan_form],
+ buttons: [{
+ text: sstsConfig.aliasNameOfSaveKeywordInInvoiceForm ? sstsConfig.aliasNameOfSaveKeywordInInvoiceForm : '保存',
+ id: 'saveButton',
+ handler: function () {
+ doSaveAction();
+ }
+ }, {
+ text: sstsConfig.aliasNameOfSaveKeywordInInvoiceForm ? sstsConfig.aliasNameOfSaveKeywordInInvoiceForm + '并打印' : '保存并打印',
+ id: 'saveAndPrintButton',
+ handler: function () { doSaveAction(printInvoiceAfterInvoice); }
+ }, {
+ text: '取消',
+ id: 'cancelButton',
+ handler: function () {
+ doCancelAction();
+ }
+ }]
+ });
+ } else {
+ window = new top.Ext.Window({
+ id: 'recyclingApplicationWin',
+ layout: 'fit',
+ title: '发货单',
+ width: top.screen.width < 1280 ? windowW : 1280,
+ height: currentHeight,
+ border: false,
+ modal: true,
+ plain: true,
+ buttonAlign: 'center',
+ items: [form],
+ buttons: [{
+ text: sstsConfig.aliasNameOfSaveKeywordInInvoiceForm ? sstsConfig.aliasNameOfSaveKeywordInInvoiceForm : '保存',
+ id: 'saveButton',
+ handler: function () {
+ doSaveAction();
+ }
+ }, {
+ text: sstsConfig.aliasNameOfSaveKeywordInInvoiceForm ? sstsConfig.aliasNameOfSaveKeywordInInvoiceForm + '并打印' : '保存并打印',
+ id: 'saveAndPrintButton',
+ handler: function () { doSaveAction(printInvoiceAfterInvoice); }
+ }, {
+ text: '取消',
+ id: 'cancelButton',
+ handler: function () {
+ doCancelAction();
+ }
+ }]
+ });
+ }
+
+ window.on('close', function (w) {
//切记注意:按取消关闭window后,一定要把已选择的申请单号变量清空
selectedInvoicePlanId = "";
});
window.show();
-// top.Ext.getCmp(defaultFocusedFieldOnInvoiceForm).focus(false, 100);
+ // top.Ext.getCmp(defaultFocusedFieldOnInvoiceForm).focus(false, 100);
top.Ext.getCmp('departBarcode').focus(false, 100);
-
+
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);
@@ -1512,7 +1584,7 @@
* 根据申请科室设置其默认结算科室
* @param deptCoding 申请科室编码
*/
-function setDefaultSettleAccountDepartByDeptCoding(deptCoding){
+function setDefaultSettleAccountDepartByDeptCoding(deptCoding) {
Ext.Ajax.request({
url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getDefaultSettleAccountDepart.do',
params: {
@@ -1532,8 +1604,8 @@
});
}
-Ext.onReady(function() {
+Ext.onReady(function () {
Ext.QuickTips.init();
-
- addAndEditInvoicePlan('','');
+
+ addAndEditInvoicePlan('', '');
});
\ No newline at end of file
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 + "
"; } - + //发货状态 - 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