对接物品出户不放行接口

hmxc
小赖 4 years ago
parent 110d479ce3
commit b04ef43c1c

@ -89,4 +89,7 @@ class _Manage {
/// ///
String get goodsOutRelease => '/user/articleOut/release'; String get goodsOutRelease => '/user/articleOut/release';
///
String get goodsOutNotRelease => '/user/articleOut/noRelease';
} }

@ -299,10 +299,7 @@ class _ItemsOutdoorDetailsPageState extends State<ItemsOutdoorDetailsPage> {
children: [ children: [
AkuButton( AkuButton(
onPressed: () { onPressed: () {
//TODO not pass Get.to(OutdoorNotpassPage(id: _model.id));
// Get.to(OutdoorNotpassPage(
// model: widget.cardMedel,
// ));
}, },
child: Container( child: Container(
width: 304.w, width: 304.w,

@ -1,4 +1,7 @@
// Flutter imports: // Flutter imports:
import 'package:aku_community_manager/const/api.dart';
import 'package:aku_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// Package imports: // Package imports:
@ -14,8 +17,8 @@ import 'package:aku_community_manager/ui/widgets/common/aku_radio.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
class OutdoorNotpassPage extends StatefulWidget { class OutdoorNotpassPage extends StatefulWidget {
final ItemsOutdoorModel model; final int id;
OutdoorNotpassPage({Key key, @required this.model}) : super(key: key); OutdoorNotpassPage({Key key, @required this.id}) : super(key: key);
@override @override
_OutdoorNotpassPageState createState() => _OutdoorNotpassPageState(); _OutdoorNotpassPageState createState() => _OutdoorNotpassPageState();
@ -185,13 +188,23 @@ class _OutdoorNotpassPageState extends State<OutdoorNotpassPage> {
], ],
), ),
bottom: AkuButton( bottom: AkuButton(
onPressed: () { onPressed: () async {
widget.model.finalOutTime = _currentTime; Function cancel = BotToast.showLoading();
widget.model.datetime = DateTime.now(); String remark = '';
_select == 3 if (_select <= 2) {
? widget.model.rejectReason = _textEditingController.text remark = _rejectReason[_select];
: widget.model.rejectReason = _rejectReason[_select]; } else {
widget.model.status = OUTDOORSTATUS.REJECTED; remark = _textEditingController.text;
}
await NetUtil().post(
API.manage.goodsOutNotRelease,
params: {
'id': widget.id,
'remarks': remark,
},
showMessage: true,
);
cancel();
Get.back(); Get.back();
Get.back(); Get.back();
}, },

Loading…
Cancel
Save