Browse Source

核销更改,ios图片更改

wr_2023_business
wurong 1 year ago
parent
commit
f40b38c0d4
  1. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png
  2. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png
  3. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png
  4. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
  5. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
  6. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png
  7. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29.png
  8. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png
  9. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
  10. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
  11. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png
  12. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
  13. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
  14. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
  15. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
  16. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png
  17. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
  18. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
  19. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/引导页备份.png
  20. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/引导页备份@2x.png
  21. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/引导页备份@3x.png
  22. 2
      lib/business_system/goods/on_sale/batch_shelf.dart
  23. 1
      lib/business_system/mine/business_mine_page.dart
  24. 6
      lib/business_system/mine/merchant_info.dart
  25. 2
      lib/business_system/order/order_list.dart
  26. 206
      lib/business_system/order/order_write_off.dart
  27. 6
      lib/retrofit/business_api.dart
  28. 22
      lib/retrofit/business_api.g.dart
  29. 8
      lib/retrofit/data/business_order_list.dart

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 271 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 962 B

After

Width:  |  Height:  |  Size: 983 B

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 17 KiB

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/引导页备份.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/引导页备份@2x.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 59 KiB

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/引导页备份@3x.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 59 KiB

2
lib/business_system/goods/on_sale/batch_shelf.dart

@ -349,7 +349,7 @@ class _BatchShelf extends State<BatchShelf> {
Widget shelfGoodsItem(AdminProductVoList adminProductVoList){ Widget shelfGoodsItem(AdminProductVoList adminProductVoList){
return Container( return Container(
margin: EdgeInsets.only(bottom: 21.h), margin: EdgeInsets.only(bottom: 21.h,left: 16.w),
child: Row( child: Row(
children: [ children: [
MImage( MImage(

1
lib/business_system/mine/business_mine_page.dart

@ -38,6 +38,7 @@ class _BusinessMinePage extends State<BusinessMinePage>
List<Records> records = []; List<Records> records = [];
double visiblePercentage; double visiblePercentage;
@override @override
void initState() { void initState() {
super.initState(); super.initState();

6
lib/business_system/mine/merchant_info.dart

@ -1,5 +1,6 @@
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/retrofit/data/business_store_list.dart'; import 'package:huixiang/retrofit/data/business_store_list.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
@ -46,6 +47,9 @@ class _MerchantInfo extends State<MerchantInfo> {
/// ///
saveInfo() async { saveInfo() async {
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
if (businessService == null) { if (businessService == null) {
businessService = BusinessApiService(Dio(), businessService = BusinessApiService(Dio(),
context: context, context: context,
@ -68,9 +72,11 @@ class _MerchantInfo extends State<MerchantInfo> {
"isAutoSendRefundAddress": 1 "isAutoSendRefundAddress": 1
}).catchError((error) {}); }).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
EasyLoading.dismiss();
SmartDialog.showToast("店铺设置修改成功", alignment: Alignment.center); SmartDialog.showToast("店铺设置修改成功", alignment: Alignment.center);
Navigator.of(context).pop(); Navigator.of(context).pop();
} else { } else {
EasyLoading.dismiss();
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }

2
lib/business_system/order/order_list.dart

@ -160,7 +160,7 @@ class _OrderList extends State<OrderList> {
margin: EdgeInsets.all(50.h), margin: EdgeInsets.all(50.h),
) )
: Padding( : Padding(
padding: EdgeInsets.symmetric(vertical: 16.w), padding: EdgeInsets.only(top: 16.h),
child: ListView.builder( child: ListView.builder(
itemCount: adminOrderDTOList?.length ?? 0, itemCount: adminOrderDTOList?.length ?? 0,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),

206
lib/business_system/order/order_write_off.dart

@ -1,10 +1,15 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../retrofit/business_api.dart';
import '../../retrofit/data/base_data.dart';
import '../../retrofit/data/business_order_list.dart'; import '../../retrofit/data/business_order_list.dart';
import '../../utils/business_instance.dart';
import '../../view_widget/classic_header.dart'; import '../../view_widget/classic_header.dart';
import '../../view_widget/my_footer.dart'; import '../../view_widget/my_footer.dart';
@ -25,6 +30,9 @@ class _OrderWriteOff extends State<OrderWriteOff> {
List<Tickets> tickets; List<Tickets> tickets;
String productName; String productName;
int nameIndex = 0; int nameIndex = 0;
BusinessApiService businessService;
List<dynamic> itemMap = [];
List<dynamic> skuTickets = [];
@override @override
void initState() { void initState() {
@ -33,6 +41,66 @@ class _OrderWriteOff extends State<OrderWriteOff> {
productName = widget.arguments["productName"]; productName = widget.arguments["productName"];
} }
///
singleWiped() async {
if (businessService == null) {
businessService = BusinessApiService(Dio(),
context: context,
token: BusinessInstance.instance.businessToken,
tenant: BusinessInstance.instance.businessTenant,
storeId: widget.arguments["storeId"]);
}
BaseData baseData = await businessService.wiped({
"pageNum":1,
"pageSize":10,
"productId":"",
"productSkuId":"",
"searchKey":"",
"state":"",
"storeId":"",
"ticketCode":"",
"ticketId":"",
"ticketItemIds":[],
"type":""
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("核销成功", alignment: Alignment.center);
Navigator.pop(context);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
///
severalWiped() async {
if (businessService == null) {
businessService = BusinessApiService(Dio(),
context: context,
token: BusinessInstance.instance.businessToken,
tenant: BusinessInstance.instance.businessTenant,
storeId: widget.arguments["storeId"]);
}
BaseData baseData = await businessService.posTicketRecharge({
"itemMap":[{
"productSkuld":tickets[nameIndex].productSkuId ?? "",
"skuTickets":[{
"number":1,
"skuTicket":tickets[nameIndex].name ?? "",
"state":tickets[nameIndex].state ?? "",
}]
}],
"ticketCode":tickets[nameIndex].code ?? "",
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("核销成功", alignment: Alignment.center);
Navigator.pop(context);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -49,14 +117,16 @@ class _OrderWriteOff extends State<OrderWriteOff> {
enablePullDown: true, enablePullDown: true,
enablePullUp: false, enablePullUp: false,
header: MyHeader( header: MyHeader(
color: Colors.white, color: Color(0xFF30415B),
), ),
footer: CustomFooter( footer: CustomFooter(
builder: (context, mode) { builder: (context, mode) {
return MyFooter(mode); return MyFooter(mode);
}, },
), ),
onRefresh: () {}, onRefresh: () {
refreshController.refreshCompleted();
},
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
scrollController: ScrollController(), scrollController: ScrollController(),
child: SingleChildScrollView( child: SingleChildScrollView(
@ -67,21 +137,45 @@ class _OrderWriteOff extends State<OrderWriteOff> {
children: [ children: [
basicInfo(), basicInfo(),
writeOffInfo(), writeOffInfo(),
Container( GestureDetector(
width: double.infinity, onTap:(){
alignment: Alignment.center, if (itemMap.length != 0) itemMap.clear();
margin: EdgeInsets.only(bottom:55.h,top: 125.h), tickets.forEach((element) {
padding: EdgeInsets.symmetric(vertical:16.h), if (element.isSelect) {
decoration: BoxDecoration( skuTickets.add({
borderRadius: BorderRadius.circular(27), "number":1,
color: Color(0xFF30415B) "skuTicket":element.name,
), "state":element.state,});
child: Text( itemMap.add({
"确认核销", "productSkuld":element.productSkuId,
style: TextStyle( "skuTickets":skuTickets
fontWeight: MyFontWeight.semi_bold, });
fontSize: 16.sp, }
color: Colors.white, });
if (itemMap.length == 0) {
SmartDialog.showToast("请选择要核销的商品",
alignment: Alignment.center);
return;
} else {
severalWiped();
}
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
margin: EdgeInsets.only(bottom:55.h,),
padding: EdgeInsets.symmetric(vertical:16.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(27),
color: Color(0xFF30415B)
),
child: Text(
"确认核销",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 16.sp,
color: Colors.white,
),
), ),
), ),
) )
@ -229,6 +323,20 @@ class _OrderWriteOff extends State<OrderWriteOff> {
); );
}, },
) )
// ListView.builder(
// padding: EdgeInsets.zero,
// itemCount:3,
// scrollDirection: Axis.vertical,
// shrinkWrap: true,
// physics: BouncingScrollPhysics(),
// itemBuilder: (context, position) {
// return GestureDetector(
// onTap: () {
// },
// child: writeOffInfoItems(),
// );
// },
// )
], ],
), ),
); );
@ -266,11 +374,11 @@ class _OrderWriteOff extends State<OrderWriteOff> {
SizedBox(height:25.h,), SizedBox(height:25.h,),
if(tickets.state == 1) if(tickets.state == 1)
Checkbox( Checkbox(
value: writeOffCheck, value: tickets.isSelect,
onChanged: (a) { onChanged: (a) {
setState(() { setState(() {
writeOffCheck = !writeOffCheck; tickets.isSelect = !tickets.isSelect;
}); });
}, },
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(2.0), borderRadius: BorderRadius.circular(2.0),
@ -313,4 +421,62 @@ class _OrderWriteOff extends State<OrderWriteOff> {
), ),
); );
} }
Widget writeOffInfoItems(){
return Container(
width: double.infinity,
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(child: Text(
"哈哈哈哈哈",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
),
)),
Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Padding(padding: EdgeInsets.only(right:10.w),
child: Text(
"已核销",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 12.sp,
color: Color(0xFF30415B),
),
),),
SizedBox(height:25.h,),
Checkbox(
value: writeOffCheck,
onChanged: (a) {
setState(() {
writeOffCheck = !writeOffCheck;
});
},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(2.0),
),
checkColor: Color(0xFFFFFFFF),
fillColor:MaterialStateProperty.all(Color(0xFF30415B)),
),
],
))
],
),
Container(
margin: EdgeInsets.only(bottom:11.h,top: 13.h),
width: double.infinity,
height: 1.h,
color: Color(0xFFEBECEF),
)
],
),
);
}
} }

6
lib/retrofit/business_api.dart

@ -257,4 +257,10 @@ abstract class BusinessApiService {
Future<BaseData> wipedBatch( Future<BaseData> wipedBatch(
@Body() Map<String, dynamic> param); @Body() Map<String, dynamic> param);
///pos端核销接口
@POST("member/posTicketRecharge")
Future<BaseData> posTicketRecharge(
@Body() Map<String, dynamic> param);
} }

22
lib/retrofit/business_api.g.dart

@ -596,4 +596,26 @@ class _BusinessApiService implements BusinessApiService {
); );
return value; return value;
} }
@override
Future<BaseData> posTicketRecharge(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('member/posTicketRecharge',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(
_result.data,
(json) => json == null ? null : json,
);
return value;
}
} }

8
lib/retrofit/data/business_order_list.dart

@ -410,6 +410,7 @@ AdminOrderDtoList copyWith({ String id,
bool get ticketStatus => _ticketStatus; bool get ticketStatus => _ticketStatus;
List<Tickets> get tickets => _tickets; List<Tickets> get tickets => _tickets;
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final map = <String, dynamic>{}; final map = <String, dynamic>{};
map['id'] = _id; map['id'] = _id;
@ -683,6 +684,13 @@ Tickets copyWith({ String id,
bool get canSubscribe => _canSubscribe; bool get canSubscribe => _canSubscribe;
num get isDelete => _isDelete; num get isDelete => _isDelete;
String get tenantCode => _tenantCode; String get tenantCode => _tenantCode;
bool _isSelect = false;
bool get isSelect => _isSelect;
set isSelect(bool value) {
_isSelect = value;
}
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final map = <String, dynamic>{}; final map = <String, dynamic>{};

Loading…
Cancel
Save