Commit bf086c39 authored by 陈前's avatar 陈前

Merge remote-tracking branch 'origin/master'

parents 1cf8da31 03a0c2a0
......@@ -21,9 +21,9 @@ android {
zipAlignEnabled true
debuggable true
//混淆编译
minifyEnabled true//打开
//移除无用的资源文件
shrinkResources true//打开
// minifyEnabled true//打开
//移除无用的资源文件s
// shrinkResources true//打开
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
......
......@@ -110,6 +110,11 @@
android:name=".ui.manage.replenishment.ReplenishmentActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.manage.bale.BaleActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/title_activity_bale"
android:theme="@style/AppTheme" />
<activity
android:name=".ui.manage.sssku.SsskuActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
......
......@@ -1233,6 +1233,7 @@ public final class ApiFactory {
.observeOn(AndroidSchedulers.mainThread())
.retryWhen(new RetryHelper(3));
}
}
public static class Ver {
......
......@@ -39,28 +39,21 @@ public class Pay extends RealmObject implements BaseModel, BaseBean {
public void init() {
switch (getPayType()) {
case C.PAY_CHANNEL.CASH:
// iconId = new int[]{R.mipmap.pay_xianjin_no, R.mipmap.pay_xianjin};
isSelected = true;
break;
case C.PAY_CHANNEL.ALI:
// iconId = new int[]{R.mipmap.pay_zhifubao_no, R.mipmap.pay_zhifubao};
break;
case C.PAY_CHANNEL.WECHAT:
// iconId = new int[]{R.mipmap.pay_weixin_no, R.mipmap.pay_weixin};
break;
case C.PAY_CHANNEL.BANK:
// iconId = new int[]{R.mipmap.pay_yinlian_no, R.mipmap.pay_yinlian};
break;
case C.PAY_CHANNEL.CARD:
// iconId = new int[]{R.mipmap.pay_chuzhi_no, R.mipmap.pay_chuzhi};
isNeedVip = true;
break;
case C.PAY_CHANNEL.TALLY:
// iconId = new int[]{R.mipmap.pay_shezhang_no, R.mipmap.pay_shezhang};
isNeedVip = true;
break;
default:
// iconId = new int[]{R.mipmap.pay_xianjin_no, R.mipmap.pay_xianjin};
break;
}
}
......
package com.xingdata.zzdpos.ui.manage.bale;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityBaleBinding;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.model.Ussku;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.bale.fragment.BaleIndexFragment;
import java.util.List;
public class BaleActivity extends BaseActivity<BalePresenter, ActivityBaleBinding> implements
BaleContract.View {
private long mExitTime;
// EditBaleShopItemDialog baleShopItemDialog = new EditBaleShopItemDialog();
@Override
public int getLayoutId() {
return R.layout.activity_bale;
}
@Override
public void initView() {
loadRootFragment(R.id.fl_content, mPresenter.mBaleIndexFragment, false, false);
mPresenter.init();
}
@Override
public void complete(List<Ussku> usskuses) {
}
@Override
public void error(String strMsg, LoadingDialog loadingDialog) {
mPresenter.mBaleIndexFragment.setError();
closeLoading(loadingDialog);
ToastUtils.showLong(strMsg);
LogUtils.e(strMsg);
}
@Override
public void selectShopItemSucc(Sssku sssku, LoadingDialog loadingDialog) {
closeLoading(loadingDialog);
mPresenter.mBaleEditFragment.setData(sssku, loadingDialog);
}
@Override
public void queryShopItemSucc(Pager<Sssku> ssskuPager, Boolean isLoadMore, Boolean
isNewDialog, LoadingDialog loadingDialog) {
closeLoading(loadingDialog);
mPresenter.mBaleSeachShopFragment.setNewData(ssskuPager.getList(), isLoadMore);
}
@Override
public void queryShopItemLoadMoreSucc(Pager<Sssku> ssskuPager, Boolean isLoadMore,
LoadingDialog loadingDialog) {
mPresenter.mBaleSeachShopFragment.setAddData(ssskuPager.getList(), isLoadMore);
}
@Override
public void usskuQuerySucc(Pager<Ussku> usskuPager, String wd, Boolean isLoadMore, LoadingDialog
loadingDialog) {
mPresenter.mBaleIndexFragment.setNewData(usskuPager, wd, isLoadMore, loadingDialog);
}
@Override
public void usskuQueryLoadMoreSucc(Pager<Ussku> usskuPager, Boolean isLoadMore, LoadingDialog
loadingDialog) {
mPresenter.mBaleIndexFragment.setAddData(usskuPager, isLoadMore, loadingDialog);
}
@Override
public void usskuAddMisSucc(LoadingDialog loadingDialog) {
mPresenter.mBaleEditFragment.setSucc(loadingDialog);
}
@Override
public void usskuDetailSucc(Ussku ussku, LoadingDialog loadingDialog) {
closeLoading(loadingDialog);
mPresenter.mBaleEditFragment.setNowType(2);
mPresenter.mBaleEditFragment.setNowData(ussku);
start(mPresenter.mBaleEditFragment);
}
@Override
public void usskuDeleteSucc(LoadingDialog loadingDialog) {
mPresenter.mBaleEditFragment.setSucc(loadingDialog);
}
@Override
public void usskuUpdateSucc(LoadingDialog loadingDialog) {
mPresenter.mBaleEditFragment.setSucc(loadingDialog);
}
private void closeLoading(LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
@Override
public void finish() {
super.finish();
ApiFactory.Sync.download(Ussku.class);
}
@Override
public void onBackPressedSupport() {
if (getTopFragment() instanceof BaleIndexFragment || getSupportFragmentManager()
.getFragments().size() <= 1) {
ActivityUtils.finishActivity(BaleActivity.class);
} else {
pop();
}
}
}
package com.xingdata.zzdpos.ui.manage.bale;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.model.Ussku;
import com.xingdata.zzdpos.model.UsskuParam;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import java.util.List;
/**
* Created by Administrator on 2017/11/24.
*/
public interface BaleContract {
interface View extends BaseView {
void complete(List<Ussku> Usskus);
void error(String strMsg, LoadingDialog loadingDialog);
void selectShopItemSucc(Sssku sssku, LoadingDialog loadingDialog);
void queryShopItemSucc(Pager<Sssku> ssskuPager, Boolean isLoadMore, Boolean isNewDialog,
LoadingDialog
loadingDialog);
void queryShopItemLoadMoreSucc(Pager<Sssku> ssskuPager, Boolean isLoadMore, LoadingDialog
loadingDialog);
void usskuQuerySucc(Pager<Ussku> usskuPager,String wd, Boolean isLoadMore, LoadingDialog
loadingDialog);
void usskuQueryLoadMoreSucc(Pager<Ussku> usskuPager, Boolean isLoadMore, LoadingDialog
loadingDialog);
void usskuAddMisSucc(LoadingDialog loadingDialog);
void usskuDetailSucc(Ussku ussku, LoadingDialog loadingDialog);
void usskuDeleteSucc(LoadingDialog loadingDialog);
void usskuUpdateSucc(LoadingDialog loadingDialog);
}
abstract class Presenter extends BasePresenter<View> {
abstract void init();
abstract void selectShopItem(Sssku sssku, LoadingDialog loadingDialog);
abstract void queryShopItem(String wd, Boolean isNewDialog, LoadingDialog loadingDialog);
abstract void queryShopItemLoadMore(int pageNum, LoadingDialog loadingDialog);
abstract void usskuQuery(String wd, LoadingDialog loadingDialog);
abstract void usskuQueryLoadMore(int pageNum, LoadingDialog loadingDialog);
abstract void usskuAddMis(UsskuParam usskuParam, LoadingDialog loadingDialog);
abstract void usskuDetail(String id, LoadingDialog loadingDialog);
abstract void usskuDelete(String id, LoadingDialog loadingDialog);
abstract void usskuUpdate(UsskuParam usskuParam, LoadingDialog loadingDialog);
}
}
package com.xingdata.zzdpos.ui.manage.bale;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.model.Ussku;
import com.xingdata.zzdpos.model.UsskuParam;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.bale.fragment.BaleEditFragment;
import com.xingdata.zzdpos.ui.manage.bale.fragment.BaleIndexFragment;
import com.xingdata.zzdpos.ui.manage.bale.fragment.BaleSeachFragment;
import com.xingdata.zzdpos.ui.manage.bale.fragment.BaleSeachShopFragment;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Administrator on 2017/11/24.
*/
public class BalePresenter extends BaleContract.Presenter {
private int nowPage = 1;
private String nowWd = "";
private int indexNowPage = 1;
private String indexnowWd = "";
public BaleEditFragment mBaleEditFragment = new BaleEditFragment();
public BaleIndexFragment mBaleIndexFragment = new BaleIndexFragment();
public BaleSeachFragment mBaleSeachFragment = new BaleSeachFragment();
public BaleSeachShopFragment mBaleSeachShopFragment = new BaleSeachShopFragment();
@Override
public void onAttached() {
}
@Override
public void init() {
List<Ussku> Usskus = new ArrayList<>();
mView.complete(Usskus);
}
@Override
public void selectShopItem(Sssku sssku, LoadingDialog loadingDialog) {
mView.selectShopItemSucc(sssku, loadingDialog);
}
/**
* 获取商品列表
*/
@Override
public void queryShopItem(String wd, Boolean isNewDialog, LoadingDialog loadingDialog) {
nowPage = 1;
if (wd != null) {
nowWd = wd;
}
mCompositeDisposable.add(
ApiFactory.Sssku.querySssku(nowPage, nowWd).subscribe(
ssskuPager -> {
mView.queryShopItemSucc(ssskuPager, !ssskuPager.isLastPage(),
isNewDialog, loadingDialog);
},
throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
})
);
}
/**
* 获取商品列表 加载更多
*/
@Override
public void queryShopItemLoadMore(int pageNum, LoadingDialog loadingDialog) {
if (pageNum > 0) {
nowPage = pageNum;
}
mCompositeDisposable.add(
ApiFactory.Sssku.querySssku(nowPage, nowWd).subscribe(
ssskuPager -> {
if (ssskuPager.isLastPage()) {
mView.queryShopItemLoadMoreSucc(ssskuPager, false, loadingDialog);
} else {
nowPage++;
mView.queryShopItemLoadMoreSucc(ssskuPager, true, loadingDialog);
}
},
throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
})
);
}
@Override
public void usskuQuery(String wd, LoadingDialog loadingDialog) {
if (wd != null) {
indexnowWd = wd;
}
ApiFactory.Ussku.usskuQuery(indexNowPage, indexnowWd).subscribe(
usskuPager -> {
if (usskuPager.isLastPage()) {
mView.usskuQuerySucc(usskuPager,wd, false, loadingDialog);
} else {
mView.usskuQuerySucc(usskuPager,wd, true, loadingDialog);
}
},
throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void usskuQueryLoadMore(int pageNum, LoadingDialog loadingDialog) {
ApiFactory.Ussku.usskuQuery(indexNowPage, indexnowWd).subscribe(
usskuPager -> {
if (usskuPager.isLastPage()) {
mView.usskuQueryLoadMoreSucc(usskuPager, false, loadingDialog);
} else {
indexNowPage++;
mView.usskuQueryLoadMoreSucc(usskuPager, true, loadingDialog);
}
},
throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void usskuAddMis(UsskuParam usskuParam, LoadingDialog loadingDialog) {
ApiFactory.Ussku.usskuAddMis(usskuParam).subscribe(
usskuParams -> {
mView.usskuAddMisSucc(loadingDialog);
},
throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void usskuDetail(String id, LoadingDialog loadingDialog) {
ApiFactory.Ussku.usskuDetail(id).subscribe(
usskuParams -> {
mView.usskuDetailSucc(usskuParams, loadingDialog);
},
throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void usskuDelete(String id, LoadingDialog loadingDialog) {
ApiFactory.Ussku.usskuDelete(id).subscribe(s -> {
mView.usskuDeleteSucc(loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
@Override
public void usskuUpdate(UsskuParam usskuParam, LoadingDialog loadingDialog) {
ApiFactory.Ussku.usskuUpdate(usskuParam).subscribe(s -> {
mView.usskuUpdateSucc(loadingDialog);
}, throwable -> {
mView.error(throwable.getMessage(), loadingDialog);
});
}
}
package com.xingdata.zzdpos.ui.manage.bale.adpter;
import android.support.annotation.Nullable;
import com.facebook.drawee.view.SimpleDraweeView;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemBaleBinding;
import com.xingdata.zzdpos.model.Ussku;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.ArrayList;
import java.util.List;
public class BaleIndexAdapter extends BaseAdapter<Ussku, ItemBaleBinding> {
public BaleIndexAdapter(@Nullable List<Ussku> data, int column, int spacing) {
super(R.layout.item_bale, data);
}
@Override
protected void convert(ItemBaleBinding mViewBinding, Ussku item) {
mViewBinding.tvTitle.setText(item.getSpuName());
mViewBinding.tvBarNo.setText(item.getSpuBarcode() + "");
mViewBinding.tvOriginalMoney.setText(mContext.getResources().getString(R.string.money,
ConvertUtil.fenToYuan(item.getSkuRetailPrice4())));
mViewBinding.tvNowMoney.setText(mContext.getResources().getString(R.string.money,
ConvertUtil.fenToYuan(item.getSkuRetailPrice1())));
List<String> list = new ArrayList<>();
mViewBinding.ivPic.removeAllViews();
if (item.getSsskuList() != null || item.getSsskuList().size() > 0) {
int temp = 0;
if (item.getSsskuList().size() >= 6) {
temp = 6;
} else {
temp = item.getSsskuList().size();
}
for (int i = 0; i < temp; i++) {
// list.add(item.getSsskuList().get(i).getSpuImg());
SimpleDraweeView simpleDraweeView = new SimpleDraweeView
(mContext);
simpleDraweeView.setImageURI(item.getSsskuList().get(i).getSpuImg());
mViewBinding.ivPic.addView(simpleDraweeView);
}
}
}
}
package com.xingdata.zzdpos.ui.manage.bale.adpter;
import android.support.annotation.Nullable;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemBaleEditQueryBinding;
import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.List;
/**
* Created by Administrator on 2017/11/24.
*/
public class EditDialogQueryShopItemAdapter extends BaseAdapter<Sssku, ItemBaleEditQueryBinding> {
public EditDialogQueryShopItemAdapter(int layoutResId, @Nullable List<Sssku> data) {
super(layoutResId, data);
}
@Override
protected void convert(ItemBaleEditQueryBinding mViewBinding, Sssku item) {
mViewBinding.ivPic.setImageURI(item.getSpuImg());
mViewBinding.tvTitle.setText(item.getSpuName() + "");
mViewBinding.tvNo.setText(item.getSpuBarcode() + "");
mViewBinding.tvMoney.setText(ConvertUtil.fenToYuan(item.getSkuRetailPrice1()));
}
}
package com.xingdata.zzdpos.ui.manage.bale.adpter;
import android.support.annotation.Nullable;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemBaleEditfragmentImgBinding;
import com.xingdata.zzdpos.model.Sssku;
import java.util.List;
/**
* Created by Administrator on 2017/11/24.
*/
public class EditFragmentImgShopAdapter extends BaseAdapter<Sssku, ItemBaleEditfragmentImgBinding> {
public EditFragmentImgShopAdapter(int layoutResId, @Nullable List<Sssku> data) {
super(layoutResId, data);
}
@Override
protected void convert(ItemBaleEditfragmentImgBinding mViewBinding, Sssku sssku) {
mViewBinding.ivPic.setImageURI(sssku.getSpuImg());
}
}
//package com.xingdata.zzdpos.ui.manage.bale.dialog;
//
//import android.annotation.SuppressLint;
//import android.content.Context;
//import android.support.v7.widget.LinearLayoutManager;
//import android.view.View;
//import android.view.inputmethod.InputMethodManager;
//import android.widget.TextView;
//
//import com.blankj.utilcode.util.ToastUtils;
//import com.xingdata.zzdpos.R;
//import com.xingdata.zzdpos.base.BaseActivity;
//import com.xingdata.zzdpos.base.BaseDialog;
//import com.xingdata.zzdpos.databinding.DialogBaleShopSelectBinding;
//import com.xingdata.zzdpos.model.Sssku;
//import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
//import com.xingdata.zzdpos.ui.manage.bale.BalePresenter;
//import com.xingdata.zzdpos.ui.manage.bale.adpter.EditDialogQueryShopItemAdapter;
//
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * 积分获取设置界面
// */
//public class EditBaleShopItemDialog extends BaseDialog<BalePresenter,
// DialogBaleShopSelectBinding> {
// LoadingDialog loadingDialog = new LoadingDialog();
// EditDialogQueryShopItemAdapter queryShopItemAdapter;
// long mExitTime;
// Boolean isLoadMore = false;
//
// private boolean isAddData = false;
// private List<Sssku> nowData = new ArrayList<>();
//
// @Override
// public int getLayoutId() {
// return R.layout.dialog_bale_shop_select;
// }
//
// @Override
// protected boolean isShowTitle() {
// return true;
// }
//
// @Override
// protected boolean isEasy() {
// return true;
// }
//
// @Override
// public int getTitle() {
// return R.string.bale_select_title;
// }
//
// @SuppressLint("SetTextI18n")
// @Override
// public void initView() {
// setCancelable(true);
// queryShopItemAdapter = new EditDialogQueryShopItemAdapter(R.layout.item_bale_edit_query, new
// ArrayList<>());
// LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
// linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
// mViewBinding.rvShopItem.setLayoutManager(linearLayoutManager);
// mViewBinding.rvShopItem.setAdapter(queryShopItemAdapter);
// mViewBinding.srlProducts.setOnRefreshListener(this::refreshProduct);
// queryShopItemAdapter.setOnLoadMoreListener(this::loadMoreProduct, mViewBinding.rvShopItem);
// queryShopItemAdapter.setOnItemClickListener((adapter, view, position) -> clickProduct
// (queryShopItemAdapter.getData().get(position)));
// if (isAddData) {
// queryShopItemAdapter.addData(nowData);
// getEmptyView("没有数据");
// } else {
// queryShopItemAdapter.setNewData(nowData);
// getEmptyView("没有数据");
// }
// }
//
// public void setNewData(List<Sssku> newData, Boolean isLoadMore) {
// nowData = newData;
// isAddData = false;
// this.isLoadMore = isLoadMore;
// if (this.isShowing || queryShopItemAdapter != null) {
// mViewBinding.srlProducts.setRefreshing(false);
// queryShopItemAdapter.setEnableLoadMore(false);
// queryShopItemAdapter.setNewData(nowData);
// getEmptyView("没有数据");
// }
//
// }
//
// public void setAddData(List<Sssku> addData, Boolean isLoadMore) {
// nowData = addData;
// isAddData = true;
// this.isLoadMore = isLoadMore;
// if (this.isShowing || queryShopItemAdapter != null) {
// mViewBinding.srlProducts.setRefreshing(false);
// queryShopItemAdapter.setEnableLoadMore(false);
// queryShopItemAdapter.addData(nowData);
// getEmptyView("没有数据");
// }
// }
//
// /**
// * 刷新商品
// */
// private void refreshProduct() {
// queryShopItemAdapter.setEnableLoadMore(false);
// loadingDialog.show((BaseActivity) getActivity());
// mPresenter.queryShopItem(null, null, loadingDialog);
// }
//
// /**
// * 加载更多商品
// */
// private void loadMoreProduct() {
// mViewBinding.srlProducts.setRefreshing(false);
// if (isLoadMore) {
// mPresenter.queryShopItemLoadMore(1, loadingDialog);
// } else {
// queryShopItemAdapter.setEnableLoadMore(false);
// }
// }
//
// /**
// * 点击item
// */
// private void clickProduct(Sssku sssku) {
// if ((System.currentTimeMillis() - mExitTime) > 1000) {
// mExitTime = System.currentTimeMillis();
// mPresenter.selectShopItem(sssku, null);
// this.dismiss();
// } else {
// ToastUtils.showLong("您操作太快了");
// }
// }
//
//
// /**
// * 显示软键盘,Dialog使用
// */
// public void hintKbTwo() {
// View view = getDialog().getCurrentFocus();
// if (view == null) {
// return;
// }
// if (view instanceof TextView) {
// InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
// .getSystemService(Context.INPUT_METHOD_SERVICE);
// mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
// .RESULT_UNCHANGED_SHOWN);
// }
// }
//
// /**
// * 获取空页面
// *
// * @return 空页面
// */
// private void getEmptyView(String str) {
// if (nowData == null || nowData.size() <= 0) {
// @SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout
// .view_empty, null);
// ((TextView) view.findViewById(R.id.tv_empty)).setText(str);
// queryShopItemAdapter.setEmptyView(view);
//
// }
// }
//
// @Override
// public void dismiss() {
// hintKbTwo();
// super.dismiss();
// }
//
//}
package com.xingdata.zzdpos.ui.manage.bale.fragment;
import android.support.annotation.Nullable;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.text.Html;
import android.view.View;
import com.blankj.utilcode.util.ActivityUtils;
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.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentBaleIndexBinding;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Ussku;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.bale.BalePresenter;
import com.xingdata.zzdpos.ui.manage.bale.adpter.BaleIndexAdapter;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Administrator on 2017/11/29.
*/
public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleIndexBinding> {
BaleIndexAdapter mBaleIndexAdapter;
// final int SPACING = mContext.getResources().getDimensionPixelOffset(R.dimen
// .fragment_store_item_spacing);
LoadingDialog loadingDialog = new LoadingDialog();
long mExitTime;
Boolean isLoadMore = false;
private boolean isAddData = false;
private List<Ussku> nowData = new ArrayList<>();
@Override
public int getLayoutId() {
return R.layout.fragment_bale_index;
}
@Override
public void initView() {
mBaleIndexAdapter = new BaleIndexAdapter(nowData, 3, 20);
mViewBinding.rcBaleShop.setAdapter(mBaleIndexAdapter);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rcBaleShop.setLayoutManager(linearLayoutManager);
mViewBinding.rcBaleShop.addItemDecoration(new DividerItemDecoration(getActivity(),
DividerItemDecoration.VERTICAL));
mViewBinding.srlProducts.setOnRefreshListener(this::refreshProduct);
mBaleIndexAdapter.setOnLoadMoreListener(this::loadMoreProduct, mViewBinding.rcBaleShop);
mBaleIndexAdapter.setOnItemClickListener((adapter, view, position) -> clickProduct
(mBaleIndexAdapter.getData().get(position)));
mViewBinding.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
switch (v.getId()) {
case R.id.btn_add: {
mPresenter.mBaleEditFragment.setNowType(1);
start(mPresenter.mBaleEditFragment);
}
break;
case R.id.tv_keyword: {
start(mPresenter.mBaleSeachFragment);
}
break;
case R.id.btn_back: {
ActivityUtils.finishActivity(getActivity());
}
break;
default: {
}
break;
}
}
}
);
loadingDialog.show((BaseActivity) getActivity());
mPresenter.usskuQuery("", loadingDialog);
KeyboardUtils.showSoftInput(mViewBinding.tvKeyword);
}
public void setNewData(@Nullable Pager<Ussku> usskuPager, String wd, Boolean isLoadMore,
LoadingDialog
loadingDialog) {
mViewBinding.tvKeyword.setText(wd);
mViewBinding.btnGroup.setText(Html.fromHtml(getResources().getString(R.string
.tv_bale_count, "<font color='#1f7bdb'><big> " + usskuPager.getTotalRow() +
"</big></font>")));
closeLoading(loadingDialog);
nowData = usskuPager.getList();
isAddData = false;
this.isLoadMore = isLoadMore;
if (nowData == null || nowData.size() <= 0) {
mViewBinding.llNull.setVisibility(View.VISIBLE);
mViewBinding.srlProducts.setVisibility(View.GONE);
return;
} else {
mViewBinding.llNull.setVisibility(View.GONE);
mViewBinding.srlProducts.setVisibility(View.VISIBLE);
}
if (mBaleIndexAdapter != null) {
mViewBinding.srlProducts.setRefreshing(false);
mBaleIndexAdapter.setEnableLoadMore(false);
if (nowData != null) {
mBaleIndexAdapter.setNewData(nowData);
}
}
}
public void setAddData(@Nullable Pager<Ussku> addUsskuPager, Boolean isLoadMore, LoadingDialog
loadingDialog) {
closeLoading(loadingDialog);
nowData = addUsskuPager.getList();
isAddData = true;
this.isLoadMore = isLoadMore;
if (mBaleIndexAdapter != null) {
mViewBinding.srlProducts.setRefreshing(false);
mBaleIndexAdapter.setEnableLoadMore(false);
if (nowData != null) {
mBaleIndexAdapter.addData(nowData);
}
}
mViewBinding.btnGroup.setText(Html.fromHtml(getResources().getString(R.string
.tv_bale_count, "<font color='#1f7bdb'><big> " + addUsskuPager
.getTotalRow() + " </big></font>")));
}
/**
* 刷新商品
*/
private void refreshProduct() {
mBaleIndexAdapter.setEnableLoadMore(false);
loadingDialog.show((BaseActivity) getActivity());
mPresenter.usskuQuery(null, loadingDialog);
}
/**
* 加载更多商品
*/
private void loadMoreProduct() {
mViewBinding.srlProducts.setRefreshing(false);
if (isLoadMore) {
mPresenter.queryShopItemLoadMore(1, loadingDialog);
} else {
mBaleIndexAdapter.setEnableLoadMore(false);
}
}
public void setError() {
mViewBinding.srlProducts.setRefreshing(false);
mBaleIndexAdapter.setEnableLoadMore(false);
}
/**
* 点击item
*/
private void clickProduct(Ussku sssku) {
if ((System.currentTimeMillis() - mExitTime) > 1000) {
mExitTime = System.currentTimeMillis();
loadingDialog.show((BaseActivity) getActivity());
mPresenter.usskuDetail(sssku.getSkuId() + "", loadingDialog);
} else {
ToastUtils.showLong("您操作太快了");
}
}
private void closeLoading(LoadingDialog loadingDialog) {
if (loadingDialog != null) {
loadingDialog.dismiss();
}
}
@Override
public void onDestroy() {
super.onDestroy();
}
@Override
public void onHiddenChanged(boolean hidden) {
super.onHiddenChanged(hidden);
if (!hidden) {
// loadingDialog.show((BaseActivity) getActivity());
// mPresenter.usskuQuery("", loadingDialog);
}
}
// public void myHidekey() {
// List<View> list = new ArrayList<>();
// list.add(mViewBinding.etKeyword);
// hideSoftKeyboard(mContext, list);
// }
//
// /**
// * 隐藏软键盘(可用于Activity,Fragment)
// */
// public static void hideSoftKeyboard(Context context, List<View> viewList) {
// if (viewList == null) return;
//
// InputMethodManager mInputMethodManager = (InputMethodManager) context
// .getSystemService(Context.INPUT_METHOD_SERVICE);
// for (View v : viewList) {
// mInputMethodManager.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager
// .RESULT_UNCHANGED_SHOWN);
// }
// }
}
package com.xingdata.zzdpos.ui.manage.bale.fragment;
import android.annotation.SuppressLint;
import android.view.KeyEvent;
import android.view.View;
import android.widget.TextView;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentBaleSeachBinding;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.bale.BalePresenter;
import com.xingdata.zzdpos.util.OnClickListener;
/**
* Created by Administrator on 2017/11/29.
*/
public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleSeachBinding> {
LoadingDialog loadingDialog = new LoadingDialog();
@Override
public int getLayoutId() {
return R.layout.fragment_bale_seach;
}
@SuppressLint("StringFormatMatches")
@Override
public void initView() {
mViewBinding.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
switch (v.getId()) {
case R.id.btn_back: {
pop();
}
break;
case R.id.btn_seach: {
loadingDialog.show((BaseActivity)
getActivity());
mPresenter.usskuQuery(mViewBinding
.etKeyword.getText()
.toString(),
loadingDialog);
pop();
}
break;
default: {
}
break;
}
}
}
);
mViewBinding.etKeyword.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction
(TextView textView, int i,
KeyEvent keyEvent) {
loadingDialog.show((BaseActivity)
getActivity());
mPresenter.usskuQuery(mViewBinding
.etKeyword
.getText()
.toString(),
loadingDialog);
pop();
return false;
}
}
);
}
}
package com.xingdata.zzdpos.ui.manage.bale.fragment;
import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager;
import android.view.KeyEvent;
import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentBaleSeachShopBinding;
import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.bale.BalePresenter;
import com.xingdata.zzdpos.ui.manage.bale.adpter.EditDialogQueryShopItemAdapter;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Administrator on 2017/11/29.
*/
public class BaleSeachShopFragment extends BaseFragment<BalePresenter,
FragmentBaleSeachShopBinding> {
LoadingDialog loadingDialog = new LoadingDialog();
EditDialogQueryShopItemAdapter queryShopItemAdapter;
long mExitTime;
Boolean isLoadMore = false;
private boolean isAddData = false;
private List<Sssku> nowData = new ArrayList<>();
@Override
public int getLayoutId() {
return R.layout.fragment_bale_seach_shop;
}
@SuppressLint("StringFormatMatches")
@Override
public void initView() {
queryShopItemAdapter = new EditDialogQueryShopItemAdapter(R.layout.item_bale_edit_query, new
ArrayList<>());
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mViewBinding.rvShopItem.setLayoutManager(linearLayoutManager);
mViewBinding.rvShopItem.setAdapter(queryShopItemAdapter);
mViewBinding.srlProducts.setOnRefreshListener(this::refreshProduct);
queryShopItemAdapter.setOnLoadMoreListener(this::loadMoreProduct, mViewBinding.rvShopItem);
queryShopItemAdapter.setOnItemClickListener((adapter, view, position) -> clickProduct
(queryShopItemAdapter.getData().get(position)));
if (isAddData) {
queryShopItemAdapter.addData(nowData);
getEmptyView("没有数据");
} else {
queryShopItemAdapter.setNewData(nowData);
getEmptyView("没有数据");
}
loadingDialog.show((BaseActivity) getActivity());
mPresenter.queryShopItem(mViewBinding.etKeyword.getText().toString(), true, loadingDialog);
mViewBinding.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
switch (v.getId()) {
case R.id.btn_back: {
pop();
}
break;
case R.id.btn_seach: {
loadingDialog.show((BaseActivity)
getActivity());
mPresenter.queryShopItem(mViewBinding
.etKeyword.getText()
.toString(),
true, loadingDialog);
}
break;
default: {
}
break;
}
}
}
);
mViewBinding.etKeyword.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction
(TextView textView, int i,
KeyEvent keyEvent) {
loadingDialog.show((BaseActivity)
getActivity());
mPresenter.queryShopItem
(mViewBinding
.etKeyword
.getText()
.toString(),
true,
loadingDialog);
return false;
}
}
);
}
public void setNewData(List<Sssku> newData, Boolean isLoadMore) {
nowData = newData;
isAddData = false;
this.isLoadMore = isLoadMore;
if (queryShopItemAdapter != null) {
mViewBinding.srlProducts.setRefreshing(false);
queryShopItemAdapter.setEnableLoadMore(false);
queryShopItemAdapter.setNewData(nowData);
getEmptyView("没有数据");
}
}
public void setAddData(List<Sssku> addData, Boolean isLoadMore) {
nowData = addData;
isAddData = true;
this.isLoadMore = isLoadMore;
if (queryShopItemAdapter != null) {
mViewBinding.srlProducts.setRefreshing(false);
queryShopItemAdapter.setEnableLoadMore(false);
queryShopItemAdapter.addData(nowData);
getEmptyView("没有数据");
}
}
/**
* 刷新商品
*/
private void refreshProduct() {
queryShopItemAdapter.setEnableLoadMore(false);
loadingDialog.show((BaseActivity) getActivity());
mPresenter.queryShopItem(null, null, loadingDialog);
}
/**
* 加载更多商品
*/
private void loadMoreProduct() {
mViewBinding.srlProducts.setRefreshing(false);
if (isLoadMore) {
mPresenter.queryShopItemLoadMore(1, loadingDialog);
} else {
queryShopItemAdapter.setEnableLoadMore(false);
}
}
/**
* 点击item
*/
private void clickProduct(Sssku sssku) {
if ((System.currentTimeMillis() - mExitTime) > 1000) {
mExitTime = System.currentTimeMillis();
mPresenter.selectShopItem(sssku, null);
pop();
} else {
ToastUtils.showLong("您操作太快了");
}
}
/**
* 获取空页面
*
* @return 空页面
*/
private void getEmptyView(String str) {
if (nowData == null || nowData.size() <= 0) {
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout
.view_empty, null);
((TextView) view.findViewById(R.id.tv_empty)).setText(str);
queryShopItemAdapter.setEmptyView(view);
}
}
}
package com.xingdata.zzdpos.ui.manage.bale.view;
import android.content.Context;
import android.widget.ImageView;
/**
* Created by Jaeger on 16/2/24.
*
* Email: chjie.jaeger@gamil.com
* GitHub: https://github.com/laobie
*/
public abstract class NineGridImageViewAdapter<T> {
protected abstract void onDisplayImage(Context context, ImageView imageView, T t);
protected ImageView generateImageView(Context context){
ImageView imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
return imageView;
}
}
package com.xingdata.zzdpos.ui.manage.bale.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
/**
* 群聊九宫格头像
* Created by Edward on 2017/1/15.
*/
public class TribeAvatar extends ViewGroup {
public TribeAvatar(Context context, AttributeSet attrs) throws Exception {
this(context, attrs, 0);
}
public TribeAvatar(Context context, AttributeSet attrs, int defStyleAttr) throws Exception {
super(context, attrs, defStyleAttr);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
//强制容器宽度和高度一致
setMeasuredDimension(widthMeasureSpec, widthMeasureSpec);
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
int childCount = getChildCount();
//五张图片之后(包含5张),每行的最大列数是3
if (childCount >= 5) {
putImg(childCount, 3);
} else {
putImg(childCount, 2);
}
}
/**
* 设置垂直
*
* @param childCount
* @param imgWidth
* @return
*/
private int setVertical(int childCount, int imgWidth) {
//只有5张或者6张图的情况才需要垂直居中
if (childCount == 5 || childCount == 6) {
return imgWidth / 2;
} else {
return 0;
}
}
/**
* 设置只有三张图片的位置
*
* @param i
* @param imgWidth
* @param left
* @param top
* @param right
* @param bottom
*/
private void setThreePicPosition(int i, int imgWidth, int left, int top, int right, int bottom) {
View view = getChildAt(i - 1);
//对第一张图片进行特殊处理
if (i == 1) {
view.layout(imgWidth / 2, 0, imgWidth + (imgWidth / 2), imgWidth);
//换行
row++;
column = 0;
} else {
view.layout(left, top, right, bottom);
column++;
}
}
/**
* 设置只有五张图片的位置
*
* @param i
* @param imgWidth
* @param childCount
* @param left
* @param top
* @param right
* @param bottom
*/
private void setFivePicPosition(int i, int imgWidth, int childCount, int left, int top, int right, int bottom) {
View view = getChildAt(i - 1);
//设置垂直居中
int centerVertical = setVertical(childCount, imgWidth);
//头两张图片进行特殊处理
if (i == 1 || i == 2) {
//设置水平居中
int centerHorizontal = imgWidth / 2;
view.layout(left + centerHorizontal, top + centerVertical, right + centerHorizontal, bottom + centerVertical);
column++;
if (i == 2) {
row++;
column = 0;
}
} else {
view.layout(left, top + centerVertical, right, bottom + centerVertical);
column++;
}
}
private void setOthersPicPosition(int i, int imgWidth, int columnMax, int childCount, int left, int top, int right, int bottom) {
View view = getChildAt(i - 1);
//设置垂直居中,返回0表示不需要垂直居中
int centerVertical = setVertical(childCount, imgWidth);
view.layout(left, top + centerVertical, right, bottom + centerVertical);
column++;
//换行
if (i % columnMax == 0) {
row++;
//将列增量初始化
column = 0;
}
}
int row, column;
/**
* 摆放图片
*
* @param childCount 子控件总数
* @param columnMax 头像每列的最大数
*/
private void putImg(int childCount, int columnMax) {
//注意头像的宽度和高度是相等的,下面的imgHeight被我注释了
int imgWidth = getWidth() / columnMax;
// int imgHeight = getHeight() / columnMax;
//每行增量
row = 0;
//每列增量
column = 0;
for (int i = 1; i <= childCount; i++) {
//计算左上角坐标
int left = imgWidth * column;
int top = imgWidth * row;
//计算右下角坐标
int right = imgWidth + left;
int bottom = imgWidth + top;
switch (childCount) {
//针对只有三张图片的情况进行特殊处理
case 3:
setThreePicPosition(i, imgWidth, left, top, right, bottom);
break;
//针对只有五张图片的情况进行特殊处理
case 5:
setFivePicPosition(i, imgWidth, childCount, left, top, right, bottom);
break;
//其余情况走下面
default:
setOthersPicPosition(i, imgWidth, columnMax, childCount, left, top, right, bottom);
//当只有7张图片,则对第7张图片进行特殊处理
if (childCount == 7 && i == 7) {
View view = getChildAt(i - 1);
//对最后一格的图片进行特殊处理
view.layout(imgWidth, imgWidth * 2, 2 * imgWidth, imgWidth + (imgWidth * 2));
}
break;
}
}
}
}
......@@ -11,6 +11,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.databinding.ActivityMarketingMenuBinding;
import com.xingdata.zzdpos.ui.manage.bale.BaleActivity;
import com.xingdata.zzdpos.ui.manage.inventory.InventoryActivity;
import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectActivity;
import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentActivity;
......@@ -66,7 +67,7 @@ public class ManageMenuActivity extends AppCompatActivity {
}
break;
case C.MENU.MENU_MANAGER_BALE: {
ActivityUtils.startActivity(ManageMenuActivity.this, BaleActivity.class);
}
break;
case C.MENU.MENU_MANAGER_REPLENISHMENT: {
......
......@@ -19,8 +19,10 @@ import com.xingdata.zzdpos.ui.manage.sssku.fragment.AddFragment;
import com.xingdata.zzdpos.ui.manage.sssku.fragment.DetailFragment;
import com.xingdata.zzdpos.ui.manage.sssku.fragment.EditorFragment;
import com.xingdata.zzdpos.ui.manage.sssku.fragment.ManagerFragment;
import com.xingdata.zzdpos.ui.manage.sssku.fragment.PriceFragment;
import com.xingdata.zzdpos.ui.manage.sssku.fragment.SearchFragment;
import com.xingdata.zzdpos.ui.manage.sssku.fragment.SkugrpFragment;
import com.xingdata.zzdpos.ui.manage.sssku.fragment.VipFragment;
import java.util.List;
......@@ -31,8 +33,11 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
private SkugrpFragment mSkugrpFragment = new SkugrpFragment();
private AddFragment mAddFragment = new AddFragment();
private EditorFragment mEditorFragment = new EditorFragment();
private DetailFragment mDetailFragment = new DetailFragment();
private EditorFragment mEditorFragment = new EditorFragment();
private PriceFragment mPriceFragment = new PriceFragment();
private VipFragment mVipFragment = new VipFragment();
private LoadingDialog mLoadingDialog = new LoadingDialog();
......@@ -46,9 +51,7 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
this.showTitleBarByTitleMode(C.TITLE_MODE.SKU);
this.loadRootFragment(R.id.f_sssku, mManagerFragment);
mViewBinding.btnBack.setOnClickListener(view -> {
getTopFragment().onBackPressedSupport();
});
mViewBinding.btnBack.setOnClickListener(view -> getTopFragment().onBackPressedSupport());
mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> {
if (i == EditorInfo.IME_ACTION_SEARCH && !StringUtils.isEmpty(textView.getText())) {
KeyboardUtils.hideSoftInput(textView);
......@@ -56,12 +59,8 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
}
return false;
});
mViewBinding.etSearch.setOnFocusChangeListener((view, b) -> {
mPresenter.searchBarFocusChanged(b, C.TITLE_MODE.SKU);
});
mViewBinding.btnMenu.setOnClickListener(view -> {
mPresenter.clickSkuMenu();
});
mViewBinding.etSearch.setOnFocusChangeListener((view, b) -> mPresenter.searchBarFocusChanged(b, C.TITLE_MODE.SKU));
mViewBinding.btnMenu.setOnClickListener(view -> mPresenter.clickSkuMenu());
}
@Override
......@@ -150,12 +149,26 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.UNKNOWN));
break;
case C.SKU_EDITOR_MODE.UPDATE:
mViewBinding.tvTitle.setText(R.string.sssku_update);
mViewBinding.tvTitle.setText(R.string.sku_update);
this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.UPDATE));
break;
}
}
@Override
public void showPriceFragment(Sssku sku) {
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.sku_update_price);
this.start(mPriceFragment.setSssku(sku));
}
@Override
public void showVipFragment(Sssku sku) {
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.sku_subtitle_vip);
this.start(mVipFragment.setSssku(sku));
}
@Override
public void showDetailFragment(Sssku sku) {
......@@ -179,7 +192,7 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
@Override
public void backToEditFragment() {
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.sssku_update);
mViewBinding.tvTitle.setText(R.string.sku_update);
this.pop();
}
......
......@@ -101,6 +101,20 @@ public interface SsskuContract {
*/
void showEditorFragment(Sssku sku, int editMode);
/**
* 显示价格编辑页面
*
* @param sku 要编辑的商品
*/
void showPriceFragment(Sssku sku);
/**
* 显示会员编辑页面
*
* @param sku 要编辑的商品
*/
void showVipFragment(Sssku sku);
/**
* 显示详情页面
*
......@@ -147,7 +161,6 @@ public interface SsskuContract {
*/
void updateSku(Sssku sssku);
/**
* 删除商品
*
......
......@@ -137,12 +137,12 @@ public class SsskuPresenter extends SsskuContract.Presenter {
@Override
public void clickEditPriceSku(Sssku sssku) {
//TODO
mView.showPriceFragment(sssku);
}
@Override
public void clickEditVipSku(Sssku sssku) {
//TODO
mView.showVipFragment(sssku);
}
@Override
......@@ -212,7 +212,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
mView.showMsg("修改成功");
mView.backToEditFragment();
mView.backToManagerFragment();
if (sssku1.getSkuGrpId().longValue() == mSkuGrpId) {
if (sssku1.getSkuGrpId().longValue() == mSkuGrpId || mSkuGrpId == 0L) {
mView.updateSku(sssku1);
} else {
mView.deleteSku(sssku1.getSkuId());
......
......@@ -227,7 +227,7 @@ public class EditorFragment extends BaseFragment<SsskuPresenter, FragmentSsskuEd
mViewBinding.nsSkugrp.attachDataSource(mSskugrps);
for (int i = 0; i < mSskugrps.size(); i++) {
if (mSskugrps.get(i).getSkuGrpId().longValue() == mSssku.getSkuGrpId()) {
mViewBinding.nsType1.setSelectedIndex(i);
mViewBinding.nsSkugrp.setSelectedIndex(i);
}
}
......
package com.xingdata.zzdpos.ui.manage.sssku.fragment;
import android.view.View;
import android.widget.EditText;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSsskuPriceBinding;
import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuActivity;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.InputFilters;
public class PriceFragment extends BaseFragment<SsskuPresenter, FragmentSsskuPriceBinding> {
private Sssku mSssku;
@Override
public int getLayoutId() {
return R.layout.fragment_sssku_price;
}
@Override
public void initView() {
mViewBinding.ivPic.setImageURI(mSssku.getSpuImg());
mViewBinding.setSku(mSssku);
this.initPriceView();
this.setPriceViewBySssku();
mViewBinding.btnConfirm.setOnClickListener(view -> {
this.processSssku();
mPresenter.clickConfirm(mSssku, C.SKU_EDITOR_MODE.UPDATE);
});
}
/**
* 设置商品
*
* @param sssku 商品信息
*/
public PriceFragment setSssku(Sssku sssku) {
this.mSssku = sssku;
return this;
}
/**
* 初始化价格
*/
private void initPriceView() {
View.OnFocusChangeListener mOnFocusChangeListener = (view, b) -> {
if (view instanceof EditText) {
EditText editText = (EditText) view;
if (b && editText.getText().toString().equals("0.0")) {
editText.setText("");
} else if (!b && editText.getText().length() == 0) {
editText.setText("0.0");
}
}
};
mViewBinding.etPrice1.setFilters(InputFilters.getMoneyFilter(6));
mViewBinding.etPrice2.setFilters(InputFilters.getMoneyFilter(6));
mViewBinding.etPrice1.setOnFocusChangeListener(mOnFocusChangeListener);
mViewBinding.etPrice2.setOnFocusChangeListener(mOnFocusChangeListener);
}
/**
* 根据商品设置价格页面
*/
private void setPriceViewBySssku() {
mViewBinding.etPrice1.setText(ConvertUtil.fenToYuan(mSssku.getSkuRetailPrice1()));
mViewBinding.etPrice2.setText(ConvertUtil.fenToYuan(mSssku.getSkuRetailPrice2()));
}
/**
* 处理商品
*/
private void processSssku() {
mSssku.setSkuRetailPrice1(ConvertUtil.yuanToFen(mViewBinding.etPrice1.getText().toString()));
mSssku.setSkuRetailPrice2(ConvertUtil.yuanToFen(mViewBinding.etPrice2.getText().toString()));
mSssku.setCreateTime(null);
mSssku.setUpdateTime(null);
}
@Override
public boolean onBackPressedSupport() {
((SsskuActivity) getActivity()).backToDetailFragment();
return super.onBackPressedSupport();
}
}
......@@ -4,15 +4,17 @@ import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSsskuSkugrpBinding;
import com.xingdata.zzdpos.databinding.ItemSsskuSkugrpBinding;
import com.xingdata.zzdpos.model.Sskugrp;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuActivity;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuPresenter;
import com.xingdata.zzdpos.ui.manage.sssku.adapter.SkugrpAdapter;
import com.xingdata.zzdpos.ui.manage.sssku.dialog.SkugrpEditorDialog;
import com.xingdata.zzdpos.ui.manage.sssku.dialog.SkugrpMenuDialog;
import java.util.ArrayList;
import java.util.List;
......@@ -30,11 +32,11 @@ public class SkugrpFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSk
public void initView() {
mSkugrpAdapter = new SkugrpAdapter();
mSkugrpAdapter.setNewData(mSskugrps);
mViewBinding.setVisibility(mSskugrps.size() > 0 ? View.VISIBLE : View.INVISIBLE);
mViewBinding.rlSkugrp.setAdapter(mSkugrpAdapter);
mViewBinding.rlSkugrp.setLayoutManager(new LinearLayoutManager(mContext));
mViewBinding.setVisibility(View.INVISIBLE);
mViewBinding.llSkugrpAdd.setOnClickListener(view -> {
new SkugrpEditorDialog().show(((SsskuActivity) getActivity()));
});
......@@ -61,4 +63,17 @@ public class SkugrpFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSk
((SsskuActivity) getActivity()).backToManagerFragment();
return super.onBackPressedSupport();
}
class SkugrpAdapter extends BaseAdapter<Sskugrp, ItemSsskuSkugrpBinding> {
SkugrpAdapter() {
super(R.layout.item_sssku_skugrp, new ArrayList<>());
}
@Override
protected void convert(ItemSsskuSkugrpBinding mViewBinding, Sskugrp item) {
mViewBinding.tvName.setText(item.getSkuGrpName());
}
}
}
package com.xingdata.zzdpos.ui.manage.sssku.fragment;
import android.view.View;
import android.widget.EditText;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSsskuVipBinding;
import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuActivity;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.InputFilters;
public class VipFragment extends BaseFragment<SsskuPresenter, FragmentSsskuVipBinding> {
private Sssku mSssku;
@Override
public int getLayoutId() {
return R.layout.fragment_sssku_vip;
}
@Override
public void initView() {
mViewBinding.ivPic.setImageURI(mSssku.getSpuImg());
mViewBinding.setSku(mSssku);
this.initVipView();
this.setVipViewBySssku();
mViewBinding.btnConfirm.setOnClickListener(view -> {
this.processSssku();
mPresenter.clickConfirm(mSssku, C.SKU_EDITOR_MODE.UPDATE);
});
}
/**
* 设置商品
*
* @param sssku 商品信息
*/
public VipFragment setSssku(Sssku sssku) {
this.mSssku = sssku;
return this;
}
/**
* 初始化价格
*/
private void initVipView() {
View.OnFocusChangeListener mOnFocusChangeListener = (view, b) -> {
if (view instanceof EditText) {
EditText editText = (EditText) view;
if (b && editText.getText().toString().equals("0.0")) {
editText.setText("");
} else if (!b && editText.getText().length() == 0) {
editText.setText("0.0");
}
}
};
mViewBinding.etPoint.setFilters(InputFilters.getMoneyFilter(6));
mViewBinding.etPoint.setOnFocusChangeListener(mOnFocusChangeListener);
}
/**
* 根据商品设置价格页面
*/
private void setVipViewBySssku() {
mViewBinding.rgDis.check(mSssku.getSkuOffFlag() == null || mSssku.getSkuOffFlag() == 1 ? R.id.rb_dis_on : R.id.rb_dis_off);
if (mSssku.getSkuBoundAmt() == null) mSssku.setSkuBoundAmt(100L);
mViewBinding.etPoint.setText(ConvertUtil.fenToYuan(mSssku.getSkuBoundAmt()));
}
/**
* 处理商品
*/
private void processSssku() {
mSssku.setSkuOffFlag((byte) (mViewBinding.rbDisOff.isChecked() ? 0 : 1));
mSssku.setSkuBoundAmt(ConvertUtil.yuanToFen(mViewBinding.etPoint.getText().toString()));
mSssku.setCreateTime(null);
mSssku.setUpdateTime(null);
}
@Override
public boolean onBackPressedSupport() {
((SsskuActivity) getActivity()).backToDetailFragment();
return super.onBackPressedSupport();
}
}
......@@ -21,9 +21,12 @@ public interface UserContract {
interface View extends BaseView {
void queryOperSus(Pager<Oper> operPager);
void querySta(Sta sta);
}
abstract class Presenter extends BasePresenter<View> {
public abstract void getUserList(String wd);
public abstract void addUser(Oper oper);
public abstract void querySta();
}
}
\ No newline at end of file
......@@ -2,10 +2,12 @@ package com.xingdata.zzdpos.ui.manage.user;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.model.Oper;
import com.xingdata.zzdpos.ui.manage.user.fragment.UserListFragment;
public class UserPresenter extends UserContract.Presenter {
public UserListFragment userListFragment = new UserListFragment();
@Override
public void onAttached() {
......@@ -15,9 +17,29 @@ public class UserPresenter extends UserContract.Presenter {
@Override
public void getUserList(String wd) {
ApiFactory.Oper.queryOper(wd).subscribe(operPager -> {
mView.queryOperSus(operPager);
}, throwable -> {
});
}
@Override
public void addUser(Oper oper) {
ApiFactory.Oper.addOper(oper).subscribe(operPager -> {
}, throwable -> {
},throwable -> {
});
}
@Override
public void querySta() {
ApiFactory.Sta.querySta().subscribe(sta -> {
}, throwable -> {
});
}
}
......@@ -28,5 +28,10 @@ public class UserListAdapter extends BaseAdapter<Oper, ItemUserListItemBinding>
@Override
protected void convert(ItemUserListItemBinding mViewBinding, Oper item) {
mViewBinding.userName.setText(item.getOperName());
mViewBinding.userMobile.setText(String.valueOf(item.getOperMobile()));
}
}
......@@ -53,6 +53,7 @@ public class UserListFragment extends BaseFragment<UserPresenter, FragmentUserLi
});
adapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.userRecyclerView);
adapter.setEnableLoadMore(true);
adapter.loadMoreComplete();
mViewBinding.titleSearch.onBack.setOnClickListener(view -> {
getActivity().finish();
......
......@@ -25,8 +25,8 @@ public final class SystemUtil {
* @return 设备型号
*/
public static String getDeviceModel() {
return DeviceUtils.getModel();
// return DeviceUtils.getModel();
return "AECRC10";
}
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="@dimen/edit_border"
android:color="@color/gary"/>
<corners android:radius="@dimen/all_shape_radius"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="@color/black" />
<solid android:color="@color/deep_blue" />
<corners
android:bottomLeftRadius="3dp"
android:bottomRightRadius="3dp"
android:topLeftRadius="3dp"
android:topRightRadius="3dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="@dimen/edit_border"
android:color="@color/gary"/>
<solid android:color="@color/white"></solid>
<corners android:radius="@dimen/all_shape_radius"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="OnClickListener"
type="android.view.View.OnClickListener"></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack"
tools:context="com.xingdata.zzdhd.ui.manager.ticket.ReturnTicketActivity">
<FrameLayout
android:id="@+id/fl_content"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="24.5"></FrameLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="pointDisAmt"
type="String"/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/store_back"
android:focusable="true"
android:orientation="vertical">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_products"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_shop_item"
android:layout_width="match_parent"
android:background="@color/appBack"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -31,8 +31,7 @@
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming"
android:visibility="gone" />
android:background="@color/gray_kongming" />
<TextView
android:id="@+id/tv_update_price"
......@@ -42,16 +41,14 @@
android:gravity="center"
android:text="@string/sku_update_price"
android:textColor="@color/blue_mawu"
android:textSize="@dimen/all_text_size"
android:visibility="gone" />
android:textSize="@dimen/all_text_size" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming"
android:visibility="gone" />
android:background="@color/gray_kongming" />
<TextView
android:id="@+id/tv_update_vip"
......@@ -61,8 +58,7 @@
android:gravity="center"
android:text="@string/sku_update_vip"
android:textColor="@color/blue_mawu"
android:textSize="@dimen/all_text_size"
android:visibility="gone" />
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<TextView
......
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="isShowAdd"
type="boolean"/>
<variable
name="OnClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:focusable="true"
android:focusableInTouchMode="true"
tools:context="com.xingdata.zzdhd.ui.manager.ticket.ReturnTicketActivity">
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_title"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:animateLayoutChanges="true"
android:background="@color/white_caocao"
android:focusableInTouchMode="true"
app:layout_constraintBottom_toTopOf="@id/btn_add"
app:layout_constraintTop_toTopOf="parent">
<ImageButton
android:id="@+id/btn_back"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_black"
app:layout_constraintLeft_toLeftOf="parent"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin"
android:gravity="center|left"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/btn_back"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="parent">
<TextView
android:id="@+id/tv_keyword"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_weight="1"
android:background="@drawable/shape_gray_r1"
android:clickable="true"
android:drawableLeft="@mipmap/ic_search"
android:drawablePadding="@dimen/all_spacing"
android:enabled="true"
android:gravity="center|left"
android:hint="@string/store_search_hint"
android:maxLength="20"
android:maxLines="1"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_spacing"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/>
<ImageButton
android:id="@+id/btn_scan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/store_scan"
android:foreground="?android:attr/actionBarItemBackground"
android:src="@mipmap/but_sweep_yard"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf="parent"/>
</android.support.constraint.ConstraintLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai"></View>
<LinearLayout
android:id="@+id/btn_add"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/singleline_white_gray"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/ll_menu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_title">
<ImageView
android:id="@+id/iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/but_add"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_padding"
android:text="添加获取规则"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/text_three_title"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai"
app:layout_constraintTop_toBottomOf="@+id/btn_add"></View>
<TextView
android:id="@+id/btn_group"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/gray_zhouyu"
android:gravity="left|center_vertical"
android:paddingLeft="@dimen/all_padding"
android:text="共 2 个组合"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"
app:layout_constraintTop_toBottomOf="@+id/btn_add"/>
<View
android:id="@+id/vw"
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai"
app:layout_constraintTop_toBottomOf="@+id/btn_group"></View>
<LinearLayout
android:id="@+id/cl_bottom"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:orientation="vertical"
android:padding="@dimen/all_padding"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_group"
app:layout_constraintVertical_weight="22">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_products"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rc_bale_shop"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/ll_null"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/tv_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/all_margin"
android:drawableTop="@mipmap/icon_things_null"
android:gravity="center"
android:text="没有组合商品"
android:textColor="@color/white_half"
android:textSize="@dimen/all_text_size_big"/>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="isShowAdd"
type="boolean"/>
<variable
name="OnClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"></variable>
</data>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:focusable="true"
android:focusableInTouchMode="true"
tools:context="com.xingdata.zzdhd.ui.manager.ticket.ReturnTicketActivity">
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_title"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:animateLayoutChanges="true"
android:background="@color/white_caocao"
android:focusable="true"
android:focusableInTouchMode="true"
app:layout_constraintBottom_toTopOf="@id/btn_add"
app:layout_constraintTop_toTopOf="parent">
<ImageButton
android:id="@+id/btn_back"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_black"
app:layout_constraintLeft_toLeftOf="parent"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin"
android:gravity="center"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/btn_back"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="parent">
<EditText
android:id="@+id/et_keyword"
style="@style/searchBarEditor"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_weight="1"
android:hint="@string/store_search_hint"
android:imeOptions="actionSearch"
android:inputType="text"
android:labelFor="@+id/et_search"
android:saveEnabled="false"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/>
<TextView
android:id="@+id/btn_seach"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/transparent"
android:contentDescription="@string/store_scan"
android:foreground="?android:attr/actionBarItemBackground"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:text="搜索"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf="parent"/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="isShowAdd"
type="boolean"/>
<variable
name="OnClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"></variable>
</data>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
tools:context="com.xingdata.zzdhd.ui.manager.ticket.ReturnTicketActivity">
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_title"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:animateLayoutChanges="true"
android:background="@color/white_caocao"
android:focusable="true"
android:focusableInTouchMode="true"
app:layout_constraintTop_toTopOf="parent">
<ImageButton
android:id="@+id/btn_back"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_black"
app:layout_constraintLeft_toLeftOf="parent"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin"
android:gravity="center"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/btn_back"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="parent">
<EditText
android:id="@+id/et_keyword"
style="@style/searchBarEditor"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_weight="1"
android:focusable="true"
android:hint="@string/store_search_hint"
android:imeOptions="actionSearch"
android:inputType="text"
android:labelFor="@+id/et_search"
android:saveEnabled="false"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/>
<TextView
android:id="@+id/btn_seach"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/transparent"
android:contentDescription="@string/store_scan"
android:foreground="?android:attr/actionBarItemBackground"
android:gravity="center"
android:onClick="@{OnClickListener}"
android:text="搜索"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_body_size"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf="parent"/>
</android.support.constraint.ConstraintLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_products"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_shop_item"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -185,6 +185,7 @@
android:layout_width="0dp"
android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
app:layout_constraintHorizontal_weight="1.5"
......@@ -196,6 +197,7 @@
android:layout_width="0dp"
android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
app:layout_constraintHorizontal_weight="1.5"
......@@ -207,6 +209,7 @@
android:layout_width="0dp"
android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
app:layout_constraintLeft_toLeftOf="@id/ns_type_1"
......@@ -242,6 +245,7 @@
android:layout_height="match_parent"
android:layout_weight="3"
android:gravity="center_vertical"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
......@@ -283,6 +287,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
......@@ -741,6 +746,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
......
<?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">
<data>
<import type="android.view.View" />
<import type="com.xingdata.zzdpos.util.ConvertUtil" />
<variable
name="sku"
type="com.xingdata.zzdpos.model.Sssku" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:paddingTop="@dimen/all_margin">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginStart="@dimen/margin"
app:failureImage="@mipmap/icon_goods_default"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:placeholderImage="@mipmap/icon_goods_default"
app:roundedCornerRadius="@dimen/all_shape_radius" />
<TextView
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:lines="2"
android:text="@{sku.spuName}"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
app:layout_constraintLeft_toRightOf="@id/iv_pic"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:id="@+id/tv_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@drawable/shape_gray_r1"
android:padding="@dimen/all_spacing"
android:text="@{@string/sku_size+sku.spuUnitName}"
android:textSize="@dimen/all_caption_size"
app:layout_constraintBottom_toBottomOf="@id/ll_price"
app:layout_constraintLeft_toLeftOf="@id/tv_name" />
<LinearLayout
android:id="@+id/ll_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
app:layout_constraintRight_toRightOf="@id/tv_name"
app:layout_constraintTop_toBottomOf="@id/tv_name">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/money_rmb"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_caption_size"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{ConvertUtil.fenToYuan(sku.skuRetailPrice1)}"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_text_size"
android:textStyle="bold" />
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_height="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_pic" />
</android.support.constraint.ConstraintLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:text="@string/sku_subtitle_info"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_spacing"
android:background="@color/white_caocao"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical">
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingEnd="@null"
android:paddingStart="@dimen/all_margin"
android:text="@string/sku_price1"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<EditText
android:id="@+id/et_price1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:background="@color/transparent"
android:gravity="center_vertical"
android:inputType="numberDecimal"
android:labelFor="@+id/et_price1"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical">
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingEnd="@null"
android:paddingStart="@dimen/all_margin"
android:text="@string/sku_price2"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<EditText
android:id="@+id/et_price2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:background="@color/transparent"
android:gravity="center_vertical"
android:inputType="numberDecimal"
android:labelFor="@+id/et_price2"
android:saveEnabled="false"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<Button
android:id="@+id/btn_confirm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@drawable/shape_red_r1"
android:foreground="?android:attr/selectableItemBackground"
android:text="@string/all_confirm"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
</layout>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="OnClickListener"
type="android.view.View.OnClickListener"/>
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="180dp"
android:background="@color/white"
android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/all_margin">
<!--<com.xingdata.zzdhd.ui.manager.bale.view.NineGridImageView-->
<!--android:id="@+id/iv_pic"-->
<!--android:layout_width="0dp"-->
<!--android:layout_height="0dp"-->
<!--android:layout_margin="@dimen/all_margin"-->
<!--android:background="@drawable/shape_black"-->
<!--card_view:layout_constraintBottom_toBottomOf="parent"-->
<!--card_view:layout_constraintHorizontal_weight="1"-->
<!--card_view:layout_constraintLeft_toLeftOf="parent"-->
<!--card_view:layout_constraintRight_toLeftOf="@id/ll_shop_message"-->
<!--card_view:layout_constraintTop_toTopOf="parent"-->
<!--/>-->
<com.xingdata.zzdpos.ui.manage.bale.view.TribeAvatar
android:id="@+id/iv_pic"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/all_margin"
android:background="@drawable/shape_black"
android:padding="2dp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintHorizontal_weight="1"
card_view:layout_constraintLeft_toLeftOf="parent"
card_view:layout_constraintRight_toLeftOf="@id/ll_shop_message"
card_view:layout_constraintTop_toTopOf="parent">
</com.xingdata.zzdpos.ui.manage.bale.view.TribeAvatar>
<LinearLayout
android:id="@+id/ll_shop_message"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
android:padding="@dimen/all_padding"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintHorizontal_weight="1.5"
card_view:layout_constraintLeft_toRightOf="@id/iv_pic"
card_view:layout_constraintRight_toRightOf="parent"
card_view:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="left"
android:lines="1"
android:maxLines="1"
android:text="生日蛋糕组装礼盒带增补品啊是的那是代表开机速度卡角度看啦啦;等哈阿大大"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_padding"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="条码:"
android:textColor="@color/black_likui"/>
<TextView
android:id="@+id/tv_barNo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="8531651233213"
android:textColor="@color/black_likui"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="原价:"
android:textColor="@color/black_likui"/>
<RelativeLayout
android:layout_width="75dp"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_original_money"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:singleLine="true"
android:text="@string/money"
android:textColor="@color/black_likui"/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:background="@color/black_likui"></View>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="售价:"
android:textColor="@color/store_product_price"
android:textSize="@dimen/et_textsize"
android:textStyle="bold"/>
<TextView
android:id="@+id/tv_now_money"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/money"
android:textColor="@color/store_product_price"
android:textSize="@dimen/et_textsize"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="onClick"
type="com.xingdata.zzdpos.util.OnClickListener"/>
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_marginBottom="@dimen/all_padding"
android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/all_margin">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic"
android:layout_width="65dp"
android:layout_height="65dp"
app:placeholderImage="@mipmap/icon_goods_default"/>
<TextView
android:id="@+id/tv_title"
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/iv_pic"
app:layout_constraintTop_toTopOf="@id/iv_pic"/>
<TextView
android:id="@+id/tv_no_hint"
style="@style/other_select_smallstyle"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_marginTop="@dimen/all_padding"
android:text="条码:"
app:layout_constraintStart_toStartOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/tv_title"/>
<TextView
android:id="@+id/tv_no"
style="@style/other_select_smallstyle"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:text="12783163981789"
app:layout_constraintBottom_toBottomOf="@id/tv_no_hint"
app:layout_constraintStart_toEndOf="@id/tv_no_hint"
app:layout_constraintTop_toTopOf="@id/tv_no_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_constraintBottom_toBottomOf="@id/tv_no"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_no"/>
<TextView
android:id="@+id/tv_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="999"
android:textColor="@color/store_product_price"
android:textSize="@dimen/big_text_size"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/tv_rmb"
app:layout_constraintStart_toEndOf="@id/tv_rmb"
app:layout_constraintTop_toTopOf="@id/tv_price_hint"/>
<TextView
android:id="@+id/tv_rmb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:text="@string/money_rmb"
android:textColor="@color/store_product_price"
android:textSize="@dimen/all_text_size_small"
app:layout_constraintBottom_toBottomOf="@id/tv_price_hint"
app:layout_constraintStart_toEndOf="@+id/tv_price_hint"
app:layout_constraintTop_toTopOf="@id/tv_price_hint"/>
<LinearLayout
android:id="@+id/ll_up_down"
android:layout_width="wrap_content"
android:layout_height="@dimen/dialog_cart_item_button_height"
android:gravity="center"
android:orientation="horizontal"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tv_price_hint"
app:layout_constraintEnd_toEndOf="parent">
<ImageButton
android:id="@+id/btn_down"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin"
android:layout_weight="1"
android:background="@color/white"
android:src="@mipmap/but_reduce"/>
<TextView
android:id="@+id/et_shop_Num"
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/selector_edit_frame_blue_background"
android:digits="1234567890"
android:ems="5"
android:gravity="center"
android:inputType="phone|number"
android:lines="1"
android:maxLength="2"
android:onClick="@{onClick}"
android:saveEnabled="false"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="@dimen/all_text_size_low"/>
<ImageButton
android:id="@+id/btn_up"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/all_margin"
android:layout_weight="1"
android:background="@color/white"
android:src="@mipmap/but_add"
android:visibility="visible"
tools:layout_editor_absoluteX="666dp"
tools:layout_editor_absoluteY="97dp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_edit"
android:layout_width="wrap_content"
android:layout_height="@dimen/dialog_cart_item_button_height"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/tv_price_hint"
app:layout_constraintEnd_toEndOf="parent">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin"
android:layout_weight="1"
android:background="@color/white"
android:src="@mipmap/but_reduce"
android:visibility="invisible"/>
<EditText
android:id="@+id/et_shop_Num_edit"
android:layout_width="50dp"
android:layout_height="@dimen/textview_height"
android:background="@drawable/selector_edit_frame_blue_background"
android:digits="1234567890"
android:ems="5"
android:gravity="center"
android:inputType="phone|number"
android:lines="1"
android:maxLength="2"
android:singleLine="true"
/>
<Button
android:id="@+id/btn_edit_ok"
android:layout_width="55dp"
android:layout_height="27dp"
android:onClick="@{onClick}"
android:layout_marginStart="@dimen/all_margin"
android:background="@drawable/shape_black_solid_blue"
android:text="确定"
android:textColor="@color/white"
/>
</LinearLayout>
<TextView
android:id="@+id/tv_price_hint"
style="@style/other_select_smallstyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_padding"
android:text="进价:"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@id/tv_no_hint"
app:layout_constraintTop_toBottomOf="@id/tv_no_hint"/>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="OnClickListener"
type="android.view.View.OnClickListener"/>
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="180dp"
android:background="@drawable/shape_black_solid_write"
android:foreground="?android:attr/selectableItemBackground"
android:padding="@dimen/all_margin">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/all_margin"
android:padding="@dimen/all_padding"
android:src="@mipmap/icon_qrcode"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintHorizontal_weight="1"
card_view:layout_constraintLeft_toLeftOf="parent"
card_view:layout_constraintRight_toLeftOf="@id/ll_shop_message"
card_view:layout_constraintTop_toTopOf="parent"/>
<LinearLayout
android:id="@+id/ll_shop_message"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
android:padding="@dimen/all_padding"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintHorizontal_weight="1.5"
card_view:layout_constraintLeft_toRightOf="@id/iv_pic"
card_view:layout_constraintRight_toRightOf="parent"
card_view:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="left"
android:lines="2"
android:maxLines="2"
android:text="生日蛋糕组装礼盒带增补品啊是的那是代表开机速度卡角度看啦啦;等哈阿大大"
android:textColor="@color/black"
android:textSize="@dimen/all_text_size"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_padding"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="条码:"/>
<TextView
android:id="@+id/tv_No"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="8531651233213"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="售价:"
android:textSize="@dimen/et_textsize"
android:textStyle="bold"/>
<TextView
android:id="@+id/tv_money"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="¥ 120.00"
android:textColor="@color/red"
android:textSize="@dimen/et_textsize"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="isStrikeThrough"
type="boolean"/>
</data>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_margin="@dimen/all_padding"
android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@mipmap/icon_qrcode"/>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -31,7 +31,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="撒看见那"
android:textColor="@color/black_baozheng"
android:textSize="@{selected?@dimen/all_sub_title_size:@dimen/all_text_size}" />
......
<?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">
<data>
<import type="android.view.View" />
<variable
name="spuName"
type="String" />
<variable
name="spuUnitName"
type="String" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical">
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" />
</FrameLayout>
</layout>
......@@ -33,6 +33,10 @@
<dimen name="all_dialog_button">40dp</dimen>
<integer name="all_top_weight">2</integer>
<integer name="all_content_weight">25</integer>
<dimen name="all_button_radius_width_min">105dp</dimen>
<dimen name="all_button_radius_height_min">35dp</dimen>
<dimen name="all_button_radius_width">120dp</dimen>
<dimen name="all_button_radius_height">40dp</dimen>
<!--RADIUS-->
<dimen name="card_radius_medium">14dp</dimen>
<!--PADDING-->
......
......@@ -696,6 +696,7 @@
<string name="sku_skugrp">分组</string>
<string name="sku_type">类别</string>
<string name="sku_unit">单位</string>
<string name="sku_subtitle_price">调整价格</string>
<string name="sku_price1">售价</string>
<string name="sku_price2">促销价</string>
<string name="sku_subtitle_vip">会员信息</string>
......
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