|
@@ -8,7 +8,7 @@ $id = $_GET['id'] ?? '';
|
|
|
if (!empty($id) && is_numeric($id)) {
|
|
|
// 获取订单基本信息
|
|
|
$employee_id = $_SESSION['employee_id'];
|
|
|
- $sql = "SELECT o.*, c.cs_company, cc.contact_name, e.em_user as employee_name
|
|
|
+ $sql = "SELECT o.*, c.cs_company, c.cs_code, cc.contact_name, e.em_user as employee_name
|
|
|
FROM orders o
|
|
|
LEFT JOIN customer c ON o.customer_id = c.id
|
|
|
LEFT JOIN customer_contact cc ON o.contact_id = cc.id
|
|
@@ -126,7 +126,11 @@ if (!empty($id) && is_numeric($id)) {
|
|
|
<span class="info-label">订单编号:</span> <?= htmlspecialcharsFix($order['order_code']) ?>
|
|
|
</div>
|
|
|
<div class="info-row">
|
|
|
- <span class="info-label">客户:</span> <?= htmlspecialcharsFix($order['cs_company']) ?>
|
|
|
+ <span class="info-label">客户:</span>
|
|
|
+ <?php if (!empty($order['cs_code'])): ?>
|
|
|
+ <?= htmlspecialcharsFix($order['cs_code']) ?> -
|
|
|
+ <?php endif; ?>
|
|
|
+ <?= htmlspecialcharsFix($order['cs_company']) ?>
|
|
|
</div>
|
|
|
<div class="info-row">
|
|
|
<span class="info-label">联系人:</span> <?= htmlspecialcharsFix($order['contact_name']) ?>
|
|
@@ -183,14 +187,14 @@ if (!empty($id) && is_numeric($id)) {
|
|
|
</table>
|
|
|
|
|
|
<div class="total-section">
|
|
|
- <div>
|
|
|
- <strong>订单小计:</strong> <?= number_format($order['subtotal'], 2) ?>
|
|
|
- </div>
|
|
|
- <?php if(isset($order['discount_amount']) && $order['discount_amount'] > 0): ?>
|
|
|
- <div>
|
|
|
- <strong>订单折扣:</strong> <?= number_format($order['discount_amount'], 2) ?>
|
|
|
- </div>
|
|
|
- <?php endif; ?>
|
|
|
+<!-- <div>-->
|
|
|
+<!-- <strong>订单小计:</strong> --><?php //= number_format($order['subtotal'], 2) ?>
|
|
|
+<!-- </div>-->
|
|
|
+<!-- --><?php //if(isset($order['discount_amount']) && $order['discount_amount'] > 0): ?>
|
|
|
+<!-- <div>-->
|
|
|
+<!-- <strong>订单折扣:</strong> --><?php //= number_format($order['discount_amount'], 2) ?>
|
|
|
+<!-- </div>-->
|
|
|
+<!-- --><?php //endif; ?>
|
|
|
<div style="font-size: 1.2em; margin-top: 5px;">
|
|
|
<strong>订单总额:</strong> <?= number_format($order['total_amount'], 2) ?>
|
|
|
</div>
|
|
@@ -198,9 +202,9 @@ if (!empty($id) && is_numeric($id)) {
|
|
|
|
|
|
<?php if (!empty($order['notes'])): ?>
|
|
|
<div class="notes-section">
|
|
|
- <h2>备注信息</h2>
|
|
|
+ <h2>订单备注</h2>
|
|
|
<div>
|
|
|
- <strong>订单备注:</strong>
|
|
|
+
|
|
|
<p><?= nl2br(htmlspecialcharsFix($order['notes'])) ?></p>
|
|
|
</div>
|
|
|
</div>
|