Sfoglia il codice sorgente

潼南中医院项目分机增加客户二维码显示

weizhengliang 1 anno fa
parent
commit
3de6310155

+ 11 - 8
android_bed/src/main/h7_3128/java/com/wdkl/app/ncs/callingbed/fragment/MainFragment.kt

@@ -40,9 +40,6 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainView2LayoutBinding>(
     }
 
     override fun init() {
-        //医嘱内容可以滚动显示
-        tv_order_content.movementMethod = ScrollingMovementMethod.getInstance()
-        tv_version.text = "V"+ BuildConfig.VERSION_NAME+"_"+BuildConfig.VERSION_CODE
 
         updateInfo()
     }
@@ -74,11 +71,17 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainView2LayoutBinding>(
         }
         if (!TextUtils.isEmpty(customInfo.cardNo)) {
             tv_custom_card_no.text = StringUtil.getResString(R.string.card_no) + customInfo.cardNo
-        }
-        if (TextUtils.isEmpty(customInfo.advice)) {
-            tv_order_content.text = StringUtil.getResString(R.string.str_empty)
-        } else {
-            tv_order_content.text = customInfo.advice
+
+            Thread {
+                //客户二维码: BC+住院号
+                val builder = StringBuilder()
+                builder.append("BC")
+                builder.append(customInfo.cardNo)
+                val code = EcodeHelper().createQRImage(builder.toString(),200, null)
+                activity.runOnUiThread {
+                    view_custom_qr_code?.setImageBitmap(code)
+                }
+            }.start()
         }
 
         if (Constant.doctorValid == 1) {

+ 9 - 43
android_bed/src/main/h7_3128/res/layout/main_view2_layout.xml

@@ -83,19 +83,6 @@
                 android:textSize="24sp"
                 android:text="@string/nurse_title"/>
         </LinearLayout>
-
-        <TextView
-            android:id="@+id/tv_version"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="2"
-            android:layout_marginTop="4dp"
-            android:background="@color/white"
-            android:gravity="center"
-            android:textColor="@color/black"
-            android:textSize="12sp"
-            android:text="v--"
-            android:visibility="gone"/>
     </LinearLayout>
 
 
@@ -264,11 +251,19 @@
                 </LinearLayout>
             </LinearLayout>
 
+            <ImageView
+                android:id="@+id/view_custom_qr_code"
+                android:layout_width="200dp"
+                android:layout_height="200dp"
+                android:layout_above="@id/ll_nurse_more"
+                android:layout_alignParentRight="true" />
+
             <com.wdkl.ncs.android.lib.widget.MarqueeTextView
                 android:id="@+id/tv_custom_name"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_above="@id/ll_nurse_more"
+                android:layout_toLeftOf="@id/view_custom_qr_code"
                 android:paddingLeft="10dp"
                 android:paddingRight="10dp"
                 android:gravity="center"
@@ -277,40 +272,11 @@
                 android:focusableInTouchMode="true"
                 android:marqueeRepeatLimit="-1"
                 android:singleLine="true"
-                android:textSize="132sp"
+                android:textSize="112sp"
                 android:textColor="@color/main_color"
                 android:textStyle="bold"
                 android:text="---"/>
 
-            <!--<TextView
-                android:id="@+id/tv_order_title"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_below="@id/tv_custom_indate"
-                android:layout_marginTop="20dp"
-                android:padding="10dp"
-                android:background="#F3F9FE"
-                android:drawableLeft="@mipmap/ic_order"
-                android:drawablePadding="10dp"
-                android:textSize="24sp"
-                android:textColor="@color/black"
-                android:text="" />-->
-            <TextView
-                android:id="@+id/tv_order_content"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_below="@id/tv_custom_name"
-                android:layout_above="@id/ll_nurse_more"
-                android:layout_marginTop="20dp"
-                android:padding="10dp"
-                android:background="#F3F9FE"
-                android:scrollbars="vertical"
-                android:fadeScrollbars="true"
-                android:textSize="20sp"
-                android:textColor="#131313"
-                android:text="@string/str_empty"
-                android:lineSpacingExtra="12dp"
-                android:visibility="gone"/>
         </RelativeLayout>
     </FrameLayout>
 

+ 1 - 1
android_bed/src/main/h7_3128/res/layout/view_bed_name.xml

@@ -2,7 +2,7 @@
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="178dp"
+    android:layout_height="168dp"
     android:background="@color/white">
 
     <com.wdkl.ncs.android.lib.widget.MarqueeTextView