fix: inevnetory

This commit is contained in:
louis 2024-04-01 10:13:24 +08:00
parent 6cc8ec49c1
commit ad64c15d06
6 changed files with 11 additions and 7 deletions

View File

@ -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<InventoryInoutController>();
@ -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,

View File

@ -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),
);
},

View File

@ -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,

View File

@ -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';

View File

@ -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 {