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. 178
      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){
return Container(
margin: EdgeInsets.only(bottom: 21.h),
margin: EdgeInsets.only(bottom: 21.h,left: 16.w),
child: Row(
children: [
MImage(

1
lib/business_system/mine/business_mine_page.dart

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

6
lib/business_system/mine/merchant_info.dart

@ -1,5 +1,6 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/retrofit/data/business_store_list.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
@ -46,6 +47,9 @@ class _MerchantInfo extends State<MerchantInfo> {
///
saveInfo() async {
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
if (businessService == null) {
businessService = BusinessApiService(Dio(),
context: context,
@ -68,9 +72,11 @@ class _MerchantInfo extends State<MerchantInfo> {
"isAutoSendRefundAddress": 1
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
EasyLoading.dismiss();
SmartDialog.showToast("店铺设置修改成功", alignment: Alignment.center);
Navigator.of(context).pop();
} else {
EasyLoading.dismiss();
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),
)
: Padding(
padding: EdgeInsets.symmetric(vertical: 16.w),
padding: EdgeInsets.only(top: 16.h),
child: ListView.builder(
itemCount: adminOrderDTOList?.length ?? 0,
physics: BouncingScrollPhysics(),

178
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_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:pull_to_refresh/pull_to_refresh.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 '../../utils/business_instance.dart';
import '../../view_widget/classic_header.dart';
import '../../view_widget/my_footer.dart';
@ -25,6 +30,9 @@ class _OrderWriteOff extends State<OrderWriteOff> {
List<Tickets> tickets;
String productName;
int nameIndex = 0;
BusinessApiService businessService;
List<dynamic> itemMap = [];
List<dynamic> skuTickets = [];
@override
void initState() {
@ -33,6 +41,66 @@ class _OrderWriteOff extends State<OrderWriteOff> {
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
Widget build(BuildContext context) {
return Scaffold(
@ -49,14 +117,16 @@ class _OrderWriteOff extends State<OrderWriteOff> {
enablePullDown: true,
enablePullUp: false,
header: MyHeader(
color: Colors.white,
color: Color(0xFF30415B),
),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {},
onRefresh: () {
refreshController.refreshCompleted();
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: SingleChildScrollView(
@ -67,10 +137,33 @@ class _OrderWriteOff extends State<OrderWriteOff> {
children: [
basicInfo(),
writeOffInfo(),
Container(
GestureDetector(
onTap:(){
if (itemMap.length != 0) itemMap.clear();
tickets.forEach((element) {
if (element.isSelect) {
skuTickets.add({
"number":1,
"skuTicket":element.name,
"state":element.state,});
itemMap.add({
"productSkuld":element.productSkuId,
"skuTickets":skuTickets
});
}
});
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,top: 125.h),
margin: EdgeInsets.only(bottom:55.h,),
padding: EdgeInsets.symmetric(vertical:16.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(27),
@ -84,6 +177,7 @@ class _OrderWriteOff extends State<OrderWriteOff> {
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,10 +374,10 @@ class _OrderWriteOff extends State<OrderWriteOff> {
SizedBox(height:25.h,),
if(tickets.state == 1)
Checkbox(
value: writeOffCheck,
value: tickets.isSelect,
onChanged: (a) {
setState(() {
writeOffCheck = !writeOffCheck;
tickets.isSelect = !tickets.isSelect;
});
},
shape: RoundedRectangleBorder(
@ -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(
@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;
}
@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;
List<Tickets> get tickets => _tickets;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
@ -683,6 +684,13 @@ Tickets copyWith({ String id,
bool get canSubscribe => _canSubscribe;
num get isDelete => _isDelete;
String get tenantCode => _tenantCode;
bool _isSelect = false;
bool get isSelect => _isSelect;
set isSelect(bool value) {
_isSelect = value;
}
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};

Loading…
Cancel
Save