|
|
|
@ -21,7 +21,10 @@ import 'package:recook/models/self_pickup_store_list_model.dart';
|
|
|
|
|
import 'package:recook/pages/home/classify/mvp/order_mvp/order_presenter_impl.dart';
|
|
|
|
|
import 'package:recook/pages/home/classify/order_prepay_page.dart';
|
|
|
|
|
import 'package:recook/pages/home/items/goods_item_order.dart';
|
|
|
|
|
import 'package:recook/pages/home/items/oversea_accept_license_page.dart';
|
|
|
|
|
import 'package:recook/pages/user/address/receiving_address_page.dart';
|
|
|
|
|
import 'package:recook/pages/user/widget/recook_check_box.dart';
|
|
|
|
|
import 'package:recook/utils/custom_route.dart';
|
|
|
|
|
import 'package:recook/widgets/bottom_sheet/bottom_list.dart';
|
|
|
|
|
import 'package:recook/widgets/custom_app_bar.dart';
|
|
|
|
|
import 'package:recook/widgets/custom_image_button.dart';
|
|
|
|
@ -52,6 +55,8 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
|
|
|
|
|
List<SelfPickupStoreModel> _storeList;
|
|
|
|
|
String _selectedStoreName;
|
|
|
|
|
|
|
|
|
|
bool _accept = false;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
@ -207,6 +212,9 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
|
|
|
|
|
SliverToBoxAdapter(
|
|
|
|
|
child: _bottomInfoTitle(),
|
|
|
|
|
),
|
|
|
|
|
SliverToBoxAdapter(
|
|
|
|
|
child: _buildOverseaTitle(),
|
|
|
|
|
),
|
|
|
|
|
SliverToBoxAdapter(
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
height: 80 + MediaQuery.of(context).viewPadding.bottom,
|
|
|
|
@ -584,6 +592,21 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
|
|
|
|
|
_titleRow("运费", "",
|
|
|
|
|
"+¥${_orderModel.data.expressTotalFee.toStringAsFixed(2)}",
|
|
|
|
|
rightTitleColor: Colors.black),
|
|
|
|
|
Builder(
|
|
|
|
|
builder: (context) {
|
|
|
|
|
bool isOversea = false;
|
|
|
|
|
for (var item in _orderModel.data.brands) {
|
|
|
|
|
for (var childItem in item.goods) {
|
|
|
|
|
if (childItem.isImport == 1) isOversea = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return isOversea
|
|
|
|
|
? _titleRow("进口税", "", "+¥${(0).toStringAsFixed(2)}",
|
|
|
|
|
rightTitleColor: Colors.black)
|
|
|
|
|
: SizedBox();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
_titleRow(
|
|
|
|
|
"优惠券",
|
|
|
|
|
"",
|
|
|
|
@ -599,6 +622,53 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_buildOverseaTitle() {
|
|
|
|
|
bool isOversea = false;
|
|
|
|
|
for (var item in _orderModel.data.brands) {
|
|
|
|
|
for (var childItem in item.goods) {
|
|
|
|
|
if (childItem.isImport == 1) isOversea = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return isOversea
|
|
|
|
|
? Container(
|
|
|
|
|
margin: EdgeInsets.only(top: rSize(16), bottom: rSize(42)),
|
|
|
|
|
child: GestureDetector(
|
|
|
|
|
onTap: () {
|
|
|
|
|
_accept = !_accept;
|
|
|
|
|
setState(() {});
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
rWBox(15),
|
|
|
|
|
RecookCheckBox(state: _accept),
|
|
|
|
|
rWBox(10),
|
|
|
|
|
Text(
|
|
|
|
|
'同意并接受',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: AppColor.blackColor,
|
|
|
|
|
fontSize: rSP(13),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () => CRoute.push(
|
|
|
|
|
context,
|
|
|
|
|
OverseaAcceptLicensePage(),
|
|
|
|
|
),
|
|
|
|
|
child: Text(
|
|
|
|
|
'《跨境商品用户购买须知》',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Color(0xFF007AFF),
|
|
|
|
|
fontSize: rSP(13),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: SizedBox();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_titleRow(title, subTitle, rightTitle,
|
|
|
|
|
{titleColor,
|
|
|
|
|
subTitleColor,
|
|
|
|
|