| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- Ext.define('erp.view.pm.make.MakeMaterialIssue',{
- extend: 'Ext.Viewport',
- layout: 'fit',
- hideBorders: true,
- initComponent : function(){
- var me = this;
- Ext.apply(me, {
- items: [{
- layout: 'anchor',
- items: [{
- xtype: 'erpGridPanel5',
- anchor: '100% 32%',
- caller: 'Make!issue',
- necessaryField: 'ma_code',
- bbar: {
- xtype: 'toolbar',
- items: [{
- xtype: 'tool',
- type: 'restore',
- tooltip: '最大化',
- listeners:{
- click: function(btn){
- window.open(window.location.href);
- }
- }
- },'->',{
- name: 'query',
- id: 'query',
- text: $I18N.common.button.erpQueryButton,
- iconCls: 'x-button-icon-query',
- cls: 'x-btn-gray'
- },{
- name: 'export',
- text: $I18N.common.button.erpExportButton,
- iconCls: 'x-button-icon-excel',
- cls: 'x-btn-gray',
- style: {
- marginLeft: '10px'
- },
- menu: [{
- iconCls: 'main-msg',
- text: '发料主表',
- listeners: {
- click: function(m){
- var grid = Ext.getCmp('grid');
- grid.BaseUtil.exportexcel(grid);
- }
- }
- },{
- iconCls: 'main-msg',
- text: '发料从表',
- listeners: {
- click: function(m){
- var grid = Ext.getCmp('editorColumnGridPanel');
- grid.BaseUtil.exportexcel(grid);
- }
- }
- }]
- },{
- text: '生成领料单',
- id: 'create',
- width: 95,
- iconCls: 'x-button-icon-add',
- style: {
- marginLeft: '10px'
- },
- cls: 'x-btn-gray'
- },{
- text: '生成拨出单',
- id: 'createbc',
- width: 95,
- iconCls: 'x-button-icon-add',
- style: {
- marginLeft: '10px'
- },
- cls: 'x-btn-gray'
- },{
- name: 'close',
- text: $I18N.common.button.erpCloseButton,
- iconCls: 'x-button-icon-close',
- cls: 'x-btn-gray',
- style: {
- marginLeft: '10px'
- },
- handler: function(btn){
- var main = parent.Ext.getCmp("content-panel");
- if(main){
- main.getActiveTab().close();
- } else {
- window.close();
- }
- }
- },'->',{
- xtype: 'checkbox',
- id: 'ifnullwhman',
- boxLabel: '包含空',
- labelAlign: 'right',
- checked: true
- },{
- xtype: 'dbfindtrigger',
- hideLabel:true,
- emptyText:'仓管员',
- width:100,
- name:'pr_whmancode',
- id: 'pr_whmancode',
- value: '',
- listeners:{
- aftertrigger:function(t, d){
- t.ownerCt.down('textfield[name=pr_whmancode]').setValue(d.get('em_code'));
- }
- }
- },{
- xtype: 'checkbox',
- id: 'ifnulllocation',
- boxLabel: '包含空',
- labelAlign: 'right',
- checked: true
- },{
- xtype: 'textfield',
- hideLabel:true,
- emptyText:'储位',
- width:100,
- name:'pr_location',
- id: 'pr_location',
- value: '',
-
- },{
- margin: '3 0 0 0',
- xtype: 'checkbox',
- id: 'set',
- boxLabel: '按套数发料',
- labelAlign: 'right',
- checked: true
- },{
- xtype: 'checkbox',
- id: 'whcode',
- boxLabel: '按仓库分组',
- labelAlign: 'right',
- checked: true
- }]
- }
- },{
- xtype: 'erpEditorColumnGridPanel',
- caller: 'MakeMaterial!issue',
- condition: '1=2',
- anchor: '100% 68%',
- viewConfig: {
- listeners: {
- render: function(view) {
- if(!view.tip) {
- view.tip = Ext.create('Ext.tip.ToolTip', {
- target: view.el,
- delegate: view.itemSelector,
- trackMouse: true,
- renderTo: Ext.getBody(),
- listeners: {
- beforeshow: function updateTipBody(tip) {
- var record = view.getRecord(tip.triggerElement),
- grid = view.ownerCt.ownerCt;
- if(record && grid.productwh) {
- var c = record.get('mm_prodcode'), pws = new Array();
- Ext.each(grid.productwh, function(d){
- if(d.PW_PRODCODE == c) {
- pws.push(d);
- }
- });
- tip.down('grid').setTitle(c);
- tip.down('grid').store.loadData(pws);
- }
- }
- },
- items: [{
- xtype: 'grid',
- width: 300,
- columns: [{
- text: '仓库编号',
- cls: 'x-grid-header-1',
- dataIndex: 'PW_WHCODE',
- width: 80
- },{
- text: '仓库名称',
- cls: 'x-grid-header-1',
- dataIndex: 'WH_DESCRIPTION',
- width: 120
- },{
- text: '库存',
- cls: 'x-grid-header-1',
- xtype: 'numbercolumn',
- align: 'right',
- dataIndex: 'PW_ONHAND',
- width: 90
- }],
- columnLines: true,
- title: '物料分仓库存',
- store: new Ext.data.Store({
- fields: ['PW_WHCODE', 'WH_DESCRIPTION', 'PW_ONHAND'],
- data: [{}]
- })
- }]
- });
- }
- },
- cellcontextmenu:function (){
- //alert('sdsd');
- }
- }
- }
- }]
- }]
- });
- me.callParent(arguments);
- }
- });
|