2025年12月14日 星期日

V20201AA – 簡單子畫面- Radiobox - 互斥

 目的: V20201AA – 簡單子畫面- Radiobox

處理說明: 1> var cmp_sub_lbl_AA1 = get_cmp_lbl0("拆檢案專案日期選項:",200);
         var cmp_sub_rd1 = get_cmp_rd1("工廠實際接收日期+2個月", "sub_rd1", 150, true, "0 5 0 20"); 
         cmp_sub_rd1.checked = true;




1>*.js
function CALL_V20201AA() {
    console.log(" 1 inside - Call_V20201AA 加入排程: ");
    //panel11 - 拆檢案專案日期選項
    var cmp_sub_lbl_AA1 = get_cmp_lbl0("拆檢案專案日期選項:",200);
    var cmp_sub_rd1 = get_cmp_rd1("工廠實際接收日期+2個月", "sub_rd1", 150, true, "0 5 0 20");
    cmp_sub_rd1.checked = true;
    var cmp_sub_rd2_panel = get_cmp_panel1(200);
    var cmp_sub_rd2 = get_cmp_rd1("自行輸入", "sub_rd2", 50, false, "0 5 0 20");
    var cmp_sub_rd2_PROJDT = get_cmp_dt0('sub_rd2_PROJDT', 100);

    cmp_sub_rd2_panel.items.push(cmp_sub_rd2, cmp_sub_rd2_PROJDT);
    var cmp_sub_lbl_SPARE = get_cmp_lbl0(":");
       
    var sub_V20201AA_Flds = [
        {
            type: 'panel', bodyStyle: "background-color:transparent;", border: 5, padding: "1",
            layout: 'border',
            items: [
                {
                    xtype: 'panel', id: 'sub_panelAA1', region: 'center', 
                    height: 100,
                    //layout: { type: 'vbox', align: 'stretch' },
                    layout: { type: 'vbox',},
                    items: [
                        cmp_sub_lbl_AA1,
                        cmp_sub_rd1,
                        cmp_sub_rd2_panel,
                        cmp_sub_lbl_SPARE
                    ],
                },               
            ]
        }
    ];

2>互斥
Ext.getCmp("sub_rd1").on('change', function (me, newValue, oldValue, eOpts) {
        if (newValue == true) {
            Ext.getCmp("sub_rd2").setValue(false);
        }
    }
    );  // end of  cmp_sub_rd1.on("change"

    Ext.getCmp("sub_rd2").on('change', function (me, newValue, oldValue, eOpts) {
        if (newValue == true) {
            Ext.getCmp("sub_rd1").setValue(false);
        }
    }
    );  // end of  cmp_sub_rd1.on("change"



沒有留言:

張貼留言