var btnSearch = Ext.create('Ext.Button', {
text: '查询',
id: 'btnSearch',
iconCls: 'unknown-button', style: 'border:solid 1px gray;height:30px;width:60px;',
textAlign: 'center',
handler: function () {
treeStore1.clearData();
var SNNo = Ext.getCmp("SNNo").value;
var MaterialBatch = Ext.getCmp("MaterialBatch").value;
var ProductionBillNo = Ext.getCmp("ProductionBillNo").value;
var TransferCard = Ext.getCmp("TransferCard").value;
var $url = 'Tracing.ashx?action=QueryRoot';
var $params = { snno: SNNo, materialbatch: MaterialBatch, productbillno: ProductionBillNo, transfercard: TransferCard };
//treeStore1.proxy.params = $params;
treeStore1.load({ params: $params });
}
});
var treeStore1 = Ext.create('Ext.data.TreeStore', {
id: 'treestore1',
pageSize: 50,
autoLoad: false,
proxy: {
type: 'ajax',
url: 'Tracing.ashx?action=QueryRoot',
async: false,
}
});
var Billtree = Ext.create('Ext.tree.Panel', {
id: 'Billtree',
title: "生产流程信息",
textAlign: 'center',
collapsible: false,
rootVisible: false,//是否显示根节点
leaf:false,
displayField: 'value',
valueField: 'uid',
store: treeStore1,
listeners: {
itemclick: function () {
}
},
columns: [
{
xtype: 'treecolumn',
header: '生产用料信息',
dataIndex: 'value',
sortable: false,
width:480
}
]
});