Commit 6477e57f by 罗翻

修改收取费用打开,但是不填写费用导致支付的bug

parent 876a40e8
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
android:hint="@{presenter.mHint}" android:hint="@{presenter.mHint}"
android:paddingLeft="@dimen/dp_13" android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_17" android:paddingTop="@dimen/dp_17"
android:maxEms="200" android:maxLength="200"
android:text="@={presenter.mComment}" android:text="@={presenter.mComment}"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui" android:textColorHint="@color/cl_selector_hui"
......
...@@ -289,20 +289,23 @@ ...@@ -289,20 +289,23 @@
<string name="order_num">工单编号</string> <string name="order_num">工单编号</string>
<string name="order_state">工单状态</string> <string name="order_state">工单状态</string>
<string name="server_name">服务名称</string> <string name="server_name">服务名称</string>
<string name="prodcut">&#160;&#160;&#160;&#160;&#160;&#160;</string> <string name="prodcut">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="prodcut_type">&#160;&#160;&#160;&#160;&#160;&#160;</string> <string name="prodcut_type">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="door_time">上门时间</string> <string name="door_time">上门时间</string>
<string name="order_remark">工单备注</string> <string name="order_remark">工单备注</string>
<string name="order_attachment">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;件:</string> <string name="server_content">服务内容</string>
<string name="order_attachment">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="customer_info">客户信息</string> <string name="customer_info">客户信息</string>
<string name="customer_type">客户类型</string> <string name="customer_type">客户类型</string>
<string name="customer_name">客户姓名</string> <string name="customer_name">客户姓名</string>
<string name="check_signature">查看签名</string>
<string name="lookforword_time">期望时间</string> <string name="lookforword_time">期望时间</string>
<string name="money_info">费用信息</string>
<string name="prodcut_info">产品信息</string> <string name="prodcut_info">产品信息</string>
<string name="prodcut_brand">&#160;&#160;&#160;&#160;&#160;&#160;</string> <string name="prodcut_brand">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="prodcut_num">&#160;&#160;&#160;&#160;&#160;&#160;</string> <string name="prodcut_num">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="quality_assurance_info">质保信息</string> <string name="quality_assurance_info">质保信息</string>
<string name="sn_num">SN&#160;&#160;&#160;&#160;</string> <string name="sn_num">SN&#160;&#160;&#160;&#160;&#160;&#160;</string>
<string name="charge_record">收费记录</string> <string name="charge_record">收费记录</string>
<string name="total_money">总金额数</string> <string name="total_money">总金额数</string>
<string name="total_price">总金额</string> <string name="total_price">总金额</string>
......
...@@ -54,6 +54,8 @@ public interface ProcessOrderContract { ...@@ -54,6 +54,8 @@ public interface ProcessOrderContract {
void showSelectPayerDialog(OnCloseListener listener); void showSelectPayerDialog(OnCloseListener listener);
ArrayList<String> getSnImages(); ArrayList<String> getSnImages();
String getTotalMoney();
} }
abstract class Presenter extends BasePresenter<View> { abstract class Presenter extends BasePresenter<View> {
......
...@@ -161,7 +161,6 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter { ...@@ -161,7 +161,6 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
params.put("doorPriceComment", doorPriceComment); params.put("doorPriceComment", doorPriceComment);
params.put("engineerId", engineerId); params.put("engineerId", engineerId);
params.put("id", orderId); params.put("id", orderId);
params.put("isPay", isPay);
params.put("materialCost", materialCost); params.put("materialCost", materialCost);
params.put("materialCostComment", ""); params.put("materialCostComment", "");
params.put("otherPrice", otherPrice); params.put("otherPrice", otherPrice);
...@@ -205,6 +204,11 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter { ...@@ -205,6 +204,11 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
params.put("picsCost", null); params.put("picsCost", null);
} }
String totalMoney = mView.getTotalMoney();
if (!TextUtils.isEmpty(totalMoney) && Double.parseDouble(totalMoney) == 0.00 || TextUtils.isEmpty(totalMoney)) {
isPay = 1;
}
params.put("isPay", isPay);
JSONObject jsonObject = new JSONObject(params); JSONObject jsonObject = new JSONObject(params);
RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString()); RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonObject.toString());
OrderApiFactory.commitOrder(body).subscribe(baseObserver(integer -> { OrderApiFactory.commitOrder(body).subscribe(baseObserver(integer -> {
......
...@@ -88,14 +88,14 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent ...@@ -88,14 +88,14 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
mIvWeight = (UtilsScreen.getScreenWidth(mActivity) - UtilsScreen.dip2px(mActivity, 20)) / 5; mIvWeight = (UtilsScreen.getScreenWidth(mActivity) - UtilsScreen.dip2px(mActivity, 20)) / 5;
mBind.recyclerView.mCoreAdapter.addFooterViewType(R.layout.item_multi_process_foot, null); mBind.recyclerView.mCoreAdapter.addFooterViewType(R.layout.item_multi_process_foot, null);
View view = LayoutInflater.from(mActivity).inflate(R.layout.item_multi_process_foot, null); View view = LayoutInflater.from(mActivity).inflate(R.layout.item_multi_process_foot, null);
mBind.recyclerView.mCoreAdapter.addFootViwe(view,R.layout.item_multi_process_foot); mBind.recyclerView.mCoreAdapter.addFootViwe(view, R.layout.item_multi_process_foot);
initFootView(view); initFootView(view);
} }
public void initFootView(View view) { public void initFootView(View view) {
swtich = view.findViewById(R.id.iv_switch); swtich = view.findViewById(R.id.iv_switch);
RelativeLayout rlPay = view.findViewById(R.id.rl_pay); RelativeLayout rlPay = view.findViewById(R.id.rl_pay);
mSignature= view.findViewById(R.id.rl_signature); mSignature = view.findViewById(R.id.rl_signature);
mDoorPrice = view.findViewById(R.id.et_door_price); mDoorPrice = view.findViewById(R.id.et_door_price);
mServerPrice = view.findViewById(R.id.et_serve_price); mServerPrice = view.findViewById(R.id.et_serve_price);
mMaterialsPrice = view.findViewById(R.id.et_materials_price); mMaterialsPrice = view.findViewById(R.id.et_materials_price);
...@@ -220,6 +220,10 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent ...@@ -220,6 +220,10 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
} else { } else {
repairType = 2; repairType = 2;
} }
String totalMoney = mTotalMoney.getText().toString().trim();
if (!TextUtils.isEmpty(totalMoney) && Double.parseDouble(totalMoney) == 0.00 || TextUtils.isEmpty(totalMoney)) {
isPay = 1;
}
params.put("repairType", repairType); params.put("repairType", repairType);
params.put("isPay", isPay); params.put("isPay", isPay);
return params; return params;
......
...@@ -306,6 +306,11 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac ...@@ -306,6 +306,11 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac
} }
@Override @Override
public String getTotalMoney() {
return mBind.tvTotalMoney.getText().toString().trim();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) { if (resultCode == RESULT_OK) {
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
android:layout_marginLeft="90dp" android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/text_two_text" android:layout_toRightOf="@id/text_two_text"
android:background="@null" android:background="@null"
android:maxEms="50" android:maxLength="50"
android:hint="@string/order_brand_name" android:hint="@string/order_brand_name"
android:text="@={presenter.mBrandName}" android:text="@={presenter.mBrandName}"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
android:layout_marginLeft="75dp" android:layout_marginLeft="75dp"
android:layout_toRightOf="@id/tv_serial_num" android:layout_toRightOf="@id/tv_serial_num"
android:background="@null" android:background="@null"
android:maxEms="50" android:maxLength="50"
android:hint="@string/order_serail_hint" android:hint="@string/order_serail_hint"
android:text="@={presenter.mSn}" android:text="@={presenter.mSn}"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
android:hint="@string/order_hint" android:hint="@string/order_hint"
android:paddingLeft="@dimen/dp_13" android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_11" android:paddingTop="@dimen/dp_11"
android:maxEms="200" android:maxLength="200"
android:text="@={presenter.mInfo}" android:text="@={presenter.mInfo}"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui" android:textColorHint="@color/cl_selector_hui"
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
android:layout_marginLeft="90dp" android:layout_marginLeft="90dp"
android:layout_toRightOf="@id/text_two_text" android:layout_toRightOf="@id/text_two_text"
android:background="@null" android:background="@null"
android:maxEms="50" android:maxLength="50"
android:text='@{!TextUtils.isEmpty(presenter.mDetail.brandName)?presenter.mDetail.brandName:@string/no_data}' android:text='@{!TextUtils.isEmpty(presenter.mDetail.brandName)?presenter.mDetail.brandName:@string/no_data}'
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
android:layout_marginLeft="75dp" android:layout_marginLeft="75dp"
android:layout_toRightOf="@id/tv_serial_num" android:layout_toRightOf="@id/tv_serial_num"
android:background="@null" android:background="@null"
android:maxEms="50" android:maxLength="50"
android:text="@{!TextUtils.isEmpty(presenter.mDetail.sn)?presenter.mDetail.sn:@string/no_data}" android:text="@{!TextUtils.isEmpty(presenter.mDetail.sn)?presenter.mDetail.sn:@string/no_data}"
android:textColor="@color/default_text_color" android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_15" /> android:textSize="@dimen/sp_15" />
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
android:layout_toRightOf="@id/time_subscribe_remark" android:layout_toRightOf="@id/time_subscribe_remark"
android:background="@drawable/subscribe_time_shape" android:background="@drawable/subscribe_time_shape"
android:gravity="top" android:gravity="top"
android:maxEms="200" android:maxLength="200"
android:hint="@string/order_hint" android:hint="@string/order_hint"
android:paddingLeft="@dimen/dp_13" android:paddingLeft="@dimen/dp_13"
android:paddingTop="@dimen/dp_11" android:paddingTop="@dimen/dp_11"
...@@ -750,7 +750,7 @@ ...@@ -750,7 +750,7 @@
android:layout_marginTop="@dimen/dp_17" android:layout_marginTop="@dimen/dp_17"
android:background="@drawable/subscribe_time_shape" android:background="@drawable/subscribe_time_shape"
android:gravity="top" android:gravity="top"
android:maxEms="100" android:maxLength="100"
android:hint="@string/tv_order_other" android:hint="@string/tv_order_other"
android:paddingTop="@dimen/dp_11" android:paddingTop="@dimen/dp_11"
android:text="@{presenter.mOrderField.otherInfo}" android:text="@{presenter.mOrderField.otherInfo}"
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_15" android:layout_marginTop="@dimen/dp_15"
android:text="工单编号:" android:text="@string/order_num"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_num" android:layout_below="@+id/tv_num"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:text="工单状态:" android:text="@string/order_state"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
android:layout_marginLeft="19dp" android:layout_marginLeft="19dp"
android:layout_marginTop="@dimen/dp_15" android:layout_marginTop="@dimen/dp_15"
android:layout_toRightOf="@+id/tv_state" android:layout_toRightOf="@+id/tv_state"
android:text="进行中" android:text="@string/order_doing"
android:textColor="@color/cl_tab_read" android:textColor="@color/cl_tab_read"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_state" android:layout_below="@+id/tv_state"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:text="服务内容:" android:text="@string/server_content"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/ll_server_content" android:layout_below="@+id/ll_server_content"
android:text="上门时间:" android:text="@string/door_time"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_time" android:layout_below="@+id/tv_time"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:text="工单备注:" android:text="@string/order_remark"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
android:layout_height="43dp" android:layout_height="43dp"
android:paddingLeft="15dp" android:paddingLeft="15dp"
android:paddingTop="@dimen/dp_15" android:paddingTop="@dimen/dp_15"
android:text="客户信息" android:text="@string/customer_info"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_15" android:layout_marginTop="@dimen/dp_15"
android:text="客户类型:" android:text="@string/customer_type"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
android:layout_alignBottom="@+id/customer_name" android:layout_alignBottom="@+id/customer_name"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:text="客户姓名:" android:text="@string/customer_name"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
android:gravity="right" android:gravity="right"
android:layout_marginTop="@dimen/dp_15" android:layout_marginTop="@dimen/dp_15"
android:layout_toRightOf="@+id/customer_name" android:layout_toRightOf="@+id/customer_name"
android:text="查看签名" android:text="@string/check_signature"
android:textColor="@color/bg_button" android:textColor="@color/bg_button"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_customer_name" android:layout_below="@+id/tv_customer_name"
android:layout_marginTop="@dimen/dp_15" android:layout_marginTop="@dimen/dp_15"
android:text="联系方式:" android:text="@string/tv_two_text_three"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -306,13 +306,13 @@ ...@@ -306,13 +306,13 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/customer_moblie" android:layout_below="@id/customer_moblie"
android:layout_marginLeft="@dimen/dp_10" android:layout_marginLeft="19dp"
android:layout_marginTop="@dimen/dp_13" android:layout_marginTop="@dimen/dp_13"
android:layout_toRightOf="@+id/tv_customer_mobile" android:layout_toRightOf="@+id/tv_customer_mobile"
android:text='@{item.customerTelphome}' android:text="@{item.customerTelphome}"
android:visibility="@{TextUtils.isEmpty(item.customerTelphome)?View.GONE:View.VISIBLE}" android:visibility="@{TextUtils.isEmpty(item.customerTelphome)?View.GONE:View.VISIBLE}"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textSize="@dimen/sp_13.3" /> android:textSize="14sp" />
<TextView <TextView
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_contact_tel" android:layout_below="@+id/tv_contact_tel"
android:layout_marginTop="@dimen/dp_15" android:layout_marginTop="@dimen/dp_15"
android:text="客户地址:" android:text="@string/tv_two_text_foure"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -363,7 +363,7 @@ ...@@ -363,7 +363,7 @@
android:layout_below="@+id/tv_address" android:layout_below="@+id/tv_address"
android:layout_marginTop="@dimen/dp_15" android:layout_marginTop="@dimen/dp_15"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:text="期望时间:" android:text="@string/lookforword_time"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
android:layout_height="43dp" android:layout_height="43dp"
android:paddingLeft="15dp" android:paddingLeft="15dp"
android:paddingTop="@dimen/dp_15" android:paddingTop="@dimen/dp_15"
android:text="费用信息" android:text="@string/money_info"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
...@@ -402,7 +402,7 @@ ...@@ -402,7 +402,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_15" android:layout_marginTop="@dimen/dp_15"
android:text="费用承担方:" android:text="@string/order_payer"
android:textColor="@color/tv_cl" android:textColor="@color/tv_cl"
android:textSize="14sp" /> android:textSize="14sp" />
......
...@@ -390,7 +390,7 @@ ...@@ -390,7 +390,7 @@
android:background="@drawable/subscribe_time_shape" android:background="@drawable/subscribe_time_shape"
android:gravity="top" android:gravity="top"
android:hint="@string/tv_order_other" android:hint="@string/tv_order_other"
android:maxEms="100" android:maxLength="100"
android:paddingTop="@dimen/dp_11" android:paddingTop="@dimen/dp_11"
android:textColor="@color/cl_home_title_text_color" android:textColor="@color/cl_home_title_text_color"
android:textColorHint="@color/cl_selector_hui" android:textColorHint="@color/cl_selector_hui"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment