|
|
@@ -1927,9 +1927,9 @@ class Procuremen extends Backend
|
|
|
$line['subtotal_text'] = $amountFilled ? '未到截止时间' : '';
|
|
|
$line['subtotal_num'] = null;
|
|
|
|
|
|
- $line['amount_quote_pending'] = $amountFilled;
|
|
|
- $line['delivery_quote_pending'] = $deliveryFilled;
|
|
|
- $line['quote_before_deadline'] = $amountFilled || $deliveryFilled;
|
|
|
+ $line['amount_quote_pending'] = $amountFilled ? 1 : 0;
|
|
|
+ $line['delivery_quote_pending'] = $deliveryFilled ? 1 : 0;
|
|
|
+ $line['quote_before_deadline'] = ($amountFilled || $deliveryFilled) ? 1 : 0;
|
|
|
$line['amount_filled'] = false;
|
|
|
$line['delivery_filled'] = false;
|
|
|
$line['is_quoted'] = false;
|
|
|
@@ -1938,6 +1938,33 @@ class Procuremen extends Backend
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 报价行展示字段默认值(模板安全访问)
|
|
|
+ *
|
|
|
+ * @param array<string, mixed> $line
|
|
|
+ * @return array<string, mixed>
|
|
|
+ */
|
|
|
+ protected function ensureSupplierQuoteLineDisplayKeys(array $line): array
|
|
|
+ {
|
|
|
+ if (!array_key_exists('amount_quote_pending', $line)) {
|
|
|
+ $line['amount_quote_pending'] = 0;
|
|
|
+ }
|
|
|
+ if (!array_key_exists('delivery_quote_pending', $line)) {
|
|
|
+ $line['delivery_quote_pending'] = 0;
|
|
|
+ }
|
|
|
+ if (!array_key_exists('quote_before_deadline', $line)) {
|
|
|
+ $line['quote_before_deadline'] = 0;
|
|
|
+ }
|
|
|
+ if (!array_key_exists('amount_filled', $line)) {
|
|
|
+ $line['amount_filled'] = 0;
|
|
|
+ }
|
|
|
+ if (!array_key_exists('delivery_filled', $line)) {
|
|
|
+ $line['delivery_filled'] = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ return $line;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 审核弹窗:按供应商汇总报价明细
|
|
|
*
|
|
|
@@ -2070,7 +2097,7 @@ class Procuremen extends Backend
|
|
|
if (!$deadlineReached) {
|
|
|
$this->maskSupplierQuoteLineBeforeDeadline($lineRow);
|
|
|
}
|
|
|
- $byCompany[$cn]['lines'][] = $lineRow;
|
|
|
+ $byCompany[$cn]['lines'][] = $this->ensureSupplierQuoteLineDisplayKeys($lineRow);
|
|
|
}
|
|
|
foreach ($byCompany as $cn => $g) {
|
|
|
$total = count($g['lines']);
|
|
|
@@ -2236,7 +2263,7 @@ class Procuremen extends Backend
|
|
|
if (!$deadlineReached) {
|
|
|
$this->maskSupplierQuoteLineBeforeDeadline($pickLine);
|
|
|
}
|
|
|
- $byCompany[$cn]['pick_lines'][$sid] = $pickLine;
|
|
|
+ $byCompany[$cn]['pick_lines'][$sid] = $this->ensureSupplierQuoteLineDisplayKeys($pickLine);
|
|
|
$byCompany[$cn]['detail_picks'][$sid] = [
|
|
|
'scydgy_id' => $sid,
|
|
|
'detail_id' => $detailId,
|
|
|
@@ -4722,7 +4749,7 @@ class Procuremen extends Backend
|
|
|
$groupTotal += $sub;
|
|
|
$groupHas = true;
|
|
|
}
|
|
|
- $lines[] = $line;
|
|
|
+ $lines[] = $this->ensureSupplierQuoteLineDisplayKeys($line);
|
|
|
};
|
|
|
foreach ($orderedSids as $sid) {
|
|
|
if (!isset($bySid[$sid])) {
|