// [新增領用登記]鈕
var J_formFields_Sub1 = [
{
bodyStyle: "background-color:transparent;", border: false, layout: "vbox", padding: "5", items: [
{
xtype: "fieldcontainer", fieldLabel: "編號", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_CPNO", name: "sub1_CPNO", xtype: "textfield", width: 100, padding: "0 4 0 0", readOnly: true, fieldCls: "readonly", },
]
}, //end of 編號
{
xtype: "fieldcontainer", fieldLabel: "件號", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_MATNR", name: "sub1_MATNR", xtype: "textfield", width: 100, padding: "0 4 0 0", readOnly: true, fieldCls: "readonly", },
]
}, // end of 件號
{
xtype: "fieldcontainer", fieldLabel: "庫房", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_WH", name: "sub1_WH", xtype: "textfield", width: 100, padding: "0 4 0 0", readOnly: true, fieldCls: "readonly", },
]
}, // end of 庫房
{
xtype: "fieldcontainer", fieldLabel: "數量", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_QTY", name: "sub1_QTY", xtype: "textfield", width: 100, padding: "0 4 0 0", readOnly: true, fieldCls: "readonly",},
]
}, // end of 數量
{
xtype: "fieldcontainer", fieldLabel: "剩餘數量", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_RQTY", name: "sub1_RQTY", xtype: "textfield", width: 100, padding: "0 4 0 0", readOnly: true, fieldCls: "readonly", },
]
}, // end of 剩餘數量
{
xtype: "fieldcontainer", fieldLabel: "單位", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_UNIT", name: "sub1_UNIT", xtype: "textfield", width: 100, padding: "0 4 0 0", readOnly: true,fieldCls: "readonly", },
]
}, // end of 單位
{
xtype: "fieldcontainer", fieldLabel: "批次", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_CHARG", name: "sub1_CHARG", xtype: "textfield", width: 100, padding: "0 4 0 0", readOnly: true, fieldCls: "readonly", },
] // end of 批次.items
}, // end of 批次
{
xtype: "fieldcontainer", fieldLabel: "儲存位置", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_SP", name: "sub1_SP", xtype: "textfield", width: 100, padding: "0 4 0 0", readOnly: true, fieldCls: "readonly", },
]
}, // end of 儲存位置
{
xtype: "fieldcontainer", fieldLabel: "領用數量", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_PQTY", name: "sub1_PQTY", xtype: "textfield", width: 100, padding: "0 4 0 0", fieldCls: "required", },
]
}, // end of 領用數量
{
xtype: "fieldcontainer", fieldLabel: "領用人員", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_COMPER", name: "sub1_COMPER", xtype: "textfield", width: 100, padding: "0 4 0 0", fieldCls: "required", },
{ id: "sub1_COMPER_", name: "sub1_COMPER_", xtype: "textfield", width: 100, padding: "0 4 0 0", fieldCls: "readonly", },
{
id: "btn_sub1_COMPER", name: "btn_sub1_COMPER", xtype: "button", text: "...",
//員工編號挑選 , TreeView 挑選
handler: function () {
console.log(" btn_sub1_COMPER on click");
var treepanel = Ext.create('EmployeeTree', {
id: 'myEmployeeTree',
listeners: {
itemclick: function (view, record, item, index, e) {
if (record.raw.leaf) {
var info = record.raw.text;
var newStr = info.split(":");
Ext.getCmp('sub1_COMPER').setValue(newStr[0]);
Ext.getCmp('sub1_COMPER_').setValue(newStr[1]);
win_tree.close();
}
}
}
});
var win_tree = getWindow('領用人員挑選', treepanel);
win_tree.height = 400;
win_tree.show();
} // end of handler of btn_sub1_comper
},
]
}, // end of 領用人員
{
xtype: "fieldcontainer", fieldLabel: "領用工號", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_SAPNO", name: "sub1_SAPNO", xtype: "textfield", width: 100, padding: "0 4 0 0", },
]
}, // end of 領用工號
{
xtype: "fieldcontainer", fieldLabel: "備註(使用架次)", labelWidth: 100, layout: "hbox", items: [
{ id: "sub1_NOTE", name: "sub1_NOTE", xtype: "textarea", width: 200, padding: "0 4 0 0", },
]
}, // end of 備註
] // end of layout: "vbox", padding: "5", items: [
} //end of J_formFields_Sub1 , items[{
] //end of J_formFields_Sub1 , items[