igb 1 тиждень тому
батько
коміт
871a1adba0
7 змінених файлів з 21 додано та 10 видалено
  1. 1 1
      customer_detail.php
  2. 1 1
      order.php
  3. 3 3
      order_add.php
  4. 1 1
      order_details.php
  5. 2 2
      order_edit.php
  6. 12 1
      order_save.php
  7. 1 1
      rebate_summary.php

+ 1 - 1
customer_detail.php

@@ -434,7 +434,7 @@ function getPaymentStatusText($status) {
             <table class="orders-table">
                 <thead>
                     <tr>
-                        <th>销售单号</th>
+                        <th>销售单号</th>
                         <th>下单日期</th>
                         <th>订单金额</th>
 <!--                        <th>订单状态</th>-->

+ 1 - 1
order.php

@@ -221,7 +221,7 @@ $sqlStr .= " $fliterStr ORDER BY {$ordStr}o.created_at DESC";
     <div class="table2 em<?= $_SESSION['employee_id'] ?>">
         <div class="theader">
             <div class="col2">序号</div>
-            <div class="col3">销售单号</div>
+            <div class="col3">销售单号</div>
             <div class="col4">客户编码</div>
             <div class="col5">客户</div>
             <div class="col7">出货日期</div>

+ 3 - 3
order_add.php

@@ -316,8 +316,8 @@ if ($customerId > 0) {
         <table width="100%" border="0" cellpadding="3" cellspacing="1" class="table1">
             <tbody>
             <tr>
-                <th width="8%" nowrap>销售单号</th>
-                <td><input type="text" id="order_code" name="order_code" value="" class="txt1" placeholder="请输入销售单号 (多个用 / 分隔) " maxlength="100" /></td>
+                <th width="8%" nowrap>销售单号</th>
+                <td><input type="text" id="order_code" name="order_code" value="" class="txt1" placeholder="请输入销售单号 (多个用 / 分隔) " maxlength="100" /></td>
             </tr>
             <tr>
                 <th width="8%" nowrap>订单类型</th>
@@ -890,7 +890,7 @@ if ($customerId > 0) {
             });
 
             if (!orderCode) {
-                alert('销售单号不能为空');
+                alert('销售单号不能为空');
                 $('#order_code').focus();
                 return false;
             }

+ 1 - 1
order_details.php

@@ -207,7 +207,7 @@ if (!empty($id) && is_numeric($id)) {
     <div class="order-info">
         <h2>订单信息</h2>
         <div class="info-row">
-            <span class="info-label">销售单号:</span> <?= htmlspecialcharsFix($order['order_code']) ?>
+            <span class="info-label">销售单号:</span> <?= htmlspecialcharsFix($order['order_code']) ?>
         </div>
         <div class="info-row">
             <span class="info-label">客户:</span> 

+ 2 - 2
order_edit.php

@@ -334,7 +334,7 @@ if (!empty($id) && is_numeric($id)) {
         <table width="100%" border="0" cellpadding="3" cellspacing="1" class="table1">
             <tbody>
             <tr>
-                <th width="8%">销售单号</th>
+                <th width="8%">销售单号</th>
                 <td>
                     <input type="text" id="order_code" name="order_code" value="<?= htmlspecialcharsFix($order['order_code']) ?>" class="txt1" maxlength="100" />
                     <input type="hidden" name="id" value="<?= $id ?>" />
@@ -1021,7 +1021,7 @@ if (!empty($id) && is_numeric($id)) {
             });
 
             if (!orderCode) {
-                alert('销售单号不能为空');
+                alert('销售单号不能为空');
                 $('#order_code').focus();
                 return false;
             }

+ 12 - 1
order_save.php

@@ -55,7 +55,18 @@ $total_amount = $subtotal - $discount_amount;
 
 // 验证必填字段
 if (empty($order_code)) {
-    echo "<script>alert('销售订单号不能为空');history.back();</script>";
+    echo "<script>alert('销售开单号不能为空');history.back();</script>";
+    exit;
+}
+
+// 检查订单号是否已存在
+$check_order_code_sql = "SELECT id FROM orders WHERE order_code = '$order_code'";
+if ($isedit) {
+    $check_order_code_sql .= " AND id != $id";
+}
+$check_result = mysqli_query($conn, $check_order_code_sql);
+if (mysqli_num_rows($check_result) > 0) {
+    echo "<script>alert('销售开单号已存在,请使用其他开单号');history.back();</script>";
     exit;
 }
 

+ 1 - 1
rebate_summary.php

@@ -262,7 +262,7 @@ if (!empty($customers)) {
                          $productRow['rebate_amount'] . ' 元/件';
         }
         
-        $customers[$customerId]['rebate_details'] = implode('; ', $details);
+        $customers[$customerId]['rebate_details'] = implode(';<br/> ', $details);
     }
     
     // 按照返点金额排序