2026.6.5 服务单位管理
parent
1105dbb2cf
commit
547325941a
|
|
@ -93,6 +93,16 @@ class BasicInfoApi {
|
||||||
data: {...data},
|
data: {...data},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 服务单位管理接口
|
||||||
|
static Future<Map<String, dynamic>> getUnitServiceList(Map data) {
|
||||||
|
return HttpManager().request(
|
||||||
|
ApiService.basePath ,
|
||||||
|
'/xgfManager/project/projectPageByUser',
|
||||||
|
method: Method.post,
|
||||||
|
data: {...data},
|
||||||
|
);
|
||||||
|
}
|
||||||
/// 企业入职详情
|
/// 企业入职详情
|
||||||
static Future<Map<String, dynamic>> getFirmInfo(String id) {
|
static Future<Map<String, dynamic>> getFirmInfo(String id) {
|
||||||
return HttpManager().request(
|
return HttpManager().request(
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
import 'package:qhd_prevention/pages/home/unit/unit_join_detail_page.dart';
|
import 'package:qhd_prevention/pages/home/unit/unit_join_detail_page.dart';
|
||||||
import 'package:qhd_prevention/pages/home/unit/unit_quit_apply_page.dart';
|
import 'package:qhd_prevention/pages/home/unit/unit_quit_apply_page.dart';
|
||||||
import 'package:qhd_prevention/pages/my_appbar.dart';
|
import 'package:qhd_prevention/pages/my_appbar.dart';
|
||||||
|
|
@ -23,7 +24,7 @@ class _UnitServiceListPageState extends State<UnitServiceListPage> {
|
||||||
// Data and state variables
|
// Data and state variables
|
||||||
List<dynamic> list = [];
|
List<dynamic> list = [];
|
||||||
int currentPage = 1;
|
int currentPage = 1;
|
||||||
int rows = 10;
|
int rows = 20;
|
||||||
int totalPage = 1;
|
int totalPage = 1;
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
|
|
||||||
|
|
@ -71,31 +72,40 @@ class _UnitServiceListPageState extends State<UnitServiceListPage> {
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
Future<void> _fetchData() async {
|
Future<void> _fetchData() async {
|
||||||
// if (isLoading) return;
|
if (isLoading) return;
|
||||||
// setState(() => isLoading = true);
|
setState(() => isLoading = true);
|
||||||
//
|
|
||||||
// try {
|
try {
|
||||||
//
|
|
||||||
// final data = {
|
final data = {
|
||||||
// 'pageIndex': currentPage,
|
'pageIndex': currentPage,
|
||||||
// 'pageSize': rows,
|
'pageSize': rows,
|
||||||
// 'eqUserId': SessionService.instance.accountId
|
"eqProjectStatus":4,
|
||||||
// };
|
"searchType":5,
|
||||||
// final response = await BasicInfoApi.getFirmListByUser(data);
|
// 'eqUserId': SessionService.instance.accountId
|
||||||
// setState(() {
|
};
|
||||||
// if (currentPage == 1) {
|
// LoadingDialogHelper.show();
|
||||||
// list = response['data'];
|
final response = await BasicInfoApi.getUnitServiceList(data);
|
||||||
// } else {
|
// LoadingDialogHelper.hide();
|
||||||
// list.addAll(response['data']);
|
if (response['success']) {
|
||||||
// }
|
setState(() {
|
||||||
// Map<String, dynamic> page = response['page'];
|
if (currentPage == 1) {
|
||||||
// totalPage = page['totalPage'] ?? 1;
|
list = response['data'];
|
||||||
// isLoading = false;
|
} else {
|
||||||
// });
|
list.addAll(response['data']);
|
||||||
// } catch (e) {
|
}
|
||||||
// print('Error fetching data: $e');
|
Map<String, dynamic> page = response['page'];
|
||||||
// setState(() => isLoading = false);
|
totalPage = page['totalPage'] ?? 1;
|
||||||
// }
|
isLoading = false;
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
ToastUtil.showNormal(context, '获取列表失败');
|
||||||
|
setState(() => isLoading = false);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print('Error fetching data: $e');
|
||||||
|
setState(() => isLoading = false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//查看
|
//查看
|
||||||
|
|
@ -125,7 +135,7 @@ class _UnitServiceListPageState extends State<UnitServiceListPage> {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'服务单位名称:${item['corpinfoName'] ?? ''}',
|
'服务单位名称:${item['companyName'] ?? ''}',
|
||||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -136,7 +146,7 @@ class _UnitServiceListPageState extends State<UnitServiceListPage> {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"所属公司: ${item['corpinfoName'] ?? ''}(相关方)",
|
"所属公司: ${item['corpinfoName'] ?? ''}",
|
||||||
maxLines: 5,
|
maxLines: 5,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
|
|
@ -145,14 +155,14 @@ class _UnitServiceListPageState extends State<UnitServiceListPage> {
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
"项目名称: ${item['corpinfoName'] ?? ''}",
|
"项目名称: ${item['projectName'] ?? ''}",
|
||||||
maxLines: 5,
|
maxLines: 5,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
"项目类型: ${statusInfo['${item['status']}'] ?? ''}",
|
"项目类型: ${item['qualificationsTypeName']??''}",
|
||||||
maxLines: 5,
|
maxLines: 5,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue