| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- Ext.define('erp.view.pm.mes.PackageCollection',{
- extend: 'Ext.Viewport',
- layout: 'anchor',
- hideBorders: true,
- initComponent : function(){
- var me = this;
- Ext.apply(me, {
- items: [{
- id:'form',
- title:'包装采集',
- xtype: 'form',
- anchor: '100% 35%',
- bodyStyle: 'background: #f1f1f1;',
- bodyPadding:5,
- autoScroll: true,
- scrollable: true,
- items:[{
- xtype: 'fieldcontainer',
- defaults: {
- width: 250,
- msgTarget:'side'
- },
- layout: 'column',
- items: [{
- xtype: 'dbfindtrigger',
- fieldLabel: '资源编号',
- allowBlank:false,
- id:'sc_code',
- name:'sc_code',
- fieldStyle : "background:rgb(224, 224, 255);",
- labelStyle:"color:red;"
- },{
- xtype: 'textfield',
- fieldLabel: '资源名称',
- readOnly:true,
- id:'sc_name',
- name:'sc_name'
- },{
- xtype: 'textfield',
- fieldLabel: '工序编号',
- readOnly:true,
- id:'st_code',
- name:'st_code'
- },{
- xtype: 'textfield',
- fieldLabel: '工序名称',
- readOnly:true,
- id:'st_name',
- name:'st_name'
- },{
- xtype: 'dbfindtrigger',
- fieldLabel: '作业单号',
- id:'mc_code' ,
- name:'mc_code',
- allowBlank:false,
- fieldStyle : "background:rgb(224, 224, 255);",
- labelStyle:"color:red;"
- },{
- xtype: 'textfield',
- fieldLabel: '制造单号',
- id:'mc_makecode' ,
- name:'mc_makecode',
- allowBlank:false,
- hidden : true,
- hideLabel:true
- },{
- xtype: 'textfield',
- fieldLabel: '产品编号',
- readOnly:true,
- id:'mc_prodcode',
- name:'mc_prodcode'
- },{
- xtype: 'textfield',
- fieldLabel: '产品名称',
- readOnly:true,
- id:'pr_detail',
- name:'pr_detail'
- },{
- xtype: 'textfield',
- fieldLabel: '产品ID',
- id:'pr_id',
- name:'pr_id',
- hidden : true,
- hideLabel : true
- },{
- xtype: 'textfield',
- fieldLabel: '数量',
- readOnly:true,
- id:'mc_qty',
- name:'mc_qty'
- },{
- xtype: 'boxcodetrigger',
- fieldLabel: '箱号',
- allowBlank:false,
- id:'pa_code',
- name:'pa_code',
- fieldStyle : "background:rgb(224, 224, 255);",
- labelStyle:"color:red",
- },{
- xtype: 'textfield',
- fieldLabel: '箱内容量',
- allowBlank:false,
- id:'pa_totalqty',
- name:'pa_totalqty',
- fieldStyle : "background:rgb(224, 224, 255);",
- labelStyle:"color:red;"
- },{
- xtype: 'textfield',
- fieldLabel: '已装数量',
- readOnly : true,
- id:'pa_inqty'
- },{
- xtype: 'textfield',
- fieldLabel: '剩余可装数',
- readOnly : true,
- id:'pa_restqty'
- }]
- }],
- buttonAlign: 'center',
- buttons: [{
- xtype: 'erpQueryButton'
- },{
- xtype: 'erpCloseButton'
- }]
- },{
- xtype: 'grid',
- anchor: '100% 40%',
- id:'querygrid',
- plugins: [Ext.create('erp.view.core.plugin.CopyPasteMenu')],
- columns: [{
- text: '箱号',
- dataIndex: 'pd_outboxcode',
- flex: 1
- },{
- text: '序列号',
- dataIndex: 'pd_barcode',
- flex: 1
- },{
- text: '数量',
- dataIndex: 'pd_innerqty',
- flex: 1
- }],
- columnLines: true,
- store: Ext.create('Ext.data.Store',{
- fields: ['pd_outboxcode','pd_barcode','pd_innerqty'],
- data: [ {},{},{},{},{},{},{},{},{},{},{}],
- autoLoad:true
- })
- },{
- xtype: 'dataview',
- anchor: '100% 15%',
- id: 't_result',
- autoScroll: true,
- scrollable: true,
- store: new Ext.data.Store({
- fields: ['type', 'text']
- }),
- cls: 'msg-body',
- tpl: new Ext.XTemplate(
- '<audio id="audio-success" src="' + basePath + 'resource/audio/success.wav"></audio>',
- '<audio id="audio-error" src="' + basePath + 'resource/audio/error.wav"></audio>',
- '<tpl for=".">',
- '<div class="msg-item">',
- '<tpl if="type == \'success\'"><span class="text-info">{text}</span></tpl>',
- '<tpl if="type == \'error\'"><span class="text-warning">{text}</span></tpl>',
- '</div>',
- '</tpl>'
- ),
- itemSelector: 'div.msg-item',
- emptyText: '提示信息',
- deferEmptyText: false,
- autoScroll: true,
- append: function(text, type) {
- type = type || 'success';
- this.getStore().add({text: text, type: type});
- this.getEl().scroll("b", this.getEl().getHeight(), true);
- var el = Ext.get('audio-' + type).dom;
- el.play();
- }
- },{
- xtype: 'form',
- anchor: '100% 10%',
- bodyStyle: 'background: #f1f1f1;',
- bodyPadding:5,
- items: [{
- xtype: 'fieldcontainer',
- autoScroll: true,
- scrollable: true,
- defaults: {
- width: 250
- },
- layout: {
- type: 'table',
- columns: 4
- },
- items: [{
- xtype: 'textfield',
- fieldLabel: '序列号',
- id:'ms_sncode',
- colspan: 1,
- allowBlank: false,
- fieldStyle : "background:rgb(224, 224, 255);",
- labelStyle:"color:red;"
- },{
- xtype: 'textfield',
- fieldLabel: '序列号开头',
- id:'ms_codeB',
- colspan: 1
- },{
- xtype: 'textfield',
- fieldLabel: '序列号长度',
- id:'ms_codeLength',
- colspan: 1
- },{
- xtype: 'erpPrintButton' ,
- width:'80px'
- }]
- }]
- }]
- });
- me.callParent(arguments);
- }
- });
|