function CALL_V80403B() {
console.log(" Call_V80403B step1");
//按鈕 : 無
var sub_V80403B_Btns = [ ];
// [物料]頁 - Grid子畫面欄位
var sub_model = [
//AMM_MATNRD
{ name: "PN1" },
{ name: "PN1NAME" },
{ name: "NSN" },
{ name: "SAPPN" },
{ name: "NDQTY", convert: function (value, record) { return Ext.util.Format.round(value, 3); } },
{ name: "UNIT" },
{ name: "DNOTE" },
//AMM_FM
{ name: "OGONOAF" },
{ name: "PN" },
{ name: "SEQOAF" },
{ name: "C_NM" },
{ name: "ES_NM" },
//AMM_SRO
{ name: "SAPNO" },
];
var sub_Columns = [
//AMM_MATNRD
{ header: "", xtype: "rownumberer", width: 50, align: "center", sortable: false },
{ header: "需求件號", dataIndex: "PN1", width: 320, sortable: false, TMType: "string" },
{ header: "需求件號名稱", dataIndex: "PN1NAME", width: 1000, sortable: false, TMType: "string" },
{ header: "料號", dataIndex: "NSN", width: 130, sortable: false, TMType: "string" },
{ header: "SAP件號", dataIndex: "SAPPN", width: 180, sortable: false, TMType: "string" },
{ header: "需求數量", dataIndex: "NDQTY", width: 60, sortable: false, align: "right", TMType: "float", renderer: Ext.util.Format.numberRenderer('000,000.00') },
{ header: "需求單位", dataIndex: "UNIT", width: 40, sortable: false, TMType: "string" },
{ header: "專案刪料原因", dataIndex: "DNOTE", width: 1500, sortable: false, TMType: "string" },
//AMM_FM
{ header: "拆檢提領編號", dataIndex: "OGONOAF", width: 400, sortable: false, TMType: "string" },
{ header: "件號", dataIndex: "PN", width: 320, sortable: false, TMType: "string" },
{ header: "序號", dataIndex: "SEQOAF", width: 300, sortable: false, TMType: "string" },
{ header: "中文名稱", dataIndex: "C_NM", width: 600, sortable: false, TMType: "string" },
{ header: "英文簡稱", dataIndex: "ES_NM", width: 150, sortable: false, TMType: "string" },
//AMM_SRO
{ header: "工號", dataIndex: "SAPNO", width: 120, sortable: false, TMType: "string" }
];
console.log(" V80403B step2");
//子件明細 Grid
var sub_V80403B_Grid = Ext.create('TMGrid', {
grid_id: 'sub_V80403B_Grid',
columns: sub_Columns,
//autoScroll: true,
flex: 1,
store: Ext.create('gridstore', { model: sub_model }),
});
var Tmp_gridstore = Ext.getCmp("sub_V80403B_Grid").store;
console.log("sub_V80403B_Grid:", sub_V80403B_Grid);
//2>目前所選資料的欄位值
//子畫面上方無Query
var sub_V80403B_Flds = [
{
xtype: 'panel',
id: 'sub_V80403B_panel',
region: 'center',
layout: 'fit',
flex: 5,
border: 1,
items: [sub_V80403B_Grid]
},
]; // end
Ext.getCmp('sub_V80403B_Grid').store.on("load", function (me, records, successful, eOpts) {
console.log("records:", records);
if (successful) {
console.log("Ext.getCmp('sub_V80403B_Grid').store", Ext.getCmp('sub_V80403B_Grid').store);
console.log("Ext.getCmp('sub_V80403B_Grid').store.data", Ext.getCmp('sub_V80403B_Grid').store.data);
}
}
);
console.log(" V80403B step3");
var Tmp_FM_V80403B=getMyForm("物料","tab_PN1",sub_V80403B_Flds,sub_V80403B_Btns, "A");
Tmp_FM_V80403B.setWidth(800);
Tmp_FM_V80403B.setHeight(400);
return Tmp_FM_V80403B
}; // end of function Call_V80403B() {