View frieght Bill UI Data mapping
parent
f89daa94b1
commit
01f4d3aeb9
|
@ -272,12 +272,11 @@ class ViewFreightBill extends StatelessWidget {
|
|||
width: 100,
|
||||
text: AppStrings.submit,
|
||||
clickAction: () {
|
||||
// controller.validateFieldsFreight();
|
||||
// if (controller.showPlantErrorFreight.value || controller.showProductErrorFreight.value || controller.showTransactionErrorFreight.value
|
||||
// ) {
|
||||
// } else {
|
||||
// controller.postData();
|
||||
// }
|
||||
if (controller.showPlantErrorFreight.value || controller.showProductErrorFreight.value || controller.showTransactionErrorFreight.value
|
||||
) {
|
||||
} else {
|
||||
controller.postData();
|
||||
}
|
||||
controller.postData();
|
||||
|
||||
},
|
||||
|
@ -293,48 +292,49 @@ class ViewFreightBill extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
||||
margin: EdgeInsets.only(top: 16),
|
||||
height: 45,
|
||||
color: AppColors.primaryClr,
|
||||
child: Row(
|
||||
children: [
|
||||
TextView(text: AppStrings.viewGrnDetails, style: 14.txtBoldWhite),
|
||||
Spacer(),
|
||||
CommonBtn(
|
||||
width: 150,
|
||||
bkClr: AppColors.white,
|
||||
borderClr: AppColors.primaryClr,
|
||||
style: 12.txtBoldBlue,
|
||||
text: "Generate Freight Bill",
|
||||
|
||||
clickAction: () {
|
||||
bool hasSelectedRows = controller.grnDetails
|
||||
.any((element) => element.isSelected);
|
||||
if (!hasSelectedRows) {
|
||||
showPopup(
|
||||
context: context,
|
||||
onClick: () {
|
||||
Get.back();
|
||||
});
|
||||
} else {
|
||||
CommonAlertDialog.showDialog(
|
||||
message: "Are you sure want to\nsave this?",
|
||||
positiveText: "Save",
|
||||
negativeText: "Cancel",
|
||||
positiveBtCallback: () {
|
||||
Get.back();
|
||||
controller.addFreightBill();
|
||||
|
||||
showFreightBill(context);
|
||||
},
|
||||
negativeBtCallback: () {});
|
||||
}
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Container(
|
||||
// padding: EdgeInsets.symmetric(horizontal: 10),
|
||||
// margin: EdgeInsets.only(top: 16),
|
||||
// height: 45,
|
||||
// color: AppColors.primaryClr,
|
||||
// child: Row(
|
||||
// children: [
|
||||
// TextView(text: AppStrings.viewGrnDetails, style: 14.txtBoldWhite),
|
||||
// Spacer(),
|
||||
// CommonBtn(
|
||||
// width: 150,
|
||||
// bkClr: AppColors.white,
|
||||
// borderClr: AppColors.primaryClr,
|
||||
// style: 12.txtBoldBlue,
|
||||
// text: "Generate Freight Bill",
|
||||
//
|
||||
// clickAction: () {
|
||||
// bool hasSelectedRows = controller.grnDetails
|
||||
// .any((element) => element.isSelected);
|
||||
// if (!hasSelectedRows) {
|
||||
// showPopup(
|
||||
// context: context,
|
||||
// onClick: () {
|
||||
// Get.back();
|
||||
// });
|
||||
// } else {
|
||||
// CommonAlertDialog.showDialog(
|
||||
// message: "Are you sure want to\nsave this?",
|
||||
// positiveText: "Save",
|
||||
// negativeText: "Cancel",
|
||||
// positiveBtCallback: () {
|
||||
// Get.back();
|
||||
// controller.addFreightBill();
|
||||
//
|
||||
// showFreightBill(context);
|
||||
// },
|
||||
// negativeBtCallback: () {});
|
||||
// }
|
||||
// }),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
SizedBox(height: 20,),
|
||||
Obx(() {
|
||||
if (controller.freightViewLoader.value) {
|
||||
return Center(
|
||||
|
@ -435,7 +435,7 @@ class ViewFreightBill extends StatelessWidget {
|
|||
editableCell(index, "${freightBill.status}"),
|
||||
editableCell(
|
||||
index,
|
||||
"${freightBill.freightbillId}",
|
||||
freightBill.freightbillCode ?? "-",
|
||||
isLink: true,
|
||||
onTap: () {
|
||||
showFreightBillDetailsDialog(
|
||||
|
@ -443,65 +443,65 @@ class ViewFreightBill extends StatelessWidget {
|
|||
},
|
||||
),
|
||||
editableCell(
|
||||
index, "${freightBill.utr1Date}"),
|
||||
index, "${freightBill.createdOn ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill.trasnporterInvoiceNo}"),
|
||||
"${freightBill.trasnporterInvoiceNo ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill
|
||||
.trasnporterInvoiceNoDate}"),
|
||||
.trasnporterInvoiceNoDate ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.billingQty}"),
|
||||
editableCell(index, "${freightBill.uom}"),
|
||||
index, "${freightBill.billingQty ?? "-"}"),
|
||||
editableCell(index, "${freightBill.uom ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.freightAmount}"),
|
||||
editableCell(index, "${freightBill.cgst}"),
|
||||
editableCell(index, "${freightBill.sgst}"),
|
||||
editableCell(index, "${freightBill.igst}"),
|
||||
index, "${freightBill.freightAmount ?? "-"}"),
|
||||
editableCell(index, "${freightBill.cgst ?? "-"}"),
|
||||
editableCell(index, "${freightBill.sgst ?? "-"}"),
|
||||
editableCell(index, "${freightBill.igst ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.totalGst}"),
|
||||
index, "${freightBill.totalGst ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.totalGst}"),
|
||||
index, "${freightBill.totalGst ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.freightAmount}"),
|
||||
index, "${freightBill.freightAmount ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill
|
||||
.trasnporterInvoiceNoDate}"),
|
||||
editableCell(index, "${freightBill.status}"),
|
||||
.trasnporterInvoiceNoDate ?? "-"}"),
|
||||
editableCell(index, "${freightBill.status ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.totalGst}"),
|
||||
index, "${freightBill.totalGst ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill
|
||||
.trasnporterInvoiceNoDate}"),
|
||||
editableCell(index, "${freightBill.utr5No}"),
|
||||
.trasnporterInvoiceNoDate ?? "-"}"),
|
||||
editableCell(index, "${freightBill.utr5No ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.utr1Date}"),
|
||||
index, "${freightBill.utr1Date ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.freightAmount}"),
|
||||
editableCell(index, "${freightBill.utr1No}"),
|
||||
index, "${freightBill.freightAmount ?? "-"}"),
|
||||
editableCell(index, "${freightBill.utr1No ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.utr1Date}"),
|
||||
index, "${freightBill.utr1Date ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill.utr1PaymentAmount}"),
|
||||
editableCell(index, "${freightBill.utr2No}"),
|
||||
"${freightBill.utr1PaymentAmount ?? "-"}"),
|
||||
editableCell(index, "${freightBill.utr2No ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.utr2Date}"),
|
||||
index, "${freightBill.utr2Date ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill.utr2PaymentAmount}"),
|
||||
editableCell(index, "${freightBill.utr3No}"),
|
||||
"${freightBill.utr2PaymentAmount ?? "-"}"),
|
||||
editableCell(index, "${freightBill.utr3No ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.utr3Date}"),
|
||||
index, "${freightBill.utr3Date ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill.utr3PaymentAmount}"),
|
||||
editableCell(index, "${freightBill.utr4No}"),
|
||||
"${freightBill.utr3PaymentAmount ?? "-"}"),
|
||||
editableCell(index, "${freightBill.utr4No ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.utr4Date}"),
|
||||
index, "${freightBill.utr4Date ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill.utr4PaymentAmount}"),
|
||||
editableCell(index, "${freightBill.utr5No}"),
|
||||
"${freightBill.utr4PaymentAmount ?? "-"}"),
|
||||
editableCell(index, "${freightBill.utr5No ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.utr5Date}"),
|
||||
index, "${freightBill.utr5Date ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill.utr5PaymentAmount}"),
|
||||
"${freightBill.utr5PaymentAmount ?? "-"}"),
|
||||
],
|
||||
);
|
||||
}),
|
||||
|
@ -545,8 +545,8 @@ class ViewFreightBill extends StatelessWidget {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("${AppStrings.freightBill} ${freightBill.freightbillId}"),
|
||||
Text("${AppStrings.freightDate} ${freightBill.statusDate}"),
|
||||
Text("${AppStrings.freightBill } ${freightBill.freightbillId ?? "-"}"),
|
||||
Text("${AppStrings.freightDate } ${freightBill.statusDate ?? "-"}"),
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
|
@ -613,7 +613,7 @@ class ViewFreightBill extends StatelessWidget {
|
|||
cells: [
|
||||
editableCell(index, "0${index + 1}"),
|
||||
editableCell(index, "${freightBill.plantCode}"),
|
||||
editableCell(index, "${freightBill.status}"),
|
||||
editableCell(index, "${freightBill.materialCode}"),
|
||||
editableCell(
|
||||
index,
|
||||
"${freightBill.freightbillId}",
|
||||
|
@ -623,21 +623,21 @@ class ViewFreightBill extends StatelessWidget {
|
|||
context, freightBill);
|
||||
},
|
||||
),
|
||||
editableCell(index, "${freightBill.utr1Date}"),
|
||||
editableCell(index, "${freightBill.utr1Date ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill.trasnporterInvoiceNo}"),
|
||||
"${freightBill.trasnporterInvoiceNo ?? "-"}"),
|
||||
editableCell(index,
|
||||
"${freightBill.trasnporterInvoiceNoDate}"),
|
||||
"${freightBill.trasnporterInvoiceNoDate ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.billingQty}"),
|
||||
editableCell(index, "${freightBill.uom}"),
|
||||
index, "${freightBill.billingQty ?? "-"}"),
|
||||
editableCell(index, "${freightBill.uom ?? "-"}"),
|
||||
editableCell(
|
||||
index, "${freightBill.freightAmount}"),
|
||||
editableCell(index, "${freightBill.cgst}"),
|
||||
editableCell(index, "${freightBill.sgst}"),
|
||||
editableCell(index, "${freightBill.igst}"),
|
||||
editableCell(index, "${freightBill.totalGst}"),
|
||||
editableCell(index, "${freightBill.totalGst}"),
|
||||
index, "${freightBill.freightAmount ?? "-"}"),
|
||||
editableCell(index, "${freightBill.cgst ?? "-"}"),
|
||||
editableCell(index, "${freightBill.sgst ?? "-"}"),
|
||||
editableCell(index, "${freightBill.igst ?? "-"}"),
|
||||
editableCell(index, "${freightBill.totalGst ?? "-"}"),
|
||||
editableCell(index, "${freightBill.totalGst ?? "-"}"),
|
||||
],
|
||||
);
|
||||
}),
|
||||
|
|
|
@ -14,7 +14,7 @@ class ApiUrls {
|
|||
static const getAllUser =
|
||||
'http://46.28.44.130:9093/api/users/userdetails?page=';
|
||||
static const viewFreightBill =
|
||||
'http://46.28.44.130:9092/bill/freightbill?page';
|
||||
'http://localhost:9092/bill/freightbill?page';
|
||||
static const addUserType =
|
||||
'http://46.28.44.130:9093/api/user-types/createUserType';
|
||||
static const dropDownList =
|
||||
|
|
Loading…
Reference in New Issue