|
|
|
|
@ -13,7 +13,8 @@ import 'package:mohem_flutter_app/models/get_item_creation_ntf_body_list_model.d
|
|
|
|
|
import 'package:mohem_flutter_app/models/get_mo_notification_body_list_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/get_po_notification_body_list_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/get_pr_information_list.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/get_pr_notification_body_list_model.dart' as get_pr_notification_body_list_model;
|
|
|
|
|
import 'package:mohem_flutter_app/models/get_pr_notification_body_list_model.dart'
|
|
|
|
|
as get_pr_notification_body_list_model;
|
|
|
|
|
import 'package:mohem_flutter_app/ui/work_list/item_history_screen.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
|
|
|
|
|
@ -51,250 +52,465 @@ class RequestFragment extends StatelessWidget {
|
|
|
|
|
Widget poLinesDataView(BuildContext context) {
|
|
|
|
|
return ExpandableNotifier(
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder: (cxt, index) => ExpandablePanel(
|
|
|
|
|
header: poLinesList[index].iTEMDESCRIPTION!.toText14(),
|
|
|
|
|
collapsed: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.code.tr(), poLinesList[index].iTEMCODE ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.mfg.tr(), poLinesList[index].mFG ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.lineType.tr(), poLinesList[index].lINETYPE?.toString() ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.unit.tr(), poLinesList[index].uOM ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.price.tr(), poLinesList[index].uNITPRICE?.toString() ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.lineAmount.tr(), poLinesList[index].lINEAMOUNT?.toString() ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.quantity.tr(), poLinesList[index].qUANTITY?.toString() ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.lineDiscount.tr(), poLinesList[index].lINEDISCPERCENTAGE?.toString() ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.needByDate.tr(), poLinesList[index].nEEDBYDATE ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.promisedDate.tr(), poLinesList[index].pROMISEDDATE ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.deliverToLocation.tr(), poLinesList[index].dELIVERTOLOCATION ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.requisitionNumber.tr(), poLinesList[index].pRNUM ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.requester.tr(), poLinesList[index].rEQUESTOR ?? ""),
|
|
|
|
|
Container(),
|
|
|
|
|
),
|
|
|
|
|
12.height,
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.itemHistory.tr(),
|
|
|
|
|
() {
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder:
|
|
|
|
|
(cxt, index) =>
|
|
|
|
|
ExpandablePanel(
|
|
|
|
|
header: poLinesList[index].iTEMDESCRIPTION!.toText14(),
|
|
|
|
|
collapsed: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.code.tr(),
|
|
|
|
|
poLinesList[index].iTEMCODE ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.mfg.tr(),
|
|
|
|
|
poLinesList[index].mFG ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.lineType.tr(),
|
|
|
|
|
poLinesList[index].lINETYPE?.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.unit.tr(),
|
|
|
|
|
poLinesList[index].uOM ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.price.tr(),
|
|
|
|
|
poLinesList[index].uNITPRICE?.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.lineAmount.tr(),
|
|
|
|
|
poLinesList[index].lINEAMOUNT?.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.quantity.tr(),
|
|
|
|
|
poLinesList[index].qUANTITY?.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.lineDiscount.tr(),
|
|
|
|
|
poLinesList[index].lINEDISCPERCENTAGE?.toString() ??
|
|
|
|
|
"",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.needByDate.tr(),
|
|
|
|
|
poLinesList[index].nEEDBYDATE ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.promisedDate.tr(),
|
|
|
|
|
poLinesList[index].pROMISEDDATE ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.deliverToLocation.tr(),
|
|
|
|
|
poLinesList[index].dELIVERTOLOCATION ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.requisitionNumber.tr(),
|
|
|
|
|
poLinesList[index].pRNUM ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.requester.tr(),
|
|
|
|
|
poLinesList[index].rEQUESTOR ?? "",
|
|
|
|
|
),
|
|
|
|
|
Container(),
|
|
|
|
|
),
|
|
|
|
|
12.height,
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
DefaultButton(LocaleKeys.itemHistory.tr(), () {
|
|
|
|
|
Navigator.pushNamed(
|
|
|
|
|
cxt,
|
|
|
|
|
AppRoutes.itemHistory,
|
|
|
|
|
arguments: ItemHistoryScreenParams(title: LocaleKeys.itemHistory.tr(), isMO: false, pItemId: poLinesList[index].iTEMID),
|
|
|
|
|
arguments: ItemHistoryScreenParams(
|
|
|
|
|
title: LocaleKeys.itemHistory.tr(),
|
|
|
|
|
isMO: false,
|
|
|
|
|
pItemId: poLinesList[index].iTEMID,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
).expanded,
|
|
|
|
|
12.width,
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.quotationAnalysis.tr(),
|
|
|
|
|
() {
|
|
|
|
|
}, fontSize: 13).expanded,
|
|
|
|
|
12.width,
|
|
|
|
|
DefaultButton(LocaleKeys.quotationAnalysis.tr(), () {
|
|
|
|
|
Navigator.pushNamed(
|
|
|
|
|
cxt,
|
|
|
|
|
AppRoutes.itemHistory,
|
|
|
|
|
arguments: ItemHistoryScreenParams(
|
|
|
|
|
isItemHistory: false, isMO: false, title: LocaleKeys.quotationAnalysis.tr(), pItemId: poLinesList[index].iTEMID, pPoHeaderId: poLinesList[index].pOHEADERID),
|
|
|
|
|
isItemHistory: false,
|
|
|
|
|
isMO: false,
|
|
|
|
|
title: LocaleKeys.quotationAnalysis.tr(),
|
|
|
|
|
pItemId: poLinesList[index].iTEMID,
|
|
|
|
|
pPoHeaderId: poLinesList[index].pOHEADERID,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}, fontSize: 13).expanded,
|
|
|
|
|
12.width,
|
|
|
|
|
DefaultButton("PR Details", () {
|
|
|
|
|
getPRDetails(
|
|
|
|
|
context,
|
|
|
|
|
poLinesList[index].pOLINEID.toString(),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
).expanded,
|
|
|
|
|
12.width,
|
|
|
|
|
DefaultButton(
|
|
|
|
|
"PR Details",
|
|
|
|
|
() {
|
|
|
|
|
getPRDetails(context, poLinesList[index].pOLINEID.toString());
|
|
|
|
|
},
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
).expanded,
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
expanded: const SizedBox(),
|
|
|
|
|
).objectContainerView(),
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
itemCount: poLinesList.length),
|
|
|
|
|
}, fontSize: 13).expanded,
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
expanded: const SizedBox(),
|
|
|
|
|
).objectContainerView(),
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
itemCount: poLinesList.length,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget prLinesDataView() {
|
|
|
|
|
return ExpandableNotifier(
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder: (cxt, index) => ExpandablePanel(
|
|
|
|
|
header: prLinesList[index].dESCRIPTION.toString().toText14(color: MyColors.textMixColor),
|
|
|
|
|
collapsed: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol("Cost Center", prLinesList[index].cOSTCENTER ?? ""),
|
|
|
|
|
ItemDetailViewCol("Code", prLinesList[index].iTEMCODE ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol("Unit", prLinesList[index].uOM ?? ""),
|
|
|
|
|
ItemDetailViewCol("Price (SAR)", prLinesList[index].uNITPRICE.toString() ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol("Amount (SAR)", prLinesList[index].lINEAMOUNT.toString() ?? ""),
|
|
|
|
|
ItemDetailViewCol("Quantity", prLinesList[index].qUANTITY.toString() ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol("AMU (Last 3 months)", prLinesList[index].iTEMAMU.toString() ?? ""),
|
|
|
|
|
Container(),
|
|
|
|
|
isItLast: true,
|
|
|
|
|
),
|
|
|
|
|
// ItemDetailGrid(
|
|
|
|
|
// ItemDetailViewCol(getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTENAME!, getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTEVALUE ?? ""),
|
|
|
|
|
// Container(),
|
|
|
|
|
// isItLast: true,
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
expanded: const SizedBox(),
|
|
|
|
|
).objectContainerView(),
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
itemCount: prLinesList.length),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder:
|
|
|
|
|
(cxt, index) =>
|
|
|
|
|
ExpandablePanel(
|
|
|
|
|
header: prLinesList[index].dESCRIPTION.toString().toText14(
|
|
|
|
|
color: MyColors.textMixColor,
|
|
|
|
|
),
|
|
|
|
|
collapsed: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.costCenter.tr(),
|
|
|
|
|
prLinesList[index].cOSTCENTER ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.code.tr(),
|
|
|
|
|
prLinesList[index].iTEMCODE ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.unit.tr(),
|
|
|
|
|
prLinesList[index].uOM ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.priceSAR.tr(),
|
|
|
|
|
prLinesList[index].uNITPRICE.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.amountSAR.tr(),
|
|
|
|
|
prLinesList[index].lINEAMOUNT.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.quantity.tr(),
|
|
|
|
|
prLinesList[index].qUANTITY.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.destination_type.tr(),
|
|
|
|
|
prLinesList[index].dESTINATIONTYPE ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.destination_organization_name.tr(),
|
|
|
|
|
prLinesList[index].dESTINATIONORGANIZATIONNAME ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.amuLastThreeMonths.tr(),
|
|
|
|
|
prLinesList[index].iTEMAMU.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
Container(),
|
|
|
|
|
isItLast: true,
|
|
|
|
|
),
|
|
|
|
|
// ItemDetailGrid(
|
|
|
|
|
// ItemDetailViewCol(getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTENAME!, getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTEVALUE ?? ""),
|
|
|
|
|
// Container(),
|
|
|
|
|
// isItLast: true,
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
expanded: const SizedBox(),
|
|
|
|
|
).objectContainerView(),
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
itemCount: prLinesList.length,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget moNotificationDataView() {
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder: (cxt, index) => Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.code.tr(), moNotificationBodyList[index].iTEMCODE ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.unit.tr(), moNotificationBodyList[index].uOM ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.quantity.tr(), moNotificationBodyList[index].qUANTITY?.toString() ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.dateRequired.tr(), moNotificationBodyList[index].dATEREQUIRED ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.lineStatus.tr(), moNotificationBodyList[index].lINESTATUS ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.statusDate.tr(), moNotificationBodyList[index].sTATUSDATE ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.transactionType.tr(), moNotificationBodyList[index].tRANSACTIONTYPENAME ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.operatingUnit.tr(), moNotificationBodyList[index].oPERATINGUNIT ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.organizationCode.tr(), moNotificationBodyList[index].oRGANIZATIONCODE ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.organization.tr(), moNotificationBodyList[index].oRGANIZATIONNAME ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.fromSubInventory.tr(), moNotificationBodyList[index].fROMSUBINVENTORY ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.fromLocator.tr(), moNotificationBodyList[index].fROMLOCATOR ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.toSubInventory.tr(), moNotificationBodyList[index].tOSUBINVENTORY ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.toLocator.tr(), moNotificationBodyList[index].tOLOCATOR ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(ItemDetailViewCol(LocaleKeys.shipToLocator.tr(), moNotificationBodyList[index].sHIPTOLOCATION ?? ""), Container()),
|
|
|
|
|
12.height,
|
|
|
|
|
DefaultButton(LocaleKeys.itemHistory.tr(), () {
|
|
|
|
|
Navigator.pushNamed(
|
|
|
|
|
cxt,
|
|
|
|
|
AppRoutes.itemHistory,
|
|
|
|
|
arguments: ItemHistoryScreenParams(title: LocaleKeys.itemHistory.tr(), pItemId: moNotificationBodyList[index].iTEMID, pOrgId: moNotificationBodyList[index].oRGID),
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
).objectContainerView(title: moNotificationBodyList[index].dESCRIPTION ?? ""),
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
itemCount: moNotificationBodyList.length);
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder:
|
|
|
|
|
(cxt, index) => Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.code.tr(),
|
|
|
|
|
moNotificationBodyList[index].iTEMCODE ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.unit.tr(),
|
|
|
|
|
moNotificationBodyList[index].uOM ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.quantity.tr(),
|
|
|
|
|
moNotificationBodyList[index].qUANTITY?.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.dateRequired.tr(),
|
|
|
|
|
moNotificationBodyList[index].dATEREQUIRED ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.lineStatus.tr(),
|
|
|
|
|
moNotificationBodyList[index].lINESTATUS ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.statusDate.tr(),
|
|
|
|
|
moNotificationBodyList[index].sTATUSDATE ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.transactionType.tr(),
|
|
|
|
|
moNotificationBodyList[index].tRANSACTIONTYPENAME ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.operatingUnit.tr(),
|
|
|
|
|
moNotificationBodyList[index].oPERATINGUNIT ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.organizationCode.tr(),
|
|
|
|
|
moNotificationBodyList[index].oRGANIZATIONCODE ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.organization.tr(),
|
|
|
|
|
moNotificationBodyList[index].oRGANIZATIONNAME ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.fromSubInventory.tr(),
|
|
|
|
|
moNotificationBodyList[index].fROMSUBINVENTORY ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.fromLocator.tr(),
|
|
|
|
|
moNotificationBodyList[index].fROMLOCATOR ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.toSubInventory.tr(),
|
|
|
|
|
moNotificationBodyList[index].tOSUBINVENTORY ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.toLocator.tr(),
|
|
|
|
|
moNotificationBodyList[index].tOLOCATOR ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.shipToLocator.tr(),
|
|
|
|
|
moNotificationBodyList[index].sHIPTOLOCATION ?? "",
|
|
|
|
|
),
|
|
|
|
|
Container(),
|
|
|
|
|
),
|
|
|
|
|
12.height,
|
|
|
|
|
DefaultButton(LocaleKeys.itemHistory.tr(), () {
|
|
|
|
|
Navigator.pushNamed(
|
|
|
|
|
cxt,
|
|
|
|
|
AppRoutes.itemHistory,
|
|
|
|
|
arguments: ItemHistoryScreenParams(
|
|
|
|
|
title: LocaleKeys.itemHistory.tr(),
|
|
|
|
|
pItemId: moNotificationBodyList[index].iTEMID,
|
|
|
|
|
pOrgId: moNotificationBodyList[index].oRGID,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
).objectContainerView(
|
|
|
|
|
title: moNotificationBodyList[index].dESCRIPTION ?? "",
|
|
|
|
|
),
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
itemCount: moNotificationBodyList.length,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget itemCreationLinesView() {
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder: (cxt, index) => Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.productName.tr(), itemCreationLines[index].pRODUCTNAME ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.productDescription.tr(), itemCreationLines[index].pRODUCTDESCRIPTION ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.unitPrice.tr(), itemCreationLines[index].uNITPRICE?.toString() ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.manufacturerName.tr(), itemCreationLines[index].uSERMANUFACTURERNAME ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.manufacturerPartName.tr(), itemCreationLines[index].uSERMFGPARTNUM ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.supplierName.tr(), itemCreationLines[index].sUPPLIERNAME ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.supplierContact.tr(), itemCreationLines[index].sUPPLIERCONTACT ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.chargeToPatient.tr(), itemCreationLines[index].cHARGETOPATIENT ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.justification.tr(), itemCreationLines[index].jUSTIFICATION ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.itemCode.tr(), itemCreationLines[index].iTEMCODE ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.itemDescription.tr(), itemCreationLines[index].iTEMDESCRIPTION ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.groupCode.tr(), itemCreationLines[index].iTEMGROUPCODE ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.groupDescription.tr(), itemCreationLines[index].iTEMGROUP ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.subgroupCode.tr(), itemCreationLines[index].iTEMSUBGROUPCODE ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.subgroupDescription.tr(), itemCreationLines[index].iTEMSUBGROUP ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.primaryUOM.tr(), itemCreationLines[index].pRIMARYUOM ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.manufacturerName.tr(), itemCreationLines[index].sTANDARDMANUFACTURERNAME ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.manufacturerPartName.tr(), itemCreationLines[index].sTANDARDMFGPARTNUM ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.templateName.tr(), itemCreationLines[index].tEMPLATENAME ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.itemCreationStatus.tr(), itemCreationLines[index].iTEMCREATIONSTATUS ?? ""),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.standardizationApprovalStatus.tr(), itemCreationLines[index].sTANDARDSTATUS ?? ""),
|
|
|
|
|
ItemDetailViewCol(LocaleKeys.standardizationApprovalRejectionReason.tr(), itemCreationLines[index].sTANDARDREJECTREASON ?? ""),
|
|
|
|
|
isItLast: true,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).objectContainerView(title: itemCreationLines[index].iTEMDESCRIPTION!),
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
itemCount: itemCreationLines.length);
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
itemBuilder:
|
|
|
|
|
(cxt, index) => Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.productName.tr(),
|
|
|
|
|
itemCreationLines[index].pRODUCTNAME ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.productDescription.tr(),
|
|
|
|
|
itemCreationLines[index].pRODUCTDESCRIPTION ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.unitPrice.tr(),
|
|
|
|
|
itemCreationLines[index].uNITPRICE?.toString() ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.manufacturerName.tr(),
|
|
|
|
|
itemCreationLines[index].uSERMANUFACTURERNAME ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.manufacturerPartName.tr(),
|
|
|
|
|
itemCreationLines[index].uSERMFGPARTNUM ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.supplierName.tr(),
|
|
|
|
|
itemCreationLines[index].sUPPLIERNAME ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.supplierContact.tr(),
|
|
|
|
|
itemCreationLines[index].sUPPLIERCONTACT ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.chargeToPatient.tr(),
|
|
|
|
|
itemCreationLines[index].cHARGETOPATIENT ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.justification.tr(),
|
|
|
|
|
itemCreationLines[index].jUSTIFICATION ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.itemCode.tr(),
|
|
|
|
|
itemCreationLines[index].iTEMCODE ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.itemDescription.tr(),
|
|
|
|
|
itemCreationLines[index].iTEMDESCRIPTION ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.groupCode.tr(),
|
|
|
|
|
itemCreationLines[index].iTEMGROUPCODE ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.groupDescription.tr(),
|
|
|
|
|
itemCreationLines[index].iTEMGROUP ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.subgroupCode.tr(),
|
|
|
|
|
itemCreationLines[index].iTEMSUBGROUPCODE ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.subgroupDescription.tr(),
|
|
|
|
|
itemCreationLines[index].iTEMSUBGROUP ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.primaryUOM.tr(),
|
|
|
|
|
itemCreationLines[index].pRIMARYUOM ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.manufacturerName.tr(),
|
|
|
|
|
itemCreationLines[index].sTANDARDMANUFACTURERNAME ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.manufacturerPartName.tr(),
|
|
|
|
|
itemCreationLines[index].sTANDARDMFGPARTNUM ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.templateName.tr(),
|
|
|
|
|
itemCreationLines[index].tEMPLATENAME ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.itemCreationStatus.tr(),
|
|
|
|
|
itemCreationLines[index].iTEMCREATIONSTATUS ?? "",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ItemDetailGrid(
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.standardizationApprovalStatus.tr(),
|
|
|
|
|
itemCreationLines[index].sTANDARDSTATUS ?? "",
|
|
|
|
|
),
|
|
|
|
|
ItemDetailViewCol(
|
|
|
|
|
LocaleKeys.standardizationApprovalRejectionReason.tr(),
|
|
|
|
|
itemCreationLines[index].sTANDARDREJECTREASON ?? "",
|
|
|
|
|
),
|
|
|
|
|
isItLast: true,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).objectContainerView(
|
|
|
|
|
title: itemCreationLines[index].iTEMDESCRIPTION!,
|
|
|
|
|
),
|
|
|
|
|
separatorBuilder: (cxt, index) => 12.height,
|
|
|
|
|
itemCount: itemCreationLines.length,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void getPRDetails(BuildContext context, String poLineID) async {
|
|
|
|
|
try {
|
|
|
|
|
Utils.showLoading(context);
|
|
|
|
|
GetPRInformationList? getPRInformationList = GetPRInformationList();
|
|
|
|
|
getPRInformationList = await WorkListApiClient().getPRDetailsForPO(poLineID);
|
|
|
|
|
getPRInformationList = await WorkListApiClient().getPRDetailsForPO(
|
|
|
|
|
poLineID,
|
|
|
|
|
);
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
|
|
|
|
|
Navigator.pushNamed(
|
|
|
|
|
context,
|
|
|
|
|
AppRoutes.itemHistory,
|
|
|
|
|
arguments: ItemHistoryScreenParams(
|
|
|
|
|
isItemHistory: false, isMO: false, isPRInfo: true, getPRInformationList: getPRInformationList, title: "PR Details", pItemId: 0, pPoHeaderId: 0, pOLineID: poLineID),
|
|
|
|
|
isItemHistory: false,
|
|
|
|
|
isMO: false,
|
|
|
|
|
isPRInfo: true,
|
|
|
|
|
getPRInformationList: getPRInformationList,
|
|
|
|
|
title: "PR Details",
|
|
|
|
|
pItemId: 0,
|
|
|
|
|
pPoHeaderId: 0,
|
|
|
|
|
pOLineID: poLineID,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
} catch (ex) {
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
|