diff --git a/lib/customWidget/MultiDictValuesPicker.dart b/lib/customWidget/MultiDictValuesPicker.dart index c2163a7..acd4c07 100644 --- a/lib/customWidget/MultiDictValuesPicker.dart +++ b/lib/customWidget/MultiDictValuesPicker.dart @@ -648,7 +648,7 @@ class _MultiDictValuesPickerState extends State { children: [ _buildActionBar(), const Divider(height: 1), - _buildHintMessage(), + // _buildHintMessage(), Expanded(child: _buildContent()), ], ), diff --git a/lib/pages/home/Tap/special_header.dart b/lib/pages/home/Tap/special_header.dart index 27fb50b..c3677f3 100644 --- a/lib/pages/home/Tap/special_header.dart +++ b/lib/pages/home/Tap/special_header.dart @@ -52,6 +52,9 @@ class SpecialListInitData { "projectExecutionLocationCorpName", "applyUnit", "workId", + "internalOperationFlag", + "hotWorkLeaderConfirmUserName", + "hotWorkLeaderConfirmUserId", // 有限空间 "applyDepartment", "applyUser", diff --git a/lib/pages/home/Tap/special_work/custom/SpecialWorkFilterPage.dart b/lib/pages/home/Tap/special_work/custom/SpecialWorkFilterPage.dart index db1312d..b2d7633 100644 --- a/lib/pages/home/Tap/special_work/custom/SpecialWorkFilterPage.dart +++ b/lib/pages/home/Tap/special_work/custom/SpecialWorkFilterPage.dart @@ -558,7 +558,6 @@ class _SpecialWorkFilterPageState extends State { SpecialWorkTypeEnum.hoistingWork || widget.workType == SpecialWorkTypeEnum.breakgroundWork || - widget.workType == SpecialWorkTypeEnum.blindboardWork || widget.workType == SpecialWorkTypeEnum.cutRoadWork || widget.workType == SpecialWorkTypeEnum.electricityWork) buildChooseRow( labelText: '作业级别', diff --git a/lib/pages/home/Tap/special_work/dh_work/HotWorkDetailFormWidget.dart b/lib/pages/home/Tap/special_work/dh_work/HotWorkDetailFormWidget.dart index c509f03..790f178 100644 --- a/lib/pages/home/Tap/special_work/dh_work/HotWorkDetailFormWidget.dart +++ b/lib/pages/home/Tap/special_work/dh_work/HotWorkDetailFormWidget.dart @@ -170,7 +170,7 @@ class _HotWorkDetailFormWidgetState extends State { const Divider(), ListItemFactory.createYesNoSection( horizontalPadding: 2, - verticalPadding: 7, + verticalPadding: 5, title: '是否项目内作业', isRequired: true, isEdit: false, @@ -235,6 +235,16 @@ class _HotWorkDetailFormWidgetState extends State { onChanged: (value) {}, ), 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) ...[ ItemListWidget.multiLineAutoTitleTextField( label: '动火操作人:', @@ -256,6 +266,8 @@ class _HotWorkDetailFormWidgetState extends State { ], ListItemFactory.createYesNoSection( title: '是否安全总监审批', + horizontalPadding: 2, + verticalPadding: 5, groupValue: true, text: pd['14_skip'] == 1 ? '是' : '否', isEdit: false, @@ -263,6 +275,8 @@ class _HotWorkDetailFormWidgetState extends State { ), const Divider(), ListItemFactory.createYesNoSection( + horizontalPadding: 2, + verticalPadding: 5, title: '是否需要气体检查', groupValue: true, text: pd['gasFlag'] == 1 ? '是' : '否', diff --git a/lib/pages/home/Tap/special_work/dh_work/hot_apply_page.dart b/lib/pages/home/Tap/special_work/dh_work/hot_apply_page.dart index 764bf4e..b90676c 100644 --- a/lib/pages/home/Tap/special_work/dh_work/hot_apply_page.dart +++ b/lib/pages/home/Tap/special_work/dh_work/hot_apply_page.dart @@ -62,6 +62,7 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState "workEndTime": "请选择作业结束时间", "workContent": "请填写作业内容", "workMonitor": "请填写动火监火人", + "hotWorkLeaderConfirmUserName": "请选择动火负责人确认负责人", }; @override @@ -175,7 +176,7 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState if (pd['xgfFlag'] == 1) ...[ const Divider(), ListItemFactory.createYesNoSection( - horizontalPadding: 5, + horizontalPadding: 2, verticalPadding: 0, title: '是否项目内作业', isRequired: true, @@ -276,6 +277,17 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState onChanged: (value) => setState(() => pd['workContent'] = value), ), 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(), const Divider(), @@ -293,6 +305,7 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState if (widget.isReEdit && FormUtils.hasValue(form, 'id')) ...[ HotWorkDetailFormWidget(pd: form, isEditable: true), ], + // 签字流程组(基类提供) buildGroupsList(), // 其他安全措施 diff --git a/lib/pages/home/Tap/special_work/dl_work/dl_apply_page.dart b/lib/pages/home/Tap/special_work/dl_work/dl_apply_page.dart index 91e0e6e..d7a1c2c 100644 --- a/lib/pages/home/Tap/special_work/dl_work/dl_apply_page.dart +++ b/lib/pages/home/Tap/special_work/dl_work/dl_apply_page.dart @@ -171,7 +171,7 @@ class _DlApplyPageState extends SpecialWorkApplyBaseState { if (pd['xgfFlag'] == 1) ...[ const Divider(), ListItemFactory.createYesNoSection( - horizontalPadding: 5, + horizontalPadding: 2, verticalPadding: 0, title: '是否项目内作业', isRequired: true, diff --git a/lib/pages/home/Tap/special_work/dt_work/dt_apply_page.dart b/lib/pages/home/Tap/special_work/dt_work/dt_apply_page.dart index fe5f070..942bee0 100644 --- a/lib/pages/home/Tap/special_work/dt_work/dt_apply_page.dart +++ b/lib/pages/home/Tap/special_work/dt_work/dt_apply_page.dart @@ -170,7 +170,7 @@ class _DtApplyPageState extends SpecialWorkApplyBaseState { if (pd['xgfFlag'] == 1) ...[ const Divider(), ListItemFactory.createYesNoSection( - horizontalPadding: 5, + horizontalPadding: 2, verticalPadding: 0, title: '是否项目内作业', isRequired: true, diff --git a/lib/pages/home/Tap/special_work/dz_work/dz_apply_page.dart b/lib/pages/home/Tap/special_work/dz_work/dz_apply_page.dart index ed293f1..d843e52 100644 --- a/lib/pages/home/Tap/special_work/dz_work/dz_apply_page.dart +++ b/lib/pages/home/Tap/special_work/dz_work/dz_apply_page.dart @@ -166,7 +166,7 @@ class _DzApplyPageState extends SpecialWorkApplyBaseState { const Divider(), ListItemFactory.createYesNoSection( horizontalPadding: 2, - verticalPadding: 7, + verticalPadding: 0, title: '是否项目内作业', isRequired: true, groupValue: pd['internalOperationFlag'] == 1, diff --git a/lib/pages/home/Tap/special_work/gc_work/gc_apply_page.dart b/lib/pages/home/Tap/special_work/gc_work/gc_apply_page.dart index 55ad545..3712eeb 100644 --- a/lib/pages/home/Tap/special_work/gc_work/gc_apply_page.dart +++ b/lib/pages/home/Tap/special_work/gc_work/gc_apply_page.dart @@ -162,7 +162,7 @@ class _GcApplyPageState extends SpecialWorkApplyBaseState { if (pd['xgfFlag'] == 1) ...[ const Divider(), ListItemFactory.createYesNoSection( - horizontalPadding: 5, + horizontalPadding: 2, verticalPadding: 0, title: '是否项目内作业', isRequired: true, diff --git a/lib/pages/home/Tap/special_work/lsyd_work/lsyd_apply_page.dart b/lib/pages/home/Tap/special_work/lsyd_work/lsyd_apply_page.dart index d6cf03e..95f8b9c 100644 --- a/lib/pages/home/Tap/special_work/lsyd_work/lsyd_apply_page.dart +++ b/lib/pages/home/Tap/special_work/lsyd_work/lsyd_apply_page.dart @@ -171,7 +171,7 @@ class _LsydApplyPageState extends SpecialWorkApplyBaseState { if (pd['xgfFlag'] == 1) ...[ const Divider(), ListItemFactory.createYesNoSection( - horizontalPadding: 5, + horizontalPadding: 2, verticalPadding: 0, title: '是否项目内作业', isRequired: true, diff --git a/lib/pages/home/Tap/special_work/mbcd_work/mbcd_apply_page.dart b/lib/pages/home/Tap/special_work/mbcd_work/mbcd_apply_page.dart index 67d96cd..7140497 100644 --- a/lib/pages/home/Tap/special_work/mbcd_work/mbcd_apply_page.dart +++ b/lib/pages/home/Tap/special_work/mbcd_work/mbcd_apply_page.dart @@ -212,7 +212,7 @@ class _MbcdApplyPageState extends SpecialWorkApplyBaseState { if (pd['xgfFlag'] == 1) ...[ const Divider(), ListItemFactory.createYesNoSection( - horizontalPadding: 5, + horizontalPadding: 2, verticalPadding: 0, title: '是否项目内作业', isRequired: true, diff --git a/lib/pages/home/Tap/special_work/sxkj_work/sxkj_apply_page.dart b/lib/pages/home/Tap/special_work/sxkj_work/sxkj_apply_page.dart index 76a6020..379faaa 100644 --- a/lib/pages/home/Tap/special_work/sxkj_work/sxkj_apply_page.dart +++ b/lib/pages/home/Tap/special_work/sxkj_work/sxkj_apply_page.dart @@ -80,12 +80,21 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState { "eqWorkType": SpecialWorkTypeEnum.confinedspaceWork.code, "pageSize": 999, "pageIndex": 1, - "eqCorpinfoId": pd['projectExecutionLocationCorpId'], + "eqCorpinfoId": pd['projectExecutionLocationCorpId'] ?? '', }; final limitedSpaceRes = await SpecialWorkApi.specialWorkLimitedSpaceList(data); if (limitedSpaceRes['success'] == true) { limitedSpaceList = limitedSpaceRes['data'] ?? []; } + // 清空有限空间台账选择的数据 + _clearRelatedParties(); + } + Future _clearRelatedParties() async { + setState(() { + pd['limitedSpaceNameAndCode'] = ''; + pd['chooseLimitedSpace'] = {}; + }); + } @override @@ -228,7 +237,7 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState { if (pd['xgfFlag'] == 1) ...[ const Divider(), ListItemFactory.createYesNoSection( - horizontalPadding: 5, + horizontalPadding: 2, verticalPadding: 0, title: '是否项目内作业', isRequired: true, @@ -287,7 +296,8 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState { const Divider(), // 是否重点管控有限空间 ListItemFactory.createYesNoSection( - horizontalPadding: 5, + horizontalPadding: 2, + verticalPadding: 0, title: '是否重点管控有限空间', isRequired: true, groupValue: isLimitedSpace, diff --git a/lib/pages/home/Tap/special_work/sxkj_work/tz/sxkj_tz_apply_page.dart b/lib/pages/home/Tap/special_work/sxkj_work/tz/sxkj_tz_apply_page.dart index 4b03db3..3db3c43 100644 --- a/lib/pages/home/Tap/special_work/sxkj_work/tz/sxkj_tz_apply_page.dart +++ b/lib/pages/home/Tap/special_work/sxkj_work/tz/sxkj_tz_apply_page.dart @@ -339,6 +339,7 @@ class _SxkjTzApplyPageState extends State { const Divider(), ListItemFactory.createYesNoSection( horizontalPadding: 2, + verticalPadding: 5, isEdit: _isEditable, title: '是否有应急指导书', isRequired: true, diff --git a/lib/pages/home/Tap/special_work/sxkj_work/tz/sxkj_tz_list_page.dart b/lib/pages/home/Tap/special_work/sxkj_work/tz/sxkj_tz_list_page.dart index 1f307ee..4f30d95 100644 --- a/lib/pages/home/Tap/special_work/sxkj_work/tz/sxkj_tz_list_page.dart +++ b/lib/pages/home/Tap/special_work/sxkj_work/tz/sxkj_tz_list_page.dart @@ -271,14 +271,11 @@ class _SxkjTzListPageState extends State { return Scaffold( key: _scaffoldKey, appBar: MyAppbar( - title: '有限空间作业台账', + title: '有限空间管理台账', actions: [ - TextButton( + IconButton( onPressed: _handleApply, - child: const Text( - '申请', - style: TextStyle(color: Colors.white, fontSize: 17), - ), + icon: const Icon(Icons.add, color: Colors.white, size: 30), ), ], ), diff --git a/lib/pages/home/Tap/special_work_apply_base_page.dart b/lib/pages/home/Tap/special_work_apply_base_page.dart index 3d469a0..0ddfac4 100644 --- a/lib/pages/home/Tap/special_work_apply_base_page.dart +++ b/lib/pages/home/Tap/special_work_apply_base_page.dart @@ -211,6 +211,9 @@ abstract class SpecialWorkApplyBaseState if (widget.isReEdit) { form = _toMap(initRes['data']); pd = _toMap((form['workInfo'] ?? const {})['info'] ?? {}); + if (FormUtils.hasValue(pd, 'xgfId')) { + _getRelatedPartiesUserList(true); + } } else { pd = _toMap(initRes['data']); pd['xgfFlag'] = 1; @@ -476,6 +479,21 @@ abstract class SpecialWorkApplyBaseState ), ); } + // 现在动火负责人确认负责人 + void chooseHotworkLeaderConfirmHandle() { + DepartmentAllPersonPicker.show( + context, + allowXgfFlag: false, + personsData: allPersonList, + serverData: [], + onSelectedWithData: (userId, name, data) { + setState(() { + pd['hotWorkLeaderConfirmUserName'] = name; + pd['hotWorkLeaderConfirmUserId'] = userId; + }); + }, + ); + } /// 选择作业单位(部分页面会用到) void chooseWorkUnitHandle({ @@ -642,7 +660,8 @@ abstract class SpecialWorkApplyBaseState json['projectExecutionLocationCorpName']; }); loadExtraData(); - _getRelatedPartiesUserList(); + _getRelatedPartiesUserList(false); + }, onSelected: (id, name, pdId) {}, ), @@ -653,7 +672,7 @@ abstract class SpecialWorkApplyBaseState } // 获取相关方企业用户列表 - Future _getRelatedPartiesUserList() async { + Future _getRelatedPartiesUserList(bool isInit) async { try { final personRes = await BasicInfoApi.getDeptUsers( '', @@ -670,7 +689,9 @@ abstract class SpecialWorkApplyBaseState ); if (result['success'] == true) { relatedPartiesPersonList = _toMapList(result['data']); - _initGroupsFromInitData(true); + if (!isInit) { + _initGroupsFromInitData(true); + } } } catch (e) { ToastUtil.showError(context, '获取相关方人员失败:$e'); @@ -749,7 +770,8 @@ abstract class SpecialWorkApplyBaseState if (canSkip == 1) ...[ if (skipCondition.isEmpty) ...[ ListItemFactory.createYesNoSection( - horizontalPadding: 3, + horizontalPadding: 2, + verticalPadding: 0, isRequired: true, title: '是否$stepName', groupValue: pd['${stepId}_skip'] == 1, @@ -959,6 +981,9 @@ abstract class SpecialWorkApplyBaseState Future checkForm(List groupsToCheck) async { for (final key in requiredRules.keys) { if (pd[key] == null || pd[key] == '') { + if (key == 'hotWorkLeaderConfirmUserName' && pd['workLevel'] != 'hot_work_level0') { + continue; + } ToastUtil.showNormal(context, '${requiredRules[key] ?? ''}'); return false; } diff --git a/lib/pages/home/Tap/special_work_task_page_base.dart b/lib/pages/home/Tap/special_work_task_page_base.dart index 7a308ca..b07a294 100644 --- a/lib/pages/home/Tap/special_work_task_page_base.dart +++ b/lib/pages/home/Tap/special_work_task_page_base.dart @@ -220,7 +220,11 @@ class _SpecialWorkTaskPageBaseState extends State { if (steps.isNotEmpty && widget.isEdit) { LoadingDialogHelper.show(); - final personRes = await BasicInfoApi.getDeptUsers('', isMyCorp: 1); + final personRes = await BasicInfoApi.getDeptUsers( + '', + isMyCorp: 0, + corpinfoId: _initData['workInfo']['corpinfoId'] ?? '', + ); LoadingDialogHelper.dismiss(); if (personRes['success'] == true) { _allPersonList = personRes['data'] ?? []; @@ -941,6 +945,7 @@ class _SpecialWorkTaskPageBaseState extends State { ...buildStepSignWidgets(signInfo), if (widget.isEdit) ...[ + const Divider(), if (pd['locateStepFlag'] == 1) _locationWidget(), if (pd['componentName'] == 'completeDelayTime') _completeDelayTimeWidget(), if (pd['componentName'] == 'personAnderRecordFile') _personAnderRecordFileWidget(),