Commit f9174cee33656ad0ea14b13371816fe34a052449

Authored by wdn127929
1 parent e5cd8a9f

宴会丢单不再占用桌位

... ... @@ -33,9 +33,9 @@ if (flutterRoot == null) {
def flutterVersionCode = "502"
def flutterVersionCode = "503"
if (flutterVersionCode == null) {
flutterVersionCode = '502'
flutterVersionCode = '503'
}
... ... @@ -44,9 +44,9 @@ if (flutterVersionCode == null) {
def flutterVersionName = "5.0.2"
def flutterVersionName = "5.0.3"
if (flutterVersionName == null) {
flutterVersionName = '5.0.2'
flutterVersionName = '5.0.3'
}
... ...
... ... @@ -137,6 +137,7 @@ class BasicInfo {
String warrantId; //担保人id
List<Images> warrantImages; //担保图片
String warrantDesc; //担保说明
String lost; //丢单信息
BasicInfo(
{this.ddate,
... ... @@ -150,7 +151,8 @@ class BasicInfo {
this.images,
this.warrantId,
this.warrantImages,
this.warrantDesc});
this.warrantDesc,
this.lost});
BasicInfo.fromJson(Map<String, dynamic> json) {
ddate = json['ddate'];
... ... @@ -189,6 +191,7 @@ class BasicInfo {
}
}
warrantDesc = json['warrant_desc'];
lost = json['lost'];
}
Map<String, dynamic> toJson() {
... ...
... ... @@ -32,6 +32,7 @@ class FeastBoardSunModel {
String nickName;
String account;
String talbeStr;
String lost;
String get talbeStrShow {
if (talbeStr.endsWith('、')) {
... ... @@ -47,7 +48,8 @@ class FeastBoardSunModel {
this.className,
this.nickName,
this.account,
this.talbeStr});
this.talbeStr,
this.lost});
FeastBoardSunModel.fromJson(Map<String, dynamic> json) {
rname = json['rname'];
... ... @@ -57,6 +59,7 @@ class FeastBoardSunModel {
nickName = json['nick_name'];
account = json['account'];
talbeStr = json['talbeStr'];
lost = json['lost'];
}
Map<String, dynamic> toJson() {
... ... @@ -68,6 +71,7 @@ class FeastBoardSunModel {
data['nick_name'] = this.nickName;
data['account'] = this.account;
data['talbeStr'] = this.talbeStr;
data['lost'] = this.lost;
return data;
}
}
... ...
... ... @@ -323,15 +323,18 @@ class SelectTableFPageState extends State<SelectTableFPage> {
}
banquetByDateDataTemp.forEach((element) {
FeastBoardSunModel feastBoardSunModel = element.data[banquetKey][0];
Notebook notebook = Notebook();
notebook.tid = element.title;
notebook.status = '10'; //宴会类型
notebook.className = feastBoardSunModel.className;
notebook.id = feastBoardSunModel.rid;
notebook.rname = feastBoardSunModel.rname;
notebook.nick_name =
feastBoardSunModel.nickName ?? feastBoardSunModel.account;
noteBooks.add(notebook);
if (feastBoardSunModel.lost == null || feastBoardSunModel.lost == '') {
//未丢单的宴会
Notebook notebook = Notebook();
notebook.tid = element.title;
notebook.status = '10'; //宴会类型
notebook.className = feastBoardSunModel.className;
notebook.id = feastBoardSunModel.rid;
notebook.rname = feastBoardSunModel.rname;
notebook.nick_name =
feastBoardSunModel.nickName ?? feastBoardSunModel.account;
noteBooks.add(notebook);
}
});
for (Notebook notebook in noteBooks) {
if (notebook.tid.isEmpty) continue;
... ... @@ -515,18 +518,18 @@ class SelectTableFPageState extends State<SelectTableFPage> {
// timeStrStart = ymd + ' ' + temp.first + ':00';
// timeStrEnd = ymd + ' ' + temp.last + ':00';
// } else {
timeStrStart = widget.dateTime.year.toString() +
"-" +
Utils.addZeroNumber(widget.dateTime.month) +
"-" +
Utils.addZeroNumber(widget.dateTime.day) +
" 00:00:00";
timeStrEnd = widget.dateTime.year.toString() +
"-" +
Utils.addZeroNumber(widget.dateTime.month) +
"-" +
Utils.addZeroNumber(widget.dateTime.day) +
" 23:59:59";
timeStrStart = widget.dateTime.year.toString() +
"-" +
Utils.addZeroNumber(widget.dateTime.month) +
"-" +
Utils.addZeroNumber(widget.dateTime.day) +
" 00:00:00";
timeStrEnd = widget.dateTime.year.toString() +
"-" +
Utils.addZeroNumber(widget.dateTime.month) +
"-" +
Utils.addZeroNumber(widget.dateTime.day) +
" 23:59:59";
// }
startDay = (DateTime.parse(timeStrStart).millisecondsSinceEpoch) / 1000;
endDay = (DateTime.parse(timeStrEnd).millisecondsSinceEpoch) / 1000;
... ...
... ... @@ -109,7 +109,10 @@ class _FeastBoardItemState extends State<FeastBoardItem> {
padding: EdgeInsets.symmetric(
horizontal: w(4), vertical: w(2)),
decoration: BoxDecoration(
color: MyColours.color_438E93,
color: boardSunModel.lost == '' ||
boardSunModel.lost == null
? MyColours.color_438E93
: MyColours.color_BFC4D4,
borderRadius: BorderRadius.circular(w(5)),
),
child: ConstrainedBox(
... ...
... ... @@ -856,6 +856,43 @@ class _FeastDetailPageState extends State<FeastDetailPage> {
));
}
/// 丢单原因
Widget lostCommentsWidget() {
return Container(
margin: EdgeInsets.only(bottom: h(26)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(6)),
border: Border.all(width: w(1), color: MyColours.color_438E93)),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Container(
width: double.infinity,
// height: h(31),
padding: EdgeInsets.symmetric(horizontal: w(12), vertical: h(6)),
decoration: BoxDecoration(
color: MyColours.color_438E93,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(r(5)),
topRight: Radius.circular(r(5)))),
child: Text(
'丢单原因',
style:
TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)),
),
),
VEmptyView(16),
Padding(
padding: EdgeInsets.only(
left: w(12), right: w(12), top: w(8), bottom: w(35)),
child: Text(
feastModel.banquetDetail.basicInfo.lost,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28)),
),
)
]));
}
/// 发票
Widget invoiceWidget() {
return Container(
... ... @@ -1304,7 +1341,19 @@ class _FeastDetailPageState extends State<FeastDetailPage> {
controller: _scrollController,
child: Column(children: [
VEmptyView(32),
baseInfoWidget(), //基本信息
Stack(children: [
baseInfoWidget(), //基本信息
if (feastModel.banquetDetail.basicInfo.lost !=
null &&
feastModel.banquetDetail.basicInfo.lost != '')
Positioned(
top: w(90),
right: w(50),
child: Image.asset(
Utils.getImgPath('lost'),
width: w(60),
))
]),
VEmptyView(52),
//场次
ListView.builder(
... ... @@ -1326,10 +1375,15 @@ class _FeastDetailPageState extends State<FeastDetailPage> {
//合同
// contractWidget(),
invoiceWidget()
invoiceWidget(),
if (feastModel.banquetDetail.basicInfo.lost != null &&
feastModel.banquetDetail.basicInfo.lost != '')
lostCommentsWidget()
]))),
),
widget.canEdit
widget.canEdit &&
(feastModel.banquetDetail.basicInfo.lost == null ||
feastModel.banquetDetail.basicInfo.lost == '')
? Row(
children: [
Expanded(
... ...
... ... @@ -5,6 +5,7 @@ import 'package:one_key/models/comments_label_model.dart';
import 'package:one_key/models/comments_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/round_button.dart';
import 'package:one_key/widgets/system_app_bar.dart';
... ... @@ -522,6 +523,9 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> {
showInput =
!showInput;
});
DialogUtil
.openCommentsModalBottomSheet(
context);
},
),
),
... ...
... ... @@ -1304,30 +1304,32 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '营销中心'))),
// InkWell(
// onTap: () {
// if (outDay == '0') {
// return;
// }
// if (Utils.getAuthority(
// context, '评价管理')) {
// NavigatorUtil
// .goCommentManageHomePage(
// context);
// }
// },
// child: _item(
// outDay == '0' ||
// !Utils.getAuthority(
// context, '评价管理')
// ? Utils.getImgPath(
// 'my_comment_un')
// : Utils.getImgPath(
// 'my_comment'),
// '评价管理',
// isRowLow: outDay == '0' ||
// !Utils.getAuthority(
// context, '评价管理'))),
InkWell(
onTap: () {
if (outDay == '0') {
return;
}
if (Utils.getAuthority(
context, '评价管理')) {
NavigatorUtil
.goCommentManageHomePage(
context);
}
},
child: _item(
outDay == '0' ||
!Utils.getAuthority(
context, '评价管理')
? Utils.getImgPath(
'my_comment_un')
: Utils.getImgPath(
'my_comment'),
'评价管理',
isRowLow: outDay == '0' ||
!Utils.getAuthority(
context, '评价管理'))),
onTap: () {}, child: _item('', '空空空空')),
InkWell(
onTap: () {}, child: _item('', '空空空空')),
],
... ...
... ... @@ -757,7 +757,7 @@ class TableManagerModel with ChangeNotifier {
FeastBoardModel feastBoardModel = FeastBoardModel();
feastBoardModel.title = table.id;
feastBoardModel.data = element.data;
banquetByDateDataTemp.add(feastBoardModel);
banquetByDateDataTemp.add(feastBoardModel); //宴会(丢单除外)
}
});
});
... ... @@ -772,15 +772,18 @@ class TableManagerModel with ChangeNotifier {
}
banquetByDateDataTemp.forEach((element) {
FeastBoardSunModel feastBoardSunModel = element.data[banquetKey][0];
Notebook notebook = Notebook();
notebook.tid = element.title;
notebook.status = '10'; //宴会类型
notebook.className = feastBoardSunModel.className;
notebook.id = feastBoardSunModel.rid;
notebook.rname = feastBoardSunModel.rname;
notebook.nick_name =
feastBoardSunModel.nickName ?? feastBoardSunModel.account;
noteBooks.add(notebook);
if (feastBoardSunModel.lost == null || feastBoardSunModel.lost == '') {
//未丢单的宴会
Notebook notebook = Notebook();
notebook.tid = element.title;
notebook.status = '10'; //宴会类型
notebook.className = feastBoardSunModel.className;
notebook.id = feastBoardSunModel.rid;
notebook.rname = feastBoardSunModel.rname;
notebook.nick_name =
feastBoardSunModel.nickName ?? feastBoardSunModel.account;
noteBooks.add(notebook);
}
});
// List<Notebook> noteBooks =
... ...
... ... @@ -55,6 +55,87 @@ typedef ClickCallback = void Function(String value);
// };
class DialogUtil {
//回复评论弹框
static openCommentsModalBottomSheet(context,
{VoidCallback lCallback, VoidCallback rCallback}) async {
final option = await showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
isDismissible: false,
builder: (BuildContext context) {
return Container(
// height: ScreenUtil().setWidth(180 * 2),
decoration: BoxDecoration(
color: MyColours.color_DBDBDB,
// borderRadius: BorderRadius.only(
// topLeft: Radius.circular(ScreenUtil().setWidth(24)),
// topRight: Radius.circular(ScreenUtil().setWidth(24)))
),
child: Row(
children: <Widget>[
InkWell(
onTap: lCallback,
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(58 * 2),
child: Center(
child: Text(
'拍摄',
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_353535,
fontWeight: FontWeight.bold),
),
)),
),
MyDivider(
double.infinity,
ScreenUtil().setWidth(2),
color: MyColours.color_EEEEEE,
),
InkWell(
onTap: rCallback,
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(58 * 2),
child: Center(
child: Text(
'从相册选择',
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_353535,
fontWeight: FontWeight.bold),
),
)),
),
MyDivider(
double.infinity,
ScreenUtil().setWidth(10),
color: MyColours.color_EEEEEE,
),
InkWell(
onTap: () {
Navigator.pop(context, '取消');
},
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(58 * 2),
child: Center(
child: Text(
'取消',
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_353535,
fontWeight: FontWeight.bold),
),
)))
],
),
);
});
}
static List<Widget> menuSelectBtn(MenuSunModel menuSunModel, state) {
List<Widget> temp = [];
for (int i = 0; i < menuSunModel.practice.length; i++) {
... ...