|
|
@@ -123,16 +123,6 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
private MyListView appflow_lv;
|
|
|
private MyListView second_msg_lv;
|
|
|
private LinearLayout secondmsg_ll;
|
|
|
- private LinearLayout approval_ll;
|
|
|
- private LinearLayout agree_ll;
|
|
|
- private LinearLayout change_deal_man_ll;
|
|
|
- private LinearLayout disagree_ll;
|
|
|
- private LinearLayout resanddel_ll;
|
|
|
- private TextView sureTv;
|
|
|
- private TextView turnScrapTv;
|
|
|
- private LinearLayout deviceLL;
|
|
|
- private LinearLayout resubmit_ll;
|
|
|
- private LinearLayout delete_ll;
|
|
|
private CustomerScrollView commondoc_sv;
|
|
|
private View hide_above_af;
|
|
|
private LinearLayout ex_invoice_ll;
|
|
|
@@ -188,7 +178,7 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
findViewById(android.R.id.content), Gravity.BOTTOM, 0, 0);
|
|
|
}
|
|
|
private void initPopupWindow() {
|
|
|
- View viewContext = LayoutInflater.from(ct).inflate(R.layout.sigature_pop, null);
|
|
|
+ View viewContext = LayoutInflater.from(ct).inflate(R.layout.pi_sigature_pop, null);
|
|
|
|
|
|
|
|
|
viewContext.findViewById(R.id.clear_im).setOnClickListener(new View.OnClickListener() {
|
|
|
@@ -270,9 +260,8 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
ViewUtil.ToastMessage(ct, getString(R.string.Uploaded_successfully));
|
|
|
Log.i("doNewSubmit",JSON.parseObject(responseInfo.result).toJSONString());
|
|
|
if (JSONUtil.validate(responseInfo.result) && JSON.parseObject(responseInfo.result).getBoolean("success")) {
|
|
|
- Toast.makeText(ct,getString(R.string.ss_send_success),Toast.LENGTH_LONG).show();
|
|
|
+ Toast.makeText(ct,getString(R.string.submit_success),Toast.LENGTH_LONG).show();
|
|
|
mBtnSignature.setVisibility(View.GONE);
|
|
|
- invalidateOptionsMenu();
|
|
|
closePopupWindow();
|
|
|
}
|
|
|
progressDialog.dismiss();
|
|
|
@@ -360,16 +349,6 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
appflow_lv = (MyListView) findViewById(R.id.common_docui_approval_flow_lv);
|
|
|
second_msg_lv = (MyListView) findViewById(R.id.common_docui_second_msg_lv);
|
|
|
secondmsg_ll = (LinearLayout) findViewById(R.id.common_docui_secondmsg_ll);
|
|
|
- approval_ll = (LinearLayout) findViewById(R.id.common_docui_agree_and_change_ll);
|
|
|
- agree_ll = (LinearLayout) findViewById(R.id.common_docui_agree_ll);
|
|
|
- change_deal_man_ll = (LinearLayout) findViewById(R.id.common_docui_change_dealman_ll);
|
|
|
- disagree_ll = (LinearLayout) findViewById(R.id.common_docui_disagree_ll);
|
|
|
- resanddel_ll = (LinearLayout) findViewById(R.id.item_common_docui_res_and_del_ll);
|
|
|
- sureTv = (TextView) findViewById(R.id.sureTv);
|
|
|
- turnScrapTv = findViewById(R.id.turnScrapTv);
|
|
|
- deviceLL = findViewById(R.id.deviceLL);
|
|
|
- resubmit_ll = (LinearLayout) findViewById(R.id.common_docui_resubmit_ll);
|
|
|
- delete_ll = (LinearLayout) findViewById(R.id.common_docui_delete_ll);
|
|
|
commondoc_sv = (CustomerScrollView) findViewById(R.id.common_docui_sv);
|
|
|
hide_above_af = findViewById(R.id.hide_above_af);
|
|
|
ex_invoice_ll = (LinearLayout) findViewById(R.id.ex_invoice_ll);
|
|
|
@@ -594,7 +573,6 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
Toast.makeText(ZeTianDocDetailsActivity.this, msg.getData().getString("result"), Toast.LENGTH_LONG).show();
|
|
|
if (!TextUtils.isEmpty(real_status) && real_status.equals("已审核")) {
|
|
|
commondoc_sv.setVisibility(View.VISIBLE);
|
|
|
- resanddel_ll.setVisibility(View.GONE);
|
|
|
} else if (!TextUtils.isEmpty(real_status) && real_status.equals("已提交")) {
|
|
|
commondoc_sv.setVisibility(View.VISIBLE);
|
|
|
}
|
|
|
@@ -658,7 +636,6 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
LogUtil.prinlnLongMsg("amresultJsonObject", amresultJsonObject.toString());
|
|
|
if (formdataArray == null) {
|
|
|
mEmptyLayput_applymsg.showEmpty();
|
|
|
- resanddel_ll.setVisibility(View.GONE);
|
|
|
} else {
|
|
|
commondoc_sv.setVisibility(View.VISIBLE);
|
|
|
mCommonDocMainMsgAdapter.setFormdataBeans(formdataArray);
|
|
|
@@ -712,7 +689,14 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
}
|
|
|
mCommonDocMainMsgAdapter.setmFormconfigsBean(mFormconfigsBean);
|
|
|
main_msg_lv.setAdapter(mCommonDocMainMsgAdapter);
|
|
|
- LogUtil.prinlnLongMsg("mFormconfigsBean", mFormconfigsBean.toString());
|
|
|
+ if(formdataArray.size() > 0 &&
|
|
|
+ !StringUtil.isEmpty(formdataArray.getJSONObject(0).getString("pi_signstatus")) &&
|
|
|
+ "已签名".equals(formdataArray.getJSONObject(0).getString("pi_signstatus"))){
|
|
|
+ mBtnSignature.setVisibility(View.GONE);
|
|
|
+ }else {
|
|
|
+ mBtnSignature.setVisibility(View.VISIBLE);
|
|
|
+ }
|
|
|
+ showSignStatus(formdataArray,mFormconfigsBean);
|
|
|
}
|
|
|
|
|
|
// 获取需要显示的从表单配置数据属性保存到mGridconfigsBean中
|
|
|
@@ -726,8 +710,13 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
mGridconfigsBean.add(mCommonDocAMBean.getDatas().getGridconfigs().get(i));
|
|
|
}
|
|
|
}
|
|
|
- mComDocGriddataOutAdapter.setmGridconfigsBean(mGridconfigsBean);
|
|
|
- second_msg_lv.setAdapter(mComDocGriddataOutAdapter);
|
|
|
+ if(mGridconfigsBean.size() > 0){
|
|
|
+ mComDocGriddataOutAdapter.setmGridconfigsBean(mGridconfigsBean);
|
|
|
+ second_msg_lv.setAdapter(mComDocGriddataOutAdapter);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
LogUtil.prinlnLongMsg("mGridconfigsBean", mGridconfigsBean.toString());
|
|
|
}
|
|
|
}
|
|
|
@@ -754,6 +743,16 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 是否显示签名按钮
|
|
|
+ * @param formdataArray
|
|
|
+ * @param mFormconfigsBean
|
|
|
+ */
|
|
|
+ private void showSignStatus(JSONArray formdataArray, List<CommonDocAMBean.DatasBean.FormconfigsBean> mFormconfigsBean) {
|
|
|
+ LogUtil.prinlnLongMsg("mFormconfigsBean", mFormconfigsBean.toString());
|
|
|
+ LogUtil.prinlnLongMsg("formdataArray",formdataArray.toString());
|
|
|
+ }
|
|
|
+
|
|
|
private void sureDevice() {
|
|
|
progressDialog.show();
|
|
|
//请求获取单据审批流数据
|
|
|
@@ -776,53 +775,31 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
if (real_status.equals("已审核")) {
|
|
|
status_tv.setTextColor(getApplicationContext().getResources().getColor(R.color.approval));
|
|
|
status_tv.setText(getString(R.string.status_approved));
|
|
|
- resanddel_ll.setVisibility(View.GONE);
|
|
|
} else if (real_status.equals("已提交")) {
|
|
|
|
|
|
if (!TextUtils.isEmpty(last_status) && last_status.equals("已审核")) {
|
|
|
status_tv.setTextColor(getApplicationContext().getResources().getColor(R.color.approval));
|
|
|
status_tv.setText(getString(R.string.status_approved));
|
|
|
- resanddel_ll.setVisibility(View.GONE);
|
|
|
} else {
|
|
|
status_tv.setTextColor(getApplicationContext().getResources().getColor(R.color.no_approval));
|
|
|
status_tv.setText(getString(R.string.status_pending));
|
|
|
- resanddel_ll.setVisibility(View.VISIBLE);
|
|
|
}
|
|
|
|
|
|
} else if (real_status.equals("在录入")) {
|
|
|
status_tv.setTextColor(getApplicationContext().getResources().getColor(R.color.titleBlue));
|
|
|
status_tv.setText(getString(R.string.status_unsubmit));
|
|
|
- resanddel_ll.setVisibility(View.VISIBLE);
|
|
|
}
|
|
|
}
|
|
|
if (device) {
|
|
|
LogUtil.i("real_status=" + real_status);
|
|
|
//只有故障单有按钮
|
|
|
if (real_status.equals("已审核") && !StringUtil.isEmpty(mCaller) && mCaller.equals("DeviceChange!Inspect")) {
|
|
|
- resanddel_ll.setVisibility(View.GONE);
|
|
|
- deviceLL.setVisibility(View.VISIBLE);
|
|
|
- sureTv.setOnClickListener(mOnClickListener);
|
|
|
- turnScrapTv.setVisibility(View.VISIBLE);
|
|
|
- turnScrapTv.setOnClickListener(mOnClickListener);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
- private View.OnClickListener mOnClickListener = new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View v) {
|
|
|
- int id = v.getId();
|
|
|
- if (id == R.id.sureTv) {
|
|
|
- sureDevice();
|
|
|
- } else if (id == R.id.turnScrapTv) {
|
|
|
- deviceTurnScrap();
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 处理请求审批流url后获取到的数据并显示
|
|
|
*
|
|
|
@@ -1100,82 +1077,9 @@ public class ZeTianDocDetailsActivity extends BaseActivity {
|
|
|
if ((!ListUtils.isEmpty(mCommonApprovalFlowBean.getNodes()) && !ListUtils.isEmpty(mCommonApprovalFlowBean.getData()) &&
|
|
|
mCommonApprovalFlowBean.getData().size() == mCommonApprovalFlowBean.getNodes().size())
|
|
|
&& mCommonApprovalFlowBean.getNodes().get(mCommonApprovalFlowBean.getNodes().size() - 1).getJn_dealResult().equals("同意")) {
|
|
|
- resanddel_ll.setVisibility(View.GONE);
|
|
|
- approval_ll.setVisibility(View.GONE);
|
|
|
} else {
|
|
|
- approval_ll.setVisibility(View.GONE);
|
|
|
- resubmit_ll.setOnClickListener(new View.OnClickListener() { // 重新提交
|
|
|
- @Override
|
|
|
- public void onClick(View v) {
|
|
|
- if ((device||form_new_bill) && StringUtil.getText(status_tv).equals(getString(R.string.status_pending))) {
|
|
|
- reSubmit();
|
|
|
- } else if (ListUtils.isEmpty(mCommonApprovalFlowBean.getProcesss())
|
|
|
- && ListUtils.isEmpty(mCommonApprovalFlowBean.getNodes())
|
|
|
- && ListUtils.isEmpty(mCommonApprovalFlowBean.getData())) { //在录入状态不反提交
|
|
|
- startActivity(new Intent(ZeTianDocDetailsActivity.this, device ? DeviceDataFormAddActivity.class : DataFormDetailActivity.class)
|
|
|
- .putExtra("caller", mCaller)
|
|
|
- .putExtra("id", mkeyValue)
|
|
|
- .putExtra("title", mTitle)
|
|
|
- .putExtra("submittype", "dosubmit"));
|
|
|
- setResult(0x21);
|
|
|
- finish();
|
|
|
-
|
|
|
- } else { //已提交状态可进行反提交
|
|
|
- reSubmit();
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
}
|
|
|
- // 删除
|
|
|
- delete_ll.setOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View v) {
|
|
|
- if (!TextUtils.isEmpty(real_status) && real_status.equals("在录入")) {
|
|
|
- PopupWindowHelper.showAlart(ZeTianDocDetailsActivity.this,
|
|
|
- getString(R.string.common_notice), getString(R.string.delete_doc_notice2),
|
|
|
- new PopupWindowHelper.OnSelectListener() {
|
|
|
- @Override
|
|
|
- public void select(boolean selectOk) {
|
|
|
- if (selectOk) {
|
|
|
- DeleteComDocRequest(mCaller, mkeyValue);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- } else if (!TextUtils.isEmpty(real_status) && real_status.equals("已提交")) {
|
|
|
- PopupWindowHelper.showAlart(ZeTianDocDetailsActivity.this,
|
|
|
- getString(R.string.common_notice), getString(R.string.delete_sumited_notice1),
|
|
|
- new PopupWindowHelper.OnSelectListener() {
|
|
|
- @Override
|
|
|
- public void select(boolean selectOk) {
|
|
|
- if (selectOk) {
|
|
|
- if (device && "DeviceChange!Inspect".equals(mCaller)) {
|
|
|
- ToastUtil.showToast(ct, "送检单不允许删除");
|
|
|
- } else {
|
|
|
- progressDialog.show();
|
|
|
- Map<String, Object> params = new HashMap<>();
|
|
|
- params.put("caller", mCaller);
|
|
|
- params.put("id", mkeyValue);
|
|
|
- LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
|
|
|
- headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
|
|
|
- String url = "";
|
|
|
- if ("ExtraWork$".equals(mCaller)) { // 新的加班单反提交
|
|
|
- url = CommonUtil.getAppBaseUrl(ct) + "/hr/attendance/resSubmitExtraWork.action";
|
|
|
- ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, New_DOC_REDELETE_SUCCESSFUL, null, null, "post");
|
|
|
- } else if ("FeePlease!FYBX".equals(mCaller)) {
|
|
|
- url = CommonUtil.getAppBaseUrl(ct) + "oa/fee/resSubmitFeePlease.action";
|
|
|
- ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, 0x02, null, null, "post");
|
|
|
- } else { // 通用老的反提交s
|
|
|
- url = CommonUtil.getAppBaseUrl(ct) + "/mobile/commonres.action";
|
|
|
- ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, COM_DOC_REDELETE_SUCCESSFUL, null, null, "post");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void reSubmit() {
|