Browse Source

2024-08-27 修改

修改:
1. 公务出访 - 详情 添加字段 公务性质 电子邮箱/微信 网址
zhaiy 7 months ago
parent
commit
eeede67e2f

+ 7 - 2
app/src/main/AndroidManifest.xml

@@ -16,7 +16,9 @@
     <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
     <uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />
     <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
+    <uses-permission
+        android:name="android.permission.READ_EXTERNAL_STORAGE"
+        android:maxSdkVersion="32" />
 
     <application
         android:name=".OASystem"
@@ -29,10 +31,13 @@
         android:supportsRtl="true"
         android:theme="@style/AppTheme"
         tools:targetApi="31">
+        <activity
+            android:name=".ui.group_common.commission_confirm.CommissionConfirmActivity"
+            android:exported="false" />
         <activity
             android:name=".ui.picture_preview.PicturePreviewActivity"
             android:exported="false"
-            android:launchMode="singleTop"/>
+            android:launchMode="singleTop" />
         <activity
             android:name=".ui.group_invite_official.official_visits.AddOfficialVisitsActivity"
             android:exported="false"

+ 3 - 0
app/src/main/java/com/pan_american/android/data/model/group_invite_official/official_visits/entity/OfficialVisitDetail.kt

@@ -5,6 +5,7 @@ import com.pan_american.android.OASystem
 open class OfficialVisitDetail {
     var id = 0
     var diId = 0
+    var nature = ""
     var type = 0
     var client = ""
     var confirmTheInvitation = 0
@@ -26,6 +27,8 @@ open class OfficialVisitDetail {
     var remark = ""
     var isSubmitApproval = -1
     var isPay = -1
+    var emailOrWeChat = ""
+    var website = ""
     var country = ""
     var area = ""
     var field = ""

+ 1 - 0
app/src/main/java/com/pan_american/android/data/model/group_invite_official/official_visits/entity/OfficialVisitListItem.kt

@@ -5,6 +5,7 @@ class OfficialVisitListItem {
     val client = ""
     val date = ""
     val time = ""
+    val nature = ""
     val contact = ""
     val createUserName = ""
     val createTime = ""

+ 37 - 0
app/src/main/java/com/pan_american/android/ui/group_invite_official/official_visits/AddOfficialVisitsActivity.kt

@@ -81,12 +81,16 @@ class AddOfficialVisitsActivity : BaseActivity<ActivityAddOfficialVisitsBinding>
 
     private val officialTypeList = ArrayList<Selector>()
 
+    private val officialAttributeList = ArrayList<Selector>()
+
     private val photoList = ArrayList<PictureListItem>()
 
     private var invitorId = 0
 
     private var officialTypeId = 0
 
+    private var officialAttributeId = 0
+
     private var checkCommitType = 0
 
     private val updateOfficialVisitRequest = UpdateOfficialVisitRequest()
@@ -167,6 +171,7 @@ class AddOfficialVisitsActivity : BaseActivity<ActivityAddOfficialVisitsBinding>
                     officialContactJob.isEnabled(false)
                     officialContact.isEnabled = false
                     phone.isEnabled = false
+                    officialAttribute.isEnabled = false
                     officialType.isEnabled = false
                     dressDemand.isEnabled = false
                     industry.isEnabled = false
@@ -178,6 +183,8 @@ class AddOfficialVisitsActivity : BaseActivity<ActivityAddOfficialVisitsBinding>
                     isPayNo.isEnabled = false
                     isApprovalYes.isEnabled = false
                     isApprovalNo.isEnabled = false
+                    emailOrWechat.isEnabled = false
+                    website.isEnabled = false
                     officialLocation.isEnabled(false)
                     officialBackground.isEnabled(false)
                     officialRequestExample.isEnabled(false)
@@ -360,6 +367,15 @@ class AddOfficialVisitsActivity : BaseActivity<ActivityAddOfficialVisitsBinding>
                 }
             }
 
+            binding.officialAttribute.text.apply {
+                if (isNotBlank()) {
+                    updateOfficialVisitRequest.nature = this.toString()
+                } else {
+                    showMessage(resources.getString(R.string.official_attribute_input_hint))
+                    return@setOnClickListener
+                }
+            }
+
             binding.invitor.text.apply {
                 if (isNotBlank()) {
                     updateOfficialVisitRequest.type = invitorId
@@ -468,6 +484,24 @@ class AddOfficialVisitsActivity : BaseActivity<ActivityAddOfficialVisitsBinding>
                 }
             }
 
+            binding.emailOrWechat.text.apply {
+                if (isNotBlank()) {
+                    updateOfficialVisitRequest.emailOrWeChat = this.toString()
+                } else {
+                    showMessage(resources.getString(R.string.translate_language_input_hint))
+                    return@setOnClickListener
+                }
+            }
+
+            binding.website.text.apply {
+                if (isNotBlank()) {
+                    updateOfficialVisitRequest.website = this.toString()
+                } else {
+                    showMessage(resources.getString(R.string.email_or_wechat_hint))
+                    return@setOnClickListener
+                }
+            }
+
             binding.officialLocation.getText().apply {
                 if (isNotBlank()) {
                     updateOfficialVisitRequest.address = this
@@ -603,6 +637,7 @@ class AddOfficialVisitsActivity : BaseActivity<ActivityAddOfficialVisitsBinding>
                             checkCommitType = confirmTheInvitation
                             binding.officialDate.text = date
                             binding.officialTime.text = time
+                            binding.officialAttribute.setText(nature)
 
                             for (item in invitorList) {
                                 if (type == item.id) {
@@ -658,6 +693,8 @@ class AddOfficialVisitsActivity : BaseActivity<ActivityAddOfficialVisitsBinding>
                                 }
                             }
 
+                            binding.emailOrWechat.setText(emailOrWeChat)
+                            binding.website.setText(website)
                             binding.officialLocation.setText(address)
                             binding.officialBackground.setText(setting)
                             binding.officialRequestExample.setText(reqSample)

+ 3 - 0
app/src/main/java/com/pan_american/android/ui/group_invite_official/official_visits/InviteVisitsActivity.kt

@@ -405,6 +405,9 @@ class InviteVisitsActivity : BaseActivity<ActivityInviteVisitsBinding>() {
             addBindView { itemView, data ->
                 itemView.findViewById<TextView>(R.id.official_department).text = data.client
                 itemView.findViewById<TextView>(R.id.official_time).text = String.format(resources.getString(R.string.with_space_format), data.date.substring(0, 10), data.time)
+                itemView.findViewById<TextView>(R.id.official_attribute).text = data.nature.ifBlank {
+                        resources.getString(R.string.no_info)
+                    }
                 itemView.findViewById<TextView>(R.id.contacts_name).text = data.contact
                 itemView.findViewById<TextView>(R.id.creator).text = data.createUserName
                 itemView.findViewById<TextView>(R.id.create_time).text = data.createTime

+ 114 - 0
app/src/main/res/layout/activity_add_official_visits.xml

@@ -506,6 +506,44 @@
                     android:textSize="@dimen/text_size_medium" />
             </LinearLayout>
 
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/line"
+                android:layout_marginTop="@dimen/common_padding"
+                android:layout_marginBottom="@dimen/common_padding"
+                android:background="@color/line_color" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/common_padding"
+                android:layout_marginBottom="@dimen/common_padding"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:text="@string/official_attribute"
+                    android:textSize="@dimen/text_size_medium" />
+
+                <EditText
+                    android:id="@+id/official_attribute"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/common_padding"
+                    android:layout_weight="1"
+                    android:background="@color/white"
+                    android:gravity="end"
+                    android:hint="@string/please_input"
+                    android:importantForAutofill="no"
+                    android:inputType="text"
+                    android:singleLine="true"
+                    android:textColor="@color/text_color"
+                    android:textColorHint="@color/hint_text_color"
+                    android:textSize="@dimen/text_size_medium" />
+            </LinearLayout>
+
             <View
                 android:layout_width="match_parent"
                 android:layout_height="@dimen/line"
@@ -814,6 +852,82 @@
                 </RadioGroup>
             </LinearLayout>
 
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/line"
+                android:layout_marginTop="@dimen/common_padding"
+                android:layout_marginBottom="@dimen/common_padding"
+                android:background="@color/line_color" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/common_padding"
+                android:layout_marginBottom="@dimen/common_padding"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:text="@string/email_or_wechat"
+                    android:textSize="@dimen/text_size_medium" />
+
+                <EditText
+                    android:id="@+id/email_or_wechat"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/common_padding"
+                    android:layout_weight="1"
+                    android:background="@color/white"
+                    android:gravity="end"
+                    android:hint="@string/please_input"
+                    android:importantForAutofill="no"
+                    android:inputType="text|textEmailAddress"
+                    android:singleLine="true"
+                    android:textColor="@color/text_color"
+                    android:textColorHint="@color/hint_text_color"
+                    android:textSize="@dimen/text_size_medium" />
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/line"
+                android:layout_marginTop="@dimen/common_padding"
+                android:layout_marginBottom="@dimen/common_padding"
+                android:background="@color/line_color" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/common_padding"
+                android:layout_marginBottom="@dimen/common_padding"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:text="@string/website"
+                    android:textSize="@dimen/text_size_medium" />
+
+                <EditText
+                    android:id="@+id/website"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/common_padding"
+                    android:layout_weight="1"
+                    android:background="@color/white"
+                    android:gravity="end"
+                    android:hint="@string/please_input"
+                    android:importantForAutofill="no"
+                    android:inputType="text"
+                    android:singleLine="true"
+                    android:textColor="@color/text_color"
+                    android:textColorHint="@color/hint_text_color"
+                    android:textSize="@dimen/text_size_medium" />
+            </LinearLayout>
+
             <View
                 android:layout_width="match_parent"
                 android:layout_height="@dimen/line"

+ 3 - 3
app/src/main/res/layout/fragment_workspace.xml

@@ -59,7 +59,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/common_padding_large"
-                    android:text="@string/staff"
+                    android:text="@string/staff_title"
                     android:textColor="@color/text_color"
                     android:textSize="@dimen/text_size_small"
                     android:textStyle="bold" />
@@ -76,7 +76,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/common_padding_large"
-                    android:text="@string/department"
+                    android:text="@string/department_title"
                     android:textColor="@color/text_color"
                     android:textSize="@dimen/text_size_small"
                     android:textStyle="bold" />
@@ -101,7 +101,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/common_padding_large"
-                    android:text="@string/job"
+                    android:text="@string/job_title"
                     android:textColor="@color/text_color"
                     android:textSize="@dimen/text_size_small"
                     android:textStyle="bold" />

+ 31 - 0
app/src/main/res/layout/item_official_visits_list.xml

@@ -72,6 +72,37 @@
 
         </LinearLayout>
 
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:layout_marginTop="@dimen/common_padding_huge"
+            android:layout_marginBottom="@dimen/common_padding"
+            android:background="@color/line_color" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/common_padding"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:text="@string/official_attribute"
+                android:textSize="@dimen/text_size_medium" />
+
+            <TextView
+                android:id="@+id/official_attribute"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:gravity="end"
+                android:singleLine="true"
+                android:textSize="@dimen/text_size_medium" />
+
+        </LinearLayout>
+
         <View
             android:layout_width="match_parent"
             android:layout_height="@dimen/line"

+ 13 - 3
app/src/main/res/values/strings.xml

@@ -94,6 +94,10 @@
     <string name="male">男</string>
     <string name="female">女</string>
 
+    <string name="company">公司</string>
+    <string name="department">部门</string>
+    <string name="staff">员工</string>
+
     <string name="birthday">出生日期</string>
 
     <string name="ID_number">身份证号</string>
@@ -157,9 +161,9 @@
 
     <!-- 工作台 -->
 
-    <string name="staff">员工:</string>
-    <string name="department">部门:</string>
-    <string name="job">职位:</string>
+    <string name="staff_title">员工:</string>
+    <string name="department_title">部门:</string>
+    <string name="job_title">职位:</string>
 
     <string name="efficiency_tools">效率工具</string>
     <string name="address_book">员工通讯录</string>
@@ -1036,6 +1040,7 @@
     <string name="add_official_visits">新增公务出访数据</string>
     <string name="update_official_visits">公务出访数据修改</string>
     <string name="official_time">公务时间</string>
+    <string name="official_attribute">公务性质</string>
     <string name="official_department">公务单位</string>
     <string name="official_date">公务日期</string>
     <string name="invitor">邀请方</string>
@@ -1047,6 +1052,8 @@
     <string name="translator">翻译人员</string>
     <string name="translate_language">翻译语种</string>
     <string name="is_approval">是否报批</string>
+    <string name="email_or_wechat">邮件/微信</string>
+    <string name="website">网址</string>
     <string name="official_location">公务地址</string>
     <string name="official_background">公务方背景</string>
     <string name="official_request_example">公务请示范例</string>
@@ -1065,6 +1072,7 @@
     <string name="official_department_input_hint">请输入公务单位</string>
     <string name="official_date_select_hint">请选择公务日期</string>
     <string name="official_time_select_hint">请选择公务时间</string>
+    <string name="official_attribute_input_hint">请输入公务性质</string>
     <string name="invitor_select_hint">请选择邀请方</string>
     <string name="official_contact_job_input_hint">请输入公务方联系人职务</string>
     <string name="official_contact_input_hint">请输入公务方联系人</string>
@@ -1073,6 +1081,8 @@
     <string name="official_dress_demand_input_hint">请输入着装要求</string>
     <string name="official_industry_input_hint">请输入涉及领域</string>
     <string name="translate_language_input_hint">请输入翻译语种</string>
+    <string name="email_or_wechat_hint">请输入电子邮箱或微信</string>
+    <string name="website_input_hint">请输入网址</string>
     <string name="official_location_input_hint">请输入公务地址</string>
     <string name="official_background_input_hint">请输入公务方背景</string>
     <string name="picture_upload_hint">请上传图片</string>