Bladeren bron

Common editor will be refreshed incorrectly after dragging -- common editor 拖动后会胡乱刷新(resolve: #14509)
The common editor clicks the enumeration type cell does not respond -- common editor 点枚举类型单元格没有反应(resolve: #14510)
The common editor library window is not registered -- common editor 库窗口没有注册 (resolve: #14511)
Detail Click the edit menu will crash -- detail 点编辑菜单闪退(resolve: #14512)

Ray Zhang 4 jaren geleden
bovenliggende
commit
f30bf69289

+ 65 - 0
ApexDrivers/CommonEditorLib/src/main/AndroidManifest.xml

@@ -1,5 +1,70 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.usai.commoneditorlib">
+    <!-- CommonEditor -->
+    <application
+        android:allowBackup="true"
+        android:supportsRtl="true">
+    <activity
+        android:name=".CommonEditorActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".ImageUploadActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".ImageViewActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".BundleModelActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".AddressEditorActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".CreditCardEditorActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".ContactListActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".EnumSlectActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".DatePickerActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".MonthPickerActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
+    <activity
+        android:name=".SignatureActivity"
+        android:theme="@style/Theme.AppCompat.Light">
+        >
+    </activity>
 
+
+        <activity
+            android:name=".EnumSelectAndSort.EnumSelectAndSortActivity"
+            android:theme="@style/Theme.AppCompat.Light">
+        </activity>
+    </application>>
 </manifest>

+ 9 - 3
ApexDrivers/CommonEditorLib/src/main/java/com/usai/commoneditorlib/CommonEditorActivity.java

@@ -2183,11 +2183,17 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
                     int max_select = item_json.optInt("max");
                     boolean singleSelect = single_select.toLowerCase().equals("true");
                     String cadedate_str = cadedate_json.toString();
-                    intent = new EnumSlectActivity.Builder().build(mCtx,title,max_select,groupPosition,childPosition,cadedate_str,singleSelect,true);
-                    boolean sort = item_json.getBoolean("sort");
+                    boolean sort = item_json.optBoolean("sort",false);
+
+
+
                     if (sort) {
                         intent = new EnumSelectAndSortActivity.Builder().build(mCtx,title,max_select,groupPosition,childPosition,cadedate_str,singleSelect,true);
                     }
+                    else
+                    {
+                        intent = new EnumSlectActivity.Builder().build(mCtx,title,max_select,groupPosition,childPosition,cadedate_str,singleSelect,true);
+                    }
                     request_code = 10;
 
                 } // enum
@@ -2567,7 +2573,7 @@ public class CommonEditorActivity extends AppCompatActivity implements View.OnLa
        }
         // 重用时先保存
         if (holder.text_field.getText().length() > 0) {
-            editTextEndEditing(holder.text_field,true,holder.group,holder.child);
+//            editTextEndEditing(holder.text_field,true,holder.group,holder.child);
         }
         holder.group = group;
         holder.child = child;

+ 1 - 1
ApexDrivers/RAUtilsLibrary/src/main/java/com/usai/redant/rautils/base/BaseObject.java

@@ -226,7 +226,7 @@ public class BaseObject extends NoProguard{
 //                        continue;
 //                    }
 
-                    Log.e("DEBUG !!!", "setValuesForKeysWithJSON: "+key );
+//                    Log.e("DEBUG !!!", "setValuesForKeysWithJSON: "+key );
                     setValue(cls, f, key, value);
                 }
                 cls = cls.getSuperclass();

+ 261 - 0
ApexDrivers/ratradefiling/src/debug/assets/edit_isf.json

@@ -0,0 +1,261 @@
+{
+  "menu": [
+    {
+      "name": "save",
+      "title": "SAVE",
+      "url": "",
+      "params": {
+        "action": "123"
+      }
+    },
+    {
+      "name": "save&submit",
+      "title": "SAVE & SUBMIT",
+      "url": "",
+      "params": {
+        "action": "234"
+      }
+    }
+  ],
+  "result": 2,
+  "section_count": 3,
+  "title": "DEMO ORDER DETAIL",
+  "section_0": {
+    "count": 13,
+    "title": "GENERAL INFORMATION",
+    "item_12": {
+      "control": "multi_action",
+      "count": 2,
+      "item_0": {
+          "refresh": 1,
+        "params": {
+          "name": "item_12_0",
+          "action": "edit",
+          "sub_type": "party"
+        },
+        "name": "",
+        "value": "editor",
+        "aname": "CREATE NEW PARTY"
+      },
+      "item_1": {
+        "key_map": {
+          "bol": "customer_email",
+          "isfbondholder": "customer_cid"
+        },
+        "params": {
+          "name": "item_12_1"
+        },
+        "name": "",
+        "value": "online_enum",
+        "aname": "SELECT EXIST PARTY"
+      },
+      "aname": "PARTY ACTIONS"
+    },
+    "item_11": {
+      "control": "action",
+
+      "params": {
+        "name": "item_11",
+        "action": "edit",
+        "sub_type": "party",
+        "id": "123456"
+      },
+      "name": "",
+      "value": "editor",
+      "refresh": 1,
+      "aname": "ADD PARTY"
+    },
+    "item_10": {
+      "control": "action",
+      "key_map": {
+        "bol": "customer_email",
+        "isfbondholder": "customer_cid"
+      },
+      "params": {
+        "name": "item_10",
+        "action": "edit",
+        "sub_type": "party",
+        "id": "123456"
+      },
+      "name": "",
+      "value": "online_enum",
+      "refresh": 0,
+      "aname": "SELECT PARTY"
+    },
+    "item_0": {
+      "control": "edit",
+      "autocomplete": false,
+      "value": "DNCYQDFDAL214088",
+      "name": "bol",
+      "aname": "Bill Of Lading",
+      "required": "true"
+    },
+    "item_1": {
+      "control": "enum",
+      "name": "bolcode",
+      "cadedate": {
+        "count": 2,
+        "val_1": {
+          "check": 0,
+          "value": "House Bill of Lading",
+          "value_id": 10
+        },
+        "val_0": {
+          "check": 1,
+          "value": "Ocean Bill of Lading",
+          "value_id": 11
+        }
+      },
+      "required": "true",
+      "single_select": "true",
+      "aname": "BOL Code"
+    },
+    "item_2": {
+      "refresh": 1,
+      "control": "enum",
+      "name": "isf_type",
+      "cadedate": {
+        "count": 2,
+        "val_1": {
+          "check": 0,
+          "value": "5+2",
+          "value_id": 10
+        },
+        "val_0": {
+          "check": 1,
+          "value": "10+2",
+          "value_id": 11
+        }
+      },
+      "required": "true",
+      "single_select": "true",
+      "aname": "ISF Type"
+    },
+    "item_3": {
+      "control": "switch",
+      "name": "use_bond",
+      "value": "true",
+      "aname": "Use ISF Bond"
+    },
+    "item_4": {
+      "control": "enum",
+      "name": "action",
+      "cadedate": {
+        "count": 2,
+        "val_1": {
+          "check": 0,
+          "value": "Replace",
+          "value_id": 12
+        },
+        "val_0": {
+          "check": 1,
+          "value": "Add",
+          "value_id": 11
+        }
+      },
+      "required": "true",
+      "single_select": "true",
+      "aname": "Action"
+    },
+    "item_5": {
+      "control": "edit",
+      "value": "23-235341400",
+      "name": "isfbondholder",
+      "aname": "ISF-BondHolder",
+      "required": "true",
+      "disable": true
+    },
+    "item_6": {
+      "control": "enum",
+      "name": "action_type_code",
+      "cadedate": {
+        "count": 4,
+        "val_0": {
+          "check": 1,
+          "value": "CT-Complete Transaction",
+          "value_id": 11
+        },
+        "val_1": {
+          "check": 0,
+          "value": "FR-Flexible Range",
+          "value_id": 12
+        },
+        "val_2": {
+          "check": 0,
+          "value": "FT-Flexible Timing",
+          "value_id": 13
+        },
+        "val_3": {
+          "check": 0,
+          "value": "FX-Flexible Range and Flexible Timing",
+          "value_id": 14
+        }
+      },
+      "required": "true",
+      "single_select": "true",
+      "aname": "Action Type Code"
+    },
+    "item_7": {
+      "value": "04/09/2017",
+      "type": "date",
+      "control": "datepicker",
+      "aname": "ETA",
+      "name": "eta"
+    },
+    "item_8": {
+      "control": "text",
+      "name": "customer_zipcode",
+      "value": "94560",
+      "aname": "Zipcode"
+    },
+    "item_9": {
+      "control": "enum",
+      "online": "true",
+      "name": "abc",
+      "cadedate": {
+        "count": 1,
+        "val_0": {
+          "check": 1,
+          "value": "Ocean Bill of Lading",
+          "value_id": 11
+        }
+      },
+      "params": {
+        "name": "abc"
+      },
+      "required": "true",
+      "single_select": "true",
+      "aname": "Test Online Enum"
+    }
+  },
+  "section_1": {
+    "title": "Parties Details",
+    "count": 1,
+    "item_0": {
+      "value": "CONTINENTAL MATERIALS INC.",
+      "control": "editor",
+      "aname": "SAME AS BY CONMAT00010001",
+      "name": "party_0",
+      "refresh": 1,
+      "params": {
+        "action": "edit",
+        "sub_type": "party",
+        "id": "123456"
+      }
+    }
+  },
+  "section_2": {
+    "title": " Addtional Reference",
+    "count": 1,
+    "item_0": {
+      "control": "edit",
+      "value": "",
+      "name": "cr",
+      "aname": "CR",
+      "required": "false"
+    }
+  },
+  "up_params": {
+    "count": 0
+  }
+}

+ 77 - 0
ApexDrivers/ratradefiling/src/debug/assets/edit_party.json

@@ -0,0 +1,77 @@
+{
+    
+    "menu": [
+      {
+        "name": "save",
+        "title": "SAVE",
+        "url": "",
+        "params": {
+          "action": "123"
+        }
+      },
+      {
+        "name": "delete",
+        "title": "DELETE",
+        "url": "",
+        "params": {
+          "action": "234"
+        }
+      }
+    ],
+    "section_0": {
+        "title": "CONTAINER INFORMATION",
+        "count": 7,
+        "item_0": {
+            "control": "edit",
+            "aname": "Addres11s 1",
+            "name": "companyname",
+            "value": "EMMY''S ARTISAN BAKERY",
+            "required": "false"
+        },
+        "item_1": {
+            "control": "edit",
+            "aname": "Addres1s 1",
+            "name": "address_11",
+            "value": "",
+            "required": "false"
+        },
+        "item_2": {
+            "control": "edit",
+            "aname": "Address 1",
+            "name": "address_1",
+            "value": "",
+            "required": "false"
+        },
+        "item_3": {
+            "control": "edit",
+            "aname": "Address 2",
+            "name": "address_2",
+            "value": "",
+            "required": "false"
+        },
+        "item_4": {
+            "control": "edit",
+            "aname": "City",
+            "name": "city",
+            "value": "",
+            "required": "false"
+        },
+        "item_5": {
+            "control": "edit",
+            "aname": "Zip",
+            "name": "zipcode",
+            "value": "",
+            "required": "false"
+        },
+        "item_6": {
+            "control": "edit",
+            "aname": "Country_Code",
+            "name": "country",
+            "value": "",
+            "required": "false"
+        }
+    },
+    "result": 2,
+    "section_count": 1,
+    "title": "CONTAINER INFORMATION"
+}

+ 37 - 0
ApexDrivers/ratradefiling/src/debug/assets/enum_cadedate.json

@@ -0,0 +1,37 @@
+{
+    "title":"test online enum title",
+    "result":2,
+  "count": 2,
+  "val_1": {
+    "check": 0,
+    "value": "House Bill of Lading",
+    "value_id": 10,
+    "business_card_2": "",
+    "business_card_0": "",
+    "customer_country": "US",
+    "customer_phone": "1234567890",
+    "business_card_1": "",
+    "customer_email": "po@test.com",
+    "customer_name": "Fake Order For Testing",
+    "customer_address3": "",
+    "customer_first_name": "",
+    "customer_address2": "Dock Doors 3-15",
+    "customer_contact_type": "CUSTOMER;",
+    "customer_contact_ext": "1405 Worldwide Blvd\r\nDock Doors 3-15\r\nHebron,KY 41048 US",
+    "customer_zipcode": "41048",
+    "customer_address1": "1405 Worldwide Blvd",
+    "customer_last_name": "",
+    "customer_city": "Hebron",
+    "customer_state": "KY",
+    "customer_sales_rep": "NPD-HOUSE ACCOUNT ",
+    "customer_cid": "FAKORD0001",
+    "customer_contact": " ",
+    "customer_fax": ""
+    
+  },
+  "val_0": {
+    "check": 1,
+    "value": "Ocean Bill of Lading",
+    "value_id": 11
+  }
+}

+ 2 - 0
ApexDrivers/ratradefiling/src/main/AndroidManifest.xml

@@ -56,6 +56,8 @@
         <activity android:name=".my.CheckSavedActivity"/>
         <activity android:name=".my.ChangePasswordActivity"/>
         <activity android:name=".login.RetrievePasswordActivity"/>
+        <activity
+            android:name=".tfeditor.TFEditorActivity"/>
     </application>
 
 </manifest>

+ 2 - 1
ApexDrivers/ratradefiling/src/main/java/com/usai/ratradefiling/detail/DetailFragment.java

@@ -1284,7 +1284,8 @@ public class DetailFragment extends Fragment implements OnClickListener /*
 //			throw new AssertionError("Editor not impl");
 
 
-			Intent intent = TFEditorActivity.build(mContext,TFEditorActivity.class,null,URL_REMOTE,URL_EDIT,new Bundle());
+			Bundle b=RAUtil.Json2Bundle(jitem.optJSONObject("params"));
+			Intent intent = TFEditorActivity.build(mContext,TFEditorActivity.class,null,URL_REMOTE,URL_EDIT,b);
 
 			startActivity(intent);
 

+ 1 - 1
ApexDrivers/ratradefiling/src/main/java/com/usai/ratradefiling/tfeditor/TFEditorActivity.java

@@ -26,7 +26,7 @@ public class TFEditorActivity extends CommonEditorActivity
 
         mContext = this;
 
-        hasChildView = true;
+        hasChildView = false;
 //        setContentView(R.layout.activity_tfeditor);
 
         super.onCreate(savedInstanceState);