|
@@ -382,8 +382,6 @@ if (!empty($id) && is_numeric($id)) {
|
|
<tr>
|
|
<tr>
|
|
<th width="8%" valign="top">产品列表</th>
|
|
<th width="8%" valign="top">产品列表</th>
|
|
<td>
|
|
<td>
|
|
- <button type="button" id="add-product-btn" class="add-product-btn">添加产品</button>
|
|
|
|
-
|
|
|
|
<div class="product-list-header" style="display: flex; background-color: #eee; padding: 8px 15px; margin-bottom: 10px; border-radius: 4px; font-weight: bold; color: #555; font-size: 13px; gap: 20px;">
|
|
<div class="product-list-header" style="display: flex; background-color: #eee; padding: 8px 15px; margin-bottom: 10px; border-radius: 4px; font-weight: bold; color: #555; font-size: 13px; gap: 20px;">
|
|
<div style="flex: 3; min-width: 200px;">产品</div>
|
|
<div style="flex: 3; min-width: 200px;">产品</div>
|
|
<div style="flex: 1; min-width: 80px;">数量</div>
|
|
<div style="flex: 1; min-width: 80px;">数量</div>
|
|
@@ -438,6 +436,12 @@ if (!empty($id) && is_numeric($id)) {
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <!-- 在订单总额上方添加的新按钮 -->
|
|
|
|
+ <div style="text-align: center; margin-bottom: 15px;">
|
|
|
|
+ <button type="button" id="add-product-btn-bottom" class="add-product-btn">添加产品</button>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<div class="total-section" style="margin-top: 20px; padding: 15px; background-color: #f5f5f5; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
|
|
<div class="total-section" style="margin-top: 20px; padding: 15px; background-color: #f5f5f5; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
|
|
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
|
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
|
<label style="font-size: 16px; margin-right: 10px;">订单总额:</label>
|
|
<label style="font-size: 16px; margin-right: 10px;">订单总额:</label>
|
|
@@ -604,7 +608,7 @@ if (!empty($id) && is_numeric($id)) {
|
|
});
|
|
});
|
|
|
|
|
|
// 添加产品行按钮点击事件
|
|
// 添加产品行按钮点击事件
|
|
- $('#add-product-btn').on('click', function() {
|
|
|
|
|
|
+ $('#add-product-btn-bottom').on('click', function() {
|
|
addEmptyProductRow();
|
|
addEmptyProductRow();
|
|
updateNoProductsMessage();
|
|
updateNoProductsMessage();
|
|
});
|
|
});
|
|
@@ -990,7 +994,7 @@ if (!empty($id) && is_numeric($id)) {
|
|
// 检查是否有产品行
|
|
// 检查是否有产品行
|
|
if ($('.product-row').length === 0) {
|
|
if ($('.product-row').length === 0) {
|
|
alert('请至少添加一个产品');
|
|
alert('请至少添加一个产品');
|
|
- $('#add-product-btn').focus();
|
|
|
|
|
|
+ $('#add-product-btn-bottom').focus();
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1049,7 +1053,7 @@ if (!empty($id) && is_numeric($id)) {
|
|
if (firstInvalidField) {
|
|
if (firstInvalidField) {
|
|
firstInvalidField.focus();
|
|
firstInvalidField.focus();
|
|
} else {
|
|
} else {
|
|
- $('#add-product-btn').focus();
|
|
|
|
|
|
+ $('#add-product-btn-bottom').focus();
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|