2025.9.11 改bug
parent
238662783f
commit
aadfb3db52
|
@ -578,7 +578,7 @@ class _CheckingInformationOnePageState extends State<CheckingInformationOnePage>
|
|||
}
|
||||
|
||||
void _removeOtherHidden(int index) {
|
||||
if (index == 0) return; // 防止删除第一行
|
||||
// if (index == 0) return; // 防止删除第一行
|
||||
setState(() {
|
||||
otherHidden.removeAt(index);
|
||||
});
|
||||
|
|
|
@ -25,9 +25,10 @@ class CustomDriverDrawer extends StatefulWidget {
|
|||
class _CustomDriverDrawerState extends State<CustomDriverDrawer> {
|
||||
|
||||
// 管控部门 id
|
||||
String? riskId;
|
||||
// 风险点(单元)id
|
||||
String? dept;
|
||||
// 风险点(单元)id
|
||||
String? riskId;
|
||||
|
||||
|
||||
//风险等级
|
||||
int _levelOption = -1;
|
||||
|
@ -178,6 +179,10 @@ class _CustomDriverDrawerState extends State<CustomDriverDrawer> {
|
|||
"风险点(单元)",
|
||||
display: itemNameTwo ?? '请选择',
|
||||
onTap: () {
|
||||
if(dept==null){
|
||||
ToastUtil.showNormal(context, "请选择管控部门");
|
||||
return;
|
||||
}
|
||||
showCategoryPickerTwo("2");
|
||||
}
|
||||
),
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:qhd_prevention/pages/home/tap/item_list_widget.dart';
|
||||
import 'package:qhd_prevention/pages/my_appbar.dart';
|
||||
|
||||
import 'package:qhd_prevention/tools/tools.dart';
|
||||
|
||||
///岗位详情
|
||||
class MineDutyDetailPage extends StatefulWidget {
|
||||
const MineDutyDetailPage(this.item, {super.key});
|
||||
|
||||
final item;
|
||||
|
||||
@override
|
||||
|
@ -13,12 +15,8 @@ class MineDutyDetailPage extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
||||
|
||||
final TextEditingController _reasonController = TextEditingController();
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
|
@ -29,47 +27,35 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
|
||||
// 申请人信息
|
||||
_buildInfoRow("申请人", widget.item["USER_NAME"]),
|
||||
const SizedBox(height: 24),
|
||||
_buildInfoRow("申请人:", widget.item["USER_NAME"]),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
// 离岗开始时间
|
||||
_buildDateField(
|
||||
label: "离岗开始时间",
|
||||
label: "离岗开始时间:",
|
||||
date: widget.item["STARTTIME"],
|
||||
onTap: () {
|
||||
|
||||
}
|
||||
onTap: () {},
|
||||
// () => _selectDate(context, true),
|
||||
),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
// 离岗结束时间
|
||||
_buildDateField(
|
||||
label: "离岗结束时间",
|
||||
label: "离岗结束时间:",
|
||||
date: widget.item["ENDTIME"],
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
onTap: () {},
|
||||
// () => _selectDate(context, false),
|
||||
),
|
||||
|
||||
const SizedBox(height: 24),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
// 离岗原因标题
|
||||
const Text(
|
||||
"离岗原因",
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
// 原因输入框
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 5,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
|
@ -82,26 +68,107 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
child: Text(
|
||||
widget.item["DESCR"],
|
||||
style: TextStyle(color: Colors.black),
|
||||
// controller: _reasonController,
|
||||
// maxLines: 5,
|
||||
// decoration: const InputDecoration(
|
||||
// hintText: "请输入离岗原因",
|
||||
// hintStyle: TextStyle(color: Color(0xFF9E9E9E)),
|
||||
// border: InputBorder.none,
|
||||
child: ItemListWidget.singleLineTitleText(
|
||||
label: "离岗原因:",
|
||||
isEditable: false,
|
||||
text:widget.item["DESCR"]
|
||||
|
||||
),
|
||||
),
|
||||
// 离岗原因标题
|
||||
// const Text(
|
||||
// "离岗原因",
|
||||
// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
|
||||
// ),
|
||||
// const SizedBox(height: 8),
|
||||
//
|
||||
// // 原因输入框
|
||||
// Container(
|
||||
// width: double.infinity,
|
||||
// padding: const EdgeInsets.all(16),
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(12),
|
||||
// boxShadow: [
|
||||
// BoxShadow(
|
||||
// color: Colors.grey.withOpacity(0.1),
|
||||
// spreadRadius: 1,
|
||||
// blurRadius: 6,
|
||||
// offset: const Offset(0, 2),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// child: Text(
|
||||
// widget.item["DESCR"],
|
||||
// style: TextStyle(color: Colors.black),
|
||||
// // controller: _reasonController,
|
||||
// // maxLines: 5,
|
||||
// // decoration: const InputDecoration(
|
||||
// // hintText: "请输入离岗原因",
|
||||
// // hintStyle: TextStyle(color: Color(0xFF9E9E9E)),
|
||||
// // border: InputBorder.none,
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
const SizedBox(height: 24),
|
||||
|
||||
const SizedBox(height: 10),
|
||||
|
||||
_buildInfoRow("审批状态:", _getTypeReturn(widget.item)),
|
||||
const SizedBox(height: 10),
|
||||
// 申请人信息
|
||||
_buildInfoRow("审批状态", _getTypeReturn(widget.item)),
|
||||
if (widget.item["REVIEW_STATUS"] != '2')
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 5,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.1),
|
||||
spreadRadius: 1,
|
||||
blurRadius: 6,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: ItemListWidget.singleLineTitleText(
|
||||
label: '审批人:',
|
||||
isEditable: false,
|
||||
text:
|
||||
"${FormUtils.hasValue(widget.item, "REVIEW_USER_NAME") ? widget.item["REVIEW_USER_NAME"] : "unfind"}[${FormUtils.hasValue(widget.item, "REVIEW_USER_DEPARTMENTNAME") ? widget.item["REVIEW_USER_DEPARTMENTNAME"] : "unfind"}]",
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 10),
|
||||
// 审批意见' : '取消原因
|
||||
if (widget.item["REVIEW_STATUS"] == '1' ||widget.item["REVIEW_STATUS"] == '-1' )
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 5,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.1),
|
||||
spreadRadius: 1,
|
||||
blurRadius: 6,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: ItemListWidget.singleLineTitleText(
|
||||
label: widget.item["ISDELETE"] == '0' ? '审批意见:' : '取消原因:',
|
||||
isEditable: false,
|
||||
text:widget.item["REVIEW_DESC"]
|
||||
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 40),
|
||||
|
||||
|
@ -123,7 +190,6 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
|||
"返回",
|
||||
style: TextStyle(fontSize: 16, color: Colors.white),
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -156,17 +222,11 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
Text(label, style: const TextStyle(fontSize: 16)),
|
||||
Text(
|
||||
// date != null ? DateFormat('yyyy-MM-dd').format(date) : "请选择日期",
|
||||
date!,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.black ,
|
||||
),
|
||||
style: TextStyle(fontSize: 16, color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -192,10 +252,7 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
Text(title, style: const TextStyle(fontSize: 16)),
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
|
||||
|
@ -228,5 +285,4 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
|||
return "审批错误";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -80,6 +80,11 @@ class _NotifDetailPageState extends State<NotifDetailPage> {
|
|||
return Scaffold(
|
||||
appBar: MyAppbar(title: "通知详情"),
|
||||
body: SafeArea(
|
||||
child: Container(
|
||||
// color: Colors.white,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Card(
|
||||
child: Container(
|
||||
width: double.infinity, // 铺满父容器
|
||||
color: Colors.white,
|
||||
|
@ -110,6 +115,10 @@ class _NotifDetailPageState extends State<NotifDetailPage> {
|
|||
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue