|
@@ -67,6 +67,7 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
private static final int COMMON_DOC_DETAILY = 0x319;
|
|
private static final int COMMON_DOC_DETAILY = 0x319;
|
|
|
private static final int AGREE_OR_DISAGREE = 0x320;
|
|
private static final int AGREE_OR_DISAGREE = 0x320;
|
|
|
private static final int CHANGE_DEAL_MAN = 0x322;
|
|
private static final int CHANGE_DEAL_MAN = 0x322;
|
|
|
|
|
+ private static final int DOC_EM_DATA = 0x418;
|
|
|
@ViewInject(R.id.work_daily_detail_time_tv)
|
|
@ViewInject(R.id.work_daily_detail_time_tv)
|
|
|
private TextView wdd_date;
|
|
private TextView wdd_date;
|
|
|
@ViewInject(R.id.work_daily_detail_summary_tv)
|
|
@ViewInject(R.id.work_daily_detail_summary_tv)
|
|
@@ -195,6 +196,18 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void initSureStatue(int mkeyValue) {
|
|
|
|
|
+ String url = ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().common_doc_detaily_url;
|
|
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
|
|
+ param.put("id", mkeyValue);
|
|
|
|
|
+ param.put("whichpage", 4);
|
|
|
|
|
+ param.put("enuu", Long.valueOf(CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "companyEnUu")).longValue());
|
|
|
|
|
+ param.put("emcode", Long.valueOf(CommonUtil.getSharedPreferences(MyApplication.getInstance().getApplicationContext(), "b2b_uu")).longValue());
|
|
|
|
|
+ LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
|
|
+ headers.put("Cookie", "JSESSIONID=" + ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().getCookie());
|
|
|
|
|
+ ViewUtil.httpSendRequest(getApplicationContext(), url, param, handler, headers, DOC_EM_DATA, null, null, "get");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private void loadeapData(int mkeyValue) {
|
|
private void loadeapData(int mkeyValue) {
|
|
|
String url = ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().common_doc_detaily_url;
|
|
String url = ApiConfig.getInstance(ApiUtils.getApiModel()).getmApiBase().common_doc_detaily_url;
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
Map<String, Object> param = new HashMap<>();
|
|
@@ -241,6 +254,8 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
wdd_status.setText("待审批");
|
|
wdd_status.setText("待审批");
|
|
|
resanddel_ll.setVisibility(View.VISIBLE);
|
|
resanddel_ll.setVisibility(View.VISIBLE);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ initSureStatue(mkeyValue); // TODO 仅仅获取单据真正状态
|
|
|
// else if (wd_status.equals("在录入")){
|
|
// else if (wd_status.equals("在录入")){
|
|
|
// wdd_status.setTextColor(mContext.getResources().getColor(R.color.done_approval));
|
|
// wdd_status.setTextColor(mContext.getResources().getColor(R.color.done_approval));
|
|
|
// wdd_status.setText("未提交");
|
|
// wdd_status.setText("未提交");
|
|
@@ -285,18 +300,25 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
resubmit_ll.setOnClickListener(new View.OnClickListener() {
|
|
resubmit_ll.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
|
- new AlertDialog
|
|
|
|
|
- .Builder(mContext)
|
|
|
|
|
- .setTitle("温馨提示")
|
|
|
|
|
- .setMessage("\t\t确认反提交该条单据?")
|
|
|
|
|
- .setNegativeButton("取消", null)
|
|
|
|
|
- .setPositiveButton("确认", new DialogInterface.OnClickListener() {
|
|
|
|
|
- @Override
|
|
|
|
|
- public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
- String retype = "reforsub";
|
|
|
|
|
- doresubmit(retype);
|
|
|
|
|
- }
|
|
|
|
|
- }).show();
|
|
|
|
|
|
|
+ Log.i("wd_status",wd_status);
|
|
|
|
|
+ if ("已提交".equals(wd_status) || "待审批".equals(wd_status)) {
|
|
|
|
|
+ new AlertDialog
|
|
|
|
|
+ .Builder(mContext)
|
|
|
|
|
+ .setTitle("温馨提示")
|
|
|
|
|
+ .setMessage("\t\t确认反提交该条单据?")
|
|
|
|
|
+ .setNegativeButton("取消", null)
|
|
|
|
|
+ .setPositiveButton("确认", new DialogInterface.OnClickListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
+ String retype = "reforsub";
|
|
|
|
|
+ doresubmit(retype);
|
|
|
|
|
+ }
|
|
|
|
|
+ }).show();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ doJumpToAdd(mkeyValue);
|
|
|
|
|
+ finish();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -346,6 +368,17 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void doJumpToAdd(int mkeyValue) {
|
|
|
|
|
+ startActivity(new Intent(activity, WorkDailyAddActivity.class)
|
|
|
|
|
+ .putExtra("caller", mCaller)
|
|
|
|
|
+ .putExtra("id", mkeyValue)
|
|
|
|
|
+ .putExtra("rs_summary", summary)
|
|
|
|
|
+ .putExtra("rs_plan", plan)
|
|
|
|
|
+ .putExtra("rs_experience", experience)
|
|
|
|
|
+ .putExtra("resubmit", "resubmit"));
|
|
|
|
|
+ Log.i("doresubmit_id", mkeyValue + "");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private PopupWindow popupWindow = null;
|
|
private PopupWindow popupWindow = null;
|
|
|
|
|
|
|
|
private void doDealDescribe(final int agree_type, final int deal_id) {
|
|
private void doDealDescribe(final int agree_type, final int deal_id) {
|
|
@@ -519,6 +552,7 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
if (msg.getData() != null) {
|
|
if (msg.getData() != null) {
|
|
|
String app_flow_result = msg.getData().getString("result");
|
|
String app_flow_result = msg.getData().getString("result");
|
|
|
LogUtil.prinlnLongMsg("app_flow_result", app_flow_result);
|
|
LogUtil.prinlnLongMsg("app_flow_result", app_flow_result);
|
|
|
|
|
+
|
|
|
doPlatComAfShow(app_flow_result);
|
|
doPlatComAfShow(app_flow_result);
|
|
|
progressDialog.dismiss();
|
|
progressDialog.dismiss();
|
|
|
}
|
|
}
|
|
@@ -528,7 +562,7 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
String r_for_s_result = msg.getData().getString("result");
|
|
String r_for_s_result = msg.getData().getString("result");
|
|
|
LogUtil.prinlnLongMsg("r_for_s_result", r_for_s_result);
|
|
LogUtil.prinlnLongMsg("r_for_s_result", r_for_s_result);
|
|
|
if (JSON.parseObject(r_for_s_result).containsKey("success") && JSON.parseObject(r_for_s_result).getBoolean("success")){
|
|
if (JSON.parseObject(r_for_s_result).containsKey("success") && JSON.parseObject(r_for_s_result).getBoolean("success")){
|
|
|
- ToastMessage("反提交成功");
|
|
|
|
|
|
|
+// ToastMessage("反提交成功");
|
|
|
startActivity(new Intent(activity, WorkDailyAddActivity.class)
|
|
startActivity(new Intent(activity, WorkDailyAddActivity.class)
|
|
|
.putExtra("caller", mCaller)
|
|
.putExtra("caller", mCaller)
|
|
|
.putExtra("id", mkeyValue)
|
|
.putExtra("id", mkeyValue)
|
|
@@ -549,7 +583,7 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
if (msg.getData() != null) {
|
|
if (msg.getData() != null) {
|
|
|
String r_for_d_result = msg.getData().getString("result");
|
|
String r_for_d_result = msg.getData().getString("result");
|
|
|
LogUtil.prinlnLongMsg("r_for_d_result", r_for_d_result);
|
|
LogUtil.prinlnLongMsg("r_for_d_result", r_for_d_result);
|
|
|
- ToastMessage("反提交成功");
|
|
|
|
|
|
|
+// ToastMessage("反提交成功");
|
|
|
doPlatDeleteByid(mkeyValue);
|
|
doPlatDeleteByid(mkeyValue);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
@@ -627,6 +661,16 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
LogUtil.prinlnLongMsg("change_deal_man_result", change_deal_man_result);
|
|
LogUtil.prinlnLongMsg("change_deal_man_result", change_deal_man_result);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
|
|
+
|
|
|
|
|
+ case DOC_EM_DATA:
|
|
|
|
|
+ if (msg.getData() != null) {
|
|
|
|
|
+ String doc_em_data = msg.getData().getString("result");
|
|
|
|
|
+ LogUtil.prinlnLongMsg("doc_em_data", doc_em_data);
|
|
|
|
|
+ if (!StringUtils.isEmpty(doc_em_data)) {
|
|
|
|
|
+ getDailyStatue(doc_em_data);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
default:
|
|
default:
|
|
|
if (msg.getData() != null) {
|
|
if (msg.getData() != null) {
|
|
|
if (!StringUtils.isEmpty(msg.getData().getString("result"))) {
|
|
if (!StringUtils.isEmpty(msg.getData().getString("result"))) {
|
|
@@ -639,6 +683,31 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ private void getDailyStatue(String doc_em_data) {
|
|
|
|
|
+ JSONObject Object = JSON.parseObject(doc_em_data);
|
|
|
|
|
+ JSONObject dataObject = Object.getJSONObject("data");
|
|
|
|
|
+
|
|
|
|
|
+ if (dataObject != null){
|
|
|
|
|
+ if (!StringUtils.isEmpty(dataObject.getString("wd_status"))){
|
|
|
|
|
+ wd_status = dataObject.getString("wd_status");
|
|
|
|
|
+ if ("已审核".equals(wd_status) || "已审批".equals(wd_status)) {
|
|
|
|
|
+ wdd_status.setTextColor(mContext.getResources().getColor(R.color.approval));
|
|
|
|
|
+ wdd_status.setText("已审批");
|
|
|
|
|
+ resanddel_ll.setVisibility(View.GONE);
|
|
|
|
|
+ } else if ("已提交".equals(wd_status)) {
|
|
|
|
|
+ wdd_status.setTextColor(mContext.getResources().getColor(R.color.no_approval));
|
|
|
|
|
+ wdd_status.setText("待审批");
|
|
|
|
|
+ resanddel_ll.setVisibility(View.VISIBLE);
|
|
|
|
|
+ }else if ("在录入".equals(wd_status)){
|
|
|
|
|
+ wdd_status.setTextColor(mContext.getResources().getColor(R.color.done_approval));
|
|
|
|
|
+ wdd_status.setText("在录入");
|
|
|
|
|
+ resanddel_ll.setVisibility(View.VISIBLE);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private void dodetailsShow(String date, String summary, String plan, String experience, String wd_status) {
|
|
private void dodetailsShow(String date, String summary, String plan, String experience, String wd_status) {
|
|
|
csv_hide.setVisibility(View.VISIBLE);
|
|
csv_hide.setVisibility(View.VISIBLE);
|
|
|
resanddel_ll.setVisibility(View.GONE);
|
|
resanddel_ll.setVisibility(View.GONE);
|
|
@@ -665,6 +734,9 @@ public class PlatWDdetailyActivity extends BaseActivity {
|
|
|
hide_above_af.setVisibility(View.GONE);
|
|
hide_above_af.setVisibility(View.GONE);
|
|
|
} else {
|
|
} else {
|
|
|
mPlatComAfBean = JSON.parseObject(resultJsonObject.toString(), PlatComAfBean.class);
|
|
mPlatComAfBean = JSON.parseObject(resultJsonObject.toString(), PlatComAfBean.class);
|
|
|
|
|
+ if (!mPlatComAfBean.isSuccess()) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
//TODO 获取数据审批人姓名,头像,审批状态
|
|
//TODO 获取数据审批人姓名,头像,审批状态
|
|
|
if (!ListUtils.isEmpty(mPlatComAfBean.getData()) || !ListUtils.isEmpty(mPlatComAfBean.getNodes())) {
|
|
if (!ListUtils.isEmpty(mPlatComAfBean.getData()) || !ListUtils.isEmpty(mPlatComAfBean.getNodes())) {
|
|
|
int datas_size = mPlatComAfBean.getData().size();
|
|
int datas_size = mPlatComAfBean.getData().size();
|