平板日常工作
This commit is contained in:
parent
eb9a12657b
commit
a032069deb
@ -230,4 +230,9 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_NOTICE_LIST = "/oamodule/fragment/noticeList";//通知公告
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_NOTICE_DETAIL = "/oamodule/fragment/noticeDetail";//通知公告详情
|
||||
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK = "/oamodule/fragment/routineWork";//日常工作
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_ADD = "/oamodule/fragment/routineWorkAdd";//发起日常工作
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_DETAIL = "/oamodule/fragment/routineWorkDetail";//日常工作详情
|
||||
public static final String PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_TRANSACT = "/oamodule/fragment/routineWorkTransact";//完成日常工作
|
||||
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ import com.hjq.toast.ToastUtils;
|
||||
import com.jcodecraeer.xrecyclerview.progressindicator.AVLoadingIndicatorView;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tenlionsoft.baselib.R;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
@ -103,9 +104,10 @@ public abstract class BaseFragment extends Fragment {
|
||||
|
||||
protected abstract void loadMoreData();
|
||||
|
||||
protected void checkHasManage(){
|
||||
protected void checkHasManage() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
@ -157,10 +159,6 @@ protected void checkHasManage(){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUserVisibleHint(boolean isVisibleToUser) {
|
||||
super.setUserVisibleHint(isVisibleToUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择加载状态
|
||||
@ -223,6 +221,10 @@ protected void checkHasManage(){
|
||||
return context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUserVisibleHint(boolean isVisibleToUser) {
|
||||
super.setUserVisibleHint(isVisibleToUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新视图
|
||||
|
@ -1,8 +1,12 @@
|
||||
package com.tenlionsoft.baselib.core.widget.base;
|
||||
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 生成fragment的工具类
|
||||
*/
|
||||
@ -47,4 +51,22 @@ public class FragmentUtils {
|
||||
.navigation();
|
||||
return fragment;
|
||||
}
|
||||
|
||||
public static BaseFragment getFragmentMap(String path, Map<String, Object> params) {
|
||||
Postcard build = ARouter.getInstance()
|
||||
.build(path);
|
||||
for (Map.Entry<String, Object> entry : params.entrySet()) {
|
||||
Object value = entry.getValue();
|
||||
if (value instanceof String) {
|
||||
build.withString(entry.getKey(), (String) value);
|
||||
} else if (value instanceof Integer) {
|
||||
build.withInt(entry.getKey(), (Integer) value);
|
||||
} else if (value instanceof Boolean) {
|
||||
build.withBoolean(entry.getKey(), (Boolean) value);
|
||||
} else if (value instanceof Serializable) {
|
||||
build.withSerializable(entry.getKey(), (Serializable) value);
|
||||
}
|
||||
}
|
||||
return (BaseFragment) build.navigation();
|
||||
}
|
||||
}
|
||||
|
@ -605,7 +605,7 @@
|
||||
<item name="android:backgroundDimEnabled">false</item>
|
||||
</style>
|
||||
|
||||
<style name="scstyle" parent="Theme.AppCompat.Light">
|
||||
<style name="scstyle" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorControlActivated">#00000000</item>
|
||||
<item name="colorSwitchThumbNormal">#00000000</item>
|
||||
<item name="android:colorForeground">#00000000</item>
|
||||
|
@ -3,7 +3,7 @@
|
||||
package="com.tenlionsoft.oamodule">
|
||||
|
||||
<application>
|
||||
<activity android:name=".pad.activitys.home.PadMainActivity"></activity>
|
||||
<activity android:name=".pad.activitys.home.PadMainActivity"/>
|
||||
<activity
|
||||
android:name=".activity.schedule.ScheduleSearchActivity"
|
||||
android:launchMode="singleTop"
|
||||
|
@ -207,11 +207,15 @@ public class ByCarAddActivity extends BaseActivity {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
int i = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (i >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int i = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (i >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
|
@ -266,11 +266,15 @@ public class ByCarEditActivity extends BaseActivity {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
int i = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (i >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int i = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (i >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
|
@ -235,11 +235,15 @@ public class MeetingApplyActivity extends BaseActivity {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartTime.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -152,14 +152,19 @@ public class NoticeListActivity extends BaseActivity {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
refreshPageState(STATE_LOAD_LOADING);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
refreshPageState(STATE_LOAD_LOADING);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
@ -182,13 +182,17 @@ public class ApplyRoutineWorkActivity extends BaseActivity {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartTime.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
long timeSpan = TimeUtils.getTimeSpan(TimeUtils.dateToString2(date), start, TimeConstants.DAY);
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
mEtTl.setText(timeSpan + "");
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
long timeSpan = TimeUtils.getTimeSpan(TimeUtils.dateToString2(date), start, TimeConstants.DAY);
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
mEtTl.setText(timeSpan + "");
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -364,14 +364,18 @@ public class RoutineWorkActivity extends BaseActivity {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
refreshPageState(STATE_LOAD_LOADING);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
refreshPageState(STATE_LOAD_LOADING);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
@ -188,12 +188,16 @@ public class ScheduleAddActivity extends BaseActivity {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartTime.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
@ -206,12 +206,16 @@ public class ScheduleEditActivity extends BaseActivity {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartTime.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
@ -218,14 +218,18 @@ public class SuperviseActivity extends BaseActivity {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
refreshPageState(STATE_LOAD_LOADING);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
refreshPageState(STATE_LOAD_LOADING);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
@ -104,8 +104,9 @@ public class PadMainActivity extends BaseActivity {
|
||||
private List<BaseFragment> mEmailFragments;
|
||||
private List<BaseFragment> mMineFragments;
|
||||
private HashMap<Integer, List<BaseFragment>> mFragments = new HashMap<>();
|
||||
private int mCurrentItem = 1; //记录上一个fragment
|
||||
private BaseFragment mCurrentFragment;
|
||||
private int mCurrentItem = 1; //当天条目
|
||||
private int mPreItem = 1;//上一个条目
|
||||
private BaseFragment mPreFragment;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -205,10 +206,7 @@ public class PadMainActivity extends BaseActivity {
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (isNavBarHasShown(this)) {
|
||||
LogUtils.e("开启的");
|
||||
checkNavigation();
|
||||
} else {
|
||||
LogUtils.e("关闭的");
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,6 +222,7 @@ public class PadMainActivity extends BaseActivity {
|
||||
|
||||
|
||||
private void chooseItem(int i) {
|
||||
mCurrentItem = i;
|
||||
switch (i) {
|
||||
case 1://首页
|
||||
chooseHome();
|
||||
@ -239,7 +238,7 @@ public class PadMainActivity extends BaseActivity {
|
||||
break;
|
||||
}
|
||||
setStatusBarStyle();
|
||||
mCurrentItem = i;
|
||||
|
||||
}
|
||||
|
||||
private void chooseHome() {
|
||||
@ -254,8 +253,8 @@ public class PadMainActivity extends BaseActivity {
|
||||
|
||||
mIvMine.setBackgroundResource(R.drawable.ic_mine_normal);
|
||||
mTvMine.setTextColor(getResources().getColor(R.color.gray_text));
|
||||
|
||||
switchFragment(mHomeFragments.get(mHomeFragments.size() - 1), "home");
|
||||
List<BaseFragment> baseFragments = mFragments.get(1);
|
||||
switchFragment(baseFragments.get(baseFragments.size() - 1), "");
|
||||
|
||||
}
|
||||
|
||||
@ -271,7 +270,8 @@ public class PadMainActivity extends BaseActivity {
|
||||
|
||||
mIvMine.setBackgroundResource(R.drawable.ic_mine_normal);
|
||||
mTvMine.setTextColor(getResources().getColor(R.color.gray_text));
|
||||
switchFragment(mDocFragments.get(mDocFragments.size() - 1), "doc");
|
||||
List<BaseFragment> baseFragments = mFragments.get(2);
|
||||
switchFragment(baseFragments.get(baseFragments.size() - 1), "");
|
||||
|
||||
}
|
||||
|
||||
@ -297,7 +297,8 @@ public class PadMainActivity extends BaseActivity {
|
||||
|
||||
mIvMine.setBackgroundResource(R.drawable.ic_mine_normal);
|
||||
mTvMine.setTextColor(getResources().getColor(R.color.gray_text));
|
||||
switchFragment(mEmailFragments.get(mEmailFragments.size() - 1), "email");
|
||||
List<BaseFragment> baseFragments = mFragments.get(3);
|
||||
switchFragment(baseFragments.get(baseFragments.size() - 1), "email");
|
||||
}
|
||||
|
||||
private void chooseMine() {
|
||||
@ -312,7 +313,8 @@ public class PadMainActivity extends BaseActivity {
|
||||
|
||||
mIvMine.setBackgroundResource(R.drawable.ic_mine_sel);
|
||||
mTvMine.setTextColor(getResources().getColor(R.color.col_main_theme));
|
||||
switchFragment(mMineFragments.get(mMineFragments.size() - 1), "mine");
|
||||
List<BaseFragment> baseFragments = mFragments.get(4);
|
||||
switchFragment(baseFragments.get(baseFragments.size() - 1), "mine");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -320,9 +322,11 @@ public class PadMainActivity extends BaseActivity {
|
||||
*/
|
||||
private void switchFragment(BaseFragment fragment, String tag) {
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
if (mCurrentFragment != null) {
|
||||
fragmentTransaction.hide(mCurrentFragment)
|
||||
//隐藏上一个fragment
|
||||
if (mPreFragment != null) {
|
||||
fragmentTransaction.hide(mPreFragment)
|
||||
.setCustomAnimations(R.anim.anim_fade_in, R.anim.anim_fade_out);
|
||||
LogUtils.e("上一个fragment=========" + mPreFragment);
|
||||
}
|
||||
if (fragment.isAdded()) {
|
||||
fragmentTransaction.show(fragment)
|
||||
@ -330,11 +334,10 @@ public class PadMainActivity extends BaseActivity {
|
||||
.commit();
|
||||
} else {
|
||||
fragmentTransaction.add(R.id.fl_content, fragment, tag)
|
||||
.show(fragment)
|
||||
.setCustomAnimations(R.anim.anim_fade_in, R.anim.anim_fade_out)
|
||||
.commit();
|
||||
}
|
||||
mCurrentFragment = fragment;
|
||||
mPreFragment = fragment;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -404,8 +407,12 @@ public class PadMainActivity extends BaseActivity {
|
||||
* fragment中打开fragment
|
||||
*/
|
||||
public void addFragment(int source, BaseFragment fragment) {
|
||||
mFragments.get(source).add(fragment);
|
||||
switchFragment(fragment, "");
|
||||
if (fragment != null) {
|
||||
mFragments.get(source).add(fragment);
|
||||
switchFragment(fragment, "");
|
||||
} else {
|
||||
ToastUtils.show("未找到页面");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -415,13 +422,15 @@ public class PadMainActivity extends BaseActivity {
|
||||
* @param fragment
|
||||
*/
|
||||
public void backFragment(int source, BaseFragment fragment) {
|
||||
if (source == 1) {
|
||||
if (fragment != null) {
|
||||
List<BaseFragment> list = mFragments.get(mCurrentItem);
|
||||
list.remove(fragment);
|
||||
BaseFragment showFragment = list.get(list.size() - 1);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.remove(fragment)
|
||||
.show(list.get(list.size() - 1))
|
||||
.show(showFragment)
|
||||
.commit();
|
||||
mPreFragment = showFragment;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,12 +315,16 @@ public class MeetingAddFragment extends BaseFragment {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartTime.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
@ -169,14 +169,19 @@ public class NoticeListFragment extends BaseFragment {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
refreshPageState(STATE_LOAD_LOADING);
|
||||
doRefresh();
|
||||
if (!TextUtils.isEmpty(start)) {
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
refreshPageState(STATE_LOAD_LOADING);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
@ -0,0 +1,463 @@
|
||||
package com.tenlionsoft.oamodule.pad.fragments.home.routinework;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.leon.lfilepickerlibrary.LFilePicker;
|
||||
import com.leon.lfilepickerlibrary.utils.Constant;
|
||||
import com.tenlionsoft.baselib.constant.LionActions;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.constant.TimeConstants;
|
||||
import com.tenlionsoft.baselib.core.beans.AddFileBean;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.AddFileAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.activity.car.ChooseUserActivity;
|
||||
import com.tenlionsoft.oamodule.beans.ChoosePersonListBean;
|
||||
import com.tenlionsoft.oamodule.beans.SaveRoutineBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/5/10 - 08:59
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_ADD)
|
||||
public class RoutineWorkAddFragment extends BaseFragment {
|
||||
@BindView(R2.id.et_name)
|
||||
EditText mEtName;
|
||||
@BindView(R2.id.tv_start_time)
|
||||
TextView mTvStartTime;
|
||||
@BindView(R2.id.tv_end_time)
|
||||
TextView mTvEndTime;
|
||||
@BindView(R2.id.et_tl)
|
||||
EditText mEtTl;
|
||||
@BindView(R2.id.tv_undertake)
|
||||
TextView mTvUndertake;
|
||||
@BindView(R2.id.tv_assisted)
|
||||
TextView mTvAssisted;
|
||||
@BindView(R2.id.sw_schedule)
|
||||
SwitchCompat mSwSchedule;
|
||||
@BindView(R2.id.et_request)
|
||||
EditText mEtRequest;
|
||||
@BindView(R2.id.tv_request_num)
|
||||
TextView mTvRequestNum;
|
||||
@BindView(R2.id.et_remark)
|
||||
EditText mEtRemark;
|
||||
@BindView(R2.id.tv_remark_num)
|
||||
TextView mTvRemarkNum;
|
||||
@BindView(R2.id.rlv_files)
|
||||
RecyclerView mRlvFiles;
|
||||
@BindView(R2.id.btn_confirm)
|
||||
Button mBtnConfirm;
|
||||
@BindView(R2.id.ll_sw)
|
||||
LinearLayout mLlSw;
|
||||
private int isWriteSchedule = 0;
|
||||
private int mFileMax = 9;
|
||||
private List<AddFileBean> mFileBeans = new ArrayList<>();
|
||||
private AddFileAdapter mAddFileAdapter;
|
||||
private String[] fileFilter = new String[]{".doc", ".docx", ".xls", ".xlsx", ".pptx", ".ppt", ".txt", ".pdf"};
|
||||
private ChoosePersonListBean mSelUndertake;
|
||||
private String mIds;
|
||||
private PadMainActivity mMainActivity;
|
||||
private ActivityResultLauncher<Intent> mFileLauncher;
|
||||
private ActivityResultLauncher<Intent> mUndertakeLauncher;
|
||||
private ActivityResultLauncher<Intent> mAssistedLauncher;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
return R.layout.fragment_routine_work_add;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDataToView(View dataView) {
|
||||
ButterKnife.bind(this, dataView);
|
||||
setTitleView(true);
|
||||
mTvFragmentTitle.setText("发起工作");
|
||||
mIvFragmentBack.setOnClickListener(v -> mMainActivity.backFragment(1, this));
|
||||
setStateView(STATE_SUCCESS);
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
initViews();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@androidx.annotation.NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
mFileLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
//文件
|
||||
Intent data = result.getData();
|
||||
if (data != null) {
|
||||
ArrayList<String> paths = data.getStringArrayListExtra(Constant.RESULT_INFO);
|
||||
if (paths != null && paths.size() > 0) {
|
||||
doUploadFiles(paths);
|
||||
} else {
|
||||
ToastUtils.show("未选择文件");
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("路径有误,请稍后重试");
|
||||
}
|
||||
});
|
||||
//承办人
|
||||
mUndertakeLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
Intent data = result.getData();
|
||||
if (data != null) {
|
||||
mSelUndertake = (ChoosePersonListBean) data.getSerializableExtra("bean");
|
||||
mTvUndertake.setText(mSelUndertake.getUserName());
|
||||
}
|
||||
});
|
||||
|
||||
//协办人
|
||||
mAssistedLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
Intent data = result.getData();
|
||||
if (data != null) {
|
||||
mIds = data.getStringExtra("id");
|
||||
String name = data.getStringExtra("name");
|
||||
mTvAssisted.setText(name);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化页面
|
||||
*/
|
||||
private void initViews() {
|
||||
mTvStartTime.setOnClickListener(v -> onShowDate(1));
|
||||
mTvEndTime.setOnClickListener(v -> onShowDate(2));
|
||||
mLlSw.setOnClickListener(v -> mSwSchedule.setChecked(!mSwSchedule.isChecked()));
|
||||
|
||||
mTvUndertake.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mActivity, ChooseUserActivity.class);
|
||||
intent.putExtra("isSingle", true);
|
||||
mUndertakeLauncher.launch(intent);
|
||||
});//承办人
|
||||
|
||||
mTvAssisted.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mActivity, ChooseUserActivity.class);
|
||||
intent.putExtra("isSingle", false);
|
||||
mAssistedLauncher.launch(intent);
|
||||
});//协办人
|
||||
mSwSchedule.setOnCheckedChangeListener((buttonView, isChecked) -> isWriteSchedule = isChecked ? 1 : 0);
|
||||
mFileBeans.add(new AddFileBean());
|
||||
mAddFileAdapter = new AddFileAdapter(mActivity, mFileBeans);
|
||||
mAddFileAdapter.addOnItemClickListener(addFileBean -> {
|
||||
if (TextUtils.isEmpty(addFileBean.getId())) {
|
||||
checkManagePermission();
|
||||
} else {
|
||||
//TODO 预览
|
||||
}
|
||||
});
|
||||
//删除上传的文件
|
||||
mAddFileAdapter.addOnDeleteListener((bean, i) -> {
|
||||
//删除list中的某个数据
|
||||
mFileBeans.remove(i);
|
||||
mAddFileAdapter.notifyDataSetChanged();
|
||||
++mFileMax;
|
||||
});
|
||||
mRlvFiles.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvFiles.setAdapter(mAddFileAdapter);
|
||||
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void hasManageFileManage() {
|
||||
if (mFileMax == 0) {
|
||||
ToastUtils.show("超过最大上传数量限制");
|
||||
} else {
|
||||
new LFilePicker()
|
||||
.withFragment(this)
|
||||
.withFragmentLauncher(mFileLauncher)
|
||||
.withRequestCode(LionActions.REQUEST_CODE_AC)
|
||||
.withTitle("文件选择")
|
||||
.withMaxNum(mFileMax)
|
||||
.withFileFilter(fileFilter)
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间选择
|
||||
*/
|
||||
private void onShowDate(int i) {
|
||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
|
||||
switch (i) {
|
||||
case 1:
|
||||
mTvStartTime.setText(TimeUtils.date2String(date));
|
||||
break;
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartTime.getText().toString().trim();
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
long timeSpan = TimeUtils.getTimeSpan(TimeUtils.dateToString2(date), start, TimeConstants.DAY);
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
mEtTl.setText(timeSpan + "");
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
.setTitleText("请选时间")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.isDialog(false)
|
||||
.setType(new boolean[]{true, true, true, true, true, true})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTimePickerView.show();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param paths
|
||||
*/
|
||||
private int mUploadCount = 0;
|
||||
|
||||
private void doUploadFiles(ArrayList<String> paths) {
|
||||
LogUtils.e(paths);
|
||||
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "上传中...");
|
||||
progressDialog.show();
|
||||
List<Observable> requests = new ArrayList<>();
|
||||
List<String> fileNames = new ArrayList<>();
|
||||
for (int i = 0; i < paths.size(); i++) {
|
||||
File file = new File(paths.get(i));
|
||||
Observable observable = createObservable(file);
|
||||
fileNames.add(file.getName());
|
||||
if (observable == null) return;
|
||||
requests.add(observable);
|
||||
}
|
||||
Observable<BaseSuccessBean>[] observables1 = requests.toArray(new Observable[requests.size()]);
|
||||
|
||||
Observable.mergeArrayDelayError(observables1)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NotNull Object o) {
|
||||
++mUploadCount;
|
||||
if (o instanceof BaseSuccessBean) {
|
||||
--mFileMax;
|
||||
//刷新文件
|
||||
BaseSuccessBean bean = (BaseSuccessBean) o;
|
||||
AddFileBean fileBean = new AddFileBean();
|
||||
fileBean.setId(bean.getData());
|
||||
fileBean.setPath(BaseUrlApi.BASE_IMG_URL + bean.getData());
|
||||
fileBean.setFileType(1);
|
||||
fileBean.setFileName(fileNames.get(mUploadCount - 1));
|
||||
mFileBeans.add(0, fileBean);
|
||||
}
|
||||
mAddFileAdapter.notifyDataSetChanged();
|
||||
if (mUploadCount == paths.size()) {
|
||||
mUploadCount = 0;
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
e.printStackTrace();
|
||||
mUploadCount = 0;
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("上传失败,请稍后重试.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Observable createObservable(File file) {
|
||||
LogUtils.e(file.exists());
|
||||
RequestBody requestFile = RequestBody.create(file, MediaType.parse("multipart/form-data"));
|
||||
MultipartBody.Part body;
|
||||
body = MultipartBody.Part.createFormData("file", file.getName(), requestFile);
|
||||
return RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.uploadFile(body)
|
||||
.compose(RxTransformer.getTransformer());
|
||||
}
|
||||
|
||||
private boolean checkParams() {
|
||||
String name = mEtName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
ToastUtils.show("请输入工作名称");
|
||||
return false;
|
||||
}
|
||||
String startTime = mTvStartTime.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(startTime)) {
|
||||
ToastUtils.show("请输入开始时间");
|
||||
return false;
|
||||
}
|
||||
String endTime = mTvEndTime.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(endTime)) {
|
||||
ToastUtils.show("请输入结束时间");
|
||||
return false;
|
||||
}
|
||||
String tl = mEtTl.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(tl)) {
|
||||
ToastUtils.show("请输入完成时限");
|
||||
return false;
|
||||
}
|
||||
if (mSelUndertake == null) {
|
||||
ToastUtils.show("请选择承办人");
|
||||
return false;
|
||||
}
|
||||
String require = mEtRequest.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(require)) {
|
||||
ToastUtils.show("请输入结果要求");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private RequestBody buildParams() {
|
||||
SaveRoutineBean bean = new SaveRoutineBean();
|
||||
bean.setWorkName(mEtName.getText().toString().trim());
|
||||
bean.setWorkCompleteStartTime(mTvStartTime.getText().toString().trim());
|
||||
bean.setWorkCompleteEndTime(mTvEndTime.getText().toString().trim());
|
||||
bean.setWorkCompleteDay(Integer.parseInt(mEtTl.getText().toString().trim()));
|
||||
bean.setWorkUndertakerUserId(mSelUndertake.getUserId());
|
||||
bean.setWorkUndertakerUserName(mSelUndertake.getUserName());
|
||||
if (!TextUtils.isEmpty(mIds)) {
|
||||
bean.setWorkSponsorUserIds(mIds.replace(",", "_"));
|
||||
bean.setWorkSponsorUserNames(mTvAssisted.getText().toString().trim());
|
||||
}
|
||||
bean.setIsSchedule(isWriteSchedule + "");
|
||||
bean.setWorkResultReq(mEtRequest.getText().toString().trim());
|
||||
String remark = mEtRemark.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(remark)) {
|
||||
bean.setWorkRemarks(remark);
|
||||
}
|
||||
if (mFileBeans.size() >= 2) {
|
||||
StringBuilder fileId = new StringBuilder();
|
||||
for (AddFileBean fileBean : mFileBeans) {
|
||||
if (!TextUtils.isEmpty(fileBean.getId())) {
|
||||
fileId.append(fileBean.getId()).append(",");
|
||||
}
|
||||
}
|
||||
if (fileId.toString().endsWith(",")) {
|
||||
fileId = new StringBuilder(fileId.substring(0, fileId.length() - 1));
|
||||
}
|
||||
bean.setWorkFiles(fileId.toString().trim());
|
||||
}
|
||||
return RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
|
||||
}
|
||||
|
||||
private void doConfirm() {
|
||||
if (checkParams()) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.doSaveRoutine(body)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseSuccessBean baseSuccessBean) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ToastUtils.show("保存成功");
|
||||
BaseFragment preFragment = mMainActivity.getPreFragment();
|
||||
if (preFragment != null) {
|
||||
preFragment.mIsRefresh = true;
|
||||
}
|
||||
mMainActivity.backFragment(1, RoutineWorkAddFragment.this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadMoreData() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,283 @@
|
||||
package com.tenlionsoft.oamodule.pad.fragments.home.routinework;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.AddFileBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.base.ShowFileAdapter;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.beans.RoutineAcceptListBean;
|
||||
import com.tenlionsoft.oamodule.beans.RoutineBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/5/10 - 09:18
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_DETAIL)
|
||||
public class RoutineWorkDetailFragment extends BaseFragment {
|
||||
|
||||
@BindView(R2.id.tv_name)
|
||||
TextView mTvName;
|
||||
@BindView(R2.id.tv_start_time)
|
||||
TextView mTvStartTime;
|
||||
@BindView(R2.id.tv_end_time)
|
||||
TextView mTvEndTime;
|
||||
@BindView(R2.id.tv_tl)
|
||||
TextView mTvTl;
|
||||
@BindView(R2.id.tv_undertake)
|
||||
TextView mTvUndertake;
|
||||
@BindView(R2.id.tv_assisted)
|
||||
TextView mTvAssisted;
|
||||
@BindView(R2.id.sw_schedule)
|
||||
SwitchCompat mSwSchedule;
|
||||
@BindView(R2.id.tv_request)
|
||||
TextView mTvRequest;
|
||||
@BindView(R2.id.tv_remark)
|
||||
TextView mTvRemark;
|
||||
@BindView(R2.id.rlv_files)
|
||||
RecyclerView mRlvFiles;
|
||||
@BindView(R2.id.tv_file_hint)
|
||||
TextView mTvFileHint;
|
||||
@BindView(R2.id.tv_restore)
|
||||
TextView mTvRestore;
|
||||
@BindView(R2.id.tv_restore_time)
|
||||
TextView mTvRestoreTime;
|
||||
@BindView(R2.id.tv_restore_user_type)
|
||||
TextView mTvRestoreUserType;
|
||||
@BindView(R2.id.rlv_restore_files)
|
||||
RecyclerView mRlvRestoreFiles;
|
||||
@BindView(R2.id.tv_restore_file_hint)
|
||||
TextView mTvRestoreFileHint;
|
||||
@BindView(R2.id.ll_restore)
|
||||
LinearLayout mLlRestore;
|
||||
private PadMainActivity mMainActivity;
|
||||
private String mId;
|
||||
private String mUserId;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
return R.layout.fragment_routine_work_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDataToView(View dataView) {
|
||||
ButterKnife.bind(this, dataView);
|
||||
setTitleView(true);
|
||||
mTvFragmentTitle.setText("工作详情");
|
||||
mIvFragmentBack.setOnClickListener(v -> mMainActivity.backFragment(1, this));
|
||||
Bundle bundle = getArguments();
|
||||
if (bundle != null) {
|
||||
mId = bundle.getString("id");
|
||||
mUserId = bundle.getString("userId");
|
||||
}
|
||||
if (TextUtils.isEmpty(mUserId)) {
|
||||
//我发起的日常工作
|
||||
getRoutineById(mId);
|
||||
} else {
|
||||
//接收的日常工作
|
||||
getRoutineByAcceptId(mUserId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
}
|
||||
|
||||
private void getRoutineByAcceptId(String userId) {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getRoutineAcceptDetail(userId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<RoutineAcceptListBean.RowsBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(RoutineAcceptListBean.@io.reactivex.rxjava3.annotations.NonNull RowsBean rowsBean) {
|
||||
setCompleteDataToView(rowsBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
setStateView(STATE_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setCompleteDataToView(RoutineAcceptListBean.RowsBean b) {
|
||||
setStateView(STATE_SUCCESS);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
mTvName.setText(b.getRoutineWorkDTO().getWorkName());
|
||||
mTvStartTime.setText(b.getRoutineWorkDTO().getWorkCompleteStartTime());
|
||||
mTvEndTime.setText(b.getRoutineWorkDTO().getWorkCompleteEndTime());
|
||||
mTvTl.setText(b.getRoutineWorkDTO().getWorkCompleteDay() + "");
|
||||
mTvUndertake.setText(b.getRoutineWorkDTO().getWorkUndertakerUserName());
|
||||
mTvAssisted.setText(b.getRoutineWorkDTO().getWorkSponsorUserNames());
|
||||
mSwSchedule.setChecked(b.getRoutineWorkDTO().getIsSchedule().equals("1"));
|
||||
mTvRequest.setText(Html.fromHtml(b.getRoutineWorkDTO().getWorkResultReq()));
|
||||
mTvRemark.setText(Html.fromHtml(b.getRoutineWorkDTO().getWorkRemarks()));
|
||||
if (!TextUtils.isEmpty(b.getRoutineWorkDTO().getWorkFiles())) {
|
||||
List<AddFileBean> files = new ArrayList<>();
|
||||
mTvFileHint.setVisibility(View.GONE);
|
||||
mRlvFiles.setVisibility(View.VISIBLE);
|
||||
String[] split = b.getRoutineWorkDTO().getWorkFiles().split(",");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
AddFileBean bean = new AddFileBean();
|
||||
bean.setId(split[i]);
|
||||
bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
|
||||
bean.setFileType(1);
|
||||
files.add(bean);
|
||||
}
|
||||
ShowFileAdapter adapter = new ShowFileAdapter(mActivity, files);
|
||||
mRlvFiles.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvFiles.setAdapter(adapter);
|
||||
} else {
|
||||
mTvFileHint.setVisibility(View.VISIBLE);
|
||||
mRlvFiles.setVisibility(View.GONE);
|
||||
}
|
||||
mTvRestore.setText(Html.fromHtml(b.getContent()));
|
||||
mTvRestoreTime.setText(b.getGmtCreate());
|
||||
mTvRestoreUserType.setText("undertaker".equals(b.getUserType()) ? "承办人员" : "协办人员");
|
||||
if (!TextUtils.isEmpty(b.getFiles())) {
|
||||
mRlvRestoreFiles.setVisibility(View.VISIBLE);
|
||||
mTvRestoreFileHint.setVisibility(View.GONE);
|
||||
List<AddFileBean> files = new ArrayList<>();
|
||||
String[] split = b.getRoutineWorkDTO().getWorkFiles().split(",");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
AddFileBean bean = new AddFileBean();
|
||||
bean.setId(split[i]);
|
||||
bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
|
||||
bean.setFileType(1);
|
||||
files.add(bean);
|
||||
}
|
||||
ShowFileAdapter adapter = new ShowFileAdapter(mActivity, files);
|
||||
mRlvRestoreFiles.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvRestoreFiles.setAdapter(adapter);
|
||||
} else {
|
||||
mRlvRestoreFiles.setVisibility(View.GONE);
|
||||
mTvRestoreFileHint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取日常工作详情
|
||||
*/
|
||||
private void getRoutineById(String id) {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getRoutineDetail(id)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<RoutineBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull RoutineBean routineBean) {
|
||||
setDataToView(routineBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
setStateView(STATE_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setDataToView(RoutineBean b) {
|
||||
setStateView(STATE_SUCCESS);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
mLlRestore.setVisibility(View.GONE);
|
||||
mTvName.setText(b.getWorkName());
|
||||
mTvStartTime.setText(b.getWorkCompleteStartTime());
|
||||
mTvEndTime.setText(b.getWorkCompleteEndTime());
|
||||
mTvTl.setText(b.getWorkCompleteDay() + "");
|
||||
mTvUndertake.setText(b.getWorkUndertakerUserName());
|
||||
mTvAssisted.setText(b.getWorkSponsorUserNames());
|
||||
mSwSchedule.setChecked(b.getIsSchedule().equals("1"));
|
||||
mTvRequest.setText(Html.fromHtml(b.getWorkResultReq()));
|
||||
mTvRemark.setText(Html.fromHtml(b.getWorkRemarks()));
|
||||
if (!TextUtils.isEmpty(b.getWorkFiles())) {
|
||||
mTvFileHint.setVisibility(View.GONE);
|
||||
mRlvFiles.setVisibility(View.VISIBLE);
|
||||
List<AddFileBean> files = new ArrayList<>();
|
||||
String[] split = b.getWorkFiles().split(",");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
AddFileBean bean = new AddFileBean();
|
||||
bean.setId(split[i]);
|
||||
bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
|
||||
bean.setFileType(1);
|
||||
files.add(bean);
|
||||
}
|
||||
ShowFileAdapter adapter = new ShowFileAdapter(mActivity, files);
|
||||
mRlvFiles.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvFiles.setAdapter(adapter);
|
||||
} else {
|
||||
mTvFileHint.setVisibility(View.VISIBLE);
|
||||
mRlvFiles.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadMoreData() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,419 @@
|
||||
package com.tenlionsoft.oamodule.pad.fragments.home.routinework;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.base.FragmentUtils;
|
||||
import com.tenlionsoft.baselib.core.widget.views.CustomStateView;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.adapter.RoutineAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.RoutineAcceptListBean;
|
||||
import com.tenlionsoft.oamodule.beans.RoutineBean;
|
||||
import com.tenlionsoft.oamodule.beans.RoutineListBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/5/9 - 17:50
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 日常工作
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK)
|
||||
public class RoutineWorkFragment extends BaseFragment {
|
||||
@BindView(R2.id.iv_back)
|
||||
ImageView mIvBack;
|
||||
@BindView(R2.id.rb_apply)
|
||||
RadioButton mRbApply;
|
||||
@BindView(R2.id.rb_accept)
|
||||
RadioButton mRbAccept;
|
||||
@BindView(R2.id.rg_type)
|
||||
RadioGroup mRgType;
|
||||
@BindView(R2.id.iv_control)
|
||||
TextView mIvControl;
|
||||
@BindView(R2.id.rl_content_title)
|
||||
RelativeLayout mRlContentTitle;
|
||||
@BindView(R2.id.et_base_search_cancel)
|
||||
EditText mEtBaseSearchCancel;
|
||||
@BindView(R2.id.tv_base_search_cancel)
|
||||
TextView mTvBaseSearchCancel;
|
||||
@BindView(R2.id.ll_base_search_cancel)
|
||||
LinearLayout mLlBaseSearchCancel;
|
||||
@BindView(R2.id.tv_start_date)
|
||||
TextView mTvStartDate;
|
||||
@BindView(R2.id.tv_end_date)
|
||||
TextView mTvEndDate;
|
||||
@BindView(R2.id.tv_state)
|
||||
TextView mTvState;
|
||||
@BindView(R2.id.rlv_content)
|
||||
RecyclerView mRlvContent;
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.csv_state)
|
||||
CustomStateView mCsvState;
|
||||
private Unbinder mBind;
|
||||
private int mType = 1;//1我发起的 2我接受的
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
|
||||
private List<Object> mDatas;
|
||||
private RoutineAdapter mAdapter;
|
||||
private PadMainActivity mMainActivity;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
return R.layout.fragment_routine_work;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDataToView(View dataView) {
|
||||
ButterKnife.bind(this, dataView);
|
||||
setStateView(STATE_SUCCESS);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
initViews();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
mIvBack.setOnClickListener(v -> mMainActivity.backFragment(1, this));
|
||||
mIvControl.setOnClickListener(v -> {
|
||||
BaseFragment fragment = FragmentUtils.getFragment(PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_ADD);
|
||||
mMainActivity.addFragment(1, fragment);
|
||||
});
|
||||
mTvStartDate.setOnClickListener(v -> onShowDate(1));
|
||||
mTvEndDate.setOnClickListener(v -> onShowDate(2));
|
||||
mDatas = new ArrayList<>();
|
||||
mAdapter = new RoutineAdapter(mActivity, mDatas);
|
||||
mRlvContent.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvContent.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(bean -> {
|
||||
if (bean instanceof RoutineBean) {
|
||||
//我发起的
|
||||
RoutineBean bean1 = (RoutineBean) bean;
|
||||
BaseFragment fragment = FragmentUtils.getFragmentOne(PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_DETAIL, "id", bean1.getRoutineWorkId());
|
||||
mMainActivity.addFragment(1, fragment);
|
||||
} else if (bean instanceof RoutineAcceptListBean.RowsBean) {
|
||||
RoutineAcceptListBean.RowsBean bean1 = (RoutineAcceptListBean.RowsBean) bean;
|
||||
if ("nto".equals(bean1.getStatus())) {
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("id", bean1.getRoutineWorkId());
|
||||
params.put("userId", bean1.getRoutineWorkUserId());
|
||||
params.put("userType", bean1.getUserType());
|
||||
BaseFragment fragmentMap = FragmentUtils.getFragmentMap(PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_TRANSACT, params);
|
||||
mMainActivity.addFragment(1, fragmentMap);
|
||||
} else {
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("id", bean1.getRoutineWorkId());
|
||||
params.put("userId", bean1.getRoutineWorkUserId());
|
||||
BaseFragment fragmentMap = FragmentUtils.getFragmentMap(PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_DETAIL, params);
|
||||
mMainActivity.addFragment(1, fragmentMap);
|
||||
}
|
||||
}
|
||||
});
|
||||
mRgType.setOnCheckedChangeListener((group, checkedId) -> {
|
||||
if (checkedId == R.id.rb_apply) {
|
||||
//我发起的
|
||||
mType = 1;
|
||||
} else if (checkedId == R.id.rb_accept) {
|
||||
//我接受的
|
||||
mType = 2;
|
||||
}
|
||||
//重置搜索条件
|
||||
resetCondition();
|
||||
});
|
||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||
mSrlContent.setOnLoadMoreListener(v -> doLoadMore());
|
||||
doRefresh();
|
||||
|
||||
mEtBaseSearchCancel.setOnEditorActionListener((v, actionId, event) -> {
|
||||
LogUtils.e("搜索==" + actionId);
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
|
||||
mActivity.hideSoftKeyboard();
|
||||
mEtBaseSearchCancel.clearFocus();
|
||||
mKeywords = v.getText().toString();
|
||||
doRefresh();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
mTvBaseSearchCancel.setOnClickListener(v -> {
|
||||
mEtBaseSearchCancel.setText("");
|
||||
mEtBaseSearchCancel.clearFocus();
|
||||
mKeywords = "";
|
||||
doRefresh();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@androidx.annotation.NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
}
|
||||
|
||||
private void resetCondition() {
|
||||
mEtBaseSearchCancel.setText("");
|
||||
mTvStartDate.setText("");
|
||||
mTvEndDate.setText("");
|
||||
mTvState.setText("");
|
||||
mCsvState.setState(CustomStateView.STATE_LOAD);
|
||||
mDatas.clear();
|
||||
doRefresh();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 我接受的工作
|
||||
*/
|
||||
private void getMineAcceptRoutineList(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
String end = mTvEndDate.getText().toString().trim();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMineAcceptRoutineList(start, end, mKeywords, mCurrentPage + "")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<RoutineAcceptListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull RoutineAcceptListBean listBean) {
|
||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(listBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(listBean.getRows());
|
||||
}
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= listBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
mSrlContent.finishRefresh();
|
||||
mSrlContent.finishLoadMore();
|
||||
if (currentPage > 1) {
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
if (!TextUtils.isEmpty(mKeywords)) {
|
||||
ToastUtils.show("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 我发起的工作
|
||||
*/
|
||||
private void getMineApplyRoutineList(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
String end = mTvEndDate.getText().toString().trim();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMineRoutineList(start, end, mKeywords, mCurrentPage + "")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<RoutineListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull RoutineListBean listBean) {
|
||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(listBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(listBean.getRows());
|
||||
}
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= listBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
mSrlContent.finishRefresh();
|
||||
mSrlContent.finishLoadMore();
|
||||
if (currentPage > 1) {
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
//无数据
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
} else {
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
ToastUtils.show("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 时间选择
|
||||
*/
|
||||
private void onShowDate(int i) {
|
||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
|
||||
switch (i) {
|
||||
case 1:
|
||||
mTvStartDate.setText(TimeUtils.dateToString(date));
|
||||
break;
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(start)) {
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
mCsvState.setState(CustomStateView.STATE_LOAD);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
.setTitleText("请选时间")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.isDialog(false)
|
||||
.setType(new boolean[]{true, true, true, false, false, false})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTimePickerView.show();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 加载更多
|
||||
*/
|
||||
private void doLoadMore() {
|
||||
if (mType == 1) {
|
||||
getMineApplyRoutineList(mCurrentPage);
|
||||
} else {
|
||||
getMineAcceptRoutineList(mCurrentPage);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新
|
||||
*/
|
||||
private void doRefresh() {
|
||||
mDatas.clear();
|
||||
mAdapter.setData(mDatas);
|
||||
if (mType == 1) {
|
||||
getMineApplyRoutineList(1);
|
||||
} else {
|
||||
getMineAcceptRoutineList(1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHiddenChanged(boolean hidden) {
|
||||
if (!hidden) {
|
||||
if (mIsRefresh) {
|
||||
mIsRefresh = false;
|
||||
doRefresh();
|
||||
}
|
||||
}
|
||||
super.onHiddenChanged(hidden);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadMoreData() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,421 @@
|
||||
package com.tenlionsoft.oamodule.pad.fragments.home.routinework;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.leon.lfilepickerlibrary.LFilePicker;
|
||||
import com.leon.lfilepickerlibrary.utils.Constant;
|
||||
import com.tenlionsoft.baselib.constant.LionActions;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.AddFileBean;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.AddFileAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.base.ShowFileAdapter;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.beans.RoutineBean;
|
||||
import com.tenlionsoft.oamodule.beans.SaveRoutineAcceptBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import com.tenlionsoft.oamodule.pad.activitys.home.PadMainActivity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/5/10 - 09:24
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_PAD_OA_FRAGMENT_ROUTINE_WORK_TRANSACT)
|
||||
public class RoutineWorkTransactFragment extends BaseFragment {
|
||||
|
||||
@BindView(R2.id.tv_name)
|
||||
TextView mTvName;
|
||||
@BindView(R2.id.tv_start_time)
|
||||
TextView mTvStartTime;
|
||||
@BindView(R2.id.tv_end_time)
|
||||
TextView mTvEndTime;
|
||||
@BindView(R2.id.tv_tl)
|
||||
TextView mTvTl;
|
||||
@BindView(R2.id.tv_undertake)
|
||||
TextView mTvUndertake;
|
||||
@BindView(R2.id.tv_assisted)
|
||||
TextView mTvAssisted;
|
||||
@BindView(R2.id.sw_schedule)
|
||||
SwitchCompat mSwSchedule;
|
||||
@BindView(R2.id.tv_request)
|
||||
TextView mTvRequest;
|
||||
@BindView(R2.id.tv_remark)
|
||||
TextView mTvRemark;
|
||||
@BindView(R2.id.rlv_files)
|
||||
RecyclerView mRlvFiles;
|
||||
@BindView(R2.id.et_restore)
|
||||
EditText mEtRestore;
|
||||
@BindView(R2.id.rlv_restore_files)
|
||||
RecyclerView mRlvRestoreFiles;
|
||||
@BindView(R2.id.ll_restore)
|
||||
LinearLayout mLlRestore;
|
||||
@BindView(R2.id.btn_confirm)
|
||||
Button mBtnConfirm;
|
||||
private PadMainActivity mMainActivity;
|
||||
private String mId;
|
||||
private RoutineBean mBean;
|
||||
private List<AddFileBean> mFileBeans = new ArrayList<>();
|
||||
private AddFileAdapter mAddFileAdapter;
|
||||
private String[] fileFilter = new String[]{".doc", ".docx", ".xls", ".xlsx", ".pptx", ".ppt", ".txt", ".pdf"};
|
||||
private int mFileMax = 9;
|
||||
private String mUserId;
|
||||
private String mUserType;
|
||||
private ActivityResultLauncher<Intent> mFileLauncher;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
return R.layout.fragment_routine_work_transact;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDataToView(View dataView) {
|
||||
ButterKnife.bind(this, dataView);
|
||||
setTitleView(true);
|
||||
mTvFragmentTitle.setText("日常工作");
|
||||
mIvFragmentBack.setOnClickListener(v -> mMainActivity.backFragment(1, this));
|
||||
Bundle bundle = getArguments();
|
||||
if (bundle != null) {
|
||||
mId = bundle.getString("id");
|
||||
mUserId = bundle.getString("userId");
|
||||
mUserType = bundle.getString("userType");
|
||||
}
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
ToastUtils.show("数据有误");
|
||||
mMainActivity.backFragment(1, this);
|
||||
} else {
|
||||
getDetailById();
|
||||
}
|
||||
initViews();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull @NotNull Context context) {
|
||||
super.onAttach(context);
|
||||
mMainActivity = (PadMainActivity) getActivity();
|
||||
mFileLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
//文件
|
||||
Intent data = result.getData();
|
||||
if (data != null) {
|
||||
ArrayList<String> paths = data.getStringArrayListExtra(Constant.RESULT_INFO);
|
||||
if (paths != null && paths.size() > 0) {
|
||||
doUploadFiles(paths);
|
||||
} else {
|
||||
ToastUtils.show("未选择文件");
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("路径有误,请稍后重试");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
mFileBeans.add(new AddFileBean());
|
||||
mAddFileAdapter = new AddFileAdapter(mActivity, mFileBeans);
|
||||
mAddFileAdapter.addOnItemClickListener(addFileBean -> {
|
||||
LogUtils.e("添加文件");
|
||||
if (TextUtils.isEmpty(addFileBean.getId())) {
|
||||
checkManagePermission();
|
||||
} else {
|
||||
//TODO 预览
|
||||
}
|
||||
});
|
||||
//删除上传的文件
|
||||
mAddFileAdapter.addOnDeleteListener((bean, i) -> {
|
||||
//删除list中的某个数据
|
||||
mFileBeans.remove(i);
|
||||
mAddFileAdapter.notifyDataSetChanged();
|
||||
++mFileMax;
|
||||
});
|
||||
mRlvRestoreFiles.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvRestoreFiles.setAdapter(mAddFileAdapter);
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void hasManageFileManage() {
|
||||
if (mFileMax == 0) {
|
||||
ToastUtils.show("超过最大上传数量限制");
|
||||
} else {
|
||||
new LFilePicker()
|
||||
.withFragment(this)
|
||||
.withFragmentLauncher(mFileLauncher)
|
||||
.withRequestCode(LionActions.REQUEST_CODE_AC)
|
||||
.withTitle("文件选择")
|
||||
.withMaxNum(mFileMax)
|
||||
.withFileFilter(fileFilter)
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkParams() {
|
||||
String restore = mEtRestore.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(restore)) {
|
||||
ToastUtils.show("请输入回复内容");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private RequestBody buildParams() {
|
||||
SaveRoutineAcceptBean bean = new SaveRoutineAcceptBean();
|
||||
String restore = mEtRestore.getText().toString().trim();
|
||||
bean.setContent(restore);
|
||||
bean.setUserId(UserLgUtils.getUserId());
|
||||
bean.setUserName(UserLgUtils.getName());
|
||||
bean.setRoutineWorkId(mBean.getRoutineWorkId());
|
||||
bean.setUserType(mUserType);
|
||||
if (mFileBeans.size() >= 2) {
|
||||
StringBuilder fileId = new StringBuilder();
|
||||
for (AddFileBean fileBean : mFileBeans) {
|
||||
if (!TextUtils.isEmpty(fileBean.getId())) {
|
||||
fileId.append(fileBean.getId()).append(",");
|
||||
}
|
||||
}
|
||||
if (fileId.toString().endsWith(",")) {
|
||||
fileId = new StringBuilder(fileId.substring(0, fileId.length() - 1));
|
||||
}
|
||||
bean.setFiles(fileId.toString().trim());
|
||||
}
|
||||
return RequestBody.create(new Gson().toJson(bean), MediaType.parse("application/json; charset=utf-8"));
|
||||
}
|
||||
|
||||
private void doConfirm() {
|
||||
if (checkParams()) {
|
||||
RequestBody body = buildParams();
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.doSaveAcceptRoutine(mUserId, body)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull BaseSuccessBean baseSuccessBean) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ToastUtils.show("保存成功");
|
||||
BaseFragment preFragment = mMainActivity.getPreFragment();
|
||||
if (preFragment != null) {
|
||||
preFragment.mIsRefresh = true;
|
||||
}
|
||||
mMainActivity.backFragment(1, RoutineWorkTransactFragment.this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private int mUploadCount = 0;
|
||||
|
||||
private void doUploadFiles(ArrayList<String> paths) {
|
||||
LogUtils.e(paths);
|
||||
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "上传中...");
|
||||
progressDialog.show();
|
||||
List<Observable> requests = new ArrayList<>();
|
||||
List<String> fileNames = new ArrayList<>();
|
||||
for (int i = 0; i < paths.size(); i++) {
|
||||
File file = new File(paths.get(i));
|
||||
Observable observable = createObservable(file);
|
||||
fileNames.add(file.getName());
|
||||
if (observable == null) return;
|
||||
requests.add(observable);
|
||||
}
|
||||
Observable<BaseSuccessBean>[] observables1 = requests.toArray(new Observable[requests.size()]);
|
||||
|
||||
Observable.mergeArrayDelayError(observables1)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NotNull Object o) {
|
||||
++mUploadCount;
|
||||
if (o instanceof BaseSuccessBean) {
|
||||
--mFileMax;
|
||||
//刷新文件
|
||||
BaseSuccessBean bean = (BaseSuccessBean) o;
|
||||
AddFileBean fileBean = new AddFileBean();
|
||||
fileBean.setId(bean.getData());
|
||||
fileBean.setPath(BaseUrlApi.BASE_IMG_URL + bean.getData());
|
||||
fileBean.setFileType(1);
|
||||
fileBean.setFileName(fileNames.get(mUploadCount - 1));
|
||||
mFileBeans.add(0, fileBean);
|
||||
}
|
||||
mAddFileAdapter.notifyDataSetChanged();
|
||||
if (mUploadCount == paths.size()) {
|
||||
mUploadCount = 0;
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
e.printStackTrace();
|
||||
mUploadCount = 0;
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("上传失败,请稍后重试.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Observable createObservable(File file) {
|
||||
LogUtils.e(file.exists());
|
||||
RequestBody requestFile = RequestBody.create(file, MediaType.parse("multipart/form-data"));
|
||||
MultipartBody.Part body;
|
||||
body = MultipartBody.Part.createFormData("file", file.getName(), requestFile);
|
||||
return RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.uploadFile(body)
|
||||
.compose(RxTransformer.getTransformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailById() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getRoutineDetail(mId)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<RoutineBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull RoutineBean routineBean) {
|
||||
setDataToView(routineBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setDataToView(RoutineBean routineBean) {
|
||||
setStateView(STATE_SUCCESS);
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
mBean = routineBean;
|
||||
mTvName.setText(mBean.getWorkName());
|
||||
mTvStartTime.setText(mBean.getWorkCompleteStartTime());
|
||||
mTvEndTime.setText(mBean.getWorkCompleteEndTime());
|
||||
mTvTl.setText(mBean.getWorkCompleteDay() + "");
|
||||
mTvUndertake.setText(mBean.getWorkUndertakerUserName());
|
||||
mTvAssisted.setText(mBean.getWorkSponsorUserNames());
|
||||
mSwSchedule.setChecked(mBean.getIsSchedule().equals("1"));
|
||||
mTvRequest.setText(Html.fromHtml(mBean.getWorkResultReq()));
|
||||
mTvRemark.setText(Html.fromHtml(mBean.getWorkRemarks()));
|
||||
if (!TextUtils.isEmpty(mBean.getWorkFiles())) {
|
||||
List<AddFileBean> files = new ArrayList<>();
|
||||
String[] split = mBean.getWorkFiles().split(",");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
AddFileBean bean = new AddFileBean();
|
||||
bean.setId(split[i]);
|
||||
bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
|
||||
bean.setFileType(1);
|
||||
files.add(bean);
|
||||
}
|
||||
ShowFileAdapter adapter = new ShowFileAdapter(mActivity, files);
|
||||
mRlvFiles.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvFiles.setAdapter(adapter);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadMoreData() {
|
||||
|
||||
}
|
||||
}
|
@ -203,12 +203,17 @@ public class ScheduleAddFragment extends BaseFragment {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartTime.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
@ -17,6 +17,7 @@ import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
@ -229,12 +230,16 @@ public class ScheduleEditFragment extends BaseFragment {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartTime.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
|
||||
if (span >= 0) {
|
||||
mTvEndTime.setText(TimeUtils.date2String(date));
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
@ -215,14 +215,19 @@ public class SuperviseFragment extends BaseFragment {
|
||||
case 2:
|
||||
//判断时间大小
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
mCsvState.setState(CustomStateView.STATE_LOAD);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
if(!TextUtils.isEmpty(start)){
|
||||
int span = TimeUtils.compareDate(date, TimeUtils.stringToDate(start));
|
||||
if (span >= 0) {
|
||||
mTvEndDate.setText(TimeUtils.dateToString(date));
|
||||
mCsvState.setState(CustomStateView.STATE_LOAD);
|
||||
doRefresh();
|
||||
} else {
|
||||
ToastUtils.show("结束时间须大于开始时间");
|
||||
}
|
||||
}else{
|
||||
ToastUtils.show("请选择开始时间");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
205
oamodule/src/main/res/layout/fragment_routine_work.xml
Normal file
205
oamodule/src/main/res/layout/fragment_routine_work.xml
Normal file
@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activity.meeting.MeetingCenterActivity">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_content_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/ic_back_black"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:maxLength="8"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
android:visibility="visible"
|
||||
tools:text=""
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_apply"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/switch_custom_gray_white"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="我的发起"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_accept"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/switch_custom_gray_white"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="接受工作"
|
||||
android:textStyle="bold" />
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_control"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:text="发起工作"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/layout_base_search_cancel" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shp_rectangle_white_5"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_start_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clickable="true"
|
||||
android:drawableLeft="@drawable/ic_date_title_icon"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:hint="开始日期"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="至"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_end_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:hint="结束日期"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_white_5"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:hint="办结状态"
|
||||
android:padding="5dp"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
tools:listitem="@layout/item_routine" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.CustomStateView
|
||||
android:id="@+id/csv_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
358
oamodule/src/main/res/layout/fragment_routine_work_add.xml
Normal file
358
oamodule/src/main/res/layout/fragment_routine_work_add.xml
Normal file
@ -0,0 +1,358 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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"
|
||||
android:background="@color/gray_f0"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:background="@color/white"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="工作名称"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="请输入工作名称"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="要求开始"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_start_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_right"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="请选择开始时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="要求结束"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_end_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_right"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="请选择结束时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="完成时限"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_tl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="请输入完成时限(工作日)"
|
||||
android:inputType="number"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="承办人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_undertake"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_right"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="请选择承办人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="协办人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_assisted"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_right"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="请选择协办人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="写入日程"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/ll_sw"
|
||||
android:gravity="right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/sw_schedule"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/switch_ios_track_selector"
|
||||
android:switchMinWidth="40dp"
|
||||
android:switchPadding="0dp"
|
||||
android:textOff=""
|
||||
android:textOn=""
|
||||
app:showText="false"
|
||||
app:splitTrack="false"
|
||||
app:theme="@style/scstyle"
|
||||
app:thumbTint="#00000000"
|
||||
app:trackTint="#00000000" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="结果要求"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_request"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="请输入结果要求"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_request_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
tools:text="0/140" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="备注"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_remark"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="请输入备注"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_remark_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
tools:text="0/140" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="文件附件"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_files"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="3" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/sel_btn_submit_no_size"
|
||||
android:text="发起工作"
|
||||
android:textColor="@color/col_white_gray_press" />
|
||||
</RelativeLayout>
|
481
oamodule/src/main/res/layout/fragment_routine_work_detail.xml
Normal file
481
oamodule/src/main/res/layout/fragment_routine_work_detail.xml
Normal file
@ -0,0 +1,481 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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"
|
||||
android:background="@color/gray_f0"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_margin="10dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="工作内容"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="工作名称"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="要求开始"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_start_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="要求结束"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_end_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="完成时限"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="承办人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_undertake"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="协办人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_assisted"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="写入日程"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/sw_schedule"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/switch_ios_track_selector"
|
||||
android:enabled="false"
|
||||
android:switchMinWidth="40dp"
|
||||
android:switchPadding="0dp"
|
||||
android:textOff=""
|
||||
android:textOn=""
|
||||
app:showText="false"
|
||||
app:splitTrack="false"
|
||||
app:theme="@style/scstyle"
|
||||
app:thumbTint="#00000000"
|
||||
app:trackTint="#00000000" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="结果要求"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_request"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="未录入"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="备注"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_remark"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="未录入"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="文件附件"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_files"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="3"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_file_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="20dp"
|
||||
android:text="未录入" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_restore"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="办结内容"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/gray_f8"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="回复内容"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_restore"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="未录入"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="回复时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_restore_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="回复角色"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_restore_user_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="回复文件"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_restore_files"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_restore_file_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="20dp"
|
||||
android:text="未录入" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
436
oamodule/src/main/res/layout/fragment_routine_work_transact.xml
Normal file
436
oamodule/src/main/res/layout/fragment_routine_work_transact.xml
Normal file
@ -0,0 +1,436 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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"
|
||||
android:background="@color/gray_f0"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@color/white"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="工作内容"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="工作名称"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textColor="@color/black"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="要求开始"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_start_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="要求结束"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_end_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="完成时限"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="right"
|
||||
android:textColor="@color/black"
|
||||
android:hint="未录入"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="承办人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_undertake"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="协办人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_assisted"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="right"
|
||||
android:hint="未录入"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_hor_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="写入日程"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/sw_schedule"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/switch_ios_track_selector"
|
||||
android:enabled="false"
|
||||
android:switchMinWidth="40dp"
|
||||
android:switchPadding="0dp"
|
||||
android:textOff=""
|
||||
android:textOn=""
|
||||
app:showText="false"
|
||||
app:splitTrack="false"
|
||||
app:theme="@style/scstyle"
|
||||
app:thumbTint="#00000000"
|
||||
app:trackTint="#00000000" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="结果要求"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_request"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="未录入"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="备注"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_remark"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="未录入"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="文件附件"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_files"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="3" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_restore"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="办结内容"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="回复内容"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_restore"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null"
|
||||
android:gravity="left"
|
||||
android:hint="请输入回复内容"
|
||||
android:minLines="3"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_ver">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="回复文件"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_restore_files"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="3" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/sel_btn_submit_no_size"
|
||||
android:text="办结"
|
||||
android:textColor="@color/col_white_gray_press" />
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user