Sfoglia il codice sorgente

风险管理7月8日提交代码-liu.bolan-千海金

Liu.bolan 4 anni fa
parent
commit
0101b9dbc7
33 ha cambiato i file con 1501 aggiunte e 223 eliminazioni
  1. 1 2
      RMA/app/src/main/AndroidManifest.xml
  2. 108 0
      RMA/app/src/main/java/cn/muchinfo/rma/business/account/AccountManager.kt
  3. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/business/account/adapter/AccountAdapter.kt
  4. 105 0
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaFinanceConfigData.kt
  5. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/ContractData.kt
  6. 10 2
      RMA/app/src/main/java/cn/muchinfo/rma/global/data/MyTeamData.kt
  7. 3 1
      RMA/app/src/main/java/cn/muchinfo/rma/update/FunUpdataController.java
  8. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/MainActivity.kt
  9. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/photopicter/PhotoPickerActivity.kt
  10. 6 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/photopicter/fragment/PhotoPickerFragment.java
  11. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt
  12. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/future/holds/HoldDetailsViewHolder.kt
  13. 9 4
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/NewHomeFragment.kt
  14. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/NewCommodityInformationActivity.kt
  15. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryManagerViewModel.kt
  16. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/ChangePasswordActivity.kt
  17. 4 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/ResetPasswordActivity.kt
  18. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/SettingActivity.kt
  19. 137 46
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/register/EnterpriseRegisterActivity.kt
  20. 437 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/MyTeamActivity.kt
  21. 93 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/MyTeamViewModel.kt
  22. 91 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/TeamMemberViewHolder.kt
  23. 122 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/TeamOrderViewHolder.kt
  24. 58 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/TeamSonMemberViewholder.kt
  25. 272 131
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithdrawalActivity.kt
  26. 1 0
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PlatinumTradeViewModel.kt
  27. 13 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ContractDetailActivity.kt
  28. 2 2
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ProcurementViewModel.kt
  29. 1 1
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/SaleFragment.kt
  30. 13 16
      RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/SaleViewModel.kt
  31. 0 1
      RMA/app/src/main/res/layout/photo_picker_activity_photo_pager.xml
  32. 1 1
      RMA/app/src/main/res/xml/file_paths.xml
  33. 2 1
      RMA/gradle.properties

+ 1 - 2
RMA/app/src/main/AndroidManifest.xml

@@ -13,7 +13,6 @@
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
     <!-- group:android.permission-group.CAMERA 相机权限 -->
     <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
     <uses-permission android:name="android.permission.NFC" />
     <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
@@ -48,7 +47,7 @@
 
         <provider
             android:name="androidx.core.content.FileProvider"
-            android:authorities="cn.muchinfo.rma.fileProvider"
+            android:authorities="${applicationId}.fileProvider"
             android:exported="false"
             android:grantUriPermissions="true">
             <meta-data

+ 108 - 0
RMA/app/src/main/java/cn/muchinfo/rma/business/account/AccountManager.kt

@@ -1041,4 +1041,112 @@ class AccountManager {
     }
 
 
+    /**
+     * 查询企业配置表
+     * @param params Map<String, String>
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<BankInfoData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryAreaFinanceConfig(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<AreaFinanceConfigData>?, error: Error?) -> Unit
+    ){
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Qhj/QueryAreaFinanceConfig",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<AreaFinanceConfigData>>>() {
+                override fun onResponse(response: BaseResult<List<AreaFinanceConfigData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+
+    /**
+     * 查询奖励流水(我的奖励)
+     * @param params Map<String, String>
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<BankInfoData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryBrokerRewardLog(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<BrokerRewardLogData>?, error: Error?) -> Unit
+    ){
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Qhj/QueryBrokerRewardLog",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<BrokerRewardLogData>>>() {
+                override fun onResponse(response: BaseResult<List<BrokerRewardLogData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+
+    /**
+     * 查询我的团队
+     * @param params Map<String, String>
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<BankInfoData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryMyTeam(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<MyTeamData>?, error: Error?) -> Unit
+    ){
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Qhj/QueryMyTeam",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<MyTeamData>>>() {
+                override fun onResponse(response: BaseResult<List<MyTeamData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+
+    /**
+     * 查询团队订单(我的团队/团队订单)
+     * @param params Map<String, String>
+     * @param responseBack Function3<[@kotlin.ParameterName] Boolean, [@kotlin.ParameterName] List<BankInfoData>?, [@kotlin.ParameterName] Error?, Unit>
+     */
+    fun queryMyTeamOrder(
+        params: Map<String, String>,
+        responseBack: (isSuccess: Boolean, respData: List<MyTeamOrderData>?, error: Error?) -> Unit
+    ){
+        MyOkHttpUtils().query(
+            URL = SPUtils.getInstance()
+                .getString(Constant.goCommonSearchUrl) + "/Qhj/QueryMyTeamOrder",
+            params = params,
+            type = "1",
+            callback = object : ResponseCallback<BaseResult<List<MyTeamOrderData>>>() {
+                override fun onResponse(response: BaseResult<List<MyTeamOrderData>>?, id: Int) {
+                    responseBack(true, response?.data, null)
+                }
+
+                override fun onError(call: Call?, e: Exception?, id: Int) {
+                    responseBack(false, null, Error(e?.message))
+                }
+            }
+        )
+    }
+
+
 }

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/business/account/adapter/AccountAdapter.kt

@@ -48,7 +48,7 @@ class AccountAdapter {
             builder.deviceID = uuid.toString()
 
             builder.setHeader(MessageHeadModel.getHead(funCode, 0, 0, 0, 0))
-            val arrayOutputStream = ByteArrayOutputStream();
+            val arrayOutputStream = ByteArrayOutputStream()
             builder.build().writeTo(arrayOutputStream)
 
             return Packet50(funCode, arrayOutputStream.toByteArray())

+ 105 - 0
RMA/app/src/main/java/cn/muchinfo/rma/global/data/AreaFinanceConfigData.kt

@@ -0,0 +1,105 @@
+package cn.muchinfo.rma.global.data
+
+import android.os.Parcel
+import android.os.Parcelable
+import com.google.gson.annotations.SerializedName
+
+/**
+ * 企业配置表
+ */
+data class AreaFinanceConfigData(
+    @SerializedName("additionalratio")
+    val additionalratio : String? = "",//追加款比例
+    @SerializedName("advanceratio")
+    val advanceratio : String? = "",//预付款比例
+    @SerializedName("alarmratio")
+    val alarmratio : String? = "",//告警比例
+    @SerializedName("consumptiondirectreward")
+    val consumptiondirectreward : String? = "",//消费直推奖励值
+    @SerializedName("consumptionenabled")
+    val consumptionenabled : String? = "",//是否启用消费奖励 - 0:不启用 1:启用
+    @SerializedName("consumptionindirectreward")
+    val consumptionindirectreward : String? = "",//消费间推奖励值
+    @SerializedName("consumptionmodel")
+    val consumptionmodel : String? = "",//消费奖励方式 - 1:比率 2:固定
+    @SerializedName("customerservicenum")
+    val customerservicenum : String? = "",//客服电话
+    @SerializedName("dayinterestrate")
+    val dayinterestrate : String? = "",//日利率
+    @SerializedName("disableconsumptiontips")
+    val disableconsumptiontips : String? = "",//关闭消费奖励提示
+    @SerializedName("modifierid")
+    val modifierid : String? = "",//修改人ID
+    @SerializedName("modifysrc")
+    val modifysrc : String?  = "",//审核来源 - 1:管理端 2:终端
+    @SerializedName("modifytime")
+    val modifytime : String? = "",//修改时间
+    @SerializedName("promotionvalue")
+    val promotionvalue : String? = "",//推广奖励值(固定)
+    @SerializedName("scoreconfigvalue1")
+    val scoreconfigvalue1 : String? = "",//提货积分配置1
+    @SerializedName("scoreconfigvalue2")
+    val scoreconfigvalue2 : String? = "",//提货积分配置2
+    @SerializedName("userid")
+    val userid : String? = "",//机构用户ID其他做市关系,都设置为 1
+    @SerializedName("username")
+    val username : String? = ""//用户名称
+) : Parcelable{
+    constructor(parcel: Parcel) : this(
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString(),
+        parcel.readString()
+    ) {
+    }
+
+    override fun writeToParcel(parcel: Parcel, flags: Int) {
+        parcel.writeString(additionalratio)
+        parcel.writeString(advanceratio)
+        parcel.writeString(alarmratio)
+        parcel.writeString(consumptiondirectreward)
+        parcel.writeString(consumptionenabled)
+        parcel.writeString(consumptionindirectreward)
+        parcel.writeString(consumptionmodel)
+        parcel.writeString(customerservicenum)
+        parcel.writeString(dayinterestrate)
+        parcel.writeString(disableconsumptiontips)
+        parcel.writeString(modifierid)
+        parcel.writeString(modifysrc)
+        parcel.writeString(modifytime)
+        parcel.writeString(promotionvalue)
+        parcel.writeString(scoreconfigvalue1)
+        parcel.writeString(scoreconfigvalue2)
+        parcel.writeString(userid)
+        parcel.writeString(username)
+    }
+
+    override fun describeContents(): Int {
+        return 0
+    }
+
+    companion object CREATOR : Parcelable.Creator<AreaFinanceConfigData> {
+        override fun createFromParcel(parcel: Parcel): AreaFinanceConfigData {
+            return AreaFinanceConfigData(parcel)
+        }
+
+        override fun newArray(size: Int): Array<AreaFinanceConfigData?> {
+            return arrayOfNulls(size)
+        }
+    }
+
+}

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/global/data/ContractData.kt

@@ -154,7 +154,7 @@ data class ContractData(
     @SerializedName("modelname")
     val modelname : String? = "",//型号名称
     @SerializedName("goodsname")
-    val goodsname : String? = "",
+    val goodsname : String? = "--",
     @SerializedName("amount")
     val amount : String? = "",//金额
     @SerializedName("wrstandardcode")

+ 10 - 2
RMA/app/src/main/java/cn/muchinfo/rma/global/data/MyTeamData.kt

@@ -22,8 +22,11 @@ data class MyTeamData(
     val refernum : String? = "",//推荐码
     @SerializedName("userid")
     val userid : String? = "",//用户id
+    @SerializedName("subList")
+    val subList : List<MyTeamData>? = arrayListOf(),
     @SerializedName("userinfotype")
-    val userinfotype : String? = ""//用户类型 1-个人 2-企业
+    val userinfotype : String? = "",//用户类型 1-个人 2-企业
+    var isSelect : Int = 1 //是否展开
 ) : Parcelable{
     constructor(parcel: Parcel) : this(
         parcel.readString(),
@@ -33,7 +36,9 @@ data class MyTeamData(
         parcel.readString(),
         parcel.readString(),
         parcel.readString(),
-        parcel.readString()
+        parcel.createTypedArrayList(CREATOR),
+        parcel.readString(),
+        parcel.readInt()
     ) {
     }
 
@@ -45,7 +50,9 @@ data class MyTeamData(
         parcel.writeString(refereeuserid)
         parcel.writeString(refernum)
         parcel.writeString(userid)
+        parcel.writeTypedList(subList)
         parcel.writeString(userinfotype)
+        parcel.writeInt(isSelect)
     }
 
     override fun describeContents(): Int {
@@ -62,4 +69,5 @@ data class MyTeamData(
         }
     }
 
+
 }

+ 3 - 1
RMA/app/src/main/java/cn/muchinfo/rma/update/FunUpdataController.java

@@ -12,6 +12,8 @@ import android.os.Build;
 import androidx.core.app.NotificationCompat;
 import androidx.core.content.FileProvider;
 
+import com.blankj.utilcode.util.AppUtils;
+
 import java.io.File;
 
 import cn.muchinfo.rma.R;
@@ -123,7 +125,7 @@ public class FunUpdataController {
         intent.addCategory(Intent.CATEGORY_DEFAULT);
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
             intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            Uri contentUri = FileProvider.getUriForFile(context, "cn.muchinfo.rma.fileProvider", new File(path));
+            Uri contentUri = FileProvider.getUriForFile(context, AppUtils.getAppPackageName() + ".fileProvider", new File(path));
             intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
             intent.setDataAndType(contentUri, "application/vnd.android.package-archive");
         } else {

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/MainActivity.kt

@@ -201,7 +201,7 @@ class MainActivity : BaseActivity<MainViewModel>() {
                             }
                             dialog.dismiss()
                         }
-                        addAction("重新登") { dialog, _ ->
+                        addAction("重新登") { dialog, _ ->
                             AppUtils.relaunchApp()
                             dialog.dismiss()
                         }

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/photopicter/PhotoPickerActivity.kt

@@ -89,7 +89,7 @@ class PhotoPickerActivity : AppCompatActivity() {
         pickerFragment = supportFragmentManager.findFragmentByTag("tag") as? PhotoPickerFragment
         if (pickerFragment == null) {
             pickerFragment = PhotoPickerFragment
-                    .newInstance(showCamera, showGif, previewEnabled, columnNumber, maxCount, originalPhotos)
+                    .newInstance(false, showGif, previewEnabled, columnNumber, maxCount, originalPhotos)
             supportFragmentManager
                     .beginTransaction()
                     .replace(R.id.container, pickerFragment!!, "tag")

+ 6 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/autoWidget/photopicter/fragment/PhotoPickerFragment.java

@@ -4,8 +4,10 @@ import android.content.ActivityNotFoundException;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.graphics.Color;
+import android.net.Uri;
 import android.os.Bundle;
 
+import android.provider.MediaStore;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.LayoutInflater;
@@ -17,6 +19,7 @@ import android.widget.Button;
 
 import androidx.annotation.NonNull;
 import androidx.appcompat.widget.ListPopupWindow;
+import androidx.core.content.FileProvider;
 import androidx.fragment.app.Fragment;
 import androidx.fragment.app.FragmentActivity;
 import androidx.recyclerview.widget.DefaultItemAnimator;
@@ -24,9 +27,12 @@ import androidx.recyclerview.widget.OrientationHelper;
 import androidx.recyclerview.widget.RecyclerView;
 import androidx.recyclerview.widget.StaggeredGridLayoutManager;
 
+import com.blankj.utilcode.util.AppUtils;
+import com.blankj.utilcode.util.TimeUtils;
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.RequestManager;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;

+ 2 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/app/Constant.kt

@@ -12,14 +12,14 @@ object Constant {
 //    const val baseurl = "http://192.168.31.114:8080/cfg?key=test_114" // shenzhen01  123123
 //        const val baseurl = "http://192.168.30.125:8080/cfg?key=test_125"//李倩千海金 18611112222
 //    const val baseurl = "http://192.168.31.220:8080/cfg?key=test_220"//李倩千海金 18611112222
-      const val baseurl = "http://192.168.30.211:8080/cfg?key=test_211"// 瑶姐
+//      const val baseurl = "http://192.168.30.211:8080/cfg?key=test_211"// 瑶姐
 //          const val baseurl = "http://192.168.31.107:8080/cfg?key=test_107"// 瑶姐 千海金 13760119855
 //    const val baseurl = "http://192.168.31.175:8080/cfg?key=test_175" // 8888  123123
 //    const val baseurl = "http://192.168.31.223:8080/cfg?key=test_223"
 //    const val baseurl = "http://192.168.31.174:8080/cfg?key=test_174"// 邓工
 
 //     const val baseurl = "http://192.168.31.176:8080/cfg?key=test_176" // 9999  123123  黄老板千海金
-//    const val baseurl = "http://192.168.31.171:8080/cfg?key=test_171" // 邓工 签约解约环境
+    const val baseurl = "http://192.168.31.171:8080/cfg?key=test_171" // 邓工 签约解约环境
 //    const val baseurl = "http://192.168.21.71:8280/cfg?key=mtp_20"
 
     /**

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/future/holds/HoldDetailsViewHolder.kt

@@ -49,7 +49,7 @@ class HoldDetailsViewHolder(private val activity : AppCompatActivity) : BaseView
             textView {
                 gravity = Gravity.CENTER
                 data.bindOptional(context){
-                    text = it?.holderprice
+                    text = it?.openprice
                 }
                 textColorInt = R.color.rma_black_33
                 textSizeAuto = 30

+ 9 - 4
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/NewHomeFragment.kt

@@ -253,7 +253,8 @@ class NewHomeFragment : BaseFragment<HomeViewModel>() {
                         }
                         textView {
                             viewModel.userAccount.bindOptional(context) {
-                                text = it?.accountname
+
+                                text = it?.accountname?.isBlankString()
                             }
                             text = GlobalDataCollection.instance?.loginRsp?.userID.toString()
                             textColorInt = R.color.white
@@ -263,10 +264,14 @@ class NewHomeFragment : BaseFragment<HomeViewModel>() {
                         }
                         textView {
                             viewModel.loginQueryData.bindOptional(context) {
-                                if (Constant.IS_QHJ){
-                                    text = "(" + it?.userInfo?.customername + ")"
+                                if (SPUtils.getInstance().getString(Constant.oem) == "qhj"){
+                                    if (it?.userInfo?.customername.isNullOrEmpty().not()){
+                                        text = "(" + it?.userInfo?.customername + ")"
+                                    }
                                 }else{
-                                    text = it?.username + "(" + it?.loginAccount?.logincode + ")"
+                                    if (it?.username.isNullOrEmpty().not()){
+                                        text = it?.username + "(" + it?.loginAccount?.logincode + ")"
+                                    }
                                 }
                             }
                             textColorStr = "#AED6F0"

+ 2 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/commodity/newcommodity/NewCommodityInformationActivity.kt

@@ -299,8 +299,8 @@ class NewSpotVarietiesUI(
         viewModel.queryDeliveryGoodsDetailList()
     }
 
-    val root = _FrameLayout(activity).apply {
-        verticalLayout {
+        val root = _FrameLayout(activity).apply {
+            verticalLayout {
             statusLayout(contentBlock = {
                 statusLayout = this
 //                bindTaskStatus(viewModule.status)

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/inventory/inventorymanager/InventoryManagerViewModel.kt

@@ -462,7 +462,7 @@ class InventoryManagerViewModel : BaseViewModel() {
             newCustomerList.add(
                 SelectData(
                     id = it.autoid.toString() ?: "",
-                    value = it.warehousename ?: ""
+                    value = it.warehousecode ?: ""
                 )
             )
         }

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/ChangePasswordActivity.kt

@@ -60,7 +60,7 @@ class ChangePasswordActivity : BaseActivity<ChangePasswordViewModel>(){
                 }
 
                 textView {
-                    text = "登账号:"
+                    text = "登账号:"
                     textColorInt = R.color.rma_black_33
                     textSizeAuto = 34
                 }.lparams(wrapContent, wrapContent) {

+ 4 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/ResetPasswordActivity.kt

@@ -97,7 +97,7 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
                     }
 
                     textView {
-                        text = "登账号"
+                        text = "登账号"
                         textColorInt = R.color.rma_black_33
                         textSizeAuto = 34
                     }.lparams(wrapContent, wrapContent) {
@@ -105,7 +105,9 @@ class ResetPasswordActivity : BaseActivity<PasswordViewModel>() {
                     }
 
                     editText {
-                        hint = "请输入登陆账号"
+                        isEnabled = false
+                        setText(GlobalDataCollection.instance?.loginQueryData?.loginAccount?.logincode)
+                        hint = "请输入登录账号"
                         login_account = this
                         inputType = EditorInfo.TYPE_CLASS_TEXT
                         gravity = Gravity.CENTER_VERTICAL

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/home/set/SettingActivity.kt

@@ -125,7 +125,7 @@ class SettingActivity : BaseActivity<SettingViewModel>(){
                 backgroundResource = R.drawable.rma_market_item_botton_bg_2
                 textSizeAuto = 34
                 textColorInt = R.color.white
-                text = "退出登"
+                text = "退出登"
             }.lparams(matchParent, autoSize(100)){
                 topMargin = autoSize(200)
                 marginStart = autoSize(36)

+ 137 - 46
RMA/app/src/main/java/cn/muchinfo/rma/view/base/login/register/EnterpriseRegisterActivity.kt

@@ -1,5 +1,7 @@
 package cn.muchinfo.rma.view.base.login.register
 
+import android.Manifest
+import android.app.Activity
 import android.app.Dialog
 import android.content.Intent
 import android.graphics.BitmapFactory
@@ -15,6 +17,7 @@ import cn.muchinfo.rma.netManage.base.InteractiveException
 import cn.muchinfo.rma.netManage.utils.UpLoadUtils
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.autoWidget.photopicter.PhotoUtils
+import cn.muchinfo.rma.view.autoWidget.photopicter.utils.ImageCaptureManager
 import cn.muchinfo.rma.view.base.AgreementActivity
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.app.Constant
@@ -23,7 +26,10 @@ import cn.muchinfo.rma.view.base.future.trade.itemView
 import cn.muchinfo.rma.view.base.home.contract.verticalEmptyView
 import com.alibaba.fastjson.JSON
 import com.blankj.utilcode.util.*
+import com.tbruyelle.rxpermissions2.RxPermissions
 import com.zhy.http.okhttp.callback.StringCallback
+import mtp.polymer.com.autowidget.dialog.SelectData
+import mtp.polymer.com.autowidget.dialog.creatBottomSheetDialog
 import mtp.polymer.com.autowidget.dialog.createLoadingDialog
 import mtp.polymer.com.autowidget.dialog.createWarningDialog
 import mtp.polymer.com.autowidget.utils.TaskUiModel
@@ -41,10 +47,15 @@ import java.io.File
  */
 class EnterpriseRegisterActivity : BaseActivity<RegisterViewModel>() {
 
+    val imageCaptureManager by lazy { ImageCaptureManager(this) }
+
     private var uploadFile: String = ""//上传成功后服务给的图片地址
     private val imageString: MutableLiveData<String> =
         MutableLiveData<String>().apply { value = "" }//文件地址
 
+    val imagePhotoString: MutableLiveData<String> =
+        MutableLiveData<String>().apply { value = "" }//拍照后的文件地址
+
     private var loadingDialog: Dialog? = null
 
     //输入的企业名称
@@ -66,6 +77,15 @@ class EnterpriseRegisterActivity : BaseActivity<RegisterViewModel>() {
     val isReadAgreement: MutableLiveData<Boolean> =
         MutableLiveData<Boolean>().apply { value = false }
 
+    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
+        super.onActivityResult(requestCode, resultCode, data)
+         if (requestCode == 102 && resultCode == Activity.RESULT_OK) {
+            imageCaptureManager.galleryAddPic()
+            imagePhotoString.postValue(imageCaptureManager.currentPhotoPath)
+            LogUtils.eTag("dasdasdsadasdad", imageCaptureManager.currentPhotoPath)
+        }
+    }
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         verticalLayout {
@@ -274,58 +294,129 @@ class EnterpriseRegisterActivity : BaseActivity<RegisterViewModel>() {
                     }
                     visibility = View.VISIBLE
                     onThrottleFirstClick {
-                        PhotoUtils().showPicker(this@EnterpriseRegisterActivity) {
-                            it.firstOrNull()?.let {
-                                viewModel.loadingDialogStatus.value =
-                                    TaskUiModel.inFlight()
-                                UpLoadUtils(this@EnterpriseRegisterActivity).uploadPicture(
-                                    File(it),
-                                    object : StringCallback() {
-                                        override fun onError(
-                                            call: Call,
-                                            e: Exception,
-                                            id: Int
-                                        ) {
-                                            LogUtils.e("hidahdashdsdasd", e.message)
-                                            viewModel.loadingDialogStatus.value =
-                                                TaskUiModel.failed(
-                                                    InteractiveException(
-                                                        errorMessage = e.message ?: ""
-                                                    )
-                                                )
+                        val selectDataList = arrayListOf(
+                            SelectData(id = "1", value = "拍照"),
+                            SelectData(id = "2", value = "相册")
+                        )
+                        creatBottomSheetDialog("请选择上传", selectDataList) {
+                            if (this.id == "1"){
+                                RxPermissions(this@EnterpriseRegisterActivity).request(
+                                    Manifest.permission.READ_EXTERNAL_STORAGE,
+                                    Manifest.permission.CAMERA)
+                                    .subscribe { granted ->
+                                        if (granted) {//打开相机拍照
+                                            val intent = imageCaptureManager.dispatchTakePictureIntent()
+                                            ActivityUtils.startActivityForResult(this@EnterpriseRegisterActivity, intent, 102)
                                         }
+                                    }
+                            }else if (this.id == "2"){
+                                PhotoUtils().showPicker(this@EnterpriseRegisterActivity) {
+                                    it.firstOrNull()?.let {
+                                        viewModel.loadingDialogStatus.value =
+                                            TaskUiModel.inFlight()
+                                        UpLoadUtils(this@EnterpriseRegisterActivity).uploadPicture(
+                                            File(it),
+                                            object : StringCallback() {
+                                                override fun onError(
+                                                    call: Call,
+                                                    e: Exception,
+                                                    id: Int
+                                                ) {
+                                                    LogUtils.e("hidahdashdsdasd", e.message)
+                                                    viewModel.loadingDialogStatus.value =
+                                                        TaskUiModel.failed(
+                                                            InteractiveException(
+                                                                errorMessage = e.message ?: ""
+                                                            )
+                                                        )
+                                                }
 
-                                        override fun onResponse(
-                                            response: String,
-                                            id: Int
-                                        ) {
-                                            /*[{"originalName":"tem.jpg","fileName":"201907161657044712.jpg","fileSize":"0KB","fileType":"image/jpeg","filePath":"./uploadFile/20190716/201907161657044712.jpg","submitName":null}]*/
-                                            try {
-                                                viewModel.loadingDialogStatus.value =
-                                                    TaskUiModel.success("上传成功")
-                                                val jsonArray = JSONArray(response)
-                                                LogUtils.eTag(
-                                                    "图片",
-                                                    JSON.toJSONString(jsonArray)
-                                                )
-                                                for (i in 0 until jsonArray.length()) {
-                                                    uploadFile =
-                                                        (jsonArray.get(i) as JSONObject).getString(
-                                                            "filePath"
+                                                override fun onResponse(
+                                                    response: String,
+                                                    id: Int
+                                                ) {
+                                                    /*[{"originalName":"tem.jpg","fileName":"201907161657044712.jpg","fileSize":"0KB","fileType":"image/jpeg","filePath":"./uploadFile/20190716/201907161657044712.jpg","submitName":null}]*/
+                                                    try {
+                                                        viewModel.loadingDialogStatus.value =
+                                                            TaskUiModel.success("上传成功")
+                                                        val jsonArray = JSONArray(response)
+                                                        LogUtils.eTag(
+                                                            "图片",
+                                                            JSON.toJSONString(jsonArray)
                                                         )
-                                                    imageString.value = it
-                                                    LogUtils.e("hidahdashd", uploadFile)
+                                                        for (i in 0 until jsonArray.length()) {
+                                                            uploadFile =
+                                                                (jsonArray.get(i) as JSONObject).getString(
+                                                                    "filePath"
+                                                                )
+                                                            imageString.value = it
+                                                            LogUtils.e("hidahdashd", uploadFile)
+                                                        }
+                                                    } catch (e: JSONException) {
+                                                        e.printStackTrace()
+                                                    }
+
                                                 }
-                                            } catch (e: JSONException) {
-                                                e.printStackTrace()
-                                            }
+                                            },
+                                            10000.0,
+                                            SPUtils.getInstance().getString(Constant.uploadUrl)
+                                        )
+                                    }
+                                }
+                            }
+                        }
+                    }
 
+                    imagePhotoString.bindOptional(context) {
+                        if (it.isNullOrEmpty().not()) {
+                            viewModel.loadingDialogStatus.value =
+                                TaskUiModel.inFlight()
+                            UpLoadUtils(this@EnterpriseRegisterActivity).uploadPicture(
+                                File(it),
+                                object : StringCallback() {
+                                    override fun onError(
+                                        call: Call,
+                                        e: Exception,
+                                        id: Int
+                                    ) {
+                                        viewModel.loadingDialogStatus.value =
+                                            TaskUiModel.failed(
+                                                InteractiveException(
+                                                    errorMessage = e.message ?: ""
+                                                )
+                                            )
+                                    }
+
+                                    override fun onResponse(
+                                        response: String,
+                                        id: Int
+                                    ) {
+                                        /*[{"originalName":"tem.jpg","fileName":"201907161657044712.jpg","fileSize":"0KB","fileType":"image/jpeg","filePath":"./uploadFile/20190716/201907161657044712.jpg","submitName":null}]*/
+                                        try {
+                                            viewModel.loadingDialogStatus.value =
+                                                TaskUiModel.success("上传成功")
+                                            val jsonArray = JSONArray(response)
+                                            LogUtils.eTag(
+                                                "图片",
+                                                JSON.toJSONString(jsonArray)
+                                            )
+                                            for (i in 0 until jsonArray.length()) {
+                                                uploadFile =
+                                                    (jsonArray.get(i) as JSONObject).getString(
+                                                        "filePath"
+                                                    )
+                                                imageString.value = it
+                                                LogUtils.e("hidahdashd", uploadFile)
+                                            }
+                                        } catch (e: JSONException) {
+                                            e.printStackTrace()
                                         }
-                                    },
-                                    10000.0,
-                                    SPUtils.getInstance().getString(Constant.uploadUrl)
-                                )
-                            }
+
+                                    }
+                                },
+                                10000.0,
+                                SPUtils.getInstance().getString(Constant.uploadUrl)
+                            )
                         }
                     }
                     background = resources.getDrawable(R.color.qhj_update_image_bg)

+ 437 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/MyTeamActivity.kt

@@ -0,0 +1,437 @@
+package cn.muchinfo.rma.view.base.main.team
+
+import android.os.Bundle
+import android.text.InputType
+import android.text.TextUtils
+import android.view.Gravity
+import android.view.KeyEvent
+import android.view.View
+import android.view.ViewGroup
+import android.view.inputmethod.EditorInfo
+import android.widget.EditText
+import android.widget.TextView
+import androidx.appcompat.app.AppCompatActivity
+import androidx.lifecycle.MutableLiveData
+import androidx.viewpager.widget.PagerAdapter
+import androidx.viewpager.widget.ViewPager
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.AccMgrLoginUserData
+import cn.muchinfo.rma.global.data.MyTeamData
+import cn.muchinfo.rma.global.data.MyTeamOrderData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.BaseActivity
+import cn.muchinfo.rma.view.base.app.Constant
+import cn.muchinfo.rma.view.base.home.accountmanager.accountviewholder.AccountManagerViewHolder
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import com.qmuiteam.qmui.widget.tab.QMUITabSegment
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import mtp.polymer.com.autowidget.utils.TaskUiModel
+import mtp.polymer.com.autowidget.utils.bindTaskStatus
+import org.jetbrains.anko.*
+import org.jetbrains.anko.sdk25.coroutines.textChangedListener
+
+/**
+ * 我的团队页面
+ */
+class MyTeamActivity : BaseActivity<MyTeamViewModel>(){
+
+    lateinit var segment: QMUITabSegment
+    var selectedTabIndex: Int = 0
+    private lateinit var viewPager: ViewPager
+
+    //我的团队UI
+    private val teamMemberUI by lazy { TeamMemberUI(this,viewModel) }
+
+    //我的团队订单UI
+    private val teamOrderUI by lazy { TeamOrderUI(this,viewModel) }
+
+    //viewpager的适配器
+    private var newPagerAdapter : PagerAdapter? = null
+
+    //tabSegment标题
+    private val newTabsArray : ArrayList<String> = arrayListOf()
+
+    //暂存的页面组
+    private val uiList : ArrayList<_FrameLayout> = arrayListOf()
+
+    fun initMenuData(){
+        newTabsArray.add("团队成员")
+        uiList.add(teamMemberUI.root)
+        newTabsArray.add("团队订单")
+        uiList.add(teamOrderUI.root)
+
+        newPagerAdapter = object : PagerAdapter() {
+
+            override fun getPageTitle(position: Int): CharSequence? = newTabsArray[position]
+
+            override fun instantiateItem(container: ViewGroup, position: Int): Any {
+                return uiList.get(position).apply {
+                    container.addView(
+                        this,
+                        ViewGroup.LayoutParams(matchParent, matchParent)
+                    )
+                }
+            }
+
+            override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
+                (`object` as? View)?.let { container.removeView(it) }
+            }
+
+            override fun isViewFromObject(view: View, `object`: Any): Boolean = view == `object`
+
+            override fun getCount(): Int = newTabsArray.size
+
+        }
+
+    }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        verticalLayout {
+//            dialog.bindTaskStatus(context, viewModel.loadingDialogStatus)
+            topBar {
+                commonLeftButton()
+                commonTitle {
+                    text = "我的团队"
+                }
+            }
+
+
+        }
+    }
+
+}
+
+/**
+ * 团队成员UI
+ * @property activity AppCompatActivity
+ * @property viewModel MyTeamViewModel
+ * @constructor
+ */
+class TeamMemberUI(private val activity : AppCompatActivity,private val viewModel: MyTeamViewModel){
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    //登录账户是否可选择
+    val isClickSelect: MutableLiveData<Int> = MutableLiveData<Int>().apply { value = 1 }
+
+    //我的团队成员viewholder
+    private val teamMemberAdapter: BaseAdapter<MyTeamData, TeamMemberViewHolder> =
+        BaseAdapter { _, _ -> TeamMemberViewHolder(activity, viewModel) }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            viewModel.initAccountData()
+            viewModel.queryMyTeam()
+            linearLayout {
+                onThrottleFirstClick {
+                    if (isClickSelect.value == 0) {
+                        isClickSelect.postValue(1)
+                    } else {
+                        isClickSelect.postValue(0)
+                    }
+                }
+                gravity = Gravity.CENTER_VERTICAL
+                imageView {
+                    imageResource = R.mipmap.list_folding
+                }.lparams(autoSize(43), autoSize(43)) {
+                    marginStart = autoSize(36)
+                }
+
+                textView {
+                    viewModel.loginQueryData.bindOptional(context) {
+                        text = "(" + it?.userInfo?.customername + ")"
+                    }
+                    textColorInt = R.color.rma_black_33
+                    maxLines = 1
+                    maxEms = 9
+                    ellipsize = TextUtils.TruncateAt.END
+                    textSizeAuto = 36
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(20)
+                }
+                textView {
+                    text = ""
+                    textColorInt = R.color.rma_hint_text_color_ccc
+                    textSizeAuto = 36
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(20)
+                }
+
+                emptyView()
+
+                linearLayout {
+                    gravity = Gravity.CENTER_VERTICAL
+                    backgroundDrawable =
+                        createRoundRectDrawable("#DAEDFF", 45)
+                    imageView {
+                        imageResource = R.mipmap.qhj_qrcode
+                    }.lparams(autoSize(42), autoSize(42)) {
+                        marginStart = autoSize(20)
+                    }
+
+                    textView {
+                        text = "推广码:"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(15)
+                    }
+
+                    textView {
+                        text = "--"
+                        textSizeAuto = 29
+                        textColorInt = R.color.rma_blue_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginStart = autoSize(15)
+                    }
+                }.lparams(autoSize(312), autoSize(60))
+
+            }.lparams(matchParent, autoSize(96))
+
+            statusLayout(contentBlock = {
+                isClickSelect.bindOptional(context) {
+                    if (it == 0) {
+                        visibility = View.GONE
+                    } else {
+                        visibility = View.VISIBLE
+                    }
+                }
+                statusLayout = this
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(false)
+                    setEnableLoadMore(false)
+                    setOnRefreshListener {
+
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = teamMemberAdapter
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.myTeamMemberDataList.bindOptional(context) {
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    teamMemberAdapter.setNewData(it)
+                }
+            }
+        }
+    }
+
+}
+
+
+class TeamOrderUI(private val activity : AppCompatActivity,private val viewModel: MyTeamViewModel){
+
+    lateinit var inputText : EditText
+
+    private lateinit var swipeToLayout: SwipeToLoadLayout
+    private lateinit var statusLayout: StatusLayout
+
+    //我的团队成员订单viewholder
+    private val teamOredrAdapter: BaseAdapter<MyTeamOrderData, TeamOrderViewHolder> =
+        BaseAdapter { _, _ -> TeamOrderViewHolder(activity, viewModel) }
+
+    val root = _FrameLayout(activity).apply {
+        verticalLayout {
+            viewModel.queryMyTeamOrder()
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                linearLayout {
+                    backgroundDrawable = createRoundRectDrawable("#f4f4f4", 24)
+                    gravity = Gravity.CENTER_VERTICAL
+                    imageView {
+                        imageResource = R.mipmap.rma_search
+                    }.lparams(autoSize(35), autoSize(35)) {
+                        marginStart = autoSize(20)
+                    }
+
+                    editText {
+//                        textChangedListener {
+//                            afterTextChanged {
+//                                if (it?.toString().isNullOrEmpty().not()) {
+//                                    viewModel.isSearch.value = true
+//                                } else {
+//                                    viewModel.isSearch.value = false
+//                                    mRecordsAdapter.setData(viewModel.getSearchhistoryList())
+//                                    mRecordsAdapter.notifyDataChanged()
+//                                }
+//                            }
+//                        }
+//                        setOnEditorActionListener(object : TextView.OnEditorActionListener{
+//                            override fun onEditorAction(p0: TextView?, p1: Int, p2: KeyEvent?): Boolean {
+//                                if (p1== EditorInfo.IME_ACTION_SEND|| (p2!=null&&p2.getKeyCode()== KeyEvent.KEYCODE_ENTER)) {
+//
+//                                    return true
+//                                }
+//                                return false
+//                            }
+//
+//                        })
+
+                        setInputType(InputType.TYPE_CLASS_TEXT)
+                        setSingleLine(true)
+                        setImeOptions(EditorInfo.IME_ACTION_SEND)
+                        inputText = this
+                        hint = "请输入商品名称或编号"
+                        background = null
+                        hintColorStr = "#666666"
+                        textSizeAuto = 28
+                        textColorStr = "#000000"
+                    }
+
+                }.lparams(0, autoSize(67), 1f) {
+                    marginStart = autoSize(36)
+                }
+
+                textView {
+                    onThrottleFirstClick {
+                        if (inputText.text.isNullOrEmpty()){
+                            return@onThrottleFirstClick
+                        }
+                        viewModel.queryMyTeamOrder(inputText.text.toString())
+                    }
+                    gravity = Gravity.CENTER
+                    text = "查询"
+                    textColorInt = R.color.white
+                    background = resources.getDrawable(R.color.rma_blue_color)
+                    textSizeAuto = 32
+                }.lparams(autoSize(144), autoSize(67)) {
+                    marginEnd = autoSize(36)
+                }
+
+            }.lparams(matchParent, autoSize(100))
+
+            verticalLayout {
+                verticalLayout {
+                    gravity = Gravity.RIGHT
+                    textView {
+                        text = "账号"
+                        textSizeAuto = 28
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                        marginStart = autoSize(36)
+                    }
+
+                    textView {
+                        text = "时间"
+                        textSizeAuto = 28
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(10)
+                        marginStart = autoSize(36)
+                    }
+                }.lparams(0, autoSize(106),3f)
+
+                verticalLayout {
+                    gravity = Gravity.LEFT
+                    textView {
+                        text = "商品"
+                        textSizeAuto = 28
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+
+                    textView {
+                        text = "类型"
+                        textSizeAuto = 28
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(10)
+                    }
+                }.lparams(0, autoSize(106),2f)
+
+                verticalLayout {
+                    gravity = Gravity.LEFT
+                    textView {
+                        text = "价格"
+                        textSizeAuto = 28
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(20)
+                    }
+
+                    textView {
+                        text = "数量"
+                        textSizeAuto = 28
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        topMargin = autoSize(10)
+                    }
+                }.lparams(0, autoSize(106),2f)
+
+                verticalLayout {
+                    gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                    textView {
+                        text = "金额"
+                        textSizeAuto = 28
+                        textColorInt = R.color.rma_gray_color
+                    }.lparams(wrapContent, wrapContent){
+                        marginEnd = autoSize(36)
+                    }
+
+                }.lparams(0, autoSize(106),2f)
+            }.lparams(matchParent, autoSize(106))
+
+
+            statusLayout(contentBlock = {
+                statusLayout = this
+                setRetryAction {
+                    viewModel.queryMyTeamOrder()
+                }
+//                bindTaskStatus(viewModule.status)
+                swipeToLoadLayout {
+                    swipeToLayout = this
+                    setEnableRefresh(true)
+                    setEnableLoadMore(true)
+                    setOnRefreshListener {
+                        viewModel.queryMyTeamOrder()
+                    }
+                    setOnLoadMoreListener {
+                        viewModel.queryMyTeamOrder()
+                    }
+                    setEnableScrollContentWhenLoaded(false)
+                    setEnableLoadMoreWhenContentNotFull(false)
+                    recyclerView {
+                        background = resources.getDrawable(R.color.white)
+                        adapter = teamOredrAdapter
+                    }.lparams(matchParent, matchParent)
+                }
+            }, emptyBlock = {
+                emptyView(hint = resources.getString(R.string.now_no_data))
+            }).lparams(matchParent, matchParent)
+
+            viewModel.myTeamOrderDataList.bindOptional(context) {
+                if (it?.isEmpty() == true || it?.size == 0) {
+                    statusLayout.showEmpty()
+                } else {
+                    if (swipeToLayout.getIsRefreshing()) {
+                        swipeToLayout.finishRefresh()
+                    }
+                    statusLayout.showSuccess()
+                    teamOredrAdapter.setNewData(it)
+                }
+            }
+        }
+    }
+
+
+}

+ 93 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/MyTeamViewModel.kt

@@ -0,0 +1,93 @@
+package cn.muchinfo.rma.view.base.main.team
+
+import androidx.lifecycle.MutableLiveData
+import cn.muchinfo.rma.global.GlobalDataCollection
+import cn.muchinfo.rma.global.data.MyTeamData
+import cn.muchinfo.rma.global.data.MyTeamOrderData
+import cn.muchinfo.rma.global.data.account.LoginQueryData
+import cn.muchinfo.rma.view.MyApplication
+import cn.muchinfo.rma.view.autoWidget.toArrayList
+import cn.muchinfo.rma.view.base.BaseViewModel
+
+/**
+ * 我的团队viewmodel
+ */
+class MyTeamViewModel : BaseViewModel(){
+
+    /**
+     * 用户信息
+     */
+    val loginQueryData : MutableLiveData<LoginQueryData> = MutableLiveData()
+
+    /**
+     * 我的团队成员
+     */
+    val myTeamMemberDataList : MutableLiveData<List<MyTeamData>> = MutableLiveData()
+
+    /**
+     * 我的团队订单列表
+     */
+    val myTeamOrderDataList : MutableLiveData<List<MyTeamOrderData>> = MutableLiveData()
+
+    /**
+     * 更新hoefragment的account
+     */
+    fun initAccountData(){
+        val accountData = GlobalDataCollection.instance?.userAccountData
+        loginQueryData.postValue(GlobalDataCollection.instance?.loginQueryData)
+    }
+
+    /**
+     * 查询我的团队列表
+     */
+    fun queryMyTeam(){
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID?.toString() ?: "")
+        }
+        MyApplication.getInstance()?.accountManager?.queryMyTeam(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                myTeamMemberDataList.postValue(respData)
+            }
+        }
+    }
+
+    /**
+     * 查询我的团队列表(通过页数查询)
+     */
+    fun queryMyTeamOrder(){
+        var size: Int
+        if (myTeamOrderDataList.value?.size == 0 || myTeamOrderDataList?.value?.size  ?: 0 < 20){
+            size = 1
+        }else{
+            size = myTeamOrderDataList.value?.size?.div(20) ?: 1
+        }
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID?.toString() ?: "")
+            put("page",size.toString())
+            put("pagesize","20")
+        }
+        MyApplication.getInstance()?.accountManager?.queryMyTeamOrder(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                val newDataList = myTeamOrderDataList.value?.toArrayList()
+                newDataList?.addAll(respData ?: arrayListOf())
+                myTeamOrderDataList.postValue(newDataList)
+            }
+        }
+    }
+
+    /**
+     * 查询我的团队列表(通过模糊查询)
+     */
+    fun queryMyTeamOrder(filtername : String){
+        val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID?.toString() ?: "")
+            put("filtername","filtername")
+        }
+        MyApplication.getInstance()?.accountManager?.queryMyTeamOrder(params = params){isSuccess, respData, error ->
+            if (isSuccess){
+                myTeamOrderDataList.postValue(respData)
+            }
+        }
+    }
+
+}

+ 91 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/TeamMemberViewHolder.kt

@@ -0,0 +1,91 @@
+package cn.muchinfo.rma.view.base.main.team
+
+import android.view.Gravity
+import android.view.View
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.MyTeamData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.*
+import cn.muchinfo.rma.view.base.future.trade.itemView
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import mtp.polymer.com.autowidget.adapter.BaseAdapter
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+
+/**
+ * 我的团队viewholder
+ * @property activity AppCompatActivity
+ * @property viewModel MyTeamViewModel
+ * @constructor
+ */
+class TeamMemberViewHolder(private val activity : AppCompatActivity,private val viewModel: MyTeamViewModel) : BaseViewHolder<MyTeamData>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    //期货合约
+    private val teamSonMemberAdapter: BaseAdapter<MyTeamData, TeamSonMemberViewHolder> =
+        BaseAdapter { _, _ -> TeamSonMemberViewHolder(activity, viewModel) }
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                imageView {
+                    onThrottleFirstClick {
+//                        viewModel.setOnLoginAccountHedgeClick(dataIndex)
+                    }
+                    data.bindOptional(context) {
+                        if (it?.isSelect == 0) {
+                            imageResource = R.mipmap.second_list_can_floding
+                        } else {
+                            imageResource = R.mipmap.second_list_floding
+                        }
+                    }
+                }.lparams(autoSize(43), autoSize(43))
+
+                textView {
+                    data.bindOptional(context) {
+                        text = it?.mobile + "(" + it?.subList?.size + ")"
+                    }
+                    textSizeAuto = 31
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(20)
+                }
+                emptyView()
+
+                textView {
+                    data.bindOptional(context) {
+                        text = it?.createtime
+                    }
+                    textColorInt = R.color.rma_hint_text_color_ccc
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginEnd = autoSize(31)
+                }
+            }.lparams(matchParent, autoSize(108)) {
+                marginStart = autoSize(102)
+            }
+
+            itemView()
+
+            recyclerView {
+                data.bindOptional(context){
+                    if (it?.isSelect == 0){
+                        visibility = View.GONE
+                    }else{
+                        visibility = View.VISIBLE
+                    }
+                }
+                background = resources.getDrawable(R.color.white)
+                adapter = teamSonMemberAdapter
+            }.lparams(matchParent, wrapContent)
+
+            data.bindOptional(context){
+                teamSonMemberAdapter.setNewData(it?.subList)
+            }
+        }
+    }
+
+}

+ 122 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/TeamOrderViewHolder.kt

@@ -0,0 +1,122 @@
+package cn.muchinfo.rma.view.base.main.team
+
+import android.view.Gravity
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.MyTeamOrderData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 我的团队订单viewholder
+ * @property activity AppCompatActivity
+ * @property viewModel MyTeamViewModel
+ * @constructor
+ */
+class TeamOrderViewHolder(private val activity : AppCompatActivity,private val viewModel: MyTeamViewModel) : BaseViewHolder<MyTeamOrderData>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            verticalLayout {
+                gravity = Gravity.RIGHT
+                textView {
+                    data.bindOptional(context){
+                        text = it?.accountid//好像接口没有提供账号先显示这个吧
+                    }
+                    textSizeAuto = 32
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent){
+                    topMargin = autoSize(30)
+                    marginStart = autoSize(36)
+                }
+
+                textView {
+                    data.bindOptional(context){
+                        text = it?.tradetime
+                    }
+                    textSizeAuto = 23
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent){
+                    topMargin = autoSize(10)
+                    marginStart = autoSize(36)
+                }
+            }.lparams(0, autoSize(130),3f)
+
+            verticalLayout {
+                gravity = Gravity.LEFT
+                //商品
+                textView {
+                    data.bindOptional(context){
+                        text = it?.goodsname
+                    }
+                    textSizeAuto = 32
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent){
+                    topMargin = autoSize(30)
+                }
+                //类型
+                textView {
+                    data.bindOptional(context){
+                        if (it?.buyorsell == "0"){
+                            text = "买入"
+                            textColorInt = R.color.rma_red_color
+                        }else if (it?.buyorsell == "1"){
+                            text = "卖出"
+                            textColorInt = R.color.rma_green_color
+                        }
+                    }
+                    textSizeAuto = 32
+                    textColorInt = R.color.rma_red_color
+                }.lparams(wrapContent, wrapContent){
+                    topMargin = autoSize(30)
+                }
+            }.lparams(0, autoSize(130),2f)
+
+            verticalLayout {
+                gravity = Gravity.LEFT
+                //价格
+                textView {
+                    data.bindOptional(context){
+                        text = NumberUtils.roundNum(it?.tradeprice,2)
+                    }
+                    textSizeAuto = 32
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent){
+                    topMargin = autoSize(30)
+                }
+                //数量
+                textView {
+                    data.bindOptional(context){
+                        text = NumberUtils.roundNum(it?.tradeqty,it?.qtydecimalplace?.toInt() ?: 2)
+                    }
+                    textSizeAuto = 32
+                    textColorInt = R.color.rma_red_color
+                }.lparams(wrapContent, wrapContent){
+                    topMargin = autoSize(30)
+                }
+            }.lparams(0, autoSize(130),2f)
+
+            verticalLayout {
+                gravity = Gravity.LEFT or Gravity.CENTER_VERTICAL
+                //价格
+                textView {
+                    data.bindOptional(context){
+                        text = NumberUtils.roundNum(it?.tradeamount,2)
+                    }
+                    textSizeAuto = 32
+                    textColorInt = R.color.rma_black_33
+                }.lparams(wrapContent, wrapContent){
+                    marginEnd = autoSize(36)
+                }
+
+            }.lparams(0, autoSize(130),2f)
+        }
+    }
+
+}

+ 58 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/team/TeamSonMemberViewholder.kt

@@ -0,0 +1,58 @@
+package cn.muchinfo.rma.view.base.main.team
+
+import android.view.Gravity
+import androidx.appcompat.app.AppCompatActivity
+import cn.muchinfo.rma.R
+import cn.muchinfo.rma.global.data.MyTeamData
+import cn.muchinfo.rma.lifecycle.bindOptional
+import cn.muchinfo.rma.view.autoWidget.autoSize
+import cn.muchinfo.rma.view.autoWidget.textColorInt
+import cn.muchinfo.rma.view.autoWidget.textSizeAuto
+import cn.muchinfo.rma.view.base.home.contract.emptyView
+import mtp.polymer.com.autowidget.adapter.BaseViewHolder
+import org.jetbrains.anko.*
+
+/**
+ * 我的团队成员子viewholder
+ * @property activity AppCompatActivity
+ * @property viewModel MyTeamViewModel
+ * @constructor
+ */
+class TeamSonMemberViewHolder(private val activity : AppCompatActivity,private val viewModel: MyTeamViewModel) : BaseViewHolder<MyTeamData>(activity){
+    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)
+
+    override fun _FrameLayout.createContentView() {
+        verticalLayout {
+            backgroundResource = R.drawable.rma_list_item_bg
+            linearLayout {
+                gravity = Gravity.CENTER_VERTICAL
+                textView {
+                    data.bindOptional(context) {
+                        text = it?.mobile
+                    }
+                    textColorInt = R.color.rma_black_33
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginStart = autoSize(31)
+                }
+
+                emptyView()
+                textView {
+                    data.bindOptional(context) {
+                        text = it?.createtime
+                    }
+                    textColorInt = R.color.rma_hint_text_color_ccc
+                    textSizeAuto = 31
+                }.lparams(wrapContent, wrapContent) {
+                    marginEnd = autoSize(31)
+                }
+            }.lparams(matchParent, autoSize(96))
+
+        }.lparams(matchParent, wrapContent) {
+            marginStart = autoSize(102)
+            marginEnd = autoSize(78)
+            bottomMargin = autoSize(10)
+        }
+    }
+
+}

+ 272 - 131
RMA/app/src/main/java/cn/muchinfo/rma/view/base/main/withdrawmanagement/WithdrawalActivity.kt

@@ -1,8 +1,11 @@
 package cn.muchinfo.rma.view.base.main.withdrawmanagement
 
+import android.Manifest
+import android.app.Activity
 import android.content.Intent
 import android.net.Uri
 import android.os.Bundle
+import android.provider.MediaStore
 import android.view.Gravity
 import android.view.View
 import android.view.ViewGroup
@@ -10,6 +13,7 @@ import android.view.inputmethod.EditorInfo
 import android.widget.EditText
 import android.widget.LinearLayout
 import android.widget.TextView
+import androidx.core.content.FileProvider
 import androidx.lifecycle.MutableLiveData
 import androidx.viewpager.widget.PagerAdapter
 import androidx.viewpager.widget.ViewPager
@@ -22,6 +26,7 @@ import cn.muchinfo.rma.netManage.base.InteractiveException
 import cn.muchinfo.rma.netManage.utils.UpLoadUtils
 import cn.muchinfo.rma.view.autoWidget.*
 import cn.muchinfo.rma.view.autoWidget.photopicter.PhotoUtils
+import cn.muchinfo.rma.view.autoWidget.photopicter.utils.ImageCaptureManager
 import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
 import cn.muchinfo.rma.view.base.BaseActivity
 import cn.muchinfo.rma.view.base.app.Constant
@@ -37,8 +42,10 @@ import com.cuieney.sdk.rxpay.RxPay
 import com.qmuiteam.qmui.util.QMUIDisplayHelper
 import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
 import com.qmuiteam.qmui.widget.tab.QMUITabSegment
+import com.tbruyelle.rxpermissions2.RxPermissions
 import com.zhy.http.okhttp.callback.StringCallback
 import mtp.polymer.com.autowidget.dialog.SelectData
+import mtp.polymer.com.autowidget.dialog.creatBottomSheetDialog
 import mtp.polymer.com.autowidget.dialog.creatBottomSheetNoTitleDialog
 import mtp.polymer.com.autowidget.dialog.createLoadingDialog
 import mtp.polymer.com.autowidget.utils.TaskUiModel
@@ -50,25 +57,27 @@ import org.json.JSONArray
 import org.json.JSONException
 import org.json.JSONObject
 import java.io.File
-import kotlin.math.sin
 
 
 /**
  * 充值提现
  */
-class WithdrawalActivity : BaseActivity<WithdrawalViewModel>(){
+class WithdrawalActivity : BaseActivity<WithdrawalViewModel>() {
 
     lateinit var segment: QMUITabSegment
     var selectedTabIndex: Int = 0
     private lateinit var viewPager: ViewPager
 
-    val selectindex by lazy { intent.getIntExtra("selectindex",0) }
+
+    val selectindex by lazy { intent.getIntExtra("selectindex", 0) }
+
+    val imageCaptureManager by lazy { ImageCaptureManager(this) }
 
     //充值UI
-    private val moneyInUI by lazy { MoneyInUI(this,viewModel) }
+    private val moneyInUI by lazy { MoneyInUI(this, viewModel, imageCaptureManager) }
 
     //提现UI
-    private val moneyOutUI by lazy { MoneyOutUI(this,viewModel) }
+    private val moneyOutUI by lazy { MoneyOutUI(this, viewModel) }
 
     //viewpager的适配器
     private var newPagerAdapter: PagerAdapter? = null
@@ -82,7 +91,7 @@ class WithdrawalActivity : BaseActivity<WithdrawalViewModel>(){
     /**
      * 用livedata监测当前页面
      */
-    val selectIndex1 : MutableLiveData<Int> = MutableLiveData()
+    val selectIndex1: MutableLiveData<Int> = MutableLiveData()
 
 
     override fun onResume() {
@@ -119,6 +128,15 @@ class WithdrawalActivity : BaseActivity<WithdrawalViewModel>(){
         }
     }
 
+    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
+        super.onActivityResult(requestCode, resultCode, data)
+        if (requestCode == 102 && resultCode == Activity.RESULT_OK) {
+            imageCaptureManager.galleryAddPic()
+            moneyInUI.moneyInOutlineUI.imagePhotoString.postValue(imageCaptureManager.currentPhotoPath)
+            LogUtils.eTag("dasdasdsadasdad", imageCaptureManager.currentPhotoPath)
+        }
+    }
+
 
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
@@ -137,7 +155,7 @@ class WithdrawalActivity : BaseActivity<WithdrawalViewModel>(){
                 }
                 commonMenuButton(R.mipmap.qhj_dian_dian) {
                     val intent = Intent()
-                    intent.setClass(context,WithDrawLogActivity::class.java)
+                    intent.setClass(context, WithDrawLogActivity::class.java)
                     ActivityUtils.startActivity(intent)
                 }
             }
@@ -171,7 +189,7 @@ class WithdrawalActivity : BaseActivity<WithdrawalViewModel>(){
 
             segment.setupWithViewPager(viewPager)
             segment.selectTab(selectedTabIndex)
-            selectIndex1.bindOptional(context){
+            selectIndex1.bindOptional(context) {
                 segment.selectTab(it ?: 0)
             }
 
@@ -186,16 +204,21 @@ class WithdrawalActivity : BaseActivity<WithdrawalViewModel>(){
  * @property root _FrameLayout
  * @constructor
  */
-class MoneyInUI(private val activity: WithdrawalActivity,private val viewModel: WithdrawalViewModel){
+class MoneyInUI(
+    private val activity: WithdrawalActivity,
+    private val viewModel: WithdrawalViewModel,
+    private val imageCaptureManager: ImageCaptureManager
+) {
 
     lateinit var segment: QMUITabSegment
     var selectedTabIndex: Int = 0
     private lateinit var viewPager: ViewPager
+
     //线上充值
     private val moneyInOnlineUI by lazy { MoneyInOnlineUI(activity, viewModel) }
 
     //线下充值
-    private val moneyInOutlineUI by lazy { MoneyInOutlineUI(activity, viewModel) }
+    val moneyInOutlineUI by lazy { MoneyInOutlineUI(activity, viewModel, imageCaptureManager) }
 
     //viewpager的适配器
     private var newPagerAdapter: PagerAdapter? = null
@@ -282,11 +305,14 @@ class MoneyInUI(private val activity: WithdrawalActivity,private val viewModel:
  * @property root _FrameLayout
  * @constructor
  */
-class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel: WithdrawalViewModel){
+class MoneyOutUI(
+    private val activity: WithdrawalActivity,
+    private val viewModel: WithdrawalViewModel
+) {
 
-    lateinit var amount_input : EditText
+    lateinit var amount_input: EditText
 
-    var canUseBanlance : Double = 0.0
+    var canUseBanlance: Double = 0.0
 
     val root = _FrameLayout(activity).apply {
         verticalLayout {
@@ -297,7 +323,7 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
                         text = "提现金额"
                         textSizeAuto = 31
                         textColorInt = R.color.rma_gray_color
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         marginStart = autoSize(36)
                     }
                 }.lparams(autoSize(250), autoSize(200))
@@ -319,15 +345,18 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
 
                     linearLayout {
                         textView {
-                            viewModel.usedAccountData.bindOptional(context){
-                                val freezeAmount = it?.freezemargin?.plus(it.otherfreezemargin)?.plus(it.freezecharge)?.plus(it.outamountfreeze)//冻结金额
+                            viewModel.usedAccountData.bindOptional(context) {
+                                val freezeAmount = it?.freezemargin?.plus(it.otherfreezemargin)
+                                    ?.plus(it.freezecharge)?.plus(it.outamountfreeze)//冻结金额
                                 val balance = it?.currentbalance?.minus(freezeAmount ?: 0.0)//
                                 canUseBanlance = balance ?: 0.0
-                                text = "可提现金额 " + NumberUtils.roundNum(NumberUtils.doubleDistortion(balance?.toString()),2)
+                                text = "可提现金额 " + NumberUtils.roundNum(
+                                    NumberUtils.doubleDistortion(balance?.toString()), 2
+                                )
                             }
                             textSizeAuto = 31
                             textColorInt = R.color.rma_color_ccc
-                        }.lparams(wrapContent, wrapContent){
+                        }.lparams(wrapContent, wrapContent) {
 
                         }
 
@@ -340,10 +369,10 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
                             text = "全部"
                             textSizeAuto = 31
                             textColorInt = R.color.rma_blue_color
-                        }.lparams(wrapContent, wrapContent){
+                        }.lparams(wrapContent, wrapContent) {
                             marginEnd = autoSize(36)
                         }
-                    }.lparams(matchParent, wrapContent){
+                    }.lparams(matchParent, wrapContent) {
 
                     }
 
@@ -360,13 +389,13 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
                         text = "开户银行"
                         textSizeAuto = 31
                         textColorInt = R.color.rma_color_ccc
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         marginStart = autoSize(36)
                     }
                 }.lparams(autoSize(250), autoSize(150))
 
                 textView {
-                    viewModel.userCollectConfigData.bindOptional(context){
+                    viewModel.userCollectConfigData.bindOptional(context) {
                         text = it?.bankname
                     }
                     textSizeAuto = 36
@@ -384,13 +413,13 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
                         text = "银行卡号"
                         textSizeAuto = 31
                         textColorInt = R.color.rma_color_ccc
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         marginStart = autoSize(36)
                     }
                 }.lparams(autoSize(250), autoSize(150))
 
                 textView {
-                    viewModel.userCollectConfigData.bindOptional(context){
+                    viewModel.userCollectConfigData.bindOptional(context) {
                         text = it?.bankaccountno
                     }
                     textSizeAuto = 36
@@ -408,13 +437,13 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
                         text = "姓名"
                         textSizeAuto = 31
                         textColorInt = R.color.rma_color_ccc
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         marginStart = autoSize(36)
                     }
                 }.lparams(autoSize(250), autoSize(150))
 
                 textView {
-                    viewModel.userCollectConfigData.bindOptional(context){
+                    viewModel.userCollectConfigData.bindOptional(context) {
                         text = it?.bankaccountname
                     }
 
@@ -433,13 +462,13 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
                         text = "支行名称"
                         textSizeAuto = 31
                         textColorInt = R.color.rma_color_ccc
-                    }.lparams(wrapContent, wrapContent){
+                    }.lparams(wrapContent, wrapContent) {
                         marginStart = autoSize(36)
                     }
                 }.lparams(autoSize(250), autoSize(150))
 
                 textView {
-                     viewModel.userCollectConfigData.bindOptional(context){
+                    viewModel.userCollectConfigData.bindOptional(context) {
                         text = it?.branchbankname
                     }
                     textSizeAuto = 31
@@ -454,8 +483,11 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
                 textView {
                     textSizeAuto = 31
                     textColorInt = R.color.text_hint_color_two
-                    text = "提现时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue("013")
-                }.lparams(wrapContent, wrapContent){
+                    text =
+                        "提现时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue(
+                            "013"
+                        )
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(36)
                 }
             }.lparams(matchParent, autoSize(100))
@@ -465,11 +497,11 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
                 gravity = Gravity.CENTER_VERTICAL
                 textView {
                     onThrottleFirstClick {
-                        if (amount_input.text.toString().isNullOrEmpty()){
+                        if (amount_input.text.toString().isNullOrEmpty()) {
                             ToastUtils.showLong("请输入提现金额")
                             return@onThrottleFirstClick
                         }
-                        if (amount_input.text.toString() == "0" || amount_input.text.toString() == "0.0" || amount_input.text.toString() == "0.00" || amount_input.text.toString() == "0."){
+                        if (amount_input.text.toString() == "0" || amount_input.text.toString() == "0.0" || amount_input.text.toString() == "0.00" || amount_input.text.toString() == "0.") {
                             ToastUtils.showLong("提现金额不能为零")
                             return@onThrottleFirstClick
                         }
@@ -482,7 +514,7 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
                             BankAccoutNum = singingInfo?.bankaccountno2 ?: "",
                             Amount = amount_input.text.toString().toDouble(),
                             extend_info = getJSONExtendInfo() ?: ""
-                        ){
+                        ) {
                             amount_input.setText("")
                         }
                     }
@@ -501,6 +533,7 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
             }
         }
     }
+
     /**
      * 组装扩展信息
      *
@@ -516,7 +549,6 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
 }
 
 
-
 /**
  * 充值-线上充值
  * @property activity WithdrawalActivity
@@ -524,16 +556,19 @@ class MoneyOutUI(private val activity: WithdrawalActivity,private val viewModel:
  * @property root _FrameLayout
  * @constructor
  */
-class MoneyInOnlineUI(private val activity: WithdrawalActivity,private val viewModel: WithdrawalViewModel){
+class MoneyInOnlineUI(
+    private val activity: WithdrawalActivity,
+    private val viewModel: WithdrawalViewModel
+) {
 
     //填写的充值金额
-    lateinit var amount_input : EditText
+    lateinit var amount_input: EditText
 
     //选择的充值渠道
-    private val pay_type : MutableLiveData<SelectData> = MutableLiveData()
+    private val pay_type: MutableLiveData<SelectData> = MutableLiveData()
 
-    fun initData(){
-        pay_type.postValue(SelectData(id = "9",value = "支付宝"))
+    fun initData() {
+        pay_type.postValue(SelectData(id = "9", value = "支付宝"))
     }
 
     val root = _FrameLayout(activity).apply {
@@ -544,7 +579,7 @@ class MoneyInOnlineUI(private val activity: WithdrawalActivity,private val viewM
                     text = "充值金额"
                     textSizeAuto = 36
                     textColorInt = R.color.rma_gray_color
-                }.lparams(wrapContent, wrapContent){
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(36)
                 }
 
@@ -572,10 +607,13 @@ class MoneyInOnlineUI(private val activity: WithdrawalActivity,private val viewM
                 gravity = Gravity.CENTER_VERTICAL
 
                 onThrottleFirstClick {
-                    val selectDataList = arrayListOf(SelectData(id = "9",value = "支付宝")/*,
-                        SelectData(id = "10",value = "微信")*/)
+                    val selectDataList = arrayListOf(
+                        SelectData(id = "9", value = "支付宝")/*,
+                        SelectData(id = "10",value = "微信")*/
+                    )
 
-                    activity.creatBottomSheetNoTitleDialog(selectDataList
+                    activity.creatBottomSheetNoTitleDialog(
+                        selectDataList
                     ) {
                         pay_type.postValue(this)
                     }
@@ -585,18 +623,18 @@ class MoneyInOnlineUI(private val activity: WithdrawalActivity,private val viewM
                     text = "充值渠道"
                     textSizeAuto = 36
                     textColorInt = R.color.rma_gray_color
-                }.lparams(wrapContent, wrapContent){
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(36)
                 }
 
                 textView {
-                    pay_type.bindOptional(context){
+                    pay_type.bindOptional(context) {
                         text = it?.value
                     }
                     text = "请选择充值渠道"
                     textSizeAuto = 36
                     textColorInt = R.color.rma_black_33
-                }.lparams(wrapContent, wrapContent){
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(50)
                 }
 
@@ -614,19 +652,22 @@ class MoneyInOnlineUI(private val activity: WithdrawalActivity,private val viewM
                 textView {
                     textSizeAuto = 31
                     textColorInt = R.color.text_hint_color_two
-                    text = "充值时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue("013")
-                }.lparams(wrapContent, wrapContent){
+                    text =
+                        "充值时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue(
+                            "013"
+                        )
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(36)
                 }
             }.lparams(matchParent, autoSize(100))
 
-            viewModel.payInfoRequest.bindOptional(context){
-                LogUtils.eTag("asdhasgfjahsdha",it)
+            viewModel.payInfoRequest.bindOptional(context) {
+                LogUtils.eTag("asdhasgfjahsdha", it)
                 RxPay(activity)
                     .requestAlipay(it ?: "")
                     .subscribe {
                         val intent = Intent()
-                        intent.putExtra("type","2")
+                        intent.putExtra("type", "2")
                         intent.setClass(context, PaySuccessActivity::class.java)
                         ActivityUtils.startActivity(intent)
                         amount_input.setText("")
@@ -638,15 +679,19 @@ class MoneyInOnlineUI(private val activity: WithdrawalActivity,private val viewM
                 gravity = Gravity.CENTER_VERTICAL
                 textView {
                     onThrottleFirstClick {
-                        if (amount_input.text.toString().isNullOrEmpty()){
+                        if (amount_input.text.toString().isNullOrEmpty()) {
                             ToastUtils.showLong("请输入充值金额")
                             return@onThrottleFirstClick
                         }
-                        if (amount_input.text.toString() == "0" || amount_input.text.toString() == "0.0" || amount_input.text.toString() == "0.00" || amount_input.text.toString() == "0."){
+                        if (amount_input.text.toString() == "0" || amount_input.text.toString() == "0.0" || amount_input.text.toString() == "0.00" || amount_input.text.toString() == "0.") {
                             ToastUtils.showLong("充值金额不能为零")
                             return@onThrottleFirstClick
                         }
-                        viewModel.getPayInfo(totalAmount = amount_input.text.toString(),payType = "4",msgType = "9")
+                        viewModel.getPayInfo(
+                            totalAmount = amount_input.text.toString(),
+                            payType = "4",
+                            msgType = "9"
+                        )
                     }
                     gravity = Gravity.CENTER
                     backgroundResource = R.mipmap.rma_submit_bg
@@ -675,21 +720,28 @@ class MoneyInOnlineUI(private val activity: WithdrawalActivity,private val viewM
  * @property root _FrameLayout
  * @constructor
  */
-class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val viewModel: WithdrawalViewModel){
+class MoneyInOutlineUI(
+    private val activity: WithdrawalActivity,
+    private val viewModel: WithdrawalViewModel,
+    private val imageCaptureManager: ImageCaptureManager
+) {
 
     private var uploadFile: String = ""//上传成功后服务给的图片地址
-    private val imageString: MutableLiveData<String> =
+    val imageString: MutableLiveData<String> =
         MutableLiveData<String>().apply { value = "" }//文件地址
 
+    val imagePhotoString: MutableLiveData<String> =
+        MutableLiveData<String>().apply { value = "" }//拍照后的文件地址
+
     //填写的充值金额
-    lateinit var amount_input : EditText
+    lateinit var amount_input: EditText
 
     lateinit var viewPager: ViewPager
 
     /**
      * 选择的银行卡
      */
-    val selectCardType : MutableLiveData<Int> = MutableLiveData()
+    val selectCardType: MutableLiveData<Int> = MutableLiveData()
 
     val root = _FrameLayout(activity).apply {
         verticalLayout {
@@ -701,29 +753,41 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                 clipChildren = false
                 gravity = Gravity.CENTER
                 viewPager {
-                    backgroundDrawable = createRoundRectDrawable("#ffffff",25)
+                    backgroundDrawable = createRoundRectDrawable("#ffffff", 25)
                     clipChildren = false
                     viewPager = this
-                    val dataList = arrayListOf(R.mipmap.qhj_withdraw_bg3,R.mipmap.qhj_withdraw_bg1,R.mipmap.qhj_withdraw_bg2)
-                    viewModel.userCollectConfigDataList.bindOptional(context){
+                    val dataList = arrayListOf(
+                        R.mipmap.qhj_withdraw_bg3,
+                        R.mipmap.qhj_withdraw_bg1,
+                        R.mipmap.qhj_withdraw_bg2
+                    )
+                    viewModel.userCollectConfigDataList.bindOptional(context) {
                         val baseVPAdapter: CardViewAdapter<UserCollectConfigData> =
-                            object : CardViewAdapter<UserCollectConfigData>(activity, R.layout.item_card_view, it) {
+                            object : CardViewAdapter<UserCollectConfigData>(
+                                activity,
+                                R.layout.item_card_view,
+                                it
+                            ) {
                                 override fun bindView(view: View, data: UserCollectConfigData?) {
                                     val linearLayout =
                                         view.findViewById<LinearLayout>(R.id.image_bg)
-                                    val account_name = view.findViewById<TextView>(R.id.account_name)//名字
-                                    val card_number = view.findViewById<TextView>(R.id.card_number)//卡号
-                                    val card_name = view.findViewById<TextView>(R.id.card_name)//银行名称
+                                    val account_name =
+                                        view.findViewById<TextView>(R.id.account_name)//名字
+                                    val card_number =
+                                        view.findViewById<TextView>(R.id.card_number)//卡号
+                                    val card_name =
+                                        view.findViewById<TextView>(R.id.card_name)//银行名称
                                     linearLayout.setBackgroundResource(R.mipmap.qhj_withdraw_bg3)
                                     account_name.setText(data?.collectaccountname)
                                     card_number.text = data?.collectaccountno
-                                    card_name.text = data?.collectbankname + data?.collectbranchbankname
+                                    card_name.text =
+                                        data?.collectbankname + data?.collectbranchbankname
                                 }
                             }
                         adapter = baseVPAdapter
 
                     }
-                    viewPager.setOnPageChangeListener(object : ViewPager.OnPageChangeListener{
+                    viewPager.setOnPageChangeListener(object : ViewPager.OnPageChangeListener {
                         override fun onPageScrollStateChanged(state: Int) {
 
                         }
@@ -743,13 +807,13 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
 
                     })
                     setOffscreenPageLimit(15)
-                    setPageTransformer(false,  ScaleTransformerCardView(activity))
+                    setPageTransformer(false, ScaleTransformerCardView(activity))
 
-                }.lparams(matchParent, autoSize(260)){
+                }.lparams(matchParent, autoSize(260)) {
                     marginStart = autoSize(65)
                     marginEnd = autoSize(65)
                 }
-            }.lparams(matchParent, autoSize(270)){
+            }.lparams(matchParent, autoSize(270)) {
                 topMargin = autoSize(25)
             }
 
@@ -761,7 +825,7 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                     text = "充值金额"
                     textSizeAuto = 36
                     textColorInt = R.color.rma_gray_color
-                }.lparams(wrapContent, wrapContent){
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(36)
                 }
 
@@ -781,7 +845,7 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                     marginStart = autoSize(50)
                 }
 
-            }.lparams(matchParent, autoSize(150)){
+            }.lparams(matchParent, autoSize(150)) {
                 topMargin = autoSize(20)
             }
 
@@ -794,7 +858,7 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                     text = "凭证"
                     textSizeAuto = 36
                     textColorInt = R.color.rma_gray_color
-                }.lparams(wrapContent, wrapContent){
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(36)
                 }
 
@@ -802,7 +866,7 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                     text = "请上传银行充值流水截图"
                     textSizeAuto = 36
                     textColorInt = R.color.rma_gray_color
-                }.lparams(wrapContent, wrapContent){
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(80)
                 }
             }.lparams(matchParent, autoSize(132))
@@ -819,58 +883,132 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                     }
                     visibility = View.VISIBLE
                     onThrottleFirstClick {
-                        PhotoUtils().showPicker(activity) {
-                            it.firstOrNull()?.let {
-                                viewModel.loadingDialogStatus.value =
-                                    TaskUiModel.inFlight()
-                                UpLoadUtils(activity).uploadPicture(
-                                    File(it),
-                                    object : StringCallback() {
-                                        override fun onError(
-                                            call: Call,
-                                            e: Exception,
-                                            id: Int
-                                        ) {
-                                            LogUtils.e("hidahdashdsdasd", e.message)
-                                            viewModel.loadingDialogStatus.value =
-                                                TaskUiModel.failed(
-                                                    InteractiveException(
-                                                        errorMessage = e.message ?: ""
-                                                    )
-                                                )
+                        if (imageString.value.isNullOrEmpty().not()){
+                            return@onThrottleFirstClick
+                        }
+
+                        val selectDataList = arrayListOf(
+                            SelectData(id = "1", value = "拍照"),
+                            SelectData(id = "2", value = "相册")
+                        )
+                        activity.creatBottomSheetDialog("请选择上传", selectDataList) {
+                            if (this.id == "1"){
+                                RxPermissions(activity).request(Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.CAMERA)
+                                    .subscribe { granted ->
+                                        if (granted) {//打开相机拍照
+                                            val intent = imageCaptureManager.dispatchTakePictureIntent()
+                                            ActivityUtils.startActivityForResult(activity, intent, 102)
                                         }
+                                    }
+                            }else if (this.id == "2"){
+                                PhotoUtils().showPicker(activity) {
+                                    it.firstOrNull()?.let {
+                                        viewModel.loadingDialogStatus.value =
+                                            TaskUiModel.inFlight()
+                                        UpLoadUtils(activity).uploadPicture(
+                                            File(it),
+                                            object : StringCallback() {
+                                                override fun onError(
+                                                    call: Call,
+                                                    e: Exception,
+                                                    id: Int
+                                                ) {
+                                                    LogUtils.e("hidahdashdsdasd", e.message)
+                                                    viewModel.loadingDialogStatus.value =
+                                                        TaskUiModel.failed(
+                                                            InteractiveException(
+                                                                errorMessage = e.message ?: ""
+                                                            )
+                                                        )
+                                                }
 
-                                        override fun onResponse(
-                                            response: String,
-                                            id: Int
-                                        ) {
-                                            /*[{"originalName":"tem.jpg","fileName":"201907161657044712.jpg","fileSize":"0KB","fileType":"image/jpeg","filePath":"./uploadFile/20190716/201907161657044712.jpg","submitName":null}]*/
-                                            try {
-                                                viewModel.loadingDialogStatus.value =
-                                                    TaskUiModel.success("上传成功")
-                                                val jsonArray = JSONArray(response)
-                                                LogUtils.eTag(
-                                                    "图片",
-                                                    JSON.toJSONString(jsonArray)
-                                                )
-                                                for (i in 0 until jsonArray.length()) {
-                                                    uploadFile =
-                                                        (jsonArray.get(i) as JSONObject).getString(
-                                                            "filePath"
+                                                override fun onResponse(
+                                                    response: String,
+                                                    id: Int
+                                                ) {
+                                                    /*[{"originalName":"tem.jpg","fileName":"201907161657044712.jpg","fileSize":"0KB","fileType":"image/jpeg","filePath":"./uploadFile/20190716/201907161657044712.jpg","submitName":null}]*/
+                                                    try {
+                                                        viewModel.loadingDialogStatus.value =
+                                                            TaskUiModel.success("上传成功")
+                                                        val jsonArray = JSONArray(response)
+                                                        LogUtils.eTag(
+                                                            "图片",
+                                                            JSON.toJSONString(jsonArray)
                                                         )
-                                                    imageString.value = it
-                                                    LogUtils.e("hidahdashd", uploadFile)
+                                                        for (i in 0 until jsonArray.length()) {
+                                                            uploadFile =
+                                                                (jsonArray.get(i) as JSONObject).getString(
+                                                                    "filePath"
+                                                                )
+                                                            imageString.value = it
+                                                            LogUtils.e("hidahdashd", uploadFile)
+                                                        }
+                                                    } catch (e: JSONException) {
+                                                        e.printStackTrace()
+                                                    }
+
                                                 }
-                                            } catch (e: JSONException) {
-                                                e.printStackTrace()
-                                            }
+                                            },
+                                            10000.0,
+                                            SPUtils.getInstance().getString(Constant.uploadUrl)
+                                        )
+                                    }
+                                }
+                            }
+                        }
+                    }
 
+                    imagePhotoString.bindOptional(context) {
+                        if (it.isNullOrEmpty().not()) {
+                            viewModel.loadingDialogStatus.value =
+                                TaskUiModel.inFlight()
+                            UpLoadUtils(activity).uploadPicture(
+                                File(it),
+                                object : StringCallback() {
+                                    override fun onError(
+                                        call: Call,
+                                        e: Exception,
+                                        id: Int
+                                    ) {
+                                        LogUtils.e("hidahdashdsdasd", e.message)
+                                        viewModel.loadingDialogStatus.value =
+                                            TaskUiModel.failed(
+                                                InteractiveException(
+                                                    errorMessage = e.message ?: ""
+                                                )
+                                            )
+                                    }
+
+                                    override fun onResponse(
+                                        response: String,
+                                        id: Int
+                                    ) {
+                                        /*[{"originalName":"tem.jpg","fileName":"201907161657044712.jpg","fileSize":"0KB","fileType":"image/jpeg","filePath":"./uploadFile/20190716/201907161657044712.jpg","submitName":null}]*/
+                                        try {
+                                            viewModel.loadingDialogStatus.value =
+                                                TaskUiModel.success("上传成功")
+                                            val jsonArray = JSONArray(response)
+                                            LogUtils.eTag(
+                                                "图片",
+                                                JSON.toJSONString(jsonArray)
+                                            )
+                                            for (i in 0 until jsonArray.length()) {
+                                                uploadFile =
+                                                    (jsonArray.get(i) as JSONObject).getString(
+                                                        "filePath"
+                                                    )
+                                                imageString.value = it
+                                                LogUtils.e("hidahdashd", uploadFile)
+                                            }
+                                        } catch (e: JSONException) {
+                                            e.printStackTrace()
                                         }
-                                    },
-                                    10000.0,
-                                    SPUtils.getInstance().getString(Constant.uploadUrl)
-                                )
-                            }
+
+                                    }
+                                },
+                                10000.0,
+                                SPUtils.getInstance().getString(Constant.uploadUrl)
+                            )
                         }
                     }
                     background = resources.getDrawable(R.color.rma_color_ccc)
@@ -878,7 +1016,7 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                     imageView {
                         imageResource = R.mipmap.qhj_picture
                     }.lparams(autoSize(96), autoSize(96))
-                }.lparams(autoSize(288), autoSize(288)){
+                }.lparams(autoSize(288), autoSize(288)) {
                     marginStart = autoSize(250)
                 }
 
@@ -902,7 +1040,7 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                             arrayListOf(path)
                         )
                     }
-                }.lparams(autoSize(288), autoSize(288)){
+                }.lparams(autoSize(288), autoSize(288)) {
                     marginStart = autoSize(250)
                 }
             }.lparams(matchParent, autoSize(300))
@@ -914,8 +1052,11 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                 textView {
                     textSizeAuto = 31
                     textColorInt = R.color.text_hint_color_two
-                    text = "充值时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue("013")
-                }.lparams(wrapContent, wrapContent){
+                    text =
+                        "充值时间" + GlobalDataCollection.instance?.getSystemParamsValue("012") + "~" + GlobalDataCollection.instance?.getSystemParamsValue(
+                            "013"
+                        )
+                }.lparams(wrapContent, wrapContent) {
                     marginStart = autoSize(36)
                 }
             }.lparams(matchParent, autoSize(100))
@@ -925,19 +1066,19 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                 gravity = Gravity.CENTER_VERTICAL
                 textView {
                     onThrottleFirstClick {
-                        if (amount_input.text.toString().isNullOrEmpty()){
+                        if (amount_input.text.toString().isNullOrEmpty()) {
                             ToastUtils.showLong("请输入充值金额")
                             return@onThrottleFirstClick
                         }
-                        if (amount_input.text.toString() == "0" || amount_input.text.toString() == "0.0" || amount_input.text.toString() == "0.00" || amount_input.text.toString() == "0."){
+                        if (amount_input.text.toString() == "0" || amount_input.text.toString() == "0.0" || amount_input.text.toString() == "0.00" || amount_input.text.toString() == "0.") {
                             ToastUtils.showLong("充值金额不能为零")
                             return@onThrottleFirstClick
                         }
-                        if (uploadFile.isNullOrEmpty()){
+                        if (uploadFile.isNullOrEmpty()) {
                             ToastUtils.showLong("请上传充值凭证")
                             return@onThrottleFirstClick
                         }
-                        if (viewModel.userCollectConfigData.value?.accountcode.isNullOrEmpty()){
+                        if (viewModel.userCollectConfigData.value?.accountcode.isNullOrEmpty()) {
                             ToastUtils.showLong("请先添加提现账户信息")
                             return@onThrottleFirstClick
                         }
@@ -950,7 +1091,7 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
                             BankAccoutNum = singingInfo?.bankaccountno2 ?: "",
                             Amount = amount_input.text.toString().toDouble(),
                             extend_info = getJSONExtendInfo(uploadFile) ?: ""
-                        ){
+                        ) {
                             amount_input.setText("")
                             uploadFile = ""
                             imageString.postValue("")
@@ -980,10 +1121,10 @@ class MoneyInOutlineUI(private val activity: WithdrawalActivity,private val view
      *
      * @return
      */
-    fun getJSONExtendInfo(url : String): String? {
+    fun getJSONExtendInfo(url: String): String? {
         val json = JSONObject()
         json.put("sex", MTPEnums.SEX_FEMALE)
-        json.put("certificate_photo_url",url)
+        json.put("certificate_photo_url", url)
         return json.toString()
     }
 

+ 1 - 0
RMA/app/src/main/java/cn/muchinfo/rma/view/base/platinumtreasure/trade/PlatinumTradeViewModel.kt

@@ -156,6 +156,7 @@ class PlatinumTradeViewModel : BaseViewModel() {
     //nodetype 环节类型 - 1:注册 2:登录 3:购买 4:融资购买 5:定投 6:卖出
     fun queryUserNodeCfgAndStatus(goodsid: String){
         val params = mutableMapOf<String,String>().apply {
+            put("userid",GlobalDataCollection.instance?.loginRsp?.userID.toString())
             put("nodetype","3,4,6")
             put("goodsid",goodsid)
         }

+ 13 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ContractDetailActivity.kt

@@ -288,11 +288,23 @@ class ContractDetailsUI(
                     content = data.contractno?.isBlankString() ?: ""
                 ),
                 ContractDetailsData(
+                    title = "合同类型",
+                    content = if (data.contracttype == "1") {
+                        "采购合同"
+                    } else {
+                        "销售合同"
+                    }
+                ),
+                ContractDetailsData(
                     title = if (data.contracttype == "1") {
                         "销售方"
                     } else {
                         "采购方"
-                    }, content = data.accountname ?: ""
+                    },content =  if (data.contracttype == "1") {
+                        data.sellusername ?: "--"
+                    } else {
+                        data.buyusername ?: "--"
+                    }
                 ),
                 ContractDetailsData(title = "业务类型",content = if (data.biztype == "1"){
                     "套保"

+ 2 - 2
RMA/app/src/main/java/cn/muchinfo/rma/view/base/procurement/ProcurementViewModel.kt

@@ -177,7 +177,7 @@ class ProcurementViewModel : BaseViewModel() {
         respData.forEach {
             val newRightData = arrayListOf<String>()
             newRightData.add(it.deliverygoodsname + "\n" + it.wrstandardname)
-            newRightData.add(it.goodsname + "\n" + it.pricemove)
+            newRightData.add(it.goodsname?.isBlankString() + "\n" + it.pricemove)
             newRightData.add(it.qty+ it.enumdicname + "\n" + it.unpricedqty + it.enumdicname)
             newRightData.add(it.pricedqty+ it.enumdicname + "\n" + it.unsureqty+ it.enumdicname)
             newRightData.add(it.payamount + "\n" + it.unpayamount)
@@ -200,7 +200,7 @@ class ProcurementViewModel : BaseViewModel() {
         respData.forEach {
             val newRightData = arrayListOf<String>()
             newRightData.add(it.deliverygoodsname + "\n" + it.wrstandardname)
-            newRightData.add(it.goodsname + "\n" + it.pricemove)
+            newRightData.add(it.goodsname?.isBlankString() + "\n" + it.pricemove)
             newRightData.add(it.pricedqty + it.enumdicname + "\n" + it.unsureqty+ it.enumdicname)
             newRightData.add(it.payamount + "\n" + it.unpayamount)
             newRightData.add(it.invoiceamount + "\n" + it.daikaiamount)

+ 1 - 1
RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/SaleFragment.kt

@@ -40,7 +40,7 @@ class SaleFragment : BaseFragment<SaleViewModel>() {
     private val settlementUI by lazy { SaleSettlementUI(this, viewModel) }
     private val allUI by lazy { SalenewAllUI(this, viewModel) }
 
-    private val tabsArray: List<String> by lazy { arrayListOf("待点价", "履约结算", "全部") }
+    private val tabsArray: List<String> by lazy { arrayListOf("待点价", "履约交收", "全部") }
 //    inflater.inflate(R.layout.fragment_init, container, false)
 
     private val pagerAdapter: PagerAdapter by lazy {

+ 13 - 16
RMA/app/src/main/java/cn/muchinfo/rma/view/base/sale/SaleViewModel.kt

@@ -5,6 +5,7 @@ import cn.muchinfo.rma.global.GlobalDataCollection
 import cn.muchinfo.rma.global.ViewEnumUtils
 import cn.muchinfo.rma.global.data.ColumnsData
 import cn.muchinfo.rma.global.data.ContractData
+import cn.muchinfo.rma.global.isBlankString
 import cn.muchinfo.rma.view.MyApplication
 import cn.muchinfo.rma.view.autoWidget.toArrayList
 import cn.muchinfo.rma.view.autoWidget.utils.NumberUtils
@@ -139,7 +140,7 @@ class SaleViewModel : BaseViewModel(){
         respData.forEach {
             val newRightData = arrayListOf<String>()
             newRightData.add(it.deliverygoodsname + "\n" + it.spotgoodsdesc)
-            newRightData.add(it.goodsname + "\n" + it.pricemove)
+            newRightData.add(it.goodsname?.isBlankString() + "\n" + it.pricemove)
             newRightData.add(it.qty+ it.enumdicname + "\n" + it.unpricedqty+ it.enumdicname)
             newRightData.add(it.pricedqty+ it.enumdicname + "\n" + it.unsureqty+ it.enumdicname)
             newRightData.add(NumberUtils.roundNum(it.payamount,2) + "\n" + NumberUtils.roundNum(it.unpayamount,2))
@@ -161,8 +162,8 @@ class SaleViewModel : BaseViewModel(){
         val newList = arrayListOf<ContractData>()
         respData.forEach {
             val newRightData = arrayListOf<String>()
-            newRightData.add(it.deliverygoodsname + "\n" + it.spotgoodsdesc)
-            newRightData.add(it.goodsname + "\n" + it.pricemove)
+            newRightData.add(it.deliverygoodsname + "\n" + it.wrstandardname)
+            newRightData.add(it.goodsname?.isBlankString() + "\n" + it.pricemove)
             newRightData.add(it.pricedqty+ it.enumdicname + "\n" + it.unsureqty+ it.enumdicname)
             newRightData.add(NumberUtils.roundNum(it.payamount,2) + "\n" + NumberUtils.roundNum(it.unpayamount,2))
             newRightData.add(NumberUtils.roundNum(it.invoiceamount,2) + "\n" + NumberUtils.roundNum(it.daikaiamount,2))
@@ -186,19 +187,15 @@ class SaleViewModel : BaseViewModel(){
             //企业风管-Android】采购-->全部界面, 显示合同数据应该为执行中或者已完结的合同, 对于撤回, 审核拒绝等类型的合约, 不会产生点价登记等数据的 不应该将这些合同显示出来 错误 #93917
             if (it.contracctstatus == "2" || it.contracctstatus == "3"){
                 val newRightData = arrayListOf<String>()
-                newRightData.add(ViewEnumUtils.getContractStatus(it.contracctstatus ?: ""))
-                newRightData.add(it.wrstandardname + "\n" + it.wrstandardcode)
-                newRightData.add(it.goodsname + "\n" + it.pricemove)
-                newRightData.add(
-                    it.convertfactor + "\n" + ViewEnumUtils.getContractStatus(
-                        it.contracctstatus ?: ""
-                    )
-                )
-                newRightData.add(it.qty+ it.enumdicname + "\n" + it.unpricedqty+ it.enumdicname)
-                newRightData.add(it.pricedqty+ it.enumdicname + "\n" + it.unsureqty+ it.enumdicname)
-                newRightData.add(NumberUtils.roundNum(it.payamount,2) + "\n" + NumberUtils.roundNum(it.unpayamount,2))
-                newRightData.add(it.invoiceamount + "\n" + it.daikaiamount)
-                newRightData.add(getTimeString(it))
+                newRightData.add(ViewEnumUtils.getContractStatus(it.contracctstatus ?: ""))//'状态'
+                newRightData.add(it.deliverygoodsname + "\n" + it.wrstandardname)//'现货品种/\n品类 '
+                newRightData.add(it.goodsname?.isBlankString() + "\n" + it.pricemove)//'点价合约/\n升贴水 '
+                newRightData.add(it.qty + it.enumdicname + "\n" + it.unpricedqty + it.enumdicname)//'合同量/\n未定价量 '
+                newRightData.add(it.pricedqty+ it.enumdicname + "\n" + it.unsureqty+ it.enumdicname) //'已定价量/\n未交收量 '
+                newRightData.add(NumberUtils.roundNum(it.payamount,2) + "\n" + NumberUtils.roundNum(it.unpayamount,2))//'已收款额/\n应收款额 '
+                newRightData.add(it.invoiceamount + "\n" + it.daikaiamount)// '已开票额/\n应开票额 ',
+                newRightData.add(getTimeString(it))//'点价期/\n交收期 '
+                newRightData.add(it.convertfactor ?: "--")//'标仓系数 '
                 val newData = it.copy(rightData = newRightData)
                 newList.add(newData)
             }

+ 0 - 1
RMA/app/src/main/res/layout/photo_picker_activity_photo_pager.xml

@@ -3,7 +3,6 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    tools:context="${relativePackage}.${activityClass}"
     >
 
   <include layout="@layout/photo_picker_toolbar"/>

+ 1 - 1
RMA/app/src/main/res/xml/file_paths.xml

@@ -6,5 +6,5 @@
     <external-path
         path="."
         name="external_storage_root" />
-    <cache-path name="app_update" path="." />
+    <cache-path name="app_update" path=".image" />
 </paths>

+ 2 - 1
RMA/gradle.properties

@@ -18,4 +18,5 @@ android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
 # Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
+kotlin.code.style=official
+android.enableR8=false