| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- Ext.define('saas.view.document.bom.BasePanel', {
- extend: 'saas.view.core.base.BasePanel',
- xtype: 'document-bom-basepanel',
- controller: 'document-bom-basepanel',
- viewModel: 'document-bom-basepanel',
- deleteMoreMsg: '删除的BOM资料将不能恢复,请确认是否删除?',
- deleteOneMsg: '删除的BOM资料将不能恢复,请确认是否删除?',
- searchField:[{
- xtype : "textfield",
- name : "bo_mothercode",
- width:200,
- emptyText:'请输入产品编号或名称',
- getCondition: function(value) {
- return ' (bo_mothername like\'%' + value + '%\''
- +' or bo_mothercode like \'%'+value+'%\' ) ';
- }
- },{
- xtype : "textfield",
- name : "bo_version",
- fieldLabel:'版本',
- emptyText: '全部',
- },{
- xtype: 'combobox',
- name: 'bo_statuscode',
- queryMode: 'local',
- displayField: 'bo_status',
- valueField: 'bo_statuscode',
- fieldLabel :'状态',
- emptyText: '全部',
- editable:false,
- store: Ext.create('Ext.data.ArrayStore', {
- fields: ['bo_statuscode', 'bo_status'],
- data: [
- ["ALL", "全部"],
- ["ENABLE", "已启用"],
- ["BANNED", "已禁用"]
- ]
- }),
- getCondition: function(value) {
- if(value == 'ALL'||value==null) {
- return '1=1';
- }else {
- return 'bo_statuscode=\'' + value + '\'';
- }
- }
-
- }],
- //字段属性
- _formXtype:'document-bom-formpanel',
- _title:'BOM资料',
- _deleteUrl:'/api/document/bom/delete',
- _batchOpenUrl:'/api/document/bom/batchOpen',
- _batchCloseUrl:'/api/document/bom/batchClose',
- _batchDeleteUrl:'/api/document/bom/batchDelete',
- gridConfig: {
- idField: 'id',
- codeField: 'bo_mothercode',
- statusCodeField:'bo_statuscode',
- dataUrl: '/api/document/bom/list',
- caller: 'Bom',
- columns : [{
- text : "id",
- width : 0,
- dataIndex : "id",
- xtype : "numbercolumn",
- },{
- text : "产品id",
- width : 0,
- dataIndex : "bo_motherid",
- xtype : "numbercolumn",
- },{
- text : "产品编号",
- dataIndex : "bo_mothercode",
- width : 150.0,
- },
- {
- text : "产品名称",
- dataIndex : "bo_mothername",
- width :200.0,
- },
- {
- text : "产品状态",
- dataIndex : "bo_status",
- width : 90.0,
- },
- {
- text : "产品状态码",
- dataIndex : "bo_statuscode",
- width : 0,
- },
- {
- text : "产品版本",
- dataIndex : "bo_version",
- width :80.0,
- }]
- },
- refresh:function(){
- this.items.items[0].store.load()
- }
- });
|