Showing
12 changed files
with
1331 additions
and
244 deletions
assets/preview_bg.png
0 → 100644
501 KB
| @@ -47,261 +47,290 @@ class _FinalPlanDishPageState extends State<FinalPlanDishPage> { | @@ -47,261 +47,290 @@ class _FinalPlanDishPageState extends State<FinalPlanDishPage> { | ||
| 47 | backgroundColor: MyColours.color_ffffff, | 47 | backgroundColor: MyColours.color_ffffff, |
| 48 | body: Column( | 48 | body: Column( |
| 49 | children: [ | 49 | children: [ |
| 50 | - Container( | ||
| 51 | - width: double.infinity, | ||
| 52 | - // width: w(32), | ||
| 53 | - height: w(48), | ||
| 54 | - padding: EdgeInsets.symmetric(horizontal: w(10)), | ||
| 55 | - decoration: BoxDecoration( | ||
| 56 | - border: Border( | ||
| 57 | - top: BorderSide( | ||
| 58 | - width: w(1), color: MyColours.color_DBDBDB), | ||
| 59 | - bottom: BorderSide( | ||
| 60 | - width: w(1), color: MyColours.color_DBDBDB))), | ||
| 61 | - // constraints: BoxConstraints(minWidth: w(20)), | ||
| 62 | - child: TextField( | ||
| 63 | - maxLines: 1, | ||
| 64 | - // controller: | ||
| 65 | - // focusNode: _focusNode, | ||
| 66 | - // autofocus: true, | ||
| 67 | - | ||
| 68 | - style: TextStyle( | ||
| 69 | - color: MyColours.color_515151, | ||
| 70 | - fontSize: font(16), | ||
| 71 | - fontWeight: FontWeight.bold), | ||
| 72 | - textAlign: TextAlign.left, | ||
| 73 | - // textAlignVertical: TextAlignVertical.center, | ||
| 74 | - decoration: InputDecoration( | ||
| 75 | - hintText: "请输入排菜名称", | ||
| 76 | - hintStyle: TextStyle( | ||
| 77 | - color: MyColours.color_999999, | ||
| 78 | - fontSize: font(16), | ||
| 79 | - fontWeight: FontWeight.bold), | ||
| 80 | - // isCollapsed: | ||
| 81 | - // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 82 | - border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 83 | - contentPadding: EdgeInsets.zero, | ||
| 84 | - ), | ||
| 85 | - keyboardType: TextInputType.text, | ||
| 86 | - textInputAction: TextInputAction.done, | ||
| 87 | - | ||
| 88 | - onChanged: (value) { | ||
| 89 | - // setState(() {}); | ||
| 90 | - // _searchSellerLocation(); | ||
| 91 | - // customerProvider.searchData(value); | ||
| 92 | - }, | ||
| 93 | - onEditingComplete: () { | ||
| 94 | - FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 95 | - // contantShowModel.searchData( | ||
| 96 | - // contantShowModel.controller.text); | ||
| 97 | - // _searchSellerLocation(); | ||
| 98 | - // _focusNode.unfocus(); | ||
| 99 | - }, | ||
| 100 | - )), | ||
| 101 | Expanded( | 50 | Expanded( |
| 102 | - child: ListView.builder( | ||
| 103 | - itemCount: 20, | ||
| 104 | - shrinkWrap: true, | 51 | + child: SingleChildScrollView( |
| 105 | controller: controller, | 52 | controller: controller, |
| 106 | - itemBuilder: (context, index) { | ||
| 107 | - return ListView.builder( | ||
| 108 | - itemCount: 2 + 1, | ||
| 109 | - shrinkWrap: true, | ||
| 110 | - controller: controller, | ||
| 111 | - itemBuilder: (context, index) { | ||
| 112 | - if (index == 0) { | ||
| 113 | - return Column( | ||
| 114 | - children: [ | ||
| 115 | - //头 | ||
| 116 | - Container( | ||
| 117 | - width: double.infinity, | ||
| 118 | - // width: w(32), | ||
| 119 | - height: w(48), | ||
| 120 | - padding: | ||
| 121 | - EdgeInsets.symmetric(horizontal: w(10)), | 53 | + child: Column( |
| 54 | + children: [ | ||
| 55 | + Container( | ||
| 56 | + width: double.infinity, | ||
| 57 | + // width: w(32), | ||
| 58 | + height: w(48), | ||
| 59 | + padding: EdgeInsets.symmetric(horizontal: w(10)), | ||
| 60 | + decoration: BoxDecoration( | ||
| 61 | + border: Border( | ||
| 62 | + top: BorderSide( | ||
| 63 | + width: w(1), | ||
| 64 | + color: MyColours.color_DBDBDB), | ||
| 65 | + bottom: BorderSide( | ||
| 66 | + width: w(1), | ||
| 67 | + color: MyColours.color_DBDBDB))), | ||
| 68 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 69 | + child: TextField( | ||
| 70 | + maxLines: 1, | ||
| 71 | + // controller: | ||
| 72 | + // focusNode: _focusNode, | ||
| 73 | + // autofocus: true, | ||
| 74 | + | ||
| 75 | + style: TextStyle( | ||
| 76 | + color: MyColours.color_515151, | ||
| 77 | + fontSize: font(16), | ||
| 78 | + fontWeight: FontWeight.bold), | ||
| 79 | + textAlign: TextAlign.left, | ||
| 80 | + // textAlignVertical: TextAlignVertical.center, | ||
| 81 | + decoration: InputDecoration( | ||
| 82 | + hintText: "请输入排菜名称", | ||
| 83 | + hintStyle: TextStyle( | ||
| 84 | + color: MyColours.color_999999, | ||
| 85 | + fontSize: font(16), | ||
| 86 | + fontWeight: FontWeight.bold), | ||
| 87 | + // isCollapsed: | ||
| 88 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 89 | + border: OutlineInputBorder( | ||
| 90 | + borderSide: BorderSide.none), | ||
| 91 | + contentPadding: EdgeInsets.zero, | ||
| 92 | + ), | ||
| 93 | + keyboardType: TextInputType.text, | ||
| 94 | + textInputAction: TextInputAction.done, | ||
| 95 | + | ||
| 96 | + onChanged: (value) { | ||
| 97 | + // setState(() {}); | ||
| 98 | + // _searchSellerLocation(); | ||
| 99 | + // customerProvider.searchData(value); | ||
| 100 | + }, | ||
| 101 | + onEditingComplete: () { | ||
| 102 | + FocusScope.of(context) | ||
| 103 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 104 | + // contantShowModel.searchData( | ||
| 105 | + // contantShowModel.controller.text); | ||
| 106 | + // _searchSellerLocation(); | ||
| 107 | + // _focusNode.unfocus(); | ||
| 108 | + }, | ||
| 109 | + )), | ||
| 110 | + ListView.builder( | ||
| 111 | + itemCount: 20, | ||
| 112 | + shrinkWrap: true, | ||
| 113 | + controller: controller, | ||
| 114 | + itemBuilder: (context, index) { | ||
| 115 | + return ListView.builder( | ||
| 116 | + itemCount: 2 + 1, | ||
| 117 | + shrinkWrap: true, | ||
| 118 | + controller: controller, | ||
| 119 | + itemBuilder: (context, index) { | ||
| 120 | + if (index == 0) { | ||
| 121 | + return Column( | ||
| 122 | + children: [ | ||
| 123 | + //头 | ||
| 124 | + Container( | ||
| 125 | + width: double.infinity, | ||
| 126 | + // width: w(32), | ||
| 127 | + height: w(48), | ||
| 128 | + padding: EdgeInsets.symmetric( | ||
| 129 | + horizontal: w(10)), | ||
| 130 | + decoration: BoxDecoration( | ||
| 131 | + border: Border( | ||
| 132 | + bottom: BorderSide( | ||
| 133 | + width: w(1), | ||
| 134 | + color: MyColours | ||
| 135 | + .color_DBDBDB))), | ||
| 136 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 137 | + child: Row( | ||
| 138 | + mainAxisAlignment: | ||
| 139 | + MainAxisAlignment | ||
| 140 | + .spaceBetween, | ||
| 141 | + children: [ | ||
| 142 | + Text( | ||
| 143 | + '热菜', | ||
| 144 | + style: TextStyle( | ||
| 145 | + fontSize: font(16), | ||
| 146 | + color: MyColours | ||
| 147 | + .color_515151, | ||
| 148 | + fontWeight: | ||
| 149 | + FontWeight.bold), | ||
| 150 | + ), | ||
| 151 | + Text( | ||
| 152 | + '6道', | ||
| 153 | + style: TextStyle( | ||
| 154 | + fontSize: font(14), | ||
| 155 | + color: | ||
| 156 | + MyColours.color_515151, | ||
| 157 | + ), | ||
| 158 | + ), | ||
| 159 | + ], | ||
| 160 | + )) | ||
| 161 | + ], | ||
| 162 | + ); | ||
| 163 | + } | ||
| 164 | + int indexReal = index - 1; | ||
| 165 | + return Container( | ||
| 166 | + padding: EdgeInsets.symmetric( | ||
| 167 | + horizontal: w(20), vertical: w(13)), | ||
| 122 | decoration: BoxDecoration( | 168 | decoration: BoxDecoration( |
| 123 | border: Border( | 169 | border: Border( |
| 124 | bottom: BorderSide( | 170 | bottom: BorderSide( |
| 125 | width: w(1), | 171 | width: w(1), |
| 126 | color: | 172 | color: |
| 127 | MyColours.color_DBDBDB))), | 173 | MyColours.color_DBDBDB))), |
| 128 | - // constraints: BoxConstraints(minWidth: w(20)), | ||
| 129 | child: Row( | 174 | child: Row( |
| 130 | - mainAxisAlignment: | ||
| 131 | - MainAxisAlignment.spaceBetween, | ||
| 132 | children: [ | 175 | children: [ |
| 176 | + Container( | ||
| 177 | + constraints: | ||
| 178 | + BoxConstraints(maxWidth: w(80)), | ||
| 179 | + child: Text( | ||
| 180 | + '山城辣子鸡', | ||
| 181 | + maxLines: 10, | ||
| 182 | + overflow: TextOverflow.ellipsis, | ||
| 183 | + style: TextStyle( | ||
| 184 | + fontSize: font(14), | ||
| 185 | + color: | ||
| 186 | + MyColours.color_515151), | ||
| 187 | + )), | ||
| 188 | + HEmptyView(8), | ||
| 189 | + _laduWidget(), | ||
| 190 | + Spacer(), | ||
| 133 | Text( | 191 | Text( |
| 134 | - '热菜', | 192 | + '38元/份', |
| 193 | + maxLines: 2, | ||
| 194 | + overflow: TextOverflow.ellipsis, | ||
| 135 | style: TextStyle( | 195 | style: TextStyle( |
| 136 | - fontSize: font(16), | ||
| 137 | - color: MyColours.color_515151, | ||
| 138 | - fontWeight: FontWeight.bold), | 196 | + fontSize: font(12), |
| 197 | + color: MyColours.color_999999), | ||
| 139 | ), | 198 | ), |
| 199 | + HEmptyView(28), | ||
| 140 | Text( | 200 | Text( |
| 141 | - '6道', | 201 | + '38元/份', |
| 202 | + maxLines: 2, | ||
| 203 | + overflow: TextOverflow.ellipsis, | ||
| 142 | style: TextStyle( | 204 | style: TextStyle( |
| 143 | - fontSize: font(14), | ||
| 144 | - color: MyColours.color_515151, | ||
| 145 | - ), | 205 | + fontSize: font(10), |
| 206 | + color: MyColours.color_8EBBBE), | ||
| 146 | ), | 207 | ), |
| 147 | - ], | ||
| 148 | - )) | ||
| 149 | - ], | ||
| 150 | - ); | ||
| 151 | - } | ||
| 152 | - int indexReal = index - 1; | ||
| 153 | - return Container( | ||
| 154 | - padding: EdgeInsets.symmetric( | ||
| 155 | - horizontal: w(20), vertical: w(13)), | ||
| 156 | - decoration: BoxDecoration( | ||
| 157 | - border: Border( | ||
| 158 | - bottom: BorderSide( | ||
| 159 | - width: w(1), | ||
| 160 | - color: MyColours.color_DBDBDB))), | ||
| 161 | - child: Row( | ||
| 162 | - children: [ | ||
| 163 | - Container( | ||
| 164 | - constraints: | ||
| 165 | - BoxConstraints(maxWidth: w(80)), | ||
| 166 | - child: Text( | ||
| 167 | - '山城辣子鸡', | ||
| 168 | - maxLines: 10, | ||
| 169 | - overflow: TextOverflow.ellipsis, | ||
| 170 | - style: TextStyle( | ||
| 171 | - fontSize: font(14), | ||
| 172 | - color: MyColours.color_515151), | ||
| 173 | - )), | ||
| 174 | - HEmptyView(8), | ||
| 175 | - _laduWidget(), | ||
| 176 | - Spacer(), | ||
| 177 | - Text( | ||
| 178 | - '38元/份', | ||
| 179 | - maxLines: 2, | ||
| 180 | - overflow: TextOverflow.ellipsis, | ||
| 181 | - style: TextStyle( | ||
| 182 | - fontSize: font(12), | ||
| 183 | - color: MyColours.color_999999), | ||
| 184 | - ), | ||
| 185 | - HEmptyView(28), | ||
| 186 | - Text( | ||
| 187 | - '38元/份', | ||
| 188 | - maxLines: 2, | ||
| 189 | - overflow: TextOverflow.ellipsis, | ||
| 190 | - style: TextStyle( | ||
| 191 | - fontSize: font(10), | ||
| 192 | - color: MyColours.color_8EBBBE), | ||
| 193 | - ), | ||
| 194 | - HEmptyView(20), | ||
| 195 | - Image.asset( | ||
| 196 | - Utils.getImgPath('plan_dish_minus'), | ||
| 197 | - width: w(16), | ||
| 198 | - ), | ||
| 199 | - HEmptyView(8), | ||
| 200 | - Container( | ||
| 201 | - width: w(32), | ||
| 202 | - height: w(16), | ||
| 203 | - decoration: BoxDecoration( | ||
| 204 | - borderRadius: | ||
| 205 | - BorderRadius.circular(r(5)), | ||
| 206 | - border: Border.all( | ||
| 207 | - width: w(1), | ||
| 208 | - color: MyColours.color_999999)), | ||
| 209 | - // constraints: BoxConstraints(minWidth: w(20)), | ||
| 210 | - child: TextField( | ||
| 211 | - maxLines: 1, | ||
| 212 | - // controller: | ||
| 213 | - // focusNode: _focusNode, | ||
| 214 | - // autofocus: true, | 208 | + HEmptyView(20), |
| 209 | + Image.asset( | ||
| 210 | + Utils.getImgPath('plan_dish_minus'), | ||
| 211 | + width: w(16), | ||
| 212 | + ), | ||
| 213 | + HEmptyView(8), | ||
| 214 | + Container( | ||
| 215 | + width: w(32), | ||
| 216 | + height: w(16), | ||
| 217 | + decoration: BoxDecoration( | ||
| 218 | + borderRadius: | ||
| 219 | + BorderRadius.circular(r(5)), | ||
| 220 | + border: Border.all( | ||
| 221 | + width: w(1), | ||
| 222 | + color: MyColours | ||
| 223 | + .color_999999)), | ||
| 224 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 225 | + child: TextField( | ||
| 226 | + maxLines: 1, | ||
| 227 | + // controller: | ||
| 228 | + // focusNode: _focusNode, | ||
| 229 | + // autofocus: true, | ||
| 215 | 230 | ||
| 216 | - style: TextStyle( | ||
| 217 | - color: MyColours.color_438E93, | ||
| 218 | - fontSize: font(12)), | ||
| 219 | - textAlign: TextAlign.center, | ||
| 220 | - // textAlignVertical: TextAlignVertical.center, | ||
| 221 | - decoration: InputDecoration( | ||
| 222 | - hintText: "数量", | ||
| 223 | - hintStyle: TextStyle( | ||
| 224 | - color: MyColours.color_999999, | ||
| 225 | - fontSize: font(12), | 231 | + style: TextStyle( |
| 232 | + color: MyColours.color_438E93, | ||
| 233 | + fontSize: font(12)), | ||
| 234 | + textAlign: TextAlign.center, | ||
| 235 | + // textAlignVertical: TextAlignVertical.center, | ||
| 236 | + decoration: InputDecoration( | ||
| 237 | + hintText: "数量", | ||
| 238 | + hintStyle: TextStyle( | ||
| 239 | + color: MyColours.color_999999, | ||
| 240 | + fontSize: font(12), | ||
| 241 | + ), | ||
| 242 | + // isCollapsed: | ||
| 243 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 244 | + border: OutlineInputBorder( | ||
| 245 | + borderSide: | ||
| 246 | + BorderSide.none), | ||
| 247 | + contentPadding: EdgeInsets.zero, | ||
| 248 | + ), | ||
| 249 | + keyboardType: | ||
| 250 | + TextInputType.number, | ||
| 251 | + textInputAction: | ||
| 252 | + TextInputAction.done, | ||
| 253 | + | ||
| 254 | + onChanged: (value) { | ||
| 255 | + // setState(() {}); | ||
| 256 | + // _searchSellerLocation(); | ||
| 257 | + // customerProvider.searchData(value); | ||
| 258 | + }, | ||
| 259 | + onEditingComplete: () { | ||
| 260 | + FocusScope.of(context) | ||
| 261 | + .requestFocus( | ||
| 262 | + FocusNode()); //点击空白处隐藏键盘 | ||
| 263 | + // contantShowModel.searchData( | ||
| 264 | + // contantShowModel.controller.text); | ||
| 265 | + // _searchSellerLocation(); | ||
| 266 | + // _focusNode.unfocus(); | ||
| 267 | + }, | ||
| 268 | + )), | ||
| 269 | + HEmptyView(8), | ||
| 270 | + Image.asset( | ||
| 271 | + Utils.getImgPath('plan_dish_add'), | ||
| 272 | + width: w(16), | ||
| 226 | ), | 273 | ), |
| 227 | - // isCollapsed: | ||
| 228 | - // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 229 | - border: OutlineInputBorder( | ||
| 230 | - borderSide: BorderSide.none), | ||
| 231 | - contentPadding: EdgeInsets.zero, | ||
| 232 | - ), | ||
| 233 | - keyboardType: TextInputType.number, | ||
| 234 | - textInputAction: TextInputAction.done, | 274 | + ], |
| 275 | + ), | ||
| 276 | + ); | ||
| 277 | + }); | ||
| 278 | + }), | ||
| 279 | + Container( | ||
| 280 | + padding: EdgeInsets.symmetric( | ||
| 281 | + horizontal: w(15), vertical: w(7)), | ||
| 282 | + margin: EdgeInsets.only( | ||
| 283 | + top: w(7), | ||
| 284 | + bottom: w(13), | ||
| 285 | + left: w(20), | ||
| 286 | + right: w(20)), | ||
| 287 | + decoration: BoxDecoration( | ||
| 288 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 289 | + border: Border.all( | ||
| 290 | + width: w(1), color: MyColours.color_515151)), | ||
| 291 | + child: TextField( | ||
| 292 | + maxLines: 4, | ||
| 293 | + // controller: | ||
| 294 | + // focusNode: _focusNode, | ||
| 295 | + // autofocus: true, | ||
| 235 | 296 | ||
| 236 | - onChanged: (value) { | ||
| 237 | - // setState(() {}); | ||
| 238 | - // _searchSellerLocation(); | ||
| 239 | - // customerProvider.searchData(value); | ||
| 240 | - }, | ||
| 241 | - onEditingComplete: () { | ||
| 242 | - FocusScope.of(context).requestFocus( | ||
| 243 | - FocusNode()); //点击空白处隐藏键盘 | ||
| 244 | - // contantShowModel.searchData( | ||
| 245 | - // contantShowModel.controller.text); | ||
| 246 | - // _searchSellerLocation(); | ||
| 247 | - // _focusNode.unfocus(); | ||
| 248 | - }, | ||
| 249 | - )), | ||
| 250 | - HEmptyView(8), | ||
| 251 | - Image.asset( | ||
| 252 | - Utils.getImgPath('plan_dish_add'), | ||
| 253 | - width: w(16), | ||
| 254 | - ), | ||
| 255 | - ], | 297 | + style: TextStyle( |
| 298 | + color: MyColours.color_515151, | ||
| 299 | + fontSize: font(12)), | ||
| 300 | + textAlign: TextAlign.left, | ||
| 301 | + // textAlignVertical: TextAlignVertical.center, | ||
| 302 | + decoration: InputDecoration( | ||
| 303 | + hintText: "请输入整单备注", | ||
| 304 | + hintStyle: TextStyle( | ||
| 305 | + color: MyColours.color_999999, | ||
| 306 | + fontSize: font(12), | ||
| 256 | ), | 307 | ), |
| 257 | - ); | ||
| 258 | - }); | ||
| 259 | - })), | ||
| 260 | - Container( | ||
| 261 | - padding: EdgeInsets.symmetric(horizontal: w(15), vertical: w(7)), | ||
| 262 | - margin: EdgeInsets.only( | ||
| 263 | - top: w(7), bottom: w(13), left: w(20), right: w(20)), | ||
| 264 | - decoration: BoxDecoration( | ||
| 265 | - borderRadius: BorderRadius.circular(r(5)), | ||
| 266 | - border: Border.all(width: w(1), color: MyColours.color_515151)), | ||
| 267 | - child: TextField( | ||
| 268 | - maxLines: 4, | ||
| 269 | - // controller: | ||
| 270 | - // focusNode: _focusNode, | ||
| 271 | - // autofocus: true, | ||
| 272 | - | ||
| 273 | - style: | ||
| 274 | - TextStyle(color: MyColours.color_515151, fontSize: font(12)), | ||
| 275 | - textAlign: TextAlign.left, | ||
| 276 | - // textAlignVertical: TextAlignVertical.center, | ||
| 277 | - decoration: InputDecoration( | ||
| 278 | - hintText: "请输入整单备注", | ||
| 279 | - hintStyle: TextStyle( | ||
| 280 | - color: MyColours.color_999999, | ||
| 281 | - fontSize: font(12), | ||
| 282 | - ), | ||
| 283 | - // isCollapsed: | ||
| 284 | - // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 285 | - border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 286 | - contentPadding: EdgeInsets.zero, | ||
| 287 | - ), | ||
| 288 | - keyboardType: TextInputType.number, | ||
| 289 | - textInputAction: TextInputAction.done, | 308 | + // isCollapsed: |
| 309 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 310 | + border: | ||
| 311 | + OutlineInputBorder(borderSide: BorderSide.none), | ||
| 312 | + contentPadding: EdgeInsets.zero, | ||
| 313 | + ), | ||
| 314 | + keyboardType: TextInputType.number, | ||
| 315 | + textInputAction: TextInputAction.done, | ||
| 290 | 316 | ||
| 291 | - onChanged: (value) { | ||
| 292 | - // setState(() {}); | ||
| 293 | - // _searchSellerLocation(); | ||
| 294 | - // customerProvider.searchData(value); | ||
| 295 | - }, | ||
| 296 | - onEditingComplete: () { | ||
| 297 | - FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 298 | - // contantShowModel.searchData( | ||
| 299 | - // contantShowModel.controller.text); | ||
| 300 | - // _searchSellerLocation(); | ||
| 301 | - // _focusNode.unfocus(); | ||
| 302 | - }, | ||
| 303 | - ), | ||
| 304 | - ), | 317 | + onChanged: (value) { |
| 318 | + // setState(() {}); | ||
| 319 | + // _searchSellerLocation(); | ||
| 320 | + // customerProvider.searchData(value); | ||
| 321 | + }, | ||
| 322 | + onEditingComplete: () { | ||
| 323 | + FocusScope.of(context) | ||
| 324 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 325 | + // contantShowModel.searchData( | ||
| 326 | + // contantShowModel.controller.text); | ||
| 327 | + // _searchSellerLocation(); | ||
| 328 | + // _focusNode.unfocus(); | ||
| 329 | + }, | ||
| 330 | + ), | ||
| 331 | + ), | ||
| 332 | + ], | ||
| 333 | + ))), | ||
| 305 | Container( | 334 | Container( |
| 306 | decoration: BoxDecoration( | 335 | decoration: BoxDecoration( |
| 307 | border: Border( | 336 | border: Border( |
| @@ -144,7 +144,7 @@ class _PlanNewDishPageState extends State<PlanNewDishPage> { | @@ -144,7 +144,7 @@ class _PlanNewDishPageState extends State<PlanNewDishPage> { | ||
| 144 | backgroundColor: MyColours.color_ffffff, | 144 | backgroundColor: MyColours.color_ffffff, |
| 145 | appBar: SystemAppBar('经理排菜'), | 145 | appBar: SystemAppBar('经理排菜'), |
| 146 | body: Consumer<PlanDishProvider>(builder: (context, model, child) { | 146 | body: Consumer<PlanDishProvider>(builder: (context, model, child) { |
| 147 | - if (model.pageState == PageState.Success) { | 147 | + if (model.pageStateMy == PageState.Success) { |
| 148 | return Column( | 148 | return Column( |
| 149 | children: [ | 149 | children: [ |
| 150 | MyDivider( | 150 | MyDivider( |
| @@ -355,6 +355,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> { | @@ -355,6 +355,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> { | ||
| 355 | color: MyColours | 355 | color: MyColours |
| 356 | .color_999999), | 356 | .color_999999), |
| 357 | ), | 357 | ), |
| 358 | + HEmptyView(48), | ||
| 358 | Text( | 359 | Text( |
| 359 | '${menuSunModel.member_price}元/${menuSunModel.unit}', | 360 | '${menuSunModel.member_price}元/${menuSunModel.unit}', |
| 360 | style: TextStyle( | 361 | style: TextStyle( |
| @@ -611,7 +612,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> { | @@ -611,7 +612,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> { | ||
| 611 | borderColor: MyColours.color_438E93, | 612 | borderColor: MyColours.color_438E93, |
| 612 | textColor: MyColours.color_438E93, | 613 | textColor: MyColours.color_438E93, |
| 613 | onPressed: () { | 614 | onPressed: () { |
| 614 | - // NavigatorUtil.goFinalPlanDishPage(context); | 615 | + NavigatorUtil.goOrderEditListShowPage(context); |
| 615 | }, | 616 | }, |
| 616 | ), | 617 | ), |
| 617 | RoundButton( | 618 | RoundButton( |
| @@ -626,7 +627,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> { | @@ -626,7 +627,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> { | ||
| 626 | textColor: MyColours.color_438E93, | 627 | textColor: MyColours.color_438E93, |
| 627 | isBold: false, | 628 | isBold: false, |
| 628 | onPressed: () { | 629 | onPressed: () { |
| 629 | - // NavigatorUtil.goFinalPlanDishPage(context); | 630 | + NavigatorUtil.goOrderPreviewPage(context); |
| 630 | }, | 631 | }, |
| 631 | ), | 632 | ), |
| 632 | RoundButton( | 633 | RoundButton( |
| @@ -639,6 +640,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> { | @@ -639,6 +640,7 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> { | ||
| 639 | fontSize: 36, | 640 | fontSize: 36, |
| 640 | isBold: false, | 641 | isBold: false, |
| 641 | onPressed: () { | 642 | onPressed: () { |
| 643 | + Navigator.pop(context); | ||
| 642 | // NavigatorUtil.goFinalPlanDishPage(context); | 644 | // NavigatorUtil.goFinalPlanDishPage(context); |
| 643 | }, | 645 | }, |
| 644 | ) | 646 | ) |
| @@ -434,7 +434,9 @@ class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> { | @@ -434,7 +434,9 @@ class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> { | ||
| 434 | child: Row( | 434 | child: Row( |
| 435 | children: [ | 435 | children: [ |
| 436 | Expanded( | 436 | Expanded( |
| 437 | - child: _cancelAndChangeBtn(() {}, '查看排菜单', | 437 | + child: _cancelAndChangeBtn(() { |
| 438 | + NavigatorUtil.goOrderEditListShowPage(context); | ||
| 439 | + }, '查看排菜单', | ||
| 438 | fontColor: true | 440 | fontColor: true |
| 439 | ? MyColours.color_999999 | 441 | ? MyColours.color_999999 |
| 440 | : MyColours.color_199095)), | 442 | : MyColours.color_199095)), |
| @@ -455,6 +457,7 @@ class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> { | @@ -455,6 +457,7 @@ class _OrderAdvanceHomePageState extends State<OrderAdvanceHomePage> { | ||
| 455 | // } else { | 457 | // } else { |
| 456 | // _showCancelWidget(context); | 458 | // _showCancelWidget(context); |
| 457 | // } | 459 | // } |
| 460 | + NavigatorUtil.goOrderPreviewPage(context); | ||
| 458 | }, '分享排菜单', | 461 | }, '分享排菜单', |
| 459 | fontColor: true | 462 | fontColor: true |
| 460 | ? MyColours.color_999999 | 463 | ? MyColours.color_999999 |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 3 | + | ||
| 4 | +import '../../../res/colors.dart'; | ||
| 5 | +import '../../../utils/screen_util.dart'; | ||
| 6 | +import '../../../utils/utils.dart'; | ||
| 7 | +import '../../../widgets/MyDivider.dart'; | ||
| 8 | +import '../../../widgets/h_empty_view.dart'; | ||
| 9 | +import '../../../widgets/round_button.dart'; | ||
| 10 | +import '../../../widgets/v_empty_view.dart'; | ||
| 11 | +import '../../route/navigator_util.dart'; | ||
| 12 | + | ||
| 13 | +class OrderEditListShowPage extends StatefulWidget { | ||
| 14 | + OrderEditListShowPage({Key key}) : super(key: key); | ||
| 15 | + | ||
| 16 | + @override | ||
| 17 | + _OrderEditListShowPageState createState() => _OrderEditListShowPageState(); | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +class _OrderEditListShowPageState extends State<OrderEditListShowPage> { | ||
| 21 | + ScrollController controller = ScrollController(); | ||
| 22 | + Widget _laduWidget() { | ||
| 23 | + // if (labelIcon[widget | ||
| 24 | + // .cookBookList.labelList[index].icon] is int) { | ||
| 25 | + // int ladu = labelIcon[ | ||
| 26 | + // widget.cookBookList.labelList[index].icon]; | ||
| 27 | + int ladu = 6; | ||
| 28 | + List<Widget> widgetList = []; | ||
| 29 | + for (var i = 0; i < ladu; i++) { | ||
| 30 | + widgetList.add(Image.asset( | ||
| 31 | + Utils.getImgPath('ladu'), | ||
| 32 | + width: w(10), | ||
| 33 | + )); | ||
| 34 | + } | ||
| 35 | + // widgetList.add(HEmptyView(10)); | ||
| 36 | + return Row( | ||
| 37 | + children: widgetList, | ||
| 38 | + ); | ||
| 39 | + // }else{ | ||
| 40 | + // return SizedBox(); | ||
| 41 | + // } | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + @override | ||
| 45 | + Widget build(BuildContext context) { | ||
| 46 | + return Scaffold( | ||
| 47 | + appBar: SystemAppBar('排菜单'), | ||
| 48 | + backgroundColor: MyColours.color_ffffff, | ||
| 49 | + body: Column( | ||
| 50 | + children: [ | ||
| 51 | + Expanded( | ||
| 52 | + child: SingleChildScrollView( | ||
| 53 | + controller: controller, | ||
| 54 | + child: Column( | ||
| 55 | + children: [ | ||
| 56 | + Container( | ||
| 57 | + width: double.infinity, | ||
| 58 | + // width: w(32), | ||
| 59 | + height: w(48), | ||
| 60 | + padding: EdgeInsets.symmetric(horizontal: w(10)), | ||
| 61 | + decoration: BoxDecoration( | ||
| 62 | + border: Border( | ||
| 63 | + top: BorderSide( | ||
| 64 | + width: w(1), | ||
| 65 | + color: MyColours.color_DBDBDB), | ||
| 66 | + bottom: BorderSide( | ||
| 67 | + width: w(1), | ||
| 68 | + color: MyColours.color_DBDBDB))), | ||
| 69 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 70 | + child: Row( | ||
| 71 | + children: [ | ||
| 72 | + Expanded( | ||
| 73 | + child: TextField( | ||
| 74 | + maxLines: 1, | ||
| 75 | + // controller: | ||
| 76 | + // focusNode: _focusNode, | ||
| 77 | + // autofocus: true, | ||
| 78 | + | ||
| 79 | + style: TextStyle( | ||
| 80 | + color: MyColours.color_515151, | ||
| 81 | + fontSize: font(16), | ||
| 82 | + fontWeight: FontWeight.bold), | ||
| 83 | + textAlign: TextAlign.left, | ||
| 84 | + // textAlignVertical: TextAlignVertical.center, | ||
| 85 | + decoration: InputDecoration( | ||
| 86 | + hintText: "请输入排菜名称", | ||
| 87 | + hintStyle: TextStyle( | ||
| 88 | + color: MyColours.color_999999, | ||
| 89 | + fontSize: font(16), | ||
| 90 | + fontWeight: FontWeight.bold), | ||
| 91 | + // isCollapsed: | ||
| 92 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 93 | + border: OutlineInputBorder( | ||
| 94 | + borderSide: BorderSide.none), | ||
| 95 | + contentPadding: EdgeInsets.zero, | ||
| 96 | + ), | ||
| 97 | + keyboardType: TextInputType.text, | ||
| 98 | + textInputAction: TextInputAction.done, | ||
| 99 | + | ||
| 100 | + onChanged: (value) { | ||
| 101 | + // setState(() {}); | ||
| 102 | + // _searchSellerLocation(); | ||
| 103 | + // customerProvider.searchData(value); | ||
| 104 | + }, | ||
| 105 | + onEditingComplete: () { | ||
| 106 | + FocusScope.of(context) | ||
| 107 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 108 | + // contantShowModel.searchData( | ||
| 109 | + // contantShowModel.controller.text); | ||
| 110 | + // _searchSellerLocation(); | ||
| 111 | + // _focusNode.unfocus(); | ||
| 112 | + }, | ||
| 113 | + )), | ||
| 114 | + Text( | ||
| 115 | + '1份', | ||
| 116 | + style: TextStyle( | ||
| 117 | + fontSize: font(14), | ||
| 118 | + color: MyColours.color_515151, | ||
| 119 | + ), | ||
| 120 | + ), | ||
| 121 | + ], | ||
| 122 | + )), | ||
| 123 | + ListView.builder( | ||
| 124 | + itemCount: 20, | ||
| 125 | + shrinkWrap: true, | ||
| 126 | + controller: controller, | ||
| 127 | + itemBuilder: (context, index) { | ||
| 128 | + return ListView.builder( | ||
| 129 | + itemCount: 2 + 1, | ||
| 130 | + shrinkWrap: true, | ||
| 131 | + controller: controller, | ||
| 132 | + itemBuilder: (context, index) { | ||
| 133 | + if (index == 0) { | ||
| 134 | + return Column( | ||
| 135 | + children: [ | ||
| 136 | + //头 | ||
| 137 | + Container( | ||
| 138 | + width: double.infinity, | ||
| 139 | + // width: w(32), | ||
| 140 | + height: w(48), | ||
| 141 | + padding: EdgeInsets.symmetric( | ||
| 142 | + horizontal: w(10)), | ||
| 143 | + decoration: BoxDecoration( | ||
| 144 | + border: Border( | ||
| 145 | + bottom: BorderSide( | ||
| 146 | + width: w(1), | ||
| 147 | + color: MyColours | ||
| 148 | + .color_DBDBDB))), | ||
| 149 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 150 | + child: Row( | ||
| 151 | + mainAxisAlignment: | ||
| 152 | + MainAxisAlignment | ||
| 153 | + .spaceBetween, | ||
| 154 | + children: [ | ||
| 155 | + Text( | ||
| 156 | + '热菜', | ||
| 157 | + style: TextStyle( | ||
| 158 | + fontSize: font(16), | ||
| 159 | + color: MyColours | ||
| 160 | + .color_515151, | ||
| 161 | + fontWeight: | ||
| 162 | + FontWeight.bold), | ||
| 163 | + ), | ||
| 164 | + Text( | ||
| 165 | + '6道', | ||
| 166 | + style: TextStyle( | ||
| 167 | + fontSize: font(14), | ||
| 168 | + color: | ||
| 169 | + MyColours.color_515151, | ||
| 170 | + ), | ||
| 171 | + ), | ||
| 172 | + ], | ||
| 173 | + )) | ||
| 174 | + ], | ||
| 175 | + ); | ||
| 176 | + } | ||
| 177 | + int indexReal = index - 1; | ||
| 178 | + return Container( | ||
| 179 | + padding: EdgeInsets.symmetric( | ||
| 180 | + horizontal: w(20), vertical: w(13)), | ||
| 181 | + decoration: BoxDecoration( | ||
| 182 | + border: Border( | ||
| 183 | + bottom: BorderSide( | ||
| 184 | + width: w(1), | ||
| 185 | + color: | ||
| 186 | + MyColours.color_DBDBDB))), | ||
| 187 | + child: Row( | ||
| 188 | + children: [ | ||
| 189 | + Container( | ||
| 190 | + constraints: | ||
| 191 | + BoxConstraints(maxWidth: w(80)), | ||
| 192 | + child: Text( | ||
| 193 | + '山城辣子鸡', | ||
| 194 | + maxLines: 10, | ||
| 195 | + overflow: TextOverflow.ellipsis, | ||
| 196 | + style: TextStyle( | ||
| 197 | + fontSize: font(14), | ||
| 198 | + color: | ||
| 199 | + MyColours.color_515151), | ||
| 200 | + )), | ||
| 201 | + HEmptyView(8), | ||
| 202 | + _laduWidget(), | ||
| 203 | + Spacer(), | ||
| 204 | + Text( | ||
| 205 | + '38元/份', | ||
| 206 | + maxLines: 2, | ||
| 207 | + overflow: TextOverflow.ellipsis, | ||
| 208 | + style: TextStyle( | ||
| 209 | + fontSize: font(12), | ||
| 210 | + color: MyColours.color_999999), | ||
| 211 | + ), | ||
| 212 | + HEmptyView(28), | ||
| 213 | + Text( | ||
| 214 | + '38元/份', | ||
| 215 | + maxLines: 2, | ||
| 216 | + overflow: TextOverflow.ellipsis, | ||
| 217 | + style: TextStyle( | ||
| 218 | + fontSize: font(10), | ||
| 219 | + color: MyColours.color_8EBBBE), | ||
| 220 | + ), | ||
| 221 | + HEmptyView(20), | ||
| 222 | + Image.asset( | ||
| 223 | + Utils.getImgPath('plan_dish_minus'), | ||
| 224 | + width: w(16), | ||
| 225 | + ), | ||
| 226 | + HEmptyView(8), | ||
| 227 | + Container( | ||
| 228 | + width: w(32), | ||
| 229 | + height: w(16), | ||
| 230 | + decoration: BoxDecoration( | ||
| 231 | + borderRadius: | ||
| 232 | + BorderRadius.circular(r(5)), | ||
| 233 | + border: Border.all( | ||
| 234 | + width: w(1), | ||
| 235 | + color: MyColours | ||
| 236 | + .color_999999)), | ||
| 237 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 238 | + child: TextField( | ||
| 239 | + maxLines: 1, | ||
| 240 | + // controller: | ||
| 241 | + // focusNode: _focusNode, | ||
| 242 | + // autofocus: true, | ||
| 243 | + | ||
| 244 | + style: TextStyle( | ||
| 245 | + color: MyColours.color_438E93, | ||
| 246 | + fontSize: font(12)), | ||
| 247 | + textAlign: TextAlign.center, | ||
| 248 | + // textAlignVertical: TextAlignVertical.center, | ||
| 249 | + decoration: InputDecoration( | ||
| 250 | + hintText: "数量", | ||
| 251 | + hintStyle: TextStyle( | ||
| 252 | + color: MyColours.color_999999, | ||
| 253 | + fontSize: font(12), | ||
| 254 | + ), | ||
| 255 | + // isCollapsed: | ||
| 256 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 257 | + border: OutlineInputBorder( | ||
| 258 | + borderSide: | ||
| 259 | + BorderSide.none), | ||
| 260 | + contentPadding: EdgeInsets.zero, | ||
| 261 | + ), | ||
| 262 | + keyboardType: | ||
| 263 | + TextInputType.number, | ||
| 264 | + textInputAction: | ||
| 265 | + TextInputAction.done, | ||
| 266 | + | ||
| 267 | + onChanged: (value) { | ||
| 268 | + // setState(() {}); | ||
| 269 | + // _searchSellerLocation(); | ||
| 270 | + // customerProvider.searchData(value); | ||
| 271 | + }, | ||
| 272 | + onEditingComplete: () { | ||
| 273 | + FocusScope.of(context) | ||
| 274 | + .requestFocus( | ||
| 275 | + FocusNode()); //点击空白处隐藏键盘 | ||
| 276 | + // contantShowModel.searchData( | ||
| 277 | + // contantShowModel.controller.text); | ||
| 278 | + // _searchSellerLocation(); | ||
| 279 | + // _focusNode.unfocus(); | ||
| 280 | + }, | ||
| 281 | + )), | ||
| 282 | + HEmptyView(8), | ||
| 283 | + Image.asset( | ||
| 284 | + Utils.getImgPath('plan_dish_add'), | ||
| 285 | + width: w(16), | ||
| 286 | + ), | ||
| 287 | + ], | ||
| 288 | + ), | ||
| 289 | + ); | ||
| 290 | + }); | ||
| 291 | + }), | ||
| 292 | + Container( | ||
| 293 | + padding: EdgeInsets.symmetric( | ||
| 294 | + horizontal: w(15), vertical: w(7)), | ||
| 295 | + margin: EdgeInsets.only( | ||
| 296 | + top: w(7), | ||
| 297 | + bottom: w(13), | ||
| 298 | + left: w(20), | ||
| 299 | + right: w(20)), | ||
| 300 | + decoration: BoxDecoration( | ||
| 301 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 302 | + border: Border.all( | ||
| 303 | + width: w(1), color: MyColours.color_515151)), | ||
| 304 | + child: TextField( | ||
| 305 | + maxLines: 4, | ||
| 306 | + // controller: | ||
| 307 | + // focusNode: _focusNode, | ||
| 308 | + // autofocus: true, | ||
| 309 | + | ||
| 310 | + style: TextStyle( | ||
| 311 | + color: MyColours.color_515151, | ||
| 312 | + fontSize: font(12)), | ||
| 313 | + textAlign: TextAlign.left, | ||
| 314 | + // textAlignVertical: TextAlignVertical.center, | ||
| 315 | + decoration: InputDecoration( | ||
| 316 | + hintText: "请输入整单备注", | ||
| 317 | + hintStyle: TextStyle( | ||
| 318 | + color: MyColours.color_999999, | ||
| 319 | + fontSize: font(12), | ||
| 320 | + ), | ||
| 321 | + // isCollapsed: | ||
| 322 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 323 | + border: | ||
| 324 | + OutlineInputBorder(borderSide: BorderSide.none), | ||
| 325 | + contentPadding: EdgeInsets.zero, | ||
| 326 | + ), | ||
| 327 | + keyboardType: TextInputType.number, | ||
| 328 | + textInputAction: TextInputAction.done, | ||
| 329 | + | ||
| 330 | + onChanged: (value) { | ||
| 331 | + // setState(() {}); | ||
| 332 | + // _searchSellerLocation(); | ||
| 333 | + // customerProvider.searchData(value); | ||
| 334 | + }, | ||
| 335 | + onEditingComplete: () { | ||
| 336 | + FocusScope.of(context) | ||
| 337 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 338 | + // contantShowModel.searchData( | ||
| 339 | + // contantShowModel.controller.text); | ||
| 340 | + // _searchSellerLocation(); | ||
| 341 | + // _focusNode.unfocus(); | ||
| 342 | + }, | ||
| 343 | + ), | ||
| 344 | + ), | ||
| 345 | + ], | ||
| 346 | + ))), | ||
| 347 | + Container( | ||
| 348 | + decoration: BoxDecoration( | ||
| 349 | + border: Border( | ||
| 350 | + top: BorderSide( | ||
| 351 | + width: w(1), color: MyColours.color_DBDBDB))), | ||
| 352 | + padding: EdgeInsets.symmetric(horizontal: w(20), vertical: w(15)), | ||
| 353 | + child: Row( | ||
| 354 | + children: [ | ||
| 355 | + Stack( | ||
| 356 | + clipBehavior: Clip.none, | ||
| 357 | + children: [ | ||
| 358 | + Image.asset( | ||
| 359 | + Utils.getImgPath('plan_dish_car'), | ||
| 360 | + width: w(35), | ||
| 361 | + ), | ||
| 362 | + Positioned( | ||
| 363 | + top: w(-3), | ||
| 364 | + right: w(-4), | ||
| 365 | + child: Container( | ||
| 366 | + // width: w(16), | ||
| 367 | + constraints: BoxConstraints(minWidth: w(16)), | ||
| 368 | + height: w(16), | ||
| 369 | + alignment: Alignment.center, | ||
| 370 | + decoration: BoxDecoration( | ||
| 371 | + borderRadius: BorderRadius.circular(r(8)), | ||
| 372 | + color: MyColours.color_E34D59), | ||
| 373 | + child: Text( | ||
| 374 | + '23', | ||
| 375 | + style: TextStyle( | ||
| 376 | + fontSize: font(10), | ||
| 377 | + color: MyColours.color_F6F6F6), | ||
| 378 | + ), | ||
| 379 | + )) | ||
| 380 | + ], | ||
| 381 | + ), | ||
| 382 | + HEmptyView(66), | ||
| 383 | + Expanded( | ||
| 384 | + child: Column( | ||
| 385 | + children: [ | ||
| 386 | + Row( | ||
| 387 | + children: [ | ||
| 388 | + Text( | ||
| 389 | + '总计:', | ||
| 390 | + style: TextStyle( | ||
| 391 | + fontSize: font(12), | ||
| 392 | + color: MyColours.color_515151), | ||
| 393 | + ), | ||
| 394 | + Text( | ||
| 395 | + '0.00', | ||
| 396 | + style: TextStyle( | ||
| 397 | + fontSize: font(12), | ||
| 398 | + color: MyColours.color_000000), | ||
| 399 | + ), | ||
| 400 | + Text( | ||
| 401 | + '元', | ||
| 402 | + style: TextStyle( | ||
| 403 | + fontSize: font(12), | ||
| 404 | + color: MyColours.color_515151), | ||
| 405 | + ), | ||
| 406 | + ], | ||
| 407 | + ), | ||
| 408 | + VEmptyView(20), | ||
| 409 | + Row( | ||
| 410 | + children: [ | ||
| 411 | + Text( | ||
| 412 | + '会员价:', | ||
| 413 | + style: TextStyle( | ||
| 414 | + fontSize: font(12), | ||
| 415 | + color: MyColours.color_515151), | ||
| 416 | + ), | ||
| 417 | + Text( | ||
| 418 | + '0.00', | ||
| 419 | + style: TextStyle( | ||
| 420 | + fontSize: font(12), | ||
| 421 | + color: MyColours.color_000000), | ||
| 422 | + ), | ||
| 423 | + Text( | ||
| 424 | + '元', | ||
| 425 | + style: TextStyle( | ||
| 426 | + fontSize: font(12), | ||
| 427 | + color: MyColours.color_515151), | ||
| 428 | + ), | ||
| 429 | + ], | ||
| 430 | + ) | ||
| 431 | + ], | ||
| 432 | + )), | ||
| 433 | + HEmptyView(10), | ||
| 434 | + Text( | ||
| 435 | + '排菜价:', | ||
| 436 | + style: TextStyle( | ||
| 437 | + fontSize: font(12), color: MyColours.color_515151), | ||
| 438 | + ), | ||
| 439 | + Container( | ||
| 440 | + width: w(65), | ||
| 441 | + height: w(30), | ||
| 442 | + decoration: BoxDecoration( | ||
| 443 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 444 | + border: Border.all( | ||
| 445 | + color: MyColours.color_515151, width: w(1))), | ||
| 446 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 447 | + child: TextField( | ||
| 448 | + maxLines: 1, | ||
| 449 | + // controller: | ||
| 450 | + // focusNode: _focusNode, | ||
| 451 | + // autofocus: true, | ||
| 452 | + | ||
| 453 | + style: TextStyle( | ||
| 454 | + color: MyColours.color_000000, fontSize: font(12)), | ||
| 455 | + textAlign: TextAlign.center, | ||
| 456 | + // textAlignVertical: TextAlignVertical.center, | ||
| 457 | + decoration: InputDecoration( | ||
| 458 | + hintText: "0.00", | ||
| 459 | + hintStyle: TextStyle( | ||
| 460 | + color: MyColours.color_999999, | ||
| 461 | + fontSize: font(12), | ||
| 462 | + ), | ||
| 463 | + // isCollapsed: | ||
| 464 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 465 | + border: OutlineInputBorder(borderSide: BorderSide.none), | ||
| 466 | + contentPadding: EdgeInsets.zero, | ||
| 467 | + ), | ||
| 468 | + keyboardType: TextInputType.number, | ||
| 469 | + textInputAction: TextInputAction.done, | ||
| 470 | + | ||
| 471 | + onChanged: (value) { | ||
| 472 | + // setState(() {}); | ||
| 473 | + // _searchSellerLocation(); | ||
| 474 | + // customerProvider.searchData(value); | ||
| 475 | + }, | ||
| 476 | + onEditingComplete: () { | ||
| 477 | + FocusScope.of(context) | ||
| 478 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 479 | + // contantShowModel.searchData( | ||
| 480 | + // contantShowModel.controller.text); | ||
| 481 | + // _searchSellerLocation(); | ||
| 482 | + // _focusNode.unfocus(); | ||
| 483 | + }, | ||
| 484 | + )), | ||
| 485 | + Text( | ||
| 486 | + '元', | ||
| 487 | + style: TextStyle( | ||
| 488 | + fontSize: font(12), color: MyColours.color_515151), | ||
| 489 | + ), | ||
| 490 | + ], | ||
| 491 | + ), | ||
| 492 | + ), | ||
| 493 | + Container( | ||
| 494 | + color: MyColours.color_FAFAFA, | ||
| 495 | + padding: EdgeInsets.only( | ||
| 496 | + top: w(12), bottom: w(25), left: w(23), right: w(23)), | ||
| 497 | + child: Row( | ||
| 498 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 499 | + children: [ | ||
| 500 | + RoundButton( | ||
| 501 | + text: '生成预览', | ||
| 502 | + gradientStart: MyColours.color_ffffff, | ||
| 503 | + gradientEnd: MyColours.color_ffffff, | ||
| 504 | + borderColor: MyColours.color_438E93, | ||
| 505 | + textColor: MyColours.color_438E93, | ||
| 506 | + width: w(100), | ||
| 507 | + height: w(43), | ||
| 508 | + radius: r(5), | ||
| 509 | + fontSize: 32, | ||
| 510 | + isBold: false, | ||
| 511 | + onPressed: () { | ||
| 512 | + NavigatorUtil.goOrderPreviewPage(context); | ||
| 513 | + }, | ||
| 514 | + ), | ||
| 515 | + HEmptyView(30), | ||
| 516 | + Expanded( | ||
| 517 | + child: RoundButton( | ||
| 518 | + text: '保存', | ||
| 519 | + gradientStart: MyColours.color_438E93, | ||
| 520 | + gradientEnd: MyColours.color_438E93, | ||
| 521 | + height: w(43), | ||
| 522 | + radius: r(5), | ||
| 523 | + fontSize: 36, | ||
| 524 | + isBold: false, | ||
| 525 | + onPressed: () { | ||
| 526 | + Navigator.pop(context); | ||
| 527 | + // NavigatorUtil.goOrderEditListShowPage(context); | ||
| 528 | + }, | ||
| 529 | + ), | ||
| 530 | + ) | ||
| 531 | + ], | ||
| 532 | + )) | ||
| 533 | + ], | ||
| 534 | + ), | ||
| 535 | + ); | ||
| 536 | + } | ||
| 537 | +} |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 3 | + | ||
| 4 | +import '../../../res/colors.dart'; | ||
| 5 | +import '../../../utils/screen_util.dart'; | ||
| 6 | +import '../../../utils/utils.dart'; | ||
| 7 | +import '../../../widgets/MyDivider.dart'; | ||
| 8 | +import '../../../widgets/h_empty_view.dart'; | ||
| 9 | +import '../../../widgets/round_button.dart'; | ||
| 10 | +import '../../../widgets/v_empty_view.dart'; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 生成的预览页 | ||
| 14 | + */ | ||
| 15 | +class OrderPreviewPage extends StatefulWidget { | ||
| 16 | + OrderPreviewPage({Key key}) : super(key: key); | ||
| 17 | + | ||
| 18 | + @override | ||
| 19 | + _OrderPreviewPageState createState() => _OrderPreviewPageState(); | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +class _OrderPreviewPageState extends State<OrderPreviewPage> { | ||
| 23 | + ScrollController controller = ScrollController(); | ||
| 24 | + | ||
| 25 | + @override | ||
| 26 | + void initState() { | ||
| 27 | + super.initState(); | ||
| 28 | + Utils.changeStatusColor(color: Colors.transparent); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + Widget _laduWidget() { | ||
| 32 | + // if (labelIcon[widget | ||
| 33 | + // .cookBookList.labelList[index].icon] is int) { | ||
| 34 | + // int ladu = labelIcon[ | ||
| 35 | + // widget.cookBookList.labelList[index].icon]; | ||
| 36 | + int ladu = 6; | ||
| 37 | + List<Widget> widgetList = []; | ||
| 38 | + for (var i = 0; i < ladu; i++) { | ||
| 39 | + widgetList.add(Image.asset( | ||
| 40 | + Utils.getImgPath('ladu'), | ||
| 41 | + width: w(10), | ||
| 42 | + )); | ||
| 43 | + } | ||
| 44 | + // widgetList.add(HEmptyView(10)); | ||
| 45 | + return Row( | ||
| 46 | + children: widgetList, | ||
| 47 | + ); | ||
| 48 | + // }else{ | ||
| 49 | + // return SizedBox(); | ||
| 50 | + // } | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @override | ||
| 54 | + Widget build(BuildContext context) { | ||
| 55 | + return Scaffold( | ||
| 56 | + backgroundColor: MyColours.color_ffffff, | ||
| 57 | + body: Column( | ||
| 58 | + children: [ | ||
| 59 | + Expanded( | ||
| 60 | + child: SingleChildScrollView( | ||
| 61 | + controller: controller, | ||
| 62 | + child: Column(children: [ | ||
| 63 | + Container( | ||
| 64 | + width: double.infinity, | ||
| 65 | + margin: EdgeInsets.zero, | ||
| 66 | + padding: EdgeInsets.only( | ||
| 67 | + left: w(20), right: w(20), top: w(30), bottom: w(15)), | ||
| 68 | + // height: w(200), | ||
| 69 | + // constraints: new BoxConstraints.expand( | ||
| 70 | + // height: w(200), | ||
| 71 | + // ), | ||
| 72 | + decoration: BoxDecoration( | ||
| 73 | + image: DecorationImage( | ||
| 74 | + image: AssetImage(Utils.getImgPath('preview_bg')), | ||
| 75 | + fit: BoxFit.cover | ||
| 76 | + | ||
| 77 | + // centerSlice: new Rect.fromLTRB(270.0, 180.0, 1360.0, 730.0), | ||
| 78 | + )), | ||
| 79 | + | ||
| 80 | + child: Column( | ||
| 81 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 82 | + children: [ | ||
| 83 | + Text( | ||
| 84 | + '14号酒庄 贵宾排菜菜单', | ||
| 85 | + style: TextStyle( | ||
| 86 | + fontSize: font(20), | ||
| 87 | + fontWeight: FontWeight.bold, | ||
| 88 | + color: MyColours.color_CFB53B), | ||
| 89 | + ), | ||
| 90 | + VEmptyView(26), | ||
| 91 | + Text( | ||
| 92 | + '预定贵宾 | 刘生先生', | ||
| 93 | + style: TextStyle( | ||
| 94 | + fontSize: font(14), | ||
| 95 | + color: MyColours.color_303030), | ||
| 96 | + ), | ||
| 97 | + VEmptyView(10), | ||
| 98 | + Text( | ||
| 99 | + '预定时间 | 2022年11月11日 晚餐', | ||
| 100 | + style: TextStyle( | ||
| 101 | + fontSize: font(14), | ||
| 102 | + color: MyColours.color_303030), | ||
| 103 | + ), | ||
| 104 | + VEmptyView(10), | ||
| 105 | + Text( | ||
| 106 | + '区域桌台 | 一楼包间 108、一楼包间 108、一楼包间 108、一楼包间 108、一楼包间 108', | ||
| 107 | + style: TextStyle( | ||
| 108 | + fontSize: font(14), | ||
| 109 | + color: MyColours.color_303030), | ||
| 110 | + ), | ||
| 111 | + VEmptyView(10), | ||
| 112 | + Text( | ||
| 113 | + '餐厅地址 | 唐山市路北区拥军道88号', | ||
| 114 | + style: TextStyle( | ||
| 115 | + fontSize: font(14), | ||
| 116 | + color: MyColours.color_303030), | ||
| 117 | + ), | ||
| 118 | + VEmptyView(10), | ||
| 119 | + Text( | ||
| 120 | + '专属服务 | 张山山 18866668888', | ||
| 121 | + style: TextStyle( | ||
| 122 | + fontSize: font(14), | ||
| 123 | + color: MyColours.color_303030), | ||
| 124 | + ), | ||
| 125 | + ], | ||
| 126 | + ), | ||
| 127 | + ), | ||
| 128 | + Container( | ||
| 129 | + width: double.infinity, | ||
| 130 | + // width: w(32), | ||
| 131 | + height: w(48), | ||
| 132 | + padding: EdgeInsets.only(left: w(10), right: w(20)), | ||
| 133 | + decoration: BoxDecoration( | ||
| 134 | + border: Border( | ||
| 135 | + // top: BorderSide( | ||
| 136 | + // width: w(1), color: MyColours.color_DBDBDB), | ||
| 137 | + bottom: BorderSide( | ||
| 138 | + width: w(1), | ||
| 139 | + color: MyColours.color_DBDBDB))), | ||
| 140 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 141 | + child: Row( | ||
| 142 | + children: [ | ||
| 143 | + Expanded( | ||
| 144 | + child: TextField( | ||
| 145 | + maxLines: 1, | ||
| 146 | + // controller: | ||
| 147 | + // focusNode: _focusNode, | ||
| 148 | + // autofocus: true, | ||
| 149 | + | ||
| 150 | + style: TextStyle( | ||
| 151 | + color: MyColours.color_515151, | ||
| 152 | + fontSize: font(16), | ||
| 153 | + fontWeight: FontWeight.bold), | ||
| 154 | + textAlign: TextAlign.left, | ||
| 155 | + // textAlignVertical: TextAlignVertical.center, | ||
| 156 | + decoration: InputDecoration( | ||
| 157 | + // hintText: "请输入排菜名称", | ||
| 158 | + hintText: '朋友小聚888套餐(若无名称不展示本行)', | ||
| 159 | + hintStyle: TextStyle( | ||
| 160 | + color: MyColours.color_999999, | ||
| 161 | + fontSize: font(16), | ||
| 162 | + fontWeight: FontWeight.bold), | ||
| 163 | + // isCollapsed: | ||
| 164 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 165 | + border: OutlineInputBorder( | ||
| 166 | + borderSide: BorderSide.none), | ||
| 167 | + contentPadding: EdgeInsets.zero, | ||
| 168 | + ), | ||
| 169 | + keyboardType: TextInputType.text, | ||
| 170 | + textInputAction: TextInputAction.done, | ||
| 171 | + | ||
| 172 | + onChanged: (value) { | ||
| 173 | + // setState(() {}); | ||
| 174 | + // _searchSellerLocation(); | ||
| 175 | + // customerProvider.searchData(value); | ||
| 176 | + }, | ||
| 177 | + onEditingComplete: () { | ||
| 178 | + FocusScope.of(context) | ||
| 179 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 180 | + // contantShowModel.searchData( | ||
| 181 | + // contantShowModel.controller.text); | ||
| 182 | + // _searchSellerLocation(); | ||
| 183 | + // _focusNode.unfocus(); | ||
| 184 | + }, | ||
| 185 | + )), | ||
| 186 | + Text( | ||
| 187 | + '1份', | ||
| 188 | + style: TextStyle( | ||
| 189 | + fontSize: font(14), | ||
| 190 | + color: MyColours.color_515151), | ||
| 191 | + ), | ||
| 192 | + ], | ||
| 193 | + )), | ||
| 194 | + ListView.builder( | ||
| 195 | + itemCount: 20, | ||
| 196 | + shrinkWrap: true, | ||
| 197 | + controller: controller, | ||
| 198 | + itemBuilder: (context, index) { | ||
| 199 | + return ListView.builder( | ||
| 200 | + itemCount: 2 + 1, | ||
| 201 | + shrinkWrap: true, | ||
| 202 | + controller: controller, | ||
| 203 | + itemBuilder: (context, index) { | ||
| 204 | + if (index == 0) { | ||
| 205 | + return Column( | ||
| 206 | + children: [ | ||
| 207 | + //头 | ||
| 208 | + Container( | ||
| 209 | + width: double.infinity, | ||
| 210 | + // width: w(32), | ||
| 211 | + height: w(48), | ||
| 212 | + padding: EdgeInsets.only( | ||
| 213 | + left: w(10), right: w(20)), | ||
| 214 | + decoration: BoxDecoration( | ||
| 215 | + border: Border( | ||
| 216 | + bottom: BorderSide( | ||
| 217 | + width: w(1), | ||
| 218 | + color: MyColours | ||
| 219 | + .color_DBDBDB))), | ||
| 220 | + // constraints: BoxConstraints(minWidth: w(20)), | ||
| 221 | + child: Row( | ||
| 222 | + mainAxisAlignment: | ||
| 223 | + MainAxisAlignment.spaceBetween, | ||
| 224 | + children: [ | ||
| 225 | + Text( | ||
| 226 | + '热菜', | ||
| 227 | + style: TextStyle( | ||
| 228 | + fontSize: font(16), | ||
| 229 | + color: | ||
| 230 | + MyColours.color_515151, | ||
| 231 | + fontWeight: | ||
| 232 | + FontWeight.bold), | ||
| 233 | + ), | ||
| 234 | + Text( | ||
| 235 | + '6道', | ||
| 236 | + style: TextStyle( | ||
| 237 | + fontSize: font(14), | ||
| 238 | + color: MyColours.color_515151, | ||
| 239 | + ), | ||
| 240 | + ), | ||
| 241 | + ], | ||
| 242 | + )) | ||
| 243 | + ], | ||
| 244 | + ); | ||
| 245 | + } | ||
| 246 | + int indexReal = index - 1; | ||
| 247 | + return Container( | ||
| 248 | + padding: EdgeInsets.symmetric( | ||
| 249 | + horizontal: w(20), vertical: w(13)), | ||
| 250 | + decoration: BoxDecoration( | ||
| 251 | + border: Border( | ||
| 252 | + bottom: BorderSide( | ||
| 253 | + width: w(1), | ||
| 254 | + color: MyColours.color_DBDBDB))), | ||
| 255 | + child: Row( | ||
| 256 | + children: [ | ||
| 257 | + Container( | ||
| 258 | + constraints: | ||
| 259 | + BoxConstraints(maxWidth: w(80)), | ||
| 260 | + child: Text( | ||
| 261 | + '山城辣子鸡', | ||
| 262 | + maxLines: 10, | ||
| 263 | + overflow: TextOverflow.ellipsis, | ||
| 264 | + style: TextStyle( | ||
| 265 | + fontSize: font(14), | ||
| 266 | + color: MyColours.color_515151), | ||
| 267 | + )), | ||
| 268 | + HEmptyView(8), | ||
| 269 | + _laduWidget(), | ||
| 270 | + Spacer(), | ||
| 271 | + Text( | ||
| 272 | + '38元/份', | ||
| 273 | + maxLines: 2, | ||
| 274 | + overflow: TextOverflow.ellipsis, | ||
| 275 | + style: TextStyle( | ||
| 276 | + fontSize: font(12), | ||
| 277 | + color: MyColours.color_515151), | ||
| 278 | + ), | ||
| 279 | + HEmptyView(108), | ||
| 280 | + // Text( | ||
| 281 | + // '38元/份', | ||
| 282 | + // maxLines: 2, | ||
| 283 | + // overflow: TextOverflow.ellipsis, | ||
| 284 | + // style: TextStyle( | ||
| 285 | + // fontSize: font(10), | ||
| 286 | + // color: MyColours.color_8EBBBE), | ||
| 287 | + // ), | ||
| 288 | + Text( | ||
| 289 | + '1份', | ||
| 290 | + style: TextStyle( | ||
| 291 | + fontSize: font(12), | ||
| 292 | + color: MyColours.color_515151), | ||
| 293 | + ), | ||
| 294 | + ], | ||
| 295 | + ), | ||
| 296 | + ); | ||
| 297 | + }); | ||
| 298 | + }), | ||
| 299 | + Container( | ||
| 300 | + padding: EdgeInsets.symmetric( | ||
| 301 | + horizontal: w(15), vertical: w(7)), | ||
| 302 | + margin: EdgeInsets.only( | ||
| 303 | + top: w(7), bottom: w(13), left: w(20), right: w(20)), | ||
| 304 | + decoration: BoxDecoration( | ||
| 305 | + borderRadius: BorderRadius.circular(r(5)), | ||
| 306 | + border: Border.all( | ||
| 307 | + width: w(1), color: MyColours.color_DBDBDB)), | ||
| 308 | + child: TextField( | ||
| 309 | + maxLines: 4, | ||
| 310 | + // controller: | ||
| 311 | + // focusNode: _focusNode, | ||
| 312 | + // autofocus: true, | ||
| 313 | + | ||
| 314 | + style: TextStyle( | ||
| 315 | + color: MyColours.color_515151, fontSize: font(12)), | ||
| 316 | + textAlign: TextAlign.left, | ||
| 317 | + // textAlignVertical: TextAlignVertical.center, | ||
| 318 | + decoration: InputDecoration( | ||
| 319 | + hintText: "请输入整单备注", | ||
| 320 | + hintStyle: TextStyle( | ||
| 321 | + color: MyColours.color_999999, | ||
| 322 | + fontSize: font(12), | ||
| 323 | + ), | ||
| 324 | + // isCollapsed: | ||
| 325 | + // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度 | ||
| 326 | + border: | ||
| 327 | + OutlineInputBorder(borderSide: BorderSide.none), | ||
| 328 | + contentPadding: EdgeInsets.zero, | ||
| 329 | + ), | ||
| 330 | + keyboardType: TextInputType.number, | ||
| 331 | + textInputAction: TextInputAction.done, | ||
| 332 | + | ||
| 333 | + onChanged: (value) { | ||
| 334 | + // setState(() {}); | ||
| 335 | + // _searchSellerLocation(); | ||
| 336 | + // customerProvider.searchData(value); | ||
| 337 | + }, | ||
| 338 | + onEditingComplete: () { | ||
| 339 | + FocusScope.of(context) | ||
| 340 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 341 | + // contantShowModel.searchData( | ||
| 342 | + // contantShowModel.controller.text); | ||
| 343 | + // _searchSellerLocation(); | ||
| 344 | + // _focusNode.unfocus(); | ||
| 345 | + }, | ||
| 346 | + ), | ||
| 347 | + ), | ||
| 348 | + ]))), | ||
| 349 | + Container( | ||
| 350 | + decoration: BoxDecoration( | ||
| 351 | + border: Border( | ||
| 352 | + top: BorderSide( | ||
| 353 | + width: w(1), color: MyColours.color_DBDBDB))), | ||
| 354 | + padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(15)), | ||
| 355 | + child: Row( | ||
| 356 | + mainAxisAlignment: MainAxisAlignment.spaceAround, | ||
| 357 | + children: [ | ||
| 358 | + Text( | ||
| 359 | + '总计', | ||
| 360 | + style: TextStyle( | ||
| 361 | + fontSize: font(12), color: MyColours.color_515151), | ||
| 362 | + ), | ||
| 363 | + Text( | ||
| 364 | + '菜单价:1164元', | ||
| 365 | + style: TextStyle( | ||
| 366 | + fontSize: font(12), color: MyColours.color_515151), | ||
| 367 | + ), | ||
| 368 | + Text( | ||
| 369 | + '会员价:1125元', | ||
| 370 | + style: TextStyle( | ||
| 371 | + fontSize: font(12), color: MyColours.color_515151), | ||
| 372 | + ), | ||
| 373 | + Text( | ||
| 374 | + '排菜价:1100元', | ||
| 375 | + style: TextStyle( | ||
| 376 | + fontSize: font(12), color: MyColours.color_515151), | ||
| 377 | + ) | ||
| 378 | + ])), | ||
| 379 | + Text( | ||
| 380 | + '周到安排技术支持 400-000-9690', | ||
| 381 | + style: TextStyle(fontSize: font(12), color: MyColours.color_999999), | ||
| 382 | + ), | ||
| 383 | + Container( | ||
| 384 | + color: MyColours.color_ffffff, | ||
| 385 | + padding: EdgeInsets.only( | ||
| 386 | + top: w(12), bottom: w(25), left: w(23), right: w(23)), | ||
| 387 | + child: Row( | ||
| 388 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 389 | + children: [ | ||
| 390 | + RoundButton( | ||
| 391 | + text: '返回', | ||
| 392 | + gradientStart: MyColours.color_ffffff, | ||
| 393 | + gradientEnd: MyColours.color_ffffff, | ||
| 394 | + borderColor: MyColours.color_438E93, | ||
| 395 | + textColor: MyColours.color_438E93, | ||
| 396 | + width: w(100), | ||
| 397 | + height: w(43), | ||
| 398 | + radius: r(5), | ||
| 399 | + fontSize: 32, | ||
| 400 | + isBold: false, | ||
| 401 | + onPressed: () { | ||
| 402 | + Navigator.pop(context); | ||
| 403 | + // NavigatorUtil.goOrderPreviewPage(context); | ||
| 404 | + }, | ||
| 405 | + ), | ||
| 406 | + HEmptyView(30), | ||
| 407 | + Expanded( | ||
| 408 | + child: RoundButton( | ||
| 409 | + text: '分享排菜单', | ||
| 410 | + gradientStart: MyColours.color_438E93, | ||
| 411 | + gradientEnd: MyColours.color_438E93, | ||
| 412 | + height: w(43), | ||
| 413 | + radius: r(5), | ||
| 414 | + fontSize: 36, | ||
| 415 | + isBold: false, | ||
| 416 | + onPressed: () { | ||
| 417 | + // NavigatorUtil.goOrderPreviewPage(context); | ||
| 418 | + }, | ||
| 419 | + ), | ||
| 420 | + ) | ||
| 421 | + ], | ||
| 422 | + )) | ||
| 423 | + ], | ||
| 424 | + ), | ||
| 425 | + ); | ||
| 426 | + } | ||
| 427 | +} |
| @@ -14,6 +14,7 @@ import '../net/http_url.dart'; | @@ -14,6 +14,7 @@ import '../net/http_url.dart'; | ||
| 14 | */ | 14 | */ |
| 15 | class PlanDishProvider extends ChangeNotifier { | 15 | class PlanDishProvider extends ChangeNotifier { |
| 16 | PageState pageState = PageState.Loading; | 16 | PageState pageState = PageState.Loading; |
| 17 | + PageState pageStateMy = PageState.Success; | ||
| 17 | List<MenuModel> menuModel; //菜品数据 | 18 | List<MenuModel> menuModel; //菜品数据 |
| 18 | // List<CookbookCategorySunModel> categorySunModel; //菜品分类数据 | 19 | // List<CookbookCategorySunModel> categorySunModel; //菜品分类数据 |
| 19 | // List<CookbookSpecSunModel> specSunModel; //计价单位 | 20 | // List<CookbookSpecSunModel> specSunModel; //计价单位 |
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | 2 | ||
| 3 | class MyColours { | 3 | class MyColours { |
| 4 | + | ||
| 5 | + static const Color color_303030 = Color(0xff303030); | ||
| 6 | + static const Color color_CFB53B = Color(0xffCFB53B); | ||
| 4 | static const Color color_99515151 = Color(0x99515151); | 7 | static const Color color_99515151 = Color(0x99515151); |
| 5 | static const Color color_F7C797 = Color(0xffF7C797); | 8 | static const Color color_F7C797 = Color(0xffF7C797); |
| 6 | static const Color color_FEF3E6 = Color(0xffFEF3E6); | 9 | static const Color color_FEF3E6 = Color(0xffFEF3E6); |
| @@ -1243,4 +1243,42 @@ class NavigatorUtil { | @@ -1243,4 +1243,42 @@ class NavigatorUtil { | ||
| 1243 | return _navigateTo(context, "${Routes.order_advance_edit_page}", | 1243 | return _navigateTo(context, "${Routes.order_advance_edit_page}", |
| 1244 | replace: replace); | 1244 | replace: replace); |
| 1245 | } | 1245 | } |
| 1246 | + | ||
| 1247 | + ///经理排菜-预览 | ||
| 1248 | + | ||
| 1249 | + static Future<dynamic> goOrderPreviewPage( | ||
| 1250 | + BuildContext context, { | ||
| 1251 | + replace = false, | ||
| 1252 | + }) { | ||
| 1253 | + // if (invoice != null) { | ||
| 1254 | + // return _navigateTo(context, | ||
| 1255 | + // "${Routes.order_advance_home_page}?invoice=${FluroConvertUtils.object2string(invoice)}", | ||
| 1256 | + // replace: replace); | ||
| 1257 | + // } | ||
| 1258 | + // if (object != null) { | ||
| 1259 | + // return _navigateTo(context, | ||
| 1260 | + // "${Routes.order_advance_home_page}?tids=$tids&tableidNow=$tableidNow&fromPage=$fromPage&canChoose=$canChoose&object=${FluroConvertUtils.object2string(object)}"); | ||
| 1261 | + // } | ||
| 1262 | + return _navigateTo(context, "${Routes.order_preview_page}", | ||
| 1263 | + replace: replace); | ||
| 1264 | + } | ||
| 1265 | + | ||
| 1266 | + ///经理排菜-编辑列表展示 | ||
| 1267 | + | ||
| 1268 | + static Future<dynamic> goOrderEditListShowPage( | ||
| 1269 | + BuildContext context, { | ||
| 1270 | + replace = false, | ||
| 1271 | + }) { | ||
| 1272 | + // if (invoice != null) { | ||
| 1273 | + // return _navigateTo(context, | ||
| 1274 | + // "${Routes.order_advance_home_page}?invoice=${FluroConvertUtils.object2string(invoice)}", | ||
| 1275 | + // replace: replace); | ||
| 1276 | + // } | ||
| 1277 | + // if (object != null) { | ||
| 1278 | + // return _navigateTo(context, | ||
| 1279 | + // "${Routes.order_advance_home_page}?tids=$tids&tableidNow=$tableidNow&fromPage=$fromPage&canChoose=$canChoose&object=${FluroConvertUtils.object2string(object)}"); | ||
| 1280 | + // } | ||
| 1281 | + return _navigateTo(context, "${Routes.order_edit_list_show_page}", | ||
| 1282 | + replace: replace); | ||
| 1283 | + } | ||
| 1246 | } | 1284 | } |
| @@ -181,6 +181,8 @@ import '../pages/my/plan_dish/plan_new_dish_first_page.dart'; | @@ -181,6 +181,8 @@ import '../pages/my/plan_dish/plan_new_dish_first_page.dart'; | ||
| 181 | import '../pages/my/plan_dish/plan_new_dish_page.dart'; | 181 | import '../pages/my/plan_dish/plan_new_dish_page.dart'; |
| 182 | import '../pages/my/table_manage/merge_table_select_page.dart'; | 182 | import '../pages/my/table_manage/merge_table_select_page.dart'; |
| 183 | import '../pages/order_advance/order_advance_home_page.dart'; | 183 | import '../pages/order_advance/order_advance_home_page.dart'; |
| 184 | +import '../pages/order_advance/order_edit_list_show_page.dart'; | ||
| 185 | +import '../pages/order_advance/order_preview_page.dart'; | ||
| 184 | import '../provider/feast_model.dart'; | 186 | import '../provider/feast_model.dart'; |
| 185 | import '../provider/plan_dish_provider.dart'; | 187 | import '../provider/plan_dish_provider.dart'; |
| 186 | 188 | ||
| @@ -1955,3 +1957,45 @@ var orderAdvanceEidtPageHandle = new Handler( | @@ -1955,3 +1957,45 @@ var orderAdvanceEidtPageHandle = new Handler( | ||
| 1955 | return ChangeNotifierProvider<PlanDishProvider>( | 1957 | return ChangeNotifierProvider<PlanDishProvider>( |
| 1956 | create: (_) => PlanDishProvider(), child: OrderAdvanceEidtPage()); | 1958 | create: (_) => PlanDishProvider(), child: OrderAdvanceEidtPage()); |
| 1957 | }); | 1959 | }); |
| 1960 | + | ||
| 1961 | +///经理排菜---预览页 | ||
| 1962 | +var orderPreviewPageHandle = new Handler( | ||
| 1963 | + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | ||
| 1964 | + // String fromPage = params["fromPage"].first; | ||
| 1965 | + // String tids = params["tids"].first; | ||
| 1966 | + | ||
| 1967 | + // String tableidNow = params["tableidNow"].first; | ||
| 1968 | + // bool canChoose = params["canChoose"].first == "true" ? true : false; | ||
| 1969 | + // List<TableList> res = []; | ||
| 1970 | + // if (params.keys.contains('object')) { | ||
| 1971 | + // Map object = FluroConvertUtils.string2map(params["object"].first); | ||
| 1972 | + // List temp = object['object']; | ||
| 1973 | + | ||
| 1974 | + // for (var item in temp) { | ||
| 1975 | + // res.add(TableList.fromJson(item)); | ||
| 1976 | + // } | ||
| 1977 | + // } | ||
| 1978 | + return ChangeNotifierProvider<PlanDishProvider>( | ||
| 1979 | + create: (_) => PlanDishProvider(), child: OrderPreviewPage()); | ||
| 1980 | +}); | ||
| 1981 | + | ||
| 1982 | +///经理排菜---排菜编辑列表展示 | ||
| 1983 | +var orderEditListShowPageHandle = new Handler( | ||
| 1984 | + handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) { | ||
| 1985 | + // String fromPage = params["fromPage"].first; | ||
| 1986 | + // String tids = params["tids"].first; | ||
| 1987 | + | ||
| 1988 | + // String tableidNow = params["tableidNow"].first; | ||
| 1989 | + // bool canChoose = params["canChoose"].first == "true" ? true : false; | ||
| 1990 | + // List<TableList> res = []; | ||
| 1991 | + // if (params.keys.contains('object')) { | ||
| 1992 | + // Map object = FluroConvertUtils.string2map(params["object"].first); | ||
| 1993 | + // List temp = object['object']; | ||
| 1994 | + | ||
| 1995 | + // for (var item in temp) { | ||
| 1996 | + // res.add(TableList.fromJson(item)); | ||
| 1997 | + // } | ||
| 1998 | + // } | ||
| 1999 | + return ChangeNotifierProvider<PlanDishProvider>( | ||
| 2000 | + create: (_) => PlanDishProvider(), child: OrderEditListShowPage()); | ||
| 2001 | +}); |
| @@ -174,8 +174,10 @@ class Routes { | @@ -174,8 +174,10 @@ class Routes { | ||
| 174 | * 经理排菜 | 174 | * 经理排菜 |
| 175 | */ | 175 | */ |
| 176 | static String order_advance_home_page = "/order_advance_home_page"; //经理预点菜首页 | 176 | static String order_advance_home_page = "/order_advance_home_page"; //经理预点菜首页 |
| 177 | - static String order_advance_edit_page = "/order_advance_edit_page"; //经理预点菜编辑 | ||
| 178 | - | 177 | + static String order_advance_edit_page = "/order_advance_edit_page"; //经理预点菜编辑 |
| 178 | + static String order_preview_page = "/order_preview_page"; //预览页 | ||
| 179 | + static String order_edit_list_show_page = | ||
| 180 | + "/order_edit_list_show_page"; //经理排菜编辑列表展示 | ||
| 179 | 181 | ||
| 180 | static void configureRoutes(FluroRouter router) { | 182 | static void configureRoutes(FluroRouter router) { |
| 181 | router.notFoundHandler = new Handler( | 183 | router.notFoundHandler = new Handler( |
| @@ -341,10 +343,11 @@ class Routes { | @@ -341,10 +343,11 @@ class Routes { | ||
| 341 | handler: planNewDishFirstPageHandle); | 343 | handler: planNewDishFirstPageHandle); |
| 342 | router.define(plan_new_dish_page, handler: planNewDishPageHandle); | 344 | router.define(plan_new_dish_page, handler: planNewDishPageHandle); |
| 343 | router.define(final_plan_dish_page, handler: finalPlanDishPageHandle); | 345 | router.define(final_plan_dish_page, handler: finalPlanDishPageHandle); |
| 344 | - router.define(order_advance_home_page, handler: orderAdvanceHomePageHandle); | 346 | + router.define(order_advance_home_page, handler: orderAdvanceHomePageHandle); |
| 345 | 347 | ||
| 346 | - router.define(order_advance_edit_page, handler: orderAdvanceEidtPageHandle); | ||
| 347 | - | ||
| 348 | - | 348 | + router.define(order_advance_edit_page, handler: orderAdvanceEidtPageHandle); |
| 349 | + router.define(order_preview_page, handler: orderPreviewPageHandle); | ||
| 350 | + router.define(order_edit_list_show_page, | ||
| 351 | + handler: orderEditListShowPageHandle); | ||
| 349 | } | 352 | } |
| 350 | } | 353 | } |
-
Please register or login to post a comment