|
@@ -32,17 +32,21 @@ class ErAppliedAddStaff extends StatefulWidget {
|
|
|
}
|
|
|
|
|
|
class _AppliedAddStaffState extends State<ErAppliedAddStaff> {
|
|
|
+ late TextEditingController searchController;
|
|
|
+
|
|
|
@override
|
|
|
void initState() {
|
|
|
super.initState();
|
|
|
- ErAppliedAddStaffController controller = Get.put(ErAppliedAddStaffController());
|
|
|
+ ErAppliedAddStaffController controller = Get.put(ErAppliedAddStaffController());
|
|
|
controller.jobId = widget.jobId;
|
|
|
+ searchController = TextEditingController();
|
|
|
}
|
|
|
|
|
|
@override
|
|
|
void dispose() {
|
|
|
super.dispose();
|
|
|
Get.delete<ErAppliedAddStaffController>();
|
|
|
+ searchController.dispose();
|
|
|
}
|
|
|
|
|
|
@override
|
|
@@ -67,29 +71,66 @@ class _AppliedAddStaffState extends State<ErAppliedAddStaff> {
|
|
|
isFontMedium: true,
|
|
|
textColor: ColorConstants.black,
|
|
|
marginTop: 22,
|
|
|
- marginBottom: 15,
|
|
|
+ marginBottom: 5,
|
|
|
marginLeft: 22,
|
|
|
marginRight: 22,
|
|
|
),
|
|
|
),
|
|
|
|
|
|
- SearchAppBar(
|
|
|
- value: controller.keyword,
|
|
|
- searchBarHeight: 38,
|
|
|
- searchBarBgColor: Colors.white,
|
|
|
- searchBarBorderRadius: 15,
|
|
|
- searchBarBorder: Border.all(
|
|
|
- color: const Color(0XFFC3C3C3), // 设置边框颜色为灰色
|
|
|
- width: 0.5, // 设置边框宽度
|
|
|
- ),
|
|
|
- textHintColor: const Color(0XFFAFB3B7),
|
|
|
- textColor: ColorConstants.black33,
|
|
|
- onSearch: (keyword) {
|
|
|
- controller.doSearch(keyword);
|
|
|
- },
|
|
|
- hintText: "Staff Name/ID/Phone".tr,
|
|
|
- controller: controller.searchController,
|
|
|
- ).marginOnly(left: 16.5, right: 1.5, bottom: 15.5),
|
|
|
+ Row(
|
|
|
+ children: [
|
|
|
+ //选择状态
|
|
|
+ Container(
|
|
|
+ padding: const EdgeInsets.only(left: 10, right: 5),
|
|
|
+ margin: const EdgeInsets.only(left: 15, right: 8),
|
|
|
+ height: 38,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.white,
|
|
|
+ borderRadius: const BorderRadius.all(Radius.circular(15)),
|
|
|
+ border: Border.all(
|
|
|
+ color: const Color(0XFFC3C3C3), // 添加边框颜色
|
|
|
+ width: 0.5, // 添加边框宽度
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ child: Row(
|
|
|
+ mainAxisSize: MainAxisSize.max,
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
+ mainAxisAlignment: MainAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ MyTextView(
|
|
|
+ controller.selectedType ?? "",
|
|
|
+ fontSize: 14,
|
|
|
+ hint: "Choose Type".tr,
|
|
|
+ textHintColor: ColorConstants.textBlackHint,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: ColorConstants.black33,
|
|
|
+ ).expanded(),
|
|
|
+ const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ).onTap(() {
|
|
|
+ controller.pickerType();
|
|
|
+ }).expanded(flex: 1),
|
|
|
+
|
|
|
+ SearchAppBar(
|
|
|
+ value: controller.keyword,
|
|
|
+ searchBarHeight: 38,
|
|
|
+ searchBarBgColor: Colors.white,
|
|
|
+ searchBarBorderRadius: 15,
|
|
|
+ searchBarBorder: Border.all(
|
|
|
+ color: const Color(0XFFC3C3C3), // 设置边框颜色为灰色
|
|
|
+ width: 0.5, // 设置边框宽度
|
|
|
+ ),
|
|
|
+ textHintColor: const Color(0XFFAFB3B7),
|
|
|
+ textColor: ColorConstants.black33,
|
|
|
+ onSearch: (keyword) {
|
|
|
+ controller.doSearch(keyword);
|
|
|
+ },
|
|
|
+ hintText: "Staff Name/ID/Phone".tr,
|
|
|
+ controller: searchController,
|
|
|
+ ).expanded(flex: 1),
|
|
|
+ ],
|
|
|
+ ).marginOnly(bottom: 10),
|
|
|
|
|
|
Container(
|
|
|
color: Colors.white,
|
|
@@ -221,7 +262,6 @@ class _AppliedAddStaffState extends State<ErAppliedAddStaff> {
|
|
|
|
|
|
widget.confirmAction?.call(separatedIds);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
Widget _buildStaffItem(THAppliedEmployeeRows item, VoidCallback callback) {
|