Browse Source

点单更改

master
w-R 3 years ago
parent
commit
4877cc0634
  1. 2
      lib/address/address_map_page.dart
  2. 3
      lib/generated/intl/messages_en.dart
  3. 3
      lib/generated/intl/messages_zh_CN.dart
  4. 3
      lib/generated/intl/messages_zh_Hans_CN.dart
  5. 3
      lib/generated/intl/messages_zh_Hant_CN.dart
  6. 3
      lib/generated/intl/messages_zh_TW.dart
  7. 30
      lib/generated/l10n.dart
  8. 4
      lib/l10n/intl_en.arb
  9. 3
      lib/l10n/intl_zh_CN.arb
  10. 3
      lib/l10n/intl_zh_Hans_CN.arb
  11. 3
      lib/l10n/intl_zh_Hant_CN.arb
  12. 3
      lib/l10n/intl_zh_TW.arb
  13. 167
      lib/retrofit/data/findMiNiGroupList.dart
  14. 16
      lib/retrofit/min_api.dart
  15. 69
      lib/store/store_order.dart
  16. 116
      lib/store/store_view/store_order_list.dart

2
lib/address/address_map_page.dart

@ -10,13 +10,11 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart';
import 'package:flutter_baidu_mapapi_search/flutter_baidu_mapapi_search.dart';
import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart';
import 'package:flutter_bmflocation/bdmap_location_flutter_plugin.dart';
import 'package:flutter_bmflocation/flutter_baidu_location_android_option.dart';
import 'package:flutter_bmflocation/flutter_baidu_location_ios_option.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/address.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';

3
lib/generated/intl/messages_en.dart

@ -232,6 +232,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanjia" : MessageLookupByLibrary.simpleMessage("会员价"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("会员卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"),
@ -523,6 +524,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系统通知"),
"xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"),
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuni" : MessageLookupByLibrary.simpleMessage("虚拟"),
"yaoqingrenshoujihao_" : m32,
"yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"),
@ -572,6 +574,7 @@ class MessageLookup extends MessageLookupByLibrary {
"youxiaoqizhi" : m36,
"yuan" : MessageLookupByLibrary.simpleMessage(""),
"yuan_" : m37,
"yuanjia" : MessageLookupByLibrary.simpleMessage("原价"),
"yue" : MessageLookupByLibrary.simpleMessage("余额"),
"yue_" : m38,
"yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"),

3
lib/generated/intl/messages_zh_CN.dart

@ -231,6 +231,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanjia" : MessageLookupByLibrary.simpleMessage("会员价"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("会员卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"),
@ -522,6 +523,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系统通知"),
"xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"),
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuni" : MessageLookupByLibrary.simpleMessage("虚拟"),
"yaoqingrenshoujihao_" : m32,
"yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"),
@ -571,6 +573,7 @@ class MessageLookup extends MessageLookupByLibrary {
"youxiaoqizhi" : m36,
"yuan" : MessageLookupByLibrary.simpleMessage(""),
"yuan_" : m37,
"yuanjia" : MessageLookupByLibrary.simpleMessage("原价"),
"yue" : MessageLookupByLibrary.simpleMessage("余额"),
"yue_" : m38,
"yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"),

3
lib/generated/intl/messages_zh_Hans_CN.dart

@ -231,6 +231,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回乡头条"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("会员等级"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("会员等级说明"),
"huiyuanjia" : MessageLookupByLibrary.simpleMessage("会员价"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("会员积分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("会员卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("会员卡详情"),
@ -522,6 +523,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系统通知"),
"xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系统消息"),
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuni" : MessageLookupByLibrary.simpleMessage("虚拟"),
"yaoqingrenshoujihao_" : m32,
"yiduihuan" : MessageLookupByLibrary.simpleMessage("已兑换"),
@ -571,6 +573,7 @@ class MessageLookup extends MessageLookupByLibrary {
"youxiaoqizhi" : m36,
"yuan" : MessageLookupByLibrary.simpleMessage(""),
"yuan_" : m37,
"yuanjia" : MessageLookupByLibrary.simpleMessage("原价"),
"yue" : MessageLookupByLibrary.simpleMessage("余额"),
"yue_" : m38,
"yuemingxi" : MessageLookupByLibrary.simpleMessage("余额明细"),

3
lib/generated/intl/messages_zh_Hant_CN.dart

@ -231,6 +231,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanjia" : MessageLookupByLibrary.simpleMessage("會員價"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("會員積分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("會員卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("會員卡詳情"),
@ -522,6 +523,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系統通知"),
"xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系統消息"),
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuni" : MessageLookupByLibrary.simpleMessage("虛擬"),
"yaoqingrenshoujihao_" : m32,
"yiduihuan" : MessageLookupByLibrary.simpleMessage("已兌換"),
@ -571,6 +573,7 @@ class MessageLookup extends MessageLookupByLibrary {
"youxiaoqizhi" : m36,
"yuan" : MessageLookupByLibrary.simpleMessage(""),
"yuan_" : m37,
"yuanjia" : MessageLookupByLibrary.simpleMessage("原價"),
"yue" : MessageLookupByLibrary.simpleMessage("餘額"),
"yue_" : m38,
"yuemingxi" : MessageLookupByLibrary.simpleMessage("餘額明細"),

3
lib/generated/intl/messages_zh_TW.dart

@ -231,6 +231,7 @@ class MessageLookup extends MessageLookupByLibrary {
"huixiangtoutiao" : MessageLookupByLibrary.simpleMessage("回鄉頭條"),
"huiyuandengji" : MessageLookupByLibrary.simpleMessage("會員等級"),
"huiyuandengjishuoming" : MessageLookupByLibrary.simpleMessage("會員等級説明"),
"huiyuanjia" : MessageLookupByLibrary.simpleMessage("會員價"),
"huiyuanjifen" : MessageLookupByLibrary.simpleMessage("會員積分"),
"huiyuanka" : MessageLookupByLibrary.simpleMessage("會員卡"),
"huiyuankaxiangqing" : MessageLookupByLibrary.simpleMessage("會員卡詳情"),
@ -522,6 +523,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xitongtongzhi" : MessageLookupByLibrary.simpleMessage("系統通知"),
"xitongxiaoxi" : MessageLookupByLibrary.simpleMessage("系統消息"),
"xiugaichenggong" : MessageLookupByLibrary.simpleMessage("修改成功"),
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuni" : MessageLookupByLibrary.simpleMessage("虛擬"),
"yaoqingrenshoujihao_" : m32,
"yiduihuan" : MessageLookupByLibrary.simpleMessage("已兌換"),
@ -571,6 +573,7 @@ class MessageLookup extends MessageLookupByLibrary {
"youxiaoqizhi" : m36,
"yuan" : MessageLookupByLibrary.simpleMessage(""),
"yuan_" : m37,
"yuanjia" : MessageLookupByLibrary.simpleMessage("原價"),
"yue" : MessageLookupByLibrary.simpleMessage("餘額"),
"yue_" : m38,
"yuemingxi" : MessageLookupByLibrary.simpleMessage("餘額明細"),

30
lib/generated/l10n.dart

@ -5095,6 +5095,36 @@ class S {
);
}
/// ``
String get huiyuanjia {
return Intl.message(
'会员价',
name: 'huiyuanjia',
desc: '',
args: [],
);
}
/// ``
String get yuanjia {
return Intl.message(
'原价',
name: 'yuanjia',
desc: '',
args: [],
);
}
/// ``
String get xuanguige {
return Intl.message(
'选规格',
name: 'xuanguige',
desc: '',
args: [],
);
}
/// `使`
String get privacy_policy4 {
return Intl.message(

4
lib/l10n/intl_en.arb

@ -529,6 +529,10 @@
"tuiguangma": "推广码",
"wodegongju": "我的工具",
"beizhuxinxi": "备注信息",
"huiyuanjia": "会员价",
"yuanjia": "原价",
"xuanguige": "选规格",

3
lib/l10n/intl_zh_CN.arb

@ -529,6 +529,9 @@
"tuiguangma": "推广码",
"wodegongju": "我的工具",
"beizhuxinxi": "备注信息",
"huiyuanjia": "会员价",
"yuanjia": "原价",
"xuanguige": "选规格",

3
lib/l10n/intl_zh_Hans_CN.arb

@ -529,6 +529,9 @@
"tuiguangma": "推广码",
"wodegongju": "我的工具",
"beizhuxinxi": "备注信息",
"huiyuanjia": "会员价",
"yuanjia": "原价",
"xuanguige": "选规格",

3
lib/l10n/intl_zh_Hant_CN.arb

@ -524,6 +524,9 @@
"tuiguangma": "推廣碼",
"wodegongju": "我的工具",
"beizhuxinxi": "備注信息",
"huiyuanjia": "會員價",
"yuanjia": "原價",
"xuanguige": "選規格",

3
lib/l10n/intl_zh_TW.arb

@ -523,6 +523,9 @@
"tuiguangma": "推廣碼",
"wodegongju": "我的工具",
"beizhuxinxi": "備注信息",
"huiyuanjia": "會員價",
"yuanjia": "原價",
"xuanguige": "選規格",

167
lib/retrofit/data/findMiNiGroupList.dart

@ -0,0 +1,167 @@
/// id : "1435148069191548928"
/// storeId : "1333246101343436800"
/// groupName : "<EFBFBD><EFBFBD>Ʒ<EFBFBD>"
/// groupImg : "https://pos.upload.gznl.top/1175/2021/09/c9abb054-4509-4f22-9671-6f712ab7e493.png"
/// sort : 0
/// productList : [{"id":"1440501052276211712","supplierName":"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","storeId":"1333246101343436800","categoryId":"1300688133322440704","groupId":"1435148069191548928","shortName":"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","productName":"֧<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>","sellDesc":"","productCode":"PRO202109221019480000000000001","weight":"0","applyPrice":"0.00","price":"0.01","stock":-48,"sellCount":48,"needLogistics":1,"oversold":1,"status":1,"posShow":true,"attrStyle":0,"isDelete":0,"productAttrValues":null,"skuList":null,"imgPathList":null,"buyNum":0,"imgPath":"https://pos.upload.gznl.top/1175/2021/09/ade72b41-23a2-4f29-ae50-4e620b7e9011.png","setMeal":1,"printerFlag":"DEFAULT","markProductNone":null},{"id":"1435893909921202176","supplierName":"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","storeId":"1333246101343436800","categoryId":"1300688133322440704","groupId":"1435148069191548928","shortName":"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","productName":"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>","sellDesc":"","productCode":"PRO202109091712400000000000003","weight":"0","applyPrice":"0.00","price":"9999.00","stock":-10,"sellCount":10,"needLogistics":1,"oversold":1,"status":1,"posShow":true,"attrStyle":0,"isDelete":0,"productAttrValues":null,"skuList":null,"imgPathList":null,"buyNum":0,"imgPath":"https://pos.upload.gznl.top/1175/2021/09/1d212bc1-b952-4aba-a870-8538009da680.png","setMeal":1,"printerFlag":"DEFAULT","markProductNone":null},{"id":"1435781813317402624","supplierName":"<EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>","storeId":"1333246101343436800","categoryId":"1300688133322440704","groupId":"1435148069191548928","shortName":"ƴ<EFBFBD>̲<EFBFBD><EFBFBD><EFBFBD>","productName":"ƴ<EFBFBD>̲<EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>)","sellDesc":"","productCode":"PRO202109090947140000000000001","weight":"0","applyPrice":"0.00","price":"2.00","stock":-15,"sellCount":17,"needLogistics":1,"oversold":1,"status":1,"posShow":true,"attrStyle":0,"isDelete":0,"productAttrValues":null,"skuList":null,"imgPathList":null,"buyNum":0,"imgPath":"https://pos.upload.gznl.top/1175/2021/09/c1412e9a-2c5a-4658-9850-8dde8d1e9321.png","setMeal":1,"printerFlag":"DEFAULT","markProductNone":null}]
/// productPageVO : null
class FindMiNiGroupList {
String id;
String storeId;
String groupName;
String groupImg;
int sort;
List<ProductListBean> productList;
dynamic productPageVO;
static FindMiNiGroupList fromMap(Map<String, dynamic> map) {
if (map == null) return null;
FindMiNiGroupList findMiNiGroupListBean = FindMiNiGroupList();
findMiNiGroupListBean.id = map['id'];
findMiNiGroupListBean.storeId = map['storeId'];
findMiNiGroupListBean.groupName = map['groupName'];
findMiNiGroupListBean.groupImg = map['groupImg'];
findMiNiGroupListBean.sort = map['sort'];
findMiNiGroupListBean.productList = List()..addAll(
(map['productList'] as List ?? []).map((o) => ProductListBean.fromMap(o))
);
findMiNiGroupListBean.productPageVO = map['productPageVO'];
return findMiNiGroupListBean;
}
Map toJson() => {
"id": id,
"storeId": storeId,
"groupName": groupName,
"groupImg": groupImg,
"sort": sort,
"productList": productList,
"productPageVO": productPageVO,
};
}
/// id : "1440501052276211712"
/// supplierName : "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
/// storeId : "1333246101343436800"
/// categoryId : "1300688133322440704"
/// groupId : "1435148069191548928"
/// shortName : "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
/// productName : "֧<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
/// sellDesc : ""
/// productCode : "PRO202109221019480000000000001"
/// weight : "0"
/// applyPrice : "0.00"
/// price : "0.01"
/// stock : -48
/// sellCount : 48
/// needLogistics : 1
/// oversold : 1
/// status : 1
/// posShow : true
/// attrStyle : 0
/// isDelete : 0
/// productAttrValues : null
/// skuList : null
/// imgPathList : null
/// buyNum : 0
/// imgPath : "https://pos.upload.gznl.top/1175/2021/09/ade72b41-23a2-4f29-ae50-4e620b7e9011.png"
/// setMeal : 1
/// printerFlag : "DEFAULT"
/// markProductNone : null
class ProductListBean {
String id;
String supplierName;
String storeId;
String categoryId;
String groupId;
String shortName;
String productName;
String sellDesc;
String productCode;
String weight;
String applyPrice;
String price;
int stock;
int sellCount;
int needLogistics;
int oversold;
int status;
bool posShow;
int attrStyle;
int isDelete;
dynamic productAttrValues;
dynamic skuList;
dynamic imgPathList;
int buyNum;
String imgPath;
int setMeal;
String printerFlag;
dynamic markProductNone;
static ProductListBean fromMap(Map<String, dynamic> map) {
if (map == null) return null;
ProductListBean productListBean = ProductListBean();
productListBean.id = map['id'];
productListBean.supplierName = map['supplierName'];
productListBean.storeId = map['storeId'];
productListBean.categoryId = map['categoryId'];
productListBean.groupId = map['groupId'];
productListBean.shortName = map['shortName'];
productListBean.productName = map['productName'];
productListBean.sellDesc = map['sellDesc'];
productListBean.productCode = map['productCode'];
productListBean.weight = map['weight'];
productListBean.applyPrice = map['applyPrice'];
productListBean.price = map['price'];
productListBean.stock = map['stock'];
productListBean.sellCount = map['sellCount'];
productListBean.needLogistics = map['needLogistics'];
productListBean.oversold = map['oversold'];
productListBean.status = map['status'];
productListBean.posShow = map['posShow'];
productListBean.attrStyle = map['attrStyle'];
productListBean.isDelete = map['isDelete'];
productListBean.productAttrValues = map['productAttrValues'];
productListBean.skuList = map['skuList'];
productListBean.imgPathList = map['imgPathList'];
productListBean.buyNum = map['buyNum'];
productListBean.imgPath = map['imgPath'];
productListBean.setMeal = map['setMeal'];
productListBean.printerFlag = map['printerFlag'];
productListBean.markProductNone = map['markProductNone'];
return productListBean;
}
Map toJson() => {
"id": id,
"supplierName": supplierName,
"storeId": storeId,
"categoryId": categoryId,
"groupId": groupId,
"shortName": shortName,
"productName": productName,
"sellDesc": sellDesc,
"productCode": productCode,
"weight": weight,
"applyPrice": applyPrice,
"price": price,
"stock": stock,
"sellCount": sellCount,
"needLogistics": needLogistics,
"oversold": oversold,
"status": status,
"posShow": posShow,
"attrStyle": attrStyle,
"isDelete": isDelete,
"productAttrValues": productAttrValues,
"skuList": skuList,
"imgPathList": imgPathList,
"buyNum": buyNum,
"imgPath": imgPath,
"setMeal": setMeal,
"printerFlag": printerFlag,
"markProductNone": markProductNone,
};
}

16
lib/retrofit/min_api.dart

@ -10,13 +10,16 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart';
import 'data/findMiNiGroupList.dart';
import 'data/page.dart';
part 'min_api.g.dart';
const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
// const base_url = "http://192.168.10.236:8766/app/"; ///
// const baseUrl = "http://192.168.10.236:8766/app/"; ///
const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/";
@ -105,4 +108,9 @@ abstract class MinApiService {
debugPrint(msg);
}
///
@POST("product/findMiNiGroupList")
Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList(
@Body() Map<String, dynamic> param,Map<String, dynamic> header);
}

69
lib/store/store_order.dart

@ -6,8 +6,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/data/user_entity.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/store/store_view/store_activity.dart';
@ -17,6 +17,7 @@ import 'package:huixiang/union/union_view/union_coupon.dart';
import 'package:huixiang/union/union_view/vip.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
@ -26,8 +27,10 @@ class StoreOrderPage extends StatefulWidget {
final Map arguments;
final List<Activity> activitys;
final StoreInfo storeInfo;
final List<ProductList> productList;
StoreOrderPage({this.arguments, this.activitys, this.storeInfo});
StoreOrderPage({this.arguments, this.activitys, this.storeInfo,this.productList});
@override
State<StatefulWidget> createState() {
@ -58,6 +61,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
StoreOrderListPage(
widget.arguments, widget.activitys, storeInfo, controller),
///,
StoreActivity(
widget.arguments,
@ -68,25 +72,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
queryStoreInfo();
}
///
minLogin() {
apiService.minLogin(widget.arguments["id"])
.catchError((onError){}).then((baseData) {
if (baseData != null && baseData.isSuccess) {
UserEntity userEntity = UserEntity.fromJson(baseData.data);
String minToken = userEntity.token;
SharedPreferences.getInstance().then((value) => {
value.setString('minToken', minToken),
});
minService = MinApiService(
Dio(),
context: context,
token: minToken,
);
}
});
}
///
queryStoreInfo() async {
final SharedPreferences value = await SharedPreferences.getInstance();
@ -96,8 +81,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
token: value.getString('token'),
);
minLogin();
BaseData baseData = await apiService
.queryStoreInfo(widget.arguments["id"])
.catchError((error) {
@ -147,9 +130,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
title: Text(
storeInfo != null
? storeInfo.storeName
: '',
"",
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
@ -178,7 +159,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
color: Colors.white,
size: 24,
),
),
@ -458,10 +439,15 @@ class _StoreOrderPage extends State<StoreOrderPage>
right: 16,
),
child: ListView.builder(
itemCount: 2,
itemCount: widget.productList == null ? 0 : widget.productList.length,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return shoppGoodsItem();
// return shoppGoodsItem();
return GestureDetector(
onTap: () {
},
child: shoppGoodsItem(widget.productList[position], position),
);
},
),
),
@ -554,16 +540,19 @@ class _StoreOrderPage extends State<StoreOrderPage>
);
}
Widget shoppGoodsItem() {
///
Widget shoppGoodsItem(ProductList productList,position) {
return Container(
padding: EdgeInsets.only(bottom: 10),
child: Row(
children: [
Image.asset(
"assets/image/default_1.png",
MImage(
productList != null ? productList.skuImg : "",
width: 60,
height:60,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
SizedBox(width: 10),
Expanded(
@ -571,7 +560,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"手工啵啵奶茶",
productList.productName,
style: TextStyle(
color: Colors.black,
fontSize: 12.sp,
@ -582,7 +571,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
Row(
children: [
Text(
"无香精",
productList.skuNameStr,
style: TextStyle(
color: Color(0xFF4C4C4C),
fontSize: 11.sp,
@ -590,14 +579,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
),
),
SizedBox(width: 10),
Text(
"无香精",
style: TextStyle(
color: Color(0xFF4C4C4C),
fontSize: 11.sp,
fontWeight: MyFontWeight.regular,
),
)
],
),
SizedBox(height: 6),
@ -609,7 +590,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
Row(
children: [
Text(
"会员价",
S.of(context).huiyuanjia,
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 13.sp,
@ -617,7 +598,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
),
),
Text(
"¥19.00",
productList.sellPrice,
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 14.sp,

116
lib/store/store_view/store_order_list.dart

@ -1,12 +1,22 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/data/user_entity.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart';
class StoreOrderListPage extends StatefulWidget {
final Map arguments;
@ -44,14 +54,63 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
int isSelected = 0;
int isChoice = 0;
int tempClickIndex = 0;
ApiService apiService;
MinApiService minService;
List<FindMiNiGroupList> appletProducts;
List<ProductListBean> productListBeans;
@override
void initState() {
super.initState();
minLogin();
widget.controller.addListener(() {});
}
///
minLogin() async {
final SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString('token'),
);
apiService.minLogin(widget.arguments["id"])
.catchError((onError){}).then((baseData) {
if (baseData != null && baseData.isSuccess) {
UserEntity userEntity = UserEntity.fromJson(baseData.data);
String minToken = userEntity.token;
SharedPreferences.getInstance().then((value) => {
value.setString('minToken', minToken),
});
minService = MinApiService(
Dio(),
context: context,
token: minToken,
);
appletGoods();
}
});
}
///
appletGoods() async{
BaseData<List<FindMiNiGroupList>> baseData = await minService.findMiNiGroupList({
"id":widget.arguments["id"]
},{
"store_id":widget.arguments["id"],
"tenant":"1175"
});
if (baseData != null && baseData.isSuccess) {
setState(() {
appletProducts = baseData.data;
if(appletProducts.length > 0)
productListBeans = appletProducts[0].productList;
});
}
}
@override
Widget build(BuildContext context) {
return Container(
@ -65,22 +124,20 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
width: 100.w,
height: MediaQuery.of(context).size.height,
child: ListView.builder(
itemCount: 28,
padding: EdgeInsets.only(top: 25, bottom: 50),
itemCount: appletProducts == null ? 0 : appletProducts.length,
controller: widget.controller,
itemBuilder: (context, position) {
return orderItem(position);
return orderItem(appletProducts[position],position);
},
),
),
Container(
width: MediaQuery.of(context).size.width - 100.w,
child: ListView.builder(
itemCount: 15,
padding: EdgeInsets.only(top: 25, bottom: 50),
itemCount: productListBeans == null ? 0 : productListBeans.length,
// controller: widget.controller,
itemBuilder: (context, position) {
return goodsItem();
return goodsItem(productListBeans[position], position);
},
),
),
@ -92,8 +149,9 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
ScrollController controller1 = ScrollController();
ScrollController controller2 = ScrollController();
Widget orderItem(int index) {
Widget orderItem(FindMiNiGroupList findMiNiGroupList,int index) {
return Container(
padding: EdgeInsets.only(top:100.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
@ -102,6 +160,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
onTap:() {
setState(() {
isSelected = index;
productListBeans = findMiNiGroupList.productList;
});
},
child: Container(
@ -109,7 +168,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
alignment: Alignment.center,
padding: EdgeInsets.all(15),
child: Text(
"人气推荐",
findMiNiGroupList.groupName,
textAlign: TextAlign.center,
style: TextStyle(
color: isSelected != index
@ -126,26 +185,28 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
);
}
Widget goodsItem() {
Widget goodsItem(ProductListBean productListBean,position) {
return Container(
color: Colors.white,
padding: EdgeInsets.only(right: 16.w, bottom: 10, top: 10),
padding: EdgeInsets.only(right: 16.w, bottom: 10.h,top:10.h),
child: Row(
children: [
SizedBox(width: 12.w),
Image.asset(
"assets/image/default_1.png",
MImage(
productListBean != null ? productListBean.imgPath : "",
width: 70,
height:70,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
SizedBox(width: 10),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"手工啵啵奶茶",
productListBean.productName,
style: TextStyle(
color: Colors.black,
fontSize: 13.sp,
@ -155,23 +216,18 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
SizedBox(height: 2),
Row(
children: [
Text(
"无香精",
Expanded(child: Text(
productListBean.shortName,
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
color: Color(0xFF4C4C4C),
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
),
),
), ),
SizedBox(width: 10),
Text(
"无香精",
style: TextStyle(
color: Color(0xFF4C4C4C),
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
),
)
],
),
SizedBox(height: 7),
@ -183,7 +239,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
Row(
children: [
Text(
"会员价",
S.of(context).huiyuanjia,
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 10.sp,
@ -191,7 +247,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
),
),
Text(
"¥19.00",
productListBean.applyPrice,
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 11.sp,
@ -203,7 +259,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
Row(
children: [
Text(
"原价",
S.of(context).yuanjia,
style: TextStyle(
color: Color(0xFFA29E9E),
fontSize: 9.sp,
@ -212,7 +268,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
),
SizedBox(width: 10),
Text(
"¥19.00",
productListBean.price,
style: TextStyle(
color: Color(0xFFA29E9E),
fontSize: 10.sp,
@ -231,7 +287,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
},
child: RoundButton(
width: 49.w,
text: "选规格",
text: S.of(context).xuanguige,
textColor: Colors.white,
fontWeight: MyFontWeight.medium,
radius: 11,

Loading…
Cancel
Save