|
您好,请问我要给list组件下的div19设置动态隐藏,应该如何做。
下面这是我的代码,没有实现
Model.prototype.modelLoad = function(event) {
var personID = this.getContext().getCurrentPersonID();
var detialdata = this.comp("DetialMessageData");
detialdata.filters.clear();
detialdata.setFilter("filter", " T_PIP_DetialMessage.LYRID = '" + personID + "' and T_PIP_DetialMessage.LYLX = '需求' or T_PIP_DetialMessage.LYLX = '建议' ");
detialdata.refreshData();
// detialdata.filters.clear();
// detialdata.refreshData();
var count = detialdata.count();
alert(count);
for (var i = 0; i < count; i++) {
var id = detialdata.getCurrentRowID(i);
alert(id);
debugger;
var ZT = detialdata.getValueByID('LYCLZT', id);
var SFMY = detialdata.getValueByID('SFMY', id);
var lynr = detialdata.getValueByID('LYNR', id);
alert(lynr);
detialdata.next();
if (ZT == '已处理') {
if (SFMY == '满意' || SFMY == '不满意') {
$(this.getElementByXid("button1")).hide();
$(this.getElementByXid("button2")).hide();
} else {
$(this.getElementByXid("div19")).show();
}
} else {
$(this.getElementByXid("div19")).hide();
}
}
};
Model.prototype.button1Click = function(event) {
debugger;
var data = this.comp("DetialMessageData");
var value = event.bindingContext.$object.val('LYNR');
data.filters.clear();
data.setFilter('ff', "T_PIP_DetialMessage.LYNR='" + value + "'");
data.refreshData();
data.setValue("SFMY", "满意");
data.saveData();
data.refreshData();
$(this.getElementByXid("div19")).hide();
// $(this.getElementByXid("button1")).hide();
// $(this.getElementByXid("button2")).hide();
data.filters.clear();
data.refreshData();
};
|
-
|