feat(android): add attachment config dialog and FJ- scan in registration

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-08-12 14:56:28 +08:00
parent b7484915c6
commit 6b05d6c0e3
6 changed files with 503 additions and 1 deletions

View File

@@ -110,6 +110,38 @@ extension _RegistrationSubmitPart on _RegistrationPageState {
}
Future<void> _submitOne(String baseUrl, String zongpaiNo) async {
// Attachment scan: submit via POST /attachment/location instead
final pendingCat = _pendingAttachmentCategory;
if (pendingCat != null) {
final ok = await _submitAttachmentLocation(
baseUrl,
zongpaiNo,
pendingCat,
);
if (!mounted) return;
setState(() {
_isSubmitting = false;
_pendingAttachmentCategory = null;
});
if (ok) {
_feedbackService.trigger(FeedbackEvent.submitSuccess);
setState(() {
_zongpaiNos.remove(zongpaiNo);
if (_mode == RegistrationMode.singleCode && !_isTempStorageTarget) {
_locationCode = null;
_locationType = null;
}
});
_showStatusOverride(
'附件上架成功',
StatusDotColor.green,
const Duration(milliseconds: 1500),
);
await _refreshCurrentOverview();
}
return;
}
final result = await _apiService.registerLocation(
baseUrl: baseUrl,
zongpaiNo: zongpaiNo,