feat(android): add attachment config dialog and FJ- scan in registration
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user