Browse Source

砍价更改

zyh
w-R 3 years ago
parent
commit
0011135c91
  1. 30
      lib/mine/mine_view/mine_item.dart
  2. 4
      lib/order/bargain_group_order.dart
  3. 251
      lib/retrofit/data/activity_actRecord_details.dart
  4. 4
      lib/settlement/settlement.dart
  5. 3
      lib/settlement/settlement_view/distribution.dart
  6. 1
      lib/store/shopping/shopping_goods_details.dart
  7. 2
      lib/store/store_view/product_sku.dart

30
lib/mine/mine_view/mine_item.dart

@ -16,8 +16,8 @@ class _MineItem extends State<MineItem> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 28.h), margin: EdgeInsets.fromLTRB(16.w, 10.h, 16.w, 6.h),
// padding: EdgeInsets.fromLTRB(20.w, 12.h, 20.w, 12.h), padding: EdgeInsets.only(top: 12,bottom: 12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
@ -50,7 +50,7 @@ class _MineItem extends State<MineItem> {
// ), // ),
// ), // ),
Container( Container(
padding: EdgeInsets.only(left: 16,top:16,bottom:4), padding: EdgeInsets.symmetric(vertical: 4.h,horizontal: 20.w),
child: Text( child: Text(
S.of(context).wodegongju, S.of(context).wodegongju,
style: TextStyle( style: TextStyle(
@ -168,30 +168,6 @@ class _MineItem extends State<MineItem> {
Expanded(child: Text("")), Expanded(child: Text("")),
], ],
), ),
Row(
children: [
Expanded(child:InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/qr_share', arguments: {});
},
child: mineItem(
S.of(context).tuiguangma,
"assets/image/icon_mine_promotion_code.png",
),
),),
Expanded(child:InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/invitation_record', arguments: {});
},
child: mineItem(
"邀请记录",
"assets/image/yao_q.png",
),
),),
Expanded(child:Container()),
Expanded(child:Container())
],
),
// mineItem( // mineItem(
// S.of(context).bangzhuyufankui, // S.of(context).bangzhuyufankui,
// "assets/image/icon_mine_feedback.png", // "assets/image/icon_mine_feedback.png",

4
lib/order/bargain_group_order.dart

@ -131,6 +131,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
List<ActivityOrderList> activityOrderList = []; List<ActivityOrderList> activityOrderList = [];
RefreshController _refreshController = RefreshController _refreshController =
RefreshController(initialRefresh: false); RefreshController(initialRefresh: false);
int type = 0;
@override @override
void initState() { void initState() {
@ -301,7 +302,8 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
// orderInfo.sendStatus, // orderInfo.sendStatus,
// orderInfo.isTakeOut) // orderInfo.isTakeOut)
// : "", // : "",
activityOrderList.howManyMore != 0 ? "还差${activityOrderList?.howManyMore ?? 0}人拼团成功" : "拼团成功", (type == 1)?(activityOrderList.howManyMore != 0 ? "还差${activityOrderList?.howManyMore ?? 0}人拼团成功" : "拼团成功")
:(activityOrderList.howManyMoney != 0 ? "还差¥${activityOrderList?.howManyMoney ?? 0}砍价成功" : "成功"),
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

251
lib/retrofit/data/activity_actRecord_details.dart

@ -1,12 +1,18 @@
/// actRecord : {"id":"1480458252863930368","createTime":"2022-01-10 16:35:28","createUser":"1478548720785031168","updateTime":"2022-01-10 16:35:28","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402160218112","mid":"1478548720785031168","joinNum":1,"startTime":"2022-01-10 16:35:28","endTime":"2022-01-11 14:35:28","state":1,"isDelete":0} /// actRecord : {"id":"1494198857058222080","createTime":"2022-02-17 14:35:43","createUser":"1478548720785031168","updateTime":"2022-02-17 14:35:43","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":3,"actTemplateId":"1490572026815971328","actTimeId":"1490572027034075136","actProductId":"1494198261018263552","mid":"1478548720785031168","joinNum":1,"startTime":"2022-02-17 14:35:43","endTime":"2022-02-17 16:35:43","state":2,"isDelete":0}
/// actRecordJoinList : [{"id":"1480458253568573440","createTime":"2022-01-10 16:35:28","createUser":"1478548720785031168","updateTime":"2022-01-10 16:35:28","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1480458252863930368","mid":"1478548720785031168","orderId":"1480458254545846272","isLeader":true,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402160218112","actPrice":"78.00","state":false,"isDelete":0},{"id":"1480465728682328064","createTime":"2022-01-10 17:05:10","createUser":"1478548720785031168","updateTime":"2022-01-10 17:05:10","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1480458252863930368","mid":"1478548720785031168","orderId":"1480465729634435072","isLeader":false,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402160218112","actPrice":"78.00","state":true,"isDelete":0},{"id":"1480466261283438592","createTime":"2022-01-10 17:07:17","createUser":"1478548720785031168","updateTime":"2022-01-10 17:07:17","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1480458252863930368","mid":"1478548720785031168","orderId":"1480466261941944320","isLeader":false,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402160218112","actPrice":"78.00","state":false,"isDelete":0}] /// actRecordJoinList : [{"id":"1494198857217605632","createTime":"2022-02-17 14:35:43","createUser":"1478548720785031168","updateTime":"2022-02-17 14:35:43","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":3,"actTemplateId":"1490572026815971328","actTimeId":"1490572027034075136","actRecordId":"1494198857058222080","mid":"1478548720785031168","orderId":null,"isLeader":true,"memberAvatar":"","memberNickname":"","productId":"1494198261018263552","actPrice":"57.81","state":true,"isDelete":0}]
/// actProduct : {"id":"1494198261018263552","createTime":"2022-02-17 14:33:21","createUser":"1364043181062094848","updateTime":"2022-02-17 14:33:21","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1490572026815971328","timeId":"1490572027034075136","productId":"1461246266586431488","productName":"野生羊肚菌","productImg":"https://pos.upload.gznl.top/1179/2021/11/298d1e1c-2a5f-4b9d-95a7-87b3f88a9cd1.jpg","productPrice":"150.00","promotionPrice":"11.00","productStock":200,"sellCount":0,"skuJson":[{"skuId":"1461246266661928960","skuPrice":11,"skuStock":100},{"skuId":"1461246266687094784","skuPrice":100,"skuStock":100}],"isDelete":0}
/// skuName : "50g/袋"
class ActivityActRecordDetails { class ActivityActRecordDetails {
ActivityActRecordDetails({ ActivityActRecordDetails({
ActRecord actRecord, ActRecord actRecord,
List<ActRecordJoinList> actRecordJoinList,}){ List<ActRecordJoinList> actRecordJoinList,
ActProduct actProduct,
String skuName,}){
_actRecord = actRecord; _actRecord = actRecord;
_actRecordJoinList = actRecordJoinList; _actRecordJoinList = actRecordJoinList;
_actProduct = actProduct;
_skuName = skuName;
} }
ActivityActRecordDetails.fromJson(dynamic json) { ActivityActRecordDetails.fromJson(dynamic json) {
@ -17,12 +23,18 @@ class ActivityActRecordDetails {
_actRecordJoinList.add(ActRecordJoinList.fromJson(v)); _actRecordJoinList.add(ActRecordJoinList.fromJson(v));
}); });
} }
_actProduct = json['actProduct'] != null ? ActProduct.fromJson(json['actProduct']) : null;
_skuName = json['skuName'];
} }
ActRecord _actRecord; ActRecord _actRecord;
List<ActRecordJoinList> _actRecordJoinList; List<ActRecordJoinList> _actRecordJoinList;
ActProduct _actProduct;
String _skuName;
ActRecord get actRecord => _actRecord; ActRecord get actRecord => _actRecord;
List<ActRecordJoinList> get actRecordJoinList => _actRecordJoinList; List<ActRecordJoinList> get actRecordJoinList => _actRecordJoinList;
ActProduct get actProduct => _actProduct;
String get skuName => _skuName;
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final map = <String, dynamic>{}; final map = <String, dynamic>{};
@ -32,29 +44,212 @@ class ActivityActRecordDetails {
if (_actRecordJoinList != null) { if (_actRecordJoinList != null) {
map['actRecordJoinList'] = _actRecordJoinList.map((v) => v.toJson()).toList(); map['actRecordJoinList'] = _actRecordJoinList.map((v) => v.toJson()).toList();
} }
if (_actProduct != null) {
map['actProduct'] = _actProduct.toJson();
}
map['skuName'] = _skuName;
return map;
}
}
/// id : "1494198261018263552"
/// createTime : "2022-02-17 14:33:21"
/// createUser : "1364043181062094848"
/// updateTime : "2022-02-17 14:33:21"
/// updateUser : "1364043181062094848"
/// storeId : "1460885296764682240"
/// templateId : "1490572026815971328"
/// timeId : "1490572027034075136"
/// productId : "1461246266586431488"
/// productName : "野生羊肚菌"
/// productImg : "https://pos.upload.gznl.top/1179/2021/11/298d1e1c-2a5f-4b9d-95a7-87b3f88a9cd1.jpg"
/// productPrice : "150.00"
/// promotionPrice : "11.00"
/// productStock : 200
/// sellCount : 0
/// skuJson : [{"skuId":"1461246266661928960","skuPrice":11,"skuStock":100},{"skuId":"1461246266687094784","skuPrice":100,"skuStock":100}]
/// isDelete : 0
class ActProduct {
ActProduct({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
String templateId,
String timeId,
String productId,
String productName,
String productImg,
String productPrice,
String promotionPrice,
int productStock,
int sellCount,
List<SkuJson> skuJson,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_templateId = templateId;
_timeId = timeId;
_productId = productId;
_productName = productName;
_productImg = productImg;
_productPrice = productPrice;
_promotionPrice = promotionPrice;
_productStock = productStock;
_sellCount = sellCount;
_skuJson = skuJson;
_isDelete = isDelete;
}
ActProduct.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_templateId = json['templateId'];
_timeId = json['timeId'];
_productId = json['productId'];
_productName = json['productName'];
_productImg = json['productImg'];
_productPrice = json['productPrice'];
_promotionPrice = json['promotionPrice'];
_productStock = json['productStock'];
_sellCount = json['sellCount'];
if (json['skuJson'] != null) {
_skuJson = [];
json['skuJson'].forEach((v) {
_skuJson.add(SkuJson.fromJson(v));
});
}
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
String _templateId;
String _timeId;
String _productId;
String _productName;
String _productImg;
String _productPrice;
String _promotionPrice;
int _productStock;
int _sellCount;
List<SkuJson> _skuJson;
int _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
String get templateId => _templateId;
String get timeId => _timeId;
String get productId => _productId;
String get productName => _productName;
String get productImg => _productImg;
String get productPrice => _productPrice;
String get promotionPrice => _promotionPrice;
int get productStock => _productStock;
int get sellCount => _sellCount;
List<SkuJson> get skuJson => _skuJson;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['templateId'] = _templateId;
map['timeId'] = _timeId;
map['productId'] = _productId;
map['productName'] = _productName;
map['productImg'] = _productImg;
map['productPrice'] = _productPrice;
map['promotionPrice'] = _promotionPrice;
map['productStock'] = _productStock;
map['sellCount'] = _sellCount;
if (_skuJson != null) {
map['skuJson'] = _skuJson.map((v) => v.toJson()).toList();
}
map['isDelete'] = _isDelete;
return map;
}
}
/// skuId : "1461246266661928960"
/// skuPrice : 11
/// skuStock : 100
class SkuJson {
SkuJson({
String skuId,
int skuPrice,
int skuStock,}){
_skuId = skuId;
_skuPrice = skuPrice;
_skuStock = skuStock;
}
SkuJson.fromJson(dynamic json) {
_skuId = json['skuId'];
_skuPrice = json['skuPrice'];
_skuStock = json['skuStock'];
}
String _skuId;
int _skuPrice;
int _skuStock;
String get skuId => _skuId;
int get skuPrice => _skuPrice;
int get skuStock => _skuStock;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['skuId'] = _skuId;
map['skuPrice'] = _skuPrice;
map['skuStock'] = _skuStock;
return map; return map;
} }
} }
/// id : "1480458253568573440" /// id : "1494198857217605632"
/// createTime : "2022-01-10 16:35:28" /// createTime : "2022-02-17 14:35:43"
/// createUser : "1478548720785031168" /// createUser : "1478548720785031168"
/// updateTime : "2022-01-10 16:35:28" /// updateTime : "2022-02-17 14:35:43"
/// updateUser : "1478548720785031168" /// updateUser : "1478548720785031168"
/// storeId : "1460885296764682240" /// storeId : "1460885296764682240"
/// type : 1 /// type : 3
/// actTemplateId : "1479377328797646848" /// actTemplateId : "1490572026815971328"
/// actTimeId : "1479377329099636736" /// actTimeId : "1490572027034075136"
/// actRecordId : "1480458252863930368" /// actRecordId : "1494198857058222080"
/// mid : "1478548720785031168" /// mid : "1478548720785031168"
/// orderId : "1480458254545846272" /// orderId : null
/// isLeader : true /// isLeader : true
/// memberAvatar : "" /// memberAvatar : ""
/// memberNickname : "斯基" /// memberNickname : ""
/// productId : "1479377402160218112" /// productId : "1494198261018263552"
/// actPrice : "78.00" /// actPrice : "57.81"
/// state : false /// state : true
/// isDelete : 0 /// isDelete : 0
class ActRecordJoinList { class ActRecordJoinList {
@ -70,7 +265,7 @@ class ActRecordJoinList {
String actTimeId, String actTimeId,
String actRecordId, String actRecordId,
String mid, String mid,
String orderId, dynamic orderId,
bool isLeader, bool isLeader,
String memberAvatar, String memberAvatar,
String memberNickname, String memberNickname,
@ -131,7 +326,7 @@ class ActRecordJoinList {
String _actTimeId; String _actTimeId;
String _actRecordId; String _actRecordId;
String _mid; String _mid;
String _orderId; dynamic _orderId;
bool _isLeader; bool _isLeader;
String _memberAvatar; String _memberAvatar;
String _memberNickname; String _memberNickname;
@ -151,7 +346,7 @@ class ActRecordJoinList {
String get actTimeId => _actTimeId; String get actTimeId => _actTimeId;
String get actRecordId => _actRecordId; String get actRecordId => _actRecordId;
String get mid => _mid; String get mid => _mid;
String get orderId => _orderId; dynamic get orderId => _orderId;
bool get isLeader => _isLeader; bool get isLeader => _isLeader;
String get memberAvatar => _memberAvatar; String get memberAvatar => _memberAvatar;
String get memberNickname => _memberNickname; String get memberNickname => _memberNickname;
@ -186,21 +381,21 @@ class ActRecordJoinList {
} }
/// id : "1480458252863930368" /// id : "1494198857058222080"
/// createTime : "2022-01-10 16:35:28" /// createTime : "2022-02-17 14:35:43"
/// createUser : "1478548720785031168" /// createUser : "1478548720785031168"
/// updateTime : "2022-01-10 16:35:28" /// updateTime : "2022-02-17 14:35:43"
/// updateUser : "1478548720785031168" /// updateUser : "1478548720785031168"
/// storeId : "1460885296764682240" /// storeId : "1460885296764682240"
/// type : 1 /// type : 3
/// actTemplateId : "1479377328797646848" /// actTemplateId : "1490572026815971328"
/// actTimeId : "1479377329099636736" /// actTimeId : "1490572027034075136"
/// actProductId : "1479377402160218112" /// actProductId : "1494198261018263552"
/// mid : "1478548720785031168" /// mid : "1478548720785031168"
/// joinNum : 1 /// joinNum : 1
/// startTime : "2022-01-10 16:35:28" /// startTime : "2022-02-17 14:35:43"
/// endTime : "2022-01-11 14:35:28" /// endTime : "2022-02-17 16:35:43"
/// state : 1 /// state : 2
/// isDelete : 0 /// isDelete : 0
class ActRecord { class ActRecord {

4
lib/settlement/settlement.dart

@ -58,6 +58,7 @@ class _Settlement extends State<Settlement> {
int payChannel = 4; int payChannel = 4;
int tableId = 0; int tableId = 0;
int numberOfPeople = 0; int numberOfPeople = 0;
String pageType ="1";
Address address; Address address;
CouponListBean couponListBean; CouponListBean couponListBean;
@ -75,6 +76,7 @@ class _Settlement extends State<Settlement> {
numberOfPeople = widget.arguments["numberOfPeople"] ?? 0; numberOfPeople = widget.arguments["numberOfPeople"] ?? 0;
promotions = widget.arguments["pName"] ?? ""; promotions = widget.arguments["pName"] ?? "";
coupons = widget.arguments["cName"] ?? ""; coupons = widget.arguments["cName"] ?? "";
pageType = widget.arguments["pageType"];
if (tableId == 0) { if (tableId == 0) {
placeOrder = true; placeOrder = true;
} }
@ -433,7 +435,7 @@ class _Settlement extends State<Settlement> {
queryOrderInfo(addressId, isTake, queryOrderInfo(addressId, isTake,
memberCouponId, orderId, promotionId); memberCouponId, orderId, promotionId);
}, queryAddress, storeInfo, address, }, queryAddress, storeInfo, address,
selectedAddress), selectedAddress,pageType),
SizedBox( SizedBox(
height: 16, height: 16,

3
lib/settlement/settlement_view/distribution.dart

@ -23,9 +23,10 @@ class DistributionMode extends StatefulWidget {
final Function(String addId) selectedNewAddress; final Function(String addId) selectedNewAddress;
final StoreInfo storeInfo; final StoreInfo storeInfo;
final Address address; final Address address;
final String pageType;
DistributionMode(this.queryOrderInfo, this.queryAddress, this.storeInfo, DistributionMode(this.queryOrderInfo, this.queryAddress, this.storeInfo,
this.address, this.selectedNewAddress); this.address, this.selectedNewAddress,this.pageType);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {

1
lib/store/shopping/shopping_goods_details.dart

@ -438,6 +438,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
"pid": pid, "pid": pid,
"cName": cName, "cName": cName,
"cid": cid, "cid": cid,
"pageType":pageType,
"shoppingCartSkuItemList": [ "shoppingCartSkuItemList": [
{ {
"buyNum": count1, "buyNum": count1,

2
lib/store/store_view/product_sku.dart

@ -272,7 +272,7 @@ class _ProductSku extends State<ProductSku> {
SizedBox( SizedBox(
height: 24, height: 24,
), ),
if(widget.buttonType == 0) if(widget.buttonType != 1)
RoundButton( RoundButton(
width: double.infinity, width: double.infinity,
height: 54.h, height: 54.h,

Loading…
Cancel
Save