Commit 3ba015d1cd1222472d22e00b6f4c885c6635ec0e

Authored by wdn127929
1 parent 5b8b3cc2

过期的多时段置灰

... ... @@ -10,10 +10,10 @@ class Constant {
*
* 测试账号变更,已经删除0001 账户 代替为 0019!!!!!!!注意!!!!!!!!!!!!!!
* */
static const WXMiniProgramType wxMiniProgramType =
WXMiniProgramType.release; //正式版
// static const WXMiniProgramType wxMiniProgramType =
// WXMiniProgramType.preview; //体验版
// WXMiniProgramType.release; //正式版
static const WXMiniProgramType wxMiniProgramType =
WXMiniProgramType.preview; //体验版
// static const WXMiniProgramType wxMiniProgramType =
// WXMiniProgramType.test; //开发版
... ...
import 'dart:convert';
import 'package:common_utils/common_utils.dart';
class MealListModel {
int? ret;
List<MealListSunModel>? data;
... ... @@ -43,6 +44,7 @@ class MealListSunModel {
List<DateStrModel>? dateStr;
String? status;
String? cdate;
dynamic isFlag;
MealListSunModel(
{this.id,
... ... @@ -51,7 +53,8 @@ class MealListSunModel {
this.dateSel,
this.dateStr,
this.status,
this.cdate});
this.cdate,
this.isFlag});
MealListSunModel.fromJson(Map<String, dynamic> json) {
if (json["id"] is String) {
... ... @@ -86,6 +89,15 @@ class MealListSunModel {
if (json["cdate"] is String) {
cdate = json["cdate"];
}
isFlag = json["is_flag"] ?? '0';
// if (type == '1' && dateSel != null) {
// List<String> date = dateSel!.split(',');
// date.map((item) {
// String timeStr = item + ' ' + "00:00:00";
// int? ddate = DateUtil.getDateMsByTimeStr(timeStr); //筛选日期时间戳
// });
// }
}
Map<String, dynamic> toJson() {
... ... @@ -97,6 +109,7 @@ class MealListSunModel {
_data["date_str"] = dateStr;
_data["status"] = status;
_data["cdate"] = cdate;
_data["is_flag"] = isFlag;
return _data;
}
}
... ...
... ... @@ -567,7 +567,7 @@ class InvicationPageState extends State<InvicationPage>
// position = '请填写职位';
// phone = '请填写电话';
// qiniuUrl = '';
_setCustomerActivityBaseinfo();
// _setCustomerActivityBaseinfo();
}
if (detailModel.reserveImgText != null) {
... ... @@ -1772,38 +1772,38 @@ class InvicationPageState extends State<InvicationPage>
// }
//客户经理添加/修改基本信息
_setCustomerActivityBaseinfo() async {
Map<String, String?> params = {
'sellerid': Provider.of<UserModel>(context, listen: false).user!.sellerid,
"uid": Provider.of<UserModel>(context, listen: false).user!.openid,
"name": user!.sellername,
"photo": user!.sellerimage != '' && user!.sellerimage != null
? user!.sellerimage
: 'http://nosqn.colorcun.com/yd_person.png',
"position": '经理',
'phone': user!.sellerphone ?? ''
};
if (user!.userphone != null) {
params['phone'] = user!.userphone;
}
// _setCustomerActivityBaseinfo() async {
// Map<String, String?> params = {
// 'sellerid': Provider.of<UserModel>(context, listen: false).user!.sellerid,
// "uid": Provider.of<UserModel>(context, listen: false).user!.openid,
// "name": user!.sellername,
// "photo": user!.sellerimage != '' && user!.sellerimage != null
// ? user!.sellerimage
// : 'http://nosqn.colorcun.com/yd_person.png',
// "position": '经理',
// 'phone': user!.sellerphone ?? ''
// };
// if (user!.userphone != null) {
// params['phone'] = user!.userphone;
// }
bool isSuccess = await _baseIndoProvider
.setCustomerActivityBaseinfo(context, params, isShowLoading: false);
// detailModel.baseInfoSunModel = null;
if (isSuccess) {
name = user!.sellername;
qiniuUrl = user!.sellerimage != '' && user!.sellerimage != null
? user!.sellerimage
: 'http://nosqn.colorcun.com/yd_person.png';
// _uploadImageProvider.erweima.qiniuUrl =
// detailModel.baseInfoSunModel.qrcode;
phone = user!.userphone != null ? user!.userphone : '填写电话';
position = '经理';
_getReserveDetailRelationData();
// bool isSuccess = await _baseIndoProvider
// .setCustomerActivityBaseinfo(context, params, isShowLoading: false);
// // detailModel.baseInfoSunModel = null;
// if (isSuccess) {
// name = user!.sellername;
// qiniuUrl = user!.sellerimage != '' && user!.sellerimage != null
// ? user!.sellerimage
// : 'http://nosqn.colorcun.com/yd_person.png';
// // _uploadImageProvider.erweima.qiniuUrl =
// // detailModel.baseInfoSunModel.qrcode;
// phone = user!.userphone != null ? user!.userphone : '填写电话';
// position = '经理';
// _getReserveDetailRelationData();
setState(() {});
}
}
// setState(() {});
// }
// }
// _getCustomerActivityBaseinfo() async {
// Map<String, String?> params = {
... ...
import 'package:flutter/material.dart';
import 'package:one_key/models/meal_list_model.dart';
import 'package:one_key/provider/user_model.dart';
... ... @@ -133,8 +132,6 @@ class _BookTimeSettingListPageState extends State<BookTimeSettingListPage> {
String str = e.replaceAll(' ', '');
List strlist = str.split('-');
return str +
' ${Utils.lunarCalendarHolidaysShow(DateTime(int.parse(strlist[0]), int.parse(strlist[1]), int.parse(strlist[2])))}';
}).join(' ')
... ... @@ -145,8 +142,10 @@ class _BookTimeSettingListPageState extends State<BookTimeSettingListPage> {
return InkWell(
onTap: () {
NavigatorUtil.goBookTimeSettingEditPage(context,
sunModel: sunModel);
if ('${sunModel.isFlag}' != '1') {
NavigatorUtil.goBookTimeSettingEditPage(context,
sunModel: sunModel);
}
},
child: Container(
margin: EdgeInsets.only(
... ... @@ -168,7 +167,8 @@ class _BookTimeSettingListPageState extends State<BookTimeSettingListPage> {
EdgeInsets.symmetric(horizontal: w(12)),
height: w(33),
decoration: BoxDecoration(
color: sunModel.status == '1'
color: sunModel.status == '1' &&
'${sunModel.isFlag}' != '1'
? MyColours.color_438E93
: MyColours.color_999999,
borderRadius: BorderRadius.only(
... ... @@ -185,40 +185,42 @@ class _BookTimeSettingListPageState extends State<BookTimeSettingListPage> {
fontSize: font(18),
color: MyColours.color_ffffff),
),
RoundButton(
width: w(32),
height: w(19),
radius: r(5),
text:
sunModel.status == '1' ? '停用' : '启用',
fontSize: 24,
textColor: MyColours.color_ffffff,
gradientStart: Colors.transparent,
gradientEnd: Colors.transparent,
borderColor: MyColours.color_ffffff,
onPressed: () async {
String status = '';
if (sunModel.status == '1') {
status = '0';
} else {
status = '1';
}
Map<String, String?> params = {
'id': sunModel.id,
'sellerid': sunModel.sellerid,
'type': sunModel.type,
'status': status
};
if ('${sunModel.isFlag}' != '1')
RoundButton(
width: w(32),
height: w(19),
radius: r(5),
text: sunModel.status == '1'
? '停用'
: '启用',
fontSize: 24,
textColor: MyColours.color_ffffff,
gradientStart: Colors.transparent,
gradientEnd: Colors.transparent,
borderColor: MyColours.color_ffffff,
onPressed: () async {
String status = '';
if (sunModel.status == '1') {
status = '0';
} else {
status = '1';
}
Map<String, String?> params = {
'id': sunModel.id,
'sellerid': sunModel.sellerid,
'type': sunModel.type,
'status': status
};
bool sucess = await storeBaseInfoP
.setSellerMealSection(
context, params);
if (sucess) {
getSellerMealSection();
}
},
// onPressed: widget.onPressedSwich,
)
bool sucess = await storeBaseInfoP
.setSellerMealSection(
context, params);
if (sucess) {
getSellerMealSection();
}
},
// onPressed: widget.onPressedSwich,
)
],
),
),
... ...
... ... @@ -1340,7 +1340,7 @@ class InvicationPageSimState extends State<InvicationPageSim>
// position = '请填写职位';
// phone = '请填写电话';
// qiniuUrl = '';
_setCustomerActivityBaseinfo();
// _setCustomerActivityBaseinfo();
}
}
... ...