对接:改派

hmxc
张萌 4 years ago
parent 7a2bc773f9
commit c356c70576

@ -76,4 +76,6 @@ class _Manage {
///
String get repairDispatch => '/user/repair/dispatch';
///
String get repairReassignment => '/user/repair/reassignment';
}

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

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

@ -35,15 +35,22 @@ class ManageFunc {
}
static Future repairDispatch(DispatchReportModel model) async {
BaseModel baseModel = await NetUtil().get(API.manage.repairDispatch, params:{
'dispatchListId':model.dispatchListId,
'workOrderType':model.workOrderTyoe,
'workOrderTypeDetail':model.workOrderTypeDetail,
'workOrderTimeLimit':model.workOrderTimeLimit,
'type':model.type,
'operator':model.operato,
'remake':model.remark,
BaseModel baseModel =
await NetUtil().get(API.manage.repairDispatch, params: {
'dispatchListId': model.dispatchListId,
'workOrderType': model.workOrderTyoe,
'workOrderTypeDetail': model.workOrderTypeDetail,
'workOrderTimeLimit': model.workOrderTimeLimit,
'type': model.type,
'operator': model.operato,
'remake': model.remark,
});
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