|
@@ -2,6 +2,7 @@ package com.uas.appworks.activity;
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
|
import android.os.Handler;
|
|
import android.os.Handler;
|
|
|
|
|
+import android.support.annotation.NonNull;
|
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
@@ -9,6 +10,8 @@ import android.view.View;
|
|
|
import android.widget.Button;
|
|
import android.widget.Button;
|
|
|
import android.widget.ImageView;
|
|
import android.widget.ImageView;
|
|
|
|
|
|
|
|
|
|
+import com.afollestad.materialdialogs.DialogAction;
|
|
|
|
|
+import com.afollestad.materialdialogs.MaterialDialog;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -105,7 +108,9 @@ public class CustomerInquiryDetailActivity extends BaseMVPActivity<WorkPlatPrese
|
|
|
mEnuu = intent.getStringExtra(Constants.FLAG.EXTRA_B2B_LIST_ENUU);
|
|
mEnuu = intent.getStringExtra(Constants.FLAG.EXTRA_B2B_LIST_ENUU);
|
|
|
mPhone = intent.getStringExtra(Constants.FLAG.EXTRA_B2B_LIST_TEL);
|
|
mPhone = intent.getStringExtra(Constants.FLAG.EXTRA_B2B_LIST_TEL);
|
|
|
|
|
|
|
|
- if (TextUtils.isEmpty(mEnuu)) {
|
|
|
|
|
|
|
+ if (Constants.FLAG.GET_LOCAL_ENUU.equals(mEnuu)) {
|
|
|
|
|
+ mEnuu = CommonUtil.getSharedPreferences(MyApplication.getInstance(), "erp_uu");
|
|
|
|
|
+ } else {
|
|
|
mEnuu = CommonUtil.getSharedPreferences(mContext, Constants.CACHE.B2B_BUSINESS_ENUU);
|
|
mEnuu = CommonUtil.getSharedPreferences(mContext, Constants.CACHE.B2B_BUSINESS_ENUU);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -254,8 +259,8 @@ public class CustomerInquiryDetailActivity extends BaseMVPActivity<WorkPlatPrese
|
|
|
String title = JSONUtil.getText(productObject, "title");
|
|
String title = JSONUtil.getText(productObject, "title");
|
|
|
String spec = JSONUtil.getText(productObject, "spec");
|
|
String spec = JSONUtil.getText(productObject, "spec");
|
|
|
String code = JSONUtil.getText(productObject, "code");
|
|
String code = JSONUtil.getText(productObject, "code");
|
|
|
- material = code + (TextUtils.isEmpty(title) ? "" : (",\n" + title)
|
|
|
|
|
- + (TextUtils.isEmpty(spec) ? "" : (",\n" + spec)));//物料
|
|
|
|
|
|
|
+ material = code + (TextUtils.isEmpty(title) ? "" : ((TextUtils.isEmpty(code) ? "" : ",\n") + title)
|
|
|
|
|
+ + (TextUtils.isEmpty(spec) ? "" : ((TextUtils.isEmpty(code) ? "" : ",\n") + spec)));//物料
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String currency = JSONUtil.getText(detailObject, "currency");//币别
|
|
String currency = JSONUtil.getText(detailObject, "currency");//币别
|
|
@@ -373,6 +378,19 @@ public class CustomerInquiryDetailActivity extends BaseMVPActivity<WorkPlatPrese
|
|
|
mB2BQuotePriceBeans.add(createB2BQuotePriceBean(0, "", ""));
|
|
mB2BQuotePriceBeans.add(createB2BQuotePriceBean(0, "", ""));
|
|
|
mB2BQuotePriceAdapter.notifyDataSetChanged();
|
|
mB2BQuotePriceAdapter.notifyDataSetChanged();
|
|
|
} else if (i == R.id.customer_inquiry_detail_quote_btn) {
|
|
} else if (i == R.id.customer_inquiry_detail_quote_btn) {
|
|
|
|
|
+ if (TextUtils.isEmpty(mEnuu)) {
|
|
|
|
|
+ new MaterialDialog.Builder(this)
|
|
|
|
|
+ .title(R.string.prompt_title)
|
|
|
|
|
+ .content(R.string.notice_cannot_quote)
|
|
|
|
|
+ .positiveText(R.string.have_knew)
|
|
|
|
|
+ .onPositive(new MaterialDialog.SingleButtonCallback() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onClick(@NonNull MaterialDialog materialDialog, @NonNull DialogAction dialogAction) {
|
|
|
|
|
+ materialDialog.dismiss();
|
|
|
|
|
+ }
|
|
|
|
|
+ }).build().show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
List<B2BQuotePriceBean> b2BQuotePriceBeans = mB2BQuotePriceAdapter.getB2BQuotePriceBeans();
|
|
List<B2BQuotePriceBean> b2BQuotePriceBeans = mB2BQuotePriceAdapter.getB2BQuotePriceBeans();
|
|
|
List<B2BDetailListBean> b2BDetailListBeans = mB2BDetailListAdapter.getB2BDetailListBeans();
|
|
List<B2BDetailListBean> b2BDetailListBeans = mB2BDetailListAdapter.getB2BDetailListBeans();
|
|
|
|
|
|
|
@@ -450,6 +468,7 @@ public class CustomerInquiryDetailActivity extends BaseMVPActivity<WorkPlatPrese
|
|
|
|
|
|
|
|
params.put("useruu", CommonUtil.getSharedPreferences(mContext, "b2b_uu"));
|
|
params.put("useruu", CommonUtil.getSharedPreferences(mContext, "b2b_uu"));
|
|
|
|
|
|
|
|
|
|
+ LogUtil.d("inquiryparam", params.toString());
|
|
|
showLoading(null);
|
|
showLoading(null);
|
|
|
String url = "mobile/sale/inquiry/items/" + mId + "/reply";
|
|
String url = "mobile/sale/inquiry/items/" + mId + "/reply";
|
|
|
String host = new ApiPlatform().getBaseUrl();
|
|
String host = new ApiPlatform().getBaseUrl();
|