Commit f5f245dd by han xu

Merge commit '14388189' into dev_xx_250224_report

parents dde1c7c5 14388189
...@@ -949,12 +949,12 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi ...@@ -949,12 +949,12 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
switch (which){ switch (which){
case 0 :{ case 0 :{
LocationUtils.openMap_gaode(mContext, address, OrderAdapter.this::showOpenMarketDialog); LocationUtils.openMap_gaode(mContext, address, OrderAdapter.this::showOpenMarketDialog_gaode);
break; break;
} }
case 1 :{ case 1 :{
LocationUtils.openMap_baidu(mContext, address, OrderAdapter.this::showOpenMarketDialog); LocationUtils.openMap_baidu(mContext, address, OrderAdapter.this::showOpenMarketDialog_baidu);
break; break;
} }
default: default:
...@@ -981,6 +981,34 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi ...@@ -981,6 +981,34 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
} }
private void showOpenMarketDialog_gaode() {
CustomDialog customDialog = new CustomDialog(mContext, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket_gaode(mContext);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
private void showOpenMarketDialog_baidu() {
CustomDialog customDialog = new CustomDialog(mContext, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
, (dialog, confirm) -> {
if (confirm) {
LocationUtils.goToMarket_baidu(mContext);
}
});
customDialog.setTitle(UIUtils.getString(R.string.reminder))
.setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
}
private void showMoblieDialog(String mobile, String tel, int id) { private void showMoblieDialog(String mobile, String tel, int id) {
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
list.add(mobile); list.add(mobile);
......
...@@ -112,6 +112,8 @@ public class OrderServerClockAdapter extends CoreAdapter<OrderDetail.RecordBean, ...@@ -112,6 +112,8 @@ public class OrderServerClockAdapter extends CoreAdapter<OrderDetail.RecordBean,
} }
// if (UIUtils.getString(R.string.check_accept).equals(item.getCommentName()) || UIUtils.getString(R.string.system_chcek).equals(item.getOperation())) { // if (UIUtils.getString(R.string.check_accept).equals(item.getCommentName()) || UIUtils.getString(R.string.system_chcek).equals(item.getOperation())) {
if (UIUtils.getString(R.string.system_chcek).equals(item.getOperation())) { if (UIUtils.getString(R.string.system_chcek).equals(item.getOperation())) {
if (mDetail.getCreatedSource() == 2 || mDetail.getCreatedSource() == 3 || mDetail.getCreatedSource() == 4) { if (mDetail.getCreatedSource() == 2 || mDetail.getCreatedSource() == 3 || mDetail.getCreatedSource() == 4) {
......
...@@ -44,6 +44,7 @@ import com.dayu.order.databinding.ItemAccessoriesLayoutBinding; ...@@ -44,6 +44,7 @@ import com.dayu.order.databinding.ItemAccessoriesLayoutBinding;
import com.dayu.order.databinding.ItemDetailDeviceCountBinding; import com.dayu.order.databinding.ItemDetailDeviceCountBinding;
import com.dayu.order.databinding.ItemDetailServerInfoBinding; import com.dayu.order.databinding.ItemDetailServerInfoBinding;
import com.dayu.order.ui.activity.PdfWebViewActivity; import com.dayu.order.ui.activity.PdfWebViewActivity;
import com.dayu.order.ui.adapter.OrderAdapter;
import com.dayu.order.ui.view.ToolImageDialog; import com.dayu.order.ui.view.ToolImageDialog;
import com.dayu.provider.event.TakeOrderSuccessEvent; import com.dayu.provider.event.TakeOrderSuccessEvent;
import com.dayu.provider.router.RouterPath; import com.dayu.provider.router.RouterPath;
...@@ -148,8 +149,11 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag ...@@ -148,8 +149,11 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag
mBind.tvNoDevice.setVisibility(View.VISIBLE); mBind.tvNoDevice.setVisibility(View.VISIBLE);
} }
mBind.navigation.setOnClickListener(v -> LocationUtils.openMap(mActivity, detail.getProvinceName() // mBind.navigation.setOnClickListener(v -> LocationUtils.openMap(mActivity, detail.getProvinceName()
+ detail.getCityName() + detail.getDistrictName() + detail.getAddress(), this::showOpenMarketDialog)); // + detail.getCityName() + detail.getDistrictName() + detail.getAddress(), this::showOpenMarketDialog));
mBind.navigation.setOnClickListener(v-> this.showOpenMarketDialog_select(detail.getProvinceName()
+ detail.getCityName() + detail.getDistrictName() + detail.getAddress()));
// mServerAdapter.setOnItemClickListener(new OnItemClickListener<Spu, ItemDetailServerInfoBinding>() { // mServerAdapter.setOnItemClickListener(new OnItemClickListener<Spu, ItemDetailServerInfoBinding>() {
// @Override // @Override
// public void OnItemClick(Spu item, ItemDetailServerInfoBinding bind) { // public void OnItemClick(Spu item, ItemDetailServerInfoBinding bind) {
...@@ -326,6 +330,35 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag ...@@ -326,6 +330,35 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag
})); }));
} }
private void showOpenMarketDialog_select(String address) {
final String[] items={"高德地图","百度地图"};
AlertDialog dialog=new AlertDialog.Builder(getContext()).setItems(items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// Toast.makeText(getContext(), items[which], Toast.LENGTH_SHORT).show();
//复杂的业务逻辑
// Mytask( items[which]);
switch (which){
case 0 :{
LocationUtils.openMap_gaode(getContext(), address, MultiOrderDetailFragment.this::showOpenMarketDialog_gaode);
break;
}
case 1 :{
LocationUtils.openMap_baidu(getContext(), address, MultiOrderDetailFragment.this::showOpenMarketDialog_baidu);
break;
}
default:
}
}
}).create();
dialog.setTitle("选择打开地图:");
dialog.show();
}
//小绿人相关信息 //小绿人相关信息
private void initInfoView(OrderDetail detail) { private void initInfoView(OrderDetail detail) {
mBind.llSiteInfo.setVisibility(View.VISIBLE); mBind.llSiteInfo.setVisibility(View.VISIBLE);
...@@ -567,39 +600,32 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag ...@@ -567,39 +600,32 @@ public class MultiOrderDetailFragment extends BaseFragment<SImplePresenter, Frag
} }
private void showOpenMarketDialog() { private void showOpenMarketDialog() {
// CustomDialog customDialog = new CustomDialog(mActivity, R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice) }
// , (dialog, confirm) -> { private void showOpenMarketDialog_gaode() {
// if (confirm) { CustomDialog customDialog = new CustomDialog(getContext(), R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
// LocationUtils.goToMarket(mActivity); , (dialog, confirm) -> {
// } if (confirm) {
// }); LocationUtils.goToMarket_gaode(getContext());
// customDialog.setTitle(UIUtils.getString(R.string.reminder)) }
// .setPositiveButton(UIUtils.getString(R.string.go_download)) });
// .setNegativeButton(UIUtils.getString(R.string.cancle)); customDialog.setTitle(UIUtils.getString(R.string.reminder))
// customDialog.show(); .setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
// 选择项的文字 customDialog.show();
// String[] items = {"选项1", "选项2", "选项3", "选项4"};
// 记录选择状态的布尔数组
// boolean[] checkedItems = new boolean[items.length];
// 创建AlertDialog.Builder
// AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
final String[] items={"打开高德地图","打开百度地图"}; }
AlertDialog.Builder builder=new AlertDialog.Builder(getContext());
builder.setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {
@Override private void showOpenMarketDialog_baidu() {
public void onClick(DialogInterface dialog, int which) { CustomDialog customDialog = new CustomDialog(getContext(), R.style.CustomDialog, UIUtils.getString(R.string.download_gaode_notice)
Toast.makeText(getContext(), items[which], Toast.LENGTH_SHORT).show(); , (dialog, confirm) -> {
dialog.dismiss(); if (confirm) {
LocationUtils.goToMarket_baidu(getContext());
} }
}); });
AlertDialog dialog= builder.create(); customDialog.setTitle(UIUtils.getString(R.string.reminder))
dialog.show(); .setPositiveButton(UIUtils.getString(R.string.go_download))
.setNegativeButton(UIUtils.getString(R.string.cancle));
customDialog.show();
} }
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:paddingEnd="10dp" android:paddingEnd="10dp"
android:text="上传/拍照" /> android:text="上传/拍照(正面)" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:paddingEnd="10dp" android:paddingEnd="10dp"
android:text="上传/拍照" /> android:text="上传/拍照(反面)" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
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