Commit e5899ddf36123b62ddefc9d5c776a9dab6e9257d

Authored by wdn127929
1 parent 2b02a47c

宴会首页数据全部

@@ -12,14 +12,14 @@ if (flutterRoot == null) { @@ -12,14 +12,14 @@ if (flutterRoot == null) {
12 } 12 }
13 13
14 14
15 -def flutterVersionCode = "421" 15 +def flutterVersionCode = "422"
16 if (flutterVersionCode == null) { 16 if (flutterVersionCode == null) {
17 - flutterVersionCode = '421' 17 + flutterVersionCode = '422'
18 } 18 }
19 19
20 -def flutterVersionName = "4.2.1" 20 +def flutterVersionName = "4.2.2"
21 if (flutterVersionName == null) { 21 if (flutterVersionName == null) {
22 - flutterVersionName = '4.2.1' 22 + flutterVersionName = '4.2.2'
23 } 23 }
24 apply plugin: 'com.android.application' 24 apply plugin: 'com.android.application'
25 apply plugin: 'kotlin-android' 25 apply plugin: 'kotlin-android'
@@ -606,6 +606,9 @@ class CostInfoModel { @@ -606,6 +606,9 @@ class CostInfoModel {
606 return serviceprice; 606 return serviceprice;
607 } else { 607 } else {
608 //选中百分比 608 //选中百分比
  609 + if (serviceper == null) {
  610 + return '0';
  611 + }
609 612
610 // 使除数为0 613 // 使除数为0
611 double input = double.parse(serviceper); 614 double input = double.parse(serviceper);
@@ -628,6 +631,9 @@ class CostInfoModel { @@ -628,6 +631,9 @@ class CostInfoModel {
628 return '-${discountprice} 元'; 631 return '-${discountprice} 元';
629 } else { 632 } else {
630 //选中百分比 633 //选中百分比
  634 + if (discountper == null) {
  635 + return '0 元';
  636 + }
631 637
632 // 使除数为0 638 // 使除数为0
633 double input = double.parse(discountper); 639 double input = double.parse(discountper);
@@ -317,6 +317,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { @@ -317,6 +317,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
317 @override 317 @override
318 void dispose() { 318 void dispose() {
319 super.dispose(); 319 super.dispose();
  320 + bus.emit('feast_home_page'); //编辑之后刷新宴会首页
320 bus.off('feast_deposit_list'); 321 bus.off('feast_deposit_list');
321 bus.off('feast_qy_list'); 322 bus.off('feast_qy_list');
322 323
@@ -637,7 +638,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { @@ -637,7 +638,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
637 text: TextSpan( 638 text: TextSpan(
638 children: [ 639 children: [
639 TextSpan( 640 TextSpan(
640 - text: title, 641 + text: title ?? "",
641 style: TextStyle( 642 style: TextStyle(
642 color: MyColours.color_515151, 643 color: MyColours.color_515151,
643 fontSize: ScreenUtil().setSp(28)), 644 fontSize: ScreenUtil().setSp(28)),
@@ -655,7 +656,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { @@ -655,7 +656,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
655 ))), 656 ))),
656 Expanded( 657 Expanded(
657 child: Text( 658 child: Text(
658 - labelShow, 659 + labelShow ?? "",
659 overflow: TextOverflow.ellipsis, 660 overflow: TextOverflow.ellipsis,
660 style: TextStyle( 661 style: TextStyle(
661 color: labelShow == '请选择' || labelShow == '暂未选择' 662 color: labelShow == '请选择' || labelShow == '暂未选择'
@@ -692,7 +692,7 @@ class _FeastDetailPageState extends State<FeastDetailPage> { @@ -692,7 +692,7 @@ class _FeastDetailPageState extends State<FeastDetailPage> {
692 ), 692 ),
693 Spacer(), 693 Spacer(),
694 Text( 694 Text(
695 - '${costInfoModel.totalprice} 元', 695 + '${costInfoModel.totalprice??''} 元',
696 style: TextStyle( 696 style: TextStyle(
697 color: MyColours.color_515151, 697 color: MyColours.color_515151,
698 fontSize: font(14)), 698 fontSize: font(14)),
@@ -400,23 +400,41 @@ class FeastModel extends ChangeNotifier { @@ -400,23 +400,41 @@ class FeastModel extends ChangeNotifier {
400 return false; 400 return false;
401 }); 401 });
402 if (baseResp.code == Constant.status_success) { 402 if (baseResp.code == Constant.status_success) {
403 - // if (baseResp.data == 1) {  
404 - rid = baseResp.data['id'];  
405 - reserve = baseResp.data['rname'];  
406 - dynamic sex = baseResp.data['sex'];  
407 - if (sex.toString() == '1') {  
408 - reserve += '先生';  
409 - } else if (sex.toString() == '2') {  
410 - reserve += '女士';  
411 - } else if (sex.toString() == '3') {  
412 - reserve += '公司';  
413 - } 403 + if (baseResp.data == 1) {
  404 + reserve = params['rname'];
  405 + dynamic sex = params['sex'];
  406 + if (sex.toString() == '1') {
  407 + reserve += '先生';
  408 + } else if (sex.toString() == '2') {
  409 + reserve += '女士';
  410 + } else if (sex.toString() == '3') {
  411 + reserve += '公司';
  412 + }
414 413
415 - classifyData.forEach((element) {  
416 - if (element.id == baseResp.data['classify_id'].toString()) {  
417 - type = element.className; 414 + classifyData.forEach((element) {
  415 + if (element.id == params['classify_id'].toString()) {
  416 + type = element.className;
  417 + }
  418 + });
  419 + return true;
  420 + } else {
  421 + rid = baseResp.data['id'];
  422 + reserve = baseResp.data['rname'];
  423 + dynamic sex = baseResp.data['sex'];
  424 + if (sex.toString() == '1') {
  425 + reserve += '先生';
  426 + } else if (sex.toString() == '2') {
  427 + reserve += '女士';
  428 + } else if (sex.toString() == '3') {
  429 + reserve += '公司';
418 } 430 }
419 - }); 431 +
  432 + classifyData.forEach((element) {
  433 + if (element.id == baseResp.data['classify_id'].toString()) {
  434 + type = element.className;
  435 + }
  436 + });
  437 + }
420 438
421 return true; 439 return true;
422 // } else { 440 // } else {