EXTJS 学习笔记
1. viewmodel:false
2. var dicstore = Ext.create('Vstar.store.CORE_DictionaryDataTree',{
proxy:{
api: {
read: getAjaxUrl("PRD_CATALOG_DIC_GeTPager", { "DiCCode": "物资目录"}),
}
}
});
3. me.store = Ext.create('Vstar.store.PRD_STOCK',{
autoLoad: false
});
4. if( this.hasRight("借出")){
his.viewmode = true;
}
5. listeners: {
specialKey : "onSpecialKey"
}
6. {
xtype: 'gridPickerField',
fieldLabel: '资产型号',
name: 'PRD_CATALOG_CODE',
ajaxUrl: getAjaxUrl("PRD_CATALOG_GetPager"),
displayField: "PRD_CATALOG_NAME", // 将相关的数据域名称绑定到ComboBox中,
valueField: "PRD_CATALOG_CODE", // 将相关的数据值绑定到ComboBox中
isValueDisplay: true, //原样显示value值
allowBlank: true,
listeners: {
specialKey: "onSpecialKey"
}
}
7. allowFullQuery: false
8. {
xtype: 'girdPickerField',
fieldLabel: '管理部门',
name: 'ADMIN_DPTID',
ajaxUrl: getAjaxUrl("CORE_Department_GetPager",{ parms: {DPTTYPE: "资产责任部门"} }),
displayField: "Name",
valueField: "ID",
isValueDisplay: false, //显示显示值
allowFullQuery: false,
listeners: {
specialKey: "onSpecialKey"
}
}
9. {
xtype: 'combo',
fieldLabel: '用途分类',
name: 'PRD_CATALOG_TYPE',
store: [ ['办公','办公'] , ['生产','生产'], ['未指定','未指定'] ],
listeners: {
specialKey: "onSpecialKey"
}
}
10. {
reference: 'btn_diaobo',
xtype: 'button',
text: '资产入库',
hidden: this.viewmode,
ui: 'facebook',
iconCls: 'x-fa fa-external-link',
menu: [
{ iconCls: 'x-fa fa-plus', text: '独立入库', handler: "addNew", visibleRight: '制码' },
{ iconCls: 'x-fa fa-plus', text: '采购入库单', handler: "addNewBatch", visibleRight: '制码' },
{ iconCls: 'x-fa fa-file-excel-o', text: 'Excel导入', handler: "addNewBatchh", visibleRight: '制码'}
]
}
11. {
reference: 'btn_diaobo',
xtype: 'button',
text: '资产调拨',
hidden: this.viewmode,
ui: 'facebook',
iconCls: 'x-fa fa-external-link',
menu: [
{ iconCls: 'x-fa fa-file-excel-o', text: '借用调拨', handler: "doDiaoBo" },
{ iconCls: 'x-fa fa-file-excel-o', text: '内部调拨', handler: "doDiaoBo" },
'-',
{ iconCls: 'x-fa fa-file-excel-o', text: '原外部调拨(无审批)', handler: "doDiaobo" },
{ iconCls: 'x-fa fa-file-excel-o', text: '外部调拨-申请', handler: "doDiaoBo"},
'-',
{ iconCls: 'x-fa fa-file-excel-o', text: '归还调拨', handler: "doDiaoBo" }
]
}
12. {
reference: 'dicTree',
xtype: 'treepanel',
region: 'west',
width: 300,
split: true,
store: dicstore,
rootVisible: false, // false 隐藏根节点
columns: [
{
xtype: 'treecolumn',
flex:1,
sortable: false, // false 禁止排序
text: '名称',
region: 'west',
dataIndex: 'text'
}
]
}