Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
d006edb4
Commit
d006edb4
authored
Jun 18, 2025
by
Sai Srinivas
Browse files
18-06-2025 By Sai Srinivas
Pubspec, Order Module Add and Edit.
parent
b06467c3
Changes
27
Show whitespace changes
Inline
Side-by-side
lib/screens/serviceEngineer/Followupdetails.dart
View file @
d006edb4
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:generp/screens/finance/FileViewer.dart'
;
import
'package:provider/provider.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Notifiers/VisitDetailsProvider.dart'
;
import
'../../Notifiers/VisitDetailsProvider.dart'
;
...
@@ -51,25 +52,29 @@ class _FollowupdetailsState extends State<Followupdetails> {
...
@@ -51,25 +52,29 @@ class _FollowupdetailsState extends State<Followupdetails> {
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
),
child:
Column
(
child:
Column
(
children:
[
Row
(
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
List
.
generate
(
4
,
(
j
)
{
children:
List
.
generate
(
9
,
(
j
)
{
final
textheads
=
[
final
textheads
=
[
"
Name"
,
"Employee
Name"
,
"Date"
,
"Date"
,
"Type"
,
"Type"
,
"Time"
,
"In Time"
,
"Out Time"
,
"Running Hours"
,
"FSR File"
,
"FSR Number"
,
"Feedback"
,
"Feedback"
,
];
];
final
textSubheads
=
[
final
textSubheads
=
[
"
${followups[index].ename}
"
,
followups
[
index
].
ename
??
"-"
,
"
${followups[index].date}
"
,
followups
[
index
].
date
??
"-"
,
"
${followups[index].type}
"
,
followups
[
index
].
type
??
"-"
,
"
${followups[index].time}
"
,
followups
[
index
].
time
??
"-"
,
"
${followups[index].feedback}
"
,
followups
[
index
].
outTime
??
"-"
,
followups
[
index
].
runningHrs
??
"-"
,
followups
[
index
].
fsrExt
??
"-"
,
followups
[
index
].
fsrNo
??
"-"
,
followups
[
index
].
feedback
??
"-"
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
...
@@ -78,37 +83,37 @@ class _FollowupdetailsState extends State<Followupdetails> {
...
@@ -78,37 +83,37 @@ class _FollowupdetailsState extends State<Followupdetails> {
vertical:
3
,
vertical:
3
,
horizontal:
0
,
horizontal:
0
,
),
),
child:
Column
(
child:
Row
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
textheads
[
j
].
toString
()),
Expanded
(
child:
Text
(
textheads
[
j
].
toString
())),
SizedBox
(
Expanded
(
// height:45,
child:
InkResponse
(
width:
onTap:
()
{
MediaQuery
.
of
(
if
(
textheads
[
j
]
==
"FSR File"
)
{
Navigator
.
push
(
context
,
context
,
).
size
.
width
*
MaterialPageRoute
(
0.8
,
builder:
(
context
)
=>
Fileviewer
(
fileName:
followups
[
index
].
fsrExt
!,
fileUrl:
"https://erp.gengroup.in/files_genservices/tech_fsr_report/
${followups[index].fsrExt!}
"
,
),
),
);
}
},
child:
Text
(
child:
Text
(
textSubheads
[
j
],
textSubheads
[
j
]==
""
?
"-"
:
textSubheads
[
j
],
maxLines:
2
,
maxLines:
2
,
overflow:
overflow:
TextOverflow
.
ellipsis
,
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xFF818181
),
color:
),
textheads
[
j
]
==
"FSR File"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
),
),
),
),
],
),
),
],
),
),
],
],
),
),
...
@@ -116,10 +121,6 @@ class _FollowupdetailsState extends State<Followupdetails> {
...
@@ -116,10 +121,6 @@ class _FollowupdetailsState extends State<Followupdetails> {
);
);
}),
}),
),
),
],
),
],
),
);
);
},
},
),
),
...
...
lib/screens/serviceEngineer/PendingComplaints.dart
View file @
d006edb4
...
@@ -160,14 +160,14 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
...
@@ -160,14 +160,14 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
3
,
(
j
)
{
...
List
.
generate
(
3
,
(
j
)
{
final
textheads
=
[
final
textheads
=
[
"ID"
,
"
Complaint
ID"
,
"
Generator Typ
e"
,
"
Product Nam
e"
,
"Address"
,
"Address"
,
];
];
final
textSubheads
=
[
final
textSubheads
=
[
provider
provider
.
technician_complaint_list
[
index
]
.
technician_complaint_list
[
index
]
.
gen
Id
,
.
complaint
Id
,
provider
provider
.
technician_complaint_list
[
index
]
.
technician_complaint_list
[
index
]
.
productName
,
.
productName
,
...
...
lib/screens/serviceEngineer/UpdateComplaints.dart
View file @
d006edb4
...
@@ -15,13 +15,8 @@ class Updatecomplaints extends StatefulWidget {
...
@@ -15,13 +15,8 @@ class Updatecomplaints extends StatefulWidget {
}
}
class
_UpdatecomplaintsState
extends
State
<
Updatecomplaints
>
{
class
_UpdatecomplaintsState
extends
State
<
Updatecomplaints
>
{
TextEditingController
fsrNumberController
=
TextEditingController
();
TextEditingController
runningHoursController
=
TextEditingController
();
TextEditingController
feedbackController
=
TextEditingController
();
final
List
<
Map
<
String
,
dynamic
>>
CompletedStatus
=
[
{
"id"
:
"1"
,
"name"
:
"Pending"
},
{
"id"
:
"2"
,
"name"
:
"Completed"
}
];
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -78,7 +73,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -78,7 +73,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
],
],
),
),
items:
CompletedStatus
.
map
(
items:
provider
.
CompletedStatus
.
map
(
(
complaintStatus
)
=>
(
complaintStatus
)
=>
DropdownMenuItem
<
String
>(
DropdownMenuItem
<
String
>(
value:
complaintStatus
[
'name'
],
value:
complaintStatus
[
'name'
],
...
@@ -94,6 +89,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -94,6 +89,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
onChanged:
(
value
)
{
onChanged:
(
value
)
{
if
(
value
!=
null
)
{
if
(
value
!=
null
)
{
provider
.
statusID
=
value
;
provider
.
statusID
=
value
;
provider
.
statusError
=
""
;
print
(
"statusId:
${provider.statusID}
"
);
print
(
"statusId:
${provider.statusID}
"
);
}
}
},
},
...
@@ -141,6 +137,9 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -141,6 +137,9 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
),
SizedBox
(
height:
5
,),
SizedBox
(
height:
5
,),
ErrorWidget
(
context
,
provider
.
statusError
),
if
(
provider
.
statusID
!.
isNotEmpty
)...[
if
(
provider
.
statusID
!=
"Pending"
)...[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
5.0
),
child:
Text
(
child:
Text
(
...
@@ -166,9 +165,12 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -166,9 +165,12 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
10.0
,
0.0
,
10
,
0
),
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
child:
TextFormField
(
controller:
controller:
fsrNumberController
,
provider
.
fsrNumberController
,
keyboardType:
keyboardType:
TextInputType
.
text
,
TextInputType
.
text
,
onChanged:
(
value
)
{
provider
.
fsrError
=
""
;
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
hintText:
...
@@ -189,6 +191,10 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -189,6 +191,10 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
),
SizedBox
(
height:
5
,),
SizedBox
(
height:
5
,),
ErrorWidget
(
context
,
provider
.
fsrError
)
]
],
Row
(
Row
(
children:
[
children:
[
Expanded
(
Expanded
(
...
@@ -278,13 +284,16 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -278,13 +284,16 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
10.0
,
0.0
,
10
,
0
),
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
child:
TextFormField
(
controller:
controller:
runningHoursController
,
provider
.
runningHoursController
,
keyboardType:
keyboardType:
TextInputType
.
text
,
TextInputType
.
text
,
onChanged:
(
value
)
{
provider
.
runningHoursError
=
""
;
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
hintText:
hintText:
"Enter
FSR Number
"
,
"Enter
Running Hours
"
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
color:
Color
(
0xFFB4BEC0
),
...
@@ -302,6 +311,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -302,6 +311,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
],
],
),
),
ErrorWidget
(
context
,
provider
.
runningHoursError
),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
_showAttachmentSheet
(
context
);
_showAttachmentSheet
(
context
);
...
@@ -373,7 +383,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -373,7 +383,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
10.0
,
0.0
,
10
,
0
),
10.0
,
0.0
,
10
,
0
),
child:
TextFormField
(
child:
TextFormField
(
controller:
controller:
feedbackController
,
provider
.
feedbackController
,
maxLines:
60
,
maxLines:
60
,
keyboardType:
keyboardType:
TextInputType
.
text
,
TextInputType
.
text
,
...
@@ -408,9 +418,9 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -408,9 +418,9 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
provider
.
UpdateComplaintAPIFunction
(
provider
.
UpdateComplaintAPIFunction
(
context
,
context
,
widget
.
ComplaintID
,
widget
.
ComplaintID
,
feedbackController
.
text
,
provider
.
feedbackController
.
text
,
fsrNumberController
.
text
,
provider
.
fsrNumberController
.
text
,
runningHoursController
.
text
,
provider
.
runningHoursController
.
text
,
provider
.
statusID
);
provider
.
statusID
);
},
},
child:
Container
(
child:
Container
(
...
@@ -446,6 +456,12 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
...
@@ -446,6 +456,12 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
},);
},);
}
Widget
ErrorWidget
(
context
,
text
)
{
if
(
text
!=
null
)
return
Text
(
text
!,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
12
));
else
return
SizedBox
(
height:
10
);
}
}
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
Future
<
void
>
_showAttachmentSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
return
showModalBottomSheet
(
...
...
lib/services/api_calling.dart
View file @
d006edb4
...
@@ -62,7 +62,10 @@ import '../Models/loadGeneratorDetailsResponse.dart';
...
@@ -62,7 +62,10 @@ import '../Models/loadGeneratorDetailsResponse.dart';
import
'../Models/financeModels/financeDashboardPagesResponse.dart'
;
import
'../Models/financeModels/financeDashboardPagesResponse.dart'
;
import
'../Models/ordersModels/AddOrderPaymentSelectAccountResponse.dart'
;
import
'../Models/ordersModels/AddOrderPaymentSelectAccountResponse.dart'
;
import
'../Models/ordersModels/AddOrderPaymentSelectOrderResponse.dart'
;
import
'../Models/ordersModels/AddOrderPaymentSelectOrderResponse.dart'
;
import
'../Models/ordersModels/AddOrderViewResponse.dart'
;
import
'../Models/ordersModels/addOrderAccontDetailsResponse.dart'
;
import
'../Models/ordersModels/addOrderPaymentViewResponse.dart'
;
import
'../Models/ordersModels/addOrderPaymentViewResponse.dart'
;
import
'../Models/ordersModels/addOrderTpcAgentListResponse.dart'
;
import
'../Models/ordersModels/commonResponse.dart'
;
import
'../Models/ordersModels/commonResponse.dart'
;
import
'../Models/ordersModels/ordersAccessiblePagesResponse.dart'
;
import
'../Models/ordersModels/ordersAccessiblePagesResponse.dart'
;
import
'../Models/ordersModels/ordersDetailsByModeResponse.dart'
;
import
'../Models/ordersModels/ordersDetailsByModeResponse.dart'
;
...
@@ -734,7 +737,7 @@ class ApiCalling {
...
@@ -734,7 +737,7 @@ class ApiCalling {
};
};
final
res
=
await
post
(
data
,
technicianTodayVisitsUrl
,
{});
final
res
=
await
post
(
data
,
technicianTodayVisitsUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
//
debugPrint(res.body);
debugPrint
(
res
.
body
);
return
TodayVisitResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
TodayVisitResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
...
@@ -757,7 +760,7 @@ class ApiCalling {
...
@@ -757,7 +760,7 @@ class ApiCalling {
};
};
final
res
=
await
post
(
data
,
technicianMonthlyVisitsUrl
,
{});
final
res
=
await
post
(
data
,
technicianMonthlyVisitsUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
//
debugPrint(res.body);
debugPrint
(
res
.
body
);
return
TodayVisitResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
TodayVisitResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
...
@@ -1015,7 +1018,7 @@ class ApiCalling {
...
@@ -1015,7 +1018,7 @@ class ApiCalling {
};
};
final
res
=
await
post
(
data
,
technicianComplaintDetailsUrl
,
{});
final
res
=
await
post
(
data
,
technicianComplaintDetailsUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
//
debugPrint(res.body);
debugPrint
(
res
.
body
);
return
ViewVisitDetailsResponseNew
.
fromJson
(
jsonDecode
(
res
.
body
));
return
ViewVisitDetailsResponseNew
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
...
@@ -1040,7 +1043,7 @@ class ApiCalling {
...
@@ -1040,7 +1043,7 @@ class ApiCalling {
};
};
final
res
=
await
post
(
data
,
technicianComplaintFollowUpUrl
,
{});
final
res
=
await
post
(
data
,
technicianComplaintFollowUpUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
//
debugPrint(res.body);
debugPrint
(
res
.
body
);
return
FollowupListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
FollowupListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
...
@@ -2049,6 +2052,185 @@ class ApiCalling {
...
@@ -2049,6 +2052,185 @@ class ApiCalling {
}
}
}
}
static
Future
<
AddOrderViewResponse
?>
addOrderViewAPI
(
empId
,
session
,
mode
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersAddOrderViewUrl
,
{});
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
return
AddOrderViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
addOrderAccontDetailsResponse
?>
addOrderAccountDetailsAPI
(
empId
,
session
,
account_id
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
(
account_id
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersAddOrderAccountDetailsUrl
,
{});
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
return
addOrderAccontDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
addOrderTpcAgentListResponse
?>
addOrderTPCAgentListAPI
(
empId
,
session
,
mode
,
text
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
mode
.
toString
(),
'text'
:
(
text
).
toString
(),
};
final
res
=
await
post
(
data
,
ordersAddOrderTpcAgentListUrl
,
{});
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
return
addOrderTpcAgentListResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
CommonResponse
?>
addOrderSubmitAPI
(
empId
,
session
,
mode
,
sales_person_emp_id
,
selected_acc_id
,
dispatch_state_id
,
dispatch_district_id
,
dispatch_sub_location_id
,
dispatch_pincode
,
dispatch_address
,
basic_amount
,
cgst_amount
,
sgst_amount
,
igst_amount
,
total_amount
,
order_received_date
,
note
,
unloading
,
freight
,
erection
,
tpc_applicable
,
billing_name
,
billing_gst_no
,
billing_pincode
,
billing_address
,
billing_state
,
billing_district
,
billing_sub_locality
,
order_products
,
lead_id
,
feedback
,
in_time
,
loc
,
requested_tpc_amount
,
tpc_agent_id
,
po
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
empId
.
toString
(),
'session_id'
:
session
.
toString
(),
'mode'
:
mode
.
toString
(),
'sales_person_emp_id'
:
sales_person_emp_id
.
toString
(),
'selected_acc_id'
:
selected_acc_id
.
toString
(),
'dispatch_state_id'
:
dispatch_state_id
.
toString
(),
'dispatch_district_id'
:
dispatch_district_id
.
toString
(),
'dispatch_sub_location_id'
:
dispatch_sub_location_id
.
toString
(),
'dispatch_pincode'
:
dispatch_pincode
.
toString
(),
'dispatch_address'
:
dispatch_address
.
toString
(),
'basic_amount'
:
basic_amount
.
toString
(),
'cgst_amount'
:
cgst_amount
.
toString
(),
'sgst_amount'
:
sgst_amount
.
toString
(),
'igst_amount'
:
igst_amount
.
toString
(),
'total_amount'
:
total_amount
.
toString
(),
'order_received_date'
:
order_received_date
.
toString
(),
'note'
:
note
.
toString
(),
'unloading'
:
unloading
.
toString
(),
'freight'
:
freight
.
toString
(),
'erection'
:
erection
.
toString
(),
'tpc_applicable'
:
tpc_applicable
.
toString
(),
'billing_name'
:
billing_name
.
toString
(),
'billing_gst_no'
:
billing_gst_no
.
toString
(),
'billing_pincode'
:
billing_pincode
.
toString
(),
'billing_address'
:
billing_address
.
toString
(),
'billing_state'
:
billing_state
.
toString
(),
'billing_district'
:
billing_district
.
toString
(),
'billing_sub_locality'
:
billing_sub_locality
.
toString
(),
'order_products'
:
jsonEncode
(
order_products
).
toString
(),
'lead_id'
:
lead_id
.
toString
(),
'feedback'
:
feedback
.
toString
(),
'in_time'
:
in_time
.
toString
(),
'loc'
:
loc
.
toString
(),
'requested_tpc_amount'
:
requested_tpc_amount
.
toString
(),
'tpc_agent_id'
:
tpc_agent_id
.
toString
(),
};
var
res
;
print
(
data
);
if
(
po
!=
null
)
{
res
=
await
postImageNew
(
data
,
{},
ordersAddOrderSubmitUrl
,
po
,
"po"
,
);
res
=
jsonDecode
(
res
);
}
else
{
res
=
await
post
(
data
,
ordersAddOrderSubmitUrl
,
{});
res
=
jsonDecode
(
res
.
body
);
return
CommonResponse
.
fromJson
(
res
);
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
ordersListByModeFilterResponse
?>
ordersListByModeFilterAPI
(
static
Future
<
ordersListByModeFilterResponse
?>
ordersListByModeFilterAPI
(
empId
,
empId
,
session
,
session
,
...
@@ -2246,7 +2428,7 @@ class ApiCalling {
...
@@ -2246,7 +2428,7 @@ class ApiCalling {
}
}
}
}
static
Future
<
addOrderPaymentViewResponse
?>
A
ddOrderpaymentListViewAPI
(
static
Future
<
addOrderPaymentViewResponse
?>
a
ddOrderpaymentListViewAPI
(
empId
,
empId
,
session
,
session
,
)
async
{
)
async
{
...
@@ -2269,7 +2451,7 @@ class ApiCalling {
...
@@ -2269,7 +2451,7 @@ class ApiCalling {
}
}
}
}
static
Future
<
CommonResponse
?>
A
ddOrderpaymentListSubmitAPI
(
static
Future
<
CommonResponse
?>
a
ddOrderpaymentListSubmitAPI
(
empId
,
empId
,
session
,
session
,
account_id
,
account_id
,
...
@@ -2287,13 +2469,14 @@ class ApiCalling {
...
@@ -2287,13 +2469,14 @@ class ApiCalling {
'session_id'
:
(
session
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'account_id'
:
account_id
.
toString
(),
'account_id'
:
account_id
.
toString
(),
'description'
:
description
.
toString
(),
'description'
:
description
.
toString
(),
'selected_orders'
:
selected_orders
.
toString
(),
'selected_orders'
:
jsonEncode
(
selected_orders
)
.
toString
(),
'payment_amount'
:
payment_amount
.
toString
(),
'payment_amount'
:
payment_amount
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
};
};
var
res
;
var
res
;
print
(
data
);
if
(
attachment
!=
null
)
{
if
(
attachment
!=
null
)
{
res
=
await
postImageNew
(
res
=
await
postImageNew
(
data
,
data
,
...
@@ -2314,6 +2497,40 @@ class ApiCalling {
...
@@ -2314,6 +2497,40 @@ class ApiCalling {
return
null
;
return
null
;
}
}
}
}
static
Future
<
CommonResponse
?>
ordersEditPaymentDetailsAPI
(
empId
,
session
,
payment_id
,
description
,
payment_type
,
ref_no
,
payment_date
,
amount
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'payment_id'
:
payment_id
.
toString
(),
'description'
:
description
.
toString
(),
'payment_type'
:
payment_type
.
toString
(),
'payment_date'
:
payment_date
.
toString
(),
'ref_no'
:
ref_no
.
toString
(),
'amount'
:
amount
.
toString
(),
};
var
res
=
await
post
(
data
,
ordersEditPaymentDetailsUrl
,
{});
if
(
res
!=
null
)
{
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
AddOrderPaymentSelectAccountResponse
?>
AddOrderPaymentSelectAccountAPI
(
static
Future
<
AddOrderPaymentSelectAccountResponse
?>
AddOrderPaymentSelectAccountAPI
(
empId
,
empId
,
...
@@ -2330,7 +2547,8 @@ class ApiCalling {
...
@@ -2330,7 +2547,8 @@ class ApiCalling {
};
};
final
res
=
await
post
(
data
,
ordersAddPaymentSelectAccountForOrderUrl
,
{});
final
res
=
await
post
(
data
,
ordersAddPaymentSelectAccountForOrderUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
print
(
data
);
print
(
"PaymentSeralectAccount
${res.body}
"
);
return
AddOrderPaymentSelectAccountResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
AddOrderPaymentSelectAccountResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
...
@@ -2345,7 +2563,7 @@ class ApiCalling {
...
@@ -2345,7 +2563,7 @@ class ApiCalling {
static
Future
<
AddOrderPaymentSelectOrderResponse
?>
AddOrderPaymentSelectOrderAPI
(
static
Future
<
AddOrderPaymentSelectOrderResponse
?>
AddOrderPaymentSelectOrderAPI
(
empId
,
empId
,
session
,
session
,
account_id
,
x
account_id
,
)
async
{
)
async
{
try
{
try
{
Map
<
String
,
String
>
data
=
{
Map
<
String
,
String
>
data
=
{
...
@@ -2355,7 +2573,8 @@ class ApiCalling {
...
@@ -2355,7 +2573,8 @@ class ApiCalling {
};
};
final
res
=
await
post
(
data
,
ordersAddPaymentSelectOrderUrl
,
{});
final
res
=
await
post
(
data
,
ordersAddPaymentSelectOrderUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
print
(
data
);
debugPrint
(
"empty:
${res.body}
"
);
return
AddOrderPaymentSelectOrderResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
AddOrderPaymentSelectOrderResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
...
...
lib/services/api_names.dart
View file @
d006edb4
...
@@ -95,8 +95,14 @@ const ordersOrderDetailsEditOrderUrl = "${baseUrl_test}crm_edit_order_view";
...
@@ -95,8 +95,14 @@ const ordersOrderDetailsEditOrderUrl = "${baseUrl_test}crm_edit_order_view";
const
ordersOrderDetailsEditOrderSubmitUrl
=
"
${baseUrl_test}
crm_edit_order_submit"
;
const
ordersOrderDetailsEditOrderSubmitUrl
=
"
${baseUrl_test}
crm_edit_order_submit"
;
const
ordersOrderDetailsDispatchProductsUrl
=
"
${baseUrl_test}
crm_dispatch_products_data"
;
const
ordersOrderDetailsDispatchProductsUrl
=
"
${baseUrl_test}
crm_dispatch_products_data"
;
const
ordersAddOrderViewUrl
=
"
${baseUrl_test}
add_crm_order_view"
;
const
ordersAddOrderAccountDetailsUrl
=
"
${baseUrl_test}
crm_account_details_for_add_order"
;
const
ordersAddOrderTpcAgentListUrl
=
"
${baseUrl_test}
select_tpc_agent_for_add_order"
;
const
ordersAddOrderSubmitUrl
=
"
${baseUrl_test}
add_crm_order_submit"
;
const
ordersAddPaymentViewUrl
=
"
${baseUrl_test}
crm_add_order_payment_view"
;
const
ordersAddPaymentViewUrl
=
"
${baseUrl_test}
crm_add_order_payment_view"
;
const
ordersAddPaymentSubmitUrl
=
"
${baseUrl_test}
crm_add_order_payment_submit"
;
const
ordersAddPaymentSubmitUrl
=
"
${baseUrl_test}
crm_add_order_payment_submit"
;
const
ordersEditPaymentDetailsUrl
=
"
${baseUrl_test}
crm_payment_update_edit_details"
;
const
ordersEditPaymentDetailsAdjustedOrdersUrl
=
"
${baseUrl_test}
crm_payment_update_edit_adjusted_orders"
;
const
ordersAddPaymentSelectAccountForOrderUrl
=
"
${baseUrl_test}
select_account_for_order_payment"
;
const
ordersAddPaymentSelectAccountForOrderUrl
=
"
${baseUrl_test}
select_account_for_order_payment"
;
const
ordersAddPaymentSelectOrderUrl
=
"
${baseUrl_test}
select_order_for_order_payment"
;
const
ordersAddPaymentSelectOrderUrl
=
"
${baseUrl_test}
select_order_for_order_payment"
;
const
ordersPaymentListFilterUrl
=
"
${baseUrl_test}
crm_payments_list_view"
;
const
ordersPaymentListFilterUrl
=
"
${baseUrl_test}
crm_payments_list_view"
;
...
...
pubspec.lock
View file @
d006edb4
...
@@ -1533,6 +1533,14 @@ packages:
...
@@ -1533,6 +1533,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.10.1"
version: "0.10.1"
tuple:
dependency: "direct main"
description:
name: tuple
sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151
url: "https://pub.dev"
source: hosted
version: "2.0.2"
typed_data:
typed_data:
dependency: transitive
dependency: transitive
description:
description:
...
...
pubspec.yaml
View file @
d006edb4
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.8
2
+8
6
version
:
1.0.8
3
+8
7
environment
:
environment
:
sdk
:
^3.7.2
sdk
:
^3.7.2
...
@@ -78,6 +78,7 @@ dependencies:
...
@@ -78,6 +78,7 @@ dependencies:
pdf
:
^3.11.3
pdf
:
^3.11.3
printing
:
^5.14.2
printing
:
^5.14.2
interactive_slider
:
^0.5.1
interactive_slider
:
^0.5.1
tuple
:
^2.0.2
dev_dependencies
:
dev_dependencies
:
flutter_test
:
flutter_test
:
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment