|
|
@ -1,4 +1,5 @@
|
|
|
|
// Flutter imports:
|
|
|
|
// Flutter imports:
|
|
|
|
|
|
|
|
import 'package:akuCommunity/widget/buttons/bottom_button.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
@ -104,17 +105,13 @@ class _FixedSubmitPageState extends State<FixedSubmitPage> {
|
|
|
|
padding: EdgeInsets.fromLTRB(24.w, 24.w, 24.w, 0),
|
|
|
|
padding: EdgeInsets.fromLTRB(24.w, 24.w, 24.w, 0),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
BeeMap
|
|
|
|
BeeMap.fixTag[model.type].text
|
|
|
|
.fixTag[model.type]
|
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
.color(ktextPrimary)
|
|
|
|
.color(ktextPrimary)
|
|
|
|
.bold
|
|
|
|
.bold
|
|
|
|
.size(32.sp)
|
|
|
|
.size(32.sp)
|
|
|
|
.make(),
|
|
|
|
.make(),
|
|
|
|
Spacer(),
|
|
|
|
Spacer(),
|
|
|
|
BeeMap
|
|
|
|
BeeMap.fixState[model.status].text
|
|
|
|
.fixState[model.status]
|
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
.color(_getColor(model.status))
|
|
|
|
.color(_getColor(model.status))
|
|
|
|
.size(24.sp)
|
|
|
|
.size(24.sp)
|
|
|
|
.make(),
|
|
|
|
.make(),
|
|
|
@ -159,31 +156,31 @@ class _FixedSubmitPageState extends State<FixedSubmitPage> {
|
|
|
|
|
|
|
|
|
|
|
|
Widget _buildCheckBox(FixedSubmitModel model) {
|
|
|
|
Widget _buildCheckBox(FixedSubmitModel model) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
// GestureDetector(
|
|
|
|
// GestureDetector(
|
|
|
|
// onTap: () {
|
|
|
|
// onTap: () {
|
|
|
|
// if (_selected.contains(model.id)) {
|
|
|
|
// if (_selected.contains(model.id)) {
|
|
|
|
// _selected.remove(model.id);
|
|
|
|
// _selected.remove(model.id);
|
|
|
|
// } else {
|
|
|
|
// } else {
|
|
|
|
// _selected.add(model.id);
|
|
|
|
// _selected.add(model.id);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// setState(() {});
|
|
|
|
// setState(() {});
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// child:
|
|
|
|
// child:
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
constraints: BoxConstraints(minHeight: 384.w, minWidth: 686.w),
|
|
|
|
constraints: BoxConstraints(minHeight: 384.w, minWidth: 686.w),
|
|
|
|
child: FixedCheckBox(
|
|
|
|
child: FixedCheckBox(
|
|
|
|
key:ValueKey(model.id),
|
|
|
|
key: ValueKey(model.id),
|
|
|
|
onChanged: (isSelect) {
|
|
|
|
onChanged: (isSelect) {
|
|
|
|
if (isSelect) {
|
|
|
|
if (isSelect) {
|
|
|
|
_selected.add(model.id);
|
|
|
|
_selected.add(model.id);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
_selected.remove(model.id);
|
|
|
|
_selected.remove(model.id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// child: BeeRadio(value: model.id, groupValues: _selected),
|
|
|
|
// child: BeeRadio(value: model.id, groupValues: _selected),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -233,63 +230,45 @@ class _FixedSubmitPageState extends State<FixedSubmitPage> {
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
],
|
|
|
|
],
|
|
|
|
body: Column(
|
|
|
|
body: BeeListView(
|
|
|
|
children: [
|
|
|
|
controller: _easyRefreshController,
|
|
|
|
BeeListView(
|
|
|
|
path: API.manager.fixedSubmit,
|
|
|
|
controller: _easyRefreshController,
|
|
|
|
convert: (model) {
|
|
|
|
path: API.manager.fixedSubmit,
|
|
|
|
return model.tableList
|
|
|
|
convert: (model) {
|
|
|
|
.map((e) => FixedSubmitModel.fromJson(e))
|
|
|
|
return model.tableList
|
|
|
|
.toList();
|
|
|
|
.map((e) => FixedSubmitModel.fromJson(e))
|
|
|
|
},
|
|
|
|
.toList();
|
|
|
|
builder: (items) {
|
|
|
|
},
|
|
|
|
return ListView.separated(
|
|
|
|
builder: (items) {
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
return ListView.separated(
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
return Stack(
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
children: [
|
|
|
|
return Stack(
|
|
|
|
_buildCheckBox(items[index]),
|
|
|
|
children: [
|
|
|
|
_buildCard(items[index])
|
|
|
|
_buildCheckBox(items[index]),
|
|
|
|
],
|
|
|
|
_buildCard(items[index])
|
|
|
|
);
|
|
|
|
],
|
|
|
|
},
|
|
|
|
);
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
},
|
|
|
|
return 24.w.heightBox;
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
},
|
|
|
|
return 24.w.heightBox;
|
|
|
|
itemCount: items.length);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
itemCount: items.length);
|
|
|
|
),
|
|
|
|
},
|
|
|
|
bottomNavi: BottomButton(
|
|
|
|
).expand(),
|
|
|
|
onPressed: _isEdit
|
|
|
|
MaterialButton(
|
|
|
|
? _selected.isEmpty
|
|
|
|
disabledColor: Colors.white.withOpacity(0.5),
|
|
|
|
? null
|
|
|
|
disabledTextColor: ktextSubColor.withOpacity(0.8),
|
|
|
|
|
|
|
|
textColor: ktextPrimary,
|
|
|
|
|
|
|
|
onPressed: _isEdit
|
|
|
|
|
|
|
|
? _selected.isEmpty
|
|
|
|
|
|
|
|
? null
|
|
|
|
|
|
|
|
: () {
|
|
|
|
|
|
|
|
Get.dialog(_showDeletDialog());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
: () {
|
|
|
|
: () {
|
|
|
|
userProvider.isLogin
|
|
|
|
Get.dialog(_showDeletDialog());
|
|
|
|
? AddFixedSubmitPage().to()
|
|
|
|
}
|
|
|
|
: BotToast.showText(text: '请先登录!');
|
|
|
|
: () async {
|
|
|
|
},
|
|
|
|
bool needRefresh = await Get.to(AddFixedSubmitPage());
|
|
|
|
child: _isEdit
|
|
|
|
if (needRefresh == null) _easyRefreshController.callRefresh();
|
|
|
|
? '删除订单'.text.bold.size(32.sp).make()
|
|
|
|
},
|
|
|
|
: '新增'.text.bold.size(32.sp).make(),
|
|
|
|
child: _isEdit
|
|
|
|
minWidth: double.infinity,
|
|
|
|
? '删除订单'.text.bold.size(32.sp).make()
|
|
|
|
height: 98.w,
|
|
|
|
: '新增'.text.bold.size(32.sp).make(),
|
|
|
|
elevation: 0,
|
|
|
|
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
|
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.box
|
|
|
|
|
|
|
|
.padding(EdgeInsets.only(
|
|
|
|
|
|
|
|
bottom: MediaQuery.of(context).padding.bottom))
|
|
|
|
|
|
|
|
.color(kPrimaryColor)
|
|
|
|
|
|
|
|
.make(),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|