|
@@ -72,6 +72,9 @@ class _OrderTakingPageState extends State < OrderTakingPage > with AutomaticKeep
|
|
|
|
|
|
|
|
|
|
|
|
|
Future getLine() async {
|
|
Future getLine() async {
|
|
|
|
|
+ setState(() {
|
|
|
|
|
+ lineList.clear();
|
|
|
|
|
+ });
|
|
|
await getAllLine().then((resp) {
|
|
await getAllLine().then((resp) {
|
|
|
if (isNotError(context, resp)) {
|
|
if (isNotError(context, resp)) {
|
|
|
setState(() {
|
|
setState(() {
|
|
@@ -91,7 +94,6 @@ class _OrderTakingPageState extends State < OrderTakingPage > with AutomaticKeep
|
|
|
lineIdStr += lineList[i].id.toString();
|
|
lineIdStr += lineList[i].id.toString();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- print(checkStatusList);
|
|
|
|
|
} else {
|
|
} else {
|
|
|
for (int i = 0; i < lineList.length; i++) {
|
|
for (int i = 0; i < lineList.length; i++) {
|
|
|
checkStatusList.add(true);
|
|
checkStatusList.add(true);
|
|
@@ -186,7 +188,16 @@ class _OrderTakingPageState extends State < OrderTakingPage > with AutomaticKeep
|
|
|
color: Color.fromRGBO(0, 0, 0, 0.7),
|
|
color: Color.fromRGBO(0, 0, 0, 0.7),
|
|
|
borderRadius: BorderRadius.all(Radius.circular(4.0))
|
|
borderRadius: BorderRadius.all(Radius.circular(4.0))
|
|
|
),
|
|
),
|
|
|
- child: ListView.builder(
|
|
|
|
|
|
|
+ child:lineList.length==0?Center(
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ width: ScreenUtil.getInstance().setWidth(50),
|
|
|
|
|
+ height: ScreenUtil.getInstance().setHeight(50),
|
|
|
|
|
+ child: CircularProgressIndicator(
|
|
|
|
|
+
|
|
|
|
|
+ )
|
|
|
|
|
+ ),
|
|
|
|
|
+ ):
|
|
|
|
|
+ ListView.builder(
|
|
|
itemCount: lineList.length,
|
|
itemCount: lineList.length,
|
|
|
itemBuilder: (BuildContext context, int index) { //itemBuilder实际上就是一个map的循环
|
|
itemBuilder: (BuildContext context, int index) { //itemBuilder实际上就是一个map的循环
|
|
|
if (index < lineList.length) {
|
|
if (index < lineList.length) {
|