// 判断子表某字段是否为空前端公式 export default { execute: function () { console.log("进入:判断子表某字段是否为空前端公式"); let isEmpty = false if (arguments && arguments[0] && arguments[0][0] && arguments[0][1] && arguments[1]) { let count = 0, _key = arguments[0][0].FieldCode, table = arguments[0][0].FieldTableCode, context = arguments[1]; if (context.getTableType) { let _tn = context.getTableType(table); let _data = context.getSubData(_tn.title); if (_data instanceof Array) { for (const iterator of _data) { let _v = iterator.getValue(_key) if (_v == undefined || _v == null || _v == '') { isEmpty = true break; } } if (isEmpty) { GAMS.Common.messagePrompt(arguments[0][1].StaticValue); } } } } return isEmpty }, getResultType: function () { return FMR.ConstDataTypes.General; } }