|
...
|
...
|
@@ -19,8 +19,10 @@ import 'package:provider/provider.dart'; |
|
|
|
|
|
|
|
class SellerMyMarketingRecordsDetailPage extends StatefulWidget {
|
|
|
|
final String idstr;
|
|
|
|
final SellerList sellerList;
|
|
|
|
SellerMyMarketingRecordsDetailPage({Key key, this.idstr, this.sellerList})
|
|
|
|
final bool fromNotify;
|
|
|
|
|
|
|
|
SellerMyMarketingRecordsDetailPage(
|
|
|
|
{Key key, this.idstr, this.fromNotify = false})
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
...
|
...
|
@@ -32,6 +34,7 @@ class _SellerMyMarketingRecordsDetailPageState |
|
|
|
extends State<SellerMyMarketingRecordsDetailPage> {
|
|
|
|
CustomerProvider customerProvider;
|
|
|
|
String aidStr = '';
|
|
|
|
SellerList sellerList;
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
...
|
...
|
@@ -40,7 +43,8 @@ class _SellerMyMarketingRecordsDetailPageState |
|
|
|
// _getMarketingBySeller();
|
|
|
|
// }
|
|
|
|
// _getMarketingById();
|
|
|
|
_couponNetworkData();
|
|
|
|
_getMarketingByUid();
|
|
|
|
// _couponNetworkData();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -49,6 +53,22 @@ class _SellerMyMarketingRecordsDetailPageState |
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
_getMarketingByUid() async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"uid": Provider.of<UserModel>(context, listen: false).user.openid
|
|
|
|
};
|
|
|
|
await customerProvider.getMarketingByUid(context, params);
|
|
|
|
for (SellerList item in customerProvider.myRecordData.sellerList) {
|
|
|
|
if (item.id == widget.idstr) {
|
|
|
|
setState(() {
|
|
|
|
sellerList = item;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_couponNetworkData();
|
|
|
|
// await customerProvider.searchData(customerProvider.controller.text);
|
|
|
|
}
|
|
|
|
|
|
|
|
// _getMarketingById() async {
|
|
|
|
// Map<String, String> params = {"id": widget.idstr};
|
|
|
|
// await customerProvider.getMarketingById(context, params);
|
|
...
|
...
|
@@ -69,7 +89,7 @@ class _SellerMyMarketingRecordsDetailPageState |
|
|
|
//此人已经新建好券
|
|
|
|
if (customerProvider.couponListSelect.length > 0) {
|
|
|
|
for (int i = 0; i < customerProvider.couponListSelect.length; i++) {
|
|
|
|
if (widget.sellerList.aid == customerProvider.couponListSelect[i].id) {
|
|
|
|
if (sellerList.aid == customerProvider.couponListSelect[i].id) {
|
|
|
|
aidStr = customerProvider.couponListSelect[i].aname;
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -120,156 +140,177 @@ class _SellerMyMarketingRecordsDetailPageState |
|
|
|
appBar: SystemAppBar(
|
|
|
|
'营销任务详情',
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
if (widget.fromNotify) {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 0);
|
|
|
|
} else {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: Padding(
|
|
|
|
body: WillPopScope(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30),
|
|
|
|
// vertical: ScreenUtil().setWidth(40)
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Stack(
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
RowMultiText(
|
|
|
|
'创建日期',
|
|
|
|
widget.sellerList.cdateStr,
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
'创建人',
|
|
|
|
widget.sellerList.createUser,
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
widget.sellerList.finishedStatus == '0' ||
|
|
|
|
widget.sellerList.finishedStatus == '1' ||
|
|
|
|
widget.sellerList.finishedStatus == '2'
|
|
|
|
? Positioned(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(widget
|
|
|
|
.sellerList.finishedStatus ==
|
|
|
|
'0'
|
|
|
|
? 'c_state_ing'
|
|
|
|
: widget.sellerList.finishedStatus == '1'
|
|
|
|
? 'c_state_done'
|
|
|
|
: 'c_state_cancel'),
|
|
|
|
width: ScreenUtil().setWidth(140),
|
|
|
|
))
|
|
|
|
: SizedBox()
|
|
|
|
],
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
'完成期限',
|
|
|
|
widget.sellerList.edate == null
|
|
|
|
? '无限制'
|
|
|
|
: widget.sellerList.edate,
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
'修改短信内容',
|
|
|
|
widget.sellerList.isUpdate == '1' ? '可修改' : '不可修改',
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
'优惠信息',
|
|
|
|
aidStr,
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(25),
|
|
|
|
bottom: ScreenUtil().setWidth(20)),
|
|
|
|
child: Text(
|
|
|
|
'短信内容',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(25)),
|
|
|
|
child: Text(
|
|
|
|
widget.sellerList.content,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goShowCustomerListPage(
|
|
|
|
context,
|
|
|
|
FromPage.FromPageStoreCustomer,
|
|
|
|
widget.sellerList.gid);
|
|
|
|
// NavigatorUtil.goSellerMyMarketingRecordsDetailPage(context);
|
|
|
|
},
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setWidth(25),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
child: sellerList == null
|
|
|
|
? SizedBox()
|
|
|
|
: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Stack(
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'总客户人数',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
RowMultiText(
|
|
|
|
'创建日期',
|
|
|
|
sellerList.cdateStr,
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
'创建人',
|
|
|
|
sellerList.createUser,
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
sellerList.finishedStatus == '0' ||
|
|
|
|
sellerList.finishedStatus == '1' ||
|
|
|
|
sellerList.finishedStatus == '2'
|
|
|
|
? Positioned(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(sellerList
|
|
|
|
.finishedStatus ==
|
|
|
|
'0'
|
|
|
|
? 'c_state_ing'
|
|
|
|
: sellerList.finishedStatus == '1'
|
|
|
|
? 'c_state_done'
|
|
|
|
: 'c_state_cancel'),
|
|
|
|
width: ScreenUtil().setWidth(140),
|
|
|
|
))
|
|
|
|
: SizedBox()
|
|
|
|
],
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
'完成期限',
|
|
|
|
sellerList.edate == null
|
|
|
|
? '无限制'
|
|
|
|
: sellerList.edate,
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
'修改短信内容',
|
|
|
|
sellerList.isUpdate == '1' ? '可修改' : '不可修改',
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
RowMultiText(
|
|
|
|
'优惠信息',
|
|
|
|
aidStr,
|
|
|
|
textColor: MyColours.color_333333,
|
|
|
|
bgColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(25),
|
|
|
|
bottom: ScreenUtil().setWidth(20)),
|
|
|
|
child: Text(
|
|
|
|
'短信内容',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(25)),
|
|
|
|
child: Text(
|
|
|
|
sellerList.content,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goShowCustomerListPage(
|
|
|
|
context,
|
|
|
|
FromPage.FromPageStoreCustomer,
|
|
|
|
sellerList.gid);
|
|
|
|
// NavigatorUtil.goSellerMyMarketingRecordsDetailPage(context);
|
|
|
|
},
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setWidth(25),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Text('${widget.sellerList.guestCount}人',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(30))),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text('查看',
|
|
|
|
style: TextStyle(
|
|
|
|
decoration:
|
|
|
|
TextDecoration.underline,
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(30))),
|
|
|
|
]))),
|
|
|
|
]))),
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
widget.sellerList.finishedStatus == '0'
|
|
|
|
? RoundButton(
|
|
|
|
text: '立刻完成',
|
|
|
|
gradientStart: MyColours.color_199095,
|
|
|
|
gradientEnd: MyColours.color_199095,
|
|
|
|
textColor: MyColours.color_ffffff,
|
|
|
|
// borderColor: MyColours.color_999999,
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
fontSize: 26,
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(200)),
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goMyMakeMarkingPageOnlyShow(
|
|
|
|
context, widget.sellerList);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
VEmptyView(30),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'总客户人数',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30)),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Text('${sellerList.guestCount}人',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30))),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text('查看',
|
|
|
|
style: TextStyle(
|
|
|
|
decoration:
|
|
|
|
TextDecoration.underline,
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30))),
|
|
|
|
]))),
|
|
|
|
]))),
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
sellerList.finishedStatus == '0'
|
|
|
|
? RoundButton(
|
|
|
|
text: '立刻完成',
|
|
|
|
gradientStart: MyColours.color_199095,
|
|
|
|
gradientEnd: MyColours.color_199095,
|
|
|
|
textColor: MyColours.color_ffffff,
|
|
|
|
// borderColor: MyColours.color_999999,
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
fontSize: 26,
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(200)),
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goMyMakeMarkingPageOnlyShow(
|
|
|
|
context, sellerList);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
VEmptyView(30),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onWillPop: () async {
|
|
|
|
if (widget.fromNotify) {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 0);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|