FANGLH пре 7 година
родитељ
комит
cdc75e19a2

+ 1 - 195
app_core/common/src/main/res/layout/activity_zetian_docui.xml

@@ -62,6 +62,7 @@
                     android:textSize="@dimen/text_hine" />
 
                 <TextView
+                    android:visibility="gone"
                     android:id="@+id/common_docui_status_tv"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
@@ -195,202 +196,7 @@
 
     </com.core.widget.CustomerScrollView>
 
-    <LinearLayout
-        android:id="@+id/item_common_docui_res_and_del_ll"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="@color/bg_main"
-        android:orientation="horizontal"
-        android:paddingBottom="5dp"
-        android:visibility="gone">
-
-        <LinearLayout
-            android:id="@+id/common_docui_resubmit_ll"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:background="@drawable/selector_me_menu_item_bg"
-            android:gravity="center_horizontal">
-
-            <TextView
-                android:id="@+id/common_docui_resubmit_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:paddingBottom="10dp"
-                android:text="重新提交"
-                android:textColor="@color/titleBlue"
-                android:textSize="18sp" />
 
-        </LinearLayout>
-
-
-        <View
-            android:layout_width="1dp"
-            android:layout_height="20dp"
-            android:layout_gravity="center_vertical"
-            android:background="@color/item_line" />
-
-        <LinearLayout
-            android:id="@+id/common_docui_delete_ll"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:background="@drawable/selector_me_menu_item_bg"
-            android:gravity="center_horizontal">
-
-            <TextView
-                android:id="@+id/common_docui_delete_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:paddingBottom="10dp"
-                android:text="删除"
-                android:textColor="@color/titleBlue"
-                android:textSize="18sp" />
-        </LinearLayout>
-
-    </LinearLayout>
-
-
-    <LinearLayout
-        android:id="@+id/common_docui_agree_and_change_ll"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="@color/bg_main"
-        android:orientation="horizontal"
-        android:paddingBottom="5dp"
-        android:visibility="gone">
-
-        <LinearLayout
-            android:id="@+id/common_docui_agree_ll"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:background="@drawable/selector_me_menu_item_bg"
-            android:gravity="center_horizontal">
-
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:src="@drawable/icon_answer" />
-
-            <TextView
-                android:id="@+id/common_docui_agree_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="10dp"
-                android:gravity="center_horizontal"
-                android:text="同意"
-                android:textColor="@color/titleBlue"
-                android:textSize="18sp" />
-        </LinearLayout>
-
-        <View
-            android:layout_width="1dp"
-            android:layout_height="20dp"
-            android:layout_gravity="center_vertical"
-            android:background="@color/item_line" />
-
-        <LinearLayout
-            android:id="@+id/common_docui_disagree_ll"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:background="@drawable/selector_me_menu_item_bg"
-            android:gravity="center_horizontal">
-
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:src="@drawable/icon_answer" />
-
-            <TextView
-                android:id="@+id/common_docui_disagree_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="10dp"
-                android:gravity="center_horizontal"
-                android:text="不同意"
-                android:textColor="@color/titleBlue"
-                android:textSize="18sp" />
-        </LinearLayout>
-
-        <View
-            android:layout_width="1dp"
-            android:layout_height="20dp"
-            android:layout_gravity="center_vertical"
-            android:background="@color/item_line" />
-
-        <LinearLayout
-            android:id="@+id/common_docui_change_dealman_ll"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:background="@drawable/selector_me_menu_item_bg"
-            android:gravity="center_horizontal">
-
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:src="@drawable/icon_answer" />
-
-            <TextView
-                android:id="@+id/common_docui_change_dealman_tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="8dp"
-                android:layout_marginTop="10dp"
-                android:gravity="center_horizontal"
-                android:text="变更处理人"
-                android:textColor="@color/titleBlue"
-                android:textSize="18sp" />
-        </LinearLayout>
-
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/deviceLL"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:layout_marginTop="10dp"
-        android:visibility="gone"
-        >
-        <TextView
-            android:id="@+id/sureTv"
-            android:layout_width="0dp"
-            android:layout_weight="1"
-            android:layout_height="wrap_content"
-            android:gravity="center"
-            android:paddingBottom="10dp"
-            android:paddingTop="10dp"
-            android:text="@string/common_sure"
-            android:background="@drawable/selector_me_menu_item_bg"
-            android:textColor="@color/titleBlue"
-            android:textSize="18sp" />
-        <TextView
-            android:id="@+id/turnScrapTv"
-            android:layout_width="0dp"
-            android:layout_weight="1"
-            android:layout_height="wrap_content"
-            android:gravity="center"
-            android:paddingBottom="10dp"
-            android:paddingTop="10dp"
-            android:visibility="gone"
-            android:text="转报废申请单"
-            android:background="@drawable/selector_me_menu_item_bg"
-            android:textColor="@color/titleBlue"
-            android:textSize="18sp" />
-    </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

+ 28 - 124
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/ZeTianDocDetailsActivity.java

@@ -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() {

+ 81 - 0
app_modular/appworks/src/main/res/layout/pi_sigature_pop.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:background="@color/white"
+    >
+
+    <RelativeLayout
+        android:layout_margin="5dp"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        >
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="出货单签名"
+            android:textColor="@color/black"
+            android:textSize="16sp"
+            />
+
+        <TextView
+            android:id="@+id/cancel_tv"
+            android:layout_alignParentRight="true"
+            android:layout_width="150dp"
+            android:layout_height="wrap_content"
+            android:text="取消"
+            android:textColor="@color/LightBlue"
+            android:textSize="16sp"
+            android:gravity="right"
+            android:layout_marginRight="20dp"
+            />
+    </RelativeLayout>
+
+    <ImageView
+        android:layout_gravity="right"
+        android:id="@+id/clear_im"
+        android:layout_width="35dp"
+        android:layout_height="35dp"
+        android:src="@drawable/clean"
+        android:layout_marginRight="20dp"
+        android:padding="5dp"/>
+
+    <View
+        android:id="@+id/view3"
+        android:layout_width="match_parent"
+        android:layout_height="2px"
+        android:layout_below="@+id/clear_im"
+        android:layout_marginTop="5dp"
+        android:background="@color/item_line" />
+
+    <com.core.widget.handwritedemo.LinePathView
+        android:id="@+id/sigature_view"
+        android:layout_width="match_parent"
+        android:layout_height="250dp"
+        android:layout_below="@+id/view3"
+        android:layout_gravity="center_horizontal"
+        android:background="#F0F0F0"
+        android:layout_margin="10dp"/>
+    <TextView
+        android:layout_below="@+id/s_rl"
+        android:gravity="center"
+        android:text="签名区域"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="10dp"
+        />
+
+    <Button
+        android:id="@+id/submit_btn"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_margin="20dp"
+        android:background="@drawable/bg_bule_btn"
+        android:padding="10dp"
+        android:text="@string/common_submit_button"
+        android:textColor="@color/white"
+        android:textSize="@dimen/text_main"/>
+
+</LinearLayout>