|
@@ -17,6 +17,7 @@ import 'package:provider/provider.dart'; |
|
@@ -17,6 +17,7 @@ import 'package:provider/provider.dart'; |
|
17
|
import '../../constant/state.dart';
|
17
|
import '../../constant/state.dart';
|
|
18
|
import '../../models/dsolt_xt.dart';
|
18
|
import '../../models/dsolt_xt.dart';
|
|
19
|
import '../../models/feast_menu_model.dart';
|
19
|
import '../../models/feast_menu_model.dart';
|
|
|
|
20
|
+import '../../models/get_banquet_by_id_new_model.dart';
|
|
20
|
import '../../models/set_xuan_tai_model.dart';
|
21
|
import '../../models/set_xuan_tai_model.dart';
|
|
21
|
import '../../models/setmeal_by_id_model.dart';
|
22
|
import '../../models/setmeal_by_id_model.dart';
|
|
22
|
import '../../models/upload_img_model.dart';
|
23
|
import '../../models/upload_img_model.dart';
|
|
@@ -176,9 +177,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -176,9 +177,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
176
|
await feastModel.getStaff(context);
|
177
|
await feastModel.getStaff(context);
|
|
177
|
}
|
178
|
}
|
|
178
|
|
179
|
|
|
179
|
-///获取宴会详情
|
180
|
+ ///获取宴会详情
|
|
180
|
_getBanquetById() async {
|
181
|
_getBanquetById() async {
|
|
181
|
- Map<String, String> pramas = {'rid': '64'};//feastModel.rid
|
182
|
+ Map<String, String> pramas = {'rid': '64'}; //feastModel.rid
|
|
182
|
await feastModel.getBanquetById(context, pramas);
|
183
|
await feastModel.getBanquetById(context, pramas);
|
|
183
|
}
|
184
|
}
|
|
184
|
|
185
|
|
|
@@ -2496,13 +2497,26 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2496,13 +2497,26 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2496
|
left: w(12), right: w(12), top: w(8), bottom: w(11)),
|
2497
|
left: w(12), right: w(12), top: w(8), bottom: w(11)),
|
|
2497
|
child: Column(
|
2498
|
child: Column(
|
|
2498
|
children: [
|
2499
|
children: [
|
|
2499
|
- baseInfoItem('宴会日期:', '2022-08-02 (周二 七月初五)'),
|
|
|
|
2500
|
- baseInfoItem('宴会类型:', '婚宴'),
|
|
|
|
2501
|
- baseInfoItem('预订人:', '方 先生'),
|
|
|
|
2502
|
- baseInfoItem('场次数量:', '共 1 场'),
|
|
|
|
2503
|
- baseInfoItem('电话:', '15833517582'),
|
|
|
|
2504
|
- baseInfoItem('服务经理:', '刘经理'),
|
|
|
|
2505
|
- baseInfoItem('备注:', '无'),
|
2500
|
+ baseInfoItem(
|
|
|
|
2501
|
+ '宴会日期:',
|
|
|
|
2502
|
+ createDateText(
|
|
|
|
2503
|
+ context,
|
|
|
|
2504
|
+ DateTime.fromMillisecondsSinceEpoch(int.parse(
|
|
|
|
2505
|
+ feastModel.banquetDetail.basicInfo.ddate) *
|
|
|
|
2506
|
+ 1000))),
|
|
|
|
2507
|
+ baseInfoItem(
|
|
|
|
2508
|
+ '宴会类型:', feastModel.banquetDetail.basicInfo.classify),
|
|
|
|
2509
|
+ baseInfoItem('预订人:',
|
|
|
|
2510
|
+ '${feastModel.banquetDetail.basicInfo.rname} ${feastModel.banquetDetail.basicInfo.sex}'),
|
|
|
|
2511
|
+ baseInfoItem('场次数量:',
|
|
|
|
2512
|
+ '共 ${feastModel.banquetDetail.sessionsInfo.length} 场'),
|
|
|
|
2513
|
+ baseInfoItem('电话:', feastModel.banquetDetail.basicInfo.phone),
|
|
|
|
2514
|
+ baseInfoItem(
|
|
|
|
2515
|
+ '服务经理:',
|
|
|
|
2516
|
+ feastModel.banquetDetail.basicInfo.jiedan.nickName ??
|
|
|
|
2517
|
+ feastModel.banquetDetail.basicInfo.jiedan.account),
|
|
|
|
2518
|
+ baseInfoItem(
|
|
|
|
2519
|
+ '备注:', feastModel.banquetDetail.basicInfo.remark ?? '无'),
|
|
2506
|
],
|
2520
|
],
|
|
2507
|
))
|
2521
|
))
|
|
2508
|
],
|
2522
|
],
|
|
@@ -2511,9 +2525,15 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2511,9 +2525,15 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2511
|
}
|
2525
|
}
|
|
2512
|
|
2526
|
|
|
2513
|
///第一场 。第二场。。。。
|
2527
|
///第一场 。第二场。。。。
|
|
2514
|
- Widget sessionsWidget(
|
|
|
|
2515
|
- String title,
|
|
|
|
2516
|
- ) {
|
2528
|
+ Widget sessionsWidget(String title, SessionsInfo sessionsInfo) {
|
|
|
|
2529
|
+ int tableNum = 0;
|
|
|
|
2530
|
+ List<String> temp = sessionsInfo.tableInfo.split('、');
|
|
|
|
2531
|
+ temp.forEach((element) {
|
|
|
|
2532
|
+ int start = element.indexOf('(');
|
|
|
|
2533
|
+ int end = element.length - 2;
|
|
|
|
2534
|
+ String numstr = element.substring(start + 1, end);
|
|
|
|
2535
|
+ tableNum += int.parse(numstr);
|
|
|
|
2536
|
+ });
|
|
2517
|
return Container(
|
2537
|
return Container(
|
|
2518
|
margin: EdgeInsets.only(bottom: h(26)),
|
2538
|
margin: EdgeInsets.only(bottom: h(26)),
|
|
2519
|
decoration: BoxDecoration(
|
2539
|
decoration: BoxDecoration(
|
|
@@ -2541,9 +2561,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2541,9 +2561,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2541
|
left: w(12), right: w(12), top: w(8), bottom: w(11)),
|
2561
|
left: w(12), right: w(12), top: w(8), bottom: w(11)),
|
|
2542
|
child: Column(
|
2562
|
child: Column(
|
|
2543
|
children: [
|
2563
|
children: [
|
|
2544
|
- baseInfoItem('场次时间:', '2022-08-02 午餐 12:00至14:00'),
|
|
|
|
2545
|
- baseInfoItem('桌位数量:', '共 32 桌'),
|
|
|
|
2546
|
- baseInfoItem('桌位信息:', '凤凰厅 (30桌)、包间1 (1桌)、包间2 (1桌)'),
|
2564
|
+ baseInfoItem('场次时间:', sessionsInfo.rdate),
|
|
|
|
2565
|
+ baseInfoItem('桌位数量:', '共 ${tableNum} 桌'),
|
|
|
|
2566
|
+ baseInfoItem('桌位信息:', sessionsInfo.tableInfo),
|
|
2547
|
Padding(
|
2567
|
Padding(
|
|
2548
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
2568
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
2549
|
child: Row(
|
2569
|
child: Row(
|
|
@@ -2558,11 +2578,13 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2558,11 +2578,13 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2558
|
),
|
2578
|
),
|
|
2559
|
Expanded(
|
2579
|
Expanded(
|
|
2560
|
child: ListView.builder(
|
2580
|
child: ListView.builder(
|
|
2561
|
- itemCount: 3,
|
2581
|
+ itemCount: sessionsInfo.setmeal.length,
|
|
2562
|
shrinkWrap: true,
|
2582
|
shrinkWrap: true,
|
|
2563
|
controller: _scrollController,
|
2583
|
controller: _scrollController,
|
|
2564
|
itemBuilder:
|
2584
|
itemBuilder:
|
|
2565
|
(BuildContext context, int index) {
|
2585
|
(BuildContext context, int index) {
|
|
|
|
2586
|
+ SetmealDetail setmealDetail =
|
|
|
|
2587
|
+ sessionsInfo.setmeal[index];
|
|
2566
|
return Container(
|
2588
|
return Container(
|
|
2567
|
padding: EdgeInsets.only(bottom: w(8)),
|
2589
|
padding: EdgeInsets.only(bottom: w(8)),
|
|
2568
|
margin: EdgeInsets.only(bottom: w(12)),
|
2590
|
margin: EdgeInsets.only(bottom: w(12)),
|
|
@@ -2576,7 +2598,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2576,7 +2598,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2576
|
children: [
|
2598
|
children: [
|
|
2577
|
Row(
|
2599
|
Row(
|
|
2578
|
children: [
|
2600
|
children: [
|
|
2579
|
- Text('1299套餐',
|
2601
|
+ Text(setmealDetail.mealName,
|
|
2580
|
style: TextStyle(
|
2602
|
style: TextStyle(
|
|
2581
|
color: MyColours
|
2603
|
color: MyColours
|
|
2582
|
.color_515151,
|
2604
|
.color_515151,
|
|
@@ -2604,19 +2626,22 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2604,19 +2626,22 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2604
|
VEmptyView(16),
|
2626
|
VEmptyView(16),
|
|
2605
|
Row(
|
2627
|
Row(
|
|
2606
|
children: [
|
2628
|
children: [
|
|
2607
|
- Text('10 人/桌',
|
2629
|
+ Text(
|
|
|
|
2630
|
+ '${setmealDetail.pnum} 人/桌',
|
|
2608
|
style: TextStyle(
|
2631
|
style: TextStyle(
|
|
2609
|
color: MyColours
|
2632
|
color: MyColours
|
|
2610
|
.color_999999,
|
2633
|
.color_999999,
|
|
2611
|
fontSize: font(12))),
|
2634
|
fontSize: font(12))),
|
|
2612
|
HEmptyView(24),
|
2635
|
HEmptyView(24),
|
|
2613
|
- Text('保证 30 桌',
|
2636
|
+ Text(
|
|
|
|
2637
|
+ '保证 ${setmealDetail.min} 桌',
|
|
2614
|
style: TextStyle(
|
2638
|
style: TextStyle(
|
|
2615
|
color: MyColours
|
2639
|
color: MyColours
|
|
2616
|
.color_999999,
|
2640
|
.color_999999,
|
|
2617
|
fontSize: font(12))),
|
2641
|
fontSize: font(12))),
|
|
2618
|
HEmptyView(24),
|
2642
|
HEmptyView(24),
|
|
2619
|
- Text('备用 2 桌',
|
2643
|
+ Text(
|
|
|
|
2644
|
+ '备用 ${setmealDetail.spare} 桌',
|
|
2620
|
style: TextStyle(
|
2645
|
style: TextStyle(
|
|
2621
|
color: MyColours
|
2646
|
color: MyColours
|
|
2622
|
.color_999999,
|
2647
|
.color_999999,
|
|
@@ -2628,9 +2653,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2628,9 +2653,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2628
|
}))
|
2653
|
}))
|
|
2629
|
],
|
2654
|
],
|
|
2630
|
)),
|
2655
|
)),
|
|
2631
|
- sessionsItem('酒水安排:'),
|
|
|
|
2632
|
- sessionsItem('其他配置:'),
|
|
|
|
2633
|
- remarkItem('备注:')
|
2656
|
+ sessionsItem('酒水安排:', sessionsInfo),
|
|
|
|
2657
|
+ sessionsItem('其他配置:', sessionsInfo),
|
|
|
|
2658
|
+ remarkItem('备注:', sessionsInfo)
|
|
2634
|
],
|
2659
|
],
|
|
2635
|
))
|
2660
|
))
|
|
2636
|
],
|
2661
|
],
|
|
@@ -2639,7 +2664,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2639,7 +2664,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2639
|
}
|
2664
|
}
|
|
2640
|
|
2665
|
|
|
2641
|
///备注----照片
|
2666
|
///备注----照片
|
|
2642
|
- Widget remarkItem(String title) {
|
2667
|
+ Widget remarkItem(String title, SessionsInfo sessionsInfo) {
|
|
2643
|
return Padding(
|
2668
|
return Padding(
|
|
2644
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
2669
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
2645
|
child: Row(
|
2670
|
child: Row(
|
|
@@ -2655,18 +2680,134 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2655,18 +2680,134 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2655
|
child: Column(
|
2680
|
child: Column(
|
|
2656
|
crossAxisAlignment: CrossAxisAlignment.start,
|
2681
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
2657
|
children: [
|
2682
|
children: [
|
|
2658
|
- Text(
|
|
|
|
2659
|
- '剑南春52度剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml500ml',
|
|
|
|
2660
|
- style: TextStyle(
|
|
|
|
2661
|
- color: MyColours.color_515151, fontSize: font(12))),
|
|
|
|
2662
|
- VEmptyView(16),
|
|
|
|
2663
|
- _getGridImg(['fff', '', 'fff', '', 'fff', '', 'fff', ''])
|
2683
|
+ sessionsInfo.remark == null || sessionsInfo.remark == ''
|
|
|
|
2684
|
+ ? SizedBox()
|
|
|
|
2685
|
+ : Text(sessionsInfo.remark,
|
|
|
|
2686
|
+ style: TextStyle(
|
|
|
|
2687
|
+ color: MyColours.color_515151, fontSize: font(12))),
|
|
|
|
2688
|
+ sessionsInfo.remark == null || sessionsInfo.remark == ''
|
|
|
|
2689
|
+ ? SizedBox()
|
|
|
|
2690
|
+ : VEmptyView(16),
|
|
|
|
2691
|
+ _getGridImg(sessionsInfo.images.map((e) {
|
|
|
|
2692
|
+ return e.url;
|
|
|
|
2693
|
+ }).toList())
|
|
2664
|
],
|
2694
|
],
|
|
2665
|
)),
|
2695
|
)),
|
|
2666
|
],
|
2696
|
],
|
|
2667
|
));
|
2697
|
));
|
|
2668
|
}
|
2698
|
}
|
|
2669
|
|
2699
|
|
|
|
|
2700
|
+ ///计算合计费用
|
|
|
|
2701
|
+ _calculatePrice(costInfoModel) {
|
|
|
|
2702
|
+ double sum = double.parse(costInfoModel.sumPrice); //原来总金额
|
|
|
|
2703
|
+ double total = 0.0;
|
|
|
|
2704
|
+ if (Utils.isNumeric(costInfoModel.serviceC.text)) {
|
|
|
|
2705
|
+ //输入的是数字,计算金额
|
|
|
|
2706
|
+
|
|
|
|
2707
|
+ if (costInfoModel.service) {
|
|
|
|
2708
|
+ //选中固定金额
|
|
|
|
2709
|
+ // if(double.parse(value) > sum){
|
|
|
|
2710
|
+
|
|
|
|
2711
|
+ // }
|
|
|
|
2712
|
+ total = sum + double.parse(costInfoModel.serviceC.text);
|
|
|
|
2713
|
+ } else {
|
|
|
|
2714
|
+ //选中百分比
|
|
|
|
2715
|
+ if (int.parse(costInfoModel.serviceC.text) > 100) {
|
|
|
|
2716
|
+ Utils.showToast('请输入小于100的数字');
|
|
|
|
2717
|
+
|
|
|
|
2718
|
+ return;
|
|
|
|
2719
|
+ }
|
|
|
|
2720
|
+
|
|
|
|
2721
|
+ // 使除数为0
|
|
|
|
2722
|
+ double input = double.parse(costInfoModel.serviceC.text);
|
|
|
|
2723
|
+ total = sum + sum * input / 100;
|
|
|
|
2724
|
+ }
|
|
|
|
2725
|
+ } else {
|
|
|
|
2726
|
+ // if (!Utils.isNumeric(costInfoModel.discountC.text)) {
|
|
|
|
2727
|
+ // costInfoModel.totalPrice = costInfoModel.sumPrice;
|
|
|
|
2728
|
+ // }
|
|
|
|
2729
|
+ }
|
|
|
|
2730
|
+ if (Utils.isNumeric(costInfoModel.discountC.text)) {
|
|
|
|
2731
|
+ //输入的是数字,计算金额
|
|
|
|
2732
|
+
|
|
|
|
2733
|
+ if (costInfoModel.discount) {
|
|
|
|
2734
|
+ //选中固定金额
|
|
|
|
2735
|
+ // if(double.parse(value) > sum){
|
|
|
|
2736
|
+
|
|
|
|
2737
|
+ // }
|
|
|
|
2738
|
+ total -= double.parse(costInfoModel.discountC.text);
|
|
|
|
2739
|
+ } else {
|
|
|
|
2740
|
+ //选中百分比
|
|
|
|
2741
|
+ if (int.parse(costInfoModel.discountC.text) > 100) {
|
|
|
|
2742
|
+ Utils.showToast('请输入小于100的数字');
|
|
|
|
2743
|
+
|
|
|
|
2744
|
+ return;
|
|
|
|
2745
|
+ }
|
|
|
|
2746
|
+
|
|
|
|
2747
|
+ // 使除数为0
|
|
|
|
2748
|
+ double input = double.parse(costInfoModel.discountC.text);
|
|
|
|
2749
|
+ total = total - sum * input / 100;
|
|
|
|
2750
|
+ }
|
|
|
|
2751
|
+ // String num2StrD = total.toStringAsFixed(2); //保留两位小数
|
|
|
|
2752
|
+ // costInfoModel.totalPrice = num2StrD;
|
|
|
|
2753
|
+ } else {
|
|
|
|
2754
|
+ // if (!Utils.isNumeric(costInfoModel.serviceC.text)) {
|
|
|
|
2755
|
+ // costInfoModel.totalPrice = costInfoModel.sumPrice;
|
|
|
|
2756
|
+ // }
|
|
|
|
2757
|
+ }
|
|
|
|
2758
|
+ if (total == 0.0) {
|
|
|
|
2759
|
+ costInfoModel.totalPrice = costInfoModel.sumPrice;
|
|
|
|
2760
|
+ } else {
|
|
|
|
2761
|
+ String num2StrD = total.toStringAsFixed(2); //保留两位小数
|
|
|
|
2762
|
+ costInfoModel.totalPrice = num2StrD;
|
|
|
|
2763
|
+ }
|
|
|
|
2764
|
+ double finalContract = 0.0; //最终议价
|
|
|
|
2765
|
+ feastModel.banquetDetail.costInfo.forEach((element) {
|
|
|
|
2766
|
+ finalContract += double.parse(element.totalPrice);
|
|
|
|
2767
|
+ });
|
|
|
|
2768
|
+ feastModel.banquetDetail.contractInfo.contractFinalPrice =
|
|
|
|
2769
|
+ finalContract.toString();
|
|
|
|
2770
|
+ feastModel.banquetDetail.contractInfo.contractFinalPriceC.text =
|
|
|
|
2771
|
+ finalContract.toString();
|
|
|
|
2772
|
+
|
|
|
|
2773
|
+ setState(() {});
|
|
|
|
2774
|
+ }
|
|
|
|
2775
|
+
|
|
|
|
2776
|
+ // ///计算优惠金额
|
|
|
|
2777
|
+ // _calculatDiscount(costInfoModel) {
|
|
|
|
2778
|
+ // if (Utils.isNumeric(costInfoModel.discountC.text)) {
|
|
|
|
2779
|
+ // //输入的是数字,计算金额
|
|
|
|
2780
|
+ // double sum = double.parse(costInfoModel.totalPrice); //原来总金额
|
|
|
|
2781
|
+ // double total = 0.0;
|
|
|
|
2782
|
+
|
|
|
|
2783
|
+ // if (costInfoModel.service) {
|
|
|
|
2784
|
+ // //选中固定金额
|
|
|
|
2785
|
+ // // if(double.parse(value) > sum){
|
|
|
|
2786
|
+
|
|
|
|
2787
|
+ // // }
|
|
|
|
2788
|
+ // total = sum - double.parse(costInfoModel.discountC.text);
|
|
|
|
2789
|
+ // } else {
|
|
|
|
2790
|
+ // //选中百分比
|
|
|
|
2791
|
+ // if (int.parse(costInfoModel.discountC.text) > 100) {
|
|
|
|
2792
|
+ // Utils.showToast('请输入小于100的数字');
|
|
|
|
2793
|
+
|
|
|
|
2794
|
+ // return;
|
|
|
|
2795
|
+ // }
|
|
|
|
2796
|
+
|
|
|
|
2797
|
+ // // 使除数为0
|
|
|
|
2798
|
+ // double input = double.parse(costInfoModel.discountC.text);
|
|
|
|
2799
|
+ // total = sum - sum * input / 100;
|
|
|
|
2800
|
+ // }
|
|
|
|
2801
|
+ // String num2StrD = total.toStringAsFixed(2); //保留两位小数
|
|
|
|
2802
|
+ // costInfoModel.totalPrice = num2StrD;
|
|
|
|
2803
|
+ // } else {
|
|
|
|
2804
|
+ // if (!Utils.isNumeric(costInfoModel.serviceC.text)) {
|
|
|
|
2805
|
+ // costInfoModel.totalPrice = costInfoModel.sumPrice;
|
|
|
|
2806
|
+ // }
|
|
|
|
2807
|
+ // }
|
|
|
|
2808
|
+ // setState(() {});
|
|
|
|
2809
|
+ // }
|
|
|
|
2810
|
+
|
|
2670
|
///费用详情
|
2811
|
///费用详情
|
|
2671
|
Widget costWidget() {
|
2812
|
Widget costWidget() {
|
|
2672
|
return Container(
|
2813
|
return Container(
|
|
@@ -2692,10 +2833,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2692,10 +2833,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2692
|
),
|
2833
|
),
|
|
2693
|
VEmptyView(34),
|
2834
|
VEmptyView(34),
|
|
2694
|
ListView.builder(
|
2835
|
ListView.builder(
|
|
2695
|
- itemCount: 2,
|
2836
|
+ itemCount: feastModel.banquetDetail.costInfo.length,
|
|
2696
|
shrinkWrap: true,
|
2837
|
shrinkWrap: true,
|
|
2697
|
controller: _scrollController,
|
2838
|
controller: _scrollController,
|
|
2698
|
itemBuilder: (BuildContext context, int index) {
|
2839
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
2840
|
+ CostInfoModel costInfoModel =
|
|
|
|
2841
|
+ feastModel.banquetDetail.costInfo[index];
|
|
2699
|
return Padding(
|
2842
|
return Padding(
|
|
2700
|
padding: EdgeInsets.only(
|
2843
|
padding: EdgeInsets.only(
|
|
2701
|
left: w(12), right: w(12), bottom: w(27)),
|
2844
|
left: w(12), right: w(12), bottom: w(27)),
|
|
@@ -2703,7 +2846,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2703,7 +2846,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2703
|
crossAxisAlignment: CrossAxisAlignment.start,
|
2846
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
2704
|
children: [
|
2847
|
children: [
|
|
2705
|
Text(
|
2848
|
Text(
|
|
2706
|
- '第一场费用:',
|
2849
|
+ '${costInfoModel.title}:',
|
|
2707
|
style: TextStyle(
|
2850
|
style: TextStyle(
|
|
2708
|
color: MyColours.color_999999,
|
2851
|
color: MyColours.color_999999,
|
|
2709
|
fontSize: font(12)),
|
2852
|
fontSize: font(12)),
|
|
@@ -2711,15 +2854,27 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2711,15 +2854,27 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2711
|
VEmptyView(8),
|
2854
|
VEmptyView(8),
|
|
2712
|
costItem('名称', '单价', '数量', '金额', isTitle: true),
|
2855
|
costItem('名称', '单价', '数量', '金额', isTitle: true),
|
|
2713
|
ListView.builder(
|
2856
|
ListView.builder(
|
|
2714
|
- itemCount: 4,
|
2857
|
+ itemCount: costInfoModel.data.length,
|
|
2715
|
shrinkWrap: true,
|
2858
|
shrinkWrap: true,
|
|
2716
|
controller: _scrollController,
|
2859
|
controller: _scrollController,
|
|
2717
|
itemBuilder: (BuildContext context, int index) {
|
2860
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
2861
|
+ CostInfoSunModel costInfoSunModel =
|
|
|
|
2862
|
+ costInfoModel.data[index];
|
|
|
|
2863
|
+ String name = '';
|
|
|
|
2864
|
+ if (costInfoSunModel.cname != null) {
|
|
|
|
2865
|
+ name = costInfoSunModel.cname;
|
|
|
|
2866
|
+ }
|
|
|
|
2867
|
+ if (costInfoSunModel.otherName != null) {
|
|
|
|
2868
|
+ name = costInfoSunModel.otherName;
|
|
|
|
2869
|
+ }
|
|
|
|
2870
|
+ if (costInfoSunModel.wineName != null) {
|
|
|
|
2871
|
+ name = costInfoSunModel.wineName;
|
|
|
|
2872
|
+ }
|
|
2718
|
return costItem(
|
2873
|
return costItem(
|
|
2719
|
- '1299套餐',
|
|
|
|
2720
|
- '1299',
|
|
|
|
2721
|
- '30',
|
|
|
|
2722
|
- '38970',
|
2874
|
+ name,
|
|
|
|
2875
|
+ costInfoSunModel.unitPrice,
|
|
|
|
2876
|
+ costInfoSunModel.numStr,
|
|
|
|
2877
|
+ costInfoSunModel.price.toString(),
|
|
2723
|
);
|
2878
|
);
|
|
2724
|
}),
|
2879
|
}),
|
|
2725
|
//服务费
|
2880
|
//服务费
|
|
@@ -2742,31 +2897,75 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2742,31 +2897,75 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2742
|
fontSize: font(12)),
|
2897
|
fontSize: font(12)),
|
|
2743
|
),
|
2898
|
),
|
|
2744
|
),
|
2899
|
),
|
|
2745
|
- Image.asset(
|
|
|
|
2746
|
- Utils.getImgPath('f_radio_sel'),
|
|
|
|
2747
|
- width: w(20),
|
|
|
|
2748
|
- ),
|
|
|
|
2749
|
- HEmptyView(8),
|
|
|
|
2750
|
- Text(
|
|
|
|
2751
|
- '固定金额',
|
|
|
|
2752
|
- style: TextStyle(
|
|
|
|
2753
|
- color: MyColours.color_515151,
|
|
|
|
2754
|
- fontSize: font(12)),
|
2900
|
+ InkWell(
|
|
|
|
2901
|
+ onTap: () {
|
|
|
|
2902
|
+ if (costInfoModel.service) {
|
|
|
|
2903
|
+ return;
|
|
|
|
2904
|
+ }
|
|
|
|
2905
|
+ setState(() {
|
|
|
|
2906
|
+ costInfoModel.service =
|
|
|
|
2907
|
+ !costInfoModel.service;
|
|
|
|
2908
|
+ });
|
|
|
|
2909
|
+ if (costInfoModel.serviceC.text != '') {
|
|
|
|
2910
|
+ _calculatePrice(
|
|
|
|
2911
|
+ costInfoModel,
|
|
|
|
2912
|
+ );
|
|
|
|
2913
|
+ }
|
|
|
|
2914
|
+ },
|
|
|
|
2915
|
+ child: Row(
|
|
|
|
2916
|
+ children: [
|
|
|
|
2917
|
+ Image.asset(
|
|
|
|
2918
|
+ Utils.getImgPath(costInfoModel.service
|
|
|
|
2919
|
+ ? 'f_radio_sel'
|
|
|
|
2920
|
+ : 'f_radio_un'),
|
|
|
|
2921
|
+ width: w(20),
|
|
|
|
2922
|
+ ),
|
|
|
|
2923
|
+ HEmptyView(8),
|
|
|
|
2924
|
+ Text(
|
|
|
|
2925
|
+ '固定金额',
|
|
|
|
2926
|
+ style: TextStyle(
|
|
|
|
2927
|
+ color: MyColours.color_515151,
|
|
|
|
2928
|
+ fontSize: font(12)),
|
|
|
|
2929
|
+ ),
|
|
|
|
2930
|
+ ],
|
|
|
|
2931
|
+ ),
|
|
2755
|
),
|
2932
|
),
|
|
2756
|
HEmptyView(16),
|
2933
|
HEmptyView(16),
|
|
2757
|
- Image.asset(
|
|
|
|
2758
|
- Utils.getImgPath('f_radio_un'),
|
|
|
|
2759
|
- width: w(20),
|
2934
|
+ InkWell(
|
|
|
|
2935
|
+ onTap: () {
|
|
|
|
2936
|
+ if (!costInfoModel.service) {
|
|
|
|
2937
|
+ return;
|
|
|
|
2938
|
+ }
|
|
|
|
2939
|
+ setState(() {
|
|
|
|
2940
|
+ costInfoModel.service =
|
|
|
|
2941
|
+ !costInfoModel.service;
|
|
|
|
2942
|
+ });
|
|
|
|
2943
|
+ if (costInfoModel.serviceC.text != '') {
|
|
|
|
2944
|
+ _calculatePrice(
|
|
|
|
2945
|
+ costInfoModel,
|
|
|
|
2946
|
+ );
|
|
|
|
2947
|
+ }
|
|
|
|
2948
|
+ },
|
|
|
|
2949
|
+ child: Row(
|
|
|
|
2950
|
+ children: [
|
|
|
|
2951
|
+ Image.asset(
|
|
|
|
2952
|
+ Utils.getImgPath(!costInfoModel.service
|
|
|
|
2953
|
+ ? 'f_radio_sel'
|
|
|
|
2954
|
+ : 'f_radio_un'),
|
|
|
|
2955
|
+ width: w(20),
|
|
|
|
2956
|
+ ),
|
|
|
|
2957
|
+ HEmptyView(8),
|
|
|
|
2958
|
+ Container(
|
|
|
|
2959
|
+ width: w(40),
|
|
|
|
2960
|
+ child: Text(
|
|
|
|
2961
|
+ '百分比',
|
|
|
|
2962
|
+ style: TextStyle(
|
|
|
|
2963
|
+ color: MyColours.color_515151,
|
|
|
|
2964
|
+ fontSize: font(12)),
|
|
|
|
2965
|
+ )),
|
|
|
|
2966
|
+ ],
|
|
|
|
2967
|
+ ),
|
|
2760
|
),
|
2968
|
),
|
|
2761
|
- HEmptyView(8),
|
|
|
|
2762
|
- Container(
|
|
|
|
2763
|
- width: w(40),
|
|
|
|
2764
|
- child: Text(
|
|
|
|
2765
|
- '百分比',
|
|
|
|
2766
|
- style: TextStyle(
|
|
|
|
2767
|
- color: MyColours.color_515151,
|
|
|
|
2768
|
- fontSize: font(12)),
|
|
|
|
2769
|
- )),
|
|
|
|
2770
|
HEmptyView(12),
|
2969
|
HEmptyView(12),
|
|
2771
|
Expanded(
|
2970
|
Expanded(
|
|
2772
|
child: Container(
|
2971
|
child: Container(
|
|
@@ -2784,7 +2983,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2784,7 +2983,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2784
|
style: TextStyle(
|
2983
|
style: TextStyle(
|
|
2785
|
fontSize: ScreenUtil().setSp(24),
|
2984
|
fontSize: ScreenUtil().setSp(24),
|
|
2786
|
color: MyColours.color_515151),
|
2985
|
color: MyColours.color_515151),
|
|
2787
|
- // controller: controller,
|
2986
|
+ controller: costInfoModel.serviceC,
|
|
2788
|
// focusNode: node,
|
2987
|
// focusNode: node,
|
|
2789
|
// textAlignVertical: TextAlignVertical.top,
|
2988
|
// textAlignVertical: TextAlignVertical.top,
|
|
2790
|
decoration: InputDecoration(
|
2989
|
decoration: InputDecoration(
|
|
@@ -2805,6 +3004,10 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2805,6 +3004,10 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2805
|
onChanged: (value) {
|
3004
|
onChanged: (value) {
|
|
2806
|
print('ggg');
|
3005
|
print('ggg');
|
|
2807
|
|
3006
|
|
|
|
|
3007
|
+ _calculatePrice(
|
|
|
|
3008
|
+ costInfoModel,
|
|
|
|
3009
|
+ );
|
|
|
|
3010
|
+
|
|
2808
|
// nameStr = value;
|
3011
|
// nameStr = value;
|
|
2809
|
},
|
3012
|
},
|
|
2810
|
onEditingComplete: () {
|
3013
|
onEditingComplete: () {
|
|
@@ -2819,7 +3022,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2819,7 +3022,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2819
|
),
|
3022
|
),
|
|
2820
|
HEmptyView(4),
|
3023
|
HEmptyView(4),
|
|
2821
|
Text(
|
3024
|
Text(
|
|
2822
|
- '%',
|
3025
|
+ costInfoModel.service ? '元' : '%',
|
|
2823
|
style: TextStyle(
|
3026
|
style: TextStyle(
|
|
2824
|
color: MyColours.color_000000,
|
3027
|
color: MyColours.color_000000,
|
|
2825
|
fontSize: font(12)),
|
3028
|
fontSize: font(12)),
|
|
@@ -2846,31 +3049,69 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2846,31 +3049,69 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2846
|
fontSize: font(12)),
|
3049
|
fontSize: font(12)),
|
|
2847
|
),
|
3050
|
),
|
|
2848
|
),
|
3051
|
),
|
|
2849
|
- Image.asset(
|
|
|
|
2850
|
- Utils.getImgPath('f_radio_sel'),
|
|
|
|
2851
|
- width: w(20),
|
|
|
|
2852
|
- ),
|
|
|
|
2853
|
- HEmptyView(8),
|
|
|
|
2854
|
- Text(
|
|
|
|
2855
|
- '固定金额',
|
|
|
|
2856
|
- style: TextStyle(
|
|
|
|
2857
|
- color: MyColours.color_515151,
|
|
|
|
2858
|
- fontSize: font(12)),
|
|
|
|
2859
|
- ),
|
3052
|
+ InkWell(
|
|
|
|
3053
|
+ onTap: () {
|
|
|
|
3054
|
+ if (costInfoModel.discount) {
|
|
|
|
3055
|
+ return;
|
|
|
|
3056
|
+ }
|
|
|
|
3057
|
+ setState(() {
|
|
|
|
3058
|
+ costInfoModel.discount =
|
|
|
|
3059
|
+ !costInfoModel.discount;
|
|
|
|
3060
|
+ });
|
|
|
|
3061
|
+ if (costInfoModel.discountC.text != '') {
|
|
|
|
3062
|
+ _calculatePrice(
|
|
|
|
3063
|
+ costInfoModel,
|
|
|
|
3064
|
+ );
|
|
|
|
3065
|
+ }
|
|
|
|
3066
|
+ },
|
|
|
|
3067
|
+ child: Row(children: [
|
|
|
|
3068
|
+ Image.asset(
|
|
|
|
3069
|
+ Utils.getImgPath(costInfoModel.discount
|
|
|
|
3070
|
+ ? 'f_radio_sel'
|
|
|
|
3071
|
+ : 'f_radio_un'),
|
|
|
|
3072
|
+ width: w(20),
|
|
|
|
3073
|
+ ),
|
|
|
|
3074
|
+ HEmptyView(8),
|
|
|
|
3075
|
+ Text(
|
|
|
|
3076
|
+ '固定金额',
|
|
|
|
3077
|
+ style: TextStyle(
|
|
|
|
3078
|
+ color: MyColours.color_515151,
|
|
|
|
3079
|
+ fontSize: font(12)),
|
|
|
|
3080
|
+ ),
|
|
|
|
3081
|
+ ])),
|
|
2860
|
HEmptyView(16),
|
3082
|
HEmptyView(16),
|
|
2861
|
- Image.asset(
|
|
|
|
2862
|
- Utils.getImgPath('f_radio_un'),
|
|
|
|
2863
|
- width: w(20),
|
|
|
|
2864
|
- ),
|
|
|
|
2865
|
- HEmptyView(8),
|
|
|
|
2866
|
- Container(
|
|
|
|
2867
|
- width: w(40),
|
|
|
|
2868
|
- child: Text(
|
|
|
|
2869
|
- '折扣',
|
|
|
|
2870
|
- style: TextStyle(
|
|
|
|
2871
|
- color: MyColours.color_515151,
|
|
|
|
2872
|
- fontSize: font(12)),
|
|
|
|
2873
|
- )),
|
3083
|
+ InkWell(
|
|
|
|
3084
|
+ onTap: () {
|
|
|
|
3085
|
+ if (!costInfoModel.discount) {
|
|
|
|
3086
|
+ return;
|
|
|
|
3087
|
+ }
|
|
|
|
3088
|
+ setState(() {
|
|
|
|
3089
|
+ costInfoModel.discount =
|
|
|
|
3090
|
+ !costInfoModel.discount;
|
|
|
|
3091
|
+ });
|
|
|
|
3092
|
+ if (costInfoModel.discountC.text != '') {
|
|
|
|
3093
|
+ _calculatePrice(
|
|
|
|
3094
|
+ costInfoModel,
|
|
|
|
3095
|
+ );
|
|
|
|
3096
|
+ }
|
|
|
|
3097
|
+ },
|
|
|
|
3098
|
+ child: Row(children: [
|
|
|
|
3099
|
+ Image.asset(
|
|
|
|
3100
|
+ Utils.getImgPath(!costInfoModel.discount
|
|
|
|
3101
|
+ ? 'f_radio_sel'
|
|
|
|
3102
|
+ : 'f_radio_un'),
|
|
|
|
3103
|
+ width: w(20),
|
|
|
|
3104
|
+ ),
|
|
|
|
3105
|
+ HEmptyView(8),
|
|
|
|
3106
|
+ Container(
|
|
|
|
3107
|
+ width: w(40),
|
|
|
|
3108
|
+ child: Text(
|
|
|
|
3109
|
+ '折扣',
|
|
|
|
3110
|
+ style: TextStyle(
|
|
|
|
3111
|
+ color: MyColours.color_515151,
|
|
|
|
3112
|
+ fontSize: font(12)),
|
|
|
|
3113
|
+ ))
|
|
|
|
3114
|
+ ])),
|
|
2874
|
HEmptyView(12),
|
3115
|
HEmptyView(12),
|
|
2875
|
Expanded(
|
3116
|
Expanded(
|
|
2876
|
child: Container(
|
3117
|
child: Container(
|
|
@@ -2888,7 +3129,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2888,7 +3129,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2888
|
style: TextStyle(
|
3129
|
style: TextStyle(
|
|
2889
|
fontSize: ScreenUtil().setSp(24),
|
3130
|
fontSize: ScreenUtil().setSp(24),
|
|
2890
|
color: MyColours.color_515151),
|
3131
|
color: MyColours.color_515151),
|
|
2891
|
- // controller: controller,
|
3132
|
+ controller: costInfoModel.discountC,
|
|
2892
|
// focusNode: node,
|
3133
|
// focusNode: node,
|
|
2893
|
// textAlignVertical: TextAlignVertical.top,
|
3134
|
// textAlignVertical: TextAlignVertical.top,
|
|
2894
|
decoration: InputDecoration(
|
3135
|
decoration: InputDecoration(
|
|
@@ -2909,6 +3150,10 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2909,6 +3150,10 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2909
|
onChanged: (value) {
|
3150
|
onChanged: (value) {
|
|
2910
|
print('ggg');
|
3151
|
print('ggg');
|
|
2911
|
|
3152
|
|
|
|
|
3153
|
+ _calculatePrice(
|
|
|
|
3154
|
+ costInfoModel,
|
|
|
|
3155
|
+ );
|
|
|
|
3156
|
+
|
|
2912
|
// nameStr = value;
|
3157
|
// nameStr = value;
|
|
2913
|
},
|
3158
|
},
|
|
2914
|
onEditingComplete: () {
|
3159
|
onEditingComplete: () {
|
|
@@ -2923,7 +3168,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2923,7 +3168,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2923
|
),
|
3168
|
),
|
|
2924
|
HEmptyView(4),
|
3169
|
HEmptyView(4),
|
|
2925
|
Text(
|
3170
|
Text(
|
|
2926
|
- '元',
|
3171
|
+ costInfoModel.discount ? '元' : '%',
|
|
2927
|
style: TextStyle(
|
3172
|
style: TextStyle(
|
|
2928
|
color: MyColours.color_000000,
|
3173
|
color: MyColours.color_000000,
|
|
2929
|
fontSize: font(12)),
|
3174
|
fontSize: font(12)),
|
|
@@ -2948,7 +3193,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -2948,7 +3193,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
2948
|
),
|
3193
|
),
|
|
2949
|
Spacer(),
|
3194
|
Spacer(),
|
|
2950
|
Text(
|
3195
|
Text(
|
|
2951
|
- '7000000 元',
|
3196
|
+ '${costInfoModel.totalPrice} 元',
|
|
2952
|
style: TextStyle(
|
3197
|
style: TextStyle(
|
|
2953
|
color: MyColours.color_515151,
|
3198
|
color: MyColours.color_515151,
|
|
2954
|
fontWeight: FontWeight.bold,
|
3199
|
fontWeight: FontWeight.bold,
|
|
@@ -3053,7 +3298,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -3053,7 +3298,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
3053
|
),
|
3298
|
),
|
|
3054
|
HEmptyView(12),
|
3299
|
HEmptyView(12),
|
|
3055
|
Text(
|
3300
|
Text(
|
|
3056
|
- '159000 元',
|
3301
|
+ '${feastModel.banquetDetail.contractInfo.contractTotalPrice} 元',
|
|
3057
|
style: TextStyle(
|
3302
|
style: TextStyle(
|
|
3058
|
fontWeight: FontWeight.bold,
|
3303
|
fontWeight: FontWeight.bold,
|
|
3059
|
color: MyColours.color_515151,
|
3304
|
color: MyColours.color_515151,
|
|
@@ -3101,7 +3346,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -3101,7 +3346,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
3101
|
],
|
3346
|
],
|
|
3102
|
)),
|
3347
|
)),
|
|
3103
|
HEmptyView(12),
|
3348
|
HEmptyView(12),
|
|
3104
|
- _textfield('1299', null, null, width: w(110)),
|
3349
|
+ _textfield(
|
|
|
|
3350
|
+ '请输入',
|
|
|
|
3351
|
+ feastModel
|
|
|
|
3352
|
+ .banquetDetail.contractInfo.contractFinalPriceC,
|
|
|
|
3353
|
+ null,
|
|
|
|
3354
|
+ width: w(110)),
|
|
3105
|
HEmptyView(24),
|
3355
|
HEmptyView(24),
|
|
3106
|
Text(
|
3356
|
Text(
|
|
3107
|
'元',
|
3357
|
'元',
|
|
@@ -3227,6 +3477,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -3227,6 +3477,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
3227
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
3477
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
3228
|
//输入文本的样式
|
3478
|
//输入文本的样式
|
|
3229
|
style: TextStyle(
|
3479
|
style: TextStyle(
|
|
|
|
3480
|
+ color: MyColours.color_438E93,
|
|
3230
|
fontSize: ScreenUtil().setSp(28),
|
3481
|
fontSize: ScreenUtil().setSp(28),
|
|
3231
|
fontWeight: FontWeight.bold,
|
3482
|
fontWeight: FontWeight.bold,
|
|
3232
|
),
|
3483
|
),
|
|
@@ -3361,7 +3612,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -3361,7 +3612,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
3361
|
}
|
3612
|
}
|
|
3362
|
|
3613
|
|
|
3363
|
///三组 左---中----右
|
3614
|
///三组 左---中----右
|
|
3364
|
- Widget sessionsItem(String title) {
|
3615
|
+ Widget sessionsItem(String title, SessionsInfo sessionsInfo) {
|
|
3365
|
return Padding(
|
3616
|
return Padding(
|
|
3366
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
3617
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
3367
|
child: Row(
|
3618
|
child: Row(
|
|
@@ -3375,10 +3626,21 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -3375,10 +3626,21 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
3375
|
),
|
3626
|
),
|
|
3376
|
Expanded(
|
3627
|
Expanded(
|
|
3377
|
child: ListView.builder(
|
3628
|
child: ListView.builder(
|
|
3378
|
- itemCount: 3,
|
3629
|
+ itemCount: title == '酒水安排:'
|
|
|
|
3630
|
+ ? sessionsInfo.wine.length
|
|
|
|
3631
|
+ : sessionsInfo.other.length,
|
|
3379
|
shrinkWrap: true,
|
3632
|
shrinkWrap: true,
|
|
3380
|
controller: _scrollController,
|
3633
|
controller: _scrollController,
|
|
3381
|
itemBuilder: (BuildContext context, int index) {
|
3634
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
3635
|
+ String name = title == '酒水安排:'
|
|
|
|
3636
|
+ ? sessionsInfo.wine[index].wineName
|
|
|
|
3637
|
+ : sessionsInfo.other[index].otherName;
|
|
|
|
3638
|
+ String numStr = title == '酒水安排:'
|
|
|
|
3639
|
+ ? sessionsInfo.wine[index].wineNum
|
|
|
|
3640
|
+ : sessionsInfo.other[index].otherNum;
|
|
|
|
3641
|
+ String spec = title == '酒水安排:'
|
|
|
|
3642
|
+ ? sessionsInfo.wine[index].spec
|
|
|
|
3643
|
+ : sessionsInfo.other[index].spec;
|
|
3382
|
return Container(
|
3644
|
return Container(
|
|
3383
|
padding: EdgeInsets.only(bottom: w(8)),
|
3645
|
padding: EdgeInsets.only(bottom: w(8)),
|
|
3384
|
margin: EdgeInsets.only(bottom: w(12)),
|
3646
|
margin: EdgeInsets.only(bottom: w(12)),
|
|
@@ -3390,11 +3652,11 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -3390,11 +3652,11 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
3390
|
child: Row(
|
3652
|
child: Row(
|
|
3391
|
children: [
|
3653
|
children: [
|
|
3392
|
Expanded(
|
3654
|
Expanded(
|
|
3393
|
- child: Text('剑南春52度500ml',
|
3655
|
+ child: Text(name,
|
|
3394
|
style: TextStyle(
|
3656
|
style: TextStyle(
|
|
3395
|
color: MyColours.color_515151,
|
3657
|
color: MyColours.color_515151,
|
|
3396
|
fontSize: font(12)))),
|
3658
|
fontSize: font(12)))),
|
|
3397
|
- Text('60 份',
|
3659
|
+ Text('${numStr} ${spec}',
|
|
3398
|
style: TextStyle(
|
3660
|
style: TextStyle(
|
|
3399
|
color: MyColours.color_515151,
|
3661
|
color: MyColours.color_515151,
|
|
3400
|
fontSize: font(12)))
|
3662
|
fontSize: font(12)))
|
|
@@ -3435,50 +3697,50 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -3435,50 +3697,50 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
3435
|
ClipRRect(
|
3697
|
ClipRRect(
|
|
3436
|
borderRadius: BorderRadius.circular(r(5)),
|
3698
|
borderRadius: BorderRadius.circular(r(5)),
|
|
3437
|
child: CachedNetworkImage(
|
3699
|
child: CachedNetworkImage(
|
|
3438
|
- // imageUrl: data[index].qiniuUrl,
|
|
|
|
3439
|
- imageUrl:
|
|
|
|
3440
|
- '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',
|
3700
|
+ imageUrl: data[index],
|
|
|
|
3701
|
+ // imageUrl:
|
|
|
|
3702
|
+ // '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',
|
|
3441
|
fit: BoxFit.cover,
|
3703
|
fit: BoxFit.cover,
|
|
3442
|
width: ScreenUtil().setWidth(38 * 2),
|
3704
|
width: ScreenUtil().setWidth(38 * 2),
|
|
3443
|
height: ScreenUtil().setWidth(38 * 2),
|
3705
|
height: ScreenUtil().setWidth(38 * 2),
|
|
3444
|
),
|
3706
|
),
|
|
3445
|
),
|
3707
|
),
|
|
3446
|
- Positioned(
|
|
|
|
3447
|
- top: 0,
|
|
|
|
3448
|
- right: 0,
|
|
|
|
3449
|
- child: GestureDetector(
|
|
|
|
3450
|
- child: Image.asset(
|
|
|
|
3451
|
- Utils.getImgPath("f_delete"),
|
|
|
|
3452
|
- width: ScreenUtil().setWidth(24),
|
|
|
|
3453
|
- height: ScreenUtil().setWidth(24),
|
|
|
|
3454
|
- ),
|
|
|
|
3455
|
- onTap: () {
|
|
|
|
3456
|
- //已经传到服务器,弹提醒窗口,是否删除
|
|
|
|
3457
|
- //修改之前有内容,则弹框
|
|
|
|
3458
|
- DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
3459
|
- title: "确认删除",
|
|
|
|
3460
|
- content: "是否确定删除该照片,删除操作不可逆转,请谨慎操作",
|
|
|
|
3461
|
- lCallback: () {
|
|
|
|
3462
|
- print("取消");
|
|
|
|
3463
|
- }, rCallback: () {
|
|
|
|
3464
|
- print("确定");
|
|
|
|
3465
|
- // widget.deleteCallback(index);
|
|
|
|
3466
|
- });
|
|
|
|
3467
|
- }
|
|
|
|
3468
|
- // else {
|
|
|
|
3469
|
- // //点击删除按钮
|
|
|
|
3470
|
- // setState(() {
|
|
|
|
3471
|
- // temp.removeWhere((element) =>
|
|
|
|
3472
|
- // element == temp[index]);
|
|
|
|
3473
|
- // widget.model.imageQiniuUrlList
|
|
|
|
3474
|
- // .removeWhere((element) =>
|
|
|
|
3475
|
- // element ==
|
|
|
|
3476
|
- // widget.model
|
|
|
|
3477
|
- // .imageQiniuUrlList[index]);
|
|
|
|
3478
|
- // });
|
|
|
|
3479
|
- // }
|
|
|
|
3480
|
- // },
|
|
|
|
3481
|
- )),
|
3708
|
+ // Positioned(
|
|
|
|
3709
|
+ // top: 0,
|
|
|
|
3710
|
+ // right: 0,
|
|
|
|
3711
|
+ // child: GestureDetector(
|
|
|
|
3712
|
+ // child: Image.asset(
|
|
|
|
3713
|
+ // Utils.getImgPath("f_delete"),
|
|
|
|
3714
|
+ // width: ScreenUtil().setWidth(24),
|
|
|
|
3715
|
+ // height: ScreenUtil().setWidth(24),
|
|
|
|
3716
|
+ // ),
|
|
|
|
3717
|
+ // onTap: () {
|
|
|
|
3718
|
+ // //已经传到服务器,弹提醒窗口,是否删除
|
|
|
|
3719
|
+ // //修改之前有内容,则弹框
|
|
|
|
3720
|
+ // DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
3721
|
+ // title: "确认删除",
|
|
|
|
3722
|
+ // content: "是否确定删除该照片,删除操作不可逆转,请谨慎操作",
|
|
|
|
3723
|
+ // lCallback: () {
|
|
|
|
3724
|
+ // print("取消");
|
|
|
|
3725
|
+ // }, rCallback: () {
|
|
|
|
3726
|
+ // print("确定");
|
|
|
|
3727
|
+ // // widget.deleteCallback(index);
|
|
|
|
3728
|
+ // });
|
|
|
|
3729
|
+ // }
|
|
|
|
3730
|
+ // // else {
|
|
|
|
3731
|
+ // // //点击删除按钮
|
|
|
|
3732
|
+ // // setState(() {
|
|
|
|
3733
|
+ // // temp.removeWhere((element) =>
|
|
|
|
3734
|
+ // // element == temp[index]);
|
|
|
|
3735
|
+ // // widget.model.imageQiniuUrlList
|
|
|
|
3736
|
+ // // .removeWhere((element) =>
|
|
|
|
3737
|
+ // // element ==
|
|
|
|
3738
|
+ // // widget.model
|
|
|
|
3739
|
+ // // .imageQiniuUrlList[index]);
|
|
|
|
3740
|
+ // // });
|
|
|
|
3741
|
+ // // }
|
|
|
|
3742
|
+ // // },
|
|
|
|
3743
|
+ // )),
|
|
3482
|
],
|
3744
|
],
|
|
3483
|
),
|
3745
|
),
|
|
3484
|
);
|
3746
|
);
|
|
@@ -3506,30 +3768,36 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
@@ -3506,30 +3768,36 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
3506
|
return Column(
|
3768
|
return Column(
|
|
3507
|
children: [
|
3769
|
children: [
|
|
3508
|
Expanded(
|
3770
|
Expanded(
|
|
3509
|
- child:
|
|
|
|
3510
|
- Padding(
|
|
|
|
3511
|
- padding: EdgeInsets.symmetric(horizontal: w(12)),
|
|
|
|
3512
|
- child: SingleChildScrollView(
|
|
|
|
3513
|
- controller: _scrollController,
|
|
|
|
3514
|
- child: Column(children: [
|
|
|
|
3515
|
- baseInfoWidget(), //基本信息
|
|
|
|
3516
|
- VEmptyView(52),
|
|
|
|
3517
|
- //场次
|
|
|
|
3518
|
- ListView.builder(
|
|
|
|
3519
|
- itemCount: 3,
|
|
|
|
3520
|
- shrinkWrap: true,
|
|
|
|
3521
|
- controller: _scrollController,
|
|
|
|
3522
|
- itemBuilder: (BuildContext context, int index) {
|
|
|
|
3523
|
- return sessionsWidget('第${index + 1}场');
|
|
|
|
3524
|
- }),
|
|
|
|
3525
|
- //费用详情
|
|
|
|
3526
|
- costWidget(),
|
|
|
|
3527
|
- //合同
|
|
|
|
3528
|
- contractWidget(),
|
|
|
|
3529
|
-
|
|
|
|
3530
|
- invoiceWidget()
|
|
|
|
3531
|
- ]))),
|
|
|
|
3532
|
- ),
|
3771
|
+ child: Padding(
|
|
|
|
3772
|
+ padding: EdgeInsets.symmetric(horizontal: w(12)),
|
|
|
|
3773
|
+ child: SingleChildScrollView(
|
|
|
|
3774
|
+ controller: _scrollController,
|
|
|
|
3775
|
+ child: Column(children: [
|
|
|
|
3776
|
+ baseInfoWidget(), //基本信息
|
|
|
|
3777
|
+ VEmptyView(52),
|
|
|
|
3778
|
+ //场次
|
|
|
|
3779
|
+ ListView.builder(
|
|
|
|
3780
|
+ itemCount:
|
|
|
|
3781
|
+ feastModel.banquetDetail.sessionsInfo.length,
|
|
|
|
3782
|
+ shrinkWrap: true,
|
|
|
|
3783
|
+ controller: _scrollController,
|
|
|
|
3784
|
+ itemBuilder: (BuildContext context, int index) {
|
|
|
|
3785
|
+ SessionsInfo sessionsInfo = feastModel
|
|
|
|
3786
|
+ .banquetDetail.sessionsInfo[index];
|
|
|
|
3787
|
+ String numStr =
|
|
|
|
3788
|
+ ConvertNumberToChineseMoneyWords.toChinese(
|
|
|
|
3789
|
+ index);
|
|
|
|
3790
|
+ return sessionsWidget(
|
|
|
|
3791
|
+ '第${numStr}场', sessionsInfo);
|
|
|
|
3792
|
+ }),
|
|
|
|
3793
|
+ //费用详情
|
|
|
|
3794
|
+ costWidget(),
|
|
|
|
3795
|
+ //合同
|
|
|
|
3796
|
+ contractWidget(),
|
|
|
|
3797
|
+
|
|
|
|
3798
|
+ invoiceWidget()
|
|
|
|
3799
|
+ ]))),
|
|
|
|
3800
|
+ ),
|
|
3533
|
Row(
|
3801
|
Row(
|
|
3534
|
children: [
|
3802
|
children: [
|
|
3535
|
Expanded(
|
3803
|
Expanded(
|