|
...
|
...
|
@@ -17,6 +17,7 @@ import 'package:provider/provider.dart'; |
|
|
|
import '../../constant/state.dart';
|
|
|
|
import '../../models/dsolt_xt.dart';
|
|
|
|
import '../../models/feast_menu_model.dart';
|
|
|
|
import '../../models/get_banquet_by_id_new_model.dart';
|
|
|
|
import '../../models/set_xuan_tai_model.dart';
|
|
|
|
import '../../models/setmeal_by_id_model.dart';
|
|
|
|
import '../../models/upload_img_model.dart';
|
|
...
|
...
|
@@ -176,9 +177,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
await feastModel.getStaff(context);
|
|
|
|
}
|
|
|
|
|
|
|
|
///获取宴会详情
|
|
|
|
///获取宴会详情
|
|
|
|
_getBanquetById() async {
|
|
|
|
Map<String, String> pramas = {'rid': '64'};//feastModel.rid
|
|
|
|
Map<String, String> pramas = {'rid': '64'}; //feastModel.rid
|
|
|
|
await feastModel.getBanquetById(context, pramas);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -2496,13 +2497,26 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
left: w(12), right: w(12), top: w(8), bottom: w(11)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
baseInfoItem('宴会日期:', '2022-08-02 (周二 七月初五)'),
|
|
|
|
baseInfoItem('宴会类型:', '婚宴'),
|
|
|
|
baseInfoItem('预订人:', '方 先生'),
|
|
|
|
baseInfoItem('场次数量:', '共 1 场'),
|
|
|
|
baseInfoItem('电话:', '15833517582'),
|
|
|
|
baseInfoItem('服务经理:', '刘经理'),
|
|
|
|
baseInfoItem('备注:', '无'),
|
|
|
|
baseInfoItem(
|
|
|
|
'宴会日期:',
|
|
|
|
createDateText(
|
|
|
|
context,
|
|
|
|
DateTime.fromMillisecondsSinceEpoch(int.parse(
|
|
|
|
feastModel.banquetDetail.basicInfo.ddate) *
|
|
|
|
1000))),
|
|
|
|
baseInfoItem(
|
|
|
|
'宴会类型:', feastModel.banquetDetail.basicInfo.classify),
|
|
|
|
baseInfoItem('预订人:',
|
|
|
|
'${feastModel.banquetDetail.basicInfo.rname} ${feastModel.banquetDetail.basicInfo.sex}'),
|
|
|
|
baseInfoItem('场次数量:',
|
|
|
|
'共 ${feastModel.banquetDetail.sessionsInfo.length} 场'),
|
|
|
|
baseInfoItem('电话:', feastModel.banquetDetail.basicInfo.phone),
|
|
|
|
baseInfoItem(
|
|
|
|
'服务经理:',
|
|
|
|
feastModel.banquetDetail.basicInfo.jiedan.nickName ??
|
|
|
|
feastModel.banquetDetail.basicInfo.jiedan.account),
|
|
|
|
baseInfoItem(
|
|
|
|
'备注:', feastModel.banquetDetail.basicInfo.remark ?? '无'),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
...
|
...
|
@@ -2511,9 +2525,15 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
}
|
|
|
|
|
|
|
|
///第一场 。第二场。。。。
|
|
|
|
Widget sessionsWidget(
|
|
|
|
String title,
|
|
|
|
) {
|
|
|
|
Widget sessionsWidget(String title, SessionsInfo sessionsInfo) {
|
|
|
|
int tableNum = 0;
|
|
|
|
List<String> temp = sessionsInfo.tableInfo.split('、');
|
|
|
|
temp.forEach((element) {
|
|
|
|
int start = element.indexOf('(');
|
|
|
|
int end = element.length - 2;
|
|
|
|
String numstr = element.substring(start + 1, end);
|
|
|
|
tableNum += int.parse(numstr);
|
|
|
|
});
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(bottom: h(26)),
|
|
|
|
decoration: BoxDecoration(
|
|
...
|
...
|
@@ -2541,9 +2561,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
left: w(12), right: w(12), top: w(8), bottom: w(11)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
baseInfoItem('场次时间:', '2022-08-02 午餐 12:00至14:00'),
|
|
|
|
baseInfoItem('桌位数量:', '共 32 桌'),
|
|
|
|
baseInfoItem('桌位信息:', '凤凰厅 (30桌)、包间1 (1桌)、包间2 (1桌)'),
|
|
|
|
baseInfoItem('场次时间:', sessionsInfo.rdate),
|
|
|
|
baseInfoItem('桌位数量:', '共 ${tableNum} 桌'),
|
|
|
|
baseInfoItem('桌位信息:', sessionsInfo.tableInfo),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
|
|
child: Row(
|
|
...
|
...
|
@@ -2558,11 +2578,13 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount: 3,
|
|
|
|
itemCount: sessionsInfo.setmeal.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext context, int index) {
|
|
|
|
SetmealDetail setmealDetail =
|
|
|
|
sessionsInfo.setmeal[index];
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.only(bottom: w(8)),
|
|
|
|
margin: EdgeInsets.only(bottom: w(12)),
|
|
...
|
...
|
@@ -2576,7 +2598,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text('1299套餐',
|
|
|
|
Text(setmealDetail.mealName,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_515151,
|
|
...
|
...
|
@@ -2604,19 +2626,22 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
VEmptyView(16),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text('10 人/桌',
|
|
|
|
Text(
|
|
|
|
'${setmealDetail.pnum} 人/桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: font(12))),
|
|
|
|
HEmptyView(24),
|
|
|
|
Text('保证 30 桌',
|
|
|
|
Text(
|
|
|
|
'保证 ${setmealDetail.min} 桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: font(12))),
|
|
|
|
HEmptyView(24),
|
|
|
|
Text('备用 2 桌',
|
|
|
|
Text(
|
|
|
|
'备用 ${setmealDetail.spare} 桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
...
|
...
|
@@ -2628,9 +2653,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
}))
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
sessionsItem('酒水安排:'),
|
|
|
|
sessionsItem('其他配置:'),
|
|
|
|
remarkItem('备注:')
|
|
|
|
sessionsItem('酒水安排:', sessionsInfo),
|
|
|
|
sessionsItem('其他配置:', sessionsInfo),
|
|
|
|
remarkItem('备注:', sessionsInfo)
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
...
|
...
|
@@ -2639,7 +2664,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
}
|
|
|
|
|
|
|
|
///备注----照片
|
|
|
|
Widget remarkItem(String title) {
|
|
|
|
Widget remarkItem(String title, SessionsInfo sessionsInfo) {
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
|
|
child: Row(
|
|
...
|
...
|
@@ -2655,18 +2680,134 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'剑南春52度剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml500ml',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(12))),
|
|
|
|
VEmptyView(16),
|
|
|
|
_getGridImg(['fff', '', 'fff', '', 'fff', '', 'fff', ''])
|
|
|
|
sessionsInfo.remark == null || sessionsInfo.remark == ''
|
|
|
|
? SizedBox()
|
|
|
|
: Text(sessionsInfo.remark,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(12))),
|
|
|
|
sessionsInfo.remark == null || sessionsInfo.remark == ''
|
|
|
|
? SizedBox()
|
|
|
|
: VEmptyView(16),
|
|
|
|
_getGridImg(sessionsInfo.images.map((e) {
|
|
|
|
return e.url;
|
|
|
|
}).toList())
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
///计算合计费用
|
|
|
|
_calculatePrice(costInfoModel) {
|
|
|
|
double sum = double.parse(costInfoModel.sumPrice); //原来总金额
|
|
|
|
double total = 0.0;
|
|
|
|
if (Utils.isNumeric(costInfoModel.serviceC.text)) {
|
|
|
|
//输入的是数字,计算金额
|
|
|
|
|
|
|
|
if (costInfoModel.service) {
|
|
|
|
//选中固定金额
|
|
|
|
// if(double.parse(value) > sum){
|
|
|
|
|
|
|
|
// }
|
|
|
|
total = sum + double.parse(costInfoModel.serviceC.text);
|
|
|
|
} else {
|
|
|
|
//选中百分比
|
|
|
|
if (int.parse(costInfoModel.serviceC.text) > 100) {
|
|
|
|
Utils.showToast('请输入小于100的数字');
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// 使除数为0
|
|
|
|
double input = double.parse(costInfoModel.serviceC.text);
|
|
|
|
total = sum + sum * input / 100;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// if (!Utils.isNumeric(costInfoModel.discountC.text)) {
|
|
|
|
// costInfoModel.totalPrice = costInfoModel.sumPrice;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
if (Utils.isNumeric(costInfoModel.discountC.text)) {
|
|
|
|
//输入的是数字,计算金额
|
|
|
|
|
|
|
|
if (costInfoModel.discount) {
|
|
|
|
//选中固定金额
|
|
|
|
// if(double.parse(value) > sum){
|
|
|
|
|
|
|
|
// }
|
|
|
|
total -= double.parse(costInfoModel.discountC.text);
|
|
|
|
} else {
|
|
|
|
//选中百分比
|
|
|
|
if (int.parse(costInfoModel.discountC.text) > 100) {
|
|
|
|
Utils.showToast('请输入小于100的数字');
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// 使除数为0
|
|
|
|
double input = double.parse(costInfoModel.discountC.text);
|
|
|
|
total = total - sum * input / 100;
|
|
|
|
}
|
|
|
|
// String num2StrD = total.toStringAsFixed(2); //保留两位小数
|
|
|
|
// costInfoModel.totalPrice = num2StrD;
|
|
|
|
} else {
|
|
|
|
// if (!Utils.isNumeric(costInfoModel.serviceC.text)) {
|
|
|
|
// costInfoModel.totalPrice = costInfoModel.sumPrice;
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
if (total == 0.0) {
|
|
|
|
costInfoModel.totalPrice = costInfoModel.sumPrice;
|
|
|
|
} else {
|
|
|
|
String num2StrD = total.toStringAsFixed(2); //保留两位小数
|
|
|
|
costInfoModel.totalPrice = num2StrD;
|
|
|
|
}
|
|
|
|
double finalContract = 0.0; //最终议价
|
|
|
|
feastModel.banquetDetail.costInfo.forEach((element) {
|
|
|
|
finalContract += double.parse(element.totalPrice);
|
|
|
|
});
|
|
|
|
feastModel.banquetDetail.contractInfo.contractFinalPrice =
|
|
|
|
finalContract.toString();
|
|
|
|
feastModel.banquetDetail.contractInfo.contractFinalPriceC.text =
|
|
|
|
finalContract.toString();
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
|
|
|
|
// ///计算优惠金额
|
|
|
|
// _calculatDiscount(costInfoModel) {
|
|
|
|
// if (Utils.isNumeric(costInfoModel.discountC.text)) {
|
|
|
|
// //输入的是数字,计算金额
|
|
|
|
// double sum = double.parse(costInfoModel.totalPrice); //原来总金额
|
|
|
|
// double total = 0.0;
|
|
|
|
|
|
|
|
// if (costInfoModel.service) {
|
|
|
|
// //选中固定金额
|
|
|
|
// // if(double.parse(value) > sum){
|
|
|
|
|
|
|
|
// // }
|
|
|
|
// total = sum - double.parse(costInfoModel.discountC.text);
|
|
|
|
// } else {
|
|
|
|
// //选中百分比
|
|
|
|
// if (int.parse(costInfoModel.discountC.text) > 100) {
|
|
|
|
// Utils.showToast('请输入小于100的数字');
|
|
|
|
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// // 使除数为0
|
|
|
|
// double input = double.parse(costInfoModel.discountC.text);
|
|
|
|
// total = sum - sum * input / 100;
|
|
|
|
// }
|
|
|
|
// String num2StrD = total.toStringAsFixed(2); //保留两位小数
|
|
|
|
// costInfoModel.totalPrice = num2StrD;
|
|
|
|
// } else {
|
|
|
|
// if (!Utils.isNumeric(costInfoModel.serviceC.text)) {
|
|
|
|
// costInfoModel.totalPrice = costInfoModel.sumPrice;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
|
|
|
|
///费用详情
|
|
|
|
Widget costWidget() {
|
|
|
|
return Container(
|
|
...
|
...
|
@@ -2692,10 +2833,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
),
|
|
|
|
VEmptyView(34),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 2,
|
|
|
|
itemCount: feastModel.banquetDetail.costInfo.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
CostInfoModel costInfoModel =
|
|
|
|
feastModel.banquetDetail.costInfo[index];
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(12), right: w(12), bottom: w(27)),
|
|
...
|
...
|
@@ -2703,7 +2846,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'第一场费用:',
|
|
|
|
'${costInfoModel.title}:',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: font(12)),
|
|
...
|
...
|
@@ -2711,15 +2854,27 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
VEmptyView(8),
|
|
|
|
costItem('名称', '单价', '数量', '金额', isTitle: true),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 4,
|
|
|
|
itemCount: costInfoModel.data.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
CostInfoSunModel costInfoSunModel =
|
|
|
|
costInfoModel.data[index];
|
|
|
|
String name = '';
|
|
|
|
if (costInfoSunModel.cname != null) {
|
|
|
|
name = costInfoSunModel.cname;
|
|
|
|
}
|
|
|
|
if (costInfoSunModel.otherName != null) {
|
|
|
|
name = costInfoSunModel.otherName;
|
|
|
|
}
|
|
|
|
if (costInfoSunModel.wineName != null) {
|
|
|
|
name = costInfoSunModel.wineName;
|
|
|
|
}
|
|
|
|
return costItem(
|
|
|
|
'1299套餐',
|
|
|
|
'1299',
|
|
|
|
'30',
|
|
|
|
'38970',
|
|
|
|
name,
|
|
|
|
costInfoSunModel.unitPrice,
|
|
|
|
costInfoSunModel.numStr,
|
|
|
|
costInfoSunModel.price.toString(),
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
//服务费
|
|
...
|
...
|
@@ -2742,31 +2897,75 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('f_radio_sel'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Text(
|
|
|
|
'固定金额',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (costInfoModel.service) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
costInfoModel.service =
|
|
|
|
!costInfoModel.service;
|
|
|
|
});
|
|
|
|
if (costInfoModel.serviceC.text != '') {
|
|
|
|
_calculatePrice(
|
|
|
|
costInfoModel,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(costInfoModel.service
|
|
|
|
? 'f_radio_sel'
|
|
|
|
: 'f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Text(
|
|
|
|
'固定金额',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(16),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (!costInfoModel.service) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
costInfoModel.service =
|
|
|
|
!costInfoModel.service;
|
|
|
|
});
|
|
|
|
if (costInfoModel.serviceC.text != '') {
|
|
|
|
_calculatePrice(
|
|
|
|
costInfoModel,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(!costInfoModel.service
|
|
|
|
? 'f_radio_sel'
|
|
|
|
: 'f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Container(
|
|
|
|
width: w(40),
|
|
|
|
child: Text(
|
|
|
|
'百分比',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Container(
|
|
|
|
width: w(40),
|
|
|
|
child: Text(
|
|
|
|
'百分比',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
)),
|
|
|
|
HEmptyView(12),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
...
|
...
|
@@ -2784,7 +2983,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
// controller: controller,
|
|
|
|
controller: costInfoModel.serviceC,
|
|
|
|
// focusNode: node,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
...
|
...
|
@@ -2805,6 +3004,10 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
onChanged: (value) {
|
|
|
|
print('ggg');
|
|
|
|
|
|
|
|
_calculatePrice(
|
|
|
|
costInfoModel,
|
|
|
|
);
|
|
|
|
|
|
|
|
// nameStr = value;
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
...
|
...
|
@@ -2819,7 +3022,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
),
|
|
|
|
HEmptyView(4),
|
|
|
|
Text(
|
|
|
|
'%',
|
|
|
|
costInfoModel.service ? '元' : '%',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: font(12)),
|
|
...
|
...
|
@@ -2846,31 +3049,69 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('f_radio_sel'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Text(
|
|
|
|
'固定金额',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (costInfoModel.discount) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
costInfoModel.discount =
|
|
|
|
!costInfoModel.discount;
|
|
|
|
});
|
|
|
|
if (costInfoModel.discountC.text != '') {
|
|
|
|
_calculatePrice(
|
|
|
|
costInfoModel,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(costInfoModel.discount
|
|
|
|
? 'f_radio_sel'
|
|
|
|
: 'f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Text(
|
|
|
|
'固定金额',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
])),
|
|
|
|
HEmptyView(16),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Container(
|
|
|
|
width: w(40),
|
|
|
|
child: Text(
|
|
|
|
'折扣',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (!costInfoModel.discount) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
costInfoModel.discount =
|
|
|
|
!costInfoModel.discount;
|
|
|
|
});
|
|
|
|
if (costInfoModel.discountC.text != '') {
|
|
|
|
_calculatePrice(
|
|
|
|
costInfoModel,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(!costInfoModel.discount
|
|
|
|
? 'f_radio_sel'
|
|
|
|
: 'f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Container(
|
|
|
|
width: w(40),
|
|
|
|
child: Text(
|
|
|
|
'折扣',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
))
|
|
|
|
])),
|
|
|
|
HEmptyView(12),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
...
|
...
|
@@ -2888,7 +3129,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
// controller: controller,
|
|
|
|
controller: costInfoModel.discountC,
|
|
|
|
// focusNode: node,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
...
|
...
|
@@ -2909,6 +3150,10 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
onChanged: (value) {
|
|
|
|
print('ggg');
|
|
|
|
|
|
|
|
_calculatePrice(
|
|
|
|
costInfoModel,
|
|
|
|
);
|
|
|
|
|
|
|
|
// nameStr = value;
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
...
|
...
|
@@ -2923,7 +3168,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
),
|
|
|
|
HEmptyView(4),
|
|
|
|
Text(
|
|
|
|
'元',
|
|
|
|
costInfoModel.discount ? '元' : '%',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: font(12)),
|
|
...
|
...
|
@@ -2948,7 +3193,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Text(
|
|
|
|
'7000000 元',
|
|
|
|
'${costInfoModel.totalPrice} 元',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
...
|
...
|
@@ -3053,7 +3298,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
),
|
|
|
|
HEmptyView(12),
|
|
|
|
Text(
|
|
|
|
'159000 元',
|
|
|
|
'${feastModel.banquetDetail.contractInfo.contractTotalPrice} 元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151,
|
|
...
|
...
|
@@ -3101,7 +3346,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
],
|
|
|
|
)),
|
|
|
|
HEmptyView(12),
|
|
|
|
_textfield('1299', null, null, width: w(110)),
|
|
|
|
_textfield(
|
|
|
|
'请输入',
|
|
|
|
feastModel
|
|
|
|
.banquetDetail.contractInfo.contractFinalPriceC,
|
|
|
|
null,
|
|
|
|
width: w(110)),
|
|
|
|
HEmptyView(24),
|
|
|
|
Text(
|
|
|
|
'元',
|
|
...
|
...
|
@@ -3227,6 +3477,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
|
...
|
...
|
@@ -3361,7 +3612,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
}
|
|
|
|
|
|
|
|
///三组 左---中----右
|
|
|
|
Widget sessionsItem(String title) {
|
|
|
|
Widget sessionsItem(String title, SessionsInfo sessionsInfo) {
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
|
|
child: Row(
|
|
...
|
...
|
@@ -3375,10 +3626,21 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount: 3,
|
|
|
|
itemCount: title == '酒水安排:'
|
|
|
|
? sessionsInfo.wine.length
|
|
|
|
: sessionsInfo.other.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
String name = title == '酒水安排:'
|
|
|
|
? sessionsInfo.wine[index].wineName
|
|
|
|
: sessionsInfo.other[index].otherName;
|
|
|
|
String numStr = title == '酒水安排:'
|
|
|
|
? sessionsInfo.wine[index].wineNum
|
|
|
|
: sessionsInfo.other[index].otherNum;
|
|
|
|
String spec = title == '酒水安排:'
|
|
|
|
? sessionsInfo.wine[index].spec
|
|
|
|
: sessionsInfo.other[index].spec;
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.only(bottom: w(8)),
|
|
|
|
margin: EdgeInsets.only(bottom: w(12)),
|
|
...
|
...
|
@@ -3390,11 +3652,11 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text('剑南春52度500ml',
|
|
|
|
child: Text(name,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)))),
|
|
|
|
Text('60 份',
|
|
|
|
Text('${numStr} ${spec}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)))
|
|
...
|
...
|
@@ -3435,50 +3697,50 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(r(5)),
|
|
|
|
child: CachedNetworkImage(
|
|
|
|
// imageUrl: data[index].qiniuUrl,
|
|
|
|
imageUrl:
|
|
|
|
'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242332225H9-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662806063&t=d576b5247e04ce721c266f098625f145',
|
|
|
|
imageUrl: data[index],
|
|
|
|
// imageUrl:
|
|
|
|
// 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242332225H9-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662806063&t=d576b5247e04ce721c266f098625f145',
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
width: ScreenUtil().setWidth(38 * 2),
|
|
|
|
height: ScreenUtil().setWidth(38 * 2),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
top: 0,
|
|
|
|
right: 0,
|
|
|
|
child: GestureDetector(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath("f_delete"),
|
|
|
|
width: ScreenUtil().setWidth(24),
|
|
|
|
height: ScreenUtil().setWidth(24),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
//已经传到服务器,弹提醒窗口,是否删除
|
|
|
|
//修改之前有内容,则弹框
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "确认删除",
|
|
|
|
content: "是否确定删除该照片,删除操作不可逆转,请谨慎操作",
|
|
|
|
lCallback: () {
|
|
|
|
print("取消");
|
|
|
|
}, rCallback: () {
|
|
|
|
print("确定");
|
|
|
|
// widget.deleteCallback(index);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
// else {
|
|
|
|
// //点击删除按钮
|
|
|
|
// setState(() {
|
|
|
|
// temp.removeWhere((element) =>
|
|
|
|
// element == temp[index]);
|
|
|
|
// widget.model.imageQiniuUrlList
|
|
|
|
// .removeWhere((element) =>
|
|
|
|
// element ==
|
|
|
|
// widget.model
|
|
|
|
// .imageQiniuUrlList[index]);
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
)),
|
|
|
|
// Positioned(
|
|
|
|
// top: 0,
|
|
|
|
// right: 0,
|
|
|
|
// child: GestureDetector(
|
|
|
|
// child: Image.asset(
|
|
|
|
// Utils.getImgPath("f_delete"),
|
|
|
|
// width: ScreenUtil().setWidth(24),
|
|
|
|
// height: ScreenUtil().setWidth(24),
|
|
|
|
// ),
|
|
|
|
// onTap: () {
|
|
|
|
// //已经传到服务器,弹提醒窗口,是否删除
|
|
|
|
// //修改之前有内容,则弹框
|
|
|
|
// DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
// title: "确认删除",
|
|
|
|
// content: "是否确定删除该照片,删除操作不可逆转,请谨慎操作",
|
|
|
|
// lCallback: () {
|
|
|
|
// print("取消");
|
|
|
|
// }, rCallback: () {
|
|
|
|
// print("确定");
|
|
|
|
// // widget.deleteCallback(index);
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// // else {
|
|
|
|
// // //点击删除按钮
|
|
|
|
// // setState(() {
|
|
|
|
// // temp.removeWhere((element) =>
|
|
|
|
// // element == temp[index]);
|
|
|
|
// // widget.model.imageQiniuUrlList
|
|
|
|
// // .removeWhere((element) =>
|
|
|
|
// // element ==
|
|
|
|
// // widget.model
|
|
|
|
// // .imageQiniuUrlList[index]);
|
|
|
|
// // });
|
|
|
|
// // }
|
|
|
|
// // },
|
|
|
|
// )),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
...
|
...
|
@@ -3506,30 +3768,36 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child:
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(12)),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: _scrollController,
|
|
|
|
child: Column(children: [
|
|
|
|
baseInfoWidget(), //基本信息
|
|
|
|
VEmptyView(52),
|
|
|
|
//场次
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 3,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return sessionsWidget('第${index + 1}场');
|
|
|
|
}),
|
|
|
|
//费用详情
|
|
|
|
costWidget(),
|
|
|
|
//合同
|
|
|
|
contractWidget(),
|
|
|
|
|
|
|
|
invoiceWidget()
|
|
|
|
]))),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(12)),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: _scrollController,
|
|
|
|
child: Column(children: [
|
|
|
|
baseInfoWidget(), //基本信息
|
|
|
|
VEmptyView(52),
|
|
|
|
//场次
|
|
|
|
ListView.builder(
|
|
|
|
itemCount:
|
|
|
|
feastModel.banquetDetail.sessionsInfo.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
SessionsInfo sessionsInfo = feastModel
|
|
|
|
.banquetDetail.sessionsInfo[index];
|
|
|
|
String numStr =
|
|
|
|
ConvertNumberToChineseMoneyWords.toChinese(
|
|
|
|
index);
|
|
|
|
return sessionsWidget(
|
|
|
|
'第${numStr}场', sessionsInfo);
|
|
|
|
}),
|
|
|
|
//费用详情
|
|
|
|
costWidget(),
|
|
|
|
//合同
|
|
|
|
contractWidget(),
|
|
|
|
|
|
|
|
invoiceWidget()
|
|
|
|
]))),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
...
|
...
|
|