。。。。

main
hs 2025-09-18 11:25:29 +08:00
parent 76d0fdbd16
commit 622d14599f
125 changed files with 1477 additions and 766 deletions

View File

@ -81,7 +81,7 @@ class CustomAlertDialog extends StatefulWidget {
); );
} }
static Future<String> showInput( static Future<String?> showInput(
BuildContext context, { BuildContext context, {
required String title, required String title,
String hintText = '', String hintText = '',
@ -102,9 +102,11 @@ class CustomAlertDialog extends StatefulWidget {
force: force, force: force,
), ),
); );
return result ?? ''; // / null String
return result;
} }
@override @override
_CustomAlertDialogState createState() => _CustomAlertDialogState(); _CustomAlertDialogState createState() => _CustomAlertDialogState();
} }

View File

@ -25,9 +25,9 @@ class ApiService {
/// ///
// static const String basePath = "https://qaaqwh.qhdsafety.com/integrated_whb"; // static const String basePath = "https://qaaqwh.qhdsafety.com/integrated_whb";
// static const String basePath = "http://192.168.20.240:8500/integrated_whb";// static const String basePath = "http://192.168.20.240:8500/integrated_whb";//
// static const String basePath = "http://192.168.0.25:28199";// // static const String basePath = "http://192.168.0.25:28199";//
static const String basePath = "http://192.168.0.45:28199";// // static const String basePath = "http://192.168.0.45:28199";//
/// ///
static const String baseImgPath = "https://file.zcloudchina.com/YTHFile"; static const String baseImgPath = "https://file.zcloudchina.com/YTHFile";

View File

@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'package:flutter/foundation.dart'; import 'dart:ui';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:qhd_prevention/customWidget/toast_util.dart'; import 'package:qhd_prevention/customWidget/toast_util.dart';
@ -50,7 +49,6 @@ class SignImageData {
@override @override
String toString() => 'SignImageData(key:$key, filePath:$filePath, SIGNER_TIME:$SIGNER_TIME)'; String toString() => 'SignImageData(key:$key, filePath:$filePath, SIGNER_TIME:$SIGNER_TIME)';
} }
class DangerousOptionsPage extends StatefulWidget { class DangerousOptionsPage extends StatefulWidget {
final int index; final int index;
final int status; final int status;
@ -88,18 +86,17 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
status = widget.status; status = widget.status;
measures = widget.measures; measures = widget.measures;
imgList = List<ImageData>.from(widget.imgList); imgList = List<ImageData>.from(widget.imgList);
signImgList = widget.signImgList.map((map) => SignImageData.fromJson(map)).toList(); signImgList =
widget.signImgList.map((map) => SignImageData.fromJson(map)).toList();
} }
/// ///
Future<void> _onImageAdded(String localPath) async { Future<void> _onImageAdded(String localPath) async {
//
LoadingDialogHelper.show(); LoadingDialogHelper.show();
final res = await ApiService.uploadSaveFile(localPath);
try {
//
final res = await ApiService.uploadSaveFile(localPath).timeout(const Duration(seconds: 30));
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
try {
if (res['result'] == 'success') { if (res['result'] == 'success') {
final url = res['FILE_PATH'] as String; final url = res['FILE_PATH'] as String;
setState(() { setState(() {
@ -107,41 +104,25 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
}); });
} else { } else {
ToastUtil.showError(context, '上传失败,资源过大请重新选择'); ToastUtil.showError(context, '上传失败,资源过大请重新选择');
//
setState(() { setState(() {
imgList = []; imgList = [];
});
MediaBus().emit(MediaEvent.clear(kAcceptVideoSectionKey)); MediaBus().emit(MediaEvent.clear(kAcceptVideoSectionKey));
});
} }
} on TimeoutException { } catch (_) {
LoadingDialogHelper.hide();
if (!mounted) return;
ToastUtil.showError(context, '上传超时,请检查网络后重试');
} catch (e, st) {
LoadingDialogHelper.hide();
debugPrint('_onImageAdded error: $e\n$st');
if (!mounted) return;
ToastUtil.showError(context, '上传失败,资源过大请重新选择'); ToastUtil.showError(context, '上传失败,资源过大请重新选择');
setState(() { setState(() {
imgList = []; imgList = [];
});
MediaBus().emit(MediaEvent.clear(kAcceptVideoSectionKey)); MediaBus().emit(MediaEvent.clear(kAcceptVideoSectionKey));
});
} }
} }
/// ///
Future<void> _onImageRemoved(ImageData item) async { Future<void> _onImageRemoved(ImageData item) async {
try { if (item.serverPath != null) {
if (item.serverPath != null && item.serverPath.isNotEmpty) { await ApiService.deleteSaveFile(item.serverPath!);
//
await ApiService.deleteSaveFile(item.serverPath!).timeout(const Duration(seconds: 15));
} }
} catch (e, st) {
debugPrint('_onImageRemoved: delete api error: $e\n$st');
// 使 UI
}
if (!mounted) return;
setState(() { setState(() {
imgList.remove(item); imgList.remove(item);
}); });
@ -153,19 +134,15 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
return; return;
} }
LoadingDialogHelper.show(); LoadingDialogHelper.show();
try { List<String> filePaths =
// signImgList.map((img) => img.filePath ?? '').toList();
List<String> filePaths = signImgList.map((img) => img.filePath ?? '').toList(); final result = await ApiService.saveDangerousOptionsFile(filePaths);
final List<dynamic> signList = result['FILE_PATH_LIST'];
// API
final result = await ApiService.saveDangerousOptionsFile(filePaths).timeout(const Duration(seconds: 30));
final List<dynamic> signList = result['FILE_PATH_LIST'] ?? [];
List<Map<String, dynamic>> sineImageList = []; List<Map<String, dynamic>> sineImageList = [];
for (SignImageData data in signImgList) { for (SignImageData data in signImgList) {
for (Map<String, dynamic> img in signList) { for (Map<String, dynamic> img in signList) {
String imgName = 'file${data.key}'; String imgName = 'file${data.key}';
if (data.filePath != null && data.filePath!.contains('uploadFiles')) { if (data.filePath!.contains('uploadFiles')) {
final idata = { final idata = {
'filePath': data.filePath, 'filePath': data.filePath,
'SIGNER_TIME': data.SIGNER_TIME, 'SIGNER_TIME': data.SIGNER_TIME,
@ -173,7 +150,7 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
}; };
sineImageList.add(idata); sineImageList.add(idata);
} }
if (imgName == (img['key'] ?? '')) { if (imgName == img['key']) {
final idata = { final idata = {
'filePath': img['filePath'] ?? '', 'filePath': img['filePath'] ?? '',
'SIGNER_TIME': data.SIGNER_TIME, 'SIGNER_TIME': data.SIGNER_TIME,
@ -183,40 +160,27 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
} }
} }
} }
setState(() => buttonLoading = true);
if (!mounted) return;
setState(() => buttonLoading = true); //
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
if (!mounted) return;
Navigator.pop(context, { Navigator.pop(context, {
'imgList': imgList.map((e) => {'local': e.localPath, 'remote': e.serverPath}).toList(), 'imgList':
imgList
.map((e) => {'local': e.localPath, 'remote': e.serverPath})
.toList(),
'signImgList': sineImageList, 'signImgList': sineImageList,
'index': index, 'index': index,
'status': status, 'status': status,
}); });
} on TimeoutException {
LoadingDialogHelper.hide();
if (!mounted) return;
ToastUtil.showError(context, '保存超时,请稍后重试');
} catch (e, st) {
LoadingDialogHelper.hide();
debugPrint('_submit error: $e\n$st');
if (!mounted) return;
ToastUtil.showError(context, '提交失败,请重试');
}
} }
Future<void> _sign() async { Future<void> _sign() async {
await NativeOrientation.setLandscape(); await NativeOrientation.setLandscape();
final String? path = await Navigator.push<String>( final String path = await Navigator.push(
context, context,
MaterialPageRoute(builder: (c) => MineSignPage()), MaterialPageRoute(builder: (c) => MineSignPage()),
); );
await NativeOrientation.setPortrait(); await NativeOrientation.setPortrait();
if (path != null) {
if (!mounted) return;
if (path != null && path.isNotEmpty) {
final now = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now()); final now = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now());
setState(() { setState(() {
final imageData = SignImageData( final imageData = SignImageData(
@ -227,84 +191,15 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
signImgList.add(imageData); signImgList.add(imageData);
signTimes.add(now); signTimes.add(now);
}); });
//FocusHelper.clearFocus(context);
} }
} }
Widget _signListWidget() { Widget _signListWidget() {
// 使 ListView Column 线使 ResizeImage
return Column( return Column(
children: signImgList.map((imgData) { children:
signImgList.map((imgData) {
final idx = signImgList.indexOf(imgData); final idx = signImgList.indexOf(imgData);
final rawPath = (imgData.filePath ?? '').toString();
final isNetwork = rawPath.startsWith('http://') || rawPath.startsWith('https://');
// UI
const targetWidth = 460; // * devicePixelRatio
const targetHeight = 300;
Widget imageWidget;
if (rawPath.isEmpty) {
imageWidget = Container(
width: 230,
height: 150,
color: Colors.grey.shade200,
child: const Center(child: Icon(Icons.broken_image, size: 28, color: Colors.grey)),
);
} else if (isNetwork) {
// width/height loadingBuilder
imageWidget = Image.network(
rawPath.startsWith('http') ? rawPath : ApiService.baseImgPath + rawPath,
width: 230,
height: 150,
fit: BoxFit.cover,
// loading
loadingBuilder: (context, child, loadingProgress) {
if (loadingProgress == null) return child;
return Container(
width: 230,
height: 150,
color: Colors.grey.shade200,
child: const Center(child: CircularProgressIndicator(strokeWidth: 2)),
);
},
errorBuilder: (_, __, ___) => Container(
width: 230,
height: 150,
color: Colors.grey.shade200,
child: const Center(child: Icon(Icons.broken_image)),
),
);
} else {
// 使 ResizeImage FileImage线
final file = File(rawPath);
if (file.existsSync()) {
imageWidget = Image(
image: ResizeImage(
FileImage(file),
// pixel ratio
width: targetWidth,
height: targetHeight,
),
width: 230,
height: 150,
fit: BoxFit.contain,
errorBuilder: (_, __, ___) => Container(
width: 230,
height: 150,
color: Colors.grey.shade200,
child: const Center(child: Icon(Icons.broken_image)),
),
);
} else {
imageWidget = Container(
width: 230,
height: 150,
color: Colors.grey.shade200,
child: const Center(child: Icon(Icons.broken_image)),
);
}
}
return Column( return Column(
children: [ children: [
const SizedBox(height: 10), const SizedBox(height: 10),
@ -318,9 +213,21 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
maxWidth: 230, maxWidth: 230,
maxHeight: 150, maxHeight: 150,
), ),
child: imageWidget, child:
(imgData.filePath ?? '').contains('uploadFiles')
? Image.network(
'${ApiService.baseImgPath}${imgData.filePath}',
)
: Image.file(
File(imgData.filePath ?? ''),
fit: BoxFit.contain,
),
),
onTap:
() => presentOpaque(
SingleImageViewer(imageUrl: imgData.filePath ?? ''),
context,
), ),
onTap: () => presentOpaque(SingleImageViewer(imageUrl: rawPath), context),
), ),
Column( Column(
children: [ children: [
@ -330,7 +237,6 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
backgroundColor: Colors.red, backgroundColor: Colors.red,
onPressed: () { onPressed: () {
if (!mounted) return;
setState(() => signImgList.removeAt(idx)); setState(() => signImgList.removeAt(idx));
}, },
), ),
@ -352,19 +258,19 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
body: Padding( body: Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: Container( child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10), padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
color: Colors.white, color: Colors.white,
child: ListView( child: ListView(
children: [ children: [
Table( Table(
border: TableBorder.all(color: Colors.grey.shade300), border: TableBorder.all(color: Colors.grey.shade300),
columnWidths: const {0: FlexColumnWidth(3), 1: FlexColumnWidth(2)}, columnWidths: {0: FlexColumnWidth(3), 1: FlexColumnWidth(2)},
children: [ children: [
TableRow( TableRow(
decoration: BoxDecoration(color: Colors.grey.shade200), decoration: BoxDecoration(color: Colors.grey.shade200),
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Center( child: Center(
child: Text( child: Text(
'主要安全措施', '主要安全措施',
@ -373,7 +279,7 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Center( child: Center(
child: Text( child: Text(
'操作', '操作',
@ -399,12 +305,12 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
RadioListTile<int>( RadioListTile<int>(
value: -1, value: -1,
groupValue: status, groupValue: status,
title: const Text('不涉及'), title: Text('不涉及'),
contentPadding: const EdgeInsets.symmetric( contentPadding: const EdgeInsets.symmetric(
vertical: 0, vertical: 0,
horizontal: 8.0, horizontal: 8.0,
), ),
visualDensity: const VisualDensity( visualDensity: VisualDensity(
vertical: -4, vertical: -4,
horizontal: 0, horizontal: 0,
), ),
@ -413,12 +319,12 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
RadioListTile<int>( RadioListTile<int>(
value: 1, value: 1,
groupValue: status, groupValue: status,
title: const Text('涉及'), title: Text('涉及'),
contentPadding: const EdgeInsets.symmetric( contentPadding: const EdgeInsets.symmetric(
vertical: 4.0, vertical: 4.0,
horizontal: 8.0, horizontal: 8.0,
), ),
visualDensity: const VisualDensity( visualDensity: VisualDensity(
vertical: -4, vertical: -4,
horizontal: 0, horizontal: 0,
), ),
@ -437,16 +343,15 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
maxCount: 2, maxCount: 2,
mediaType: MediaType.image, mediaType: MediaType.image,
initialMediaPaths: initialMediaPaths:
imgList.map((e) => '${ApiService.baseImgPath}${e.serverPath}').toList(), imgList
.map((e) => '${ApiService.baseImgPath}${e.serverPath}')
.toList(),
onChanged: (paths) {}, onChanged: (paths) {},
onMediaAdded: _onImageAdded, onMediaAdded: _onImageAdded,
onMediaRemoved: (path) { onMediaRemoved: (path) {
try { print(path);
final item = imgList.firstWhere((e) => path.contains(e.localPath) ); final item = imgList.firstWhere((e) => path.contains(e.localPath) );
_onImageRemoved(item); _onImageRemoved(item);
} catch (e) {
debugPrint('onMediaRemoved: find item error: $e');
}
}, },
onAiIdentify: () {}, onAiIdentify: () {},
), ),
@ -454,7 +359,7 @@ class _DangerousOptionsPageState extends State<DangerousOptionsPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
const Text('签字:', style: TextStyle(fontSize: 16)), Text('签字:', style: TextStyle(fontSize: 16)),
CustomButton( CustomButton(
text: '新增手写签字', text: '新增手写签字',
height: 36, height: 36,

View File

@ -192,7 +192,7 @@ class _HotworkSafeFuncSureState extends State<HotworkSafeFuncSure> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (!_validateAndProceed(context)) { if (!_validateAndProceed(context)) {
@ -210,6 +210,13 @@ class _HotworkSafeFuncSureState extends State<HotworkSafeFuncSure> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HotworkAqglDetailState extends State<HotworkAqglDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
@ -146,6 +146,13 @@ class _HotworkAqglDetailState extends State<HotworkAqglDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -176,7 +176,7 @@ class _HotworkAqjdDetailState extends State<HotworkAqjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -187,6 +187,13 @@ class _HotworkAqjdDetailState extends State<HotworkAqjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -131,7 +131,7 @@ class _HotworkDbbzDetailState extends State<HotworkDbbzDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
@ -148,6 +148,13 @@ class _HotworkDbbzDetailState extends State<HotworkDbbzDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,10 +129,9 @@ class _HotworkDhspDetailState extends State<HotworkDhspDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
ToastUtil.showNormal(context, '请输入负责人意见'); ToastUtil.showNormal(context, '请输入负责人意见');
@ -144,8 +143,15 @@ class _HotworkDhspDetailState extends State<HotworkDhspDetail> {
title: '作废原因', title: '作废原因',
hintText: '请输入作废原因', hintText: '请输入作废原因',
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _HotworkJhrDetailState extends State<HotworkJhrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -139,6 +139,13 @@ class _HotworkJhrDetailState extends State<HotworkJhrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HotworkJsjdDetailState extends State<HotworkJsjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -140,6 +140,13 @@ class _HotworkJsjdDetailState extends State<HotworkJsjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -89,7 +89,7 @@ class _HotworkJszyDetailState extends State<HotworkJszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (endTime.isEmpty) { if (endTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业结束时间'); ToastUtil.showNormal(context, '请选择作业结束时间');
@ -106,6 +106,13 @@ class _HotworkJszyDetailState extends State<HotworkJszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -54,7 +54,7 @@ class _HotworkKszyDetailState extends State<HotworkKszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (startTime.isEmpty) { if (startTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业开始时间'); ToastUtil.showNormal(context, '请选择作业开始时间');
@ -77,6 +77,13 @@ class _HotworkKszyDetailState extends State<HotworkKszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -164,7 +164,7 @@ class _HotworkSetSafeDetailState extends State<HotworkSetSafeDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
List<Map<String, dynamic>> signers = []; List<Map<String, dynamic>> signers = [];
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
int index = 0; int index = 0;
@ -203,6 +203,13 @@ class _HotworkSetSafeDetailState extends State<HotworkSetSafeDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HotworkSzdwDetailState extends State<HotworkSzdwDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _HotworkSzdwDetailState extends State<HotworkSzdwDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -185,7 +185,7 @@ class _HotworkYsgdDetailState extends State<HotworkYsgdDetail> {
} }
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
ToastUtil.showNormal(context, '请输入负责人意见'); ToastUtil.showNormal(context, '请输入负责人意见');
@ -215,6 +215,13 @@ class _HotworkYsgdDetailState extends State<HotworkYsgdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HotworkZyfzDetailState extends State<HotworkZyfzDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _HotworkZyfzDetailState extends State<HotworkZyfzDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -268,7 +268,7 @@ class _CutroadSafeFuncSureState extends State<CutroadSafeFuncSure> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (!_validateAndProceed(context)) { if (!_validateAndProceed(context)) {
@ -286,6 +286,13 @@ class _CutroadSafeFuncSureState extends State<CutroadSafeFuncSure> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -175,7 +175,7 @@ class _CutroadAqjdDetailState extends State<CutroadAqjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -186,6 +186,13 @@ class _CutroadAqjdDetailState extends State<CutroadAqjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -359,9 +359,10 @@ class _CutroadApplyDetailState extends State<CutroadApplyDetail> {
pd['ACTION_USER'] = SessionService.instance.username; pd['ACTION_USER'] = SessionService.instance.username;
pd['APPLY_STATUS'] = status; pd['APPLY_STATUS'] = status;
pd['SPECIAL_WORK'] = FormUtils.hasValue(pd, 'SPECIAL_WORK') ? pd['SPECIAL_WORK'] : ''; pd['SPECIAL_WORK'] = FormUtils.hasValue(pd, 'SPECIAL_WORK') ? pd['SPECIAL_WORK'] : '';
pd['TASK_ID'] = taskId;
if (msg == 'add') { if (msg == 'add') {
pd['STEP_ID'] = status; pd['STEP_ID'] = status;
pd['TASK_ID'] = taskId;
pd['CUTROAD_ID'] = widget.CUTROAD_ID; pd['CUTROAD_ID'] = widget.CUTROAD_ID;
pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId; pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId;
pd['APPLY_DEPARTMENT_NAME'] = pd['APPLY_DEPARTMENT_NAME'] =

View File

@ -130,7 +130,7 @@ class _CutroadJhrDetailState extends State<CutroadJhrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -141,6 +141,13 @@ class _CutroadJhrDetailState extends State<CutroadJhrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ setState(() {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -140,6 +140,13 @@ setState(() {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -147,7 +147,7 @@ class _CutroadJszyDetailState extends State<CutroadJszyDetail> {
// ToastUtil.showNormal(context, '请签字'); // ToastUtil.showNormal(context, '请签字');
// return; // return;
// } // }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (endTime.isEmpty) { if (endTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业结束时间'); ToastUtil.showNormal(context, '请选择作业结束时间');
@ -164,6 +164,13 @@ class _CutroadJszyDetailState extends State<CutroadJszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -55,7 +55,7 @@ class _CutroadKszyDetailState extends State<CutroadKszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (startTime.isEmpty) { if (startTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业开始时间'); ToastUtil.showNormal(context, '请选择作业开始时间');
@ -69,6 +69,13 @@ class _CutroadKszyDetailState extends State<CutroadKszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _CutroadShbmDetailState extends State<CutroadShbmDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
@ -144,6 +144,13 @@ class _CutroadShbmDetailState extends State<CutroadShbmDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _CutroadSpbmDetailState extends State<CutroadSpbmDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
@ -144,6 +144,13 @@ class _CutroadSpbmDetailState extends State<CutroadSpbmDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -299,7 +299,7 @@ class _CutroadSetSafeDetailState extends State<CutroadSetSafeDetail> {
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
List<Map<String, dynamic>> signers = []; List<Map<String, dynamic>> signers = [];
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
int index = 0; int index = 0;
@ -338,6 +338,13 @@ class _CutroadSetSafeDetailState extends State<CutroadSetSafeDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _CutroadSzdwDetailState extends State<CutroadSzdwDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
@ -145,6 +145,13 @@ class _CutroadSzdwDetailState extends State<CutroadSzdwDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -188,7 +188,7 @@ class _CutroadYsgdDetailState extends State<CutroadYsgdDetail> {
ToastUtil.showNormal(context, '请输入负责人意见'); ToastUtil.showNormal(context, '请输入负责人意见');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (startTime.isEmpty) { if (startTime.isEmpty) {
ToastUtil.showNormal(context, '请选择验收时间'); ToastUtil.showNormal(context, '请选择验收时间');
@ -214,6 +214,13 @@ class _CutroadYsgdDetailState extends State<CutroadYsgdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _CutroadZyfzDetailState extends State<CutroadZyfzDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
@ -145,6 +145,13 @@ class _CutroadZyfzDetailState extends State<CutroadZyfzDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -141,7 +141,7 @@ class _CutroadZyrDetailState extends State<CutroadZyrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (_contentController.text.trim().isEmpty) { if (_contentController.text.trim().isEmpty) {
@ -160,6 +160,13 @@ class _CutroadZyrDetailState extends State<CutroadZyrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -192,7 +192,7 @@ class _BreakgroundSafeFuncSureState extends State<BreakgroundSafeFuncSure> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (!_validateAndProceed(context)) { if (!_validateAndProceed(context)) {
@ -210,6 +210,13 @@ class _BreakgroundSafeFuncSureState extends State<BreakgroundSafeFuncSure> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -175,7 +175,7 @@ class _BreakgroundAqjdDetailState extends State<BreakgroundAqjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -186,6 +186,13 @@ class _BreakgroundAqjdDetailState extends State<BreakgroundAqjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -497,9 +497,10 @@ class _BreakgroundApplyDetailState extends State<BreakgroundApplyDetail> {
pd['ACTION_USER'] = SessionService.instance.username; pd['ACTION_USER'] = SessionService.instance.username;
pd['APPLY_STATUS'] = status; pd['APPLY_STATUS'] = status;
pd['SPECIAL_WORK'] = FormUtils.hasValue(pd, 'SPECIAL_WORK') ? pd['SPECIAL_WORK'] : ''; pd['SPECIAL_WORK'] = FormUtils.hasValue(pd, 'SPECIAL_WORK') ? pd['SPECIAL_WORK'] : '';
pd['TASK_ID'] = taskId;
// //
if (msg == 'add') { if (msg == 'add') {
pd['TASK_ID'] = taskId;
pd['BREAKGROUND_ID'] = widget.BREAKGROUND_ID; pd['BREAKGROUND_ID'] = widget.BREAKGROUND_ID;
pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId; pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId;
pd['APPLY_DEPARTMENT_NAME'] = pd['APPLY_DEPARTMENT_NAME'] =

View File

@ -129,7 +129,7 @@ class _BreakgroundDzzhDetailState extends State<BreakgroundDzzhDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
@ -144,6 +144,13 @@ class _BreakgroundDzzhDetailState extends State<BreakgroundDzzhDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -130,7 +130,7 @@ class _BreakgroundJhrDetailState extends State<BreakgroundJhrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -141,6 +141,13 @@ class _BreakgroundJhrDetailState extends State<BreakgroundJhrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _BreakgroundJsjdDetailState extends State<BreakgroundJsjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -140,6 +140,13 @@ class _BreakgroundJsjdDetailState extends State<BreakgroundJsjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -69,7 +69,7 @@ class _BreakgroundJszyDetailState extends State<BreakgroundJszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (endTime.isEmpty) { if (endTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业结束时间'); ToastUtil.showNormal(context, '请选择作业结束时间');
@ -86,6 +86,13 @@ class _BreakgroundJszyDetailState extends State<BreakgroundJszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -55,7 +55,7 @@ class _BreakgroundKszyDetailState extends State<BreakgroundKszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (startTime.isEmpty) { if (startTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业开始时间'); ToastUtil.showNormal(context, '请选择作业开始时间');
@ -69,6 +69,13 @@ class _BreakgroundKszyDetailState extends State<BreakgroundKszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _BreakgroundShbmDetailState extends State<BreakgroundShbmDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
@ -143,6 +143,13 @@ class _BreakgroundShbmDetailState extends State<BreakgroundShbmDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _BreakgroundSpbmDetailState extends State<BreakgroundSpbmDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
@ -143,6 +143,13 @@ class _BreakgroundSpbmDetailState extends State<BreakgroundSpbmDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _BreakgroundSsrDetailState extends State<BreakgroundSsrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -139,6 +139,13 @@ class _BreakgroundSsrDetailState extends State<BreakgroundSsrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -241,7 +241,7 @@ class _BreakgroundSetSafeDetailState extends State<BreakgroundSetSafeDetail> {
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
List<Map<String, dynamic>> signers = []; List<Map<String, dynamic>> signers = [];
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
int index = 0; int index = 0;
@ -280,6 +280,13 @@ class _BreakgroundSetSafeDetailState extends State<BreakgroundSetSafeDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _BreakgroundSzdwDetailState extends State<BreakgroundSzdwDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _BreakgroundSzdwDetailState extends State<BreakgroundSzdwDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -185,7 +185,7 @@ class _BreakgroundYsgdDetailState extends State<BreakgroundYsgdDetail> {
} }
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
ToastUtil.showNormal(context, '请输入负责人意见'); ToastUtil.showNormal(context, '请输入负责人意见');
@ -215,6 +215,13 @@ class _BreakgroundYsgdDetailState extends State<BreakgroundYsgdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _BreakgroundZyfzDetailState extends State<BreakgroundZyfzDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _BreakgroundZyfzDetailState extends State<BreakgroundZyfzDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -142,7 +142,7 @@ class _BreakgroundZyrDetailState extends State<BreakgroundZyrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (workImages.isEmpty) { if (workImages.isEmpty) {
@ -161,6 +161,13 @@ class _BreakgroundZyrDetailState extends State<BreakgroundZyrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -191,7 +191,7 @@ class _HoistworkSafeFuncSureState extends State<HoistworkSafeFuncSure> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (!_validateAndProceed(context)) { if (!_validateAndProceed(context)) {
@ -209,6 +209,13 @@ class _HoistworkSafeFuncSureState extends State<HoistworkSafeFuncSure> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -175,7 +175,7 @@ class _HoistworkAqjdDetailState extends State<HoistworkAqjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -186,6 +186,13 @@ class _HoistworkAqjdDetailState extends State<HoistworkAqjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -508,10 +508,11 @@ class _HoistworkApplyDetailState extends State<HoistworkApplyDetail> {
pd['ACTION_USER'] = SessionService.instance.username; pd['ACTION_USER'] = SessionService.instance.username;
pd['APPLY_STATUS'] = status; pd['APPLY_STATUS'] = status;
pd['SPECIAL_WORK'] = FormUtils.hasValue(pd, 'SPECIAL_WORK') ? pd['SPECIAL_WORK'] : ''; pd['SPECIAL_WORK'] = FormUtils.hasValue(pd, 'SPECIAL_WORK') ? pd['SPECIAL_WORK'] : '';
//
if (msg == 'add') {
pd['STEP_ID'] = status; pd['STEP_ID'] = status;
pd['TASK_ID'] = taskId; pd['TASK_ID'] = taskId;
//
if (msg == 'add') {
pd['HOISTING_ID'] = widget.HOISTING_ID; pd['HOISTING_ID'] = widget.HOISTING_ID;
pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId; pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId;
pd['APPLY_DEPARTMENT_NAME'] = pd['APPLY_DEPARTMENT_NAME'] =

View File

@ -129,7 +129,7 @@ class _HoistworkDzzhDetailState extends State<HoistworkDzzhDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _HoistworkDzzhDetailState extends State<HoistworkDzzhDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -130,7 +130,7 @@ class _HoistworkJhrDetailState extends State<HoistworkJhrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -141,6 +141,13 @@ class _HoistworkJhrDetailState extends State<HoistworkJhrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HoistworkJsjdDetailState extends State<HoistworkJsjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -140,6 +140,13 @@ class _HoistworkJsjdDetailState extends State<HoistworkJsjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -69,7 +69,7 @@ class _HoistworkJszyDetailState extends State<HoistworkJszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (endTime.isEmpty) { if (endTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业结束时间'); ToastUtil.showNormal(context, '请选择作业结束时间');
@ -86,6 +86,13 @@ class _HoistworkJszyDetailState extends State<HoistworkJszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -54,7 +54,7 @@ class _HoistworkKszyDetailState extends State<HoistworkKszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (startTime.isEmpty) { if (startTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业开始时间'); ToastUtil.showNormal(context, '请选择作业开始时间');
@ -68,6 +68,13 @@ class _HoistworkKszyDetailState extends State<HoistworkKszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _HoistworkShbmDetailState extends State<HoistworkShbmDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -144,6 +144,13 @@ class _HoistworkShbmDetailState extends State<HoistworkShbmDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _HoistworkSpbmDetailState extends State<HoistworkSpbmDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -144,6 +144,13 @@ class _HoistworkSpbmDetailState extends State<HoistworkSpbmDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _HoistworkSsrDetailState extends State<HoistworkSsrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -139,6 +139,13 @@ class _HoistworkSsrDetailState extends State<HoistworkSsrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -240,7 +240,7 @@ class _HoistworkSetSafeDetailState extends State<HoistworkSetSafeDetail> {
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
List<Map<String, dynamic>> signers = []; List<Map<String, dynamic>> signers = [];
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
int index = 0; int index = 0;
@ -279,6 +279,13 @@ class _HoistworkSetSafeDetailState extends State<HoistworkSetSafeDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HoistworkSzdwDetailState extends State<HoistworkSzdwDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _HoistworkSzdwDetailState extends State<HoistworkSzdwDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -185,7 +185,7 @@ class _HoistworkYsgdDetailState extends State<HoistworkYsgdDetail> {
} }
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
ToastUtil.showNormal(context, '请输入负责人意见'); ToastUtil.showNormal(context, '请输入负责人意见');
@ -215,6 +215,13 @@ class _HoistworkYsgdDetailState extends State<HoistworkYsgdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HoistworkZyfzDetailState extends State<HoistworkZyfzDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _HoistworkZyfzDetailState extends State<HoistworkZyfzDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _HoistworkZyrDetailState extends State<HoistworkZyrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -139,6 +139,13 @@ class _HoistworkZyrDetailState extends State<HoistworkZyrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -190,7 +190,7 @@ class _HighworkSafeFuncSureState extends State<HighworkSafeFuncSure> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (!_validateAndProceed(context)) { if (!_validateAndProceed(context)) {
@ -208,6 +208,13 @@ class _HighworkSafeFuncSureState extends State<HighworkSafeFuncSure> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -175,7 +175,7 @@ class _HighworkAqjdDetailState extends State<HighworkAqjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -186,6 +186,13 @@ class _HighworkAqjdDetailState extends State<HighworkAqjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -528,10 +528,11 @@ class _HighworkApplyDetailState extends State<HighworkApplyDetail> {
pd['ACTION_USER'] = SessionService.instance.username; pd['ACTION_USER'] = SessionService.instance.username;
pd['APPLY_STATUS'] = status; pd['APPLY_STATUS'] = status;
pd['SPECIAL_WORK'] = FormUtils.hasValue(pd, 'SPECIAL_WORK') ? pd['SPECIAL_WORK'] : ''; pd['SPECIAL_WORK'] = FormUtils.hasValue(pd, 'SPECIAL_WORK') ? pd['SPECIAL_WORK'] : '';
pd['TASK_ID'] = taskId;
// //
if (msg == 'add') { if (msg == 'add') {
pd['STEP_ID'] = status; pd['STEP_ID'] = status;
pd['TASK_ID'] = taskId;
pd['HIGHWORK_ID'] = widget.HIGHWORK_ID; pd['HIGHWORK_ID'] = widget.HIGHWORK_ID;
pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId; pd['APPLY_DEPARTMENT_ID'] = SessionService.instance.deptId;
pd['APPLY_DEPARTMENT_NAME'] = pd['APPLY_DEPARTMENT_NAME'] =

View File

@ -130,7 +130,7 @@ class _HighworkJhrDetailState extends State<HighworkJhrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -141,6 +141,13 @@ class _HighworkJhrDetailState extends State<HighworkJhrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HighworkJsjdDetailState extends State<HighworkJsjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -140,6 +140,13 @@ class _HighworkJsjdDetailState extends State<HighworkJsjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -69,7 +69,7 @@ class _HighworkJszyDetailState extends State<HighworkJszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (endTime.isEmpty) { if (endTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业结束时间'); ToastUtil.showNormal(context, '请选择作业结束时间');
@ -86,6 +86,13 @@ class _HighworkJszyDetailState extends State<HighworkJszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -55,7 +55,7 @@ class _HighworkKszyDetailState extends State<HighworkKszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (startTime.isEmpty) { if (startTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业开始时间'); ToastUtil.showNormal(context, '请选择作业开始时间');
@ -69,6 +69,13 @@ class _HighworkKszyDetailState extends State<HighworkKszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _HighworkShbmDetailState extends State<HighworkShbmDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -144,6 +144,13 @@ class _HighworkShbmDetailState extends State<HighworkShbmDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -185,7 +185,7 @@ class _HighworkSpbmDetailState extends State<HighworkSpbmDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -201,6 +201,13 @@ class _HighworkSpbmDetailState extends State<HighworkSpbmDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -298,7 +298,7 @@ class _HighworkSetSafeDetailState extends State<HighworkSetSafeDetail> {
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
List<Map<String, dynamic>> signers = []; List<Map<String, dynamic>> signers = [];
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
int index = 0; int index = 0;
@ -337,6 +337,13 @@ class _HighworkSetSafeDetailState extends State<HighworkSetSafeDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HighworkSzdwDetailState extends State<HighworkSzdwDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _HighworkSzdwDetailState extends State<HighworkSzdwDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -185,7 +185,7 @@ class _HighworkYsgdDetailState extends State<HighworkYsgdDetail> {
} }
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
ToastUtil.showNormal(context, '请输入负责人意见'); ToastUtil.showNormal(context, '请输入负责人意见');
@ -215,6 +215,13 @@ class _HighworkYsgdDetailState extends State<HighworkYsgdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _HighworkZyfzDetailState extends State<HighworkZyfzDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -141,6 +141,13 @@ class _HighworkZyfzDetailState extends State<HighworkZyfzDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _HighworkZyrDetailState extends State<HighworkZyrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -139,6 +139,13 @@ class _HighworkZyrDetailState extends State<HighworkZyrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -209,7 +209,7 @@ class _HomeGasTestPageState extends State<HomeGasTestPage> {
} }
} }
String reasonText = ''; String? reasonText = '';
if (status != 1) { if (status != 1) {
reasonText = await CustomAlertDialog.showInput( reasonText = await CustomAlertDialog.showInput(
context, context,
@ -218,6 +218,13 @@ class _HomeGasTestPageState extends State<HomeGasTestPage> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -193,7 +193,7 @@ class _ElectricitySafeFuncSureState extends State<ElectricitySafeFuncSure> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (!_validateAndProceed(context)) { if (!_validateAndProceed(context)) {
@ -211,6 +211,13 @@ class _ElectricitySafeFuncSureState extends State<ElectricitySafeFuncSure> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -176,7 +176,7 @@ class _ElectricityAqjdDetailState extends State<ElectricityAqjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -187,6 +187,13 @@ class _ElectricityAqjdDetailState extends State<ElectricityAqjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -131,7 +131,7 @@ class _ElectricityDbbzDetailState extends State<ElectricityDbbzDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
@ -147,6 +147,13 @@ class _ElectricityDbbzDetailState extends State<ElectricityDbbzDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -128,7 +128,7 @@ class _ElectricityJhrDetailState extends State<ElectricityJhrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -139,6 +139,13 @@ class _ElectricityJhrDetailState extends State<ElectricityJhrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _ElectricityJsjdDetailState extends State<ElectricityJsjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -140,6 +140,13 @@ class _ElectricityJsjdDetailState extends State<ElectricityJsjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -69,7 +69,7 @@ class _ElectricityJszyDetailState extends State<ElectricityJszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (endTime.isEmpty) { if (endTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业结束时间'); ToastUtil.showNormal(context, '请选择作业结束时间');
@ -86,6 +86,13 @@ class _ElectricityJszyDetailState extends State<ElectricityJszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -54,7 +54,7 @@ class _ElectricityKszyDetailState extends State<ElectricityKszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (startTime.isEmpty) { if (startTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业开始时间'); ToastUtil.showNormal(context, '请选择作业开始时间');
@ -80,6 +80,13 @@ class _ElectricityKszyDetailState extends State<ElectricityKszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _ElectricityPsdwDetailState extends State<ElectricityPsdwDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _ElectricityPsdwDetailState extends State<ElectricityPsdwDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -171,7 +171,7 @@ class _ElectricityGasTestPageState extends State<ElectricityGasTestPage> {
} }
} }
String reasonText = ''; String? reasonText = '';
if (status != 1) { if (status != 1) {
reasonText = await CustomAlertDialog.showInput( reasonText = await CustomAlertDialog.showInput(
context, context,
@ -180,6 +180,13 @@ class _ElectricityGasTestPageState extends State<ElectricityGasTestPage> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -241,7 +241,7 @@ class _ElectricitySetSafeDetailState extends State<ElectricitySetSafeDetail> {
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
List<Map<String, dynamic>> signers = []; List<Map<String, dynamic>> signers = [];
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
int index = 0; int index = 0;
@ -280,6 +280,13 @@ class _ElectricitySetSafeDetailState extends State<ElectricitySetSafeDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _ElectricityYddwDetailState extends State<ElectricityYddwDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _ElectricityYddwDetailState extends State<ElectricityYddwDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -127,7 +127,7 @@ class _ElectricityYdrDetailState extends State<ElectricityYdrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -138,6 +138,13 @@ class _ElectricityYdrDetailState extends State<ElectricityYdrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -185,7 +185,7 @@ class _ElectricityYsgdDetailState extends State<ElectricityYsgdDetail> {
} }
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (DESCR.isEmpty) { if (DESCR.isEmpty) {
ToastUtil.showNormal(context, '请输入负责人意见'); ToastUtil.showNormal(context, '请输入负责人意见');
@ -215,6 +215,13 @@ class _ElectricityYsgdDetailState extends State<ElectricityYsgdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -129,7 +129,7 @@ class _ElectricityZyfzDetailState extends State<ElectricityZyfzDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
String DESCR = _contentController.text.trim(); String DESCR = _contentController.text.trim();
if (status == '1') { if (status == '1') {
@ -145,6 +145,13 @@ class _ElectricityZyfzDetailState extends State<ElectricityZyfzDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -126,7 +126,7 @@ setState(() {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -137,6 +137,13 @@ setState(() {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -444,7 +444,7 @@ class _BlindboardDetailFormWidgetState
label: '材质:', label: '材质:',
isRequired: widget.isEditable, isRequired: widget.isEditable,
isEditable: widget.isEditable, isEditable: widget.isEditable,
text: board['BOARD_MATERIAL'], text: board['BOARD_MATERIAL'] ?? '',
hintText: '请输入材质', hintText: '请输入材质',
onChanged: (val) { onChanged: (val) {
setState(() { setState(() {
@ -458,7 +458,7 @@ class _BlindboardDetailFormWidgetState
label: '规格:', label: '规格:',
isRequired: widget.isEditable, isRequired: widget.isEditable,
isEditable: widget.isEditable, isEditable: widget.isEditable,
text: board['BOARD_SPECIFICATION'], text: board['BOARD_SPECIFICATION'] ?? '',
onChanged: (val) { onChanged: (val) {
setState(() { setState(() {
board['BOARD_SPECIFICATION'] = val; board['BOARD_SPECIFICATION'] = val;
@ -472,7 +472,7 @@ class _BlindboardDetailFormWidgetState
label: '编号:', label: '编号:',
isEditable: widget.isEditable, isEditable: widget.isEditable,
isRequired: widget.isEditable, isRequired: widget.isEditable,
text: board['BOARD_NO'], text: board['BOARD_NO'] ?? '',
onChanged: (val) { onChanged: (val) {
setState(() { setState(() {
board['BOARD_NO'] = val; board['BOARD_NO'] = val;

View File

@ -202,7 +202,7 @@ class _BlindboardSafeFuncSureState extends State<BlindboardSafeFuncSure> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (!_validateAndProceed(context)) { if (!_validateAndProceed(context)) {
@ -220,6 +220,13 @@ class _BlindboardSafeFuncSureState extends State<BlindboardSafeFuncSure> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -176,7 +176,7 @@ class _BlindboardAqjdDetailState extends State<BlindboardAqjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -187,6 +187,13 @@ class _BlindboardAqjdDetailState extends State<BlindboardAqjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -144,7 +144,7 @@ class _BlindboardCjryDetailState extends State<BlindboardCjryDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (imgList.isEmpty) { if (imgList.isEmpty) {
@ -164,6 +164,13 @@ class _BlindboardCjryDetailState extends State<BlindboardCjryDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定', confirmText: '确定',
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -131,7 +131,7 @@ class _BlindboardJhrDetailState extends State<BlindboardJhrDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -142,6 +142,13 @@ class _BlindboardJhrDetailState extends State<BlindboardJhrDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -130,7 +130,7 @@ class _BlindboardJsjdDetailState extends State<BlindboardJsjdDetail> {
ToastUtil.showNormal(context, '请签字'); ToastUtil.showNormal(context, '请签字');
return; return;
} }
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
} else { } else {
@ -141,6 +141,13 @@ class _BlindboardJsjdDetailState extends State<BlindboardJsjdDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -69,7 +69,7 @@ class _BlindboardJszyDetailState extends State<BlindboardJszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (endTime.isEmpty) { if (endTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业结束时间'); ToastUtil.showNormal(context, '请选择作业结束时间');
@ -86,6 +86,13 @@ class _BlindboardJszyDetailState extends State<BlindboardJszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

View File

@ -56,7 +56,7 @@ class _BlindboardKszyDetailState extends State<BlindboardKszyDetail> {
/// -1 1 /// -1 1
Future<void> _submit(String status) async { Future<void> _submit(String status) async {
String reasonText = ''; String? reasonText = '';
if (status == '1') { if (status == '1') {
if (startTime.isEmpty) { if (startTime.isEmpty) {
ToastUtil.showNormal(context, '请选择作业开始时间'); ToastUtil.showNormal(context, '请选择作业开始时间');
@ -70,6 +70,13 @@ class _BlindboardKszyDetailState extends State<BlindboardKszyDetail> {
cancelText: '取消', cancelText: '取消',
confirmText: '确定' confirmText: '确定'
); );
//
if (reasonText == null) {
//
return;
}
//
if (reasonText.isEmpty) { if (reasonText.isEmpty) {
ToastUtil.showNormal(context, '请填写作废原因'); ToastUtil.showNormal(context, '请填写作废原因');
return; return;

Some files were not shown because too many files have changed in this diff Show More