Index: ssts-web/src/main/webapp/disinfectsystem/invoice/auxiliaryInvoiceForm.js =================================================================== diff -u -r28708 -r28715 --- ssts-web/src/main/webapp/disinfectsystem/invoice/auxiliaryInvoiceForm.js (.../auxiliaryInvoiceForm.js) (revision 28708) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/auxiliaryInvoiceForm.js (.../auxiliaryInvoiceForm.js) (revision 28715) @@ -369,8 +369,8 @@ xtype : 'textfield', fieldLabel : '发货员', maxLength : '41', - id : 'deliveryPerson', - name : 'deliveryPerson', + id : 'sender', + name : 'sender', readOnly:true, allowBlank : false, anchor : '99%', @@ -386,27 +386,29 @@ xtype : 'textfield', fieldLabel : '核对员条码', maxLength : '16', - id : 'senderBarcode', - name : 'senderBarcode', + id : 'assistantSenderBarcode', + name : 'assistantSenderBarcode', anchor : '99%', listeners : { render : function(p) { p.getEl().on('keypress',function(e) { if (e.getKey() == 13) {//回车键 InvoiceTableManager.getUserNameOfCurrentLoginUserOrgsByBarcode( - top.Ext.getCmp('senderBarcode').getValue(),function(userName) { + top.Ext.getCmp('assistantSenderBarcode').getValue(),function(userName) { if (userName != null) { var resultArray = userName.split(":"); if(resultArray[0] == "success"){ - top.Ext.getCmp('sender').setValue(resultArray[1]); + top.Ext.getCmp('assistantSender').setValue(resultArray[1]); Ext.state.Manager.getProvider().set('cookieAssistantSender',resultArray[1]); }else{ showResult(resultArray[1] , null , sstsConfig.messagePauseTimeOnInvoiceplanPage); - top.Ext.getCmp('sender').setValue(""); + top.Ext.getCmp('assistantSender').setValue(""); } } - top.Ext.getCmp('senderBarcode').setValue(""); - top.Ext.getCmp('personInChargeBarcode').focus(); + top.Ext.getCmp('assistantSenderBarcode').setValue(""); + if(getSystemSetConfig('showInvoicePersonInCharge',true)){ + top.Ext.getCmp('personInChargeBarcode').focus(); + } }); } }); @@ -422,8 +424,8 @@ xtype : 'textfield', fieldLabel : '核对员', maxLength : '41', - id : 'sender', - name : 'sender', + id : 'assistantSender', + name : 'assistantSender', readOnly:true, allowBlank : !getSystemSetConfig('showInvoiceAssistantSender',true) || !getSystemSetConfig('invoiceAssistantSenderRequired',true), anchor : '99%', @@ -433,6 +435,7 @@ layout : 'form', labelWidth :fontSize == 12 ? 70 : 120, columnWidth :.33, + hidden: !getSystemSetConfig('showInvoicePersonInCharge',true), items : [{ xtype : 'textfield', fieldLabel : '下送责任人条码', @@ -457,7 +460,6 @@ Ext.state.Manager.getProvider().set('cookiePersonInChargeCode',result.name); top.Ext.getCmp('personInCharge').setValue(result.fullName); top.Ext.getCmp('personInChargeCode').setValue(result.name); - top.Ext.getCmp('scanText').focus(); }else{ showResult('找不到该条码所对应的人员信息' , null , sstsConfig.messagePauseTimeOnInvoiceplanPage); } @@ -471,13 +473,15 @@ layout : 'form', labelWidth :fontSize == 12 ? 70 : 120, columnWidth :.33, + hidden: !getSystemSetConfig('showInvoicePersonInCharge',true), items : [{ xtype : 'textfield', fieldLabel : '下送责任人', maxLength : '41', id : 'personInCharge', name : 'personInCharge', readOnly:true, + allowBlank : !getSystemSetConfig('showInvoicePersonInCharge',true) || !getSystemSetConfig('invoicePersonInChargeRequired',false), anchor : '99%', cls:'x-item-disabled' }] @@ -759,7 +763,7 @@ // 核对员 var cookieAssistantSender = Ext.state.Manager.getProvider().get('cookieAssistantSender'); if(getSystemSetConfig('rememberLastInvoiceAssistantSender',false) && cookieAssistantSender){ - top.Ext.getCmp('sender').setValue(cookieAssistantSender); + top.Ext.getCmp('assistantSender').setValue(cookieAssistantSender); } Ext.Ajax.request({ @@ -776,12 +780,15 @@ var cookiePersonInCharge = Ext.state.Manager.getProvider().get('cookiePersonInCharge'); var cookiePersonInChargeCode = Ext.state.Manager.getProvider().get('cookiePersonInChargeCode'); - if(cookiePersonInCharge){ - top.Ext.getCmp('personInCharge').setValue(cookiePersonInCharge); + var rememberLastInvoicePersonInCharge = getSystemSetConfig('rememberLastInvoicePersonInCharge',false); + if(rememberLastInvoicePersonInCharge){ + if(cookiePersonInCharge){ + top.Ext.getCmp('personInCharge').setValue(cookiePersonInCharge); + } + if(cookiePersonInChargeCode){ + top.Ext.getCmp('personInChargeCode').setValue(cookiePersonInChargeCode); + } } - if(cookiePersonInChargeCode){ - top.Ext.getCmp('personInChargeCode').setValue(cookiePersonInChargeCode); - } var auxiliaryInvoiceFormWindow = new top.Ext.Window( { id : 'recyclingApplicationWin', @@ -806,19 +813,17 @@ if(project == 'gdsy'){ if(openMode == INVOICE_FORM_OPEN_MODE_SCANBARCODE){ - var sender = top.Ext.getCmp('sender').getValue(); + var assistantSender = top.Ext.getCmp('assistantSender').getValue(); var personInCharge = top.Ext.getCmp('personInCharge').getValue(); - if(isUndefinedOrNullOrEmpty(sender)){ - top.Ext.getCmp('senderBarcode').focus(false, 100); + if(isUndefinedOrNullOrEmpty(assistantSender)){ + top.Ext.getCmp('assistantSenderBarcode').focus(false, 100); }else{ if(isUndefinedOrNullOrEmpty(personInCharge)){ top.Ext.getCmp('personInChargeBarcode').focus(false, 100); - }else{ - top.Ext.getCmp('scanText').focus(false, 100); } } }else{ - top.Ext.getCmp('senderBarcode').focus(false, 100); + top.Ext.getCmp('assistantSenderBarcode').focus(false, 100); } }else{ top.Ext.getCmp(defaultFocusedFieldOnInvoiceForm).focus(false, 100);