Commit 82794b7a225f417d573f463377add2666e257e15

Authored by wdn127929
1 parent bf016e00

店内常点

... ... @@ -12,14 +12,14 @@ if (flutterRoot == null) {
}
def flutterVersionCode = "430"
def flutterVersionCode = "431"
if (flutterVersionCode == null) {
flutterVersionCode = '430'
flutterVersionCode = '431'
}
def flutterVersionName = "4.3.0"
def flutterVersionName = "4.3.1"
if (flutterVersionName == null) {
flutterVersionName = '4.3.0'
flutterVersionName = '4.3.1'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
... ...

40.6 KB | W: | H:

44.7 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -46,8 +46,9 @@ class SellerOftenSunModel {
SellerOftenSunModel.fromJson(Map<String, dynamic> json) {
pnum = json['pnum'];
sellerid = json['sellerid'];
price = json['price'];
memberPrice = json['member_price'];
price = json['price'] == null ? null : '${json['price']}';
memberPrice =
json['member_price'] == null ? null : '${json['member_price']}';
id = json['id'];
if (json['cooklist'] != null) {
cooklist = <SellerOftenCooklist>[];
... ...
... ... @@ -209,6 +209,13 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> {
List<MenuSunModel> sellerOftendata =
_planDishProvider.sellerOftendataTemp;
// if(sellerOftendata == null || sellerOftendata.length == 0){
// //接口请求没有值
// if(widget.planCookByRidSunModel.oftenList.length >0){
// }
// }
sellerOftendata.forEach((element) {
// if (element.status == '1') {
// MenuSunModel menuSunModel = MenuSunModel();
... ... @@ -1160,18 +1167,10 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> {
setState(() {
menuSunModel.amount--;
_calculatePrice();
if (_planDishProvider
.menuModelForManager[
_selectIndex]
.className ==
'套餐' ||
_planDishProvider
.menuModelForManager[
_selectIndex] ==
if (className == '套餐' ||
className ==
'我的排菜' ||
_planDishProvider
.menuModelForManager[
_selectIndex] ==
className ==
'店内常点') {
// _calculatePrice();
//套餐菜品总个数
... ... @@ -1315,19 +1314,9 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> {
// menuSunModel.member_price);
// planDishC.text = '${priceSum}';
_calculatePrice();
if (_planDishProvider
.menuModelForManager[
_selectIndex]
.className ==
'套餐' ||
_planDishProvider
.menuModelForManager[
_selectIndex] ==
'我的排菜' ||
_planDishProvider
.menuModelForManager[
_selectIndex] ==
'店内常点') {
if (className == '套餐' ||
className == '我的排菜' ||
className == '店内常点') {
//套餐菜品总个数
//遍历套餐下的菜品分类
menuSunModel.cookList
... ...
... ... @@ -793,7 +793,11 @@ class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> {
// .goOrderAdvanceHomePage(
// context,
// );
await _setGuestInfo();
if (widget.detailEntity.gid != null) {
await _setGuestInfo();
}
// Map<String, String> params = {
// "rid": widget.rid
// // 'is_time': '0'
... ... @@ -805,8 +809,7 @@ class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> {
// if (oid != null) {
//获取成功
Utils.goShareOrderPageToWeChat(context,
title:
'张红经理邀请您点餐了',
title: '张红经理邀请您点餐了',
img:
'http://nosqn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148571.jpg',
rid: widget.rid,
... ... @@ -840,7 +843,9 @@ class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> {
flex: 2,
child: InkWell(
onTap: () async {
await _setGuestInfo();
if (widget.detailEntity.gid != null) {
await _setGuestInfo();
}
//调用排菜信息提交接口
Map<String, String> params = {
'sellerid':
... ...
... ... @@ -371,12 +371,61 @@ class PlanDishProvider extends ChangeNotifier {
menuSunModel.cookList = cookF;
data.add(menuSunModel);
datatemp.add(menuSunModel);
// datatemp.add(menuSunModel);
});
print(data);
sellerOftendata = data;
sellerOftenSunModel.forEach((element) {
// SellerOftenSunModel
MenuSunModel menuSunModel = MenuSunModel();
menuSunModel.id = element.id;
menuSunModel.name = '${element.pnum}人';
// menuSunModel.price = element.menuPrice;
menuSunModel.price = element.price;
menuSunModel.member_price = element.memberPrice ?? element.price;
menuSunModel.unit = '份';
//
List<MenuModel> cookF = [];
element.cooklist.forEach((value) {
MenuModel menuModel = MenuModel();
menuModel.id = value.classid;
menuModel.sellerid = element.sellerid;
menuModel.className = value.className;
menuModel.classLabel = null;
menuModel.order = null;
menuModel.status = '1';
menuModel.classType = null;
menuModel.cookbooklist = [];
value.cooklist.forEach((cook) {
MenuSunModel cookData = MenuSunModel();
cookData.id = cook.cookbookid;
cookData.sellerid = cook.sid;
cookData.cid = cook.classid;
cookData.price = cook.price;
cookData.member_price = cook.memberPrice ?? cook.price;
cookData.name = cook.name;
cookData.unit = cook.unit;
cookData.image = cook.image;
cookData.amount = cook.amount;
// "specid": null,
// "practiceid": null,
// "class_name": "炒菜12",
// "class_order": "2"
menuModel.cookbooklist.add(cookData);
});
cookF.add(menuModel);
});
menuSunModel.cookList = cookF;
datatemp.add(menuSunModel);
});
sellerOftendataTemp = datatemp;
// sellerOftendata
... ...