|
...
|
...
|
@@ -520,140 +520,146 @@ class _MakeMarkingPageState extends State<MakeMarkingPage> { |
|
|
|
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
|
|
|
|
customerMakingProvider =
|
|
|
|
Provider.of<CustomerMakingProvider>(context, listen: true);
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
key: scaffoldKey,
|
|
|
|
appBar: SystemAppBar(
|
|
|
|
'创建营销任务',
|
|
|
|
onTap: () {
|
|
|
|
customerMakingProvider.clearData();
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(10),
|
|
|
|
Container(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30),
|
|
|
|
vertical: ScreenUtil().setWidth(30)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
'已选[${customerMakingProvider.labels}]${customerMakingProvider.selectCustomerSeller.length}位顾客',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
InkWell(
|
|
|
|
onTap: () async {
|
|
|
|
needClear = false;
|
|
|
|
if (widget.fromPage ==
|
|
|
|
FromPage.FromPageMakeRecordDetail) {
|
|
|
|
customerMakingProvider.selectCustomerSeller =
|
|
|
|
customerProvider.selectCustomerSeller;
|
|
|
|
return Material(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
FocusScope.of(context).requestFocus(new FocusNode());
|
|
|
|
},
|
|
|
|
child: Scaffold(
|
|
|
|
backgroundColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
key: scaffoldKey,
|
|
|
|
appBar: SystemAppBar(
|
|
|
|
'创建营销任务',
|
|
|
|
onTap: () {
|
|
|
|
customerMakingProvider.clearData();
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(10),
|
|
|
|
Container(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30),
|
|
|
|
vertical: ScreenUtil().setWidth(30)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
'已选[${customerMakingProvider.labels}]${customerMakingProvider.selectCustomerSeller.length}位顾客',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
InkWell(
|
|
|
|
onTap: () async {
|
|
|
|
needClear = false;
|
|
|
|
if (widget.fromPage ==
|
|
|
|
FromPage.FromPageMakeRecordDetail) {
|
|
|
|
customerMakingProvider.selectCustomerSeller =
|
|
|
|
customerProvider.selectCustomerSeller;
|
|
|
|
|
|
|
|
await NavigatorUtil.goCustomerListPage(
|
|
|
|
context, FromPage.FromPageMakeRecord, '');
|
|
|
|
await NavigatorUtil.goCustomerListPage(
|
|
|
|
context, FromPage.FromPageMakeRecord, '');
|
|
|
|
|
|
|
|
// Map temp =
|
|
|
|
// Map temp =
|
|
|
|
|
|
|
|
customerProvider.labels =
|
|
|
|
customerMakingProvider.labels;
|
|
|
|
customerProvider.selectCustomerSeller =
|
|
|
|
customerMakingProvider.selectCustomerSeller;
|
|
|
|
gid = '';
|
|
|
|
for (CustomerBySellerSunModel item
|
|
|
|
in customerMakingProvider
|
|
|
|
.selectCustomerSeller) {
|
|
|
|
gid += '${item.gid},';
|
|
|
|
}
|
|
|
|
if (gid.endsWith(',')) {
|
|
|
|
gid = gid.substring(0, gid.length - 1);
|
|
|
|
}
|
|
|
|
customerProvider.labels =
|
|
|
|
customerMakingProvider.labels;
|
|
|
|
customerProvider.selectCustomerSeller =
|
|
|
|
customerMakingProvider
|
|
|
|
.selectCustomerSeller;
|
|
|
|
gid = '';
|
|
|
|
for (CustomerBySellerSunModel item
|
|
|
|
in customerMakingProvider
|
|
|
|
.selectCustomerSeller) {
|
|
|
|
gid += '${item.gid},';
|
|
|
|
}
|
|
|
|
if (gid.endsWith(',')) {
|
|
|
|
gid = gid.substring(0, gid.length - 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
// {
|
|
|
|
// 'labels': customerProvider.labels,
|
|
|
|
// 'selectCustomer': customerProvider.selectCustomer
|
|
|
|
// };
|
|
|
|
// customerProvider.labels = temp['labels'];
|
|
|
|
// customerProvider.selectCustomer =
|
|
|
|
// temp['selectCustomer'];
|
|
|
|
// customerMakingProvider.labels = temp['labels'];
|
|
|
|
// customerMakingProvider.selectCustomer =
|
|
|
|
// temp['selectCustomer'];
|
|
|
|
setState(() {});
|
|
|
|
} else {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
// {
|
|
|
|
// 'labels': customerProvider.labels,
|
|
|
|
// 'selectCustomer': customerProvider.selectCustomer
|
|
|
|
// };
|
|
|
|
// customerProvider.labels = temp['labels'];
|
|
|
|
// customerProvider.selectCustomer =
|
|
|
|
// temp['selectCustomer'];
|
|
|
|
// customerMakingProvider.labels = temp['labels'];
|
|
|
|
// customerMakingProvider.selectCustomer =
|
|
|
|
// temp['selectCustomer'];
|
|
|
|
setState(() {});
|
|
|
|
} else {
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
|
|
|
|
// NavigatorUtil.goMarketingRecordsDetailPage(context);
|
|
|
|
},
|
|
|
|
child: Text('查看',
|
|
|
|
style: TextStyle(
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(26)))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
// NavigatorUtil.goMarketingRecordsDetailPage(context);
|
|
|
|
},
|
|
|
|
child: Text('查看',
|
|
|
|
style: TextStyle(
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(26)))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [VEmptyView(50), _contentWidget('输入营销短信内容')],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [VEmptyView(50), _contentWidget('输入营销短信内容')],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
RoundButton(
|
|
|
|
text: '确认下发任务',
|
|
|
|
gradientStart: MyColours.color_199095,
|
|
|
|
gradientEnd: MyColours.color_199095,
|
|
|
|
// borderColor: MyColours.color_999999,
|
|
|
|
radius: ScreenUtil().setWidth(40),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
fontSize: 26,
|
|
|
|
margin:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(230)),
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
// NavigatorUtil.goEnterStoreEnvironmentPage(context);
|
|
|
|
)),
|
|
|
|
RoundButton(
|
|
|
|
text: '确认下发任务',
|
|
|
|
gradientStart: MyColours.color_199095,
|
|
|
|
gradientEnd: MyColours.color_199095,
|
|
|
|
// borderColor: MyColours.color_999999,
|
|
|
|
radius: ScreenUtil().setWidth(40),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
fontSize: 26,
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(230)),
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
// NavigatorUtil.goEnterStoreEnvironmentPage(context);
|
|
|
|
|
|
|
|
//确认下发任务
|
|
|
|
_createMarketingBySeller();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
VEmptyView(30),
|
|
|
|
RoundButton(
|
|
|
|
text: '取消',
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
textColor: MyColours.color_199095,
|
|
|
|
borderColor: MyColours.color_199095,
|
|
|
|
radius: ScreenUtil().setWidth(40),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
fontSize: 26,
|
|
|
|
margin:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(230)),
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
customerMakingProvider.clearData();
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
//确认下发任务
|
|
|
|
_createMarketingBySeller();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
VEmptyView(30),
|
|
|
|
RoundButton(
|
|
|
|
text: '取消',
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
textColor: MyColours.color_199095,
|
|
|
|
borderColor: MyColours.color_199095,
|
|
|
|
radius: ScreenUtil().setWidth(40),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
fontSize: 26,
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(230)),
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
customerMakingProvider.clearData();
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|