Commit 09467b0fc0390cdac037abe65c129740fd1ea747

Authored by wdn127929
1 parent 827b7aac

屏蔽我的优惠券,放出来店铺优惠券

... ... @@ -817,8 +817,7 @@ class _CouponDetailPageState extends State<CouponDetailPage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if (couponProvider.couponSunModel.liteQrcode != null &&
(couponProvider.couponSunModel.isType == '4'))
if (couponProvider.couponSunModel.liteQrcode != null)
RoundButton(
text: '生成海报',
width: w(100),
... ... @@ -836,21 +835,29 @@ class _CouponDetailPageState extends State<CouponDetailPage> {
return;
}
// 谁可以发放
// 可以发放的才能分享
if (couponProvider.couponSunModel.uidList
.split(',')
.contains(Provider.of<UserModel>(context,
listen: false)
.user
.openid)) {
if (couponProvider.couponSunModel.isType == '3') {
NavigatorUtil.goCouponPosterPage(
context,
widget.idstr,
couponProvider.couponSunModel.use,
couponProvider.couponSunModel);
} else {
Utils.showToast('您没有此权限');
// 谁可以发放
// 可以发放的才能分享
if (couponProvider.couponSunModel.uidList
.split(',')
.contains(Provider.of<UserModel>(context,
listen: false)
.user
.openid)) {
NavigatorUtil.goCouponPosterPage(
context,
widget.idstr,
couponProvider.couponSunModel.use,
couponProvider.couponSunModel);
} else {
Utils.showToast('您没有此权限');
}
}
},
),
... ... @@ -888,27 +895,27 @@ class _CouponDetailPageState extends State<CouponDetailPage> {
},
),
HEmptyView(30),
if (couponProvider.couponSunModel.isType == '3' ||
couponProvider.couponSunModel.isType == '4')
Expanded(
child: RoundButton(
text: '分享给客户',
height: ScreenUtil().setWidth(80),
radius: ScreenUtil().setWidth(14),
isBold: false,
fontSize: 28,
onPressed: () {
if (couponProvider.couponSunModel.status != '1') {
Utils.showToast('请先启用优惠券后再进行操作!');
return;
}
if ((couponProvider.couponSunModel.isType ==
'3' ||
couponProvider.couponSunModel.isType ==
'4') &&
couponProvider.couponSunModel.status == '1') {
//店铺券
Expanded(
child: RoundButton(
text: '分享给客户',
height: ScreenUtil().setWidth(80),
radius: ScreenUtil().setWidth(14),
isBold: false,
fontSize: 28,
onPressed: () {
if (couponProvider.couponSunModel.status != '1') {
Utils.showToast('请先启用优惠券后再进行操作!');
return;
}
if (couponProvider.couponSunModel.status == '1') {
if (couponProvider.couponSunModel.isType == '3') {
Utils.goShareBuyCouponToWeChat(
context,
widget.idstr,
couponProvider.couponSunModel.isType,
couponProvider.couponSunModel.use,
couponProvider.couponSunModel);
} else {
// 谁可以发放
// 可以发放的才能分享
if (couponProvider.couponSunModel.uidList
... ... @@ -921,25 +928,27 @@ class _CouponDetailPageState extends State<CouponDetailPage> {
Utils.goShareBuyCouponToWeChat(
context,
widget.idstr,
couponProvider.couponSunModel.isType,
couponProvider.couponSunModel.use,
couponProvider.couponSunModel);
} else {
Utils.showToast('您没有此权限');
}
}
// else if (couponProvider.couponSunModel.isType ==
// '2' &&
// couponProvider.couponSunModel.status == '1') {
// // 我的优惠券
// Utils.goShareBuyCouponToWeChatMy(
// context,
// widget.idstr,
// managerName,
// couponProvider.couponSunModel);
// }
},
),
)
}
// else if (couponProvider.couponSunModel.isType ==
// '2' &&
// couponProvider.couponSunModel.status == '1') {
// // 我的优惠券
// Utils.goShareBuyCouponToWeChatMy(
// context,
// widget.idstr,
// managerName,
// couponProvider.couponSunModel);
// }
},
),
)
],
))
]);
... ...
... ... @@ -1606,7 +1606,8 @@ class _CouponEidtPageState extends State<CouponEidtPage> {
}
if (isCommission &&
_commissionControl.text.trim().length == 0) {
(_commissionControl.text.trim().length == 0 ||
_commissionControl.text == '0')) {
Utils.showToast('请填写分享佣金的比例');
return;
}
... ...
... ... @@ -60,499 +60,526 @@ class _CouponItemFState extends State<CouponItemF> {
5,
context);
}
return Column(children: [
Stack(
alignment: widget.from == 'select'
? Alignment.centerLeft
: AlignmentDirectional.topStart,
children: [
Row(
return InkWell(
onTap: widget.onPressed,
child: Column(children: [
Stack(
alignment: widget.from == 'select'
? Alignment.centerLeft
: AlignmentDirectional.topStart,
children: [
HEmptyView(20),
widget.from == 'select'
? InkWell(
onTap: widget.onPressed,
child: Image.asset(
Utils.getImgPath(sunModel.isCheck
? widget.radio
? 'c_mul_select'
: 'select_f'
: widget.radio
? 'c_not_edit'
: 'show_select_f'),
width: w(20),
))
: Container(),
Expanded(
child: Container(
// width: ScreenUtil().setWidth(610),
margin: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(20),
ScreenUtil().setWidth(0),
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(0)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
boxShadow: [
BoxShadow(
spreadRadius: ScreenUtil().setWidth(2),
color: Color.fromRGBO(0, 0, 0, 0.25),
offset: Offset(0, ScreenUtil().setWidth(8)),
blurRadius: ScreenUtil().setWidth(8))
],
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(16)),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: ScreenUtil().setWidth(40),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(24)),
decoration: BoxDecoration(
color: widget.from == 'history'
? MyColours.color_BFC4D4
: widget.from == 'setting'
? MyColours.color_00A870
: notSelect
? sunModel.isType == '1' ||
sunModel.isType == '3' ||
sunModel.isType == '4'
? sunModel.isMarking
? MyColours.color_00A870
: MyColours.color_438E93
: MyColours.color_ED7B2F
: MyColours.color_999999,
borderRadius: BorderRadius.only(
topLeft:
Radius.circular(ScreenUtil().setWidth(16)),
topRight: Radius.circular(
ScreenUtil().setWidth(16)))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
sunModel.isType == '1'
? sunModel.isExamine == '1'
? '店铺优惠券(核销)'
: '店铺优惠券'
: sunModel.isType == '2'
? '我的优惠券'
: sunModel.isType == '3'
? '免费代金券'
: '付费优惠券',
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(24)),
),
InkWell(
onTap: widget.onPressedSwich,
child: Text(
Row(
children: [
HEmptyView(20),
widget.from == 'select'
? Image.asset(
Utils.getImgPath(sunModel.isCheck
? widget.radio
? 'c_mul_select'
: 'select_f'
: widget.radio
? 'c_not_edit'
: 'show_select_f'),
width: w(20),
)
: Container(),
Expanded(
child: Container(
// width: ScreenUtil().setWidth(610),
margin: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(20),
ScreenUtil().setWidth(0),
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(0)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
boxShadow: [
BoxShadow(
spreadRadius: ScreenUtil().setWidth(2),
color: Color.fromRGBO(0, 0, 0, 0.25),
offset: Offset(0, ScreenUtil().setWidth(8)),
blurRadius: ScreenUtil().setWidth(8))
],
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(16)),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: ScreenUtil().setWidth(40),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(24)),
decoration: BoxDecoration(
color: widget.from == 'history'
? MyColours.color_BFC4D4
: widget.from == 'setting'
? MyColours.color_00A870
: notSelect
? sunModel.isType == '1' ||
sunModel.isType == '3' ||
sunModel.isType == '4'
? sunModel.isMarking
? MyColours.color_00A870
: MyColours.color_438E93
: MyColours.color_ED7B2F
: MyColours.color_999999,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(
ScreenUtil().setWidth(16)),
topRight: Radius.circular(
ScreenUtil().setWidth(16)))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
sunModel.isType == '1'
? sunModel.isExamine == '1'
? '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张'
: '创建人:${sunModel.nickname ?? sunModel.uid} 被领取:${sunModel.receiveNum}张'
? '付费优惠券'
: sunModel.isType == '2'
? '被领取:${sunModel.receiveNum}张'
: sunModel.receiveNum == null
? ''
: '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张',
maxLines: 1,
overflow: TextOverflow.ellipsis,
? '我的优惠券'
: sunModel.isType == '3'
? '免费代金券'
: '付费优惠券',
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(20))),
fontSize: ScreenUtil().setSp(24)),
),
InkWell(
onTap: widget.onPressedSwich,
child: Text(
sunModel.isType == '1'
? sunModel.isExamine == '1'
? sunModel.receiveNum == null
? ''
: '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张'
: '创建人:${sunModel.nickname ?? sunModel.uid} 被领取:${sunModel.receiveNum}张'
: sunModel.isType == '2'
? '被领取:${sunModel.receiveNum}张'
: sunModel.receiveNum == null
? ''
: '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(20))),
),
],
),
],
),
),
Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(24 * 2),
ScreenUtil().setWidth(9 * 2),
ScreenUtil().setWidth(10),
ScreenUtil().setWidth(20)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
),
Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(24 * 2),
ScreenUtil().setWidth(9 * 2),
ScreenUtil().setWidth(10),
ScreenUtil().setWidth(20)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
Row(
children: [
Container(
// width: ScreenUtil()
// .setWidth(232 * 2),
child: Container(
height: ScreenUtil().setWidth(25 * 2),
constraints: BoxConstraints(
maxWidth: ScreenUtil().setWidth(190)),
child: Text(
sunModel.aname,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: widget.from == 'history'
? MyColours.color_BFC4D4
: notSelect
? MyColours.color_515151
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(36),
fontWeight: FontWeight.bold),
),
)),
Container(
height: ScreenUtil().setWidth(14 * 2),
width: ScreenUtil().setWidth(232 * 2),
child: Text(
sunModel.isType == '1' ||
sunModel.isType == '2'
? '${sunModel.desc}'
: sunModel.desc == '0'
? ''
: '消费满${sunModel.desc}元可用',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: widget.from == 'history'
? MyColours.color_BFC4D4
: notSelect
? MyColours.color_515151
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(20),
)),
),
],
)),
if (widget.from == 'select' &&
sunModel.isType == '3' &&
widget.radio)
Row(
children: [
InkWell(
onTap: () {
if (sunModel.number == 0) {
return;
}
sunModel.number--;
sunModel.numberC.text =
'${sunModel.number}';
},
child: Container(
height: w(40),
padding: EdgeInsets.symmetric(
horizontal: w(10)),
child: Image.asset(
Utils.getImgPath('plan_dish_minus'),
width: w(8),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
// width: ScreenUtil()
// .setWidth(232 * 2),
child: Container(
height: ScreenUtil().setWidth(25 * 2),
constraints: BoxConstraints(
maxWidth:
ScreenUtil().setWidth(190)),
child: Text(
sunModel.aname,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: widget.from == 'history'
? MyColours.color_BFC4D4
: notSelect
? MyColours.color_515151
: MyColours
.color_999999,
fontSize:
ScreenUtil().setSp(36),
fontWeight: FontWeight.bold),
),
)),
Container(
height: ScreenUtil().setWidth(14 * 2),
width: ScreenUtil().setWidth(232 * 2),
child: Text(
sunModel.isType == '1' ||
sunModel.isType == '2'
? '${sunModel.desc}'
: sunModel.desc == '0'
? ''
: '消费满${sunModel.desc}元可用',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: widget.from == 'history'
? MyColours.color_BFC4D4
: notSelect
? MyColours.color_515151
: MyColours
.color_999999,
fontSize:
ScreenUtil().setSp(20),
)),
),
),
Container(
// constraints: BoxConstraints(
// minWidth: w(34),
// ),
width: w(30),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(r(5)),
border: Border.all(
width: w(1),
color:
MyColours.color_438E93)),
// constraints: BoxConstraints(minWidth: w(20)),
child: TextField(
maxLines: 1,
controller: sunModel.numberC,
// focusNode: _focusNode,
// autofocus: true,
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(r'[0-9]')),
],
style: TextStyle(
color: MyColours.color_438E93,
fontSize: font(11)),
textAlign: TextAlign.center,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "数量",
isCollapsed: true,
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: font(11),
],
)),
if (widget.from == 'select' &&
sunModel.isType == '3' &&
widget.radio)
Row(
children: [
InkWell(
onTap: () {
if (sunModel.number == 0) {
return;
}
sunModel.number--;
sunModel.numberC.text =
'${sunModel.number}';
},
child: Container(
height: w(40),
padding: EdgeInsets.symmetric(
horizontal: w(10)),
child: Image.asset(
Utils.getImgPath(
'plan_dish_minus'),
width: w(8),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(
borderSide: BorderSide.none),
contentPadding: EdgeInsets.only(
top: w(2), bottom: w(2)),
),
keyboardType:
TextInputType.numberWithOptions(
decimal: true),
textInputAction:
TextInputAction.done,
),
Container(
// constraints: BoxConstraints(
// minWidth: w(34),
// ),
width: w(30),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(
r(5)),
border: Border.all(
width: w(1),
color: MyColours
.color_438E93)),
// constraints: BoxConstraints(minWidth: w(20)),
child: TextField(
maxLines: 1,
controller: sunModel.numberC,
// focusNode: _focusNode,
// autofocus: true,
onChanged: (value) {
// bool isNumber = Utils.isNumeric(
// value); //判断输入的内容是否是数字
// if (!isNumber) {
// Utils.showToast('请输入数字');
// pNumC.text = '';
// return;
// } else {
if (value != null &&
value != '') {
if (int.parse(value) >
int.parse(
sunModel.grantNum)) {
Utils.showToast(
'最大数量限制为${sunModel.grantNum}');
sunModel.numberC.text =
sunModel.grantNum;
sunModel.number = int.parse(
sunModel.grantNum);
inputFormatters: [
FilteringTextInputFormatter
.allow(RegExp(r'[0-9]')),
],
return;
}
sunModel.number =
int.parse(value);
}
style: TextStyle(
color:
MyColours.color_438E93,
fontSize: font(11)),
textAlign: TextAlign.center,
// textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "数量",
isCollapsed: true,
hintStyle: TextStyle(
color:
MyColours.color_999999,
fontSize: font(11),
),
// isCollapsed:
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
border: OutlineInputBorder(
borderSide:
BorderSide.none),
contentPadding:
EdgeInsets.only(
top: w(2),
bottom: w(2)),
),
keyboardType: TextInputType
.numberWithOptions(
decimal: true),
textInputAction:
TextInputAction.done,
// }
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(
FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
onChanged: (value) {
// bool isNumber = Utils.isNumeric(
// value); //判断输入的内容是否是数字
// if (!isNumber) {
// Utils.showToast('请输入数字');
// pNumC.text = '';
// return;
// } else {
if (value != null &&
value != '') {
if (int.parse(value) >
int.parse(sunModel
.grantNum)) {
Utils.showToast(
'最大数量限制为${sunModel.grantNum}');
sunModel.numberC.text =
sunModel.grantNum;
sunModel.number =
int.parse(sunModel
.grantNum);
return;
}
sunModel.number =
int.parse(value);
}
// }
// setState(() {});
// _searchSellerLocation();
// customerProvider.searchData(value);
},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(
FocusNode()); //点击空白处隐藏键盘
// contantShowModel.searchData(
// contantShowModel.controller.text);
// _searchSellerLocation();
// _focusNode.unfocus();
},
)),
InkWell(
onTap: () {
if (sunModel.number ==
int.parse(
sunModel.grantNum)) {
Utils.showToast('已达到最大数量限制');
return;
}
sunModel.number++;
sunModel.numberC.text =
'${sunModel.number}';
},
)),
InkWell(
onTap: () {
if (sunModel.number ==
int.parse(sunModel.grantNum)) {
Utils.showToast('已达到最大数量限制');
return;
}
sunModel.number++;
sunModel.numberC.text =
'${sunModel.number}';
},
child: Container(
height: w(40),
padding: EdgeInsets.only(
left: w(10), right: w(10)),
child: Image.asset(
Utils.getImgPath('plan_dish_add'),
width: w(8),
child: Container(
height: w(40),
padding: EdgeInsets.only(
left: w(10), right: w(10)),
child: Image.asset(
Utils.getImgPath(
'plan_dish_add'),
width: w(8),
),
),
),
),
],
),
],
),
if (widget.from == 'setting' &&
sunModel.isType == '3')
Padding(
padding: EdgeInsets.only(right: w(20)),
child: Text(
'${sunModel.number}张',
style: TextStyle(
fontSize: font(12),
fontWeight: FontWeight.bold,
color: MyColours.color_438E93),
))
if (widget.from == 'setting' &&
sunModel.isType == '3')
Padding(
padding:
EdgeInsets.only(right: w(20)),
child: Text(
'${sunModel.number}张',
style: TextStyle(
fontSize: font(12),
fontWeight: FontWeight.bold,
color: MyColours.color_438E93),
))
],
),
VEmptyView(16),
(ObjectUtil.isNotEmpty(sunModel.stime) &&
sunModel.stime != '0') ||
(ObjectUtil.isNotEmpty(
sunModel.etime) &&
sunModel.etime != '0')
? Container(
child: Text(
'使用时间:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',
style: TextStyle(
color: widget.from == 'history'
? MyColours.color_BFC4D4
: MyColours.color_999999,
fontSize:
ScreenUtil().setSp(20))),
)
: Container(),
],
),
VEmptyView(16),
(ObjectUtil.isNotEmpty(sunModel.stime) &&
sunModel.stime != '0') ||
(ObjectUtil.isNotEmpty(sunModel.etime) &&
sunModel.etime != '0')
? Container(
child: Text(
'使用时间:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',
style: TextStyle(
color: widget.from == 'history'
? MyColours.color_BFC4D4
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(20))),
)
: Container(),
],
),
// widget.from == 'select'
// ? widget.showCheck
// ? Positioned(
// right: 0,
// top: ScreenUtil().setWidth(20),
// child: Image.asset(
// Utils.getImgPath(widget.couponSonModel.isCheck
// ? 'check_r'
// : 'check_un'),
// width: ScreenUtil().setWidth(40),
// height: ScreenUtil().setWidth(40),
// ))
// : Container()
// :
),
ObjectUtil.isNotEmpty(sunModel.explain)
? const MySeparator(
width: 3, color: MyColours.color_f3f3f3)
: SizedBox(),
ObjectUtil.isNotEmpty(sunModel.explain)
? InkWell(
onTap: () {
if (explainH > 19) {
setState(() {
widget.couponSonModel.showText =
!widget.couponSonModel.showText;
});
}
},
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: widget.from == 'history'
? MyColours.color_ffffff
: notSelect
// widget.from == 'select'
// ? widget.showCheck
// ? Positioned(
// right: 0,
// top: ScreenUtil().setWidth(20),
// child: Image.asset(
// Utils.getImgPath(widget.couponSonModel.isCheck
// ? 'check_r'
// : 'check_un'),
// width: ScreenUtil().setWidth(40),
// height: ScreenUtil().setWidth(40),
// ))
// : Container()
// :
),
ObjectUtil.isNotEmpty(sunModel.explain)
? const MySeparator(
width: 3, color: MyColours.color_f3f3f3)
: SizedBox(),
ObjectUtil.isNotEmpty(sunModel.explain)
? InkWell(
onTap: () {
if (explainH > 19) {
setState(() {
widget.couponSonModel.showText =
!widget.couponSonModel.showText;
});
}
},
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: widget.from == 'history'
? MyColours.color_ffffff
: MyColours.color_FAFAFA,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(
ScreenUtil().setWidth(20)),
bottomRight: Radius.circular(
ScreenUtil().setWidth(20)))),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
widget.couponSonModel.showText
? Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(24 * 2),
ScreenUtil().setWidth(14),
ScreenUtil().setWidth(0),
ScreenUtil().setWidth(14)),
width: ScreenUtil().screenWidth -
ScreenUtil().setWidth(92 * 2),
child: Text(
'说明:${sunModel.explain}',
maxLines: 5,
style: TextStyle(
color: widget.from ==
'history'
? MyColours
.color_BFC4D4
: MyColours
.color_999999,
fontSize: ScreenUtil()
.setSp(20))),
)
: Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(24 * 2),
ScreenUtil().setWidth(14),
ScreenUtil().setWidth(0),
ScreenUtil().setWidth(14)),
width: ScreenUtil().screenWidth -
ScreenUtil()
.setWidth(92 * 2) +
ScreenUtil().setWidth(20),
child: Text(
'说明:${sunModel.explain}',
maxLines: 1,
overflow: TextOverflow.fade,
softWrap: false,
style: TextStyle(
color: widget.from ==
'history'
? MyColours
.color_BFC4D4
: MyColours
.color_999999,
fontSize: ScreenUtil()
.setSp(20))),
),
Spacer(),
explainH > 19
? Container(
margin: EdgeInsets.only(
top:
ScreenUtil().setWidth(10),
right: ScreenUtil()
.setWidth(16)),
child: Image.asset(
!widget.couponSonModel
.showText
? Utils.getImgPath(
'quan_down_f')
: Utils.getImgPath(
'quan_up_f'),
: notSelect
? MyColours.color_ffffff
: MyColours.color_FAFAFA,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(
ScreenUtil().setWidth(20)),
bottomRight: Radius.circular(
ScreenUtil().setWidth(20)))),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
widget.couponSonModel.showText
? Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil()
.setWidth(24 * 2),
ScreenUtil().setWidth(14),
ScreenUtil().setWidth(0),
ScreenUtil()
.setWidth(14)),
width:
ScreenUtil().setWidth(28),
height: ScreenUtil()
.setWidth(28)),
)
: Container(),
HEmptyView(14)
],
)),
)
: Container(),
VEmptyView(32),
],
),
)),
],
),
Positioned(
right: ScreenUtil().setWidth(100),
top: ScreenUtil().setWidth(37 * 2),
child: widget.showBtn
? RoundButton(
width: widget.from == 'history'
? ScreenUtil().setWidth(44 * 2)
: ScreenUtil().setWidth(32 * 2),
height: ScreenUtil().setWidth(21 * 2),
radius: ScreenUtil().setWidth(10),
text: widget.from == 'history'
? '已过期'
: notSelect
? '停用'
: '启用',
fontSize: 24,
textColor: widget.from == 'history'
? MyColours.color_BFC4D4
: notSelect
? MyColours.color_438E93
: MyColours.color_999999,
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: widget.from == 'history'
? MyColours.color_BFC4D4
: notSelect
? MyColours.color_438E93
: MyColours.color_999999,
onPressed: widget.onPressedSwich,
)
: Container())
]),
VEmptyView(32)
]);
ScreenUtil().screenWidth -
ScreenUtil()
.setWidth(92 * 2),
child: Text(
'说明:${sunModel.explain}',
maxLines: 5,
style: TextStyle(
color: widget.from ==
'history'
? MyColours
.color_BFC4D4
: MyColours
.color_999999,
fontSize: ScreenUtil()
.setSp(20))),
)
: Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil()
.setWidth(24 * 2),
ScreenUtil().setWidth(14),
ScreenUtil().setWidth(0),
ScreenUtil()
.setWidth(14)),
width: ScreenUtil()
.screenWidth -
ScreenUtil()
.setWidth(92 * 2) +
ScreenUtil().setWidth(20),
child: Text(
'说明:${sunModel.explain}',
maxLines: 1,
overflow:
TextOverflow.fade,
softWrap: false,
style: TextStyle(
color: widget.from ==
'history'
? MyColours
.color_BFC4D4
: MyColours
.color_999999,
fontSize: ScreenUtil()
.setSp(20))),
),
Spacer(),
explainH > 19
? Container(
margin: EdgeInsets.only(
top: ScreenUtil()
.setWidth(10),
right: ScreenUtil()
.setWidth(16)),
child: Image.asset(
!widget.couponSonModel
.showText
? Utils.getImgPath(
'quan_down_f')
: Utils.getImgPath(
'quan_up_f'),
width: ScreenUtil()
.setWidth(28),
height: ScreenUtil()
.setWidth(28)),
)
: Container(),
HEmptyView(14)
],
)),
)
: Container(),
VEmptyView(32),
],
),
)),
],
),
Positioned(
right: ScreenUtil().setWidth(100),
top: ScreenUtil().setWidth(37 * 2),
child: widget.showBtn
? RoundButton(
width: widget.from == 'history'
? ScreenUtil().setWidth(44 * 2)
: ScreenUtil().setWidth(32 * 2),
height: ScreenUtil().setWidth(21 * 2),
radius: ScreenUtil().setWidth(10),
text: widget.from == 'history'
? '已过期'
: notSelect
? '停用'
: '启用',
fontSize: 24,
textColor: widget.from == 'history'
? MyColours.color_BFC4D4
: notSelect
? MyColours.color_438E93
: MyColours.color_999999,
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: widget.from == 'history'
? MyColours.color_BFC4D4
: notSelect
? MyColours.color_438E93
: MyColours.color_999999,
onPressed: widget.onPressedSwich,
)
: Container())
]),
VEmptyView(32)
]));
}
}
... ...
... ... @@ -306,11 +306,26 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> {
Expanded(
child: RoundButton(
onPressed: () async {
Map temp = {
'coupon': selectDataList,
};
if (Navigator.canPop(context)) {
Navigator.pop(context, temp);
//如果是免费的优惠券,有个数的,数量为0的时候提示
bool can = true;
for (int i = 0; i < selectDataList.length; i++) {
CouponSunModel element = selectDataList[i];
if (element.isType == '3' &&
element.isCheck &&
element.number == 0) {
Utils.showToast(
'请输入【${element.aname}】的数量');
can = false;
break;
}
}
if (can) {
Map temp = {
'coupon': selectDataList,
};
if (Navigator.canPop(context)) {
Navigator.pop(context, temp);
}
}
},
text: '确定选择${selectDataList.length}个优惠券',
... ...
... ... @@ -223,6 +223,17 @@ class CouponProvider with ChangeNotifier {
}
couponList = CouponModel.fromJson(baseResp.responseData).data;
// 屏蔽type==2 的券 我的优惠券
List<CouponSunModel> temp = [];
for (int i = 0; i < couponList.length; i++) {
if (couponList[i].isType == '2' ||
(couponList[i].isType == '1' && couponList[i].isExamine != '1')) {
} else {
temp.add(couponList[i]);
}
}
couponList = temp;
} else {
if (isShowLoading) {
state = PageState.ConnectivityError;
... ... @@ -322,6 +333,17 @@ class CouponProvider with ChangeNotifier {
pageStateHistory = PageState.Success;
}
couponListHistory = CouponModel.fromJson(baseResp.responseData).data;
// 屏蔽type==2 的券 我的优惠券
List<CouponSunModel> temp = [];
for (int i = 0; i < couponListHistory.length; i++) {
if (couponListHistory[i].isType == '2' ||
(couponListHistory[i].isType == '1' &&
couponListHistory[i].isExamine != '1')) {
} else {
temp.add(couponListHistory[i]);
}
}
couponListHistory = temp;
notifyListeners();
} else {
pageStateHistory = PageState.ConnectivityError;
... ... @@ -367,6 +389,18 @@ class CouponProvider with ChangeNotifier {
pageStateSelect = PageState.Success;
}
couponListSelect = CouponModel.fromJson(baseResp.responseData).data;
// 屏蔽type==2 的券 我的优惠券
List<CouponSunModel> temp = [];
for (int i = 0; i < couponListSelect.length; i++) {
if (couponListSelect[i].isType == '2' ||
(couponListSelect[i].isType == '1' &&
couponListSelect[i].isExamine != '1')) {
} else {
temp.add(couponListSelect[i]);
}
}
couponListSelect = temp;
// if (hasModify) {
// //已经绑定
// List<CouponSunModel> temp = [];
... ... @@ -434,6 +468,17 @@ class CouponProvider with ChangeNotifier {
pageStateSelect = PageState.Success;
}
couponListSelect = CouponModel.fromJson(baseResp.responseData).data;
// 屏蔽type==2 的券 我的优惠券
List<CouponSunModel> temp = [];
for (int i = 0; i < couponListSelect.length; i++) {
if (couponListSelect[i].isType == '2' ||
(couponListSelect[i].isType == '1' &&
couponListSelect[i].isExamine != '1')) {
} else {
temp.add(couponListSelect[i]);
}
}
couponListSelect = temp;
// List<CouponSunModel> temp = [];
// for (int i = 0; i < couponListSelect.length; i++) {
... ... @@ -490,14 +535,23 @@ class CouponProvider with ChangeNotifier {
pageStateSelect = PageState.Success;
}
couponListSelect = CouponModel.fromJson(baseResp.responseData).data;
// 屏蔽type==2 的券 我的优惠券
List<CouponSunModel> temp1 = [];
for (int i = 0; i < couponListSelect.length; i++) {
if (couponListSelect[i].isType == '2' ||
(couponListSelect[i].isType == '1' &&
couponListSelect[i].isExamine != '1')) {
} else {
temp1.add(couponListSelect[i]);
}
}
couponListSelect = temp1;
// if (hasModify) {
// //已经绑定
List<CouponSunModel> temp = [];
for (int i = 0; i < couponListSelect.length; i++) {
if (couponListSelect[i].isType == '1' &&
couponListSelect[i].isExamine == '1' &&
couponListSelect[i].status == '1') {
//istype == 1 店铺券 isExamine == '1 可核销券
if (couponListSelect[i].status == '1') {
//免费券、可核销店铺券、付费券
temp.add(couponListSelect[i]);
}
}
... ... @@ -558,6 +612,17 @@ class CouponProvider with ChangeNotifier {
pageStateSelect = PageState.Success;
}
couponListSelect = CouponModel.fromJson(baseResp.responseData).data;
// 屏蔽type==2 的券 我的优惠券
List<CouponSunModel> temp = [];
for (int i = 0; i < couponListSelect.length; i++) {
if (couponListSelect[i].isType == '2' ||
(couponListSelect[i].isType == '1' &&
couponListSelect[i].isExamine != '1')) {
} else {
temp.add(couponListSelect[i]);
}
}
couponListSelect = temp;
if (hasModify) {
//已经绑定
List<CouponSunModel> temp = [];
... ...
... ... @@ -123,7 +123,7 @@ class CustomerProvider extends ChangeNotifier {
PageState pageStateMonth = PageState.Loading;
PageState pageStateDay = PageState.Loading;
PageState pageStateBirthday = PageState.Loading;
PageState pageStateBirthday = PageState.Loading;
bool isrepair = false;
bool isselfphone = false;
... ... @@ -144,8 +144,8 @@ class CustomerProvider extends ChangeNotifier {
GetExportInfoSunModel exportInfoSunModel; //预订导出数据
SellerGuestSunModel sellerGuestData;
PageState pageStateBirthdaySetting = PageState.Loading;
List<SaiYouYunBirthdaySunModel> saiYouYunBirData = [];
PageState pageStateBirthdaySetting = PageState.Loading;
List<SaiYouYunBirthdaySunModel> saiYouYunBirData = [];
/// 获取全店日订单统计数据
Future<DayStaticsSunModel> getSellerCountsListByDay(
... ... @@ -178,13 +178,14 @@ class CustomerProvider extends ChangeNotifier {
return dayStaticsData;
}
///客户生日提醒短信模板
///客户生日提醒短信模板
Future<bool> setSaiYouYunBirthday(BuildContext context, Map<String, String> params,
Future<bool> setSaiYouYunBirthday(
BuildContext context, Map<String, String> params,
{isShowLoading = true}) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.post, HttpUrl.set_sai_you_yun_birthday,
.request<dynamic>(
context, Method.post, HttpUrl.set_sai_you_yun_birthday,
data: params, showLoading: false)
.catchError((error) {
print(error.toString());
... ... @@ -204,13 +205,8 @@ class CustomerProvider extends ChangeNotifier {
return false;
}
/// 获取客户生日提醒短信模板配置内容
getSaiYouYunBirthdayTemp(
BuildContext context, Map<String, String> params,
/// 获取客户生日提醒短信模板配置内容
getSaiYouYunBirthdayTemp(BuildContext context, Map<String, String> params,
{isShowLoading = true}) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(
... ... @@ -227,7 +223,8 @@ class CustomerProvider extends ChangeNotifier {
});
if (baseResp == null) return null;
if (baseResp.code == Constant.status_success) {
saiYouYunBirData = SaiYouYunBirthdayModel.fromJson(baseResp.responseData).data;
saiYouYunBirData =
SaiYouYunBirthdayModel.fromJson(baseResp.responseData).data;
pageStateBirthday = PageState.Success;
} else {
if (baseResp != null) {
... ... @@ -562,6 +559,17 @@ class CustomerProvider extends ChangeNotifier {
if (baseResp == null) return [];
if (baseResp.code == Constant.status_success) {
couponListSelect = CouponModel.fromJson(baseResp.responseData).data;
// 屏蔽type==2 的券 我的优惠券
List<CouponSunModel> temp = [];
for (int i = 0; i < couponListSelect.length; i++) {
if (couponListSelect[i].isType == '2' ||
(couponListSelect[i].isType == '1' &&
couponListSelect[i].isExamine != '1')) {
} else {
temp.add(couponListSelect[i]);
}
}
couponListSelect = temp;
notifyListeners();
} else {
if (baseResp != null) {
... ...
... ... @@ -174,6 +174,7 @@ class NavigatorUtil {
return _navigateTo(context,
"${Routes.photo_manager_page}?rid=$rid&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose");
}
/// 选择桌位——一次性接口获取
static Future goSelectTableFPageOrRerserve(
BuildContext context, String rid, int dateTime, String ddate_slot,
... ... @@ -193,6 +194,7 @@ class NavigatorUtil {
return _navigateTo(context,
"${Routes.select_table_f_or_reserve}?rid=$rid&ridFeast=$ridFeast&tid=$tid&dateTime=$dateTime&fromPage=$fromPage&ddate_slot=$ddate_slot&canChoose=$canChoose&hmS=$hmS&hmE=$hmE&source=$source");
}
/// 选择桌位——方硕新修改的选择桌位页面
static Future goSelectTableFPage(
BuildContext context, String rid, int dateTime, String ddate_slot,
... ... @@ -274,11 +276,10 @@ class NavigatorUtil {
"${Routes.change_detail_f}?detail=${FluroConvertUtils.object2string(detailEntity)}&rid=$rid&back=${back}",
replace: replace);
}
/// 变更预订——方硕新修改页面
/// 变更预订——方硕新修改页面
static void goNoteBookChangeFPageOnly(
BuildContext context,
String rid, {
replace = false,
bool back = false,
... ... @@ -287,8 +288,7 @@ class NavigatorUtil {
// //内部预订
// detailEntity.isSetDdate = "1";
// }
_navigateTo(context,
"${Routes.change_detail_f_only}?rid=$rid&back=${back}",
_navigateTo(context, "${Routes.change_detail_f_only}?rid=$rid&back=${back}",
replace: replace);
}
... ... @@ -418,8 +418,6 @@ class NavigatorUtil {
String position, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.base_info_personnal_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}&position=${Uri.encodeComponent(position)}",
replace: replace);
... ... @@ -567,9 +565,7 @@ class NavigatorUtil {
replace: replace);
}
/// 包间类型置满
/// 包间类型置满
static Future<dynamic> goStoreTypeFillManagePageSim(BuildContext context,
{replace = false}) {
return _navigateTo(context, "${Routes.store_type_fill_manage_page_sim}",
... ... @@ -579,9 +575,7 @@ class NavigatorUtil {
/// 短信余额显示
static Future<dynamic> goSmsManagePage(BuildContext context,
{replace = false}) {
return _navigateTo(context,
"${Routes.sms_manager_page}",
replace: replace);
return _navigateTo(context, "${Routes.sms_manager_page}", replace: replace);
}
/// 短信充值
... ... @@ -889,8 +883,10 @@ class NavigatorUtil {
/// 我的客情列表
static Future<dynamic> goMyCustomerListPage(
BuildContext context, FromPage fromPage, String uid,
{replace = false, bool needBtn = false, String index = '0',String labels = ''}) {
{replace = false,
bool needBtn = false,
String index = '0',
String labels = ''}) {
return _navigateTo(context,
"${Routes.my_customer_list_page}?fromPage=${FluroConvertUtils.enumToString(fromPage)}&index=${index}&uid=${uid}&labels=${Uri.encodeComponent(labels)}",
replace: replace);
... ... @@ -931,15 +927,12 @@ class NavigatorUtil {
}
/// 我的创建营销
static Future<dynamic> goMyMakeMarkingPage(
BuildContext context,
String uid, {
replace = false,
SelfList selfList,
FromPage fromPage,
String homeGid = '',
String labels = ''
}) {
static Future<dynamic> goMyMakeMarkingPage(BuildContext context, String uid,
{replace = false,
SelfList selfList,
FromPage fromPage,
String homeGid = '',
String labels = ''}) {
return _navigateTo(context,
"${Routes.my_make_marketing_page}?selfList=${FluroConvertUtils.object2string(selfList)}&fromPage=${FluroConvertUtils.enumToString(fromPage)}&homeGid=$homeGid&uid=$uid&labels=${Uri.encodeComponent(labels)}",
replace: replace);
... ... @@ -1439,7 +1432,7 @@ class NavigatorUtil {
replace: replace);
}
///经理排菜-首页
///经理排菜-首页
///
static Future<dynamic> goOrderAdvanceHomePage(
... ... @@ -1723,7 +1716,7 @@ class NavigatorUtil {
///预订安排通知定制------优惠券选择
static Future<dynamic> goMarkingCouponSelectPage(
BuildContext context,String type, Map object,
BuildContext context, String type, Map object,
{replace = false, bool mulSelect = true}) {
return _navigateTo(context,
"${Routes.marking_coupon_select_page}?object=${FluroConvertUtils.object2string(object)}&type=$type&mulSelect=${mulSelect}",
... ... @@ -1758,14 +1751,13 @@ class NavigatorUtil {
}
///我的------存酒详情
static Future<dynamic> goWineDetailPage(
BuildContext context, String idstr,
{bool isStoreWine,replace = false, bool onlyShow = false}) {
if(isStoreWine == null){
return _navigateTo(context,
"${Routes.wine_detail_page}?idstr=$idstr&onlyShow=${onlyShow}",
replace: replace);
}
static Future<dynamic> goWineDetailPage(BuildContext context, String idstr,
{bool isStoreWine, replace = false, bool onlyShow = false}) {
if (isStoreWine == null) {
return _navigateTo(context,
"${Routes.wine_detail_page}?idstr=$idstr&onlyShow=${onlyShow}",
replace: replace);
}
return _navigateTo(context,
"${Routes.wine_detail_page}?idstr=$idstr&isStoreWine=${isStoreWine}&onlyShow=${onlyShow}",
replace: replace);
... ... @@ -1774,17 +1766,20 @@ class NavigatorUtil {
///我的------存酒记录
static Future<dynamic> goOutStoreRecordPage(
BuildContext context,
String idstr, bool isStoreWine,{
String idstr,
bool isStoreWine, {
replace = false,
}) {
return _navigateTo(context, "${Routes.out_store_record_page}?idstr=$idstr&isStoreWine=${isStoreWine}",
return _navigateTo(context,
"${Routes.out_store_record_page}?idstr=$idstr&isStoreWine=${isStoreWine}",
replace: replace);
}
///我的------申请出库
static Future<dynamic> goApplyOutStorePage(
BuildContext context,
WineManageModel wineManageDetail,bool isStoreWine, {
WineManageModel wineManageDetail,
bool isStoreWine, {
Map object,
replace = false,
}) {
... ... @@ -1810,7 +1805,8 @@ class NavigatorUtil {
///我的------出库记录列表详情页
static Future<dynamic> goOutStoreRecordDetailPage(
BuildContext context,
OutWineRecordSunModel outWineRecordSunModel,bool isStoreWine, {
OutWineRecordSunModel outWineRecordSunModel,
bool isStoreWine, {
replace = false,
}) {
return _navigateTo(context,
... ... @@ -2110,7 +2106,6 @@ class NavigatorUtil {
replace: replace);
}
/// 邀请函主题选择
static Future<dynamic> goInvitationThemeHomePageSim(
BuildContext context, {
... ... @@ -2130,8 +2125,8 @@ class NavigatorUtil {
"${Routes.invitation_theme_home_preview_page}?themeSunModel=${FluroConvertUtils.object2string(themeSunModel)}",
replace: replace);
}
/// 邀请函主题选择预览
/// 邀请函主题选择预览
static Future<dynamic> goInvitationThemeHomePreviewPageSim(
BuildContext context,
SellerTemplateColorListSunModel themeSunModel, {
... ... @@ -2145,7 +2140,6 @@ class NavigatorUtil {
///预订----添加订金
static Future<dynamic> goBookDepositPage(BuildContext context, String rid,
{replace = false,
bool isNew = true,
BookDepositSunModel bookDepositModel}) {
return _navigateTo(context,
... ... @@ -2216,6 +2210,11 @@ class NavigatorUtil {
CouponSunModel couponSunModel, {
replace = false,
}) {
if (use == null) {
return _navigateTo(context,
"${Routes.coupon_poster_page}?id=$id&couponSunModel=${FluroConvertUtils.object2string(couponSunModel)}",
replace: replace);
}
return _navigateTo(context,
"${Routes.coupon_poster_page}?id=$id&use=${FluroConvertUtils.object2string(use)}&couponSunModel=${FluroConvertUtils.object2string(couponSunModel)}",
replace: replace);
... ... @@ -2249,105 +2248,82 @@ class NavigatorUtil {
replace: replace);
}
//预订信息模块设置-自定义图文默认
//预订信息模块设置-自定义图文默认
static Future<dynamic> goPaymentSettingPage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.payment_setting_page}",
replace: replace);
}
//小程序通知卡片样式
//小程序通知卡片样式
static Future<dynamic> goMiniprogramSettingPage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.mini_program_setting_page}",
replace: replace);
}
//存酒设置模版
//存酒设置模版
static Future<dynamic> goWineSettingMsgPage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.wine_setting_msg_page}",
replace: replace);
}
///多时段预订设置列表
static Future<dynamic> goBookTimeSettingListPage(
///多时段预订设置列表
static Future<dynamic> goBookTimeSettingListPage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.book_time_setting_list_page}",
replace: replace);
}
///多时段预订设置列表编辑页面
static Future<dynamic> goBookTimeSettingEditPage(
BuildContext context, {
MealListSunModel sunModel,
///多时段预订设置列表编辑页面
static Future<dynamic> goBookTimeSettingEditPage(
BuildContext context, {
MealListSunModel sunModel,
replace = false,
}) {
if(sunModel != null){
return _navigateTo(context, "${Routes.book_time_setting_edit_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}",
replace: replace);
if (sunModel != null) {
return _navigateTo(context,
"${Routes.book_time_setting_edit_page}?sunModel=${FluroConvertUtils.object2string(sunModel)}",
replace: replace);
}
return _navigateTo(context, "${Routes.book_time_setting_edit_page}",
replace: replace);
}
///停车指引
static Future<dynamic> goParkInfoPage(
static Future<dynamic> goParkInfoPage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.park_info_page}",
replace: replace);
return _navigateTo(context, "${Routes.park_info_page}", replace: replace);
}
///设置纪念日营销
static Future<dynamic> goBirthdaySettingPage(
///设置纪念日营销
static Future<dynamic> goBirthdaySettingPage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.birthday_setting_page}",
replace: replace);
}
///生日短信模版
static Future<dynamic> goBirthdaySmsModuleSettingPage(
BuildContext context, String type, {
///生日短信模版
static Future<dynamic> goBirthdaySmsModuleSettingPage(
BuildContext context,
String type, {
replace = false,
}) {
return _navigateTo(context, "${Routes.birthday_sms_module_setting_page}?type=$type",
return _navigateTo(
context, "${Routes.birthday_sms_module_setting_page}?type=$type",
replace: replace);
}
}
... ...
... ... @@ -757,15 +757,12 @@ var noteBookChangeFPageOnlyHandle = new Handler(
create: (_) => MarketingCenterProvider(),
child: ChangeNotifierProvider<NotebookDetailModel>(
create: (_) => NotebookDetailModel(),
child: ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child:NoteBookChangeFPageOnly(
rid: rid,
back: back,
)))))));
child: ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child: NoteBookChangeFPageOnly(
rid: rid,
back: back,
)))))));
});
// 跳转可订时段管理页面
... ... @@ -1193,8 +1190,6 @@ var storeTypeFillManagePageHandler = new Handler(
// create: (_) => UploadImageProvider(), child: EnterStoreFrontPhotoPage());
});
///包间置满管理
var storeTypeFillManagePageSimHandler = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
... ... @@ -1540,10 +1535,11 @@ var customerSettingPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String idstr = params["idstr"].first;
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(), child: ChangeNotifierProvider<MarketingCenterProvider>(
create: (_) => MarketingCenterProvider(), child: CustomerSettingPage()));
create: (_) => CustomerProvider(),
child: ChangeNotifierProvider<MarketingCenterProvider>(
create: (_) => MarketingCenterProvider(),
child: CustomerSettingPage()));
});
///全店营销记录
... ... @@ -2064,19 +2060,21 @@ var feastCreatePageHandle = new Handler(
create: (_) => FeastModel(),
child: ChangeNotifierProvider<ChooseTableModel>(
create: (_) => ChooseTableModel(),
child:ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child: FeastCreatePage(
banquetDetail: banquetDetail, isCreate: isCreate, rid: rid))));
child: ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child: FeastCreatePage(
banquetDetail: banquetDetail,
isCreate: isCreate,
rid: rid))));
}
return ChangeNotifierProvider<FeastModel>(
create: (_) => FeastModel(),
child: ChangeNotifierProvider<ChooseTableModel>(
create: (_) => ChooseTableModel(),
child:ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child: FeastCreatePage(
banquetDetail: banquetDetail, isCreate: isCreate))));
child: ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child: FeastCreatePage(
banquetDetail: banquetDetail, isCreate: isCreate))));
});
///宴会----添加订金
... ... @@ -3108,7 +3106,8 @@ var markingCouponSelectPageHandle = new Handler(
// .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
return ChangeNotifierProvider<MarketingCenterProvider>(
create: (_) => MarketingCenterProvider(),
child: MarkingCouponSelectPage(type:type,couponList: res, mulSelect: mulSelect));
child: MarkingCouponSelectPage(
type: type, couponList: res, mulSelect: mulSelect));
});
//我的----营销中心-预订安排预览页
... ... @@ -3674,8 +3673,9 @@ var collectStoreInfoPageHandle = new Handler(
// .decode(FluroConvertUtils.fluroCnParamsDecode(params["daylist"].first)));
return ChangeNotifierProvider<CollectStoreProvider>(
create: (_) => CollectStoreProvider(), child:ChangeNotifierProvider<OtherLoginProvider>(
create: (_) => OtherLoginProvider(), child: CollectStoreInfoPage()));
create: (_) => CollectStoreProvider(),
child: ChangeNotifierProvider<OtherLoginProvider>(
create: (_) => OtherLoginProvider(), child: CollectStoreInfoPage()));
});
//邀请函主题选择
... ... @@ -3833,8 +3833,12 @@ var couponPosterPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
String id = params["id"].first;
// String smsTemplate = params["smsTemplate"].first;
CouponUse use = CouponUse.fromJson(
json.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first)));
CouponUse use;
if (params.keys.contains('use')) {
use = CouponUse.fromJson(json
.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first)));
}
CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode(
FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first)));
return ChangeNotifierProvider<BaseIndoProvider>(
... ... @@ -3931,10 +3935,6 @@ var wineSettingMsgPageHandle = new Handler(
create: (_) => CustomerProvider(), child: WineSettingMsgPage()));
});
///多时段预订设置列表
var bookTimeSettingListPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
... ... @@ -3944,13 +3944,10 @@ var bookTimeSettingListPageHandle = new Handler(
// json.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first)));
// CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode(
// FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first)));
return ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child: BookTimeSettingListPage());
return ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(), child: BookTimeSettingListPage());
});
///多时段预订设置编辑页面
var bookTimeSettingEditPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
... ... @@ -3959,23 +3956,20 @@ var bookTimeSettingEditPageHandle = new Handler(
// CouponUse use = CouponUse.fromJson(
// json.decode(FluroConvertUtils.fluroCnParamsDecode(params["use"].first)));
if (params.keys.contains('sunModel')) {
MealListSunModel sunModel = MealListSunModel.fromJson(json.decode(
FluroConvertUtils.fluroCnParamsDecode(params["sunModel"].first)));
return ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child: BookTimeSettingEditPage(sunModel));
}
return ChangeNotifierProvider<StoreBaseIndoProvider>(
if (params.keys.contains('sunModel')) {
MealListSunModel sunModel = MealListSunModel.fromJson(json.decode(
FluroConvertUtils.fluroCnParamsDecode(params["sunModel"].first)));
return ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child: BookTimeSettingEditPage(sunModel));
}
return ChangeNotifierProvider<StoreBaseIndoProvider>(
create: (_) => StoreBaseIndoProvider(),
child: BookTimeSettingEditPage(null));
child: BookTimeSettingEditPage(null));
});
//停车指引介绍
var parkInfoPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String idstr = params["idstr"].first;
... ... @@ -3985,35 +3979,23 @@ var parkInfoPageHandle = new Handler(
create: (_) => MarketingCenterProvider(), child: ParkInfoPage());
});
var birthdaySettingPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String idstr = params["idstr"].first;
// NotebookDetail detailEntity = NotebookDetail.fromJson(json
// .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
return ChangeNotifierProvider<CustomerProvider>(
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(), child: BirthdaySettingPage());
});
var birthdaySmsModuleSettingPageHandle = new Handler(
var birthdaySmsModuleSettingPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
String type = params["type"].first;
// NotebookDetail detailEntity = NotebookDetail.fromJson(json
// .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(), child: BirthdaySmsModuleSettingPage(type:type));
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: BirthdaySmsModuleSettingPage(type: type));
});
... ...
... ... @@ -2057,7 +2057,7 @@ class Utils {
//跳转到优惠券购买页面
static goShareBuyCouponToWeChat(BuildContext context, String couponid,
CouponUse use, CouponSunModel couponSunModel) async {
String type, CouponUse use, CouponSunModel couponSunModel) async {
String _webPageUrl = "http://colorcun.com/";
// String _thumbnail =
// "https://xt04.colorcun.com/h5/index.html#/?id=163854&hasInvitation=1";
... ... @@ -2104,8 +2104,18 @@ class Utils {
}
String _userName = "gh_487873d353b3";
String _path =
"pack-activity/pack/buyCoupon?id=$couponid&name=${Provider.of<UserModel>(context, listen: false).user.sellername}&sid=${Provider.of<UserModel>(context, listen: false).user.sellerid}&types=3";
String _path;
if (type == '3') {
_thumbnail = 'https://nosqn.colorcun.com/share_money.png';
_title =
'免费获取${Provider.of<UserModel>(context, listen: false).user.sellername}${couponSunModel.price}元代金券,点击查看详情。';
_path =
"pack-activity/pack/receiveCoupon?id=$couponid&sid=${Provider.of<UserModel>(context, listen: false).user.sellerid}&types=3";
} else {
_path =
"pack-activity/pack/buyCoupon?id=$couponid&name=${Provider.of<UserModel>(context, listen: false).user.sellername}&sid=${Provider.of<UserModel>(context, listen: false).user.sellerid}&types=3";
}
// if (Provider.of<UserModel>(context, listen: false).user.sellerid == '677') {
// //京厨九跳转新的邀请函地址
// _path =
... ...