Commit 374aaf3c by mReturn

工单优化&友盟share

parent 90cd84b4
Showing with 606 additions and 52 deletions
......@@ -224,6 +224,9 @@ public static final int *;
-keep class com.umeng.error.BatteryUtils{ public *; }
#友盟push
-keep public class * extends android.app.Service
#eventbus
-keepclassmembers class ** {
@org.greenrobot.eventbus.Subscribe <methods>;
......
......@@ -36,6 +36,12 @@
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<!-- 用于申请获取蓝牙信息进行室内定位 -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!--友盟push-->
<uses-permission android:name="android.permission.BROADCAST_PACKAGE_ADDED" />
<uses-permission android:name="android.permission.BROADCAST_PACKAGE_CHANGED" />
<uses-permission android:name="android.permission.BROADCAST_PACKAGE_INSTALL" />
<uses-permission android:name="android.permission.BROADCAST_PACKAGE_REPLACED" />
<application
android:name=".MyApplication"
android:allowBackup="true"
......@@ -44,7 +50,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"
tools:replace="android:label,icon,theme">
tools:replace="android:label,icon,theme,allowBackup">
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.dayu.bigfish.fileProvider"
......@@ -84,6 +90,11 @@
android:value="Channel ID" />
<!--android:value="dev" />-->
<!-- 友盟push_华为相关配置 -->
<meta-data
android:name="com.huawei.hms.client.appid"
android:value="100165851" />
<!-- 高德地图 -->
<meta-data
android:name="com.amap.protocol.v2.apikey"
......@@ -138,6 +149,12 @@
android:name="com.dayu.bigfish.ui.ManagerActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<!--<activity-->
<!--android:name="com.dayu.bigfish.ui.UmengPushNotifyActivity"-->
<!--android:launchMode="singleTask"-->
<!--android:exported="true" />-->
</application>
<!--华为小红点-->
......
......@@ -17,7 +17,9 @@ import com.dayu.common.BaseApplication;
import com.dayu.common.Constants;
import com.dayu.location.base.LocationUtils;
import com.dayu.order.greendao.GreenDaoManager;
import com.dayu.utils.LogUtils;
import com.dayu.utils.NetworkConnectChangedReceiver;
import com.dayu.utils.ToastUtils;
import com.scwang.smartrefresh.header.MaterialHeader;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator;
......@@ -29,8 +31,16 @@ import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
import com.umeng.analytics.MobclickAgent;
import com.umeng.analytics.MobclickAgent.EScenarioType;
import com.umeng.commonsdk.UMConfigure;
import com.umeng.message.IUmengRegisterCallback;
import com.umeng.message.PushAgent;
import com.umeng.message.UmengNotificationClickHandler;
import com.umeng.message.entity.UMessage;
import com.umeng.socialize.PlatformConfig;
import org.android.agoo.huawei.HuaWeiRegister;
import org.android.agoo.oppo.OppoRegister;
import org.android.agoo.xiaomi.MiPushRegistar;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
......@@ -106,12 +116,50 @@ public class MyApplication extends BaseApplication {
*/
private void initUM() {
MobclickAgent.setCatchUncaughtExceptions(!Constants.IS_DEBUG);
UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
UMConfigure.init(this,"599a41697f2c743210000990","UmengPush",
UMConfigure.DEVICE_TYPE_PHONE,"78d43fa94358512f9d00acf9b50f7474");
UMConfigure.setLogEnabled(true);
UMConfigure.setEncryptEnabled(true);
MobclickAgent.setScenarioType(mContext, EScenarioType.E_UM_NORMAL);
//分享
PlatformConfig.setWeixin("wx06c380c64a0adb8d", "1fc353c2d33202b314b9fa89155528b7");
initPush();
}
//友盟推送
private void initPush() {
//获取消息推送代理示例
PushAgent mPushAgent = PushAgent.getInstance(mContext);
//自定义推送通知栏点击事件处理
UmengNotificationClickHandler notificationClickHandler = new UmengNotificationClickHandler() {
@Override
public void dealWithCustomAction(Context context, UMessage msg) {
if (msg.extra!= null && msg.extra.containsKey("order_id")){
LogUtils.e("Upush click0: "+ msg.extra.get("order_id"));
}
LogUtils.e("Upush click: "+ msg.custom);
}
};
// mPushAgent.setNotificationClickHandler(notificationClickHandler);
//注册推送服务,每次调用register方法都会回调该接口
mPushAgent.register(new IUmengRegisterCallback() {
@Override
public void onSuccess(String s) {
LogUtils.e("Upush device_token: "+s);
}
@Override
public void onFailure(String s, String s1) {
LogUtils.e("Upush init failure: "+s+" "+s1);
}
});
MiPushRegistar.register(mContext,"2882303761518127164","5201812712164");
HuaWeiRegister.register(this);
OppoRegister.register(this, "a69IwYs2f8gg48ck000W4c0kc", "425bEd757209c8101bEfE57eba86ddca");
}
/**
......
......@@ -96,6 +96,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
@Override
public void initView() {
MobclickAgent.onEvent(this,"go_home");
saleFragment = HomeSaleFragment.newInstance();
secondFragment = HomeOrderFragment.newInstance();
// thirdFragment = HomeMessageFragment.newInstance();
......
package com.dayu.bigfish.ui;
public class UmengPushNotifyActivity {
import android.content.Intent;
import android.os.Bundle;
import com.dayu.bigfish.R;
import com.dayu.utils.LogUtils;
import com.umeng.message.UmengNotifyClickActivity;
import org.android.agoo.common.AgooConstants;
public class UmengPushNotifyActivity extends UmengNotifyClickActivity {
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_empty);
}
@Override
public void onMessage(Intent intent) {
super.onMessage(intent); //此方法必须调用,否则无法统计打开数
String body = intent.getStringExtra(AgooConstants.MESSAGE_BODY);
LogUtils.e("UmengPushNotifyActivity", body);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="1dp"
android:layout_height="1dp"
android:background="@color/transparent"
>
</LinearLayout>
......@@ -55,7 +55,8 @@ dependencies {
api 'com.squareup.retrofit2:converter-gson:2.4.0'
api 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
//图片选择
api 'com.github.LuckSiege.PictureSelector:picture_library:v2.1.5'
// api 'com.github.LuckSiege.PictureSelector:picture_library:v2.1.5'
api 'com.github.LuckSiege.PictureSelector:picture_library:v2.1.9'
//ARouter
api "com.alibaba:arouter-api:$arouter_api_version"
//greendao数据库
......@@ -72,6 +73,9 @@ dependencies {
api project(':pickerview')
api 'cn.jzvd:jiaozivideoplayer:7.1.0'
// api 'tv.danmaku.ijk.media:ijkplayer-java:0.8.4'
// api 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
// api 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.4'
api 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.35'
api 'com.badoo.mobile:android-weak-handler:1.1'
api 'com.youth.banner:banner:1.4.10'
......@@ -81,7 +85,27 @@ dependencies {
api 'com.google.android:flexbox:1.0.0'
api 'com.github.chrisbanes:PhotoView:2.0.0'
// api 'tv.danmaku.ijk.media:ijkplayer-java:0.8.4'
// api 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
// api 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.4'
//友盟PushSDK必须依赖utdid库,所以需要加入对应依赖
api 'com.umeng.umsdk:utdid:1.5.2'
//友盟push相关依赖(必须)
api 'com.umeng.umsdk:push:6.0.5'
api 'com.umeng.umsdk:alicloud-httpdns:1.2.5'
api 'com.umeng.umsdk:alicloud-utils:1.1.5'
api 'com.umeng.umsdk:alicloud_beacon:1.0.1'
api 'com.umeng.umsdk:agoo-accs:3.3.8.8-open-fix2'
api 'com.umeng.umsdk:agoo_networksdk:3.5.5'
api 'com.umeng.umsdk:agoo_tlog:3.0.0.17'
api 'com.umeng.umsdk:agoo_tnet4android:3.1.14.9'
//小米Push通道
api 'com.umeng.umsdk:xiaomi-push:3.6.17'
api 'com.umeng.umsdk:xiaomi-umengaccs:1.1.0'
//华为Push通道
api 'com.umeng.umsdk:huawei-basetb:2.6.3.305'
api 'com.umeng.umsdk:huawei-pushtb:2.6.3.305'
api 'com.umeng.umsdk:huawei-umengaccs:1.2.1'
//Oppo Push通道
api 'com.umeng.umsdk:oppo-push:1.0.1'
api 'com.umeng.umsdk:oppo-umengaccs:1.0.3'
}
......@@ -22,5 +22,151 @@
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<!-- 友盟push 以下为基本配置信息,需要自行添加至您的AndroidManifest文件中 start-->
<service
android:name="com.taobao.accs.ChannelService"
android:exported="true"
android:process=":channel">
<intent-filter>
<action android:name="com.taobao.accs.intent.action.SERVICE" />
</intent-filter>
<intent-filter>
<action android:name="com.taobao.accs.intent.action.ELECTION" />
</intent-filter>
</service>
<service
android:name="com.taobao.accs.data.MsgDistributeService"
android:exported="true">
<intent-filter>
<action android:name="com.taobao.accs.intent.action.RECEIVE" />
</intent-filter>
</service>
<receiver
android:name="com.taobao.accs.EventReceiver"
android:process=":channel">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
android:name="com.taobao.accs.ServiceReceiver"
android:process=":channel">
<intent-filter>
<action android:name="com.taobao.accs.intent.action.COMMAND" />
</intent-filter>
<intent-filter>
<action android:name="com.taobao.accs.intent.action.START_FROM_AGOO" />
</intent-filter>
</receiver>
<service
android:name="com.taobao.accs.internal.AccsJobService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:process=":channel"/>
<service
android:name="com.taobao.accs.ChannelService$KernelService"
android:process=":channel" />
<service
android:name="org.android.agoo.accs.AgooService"
android:exported="true">
<intent-filter>
<action android:name="com.taobao.accs.intent.action.RECEIVE" />
</intent-filter>
</service>
<service
android:name="com.umeng.message.UmengIntentService"
android:exported="true"
android:process=":channel">
<intent-filter>
<action android:name="org.agoo.android.intent.action.RECEIVE" />
</intent-filter>
</service>
<service
android:name="com.umeng.message.XiaomiIntentService"
android:exported="true"
android:process=":channel">
<intent-filter>
<action android:name="org.agoo.android.intent.action.RECEIVE" />
</intent-filter>
</service>
<receiver
android:name="com.taobao.agoo.AgooCommondReceiver"
android:exported="true"
android:process=":channel">
<intent-filter>
<action android:name="com.dayu.bigfish.intent.action.COMMAND" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<service
android:name="com.umeng.message.UmengMessageIntentReceiverService"
android:exported="true"
android:process=":channel">
<intent-filter>
<action android:name="org.android.agoo.client.MessageReceiverService" />
</intent-filter>
</service>
<receiver
android:name="com.umeng.message.NotificationProxyBroadcastReceiver"
android:exported="false" />
<service
android:name="com.umeng.message.UmengMessageCallbackHandlerService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false">
<intent-filter>
<action android:name="com.umeng.messge.registercallback.action" />
</intent-filter>
<intent-filter>
<action android:name="com.umeng.message.enablecallback.action" />
</intent-filter>
<intent-filter>
<action android:name="com.umeng.message.disablecallback.action" />
</intent-filter>
<intent-filter>
<action android:name="com.umeng.message.message.handler.action" />
</intent-filter>
<intent-filter>
<action android:name="com.umeng.message.message.sendmessage.action" />
</intent-filter>
</service>
<service
android:name="com.umeng.message.UmengDownloadResourceService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false" />
<provider
android:name="com.umeng.message.provider.MessageProvider"
android:authorities="com.dayu.bigfish.umeng.message"
android:exported="false">
<grant-uri-permission android:pathPattern=".*" />
</provider>
<!-- 以下为基本配置信息,需要自行添加至您的AndroidManifest文件中 end-->
</application>
</manifest>
......@@ -9,6 +9,7 @@ import android.view.View;
import com.dayu.common.BaseConstant;
import com.umeng.analytics.MobclickAgent;
import com.umeng.message.PushAgent;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
......@@ -26,6 +27,7 @@ public abstract class DataBindingActivity<B extends ViewDataBinding> extends App
this.setContentView(rootView);
mActivity = this;
mClassName = mActivity.getClass().getSimpleName();
PushAgent.getInstance(this).onAppStart();
initPresenter();
initView();
}
......
......@@ -12,6 +12,7 @@ import android.widget.TextView;
import com.dayu.baselibrary.R;
import com.dayu.common.Constants;
import com.umeng.analytics.MobclickAgent;
import com.umeng.socialize.Config;
import com.umeng.socialize.ShareAction;
import com.umeng.socialize.UMShareListener;
......@@ -172,6 +173,7 @@ public class CommonUtils {
**/
public static void shareProgram(Activity activity, String imgUrl, String title, String description,
int uid,int gid, SHARE_MEDIA platform, UMShareListener callBack) {
MobclickAgent.onEvent(activity,"share");
//兼容低版本的网页链接
String mUrl = "http://www.kf.ai/";
UMMin umMin = new UMMin(mUrl);
......

1.82 KB | W: | H:

3.92 KB | W: | H:

baseSDK/src/main/res/drawable-xxhdpi/icon_pay_ali.png
baseSDK/src/main/res/drawable-xxhdpi/icon_pay_ali.png
baseSDK/src/main/res/drawable-xxhdpi/icon_pay_ali.png
baseSDK/src/main/res/drawable-xxhdpi/icon_pay_ali.png
  • 2-up
  • Swipe
  • Onion skin

2.2 KB | W: | H:

4.78 KB | W: | H:

baseSDK/src/main/res/drawable-xxhdpi/icon_pay_wechat.png
baseSDK/src/main/res/drawable-xxhdpi/icon_pay_wechat.png
baseSDK/src/main/res/drawable-xxhdpi/icon_pay_wechat.png
baseSDK/src/main/res/drawable-xxhdpi/icon_pay_wechat.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -3,19 +3,17 @@
<!-- 边框颜色值 -->
<item>
<shape>
<solid android:color="@color/table_border" />
<solid android:color="#999" />
</shape>
</item>
<!--这个是按钮边框设置为四周 并且宽度为1-->
<item
android:top="@dimen/dp_sale_step"
android:bottom="@dimen/dp_sale_step"
android:right="@dimen/dp_sale_step"
>
<shape>
<!--这个是背景颜色-->
<solid android:color="@color/table_record_title_bg" />
<solid android:color="@color/white" />
</shape>
</item>
</layer-list>
\ No newline at end of file
......@@ -83,12 +83,12 @@
<string name="tv_order_updoor_feiyong">上门费</string>
<string name="tv_order_serve_feiyong">服务费</string>
<string name="tv_order_yuan">(元)</string>
<string name="tv_order_cailiao_feiyong">材料费</string>
<string name="tv_order_cailiao_feiyong">商品货款</string>
<string name="tv_order_other_feiyong">其他费</string>
<string name="tv_order_other">请输入上门费用备注信息</string>
<string name="tv_order_other">收款备注(限30字)</string>
<string name="input_up_door_money">请输入上门费用</string>
<string name="input_up_money">请输入服务费用</string>
<string name="input_cailiao_money">请输入材料费用</string>
<string name="input_cailiao_money">请输入商品货款</string>
<string name="input_other_money">请输入其他费用</string>
<string name="tv_save_back">保存</string>
<string name="tv_idea">反馈意见</string>
......@@ -418,7 +418,7 @@
<string name="pay_sccucess">支付成功</string>
<string name="pay_money_sccucess">收款成功</string>
<string name="pay_fail">支付失败</string>
<string name="click_and_signature">点击此处客户去签名</string>
<string name="click_and_signature">点击此处,请客户去签名</string>
<string name="download_gaode_notice">您还未安装高德地图~</string>
<string name="sop_title">标准操作规范SOP</string>
<string name="process_notice">温馨提示:点击屏幕底部“提交验收”按钮,申请费用。</string>
......@@ -517,7 +517,7 @@
<string name="clear_success">清理完成</string>
<string name="newversion_code">新版本号为:</string>
<string name="is_newversion">当前为最新版本,无需更新</string>
<string name="subcribe_time_success">预约时间成功,请移至服务列表查看</string>
<string name="subcribe_time_success">预约时间成功,请移至服务列表查看</string>
<string name="input_day_first">请先输入日期</string>
<string name="input_right_time">预约时间必须大于当前时间</string>
<string name="input_subcribe_time">请输入预约时间</string>
......
......@@ -18,10 +18,10 @@ buildscript {
// jcenter()
// google()
maven { url 'https://jitpack.io' }
maven {
url 'https://maven.google.com'
}
maven { url 'https://maven.google.com' }
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url 'https://dl.bintray.com/umsdk/release' }
}
dependencies {
classpath "com.android.tools.build:gradle:$gradle_version"
......@@ -38,6 +38,7 @@ allprojects {
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url 'https://dl.bintray.com/umsdk/release' }
}
}
......
......@@ -16,6 +16,7 @@ import com.dayu.order.api.protocol.OrderPart;
import com.dayu.order.api.protocol.Pay;
import com.dayu.order.api.protocol.ServerInstruction;
import com.dayu.order.api.protocol.ShipperCompany;
import com.dayu.order.api.protocol.SopItemBean;
import com.dayu.order.api.protocol.Spu;
import com.dayu.order.api.protocol.Tab;
import com.dayu.order.api.protocol.companyManager;
......@@ -40,7 +41,7 @@ import retrofit2.http.Query;
* on 2018/2/8.
*/
interface OrderService {
public interface OrderService {
/**
* 我已出发.
*
......@@ -412,9 +413,16 @@ interface OrderService {
*/
@POST(Constants.API_7400+"/leaveMessage/spu/engineer")
Observable<BaseResponse<Boolean>> addComment(@Body CommentPostData data);
/**
* 回复
*/
@POST(Constants.API_7400+"/leaveMessage/spu/engineer")
Observable<BaseResponse<Boolean>> addCommentReply(@Body CommentReplyData data);
/**
* 工单sop信息
*/
@GET(Constants.API_7200+"/ordersRelationSpuItemSop/sop/{itemId}")
Observable<BaseResponse<List<SopItemBean>>> getSopItems(@Path("itemId") int itemId);
}
......@@ -23,6 +23,15 @@ public class SopItemBean {
private Object typeResult;
private int status;
private String example;
private boolean showRemark;
public boolean isShowRemark() {
return showRemark;
}
public void setShowRemark(boolean showRemark) {
this.showRemark = showRemark;
}
public int getId() {
return id;
......
......@@ -15,6 +15,7 @@ import com.dayu.provider.event.RefreshApoiment;
import com.dayu.provider.event.RefreshReceivingNum;
import com.dayu.provider.event.RefreshTab;
import com.dayu.provider.event.SwtichFragment;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UserManager;
import com.umeng.analytics.MobclickAgent;
......@@ -58,9 +59,9 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
mView.showDialog();
OrderApiFactory.receiveOrder(orders, engineer).subscribe(baseObserver(
aBoolean -> receiveOrderSuccess(), responeThrowable -> {
if ("ORDER0002".equals(responeThrowable.subCode) || "ORDER0003".equals(responeThrowable.subCode)) {
refresh();
}
// if ("ORDER0002".equals(responeThrowable.subCode) || "ORDER0003".equals(responeThrowable.subCode)) {
// }
refresh();
}));
}
......@@ -88,6 +89,7 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
public void refresh() {
mPage = 1;
getOrders(Constants.WATING_ORDER, mUserId, mSiteId, mPage, Constants.PAGESIZE);
EventBus.getDefault().post(new RefreshTab(-1));
}
@Override
......
......@@ -48,7 +48,6 @@ public class MultiProcessOrderActivity extends BaseActivity<MultiProcessOrderPre
@Override
public void initView() {
ToastUtils.showShortToast("multi");
mBind.ivSn.setOnClickListener(v -> {
if (mSnImages.size() > 0) {
dumpPic(mSnImages);
......@@ -94,6 +93,8 @@ public class MultiProcessOrderActivity extends BaseActivity<MultiProcessOrderPre
.previewImage(true)// 是否可预览图片 true or false
.isCamera(true)// 是否显示拍照按钮 true or false
.isZoomAnim(true)// 图片列表点击 缩放效果 默认true
// .recordVideoSecond(10) //视频秒数录制 默认60s int
// .videoMaxSecond(15)// 显示多少秒以内的视频or音频也可适用 int
.sizeMultiplier(0.1f)// glide 加载图片大小 0~1之间 如设置 .glideOverride()无效
.setOutputCameraPath("/CustomPath")// 自定义拍、照保存路径,可不填
.compress(true)// 是否压缩 true or false
......
......@@ -74,6 +74,8 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
private PhotoViewAdapter mAdapter;
private RecyclerView mPhoto;
private LinearLayout mScanPay;
private LinearLayout llScanPay;
private LinearLayout llPaywayNotice;
private ImageView mScan;
private TextView mTvScan;
private RelativeLayout mRlPay;
......@@ -122,12 +124,14 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
mScanPay = view.findViewById(R.id.scan_pay);
mScan = view.findViewById(R.id.iv_scan);
mTvScan = view.findViewById(R.id.tv_scan_pay);
llScanPay = view.findViewById(R.id.ll_scan_pay);
llPaywayNotice = view.findViewById(R.id.ll_payway_notice);
mNoPay.setOnClickListener(v -> {
mPayType = 3;
clearData();
mRlPay.setVisibility(View.GONE);
mScanPay.setVisibility(View.GONE);
llScanPay.setVisibility(View.GONE);
setBackGround(mNoPay);
});
mWechatPay.setOnClickListener(v -> {
......@@ -137,6 +141,8 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
if (mWechatStatus) {
mPayType = 1;
mRlPay.setVisibility(View.VISIBLE);
llScanPay.setVisibility(View.VISIBLE);
llPaywayNotice.setVisibility(View.VISIBLE);
mScanPay.setVisibility(View.VISIBLE);
setBackGround(mWechatPay);
} else {
......@@ -150,7 +156,7 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
} else {
mPayType = 2;
mRlPay.setVisibility(View.VISIBLE);
mScanPay.setVisibility(View.GONE);
llScanPay.setVisibility(View.GONE);
setBackGround(mCashPay);
}
});
......@@ -161,7 +167,7 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
} else {
mPayType = 4;
mRlPay.setVisibility(View.VISIBLE);
mScanPay.setVisibility(View.GONE);
llScanPay.setVisibility(View.GONE);
setBackGround(mPublicPay);
}
});
......@@ -236,15 +242,22 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
mCashPay.setEnabled(false);
mDoorPrice.setEnabled(false);
mMaterialsPrice.setEnabled(false);
mServerPrice.setEnabled(false);
mOtherPrice.setEnabled(false);
mDoorInfo.setEnabled(false);
mScanPay.setEnabled(false);
llPaywayNotice.setVisibility(View.GONE);
if (detail != null) {
if (detail.getDoorPrice() != null) {
mDoorPrice.setText(new DecimalFormat("0.00").format(detail.getDoorPrice()) + "");
} else {
mDoorPrice.setText("0.00");
}
if (detail.getServicePrice() != null) {
mServerPrice.setText(new DecimalFormat("0.00").format(detail.getServicePrice()) + "");
} else {
mServerPrice.setText("0.00");
}
if (detail.getMaterialCost() != null) {
mMaterialsPrice.setText(new DecimalFormat("0.00").format(detail.getMaterialCost()) + "");
} else {
......
package com.dayu.order.ui.activity;
public class SopLocalActivity {
import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.EditText;
import android.widget.RadioGroup;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dayu.base.api.Api;
import com.dayu.base.ui.activity.BaseActivity;
import com.dayu.base.ui.adapter.PhotoViewAdapter;
import com.dayu.base.ui.adapter.SpacesItemDecoration;
import com.dayu.base.ui.presenter.SImplePresenter;
import com.dayu.common.Constants;
import com.dayu.order.R;
import com.dayu.order.api.OrderService;
import com.dayu.order.api.protocol.SopItemBean;
import com.dayu.order.databinding.ActivitySopLocalBinding;
import com.dayu.utils.ToastUtils;
import java.util.ArrayList;
import java.util.List;
public class SopLocalActivity extends BaseActivity<SImplePresenter,ActivitySopLocalBinding> {
int mItemId;
private ArrayList<String> mImages = new ArrayList<>();
private PhotoViewAdapter mAdapter;
@Override
public void setPresenter() {
}
@Override
public int getLayoutId() {
return R.layout.activity_sop_local;
}
public static void launch(Context context,int mOrderId){
Intent intent = new Intent(context,SopLocalActivity.class);
intent.putExtra(Constants.ORDER_ID,mOrderId);
context.startActivity(intent);
}
@Override
public void initView() {
mBind.titleBack.setOnClickListener(view -> dumpBack());
mItemId = getIntent().getIntExtra(Constants.ORDER_ID,0);
initData();
}
private void initData() {
showDialog();
Api.getService(OrderService.class).getSopItems(mItemId).compose(Api.applySchedulers())
.subscribe(mPresenter.baseObserver(datas->{
ToastUtils.showShortToast("sop item: "+datas.size());
setItemAdapter(datas);
}));
}
private void setItemAdapter(List<SopItemBean> datas) {
BaseQuickAdapter<SopItemBean,BaseViewHolder> itemAdapter = new BaseQuickAdapter<SopItemBean, BaseViewHolder>(R.layout.item_sop_local,datas) {
@Override
protected void convert(BaseViewHolder helper, SopItemBean item) {
RecyclerView rvImg = helper.getView(R.id.rv_image);
RecyclerView rvVideo = helper.getView(R.id.rv_video);
EditText edtRemak = helper.getView(R.id.edt_remark);
RadioGroup rgSop = helper.getView(R.id.rg_sop);
edtRemak.setVisibility(item.isShowRemark()?View.VISIBLE:View.GONE);
rvVideo.setVisibility(item.getType() == 1?View.VISIBLE:View.GONE);
rgSop.setVisibility(item.getType() == 2?View.VISIBLE:View.GONE);
rvImg.setVisibility(item.getType() == 3?View.VISIBLE:View.GONE);
helper.getView(R.id.tv_add_remark).setOnClickListener(v->{
item.setShowRemark(!item.isShowRemark());
notifyDataSetChanged();
});
switch (item.getType()){
case 1:
break;
}
}
};
mBind.rvSop.setLayoutManager(new LinearLayoutManager(this));
mBind.rvSop.setAdapter(itemAdapter);
}
private void initPhotoView(RecyclerView recyclerView,ArrayList<String> list) {
if (mAdapter == null) {
recyclerView.addItemDecoration(new SpacesItemDecoration(10));
recyclerView.setLayoutManager(new GridLayoutManager(this, 4));
mAdapter = new PhotoViewAdapter(mImages, this);
recyclerView.setAdapter(mAdapter);
mAdapter.setData(mImages);
}
mImages = list;
if (mImages.size() < 10) {
mImages.add("add");
}
mAdapter.setData(mImages);
}
}
......@@ -32,6 +32,7 @@ import com.github.lzyzsd.jsbridge.CallBackFunction;
import com.luck.picture.lib.PictureSelector;
import com.luck.picture.lib.config.PictureConfig;
import com.luck.picture.lib.entity.LocalMedia;
import com.megvii.idcardlib.util.Constant;
import org.greenrobot.eventbus.EventBus;
import org.json.JSONException;
......@@ -65,12 +66,26 @@ public class SopWebViewActivity extends BaseActivity<SopPresenter,ActivitySopWeb
private int mSpuState;
@Override
public void onCreate(Bundle savedInstanceState) {
Bundle bundle = getIntent().getBundleExtra(Constants.BUNDLE);
mOrderId = bundle.getInt(Constants.ORDER_ID, 0);
SopLocalActivity.launch(this,mOrderId);
finish();
super.onCreate(savedInstanceState);
}
@Override
public int getLayoutId() {
return R.layout.activity_sop_webview;
}
@Override
public void initView() {
initData();
initWebView();
}
private void initData() {
UserInfo userInfo = UserManager.getInstance().getUser();
mToken = userInfo.getToken();
Bundle bundle = getIntent().getBundleExtra(Constants.BUNDLE);
......@@ -87,7 +102,6 @@ public class SopWebViewActivity extends BaseActivity<SopPresenter,ActivitySopWeb
LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
mBind.llWeb.addView(mWebView);
mBind.tvTitle.setText(getString(R.string.sop_title));
initWebView();
}
private void initWebView() {
......
......@@ -117,7 +117,9 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder.orderLineOne.setVisibility(View.GONE);
holder.orderLineTwo.setVisibility(View.GONE);
holder.itemTextPhone.setText(mContext.getString(R.string.receive_order));
holder.itemTextPhone.setOnClickListener(v -> {
holder.llBottom.setVisibility(View.GONE);
holder.tvTakeOrder.setVisibility(View.VISIBLE);
holder.tvTakeOrder.setOnClickListener(v -> {
if (mOnChildClickListener != null) {
mOnChildClickListener.OnChildClick(holder.itemTextPhone, this, position);
}
......@@ -155,7 +157,8 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
}
holder.itemUpdataTime.setText(mContext.getString(R.string.modify_appointment_time));
if (item.getSubStatus() == 1) {
holder.tvItemProcess.setText(mContext.getString(R.string.have_go_on));
// holder.tvItemProcess.setText(mContext.getString(R.string.have_go_on));
holder.tvItemProcess.setText(mContext.getString(R.string.begain_server));
} else if (item.getSubStatus() == 2) {
holder.tvItemProcess.setText(mContext.getString(R.string.begain_server));
}
......@@ -373,6 +376,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
ProgressUtil.stopLoad();
mItem.setStatus(4);
mItem.setSubStatus(integer);
processClick(mItem,h,posiiton);
mBind.tvItemProcess.setText(mContext.getString(R.string.process_order));
mBind.itemUpdataTime.setText(mContext.getString(R.string.need_again_door));
}, responeThrowable -> {
......
......@@ -17,6 +17,7 @@ import com.dayu.order.ui.adapter.OrderAdapter;
import com.dayu.provider.event.RefreshApoiment;
import com.dayu.provider.router.RouterPath;
import com.dayu.utils.ProgressUtil;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UserManager;
import com.dayu.widgets.CustomDialog;
import com.dayu.widgets.listener.OnItemClickListener;
......
......@@ -73,6 +73,7 @@
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.MultiProcessOrderActivity"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
......@@ -87,6 +88,9 @@
<activity
android:name=".ui.activity.EditeDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.SopLocalActivity"
android:screenOrientation="portrait" />
</application>
</manifest>
......@@ -35,10 +35,11 @@
<TextView
android:layout_width="match_parent"
android:layout_height="43dp"
android:layout_marginLeft="15dp"
android:paddingTop="@dimen/dp_17"
android:paddingLeft="15dp"
android:gravity="center_vertical"
android:text="@string/tv_order_eg"
android:textColor="@color/tv_cl"
android:background="@color/tv_bg"
android:textColor="@color/cl_home_title_text_color"
android:textSize="14sp" />
<RelativeLayout
......
......@@ -13,7 +13,8 @@
<TextView
android:id="@+id/tv_title"
style="@style/text_title" />
style="@style/text_title"
android:text="@string/sop_title" />
<ImageView
android:id="@+id/title_back"
......@@ -24,14 +25,19 @@
<TextView
android:id="@+id/tv_right_title"
style="@style/title_right_text"
android:onClick="@{()->presenter.callPhone()}"
android:text="@string/company_mobile"
android:textColor="#3faafc"
android:textSize="@dimen/dp_13.3"
android:visibility="@{presenter.showPhone?View.VISIBLE:View.GONE}" />
android:visibility="gone" />
</RelativeLayout>
<ImageView style="@style/card_line" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_sop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never" />
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -26,6 +26,7 @@
android:text="@string/order_title" />
<TextView
android:visibility="gone"
android:id="@+id/tv_right_title"
style="@style/title_right_text"
android:onClick="@{()->presenter.dumpToOrderRecordActivity()}"
......
......@@ -288,6 +288,7 @@
</RelativeLayout>
</LinearLayout>
<ImageView
android:id="@+id/item_bottom_line"
android:layout_width="match_parent"
......@@ -295,10 +296,25 @@
android:layout_marginTop="5dp"
android:background="@color/cl_order_item_line_bg" />
<TextView
android:visibility="gone"
android:id="@+id/tv_take_order"
android:layout_width="160dp"
android:layout_height="35dp"
android:gravity="center"
android:layout_gravity="center_horizontal"
android:text="@string/take_oreder_now"
android:textColor="@color/cl_white"
android:background="@drawable/btn_blue_commom"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:textSize="@dimen/sp_15" />
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="43dp"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp"
>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/pickerview_wheelview_textcolor_divider"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
>
<TextView
android:id="@+id/tv_sort"
style="@style/common_text_style"
android:text="1."
/>
<TextView
android:id="@+id/tv_desc"
style="@style/common_text_style"
android:singleLine="true"
android:layout_width="0dp"
android:layout_weight="1"
android:text="1"
/>
<TextView
android:id="@+id/tv_add_remark"
style="@style/common_text_style"
android:padding="10dp"
android:text="@string/write_remark"
android:textColor="@color/text_common_blue"
/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:visibility="gone"
android:id="@+id/rv_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginTop="5dp"
/>
<android.support.v7.widget.RecyclerView
android:visibility="gone"
android:id="@+id/rv_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginTop="5dp"
/>
<RadioGroup
android:id="@+id/rg_sop"
android:layout_marginBottom="15dp"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<RadioButton
android:id="@+id/cb_yes"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/yes_str"
/>
<RadioButton
android:id="@+id/cb_no"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/no_str"
/>
</RadioGroup>
<EditText
android:id="@+id/edt_remark"
android:padding="5dp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_input_register_react"
android:layout_marginBottom="15dp"
/>
</LinearLayout>
......@@ -16,4 +16,11 @@
<string name="part_trans_code">快递单号:</string>
<string name="part_trans_company">物流公司:</string>
<string name="setlect_trans_company_hint">请选择物流公司名称</string>
<string name="take_oreder_now">马上接单</string>
<string name="receive_money_for_oreder_sender">代派单方商家向客户收款</string>
<string name="scan_receive_money">扫码收款</string>
<string name="pls_show_pay_code">请客户出示支付宝/微信付款码</string>
<string name="write_remark">写备注</string>
<string name="no_str"></string>
<string name="yes_str"></string>
</resources>
......@@ -13,6 +13,7 @@ import com.dayu.common.BaseView;
public interface SaleProductContract {
interface View extends BaseView {
void share(ProductListBean item);
void onCollectClicked(boolean isCollect);
}
abstract class Presenter extends BaseListPresenter<View> {
......
......@@ -3,7 +3,6 @@ package com.bigfish.salecenter.presenter.saleproduct;
import android.databinding.ObservableField;
import android.text.TextUtils;
import com.bigfish.salecenter.R;
import com.bigfish.salecenter.api.SaleService;
import com.bigfish.salecenter.event.RefreshSaleTab;
import com.bigfish.salecenter.model.CollectProductData;
......@@ -11,11 +10,7 @@ import com.bigfish.salecenter.model.ProductListBean;
import com.dayu.base.api.Api;
import com.dayu.common.Constants;
import com.dayu.event.UserInfo;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UserManager;
import com.umeng.socialize.ShareAction;
import com.umeng.socialize.media.UMImage;
import com.umeng.socialize.media.UMWeb;
import org.greenrobot.eventbus.EventBus;
......@@ -92,6 +87,7 @@ public class SaleProductPresent extends SaleProductContract.Presenter {
if (item.getCollectionStatus() == 1) {
return Api.getService(SaleService.class).unCollectProdcut(item.getId(), mUserId).compose(Api.applySchedulers());
} else {
mView.onCollectClicked(true);
CollectProductData data = new CollectProductData(1, "", mUserId, item.getId());
return Api.getService(SaleService.class).collectProdcut(data).compose(Api.applySchedulers());
}
......
......@@ -43,6 +43,7 @@ public class ProductDetailActivity extends BaseActivity<SImplePresenter, Activit
@Override
public void initView() {
MobclickAgent.onEvent(this,"goods_detail");
mId = getIntent().getIntExtra("id", 0);
initBtn();
getDetailData();
......
......@@ -22,6 +22,7 @@ import com.dayu.utils.CommonUtils;
import com.dayu.utils.GlideImageLoader;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UserManager;
import com.umeng.analytics.MobclickAgent;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.youth.banner.BannerConfig;
......
......@@ -25,6 +25,7 @@ import com.dayu.event.UserInfo;
import com.dayu.utils.CommonUtils;
import com.dayu.utils.UserManager;
import com.dayu.widgets.listener.OnItemClickListener;
import com.umeng.analytics.MobclickAgent;
import com.umeng.socialize.bean.SHARE_MEDIA;
import org.greenrobot.eventbus.EventBus;
......@@ -187,4 +188,11 @@ public class SaleProductFragment extends BaseFragment<SaleProductPresent, Fragme
CommonUtils.shareProgram(mActivity,item.getFirstUrl(),item.getGoodsModel(),
item.getBrief(),mUserId,item.getId(),SHARE_MEDIA.WEIXIN,null);
}
@Override
public void onCollectClicked(boolean isCollect) {
if (isCollect){
MobclickAgent.onEvent(mActivity,"collect_goods");
}
}
}
......@@ -64,7 +64,6 @@ public class CommonRecordActivity extends BaseActivity<SImplePresenter,ActivityC
}
private void setAdapter() {
List<String> testList = new ArrayList<>();
for (int i = 0; i < 30; i++) {
testList.add("test data" + i);
......
......@@ -99,7 +99,7 @@
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginLeft="15dp"
android:background="@drawable/bg_gray_react"
android:background="@drawable/bg_input_register_react"
android:hint="@string/pls_input_name"
android:maxLength="13"
android:maxLines="1"
......@@ -149,7 +149,7 @@
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginLeft="15dp"
android:background="@drawable/bg_gray_react"
android:background="@drawable/bg_input_register_react"
android:hint="@string/pls_input_phone"
android:inputType="phone"
android:maxLength="18"
......@@ -200,7 +200,7 @@
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginLeft="15dp"
android:background="@drawable/bg_gray_react"
android:background="@drawable/bg_input_register_react"
android:hint="@string/pls_input_pwd"
android:inputType="textPassword"
android:maxLength="18"
......@@ -251,7 +251,7 @@
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_marginLeft="15dp"
android:background="@drawable/bg_gray_react"
android:background="@drawable/bg_input_register_react"
android:hint="@string/pls_confirm_pwd"
android:inputType="textPassword"
android:maxLength="18"
......
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