对接:改派

hmxc
张萌 4 years ago
parent 7a2bc773f9
commit c356c70576

@ -75,5 +75,7 @@ class _Manage {
/// ///
String get repairDispatch => '/user/repair/dispatch'; String get repairDispatch => '/user/repair/dispatch';
///
String get repairReassignment => '/user/repair/reassignment';
} }

@ -143,10 +143,10 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
color: AppStyle.primaryColor, color: AppStyle.primaryColor,
nullColor: AppStyle.minorColor, nullColor: AppStyle.minorColor,
onPressed: () { onPressed: () {
// Get.to(FixerDepartmentPage( Get.to(FixerDepartmentPage(
// model: widget.model, model:_reportModel ,
// changeType: true, changeType: true,
// )); ));
}, },
child: Text( child: Text(
'改派', '改派',

@ -63,6 +63,13 @@ class _FixerDepartmentPageState extends State<FixerDepartmentPage> {
height: 96.w, height: 96.w,
onPressed: () async { onPressed: () async {
if (widget.changeType) { if (widget.changeType) {
BaseModel baseModel = await ManageFunc.repairReassignment(
_reportModel.dispatchListId, _reportModel.operato);
if (baseModel.status) {
Get.back();
} else {
BotToast.showText(text: baseModel.message);
}
} else { } else {
BaseModel baseModel = await ManageFunc.repairDispatch(_reportModel); BaseModel baseModel = await ManageFunc.repairDispatch(_reportModel);
if (baseModel.status) { if (baseModel.status) {

@ -35,15 +35,22 @@ class ManageFunc {
} }
static Future repairDispatch(DispatchReportModel model) async { static Future repairDispatch(DispatchReportModel model) async {
BaseModel baseModel = await NetUtil().get(API.manage.repairDispatch, params:{ BaseModel baseModel =
'dispatchListId':model.dispatchListId, await NetUtil().get(API.manage.repairDispatch, params: {
'workOrderType':model.workOrderTyoe, 'dispatchListId': model.dispatchListId,
'workOrderTypeDetail':model.workOrderTypeDetail, 'workOrderType': model.workOrderTyoe,
'workOrderTimeLimit':model.workOrderTimeLimit, 'workOrderTypeDetail': model.workOrderTypeDetail,
'type':model.type, 'workOrderTimeLimit': model.workOrderTimeLimit,
'operator':model.operato, 'type': model.type,
'remake':model.remark, 'operator': model.operato,
'remake': model.remark,
}); });
return baseModel; return baseModel;
}
static Future repairReassignment(int id, int operato) async {
BaseModel baseModel = await NetUtil().get(API.manage.repairReassignment,
params: {'dispatchListId': id, 'operator': operato});
return baseModel;
} }
} }

Loading…
Cancel
Save