Commit 5b3626e5 by 罗翻

Merge branch 'dev' into test

parents eec89ae2 b9732d99
Showing with 570 additions and 183 deletions
......@@ -106,6 +106,9 @@
android:name="com.hyphenate.chat.EMJobService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service android:name=".ui.service.LocationService"
android:exported="true"
/>
<!-- 声明SDK所需的receiver -->
<receiver android:name="com.hyphenate.chat.EMMonitorReceiver">
<intent-filter>
......
......@@ -42,7 +42,8 @@ public class InitializeActivity extends DataBindingActivity<ActivityInitializeMa
public void initView() {
MobclickAgent.openActivityDurationTrack(false);
mActivity = this;
String[] mPerArr = new String[]{Manifest.permission.READ_PHONE_STATE, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.WRITE_EXTERNAL_STORAGE};
String[] mPerArr = new String[]{Manifest.permission.READ_PHONE_STATE, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.WRITE_EXTERNAL_STORAGE
, Manifest.permission.CAMERA};
MPermissionUtils.requestPermissionsResult(mActivity, SDK_PERMISSION_REQUEST, mPerArr, new MPermissionUtils.OnPermissionListener() {
@Override
......
package com.dayu.bigfish;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.content.res.Resources;
......@@ -8,6 +9,7 @@ import android.net.ConnectivityManager;
import android.net.wifi.WifiManager;
import android.os.Handler;
import com.dayu.bigfish.ui.service.LocationService;
import com.dayu.bigfish.utils.HxManager;
import com.dayu.common.BaseApplication;
import com.dayu.common.Constants;
......@@ -80,7 +82,15 @@ public class MyApplication extends BaseApplication {
res.updateConfiguration(config, res.getDisplayMetrics());
}
@Override
public void runBackGround() {
startService(new Intent(mContext, LocationService.class));
}
@Override
public void runFrontGround() {
startService(new Intent(mContext, LocationService.class));
}
public static MyApplication getAppContext() {
return myApplication;
......
......@@ -63,5 +63,14 @@ public interface APIService {
*/
@GET(Constants.MESSAGE_NUM)
Observable<BaseResponse<Integer>> getHxNum(@Path("hxAccount") String hxAccount);
/**
* 上传地理位置.
* @param body
* @return
*/
@POST(Constants.COMMITE_LOCAITON)
Observable<BaseResponse<Boolean>> commiteLocation(@Body RequestBody body);
}
......@@ -34,4 +34,8 @@ public class ApiFactory {
return Api.getService(APIService.class).getHxNum(hxAccount).compose(Api.applySchedulers());
}
public static Observable<Boolean> commiteLocation(RequestBody requestBody) {
return Api.getService(APIService.class).commiteLocation(requestBody).compose(Api.applySchedulers());
}
}
......@@ -27,6 +27,8 @@ public interface MainContract {
void showUpdateDialog(VersionInfo info);
void initNotification();
void startLocaitonService();
}
abstract class Presenter extends BasePresenter<View> {
......
......@@ -27,8 +27,10 @@ import com.dayu.bigfish.databinding.ActivityMainBinding;
import com.dayu.bigfish.presenter.main.MainContract;
import com.dayu.bigfish.presenter.main.MainPresenter;
import com.dayu.bigfish.ui.fragment.HomeFirstTabFragment;
import com.dayu.bigfish.ui.service.LocationService;
import com.dayu.common.Constants;
import com.dayu.event.DownloadBean;
import com.dayu.event.UserInfo;
import com.dayu.location.base.LocationUtils;
import com.dayu.message.ui.fragment.HomeMessageFragment;
import com.dayu.order.ui.activity.ReceivingActivity;
......@@ -37,6 +39,7 @@ import com.dayu.provider.event.RefreshReceivingNum;
import com.dayu.provider.event.SwtichFragment;
import com.dayu.provider.router.RouterPath;
import com.dayu.usercenter.ui.fragment.HomePersonFragment;
import com.dayu.utils.UserManager;
import com.dayu.utils.badgeNumberManger.BadgeNumberManager;
import com.dayu.widgets.CustomDialog;
import com.dayu.widgets.listener.onDownloadListener;
......@@ -84,6 +87,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
addFragment();
initListener();
doAction(getIntent());
startLocaitonService();
EventBus.getDefault().register(this);
}
......@@ -109,8 +113,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
mFragmentManger = getSupportFragmentManager();
FragmentTransaction transaction = mFragmentManger.beginTransaction()
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
for (int i = 0; i < mFragments.length; i++) {
Fragment fragment = mFragments[i];
for (Fragment fragment : mFragments) {
transaction.add(R.id.fl_container, fragment);
transaction.hide(fragment);
}
......@@ -141,8 +144,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
* @param position
*/
public void resetSelected(int position) {
for (int i = 0; i < mTabs.length; i++) {
mTabs[i].setSelected(false);
for (TextView mTab : mTabs) {
mTab.setSelected(false);
}
mTabs[position].setSelected(true);
mPosition = position;
......@@ -230,6 +233,15 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
notificationManager.notify(0, builder.build());
}
@Override
public void startLocaitonService() {
UserInfo userInfo = UserManager.getInstance().getUser();
Intent intent = new Intent(mActivity, LocationService.class);
intent.putExtra(Constants.ACCOUNT_ID, userInfo.getAccountId());
intent.putExtra(Constants.ID, userInfo.getSiteId());
mActivity.startService(intent);
}
/**
* 处理intent传来的信息.
*
......@@ -319,7 +331,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
@Subscribe(threadMode = ThreadMode.MAIN)
public void onDownloadEvent(DownloadBean event) {
int progress = (int) Math.round(event.getBytesReaded() / (double) event.getTotal() * 100);
if (builder==null){
if (builder == null) {
return;
}
builder.setContentInfo(String.valueOf(progress) + "%").setProgress(100, progress, false);
......
package com.dayu.bigfish.ui.service;
import android.annotation.SuppressLint;
import android.app.Service;
import android.content.Intent;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.support.annotation.Nullable;
import com.dayu.bigfish.api.ApiFactory;
import com.dayu.common.Constants;
import com.dayu.location.base.LocationUtils;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Timer;
import java.util.TimerTask;
import okhttp3.MediaType;
import okhttp3.RequestBody;
/**
* Created by luofan
* on 2018/7/17.
*/
public class LocationService extends Service {
private final Timer mTimer = new Timer();
private TimerTask mTask;
private Handler mHandler;
private int mAccountId;
private int mSiteId;
@SuppressLint("HandlerLeak")
@Override
public void onCreate() {
super.onCreate();
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
if (mAccountId == 0 || mSiteId == 0) {
return;
}
mHandler.post(() -> LocationUtils.getCurrentLocation(location -> {
if (location != null) {
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("accountId", mAccountId);
jsonObject.put("siteId", mSiteId);
jsonObject.put("longitude", location.getLongitude());
jsonObject.put("latitude", location.getLatitude());
} catch (JSONException e) {
e.printStackTrace();
}
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString());
ApiFactory.commiteLocation(requestBody).subscribe(aBoolean -> {
});
}
}));
super.handleMessage(msg);
}
};
mTask = new TimerTask() {
@Override
public void run() {
sendMessage();
}
};
mTimer.schedule(mTask, 2000, 600000);
}
public void sendMessage() {
Message message = new Message();
message.what = 1;
mHandler.sendMessage(message);
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (intent != null) {
String accounid = intent.getStringExtra(Constants.ACCOUNT_ID);
String siteID = intent.getStringExtra(Constants.ID);
if (accounid != null) {
mAccountId = Integer.parseInt(accounid);
}
if (siteID != null) {
mSiteId = Integer.parseInt(siteID);
}
}
sendMessage();
return super.onStartCommand(intent, flags, startId);
}
@Nullable
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onDestroy() {
super.onDestroy();
mTimer.cancel();
mHandler = null;
}
}
......@@ -52,6 +52,7 @@
android:hint="@{presenter.mHint}"
android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_17"
android:maxEms="200"
android:text="@={presenter.mComment}"
android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui"
......
......@@ -16,7 +16,6 @@ import java.io.IOException;
import java.util.concurrent.TimeUnit;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.ObservableTransformer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
......@@ -123,18 +122,20 @@ public class Api {
public static <T> ObservableTransformer<BaseResponse<T>, T> applySchedulers() {
return (ObservableTransformer<BaseResponse<T>, T>) transformer;
return upstream -> upstream.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.flatMap(Api::flatResponse);
}
final static ObservableTransformer transformer = new ObservableTransformer() {
@Override
public ObservableSource apply(Observable upstream) {
return upstream.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.flatMap((response) -> flatResponse((BaseResponse<Object>) response));
}
};
// final static ObservableTransformer transformer = new ObservableTransformer() {
// @Override
// public ObservableSource apply(Observable upstream) {
// return upstream.subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .flatMap((response) -> flatResponse((BaseResponse<Object>) response));
// }
// };
/**
......@@ -144,7 +145,7 @@ public class Api {
* @param <T>
* @return
*/
public static <T> Observable<T> flatResponse(final BaseResponse<T> response) {
private static <T> Observable<T> flatResponse(final BaseResponse<T> response) {
return Observable.create(e -> {
if (response.isSuccess()) {
if (!e.isDisposed()) {
......
......@@ -43,14 +43,18 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
protected OnChildClickListener mOnChildClickListener;
private List<M> mOldDatas = new ArrayList<>();
private boolean isNeedFoot = false;
private View mFootView;
private int mFootViewType;
@Override
public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
this.mContext = parent.getContext();
if (mFootViewType == viewType) {
return new BaseViewHolder(DataBindingUtil.bind(mFootView));
}
return new BaseViewHolder(DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), viewType, parent, false));
}
public CoreAdapter(boolean needFoot) {
isNeedFoot = needFoot;
if (needFoot) {
......@@ -100,6 +104,16 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
mHeadTypeDatas.add(new Item(i, data));
}
/**
* 目前只支持添加一个脚布局.
* @param view
* @param type
*/
public void addFootViwe(View view, int type) {
mFootView = view;
mFootViewType = type;
}
public void addFooterViewType(@LayoutRes int i, Object data) {
for (Item a : mFootTypeDatas) {
if (a.type == i) {
......
......@@ -41,6 +41,7 @@ public class BaseApplication extends MultiDexApplication {
}
private class SwitchBackgroundCallbacks implements Application.ActivityLifecycleCallbacks {
int count = 0;
@Override
public void onActivityCreated(Activity activity, Bundle bundle) {
......@@ -49,7 +50,10 @@ public class BaseApplication extends MultiDexApplication {
@Override
public void onActivityStarted(Activity activity) {
if (count == 0) {
runFrontGround();
}
count++;
}
@Override
......@@ -64,7 +68,10 @@ public class BaseApplication extends MultiDexApplication {
@Override
public void onActivityStopped(Activity activity) {
count--;
if (count == 0) {
runBackGround();
}
}
@Override
......@@ -77,4 +84,17 @@ public class BaseApplication extends MultiDexApplication {
AppManager.getInstance().remove(activity);
}
}
/**
* app切换到后台时回调.
*/
public void runBackGround() {
}
/**
* app切换到前台时回调.
*/
public void runFrontGround() {
}
}
......@@ -12,16 +12,16 @@ public class Constants {
/**
* 测试环境配置.
*/
// public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static final String ENVIROMENT = "debug";
// public static final String BASE_URL = "http://47.94.101.239:3112";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
// public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
// public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
// public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
// public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
// public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
// public static final boolean IS_DEBUG = true;
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
public static final String ENVIROMENT = "debug";
public static final String BASE_URL = "http://47.94.101.239:3112";
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
public static final boolean IS_DEBUG = true;
/**
* uat环境配置.
......@@ -40,16 +40,16 @@ public class Constants {
/**
* 正式环境.
*/
public static final String ENVIROMENT = "release";
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
public static final String BASE_URL = "https://mobile.kf.ai";
public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
public final static String WEB_SOP = "https://sop.kf.ai/#/sop";
public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
public final static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
public final static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
public static final boolean IS_DEBUG = false;
// public static final String ENVIROMENT = "release";
// public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static final String BASE_URL = "https://mobile.kf.ai";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
// public final static String WEB_SOP = "https://sop.kf.ai/#/sop";
// public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
// public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
// public final static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
// public final static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
// public static final boolean IS_DEBUG = false;
/**
* 演示环境
......@@ -94,6 +94,11 @@ public class Constants {
*/
public final static String MESSAGE_NUM = " /api-message/" + "hXMessage/count/hxAccount/{hxAccount}";
/**
* 上传地理位置.
*/
public final static String COMMITE_LOCAITON = " /api-user/" + "/engineerPathParticle";
/***********************其他配置**********************************/
public final static int PAGESIZE = 20;
......
......@@ -61,6 +61,9 @@ public class UtilsUserAccountMatcher {
}
public static boolean isPassword(String str) {
if (str == null) {
return false;
}
Matcher m = isPwd.matcher(str);
if (m.find()) {
return true;
......
......@@ -195,7 +195,7 @@
<string name="receive_time_out">接单超时</string>
<string name="appointment_time_out">预约超时</string>
<string name="delivery_time_out">验收超时</string>
<string name="server_time_out">服务超时</string>
<string name="server_time_out">上门超时</string>
<string name="need_again_door">需要再次上门</string>
<string name="waite_appointemnt">待预约</string>
<string name="waite_server">待服务</string>
......@@ -293,7 +293,7 @@
<string name="prodcut_type">&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="door_time">上门时间</string>
<string name="order_remark">工单备注</string>
<string name="order_attachment">&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="order_attachment">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;件:</string>
<string name="customer_info">客户信息</string>
<string name="customer_type">客户类型</string>
<string name="customer_name">客户姓名</string>
......@@ -357,6 +357,7 @@
<string name="process_order_success">提交验收成功</string>
<string name="signature_name">请先签名!</string>
<string name="click_and_signature">点击此处让客户去签名</string>
<string name="download_gaode_notice">您还未安装高德地图~</string>
<!--消息-->
<string name="message_system">系统通知</string>
......@@ -379,6 +380,7 @@
<string name="input_content">请输入内容</string>
<string name="commite_success">提交成功</string>
<string name="on_download">正在下载中,请稍后…</string>
<string name="go_download">去安装</string>
<string name="download_faile">下载失败</string>
<string name="have_new_version">有新版本</string>
<string name="next_again">下次再说</string>
......@@ -446,7 +448,7 @@
<string name="certification_error">联网授权失败!请检查网络或找服务商</string>
<string name="certification_getphoto_error">获取相机权限失败</string>
<string name="next_step">下一步</string>
<string name="accredit_error">授权失败</string>
<string name="accredit_error">人脸识别授权失败</string>
<string name="certification_success">认证成功</string>
<string name="certification_fail">认证失败</string>
<string name="certification_again">重新认证</string>
......@@ -526,7 +528,7 @@
<string name="global0101">验证码错误</string>
<string name="global0102">未知错误GLOBAL0102</string>
<string name="global0103">验证码错误</string>
<string name="global0104">用户名密码错误</string>
<string name="global0104">用户名密码错误</string>
<string name="global0400">未知错误GLOBAL0400</string>
<string name="global0406">未知错误GLOBAL0406</string>
<string name="global0405">未知错误GLOBAL0405</string>
......
......@@ -5,8 +5,8 @@ buildscript {
ext.build_tools_version = "27.0.2"
ext.min_sdk_version = 16
ext.target_sdk_version = 23
ext.version_code = 13
ext.verson_name = "1.9.0"
ext.version_code = 14
ext.verson_name = "1.9.1"
ext.gradle_version = '3.0.1'
ext.isReleaseMinify = true
ext.isDebugMinify = true
......
......@@ -27,7 +27,7 @@ android {
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/Amap_2DMap_V5.2.0_20170627.jar')
}
......@@ -5,13 +5,11 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.widget.Toast;
import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClient;
import com.amap.api.location.AMapLocationClientOption;
import com.amap.api.location.AMapLocationListener;
import com.dayu.location.R;
import java.io.File;
......@@ -27,6 +25,7 @@ public class LocationUtils {
private static boolean flag = true;
private static MyLocationListener mListener;
private static Handler mHandler;
private static OpenMarketListener marketListener;
/**
* @param context
......@@ -137,7 +136,7 @@ public class LocationUtils {
return new File("/data/data/" + "com.autonavi.minimap").exists();
}
public static void openMap(Context mContext, String address) {
public static void openMap(Context mContext, String address, OpenMarketListener listener) {
if (isInstallPackage()) {
Intent intent = new Intent("android.intent.action.VIEW"
, android.net.Uri.parse("androidamap://poi?sourceApplication=softname&keywords=" + address));
......@@ -145,19 +144,21 @@ public class LocationUtils {
intent.addCategory("android.intent.category.DEFAULT");
mContext.startActivity(intent);
} else {
Toast.makeText(mContext, R.string.install_gd_map, Toast.LENGTH_SHORT).show();
goToMarket(mContext, "com.autonavi.minimap");
listener.openMarket();
}
}
private static void goToMarket(Context context, String packageName) {
Uri uri = Uri.parse("market://details?id=" + packageName);
public static void goToMarket(Context context) {
Uri uri = Uri.parse("market://details?id=" + "com.autonavi.minimap");
Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
try {
context.startActivity(goToMarket);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}
}
public interface OpenMarketListener {
void openMarket();
}
}
......@@ -56,6 +56,7 @@ public class Order implements Serializable{
private Integer kaCompanyId;
private Integer faceSwitch ;//0:关闭;1:打开
public Integer getFaceSwitch() {
return faceSwitch;
}
......
......@@ -783,7 +783,7 @@ public class OrderDetail implements Serializable {
}
}
public class accessories implements Serializable {
public static class accessories implements Serializable {
private int id;
private String name;
private int orderId;
......
......@@ -50,6 +50,13 @@ public class MultipleProcessPresenter extends MultipleProcessContract.Presenter
mAccountId = Integer.parseInt(UserManager.getInstance().getUser().getAccountId());
mSpus = mView.getBundle().getParcelableArrayList(OrderConstant.SPUS);
int type = mView.getBundle().getInt(OrderConstant.ORDER_TYPE);
mSpus.add(mSpus.get(0));
mSpus.add(mSpus.get(0));
mSpus.add(mSpus.get(0));
mSpus.add(mSpus.get(0));
mSpus.add(mSpus.get(0));
mSpus.add(mSpus.get(0));
mSpus.add(mSpus.get(0));
mDatas.set(mSpus);
if (mSpus.size() == 1 && type == 1) {
mOrderType = 1;
......
......@@ -61,7 +61,6 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
private LinearLayout mLPayer;
private ArrayList<String> mPayerImages = new ArrayList<>();
private List<LocalMedia> mSelectList;
private boolean mFlag = true;
private ImageView mArrow;
private LinearLayout mPayerNotice;
private RelativeLayout mAllSignature;
......@@ -88,28 +87,15 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
mBind.tvTitle.setText(getString(R.string.submit_order));
mIvWeight = (UtilsScreen.getScreenWidth(mActivity) - UtilsScreen.dip2px(mActivity, 20)) / 5;
mBind.recyclerView.mCoreAdapter.addFooterViewType(R.layout.item_multi_process_foot, null);
mBind.recyclerView.postDelayed(() -> {
if (mFlag) {
initFootView();
}
}, 500);
mBind.recyclerView.setOnEndListener(() -> {
if (mFlag) {
initFootView();
}
});
View view = LayoutInflater.from(mActivity).inflate(R.layout.item_multi_process_foot, null);
mBind.recyclerView.mCoreAdapter.addFootViwe(view,R.layout.item_multi_process_foot);
initFootView(view);
}
public void initFootView() {
View view = mBind.recyclerView.getChildAt(0);
public void initFootView(View view) {
swtich = view.findViewById(R.id.iv_switch);
RelativeLayout rlPay = view.findViewById(R.id.rl_pay);
LinearLayout signature = view.findViewById(R.id.rl_signature);
if (signature == null) {
return;
}
mFlag = false;
mSignature = signature;
mSignature= view.findViewById(R.id.rl_signature);
mDoorPrice = view.findViewById(R.id.et_door_price);
mServerPrice = view.findViewById(R.id.et_serve_price);
mMaterialsPrice = view.findViewById(R.id.et_materials_price);
......
......@@ -66,9 +66,12 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act
mFragments.add(orderDatailsServeFragment);
mFragments.add(mOrderPartFragment);
mBind.titleBack.setOnClickListener(v -> dumpBack());
mBind.btnDetail.setVisibility(View.VISIBLE);
mBind.btnServer.setVisibility(View.VISIBLE);
if (detail.getCreatedSource() ==1) {
mBind.btnPart.setVisibility(View.GONE);
mBind.btnServer.setBackgroundResource(R.drawable.detail_end_selector);
}else {
mBind.btnPart.setVisibility(View.VISIBLE);
}
initBtn();
addFragment();
......
......@@ -274,9 +274,6 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac
@Override
public void setFoucesable() {
mBind.tvBrand.setFocusable(false);
mBind.etVersion.setFocusable(false);
mBind.etSerialNum.setFocusable(false);
mBind.ivPayer.setVisibility(View.GONE);
mBind.tvPayer.setClickable(false);
mBind.rlPalyerProve.setVisibility(View.GONE);
......
......@@ -8,6 +8,8 @@ import android.view.View;
import com.alibaba.android.arouter.launcher.ARouter;
import com.amap.api.location.AMapLocation;
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
import com.bigkoo.pickerview.view.OptionsPickerView;
import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.common.Constants;
import com.dayu.location.base.LocationUtils;
......@@ -35,7 +37,9 @@ import com.umeng.analytics.MobclickAgent;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.reactivex.android.schedulers.AndroidSchedulers;
......@@ -81,7 +85,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder.orderLineOne.setVisibility(View.VISIBLE);
holder.orderLineTwo.setVisibility(View.VISIBLE);
holder.tvItemProcess.setVisibility(View.VISIBLE);
// holder.itemTextDizhi.setOnClickListener(v -> LocationUtils.openMap(mContext, address));
holder.navigation.setOnClickListener(v -> LocationUtils.openMap(mContext, address, this::showOpenMarketDialog));
final int id = item.getId();
if (item.getAnyContacts() == 0) {
......@@ -238,9 +242,11 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
});
if (item.getStatus() != 1) {
holder.itemTextPhone.setOnClickListener(v -> {
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:" + item.getCustomerMobile()));
mContext.startActivity(intent);
if (!TextUtils.isEmpty(item.getCustomerTelphome())) {
showMoblieDialog(item.getCustomerMobile(), item.getCustomerTelphome());
} else {
takePhone(item.getCustomerMobile());
}
Map<String, String> map_ekv = new HashMap<>();
if (item.getStatus() == 2) {
map_ekv.put("type", mContext.getString(R.string.receive_list));
......@@ -420,6 +426,39 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
customDialog.show();
}
private void showOpenMarketDialog() {
CustomDialog customDialog = new CustomDialog(mContext, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket(mContext);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
private void showMoblieDialog(String mobile, String tel) {
List<String> list = new ArrayList<>();
list.add(mobile);
list.add(tel);
OptionsPickerView pvOptions = new OptionsPickerBuilder(mContext,
(options1, options2, options3, v) -> takePhone(list.get(options1)))
.setContentTextSize(20)
.setLineSpacingMultiplier(2.0f)
.setContentTextSize(20)
.build();
pvOptions.setPicker(list);
pvOptions.show();
}
private void takePhone(String phone) {
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:" + phone));
mContext.startActivity(intent);
}
public void initPresenter(OrderDoingPresenter presenter) {
mPresenter = presenter;
}
......
......@@ -4,12 +4,14 @@ import android.text.TextUtils;
import android.view.View;
import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.location.base.LocationUtils;
import com.dayu.order.R;
import com.dayu.order.api.protocol.ErrorOrder;
import com.dayu.order.api.protocol.Spu;
import com.dayu.order.databinding.FragmentOrderErrorItemBinding;
import com.dayu.utils.UIUtils;
import com.dayu.utils.UtilsDate;
import com.dayu.widgets.CustomDialog;
import static com.dayu.utils.UtilsDate.FORMAT_ONE;
import static com.dayu.utils.UtilsDate.LONG_TIME_FORMAT_TWO;
......@@ -54,9 +56,10 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE
}
helper.itemTextWeixiu.setText(item.getProviderName());
helper.itemTextWeixiuLeixing.setText(item.getCategoryName());
helper.itemTextDizhi.setText(item.getProvinceName() + item.getCityName() +
item.getDistrictName() + item.getAddress());
String address = item.getProvinceName() + item.getCityName() +
item.getDistrictName() + item.getAddress();
helper.itemTextDizhi.setText(address);
helper.navigation.setOnClickListener(v -> LocationUtils.openMap(mContext, address, this::showOpenMarketDialog));
int errorState = item.getExcptionCode();
if (errorState == 1) {
helper.errorState.setText(mContext.getString(R.string.receive_time_out));
......@@ -92,4 +95,17 @@ public class OrderThreeTabAdapter extends CoreAdapter<ErrorOrder, FragmentOrderE
}
}
private void showOpenMarketDialog() {
CustomDialog customDialog = new CustomDialog(mContext, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket(mContext);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
}
......@@ -11,6 +11,7 @@ import android.widget.ImageView;
import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.base.ui.fragment.DataBindingFragment;
import com.dayu.common.Constants;
import com.dayu.location.base.LocationUtils;
import com.dayu.order.R;
import com.dayu.order.api.protocol.OrderDetail;
import com.dayu.order.api.protocol.Spu;
......@@ -24,6 +25,8 @@ import com.dayu.order.ui.activity.QrCodeActivity;
import com.dayu.order.ui.activity.ServerInstructionActivity;
import com.dayu.utils.GlideImageLoader;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UIUtils;
import com.dayu.widgets.CustomDialog;
import com.dayu.widgets.listener.OnItemClickListener;
import com.umeng.analytics.MobclickAgent;
......@@ -56,6 +59,8 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD
mServerAdapter.setViewType(R.layout.item_detail_server_info);
mBind.rlServerContent.setAdapter(mServerAdapter);
mServerAdapter.setData(detail.getSpus());
mBind.navigation.setOnClickListener(v -> LocationUtils.openMap(mActivity, detail.getProvinceName()
+ detail.getCityName() + detail.getDistrictName() + detail.getAddress(), this::showOpenMarketDialog));
mServerAdapter.setOnItemClickListener(new OnItemClickListener<Spu, ItemDetailServerInfoBinding>() {
@Override
public void OnItemClick(Spu item, ItemDetailServerInfoBinding bind) {
......@@ -103,6 +108,19 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD
mBind.customerSignature.setOnClickListener(v -> imgMax(detail.getEsignatureImg()));
}
private void showOpenMarketDialog() {
CustomDialog customDialog = new CustomDialog(mActivity, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket(mActivity);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
public String getStaus(int staus) {
if (staus == 1) {
return mActivity.getString(R.string.not_receive_order);
......
......@@ -8,6 +8,7 @@ import android.view.View;
import com.dayu.base.ui.adapter.CoreAdapter;
import com.dayu.base.ui.fragment.DataBindingFragment;
import com.dayu.common.Constants;
import com.dayu.location.base.LocationUtils;
import com.dayu.order.R;
import com.dayu.order.api.protocol.OrderDetail;
import com.dayu.order.common.OrderConstant;
......@@ -18,6 +19,7 @@ import com.dayu.order.ui.activity.QrCodeActivity;
import com.dayu.order.ui.activity.ServerInstructionActivity;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UIUtils;
import com.dayu.widgets.CustomDialog;
import com.dayu.widgets.listener.OnItemClickListener;
import com.umeng.analytics.MobclickAgent;
......@@ -78,6 +80,8 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData
mBind.tvLookMore.setVisibility(View.GONE);
}
});
mBind.navigation.setOnClickListener(v -> LocationUtils.openMap(mActivity, dataBean.getProvinceName()
+ dataBean.getCityName() + dataBean.getDistrictName() + dataBean.getAddress(), this::showOpenMarketDialog));
if (dataBean.getIsPay() == null || dataBean.getIsPay() == 1) {
mBind.rlNoCharge.setVisibility(View.VISIBLE);
mBind.rlHaveCharge.setVisibility(View.GONE);
......@@ -153,6 +157,19 @@ public class OrderDetaillsFragment extends DataBindingFragment<FragmentOrderData
}
}
private void showOpenMarketDialog() {
CustomDialog customDialog = new CustomDialog(mActivity, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket(mActivity);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
public void dumpToServerInstruction() {
Bundle bundle = new Bundle();
bundle.putInt(Constants.ID, mDetail.getSpuId());
......
......@@ -69,7 +69,7 @@
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.MultiProcessOrderActivity"
android:windowSoftInputMode="stateVisible|adjustResize"
android:windowSoftInputMode="stateHidden|adjustResize"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.SignatureActivity"
......
......@@ -5,6 +5,7 @@
<import type="android.view.View" />
<import type="android.text.TextUtils"/>
<variable
name="presenter"
......@@ -108,9 +109,8 @@
android:layout_marginLeft="90dp"
android:layout_toEndOf="@+id/text_one_text"
android:layout_toRightOf="@+id/text_one_text"
android:hint="@string/input_product_name"
android:text="@{presenter.mDetail.categoryThreeName??@string/now_no}"
android:textColor="@color/cl_selector_hui"
android:text="@{!TextUtils.isEmpty(presenter.mDetail.categoryThreeName)?presenter.mDetail.categoryThreeName:@string/no_data}"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
</RelativeLayout>
......@@ -144,9 +144,10 @@
android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/text_two_text"
android:background="@null"
android:maxEms="50"
android:hint="@string/order_brand_name"
android:text="@={presenter.mBrandName}"
android:textColor="@color/cl_selector_hui"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
</RelativeLayout>
......@@ -180,9 +181,8 @@
android:layout_centerVertical="true"
android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/tv_version"
android:hint="@string/order_product_model_hint"
android:text="@{presenter.mDetail.productModel??@string/now_no}"
android:textColor="@color/cl_selector_hui"
android:text="@{!TextUtils.isEmpty(presenter.mDetail.productModel)?presenter.mDetail.productModel:@string/no_data}"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
</RelativeLayout>
......@@ -226,9 +226,10 @@
android:layout_marginLeft="75dp"
android:layout_toRightOf="@id/tv_serial_num"
android:background="@null"
android:maxEms="50"
android:hint="@string/order_serail_hint"
android:text="@={presenter.mSn}"
android:textColor="@color/cl_selector_hui"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
</RelativeLayout>
......@@ -307,6 +308,7 @@
android:hint="@string/order_hint"
android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_11"
android:maxEms="200"
android:text="@={presenter.mInfo}"
android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui"
......
......@@ -13,11 +13,11 @@
<ImageView
android:id="@+id/title_back"
android:layout_width="11dp"
android:layout_height="22dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="15dp"
android:layout_marginRight="25dp"
android:paddingLeft="15dp"
android:paddingRight="25dp"
android:src="@drawable/back_btn_normal" />
<LinearLayout
......@@ -34,6 +34,7 @@
android:layout_height="28dp"
android:background="@drawable/detail_first_selector"
android:gravity="center"
android:visibility="invisible"
android:text="@string/order_detail" />
<Button
......@@ -42,6 +43,7 @@
android:layout_height="28dp"
android:background="@drawable/detail_center_selector"
android:gravity="center"
android:visibility="invisible"
android:text="@string/server_record" />
<Button
......@@ -49,6 +51,7 @@
android:layout_width="0dp"
android:layout_height="28dp"
android:layout_weight="1"
android:visibility="gone"
android:background="@drawable/detail_end_selector"
android:gravity="center"
android:text="@string/order_part" />
......
......@@ -6,6 +6,8 @@
<import type="android.view.View" />
<import type="android.text.TextUtils" />
<variable
name="presenter"
type="com.dayu.order.presenter.processorder.ProcessOrderPresenter" />
......@@ -107,8 +109,8 @@
android:layout_marginLeft="90dp"
android:layout_toEndOf="@+id/text_one_text"
android:layout_toRightOf="@+id/text_one_text"
android:text="@{presenter.mDetail.categoryName??@string/now_no}"
android:textColor="@color/cl_selector_hui"
android:text="@{!TextUtils.isEmpty(presenter.mDetail.categoryName)?presenter.mDetail.categoryName:@string/now_no}"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
</RelativeLayout>
......@@ -134,7 +136,7 @@
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_15" />
<EditText
<TextView
android:id="@+id/tv_brand"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -142,9 +144,9 @@
android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/text_two_text"
android:background="@null"
android:hint="@string/order_brand_name"
android:text="@={presenter.mBrandName}"
android:textColor="@color/cl_selector_hui"
android:maxEms="50"
android:text='@{!TextUtils.isEmpty(presenter.mDetail.brandName)?presenter.mDetail.brandName:@string/no_data}'
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
</RelativeLayout>
......@@ -171,7 +173,7 @@
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_15" />
<EditText
<TextView
android:id="@+id/et_version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -179,9 +181,8 @@
android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/tv_version"
android:background="@null"
android:hint="@string/order_product_model_hint"
android:text="@={presenter.mProductModel}"
android:textColor="@color/cl_selector_hui"
android:text='@{!TextUtils.isEmpty(presenter.mDetail.productModel)?presenter.mDetail.productModel:@string/no_data}'
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
</RelativeLayout>
......@@ -217,7 +218,7 @@
android:textSize="@dimen/sp_15"
android:visibility="gone" />
<EditText
<TextView
android:id="@+id/et_serial_num"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -225,9 +226,9 @@
android:layout_marginLeft="75dp"
android:layout_toRightOf="@id/tv_serial_num"
android:background="@null"
android:hint="@string/order_serail_hint"
android:text="@={presenter.mSN}"
android:textColor="@color/cl_selector_hui"
android:maxEms="50"
android:text="@{!TextUtils.isEmpty(presenter.mDetail.sn)?presenter.mDetail.sn:@string/no_data}"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
</RelativeLayout>
......@@ -300,6 +301,7 @@
android:layout_centerVertical="true"
android:layout_toRightOf="@id/tv_player"
android:text="*"
android:visibility="gone"
android:textColor="#F74848"
android:textSize="@dimen/sp_15" />
......@@ -314,7 +316,7 @@
android:hint="@string/order_select_payer"
android:onClick="@{()->presenter.showPayerDialog()}"
android:text="@{presenter.mPayer}"
android:textColor="@color/cl_selector_hui"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
<ImageView
......@@ -341,6 +343,7 @@
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_8"
android:visibility="gone"
android:text="@string/order_select_payer_notice"
android:textColor="#F74848" />
......@@ -422,9 +425,11 @@
android:layout_height="@dimen/dp_147"
android:layout_marginLeft="@dimen/dp_8"
android:layout_marginTop="@dimen/dp_17"
android:layout_marginRight="15dp"
android:layout_toRightOf="@id/time_subscribe_remark"
android:background="@drawable/subscribe_time_shape"
android:gravity="top"
android:maxEms="200"
android:hint="@string/order_hint"
android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_11"
......@@ -745,6 +750,7 @@
android:layout_marginTop="@dimen/dp_17"
android:background="@drawable/subscribe_time_shape"
android:gravity="top"
android:maxEms="100"
android:hint="@string/tv_order_other"
android:paddingTop="@dimen/dp_11"
android:text="@{presenter.mOrderField.otherInfo}"
......
......@@ -43,7 +43,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="76dp"
android:layout_height="38dp"
android:background="@color/cl_white"
android:orientation="horizontal">
......@@ -52,7 +52,6 @@
android:layout_height="wrap_content"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="43dp"
android:paddingTop="@dimen/dp_20"
android:text="@string/ka_beizhu"
android:textColor="@color/default_text_color"
android:textSize="15sp" />
......@@ -62,8 +61,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="@dimen/dp_15"
android:paddingTop="@dimen/dp_20"
android:maxLines="5"
android:maxLines="2"
android:ellipsize="end"
android:text="@{TextUtils.isEmpty(presenter.kaComent)?@string/no_data:presenter.kaComent}"
android:textColor="@color/default_text_color"
......@@ -103,6 +101,7 @@
android:hint="请说明寄回内容,数量和寄回原因"
android:paddingRight="@dimen/dp_15"
android:text="@={presenter.spComent}"
android:maxEms="500"
android:textColor="@color/default_editext_color"
android:textSize="15sp" />
</LinearLayout>
......
......@@ -181,8 +181,9 @@
android:layout_height="wrap_content"
android:layout_below="@+id/tv_remark"
android:layout_marginTop="15dp"
android:text="附件:"
android:text="@string/order_attachment"
android:textColor="@color/tv_cl"
android:layout_marginBottom="10dp"
android:textSize="14sp" />
<LinearLayout
......@@ -192,6 +193,7 @@
android:layout_below="@+id/tv_remark"
android:layout_marginLeft="19dp"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginBottom="10dp"
android:layout_toRightOf="@+id/tv_remark">
<android.support.v7.widget.RecyclerView
......@@ -298,29 +300,61 @@
android:textColor="@color/cl_home_title_text_color"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_contact_tel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/customer_moblie"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@+id/tv_customer_mobile"
android:text='@{item.customerTelphome}'
android:visibility="@{TextUtils.isEmpty(item.customerTelphome)?View.GONE:View.VISIBLE}"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/tv_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_customer_mobile"
android:layout_below="@+id/tv_contact_tel"
android:layout_marginTop="@dimen/dp_15"
android:text="客户地址:"
android:textColor="@color/tv_cl"
android:textSize="14sp" />
<TextView
android:id="@+id/customer_address"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_customer_mobile"
android:layout_marginLeft="19dp"
android:layout_marginTop="@dimen/dp_15"
android:layout_toRightOf="@+id/tv_address"
android:ellipsize="end"
android:maxLines="2"
android:text='@{item.provinceName+item.cityName+item.districtName+item.address}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="14sp" />
android:layout_below="@+id/tv_contact_tel"
android:layout_toRightOf="@id/tv_address"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_customer_address"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:text='@{item.provinceName+item.cityName+item.districtName+item.address}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:paddingBottom="5dp"
android:layout_gravity="center_vertical"
android:src="@drawable/icon_navigation" />
</LinearLayout>
<TextView
android:id="@+id/tv_end_time"
......@@ -328,6 +362,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/tv_address"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginBottom="10dp"
android:text="期望时间:"
android:textColor="@color/tv_cl"
android:textSize="14sp" />
......@@ -339,6 +374,7 @@
android:layout_below="@+id/tv_address"
android:layout_marginLeft="19dp"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginBottom="10dp"
android:layout_toRightOf="@+id/tv_end_time"
android:text='@{!TextUtils.isEmpty(item.appointmentTime)?item.appointmentTime:@string/no_data}'
android:textColor="@color/cl_home_title_text_color"
......
......@@ -234,9 +234,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/rl_info_detail"
android:layout_marginBottom="5dp"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:layout_marginBottom="5dp"
android:orientation="horizontal">
<TextView
......@@ -349,29 +349,59 @@
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/tv_contact_tel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_contact_mode"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_four"
android:text='@{item.customerTelphome}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3"
android:visibility="@{TextUtils.isEmpty(item.customerTelphome)?View.GONE:View.VISIBLE}" />
<TextView
android:id="@+id/two_text_five"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/two_text_four"
android:layout_below="@id/tv_contact_tel"
android:layout_marginLeft="@dimen/dp_13"
android:layout_marginTop="@dimen/dp_13"
android:text="@string/tv_two_text_foure"
android:textColor="@color/cl_order_text_one"
android:textSize="@dimen/sp_13.3" />
<TextView
android:id="@+id/tv_customer_address"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_contact_mode"
android:layout_below="@id/tv_contact_tel"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@id/two_text_five"
android:ellipsize="end"
android:maxLines="2"
android:text='@{item.provinceName+item.cityName+item.districtName+item.address}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
android:orientation="horizontal">
<TextView
android:id="@+id/tv_customer_address"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="2"
android:text='@{item.provinceName+item.cityName+item.districtName+item.address}'
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:paddingBottom="5dp"
android:src="@drawable/icon_navigation" />
</LinearLayout>
<TextView
android:id="@+id/tv_forward_time"
......
......@@ -13,8 +13,8 @@
<LinearLayout
android:id="@+id/ll_left"
android:layout_width="wrap_content"
android:layout_centerVertical="true"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="vertical">
<TextView
......@@ -135,21 +135,35 @@
android:visibility="visible" />
</LinearLayout>
<TextView
android:id="@+id/item_text_dizhi"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_right"
android:layout_marginBottom="13.3dp"
android:layout_marginLeft="@dimen/size_order_item_tool_ml"
android:layout_marginRight="40dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@id/item_line"
android:ellipsize="end"
android:maxLines="2"
android:text="@string/tv_order_item_gps_text"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/size_login_hint_text" />
android:orientation="horizontal">
<TextView
android:id="@+id/item_text_dizhi"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="13.3dp"
android:layout_marginTop="15dp"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/tv_order_item_gps_text"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/size_login_hint_text" />
<ImageView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingBottom="5dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:src="@drawable/icon_navigation" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
......
......@@ -64,10 +64,10 @@
android:id="@+id/tv_error_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="3dp"
android:textColor="@color/cl_tab_read"
android:textSize="@dimen/size_login_hint_text"
android:layout_gravity="right"
android:visibility="gone" />
</LinearLayout>
......@@ -189,18 +189,34 @@
</LinearLayout>
<TextView
android:id="@+id/item_text_dizhi"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_order_item_tool_ml"
android:layout_marginRight="40dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="2"
android:text="@string/tv_order_item_gps_text"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/size_login_hint_text" />
android:orientation="horizontal">
<TextView
android:id="@+id/item_text_dizhi"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_order_item_tool_ml"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/tv_order_item_gps_text"
android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/size_login_hint_text" />
<ImageView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingBottom="5dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:src="@drawable/icon_navigation" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
......
......@@ -59,7 +59,7 @@
android:layout_toRightOf="@id/tv_player"
android:background="@null"
android:hint="@string/order_select_payer"
android:textColor="@color/cl_selector_hui"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" />
<ImageView
......@@ -390,6 +390,7 @@
android:background="@drawable/subscribe_time_shape"
android:gravity="top"
android:hint="@string/tv_order_other"
android:maxEms="100"
android:paddingTop="@dimen/dp_11"
android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui"
......
package com.dayu.provider.event;
/**
* 刷新待预约列表.
* 人脸认证后刷新我的页面的数据.
* on 2017/10/11.
*/
public class CertificationEvent {
......
......@@ -11,8 +11,6 @@ import com.dayu.utils.ToastUtils;
import com.dayu.utils.UserManager;
import com.dayu.utils.UtilsUserAccountMatcher;
import io.reactivex.functions.Consumer;
/**
* Created by luofan
* on 2017/11/8.
......@@ -47,11 +45,8 @@ public class ModifyPwdPresenter extends ModifyPwdContract.Presenter {
return;
}
mView.showDialog();
UserApiFactory.modifyPwd(mAccountId, MD5Util.encrypt(oldCode.get()), MD5Util.encrypt(newCode.get()), MD5Util.encrypt(againCode.get())).subscribe(baseObserver(new Consumer<String>() {
@Override
public void accept(String s) throws Exception {
mView.dumpToLogin(mPhone);
}
}));
UserApiFactory.modifyPwd(mAccountId, MD5Util.encrypt(oldCode.get()), MD5Util.encrypt(newCode.get())
, MD5Util.encrypt(againCode.get()))
.subscribe(baseObserver(s -> mView.dumpToLogin(mPhone)));
}
}
......@@ -17,6 +17,7 @@ import com.dayu.utils.MD5Util;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UIUtils;
import com.dayu.utils.UserManager;
import com.dayu.utils.UtilsUserAccountMatcher;
import com.hyphenate.EMCallBack;
import com.hyphenate.chat.EMClient;
......@@ -38,6 +39,10 @@ public class PwLoginPresenter extends PwLoginContract.Presenter {
@Override
public void login() {
if (!UtilsUserAccountMatcher.isPhoneNum(phoneNume.get())) {
ToastUtils.showShortToast(R.string.alipay_phone_error);
return;
}
mView.showDialog();
UserApiFactory.login(phoneNume.get(), MD5Util.encrypt(code.get()), "usernameLogin").subscribe(baseObserver(userInfo -> {
if (userInfo.getDetectStatus() == 1) {
......
......@@ -86,7 +86,7 @@ public class HomePersonFragment extends BaseFragment<HomePersonPresenter, Fragme
super.lazyLoad();
ProgressUtil.startLoad(mActivity);
mPresenter.getAllData(userId, siteId);
mPresenter.getAlipayAccount(userId);
// mPresenter.getAlipayAccount(userId);
}
@Override
......
......@@ -81,7 +81,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="55dp"
android:background="@null"
android:hint="@string/input_old_pwd"
android:hint="@string/pwd_tip"
android:inputType="textPassword"
android:text="@={presenter.oldCode}"
android:textColor="@color/default_text_color"
......@@ -110,7 +110,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="55dp"
android:background="@null"
android:hint="@string/input_new_pwd"
android:hint="@string/pwd_tip"
android:inputType="textPassword"
android:text="@={presenter.newCode}"
android:textColor="@color/default_text_color"
......@@ -139,7 +139,7 @@
android:layout_marginLeft="40dp"
android:background="@null"
android:inputType="textPassword"
android:hint="@string/input_new_pwd_again"
android:hint="@string/pwd_tip"
android:text="@={presenter.againCode}"
android:textColor="@color/default_text_color"
android:textSize="15sp" />
......
......@@ -214,8 +214,7 @@
android:layout_width="160dp"
android:layout_height="100dp"
android:layout_marginLeft="@dimen/dp_13.3"
android:background="@drawable/personal_center_selector"
android:onClick="@{()->presenter.dumpToAccount()}">
android:background="@drawable/personal_center_selector">
<TextView
android:id="@+id/text_today_jiedan"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment