|
@@ -28,8 +28,8 @@ class _FilterPageState extends BaseState<FilterPage> {
|
28
|
28
|
final cypz = null.notifier<CardMenuData?>();
|
29
|
29
|
|
30
|
30
|
/// 检验指标
|
31
|
|
- final jyzbList = <CardMenuData>[].notifier<List<CardMenuData>>();
|
32
|
|
- final jyzb = null.notifier<CardMenuData?>();
|
|
31
|
+ final sjbjList = <CardMenuData>[].notifier<List<CardMenuData>>();
|
|
32
|
+ final sjbj = null.notifier<CardMenuData?>();
|
33
|
33
|
|
34
|
34
|
/// 样品等级
|
35
|
35
|
final ypdjList = <CardMenuData>[].notifier<List<CardMenuData>>();
|
|
@@ -48,13 +48,19 @@ class _FilterPageState extends BaseState<FilterPage> {
|
48
|
48
|
}
|
49
|
49
|
}
|
50
|
50
|
|
51
|
|
- void getJyzbList() {
|
52
|
|
- jyzbList.value = (DictService.getDictList(DictType.jylx) ?? []).map((e) => CardMenuData(e.label, e.value)).toList();
|
53
|
|
- if (vm.reqList.first.jyzb == null) return;
|
54
|
|
-
|
55
|
|
- for (var item in jyzbList.value) {
|
56
|
|
- if (vm.reqList.first.jyzb == item.name) {
|
57
|
|
- jyzb.value = item;
|
|
51
|
+ void getSjbjList() {
|
|
52
|
+ // 1-质量,2-品质,3-食品安全,4-储存
|
|
53
|
+ sjbjList.value = [
|
|
54
|
+ CardMenuData('质量', 1),
|
|
55
|
+ CardMenuData('品质', 2),
|
|
56
|
+ CardMenuData('食品安全', 3),
|
|
57
|
+ CardMenuData('储存', 4),
|
|
58
|
+ ];
|
|
59
|
+ if (vm.reqList.first.sjbj == null) return;
|
|
60
|
+
|
|
61
|
+ for (var item in sjbjList.value) {
|
|
62
|
+ if (vm.reqList.first.sjbj == item.value) {
|
|
63
|
+ sjbj.value = item;
|
58
|
64
|
break;
|
59
|
65
|
}
|
60
|
66
|
}
|
|
@@ -74,7 +80,7 @@ class _FilterPageState extends BaseState<FilterPage> {
|
74
|
80
|
void onReset() {
|
75
|
81
|
for (var req in vm.reqList) {
|
76
|
82
|
req.cypzName = null;
|
77
|
|
- req.jyzb = null;
|
|
83
|
+ req.sjbj = null;
|
78
|
84
|
req.ypdj = null;
|
79
|
85
|
req.qydq = null;
|
80
|
86
|
}
|
|
@@ -85,7 +91,7 @@ class _FilterPageState extends BaseState<FilterPage> {
|
85
|
91
|
void onConfirm() {
|
86
|
92
|
for (var req in vm.reqList) {
|
87
|
93
|
req.cypzName = cypz.value?.name;
|
88
|
|
- req.jyzb = jyzb.value?.name;
|
|
94
|
+ req.sjbj = sjbj.value?.value;
|
89
|
95
|
req.ypdj = ypdj.value == null ? null : int.parse(ypdj.value!.value);
|
90
|
96
|
req.qydq = qydq;
|
91
|
97
|
}
|
|
@@ -101,7 +107,7 @@ class _FilterPageState extends BaseState<FilterPage> {
|
101
|
107
|
// 采样品种
|
102
|
108
|
getCypzList();
|
103
|
109
|
// 检验指标
|
104
|
|
- getJyzbList();
|
|
110
|
+ getSjbjList();
|
105
|
111
|
// 样品等级
|
106
|
112
|
getYpdjList();
|
107
|
113
|
qydq = vm.reqList.first.qydq;
|
|
@@ -133,8 +139,8 @@ class _FilterPageState extends BaseState<FilterPage> {
|
133
|
139
|
CardWidgets.buildMenu(
|
134
|
140
|
false,
|
135
|
141
|
'检验指标',
|
136
|
|
- jyzbList,
|
137
|
|
- jyzb,
|
|
142
|
+ sjbjList,
|
|
143
|
+ sjbj,
|
138
|
144
|
(_, sel) {},
|
139
|
145
|
hint: '请选择',
|
140
|
146
|
),
|