Commit f4054c77 authored by 陈前's avatar 陈前

临库

parent e1567729
...@@ -75,9 +75,18 @@ ...@@ -75,9 +75,18 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustUnspecified|stateHidden" /> android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity android:name=".ui.help.HelpActivity" /> <activity
<activity android:name=".ui.feedback.FeedBackActivity" /> android:name=".ui.help.HelpActivity"
<activity android:name=".ui.statistics.StatisticsActivity" /> android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.feedback.FeedBackActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.statistics.StatisticsActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity <activity
android:name=".ui.vip.VipActivity" android:name=".ui.vip.VipActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden" android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
...@@ -88,11 +97,18 @@ ...@@ -88,11 +97,18 @@
android:name=".ui.marketing.ms.MsActivity" android:name=".ui.marketing.ms.MsActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden" android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" /> android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.manage.otherselect.OtherSelectActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity <activity
android:name=".ui.manage.manageMenu.ManageMenuActivity" android:name=".ui.manage.manageMenu.ManageMenuActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden" android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" /> android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity android:name=".ui.manage.replenishment.ReplenishmentActivity"></activity> <activity
android:name=".ui.manage.replenishment.ReplenishmentActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
</application> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -11,6 +11,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter; ...@@ -11,6 +11,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.databinding.ActivityMarketingMenuBinding; import com.xingdata.zzdpos.databinding.ActivityMarketingMenuBinding;
import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectActivity;
import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentActivity; import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentActivity;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity; import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity;
import com.xingdata.zzdpos.ui.marketing.marketingMenu.MarketingMenuActivity; import com.xingdata.zzdpos.ui.marketing.marketingMenu.MarketingMenuActivity;
...@@ -74,7 +75,7 @@ public class ManageMenuActivity extends AppCompatActivity { ...@@ -74,7 +75,7 @@ public class ManageMenuActivity extends AppCompatActivity {
} }
break; break;
case C.MENU.MENU_MANAGER_OTHER: { case C.MENU.MENU_MANAGER_OTHER: {
ActivityUtils.startActivity(ManageMenuActivity.this, OtherSelectActivity.class);
} }
break; break;
case C.MENU.MENU_MANAGER_INVENTORY: { case C.MENU.MENU_MANAGER_INVENTORY: {
......
package com.xingdata.zzdpos.ui.manage.otherselect;
import android.view.KeyEvent;
import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityOtherSelectBinding;
import com.xingdata.zzdpos.model.Ossku;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.ui.manage.otherselect.fragment.OtherListFragment;
public class OtherSelectActivity extends BaseActivity<OtherSelectPresenter, ActivityOtherSelectBinding> implements OtherSelectContract.View {
private OtherListFragment mOtherListFragment = new OtherListFragment();
@Override
public int getLayoutId() {
return R.layout.activity_other_select;
}
@Override
public void initView() {
loadRootFragment(R.id.fragment_container, mOtherListFragment, false, false);
mViewBinding.lyTitle.edTitle.setOnKeyListener((v, keyCode, event) -> {
if (keyCode == KeyEvent.KEYCODE_ENTER)
search(mViewBinding.lyTitle.edTitle.getText().toString().trim());
return false;
});
}
@Override
public void isShowLoading(Boolean is) {
}
@Override
public void loadOssku(Pager<Ossku> osskuList, boolean isRefresh) {
mOtherListFragment.setData(osskuList, isRefresh);
}
@Override
protected void onPause() {
KeyboardUtils.hideSoftInput(this);
super.onPause();
}
private void search(String string) {
KeyboardUtils.hideSoftInput(this);
if (string.length() == 0) {
ToastUtils.showShort("请输入搜索内容");
return;
}
mPresenter.searchGoodsFirst(string);
}
}
package com.xingdata.zzdpos.ui.manage.otherselect;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Ossku;
import com.xingdata.zzdpos.model.Pager;
/**
* Created by Eurus on 2017/11/23.
*/
public interface OtherSelectContract {
interface View extends BaseView {
void isShowLoading(Boolean is);
/**
* 加载列表
*/
void loadOssku(Pager<Ossku> osskuList, boolean isRefresh);
}
abstract class Presenter extends BasePresenter<View> {
/**
* 临库查询界面 - 查找
*
* @param keyword 搜索关键字
*/
public abstract void searchGoodsFirst(String keyword);
/**
* 临库查询界面 - 查找
*
* @param keyword 搜索关键字
*/
abstract void searchGoods(String keyword);
/**
* 临库查询页面 - 加载更多
*/
public abstract void loadMore();
/**
* 临库查询页面 - 刷新
*/
public abstract void refresh();
}
}
package com.xingdata.zzdpos.ui.manage.otherselect;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.api.ApiFactory;
public class OtherSelectPresenter extends OtherSelectContract.Presenter {
private int nowPageNumber = 1;
private int nowPageSize = 10;
private String wd;
@Override
public void onAttached() {
}
@Override
public void searchGoodsFirst(String keyword) {
wd = keyword;
nowPageNumber = 1;
searchGoods(wd);
}
@Override
void searchGoods(String keyword) {
mView.isShowLoading(true);
ApiFactory.Sssku.getOtherShopSsku(keyword, nowPageNumber, nowPageSize).doFinally(() -> {
mView.isShowLoading(false);
})
.subscribe(osskus -> {
if (osskus.getTotalRow() == 0) {
ToastUtils.showShort("没有搜到当前商品,请重新输入");
}
//判断是否能加载更多
mView.loadOssku(osskus, nowPageNumber == 1);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
@Override
public void loadMore() {
this.nowPageNumber++;
searchGoods(wd);
}
@Override
public void refresh() {
this.nowPageNumber = 1;
searchGoods(wd);
}
}
package com.xingdata.zzdpos.ui.manage.otherselect.adpter;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.ViewGroup;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemOtherSelectBinding;
import com.xingdata.zzdpos.model.Ossku;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.List;
public class OtherSelectAdapter extends BaseAdapter<Ossku, ItemOtherSelectBinding> {
public OtherSelectAdapter(@Nullable List<Ossku> data) {
super(R.layout.item_other_select, data);
}
@Override
protected void convert(ItemOtherSelectBinding mViewBinding, Ossku item) {
mViewBinding.tvGoodsName.setText(item.getSpuName());
mViewBinding.tvGoodsCode.setText(item.getSpuBarcode() + "");
// mViewBinding.tvGoodsPrice.setText(ConvertUtil.fenToYuan(item.getSkuRetailPrice1(), false));
mViewBinding.tvGoodsSize.setText("规格/" + item.getSpuUnitName());
mViewBinding.imgGoods.setImageURI(item.getSpuImg());
// mViewBinding.tvNum.setText(item.getSkuStock() + "个");
mViewBinding.tvShop.setText(item.getShopName());
// mViewBinding.tvAddress.setText(item.getCityAddress());
// mViewBinding.tvTel.setText(item.getContactTel());
}
}
package com.xingdata.zzdpos.ui.manage.otherselect.fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentOtherListBinding;
import com.xingdata.zzdpos.model.Ossku;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectPresenter;
import com.xingdata.zzdpos.ui.manage.otherselect.adpter.OtherSelectAdapter;
import java.util.ArrayList;
/**
* Created by Administrator on 2017/11/23.
*/
public class OtherDetailFragment extends BaseFragment<OtherSelectPresenter, FragmentOtherListBinding> {
private OtherSelectAdapter mOtherSelectAdapter;
@Override
public int getLayoutId() {
return R.layout.fragment_other_list;
}
@Override
public void initView() {
mOtherSelectAdapter = new OtherSelectAdapter(new ArrayList<>());
mOtherSelectAdapter.setEmptyView(getEmptyView(R.string.empty_other_select));
mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.recyclerOtherSelcet.setAdapter(mOtherSelectAdapter);
mOtherSelectAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
// Intent intent = new Intent(getActivity(), StatisticsDetailActivity.class);
// intent.putExtra(Saleorder.class.getName(), mStatisticsAdapter.getData().get(position).getId());
// ActivityUtils.startActivity(intent);
}
});
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
mOtherSelectAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.recyclerOtherSelcet);
}
private void onRefresh() {
mPresenter.refresh();
}
private void onLoadMore() {
mPresenter.loadMore();
}
/**
* 设置数据
*
* @param pager 数据
* @param isRefresh 是否刷新
*/
public void setData(Pager<Ossku> pager, boolean isRefresh) {
if (isRefresh) {
mOtherSelectAdapter.setEnableLoadMore(true);
mViewBinding.srlProduct.setRefreshing(false);
}
if (isRefresh) mOtherSelectAdapter.setNewData(pager.getList());
else if (pager.getList().size() > 0) mOtherSelectAdapter.addData(pager.getList());
if (pager.isLastPage()) mOtherSelectAdapter.loadMoreEnd(isRefresh);
else mOtherSelectAdapter.loadMoreComplete();
}
private View getEmptyView(int resHint) {
View view = getLayoutInflater().inflate(R.layout.view_empty, null);
view.setBackgroundResource(R.color.white_caocao);
((TextView) view.findViewById(R.id.tv_empty)).setText(resHint);
return view;
}
}
package com.xingdata.zzdpos.ui.manage.otherselect.fragment;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.KeyEvent;
import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentOrderListBinding;
import com.xingdata.zzdpos.databinding.FragmentOtherListBinding;
import com.xingdata.zzdpos.model.Ossku;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectPresenter;
import com.xingdata.zzdpos.ui.manage.otherselect.adpter.OtherSelectAdapter;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Administrator on 2017/11/23.
*/
public class OtherListFragment extends BaseFragment<OtherSelectPresenter, FragmentOtherListBinding> {
private OtherSelectAdapter mOtherSelectAdapter;
@Override
public int getLayoutId() {
return R.layout.fragment_other_list;
}
@Override
public void initView() {
mOtherSelectAdapter = new OtherSelectAdapter(new ArrayList<>());
mOtherSelectAdapter.setEmptyView(getEmptyView(R.string.empty_other_select));
mViewBinding.recyclerOtherSelcet.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.recyclerOtherSelcet.setAdapter(mOtherSelectAdapter);
mOtherSelectAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
// Intent intent = new Intent(getActivity(), StatisticsDetailActivity.class);
// intent.putExtra(Saleorder.class.getName(), mStatisticsAdapter.getData().get(position).getId());
// ActivityUtils.startActivity(intent);
}
});
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
mOtherSelectAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.recyclerOtherSelcet);
}
private void onRefresh() {
mPresenter.refresh();
}
private void onLoadMore() {
mPresenter.loadMore();
}
/**
* 设置数据
*
* @param pager 数据
* @param isRefresh 是否刷新
*/
public void setData(Pager<Ossku> pager, boolean isRefresh) {
if (isRefresh) {
mOtherSelectAdapter.setEnableLoadMore(true);
mViewBinding.srlProduct.setRefreshing(false);
}
if (isRefresh) mOtherSelectAdapter.setNewData(pager.getList());
else if (pager.getList().size() > 0) mOtherSelectAdapter.addData(pager.getList());
if (pager.isLastPage()) mOtherSelectAdapter.loadMoreEnd(isRefresh);
else mOtherSelectAdapter.loadMoreComplete();
}
private View getEmptyView(int resHint) {
View view = getLayoutInflater().inflate(R.layout.view_empty, null);
view.setBackgroundResource(R.color.white_caocao);
((TextView) view.findViewById(R.id.tv_empty)).setText(resHint);
return view;
}
}
...@@ -34,7 +34,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -34,7 +34,7 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
@Override @Override
public void addPsbSuc() { public void addPsbSuc() {
// mReplenishmentDetailFragment.pop(); mReplenishmentDetailFragment.pop();
mPresenter.refreshPsb(); mPresenter.refreshPsb();
} }
...@@ -62,12 +62,11 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter, ...@@ -62,12 +62,11 @@ public class ReplenishmentActivity extends BaseActivity<ReplenishmentPresenter,
@Override @Override
public void openReplenishmentDetailFragment(Psb psb) { public void openReplenishmentDetailFragment(Psb psb) {
// if (isAllowFragment) { if (isAllowFragment) {
// isAllowFragment = false; isAllowFragment = false;
// mReplenishmentDetailFragment.setPsb(psb); mReplenishmentDetailFragment.setPsb(psb);
// start(mReplenishmentDetailFragment); start(mReplenishmentDetailFragment);
// }
// }
} }
......
...@@ -82,11 +82,7 @@ public class ReplenishmentPresenter extends ReplenishmentContract.Presenter { ...@@ -82,11 +82,7 @@ public class ReplenishmentPresenter extends ReplenishmentContract.Presenter {
mView.isShowLoading(false); mView.isShowLoading(false);
}) })
.subscribe(psbNew -> { .subscribe(psbNew -> {
// psbNew.setOutChannelNameabcn(psb.getOutChannelNameabcn());
// psbNew.setCityAddress(psb.getCityAddress());
// psbNew.setCityProvName(psb.getCityProvName());
// psbNew.setCityName(psb.getCityName());
// psbNew.setCityCountyName(psb.getCityCountyName());
mView.openReplenishmentDetailFragment(psbNew); mView.openReplenishmentDetailFragment(psbNew);
}, throwable -> { }, throwable -> {
ToastUtils.showShort(throwable.getMessage()); ToastUtils.showShort(throwable.getMessage());
......
...@@ -3,7 +3,9 @@ package com.xingdata.zzdpos.ui.manage.replenishment.fragment; ...@@ -3,7 +3,9 @@ package com.xingdata.zzdpos.ui.manage.replenishment.fragment;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.renderscript.ScriptGroup;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.text.InputType;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
...@@ -51,11 +53,13 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -51,11 +53,13 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
@Override @Override
public void initView() { public void initView() {
mViewBinding.lyTitle.edTitle.setHint(R.string.inventory_add_et_hint);
Drawable drawableTop = getResources().getDrawable(R.mipmap.but_up); Drawable drawableTop = getResources().getDrawable(R.mipmap.but_up);
Drawable drawableBottom = getResources().getDrawable(R.mipmap.but_unfurled); Drawable drawableBottom = getResources().getDrawable(R.mipmap.but_unfurled);
drawableTop.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10); drawableTop.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10);
drawableBottom.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10); drawableBottom.setBounds(0, 0, (int) mViewBinding.tvShopTitle.getTextSize() - 10, (int) mViewBinding.tvShopTitle.getTextSize() - 10);
mViewBinding.tvShopTitle.setCompoundDrawables(null, null, drawableTop, null); mViewBinding.tvShopTitle.setCompoundDrawables(null, null, drawableTop, null);
mViewBinding.tvSupplierTitle.setCompoundDrawables(null, null, drawableTop, null);
initRecycycler(); initRecycycler();
mViewBinding.tvShopTitle.setOnClickListener(new OnClickListener() { mViewBinding.tvShopTitle.setOnClickListener(new OnClickListener() {
@Override @Override
...@@ -69,42 +73,52 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -69,42 +73,52 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
} }
} }
}); });
// mViewBinding.btnSearch.setOnClickListener(view -> { mViewBinding.tvSupplierTitle.setOnClickListener(new OnClickListener() {
// scrollToItem(mViewBinding.etKeyword.getText().toString().trim()); @Override
// }); protected void myOnClickListener(View v) {
// mViewBinding.etKeyword.setOnKeyListener((v, keyCode, event) -> { if (mViewBinding.llSupplier.getVisibility() != View.VISIBLE) {
// if (keyCode == KeyEvent.KEYCODE_ENTER) mViewBinding.llSupplier.setVisibility(View.VISIBLE);
// scrollToItem(mViewBinding.etKeyword.getText().toString().trim()); mViewBinding.tvSupplierTitle.setCompoundDrawables(null, null, drawableBottom, null);
// return false; } else {
// }); mViewBinding.llSupplier.setVisibility(View.GONE);
// mViewBinding.btnCanel.setOnClickListener(view -> { mViewBinding.tvSupplierTitle.setCompoundDrawables(null, null, drawableTop, null);
// this.pop(); }
// }); }
// });
// mViewBinding.btnEnd.setOnClickListener(view -> { mViewBinding.lyTitle.ivRight.setVisibility(View.GONE);
// if (mPsb == null || mPsb.getPsbStatus() == null) { mViewBinding.lyTitle.edTitle.setOnKeyListener((v, keyCode, event) -> {
// Psb psb = new Psb(); if (keyCode == KeyEvent.KEYCODE_ENTER)
// psb.setPsbType("0"); scrollToItem(mViewBinding.lyTitle.edTitle.getText().toString().trim());
// psb.setSsskuList(mReplenishmentDetailAdapter.getData()); return false;
// mPresenter.clickReplenishmentSubmit(psb); });
// } else { mViewBinding.lyTitle.ivBack.setOnClickListener(view -> {
// switch (mPsb.getPsbStatus()) { this.pop();
// case 3: });
// mPsb.setPsbdetailList(mReplenishmentDetailAdapter.getData());
// mPresenter.clickReplenishmentUpdate(mPsb); mViewBinding.btnOk.setOnClickListener(view -> {
// break; if (mPsb == null || mPsb.getPsbStatus() == null) {
// case 1: Psb psb = new Psb();
// mPresenter.clickReplenishmentConfirm(mPsb.getPsbNo()); psb.setPsbType("0");
// break; psb.setSsskuList(mReplenishmentDetailAdapter.getData());
// } mPresenter.clickReplenishmentSubmit(psb);
// } } else {
// }); switch (mPsb.getPsbStatus()) {
// mViewBinding.btnPrint.setOnClickListener(new OnClickListener() { case 3:
// @Override mPsb.setPsbdetailList(mReplenishmentDetailAdapter.getData());
// protected void myOnClickListener(View v) { mPresenter.clickReplenishmentUpdate(mPsb);
// ZX_PrintPOS.getInstance(mContext).printOrder(1, mPsb); break;
// } case 1:
// }); mPresenter.clickReplenishmentConfirm(mPsb.getPsbNo());
break;
}
}
});
mViewBinding.btnCancel.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
} }
// //
...@@ -180,24 +194,24 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese ...@@ -180,24 +194,24 @@ public class ReplenishmentDetailFragment extends BaseFragment<ReplenishmentPrese
mViewBinding.setShopAddress(LoginPresenter.loginReturnBean.getCityProvName() + LoginPresenter.loginReturnBean.getCityName() + LoginPresenter.loginReturnBean.getCityCountyName() + LoginPresenter.loginReturnBean.getCityAddress()); mViewBinding.setShopAddress(LoginPresenter.loginReturnBean.getCityProvName() + LoginPresenter.loginReturnBean.getCityName() + LoginPresenter.loginReturnBean.getCityCountyName() + LoginPresenter.loginReturnBean.getCityAddress());
mViewBinding.setShopTel(LoginPresenter.loginReturnBean.getContactTel()); mViewBinding.setShopTel(LoginPresenter.loginReturnBean.getContactTel());
// if (mPsb != null && mPsb.getPsbStatus() != null) { if (mPsb != null && mPsb.getPsbStatus() != null) {
// switch (mPsb.getPsbStatus()) { switch (mPsb.getPsbStatus()) {
// case 3: case 3:
// mViewBinding.btnEnd.setText("修改订单"); mViewBinding.btnOk.setText("修改订单");
// mViewBinding.btnPrint.setVisibility(View.VISIBLE);
// break; break;
// case 1: case 1:
// mViewBinding.btnEnd.setText("确认收货"); mViewBinding.btnOk.setText("确认收货");
// mViewBinding.btnPrint.setVisibility(View.VISIBLE);
// break; break;
// case 0: case 0:
// mViewBinding.btnEnd.setVisibility(View.GONE); mViewBinding.llBottom.setVisibility(View.GONE);
// mViewBinding.btnPrint.setVisibility(View.VISIBLE);
// break; break;
// default: default:
// break; break;
// } }
// } }
} }
......
...@@ -4,6 +4,7 @@ package com.xingdata.zzdpos.ui.manage.replenishment.fragment; ...@@ -4,6 +4,7 @@ package com.xingdata.zzdpos.ui.manage.replenishment.fragment;
import android.databinding.DataBindingUtil; import android.databinding.DataBindingUtil;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.support.design.widget.TabLayout; import android.support.design.widget.TabLayout;
import android.text.InputType;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
...@@ -72,6 +73,8 @@ public class ReplenishmentFragment extends BaseFragment<ReplenishmentPresenter, ...@@ -72,6 +73,8 @@ public class ReplenishmentFragment extends BaseFragment<ReplenishmentPresenter,
}); });
mViewBinding.icTitle.ivRight.setVisibility(View.GONE); mViewBinding.icTitle.ivRight.setVisibility(View.GONE);
mViewBinding.icTitle.edTitle.setHint("请输入供货商名称"); mViewBinding.icTitle.edTitle.setHint("请输入供货商名称");
mViewBinding.icTitle.edTitle.setInputType(InputType.TYPE_CLASS_TEXT);
mViewBinding.icTitle.edTitle.setOnClickListener(view -> { mViewBinding.icTitle.edTitle.setOnClickListener(view -> {
if (mViewBinding.icTitle.edTitle.getText().toString().trim().length() == 0) { if (mViewBinding.icTitle.edTitle.getText().toString().trim().length() == 0) {
ToastUtils.showShort("请输入供货商名称"); ToastUtils.showShort("请输入供货商名称");
......
...@@ -8,6 +8,7 @@ import android.view.View; ...@@ -8,6 +8,7 @@ import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
...@@ -32,7 +33,7 @@ import java.util.regex.Pattern; ...@@ -32,7 +33,7 @@ import java.util.regex.Pattern;
public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresenter, FragmentReplenishmentListBinding> { public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresenter, FragmentReplenishmentListBinding> {
private ReplenishmentAdapter mReplenishmentAdapter; private ReplenishmentAdapter mReplenishmentAdapter;
private List<Psb> psbArrayList = new ArrayList<>(); private List<Psb> psbArrayList = new ArrayList<>();
private long mExitTime = 0;
@Override @Override
public int getLayoutId() { public int getLayoutId() {
...@@ -52,13 +53,13 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent ...@@ -52,13 +53,13 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent
mViewBinding.recycler.setAdapter(mReplenishmentAdapter); mViewBinding.recycler.setAdapter(mReplenishmentAdapter);
} }
mReplenishmentAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { mReplenishmentAdapter.setOnItemClickListener((adapter, view, position) -> {
@Override if ((System.currentTimeMillis() - mExitTime) > 500) {
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { mPresenter.queryPsbDetail(mReplenishmentAdapter.getData().get(position));
Intent intent = new Intent(getActivity(), StatisticsDetailActivity.class); } else {
intent.putExtra(Saleorder.class.getName(), mReplenishmentAdapter.getData().get(position).getId()); ToastUtils.showLong("您操作太快了");
ActivityUtils.startActivity(intent);
} }
}); });
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh); mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
...@@ -84,6 +85,10 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent ...@@ -84,6 +85,10 @@ public class ReplenishmentListFragment extends BaseFragment<ReplenishmentPresent
* @param isRefresh 是否刷新 * @param isRefresh 是否刷新
*/ */
public void setData(List<Psb> psbList, boolean isRefresh) { public void setData(List<Psb> psbList, boolean isRefresh) {
if (mReplenishmentAdapter==null){
this.psbArrayList=psbList;
return;
}
if (isRefresh) { if (isRefresh) {
mReplenishmentAdapter.setEnableLoadMore(true); mReplenishmentAdapter.setEnableLoadMore(true);
......
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<include
android:id="@+id/ly_title"
layout="@layout/title_order" />
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/all_padding"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</FrameLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_padding_left_right"
android:background="@drawable/singleline_white_gray"
android:paddingBottom="@dimen/all_padding">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_kongming"
app:layout_constraintTop_toTopOf="parent" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/img_goods"
android:layout_width="65dp"
android:layout_height="65dp"
android:layout_marginStart="@dimen/all_padding_left_right"
android:layout_marginTop="@dimen/all_padding"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:placeholderImage="@mipmap/icon_goods_default" />
<TextView
android:id="@+id/tv_goods_name"
style="@style/other_select_blacktext_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding_left_right"
android:layout_marginStart="@dimen/all_padding_left_right"
android:text="贝斯克莱因和美妖精生日巧克力蛋糕"
app:layout_constraintStart_toEndOf="@id/img_goods"
app:layout_constraintTop_toTopOf="@id/img_goods" />
<TextView
android:id="@+id/tv_goods_code_hint"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_marginStart="@dimen/dp_4"
android:layout_marginTop="@dimen/all_padding"
android:text="条码:"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintStart_toStartOf="@id/tv_goods_name"
app:layout_constraintTop_toBottomOf="@id/tv_goods_name" />
<TextView
android:id="@+id/tv_goods_code"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="12783163981789"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintBottom_toBottomOf="@id/tv_goods_code_hint"
app:layout_constraintStart_toEndOf="@id/tv_goods_code_hint"
app:layout_constraintTop_toTopOf="@id/tv_goods_code_hint" />
<TextView
android:id="@+id/tv_goods_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/frame_frame_zhouyu_bg"
android:padding="@dimen/dp_4"
android:text="规格"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintStart_toStartOf="@id/tv_goods_code_hint"
app:layout_constraintTop_toBottomOf="@id/tv_goods_code_hint" />
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding_left_right"
android:padding="@dimen/dp_4"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_goods_code_hint" />
</android.support.constraint.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_title"
>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_other_selcet"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</layout>
\ No newline at end of file
...@@ -213,7 +213,6 @@ ...@@ -213,7 +213,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding_left_right" android:layout_marginEnd="@dimen/all_padding_left_right"
android:paddingBottom="@dimen/all_padding" android:paddingBottom="@dimen/all_padding"
android:paddingStart="@dimen/all_padding_left_right" android:paddingStart="@dimen/all_padding_left_right"
android:paddingTop="@dimen/all_padding" android:paddingTop="@dimen/all_padding"
...@@ -222,7 +221,7 @@ ...@@ -222,7 +221,7 @@
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_text_size"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_supplier" app:layout_constraintTop_toBottomOf="@id/ll_supplier"
app:layout_goneMarginTop="@dimen/all_margin" /> />
<TextView <TextView
android:id="@+id/tv_shop_name" android:id="@+id/tv_shop_name"
...@@ -525,7 +524,7 @@ ...@@ -525,7 +524,7 @@
app:layout_constraintBottom_toBottomOf="parent"> app:layout_constraintBottom_toBottomOf="parent">
<Button <Button
android:id="@+id/btn_print" android:id="@+id/btn_cancel"
style="@style/button_passive" style="@style/button_passive"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -540,7 +539,7 @@ ...@@ -540,7 +539,7 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<Button <Button
android:id="@+id/btn_return" android:id="@+id/btn_ok"
style="@style/button_positive" style="@style/button_positive"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_padding_left_right"
android:background="@drawable/singleline_white_gray"
android:paddingBottom="@dimen/all_padding">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L050"
android:background="@color/gray_kongming"
app:layout_constraintTop_toTopOf="parent" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/img_goods"
android:layout_width="65dp"
android:layout_height="65dp"
android:layout_marginStart="@dimen/all_padding_left_right"
android:layout_marginTop="@dimen/all_padding"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:placeholderImage="@mipmap/icon_goods_default" />
<TextView
android:id="@+id/tv_goods_name"
style="@style/other_select_blacktext_style"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding_left_right"
android:layout_marginStart="@dimen/all_padding_left_right"
android:text="贝斯克莱因和美妖精生日巧克力蛋糕"
app:layout_constraintStart_toEndOf="@id/img_goods"
app:layout_constraintTop_toTopOf="@id/img_goods" />
<TextView
android:id="@+id/tv_goods_code_hint"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_marginStart="@dimen/dp_4"
android:layout_marginTop="@dimen/all_padding"
android:text="条码:"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintStart_toStartOf="@id/tv_goods_name"
app:layout_constraintTop_toBottomOf="@id/tv_goods_name" />
<TextView
android:id="@+id/tv_goods_code"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="12783163981789"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintBottom_toBottomOf="@id/tv_goods_code_hint"
app:layout_constraintStart_toEndOf="@id/tv_goods_code_hint"
app:layout_constraintTop_toTopOf="@id/tv_goods_code_hint" />
<TextView
android:id="@+id/tv_goods_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/frame_frame_zhouyu_bg"
android:padding="@dimen/dp_4"
android:text="规格"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintStart_toStartOf="@id/tv_goods_code_hint"
app:layout_constraintTop_toBottomOf="@id/tv_goods_code_hint" />
<TextView
android:id="@+id/tv_shop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding_left_right"
android:drawableStart="@mipmap/icon_stores"
android:padding="@dimen/dp_4"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_goods_code_hint" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
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 to comment