function act_deletPrint() { $id_arr = $_POST['id']; $type = $_POST['type']; if ($type == 1) { foreach ($id_arr as $id) { $info = packageCheckModel::selectList("where id={$id} and is_delete = 0"); if (empty($info)) { self::$errCode = "003"; self::$errMsg = "没有信息!"; return false; } if ($info[0]['printTime']) { self::$errCode = "003"; self::$errMsg = "已打标,不能删除!"; return false; } } } $info = packageCheckModel::deletRecord($id_arr, $type); if ($info) { self::$errMsg = "删除成功!"; return true; } else { self::$errCode = "003"; self::$errMsg = "删除失败,请重试!"; return false; } }
function act_deletPrint() { $id_arr = $_POST['id']; $type = $_POST['type']; if ($type == 1) { foreach ($id_arr as $id) { /** QC已返回良品、已有上架则不许删除 edit by Gary start**/ $info = packageCheckModel::selectList("where id={$id} and is_delete = 0"); if (empty($info)) { self::$errCode = "003"; self::$errMsg = "没有点货信息!"; return false; } if ($info[0]['shelvesNums']) { self::$errCode = "003"; self::$errMsg = "包含已上架记录,不能删除!"; return false; } if ($info[0]['ichibanNums']) { self::$errCode = "003"; self::$errMsg = "QC已返回良品,不能删除!"; return false; } if ($info[0]['printTime']) { self::$errCode = "003"; self::$errMsg = "已打标,不能删除!"; return false; } /** end**/ } } $info = packageCheckModel::deletRecord($id_arr, $type); if ($info) { self::$errMsg = "删除成功!"; return true; } else { self::$errCode = "003"; self::$errMsg = "删除失败,请重试!"; return false; } }