38 lines
1.1 KiB
Dart
38 lines
1.1 KiB
Dart
import 'dart:convert';
|
|
|
|
import 'package:dio/dio.dart';
|
|
|
|
import 'baseDio.dart';
|
|
|
|
class PickApi{
|
|
|
|
/// 获取拣货任务
|
|
static Future<dynamic> getPickTask(String boxNo, {int timeOut = 5000}) async {
|
|
final response = await BaseDio.instance().get<String>(
|
|
'/api/mobile/pick/getPickTask',
|
|
queryParameters: {"vehicleNo" : boxNo},
|
|
options: Options(
|
|
responseType: ResponseType.json,
|
|
sendTimeout: Duration(milliseconds: timeOut),
|
|
receiveTimeout: Duration(milliseconds: timeOut),
|
|
)
|
|
);
|
|
return { "code" : response.statusCode, "data": response.data };
|
|
}
|
|
|
|
|
|
static Future<dynamic> pickComplete(List<dynamic> data , {int timeOut = 5000}) async {
|
|
final response = await BaseDio.instance().post<String>(
|
|
"/api/mobile/pick/pickComplete",
|
|
data: jsonEncode(data),
|
|
options: Options(
|
|
responseType: ResponseType.json,
|
|
sendTimeout: Duration(milliseconds: timeOut),
|
|
receiveTimeout: Duration(milliseconds: timeOut),
|
|
)
|
|
);
|
|
return { "code" : response.statusCode, "data": response.data };
|
|
}
|
|
|
|
|
|
} |