ソースを参照

发布lab-req 切换标题时能回显location

glglove 8 時間 前
コミット
4cb2d7c768

+ 6 - 2
packages/cpt_uk/lib/modules/job/labour_request_add/labour_request_add_controller.dart

@@ -611,10 +611,14 @@ class LabourRequestAddController extends GetxController with DioCancelableMixin
 
         }
 
+
+        //  回显 location
+        state.location = state.showTemplateData?.location.toString();
+        var locationController = state.formData['location']!['controller'];
+        locationController.text = state.location??'';
+
         // 回显 国家 城市 location
         if(state.showTemplateData?.countryId != null){
-          state.location = state.showTemplateData?.location.toString();
-
           state.selectedCountryStr = state.showTemplateData?.countryList?.firstWhere(
                 (element) => element.id.toString() == state.showTemplateData?.countryId.toString(),
             orElse: () => UkLabReqShowTemplateCountryList(),

+ 3 - 0
packages/cpt_uk/lib/modules/job/template_add/template_add_controller.dart

@@ -406,6 +406,9 @@ class TemplateAddController extends GetxController with DioCancelableMixin {
 
   // 显示工作标题picker
   void showChooseJobTitlePicker(){
+    if(Utils.isEmpty(state.selectedJobTemplateStr)){
+      return ToastEngine.show("Please select industry first");
+    }
     int selectedjobTitleIndex;
     if (state.selectedJobTitleStr == null) {
       selectedjobTitleIndex = 0;

+ 1 - 0
packages/cpt_uk/lib/modules/job/template_list/template_list_page.dart

@@ -101,6 +101,7 @@ class _LabourTemplateListState extends BaseState<UKTemplateListPage, TemplateLis
                     onPressed: () {
                       FocusScope.of(context).unfocus();
                       controller.gotoTemplateAddPage();
+
                     },
                     text: "Add New".tr,
                     textColor: ColorConstants.white,

+ 5 - 0
packages/cpt_uk/lib/modules/review/labour_review_edit/labour_review_edit_controller.dart

@@ -360,6 +360,11 @@ class LabourReviewEditController extends GetxController with DioCancelableMixin
 
         }
 
+        //  回显 location
+        state.location = state.showTemplateData?.location.toString();
+        var locationController = state.formData['location']!['controller'];
+        locationController.text = state.location??'';
+
         // 回显 国家 城市 location
         if(state.showTemplateData?.countryId != null){
           state.location = state.showTemplateData?.location.toString();