<div class="field-box">
<sc-radio-field name="rdoPkcType" input-value="10" on-checkchange="onCheckchange"></sc-radio-field>
<div class="hspace-2"></div>
<sc-label text="포장재"></sc-label>
<div class="hspace-2"></div>
<sc-label text="→ 문안"></sc-label>
<div class="hspace-2"></div>
<sc-label text="→ 원화"></sc-label>
</div>
<div class="field-box">
<sc-radio-field name="rdoPkcType" input-value="20" on-checkchange="onCheckchange"></sc-radio-field>
<div class="hspace-2"></div>
<sc-label text="포장재"></sc-label>
<div class="hspace-2"></div>
<sc-label text="→ 문안" style="color:#CCCCCC"></sc-label>
<div class="hspace-2"></div>
<sc-label text="→ 원화"></sc-label>
</div>
<div class="field-box">
<sc-radio-field name="rdoPkcType" input-value="30" on-checkchange="onCheckchange"></sc-radio-field>
<div class="hspace-2"></div>
<sc-label text="포장재" style="color:#CCCCCC"></sc-label>
<div class="hspace-2"></div>
<sc-label text="→ 문안"></sc-label>
<div class="hspace-2"></div>
<sc-label text="→ 원화" style="color:#CCCCCC"></sc-label>
</div>
onCheckchange : function(event)
{
var me = this;
switch (event.target.name)
{
case "rdoPkcType" :
// 체크시에만 호출되도록
if (event.target.value)
{
me.set("pkc.pkc_type_cd", event.target.inputValue);
var _radioFields = Polymer.dom(this.root).querySelectorAll("[name='rdoPkcType']");
for (var _idx in _radioFields)
{
if (_radioFields[_idx] != event.target)
{
_radioFields[_idx].value = false;
}
//console.log(idx + " : " + _radioFields[_idx].value);
}
//console.log(me.pkc.pkc_type_cd);
me.applyFormula();
}
break;
}
},
setRdoPkcType : function()
{
var me = this;
var radioFields = Polymer.dom(this.root).querySelectorAll("[name='rdoPkcType']");
for (var idx in radioFields)
{
radioFields[idx].value = (radioFields[idx].inputValue == me.pkc.pkc_type_cd);
}
},