m0_70156489 vor 2 Tagen
Ursprung
Commit
1a43c4378a

+ 81 - 1
application/admin/controller/Procuremen.php

@@ -1243,6 +1243,20 @@ class Procuremen extends Backend
                     }
                     }
                 }
                 }
                 $quoteBucket = $this->loadQuotedSupplierBucketByScydgyIds(array_keys($idList));
                 $quoteBucket = $this->loadQuotedSupplierBucketByScydgyIds(array_keys($idList));
+                $bidOpenSet = [];
+                if ($wffTab === 'audit') {
+                    $ccydhList = [];
+                    foreach ($rows as $rw0) {
+                        if (!is_array($rw0)) {
+                            continue;
+                        }
+                        $c0 = trim((string)($rw0['CCYDH'] ?? ''));
+                        if ($c0 !== '') {
+                            $ccydhList[] = $c0;
+                        }
+                    }
+                    $bidOpenSet = $this->loadProcuremenBidOpenVerifiedCcydhSet($ccydhList);
+                }
                 foreach ($rows as &$rw) {
                 foreach ($rows as &$rw) {
                     if (!is_array($rw)) {
                     if (!is_array($rw)) {
                         continue;
                         continue;
@@ -1273,6 +1287,10 @@ class Procuremen extends Backend
                         $rw['picked_supplier_name'] = $supplierText;
                         $rw['picked_supplier_name'] = $supplierText;
                     } else {
                     } else {
                         $rw['notify_supplier_text'] = $supplierText;
                         $rw['notify_supplier_text'] = $supplierText;
+                        $ccydh = trim((string)($rw['CCYDH'] ?? ''));
+                        $verified = ($ccydh !== '' && isset($bidOpenSet[$ccydh]));
+                        $rw['bid_open_verified'] = $verified ? 1 : 0;
+                        $rw['bid_open_status_text'] = $verified ? '已开标' : '待开标';
                     }
                     }
                 }
                 }
                 unset($rw);
                 unset($rw);
@@ -2000,6 +2018,64 @@ class Procuremen extends Backend
         }
         }
     }
     }
 
 
+    /**
+     * 批量查询订单是否已开标验证
+     *
+     * @param array<int, string> $ccydhs
+     * @return array<string, bool> ccydh => true
+     */
+    protected function loadProcuremenBidOpenVerifiedCcydhSet(array $ccydhs): array
+    {
+        $set = [];
+        $list = [];
+        foreach ($ccydhs as $c) {
+            $c = trim((string)$c);
+            if ($c !== '') {
+                $list[$c] = true;
+            }
+        }
+        if ($list === []) {
+            return $set;
+        }
+        $this->ensurePurchaseOrderBidOpenTable();
+        try {
+            $rows = Db::table('purchase_order_bid_open')
+                ->where('ccydh', 'in', array_keys($list))
+                ->field('ccydh')
+                ->select();
+            foreach ($rows as $row) {
+                if (!is_array($row)) {
+                    continue;
+                }
+                $c = trim((string)($row['ccydh'] ?? ''));
+                if ($c !== '') {
+                    $set[$c] = true;
+                }
+            }
+        } catch (\Throwable $e) {
+            return [];
+        }
+
+        return $set;
+    }
+
+    /**
+     * 未开标验证时掩码供应商备注(与单价/交货日期一致)
+     *
+     * @param array<string, mixed> $group
+     */
+    protected function maskSupplierRemarkBeforeBidOpen(array &$group, bool $quoteVisible): void
+    {
+        $remarkRaw = trim((string)($group['remark'] ?? ''));
+        if ($quoteVisible || $remarkRaw === '') {
+            $group['remark_quote_pending'] = 0;
+
+            return;
+        }
+        $group['remark'] = '开标验证后查看';
+        $group['remark_quote_pending'] = 1;
+    }
+
     /**
     /**
      * @param array{ccydh?:string} $bundle
      * @param array{ccydh?:string} $bundle
      */
      */
@@ -2553,6 +2629,7 @@ class Procuremen extends Backend
             $byCompany[$cn]['line_count'] = $total;
             $byCompany[$cn]['line_count'] = $total;
             $byCompany[$cn]['has_total'] = $total > 0;
             $byCompany[$cn]['has_total'] = $total > 0;
             $byCompany[$cn]['has_remark'] = $total > 0;
             $byCompany[$cn]['has_remark'] = $total > 0;
+            $this->maskSupplierRemarkBeforeBidOpen($byCompany[$cn], $quoteVisible);
             $byCompany[$cn]['total_text'] = ($quoteVisible && $groupHasTotal) ? $this->formatProcuremenMoneyDisplay($groupTotal) : '';
             $byCompany[$cn]['total_text'] = ($quoteVisible && $groupHasTotal) ? $this->formatProcuremenMoneyDisplay($groupTotal) : '';
             // 工序行 + 备注行 + 总计行
             // 工序行 + 备注行 + 总计行
             $byCompany[$cn]['display_rowspan'] = $total > 0 ? ($total + 2) : 0;
             $byCompany[$cn]['display_rowspan'] = $total > 0 ? ($total + 2) : 0;
@@ -2755,6 +2832,7 @@ class Procuremen extends Backend
             $g['line_count'] = $lineCount;
             $g['line_count'] = $lineCount;
             $g['has_total'] = $lineCount > 0;
             $g['has_total'] = $lineCount > 0;
             $g['has_remark'] = $lineCount > 0;
             $g['has_remark'] = $lineCount > 0;
+            $this->maskSupplierRemarkBeforeBidOpen($g, $quoteVisible);
             $g['total_text'] = ($quoteVisible && $groupHasTotal) ? $this->formatProcuremenMoneyDisplay($groupTotal) : '';
             $g['total_text'] = ($quoteVisible && $groupHasTotal) ? $this->formatProcuremenMoneyDisplay($groupTotal) : '';
             // 工序行 + 备注行 + 总计行
             // 工序行 + 备注行 + 总计行
             $g['display_rowspan'] = $lineCount > 0 ? ($lineCount + 2) : 0;
             $g['display_rowspan'] = $lineCount > 0 ? ($lineCount + 2) : 0;
@@ -5541,7 +5619,7 @@ class Procuremen extends Backend
             }
             }
             $lineCount = count($lines);
             $lineCount = count($lines);
             $hasRemark = $lineCount > 0;
             $hasRemark = $lineCount > 0;
-            $supplierGroups[] = [
+            $supplierGroup = [
                 'company_name'   => $cn,
                 'company_name'   => $cn,
                 'username'       => $username,
                 'username'       => $username,
                 'email'          => is_array($firstDetail) ? trim((string)($firstDetail['email'] ?? '')) : '',
                 'email'          => is_array($firstDetail) ? trim((string)($firstDetail['email'] ?? '')) : '',
@@ -5556,6 +5634,8 @@ class Procuremen extends Backend
                 'total_text'     => ($quoteVisible && $groupHas) ? $this->formatProcuremenMoneyDisplay($groupTotal) : '',
                 'total_text'     => ($quoteVisible && $groupHas) ? $this->formatProcuremenMoneyDisplay($groupTotal) : '',
                 'has_total'      => $lineCount > 0,
                 'has_total'      => $lineCount > 0,
             ];
             ];
+            $this->maskSupplierRemarkBeforeBidOpen($supplierGroup, $quoteVisible);
+            $supplierGroups[] = $supplierGroup;
         }
         }
         usort($supplierGroups, function ($a, $b) {
         usort($supplierGroups, function ($a, $b) {
             if (($a['is_void'] ?? false) !== ($b['is_void'] ?? false)) {
             if (($a['is_void'] ?? false) !== ($b['is_void'] ?? false)) {

+ 1 - 1
application/admin/view/procuremen/audit_issue.html

@@ -372,7 +372,7 @@
             {if !empty($co.has_remark)}
             {if !empty($co.has_remark)}
             <tr{if !empty($co.is_void)} class="text-muted"{/if}>
             <tr{if !empty($co.is_void)} class="text-muted"{/if}>
                 <td><strong>备注</strong></td>
                 <td><strong>备注</strong></td>
-                <td colspan="3" style="text-align:left;vertical-align:middle;">{$co.remark|default=''|htmlentities}</td>
+                <td colspan="3" class="{if !empty($co.remark_quote_pending)}audit-quote-pending{/if}" style="text-align:left;vertical-align:middle;">{$co.remark|default=''|htmlentities}</td>
             </tr>
             </tr>
             {/if}
             {/if}
             {if !empty($co.has_total)}
             {if !empty($co.has_total)}

+ 1 - 1
application/admin/view/procuremen/details_fragment.html

@@ -480,7 +480,7 @@
             {if !empty($sg.has_remark)}
             {if !empty($sg.has_remark)}
             <tr class="detail-supplier-remark-row{if !empty($sg.is_void)} text-muted{/if}">
             <tr class="detail-supplier-remark-row{if !empty($sg.is_void)} text-muted{/if}">
                 <td class="detail-remark-label"><strong>备注</strong></td>
                 <td class="detail-remark-label"><strong>备注</strong></td>
-                <td class="detail-remark-text" colspan="5">{$sg.remark|default=''|htmlentities}</td>
+                <td class="detail-remark-text{if !empty($sg.remark_quote_pending)} detail-quote-empty{/if}" colspan="5">{$sg.remark|default=''|htmlentities}</td>
             </tr>
             </tr>
             {/if}
             {/if}
             {if !empty($sg.has_total)}
             {if !empty($sg.has_total)}

+ 1 - 1
application/admin/view/procuremen/outward_detail.html

@@ -343,7 +343,7 @@
             {if !empty($co.has_remark)}
             {if !empty($co.has_remark)}
             <tr class="outward-confirm-supplier-row{if !empty($co.is_void)} text-muted{/if}" data-supplier-idx="{$k-1}">
             <tr class="outward-confirm-supplier-row{if !empty($co.is_void)} text-muted{/if}" data-supplier-idx="{$k-1}">
                 <td><strong>备注</strong></td>
                 <td><strong>备注</strong></td>
-                <td colspan="3" style="text-align:left;vertical-align:middle;">{$co.remark|default=''|htmlentities}</td>
+                <td colspan="3" class="{if !empty($co.remark_quote_pending)}outward-quote-empty{/if}" style="text-align:left;vertical-align:middle;">{$co.remark|default=''|htmlentities}</td>
             </tr>
             </tr>
             {/if}
             {/if}
             {if !empty($co.has_total)}
             {if !empty($co.has_total)}

+ 1 - 1
application/extra/site.php

@@ -5,7 +5,7 @@ return array (
   'brand_logo' => 'https://a-7in6-com.oss-cn-hangzhou.aliyuncs.com/xinhua/img/logo1.png',
   'brand_logo' => 'https://a-7in6-com.oss-cn-hangzhou.aliyuncs.com/xinhua/img/logo1.png',
   'beian' => '',
   'beian' => '',
   'cdnurl' => '',
   'cdnurl' => '',
-  'version' => '1.10.8',
+  'version' => '1.10.9',
   'timezone' => 'Asia/Shanghai',
   'timezone' => 'Asia/Shanghai',
   'forbiddenip' => '',
   'forbiddenip' => '',
   'languages' => 
   'languages' => 

+ 13 - 1
public/assets/js/backend/procuremen.js

@@ -316,7 +316,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
             var issuedOnlyCols = ['purchase_order_id'];
             var issuedOnlyCols = ['purchase_order_id'];
             var pendingOnlyCols = ['po_detail_count', 'po_amount_fill_cnt', 'po_delivery_fill_cnt'];
             var pendingOnlyCols = ['po_detail_count', 'po_amount_fill_cnt', 'po_delivery_fill_cnt'];
             var pickedOnlyCols = ['picked_supplier_name'];
             var pickedOnlyCols = ['picked_supplier_name'];
-            var auditOnlyCols = ['notify_supplier_text'];
+            var auditOnlyCols = ['bid_open_status_text', 'notify_supplier_text'];
             var allOnlyCols = ['ID'];
             var allOnlyCols = ['ID'];
 
 
             Controller.currYm = ($layout.data('defaultYm') || '').toString();
             Controller.currYm = ($layout.data('defaultYm') || '').toString();
@@ -846,6 +846,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         return (v == null || v === '') ? '' : String(v);
                         return (v == null || v === '') ? '' : String(v);
                     }
                     }
                 },
                 },
+                {field: 'bid_open_status_text', title: '开标状态', operate: false, table: 'a', width: 88, align: 'center',
+                    visible: indexShowAuditSuppliers,
+                    formatter: function (v, row) {
+                        var t = (v != null && v !== '') ? String(v)
+                            : (parseInt(row && row.bid_open_verified, 10) === 1 ? '已开标' : '待开标');
+                        if (t !== '已开标' && t !== '待开标') {
+                            t = '待开标';
+                        }
+                        var cls = t === '已开标' ? 'text-success' : 'text-warning';
+                        return '<span class="' + cls + '">' + procuremenEscHtml(t) + '</span>';
+                    }
+                },
                 {field: 'notify_supplier_text', title: '报价供应商', operate: false, table: 'a', width: 260, align: 'left',
                 {field: 'notify_supplier_text', title: '报价供应商', operate: false, table: 'a', width: 260, align: 'left',
                     visible: indexShowAuditSuppliers,
                     visible: indexShowAuditSuppliers,
                     class: 'procuremen-supplier-lines-cell',
                     class: 'procuremen-supplier-lines-cell',