通用新增接口:直接判断是否有值或者为空,有则push参数。
if (currentTable.SYWCTZE && currentTable.SYWCTZE !== "") {
filedforvalue.push({
fieldname: "sywctze",
fieldvalue: currentTable.SYWCTZE,
fieldtype: "string"
});
}
通用更新接口:代码如下:
if (currentTable.SYWCTZE && currentTable.SYWCTZE !== "") {
filedforvalue.push({
fieldname: "sywctze",
fieldvalue: currentTable.SYWCTZE,
fieldtype: "string"
});
} else {
filedforvalue.push({
fieldname: "sywctze",
fieldvalue: currentTable.SYWCTZE,
fieldtype: "null"
});
}
查询接口添加提示框:
checkClick: function(e, $this, initdata) {
globals.layerIndex = layer.msg('正在查询,请稍候..', {
icon: 16,
shade: 0.3,
time: false
});
setTimeout(function(data) {
var table = globals.tableinfo.vueInfo;
table.reloaddata(table);
layer.close(globals.layerIndex);
},
100);
},