Compare commits
No commits in common. "aed92c4bed4445686b80076aea36e02e11a3cc13" and "047351bc6c1f96646f47b091d9c6e7dc2356f223" have entirely different histories.
aed92c4bed
...
047351bc6c
|
|
@ -6,8 +6,6 @@ import '../tools/tools.dart';
|
||||||
|
|
||||||
/// 自定义组件
|
/// 自定义组件
|
||||||
class ListItemFactory {
|
class ListItemFactory {
|
||||||
static const Color detailtextColor = Colors.black54;
|
|
||||||
|
|
||||||
/// 类型1:横向spaceBetween布局两个文本加按钮
|
/// 类型1:横向spaceBetween布局两个文本加按钮
|
||||||
static Widget createRowSpaceBetweenItem({
|
static Widget createRowSpaceBetweenItem({
|
||||||
required String leftText,
|
required String leftText,
|
||||||
|
|
@ -335,7 +333,7 @@ class ListItemFactory {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (!isEdit) Text(text, style: TextStyle(color: detailtextColor)),
|
if (!isEdit) Text(text, style: TextStyle()),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -648,7 +648,7 @@ class _MultiDictValuesPickerState extends State<MultiDictValuesPicker> {
|
||||||
children: [
|
children: [
|
||||||
_buildActionBar(),
|
_buildActionBar(),
|
||||||
const Divider(height: 1),
|
const Divider(height: 1),
|
||||||
// _buildHintMessage(),
|
_buildHintMessage(),
|
||||||
Expanded(child: _buildContent()),
|
Expanded(child: _buildContent()),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,6 @@ class SpecialListInitData {
|
||||||
"projectExecutionLocationCorpName",
|
"projectExecutionLocationCorpName",
|
||||||
"applyUnit",
|
"applyUnit",
|
||||||
"workId",
|
"workId",
|
||||||
"internalOperationFlag",
|
|
||||||
"hotWorkLeaderConfirmUserName",
|
|
||||||
"hotWorkLeaderConfirmUserId",
|
|
||||||
// 有限空间
|
// 有限空间
|
||||||
"applyDepartment",
|
"applyDepartment",
|
||||||
"applyUser",
|
"applyUser",
|
||||||
|
|
|
||||||
|
|
@ -558,6 +558,7 @@ class _SpecialWorkFilterPageState extends State<SpecialWorkFilterPage> {
|
||||||
SpecialWorkTypeEnum.hoistingWork ||
|
SpecialWorkTypeEnum.hoistingWork ||
|
||||||
widget.workType ==
|
widget.workType ==
|
||||||
SpecialWorkTypeEnum.breakgroundWork ||
|
SpecialWorkTypeEnum.breakgroundWork ||
|
||||||
|
widget.workType == SpecialWorkTypeEnum.blindboardWork ||
|
||||||
widget.workType == SpecialWorkTypeEnum.cutRoadWork || widget.workType == SpecialWorkTypeEnum.electricityWork)
|
widget.workType == SpecialWorkTypeEnum.cutRoadWork || widget.workType == SpecialWorkTypeEnum.electricityWork)
|
||||||
buildChooseRow(
|
buildChooseRow(
|
||||||
labelText: '作业级别',
|
labelText: '作业级别',
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 2,
|
||||||
verticalPadding: 5,
|
verticalPadding: 7,
|
||||||
title: '是否项目内作业',
|
title: '是否项目内作业',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
|
|
@ -235,16 +235,6 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
||||||
onChanged: (value) {},
|
onChanged: (value) {},
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
if (pd['workLevel'] == 'hot_work_level0' && FormUtils.hasValue(pd, 'hotWorkLeaderConfirmUserName')) ...[
|
|
||||||
ItemListWidget.selectableLineTitleTextRightButton(
|
|
||||||
isRequired: false,
|
|
||||||
label: '动火负责人确认负责人',
|
|
||||||
isEditable: false,
|
|
||||||
isClean: false,
|
|
||||||
text: pd['hotWorkLeaderConfirmUserName'] ?? '',
|
|
||||||
),
|
|
||||||
const Divider(),
|
|
||||||
],
|
|
||||||
if (actUserList.isNotEmpty) ...[
|
if (actUserList.isNotEmpty) ...[
|
||||||
ItemListWidget.multiLineAutoTitleTextField(
|
ItemListWidget.multiLineAutoTitleTextField(
|
||||||
label: '动火操作人:',
|
label: '动火操作人:',
|
||||||
|
|
@ -266,8 +256,6 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
||||||
],
|
],
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
title: '是否安全总监审批',
|
title: '是否安全总监审批',
|
||||||
horizontalPadding: 2,
|
|
||||||
verticalPadding: 5,
|
|
||||||
groupValue: true,
|
groupValue: true,
|
||||||
text: pd['14_skip'] == 1 ? '是' : '否',
|
text: pd['14_skip'] == 1 ? '是' : '否',
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
|
|
@ -275,8 +263,6 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
|
||||||
verticalPadding: 5,
|
|
||||||
title: '是否需要气体检查',
|
title: '是否需要气体检查',
|
||||||
groupValue: true,
|
groupValue: true,
|
||||||
text: pd['gasFlag'] == 1 ? '是' : '否',
|
text: pd['gasFlag'] == 1 ? '是' : '否',
|
||||||
|
|
|
||||||
|
|
@ -44,120 +44,65 @@ class DhWaitPage extends SpecialWorkWaitPageBase {
|
||||||
Map<String, dynamic> item,
|
Map<String, dynamic> item,
|
||||||
bool isEdit,
|
bool isEdit,
|
||||||
) async {
|
) async {
|
||||||
final hotworkId = '${item['id'] ?? ''}';
|
final hotworkId = item['id'] ?? '';
|
||||||
final hotworkCodeId = '${item['workId'] ?? ''}';
|
final hotworkCodeId = item['workId'] ?? '';
|
||||||
|
final hotworkInfo = listType == SpecialListType.task ? (item['workInfo'] ?? {}) : item;
|
||||||
|
|
||||||
final Map<String, dynamic> hotworkInfo =
|
|
||||||
listType == SpecialListType.task
|
|
||||||
? (item['workInfo'] as Map<String, dynamic>? ?? <String, dynamic>{})
|
|
||||||
: item;
|
|
||||||
|
|
||||||
final stepId = '${item['stepId'] ?? ''}';
|
|
||||||
final status = '${hotworkInfo['status'] ?? ''}';
|
final status = '${hotworkInfo['status'] ?? ''}';
|
||||||
final statusName = listType == SpecialListType.task
|
final stepName = isEdit
|
||||||
|
? (listType == SpecialListType.task
|
||||||
? '${item['stepName'] ?? ''}'
|
? '${item['stepName'] ?? ''}'
|
||||||
: '${hotworkInfo['currentStep'] ?? ''}';
|
: '${hotworkInfo['currentStep'] ?? ''}')
|
||||||
|
: '查看';
|
||||||
|
|
||||||
// 非 task 类型,统一进详情页
|
if (listType == SpecialListType.task) {
|
||||||
if (listType != SpecialListType.task) {
|
if (status == '0' || status == '2') {
|
||||||
await _openTaskPage(
|
if (isEdit) {
|
||||||
context: context,
|
await pushPage(
|
||||||
workId: hotworkId,
|
HotWorkApplyPage(
|
||||||
workCodeId: hotworkCodeId,
|
isReEdit: true,
|
||||||
stepName: statusName,
|
workId: hotworkId,
|
||||||
isEdit: isEdit,
|
status: status,
|
||||||
|
),
|
||||||
|
context,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
await pushPage(
|
||||||
|
HotTaskPage(
|
||||||
|
workId: hotworkId,
|
||||||
|
stepName: stepName,
|
||||||
|
workCodeId: hotworkCodeId,
|
||||||
|
isEdit: false,
|
||||||
|
type: listType,
|
||||||
|
),
|
||||||
|
context,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await pushPage(
|
||||||
|
HotTaskPage(
|
||||||
|
workId: hotworkId,
|
||||||
|
stepName: stepName,
|
||||||
|
workCodeId: hotworkCodeId,
|
||||||
|
isEdit: isEdit,
|
||||||
|
type: listType,
|
||||||
|
),
|
||||||
|
context,
|
||||||
);
|
);
|
||||||
return;
|
} else {
|
||||||
}
|
await pushPage(
|
||||||
|
HotTaskPage(
|
||||||
|
|
||||||
// task 类型:先处理特殊步骤
|
|
||||||
if (stepId == '2') {
|
|
||||||
if (isEdit) {
|
|
||||||
await pushPage(
|
|
||||||
SpecialWorkGasList(data: item, addFlag: true),
|
|
||||||
context,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
await _openTaskPage(
|
|
||||||
context: context,
|
|
||||||
workId: hotworkId,
|
workId: hotworkId,
|
||||||
|
stepName: stepName,
|
||||||
workCodeId: hotworkCodeId,
|
workCodeId: hotworkCodeId,
|
||||||
stepName: statusName,
|
isEdit: isEdit,
|
||||||
isEdit: false,
|
type: listType,
|
||||||
);
|
),
|
||||||
}
|
context,
|
||||||
return;
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// task 类型:状态为 0 / 2,走申请重编辑或查看
|
|
||||||
if (status == '0' || status == '2') {
|
|
||||||
if (isEdit) {
|
|
||||||
await pushPage(
|
|
||||||
HotWorkApplyPage(
|
|
||||||
isReEdit: true,
|
|
||||||
workId: hotworkId,
|
|
||||||
status: status,
|
|
||||||
),
|
|
||||||
context,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
await _openTaskPage(
|
|
||||||
context: context,
|
|
||||||
workId: hotworkId,
|
|
||||||
workCodeId: hotworkCodeId,
|
|
||||||
stepName: '查看',
|
|
||||||
isEdit: false,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// task 类型:延期步骤
|
|
||||||
if (stepId == '12') {
|
|
||||||
if (isEdit) {
|
|
||||||
await pushPage(
|
|
||||||
HotDelayPage(data: item, isEdit: true),
|
|
||||||
context,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
await _openTaskPage(
|
|
||||||
context: context,
|
|
||||||
workId: hotworkId,
|
|
||||||
workCodeId: hotworkCodeId,
|
|
||||||
stepName: statusName,
|
|
||||||
isEdit: false,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 其他情况,统一进任务页
|
|
||||||
await _openTaskPage(
|
|
||||||
context: context,
|
|
||||||
workId: hotworkId,
|
|
||||||
workCodeId: hotworkCodeId,
|
|
||||||
stepName: statusName,
|
|
||||||
isEdit: isEdit,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Future<void> _openTaskPage({
|
|
||||||
required BuildContext context,
|
|
||||||
required String workId,
|
|
||||||
required String workCodeId,
|
|
||||||
required String stepName,
|
|
||||||
required bool isEdit,
|
|
||||||
}) async {
|
|
||||||
await pushPage(
|
|
||||||
HotTaskPage(
|
|
||||||
workId: workId,
|
|
||||||
stepName: stepName,
|
|
||||||
workCodeId: workCodeId,
|
|
||||||
isEdit: isEdit,
|
|
||||||
type: listType,
|
|
||||||
),
|
|
||||||
context,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,6 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
||||||
"workEndTime": "请选择作业结束时间",
|
"workEndTime": "请选择作业结束时间",
|
||||||
"workContent": "请填写作业内容",
|
"workContent": "请填写作业内容",
|
||||||
"workMonitor": "请填写动火监火人",
|
"workMonitor": "请填写动火监火人",
|
||||||
"hotWorkLeaderConfirmUserName": "请选择动火负责人确认负责人",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -176,7 +175,7 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
||||||
if (pd['xgfFlag'] == 1) ...[
|
if (pd['xgfFlag'] == 1) ...[
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 5,
|
||||||
verticalPadding: 0,
|
verticalPadding: 0,
|
||||||
title: '是否项目内作业',
|
title: '是否项目内作业',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
|
|
@ -277,17 +276,6 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
||||||
onChanged: (value) => setState(() => pd['workContent'] = value),
|
onChanged: (value) => setState(() => pd['workContent'] = value),
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
if (pd['workLevel'] == 'hot_work_level0') ...[
|
|
||||||
ItemListWidget.selectableLineTitleTextRightButton(
|
|
||||||
isRequired: true,
|
|
||||||
label: '动火负责人确认负责人',
|
|
||||||
isEditable: isEditable,
|
|
||||||
isClean: false,
|
|
||||||
text: pd['hotWorkLeaderConfirmUserName'] ?? '请选择',
|
|
||||||
onTap: () => chooseHotworkLeaderConfirmHandle(),
|
|
||||||
),
|
|
||||||
const Divider(),
|
|
||||||
],
|
|
||||||
// 动火操作人(自定义组件)
|
// 动火操作人(自定义组件)
|
||||||
_buildHotWorkActUser(),
|
_buildHotWorkActUser(),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
|
@ -305,7 +293,6 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
||||||
if (widget.isReEdit && FormUtils.hasValue(form, 'id')) ...[
|
if (widget.isReEdit && FormUtils.hasValue(form, 'id')) ...[
|
||||||
HotWorkDetailFormWidget(pd: form, isEditable: true),
|
HotWorkDetailFormWidget(pd: form, isEditable: true),
|
||||||
],
|
],
|
||||||
|
|
||||||
// 签字流程组(基类提供)
|
// 签字流程组(基类提供)
|
||||||
buildGroupsList(),
|
buildGroupsList(),
|
||||||
// 其他安全措施
|
// 其他安全措施
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ class _DlApplyPageState extends SpecialWorkApplyBaseState<DlApplyPage> {
|
||||||
if (pd['xgfFlag'] == 1) ...[
|
if (pd['xgfFlag'] == 1) ...[
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 5,
|
||||||
verticalPadding: 0,
|
verticalPadding: 0,
|
||||||
title: '是否项目内作业',
|
title: '是否项目内作业',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ class _DtApplyPageState extends SpecialWorkApplyBaseState<DtApplyPage> {
|
||||||
if (pd['xgfFlag'] == 1) ...[
|
if (pd['xgfFlag'] == 1) ...[
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 5,
|
||||||
verticalPadding: 0,
|
verticalPadding: 0,
|
||||||
title: '是否项目内作业',
|
title: '是否项目内作业',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ class _DzApplyPageState extends SpecialWorkApplyBaseState<DzApplyPage> {
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 2,
|
||||||
verticalPadding: 0,
|
verticalPadding: 7,
|
||||||
title: '是否项目内作业',
|
title: '是否项目内作业',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
groupValue: pd['internalOperationFlag'] == 1,
|
groupValue: pd['internalOperationFlag'] == 1,
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ class _GcApplyPageState extends SpecialWorkApplyBaseState<GcApplyPage> {
|
||||||
if (pd['xgfFlag'] == 1) ...[
|
if (pd['xgfFlag'] == 1) ...[
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 5,
|
||||||
verticalPadding: 0,
|
verticalPadding: 0,
|
||||||
title: '是否项目内作业',
|
title: '是否项目内作业',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ class _LsydApplyPageState extends SpecialWorkApplyBaseState<LsydApplyPage> {
|
||||||
if (pd['xgfFlag'] == 1) ...[
|
if (pd['xgfFlag'] == 1) ...[
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 5,
|
||||||
verticalPadding: 0,
|
verticalPadding: 0,
|
||||||
title: '是否项目内作业',
|
title: '是否项目内作业',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ class _MbcdApplyPageState extends SpecialWorkApplyBaseState<MbcdApplyPage> {
|
||||||
if (pd['xgfFlag'] == 1) ...[
|
if (pd['xgfFlag'] == 1) ...[
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 5,
|
||||||
verticalPadding: 0,
|
verticalPadding: 0,
|
||||||
title: '是否项目内作业',
|
title: '是否项目内作业',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
|
|
|
||||||
|
|
@ -75,26 +75,20 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> loadExtraData() async {
|
Future<void> loadExtraData() async {
|
||||||
|
final parentPerm =
|
||||||
|
'dashboard:hazardous:work:confined-space-operations:Confined-Space-Work-Ledger';
|
||||||
|
final targetPerm = '';
|
||||||
|
final menuPath = await RouteService.getMenuPath(parentPerm, targetPerm);
|
||||||
final data = {
|
final data = {
|
||||||
"eqWorkType": SpecialWorkTypeEnum.confinedspaceWork.code,
|
"eqWorkType": SpecialWorkTypeEnum.confinedspaceWork.code,
|
||||||
"pageSize": 999,
|
"pageSize": 999,
|
||||||
"pageIndex": 1,
|
"pageIndex": 1,
|
||||||
"eqCorpinfoId": pd['projectExecutionLocationCorpId'] ?? '',
|
"menuPath": menuPath,
|
||||||
};
|
};
|
||||||
final limitedSpaceRes = await SpecialWorkApi.specialWorkLimitedSpaceList(data);
|
final limitedSpaceRes = await SpecialWorkApi.specialWorkLimitedSpaceList(data);
|
||||||
if (limitedSpaceRes['success'] == true) {
|
if (limitedSpaceRes['success'] == true) {
|
||||||
limitedSpaceList = limitedSpaceRes['data'] ?? [];
|
limitedSpaceList = limitedSpaceRes['data'] ?? [];
|
||||||
}
|
}
|
||||||
// 清空有限空间台账选择的数据
|
|
||||||
_clearRelatedParties();
|
|
||||||
}
|
|
||||||
Future<void> _clearRelatedParties() async {
|
|
||||||
setState(() {
|
|
||||||
pd['limitedSpaceNameAndCode'] = '';
|
|
||||||
pd['chooseLimitedSpace'] = {};
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -237,7 +231,7 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
||||||
if (pd['xgfFlag'] == 1) ...[
|
if (pd['xgfFlag'] == 1) ...[
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 5,
|
||||||
verticalPadding: 0,
|
verticalPadding: 0,
|
||||||
title: '是否项目内作业',
|
title: '是否项目内作业',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
|
|
@ -296,8 +290,7 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
||||||
const Divider(),
|
const Divider(),
|
||||||
// 是否重点管控有限空间
|
// 是否重点管控有限空间
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 5,
|
||||||
verticalPadding: 0,
|
|
||||||
title: '是否重点管控有限空间',
|
title: '是否重点管控有限空间',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
groupValue: isLimitedSpace,
|
groupValue: isLimitedSpace,
|
||||||
|
|
@ -433,7 +426,7 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
||||||
/// 从台账选择有限空间
|
/// 从台账选择有限空间
|
||||||
Future<void> _chooseFromLedger() async {
|
Future<void> _chooseFromLedger() async {
|
||||||
if (limitedSpaceList.isEmpty) {
|
if (limitedSpaceList.isEmpty) {
|
||||||
ToastUtil.showNormal(context, '暂无可选台账,请选择正确的相关方项目');
|
ToastUtil.showNormal(context, '暂无可选台账');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final result = await BottomPicker.show<String>(
|
final result = await BottomPicker.show<String>(
|
||||||
|
|
@ -511,7 +504,7 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
||||||
pd['workGuardianUserDepartmentName'] = data['departmentName'];
|
pd['workGuardianUserDepartmentName'] = data['departmentName'];
|
||||||
allowChoosePerson['2'] = data;
|
allowChoosePerson['2'] = data;
|
||||||
}
|
}
|
||||||
super.clearRelatedPartiesPerson();
|
super.getFlowInit(true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,6 @@ class _SxkjTzApplyPageState extends State<SxkjTzApplyPage> {
|
||||||
const Divider(),
|
const Divider(),
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 2,
|
||||||
verticalPadding: 5,
|
|
||||||
isEdit: _isEditable,
|
isEdit: _isEditable,
|
||||||
title: '是否有应急指导书',
|
title: '是否有应急指导书',
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
|
|
|
||||||
|
|
@ -271,11 +271,14 @@ class _SxkjTzListPageState extends State<SxkjTzListPage> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
key: _scaffoldKey,
|
key: _scaffoldKey,
|
||||||
appBar: MyAppbar(
|
appBar: MyAppbar(
|
||||||
title: '有限空间管理台账',
|
title: '有限空间作业台账',
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
TextButton(
|
||||||
onPressed: _handleApply,
|
onPressed: _handleApply,
|
||||||
icon: const Icon(Icons.add, color: Colors.white, size: 30),
|
child: const Text(
|
||||||
|
'申请',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 17),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -211,9 +211,6 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
if (widget.isReEdit) {
|
if (widget.isReEdit) {
|
||||||
form = _toMap(initRes['data']);
|
form = _toMap(initRes['data']);
|
||||||
pd = _toMap((form['workInfo'] ?? const {})['info'] ?? {});
|
pd = _toMap((form['workInfo'] ?? const {})['info'] ?? {});
|
||||||
if (FormUtils.hasValue(pd, 'xgfId')) {
|
|
||||||
_getRelatedPartiesUserList(true);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
pd = _toMap(initRes['data']);
|
pd = _toMap(initRes['data']);
|
||||||
pd['xgfFlag'] = 1;
|
pd['xgfFlag'] = 1;
|
||||||
|
|
@ -239,6 +236,7 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
await getFlowInit(false);
|
await getFlowInit(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await loadExtraData();
|
||||||
await afterInitDataLoaded();
|
await afterInitDataLoaded();
|
||||||
|
|
||||||
if (enableSafeProtection) {
|
if (enableSafeProtection) {
|
||||||
|
|
@ -479,21 +477,6 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// 现在动火负责人确认负责人
|
|
||||||
void chooseHotworkLeaderConfirmHandle() {
|
|
||||||
DepartmentAllPersonPicker.show(
|
|
||||||
context,
|
|
||||||
allowXgfFlag: false,
|
|
||||||
personsData: allPersonList,
|
|
||||||
serverData: [],
|
|
||||||
onSelectedWithData: (userId, name, data) {
|
|
||||||
setState(() {
|
|
||||||
pd['hotWorkLeaderConfirmUserName'] = name;
|
|
||||||
pd['hotWorkLeaderConfirmUserId'] = userId;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 选择作业单位(部分页面会用到)
|
/// 选择作业单位(部分页面会用到)
|
||||||
void chooseWorkUnitHandle({
|
void chooseWorkUnitHandle({
|
||||||
|
|
@ -589,10 +572,10 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
// 同步更新允许列表,用于安全措施确认人、气体分析人
|
// 同步更新允许列表,用于安全措施确认人、气体分析人
|
||||||
if (stepId == '20') {
|
if (stepId == '20') {
|
||||||
allowChoosePerson['1'] = data;
|
allowChoosePerson['1'] = data;
|
||||||
clearRelatedPartiesPerson();
|
_clearRelatedPartiesPerson();
|
||||||
} else if (stepId == '21') {
|
} else if (stepId == '21') {
|
||||||
allowChoosePerson['2'] = data;
|
allowChoosePerson['2'] = data;
|
||||||
clearRelatedPartiesPerson();
|
_clearRelatedPartiesPerson();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -600,7 +583,7 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清空气体检测人和安全措施确认人
|
// 清空气体检测人和安全措施确认人
|
||||||
void clearRelatedPartiesPerson() {
|
void _clearRelatedPartiesPerson() {
|
||||||
setState(() {
|
setState(() {
|
||||||
for (Map item in groups) {
|
for (Map item in groups) {
|
||||||
final stepId = item['stepId']?.toString() ?? '';
|
final stepId = item['stepId']?.toString() ?? '';
|
||||||
|
|
@ -659,9 +642,7 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
pd['projectExecutionLocationCorpName'] =
|
pd['projectExecutionLocationCorpName'] =
|
||||||
json['projectExecutionLocationCorpName'];
|
json['projectExecutionLocationCorpName'];
|
||||||
});
|
});
|
||||||
loadExtraData();
|
_getRelatedPartiesUserList();
|
||||||
_getRelatedPartiesUserList(false);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onSelected: (id, name, pdId) {},
|
onSelected: (id, name, pdId) {},
|
||||||
),
|
),
|
||||||
|
|
@ -672,7 +653,7 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取相关方企业用户列表
|
// 获取相关方企业用户列表
|
||||||
Future<void> _getRelatedPartiesUserList(bool isInit) async {
|
Future<void> _getRelatedPartiesUserList() async {
|
||||||
try {
|
try {
|
||||||
final personRes = await BasicInfoApi.getDeptUsers(
|
final personRes = await BasicInfoApi.getDeptUsers(
|
||||||
'',
|
'',
|
||||||
|
|
@ -689,9 +670,7 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
);
|
);
|
||||||
if (result['success'] == true) {
|
if (result['success'] == true) {
|
||||||
relatedPartiesPersonList = _toMapList(result['data']);
|
relatedPartiesPersonList = _toMapList(result['data']);
|
||||||
if (!isInit) {
|
_initGroupsFromInitData(true);
|
||||||
_initGroupsFromInitData(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ToastUtil.showError(context, '获取相关方人员失败:$e');
|
ToastUtil.showError(context, '获取相关方人员失败:$e');
|
||||||
|
|
@ -770,8 +749,7 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
if (canSkip == 1) ...[
|
if (canSkip == 1) ...[
|
||||||
if (skipCondition.isEmpty) ...[
|
if (skipCondition.isEmpty) ...[
|
||||||
ListItemFactory.createYesNoSection(
|
ListItemFactory.createYesNoSection(
|
||||||
horizontalPadding: 2,
|
horizontalPadding: 3,
|
||||||
verticalPadding: 0,
|
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
title: '是否$stepName',
|
title: '是否$stepName',
|
||||||
groupValue: pd['${stepId}_skip'] == 1,
|
groupValue: pd['${stepId}_skip'] == 1,
|
||||||
|
|
@ -981,9 +959,6 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
||||||
Future<bool> checkForm(List groupsToCheck) async {
|
Future<bool> checkForm(List groupsToCheck) async {
|
||||||
for (final key in requiredRules.keys) {
|
for (final key in requiredRules.keys) {
|
||||||
if (pd[key] == null || pd[key] == '') {
|
if (pd[key] == null || pd[key] == '') {
|
||||||
if (key == 'hotWorkLeaderConfirmUserName' && pd['workLevel'] != 'hot_work_level0') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
ToastUtil.showNormal(context, '${requiredRules[key] ?? ''}');
|
ToastUtil.showNormal(context, '${requiredRules[key] ?? ''}');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -220,11 +220,7 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
||||||
|
|
||||||
if (steps.isNotEmpty && widget.isEdit) {
|
if (steps.isNotEmpty && widget.isEdit) {
|
||||||
LoadingDialogHelper.show();
|
LoadingDialogHelper.show();
|
||||||
final personRes = await BasicInfoApi.getDeptUsers(
|
final personRes = await BasicInfoApi.getDeptUsers('', isMyCorp: 1);
|
||||||
'',
|
|
||||||
isMyCorp: 0,
|
|
||||||
corpinfoId: _initData['workInfo']['corpinfoId'] ?? '',
|
|
||||||
);
|
|
||||||
LoadingDialogHelper.dismiss();
|
LoadingDialogHelper.dismiss();
|
||||||
if (personRes['success'] == true) {
|
if (personRes['success'] == true) {
|
||||||
_allPersonList = personRes['data'] ?? [];
|
_allPersonList = personRes['data'] ?? [];
|
||||||
|
|
@ -945,7 +941,6 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
||||||
...buildStepSignWidgets(signInfo),
|
...buildStepSignWidgets(signInfo),
|
||||||
|
|
||||||
if (widget.isEdit) ...[
|
if (widget.isEdit) ...[
|
||||||
const Divider(),
|
|
||||||
if (pd['locateStepFlag'] == 1) _locationWidget(),
|
if (pd['locateStepFlag'] == 1) _locationWidget(),
|
||||||
if (pd['componentName'] == 'completeDelayTime') _completeDelayTimeWidget(),
|
if (pd['componentName'] == 'completeDelayTime') _completeDelayTimeWidget(),
|
||||||
if (pd['componentName'] == 'personAnderRecordFile') _personAnderRecordFileWidget(),
|
if (pd['componentName'] == 'personAnderRecordFile') _personAnderRecordFileWidget(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue