feat: add fixed parcel dimensions
This commit is contained in:
@@ -125,6 +125,9 @@ class App:
|
||||
self.fv_sender_addr = StringVar()
|
||||
self.fv_transport_type = StringVar()
|
||||
self.fv_weight = StringVar()
|
||||
self.fv_length = StringVar()
|
||||
self.fv_width = StringVar()
|
||||
self.fv_height = StringVar()
|
||||
|
||||
# 搜索基础设施(懒加载)
|
||||
self._search_bridge = None
|
||||
@@ -244,7 +247,19 @@ class App:
|
||||
Entry(r1, textvariable=self.fv_weight, width=10).pack(side="left", padx=5)
|
||||
Label(r1, text="(有值即强制覆盖)", fg="gray", font=("", 8)).pack(side="left")
|
||||
|
||||
# Row 2: 寄达地 | 寄达地区划代码
|
||||
# Row 2: 长 | 宽 | 高
|
||||
r_dimensions = Frame(fixed_frame)
|
||||
r_dimensions.pack(fill=X, pady=2)
|
||||
for label, variable in (
|
||||
("长:", self.fv_length),
|
||||
("宽:", self.fv_width),
|
||||
("高:", self.fv_height),
|
||||
):
|
||||
Label(r_dimensions, text=label, width=5, anchor="e").pack(side="left")
|
||||
Entry(r_dimensions, textvariable=variable, width=10).pack(side="left", padx=5)
|
||||
Label(r_dimensions, text="(有值即强制覆盖)", fg="gray", font=("", 8)).pack(side="left")
|
||||
|
||||
# Row 3: 寄达地 | 寄达地区划代码
|
||||
r2 = Frame(fixed_frame)
|
||||
r2.pack(fill=X, pady=2)
|
||||
Label(r2, text="寄达地:", width=10, anchor="e").pack(side="left")
|
||||
@@ -256,7 +271,7 @@ class App:
|
||||
self.fv_district_combo.pack(side="left", padx=5)
|
||||
Checkbutton(r2, text="强制覆盖", variable=self.fv_force_district).pack(side="left", padx=2)
|
||||
|
||||
# Row 3: 寄件人姓名 | 寄件地址
|
||||
# Row 4: 寄件人姓名 | 寄件地址
|
||||
r3 = Frame(fixed_frame)
|
||||
r3.pack(fill=X, pady=2)
|
||||
Label(r3, text="寄件人姓名:", width=10, anchor="e").pack(side="left")
|
||||
@@ -380,6 +395,9 @@ class App:
|
||||
self.fv_sender_name.set(fv.get("寄件人", {}).get("value", ""))
|
||||
self.fv_sender_addr.set(fv.get("寄件地址", {}).get("value", ""))
|
||||
self.fv_weight.set(fv.get("重量", {}).get("value", ""))
|
||||
self.fv_length.set(fv.get("长", {}).get("value", ""))
|
||||
self.fv_width.set(fv.get("宽", {}).get("value", ""))
|
||||
self.fv_height.set(fv.get("高", {}).get("value", ""))
|
||||
|
||||
# 加载区划代码下拉选项
|
||||
dc = self.config.get("district_codes", {})
|
||||
@@ -418,6 +436,9 @@ class App:
|
||||
sender_val = self.fv_sender_name.get().strip()
|
||||
addr_val = self.fv_sender_addr.get().strip()
|
||||
weight_val = self.fv_weight.get().strip()
|
||||
length_val = self.fv_length.get().strip()
|
||||
width_val = self.fv_width.get().strip()
|
||||
height_val = self.fv_height.get().strip()
|
||||
# 区划代码:Combobox 显示中文名,实际存 propertyCode
|
||||
dist_name = self.fv_district_code.get()
|
||||
dist_code = self._district_codes.get(dist_name, dist_name) if self._district_codes else dist_name
|
||||
@@ -430,6 +451,9 @@ class App:
|
||||
"寄件人": {"value": sender_val, "force": bool(sender_val)},
|
||||
"寄件地址": {"value": addr_val, "force": bool(addr_val)},
|
||||
"重量": {"value": weight_val, "force": bool(weight_val)},
|
||||
"长": {"value": length_val, "force": bool(length_val)},
|
||||
"宽": {"value": width_val, "force": bool(width_val)},
|
||||
"高": {"value": height_val, "force": bool(height_val)},
|
||||
}
|
||||
self.config["fixed_values"] = new_fixed
|
||||
|
||||
@@ -934,6 +958,9 @@ class App:
|
||||
self.fv_sender_addr.set("")
|
||||
self.fv_transport_type.set("")
|
||||
self.fv_weight.set("")
|
||||
self.fv_length.set("")
|
||||
self.fv_width.set("")
|
||||
self.fv_height.set("")
|
||||
self._product_cached_choice = None
|
||||
self._product_cached_detail = None
|
||||
self._customer_cached_choice = None
|
||||
|
||||
Reference in New Issue
Block a user