From 1575da2f9687b2655cb066fb680ebfe9e75f3c55 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Fri, 29 Jan 2021 10:22:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=9A=E6=9F=A5=E8=AF=A2=E7=89=A9=E5=93=81=E5=87=BA=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deto_code_page/deto_code_page.dart | 3 +- .../goods_deto_page/goods_deto_page.dart | 4 +- .../widget/goods_info_card.dart | 115 ++++++++++-------- .../widget/goods_info_card_button.dart | 16 ++- lib/utils/bee_map.dart | 10 ++ 5 files changed, 92 insertions(+), 56 deletions(-) diff --git a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart index 87cb3a67..bdd58129 100644 --- a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart +++ b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart @@ -12,7 +12,8 @@ import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/dotted_line.dart'; class DetoCodePage extends StatelessWidget { - const DetoCodePage({Key key}) : super(key: key); + final int id; + const DetoCodePage({Key key, this.id}) : super(key: key); Widget _header() { return Container( diff --git a/lib/pages/goods_deto_page/goods_deto_page.dart b/lib/pages/goods_deto_page/goods_deto_page.dart index 5b97888c..fee118b8 100644 --- a/lib/pages/goods_deto_page/goods_deto_page.dart +++ b/lib/pages/goods_deto_page/goods_deto_page.dart @@ -42,7 +42,9 @@ class _GoodsDetoPageState extends State { builder: (items) { return ListView.builder( itemBuilder: (context, index) { - return GoodsInfoCard(); + return GoodsInfoCard( + model: items[index], + ); }, itemCount: items.length, ); diff --git a/lib/pages/goods_deto_page/widget/goods_info_card.dart b/lib/pages/goods_deto_page/widget/goods_info_card.dart index 9f54b7c1..6c19d315 100644 --- a/lib/pages/goods_deto_page/widget/goods_info_card.dart +++ b/lib/pages/goods_deto_page/widget/goods_info_card.dart @@ -1,4 +1,7 @@ // Flutter imports: +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/model/manager/goods_out_model.dart'; +import 'package:akuCommunity/utils/bee_map.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -8,11 +11,46 @@ import 'goods_info_card_button.dart'; import 'image_horizontal_list.dart'; class GoodsInfoCard extends StatelessWidget { - final List listImage; - final String status; - final List> detoInfoList; - GoodsInfoCard({Key key,this.listImage,this.status,this.detoInfoList}) : super(key: key); + final GoodsOutModel model; + GoodsInfoCard({ + Key key, + this.model, + }) : super(key: key); + Widget _builTile(String title, String text) { + return Container( + padding: EdgeInsets.only(top: 8.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + title, + style: TextStyle(fontSize: 28.sp, color: Color(0xff999999)), + ), + Text( + text, + style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), + ), + ], + ), + ); + } + +Color _getColor(int state) { + switch (state) { + case 1: + case 2: + case 3: + return kDarkPrimaryColor; + case 4: + case 5: + case 6: + case 7: + return ktextSubColor; + default: + return kDangerColor; + } + } @override Widget build(BuildContext context) { return Container( @@ -41,18 +79,15 @@ class GoodsInfoCard extends StatelessWidget { blurRadius: 10.0), ], ), - padding: EdgeInsets.only( - top: 25.w, - left: 24.w, - right: 24.w), + padding: EdgeInsets.only(top: 25.w, left: 24.w, right: 24.w), child: Column( children: [ Container( padding: EdgeInsets.only(bottom: 24.w), decoration: BoxDecoration( border: Border( - bottom: BorderSide( - color: Color(0xffeeeeee), width: 0.5)), + bottom: + BorderSide(color: Color(0xffeeeeee), width: 0.5)), ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -64,13 +99,11 @@ class GoodsInfoCard extends StatelessWidget { fontSize: 32.sp, color: Color(0xff333333)), ), - Text( - status, - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 28.sp, - color: Color(0xff333333)) - ), + Text(BeeMap().fixState[model.status], + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 28.sp, + color: _getColor(model.status))), ], ), ), @@ -81,35 +114,16 @@ class GoodsInfoCard extends StatelessWidget { ), decoration: BoxDecoration( border: Border( - bottom: BorderSide( - color: Color(0xffeeeeee), width: 0.5)), - ), - child: Column( - children: detoInfoList - .map( - (item) => Container( - padding: EdgeInsets.only(top: 8.w), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - item['title'], - style: TextStyle( - fontSize: 28.sp, - color: Color(0xff999999)), - ), - Text( - item['content'], - style: TextStyle( - fontSize: 28.sp, - color: Color(0xff333333)), - ), - ], - ), - ), - ) - .toList(), + bottom: + BorderSide(color: Color(0xffeeeeee), width: 0.5)), ), + child: Column(children: [ + _builTile('物品重量', BeeMap().goodsOutweight[model.weight]), + _builTile('出户时间', model.expectedTime), + _builTile('物品名称', model.name), + _builTile( + '搬运方式', BeeMap().goodsOutApproach[model.approach]), + ]), ), Container( margin: EdgeInsets.only( @@ -120,22 +134,25 @@ class GoodsInfoCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( + alignment: Alignment.centerLeft, margin: EdgeInsets.only(bottom: 25.w), child: Text( '图片信息', style: TextStyle( - fontSize: 28.sp, - color: Color(0xff333333)), + fontSize: 28.sp, color: Color(0xff333333)), ), ), - ImageHorizontalList(imageUrl: listImage), + ImageHorizontalList(imageUrl: []), ], ), ), ], ), ), - GoodsInfoCardButton() + GoodsInfoCardButton( + id:model.id, + tel: model.movingCompanyTel, + ) ], ), ); diff --git a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart index 8a2ba73e..c07c23da 100644 --- a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart +++ b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart @@ -13,7 +13,9 @@ import 'package:akuCommunity/pages/goods_deto_page/deto_code_page/deto_code_page import 'package:akuCommunity/utils/headers.dart'; class GoodsInfoCardButton extends StatelessWidget { - GoodsInfoCardButton({Key key}) : super(key: key); + final String tel; + final int id; + GoodsInfoCardButton({Key key, this.tel, this.id}) : super(key: key); final List> _listButton = [ {'title': '查看二维码', 'icon': MaterialCommunityIcons.qrcode}, @@ -92,10 +94,15 @@ class GoodsInfoCardButton extends StatelessWidget { onTap: () { switch (_listButton[index]['title']) { case '查看二维码': - DetoCodePage().to; + DetoCodePage( + id: id, + ).to(); break; case '搬家公司': - _showDialog(context, '0574-88467897'); + if (tel.isEmptyOrNull) { + return null; + } else + _showDialog(context, tel); break; default: } @@ -122,8 +129,7 @@ class GoodsInfoCardButton extends StatelessWidget { color: Color(0xff333333), ), Container( - margin: - EdgeInsets.only(left: 14.w), + margin: EdgeInsets.only(left: 14.w), child: Text( _listButton[index]['title'], style: TextStyle( diff --git a/lib/utils/bee_map.dart b/lib/utils/bee_map.dart index b933179d..25c21f30 100644 --- a/lib/utils/bee_map.dart +++ b/lib/utils/bee_map.dart @@ -26,4 +26,14 @@ class BeeMap { 8: '作废', 9: '取消' }; + + Map goodsOutweight = { + 1: '< 50kg', + 2: '50kg-100kg', + 3: '> 100kg', + }; + Map goodsOutApproach={ + 1:'自己搬运', + 2:'搬家公司', + }; } From 7920bc36fce61b4b11d47ec87684bb191cac1fbc Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Fri, 29 Jan 2021 13:32:20 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=9A=E7=89=A9=E5=93=81=E5=87=BA=E6=88=B7=E4=BA=8C=E7=BB=B4?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/api.dart | 3 ++ lib/model/manager/article_QR_code_model.dart | 51 +++++++++++++++++++ .../deto_code_page/deto_code_page.dart | 47 ++++++++++------- .../widget/goods_info_card_button.dart | 18 +++++-- lib/pages/manager_func.dart | 14 ++++- .../visitor/visitor_passport_page.dart | 1 - 6 files changed, 109 insertions(+), 25 deletions(-) create mode 100644 lib/model/manager/article_QR_code_model.dart diff --git a/lib/constants/api.dart b/lib/constants/api.dart index c4b036ca..4c9e6e2e 100644 --- a/lib/constants/api.dart +++ b/lib/constants/api.dart @@ -124,6 +124,9 @@ class _Manager { ///物品出户:提交物品出户信息 String get articleOutSubmit => '/user/articleOut/submit'; + + ///物品出户:查询二维码信息 + String get getQRcode => '/user/articleOut/getQRCode'; } class _Community { diff --git a/lib/model/manager/article_QR_code_model.dart b/lib/model/manager/article_QR_code_model.dart new file mode 100644 index 00000000..33421476 --- /dev/null +++ b/lib/model/manager/article_QR_code_model.dart @@ -0,0 +1,51 @@ +class ArticleQRModel { + AppArticleOutQRCodeVo appArticleOutQRCodeVo; + String message; + bool status; + + ArticleQRModel({this.appArticleOutQRCodeVo, this.message, this.status}); + + ArticleQRModel.fromJson(Map json) { + appArticleOutQRCodeVo = json['appArticleOutQRCodeVo'] != null + ? new AppArticleOutQRCodeVo.fromJson(json['appArticleOutQRCodeVo']) + : null; + message = json['message']; + status = json['status']; + } + + Map toJson() { + final Map data = new Map(); + if (this.appArticleOutQRCodeVo != null) { + data['appArticleOutQRCodeVo'] = this.appArticleOutQRCodeVo.toJson(); + } + data['message'] = this.message; + data['status'] = this.status; + return data; + } +} + +class AppArticleOutQRCodeVo { + int id; + int residentId; + String residentName; + String effectiveTime; + + AppArticleOutQRCodeVo( + {this.id, this.residentId, this.residentName, this.effectiveTime}); + + AppArticleOutQRCodeVo.fromJson(Map json) { + id = json['id']; + residentId = json['residentId']; + residentName = json['residentName']; + effectiveTime = json['effectiveTime']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['residentId'] = this.residentId; + data['residentName'] = this.residentName; + data['effectiveTime'] = this.effectiveTime; + return data; + } +} diff --git a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart index bdd58129..2dc408c9 100644 --- a/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart +++ b/lib/pages/goods_deto_page/deto_code_page/deto_code_page.dart @@ -1,9 +1,14 @@ // Flutter imports: +import 'package:akuCommunity/base/base_style.dart'; +import 'package:akuCommunity/model/manager/article_QR_code_model.dart'; +import 'package:akuCommunity/provider/user_provider.dart'; +import 'package:akuCommunity/utils/bee_parse.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; // Package imports: import 'package:flutter_icons/flutter_icons.dart'; +import 'package:provider/provider.dart'; import 'package:qr_flutter/qr_flutter.dart'; // Project imports: @@ -13,21 +18,22 @@ import 'package:akuCommunity/widget/dotted_line.dart'; class DetoCodePage extends StatelessWidget { final int id; - const DetoCodePage({Key key, this.id}) : super(key: key); + final ArticleQRModel model; + const DetoCodePage({Key key, this.id, this.model}) : super(key: key); - Widget _header() { + Widget _header(String estateName) { return Container( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - '宁波华茂悦峰', + kEstateName, style: TextStyle(fontSize: 40.sp, color: Color(0xffffffff)), ), SizedBox(height: 10.w), Text( - '1幢-1单元-702室', + estateName, style: TextStyle(fontSize: 26.sp, color: Color(0xffffffff)), ), ], @@ -35,7 +41,7 @@ class DetoCodePage extends StatelessWidget { ); } - Widget _card() { + Widget _card(String name, String effectiveTime) { return Container( decoration: BoxDecoration( color: Color(0xffffffff), @@ -73,7 +79,7 @@ class DetoCodePage extends StatelessWidget { ), SizedBox(width: 10.w), Text( - '马成泽先生', + '$name先生', maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( @@ -87,7 +93,7 @@ class DetoCodePage extends StatelessWidget { ), SizedBox(height: 13.w), Text( - '有限时间:2020年6月30日', + '有效时间:$effectiveTime', style: TextStyle( fontSize: 26.sp, color: Color(0xff999999), @@ -104,18 +110,18 @@ class DetoCodePage extends StatelessWidget { alignment: Alignment.center, child: Column( children: [ - Text( - '020-598-230', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 36.sp, - color: Color(0xff333333), - ), - ), - SizedBox(height: 11.w), + // Text( + // '020-598-230', + // style: TextStyle( + // fontWeight: FontWeight.w600, + // fontSize: 36.sp, + // color: Color(0xff333333), + // ), + // ), + // SizedBox(height: 11.w), QrImage( padding: EdgeInsets.zero, - data: '智慧社区开门码', + data: model.appArticleOutQRCodeVo.id.toString(), size: 260.w, ), ], @@ -140,6 +146,7 @@ class DetoCodePage extends StatelessWidget { @override Widget build(BuildContext context) { + UserProvider userProvider = Provider.of(context); return BeeScaffold( title: '出户二维码', body: Container( @@ -149,9 +156,11 @@ class DetoCodePage extends StatelessWidget { Column( children: [ SizedBox(height: 192.w - kToolbarHeight), - _header(), + _header(BeeParse.getEstateName( + userProvider.userDetailModel.estateNames[0])), SizedBox(height: 32.w), - _card(), + _card(model.appArticleOutQRCodeVo.residentName, + model.appArticleOutQRCodeVo.effectiveTime), ], ), ], diff --git a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart index c07c23da..f7ea5812 100644 --- a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart +++ b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart @@ -1,4 +1,8 @@ // Flutter imports: +import 'package:akuCommunity/model/manager/article_QR_code_model.dart'; +import 'package:akuCommunity/pages/manager_func.dart'; +import 'package:akuCommunity/utils/network/base_model.dart'; +import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -91,12 +95,18 @@ class GoodsInfoCardButton extends StatelessWidget { .keys .map((index) => Expanded( child: InkWell( - onTap: () { + onTap: () async { switch (_listButton[index]['title']) { case '查看二维码': - DetoCodePage( - id: id, - ).to(); + ArticleQRModel _model = await ManagerFunc.getQRcode(id); + if (_model.status) { + DetoCodePage( + id: id, + model: _model + ).to(); + } else { + BotToast.showText(text: _model.message); + } break; case '搬家公司': if (tel.isEmptyOrNull) { diff --git a/lib/pages/manager_func.dart b/lib/pages/manager_func.dart index a67718e0..6c42d929 100644 --- a/lib/pages/manager_func.dart +++ b/lib/pages/manager_func.dart @@ -1,4 +1,5 @@ // Package imports: +import 'package:akuCommunity/model/manager/article_QR_code_model.dart'; import 'package:akuCommunity/model/manager/moving_company_model.dart'; import 'package:dio/dio.dart'; import 'package:flustars/flustars.dart'; @@ -119,11 +120,22 @@ class ManagerFunc { 'weight': weight, 'approach': approach, 'movingCompanyTel': tel, - 'expectedTime': DateUtil.formatDateStr(time,format: "yyyy-MM-dd HH:mm:ss"), + 'expectedTime': + DateUtil.formatDateStr(time, format: "yyyy-MM-dd HH:mm:ss"), 'imgUrls': urls, }, showMessage: true, ); return baseModel; } + + static Future getQRcode(int id) async { + Response response = await NetUtil().dio.get( + API.manager.getQRcode, + queryParameters: { + 'articleOutId': id, + }, + ); + return ArticleQRModel.fromJson(response.data); + } } diff --git a/lib/ui/manager/visitor/visitor_passport_page.dart b/lib/ui/manager/visitor/visitor_passport_page.dart index ea524c4f..c0d440a0 100644 --- a/lib/ui/manager/visitor/visitor_passport_page.dart +++ b/lib/ui/manager/visitor/visitor_passport_page.dart @@ -130,7 +130,6 @@ class _VisitorPassportPageState extends State { .make(), ], ), - //TODO 二维码显示 ).centered(), ], ).box.color(Color(0xFF333333)).make(), From 0b78e30878cb6754253f58828424b170ce118368 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Fri, 29 Jan 2021 16:00:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?add=20=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/api.dart | 3 + .../goods_deto_page/goods_deto_page.dart | 92 ++++++++++++++++--- .../widget/goods_info_card.dart | 2 +- .../widget/goods_info_card_button.dart | 1 + lib/pages/manager_func.dart | 9 ++ lib/pages/things_page/fixed_submit_page.dart | 2 +- .../things_page/widget/fixed_check_box.dart | 6 +- lib/widget/buttons/bottom_button.dart | 12 +-- 8 files changed, 104 insertions(+), 23 deletions(-) diff --git a/lib/constants/api.dart b/lib/constants/api.dart index 4c9e6e2e..86d9534b 100644 --- a/lib/constants/api.dart +++ b/lib/constants/api.dart @@ -127,6 +127,9 @@ class _Manager { ///物品出户:查询二维码信息 String get getQRcode => '/user/articleOut/getQRCode'; + + ///物品出户:app批量删除物品出户信息 + String get articleOutDelete => '/user/articleOut/falseDelete'; } class _Community { diff --git a/lib/pages/goods_deto_page/goods_deto_page.dart b/lib/pages/goods_deto_page/goods_deto_page.dart index fee118b8..f3cd34bc 100644 --- a/lib/pages/goods_deto_page/goods_deto_page.dart +++ b/lib/pages/goods_deto_page/goods_deto_page.dart @@ -1,4 +1,7 @@ // Flutter imports: +import 'package:akuCommunity/pages/manager_func.dart'; +import 'package:akuCommunity/widget/buttons/bottom_button.dart'; +import 'package:akuCommunity/widget/buttons/radio_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -25,10 +28,51 @@ class GoodsDetoPage extends StatefulWidget { class _GoodsDetoPageState extends State { EasyRefreshController _refreshController = EasyRefreshController(); + List _select = []; + bool _isEdit = false; + bool _canSkew(int state) { + switch (state) { + case 1: + case 2: + case 3: + return false; + case 4: + case 5: + case 6: + case 7: + return true; + default: + return true; + } + } + + Widget _buildPositioned(GoodsOutModel model) { + return AnimatedPositioned( + bottom: 0, + top: 0, + left: (_canSkew(4) && _isEdit) ? 80.w : 0.w, + duration: Duration(milliseconds: 300), + width: 750.w, + child: GoodsInfoCard( + model: model, + ), + ); + } + @override Widget build(BuildContext context) { return BeeScaffold( title: '物品出户', + actions: [ + IconButton( + icon: _isEdit + ? '完成'.text.black.size(28.sp).make() + : '编辑'.text.black.size(28.sp).make(), + onPressed: () { + _isEdit = !_isEdit; + setState(() {}); + }) + ], body: Padding( padding: EdgeInsets.only(bottom: 98.w), child: BeeListView( @@ -42,23 +86,49 @@ class _GoodsDetoPageState extends State { builder: (items) { return ListView.builder( itemBuilder: (context, index) { - return GoodsInfoCard( - model: items[index], - ); + return Stack(children: [ + GestureDetector( + onTap: () { + if (_select.contains(items[index].id)) { + _select.remove(items[index].id); + } else + _select.add(items[index].id); + setState(() {}); + }, + child: Container( + padding: EdgeInsets.symmetric( + vertical: 50.w, horizontal: 32.w), + alignment: Alignment.topLeft, + constraints: BoxConstraints( + minHeight: 631.w + 96.w, minWidth: 686.w), + child: BeeRadio( + value: items[index].id, groupValues: _select), + ), + ), + _buildPositioned(items[index]), + ]); }, itemCount: items.length, ); }, ), ), - bottomNavi: MaterialButton( - color: kPrimaryColor, - - padding: EdgeInsets.only(top:26.w ,bottom: MediaQuery.of(context).padding.bottom+26.w), - child: '新增'.text.black.size(32.sp).bold.make(), - onPressed: () { - DetoCreatePage().to(); - },), + bottomNavi: BottomButton( + onPressed: _isEdit + ? _select.isEmpty + ? null + : () async { + await ManagerFunc.articleOutDelete(_select); + _select.clear(); + _refreshController.callRefresh(); + } + : () { + DetoCreatePage().to(); + }, + child: _isEdit + ? '删除'.text.size(32.sp).bold.make() + : '新增'.text.size(32.sp).bold.make(), + ), ); } } diff --git a/lib/pages/goods_deto_page/widget/goods_info_card.dart b/lib/pages/goods_deto_page/widget/goods_info_card.dart index 6c19d315..f7988b0a 100644 --- a/lib/pages/goods_deto_page/widget/goods_info_card.dart +++ b/lib/pages/goods_deto_page/widget/goods_info_card.dart @@ -19,7 +19,7 @@ class GoodsInfoCard extends StatelessWidget { Widget _builTile(String title, String text) { return Container( - padding: EdgeInsets.only(top: 8.w), + // padding: EdgeInsets.only(top: 8.w), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart index f7ea5812..0336b508 100644 --- a/lib/pages/goods_deto_page/widget/goods_info_card_button.dart +++ b/lib/pages/goods_deto_page/widget/goods_info_card_button.dart @@ -81,6 +81,7 @@ class GoodsInfoCardButton extends StatelessWidget { @override Widget build(BuildContext context) { return Container( + alignment: Alignment.center, decoration: BoxDecoration( color: Colors.white.withOpacity(0.6), borderRadius: BorderRadius.only( diff --git a/lib/pages/manager_func.dart b/lib/pages/manager_func.dart index 6c42d929..9c418fe9 100644 --- a/lib/pages/manager_func.dart +++ b/lib/pages/manager_func.dart @@ -138,4 +138,13 @@ class ManagerFunc { ); return ArticleQRModel.fromJson(response.data); } + + static Future articleOutDelete(List ids) async { + BaseModel baseModel = await NetUtil().post( + API.manager.articleOutDelete, + params: {'ids': ids}, + showMessage: true, + ); + return baseModel; + } } diff --git a/lib/pages/things_page/fixed_submit_page.dart b/lib/pages/things_page/fixed_submit_page.dart index fbfbe816..064a5fa0 100644 --- a/lib/pages/things_page/fixed_submit_page.dart +++ b/lib/pages/things_page/fixed_submit_page.dart @@ -84,7 +84,7 @@ class _FixedSubmitPageState extends State { Widget _buildCard(FixedSubmitModel model) { return AnimatedPositioned( top: 0, - left: (_canSkew(4) && _isEdit) ? 55.w : 0, + left: (_canSkew(model.status) && _isEdit) ? 55.w : 0, bottom: 0, duration: Duration(milliseconds: 300), curve: Curves.easeInOutCubic, diff --git a/lib/pages/things_page/widget/fixed_check_box.dart b/lib/pages/things_page/widget/fixed_check_box.dart index dd9d875a..3972a270 100644 --- a/lib/pages/things_page/widget/fixed_check_box.dart +++ b/lib/pages/things_page/widget/fixed_check_box.dart @@ -26,7 +26,8 @@ class _FixedCheckBoxState extends State { }); widget.onChanged(_isSelected); }, - child: Container( + child: AnimatedContainer( + duration: Duration(milliseconds: 300), alignment: Alignment.center, width: 40.w, height: 40.w, @@ -36,7 +37,8 @@ class _FixedCheckBoxState extends State { width: 3.w, color: _isSelected ? kPrimaryColor : kDarkSubColor), color: Colors.transparent, ), - child: Container( + child: AnimatedContainer( + duration: Duration(milliseconds: 300), width: 24.w, height: 24.w, decoration: BoxDecoration( diff --git a/lib/widget/buttons/bottom_button.dart b/lib/widget/buttons/bottom_button.dart index 8f8cf1a3..a7940ad2 100644 --- a/lib/widget/buttons/bottom_button.dart +++ b/lib/widget/buttons/bottom_button.dart @@ -24,14 +24,10 @@ class BottomButton extends StatelessWidget { padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom), child: MaterialButton( materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - child: DefaultTextStyle( - child: child, - style: TextStyle( - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 32.sp, - ), - ), + disabledColor: Colors.white.withOpacity(0.5), + disabledTextColor: ktextSubColor.withOpacity(0.8), + textColor: ktextPrimary, + child: child, onPressed: onPressed, color: kPrimaryColor, height: 98.w,