38 lines
1.2 KiB
Dart
38 lines
1.2 KiB
Dart
import 'dart:convert';
|
|
|
|
import 'package:dio/dio.dart';
|
|
|
|
import 'baseDio.dart';
|
|
|
|
class StockIn {
|
|
|
|
|
|
/// 码盘完成
|
|
static Future<dynamic> stockInComplete(dynamic bindingVehicleData, {int timeOut = 5000}) async {
|
|
final response = await BaseDio.instance().post<String>(
|
|
"/api/mobile/stockIn/bindingVehicleIn",
|
|
data: jsonEncode(bindingVehicleData),
|
|
options: Options(
|
|
responseType: ResponseType.json,
|
|
sendTimeout: Duration(milliseconds: timeOut),
|
|
receiveTimeout: Duration(milliseconds: timeOut),
|
|
)
|
|
);
|
|
return { "code" : response.statusCode, "data": response.data };
|
|
}
|
|
|
|
/// 扫描之后从数据库获取EBS数据
|
|
static Future<dynamic> getGoodsCanUse(String orderId, String goodsId, {int timeOut = 5000}) async {
|
|
final response = await BaseDio.instance().post<String>(
|
|
"/api/mobile/stockIn/getCanUseGoods",
|
|
data: jsonEncode({"orderId": orderId, "goodsId": goodsId}),
|
|
options: Options(
|
|
responseType: ResponseType.json,
|
|
sendTimeout: Duration(milliseconds: timeOut),
|
|
receiveTimeout: Duration(milliseconds: timeOut),
|
|
)
|
|
);
|
|
return { "code" : response.statusCode, "data": response.data };
|
|
}
|
|
|
|
} |