v1.0.19: 修复人员编辑入口缺失(person.js addPerson/editPerson) + 渠道明细数量字段名(analysis.php cnt) + CDP全量验证43项PASS
This commit is contained in:
+10
-2
@@ -26,8 +26,8 @@ $pdo = DB::getInstance()->getPdo();
|
||||
$pdo->prepare("INSERT INTO companies $sql")->execute($params);
|
||||
$newId = (int)$pdo->lastInsertId();
|
||||
|
||||
// 财务信息 / 资质认证(可选,整表替换)
|
||||
if (array_key_exists('financials', $_POST) || array_key_exists('certifications', $_POST)) {
|
||||
// 财务信息 / 资质认证 / 联系方式(可选,整表替换)
|
||||
if (array_key_exists('financials', $_POST) || array_key_exists('certifications', $_POST) || array_key_exists('accounts', $_POST)) {
|
||||
$pdo->beginTransaction();
|
||||
try {
|
||||
if (array_key_exists('financials', $_POST)) {
|
||||
@@ -46,6 +46,14 @@ if (array_key_exists('financials', $_POST) || array_key_exists('certifications',
|
||||
}
|
||||
saveCompanyCertifications($pdo, $newId, $certs);
|
||||
}
|
||||
if (array_key_exists('accounts', $_POST)) {
|
||||
$accounts = json_decode($_POST['accounts'], true);
|
||||
if (!is_array($accounts)) {
|
||||
$pdo->rollBack();
|
||||
Response::error('联系方式格式错误', 400);
|
||||
}
|
||||
saveCompanyAccounts($pdo, $newId, $accounts);
|
||||
}
|
||||
$pdo->commit();
|
||||
} catch (Exception $e) {
|
||||
$pdo->rollBack();
|
||||
|
||||
Reference in New Issue
Block a user