Commit 5bb6955b0667db31ce5904267fb5b859f4dfc3bc

Authored by “gaiyaguang”
2 parents c0969fa5 2311dc1c

Merge branch 'v1.1+' of http://123.56.79.57/xt/Flutter-ReserveApp into v1.1+

#-ignorewarning
-keepattributes *Annotation*
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes SourceFile,LineNumberTable
-keep class com.hianalytics.android.**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class com.huawei.hms.**{*;}
-keep class com.huawei.android.hms.agent.**{*;}
-keep class com.xiaomi.**{*;}
-keep public class * extends com.xiaomi.mipush.sdk.PushMessageReceiver
-dontwarn com.meizu.cloud.pushsdk.**
-keep class com.meizu.cloud.pushsdk.**{*;}
-dontwarn com.vivo.push.**
-keep class com.vivo.push.**{*; }
-keep class com.vivo.vms.**{*; }
-keep class com.tencent.android.vivopush.VivoPushMessageReceiver{*;}
-keep public class * extends android.app.Service
-keep class com.heytap.mcssdk.** {*;}
-keep class com.heytap.msp.push.** { *;}
... ...
... ... @@ -410,8 +410,8 @@ class DioUtil {
Options options = new Options();
options.contentType =
ContentType.parse("application/x-www-form-urlencoded");
options.connectTimeout = 1000 * 30;
options.receiveTimeout = 1000 * 30;
options.connectTimeout = 1000 * 10;//默认10s
options.receiveTimeout = 1000 * 10;//默认10s
return options;
}
}
... ...
... ... @@ -286,14 +286,18 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
}
DialogUtil
.showSelectCusmanDialog(
context, list)
context, list,(value){
if(value!=null){
setState(() {
cusmanText = managers[
value.first]
.userName;
});
_setCurrManager();
}
})
.then((value) {
setState(() {
cusmanText = managers[
value.first]
.userName;
});
_setCurrManager();
});
},
child: Text(
... ...
... ... @@ -57,6 +57,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
TextEditingController _cancelController = TextEditingController();
StateSetter _cancelState;
ScrollController _scrollController;
@override
void initState() {
// TODO: implement initState
... ... @@ -71,6 +72,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
if (_cancelNode.hasFocus) {
print('得到焦点');
paddingTop = 80;
_scrollController.jumpTo(_scrollController.position.maxScrollExtent);
} else {
print('失去焦点');
paddingTop = 138;
... ... @@ -162,6 +164,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
///取消预订弹框
_showCancelWidget(context) {
_scrollController=ScrollController();
showGeneralDialog(
context: context,
barrierDismissible: false,
... ... @@ -185,170 +188,178 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
ScreenUtil().setWidth(50),
ScreenUtil().setWidth(paddingTop * 2),
ScreenUtil().setWidth(50),
ScreenUtil().setWidth(paddingBottom * 2)),
child: Container(
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(10)),
),
child: Column(
children: [
Stack(
children: [
Container(
height: ScreenUtil().setWidth(48),
child: Center(
child: Text(
'请选择取消原因',
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
color: MyColours.color_353535),
ScreenUtil().setWidth(0)),
child: Align(
alignment: Alignment.topCenter,
child: Container(
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(10)),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Stack(
children: [
Container(
height: ScreenUtil().setWidth(48),
child: Center(
child: Text(
'请选择取消原因',
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
color: MyColours.color_353535),
),
),
),
),
Positioned(
top: ScreenUtil().setWidth(8),
right: ScreenUtil().setWidth(0),
child: GestureDetector(
onTap: () {
_initCancel();
Navigator.of(context).pop();
},
child: Container(
padding: EdgeInsets.only(left: 20),
child: Image.asset(
'assets/close.png',
width: ScreenUtil().setWidth(32),
height: ScreenUtil().setWidth(32),
),
)))
],
),
VEmptyView(60),
Column(
children: cancelReasonList.map((value) {
return GestureDetector(
onTap: () {
for (var item in cancelReasonList) {
item['select'] = false;
isShowTF = false;
paddingBottom =
ScreenUtil.screenHeightDp.ceil() -
138 -
340;
if (item['title'] == value['title']) {
item['select'] = true;
if (item['title'] == '其他原因') {
isShowTF = true;
// paddingBottom = 130;
Positioned(
top: ScreenUtil().setWidth(8),
right: ScreenUtil().setWidth(0),
child: GestureDetector(
onTap: () {
_initCancel();
Navigator.of(context).pop();
},
child: Container(
padding: EdgeInsets.only(left: 20),
child: Image.asset(
'assets/close.png',
width: ScreenUtil().setWidth(32),
height: ScreenUtil().setWidth(32),
),
)))
],
),
VEmptyView(60),
SingleChildScrollView(
controller: _scrollController,
child: Column(
mainAxisSize: MainAxisSize.min,
children: cancelReasonList.map((value) {
return GestureDetector(
onTap: () {
for (var item in cancelReasonList) {
item['select'] = false;
isShowTF = false;
paddingBottom =
ScreenUtil.screenHeightDp.ceil() -
138 -
340 -
46;
340;
if (item['title'] == value['title']) {
item['select'] = true;
if (item['title'] == '其他原因') {
isShowTF = true;
// paddingBottom = 130;
paddingBottom =
ScreenUtil.screenHeightDp.ceil() -
138 -
340 -
46;
}
}
}
}
}
state(() {});
},
child: Column(children: [
Row(
children: [
Image.asset(
value['select']
? 'assets/select.png'
: 'assets/unselect.png',
width: ScreenUtil().setWidth(44)),
HEmptyView(30),
Text(value['title'],
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
fontWeight: FontWeight.normal,
decoration: TextDecoration.none,
color: MyColours.color_333333))
],
),
value['title'] == '其他原因' && isShowTF
? Material(
state(() {});
},
child: Column(children: [
Row(
children: [
Image.asset(
value['select']
? 'assets/select.png'
: 'assets/unselect.png',
width: ScreenUtil().setWidth(44)),
HEmptyView(30),
Text(value['title'],
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
fontWeight: FontWeight.normal,
decoration: TextDecoration.none,
color: MyColours.color_333333))
],
),
value['title'] == '其他原因' && isShowTF
? Material(
child: Container(
color: Colors.white,
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(76)),
child: TextField(
maxLines: 1,
controller: _cancelController,
focusNode: _cancelNode,
textAlignVertical:
TextAlignVertical.bottom,
decoration: InputDecoration(
hintText: "请填写原因",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color:
MyColours.color_d8d8d8),
color: Colors.white,
padding: EdgeInsets.only(
left: ScreenUtil().setWidth(76)),
child: TextField(
maxLines: 1,
controller: _cancelController,
focusNode: _cancelNode,
textAlignVertical:
TextAlignVertical.bottom,
decoration: InputDecoration(
hintText: "请填写原因",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color:
MyColours.color_d8d8d8),
),
// border: InputBorder.none,
),
// border: InputBorder.none,
onChanged: (_) {
setState(() {});
},
onEditingComplete: () {
print('fff');
_cancelNode.unfocus();
},
// keyboardType: TextInputType.number,
),
onChanged: (_) {
setState(() {});
},
onEditingComplete: () {
print('fff');
_cancelNode.unfocus();
},
// keyboardType: TextInputType.number,
),
))
: Container(),
VEmptyView(40)
]),
);
}).toList(),
),
VEmptyView(15),
Material(
child: RoundButton(
onPressed: () {
String desc = '';
for (var value in cancelReasonList) {
if (value['select'] == true) {
desc = value['title'];
if (value['title'] == '其他原因') {
desc = _cancelController.text.trim();
if (desc.isEmpty) {
Utils.showToast("请填写原因");
return;
))
: Container(),
VEmptyView(40)
]),
);
}).toList(),
),
),
VEmptyView(15),
Material(
child: RoundButton(
onPressed: () {
String desc = '';
for (var value in cancelReasonList) {
if (value['select'] == true) {
desc = value['title'];
if (value['title'] == '其他原因') {
desc = _cancelController.text.trim();
if (desc.isEmpty) {
Utils.showToast("请填写原因");
return;
}
}
}
}
}
if (desc == '') {
Utils.showToast('请选择原因');
return;
}
if (desc == '') {
Utils.showToast('请选择原因');
return;
}
Navigator.of(context).pop();
Loading.showLoading(context);
setReserveStatus('4', desc: desc);
},
text: '确认',
height: ScreenUtil().setWidth(80),
width: ScreenUtil().setWidth(300),
radius: ScreenUtil().setWidth(10),
),
)
],
),
)),
Navigator.of(context).pop();
Loading.showLoading(context);
setReserveStatus('4', desc: desc);
},
text: '确认',
height: ScreenUtil().setWidth(80),
width: ScreenUtil().setWidth(300),
radius: ScreenUtil().setWidth(10),
),
)
],
),
)),
),
);
});
});
... ... @@ -511,8 +522,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
list.add(manager.roleUserName);
}
DialogUtil.showSelectCusmanDialog(
context, list)
.then((value) {
context, list,(value){
if (value != null) {
setState(() {
cusmanText =
... ... @@ -521,6 +531,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
});
_setCurrManager();
}
})
.then((value) {
});
},
child: Text(
... ...
... ... @@ -378,7 +378,7 @@ class DialogUtil {
}
//显示选择客户经理弹框
static Future<List<int>> showSelectCusmanDialog(BuildContext context,List<String> data){
static Future<List<int>> showSelectCusmanDialog(BuildContext context,List<String> data,ValueChanged valueChanged){
return Picker(
adapter: PickerDataAdapter<String>(pickerdata: data),
hideHeader: false,
... ... @@ -389,6 +389,9 @@ class DialogUtil {
selectedTextStyle: TextStyle(color: Colors.blue),
onConfirm: (Picker picker, List value) {
print(value.toString());
if(valueChanged!=null){
valueChanged(value);
}
}
).showModal<List<int>>(context).then((value){
LogUtil.v("value:${value.toString()}");
... ...