7-8 修复内容

This commit is contained in:
taiyi 2026-07-08 18:44:13 +08:00
parent a2ed6c71c3
commit 949dcfe0d4
2 changed files with 29 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<template>
<template>
<section class="page">
<div class="page-hero">
<div>
@ -252,6 +252,18 @@
<span>数量</span>
<input v-model.number="row.quantity" type="number" min="0.01" step="0.01" @input="calcDemandResult(row)" />
</label>
<label>
<span>长度()</span>
<input v-model.number="row.length_m" type="number" min="0" step="0.01" placeholder="选填" />
</label>
<label>
<span>宽度()</span>
<input v-model.number="row.width_m" type="number" min="0" step="0.01" placeholder="选填" />
</label>
<label>
<span>克重(g)</span>
<input v-model.number="row.weight_g" type="number" min="0" step="1" placeholder="选填" />
</label>
</div>
</div>
</div>
@ -297,6 +309,10 @@
<span>提成金额可选</span>
<input v-model.number="form.commission_amount" type="number" min="0" step="0.01" placeholder="留空表示无提成" />
</label>
<label>
<span>税额</span>
<input v-model.number="form.tax_amount" type="number" min="0" step="0.01" placeholder="留空为0" />
</label>
<label class="checkline">
<input v-model="form.need_invoice" type="checkbox" />
<span>是否开发票</span>
@ -410,7 +426,10 @@ function buildDefaultItem() {
demand_specification: "",
length_m: null,
width_m: null,
_demandResult: "",
weight_g: null,
pricing_type: "",
price_tier: "",
_demandResult: "",
_demandCalcHint: "",
unit: "",
quantity: 1,
@ -437,6 +456,7 @@ function buildDefaultForm() {
tax_total: 0,
other_fee_total: 0,
commission_amount: 0,
tax_amount: 0,
need_invoice: false,
order_type: "",
tracking_number: "",
@ -932,6 +952,7 @@ async function loadOptions() {
}
async function handleSubmit() {
if (submitting.value) return;
if (!form.customer_name.trim()) {
message.value = "请输入客户姓名";
messageType.value = "error";
@ -975,6 +996,7 @@ async function handleSubmit() {
tax_total: form.tax_total,
other_fee_total: form.other_fee_total,
commission_amount: form.commission_amount,
tax_amount: form.tax_amount,
need_invoice: form.need_invoice ? 1 : 0,
order_type: form.order_type,
self_delivery: selfDelivery,
@ -985,7 +1007,7 @@ async function handleSubmit() {
remark: form.remark,
auto_sync_customer: form.auto_sync_customer,
customer_sync_mode: matchedCustomer ? "linked" : form.auto_sync_customer ? "auto_create" : "manual_review",
items: validItems.map(({ rowKey, selectedProductId, _searchText, _showDropdown, _filteredProducts, _extraInputs, ...rest }) => {
items: validItems.map(({ rowKey, selectedProductId, _searchText, _showDropdown, _filteredProducts, _demandResult, _demandCalcHint, _calcHint, _extraInputs, ...rest }) => {
const extra = {};
if (rest._extraInputs) {
for (const f of rest._extraInputs) {
@ -1028,6 +1050,7 @@ async function loadOrderForEdit(orderId) {
form.tax_total = data.tax_total || 0;
form.other_fee_total = data.other_fee_total || 0;
form.commission_amount = data.commission_amount || 0;
form.tax_amount = data.tax_amount || 0;
form.need_invoice = data.need_invoice ? true : false;
form.order_type = data.order_type || "";
form.tracking_number = data.tracking_number || "";
@ -1050,9 +1073,11 @@ async function loadOrderForEdit(orderId) {
row.sale_price = item.sale_price;
row.cost_price = item.cost_price || 0;
row.remark = item.remark || "";
row.demand_specification = item.demand_specification || "";
if (item.product_id) {
row.selectedProductId = String(item.product_id);
}
if (row.demand_specification) calcDemandResult(row);
return row;
});
}

1
patch_admin_order.js Normal file
View File

@ -0,0 +1 @@
console.log(1)