对接:改派

hmxc
张萌 4 years ago
parent 7a2bc773f9
commit c356c70576

@ -76,4 +76,6 @@ 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,7 +35,8 @@ 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 =
await NetUtil().get(API.manage.repairDispatch, params: {
'dispatchListId': model.dispatchListId, 'dispatchListId': model.dispatchListId,
'workOrderType': model.workOrderTyoe, 'workOrderType': model.workOrderTyoe,
'workOrderTypeDetail': model.workOrderTypeDetail, 'workOrderTypeDetail': model.workOrderTypeDetail,
@ -46,4 +47,10 @@ class ManageFunc {
}); });
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