危险作业bug修改6
parent
a1fdfef4b6
commit
7596efb750
|
|
@ -68,7 +68,7 @@ class DepartmentAllPersonPicker {
|
|||
static Future<void> show(
|
||||
BuildContext context, {
|
||||
required List<dynamic> personsData,
|
||||
List<dynamic>? serverData,
|
||||
required List<dynamic> serverData,
|
||||
bool allowXgfFlag = true,
|
||||
bool multiSelect = false,
|
||||
PersonMultiSelectCallback? onMultiSelected,
|
||||
|
|
@ -113,7 +113,7 @@ class DepartmentAllPersonPicker {
|
|||
|
||||
class _DepartmentAllPersonPickerSheet extends StatefulWidget {
|
||||
final List<dynamic> personsData;
|
||||
final List<dynamic>? serverData;
|
||||
final List<dynamic> serverData;
|
||||
final bool allowXgfFlag;
|
||||
final bool multiSelect;
|
||||
|
||||
|
|
@ -184,12 +184,24 @@ class _DepartmentAllPersonPickerSheetState extends State<_DepartmentAllPersonPic
|
|||
uniqueMap[key] = item;
|
||||
}
|
||||
}
|
||||
final Map<dynamic, dynamic> uniqueMap2 = {};
|
||||
|
||||
if (widget.serverData.length > 0) {
|
||||
for (final item in widget.serverData) {
|
||||
if (item is Map<String, dynamic>) {
|
||||
final key = item['id'] ?? item['actUser']; // id去重
|
||||
uniqueMap2[key] = item;
|
||||
}
|
||||
} }
|
||||
|
||||
|
||||
|
||||
final List<dynamic> list = uniqueMap.values.toList();
|
||||
_personAll = list.map((e) => Person.fromJson(e)).toList();
|
||||
|
||||
final List<dynamic> list2 = uniqueMap2.values.toList();
|
||||
|
||||
_serverAll = (widget.serverData ?? []).map((e) => Person.fromJson(e)).toList();
|
||||
_serverAll = list2.map((e) => Person.fromJson(e)).toList();
|
||||
|
||||
_personFiltered = List.from(_personAll);
|
||||
_serverFiltered = List.from(_serverAll);
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ class _MeasureslistsureState extends State<Measureslistsure> {
|
|||
vertical: 12,
|
||||
horizontal: 5,
|
||||
),
|
||||
child: Text('${widget.item['content']}'.replaceAll('&&', '__')),
|
||||
child: Text('${widget.item['content']}'.replaceAll('&&', '____')),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(0),
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class _MeasuresListWidgetState extends State<MeasuresListWidget> {
|
|||
item['signPath'] =
|
||||
'1983773013086048256/202604/special_operation_process_signature_photo/7da0a8e8eeef403f9c1973f0c566cd24.png';
|
||||
item['signTime'] = DateFormat(
|
||||
'yyyy-MM-dd HH:mm',
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
).format(DateTime.now());
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -134,6 +134,14 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
if (FormUtils.hasValue(widget.pd, 'checkNo') && !widget.isEditable) ...[
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: widget.pd['checkNo'] ?? '',
|
||||
),
|
||||
const Divider(),
|
||||
],
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
isEditable: false,
|
||||
|
|
@ -145,14 +153,6 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
|||
isEditable: false,
|
||||
text: pd['applyUser'] ?? '',
|
||||
),
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !widget.isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: pd['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '申请日期:',
|
||||
|
|
@ -178,7 +178,7 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
|||
groupValue: null, onChanged: (bool value) { },
|
||||
|
||||
),
|
||||
const Divider(height: 1),
|
||||
const Divider(),
|
||||
|
||||
// 相关方作业
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
@ -305,31 +305,6 @@ class _HotWorkDetailFormWidgetState extends State<HotWorkDetailFormWidget> {
|
|||
),
|
||||
const Divider(),
|
||||
],
|
||||
if (_otherMeasuresList.isNotEmpty) ...[
|
||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children:
|
||||
_otherMeasuresList.map<Widget>((item) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 12.0,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'${item['stepName'] ?? ''}:${item['content'] ?? ''}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
const Divider(),
|
||||
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
|
|
|
|||
|
|
@ -46,37 +46,18 @@ class DhWaitPage extends SpecialWorkWaitPageBase {
|
|||
) async {
|
||||
final hotworkId = item['id'] ?? '';
|
||||
final hotworkCodeId = item['workId'] ?? '';
|
||||
final hotworkInfo =
|
||||
listType == SpecialListType.task ? item['workInfo'] : item;
|
||||
final hotworkInfo = listType == SpecialListType.task ? (item['workInfo'] ?? {}) : item;
|
||||
|
||||
final stepId = '${item['stepId'] ?? ''}';
|
||||
final status = '${hotworkInfo['status']}';
|
||||
final String statusName =
|
||||
listType == SpecialListType.task
|
||||
final status = '${hotworkInfo['status'] ?? ''}';
|
||||
final stepName = isEdit
|
||||
? (listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}';
|
||||
: '${hotworkInfo['currentStep'] ?? ''}')
|
||||
: '查看';
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (stepId == '2') {
|
||||
if (status == '0' || status == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
SpecialWorkGasList(data: item, addFlag: stepId == '2'),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
HotTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (status == '0') {
|
||||
await pushPage(
|
||||
HotWorkApplyPage(
|
||||
isReEdit: true,
|
||||
|
|
@ -85,64 +66,36 @@ class DhWaitPage extends SpecialWorkWaitPageBase {
|
|||
),
|
||||
context,
|
||||
);
|
||||
} else if (status == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
HotWorkApplyPage(
|
||||
isReEdit: true,
|
||||
workId: hotworkId,
|
||||
status: status,
|
||||
),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
HotTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: '查看',
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
} else if (stepId == '12') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
HotDelayPage(data: item, isEdit: true),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
HotTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
await pushPage(
|
||||
HotTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
await pushPage(
|
||||
HotTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
HotTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
|
|
|
|||
|
|
@ -119,6 +119,15 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
// 作业编号(只读,仅在详情模式下显示)
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: initData['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
// 申请单位(只读)
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
|
|
@ -132,15 +141,6 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
|||
isEditable: false,
|
||||
text: pd['applyUser'] ?? '',
|
||||
),
|
||||
// 作业编号(只读,仅在详情模式下显示)
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: initData['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
const Divider(),
|
||||
// 申请日期
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
@ -179,7 +179,7 @@ class _HotWorkApplyPageState extends SpecialWorkApplyBaseState<HotWorkApplyPage>
|
|||
verticalPadding: 0,
|
||||
title: '是否项目内作业',
|
||||
isRequired: true,
|
||||
groupValue: isInnerWork,
|
||||
groupValue: pd['internalOperationFlag'] == 1,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isInnerWork = value;
|
||||
|
|
|
|||
|
|
@ -211,6 +211,8 @@ class _HotDelayPageState extends State<HotDelayPage> {
|
|||
}
|
||||
|
||||
void _onAdd() async {
|
||||
final time = DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now());
|
||||
addData['delayHotTime'] = time;
|
||||
await SpecialWorkGasAlert.show(
|
||||
context,
|
||||
title: '添加',
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class _BreakgroundDetailFormWidgetState extends State<BreakgroundDetailFormWidge
|
|||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
if (FormUtils.hasValue(widget.pd, 'checkNo') && !widget.isEditable) ...[
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '编号:',
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: widget.pd['checkNo'] ?? '',
|
||||
),
|
||||
|
|
@ -163,7 +163,7 @@ class _BreakgroundDetailFormWidgetState extends State<BreakgroundDetailFormWidge
|
|||
groupValue: null, onChanged: (bool value) { },
|
||||
|
||||
),
|
||||
const Divider(height: 1),
|
||||
const Divider(),
|
||||
|
||||
// 相关方作业
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
@ -270,30 +270,7 @@ class _BreakgroundDetailFormWidgetState extends State<BreakgroundDetailFormWidge
|
|||
isAllowEdit: false,
|
||||
),
|
||||
],
|
||||
if (_otherMeasuresList.isNotEmpty) ...[
|
||||
const Divider(),
|
||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children:
|
||||
_otherMeasuresList.map<Widget>((item) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 12.0,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'${item['stepName'] ?? ''}:${item['content'] ?? ''}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class _DlApplyPageState extends SpecialWorkApplyBaseState<DlApplyPage> {
|
|||
bool get enableLocation => true; // 使用基类定位组件,但定位跳转需自定义
|
||||
|
||||
@override
|
||||
bool get enableRiskResults => false; // 使用自定义风险辨识结果选择
|
||||
bool get enableRiskResults => true; // 使用自定义风险辨识结果选择
|
||||
|
||||
@override
|
||||
UploadFileType? get imageUploadType => UploadFileType.specialOperationApplyInvolvedPhoto;
|
||||
|
|
@ -135,6 +135,15 @@ class _DlApplyPageState extends SpecialWorkApplyBaseState<DlApplyPage> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
// 作业编号(只读,仅在详情模式下显示)
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: initData['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
// 申请单位(只读)
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
|
|
@ -166,7 +175,7 @@ class _DlApplyPageState extends SpecialWorkApplyBaseState<DlApplyPage> {
|
|||
verticalPadding: 0,
|
||||
title: '是否项目内作业',
|
||||
isRequired: true,
|
||||
groupValue: isInnerWork,
|
||||
groupValue: pd['internalOperationFlag'] == 1,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isInnerWork = value;
|
||||
|
|
|
|||
|
|
@ -44,41 +44,52 @@ class DlWaitPage extends SpecialWorkWaitPageBase {
|
|||
) async {
|
||||
final hotworkId = item['id'] ?? '';
|
||||
final hotworkCodeId = item['workId'] ?? '';
|
||||
final hotworkInfo =
|
||||
listType == SpecialListType.task ? item['workInfo'] : item;
|
||||
final hotworkInfo = listType == SpecialListType.task ? (item['workInfo'] ?? {}) : item;
|
||||
|
||||
final status = '${hotworkInfo['status']}';
|
||||
final String statusName =
|
||||
listType == SpecialListType.task
|
||||
final status = '${hotworkInfo['status'] ?? ''}';
|
||||
final stepName = isEdit
|
||||
? (listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}';
|
||||
: '${hotworkInfo['currentStep'] ?? ''}')
|
||||
: '查看';
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (status == '0' || status == '2') {
|
||||
await pushPage(
|
||||
DlApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
if (context.mounted) {
|
||||
(context as Element).markNeedsBuild();
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
DlApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
DlTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
await pushPage(
|
||||
DlTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await pushPage(
|
||||
DlTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
DlTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class _CutRoadDetailFormWidgetState extends State<CutRoadDetailFormWidget> {
|
|||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
if (FormUtils.hasValue(widget.pd, 'checkNo') && !widget.isEditable) ...[
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '编号:',
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: widget.pd['checkNo'] ?? '',
|
||||
),
|
||||
|
|
@ -163,7 +163,7 @@ class _CutRoadDetailFormWidgetState extends State<CutRoadDetailFormWidget> {
|
|||
groupValue: null, onChanged: (bool value) { },
|
||||
|
||||
),
|
||||
const Divider(height: 1),
|
||||
const Divider(),
|
||||
|
||||
// 相关方作业
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
@ -250,23 +250,6 @@ class _CutRoadDetailFormWidgetState extends State<CutRoadDetailFormWidget> {
|
|||
controller: null,
|
||||
text: riskShowStr,
|
||||
),
|
||||
const Divider(),
|
||||
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '作业实施开始时间:',
|
||||
isEditable: false,
|
||||
onTap: () async {
|
||||
},
|
||||
text: pd['workStartTime'] ?? '',
|
||||
),
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '作业实施结束时间:',
|
||||
isEditable: false,
|
||||
onTap: () async {
|
||||
},
|
||||
text: pd['workEndTime'] ?? '',
|
||||
),
|
||||
],
|
||||
|
||||
|
||||
|
|
@ -278,30 +261,7 @@ class _CutRoadDetailFormWidgetState extends State<CutRoadDetailFormWidget> {
|
|||
isAllowEdit: false,
|
||||
),
|
||||
],
|
||||
if (_otherMeasuresList.isNotEmpty) ...[
|
||||
const Divider(),
|
||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children:
|
||||
_otherMeasuresList.map<Widget>((item) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 12.0,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'${item['stepName'] ?? ''}:${item['content'] ?? ''}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -134,6 +134,15 @@ class _DtApplyPageState extends SpecialWorkApplyBaseState<DtApplyPage> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
// 作业编号(只读,仅在详情模式下显示)
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: initData['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
// 申请单位(只读)
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
|
|
@ -165,7 +174,7 @@ class _DtApplyPageState extends SpecialWorkApplyBaseState<DtApplyPage> {
|
|||
verticalPadding: 0,
|
||||
title: '是否项目内作业',
|
||||
isRequired: true,
|
||||
groupValue: isInnerWork,
|
||||
groupValue: pd['internalOperationFlag'] == 1,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isInnerWork = value;
|
||||
|
|
|
|||
|
|
@ -44,38 +44,52 @@ class DtWaitPage extends SpecialWorkWaitPageBase {
|
|||
) async {
|
||||
final hotworkId = item['id'] ?? '';
|
||||
final hotworkCodeId = item['workId'] ?? '';
|
||||
final hotworkInfo =
|
||||
listType == SpecialListType.task ? item['workInfo'] : item;
|
||||
final hotworkInfo = listType == SpecialListType.task ? (item['workInfo'] ?? {}) : item;
|
||||
|
||||
final status = '${hotworkInfo['status']}';
|
||||
final String statusName =
|
||||
listType == SpecialListType.task
|
||||
final status = '${hotworkInfo['status'] ?? ''}';
|
||||
final stepName = isEdit
|
||||
? (listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}';
|
||||
: '${hotworkInfo['currentStep'] ?? ''}')
|
||||
: '查看';
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (status == '0' || status == '2') {
|
||||
await pushPage(
|
||||
DtApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
DtTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
DtApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
DtTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
await pushPage(
|
||||
DtTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
DtTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
|
|
|
|||
|
|
@ -129,6 +129,15 @@ class _DzApplyPageState extends SpecialWorkApplyBaseState<DzApplyPage> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
// 作业编号(只读,仅在详情模式下显示)
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: initData['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
// 申请单位(只读)
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
|
|
@ -156,11 +165,11 @@ class _DzApplyPageState extends SpecialWorkApplyBaseState<DzApplyPage> {
|
|||
if (pd['xgfFlag'] == 1) ...[
|
||||
const Divider(),
|
||||
ListItemFactory.createYesNoSection(
|
||||
horizontalPadding: 5,
|
||||
verticalPadding: 0,
|
||||
horizontalPadding: 2,
|
||||
verticalPadding: 7,
|
||||
title: '是否项目内作业',
|
||||
isRequired: true,
|
||||
groupValue: isInnerWork,
|
||||
groupValue: pd['internalOperationFlag'] == 1,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isInnerWork = value;
|
||||
|
|
|
|||
|
|
@ -44,43 +44,52 @@ class DzWaitPage extends SpecialWorkWaitPageBase {
|
|||
) async {
|
||||
final hotworkId = item['id'] ?? '';
|
||||
final hotworkCodeId = item['workId'] ?? '';
|
||||
final hotworkInfo =
|
||||
listType == SpecialListType.task ? item['workInfo'] : item;
|
||||
final hotworkInfo = listType == SpecialListType.task ? (item['workInfo'] ?? {}) : item;
|
||||
|
||||
final status = '${hotworkInfo['status']}';
|
||||
final String statusName =
|
||||
listType == SpecialListType.task
|
||||
final status = '${hotworkInfo['status'] ?? ''}';
|
||||
final stepName = isEdit
|
||||
? (listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}';
|
||||
: '${hotworkInfo['currentStep'] ?? ''}')
|
||||
: '查看';
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (status == '0') {
|
||||
await pushPage(
|
||||
DzApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else if (status == '2') {
|
||||
await pushPage(
|
||||
DzApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
DzTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
if (status == '0' || status == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
DzApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
DzTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
await pushPage(
|
||||
DzTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
DzTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class _HoistingDetailFormWidgetState extends State<HoistingDetailFormWidget> {
|
|||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
if (FormUtils.hasValue(widget.pd, 'checkNo') && !widget.isEditable) ...[
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '编号:',
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: widget.pd['checkNo'] ?? '',
|
||||
),
|
||||
|
|
@ -162,7 +162,7 @@ class _HoistingDetailFormWidgetState extends State<HoistingDetailFormWidget> {
|
|||
groupValue: null, onChanged: (bool value) { },
|
||||
|
||||
),
|
||||
const Divider(height: 1),
|
||||
const Divider(),
|
||||
|
||||
// 相关方作业
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
@ -289,30 +289,7 @@ class _HoistingDetailFormWidgetState extends State<HoistingDetailFormWidget> {
|
|||
isAllowEdit: false,
|
||||
),
|
||||
],
|
||||
if (_otherMeasuresList.isNotEmpty) ...[
|
||||
const Divider(),
|
||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children:
|
||||
_otherMeasuresList.map<Widget>((item) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 12.0,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'${item['stepName'] ?? ''}:${item['content'] ?? ''}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
|
||||
|
||||
|
||||
],
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class _HeighWorkDetailFormWidgetState extends State<HeighWorkDetailFormWidget> {
|
|||
if (FormUtils.hasValue(widget.pd, 'checkNo') &&
|
||||
!widget.isEditable) ...[
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '编号:',
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: widget.pd['checkNo'] ?? '',
|
||||
),
|
||||
|
|
@ -159,7 +159,7 @@ class _HeighWorkDetailFormWidgetState extends State<HeighWorkDetailFormWidget> {
|
|||
groupValue: null,
|
||||
onChanged: (bool value) {},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
const Divider(),
|
||||
|
||||
// 相关方作业
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
@ -258,30 +258,7 @@ class _HeighWorkDetailFormWidgetState extends State<HeighWorkDetailFormWidget> {
|
|||
isAllowEdit: false,
|
||||
),
|
||||
],
|
||||
if (_otherMeasuresList.isNotEmpty) ...[
|
||||
const Divider(),
|
||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children:
|
||||
_otherMeasuresList.map<Widget>((item) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 12.0,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'${item['stepName'] ?? ''}:${item['content'] ?? ''}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -126,6 +126,15 @@ class _GcApplyPageState extends SpecialWorkApplyBaseState<GcApplyPage> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
// 作业编号(只读,仅在详情模式下显示)
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: initData['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
// 申请单位(只读)
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
|
|
@ -157,7 +166,7 @@ class _GcApplyPageState extends SpecialWorkApplyBaseState<GcApplyPage> {
|
|||
verticalPadding: 0,
|
||||
title: '是否项目内作业',
|
||||
isRequired: true,
|
||||
groupValue: isInnerWork,
|
||||
groupValue: pd['internalOperationFlag'] == 1,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isInnerWork = value;
|
||||
|
|
|
|||
|
|
@ -44,74 +44,81 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
|||
) async {
|
||||
final hotworkId = item['id'] ?? '';
|
||||
final hotworkCodeId = item['workId'] ?? '';
|
||||
final hotworkInfo =
|
||||
listType == SpecialListType.task ? item['workInfo'] : item;
|
||||
final hotworkInfo = listType == SpecialListType.task ? (item['workInfo'] ?? {}) : item;
|
||||
|
||||
final stepId = '${item['stepId'] ?? ''}';
|
||||
final status = '${hotworkInfo['status']}';
|
||||
final String statusName =
|
||||
listType == SpecialListType.task
|
||||
final status = '${hotworkInfo['status'] ?? ''}';
|
||||
final stepName = isEdit
|
||||
? (listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}';
|
||||
: '${hotworkInfo['currentStep'] ?? ''}')
|
||||
: '查看';
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (stepId == '2') {
|
||||
} else {
|
||||
if (status == '0') {
|
||||
await pushPage(
|
||||
GcTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (status == '0' || status == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
GcApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else if (status == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
GcApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
GcTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: '查看',
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
} else if (stepId == '12') {
|
||||
if (isEdit) {
|
||||
} else {
|
||||
await pushPage(
|
||||
GcTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
await pushPage(
|
||||
GcTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (stepId == '12') {
|
||||
await pushPage(
|
||||
GcTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await pushPage(
|
||||
GcTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
GcTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
|
|
@ -129,9 +136,16 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
|||
Map<String, dynamic> info,
|
||||
String statusName,
|
||||
) {
|
||||
final step10 = Map<String, dynamic>.from(info['step_10'] ?? {});
|
||||
final step4 = Map<String, dynamic>.from(info['step_4'] ?? {});
|
||||
final step6 = Map<String, dynamic>.from(info['step_6'] ?? {});
|
||||
// 获取各个步骤的人员信息(按原逻辑)
|
||||
String actUserUnit = info['step_21']?['actUserDepartmentName'] ?? '';
|
||||
String safeDisclosureUserName = info['step_18']?['actUserName'] ?? '';
|
||||
String acceptDisclosureUserName = info['step_19']?['actUserName'] ?? '';
|
||||
String guardianUserName = info['step_20']?['actUserName'] ?? '';
|
||||
String workUserName = info['step_21']?['actUserName'] ?? '';
|
||||
String unitLeaderUserName = info['step_22']?['actUserName'] ?? '';
|
||||
String auditDepartmentLeaderUserName = info['step_23']?['actUserName'] ?? '';
|
||||
String spDepartmentLeaderUserName = info['step_24']?['actUserName'] ?? '';
|
||||
String acceptDepartmentLeaderUserName = info['step_25']?['actUserName'] ?? '';
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
|
@ -141,7 +155,7 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'编号: ${workInfo['checkNo'] ?? ''}',
|
||||
"编号: ${item['checkNo'] ?? ''}",
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
|
@ -154,8 +168,7 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
|||
],
|
||||
),
|
||||
Text(
|
||||
'动火等级: ${info['workLevelName'] ?? ''}',
|
||||
textAlign: TextAlign.right,
|
||||
"施工单位: $actUserUnit",
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
|
@ -168,7 +181,7 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'申请人: ${info['applyUser'] ?? ''}',
|
||||
"申请人: ${info['applyUser'] ?? ''}",
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
overflow: TextOverflow.visible,
|
||||
|
|
@ -177,7 +190,7 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
|||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'申请部门: ${info['applyDepartment'] ?? ''}',
|
||||
"申请单位: ${info['applyDepartment'] ?? ''}",
|
||||
textAlign: TextAlign.right,
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
|
|
@ -189,42 +202,41 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'现场负责人: ${step10['actUserName'] ?? ''}',
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
textAlign: TextAlign.right,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
Text(
|
||||
'动火单位负责人: ${step4['actUserName'] ?? ''}',
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
Text("作业负责人: $workUserName",
|
||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||
Text("所在单位负责人: $unitLeaderUserName",
|
||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("审核部门负责人: $auditDepartmentLeaderUserName",
|
||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||
Text("审批部门负责人: $spDepartmentLeaderUserName",
|
||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("监护人: $guardianUserName",
|
||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||
Text("安全交底人: $safeDisclosureUserName",
|
||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("接受交底人: $acceptDisclosureUserName",
|
||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||
Text("验收部门负责人: $acceptDepartmentLeaderUserName",
|
||||
softWrap: true, maxLines: null, overflow: TextOverflow.visible),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'现场管辖单位负责人: ${step6['actUserName'] ?? ''}',
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
Text(
|
||||
'作业内容: ${info['workContent'] ?? ''}',
|
||||
textAlign: TextAlign.left,
|
||||
softWrap: true,
|
||||
maxLines: 3,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
Text(
|
||||
'动火部位: ${info['work_place'] ?? ''}',
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
Text(
|
||||
'作业类型: ${info['operationTypeName'] ?? ''}',
|
||||
"作业类型: ${info['operationTypeName'] ?? ''}",
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
overflow: TextOverflow.visible,
|
||||
|
|
@ -233,7 +245,7 @@ class GcWaitPage extends SpecialWorkWaitPageBase {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'审核状态: $statusName',
|
||||
"审核状态: $statusName",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
|
|
|
|||
|
|
@ -126,6 +126,14 @@ class _LsydWorkDetailFormWidgetState extends State<LsydWorkDetailFormWidget> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
if (FormUtils.hasValue(widget.pd, 'checkNo') && !widget.isEditable) ...[
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: widget.pd['checkNo'] ?? '',
|
||||
),
|
||||
const Divider(),
|
||||
],
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
isEditable: false,
|
||||
|
|
@ -137,14 +145,6 @@ class _LsydWorkDetailFormWidgetState extends State<LsydWorkDetailFormWidget> {
|
|||
isEditable: false,
|
||||
text: pd['applyUser'] ?? '',
|
||||
),
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !widget.isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: pd['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '作业类型:',
|
||||
|
|
@ -163,7 +163,7 @@ class _LsydWorkDetailFormWidgetState extends State<LsydWorkDetailFormWidget> {
|
|||
groupValue: null, onChanged: (bool value) { },
|
||||
|
||||
),
|
||||
const Divider(height: 1),
|
||||
const Divider(),
|
||||
|
||||
// 相关方作业
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
@ -317,30 +317,7 @@ class _LsydWorkDetailFormWidgetState extends State<LsydWorkDetailFormWidget> {
|
|||
isAllowEdit: false,
|
||||
),
|
||||
],
|
||||
if (_otherMeasuresList.isNotEmpty) ...[
|
||||
const Divider(),
|
||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children:
|
||||
_otherMeasuresList.map<Widget>((item) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 12.0,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'${item['stepName'] ?? ''}:${item['content'] ?? ''}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -135,6 +135,15 @@ class _LsydApplyPageState extends SpecialWorkApplyBaseState<LsydApplyPage> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
// 作业编号(只读,仅在详情模式下显示)
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: initData['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
// 申请单位
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
|
|
@ -166,7 +175,7 @@ class _LsydApplyPageState extends SpecialWorkApplyBaseState<LsydApplyPage> {
|
|||
verticalPadding: 0,
|
||||
title: '是否项目内作业',
|
||||
isRequired: true,
|
||||
groupValue: isInnerWork,
|
||||
groupValue: pd['internalOperationFlag'] == 1,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isInnerWork = value;
|
||||
|
|
|
|||
|
|
@ -46,70 +46,64 @@ class LsydWaitPage extends SpecialWorkWaitPageBase {
|
|||
final hotworkId = item['id'] ?? '';
|
||||
final hotworkCodeId = item['workId'] ?? '';
|
||||
final hotworkInfo =
|
||||
listType == SpecialListType.task ? item['workInfo'] : item;
|
||||
listType == SpecialListType.task ? (item['workInfo'] ?? {}) : item;
|
||||
|
||||
final stepId = '${item['stepId'] ?? ''}';
|
||||
final status = '${hotworkInfo['status']}';
|
||||
final String statusName =
|
||||
listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}';
|
||||
final status = '${hotworkInfo['status'] ?? ''}';
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (stepId == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
SpecialWorkGasList(data: item, addFlag: stepId == '2'),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
LsydTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (status == '0') {
|
||||
await pushPage(
|
||||
LsydApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else if (status == '2') {
|
||||
await pushPage(
|
||||
LsydApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
LsydTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
final String stepName = isEdit
|
||||
? (listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}')
|
||||
: '查看';
|
||||
|
||||
Future<void> openTaskPage({required bool editable}) async {
|
||||
await pushPage(
|
||||
LsydTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
isEdit: editable,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (stepId == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
SpecialWorkGasList(data: item, addFlag: true),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await openTaskPage(editable: false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (status == '0' || status == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
LsydApplyPage(
|
||||
isReEdit: true,
|
||||
work_id: hotworkId,
|
||||
status: status,
|
||||
),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await openTaskPage(editable: false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
await openTaskPage(editable: isEdit);
|
||||
return;
|
||||
}
|
||||
|
||||
await openTaskPage(editable: isEdit);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ class _MbcdDetailFormWidgetState extends State<MbcdDetailFormWidget> {
|
|||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
if (FormUtils.hasValue(widget.pd, 'checkNo') && !widget.isEditable) ...[
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '编号:',
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: widget.pd['checkNo'] ?? '',
|
||||
),
|
||||
|
|
@ -213,7 +213,7 @@ class _MbcdDetailFormWidgetState extends State<MbcdDetailFormWidget> {
|
|||
groupValue: null, onChanged: (bool value) { },
|
||||
|
||||
),
|
||||
const Divider(height: 1),
|
||||
const Divider(),
|
||||
|
||||
// 相关方作业
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
|
|
@ -336,30 +336,7 @@ class _MbcdDetailFormWidgetState extends State<MbcdDetailFormWidget> {
|
|||
isAllowEdit: false,
|
||||
),
|
||||
],
|
||||
if (_otherMeasuresList.isNotEmpty) ...[
|
||||
const Divider(),
|
||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children:
|
||||
_otherMeasuresList.map<Widget>((item) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 12.0,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'${item['stepName'] ?? ''}:${item['content'] ?? ''}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
|
||||
|
||||
|
||||
],
|
||||
|
|
|
|||
|
|
@ -176,6 +176,15 @@ class _MbcdApplyPageState extends SpecialWorkApplyBaseState<MbcdApplyPage> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
// 作业编号(只读,仅在详情模式下显示)
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: initData['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
// 申请单位
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
|
|
@ -207,7 +216,7 @@ class _MbcdApplyPageState extends SpecialWorkApplyBaseState<MbcdApplyPage> {
|
|||
verticalPadding: 0,
|
||||
title: '是否项目内作业',
|
||||
isRequired: true,
|
||||
groupValue: isInnerWork,
|
||||
groupValue: pd['internalOperationFlag'] == 1,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isInnerWork = value;
|
||||
|
|
|
|||
|
|
@ -47,38 +47,52 @@ class MbcdWaitPage extends SpecialWorkWaitPageBase {
|
|||
) async {
|
||||
final hotworkId = item['id'] ?? '';
|
||||
final hotworkCodeId = item['workId'] ?? '';
|
||||
final hotworkInfo =
|
||||
listType == SpecialListType.task ? item['workInfo'] : item;
|
||||
final hotworkInfo = listType == SpecialListType.task ? (item['workInfo'] ?? {}) : item;
|
||||
|
||||
final status = '${hotworkInfo['status']}';
|
||||
final String statusName =
|
||||
listType == SpecialListType.task
|
||||
final status = '${hotworkInfo['status'] ?? ''}';
|
||||
final stepName = isEdit
|
||||
? (listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}';
|
||||
: '${hotworkInfo['currentStep'] ?? ''}')
|
||||
: '查看';
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (status == '0' || status == '2') {
|
||||
await pushPage(
|
||||
MbcdApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
MbcdTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
MbcdApplyPage(isReEdit: true, work_id: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
MbcdTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
await pushPage(
|
||||
MbcdTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
MbcdTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
stepName: stepName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
|
|
@ -188,24 +202,6 @@ class MbcdWaitPage extends SpecialWorkWaitPageBase {
|
|||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'审核部门负责人: $auditDepartmentLeaderUserName',
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
textAlign: TextAlign.right,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
Text(
|
||||
'审批部门负责人: $spDepartmentLeaderUserName',
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
|
|
|||
|
|
@ -122,6 +122,14 @@ class _SxkjWorkDetailFormWidgetState extends State<SxkjWorkDetailFormWidget> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
if (FormUtils.hasValue(widget.pd, 'checkNo') && !widget.isEditable) ...[
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: widget.pd['checkNo'] ?? '',
|
||||
),
|
||||
const Divider(),
|
||||
],
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
isEditable: false,
|
||||
|
|
@ -133,14 +141,6 @@ class _SxkjWorkDetailFormWidgetState extends State<SxkjWorkDetailFormWidget> {
|
|||
isEditable: false,
|
||||
text: pd['applyUser'] ?? '',
|
||||
),
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !widget.isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: pd['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
const Divider(),
|
||||
ItemListWidget.selectableLineTitleTextRightButton(
|
||||
label: '申请日期:',
|
||||
|
|
@ -282,31 +282,6 @@ class _SxkjWorkDetailFormWidgetState extends State<SxkjWorkDetailFormWidget> {
|
|||
isAllowEdit: false,
|
||||
),
|
||||
],
|
||||
if (_otherMeasuresList.isNotEmpty) ...[
|
||||
const Divider(),
|
||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children:
|
||||
_otherMeasuresList.map<Widget>((item) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 12.0,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'${item['stepName'] ?? ''}:${item['content'] ?? ''}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -175,6 +175,15 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
|||
const Divider(),
|
||||
],
|
||||
ListItemFactory.createBuildSimpleSection('基本信息'),
|
||||
// 作业编号(只读,仅在详情模式下显示)
|
||||
if (FormUtils.hasValue(pd, 'checkNo') && !isEditable) ...[
|
||||
const Divider(),
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '作业编号:',
|
||||
isEditable: false,
|
||||
text: initData['checkNo'] ?? '',
|
||||
),
|
||||
],
|
||||
// 申请单位(只读)
|
||||
ItemListWidget.singleLineTitleText(
|
||||
label: '申请单位:',
|
||||
|
|
@ -226,7 +235,7 @@ class _SxkjApplyPageState extends SpecialWorkApplyBaseState<SxkjApplyPage> {
|
|||
verticalPadding: 0,
|
||||
title: '是否项目内作业',
|
||||
isRequired: true,
|
||||
groupValue: isInnerWork,
|
||||
groupValue: pd['internalOperationFlag'] == 1,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
isInnerWork = value;
|
||||
|
|
|
|||
|
|
@ -45,66 +45,64 @@ class SxkjWaitPage extends SpecialWorkWaitPageBase {
|
|||
) async {
|
||||
final hotworkId = item['id'] ?? '';
|
||||
final hotworkCodeId = item['workId'] ?? '';
|
||||
final hotworkInfo =
|
||||
listType == SpecialListType.task ? item['workInfo'] : item;
|
||||
final hotworkInfo = listType == SpecialListType.task ? item['workInfo'] ?? {} : item;
|
||||
|
||||
final stepId = '${item['stepId'] ?? ''}';
|
||||
final status = '${hotworkInfo['status']}';
|
||||
final String statusName =
|
||||
listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}';
|
||||
final status = '${hotworkInfo['status'] ?? ''}';
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (stepId == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
SpecialWorkGasList(data: item, addFlag: stepId == '2'),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
SxkjTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: false,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (status == '0' || status == '2') {
|
||||
await pushPage(
|
||||
SxkjApplyPage(isReEdit: true, workId: hotworkId, status: status),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await pushPage(
|
||||
SxkjTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
final String statusName = isEdit
|
||||
? (listType == SpecialListType.task
|
||||
? '${item['stepName'] ?? ''}'
|
||||
: '${hotworkInfo['currentStep'] ?? ''}')
|
||||
: '查看';
|
||||
|
||||
Future<void> openTaskPage({required bool editable}) async {
|
||||
await pushPage(
|
||||
SxkjTaskPage(
|
||||
workId: hotworkId,
|
||||
stepName: statusName,
|
||||
workCodeId: hotworkCodeId,
|
||||
isEdit: isEdit,
|
||||
isEdit: editable,
|
||||
type: listType,
|
||||
),
|
||||
context,
|
||||
);
|
||||
}
|
||||
|
||||
if (listType == SpecialListType.task) {
|
||||
if (stepId == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
SpecialWorkGasList(data: item, addFlag: true),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await openTaskPage(editable: false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (status == '0' || status == '2') {
|
||||
if (isEdit) {
|
||||
await pushPage(
|
||||
SxkjApplyPage(
|
||||
isReEdit: true,
|
||||
workId: hotworkId,
|
||||
status: status,
|
||||
),
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
await openTaskPage(editable: false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
await openTaskPage(editable: isEdit);
|
||||
return;
|
||||
}
|
||||
|
||||
await openTaskPage(editable: isEdit);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -115,12 +113,7 @@ class SxkjWaitPage extends SpecialWorkWaitPageBase {
|
|||
Map<String, dynamic> info,
|
||||
String statusName,
|
||||
) {
|
||||
final step21 = Map<String, dynamic>.from(info['step_21'] ?? {});
|
||||
final step18 = Map<String, dynamic>.from(info['step_18'] ?? {});
|
||||
final step19 = Map<String, dynamic>.from(info['step_19'] ?? {});
|
||||
final step20 = Map<String, dynamic>.from(info['step_20'] ?? {});
|
||||
final step22 = Map<String, dynamic>.from(info['step_22'] ?? {});
|
||||
final step25 = Map<String, dynamic>.from(info['step_25'] ?? {});
|
||||
|
||||
final chooseLimitedSpace = Map<String, dynamic>.from(
|
||||
info['chooseLimitedSpace'] ?? {},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
|||
|
||||
/// 根据 initData 生成签字组
|
||||
void _initGroupsFromInitData(bool isRefresh) {
|
||||
_clearRelatedPartiesPerson();
|
||||
_clearAllPerson();
|
||||
final List steps =
|
||||
(initData['settingSignSteps'] is List)
|
||||
? List.from(initData['settingSignSteps'])
|
||||
|
|
@ -586,7 +586,8 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
|||
void _clearRelatedPartiesPerson() {
|
||||
setState(() {
|
||||
for (Map item in groups) {
|
||||
if (item['stepId']?.toString() == '2') {
|
||||
final stepId = item['stepId']?.toString() ?? '';
|
||||
if (stepId == '2') { // 气体检测人清空
|
||||
item['actUser'] = '';
|
||||
item['actUserName'] = '';
|
||||
item['actUserDepartment'] = '';
|
||||
|
|
@ -595,9 +596,30 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
|||
}
|
||||
safeController.clearAllGroupUser();
|
||||
});
|
||||
|
||||
// 特殊处理:气体分析人员(stepId=2)只能从作业负责人和监护人中选择
|
||||
}
|
||||
void _clearAllPerson() async {
|
||||
setState(() {
|
||||
for (Map item in groups) {
|
||||
item['actUser'] = '';
|
||||
item['actUserName'] = '';
|
||||
item['actUserDepartment'] = '';
|
||||
item['actUserDepartmentName'] = '';
|
||||
}
|
||||
if (pd['xgfFlag'] == 1) {
|
||||
safeController.clearAllGroupUser();
|
||||
}
|
||||
pd['workChargeUserId'] = '';
|
||||
pd['workChargeUserName'] = '';
|
||||
pd['workChargeUserDepartment'] = '';
|
||||
pd['workChargeUserDepartmentName'] = '';
|
||||
|
||||
pd['workGuardianUserId'] = '';
|
||||
pd['workGuardianUserName'] = '';
|
||||
pd['workGuardianUserDepartment'] = '';
|
||||
pd['workGuardianUserDepartmentName'] = '';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// 选择相关方项目
|
||||
Future<void> getRelatedPartiesList() async {
|
||||
|
|
@ -794,7 +816,10 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
|||
/// 通用提交入口
|
||||
Future<void> submit(String status) async {
|
||||
await beforeSubmit(status);
|
||||
|
||||
if (!FormUtils.hasValue(pd, 'workLevel')) {
|
||||
ToastUtil.showNormal(context, '请选择作业等级');
|
||||
return;
|
||||
}
|
||||
final preparers =
|
||||
enableSafeProtection
|
||||
? safeController.buildPreparers()
|
||||
|
|
@ -848,33 +873,35 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
|||
|
||||
/// 通用 payload 组装
|
||||
Future<Map<String, dynamic>> buildSubmitPayload(
|
||||
String status,
|
||||
List<Map> signLogs,
|
||||
) async {
|
||||
String status,
|
||||
List<Map> signLogs,
|
||||
) async {
|
||||
|
||||
final extraPayload = await buildExtraPayload();
|
||||
final info = <String, dynamic>{...pd};
|
||||
if (FormUtils.hasValue(info, 'taskWorkLevels')) {
|
||||
info.remove('taskWorkLevels');
|
||||
}
|
||||
|
||||
final payload = <String, dynamic>{
|
||||
'workLevel': info['workLevel'] ?? '',
|
||||
'workType': workType.code,
|
||||
'xgfFlag': info['xgfFlag'] ?? '',
|
||||
'projectId': info['projectId'] ?? '',
|
||||
'projectName': info['projectName'] ?? '',
|
||||
'corpinfoId': info['projectExecutionLocationCorpId'] ?? '',
|
||||
'info': info,
|
||||
'gasFlag': info['gasFlag'] ?? '',
|
||||
'checkNo': info['checkNo'] ?? '',
|
||||
'signLogs': signLogs,
|
||||
'workId': form['workId'] ?? '',
|
||||
};
|
||||
payload.addAll(extraPayload);
|
||||
|
||||
if (pd['internalOperationFlag'] == 1) {
|
||||
payload['xgfId'] = info['xgfId'] ?? '';
|
||||
}
|
||||
|
||||
final extraPayload = await buildExtraPayload();
|
||||
payload.addAll(extraPayload);
|
||||
|
||||
|
||||
if (FormUtils.hasValue(payload, 'workId') && widget.status == '2') {
|
||||
payload.remove('checkNo');
|
||||
|
|
@ -911,9 +938,9 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
|||
for (final measure in uniquePreparers) {
|
||||
final newItem = Map<String, dynamic>.from(item);
|
||||
newItem['updateId'] = measure['updateId'];
|
||||
newItem['updateName'] = measure['userName'];
|
||||
newItem['updateName'] = measure['updateName'];
|
||||
newItem['actUser'] = measure['updateId'];
|
||||
newItem['actUserName'] = measure['userName'];
|
||||
newItem['actUserName'] = measure['updateName'];
|
||||
newItem['actUserDepartment'] = measure['departmentId'];
|
||||
newItem['actUserDepartmentName'] = measure['departmentName'];
|
||||
newGroups.add(newItem);
|
||||
|
|
@ -1187,9 +1214,12 @@ abstract class SpecialWorkApplyBaseState<T extends SpecialWorkApplyBasePage>
|
|||
padding: const EdgeInsets.all(12),
|
||||
child: Column(
|
||||
children: [
|
||||
buildFormContent(),
|
||||
const SizedBox(height: 20),
|
||||
buildFooterButtons(),
|
||||
if (pd.keys.isNotEmpty) ...[
|
||||
buildFormContent(),
|
||||
const SizedBox(height: 20),
|
||||
buildFooterButtons(),
|
||||
]else
|
||||
NoDataWidget.show()
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
/// 安全措施列表
|
||||
List<dynamic> _measures = [];
|
||||
|
||||
/// 已提交的其他安全措施
|
||||
List<dynamic> _otherMeasuresList = [];
|
||||
|
||||
/// 备注/意见输入
|
||||
final TextEditingController _contentController = TextEditingController();
|
||||
|
||||
|
|
@ -194,7 +197,7 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
await NativeOrientation.setPortrait();
|
||||
|
||||
if (path != null) {
|
||||
final now = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now());
|
||||
final now = DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now());
|
||||
setState(() {
|
||||
signImages = [path];
|
||||
signTimes = [now];
|
||||
|
|
@ -239,6 +242,17 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
});
|
||||
}
|
||||
|
||||
/// 只获取已填写的其他安全措施列表
|
||||
final measuresData = await SpecialWorkApi.specialWorkSignMeasureList({
|
||||
'eqWorkId': pd['workId'] ?? '',
|
||||
'eqType' : 2
|
||||
});
|
||||
if (measuresData['success'] == true) {
|
||||
setState(() {
|
||||
_otherMeasuresList = measuresData['data'] ?? [];
|
||||
});
|
||||
}
|
||||
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_groups = groups;
|
||||
|
|
@ -512,6 +526,7 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
DepartmentAllPersonPicker.show(
|
||||
context,
|
||||
personsData: personList,
|
||||
serverData: [],
|
||||
allowXgfFlag: false,
|
||||
onSelectedWithData: (userId, name, data) {
|
||||
setState(() {
|
||||
|
|
@ -911,7 +926,7 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
}
|
||||
return Column(
|
||||
children: [
|
||||
if (pd['measuresStepFlag'] == 1) ... [
|
||||
if (pd['measuresStepFlag'] == 1 && widget.isEdit) ... [
|
||||
Multitextfieldwithtitlewidght(
|
||||
label: '其他安全措施:',
|
||||
isEditable: true,
|
||||
|
|
@ -925,22 +940,23 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
// 签字信息
|
||||
...buildStepSignWidgets(signInfo),
|
||||
|
||||
if (pd['locateStepFlag'] == 1) _locationWidget(),
|
||||
if (pd['componentName'] == 'completeDelayTime') _completeDelayTimeWidget(),
|
||||
if (pd['componentName'] == 'personAnderRecordFile') _personAnderRecordFileWidget(),
|
||||
if (pd['componentName'] == 'completeDelayTime') ...[
|
||||
if (other['isCompleteWork'] == 1) ...[
|
||||
if (other['isDelayWork'] != 1) ...[
|
||||
if (_groups.isNotEmpty) ...[_buildDeptList(), const Divider()],
|
||||
if (widget.isEdit) ...[
|
||||
if (pd['locateStepFlag'] == 1) _locationWidget(),
|
||||
if (pd['componentName'] == 'completeDelayTime') _completeDelayTimeWidget(),
|
||||
if (pd['componentName'] == 'personAnderRecordFile') _personAnderRecordFileWidget(),
|
||||
if (pd['componentName'] == 'completeDelayTime') ...[
|
||||
if (other['isCompleteWork'] == 1) ...[
|
||||
if (other['isDelayWork'] != 1) ...[
|
||||
if (_groups.isNotEmpty) ...[_buildDeptList(), const Divider()],
|
||||
],
|
||||
_signWidget(),
|
||||
],
|
||||
] else ...[
|
||||
if (_groups.isNotEmpty) ...[_buildDeptList(), const Divider()],
|
||||
_signWidget(),
|
||||
],
|
||||
] else ...[
|
||||
if (_groups.isNotEmpty) ...[_buildDeptList(), const Divider()],
|
||||
_signWidget(),
|
||||
],
|
||||
|
||||
_bottomButtons(),
|
||||
_bottomButtons(),
|
||||
]
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
@ -1003,7 +1019,73 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
if (validEntries.isNotEmpty) {
|
||||
widgets.add(ListItemFactory.createBuildSimpleSection('签字信息'));
|
||||
}
|
||||
if (FormUtils.hasValue(pd, 'applyUserSignImage')) {
|
||||
|
||||
final stepName = '申请部门负责人';
|
||||
final imageUrl = ApiService.baseImgPath + pd['applyUserSignImage'];
|
||||
String signTime = pd['applyTime'] ?? '';
|
||||
if (FormUtils.hasValue(pd, 'step_1')) {
|
||||
final workInfo = pd['step_1'] ?? {};
|
||||
signTime = workInfo['signTime'] ?? '';
|
||||
}
|
||||
widgets.add(
|
||||
Container(
|
||||
margin: const EdgeInsets.only(top: 10, left: 5, right: 5),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
border: Border.all(color: Colors.grey.shade300),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
stepName,
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
presentOpaque(SingleImageViewer(imageUrl: imageUrl), context);
|
||||
},
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 220,
|
||||
maxHeight: 140,
|
||||
),
|
||||
child: Image.network(
|
||||
imageUrl,
|
||||
fit: BoxFit.contain,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
return const Text('签字图片加载失败');
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
signTime,
|
||||
style: const TextStyle(fontSize: 12, color: Colors.black54),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
for (final entry in validEntries) {
|
||||
final raw = entry.value;
|
||||
if (raw is! Map) continue;
|
||||
|
|
@ -1095,6 +1177,38 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
return widgets;
|
||||
}
|
||||
|
||||
// 其他安全措施回显
|
||||
Widget _otherMeasureWidgets() {
|
||||
if (_otherMeasuresList.isNotEmpty) {
|
||||
return Column(
|
||||
children: [
|
||||
ListItemFactory.createBuildSimpleSection('其他安全措施'),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children:
|
||||
_otherMeasuresList.map<Widget>((item) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 12.0,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
'${item['stepName'] ?? ''}:${item['content'] ?? ''}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
return Container();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -1110,7 +1224,7 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
children: [
|
||||
widget.buildDetailForm(pd),
|
||||
const Divider(height: 1),
|
||||
if (pd['specialStepCode'] == 'measures') ...[
|
||||
if (pd['specialStepCode'] == 'measures' && widget.isEdit) ...[
|
||||
MeasuresListWidget(
|
||||
measuresList: _measures,
|
||||
isAllowEdit: true,
|
||||
|
|
@ -1130,9 +1244,10 @@ class _SpecialWorkTaskPageBaseState extends State<SpecialWorkTaskPageBase> {
|
|||
},
|
||||
),
|
||||
],
|
||||
if (widget.isEdit) ...[
|
||||
_operationWidget(),
|
||||
] else ...[
|
||||
_otherMeasureWidgets(),
|
||||
_operationWidget(),
|
||||
|
||||
if (!widget.isEdit) ...[
|
||||
const SizedBox(height: 10),
|
||||
CustomButton(
|
||||
text: '返回',
|
||||
|
|
|
|||
Loading…
Reference in New Issue