|
...
|
...
|
@@ -4681,7 +4681,30 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
}
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
HEmptyView(40),
|
|
|
|
HEmptyView(20),
|
|
|
|
RoundButton(
|
|
|
|
text: '企业微信通知',
|
|
|
|
width: ScreenUtil().setWidth(100 * 2),
|
|
|
|
height: ScreenUtil().setWidth(96),
|
|
|
|
fontSize: 30,
|
|
|
|
textColor: MyColours.color_999999,
|
|
|
|
gradientStart: MyColours.color_f3f3f3,
|
|
|
|
gradientEnd: MyColours.color_f3f3f3,
|
|
|
|
radius: ScreenUtil().setWidth(8),
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () async {
|
|
|
|
bool isSuccess = await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
isWechat: false);
|
|
|
|
print(isSuccess);
|
|
|
|
if (isSuccess) {
|
|
|
|
// _addForward();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Expanded(
|
|
|
|
child: Stack(children: [
|
|
|
|
Row(
|
|
...
|
...
|
@@ -4698,62 +4721,105 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
],
|
|
|
|
),
|
|
|
|
RoundButton(
|
|
|
|
text: '微信通知',
|
|
|
|
height: ScreenUtil().setWidth(48 * 2),
|
|
|
|
fontSize: 38,
|
|
|
|
gradientStart: Colors.transparent,
|
|
|
|
gradientEnd: Colors.transparent,
|
|
|
|
radius: ScreenUtil().setWidth(16),
|
|
|
|
isBold: true,
|
|
|
|
onPressed: () async {
|
|
|
|
if (_nameNode.hasFocus ||
|
|
|
|
_phoneNode.hasFocus ||
|
|
|
|
_cusdemNode.hasFocus) {
|
|
|
|
needWechat = true;
|
|
|
|
_showConfirmWidget(
|
|
|
|
needWechat: true,
|
|
|
|
callback: () async {
|
|
|
|
if (ObjectUtil.isEmpty(
|
|
|
|
_baseIndoProvider.baseInfoSunModel) ||
|
|
|
|
ObjectUtil.isEmpty(
|
|
|
|
_baseIndoProvider.baseInfoSunModel.phone)) {
|
|
|
|
// Utils.showToast('请填写经理的联系电话');
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "填写个人信息",
|
|
|
|
content: "暂未填写您的联系信息,请先前往填写,个人信息将会展示给您的顾客。",
|
|
|
|
lTitle: "取消",
|
|
|
|
rTitle: "去填写",
|
|
|
|
lCallback: () {}, rCallback: () {
|
|
|
|
_goBaseInfoPage();
|
|
|
|
});
|
|
|
|
text: '微信通知',
|
|
|
|
height: ScreenUtil().setWidth(48 * 2),
|
|
|
|
fontSize: 38,
|
|
|
|
gradientStart: Colors.transparent,
|
|
|
|
gradientEnd: Colors.transparent,
|
|
|
|
radius: ScreenUtil().setWidth(16),
|
|
|
|
isBold: true,
|
|
|
|
onPressed: () async {
|
|
|
|
if (_nameNode.hasFocus ||
|
|
|
|
_phoneNode.hasFocus ||
|
|
|
|
_cusdemNode.hasFocus) {
|
|
|
|
needWechat = true;
|
|
|
|
_showConfirmWidget(
|
|
|
|
needWechat: true,
|
|
|
|
callback: () async {
|
|
|
|
if (ObjectUtil.isEmpty(
|
|
|
|
_baseIndoProvider.baseInfoSunModel) ||
|
|
|
|
ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
.baseInfoSunModel.phone)) {
|
|
|
|
// Utils.showToast('请填写经理的联系电话');
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "填写个人信息",
|
|
|
|
content:
|
|
|
|
"暂未填写您的联系信息,请先前往填写,个人信息将会展示给您的顾客。",
|
|
|
|
lTitle: "取消",
|
|
|
|
rTitle: "去填写",
|
|
|
|
lCallback: () {}, rCallback: () {
|
|
|
|
_goBaseInfoPage();
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (youhui != '选择优惠') {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"rid": widget.rid,
|
|
|
|
"aid":
|
|
|
|
'${couponProvider.couponListSelect[couponSelectIndex].id}'
|
|
|
|
};
|
|
|
|
bool isSuc = await couponProvider
|
|
|
|
.setActivityAsReserve(context, params);
|
|
|
|
if (isSuc) {
|
|
|
|
couponProvider.hasModify = true;
|
|
|
|
bus.emit("refresh_book_list");
|
|
|
|
bool isSuccess =
|
|
|
|
await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context,
|
|
|
|
listen: false)
|
|
|
|
.user
|
|
|
|
.openid);
|
|
|
|
print(isSuccess);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (youhui != '选择优惠') {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"rid": widget.rid,
|
|
|
|
"aid":
|
|
|
|
'${couponProvider.couponListSelect[couponSelectIndex].id}'
|
|
|
|
};
|
|
|
|
bool isSuc = await couponProvider
|
|
|
|
.setActivityAsReserve(context, params);
|
|
|
|
if (isSuc) {
|
|
|
|
couponProvider.hasModify = true;
|
|
|
|
bus.emit("refresh_book_list");
|
|
|
|
bool isSuccess =
|
|
|
|
await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context,
|
|
|
|
listen: false)
|
|
|
|
.user
|
|
|
|
.openid,
|
|
|
|
);
|
|
|
|
print(isSuccess);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
bool isSuccess =
|
|
|
|
await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context,
|
|
|
|
listen: false)
|
|
|
|
.user
|
|
|
|
.openid);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
removeOverlay();
|
|
|
|
} else {
|
|
|
|
if (ObjectUtil.isEmpty(
|
|
|
|
_baseIndoProvider.baseInfoSunModel) ||
|
|
|
|
ObjectUtil.isEmpty(
|
|
|
|
_baseIndoProvider.baseInfoSunModel.phone)) {
|
|
|
|
// Utils.showToast('请填写经理的联系电话');
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "填写个人信息",
|
|
|
|
content: "暂未填写您的联系信息,请先前往填写,个人信息将会展示给您的顾客。",
|
|
|
|
lTitle: "取消",
|
|
|
|
rTitle: "去填写",
|
|
|
|
lCallback: () {}, rCallback: () {
|
|
|
|
_goBaseInfoPage();
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (youhui != '选择优惠') {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"rid": widget.rid,
|
|
|
|
"aid":
|
|
|
|
'${couponProvider.couponListSelect[couponSelectIndex].id}'
|
|
|
|
};
|
|
|
|
bool isSuc = await couponProvider
|
|
|
|
.setActivityAsReserve(context, params);
|
|
|
|
if (isSuc) {
|
|
|
|
couponProvider.hasModify = true;
|
|
|
|
bus.emit("refresh_book_list");
|
|
|
|
bool isSuccess =
|
|
|
|
await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
...
|
...
|
@@ -4762,64 +4828,26 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
listen: false)
|
|
|
|
.user
|
|
|
|
.openid);
|
|
|
|
print(isSuccess);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
removeOverlay();
|
|
|
|
} else {
|
|
|
|
if (ObjectUtil.isEmpty(
|
|
|
|
_baseIndoProvider.baseInfoSunModel) ||
|
|
|
|
ObjectUtil.isEmpty(
|
|
|
|
_baseIndoProvider.baseInfoSunModel.phone)) {
|
|
|
|
// Utils.showToast('请填写经理的联系电话');
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "填写个人信息",
|
|
|
|
content: "暂未填写您的联系信息,请先前往填写,个人信息将会展示给您的顾客。",
|
|
|
|
lTitle: "取消",
|
|
|
|
rTitle: "去填写",
|
|
|
|
lCallback: () {}, rCallback: () {
|
|
|
|
_goBaseInfoPage();
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (youhui != '选择优惠') {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"rid": widget.rid,
|
|
|
|
"aid":
|
|
|
|
'${couponProvider.couponListSelect[couponSelectIndex].id}'
|
|
|
|
};
|
|
|
|
bool isSuc = await couponProvider.setActivityAsReserve(
|
|
|
|
context, params);
|
|
|
|
if (isSuc) {
|
|
|
|
couponProvider.hasModify = true;
|
|
|
|
bus.emit("refresh_book_list");
|
|
|
|
bool isSuccess =
|
|
|
|
await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context, listen: false)
|
|
|
|
.user
|
|
|
|
.openid);
|
|
|
|
print(isSuccess);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
} else {
|
|
|
|
bool isSuccess =
|
|
|
|
await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context,
|
|
|
|
listen: false)
|
|
|
|
.user
|
|
|
|
.openid);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
bool isSuccess = await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context, listen: false)
|
|
|
|
.user
|
|
|
|
.openid);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
])),
|
|
|
|
],
|
|
|
|
));
|
...
|
...
|
|