2025.9.12 改bug
parent
aadfb3db52
commit
31b5a9b532
|
@ -1950,6 +1950,7 @@ U6Hzm1ninpWeE+awIDAQAB
|
|||
"REVIEW_STATUS": type,
|
||||
"REVIEW_DESC": text,
|
||||
"OPERATOR": SessionService.instance.loginUserId,
|
||||
"REVIEW_USER_ID": SessionService.instance.loginUserId,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -1969,6 +1970,7 @@ U6Hzm1ninpWeE+awIDAQAB
|
|||
"REVIEW_STATUS": type,
|
||||
"REVIEW_DESC": text,
|
||||
"OPERATOR": SessionService.instance.loginUserId,
|
||||
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -2839,13 +2841,14 @@ U6Hzm1ninpWeE+awIDAQAB
|
|||
}
|
||||
|
||||
/// 获取检查项目列表
|
||||
static Future<Map<String, dynamic>> getRiskPointsList(String id) {
|
||||
static Future<Map<String, dynamic>> getRiskPointsList(String id,String IDENTIFICATIONPARTS_ID) {
|
||||
return HttpManager().request(
|
||||
basePath,
|
||||
'/app/listmanager/getRisk',
|
||||
method: Method.post,
|
||||
data: {
|
||||
"LISTMANAGER_ID": id,
|
||||
"IDENTIFICATIONPARTS_ID":IDENTIFICATIONPARTS_ID,
|
||||
"USER_NAME": SessionService.instance.username,
|
||||
"CORPINFO_ID": SessionService.instance.corpinfoId,
|
||||
"USER_ID": SessionService.instance.loginUserId,
|
||||
|
@ -3075,6 +3078,7 @@ U6Hzm1ninpWeE+awIDAQAB
|
|||
"SOURCE": '3',
|
||||
"STATE": '0',
|
||||
|
||||
"IS_OTHER_HIDDEN":"1",
|
||||
"HIDDENDESCR": hazardDescription,
|
||||
"HIDDENPART": partDescription,
|
||||
"LATITUDE": latitude,
|
||||
|
|
|
@ -88,7 +88,8 @@ class _HazardRegistrationPageState extends State<HazardRegistrationPage> {
|
|||
super.initState();
|
||||
neiRong=widget.item['CHECK_CONTENT'] ?? '';
|
||||
_standardController.text=widget.item["CHECK_UNQUALIFIED"]??"";
|
||||
unqualifiedInspectionItemID=SessionService.instance.unqualifiedInspectionItemID.toString();
|
||||
// unqualifiedInspectionItemID=SessionService.instance.unqualifiedInspectionItemID.toString();
|
||||
unqualifiedInspectionItemID=widget.item['ids'] ?? '';
|
||||
if(unqualifiedInspectionItemID.isNotEmpty && widget.result.isNotEmpty){
|
||||
List<dynamic> hImgs=widget.result["hImgs"] ?? [];
|
||||
List<dynamic> rImgs=widget.result["rImgs"]?? [];
|
||||
|
|
|
@ -157,6 +157,7 @@ class _EquimentDetailListPageState extends State<EquimentDetailListPage>
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if(FormUtils.hasValue(record, 'INSPECTOR'))
|
||||
_buildInfoRow('人员:${record['INSPECTOR']}'),
|
||||
const SizedBox(height: 8),
|
||||
_buildInfoRow(
|
||||
|
@ -167,7 +168,9 @@ class _EquimentDetailListPageState extends State<EquimentDetailListPage>
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
if(FormUtils.hasValue(record, 'INSPECTIONTIME'))
|
||||
_buildInfoRow('检查时间:${record['INSPECTIONTIME']}'),
|
||||
if(FormUtils.hasValue(record, 'INSPECTIONTIME'))
|
||||
_buildInfoRow('是否故障:${record['ISFAULT']}'),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -188,8 +188,13 @@ class _CheckPersonDetailState extends State<CheckPersonDetail> {
|
|||
LoadingDialogHelper.show();
|
||||
|
||||
inspectorForm['OPERATOR'] = SessionService.instance.loginUserId;
|
||||
inspectorForm['ACTION_USER'] = SessionService.instance.username;
|
||||
inspectorForm['ACTION_USER'] = SessionService.instance.username;// inspectorForm['INSPECTION_STATUS'] = val ? '1' : '-1';
|
||||
if(inspectorForm['INSPECTION_STATUS'] =='-1'){
|
||||
inspectorForm['INSPECTION_USER_SIGN_TIME'] ="";
|
||||
}else{
|
||||
inspectorForm['INSPECTION_USER_SIGN_TIME'] = DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now());
|
||||
}
|
||||
|
||||
try {
|
||||
// 准备上传文件路径(兼容多种 signImgList 存法)
|
||||
String filePath = signImages.first;
|
||||
|
|
|
@ -166,14 +166,14 @@ class _HomeDangerPageState extends State<HomeDangerPage>
|
|||
// pushPage(RiskListPage(1,item["LISTMANAGER_ID"]), context);
|
||||
final result = await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => RiskListPage(1,item["LISTMANAGER_ID"])),
|
||||
MaterialPageRoute(builder: (_) => RiskListPage(1,item["LISTMANAGER_ID"],FormUtils.hasValue(item, "IDENTIFICATIONPARTS_ID")?item["IDENTIFICATIONPARTS_ID"]:"")),
|
||||
);
|
||||
break;
|
||||
case 1://标准排查
|
||||
// pushPage(RiskListPage(2,item["CUSTOM_ID"]), context);
|
||||
final result = await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => RiskListPage(2,item["CUSTOM_ID"])),
|
||||
MaterialPageRoute(builder: (_) => RiskListPage(2,item["CUSTOM_ID"],FormUtils.hasValue(item, "IDENTIFICATIONPARTS_ID")?item["IDENTIFICATIONPARTS_ID"]:"")),
|
||||
);
|
||||
|
||||
break;
|
||||
|
|
|
@ -124,7 +124,7 @@ class _ScanPageState extends State<ScanPage> {
|
|||
void goToList({required String listId, required String listName}) {
|
||||
print('navigate to list: $listId, name: $listName');
|
||||
Navigator.pop(context,Animation);
|
||||
pushPage(RiskListPage(1, listId), context);
|
||||
pushPage(RiskListPage(1, listId,""), context);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -198,14 +198,14 @@ class _DangerPageState extends State<DangerPage>
|
|||
// pushPage(RiskListPage(widget.type,item["LISTMANAGER_ID"]), context);
|
||||
final result = await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => RiskListPage(widget.type,item["LISTMANAGER_ID"])),
|
||||
MaterialPageRoute(builder: (_) => RiskListPage(widget.type,item["LISTMANAGER_ID"],FormUtils.hasValue(item, "IDENTIFICATIONPARTS_ID")?item["IDENTIFICATIONPARTS_ID"]:"")),
|
||||
);
|
||||
break;
|
||||
case 2://标准排查
|
||||
// pushPage(RiskListPage(widget.type,item["CUSTOM_ID"]), context);
|
||||
final result = await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => RiskListPage(widget.type,item["CUSTOM_ID"])),
|
||||
MaterialPageRoute(builder: (_) => RiskListPage(widget.type,item["CUSTOM_ID"],FormUtils.hasValue(item, "IDENTIFICATIONPARTS_ID")?item["IDENTIFICATIONPARTS_ID"]:"")),
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -91,10 +91,12 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
}
|
||||
|
||||
for (int i = 0; i < listDates.length; i++) {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
if (newListTwo.isNotEmpty) {
|
||||
for (int m = 0; m < newListTwo.length; m++) {
|
||||
if (newListTwo.isNotEmpty && newListTwo[m]["LISTCHECKITEM_ID"] != null) {
|
||||
if (newListTwo[m]["LISTCHECKITEM_ID"] == listDates[i]["LISTCHECKITEM_ID"]) {
|
||||
|
||||
listDates[i]["RECORDITEM_ID"]=newListTwo[m]["RECORDITEM_ID"];
|
||||
if (listDatesSelect.isNotEmpty) {
|
||||
switch (listDatesSelect[m]["ISNORMAL"]) {
|
||||
|
@ -116,17 +118,18 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
(listDates[i] as Map<String, dynamic>)["ids"] = listDatesSelect[m]["HIDDEN_ID"];
|
||||
SessionService.instance.setUnqualifiedInspectionItemIDJson(listDatesSelect[m]["HIDDEN_ID"]);
|
||||
} else {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
// (listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
}
|
||||
} else {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
}
|
||||
// else {
|
||||
// (listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
// }
|
||||
} else {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
// (listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
// (listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -155,6 +158,7 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
}
|
||||
|
||||
for (int i = 0; i < listDates.length; i++) {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
if (newListTwo.isNotEmpty) {
|
||||
for (int m = 0; m < newListTwo.length; m++) {
|
||||
if (newListTwo.isNotEmpty && newListTwo[m]["CUSTOM_ITEM_ID"] != null) {
|
||||
|
@ -180,17 +184,18 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
(listDates[i] as Map<String, dynamic>)["ids"] = listDatesSelect[m]["HIDDEN_ID"];
|
||||
SessionService.instance.setUnqualifiedInspectionItemIDJson(listDatesSelect[m]["HIDDEN_ID"]);
|
||||
} else {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
// (listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
}
|
||||
} else {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
// (listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
}
|
||||
} else {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
// (listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
(listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
// (listDates[i] as Map<String, dynamic>)["ids"] = "";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -522,7 +527,9 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
|
||||
Future<void> _getTemporaryStorageOfHiddenYinHuan(Map item, String hiddenId) async {
|
||||
try {
|
||||
LoadingDialogHelper.show();
|
||||
final result = await ApiService.getTemporaryStorageOfHiddenYinHuan(hiddenId);
|
||||
LoadingDialogHelper.hide();
|
||||
if (result['result'] == 'success') {
|
||||
try {
|
||||
dynamic pd = result["pd"];
|
||||
|
@ -552,13 +559,16 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
ToastUtil.showNormal(context, "加载数据失败");
|
||||
}
|
||||
} catch (e) {
|
||||
LoadingDialogHelper.hide();
|
||||
print('加载数据失败:$e');
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _getTemporaryStorageOfHidden(Map item, String hiddenId) async {
|
||||
try {
|
||||
LoadingDialogHelper.show();
|
||||
final result = await ApiService.getTemporaryStorageOfHidden(hiddenId);
|
||||
LoadingDialogHelper.hide();
|
||||
if (result['result'] == 'success') {
|
||||
pushPage(HazardRegistrationPage(item, result, widget.type, onClose: (String departmentId, String yinHuanText) {
|
||||
setState(() {
|
||||
|
@ -571,6 +581,7 @@ class _DangerProjectPageState extends State<DangerProjectPage> {
|
|||
ToastUtil.showNormal(context, "加载数据失败");
|
||||
}
|
||||
} catch (e) {
|
||||
LoadingDialogHelper.hide();
|
||||
print('加载数据失败:$e');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@ import 'package:qhd_prevention/tools/h_colors.dart';
|
|||
import 'package:qhd_prevention/tools/tools.dart';
|
||||
|
||||
class RiskListPage extends StatefulWidget {
|
||||
const RiskListPage(this.type, this.id, {super.key});
|
||||
const RiskListPage(this.type, this.id, this.IDENTIFICATIONPARTS_ID, {super.key});
|
||||
|
||||
final int type;
|
||||
final String id;
|
||||
|
||||
final String IDENTIFICATIONPARTS_ID;
|
||||
|
||||
@override
|
||||
State<RiskListPage> createState() => _riskListPageState();
|
||||
|
@ -54,7 +54,7 @@ class _riskListPageState extends State<RiskListPage> {
|
|||
try {
|
||||
|
||||
LoadingDialogHelper.show();
|
||||
final result = await ApiService.getRiskPointsList(widget.id);
|
||||
final result = await ApiService.getRiskPointsList(widget.id,widget.IDENTIFICATIONPARTS_ID);
|
||||
LoadingDialogHelper.hide();
|
||||
if (result['result'] == 'success') {
|
||||
final List<dynamic> newList = result['varList'] ?? [];
|
||||
|
|
|
@ -55,6 +55,9 @@ class _LoginPageState extends State<LoginPage> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
_phoneController.addListener(_onTextChanged);
|
||||
|
||||
_phoneController.text= SessionService.instance.loginPhone ?? "";
|
||||
_passwordController.text= SessionService.instance.loginPass?? "";
|
||||
_checkUpdata();
|
||||
}
|
||||
void dispose() {
|
||||
|
@ -189,7 +192,8 @@ class _LoginPageState extends State<LoginPage> {
|
|||
height: 48,
|
||||
child: ElevatedButton(
|
||||
onPressed:
|
||||
(!_isLoading && _agreed) ? _handleLogin : null,
|
||||
_handleLogin,
|
||||
// (!_isLoading && _agreed) ? _handleLogin : null,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.blue,
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -217,8 +221,13 @@ class _LoginPageState extends State<LoginPage> {
|
|||
activeColor: Colors.white,
|
||||
checkColor: Colors.blueAccent,
|
||||
side: const BorderSide(color: Colors.white),
|
||||
onChanged:
|
||||
(v) => setState(() => _agreed = v ?? false),
|
||||
onChanged:(value) {
|
||||
setState(() {
|
||||
_agreed = value??false;
|
||||
});
|
||||
|
||||
},
|
||||
// (v) => setState(() => _agreed = v ?? false),
|
||||
),
|
||||
Expanded(
|
||||
child: RichText(
|
||||
|
@ -339,11 +348,23 @@ class _LoginPageState extends State<LoginPage> {
|
|||
}
|
||||
|
||||
Future<void> _handleLogin() async {
|
||||
if(_isLoading){
|
||||
return;
|
||||
}
|
||||
if (!(_formKey.currentState?.validate() ?? false)) return;
|
||||
|
||||
if(!_agreed){
|
||||
ToastUtil.showNormal(context, "请先阅读并同意《服务协议》和《隐私政策》");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
final userName = _phoneController.text.trim();
|
||||
final userPwd = _passwordController.text;
|
||||
|
||||
SessionService.instance.setSavePhone(userName);
|
||||
SessionService.instance.setSavePass(userPwd);
|
||||
|
||||
setState(() => _isLoading = true);
|
||||
showDialog(
|
||||
context: context,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||
import 'package:qhd_prevention/pages/my_appbar.dart';
|
||||
|
||||
import '../../http/ApiService.dart';
|
||||
|
@ -430,6 +431,7 @@ class _DutyDialogState extends State<DutyDialog> {
|
|||
|
||||
// 输入框
|
||||
TextField(
|
||||
textAlign: TextAlign.center, // 文字居中
|
||||
controller: _reasonController,
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
|
@ -449,9 +451,10 @@ class _DutyDialogState extends State<DutyDialog> {
|
|||
child: ElevatedButton(
|
||||
onPressed: (){
|
||||
if(_reasonController.text.isEmpty){
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(widget.type==1?'请输入审批意见':'请输入原因'))
|
||||
);
|
||||
ToastUtil.showNormal(context, widget.type==1?'请输入审批意见':'请输入原因');
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// SnackBar(content: Text(widget.type==1?'请输入审批意见':'请输入原因'))
|
||||
// );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,65 +27,38 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
|
||||
// 申请人信息
|
||||
_buildInfoRow("申请人:", widget.item["USER_NAME"]),
|
||||
_buildInfoRowTwo("申请人:", widget.item["USER_NAME"]),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
// 离岗开始时间
|
||||
_buildDateField(
|
||||
label: "离岗开始时间:",
|
||||
date: widget.item["STARTTIME"],
|
||||
onTap: () {},
|
||||
// () => _selectDate(context, true),
|
||||
),
|
||||
_buildInfoRowTwo("离岗开始时间:", widget.item["STARTTIME"]),
|
||||
|
||||
const SizedBox(height: 10),
|
||||
|
||||
// 离岗结束时间
|
||||
_buildDateField(
|
||||
label: "离岗结束时间:",
|
||||
date: widget.item["ENDTIME"],
|
||||
onTap: () {},
|
||||
// () => _selectDate(context, false),
|
||||
),
|
||||
_buildInfoRowTwo("离岗结束时间:", widget.item["ENDTIME"]),
|
||||
|
||||
const SizedBox(height: 10),
|
||||
|
||||
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:widget.item["DESCR"]
|
||||
_buildInfoRowTwo("离岗原因:", widget.item["DESCR"]),
|
||||
|
||||
),
|
||||
),
|
||||
// 离岗原因标题
|
||||
// const Text(
|
||||
// "离岗原因",
|
||||
// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
|
||||
// ),
|
||||
// const SizedBox(height: 8),
|
||||
//
|
||||
// // 原因输入框
|
||||
const SizedBox(height: 10),
|
||||
|
||||
_buildInfoRowTwo("审批状态:", _getTypeReturn(widget.item)),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
|
||||
// 申请人信息
|
||||
if (widget.item["REVIEW_STATUS"] != '2')
|
||||
_buildInfoRowTwo("审批人:", "${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"}]",),
|
||||
// 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),
|
||||
|
@ -98,77 +71,42 @@ 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:
|
||||
// "${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),
|
||||
|
||||
_buildInfoRow("审批状态:", _getTypeReturn(widget.item)),
|
||||
const SizedBox(height: 10),
|
||||
// 申请人信息
|
||||
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"]
|
||||
|
||||
),
|
||||
),
|
||||
_buildInfoRowTwo(widget.item["ISDELETE"] == '0' ? '审批意见:' : '取消原因:', widget.item["REVIEW_DESC"]),
|
||||
// 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),
|
||||
|
||||
|
@ -234,6 +172,35 @@ class _MineDutyDetailPage extends State<MineDutyDetailPage> {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Widget _buildInfoRowTwo(String title, String value) {
|
||||
return 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:title,
|
||||
isEditable: false,
|
||||
text:value
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget _buildInfoRow(String title, String value) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||
import 'package:qhd_prevention/pages/my_appbar.dart';
|
||||
|
||||
import '../../http/ApiService.dart';
|
||||
|
@ -518,6 +519,7 @@ class _DutyDialogState extends State<DutyDialog> {
|
|||
|
||||
// 输入框
|
||||
TextField(
|
||||
textAlign: TextAlign.center, // 文字居中
|
||||
controller: _reasonController,
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
|
@ -540,20 +542,21 @@ class _DutyDialogState extends State<DutyDialog> {
|
|||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
if (_reasonController.text.isEmpty) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
widget.type == 1 ? '请输入审批意见' : '请输入原因',
|
||||
),
|
||||
),
|
||||
);
|
||||
ToastUtil.showNormal(context, widget.type == 1 ? '请输入审批意见' : '请输入原因');
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// SnackBar(
|
||||
// content: Text(
|
||||
// widget.type == 1 ? '请输入审批意见' : '请输入原因',
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
return;
|
||||
}
|
||||
|
||||
if (1 == widget.type) {
|
||||
_dutyApproval(); //审批
|
||||
} else {
|
||||
_dutyReturned(); //打回
|
||||
_dutyReturned(); //取消
|
||||
}
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
|
|
@ -203,6 +203,9 @@ class SessionService {
|
|||
String? unqualifiedInspectionItemID;
|
||||
String? listItemNameJson;
|
||||
String? studyToken;
|
||||
String? loginPhone;
|
||||
String? loginPass;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -251,6 +254,11 @@ class SessionService {
|
|||
|
||||
void setListItemNameJson(String json) => listItemNameJson = json;
|
||||
|
||||
void setSavePhone(String phone) => loginPhone = phone;
|
||||
|
||||
void setSavePass(String pass) => loginPass = pass;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// ------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue