Compare commits
3 Commits
8afd60d769
...
ea1c5a7835
| Author | SHA1 | Date | |
|---|---|---|---|
| ea1c5a7835 | |||
| e1b7de50a5 | |||
| 0b45356292 |
@ -77,6 +77,7 @@ class AuthService:
|
||||
"order:list",
|
||||
"order:create",
|
||||
"order:submit",
|
||||
"order:update",
|
||||
"customer:list",
|
||||
"reminder:list",
|
||||
"ai:parse-order",
|
||||
|
||||
@ -104,6 +104,7 @@ DEFAULT_MENUS = [
|
||||
# 按钮权限 - 订单相关
|
||||
{"id": 20, "parent_id": 5, "menu_name": "提交审核", "menu_path": "", "menu_type": "button", "permission_code": "order:submit", "icon": "", "sort_no": 20, "status": 1},
|
||||
{"id": 21, "parent_id": 5, "menu_name": "取消审批", "menu_path": "", "menu_type": "button", "permission_code": "order:cancel-approve", "icon": "", "sort_no": 21, "status": 1},
|
||||
{"id": 24, "parent_id": 5, "menu_name": "订单更新", "menu_path": "", "menu_type": "button", "permission_code": "order:update", "icon": "", "sort_no": 24, "status": 1},
|
||||
|
||||
# 按钮权限 - 基础资料
|
||||
{"id": 22, "parent_id": 3, "menu_name": "定价规则编辑", "menu_path": "", "menu_type": "button", "permission_code": "master-data:update", "icon": "", "sort_no": 22, "status": 1},
|
||||
@ -164,6 +165,7 @@ DEFAULT_ROLE_MENU_CODES = {
|
||||
"order:list",
|
||||
"order:create",
|
||||
"order:submit",
|
||||
"order:update",
|
||||
"customer:list",
|
||||
"reminder:list",
|
||||
"ai:parse-order",
|
||||
|
||||
@ -243,7 +243,7 @@
|
||||
</label>
|
||||
<label>
|
||||
<span>数量</span>
|
||||
<input v-model.number="row.quantity" type="number" min="0.01" step="0.01" />
|
||||
<input v-model.number="row.quantity" type="number" min="0.01" step="0.01" @input="calcDemandResult(row)" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -820,10 +820,13 @@ function calcDemandResult(row) {
|
||||
const toM = (v, u) => (u === "m" ? v : u === "mm" ? v / 1000 : v / 100);
|
||||
const m1 = toM(v1, u1);
|
||||
const m2 = toM(v2, u2);
|
||||
const area = m1 * m2;
|
||||
row._demandResult = `${area.toFixed(4)} m²`;
|
||||
row._demandCalcHint = `${v1}${u1} × ${v2}${u2} = ${m1}m × ${m2}m = ${area.toFixed(4)}m²`;
|
||||
// 写入尺寸字段供定价引擎使用
|
||||
const qty = Number(row.quantity) || 0;
|
||||
const total = m1 * m2 * qty;
|
||||
row._demandResult = qty > 0 ? `${total.toFixed(4)} m²` : `${(m1 * m2).toFixed(4)} m²`;
|
||||
row._demandCalcHint = qty > 0
|
||||
? `${v1}${u1} × ${v2}${u2} × ${qty} = ${m1}m × ${m2}m × ${qty} = ${total.toFixed(4)}m²`
|
||||
: `${v1}${u1} × ${v2}${u2} = ${m1}m × ${m2}m = ${(m1 * m2).toFixed(4)}m²`;
|
||||
// 写入单件尺寸字段供定价引擎使用
|
||||
row.length_m = m2;
|
||||
row.width_m = m1;
|
||||
return;
|
||||
|
||||
@ -223,7 +223,7 @@
|
||||
</label>
|
||||
<label>
|
||||
<span>数量</span>
|
||||
<input v-model.number="row.quantity" type="number" min="0.01" step="0.01" />
|
||||
<input v-model.number="row.quantity" type="number" min="0.01" step="0.01" @input="calcDemandResult(row)" />
|
||||
</label>
|
||||
<!-- 特殊计价字段 -->
|
||||
<label>
|
||||
@ -808,9 +808,12 @@ function calcDemandResult(row) {
|
||||
const m2 = toM(v2, u2);
|
||||
row.length_m = m2;
|
||||
row.width_m = m1;
|
||||
const area = m1 * m2;
|
||||
row._demandResult = `${area.toFixed(4)} m²`;
|
||||
row._demandCalcHint = `${v1}${u1} × ${v2}${u2} = ${m1}m × ${m2}m = ${area.toFixed(4)}m²`;
|
||||
const qty = Number(row.quantity) || 0;
|
||||
const total = m1 * m2 * qty;
|
||||
row._demandResult = qty > 0 ? `${total.toFixed(4)} m²` : `${(m1 * m2).toFixed(4)} m²`;
|
||||
row._demandCalcHint = qty > 0
|
||||
? `${v1}${u1} × ${v2}${u2} × ${qty} = ${m1}m × ${m2}m × ${qty} = ${total.toFixed(4)}m²`
|
||||
: `${v1}${u1} × ${v2}${u2} = ${m1}m × ${m2}m = ${(m1 * m2).toFixed(4)}m²`;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user