|
...
|
...
|
@@ -14,6 +14,7 @@ import 'package:provider/provider.dart'; |
|
|
|
|
|
|
|
import '../../../../utils/screen_util.dart';
|
|
|
|
import '../../../../widgets/h_empty_view.dart';
|
|
|
|
import '../../../../widgets/round_button.dart';
|
|
|
|
|
|
|
|
class CustomerSettingPage extends StatefulWidget {
|
|
|
|
CustomerSettingPage({Key key}) : super(key: key);
|
|
...
|
...
|
@@ -42,7 +43,8 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { |
|
|
|
_sellerGuestSet() async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"sellerid": Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
'is_additional': customerProvider.isrepair ? "1" : "0"
|
|
|
|
'is_additional': customerProvider.isrepair ? "1" : "0",
|
|
|
|
'is_enter_self': customerProvider.isselfphone ? '1' : '0'
|
|
|
|
};
|
|
|
|
bool success = await customerProvider.setSellerGuest(context, params,
|
|
|
|
showLoading: true);
|
|
...
|
...
|
@@ -51,10 +53,8 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { |
|
|
|
|
|
|
|
///获取客情配置
|
|
|
|
_sellerGuestGet() async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"sellerid": Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
};
|
|
|
|
bool success = await customerProvider.getSellerGuest(context, params);
|
|
|
|
|
|
|
|
bool success = await customerProvider.getSellerGuest(context);
|
|
|
|
|
|
|
|
// if (success) {
|
|
|
|
// customerProvider.isrepair = true;
|
|
...
|
...
|
@@ -227,215 +227,240 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { |
|
|
|
body: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(32), top: ScreenUtil().setWidth(40)),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: w(8)),
|
|
|
|
child: Text('客人信息录入',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)))),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
w(1),
|
|
|
|
color: MyColours.color_E7E7E7,
|
|
|
|
),
|
|
|
|
|
|
|
|
VEmptyView(24),
|
|
|
|
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
customerProvider.isselfphone =
|
|
|
|
!customerProvider.isselfphone;
|
|
|
|
});
|
|
|
|
_sellerGuestSet();
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text('录入客户电话时不能用自己手机号',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
Image.asset(
|
|
|
|
customerProvider.isselfphone
|
|
|
|
? Utils.getImgPath('swich_on')
|
|
|
|
: Utils.getImgPath('swich_off'),
|
|
|
|
width: ScreenUtil().setWidth(88),
|
|
|
|
// height: ScreenUtil().setWidth(82),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: w(14), right: w(10)),
|
|
|
|
child: MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
w(1),
|
|
|
|
color: MyColours.color_E7E7E7,
|
|
|
|
)),
|
|
|
|
VEmptyView(24),
|
|
|
|
InkWell(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: w(8)),
|
|
|
|
child: Text('客人信息录入',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)))),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
w(1),
|
|
|
|
color: MyColours.color_E7E7E7,
|
|
|
|
),
|
|
|
|
VEmptyView(24),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
customerProvider.isrepair = !customerProvider.isrepair;
|
|
|
|
customerProvider.isselfphone =
|
|
|
|
!customerProvider.isselfphone;
|
|
|
|
});
|
|
|
|
_sellerGuestSet();
|
|
|
|
// _sellerGuestSet();
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text('预订要求补录客人信息',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
Image.asset(
|
|
|
|
customerProvider.isrepair
|
|
|
|
? Utils.getImgPath('swich_on')
|
|
|
|
: Utils.getImgPath('swich_off'),
|
|
|
|
width: ScreenUtil().setWidth(88),
|
|
|
|
// height: ScreenUtil().setWidth(82),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(8), horizontal: w(14)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text('录入客户电话时不能用自己手机号',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
Image.asset(
|
|
|
|
customerProvider.isselfphone
|
|
|
|
? Utils.getImgPath('swich_on')
|
|
|
|
: Utils.getImgPath('swich_off'),
|
|
|
|
width: ScreenUtil().setWidth(88),
|
|
|
|
// height: ScreenUtil().setWidth(82),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: w(14), right: w(10)),
|
|
|
|
child: MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
w(1),
|
|
|
|
color: MyColours.color_E7E7E7,
|
|
|
|
)),
|
|
|
|
VEmptyView(24),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
customerProvider.isrepair = !customerProvider.isrepair;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(8), horizontal: w(14)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text('预订要求补录客人信息',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
Image.asset(
|
|
|
|
customerProvider.isrepair
|
|
|
|
? Utils.getImgPath('swich_on')
|
|
|
|
: Utils.getImgPath('swich_off'),
|
|
|
|
width: ScreenUtil().setWidth(88),
|
|
|
|
// height: ScreenUtil().setWidth(82),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: w(14), right: w(10)),
|
|
|
|
child: MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
w(1),
|
|
|
|
color: MyColours.color_E7E7E7,
|
|
|
|
)),
|
|
|
|
VEmptyView(48),
|
|
|
|
Text('店内自定义标签',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32))),
|
|
|
|
VEmptyView(48),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(18), horizontal: w(14)),
|
|
|
|
child: Wrap(
|
|
|
|
spacing: ScreenUtil().setWidth(20),
|
|
|
|
runSpacing: ScreenUtil().setWidth(10),
|
|
|
|
children: _buildLabelItem(customerProvider.labelList))),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: w(14), right: w(10)),
|
|
|
|
child: MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
w(1),
|
|
|
|
color: MyColours.color_E7E7E7,
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: w(14), right: w(10)),
|
|
|
|
child: MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
w(1),
|
|
|
|
color: MyColours.color_E7E7E7,
|
|
|
|
)),
|
|
|
|
VEmptyView(48),
|
|
|
|
Text('店内自定义标签',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32))),
|
|
|
|
VEmptyView(48),
|
|
|
|
Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(vertical: w(18), horizontal: w(14)),
|
|
|
|
child: Wrap(
|
|
|
|
spacing: ScreenUtil().setWidth(20),
|
|
|
|
runSpacing: ScreenUtil().setWidth(10),
|
|
|
|
children: _buildLabelItem(customerProvider.labelList))),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: w(14), right: w(10)),
|
|
|
|
child: MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
w(1),
|
|
|
|
color: MyColours.color_E7E7E7,
|
|
|
|
)),
|
|
|
|
// VEmptyView(34),
|
|
|
|
// MyDivider(
|
|
|
|
// double.infinity,
|
|
|
|
// w(1),
|
|
|
|
// color: MyColours.color_E7E7E7,
|
|
|
|
// ),
|
|
|
|
// VEmptyView(52),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// setState(() {
|
|
|
|
// swichSync = !swichSync;
|
|
|
|
// });
|
|
|
|
// // _sellerGuestSet();
|
|
|
|
// },
|
|
|
|
// child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Text('是否与会员系统同步',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_515151,
|
|
|
|
// fontSize: ScreenUtil().setSp(32))),
|
|
|
|
// Image.asset(
|
|
|
|
// swichSync
|
|
|
|
// ? Utils.getImgPath('f_swich_on')
|
|
|
|
// : Utils.getImgPath('f_swich_off'),
|
|
|
|
// width: ScreenUtil().setWidth(70),
|
|
|
|
// // height: ScreenUtil().setWidth(82),
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(48),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// // DialogUtil.showSelectCusmanDialog(context, memberList,
|
|
|
|
// // (value) {
|
|
|
|
// // if (value != null) {
|
|
|
|
// // setState(() {
|
|
|
|
// // memberIndex = value.first;
|
|
|
|
// // memberShow = memberList[memberIndex];
|
|
|
|
// // });
|
|
|
|
// // }
|
|
|
|
// // }, selecteds: memberIndex == null ? [] : [memberIndex])
|
|
|
|
// // .then((value) {});
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// // height: ScreenUtil().setWidth(60),
|
|
|
|
// padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(50)),
|
|
|
|
// child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// // color: Colors.red,
|
|
|
|
// width: ScreenUtil().setWidth(150),
|
|
|
|
// height: ScreenUtil().setWidth(35),
|
|
|
|
// child: Text(
|
|
|
|
// '会员系统选择',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(32),
|
|
|
|
// color: MyColours.color_515151),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// memberShow,
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_353535,
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath(
|
|
|
|
// showLabel ? 'c_arrow_up' : 'c_arrow_down'),
|
|
|
|
// width: ScreenUtil().setWidth(24),
|
|
|
|
// // height: ScreenUtil().setWidth(10),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
// _itemWidget('企业代码或账号', "点击这里输入企业代码或账号", null, null),
|
|
|
|
// VEmptyView(50),
|
|
|
|
// _itemWidget('管理员账号', "点击这里输入管理员账号", null, null),
|
|
|
|
// VEmptyView(50),
|
|
|
|
// _itemWidget('密码', "点击这里输入管理员密码", null, null),
|
|
|
|
// VEmptyView(40),
|
|
|
|
// Center(
|
|
|
|
// child: Text(
|
|
|
|
// '请与纳极客服400-000-9690 联系对接事宜',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_999999, fontSize: font(12)),
|
|
|
|
// ))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(48)),
|
|
|
|
margin: EdgeInsets.only(bottom: w(35), top: w(25)),
|
|
|
|
child: RoundButton(
|
|
|
|
// content: widget.fromPage == 'tablePhoto'
|
|
|
|
// ? '确定'
|
|
|
|
// : "已选${selectNum}个 确定",
|
|
|
|
text: '保存',
|
|
|
|
// width: w(128),
|
|
|
|
height: w(40),
|
|
|
|
radius: r(4),
|
|
|
|
isBold: false,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
fontSize: 28,
|
|
|
|
textColor: MyColours.color_ffffff,
|
|
|
|
onPressed: () {
|
|
|
|
_sellerGuestSet();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
|
|
|
// VEmptyView(34),
|
|
|
|
// MyDivider(
|
|
|
|
// double.infinity,
|
|
|
|
// w(1),
|
|
|
|
// color: MyColours.color_E7E7E7,
|
|
|
|
// ),
|
|
|
|
// VEmptyView(52),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// setState(() {
|
|
|
|
// swichSync = !swichSync;
|
|
|
|
// });
|
|
|
|
// // _sellerGuestSet();
|
|
|
|
// },
|
|
|
|
// child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Text('是否与会员系统同步',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_515151,
|
|
|
|
// fontSize: ScreenUtil().setSp(32))),
|
|
|
|
// Image.asset(
|
|
|
|
// swichSync
|
|
|
|
// ? Utils.getImgPath('f_swich_on')
|
|
|
|
// : Utils.getImgPath('f_swich_off'),
|
|
|
|
// width: ScreenUtil().setWidth(70),
|
|
|
|
// // height: ScreenUtil().setWidth(82),
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(48),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// // DialogUtil.showSelectCusmanDialog(context, memberList,
|
|
|
|
// // (value) {
|
|
|
|
// // if (value != null) {
|
|
|
|
// // setState(() {
|
|
|
|
// // memberIndex = value.first;
|
|
|
|
// // memberShow = memberList[memberIndex];
|
|
|
|
// // });
|
|
|
|
// // }
|
|
|
|
// // }, selecteds: memberIndex == null ? [] : [memberIndex])
|
|
|
|
// // .then((value) {});
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// // height: ScreenUtil().setWidth(60),
|
|
|
|
// padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(50)),
|
|
|
|
// child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// // color: Colors.red,
|
|
|
|
// width: ScreenUtil().setWidth(150),
|
|
|
|
// height: ScreenUtil().setWidth(35),
|
|
|
|
// child: Text(
|
|
|
|
// '会员系统选择',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(32),
|
|
|
|
// color: MyColours.color_515151),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// memberShow,
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_353535,
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath(
|
|
|
|
// showLabel ? 'c_arrow_up' : 'c_arrow_down'),
|
|
|
|
// width: ScreenUtil().setWidth(24),
|
|
|
|
// // height: ScreenUtil().setWidth(10),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
// _itemWidget('企业代码或账号', "点击这里输入企业代码或账号", null, null),
|
|
|
|
// VEmptyView(50),
|
|
|
|
// _itemWidget('管理员账号', "点击这里输入管理员账号", null, null),
|
|
|
|
// VEmptyView(50),
|
|
|
|
// _itemWidget('密码', "点击这里输入管理员密码", null, null),
|
|
|
|
// VEmptyView(40),
|
|
|
|
// Center(
|
|
|
|
// child: Text(
|
|
|
|
// '请与纳极客服400-000-9690 联系对接事宜',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_999999, fontSize: font(12)),
|
|
|
|
// ))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
));
|
...
|
...
|
|