diff --git a/lib/screens/inventory_inout/components/inventory_inout_page_View.dart b/lib/screens/inventory_inout/components/inventory_inout_page_View.dart index 08123df..09faa2f 100644 --- a/lib/screens/inventory_inout/components/inventory_inout_page_View.dart +++ b/lib/screens/inventory_inout/components/inventory_inout_page_View.dart @@ -1,8 +1,9 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:sk_base_mobile/screens/inventory_inout/components/task_list.dart'; import 'package:sk_base_mobile/screens/inventory_inout/inventory_inout_controller.dart'; +import 'inventory_inout_view_item.dart'; + class InventoryInoutView extends StatelessWidget { InventoryInoutView({super.key}); final controller = Get.find(); @@ -11,6 +12,9 @@ class InventoryInoutView extends StatelessWidget { return PageView( physics: const BouncingScrollPhysics(), reverse: true, + onPageChanged: (index) { + controller.setIndex(index); + }, controller: controller.pageController, children: List.generate( controller.daysNum, diff --git a/lib/screens/inventory_inout/components/task_list.dart b/lib/screens/inventory_inout/components/inventory_inout_view_item.dart similarity index 100% rename from lib/screens/inventory_inout/components/task_list.dart rename to lib/screens/inventory_inout/components/inventory_inout_view_item.dart diff --git a/lib/screens/inventory_inout/components/upper_body.dart b/lib/screens/inventory_inout/components/upper_body.dart index 31d1ace..82d487a 100644 --- a/lib/screens/inventory_inout/components/upper_body.dart +++ b/lib/screens/inventory_inout/components/upper_body.dart @@ -32,7 +32,7 @@ class UperBody extends StatelessWidget { itemBuilder: (context, index) { return InkWell( borderRadius: BorderRadius.circular(ScreenAdaper.sp(20)), - onTap: () => controller.setIndex(index), + onTap: () => controller.pageController.jumpToPage(index), child: DateContainer(index: index), ); }, diff --git a/lib/screens/new_inventory_inout/components/inventory_search.dart b/lib/screens/new_inventory_inout/components/inventory_search.dart index fe4662c..5660192 100644 --- a/lib/screens/new_inventory_inout/components/inventory_search.dart +++ b/lib/screens/new_inventory_inout/components/inventory_search.dart @@ -62,6 +62,9 @@ class InventorySearch extends StatelessWidget { hintText: '名称,编号,规格', floatingLabelBehavior: FloatingLabelBehavior.always, prefixIcon: const Icon(Icons.search), + prefixIconConstraints: BoxConstraints( + minWidth: ScreenAdaper.width(80), + ), // 当searchBarController有值时不显示 suffixIcon: controller.searchKey.value.isEmpty ? null @@ -152,8 +155,8 @@ class InventorySearch extends StatelessWidget { Widget buildHasInventoryPicker() { return Container( - width: ScreenAdaper.width(200), - constraints: BoxConstraints(minWidth: ScreenAdaper.width(200)), + width: ScreenAdaper.width(220), + constraints: BoxConstraints(minWidth: ScreenAdaper.width(220)), child: Obx( () => DropdownButtonFormField( value: controller.hasInventoryStatus.value, diff --git a/lib/screens/sale_quotation/components/data_table.dart b/lib/screens/sale_quotation/components/data_table.dart index 288367e..afcca4d 100644 --- a/lib/screens/sale_quotation/components/data_table.dart +++ b/lib/screens/sale_quotation/components/data_table.dart @@ -1,6 +1,5 @@ import 'package:data_table_2/data_table_2.dart'; import 'package:sk_base_mobile/app_theme.dart'; -import 'package:sk_base_mobile/util/screen_adaper_util.dart'; import 'package:sk_base_mobile/widgets/core/sk_text_input.dart'; import './helper.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/sale_quotation/sale_quotation.dart b/lib/screens/sale_quotation/sale_quotation.dart index 12387a3..2a9fecf 100644 --- a/lib/screens/sale_quotation/sale_quotation.dart +++ b/lib/screens/sale_quotation/sale_quotation.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_sticky_header/flutter_sticky_header.dart'; import 'package:sk_base_mobile/screens/sale_quotation/components/data_table.dart'; -import 'package:sk_base_mobile/util/screen_adaper_util.dart'; import 'package:sk_base_mobile/widgets/sk_appbar.dart'; class SaleQuotationPage extends StatelessWidget {