Commit 375ba106 by mReturn

工单sop改造

parent 3b2f9716
Showing with 699 additions and 85 deletions
......@@ -19,6 +19,11 @@
<activity
android:name="com.dayu.base.ui.activity.ImgGalleryActivty"
android:screenOrientation="portrait" />
<activity
android:name="com.dayu.base.ui.activity.VideoPreviewActivty"
android:screenOrientation="portrait"
android:configChanges="orientation|screenSize|keyboardHidden"
/>
<activity android:name="com.dayu.base.ui.activity.CameraActivity" />
</application>
......
......@@ -54,5 +54,12 @@ public class BaseApiFactory {
return part;
}
public static MultipartBody.Part packPhoto(String imageUrl) {
File file = new File(imageUrl);
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file);
MultipartBody.Part part = MultipartBody.Part.createFormData("fileUpload", file.getName(), requestFile);
return part;
}
}
......@@ -21,7 +21,6 @@ import com.cjt2325.cameralibrary.util.DeviceUtil;
import com.cjt2325.cameralibrary.util.FileUtil;
import com.dayu.baselibrary.R;
import com.dayu.common.Constants;
import com.dayu.utils.ToastUtils;
import java.io.File;
......@@ -42,11 +41,16 @@ public class CameraActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
setContentView(R.layout.activity_camera);
if (getIntent().hasExtra(Constants.IS_SOP_VIDEO)){
setContentView(R.layout.activity_camera_sop);
}else {
setContentView(R.layout.activity_camera);
}
jCameraView = (JCameraView) findViewById(R.id.jcameraview);
//设置视频保存路径
jCameraView.setSaveVideoPath(Environment.getExternalStorageDirectory().getPath() + File.separator + VIDEO_PATH);
jCameraView.setMediaQuality(JCameraView.MEDIA_QUALITY_HIGH);
if (getIntent().hasExtra(Constants.ONLY_VIDEO)) {
jCameraView.setTip(getResources().getString(R.string.moment_take_video));
jCameraView.setFeatures(jCameraView.BUTTON_STATE_ONLY_RECORDER);
......
package com.dayu.base.ui.activity;
import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;
import com.dayu.baselibrary.R;
import com.dayu.baselibrary.databinding.AcitivityPreviewBinding;
import com.dayu.common.Constants;
import com.dayu.utils.GlideImageLoader;
import java.util.ArrayList;
import cn.jzvd.JzvdStd;
/**
* 视频预览页
*/
public class VideoPreviewActivty extends DataBindingActivity<AcitivityPreviewBinding> {
private MyPageAdapter adapter;
private Context mContext;
public ArrayList<String> mInfos = new ArrayList<>();
@Override
public int getLayoutId() {
return R.layout.acitivity_preview;
}
@Override
public void initView() {
mContext = this;
mInfos = getIntent().getStringArrayListExtra(Constants.BUNDLE_KEY_ID);
adapter = new MyPageAdapter(mInfos);
mBind.vpPreview.setAdapter(adapter);
mBind.vpPreview.setCurrentItem(getIntent().getIntExtra(Constants.BUNDLE_KEY_ID, 0));
mBind.titileBack.setOnClickListener(o -> finish());
}
@Override
public void onPause() {
super.onPause();
JzvdStd.goOnPlayOnPause();
}
@Override
public void onResume() {
super.onResume();
JzvdStd.goOnPlayOnResume();
}
@Override
protected void onDestroy() {
super.onDestroy();
JzvdStd.releaseAllVideos();
}
class MyPageAdapter extends PagerAdapter {
private ArrayList<String> listViews;
public MyPageAdapter(ArrayList<String> listViews) {
this.listViews = listViews;
}
public int getCount() {
return listViews.size();
}
public int getItemPosition(Object object) {
return POSITION_NONE;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView((View) object);
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
JzvdStd jzvdStd = new JzvdStd(mContext);
GlideImageLoader.load(mContext, jzvdStd.thumbImageView,listViews.get(position),-1);
jzvdStd.setUp(listViews.get(position),"");
container.addView(jzvdStd);
return jzvdStd;
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
}
}
......@@ -11,7 +11,8 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import com.dayu.base.ui.activity.PreviewActivty;
import com.dayu.base.ui.activity.ImgGalleryActivty;
import com.dayu.base.ui.activity.VideoPreviewActivty;
import com.dayu.baselibrary.R;
import com.dayu.common.Constants;
import com.dayu.utils.GlideImageLoader;
......@@ -35,12 +36,19 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
private int videoLength = 30;
private int requestCode = PictureConfig.CHOOSE_REQUEST;
private OnItemClickListener<MediaChooseAdapter.Holder, Integer> listener;
private boolean addEmpty;
public MediaChooseAdapter( Activity context,ArrayList<String> list) {
AdapterListener adapterListener;
public void setAdapterListener(AdapterListener adapterListener) {
this.adapterListener = adapterListener;
}
public MediaChooseAdapter(Activity context, ArrayList<String> list) {
mIvSize = (UtilsScreen.getScreenWidth(context) - UtilsScreen.dip2px(context, 20)) / 5;
this.context = context;
this.list = list;
if (list.size()<maxCount)
if (list.size() < maxCount && !list.contains("add"))
list.add("add");
}
......@@ -50,7 +58,18 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
this.list = list;
this.maxCount = maxCount;
this.mimeType = mimeType;
if (list.size()<maxCount)
if (list.size() < maxCount && !list.contains("add"))
list.add("add");
}
public MediaChooseAdapter(Activity context, ArrayList<String> list, int maxCount, int mimeType, boolean addEmpty) {
mIvSize = (UtilsScreen.getScreenWidth(context) - UtilsScreen.dip2px(context, 20)) / 5;
this.context = context;
this.list = list;
this.maxCount = maxCount;
this.mimeType = mimeType;
this.addEmpty = addEmpty;
if (list.size() < maxCount && !list.contains("add"))
list.add("add");
}
......@@ -66,15 +85,24 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
this.requestCode = requestCode;
}
public void setVideoLength(int videoLength) {
this.videoLength = videoLength;
}
public void setData(ArrayList<String> list) {
this.list = list;
if (list.size()<maxCount)
if (list.size() < maxCount && !list.contains("add"))
list.add("add");
notifyDataSetChanged();
}
public void setDataNoChange(ArrayList<String> list) {
this.list = list;
}
public ArrayList<String> getData() {
return this.list;
ArrayList<String> results = new ArrayList<>(list);
results.remove("add");
return results;
}
......@@ -90,9 +118,20 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
@Override
public void onBindViewHolder(@NonNull Holder holder, int position) {
if (list.get(position).equals("add")) {
holder.picture.setImageResource(R.drawable.icon_submit_photo);
if (addEmpty) {
holder.picture.setImageResource(R.drawable.ic_add_img);
} else {
holder.picture.setImageResource(R.drawable.icon_submit_photo);
}
holder.delete.setVisibility(View.GONE);
holder.picture.setOnClickListener(v -> showPicDialog());
holder.picture.setOnClickListener(v ->{
if (list.size() == 1 && adapterListener != null){
adapterListener.onFirstAddClick();
}else {
showPicDialog();
}
});
} else {
GlideImageLoader.load(context, list.get(position), holder.picture);
holder.delete.setVisibility(View.VISIBLE);
......@@ -101,7 +140,7 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
ArrayList temp = new ArrayList();
temp.addAll(list);
temp.remove("add");
dumpPic(temp);
dumpPic(temp,position);
});
}
}
......@@ -139,7 +178,7 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
public void showPicDialog() {
int size;
size = maxCount+1 - list.size();
size = maxCount + 1 - list.size();
PictureSelectionModel selector = PictureSelector.create(context)
.openGallery(mimeType)//全部.PictureMimeType.ofAll()、图片.ofImage()、视频.ofVideo()
.maxSelectNum(size)// 最大图片选择数量 int
......@@ -173,10 +212,17 @@ public class MediaChooseAdapter extends RecyclerView.Adapter<MediaChooseAdapter.
return path;
}
private void dumpPic(ArrayList<String> list) {
Intent intent = new Intent(context, PreviewActivty.class);
intent.putStringArrayListExtra(Constants.BUNDLE_KEY_ID, list);
int DELETECODE = 0;
context.startActivityForResult(intent, DELETECODE);
private void dumpPic(ArrayList<String> list, int position) {
if (mimeType == PictureMimeType.ofVideo()){
Intent intent = new Intent(context, VideoPreviewActivty.class);
intent.putStringArrayListExtra(Constants.BUNDLE_KEY_ID, list);
context.startActivity(intent);
}else {
ImgGalleryActivty.launch(context,list.get(position));
}
}
public interface AdapterListener {
void onFirstAddClick();
}
}
......@@ -35,6 +35,7 @@ public class PhotoViewAdapter extends RecyclerView.Adapter<PhotoViewAdapter.Hold
private Activity context;
private ArrayList<String> list;
private OnItemClickListener<PhotoViewAdapter.Holder, Integer> listener;
private boolean addEmpty; //空白添加图片
private boolean canDelete = true; //是否可以删除
......@@ -47,6 +48,12 @@ public class PhotoViewAdapter extends RecyclerView.Adapter<PhotoViewAdapter.Hold
this.context = context;
this.list = list;
}
public PhotoViewAdapter(ArrayList<String> list, Activity context,boolean addEmpty) {
mIvSize = (UtilsScreen.getScreenWidth(context) - UtilsScreen.dip2px(context, 20)) / 5;
this.context = context;
this.list = list;
this.addEmpty = addEmpty;
}
public void setData(ArrayList<String> list) {
this.list = list;
......@@ -65,7 +72,11 @@ public class PhotoViewAdapter extends RecyclerView.Adapter<PhotoViewAdapter.Hold
@Override
public void onBindViewHolder(@NonNull Holder holder, int position) {
if (list.get(position).equals("add")) {
holder.picture.setImageResource(R.drawable.icon_submit_photo);
if (addEmpty){
holder.picture.setImageResource(R.drawable.ic_add_img);
}else {
holder.picture.setImageResource(R.drawable.icon_submit_photo);
}
holder.delete.setVisibility(View.GONE);
holder.picture.setOnClickListener(v -> showPicDialog());
} else {
......
......@@ -42,18 +42,18 @@ public class Constants {
/**
* dev环境配置.
*/
// public static String ENVIROMENT = "debug";
// public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static String BASE_URL = "http://47.94.101.239:3112";
// public static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
// public static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
// public static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
// public static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
// public static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
// public static final String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
// public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=dev/video";
// public static final boolean IS_DEBUG = true;
// public static String VIDEO_SHARE_URL = "http://uat.kf.ai:9099/#/shareVideo?type=_type&id="; //uat 学习视频分享链接 type(课程: course 直播: live)
public static String ENVIROMENT = "debug";
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
public static String BASE_URL = "http://47.94.101.239:3112";
public static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
public static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
public static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
public static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
public static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
public static final String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=dev/video";
public static final boolean IS_DEBUG = true;
public static String VIDEO_SHARE_URL = "http://uat.kf.ai:9099/#/shareVideo?type=_type&id="; //uat 学习视频分享链接 type(课程: course 直播: live)
/**
......@@ -77,18 +77,18 @@ public class Constants {
/**
* 正式环境.
*/
public static String ENVIROMENT = "release";
public static int LOG_LEVEL = LogUtils.LEVEL_OFF;
public static String BASE_URL = "https://mobile.kf.ai";
public static String WEB_SOP = "https://sop.kf.ai/#/sop";
public static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
public static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
public static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
public static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
public static final String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=online/video";
public static final boolean IS_DEBUG = false;
public static String VIDEO_SHARE_URL = "http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="; //学习视频分享链接 type(课程: course 直播: live)
// public static String ENVIROMENT = "release";
// public static int LOG_LEVEL = LogUtils.LEVEL_OFF;
// public static String BASE_URL = "https://mobile.kf.ai";
// public static String WEB_SOP = "https://sop.kf.ai/#/sop";
// public static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
// public static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
// public static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
// public static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
// public static final String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
// public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=online/video";
// public static final boolean IS_DEBUG = false;
// public static String VIDEO_SHARE_URL = "http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="; //学习视频分享链接 type(课程: course 直播: live)
/**
......@@ -201,6 +201,8 @@ public class Constants {
public final static String DETAIL = "detail";
public final static String UMENG_DEVICE_TOKEN = "umeng_device_token";
public final static String ORDER_POSTION = "order_position";
public final static String SOP_RID = "sop_rid";
public final static String IS_SOP_VIDEO = "is_sop_video";
//是否显示去设置alipay账户de对话框
public final static String IS_SHOW_ALIPAY_DILAOG = "is_show_alipay_dialog";
//上个版本号
......@@ -258,7 +260,7 @@ public class Constants {
public static final int CAMERA_CODE = 100;
public static final int CAMERA_IMG = 101;
public static final int CAMERA_VIDEO = 102;
public static final int MINIMUM_COMPRESSSIZE = 4*1024; //图片压缩大小临界值
public static final int MINIMUM_COMPRESSSIZE = 10*1024; //图片压缩大小临界值
public static final HashMap<Integer,List<TreeAddressBean>> treeAddressMap = new HashMap<>(); //地址数据
/**
......
......@@ -36,6 +36,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.regex.Pattern;
import cn.jzvd.JzvdStd;
......@@ -109,6 +110,26 @@ public class CommonUtils {
}
/**
* 是否是网络链接
*/
public static boolean isNetUrl(String str) {
return str.contains("http");
}
/**
* 是否是视频
* @param name
* @return
*/
public static boolean isVideo(String name){
// String reg = "(mp4|flv|avi|rm|rmvb|wmv)";
String reg = "(mp4|flv|avi|rmvb)";
Pattern p = Pattern.compile(reg);
return p.matcher(name).find();
}
/**
* 计算并设置时间
*/
public static String getTimeDesc(Context context, String time) {
......@@ -225,6 +246,25 @@ public class CommonUtils {
}
/**
* 网络链接string转list并且过滤掉空字符串
*
* @param str
* @return
*/
public static List<String> string2ListUrl(String str) {
List<String> list = new ArrayList<>();
if (!TextUtils.isEmpty(str) && str.contains("http")) {
String[] strArr = str.split(",");
for (int i = 0; i < strArr.length; i++) {
if (!TextUtils.isEmpty(strArr[i])) {
list.add(strArr[i]);
}
}
}
return list;
}
/**
* 获取订单状态描述
*
* @return
......
......@@ -38,7 +38,7 @@ public class GlideImageLoader {
public static void load(Context context, String imageRes, ImageView view) {
RequestOptions options = new RequestOptions()
.centerCrop()
.placeholder(R.drawable.camera)
.placeholder(R.drawable.icon_video_default)
.diskCacheStrategy(DiskCacheStrategy.ALL);
Glide.with(context)
.load(imageRes)
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.cjt2325.cameralibrary.JCameraView
android:id="@+id/jcameraview"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:duration_max="31000"
app:iconLeft="@drawable/ic_back"
app:iconMargin="20dp"
app:iconRight="@null"
app:iconSize="30dp"
app:iconSrc="@drawable/ic_camera" />
</LinearLayout>
......@@ -8,6 +8,7 @@
<ImageView
android:id="@+id/iv_picture"
android:scaleType="centerCrop"
android:layout_width="match_parent"
android:layout_height="match_parent" />
......
......@@ -968,9 +968,12 @@ C) 在甲方使用大鱼平å°æœåŠ¡è¿‡ç¨‹ä¸­äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string name="business_choose_scene">请选择自己可开展销售的业务场景:</string>
<string name="business_choose_type">请选择自己能提供服务的产品类型:</string>
<string name="pls_set_business_choose_type">请设置自己能提供服务的产品类型</string>
<string name="licence_haved">已获认证资质</string>
<string name="licence_all">全部认证资质</string>
<string name="licence_self">师傅自传</string>
<!--<string name="licence_haved">已获认证资质</string>-->
<string name="licence_haved">已获认证</string>
<!--<string name="licence_all">全部认证资质</string>-->
<string name="licence_all">申请认证</string>
<!--<string name="licence_self">师傅自传</string>-->
<string name="licence_self">上传资质</string>
<string name="licence_apply_str">申请</string>
<string name="week_str"></string>
<string name="month_str"></string>
......@@ -1022,6 +1025,7 @@ C) 在甲方使用大鱼平å°æœåŠ¡è¿‡ç¨‹ä¸­äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string name="confirm_pub">确认发布</string>
<string name="limit_10_words">限10个字</string>
<string name="limit_100_words">限100字</string>
<string name="limit_100_words_remark">输入备注信息(限100字)</string>
<string name="course_detail">课程详情</string>
<string name="course_puber">发布方:</string>
<string name="moment_take_photo">轻触拍照, 按住摄像</string>
......
......@@ -5,7 +5,7 @@
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/cl_white</item>
<item name="colorPrimaryDark">@color/cl_line</item>
<item name="colorAccent">@color/cl_accent</item>
<item name="colorAccent">@color/text_common_blue</item>
<!--<item name="android:statusBarColor" tools:targetApi="lollipop">@color/bar_grey</item>-->
</style>
......
......@@ -33,8 +33,6 @@ import com.cjt2325.cameralibrary.util.LogUtil;
import com.cjt2325.cameralibrary.util.ScreenUtils;
import com.cjt2325.cameralibrary.view.CameraView;
import java.io.IOException;
/**
* =====================================
......@@ -141,9 +139,17 @@ public class JCameraView extends FrameLayout implements CameraInterface.CameraOp
initView();
}
public void setDuration(int duration) {
this.duration = duration;
if (mCaptureLayout != null)
mCaptureLayout.setDuration(duration);
}
private void initData() {
layout_width = ScreenUtils.getScreenWidth(mContext);
layout_Height= ScreenUtils.getScreenHeight(mContext);
layout_Height = ScreenUtils.getScreenHeight(mContext);
//缩放梯度
zoomGradient = (int) (layout_width / 16f);
LogUtil.i("zoom = " + zoomGradient);
......
......@@ -26,6 +26,7 @@ import com.dayu.order.api.protocol.Tab;
import com.dayu.order.api.protocol.TranCompanyBean;
import com.dayu.order.api.protocol.bean.ServiceProviderBean;
import com.dayu.order.api.protocol.bean.ServiceStationBean;
import com.dayu.order.api.protocol.bean.SopListBean;
import com.dayu.order.api.protocol.companyManager;
import com.dayu.order.api.protocol.data.AddDialRecordData;
import com.dayu.order.api.protocol.data.ReceivePartData;
......@@ -442,6 +443,18 @@ public interface OrderService {
Observable<BaseResponse<List<SopResult>>> getSopItemResult(@Path("itemId") int itemId);
/**
* 工单sop列表项
*/
@GET(Constants.API_7200+"/ordersRelationSpuItemSop")
Observable<BaseResponse<BasePageBean<SopListBean>>> getSopList(@Query("ordersRelationSpuItemId") int ordersRelationSpuItemId);
/**
* 工单sop列表项
*/
@PUT(Constants.API_7200+"/ordersRelationSpuItemSop")
Observable<BaseResponse<Boolean>> modifySop(@Body SopListBean data);
/**
* 待接单
*/
@GET(Constants.API_7500+"/ordersStatistics/satisfiedOrders")
......
......@@ -31,6 +31,8 @@ public class Spu implements Serializable, Parcelable {
private int status;//1未完成2已完成
private String brandName;
private String sn;
private int ordersRelationSpuId;
/**
* 处理工单获取信息使用.
*/
......@@ -40,6 +42,14 @@ public class Spu implements Serializable, Parcelable {
private Integer needSerialNumPic;//1需要;2不需要.
private String serialNumPicUrl;
public int getOrdersRelationSpuId() {
return ordersRelationSpuId;
}
public void setOrdersRelationSpuId(int ordersRelationSpuId) {
this.ordersRelationSpuId = ordersRelationSpuId;
}
public List<SpuModels> getSpuModels() {
return spuModels;
}
......@@ -301,6 +311,7 @@ public class Spu implements Serializable, Parcelable {
dest.writeList(this.listPic);
dest.writeValue(this.needSerialNumPic);
dest.writeString(this.serialNumPicUrl);
dest.writeInt(this.ordersRelationSpuId);
}
public Spu() {
......@@ -330,6 +341,7 @@ public class Spu implements Serializable, Parcelable {
in.readList(this.listPic, Pic.class.getClassLoader());
this.needSerialNumPic = (Integer) in.readValue(Integer.class.getClassLoader());
this.serialNumPicUrl = in.readString();
this.ordersRelationSpuId = in.readInt();
}
public static final Creator<Spu> CREATOR = new Creator<Spu>() {
......
package com.dayu.order.api.protocol.bean;
public class SopListBean {
/**
* answerStatus : 0
* description : string
* example : string
* id : 0
* ordersRelationSpuItemId : 0
* photoOption : 0
* photoResult : string
* radioOption : 0
* radioResult : 0
* sortNum : 0
* spuSopId : 0
* status : 0
* textOption : 0
* textResult : string
* type : 0
* typeResult : string
* videoResult : string
*/
private int answerStatus;
private String description;
private String example;
private int id;
private int ordersRelationSpuItemId;
private int photoOption;
private String photoResult;
private int radioOption;
private int radioResult;
private int sortNum;
private int spuSopId;
private int status;
private int textOption;
private String textResult;
private int type;
private String typeResult;
private String videoResult;
public int getAnswerStatus() {
return answerStatus;
}
public void setAnswerStatus(int answerStatus) {
this.answerStatus = answerStatus;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getExample() {
return example;
}
public void setExample(String example) {
this.example = example;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getOrdersRelationSpuItemId() {
return ordersRelationSpuItemId;
}
public void setOrdersRelationSpuItemId(int ordersRelationSpuItemId) {
this.ordersRelationSpuItemId = ordersRelationSpuItemId;
}
public int getPhotoOption() {
return photoOption;
}
public void setPhotoOption(int photoOption) {
this.photoOption = photoOption;
}
public String getPhotoResult() {
return photoResult;
}
public void setPhotoResult(String photoResult) {
this.photoResult = photoResult;
}
public int getRadioOption() {
return radioOption;
}
public void setRadioOption(int radioOption) {
this.radioOption = radioOption;
}
public int getRadioResult() {
return radioResult;
}
public void setRadioResult(int radioResult) {
this.radioResult = radioResult;
}
public int getSortNum() {
return sortNum;
}
public void setSortNum(int sortNum) {
this.sortNum = sortNum;
}
public int getSpuSopId() {
return spuSopId;
}
public void setSpuSopId(int spuSopId) {
this.spuSopId = spuSopId;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public int getTextOption() {
return textOption;
}
public void setTextOption(int textOption) {
this.textOption = textOption;
}
public String getTextResult() {
return textResult;
}
public void setTextResult(String textResult) {
this.textResult = textResult;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getTypeResult() {
return typeResult;
}
public void setTypeResult(String typeResult) {
this.typeResult = typeResult;
}
public String getVideoResult() {
return videoResult;
}
public void setVideoResult(String videoResult) {
this.videoResult = videoResult;
}
}
package com.dayu.order.common;
//取消sop设置
public class FinishSopEvent {
}
package com.dayu.order.common;
import com.dayu.order.api.protocol.bean.SopListBean;
import java.util.List;
/**
* Created by luofan
* on 2018/2/8.
......@@ -199,4 +203,5 @@ public class OrderConstant {
*/
public static final String COMMENT_URL = "/api-message/" +"leaveMessage";
public static List<SopListBean> sopListData;
}
......@@ -220,6 +220,7 @@ public class MultiProcessOrderPresenter extends MultiProcessOrderContract.Presen
bundle.putSerializable(OrderConstant.SPU, mSpu);
bundle.putParcelableArrayList(OrderConstant.SPUS, mSpus);
bundle.putInt(Constants.STATE, mState);
bundle.putInt(Constants.SOP_RID, mSpu.getOrdersRelationSpuId());
mView.startActivityAndFinish(SopWebViewActivity.class, bundle);
MobclickAgent.onEvent(BaseApplication.getContext(), "modify_sop");
}
......
......@@ -175,6 +175,7 @@ public class OrderDoingPresenter extends orderDoingContract.Presenter {
bundle.putParcelableArrayList(OrderConstant.SPUS, mUnFinishSpus);
bundle.putInt(Constants.ORDER_POSTION, 0);
bundle.putInt(OrderConstant.KAADDRESSID, kaId);
bundle.putInt(Constants.SOP_RID, spu.getOrdersRelationSpuId());
if (spu.getSopStatus() == 1 && spu.getStatus() == 1) {
mView.startActivity(SopWebViewActivity.class, bundle);
} else {
......
......@@ -153,6 +153,7 @@ public class OrderLivenessPresenter extends OrderLivenessContract.Presenter {
bundle.putParcelableArrayList(OrderConstant.SPUS, mUnFinishSpus);
bundle.putInt(Constants.ORDER_POSTION, 0);
bundle.putInt(OrderConstant.KAADDRESSID, kaId);
bundle.putInt(Constants.SOP_RID, spu.getOrdersRelationSpuId());
if (spu.getSopStatus() == 1 && spu.getStatus() == 1) {
mView.startActivity(SopWebViewActivity.class, bundle);
} else {
......
......@@ -4,7 +4,6 @@ import android.databinding.ObservableField;
import android.os.Bundle;
import android.text.TextUtils;
import com.dayu.base.ui.activity.ImgGalleryActivty;
import com.dayu.common.Constants;
import com.dayu.location.base.BaseMapActivity;
import com.dayu.order.R;
......@@ -65,6 +64,7 @@ public class OrderServerPresenter extends OrderServerContract.Presenter {
}
bundle.putInt(OrderConstant.CREATEDSOURCE, mDetails.getCreatedSource());
bundle.putInt(ORDER_STATE, ORDER_SOP_FINISH);
bundle.putInt(Constants.SOP_RID, 0);
mView.startActivity(SopWebViewActivity.class, bundle);
}
......
......@@ -328,6 +328,7 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
Bundle bundle = new Bundle();
bundle.putInt(Constants.ORDER_ID, mOrderId);
bundle.putInt(Constants.ORDER_POSTION, mPosition);
bundle.putInt(Constants.SOP_RID, 0);
mView.startActivity(SopWebViewActivity.class, bundle);
MobclickAgent.onEvent(BaseApplication.getContext(), "modify_sop");
}
......
......@@ -87,6 +87,7 @@ public class ServerInfoPresenter extends ServerInfoContract.Presenter {
bundle.putParcelableArrayList(OrderConstant.SPUS, mUnFinishSpus);
bundle.putInt(Constants.ORDER_POSTION, 0);
bundle.putInt(OrderConstant.KAADDRESSID, mKaId);
bundle.putInt(Constants.SOP_RID, spu.getOrdersRelationSpuId());
if (spu.getSopStatus() == 1 && spu.getStatus() == 1) {
mView.startActivity(SopWebViewActivity.class, bundle);
} else {
......
......@@ -64,6 +64,8 @@ public class ServerListActivity extends BaseActivity<ServerListPresenter, Activi
bundle.putParcelableArrayList(OrderConstant.SPUS, mUnFinishSpus);
bundle.putInt(Constants.ORDER_POSTION, 0);
intent.putExtra(Constants.BUNDLE, bundle);
bundle.putInt(Constants.SOP_RID, item.getOrdersRelationSpuId());
startActivity(intent);
});
}
......
......@@ -32,7 +32,6 @@ 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;
......@@ -50,7 +49,7 @@ import static com.dayu.order.common.OrderConstant.ORDER_SOP_FINISH;
* on 2017/11/27.
*/
public class SopWebViewActivity extends BaseActivity<SopPresenter,ActivitySopWebviewBinding> implements SopContract.View{
public class SopWebViewActivity extends BaseActivity<SopPresenter, ActivitySopWebviewBinding> implements SopContract.View {
private String mToken;
private int mOrderId;
private int mPositon;
......@@ -64,13 +63,17 @@ public class SopWebViewActivity extends BaseActivity<SopPresenter,ActivitySopWeb
private ArrayList<Spu> mSpus;
private int mCreatedSource;
private int mSpuState;
private int sopRid;
@Override
public void onCreate(Bundle savedInstanceState) {
Bundle bundle = getIntent().getBundleExtra(Constants.BUNDLE);
mOrderId = bundle.getInt(Constants.ORDER_ID, 0);
// SopLocalActivity.launch(this,mOrderId);
// finish();
// mOrderId = bundle.getInt(Constants.ORDER_ID, 0);
sopRid = bundle.getInt(Constants.SOP_RID, 0);
if (sopRid > 0) {
SopLocalActivity.launch(this, sopRid,bundle);
finish();
}
super.onCreate(savedInstanceState);
}
......@@ -81,8 +84,11 @@ public class SopWebViewActivity extends BaseActivity<SopPresenter,ActivitySopWeb
@Override
public void initView() {
initData();
initWebView();
if (sopRid <= 0) {
initData();
initWebView();
}
}
private void initData() {
......@@ -358,7 +364,9 @@ public class SopWebViewActivity extends BaseActivity<SopPresenter,ActivitySopWeb
@Override
protected void onDestroy() {
super.onDestroy();
clearCach();
if (sopRid <= 0) {
clearCach();
}
}
public void clearCach() {
......
......@@ -496,6 +496,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
Bundle bundle = new Bundle();
bundle.putInt(Constants.ORDER_ID, id);
bundle.putInt(Constants.ORDER_POSTION, adapterPosition);
bundle.putInt(Constants.SOP_RID, 0);
intent.putExtra(Constants.BUNDLE, bundle);
mContext.startActivity(intent);
MobclickAgent.onEvent(mContext, "process_sop");
......
......@@ -91,6 +91,7 @@
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.SopLocalActivity"
android:windowSoftInputMode="stateHidden|adjustPan"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.ApplyAndRefuseActivity"
......
......@@ -5,6 +5,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<RelativeLayout
......@@ -31,18 +32,163 @@
android:visibility="gone" />
</RelativeLayout>
<ImageView style="@style/card_line" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_sop"
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:overScrollMode="never" />
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_ee"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/tv_sort"
style="@style/common_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"
android:textSize="16sp" />
<TextView
android:id="@+id/tv_desc"
style="@style/common_text_style"
android:layout_marginTop="5dp"
android:text="123"
android:textSize="16sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_radio"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
style="@style/common_text_style"
android:layout_marginLeft="5dp"
android:text="选项:" />
<RadioGroup
android:id="@+id/rg_sop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_yes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="是"
android:textSize="13sp" />
<RadioButton
android:id="@+id/rb_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:padding="10dp"
android:text="否"
android:textSize="13sp" />
</RadioGroup>
</LinearLayout>
<TextView
android:id="@+id/tv_remark"
style="@style/common_text_style"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:text="备注:" />
<EditText
android:id="@+id/edt_remark"
style="@style/learn_course_edit"
android:layout_height="100dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:hint="@string/limit_100_words_remark"
android:maxLength="100"
android:padding="5dp" />
<LinearLayout
android:id="@+id/ll_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="20dp"
android:orientation="horizontal">
<TextView
style="@style/common_text_style"
android:text="拍照:" />
<TextView
style="@style/common_text_style"
android:layout_marginLeft="10dp"
android:text="(限3张照片或1个视频)"
android:textColor="@color/color_69" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/photo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp" />
<TextView
android:visibility="gone"
android:id="@+id/tv_example"
style="@style/common_text_style"
android:layout_marginLeft="15dp"
android:layout_marginTop="20dp"
android:text="示例:" />
<RelativeLayout
android:visibility="gone"
android:id="@+id/rl_example"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="5dp">
<cn.jzvd.JzvdStd
android:id="@+id/jz_video"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<ImageView
android:id="@+id/iv_example"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/icon_video_default"
/>
</RelativeLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:layout_marginBottom="20dp"
......@@ -51,24 +197,22 @@
<Button
android:id="@+id/btn_cancel"
android:layout_width="0dp"
android:layout_height="35dp"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_weight="1"
android:background="@drawable/tab_gray_react"
android:onClick="onClick"
android:background="@drawable/btn_blue_whitecontent"
android:text="@string/cancle"
android:textColor="#8b8b8b" />
android:textColor="@color/text_common_blue" />
<Button
android:id="@+id/btn_submit"
android:id="@+id/btn_next"
android:layout_width="0dp"
android:layout_height="35dp"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_weight="1"
android:background="@drawable/tab_blue_react"
android:onClick="onClick"
android:text="@string/save_str"
android:text="@string/next_step"
android:textColor="@color/white" />
</LinearLayout>
......
......@@ -42,8 +42,8 @@ public class UserLicenceActivity extends BaseActivity<SImplePresenter, ActivityU
mBind.ivAdd.setOnClickListener(v->startActivity(UploadSelfLicenceActivity.class));
mFragments.add(UserLicenceFragment.newInstance(1));
mFragments.add(UserLicenceFragment.newInstance(2));
mFragments.add(UserLicenceFragment.newInstance(1));
mFragments.add(new SelfLicenceFragment());
initBtn();
......@@ -52,19 +52,19 @@ public class UserLicenceActivity extends BaseActivity<SImplePresenter, ActivityU
//初始化tab
public void initBtn() {
mBind.btnHave.setSelected(true);
mBind.btnHave.setTextColor(getResources().getColor(R.color.white));
mBind.btnAll.setSelected(true);
mBind.btnAll.setTextColor(getResources().getColor(R.color.white));
mBind.btnHave.setOnClickListener((view) -> {
reSelected();
mBind.btnHave.setSelected(true);
mBind.btnHave.setTextColor(getResources().getColor(R.color.white));
showHideFragment(0, mPosition);
showHideFragment(1, mPosition);
});
mBind.btnAll.setOnClickListener((view) -> {
reSelected();
mBind.btnAll.setSelected(true);
mBind.btnAll.setTextColor(getResources().getColor(R.color.white));
showHideFragment(1, mPosition);
showHideFragment(0, mPosition);
});
mBind.btnSelf.setOnClickListener((view) -> {
reSelected();
......
......@@ -42,22 +42,22 @@
android:gravity="center">
<Button
android:id="@+id/btn_have"
android:id="@+id/btn_all"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="35dp"
android:layout_weight="1"
android:background="@drawable/detail_center_selector"
android:gravity="center"
android:text="@string/licence_haved" />
android:text="@string/licence_all" />
<Button
android:id="@+id/btn_all"
android:id="@+id/btn_have"
android:layout_width="0dp"
android:layout_height="35dp"
android:layout_weight="1"
android:layout_height="35dp"
android:background="@drawable/detail_center_selector"
android:gravity="center"
android:text="@string/licence_all" />
android:text="@string/licence_haved" />
<Button
android:id="@+id/btn_self"
android:layout_width="0dp"
......
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