Commit 0ee1c90a90d5097136933522eae9a591665c2171

Authored by wdn127929
1 parent 10f7e362

存酒单位修改

@@ -15,17 +15,17 @@ if (flutterRoot == null) { @@ -15,17 +15,17 @@ if (flutterRoot == null) {
15 15
16 16
17 17
18 -def flutterVersionCode = "487" 18 +def flutterVersionCode = "488"
19 if (flutterVersionCode == null) { 19 if (flutterVersionCode == null) {
20 - flutterVersionCode = '487' 20 + flutterVersionCode = '488'
21 } 21 }
22 22
23 23
24 24
25 25
26 -def flutterVersionName = "4.8.7" 26 +def flutterVersionName = "4.8.8"
27 if (flutterVersionName == null) { 27 if (flutterVersionName == null) {
28 - flutterVersionName = '4.8.7' 28 + flutterVersionName = '4.8.8'
29 } 29 }
30 30
31 31
@@ -510,7 +510,7 @@ @@ -510,7 +510,7 @@
510 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 510 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
511 CODE_SIGN_IDENTITY = "Apple Development"; 511 CODE_SIGN_IDENTITY = "Apple Development";
512 CODE_SIGN_STYLE = Automatic; 512 CODE_SIGN_STYLE = Automatic;
513 - CURRENT_PROJECT_VERSION = 486; 513 + CURRENT_PROJECT_VERSION = 487;
514 DEVELOPMENT_TEAM = 8J59HM8B82; 514 DEVELOPMENT_TEAM = 8J59HM8B82;
515 ENABLE_BITCODE = NO; 515 ENABLE_BITCODE = NO;
516 FLUTTER_BUILD_MODE = release; 516 FLUTTER_BUILD_MODE = release;
@@ -525,7 +525,7 @@ @@ -525,7 +525,7 @@
525 "$(inherited)", 525 "$(inherited)",
526 "$(PROJECT_DIR)/Flutter", 526 "$(PROJECT_DIR)/Flutter",
527 ); 527 );
528 - MARKETING_VERSION = 4.8.6; 528 + MARKETING_VERSION = 4.8.7;
529 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 529 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
530 PRODUCT_NAME = Runner; 530 PRODUCT_NAME = Runner;
531 PROVISIONING_PROFILE_SPECIFIER = ""; 531 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -656,7 +656,7 @@ @@ -656,7 +656,7 @@
656 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 656 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
657 CODE_SIGN_IDENTITY = "Apple Development"; 657 CODE_SIGN_IDENTITY = "Apple Development";
658 CODE_SIGN_STYLE = Automatic; 658 CODE_SIGN_STYLE = Automatic;
659 - CURRENT_PROJECT_VERSION = 486; 659 + CURRENT_PROJECT_VERSION = 487;
660 DEVELOPMENT_TEAM = 8J59HM8B82; 660 DEVELOPMENT_TEAM = 8J59HM8B82;
661 ENABLE_BITCODE = NO; 661 ENABLE_BITCODE = NO;
662 FLUTTER_BUILD_MODE = release; 662 FLUTTER_BUILD_MODE = release;
@@ -671,7 +671,7 @@ @@ -671,7 +671,7 @@
671 "$(inherited)", 671 "$(inherited)",
672 "$(PROJECT_DIR)/Flutter", 672 "$(PROJECT_DIR)/Flutter",
673 ); 673 );
674 - MARKETING_VERSION = 4.8.6; 674 + MARKETING_VERSION = 4.8.7;
675 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 675 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
676 PRODUCT_NAME = Runner; 676 PRODUCT_NAME = Runner;
677 PROVISIONING_PROFILE_SPECIFIER = ""; 677 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -692,7 +692,7 @@ @@ -692,7 +692,7 @@
692 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 692 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
693 CODE_SIGN_IDENTITY = "Apple Development"; 693 CODE_SIGN_IDENTITY = "Apple Development";
694 CODE_SIGN_STYLE = Automatic; 694 CODE_SIGN_STYLE = Automatic;
695 - CURRENT_PROJECT_VERSION = 486; 695 + CURRENT_PROJECT_VERSION = 487;
696 DEVELOPMENT_TEAM = 8J59HM8B82; 696 DEVELOPMENT_TEAM = 8J59HM8B82;
697 ENABLE_BITCODE = NO; 697 ENABLE_BITCODE = NO;
698 FLUTTER_BUILD_MODE = release; 698 FLUTTER_BUILD_MODE = release;
@@ -707,7 +707,7 @@ @@ -707,7 +707,7 @@
707 "$(inherited)", 707 "$(inherited)",
708 "$(PROJECT_DIR)/Flutter", 708 "$(PROJECT_DIR)/Flutter",
709 ); 709 );
710 - MARKETING_VERSION = 4.8.6; 710 + MARKETING_VERSION = 4.8.7;
711 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 711 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
712 PRODUCT_NAME = Runner; 712 PRODUCT_NAME = Runner;
713 PROVISIONING_PROFILE_SPECIFIER = ""; 713 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3,10 +3,10 @@ import 'package:fluwx/fluwx.dart'; @@ -3,10 +3,10 @@ import 'package:fluwx/fluwx.dart';
3 3
4 class Constant { 4 class Constant {
5 static const int status_success = 200; //服务器返回成功 5 static const int status_success = 200; //服务器返回成功
6 - // static const WXMiniProgramType wxMiniProgramType =  
7 - // WXMiniProgramType.RELEASE; //正式版  
8 static const WXMiniProgramType wxMiniProgramType = 6 static const WXMiniProgramType wxMiniProgramType =
9 - WXMiniProgramType.PREVIEW; //体验版 7 + WXMiniProgramType.RELEASE; //正式版
  8 + // static const WXMiniProgramType wxMiniProgramType =
  9 + // WXMiniProgramType.PREVIEW; //体验版
10 // static const WXMiniProgramType wxMiniProgramType = 10 // static const WXMiniProgramType wxMiniProgramType =
11 // WXMiniProgramType.TEST; //开发版 11 // WXMiniProgramType.TEST; //开发版
12 12
@@ -14,7 +14,18 @@ class WineManageFaModel { @@ -14,7 +14,18 @@ class WineManageFaModel {
14 if (json['data'] != null) { 14 if (json['data'] != null) {
15 data = []; 15 data = [];
16 json['data'].forEach((v) { 16 json['data'].forEach((v) {
17 - data.add(new WineManageModel.fromJson(v)); 17 + WineManageModel temp = WineManageModel.fromJson(v);
  18 + int tempNum = 0; //全部剩余量
  19 + temp.wineData.forEach((element) {
  20 + tempNum += double.parse(
  21 + element.wineStock == '' || element.wineStock == null
  22 + ? '0'
  23 + : element.wineStock)
  24 + .toInt(); //剩余量
  25 + });
  26 + if (tempNum > 0) {
  27 + data.add(temp); //全部剩余量>0,列表显示
  28 + }
18 }); 29 });
19 } 30 }
20 msg = json['msg']; 31 msg = json['msg'];
@@ -88,13 +99,19 @@ class WineManageModel { @@ -88,13 +99,19 @@ class WineManageModel {
88 wineData = []; 99 wineData = [];
89 if (json['wine'] is List) { 100 if (json['wine'] is List) {
90 json['wine'].forEach((v) { 101 json['wine'].forEach((v) {
91 - wineData.add(new WineManageSunModel.fromJson(v));  
92 - wineDataMove.add(new WineManageSunMoveModel.fromJson(v)); 102 + WineManageSunModel temp = WineManageSunModel.fromJson(v);
  103 + if (int.parse(temp.wineStock) > 0) {
  104 + wineData.add(new WineManageSunModel.fromJson(v));
  105 + wineDataMove.add(new WineManageSunMoveModel.fromJson(v));
  106 + }
93 }); 107 });
94 } else { 108 } else {
95 convert.jsonDecode(json['wine']).forEach((v) { 109 convert.jsonDecode(json['wine']).forEach((v) {
96 - wineData.add(new WineManageSunModel.fromJson(v));  
97 - wineDataMove.add(new WineManageSunMoveModel.fromJson(v)); 110 + WineManageSunModel temp = WineManageSunModel.fromJson(v);
  111 + if (int.parse(temp.wineStock) > 0) {
  112 + wineData.add(new WineManageSunModel.fromJson(v));
  113 + wineDataMove.add(new WineManageSunMoveModel.fromJson(v));
  114 + }
98 }); 115 });
99 } 116 }
100 } 117 }
@@ -116,13 +133,19 @@ class WineManageModel { @@ -116,13 +133,19 @@ class WineManageModel {
116 wineData = []; 133 wineData = [];
117 if (json['wine'] is List) { 134 if (json['wine'] is List) {
118 json['wine'].forEach((v) { 135 json['wine'].forEach((v) {
119 - // wineData.add(new WineManageSunModel.fromJson(v));  
120 - wineDataMove.add(v); 136 + // wineDataMove.add(v);
  137 +
  138 + if (int.parse(v.wineStock) > 0) {
  139 + wineDataMove.add(v);
  140 + }
121 }); 141 });
122 } else { 142 } else {
123 convert.jsonDecode(json['wine']).forEach((v) { 143 convert.jsonDecode(json['wine']).forEach((v) {
124 - // wineData.add(new WineManageSunModel.fromJson(v));  
125 - wineDataMove.add(new WineManageSunMoveModel.fromJson(v)); 144 + WineManageSunMoveModel temp = WineManageSunMoveModel.fromJson(v);
  145 + if (int.parse(temp.wineStock) > 0) {
  146 + wineDataMove.add(temp);
  147 + }
  148 + // wineDataMove.add(new WineManageSunMoveModel.fromJson(v));
126 }); 149 });
127 } 150 }
128 } 151 }
@@ -177,10 +200,21 @@ class WineManageSunModel { @@ -177,10 +200,21 @@ class WineManageSunModel {
177 200
178 WineManageSunModel.fromJson(Map<String, dynamic> json) { 201 WineManageSunModel.fromJson(Map<String, dynamic> json) {
179 wineName = json['wine_name']; 202 wineName = json['wine_name'];
180 - wineAmount = json['wine_amount']; 203 + wineAmount = double.parse(
  204 + json['wine_amount'] == '' || json['wine_amount'] == null
  205 + ? '0'
  206 + : json['wine_amount'])
  207 + .toInt()
  208 + .toString();
181 unit = json['unit']; 209 unit = json['unit'];
182 wineNumber = json['wine_number'] ?? ""; 210 wineNumber = json['wine_number'] ?? "";
183 - wineStock = json['wine_stock'] ?? ""; 211 + // wineStock = json['wine_stock'] ?? "";
  212 + wineStock = double.parse(
  213 + json['wine_stock'] == '' || json['wine_stock'] == null
  214 + ? '0'
  215 + : json['wine_stock'])
  216 + .toInt()
  217 + .toString();
184 cdate = json['cdate'] ?? ""; 218 cdate = json['cdate'] ?? "";
185 219
186 img = <UploadImgModel>[]; 220 img = <UploadImgModel>[];
@@ -249,12 +283,29 @@ class WineManageSunMoveModel { @@ -249,12 +283,29 @@ class WineManageSunMoveModel {
249 283
250 WineManageSunMoveModel.fromJson(Map<String, dynamic> json) { 284 WineManageSunMoveModel.fromJson(Map<String, dynamic> json) {
251 wineName = json['wine_name']; 285 wineName = json['wine_name'];
252 - wineAmount = json['wine_amount']; 286 + wineAmount = double.parse(
  287 + json['wine_amount'] == '' || json['wine_amount'] == null
  288 + ? '0'
  289 + : json['wine_amount'])
  290 + .toInt()
  291 + .toString();
253 // wineNumC.text = wineAmount ?? ''; 292 // wineNumC.text = wineAmount ?? '';
254 unit = json['unit']; 293 unit = json['unit'];
255 wineNumber = json['wine_number'] ?? ""; 294 wineNumber = json['wine_number'] ?? "";
256 - checkAmount = json['check_amount'] ?? '';  
257 - wineStock = json['wine_stock'] ?? ""; 295 + // checkAmount = json['check_amount'] ?? '';
  296 + checkAmount = double.parse(
  297 + json['check_amount'] == '' || json['check_amount'] == null
  298 + ? '0'
  299 + : json['check_amount'])
  300 + .toInt()
  301 + .toString();
  302 + // wineStock = json['wine_stock'] ?? "";
  303 + wineStock = double.parse(
  304 + json['wine_stock'] == '' || json['wine_stock'] == null
  305 + ? '0'
  306 + : json['wine_stock'])
  307 + .toInt()
  308 + .toString();
258 cdate = json['cdate'] ?? ""; 309 cdate = json['cdate'] ?? "";
259 310
260 // wineNumC.text = wineNumber; 311 // wineNumC.text = wineNumber;
@@ -116,13 +116,13 @@ class _ApplyOutStoreItemPageState extends State<ApplyOutStoreItemPage> { @@ -116,13 +116,13 @@ class _ApplyOutStoreItemPageState extends State<ApplyOutStoreItemPage> {
116 onChanged: (value) { 116 onChanged: (value) {
117 // print(value); 117 // print(value);
118 if (value != null && value.trim().length > 0) { 118 if (value != null && value.trim().length > 0) {
119 - // bool isNumber =  
120 - // Utils.isInteger(value); //判断输入的内容是否是数字  
121 - // if (!isNumber) {  
122 - // Utils.showToast('请输入数字');  
123 - // controller.text = '';  
124 - // return;  
125 - // } 119 + bool isNumber =
  120 + Utils.isInteger(value); //判断输入的内容是否是数字
  121 + if (!isNumber) {
  122 + Utils.showToast('请输入整数');
  123 + controller.text = '';
  124 + return;
  125 + }
126 if (double.parse(value) > 126 if (double.parse(value) >
127 double.parse( 127 double.parse(
128 widget.wineManageSunModel.wineAmount)) { 128 widget.wineManageSunModel.wineAmount)) {
@@ -109,7 +109,7 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> { @@ -109,7 +109,7 @@ class _ApplyOutStorePageState extends State<ApplyOutStorePage> {
109 109
110 if (element.checkAmount != null && 110 if (element.checkAmount != null &&
111 element.checkAmount != '' && 111 element.checkAmount != '' &&
112 - double.parse(element.checkAmount) > 0) { 112 + int.parse(element.checkAmount) > 0) {
113 //有输入数量 113 //有输入数量
114 WineCheckModel sunMoveModel = WineCheckModel(); 114 WineCheckModel sunMoveModel = WineCheckModel();
115 sunMoveModel.wineName = element.wineName; 115 sunMoveModel.wineName = element.wineName;
@@ -1659,7 +1659,7 @@ class Utils { @@ -1659,7 +1659,7 @@ class Utils {
1659 path: _path, 1659 path: _path,
1660 description: _description, 1660 description: _description,
1661 // miniProgramType: , //体验版 1661 // miniProgramType: , //体验版
1662 - miniProgramType:Constant.wxMiniProgramType, //正式版 1662 + miniProgramType: Constant.wxMiniProgramType, //正式版
1663 // miniProgramType: //开发版 1663 // miniProgramType: //开发版
1664 // thumbnail: WeChatImage.binary(source) 1664 // thumbnail: WeChatImage.binary(source)
1665 thumbnail: WeChatImage.network(_thumbnail) 1665 thumbnail: WeChatImage.network(_thumbnail)