Browse Source
优化接口json=null或者""的情况下不显示报错文本问题; 首页优化下来刷新loading显示问题; 更改首页侧面弹窗门店选择首页数据不一致问题; 解决首页扫一扫功能问题; 更改首页生意总览部分统计图问题; 更改底部导航栏布局,扫一扫部分流程更改为点击跳转至扫码页面; 删除底部扫一扫页面; app下单页面优惠券ui优化调整; 流水页面ui更改; 商品搜索板块上下架bug更改; 新增扫一扫页面; 统计图-提示框位置更改;统计图日期列表显示适配更改;统计图提示框数量变量更改; 在售中商品下架更改; 核销页面-接口流程更改;数据更改;(适配扫码页面数据及订单列表数据) app优惠券页面,没有设置可用门店时新增提示,确定按钮适配更改,点击立即使用火锅店无需先扫码再跳转至店铺; app下单页面,微信支付失败ui处理; 生意总览-总览,订单板块日期选择数据更改;ui流程优化适配; 我的订单-审核申请退款,退出刷新数据优化了; 门店列表城市搜索提示更改;wr_2023_business
wurong
1 year ago
30 changed files with 1431 additions and 672 deletions
@ -1,137 +0,0 @@
|
||||
import 'dart:ui'; |
||||
|
||||
import 'package:flutter/cupertino.dart'; |
||||
import 'package:flutter/material.dart'; |
||||
import 'package:image_pickers/image_pickers.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
import 'package:scan/scan.dart'; |
||||
import '../generated/l10n.dart'; |
||||
|
||||
class BusinessScanCode extends StatefulWidget { |
||||
|
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _BusinessScanCode(); |
||||
} |
||||
} |
||||
|
||||
class _BusinessScanCode extends State<BusinessScanCode> |
||||
with AutomaticKeepAliveClientMixin { |
||||
ScanController controller = ScanController(); |
||||
final screenWidth = window.physicalSize.width; |
||||
final screenHeight = window.physicalSize.height; |
||||
|
||||
@override |
||||
void initState() { |
||||
super.initState(); |
||||
} |
||||
|
||||
|
||||
@override |
||||
void dispose() { |
||||
if (this.controller != null) { |
||||
this.controller.pause(); |
||||
} |
||||
super.dispose(); |
||||
} |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
super.build(context); |
||||
return Scaffold( |
||||
body: Container( |
||||
child: Stack( |
||||
children: [ |
||||
Positioned( |
||||
child: Column( |
||||
children: [ |
||||
Expanded( |
||||
child: ScanView( |
||||
controller: controller, |
||||
scanAreaScale: 0.7, |
||||
scanLineColor: Colors.green.shade400, |
||||
onCapture: (data) { |
||||
if (data != null && data != "") { |
||||
// Navigator.of(context).pop(data); |
||||
} |
||||
}, |
||||
), |
||||
flex: 1, |
||||
), |
||||
], |
||||
), |
||||
top: 0, |
||||
bottom: 0, |
||||
left: 0, |
||||
right: 0, |
||||
), |
||||
Positioned( |
||||
child: Container( |
||||
margin: EdgeInsets.only(left:12.w,right: 16.w,top: 16.h), |
||||
child:Row( |
||||
mainAxisAlignment: MainAxisAlignment.end, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
// Expanded(child:Text( |
||||
// S.of(context).saoma, |
||||
// style: TextStyle( |
||||
// color: Colors.white, |
||||
// fontSize: 18.sp, |
||||
// fontWeight: FontWeight.bold, |
||||
// ), |
||||
// )), |
||||
GestureDetector( |
||||
behavior: HitTestBehavior.opaque, |
||||
onTap: () { |
||||
pickImage(); |
||||
}, |
||||
child:Container( |
||||
padding: EdgeInsets.symmetric(horizontal:10.w), |
||||
child: Text( |
||||
S.of(context).xiangce, |
||||
style: TextStyle( |
||||
color: Colors.white, |
||||
fontSize: 18.sp, |
||||
fontWeight: FontWeight.bold, |
||||
), |
||||
), |
||||
), |
||||
), |
||||
], |
||||
), |
||||
), |
||||
top:MediaQuery.of(context).padding.top, |
||||
left: 0, |
||||
right: 0, |
||||
), |
||||
], |
||||
), |
||||
), |
||||
); |
||||
} |
||||
|
||||
pickImage() async { |
||||
List<Media> medias = await ImagePickers.pickerPaths( |
||||
galleryMode: GalleryMode.image, |
||||
selectCount: 1, |
||||
showGif: true, |
||||
showCamera: false, |
||||
compressSize: 500, |
||||
uiConfig: UIConfig( |
||||
uiThemeColor: Color(0xFFFFFFFF), |
||||
), |
||||
cropConfig: CropConfig( |
||||
enableCrop: false, |
||||
), |
||||
); |
||||
if (medias != null && medias.length > 0) { |
||||
String result = await Scan.parse(medias[0].path); |
||||
if (result != null && result != "") { |
||||
// Navigator.of(context).pop(result); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@override |
||||
bool get wantKeepAlive => true; |
||||
} |
@ -0,0 +1,208 @@
|
||||
import 'dart:ui'; |
||||
import 'package:dio/dio.dart'; |
||||
import 'package:flutter/material.dart'; |
||||
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
||||
import 'package:image_pickers/image_pickers.dart'; |
||||
import 'package:scan/scan.dart'; |
||||
import '../../retrofit/business_api.dart'; |
||||
import '../../retrofit/data/base_data.dart'; |
||||
import '../../retrofit/data/ticket_details.dart'; |
||||
import '../../utils/business_instance.dart'; |
||||
import '../view_widget/settlement_tips_dialog.dart'; |
||||
|
||||
class ScanCodePage extends StatefulWidget { |
||||
final Map<String, dynamic> arguments; |
||||
|
||||
ScanCodePage({this.arguments}); |
||||
|
||||
@override |
||||
State<StatefulWidget> createState() { |
||||
return _ScanCodePage(); |
||||
} |
||||
} |
||||
|
||||
class _ScanCodePage extends State<ScanCodePage> { |
||||
ScanController controller = ScanController(); |
||||
final screenWidth = window.physicalSize.width; |
||||
final screenHeight = window.physicalSize.height; |
||||
BusinessApiService businessService; |
||||
TicketDetails ticketDetails; |
||||
|
||||
@override |
||||
void initState() { |
||||
super.initState(); |
||||
} |
||||
|
||||
@override |
||||
void dispose() { |
||||
if (this.controller != null) { |
||||
this.controller.pause(); |
||||
} |
||||
super.dispose(); |
||||
} |
||||
|
||||
///票券详情 |
||||
queryTicketDetails(code) async { |
||||
if (businessService == null) { |
||||
businessService = BusinessApiService(Dio(), |
||||
context: context, |
||||
token: BusinessInstance.instance.businessToken, |
||||
tenant: BusinessInstance.instance.businessTenant, |
||||
storeId: widget.arguments["storeId"]); |
||||
} |
||||
BaseData<TicketDetails> baseData = |
||||
await businessService.ticketCode(code).catchError((error) {}); |
||||
if (baseData != null && baseData.isSuccess) { |
||||
ticketDetails = baseData.data; |
||||
Navigator.of(context) |
||||
.popAndPushNamed('/router/order_write_off', arguments: { |
||||
"ticketDetails": ticketDetails, |
||||
}); |
||||
} else { |
||||
Navigator.of(context).pop(); |
||||
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
||||
} |
||||
} |
||||
|
||||
@override |
||||
Widget build(BuildContext context) { |
||||
return Scaffold( |
||||
body: Stack( |
||||
children: [ |
||||
Positioned( |
||||
child: Column( |
||||
children: [ |
||||
Expanded( |
||||
child: ScanView( |
||||
controller: controller, |
||||
scanAreaScale: 0.7, |
||||
scanLineColor: Colors.green.shade400, |
||||
onCapture: (data) { |
||||
if (data != null && data != "") { |
||||
queryTicketDetails(data); |
||||
} |
||||
}, |
||||
), |
||||
flex: 1, |
||||
), |
||||
], |
||||
), |
||||
top: 0, |
||||
bottom: 0, |
||||
left: 0, |
||||
right: 0, |
||||
), |
||||
Positioned( |
||||
child: Container( |
||||
margin: EdgeInsets.only(left: 12.w, right: 16.w, top: 16.h), |
||||
child: Row( |
||||
mainAxisAlignment: MainAxisAlignment.end, |
||||
crossAxisAlignment: CrossAxisAlignment.center, |
||||
children: [ |
||||
GestureDetector( |
||||
behavior: HitTestBehavior.opaque, |
||||
onTap: () { |
||||
Navigator.of(context).pop(); |
||||
}, |
||||
child: Container( |
||||
padding: EdgeInsets.symmetric(horizontal: 10.w), |
||||
alignment: Alignment.centerLeft, |
||||
child: Image.asset( |
||||
"assets/image/return_left.webp", |
||||
fit: BoxFit.fill, |
||||
color: Colors.white, |
||||
), |
||||
), |
||||
), |
||||
Spacer(), |
||||
// Expanded(child:Text( |
||||
// S.of(context).saoma, |
||||
// style: TextStyle( |
||||
// color: Colors.white, |
||||
// fontSize: 18.sp, |
||||
// fontWeight: FontWeight.bold, |
||||
// ), |
||||
// )), |
||||
// GestureDetector( |
||||
// behavior: HitTestBehavior.opaque, |
||||
// onTap: () { |
||||
// pickImage(); |
||||
// }, |
||||
// child:Container( |
||||
// padding: EdgeInsets.symmetric(horizontal:10.w), |
||||
// child: Text( |
||||
// S.of(context).xiangce, |
||||
// style: TextStyle( |
||||
// color: Colors.white, |
||||
// fontSize: 18.sp, |
||||
// fontWeight: FontWeight.bold, |
||||
// ), |
||||
// ), |
||||
// ), |
||||
// ), |
||||
], |
||||
), |
||||
), |
||||
top: MediaQuery.of(context).padding.top, |
||||
left: 0, |
||||
right: 0, |
||||
), |
||||
Positioned( |
||||
child: GestureDetector( |
||||
behavior: HitTestBehavior.opaque, |
||||
onTap: () { |
||||
pickImage(); |
||||
}, |
||||
child: Container( |
||||
decoration: BoxDecoration( |
||||
color: Colors.white.withAlpha(35), |
||||
borderRadius: BorderRadius.circular(100), |
||||
), |
||||
padding: EdgeInsets.all(8.w), |
||||
margin: EdgeInsets.only(left: 12.w, right: 16.w, top: 16.h), |
||||
child:Icon( |
||||
Icons.image, |
||||
size: 25.w, |
||||
color: Colors.white, |
||||
), |
||||
), |
||||
), |
||||
right: 0, |
||||
bottom: 50.h, |
||||
), |
||||
], |
||||
), |
||||
); |
||||
} |
||||
|
||||
pickImage() async { |
||||
List<Media> medias = await ImagePickers.pickerPaths( |
||||
galleryMode: GalleryMode.image, |
||||
selectCount: 1, |
||||
showGif: true, |
||||
showCamera: false, |
||||
compressSize: 500, |
||||
uiConfig: UIConfig( |
||||
uiThemeColor: Color(0xFFFFFFFF), |
||||
), |
||||
cropConfig: CropConfig( |
||||
enableCrop: false, |
||||
), |
||||
); |
||||
if (medias != null && medias.length > 0) { |
||||
String result = await Scan.parse(medias[0].path); |
||||
if (result != null && result != "") { |
||||
queryTicketDetails(result); |
||||
}else{ |
||||
SmartDialog.show( |
||||
widget: SettlementTips( |
||||
() { |
||||
}, |
||||
text: "照片中未识别到二维码/条码", |
||||
color: Color(0xFF30415B), |
||||
)); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,477 @@
|
||||
/// id : "1720379729141301248" |
||||
/// createTime : "2023-11-03 17:57:45" |
||||
/// createUser : "0" |
||||
/// updateTime : "2023-11-03 17:57:45" |
||||
/// updateUser : "0" |
||||
/// mid : "1379254113602109440" |
||||
/// storeId : "1645318098540036096" |
||||
/// orderId : "1720379636644315136" |
||||
/// orderProductId : "1720379636782727168" |
||||
/// productId : "1645714128276291584" |
||||
/// productSkuId : "1645714128343400448" |
||||
/// ticketWipedTimeTemplateId : "0" |
||||
/// amount : "0.01" |
||||
/// name : "四神汤 " |
||||
/// code : "T202311031757452621760001" |
||||
/// useStartTime : "2023-11-03 00:00:00" |
||||
/// useEndTime : "2023-12-02 17:57:45" |
||||
/// finishTime : null |
||||
/// type : "NORMAL" |
||||
/// source : null |
||||
/// takeType : null |
||||
/// style : "" |
||||
/// state : 1 |
||||
/// canSettlement : true |
||||
/// canSubscribe : true |
||||
/// isDelete : 0 |
||||
/// tenantCode : "1195" |
||||
/// ticketItemList : [{"id":"1720379729216798720","createTime":"2023-11-03 17:57:45","createUser":"0","updateTime":"2023-11-03 17:57:45","updateUser":"0","ticketId":"1720379729141301248","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格222","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195","canWipedNumber":1},{"id":"1720379729195827200","createTime":"2023-11-03 17:57:45","createUser":"0","updateTime":"2023-11-03 17:57:45","updateUser":"0","ticketId":"1720379729141301248","relationType":"PRODUCT","relationId":"1645714128343400448","name":"测试规格","showImage":"","state":1,"finishTime":null,"isDelete":0,"tenantCode":"1195","canWipedNumber":1}] |
||||
/// userName : "" |
||||
/// userAvatar : "" |
||||
/// isogenyNumber : 1 |
||||
/// businessStartDate : null |
||||
/// businessEndDate : null |
||||
|
||||
class TicketDetails { |
||||
TicketDetails({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String mid, |
||||
String storeId, |
||||
String orderId, |
||||
String orderProductId, |
||||
String productId, |
||||
String productSkuId, |
||||
String ticketWipedTimeTemplateId, |
||||
String amount, |
||||
String name, |
||||
String code, |
||||
String useStartTime, |
||||
String useEndTime, |
||||
dynamic finishTime, |
||||
String type, |
||||
dynamic source, |
||||
dynamic takeType, |
||||
String style, |
||||
num state, |
||||
bool canSettlement, |
||||
bool canSubscribe, |
||||
num isDelete, |
||||
String tenantCode, |
||||
List<TicketItemList> ticketItemList, |
||||
String userName, |
||||
String userAvatar, |
||||
num isogenyNumber, |
||||
dynamic businessStartDate, |
||||
dynamic businessEndDate,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_mid = mid; |
||||
_storeId = storeId; |
||||
_orderId = orderId; |
||||
_orderProductId = orderProductId; |
||||
_productId = productId; |
||||
_productSkuId = productSkuId; |
||||
_ticketWipedTimeTemplateId = ticketWipedTimeTemplateId; |
||||
_amount = amount; |
||||
_name = name; |
||||
_code = code; |
||||
_useStartTime = useStartTime; |
||||
_useEndTime = useEndTime; |
||||
_finishTime = finishTime; |
||||
_type = type; |
||||
_source = source; |
||||
_takeType = takeType; |
||||
_style = style; |
||||
_state = state; |
||||
_canSettlement = canSettlement; |
||||
_canSubscribe = canSubscribe; |
||||
_isDelete = isDelete; |
||||
_tenantCode = tenantCode; |
||||
_ticketItemList = ticketItemList; |
||||
_userName = userName; |
||||
_userAvatar = userAvatar; |
||||
_isogenyNumber = isogenyNumber; |
||||
_businessStartDate = businessStartDate; |
||||
_businessEndDate = businessEndDate; |
||||
} |
||||
|
||||
TicketDetails.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_mid = json['mid']; |
||||
_storeId = json['storeId']; |
||||
_orderId = json['orderId']; |
||||
_orderProductId = json['orderProductId']; |
||||
_productId = json['productId']; |
||||
_productSkuId = json['productSkuId']; |
||||
_ticketWipedTimeTemplateId = json['ticketWipedTimeTemplateId']; |
||||
_amount = json['amount']; |
||||
_name = json['name']; |
||||
_code = json['code']; |
||||
_useStartTime = json['useStartTime']; |
||||
_useEndTime = json['useEndTime']; |
||||
_finishTime = json['finishTime']; |
||||
_type = json['type']; |
||||
_source = json['source']; |
||||
_takeType = json['takeType']; |
||||
_style = json['style']; |
||||
_state = json['state']; |
||||
_canSettlement = json['canSettlement']; |
||||
_canSubscribe = json['canSubscribe']; |
||||
_isDelete = json['isDelete']; |
||||
_tenantCode = json['tenantCode']; |
||||
if (json['ticketItemList'] != null) { |
||||
_ticketItemList = []; |
||||
json['ticketItemList'].forEach((v) { |
||||
_ticketItemList.add(TicketItemList.fromJson(v)); |
||||
}); |
||||
} |
||||
_userName = json['userName']; |
||||
_userAvatar = json['userAvatar']; |
||||
_isogenyNumber = json['isogenyNumber']; |
||||
_businessStartDate = json['businessStartDate']; |
||||
_businessEndDate = json['businessEndDate']; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _mid; |
||||
String _storeId; |
||||
String _orderId; |
||||
String _orderProductId; |
||||
String _productId; |
||||
String _productSkuId; |
||||
String _ticketWipedTimeTemplateId; |
||||
String _amount; |
||||
String _name; |
||||
String _code; |
||||
String _useStartTime; |
||||
String _useEndTime; |
||||
dynamic _finishTime; |
||||
String _type; |
||||
dynamic _source; |
||||
dynamic _takeType; |
||||
String _style; |
||||
num _state; |
||||
bool _canSettlement; |
||||
bool _canSubscribe; |
||||
num _isDelete; |
||||
String _tenantCode; |
||||
List<TicketItemList> _ticketItemList; |
||||
String _userName; |
||||
String _userAvatar; |
||||
num _isogenyNumber; |
||||
dynamic _businessStartDate; |
||||
dynamic _businessEndDate; |
||||
TicketDetails copyWith({ String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String mid, |
||||
String storeId, |
||||
String orderId, |
||||
String orderProductId, |
||||
String productId, |
||||
String productSkuId, |
||||
String ticketWipedTimeTemplateId, |
||||
String amount, |
||||
String name, |
||||
String code, |
||||
String useStartTime, |
||||
String useEndTime, |
||||
dynamic finishTime, |
||||
String type, |
||||
dynamic source, |
||||
dynamic takeType, |
||||
String style, |
||||
num state, |
||||
bool canSettlement, |
||||
bool canSubscribe, |
||||
num isDelete, |
||||
String tenantCode, |
||||
List<TicketItemList> ticketItemList, |
||||
String userName, |
||||
String userAvatar, |
||||
num isogenyNumber, |
||||
dynamic businessStartDate, |
||||
dynamic businessEndDate, |
||||
}) => TicketDetails( id: id ?? _id, |
||||
createTime: createTime ?? _createTime, |
||||
createUser: createUser ?? _createUser, |
||||
updateTime: updateTime ?? _updateTime, |
||||
updateUser: updateUser ?? _updateUser, |
||||
mid: mid ?? _mid, |
||||
storeId: storeId ?? _storeId, |
||||
orderId: orderId ?? _orderId, |
||||
orderProductId: orderProductId ?? _orderProductId, |
||||
productId: productId ?? _productId, |
||||
productSkuId: productSkuId ?? _productSkuId, |
||||
ticketWipedTimeTemplateId: ticketWipedTimeTemplateId ?? _ticketWipedTimeTemplateId, |
||||
amount: amount ?? _amount, |
||||
name: name ?? _name, |
||||
code: code ?? _code, |
||||
useStartTime: useStartTime ?? _useStartTime, |
||||
useEndTime: useEndTime ?? _useEndTime, |
||||
finishTime: finishTime ?? _finishTime, |
||||
type: type ?? _type, |
||||
source: source ?? _source, |
||||
takeType: takeType ?? _takeType, |
||||
style: style ?? _style, |
||||
state: state ?? _state, |
||||
canSettlement: canSettlement ?? _canSettlement, |
||||
canSubscribe: canSubscribe ?? _canSubscribe, |
||||
isDelete: isDelete ?? _isDelete, |
||||
tenantCode: tenantCode ?? _tenantCode, |
||||
ticketItemList: ticketItemList ?? _ticketItemList, |
||||
userName: userName ?? _userName, |
||||
userAvatar: userAvatar ?? _userAvatar, |
||||
isogenyNumber: isogenyNumber ?? _isogenyNumber, |
||||
businessStartDate: businessStartDate ?? _businessStartDate, |
||||
businessEndDate: businessEndDate ?? _businessEndDate, |
||||
); |
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get mid => _mid; |
||||
String get storeId => _storeId; |
||||
String get orderId => _orderId; |
||||
String get orderProductId => _orderProductId; |
||||
String get productId => _productId; |
||||
String get productSkuId => _productSkuId; |
||||
String get ticketWipedTimeTemplateId => _ticketWipedTimeTemplateId; |
||||
String get amount => _amount; |
||||
String get name => _name; |
||||
String get code => _code; |
||||
String get useStartTime => _useStartTime; |
||||
String get useEndTime => _useEndTime; |
||||
dynamic get finishTime => _finishTime; |
||||
String get type => _type; |
||||
dynamic get source => _source; |
||||
dynamic get takeType => _takeType; |
||||
String get style => _style; |
||||
num get state => _state; |
||||
bool get canSettlement => _canSettlement; |
||||
bool get canSubscribe => _canSubscribe; |
||||
num get isDelete => _isDelete; |
||||
String get tenantCode => _tenantCode; |
||||
List<TicketItemList> get ticketItemList => _ticketItemList; |
||||
String get userName => _userName; |
||||
String get userAvatar => _userAvatar; |
||||
num get isogenyNumber => _isogenyNumber; |
||||
dynamic get businessStartDate => _businessStartDate; |
||||
dynamic get businessEndDate => _businessEndDate; |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['mid'] = _mid; |
||||
map['storeId'] = _storeId; |
||||
map['orderId'] = _orderId; |
||||
map['orderProductId'] = _orderProductId; |
||||
map['productId'] = _productId; |
||||
map['productSkuId'] = _productSkuId; |
||||
map['ticketWipedTimeTemplateId'] = _ticketWipedTimeTemplateId; |
||||
map['amount'] = _amount; |
||||
map['name'] = _name; |
||||
map['code'] = _code; |
||||
map['useStartTime'] = _useStartTime; |
||||
map['useEndTime'] = _useEndTime; |
||||
map['finishTime'] = _finishTime; |
||||
map['type'] = _type; |
||||
map['source'] = _source; |
||||
map['takeType'] = _takeType; |
||||
map['style'] = _style; |
||||
map['state'] = _state; |
||||
map['canSettlement'] = _canSettlement; |
||||
map['canSubscribe'] = _canSubscribe; |
||||
map['isDelete'] = _isDelete; |
||||
map['tenantCode'] = _tenantCode; |
||||
if (_ticketItemList != null) { |
||||
map['ticketItemList'] = _ticketItemList.map((v) => v.toJson()).toList(); |
||||
} |
||||
map['userName'] = _userName; |
||||
map['userAvatar'] = _userAvatar; |
||||
map['isogenyNumber'] = _isogenyNumber; |
||||
map['businessStartDate'] = _businessStartDate; |
||||
map['businessEndDate'] = _businessEndDate; |
||||
return map; |
||||
} |
||||
|
||||
} |
||||
|
||||
/// id : "1720379729216798720" |
||||
/// createTime : "2023-11-03 17:57:45" |
||||
/// createUser : "0" |
||||
/// updateTime : "2023-11-03 17:57:45" |
||||
/// updateUser : "0" |
||||
/// ticketId : "1720379729141301248" |
||||
/// relationType : "PRODUCT" |
||||
/// relationId : "1645714128343400448" |
||||
/// name : "测试规格222" |
||||
/// showImage : "" |
||||
/// state : 1 |
||||
/// finishTime : null |
||||
/// isDelete : 0 |
||||
/// tenantCode : "1195" |
||||
/// canWipedNumber : 1 |
||||
|
||||
class TicketItemList { |
||||
TicketItemList({ |
||||
String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String ticketId, |
||||
String relationType, |
||||
String relationId, |
||||
String name, |
||||
String showImage, |
||||
num state, |
||||
dynamic finishTime, |
||||
num isDelete, |
||||
String tenantCode, |
||||
num canWipedNumber,}){ |
||||
_id = id; |
||||
_createTime = createTime; |
||||
_createUser = createUser; |
||||
_updateTime = updateTime; |
||||
_updateUser = updateUser; |
||||
_ticketId = ticketId; |
||||
_relationType = relationType; |
||||
_relationId = relationId; |
||||
_name = name; |
||||
_showImage = showImage; |
||||
_state = state; |
||||
_finishTime = finishTime; |
||||
_isDelete = isDelete; |
||||
_tenantCode = tenantCode; |
||||
_canWipedNumber = canWipedNumber; |
||||
} |
||||
|
||||
TicketItemList.fromJson(dynamic json) { |
||||
_id = json['id']; |
||||
_createTime = json['createTime']; |
||||
_createUser = json['createUser']; |
||||
_updateTime = json['updateTime']; |
||||
_updateUser = json['updateUser']; |
||||
_ticketId = json['ticketId']; |
||||
_relationType = json['relationType']; |
||||
_relationId = json['relationId']; |
||||
_name = json['name']; |
||||
_showImage = json['showImage']; |
||||
_state = json['state']; |
||||
_finishTime = json['finishTime']; |
||||
_isDelete = json['isDelete']; |
||||
_tenantCode = json['tenantCode']; |
||||
_canWipedNumber = json['canWipedNumber']; |
||||
} |
||||
String _id; |
||||
String _createTime; |
||||
String _createUser; |
||||
String _updateTime; |
||||
String _updateUser; |
||||
String _ticketId; |
||||
String _relationType; |
||||
String _relationId; |
||||
String _name; |
||||
String _showImage; |
||||
num _state; |
||||
dynamic _finishTime; |
||||
num _isDelete; |
||||
String _tenantCode; |
||||
num _canWipedNumber; |
||||
TicketItemList copyWith({ String id, |
||||
String createTime, |
||||
String createUser, |
||||
String updateTime, |
||||
String updateUser, |
||||
String ticketId, |
||||
String relationType, |
||||
String relationId, |
||||
String name, |
||||
String showImage, |
||||
num state, |
||||
dynamic finishTime, |
||||
num isDelete, |
||||
String tenantCode, |
||||
num canWipedNumber, |
||||
}) => TicketItemList( id: id ?? _id, |
||||
createTime: createTime ?? _createTime, |
||||
createUser: createUser ?? _createUser, |
||||
updateTime: updateTime ?? _updateTime, |
||||
updateUser: updateUser ?? _updateUser, |
||||
ticketId: ticketId ?? _ticketId, |
||||
relationType: relationType ?? _relationType, |
||||
relationId: relationId ?? _relationId, |
||||
name: name ?? _name, |
||||
showImage: showImage ?? _showImage, |
||||
state: state ?? _state, |
||||
finishTime: finishTime ?? _finishTime, |
||||
isDelete: isDelete ?? _isDelete, |
||||
tenantCode: tenantCode ?? _tenantCode, |
||||
canWipedNumber: canWipedNumber ?? _canWipedNumber, |
||||
); |
||||
String get id => _id; |
||||
String get createTime => _createTime; |
||||
String get createUser => _createUser; |
||||
String get updateTime => _updateTime; |
||||
String get updateUser => _updateUser; |
||||
String get ticketId => _ticketId; |
||||
String get relationType => _relationType; |
||||
String get relationId => _relationId; |
||||
String get name => _name; |
||||
String get showImage => _showImage; |
||||
num get state => _state; |
||||
dynamic get finishTime => _finishTime; |
||||
num get isDelete => _isDelete; |
||||
String get tenantCode => _tenantCode; |
||||
num get canWipedNumber => _canWipedNumber; |
||||
bool _isSelect = false; |
||||
|
||||
bool get isSelect => _isSelect; |
||||
|
||||
set isSelect(bool value) { |
||||
_isSelect = value; |
||||
} |
||||
|
||||
Map<String, dynamic> toJson() { |
||||
final map = <String, dynamic>{}; |
||||
map['id'] = _id; |
||||
map['createTime'] = _createTime; |
||||
map['createUser'] = _createUser; |
||||
map['updateTime'] = _updateTime; |
||||
map['updateUser'] = _updateUser; |
||||
map['ticketId'] = _ticketId; |
||||
map['relationType'] = _relationType; |
||||
map['relationId'] = _relationId; |
||||
map['name'] = _name; |
||||
map['showImage'] = _showImage; |
||||
map['state'] = _state; |
||||
map['finishTime'] = _finishTime; |
||||
map['isDelete'] = _isDelete; |
||||
map['tenantCode'] = _tenantCode; |
||||
map['canWipedNumber'] = _canWipedNumber; |
||||
return map; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue