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