fix(gjc): 开始计重手机端去掉地磅重量,平板车自重左对齐并自动带出

- 手机布局删除「地磅重量」;手机端不再按「地磅重量 − 托盘总重」自动计算运抵重量
  (地磅为 0 时会被写成 "0"),改为手输、默认空白;平板逻辑不变
- 「平板车自重」改用不可编辑的 INPUT 形态,与其他行一样左对齐
- 运单加载后若已带平板车号,直接回查自重(平板共用 ViewModel,一并生效)
- PhoneFormRow 的 INPUT 形态补上输入完成回调(失焦 / 键盘完成、下一项),
  原先从不触发,手输平板车号、运单号后不会回查

Refs: 禅道 Bug #621

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YANG JIANKUAN
2026-10-14 20:20:57 -07:00
parent b22d55a380
commit 2c8fa689a5
3 changed files with 25 additions and 11 deletions

View File

@@ -7,6 +7,7 @@ import android.util.AttributeSet
import android.util.SparseArray
import android.view.Gravity
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.EditText
import android.widget.ImageView
import android.widget.LinearLayout
@@ -136,6 +137,20 @@ class PhoneFormRow @JvmOverloads constructor(
}
}
// INPUT 输入完成回调(与平板 PadDataLayoutNew 一致:失焦即视为输入完成;另加键盘「完成/下一项」)。
// 原先 INPUT 形态从不触发 refreshCallBack,平板车号/运单号手输后不会回查(Bug #621)
et.setOnFocusChangeListener { _, hasFocus ->
if (!hasFocus && type == PhoneFormRowType.INPUT) refreshCallBack?.invoke()
}
et.setOnEditorActionListener { _, actionId, _ ->
if (type == PhoneFormRowType.INPUT &&
(actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_ACTION_NEXT)
) {
refreshCallBack?.invoke()
}
false
}
applyType()
}