Bladeren bron

2025-02-21 新增

新增:
1. 需求收集 - h5页面集成
zhaiy 1 maand geleden
bovenliggende
commit
72e2e8915d

.kotlin/sessions/kotlin-compiler-774406720352134893.salive → .kotlin/sessions/kotlin-compiler-4450826250592448466.salive


+ 4 - 0
app/src/main/AndroidManifest.xml

@@ -42,6 +42,10 @@
         android:supportsRtl="true"
         android:theme="@style/AppTheme"
         tools:targetApi="31">
+        <activity
+            android:name=".ui.efficiency_tools.require_gather.RequireGatherActivity"
+            android:exported="false"
+            android:launchMode="singleTop"/>
         <activity
             android:name=".ui.group_management.entry_and_exit_fee_draft.EntryAndExitDraftPaymentDetailActivity"
             android:exported="false"

+ 44 - 0
app/src/main/java/com/pan_american/android/ui/efficiency_tools/require_gather/RequireGatherActivity.kt

@@ -0,0 +1,44 @@
+package com.pan_american.android.ui.efficiency_tools.require_gather
+
+import android.annotation.SuppressLint
+import android.os.Bundle
+import android.webkit.WebChromeClient
+import android.webkit.WebSettings
+import android.webkit.WebViewClient
+import com.pan_american.android.OASystem
+import com.pan_american.android.R
+import com.pan_american.android.base.BaseActivity
+import com.pan_american.android.databinding.ActivityRequireGatherBinding
+import com.pan_american.android.databinding.LayoutTitleBinding
+
+class RequireGatherActivity : BaseActivity<ActivityRequireGatherBinding>() {
+
+    private lateinit var titleBinding: LayoutTitleBinding
+
+    override fun getViewBinding() = ActivityRequireGatherBinding.inflate(layoutInflater)
+
+    @SuppressLint("SetJavaScriptEnabled")
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+
+        initTitle()
+
+        binding.webView.apply {
+            settings.javaScriptEnabled = true
+            settings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
+            webViewClient = WebViewClient()
+            webChromeClient = WebChromeClient()
+            loadUrl("http://oa.pan-american-intl.com:4399/#/MarketplacePick?userid=${OASystem.userInfo.userId}")
+        }
+    }
+
+    override fun initTitle() {
+        titleBinding = LayoutTitleBinding.bind(binding.root).apply {
+            titleText.text = resources.getString(R.string.require_gather)
+
+            backButton.setOnClickListener {
+                back()
+            }
+        }
+    }
+}

+ 11 - 0
app/src/main/java/com/pan_american/android/ui/workspace/WorkspaceFragment.kt

@@ -21,6 +21,7 @@ import com.pan_american.android.ui.customer_resource.related_invitee.RelatedInvi
 import com.pan_american.android.ui.efficiency_tools.address_book.AddressBookActivity
 import com.pan_american.android.ui.efficiency_tools.exchange_tool.ExchangeToolActivity
 import com.pan_american.android.ui.efficiency_tools.itinerary.ItineraryActivity
+import com.pan_american.android.ui.efficiency_tools.require_gather.RequireGatherActivity
 import com.pan_american.android.ui.financial_module.accounts_receivable_report.AccountsReceivableReportActivity
 import com.pan_american.android.ui.financial_module.collection_bill.CollectionBillActivity
 import com.pan_american.android.ui.financial_module.daily_payment.DailyPaymentListActivity
@@ -373,6 +374,10 @@ class WorkspaceFragment : BaseFragment<FragmentWorkspaceBinding>(), OnClickListe
             }
         }
 
+        if (OASystem.userInfo.depName == "市场部") {
+            binding.requireGather.visibility = View.VISIBLE
+        }
+
         if (OASystem.userInfo.userId == 21 || OASystem.userInfo.userId == 22) {
             if (binding.financialModule.visibility == View.GONE) {
                 binding.financialModule.visibility = View.VISIBLE
@@ -571,6 +576,12 @@ class WorkspaceFragment : BaseFragment<FragmentWorkspaceBinding>(), OnClickListe
             startActivity(intent)
         }
 
+        //需求收集
+        binding.requireGather.setOnClickListener {
+            val intent = Intent(OASystem.context, RequireGatherActivity::class.java)
+            startActivity(intent)
+        }
+
         binding.expenseApproval.setOnClickListener {
             val intent = Intent(OASystem.context, ExpenseApprovalActivity::class.java)
             startActivity(intent)

+ 17 - 0
app/src/main/res/layout/activity_require_gather.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <include
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        layout="@layout/layout_title" />
+
+    <WebView
+        android:id="@+id/web_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+
+</LinearLayout>

+ 27 - 0
app/src/main/res/layout/fragment_workspace.xml

@@ -241,6 +241,33 @@
 
                     </LinearLayout>
 
+                    <LinearLayout
+                        android:id="@+id/require_gather"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:orientation="vertical"
+                        android:visibility="gone">
+
+                        <TextView
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:drawablePadding="@dimen/common_padding"
+                            android:gravity="center_vertical"
+                            android:paddingTop="@dimen/common_padding"
+                            android:paddingBottom="@dimen/common_padding"
+                            android:text="@string/require_gather"
+                            android:textColor="@color/text_color"
+                            android:textSize="@dimen/text_size_medium"
+                            app:drawableStartCompat="@mipmap/icon_require_gaather" />
+
+                        <View
+                            android:layout_width="match_parent"
+                            android:layout_height="1dp"
+                            android:layout_marginStart="35dp"
+                            android:background="@color/line_color" />
+
+                    </LinearLayout>
+
                     <TextView
                         android:id="@+id/exchange_tool"
                         android:layout_width="match_parent"

BIN
app/src/main/res/mipmap-xxhdpi/icon_require_gaather.png


+ 1 - 0
app/src/main/res/values/strings.xml

@@ -205,6 +205,7 @@
     <string name="daily_payment_application">日付费用申请</string>
     <string name="group_payment_application">团组费用申请</string>
     <string name="exchange_tool">汇率换算</string>
+    <string name="require_gather">需求收集</string>
 
     <string name="financial_module">财务模块</string>
     <string name="expense_approval">费用审核</string>