Commit b27a4a65 authored by 姜敏's avatar 姜敏

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/java/com/xingdata/zzdpos/api/ApiService.java
parents 7babafac ed743618
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xingdata.zzdpos">
package="com.xingdata.zzdpos">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<application
android:name=".App"
......@@ -19,71 +19,71 @@
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/main_title"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.splash.SplashActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.login.LoginActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.exception.ErrorDialogActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:theme="@style/Theme.AppCompat.Light.Dialog"/>
android:theme="@style/Theme.AppCompat.Light.Dialog" />
<activity
android:name=".ui.exception.ServerErrActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:theme="@style/Theme.AppCompat.Light.Dialog"/>
android:theme="@style/Theme.AppCompat.Light.Dialog" />
<activity
android:name=".ui.payment.PaymentActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.marketing.integral.IntegralActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.marketing.ticket.ReturnTicketActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/title_activity_ticket"
android:theme="@style/AppTheme"/>
android:theme="@style/AppTheme" />
<activity
android:name=".ui.sendticke.SendTicketActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:label="@string/title_activity_ticket"
android:theme="@style/AppTheme"/>
android:theme="@style/AppTheme" />
<activity
android:name=".ui.settle.SettleActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.store.StoreActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.announcement.AnnouncementActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait"
android:theme="@style/AppTheme"
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
<activity android:name=".ui.help.HelpActivity"/>
<activity android:name=".ui.feedback.FeedBackActivity"/>
<activity android:name=".ui.statistics.StatisticsActivity"/>
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity android:name=".ui.help.HelpActivity" />
<activity android:name=".ui.feedback.FeedBackActivity" />
<activity android:name=".ui.statistics.StatisticsActivity" />
<activity
android:name=".ui.vip.VipActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden"/>
<activity android:name=".ui.marketing.marketingMenu.MarketingMenuActivity">
</activity>
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity android:name=".ui.marketing.marketingMenu.MarketingMenuActivity"></activity>
<activity android:name=".ui.statistics.StatisticsDetailActivity"></activity>
</application>
</manifest>
\ No newline at end of file
......@@ -128,10 +128,7 @@ public class C {
* 订单查询
*/
public static final String getSaleOrder = PKG + "saleorder/queryMis";
/**
* 订单列表查询
*/
public static final String queryOrderList = PKG + "saleorder/query";
/**
* 销售订单详情查询
*/
......@@ -484,6 +481,15 @@ public class C {
public static final int VIP = 6;
}
public final class DIS_TYPE {
//打折
public static final int DIS = 1;
//促销
public static final int PROMOTION = 2;
//满减
public static final int MONEY_OFF = 4;
}
public final class MS_GROUP {//MS_TOUCH_TAG_2
//全部
public static final int ALL = 1;
......
......@@ -255,9 +255,11 @@ public final class ApiFactory {
* @param pageSize
* @return
*/
public static Observable<Pager<com.xingdata.zzdpos.model.Saleorder>> getSaleOrderList(int pageNulmber, int
public static Observable<Pager<com.xingdata.zzdpos.model.Saleorder>> getSaleOrderList
(String orderStatus, int pageNulmber, int
pageSize, long startDate, long endDate) {
return Api.getInstance().service.getSaleOrder(pageNulmber, pageSize, startDate,
return Api.getInstance().service.getSaleOrder(orderStatus, pageNulmber, pageSize,
startDate,
endDate).onErrorReturn(new
ErrorFilter<>()).map(new ResultFilter<>()).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
......@@ -455,7 +457,8 @@ public final class ApiFactory {
public static class TRULE {
public static Observable<Pager<Trule>> truleQuery() {
return Api.getInstance().service.truleQuery().onErrorReturn(new
return Api.getInstance().service.truleQuery(System.currentTimeMillis() + "")
.onErrorReturn(new
ErrorFilter<>()).map(new ResultFilter<>()).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.retryWhen(new RetryHelper(3));
......@@ -712,8 +715,9 @@ public final class ApiFactory {
* @return
*/
public static Observable<Pager<com.xingdata.zzdpos.model.Cs>> querCsList(int pageNulmber,
int
pageSize, long startDate, long endDate) {
int pageSize,
long startDate,
long endDate) {
return Api.getInstance().service.querCsList(pageNulmber, pageSize, startDate,
endDate).onErrorReturn(new
ErrorFilter<>()).map(new ResultFilter<>()).subscribeOn(Schedulers.io())
......@@ -735,12 +739,13 @@ public final class ApiFactory {
}
}
public static class Sat {
public static class Sta {
/**
* /**
* 查询统计详情
*/
public static Observable<Sat> queryNotice() {
return Api.getInstance().service.querySat()
public static Observable<com.xingdata.zzdpos.model.Sta> querySta() {
return Api.getInstance().service.querySta()
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
.subscribeOn(Schedulers.io())
......@@ -983,7 +988,7 @@ public final class ApiFactory {
public static Observable<Pager<com.xingdata.zzdpos.model.Level>> getVipLevelList(int pageNumber, int pageSize) {
return Api.getInstance().service.getVipLevelList(pageNumber,pageSize)
return Api.getInstance().service.getVipLevelList(pageNumber, pageSize)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
.subscribeOn(Schedulers.io())
......
......@@ -21,6 +21,7 @@ import com.xingdata.zzdpos.model.Psb;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Sskugrp;
import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.model.Sta;
import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Trule;
import com.xingdata.zzdpos.model.Ubound;
......@@ -134,9 +135,14 @@ interface ApiService {
@Query
("wd") String wd);
@POST(C.URL.ORDER.queryOrderList)
Observable<HttpMessage<Pager<Saleorder>>> getSaleOrder(@Query("pageNumber") int pageNum, @Query
("pageSize") int pageSize, @Query("startDate") long startDate, @Query("endDate") long
@POST(C.URL.ORDER.getSaleOrder)
Observable<HttpMessage<Pager<Saleorder>>> getSaleOrder(@Query("orderStatus") String
orderStatus, @Query
("pageNumber") int pageNum,
@Query
("pageSize") int pageSize,
@Query("startDate") long startDate,
@Query("endDate") long
endDate);
@POST(C.URL.ORDER.getOrderDetail)
......@@ -174,7 +180,7 @@ interface ApiService {
("pageSize") int pageSize);
@POST(C.URL.STA.statistics)
Observable<HttpMessage<ApiFactory.Sat>> querySat();
Observable<HttpMessage<Sta>> querySta();
@POST(C.URL.PSB.queryDetail)
Observable<HttpMessage<Psb>> queryPsbDetail(@Query("psbNo") String psbNo, @Query("id") long id);
......@@ -266,7 +272,7 @@ interface ApiService {
@POST(C.URL.TRULE.truleQuery)
Observable<HttpMessage<Pager<Trule>>> truleQuery();
Observable<HttpMessage<Pager<Trule>>> truleQuery(@Query("startDate") String data);
@POST(C.URL.TRULE.truleDetail)
Observable<HttpMessage<String>> truleDetail(@Query("id") String id);
......@@ -343,7 +349,8 @@ interface ApiService {
Observable<HttpMessage<Level>> updateVipLevel(@Body Level l);
@POST(C.URL.LEVEL.queryAll)
Observable<HttpMessage<Pager<Level>>> getVipLevelList(@Query("pageNumber") int pageNumber, @Query ("pageSize") int pageSize);
Observable<HttpMessage<Pager<Level>>> getVipLevelList(@Query("pageNumber") int pageNumber,
@Query("pageSize") int pageSize);
@POST(C.URL.MSCARD.update)
Observable<HttpMessage<Mscard>> updateMscard(@Body Mscard m);
......@@ -372,9 +379,10 @@ interface ApiService {
Observable<HttpMessage<Ver>> getLastVer(@Query("sn") String sn);
@POST(C.URL.VIP.query)
Observable<HttpMessage<Pager<Vip>>> getVipList(@Query("vipLevel") String vipLevel,
@Query("pageNumber") int pageNumber,
@Query("pageSize") int pageSize);
Observable<HttpMessage<Pager<Vip>>> getVipList(@Query("vipLevel") String keycode,
@Query("pageNumber") int pageNumber,
@Query("pageSize") int pageSize);
}
......@@ -135,6 +135,9 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
if (getBaseActivity() != null && getBaseActivity().mDialogs != null) {
getBaseActivity().mDialogs.remove(this);
}
if (null != mDisp && (!mDisp.isDisposed())) {
mDisp.dispose();
}
}
......@@ -203,6 +206,10 @@ public abstract class BaseDialog<P extends BasePresenter, B extends ViewDataBind
public void dismiss() {
if (isShowing) {
if (null != mDisp && (!mDisp.isDisposed())) {
mDisp.dispose();
}
super.dismiss();
}
}
......
......@@ -2,6 +2,7 @@ package com.xingdata.zzdpos.db;
import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.TimeUtils;
import com.xingdata.zzdpos.App;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.base.BaseModel;
......@@ -15,8 +16,10 @@ import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.store.StorePresenter;
import com.xingdata.zzdpos.util.StringUtil;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import io.reactivex.Observable;
import io.realm.Realm;
......@@ -106,6 +109,46 @@ public class DBFactory {
return Observable.just(DB.getInstance().get(StorePresenter.class).where(Sskugrp.class).findAll())
.flatMap(sskugrps -> Observable.just(getList(sskugrps)));
}
/**
* 查询商品名称
*
* @param skuId 商品Id
* @return 商品名称
*/
public static String querySpuNameBySkuId(Long skuId) {
List<Sssku> ssskus = getList(DB.getInstance().get(StorePresenter.class).where(Sssku.class).equalTo("skuId", skuId).findAll());
if (ssskus.size() > 0) return ssskus.get(0).getSpuName();
else return null;
}
/**
* 查询营销活动
*
* @return 营销活动
*/
public static Observable<List<Ms>> queryMss() {
RealmQuery<Ms> query = DB.getInstance().get(StorePresenter.class).where(Ms.class);
query.equalTo("msStatus", 0);
query.notEqualTo("msTools", C.MS_TYPE.GIFT);
Long dateNow = Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("yyyyMMdd", Locale.getDefault())));
query.beginGroup().lessThanOrEqualTo("msDateBegin", dateNow).greaterThanOrEqualTo("msDateEnd", dateNow).endGroup();
String weekNow = String.valueOf(TimeUtils.getWeekIndex(TimeUtils.getNowDate()));
query.contains("msWeekPlan", weekNow);
Long timeNow = Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("HHmmss", Locale.getDefault())));
query.beginGroup().lessThanOrEqualTo("msTimeBegin", timeNow).greaterThanOrEqualTo("msTimeEnd", timeNow).endGroup();
query.equalTo("msCoustomTag", 0);
return Observable.just(query.findAllSorted("msTouchTag2", Sort.DESCENDING))
.flatMap(ms -> Observable.just(getList(ms)));
}
}
public static class Settle {
......@@ -131,6 +174,18 @@ public class DBFactory {
RealmQuery<Ms> query = DB.getInstance().get(SettlePresenter.class).where(Ms.class);
query.equalTo("msStatus", 0);
query.notEqualTo("msTools", C.MS_TYPE.GIFT);
Long dateNow = Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("yyyyMMdd", Locale.getDefault())));
query.beginGroup().lessThanOrEqualTo("msDateBegin", dateNow).greaterThanOrEqualTo("msDateEnd", dateNow).endGroup();
String weekNow = String.valueOf(TimeUtils.getWeekIndex(TimeUtils.getNowDate()));
query.contains("msWeekPlan", weekNow);
Long timeNow = Long.valueOf(TimeUtils.getNowString(new SimpleDateFormat("HHmmss", Locale.getDefault())));
query.beginGroup().lessThanOrEqualTo("msTimeBegin", timeNow).greaterThanOrEqualTo("msTimeEnd", timeNow).endGroup();
return Observable.just(query.findAllSorted("msTouchTag2", Sort.DESCENDING))
.flatMap(ms -> Observable.just(getList(ms)));
}
......
......@@ -289,6 +289,8 @@ public class Ms extends RealmObject implements BaseModel, BaseBean {
private Long skuPrice1;
private String cateName;
public Long getId() {
return id;
}
......@@ -724,6 +726,14 @@ public class Ms extends RealmObject implements BaseModel, BaseBean {
this.skuPrice1 = skuPrice1;
}
public String getCateName() {
return cateName;
}
public void setCateName(String cateName) {
this.cateName = cateName;
}
public List<Saledetail> getSaledetailList() {
return saledetailList;
}
......
......@@ -58,12 +58,12 @@ public class Saledetail implements BaseModel, BaseBean,BaseGoodPrint {
@Override
public String getPrice() {
return ConvertUtil.fenToYuan(skuPrice,false);
return ConvertUtil.fenToYuan(skuPrice, false);
}
@Override
public String getSubtotal() {
return ConvertUtil.fenToYuan(detailAmt,false);
return ConvertUtil.fenToYuan(detailAmt, false);
}
@Override
......@@ -217,8 +217,7 @@ public class Saledetail implements BaseModel, BaseBean,BaseGoodPrint {
*/
public void setVip(Vip vip) {
this.vip = vip;
skuPricePay = skuOffFlag > 0 ? skuPrice * (vip.getVipDefDiscount() > 0 ? vip
.getVipDefDiscount() : 100) / 100 : skuPrice;
skuPricePay = skuOffFlag > 0 ? skuPrice * (vip.getVipDefDiscount() > 0 ? vip.getVipDefDiscount() : 100) / 100 : skuPrice;
detailAmt = skuPricePay * detailCnt;
}
......
package com.xingdata.zzdpos.model;
import android.provider.MediaStore;
import android.support.annotation.Nullable;
import android.util.ArrayMap;
import com.alibaba.fastjson.annotation.JSONField;
import com.chad.library.adapter.base.entity.SectionEntity;
import com.xingdata.api.print.entity.BaseGoodPrint;
import com.xingdata.api.print.entity.BaseOrderPrint;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseBean;
import com.xingdata.zzdpos.base.BaseModel;
import com.xingdata.zzdpos.util.ConvertUtil;
......@@ -20,9 +21,21 @@ import java.util.Map;
/**
* 订单
*/
public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseModel, BaseBean, BaseOrderPrint {
public Saleorder(boolean isHeader, String header) {
super(isHeader, header);
}
public Saleorder(MediaStore.Video video) {
super(video);
}
public Saleorder() {
super(false, "");
}
/**
* 获取参数对象
*
......@@ -209,6 +222,8 @@ public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
public String payAcctNo;
}
private String firstName;
/**
* 订单的总成本
*/
......@@ -923,45 +938,6 @@ public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
return saleorder;
}
public List<PreferentialProject> getPreferentialProject() {
List<PreferentialProject> preferentialProjects = new ArrayList<>();
if (this.vipOffAmt > 0) {
preferentialProjects.add(new PreferentialProject(R.mipmap.cart_fragment_zhe, this.vipOffAmt));
}
if (this.ticketAmt > 0) {
preferentialProjects.add(new PreferentialProject(R.mipmap.cart_fragment_quan, this.ticketAmt));
}
if (this.boundNum > 0) {
preferentialProjects.add(new PreferentialProject(R.mipmap.cart_fragment_ji, this.boundNum));
}
if (this.cutAmt > 0) {
preferentialProjects.add(new PreferentialProject(R.mipmap.cart_fragment_ling, this.cutAmt));
}
for (Map.Entry<Long, Ms> entry : msMap.entrySet()) {
if (entry.getValue().getDisAmt() > 0) {
switch (entry.getValue().getMsTools()) {
case C.MS_TYPE.DIS:
preferentialProjects.add(new PreferentialProject(R.mipmap.cart_fragment_zhe, entry.getValue().getDisAmt()));
break;
case C.MS_TYPE.GIFT:
break;
case C.MS_TYPE.MONEY_OFF:
preferentialProjects.add(new PreferentialProject(R.mipmap.cart_fragment_man, entry.getValue().getDisAmt()));
break;
case C.MS_TYPE.PROMOTION:
preferentialProjects.add(new PreferentialProject(R.mipmap.cart_fragment_cu, entry.getValue().getDisAmt()));
break;
case C.MS_TYPE.SECOND:
preferentialProjects.add(new PreferentialProject(R.mipmap.cart_fragment_zhe, entry.getValue().getDisAmt()));
break;
}
}
}
return preferentialProjects;
}
@Override
public String getOrderTime() {
......@@ -1016,11 +992,15 @@ public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
@Override
public List<BaseGoodPrint> getGoodList() {
List<BaseGoodPrint> baseGoodPrints = new ArrayList<>();
for (Saledetail saledetail : saledetailList) {
baseGoodPrints.add(saledetail);
if (saledetailList != null) {
List<BaseGoodPrint> baseGoodPrints = new ArrayList<>();
for (Saledetail saledetail : saledetailList) {
baseGoodPrints.add(saledetail);
}
return baseGoodPrints;
} else {
return null;
}
return baseGoodPrints;
}
@Override
......@@ -1084,29 +1064,79 @@ public class Saleorder implements BaseModel, BaseBean, BaseOrderPrint {
/**
* 优惠项目实体类
*/
public class PreferentialProject {
public PreferentialProject(Integer bitmapRes, Long money) {
this.imgRes = bitmapRes;
this.money = money;
public class Dis {
private Integer disType;
private Long disAmt;
Dis(Integer disType) {
this.disType = disType;
this.disAmt = 0L;
}
private Integer imgRes;
private Long money;
public Integer getDisType() {
return disType;
}
public Integer getImgRes() {
return imgRes;
public void setDisType(Integer disType) {
this.disType = disType;
}
public void setImgRes(Integer imgRes) {
this.imgRes = imgRes;
public Long getDisAmt() {
return disAmt;
}
public Long getMoney() {
return money;
public void setDisAmt(Long disAmt) {
this.disAmt = disAmt;
}
}
public void setMoney(Long money) {
this.money = money;
public List<Dis> getDisList() {
Dis dis = new Dis(C.DIS_TYPE.DIS);
Dis moneyOff = new Dis(C.DIS_TYPE.MONEY_OFF);
Dis promotion = new Dis(C.DIS_TYPE.PROMOTION);
for (Map.Entry<Long, Ms> entry : msMap.entrySet()) {
if (entry.getValue().getDisAmt() > 0) {
switch (entry.getValue().getMsTools()) {
case C.MS_TYPE.DIS:
dis.setDisAmt(dis.getDisAmt() + entry.getValue().getDisAmt());
break;
case C.MS_TYPE.GIFT:
break;
case C.MS_TYPE.MONEY_OFF:
moneyOff.setDisAmt(entry.getValue().getDisAmt());
break;
case C.MS_TYPE.PROMOTION:
promotion.setDisAmt(entry.getValue().getDisAmt());
break;
case C.MS_TYPE.SECOND:
dis.setDisAmt(dis.getDisAmt() + entry.getValue().getDisAmt());
break;
}
}
}
List<Dis> disList = new ArrayList<>();
if (dis.getDisAmt() > 0) {
disList.add(dis);
}
if (moneyOff.getDisAmt() > 0) {
disList.add(moneyOff);
}
if (promotion.getDisAmt() > 0) {
disList.add(promotion);
}
return disList;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
}
\ No newline at end of file
......@@ -10,10 +10,8 @@ import com.xingdata.zzdpos.base.BaseDialog;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.databinding.DialogLoadingBinding;
import io.reactivex.disposables.Disposable;
public class LoadingDialog extends BaseDialog<BasePresenter, DialogLoadingBinding> {
Disposable disp;
// Disposable disp;
boolean isClose = true;
@Override
......@@ -39,8 +37,7 @@ public class LoadingDialog extends BaseDialog<BasePresenter, DialogLoadingBindin
}
public void show(BaseActivity activity, boolean isClose) {
this.isClose = isClose;
show(activity);
super.show(activity);
}
@Override
......@@ -51,9 +48,9 @@ public class LoadingDialog extends BaseDialog<BasePresenter, DialogLoadingBindin
@Override
public void onDismiss(DialogInterface dialog) {
super.onDismiss(dialog);
if (null != disp && (!disp.isDisposed())) {
disp.dispose();
}
// if (null != disp && (!disp.isDisposed())) {
// disp.dispose();
// }
}
......
package com.xingdata.zzdpos.ui.login.fragment;
import android.graphics.Color;
import android.view.View;
import android.widget.AdapterView;
import com.bigkoo.pickerview.OptionsPickerView;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
......@@ -11,6 +12,7 @@ import com.xingdata.zzdpos.databinding.FragmentBindingCounterBinding;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.dialog.PromptDialog;
import com.xingdata.zzdpos.ui.login.LoginPresenter;
import com.xingdata.zzdpos.ui.login.fragment.bean.Cashers;
import com.xingdata.zzdpos.ui.login.fragment.bean.Shops;
import com.xingdata.zzdpos.util.OnClickListener;
......@@ -30,7 +32,7 @@ public class BindingCounterFragment extends BaseFragment<LoginPresenter,
long CounterId = -1;
//-1没有选择,0新增,1绑定现有款台
int isNewCounterCount = -1;
List<String> dataset;
List<Cashers> dataset;
@Override
public int getLayoutId() {
......@@ -49,26 +51,16 @@ public class BindingCounterFragment extends BaseFragment<LoginPresenter,
if (LoginPresenter.userStoreInfo.getMerchant() != null) {
mViewBinding.tvNickname.setText(LoginPresenter.userStoreInfo.getMerchant().getMerName
());
mViewBinding.tvInStorename.setText(mShops.getPickerViewText());
mViewBinding.tvStoreAddress.setText(mShops.getCityProvName()+"/"+mShops.getCityName()+"/"+mShops.getCityCountyName()+"/"+mShops.getCityAddress());
}
dataset = new ArrayList<>();
for (int i = 0; i < mShops.getCashers().size(); i++) {
dataset.add(mShops.getCashers().get(i).getCasherNo() + "款台");
dataset.add(mShops.getCashers().get(i));
}
if (dataset.size() > 0) {
CounterId = mShops.getCashers().get(0).getCasherId();
mViewBinding.counterSpinner.attachDataSource(dataset);
mViewBinding.counterSpinner.setOnItemSelectedListener(new AdapterView
.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
CounterId = mShops.getCashers().get(i).getCasherId();
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
CounterId = dataset.get(0).getCasherId();
mViewBinding.tvSelectCounter.setText(dataset.get(0).getCasherNo() + "号款台");
}
mViewBinding.setOnClickListener(view -> {
switch (view.getId()) {
......@@ -106,6 +98,14 @@ public class BindingCounterFragment extends BaseFragment<LoginPresenter,
}
break;
case R.id.tv_select_counter: {
if (dataset.size() > 0) {
ShowPickerViewStoreAddress();
} else {
ToastUtils.showLong("当前门店没有款台请新建款台");
}
}
break;
default: {
}
......@@ -114,6 +114,29 @@ public class BindingCounterFragment extends BaseFragment<LoginPresenter,
});
}
/**
* 弹出款台选择器
*/
private void ShowPickerViewStoreAddress() {// 弹出选择器
OptionsPickerView pvOptions = new OptionsPickerView.Builder(getActivity(), new
OptionsPickerView.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int options2, int options3, View v) {
String tx = dataset.get(options1).getPickerViewText();
mViewBinding.tvSelectCounter.setText(tx + "号款台");
CounterId = dataset.get(options1).getCasherNo();
}
}).setTitleText("款台选择")
.setDividerColor(Color.BLACK)
.setTextColorCenter(Color.BLACK) //设置选中项文字颜色
.setContentTextSize(20)
.build();
pvOptions.setPicker(dataset);
pvOptions.show();
}
/**
* 设置新增款台或者绑定款台的ui信息
*/
......
package com.xingdata.zzdpos.ui.login.fragment;
import android.graphics.Color;
import android.view.View;
import android.widget.AdapterView;
import com.bigkoo.pickerview.OptionsPickerView;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
......@@ -26,6 +27,7 @@ public class ChoiceStoreFragment extends BaseFragment<LoginPresenter,
private Shops shops;
private Boolean lock = false;
private LoadingDialog mLoadingDialog = new LoadingDialog();
List<Shops> list = new ArrayList<>();
@Override
public int getLayoutId() {
......@@ -34,7 +36,7 @@ public class ChoiceStoreFragment extends BaseFragment<LoginPresenter,
@Override
public void initView() {
mViewBinding.icTitle.tvTitle.setText("绑定款台");
mViewBinding.icTitle.tvTitle.setText("选择门店");
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
......@@ -54,6 +56,15 @@ public class ChoiceStoreFragment extends BaseFragment<LoginPresenter,
}
// mPresenter.getUserStoreInfo("");
}
break;
case R.id.tv_select_store: {
if (list.size() > 0) {
ShowPickerViewStoreAddress();
} else {
ToastUtils.showLong("当前没有门店数据,请选择新建门店");
}
}
break;
case R.id.ll_new_store: {
......@@ -74,29 +85,36 @@ public class ChoiceStoreFragment extends BaseFragment<LoginPresenter,
lock = true;
if (LoginPresenter.userStoreInfo.getShops().size() > 0) {
shops = LoginPresenter.userStoreInfo.getShops().get(0);
mViewBinding.tvSelectStore.setText(shops.getPickerViewText());
}
mViewBinding.tvNickname.setText(LoginPresenter.userStoreInfo.getMerchant().getMerName());
List<String> dataset = new ArrayList<>();
for (int i = 0; i < LoginPresenter.userStoreInfo.getShops().size(); i++) {
dataset.add(LoginPresenter.userStoreInfo.getShops().get(i).getShopName());
list.add(LoginPresenter.userStoreInfo.getShops().get(i));
}
if (dataset.size() > 0) {
mViewBinding.storeSpinner.attachDataSource(dataset);
mViewBinding.storeSpinner.setOnItemSelectedListener(new AdapterView
.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
shops = LoginPresenter.userStoreInfo.getShops().get(i);
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
}
/**
* 弹出门店择器
*/
private void ShowPickerViewStoreAddress() {// 弹出选择器
OptionsPickerView pvOptions = new OptionsPickerView.Builder(getActivity(), new
OptionsPickerView.OnOptionsSelectListener() {
@Override
public void onOptionsSelect(int options1, int options2, int options3, View v) {
String tx = list.get(options1).getPickerViewText();
mViewBinding.tvSelectStore.setText(tx);
shops = list.get(options1);
}
}).setTitleText("门店选择")
.setDividerColor(Color.BLACK)
.setTextColorCenter(Color.BLACK) //设置选中项文字颜色
.setContentTextSize(20)
.build();
pvOptions.setPicker(list);
pvOptions.show();
}
@Override
......
package com.xingdata.zzdpos.ui.login.fragment;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.text.InputFilter;
import android.text.InputType;
import android.view.View;
......@@ -111,6 +113,38 @@ public class InputPasswordFragment extends BaseFragment<LoginPresenter,
break;
}
});
mViewBinding.etOnePassword.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View view, boolean b) {
Resources res = getResources();
Drawable img_off;
if (b) {
img_off = res.getDrawable(R.mipmap.login_pwd02);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etOnePassword.setCompoundDrawables(img_off, null, null, null);
} else {
img_off = res.getDrawable(R.mipmap.login_pwd01);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etOnePassword.setCompoundDrawables(img_off, null, null, null);
}
}
});
mViewBinding.etTwoPassword.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View view, boolean b) {
Resources res = getResources();
Drawable img_off;
if (b) {
img_off = res.getDrawable(R.mipmap.pwd_two02);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etTwoPassword.setCompoundDrawables(img_off, null, null, null);
} else {
img_off = res.getDrawable(R.mipmap.pwd_two01);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etTwoPassword.setCompoundDrawables(img_off, null, null, null);
}
}
});
}
public void setStartway(int _startWay) {
......
package com.xingdata.zzdpos.ui.login.fragment;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.InputFilter;
import android.text.InputType;
......@@ -77,8 +79,9 @@ public class SignInFragment extends BaseFragment<LoginPresenter,
new android.os.Handler().postDelayed(new Runnable() {
@Override
public void run() {
mPresenter.downList(mViewBinding.etPhone, PopupWindowDownList
.CLERK_LOGIN, null);
mPresenter.downList(mViewBinding.etPhone,
PopupWindowDownList
.CLERK_LOGIN, null);
}
}, time);
......@@ -86,9 +89,10 @@ public class SignInFragment extends BaseFragment<LoginPresenter,
}
break;
case R.id.btn_login: {
if (mViewBinding.etPwd.getText().toString().isEmpty() || mViewBinding.etPhone
if (mViewBinding.etPwd.getText().toString().isEmpty() ||
mViewBinding.etPhone
.getText().toString().isEmpty()) {
.getText().toString().isEmpty()) {
ToastUtils.showLong("账号密码不能为空");
} else {
promptDialog = new PromptDialog().setDialogType(PromptDialog
......@@ -96,7 +100,8 @@ public class SignInFragment extends BaseFragment<LoginPresenter,
mLoadingDialog.show((BaseActivity) getActivity());
mPresenter.signIn(mViewBinding.etPhone.getText().toString(),
mViewBinding
.etPwd.getText().toString(), promptDialog, mLoadingDialog);
.etPwd.getText().toString(), promptDialog,
mLoadingDialog);
}
}
......@@ -121,6 +126,38 @@ public class SignInFragment extends BaseFragment<LoginPresenter,
}
}
});
mViewBinding.etPhone.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View view, boolean b) {
Resources res = getResources();
Drawable img_off;
if (b) {
img_off = res.getDrawable(R.mipmap.login_username2);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etPhone.setCompoundDrawables(img_off, null, null, null);
} else {
img_off = res.getDrawable(R.mipmap.login_username1);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etPhone.setCompoundDrawables(img_off, null, null, null);
}
}
});
mViewBinding.etPwd.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View view, boolean b) {
Resources res = getResources();
Drawable img_off;
if (b) {
img_off = res.getDrawable(R.mipmap.login_pwd02);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etPwd.setCompoundDrawables(img_off, null, null, null);
} else {
img_off = res.getDrawable(R.mipmap.login_pwd01);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etPwd.setCompoundDrawables(img_off, null, null, null);
}
}
});
}
@Override
......
package com.xingdata.zzdpos.ui.login.fragment;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.view.View;
import com.xingdata.zzdpos.R;
......@@ -82,6 +84,38 @@ public class SmsCodeFragment extends BaseFragment<LoginPresenter,
break;
}
});
mViewBinding.etPhone.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View view, boolean b) {
Resources res = getResources();
Drawable img_off;
if (b) {
img_off = res.getDrawable(R.mipmap.login_username2);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etPhone.setCompoundDrawables(img_off, null, null, null);
} else {
img_off = res.getDrawable(R.mipmap.login_username1);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etPhone.setCompoundDrawables(img_off, null, null, null);
}
}
});
mViewBinding.etSmsCode.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View view, boolean b) {
Resources res = getResources();
Drawable img_off;
if (b) {
img_off = res.getDrawable(R.mipmap.sms02);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etSmsCode.setCompoundDrawables(img_off, null, null, null);
} else {
img_off = res.getDrawable(R.mipmap.sms01);
img_off.setBounds(0, 0, img_off.getMinimumWidth(), img_off.getMinimumHeight());
mViewBinding.etSmsCode.setCompoundDrawables(img_off, null, null, null);
}
}
});
}
public void sendSmsSucc() {
......
package com.xingdata.zzdpos.ui.login.fragment.bean;
import com.bigkoo.pickerview.model.IPickerViewData;
/**
* Created by Administrator on 2017/11/6.
*/
public class Cashers {
public class Cashers implements IPickerViewData {
private long id;
private long opMapId;
private long channelMapId;
......@@ -95,4 +97,9 @@ public class Cashers {
public void setCasherNum(long casherNum) {
this.casherNum = casherNum;
}
@Override
public String getPickerViewText() {
return this.casherNo + "";
}
}
package com.xingdata.zzdpos.ui.login.fragment.bean;
import com.bigkoo.pickerview.model.IPickerViewData;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Administrator on 2017/11/3.
*/
public class Shops {
public class Shops implements IPickerViewData {
private long shopMapId;
private long shopIfId;
......@@ -261,4 +263,8 @@ public class Shops {
return createTime;
}
@Override
public String getPickerViewText() {
return this.shopName;
}
}
......@@ -9,6 +9,7 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivitySettleBinding;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Vip;
......@@ -111,6 +112,11 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
mCashPayFragment.loadSaleorder(saleorder);
}
@Override
public void loadSaledetails(List<Saledetail> saledetails) {
mSettleFragment.loadSaledetails(saledetails);
}
@Override
public void showPayFragment(int payChannel) {
switch (payChannel) {
......
......@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.ui.settle;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Vip;
......@@ -77,6 +78,13 @@ interface SettleContract {
*/
void loadSaleorder(Saleorder saleorder);
/**
* 加载订单
*
* @param saledetails 详情列表
*/
void loadSaledetails(List<Saledetail> saledetails);
/**
* 显示支付页面
*
......@@ -130,6 +138,11 @@ interface SettleContract {
*/
public abstract void initSettle();
/**
* 结算页面 - 初始化商店信息
*/
public abstract void initStoreInfo();
/**
* 结算页面 - 点击会员View
*/
......
......@@ -6,7 +6,6 @@ import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Ticket;
......@@ -38,11 +37,7 @@ public class SettlePresenter extends SettleContract.Presenter {
* 当前的营销活动列表
*/
private List<Ms> mMss;
/**
* 当前设备的支付渠道信息
*/
private List<Pay> mPays;
private Ms.OnApplyListener mOnApplyListener;
/**
* 当前购物车的商品明细
......@@ -71,6 +66,24 @@ public class SettlePresenter extends SettleContract.Presenter {
this.getStoreIntent();
break;
}
mOnApplyListener = new Ms.OnApplyListener() {
@Override
public void setDis(Ms ms) {
mSaleorder.addMsDis(ms);
}
@Override
public void addGift(Long msId, Long skuId, long addAmt) {
//这一版不做处理
}
@Override
public void removeGift(Long msId) {
//这一版不作处理
}
};
}
/**
......@@ -79,14 +92,13 @@ public class SettlePresenter extends SettleContract.Presenter {
private void getPaymentIntent() {
Long payAmt = getIntent().getLongExtra(C.EXTRA_KEY.SETTLE_EXTRA, 0);
mSaledetails.add(0, Saledetail.create("收款", payAmt, mVip));
mSaleorder.setSaledetails(mSaledetails);
}
/**
* 获取开单信息
*/
private void getStoreIntent() {
mSaledetails.addAll((ArrayList) getIntent().getSerializableExtra(C.EXTRA_KEY.SETTLE_EXTRA));
}
......@@ -101,6 +113,24 @@ public class SettlePresenter extends SettleContract.Presenter {
this.reprice();
}
@Override
public void initStoreInfo() {
mView.loadSaledetails(mSaledetails);
//设置订单详情
mSaleorder.setSaledetails(mSaledetails);
DBFactory.Settle.queryMss().subscribe(ms -> {
mMss = ms;
for (int i = 0; i < mMss.size(); i++) {
mMss.get(i).setOnApplyListener(mOnApplyListener);
}
//处理营销活动
this.processMs();
//计算价格
this.reprice();
});
}
@Override
public void clickVipView() {
mView.showVipFragment();
......@@ -123,6 +153,12 @@ public class SettlePresenter extends SettleContract.Presenter {
public void selectVip(Vip vip) {
// 设置会员
this.setVip(vip);
// 重新设置购物车
mSaleorder.setSaledetails(mSaledetails);
//处理营销活动
this.processMs();
// 加载购物车
mView.loadSaledetails(mSaledetails);
// 计算价格
this.reprice();
......@@ -290,6 +326,27 @@ public class SettlePresenter extends SettleContract.Presenter {
mView.loadAvlTicketNum(avlTicketNum);
}
/**
* 处理营销活动
*/
private void processMs() {
//重置商品
for (int i = 0; i < mMss.size(); i++) {
mMss.get(i).setSaledetailList(new ArrayList<>());
}
//添加商品
for (int i = 0; i < mSaledetails.size(); i++) {
for (int j = 0; j < mMss.size(); j++) {
if (!mMss.get(j).isAvailable(mVip)) continue;
if (mMss.get(j).addSaledetail(mSaledetails.get(i))) break;
}
}
//判断
for (int i = 0; i < mMss.size(); i++) {
mMss.get(i).execute();
}
}
/**
* 统计订单信息
......
package com.xingdata.zzdpos.ui.settle.adapter;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemSettleDisBinding;
import com.xingdata.zzdpos.model.Saleorder;
import java.util.ArrayList;
public class DisAdapter extends BaseAdapter<Saleorder.Dis, ItemSettleDisBinding> {
public DisAdapter() {
super(R.layout.item_settle_dis, new ArrayList<>());
}
@Override
protected void convert(ItemSettleDisBinding mViewBinding, Saleorder.Dis item) {
mViewBinding.setAmt(item.getDisAmt());
switch (item.getDisType()) {
case C.DIS_TYPE.DIS:
mViewBinding.tvType.setText(R.string.ms_type_dis_abbr);
mViewBinding.tvType.setBackgroundResource(R.drawable.shape_red_oval);
break;
case C.DIS_TYPE.PROMOTION:
mViewBinding.tvType.setText(R.string.ms_type_promotion_abbr);
mViewBinding.tvType.setBackgroundResource(R.drawable.shape_orange_oval);
break;
case C.DIS_TYPE.MONEY_OFF:
mViewBinding.tvType.setText(R.string.ms_type_money_off_abbr);
mViewBinding.tvType.setBackgroundResource(R.drawable.shape_green_oval);
break;
}
}
}
package com.xingdata.zzdpos.ui.settle.adapter;
import android.graphics.Paint;
import android.view.View;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemSettleSaledetailBinding;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.ArrayList;
public class SaledetailAdapter extends BaseAdapter<Saledetail, ItemSettleSaledetailBinding> {
public SaledetailAdapter() {
super(R.layout.item_settle_saledetail, new ArrayList<>());
}
@Override
protected void convert(ItemSettleSaledetailBinding mViewBinding, Saledetail item) {
mViewBinding.tvName.setText(item.getMsId() > 0 ? "【换购】" + item.getSpuName() : item.getSpuName());
mViewBinding.tvCount.setText(String.valueOf(item.getDetailCnt()));
mViewBinding.tvPrice.setText(ConvertUtil.fenToYuan(item.getSkuPricePay(), true));
mViewBinding.tvAmt.setText(ConvertUtil.fenToYuan(item.getDetailAmt(), true));
if (item.isDiscount()) {
mViewBinding.tvInitialPrice.setText(ConvertUtil.fenToYuan(item.getSkuPrice(), true));
mViewBinding.tvInitialPrice.setVisibility(View.VISIBLE);
mViewBinding.tvInitialPrice.setPaintFlags(mViewBinding.tvPrice.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
} else {
mViewBinding.tvInitialPrice.setVisibility(View.GONE);
}
}
}
package com.xingdata.zzdpos.ui.settle.fragment;
import android.support.design.widget.BottomSheetBehavior;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.View;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSettleBinding;
import com.xingdata.zzdpos.model.Pay;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.settle.adapter.DisAdapter;
import com.xingdata.zzdpos.ui.settle.adapter.PayAdapter;
import com.xingdata.zzdpos.ui.settle.adapter.SaledetailAdapter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
......@@ -23,6 +29,9 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
private PayAdapter mPayAdapter;
private List<Pay> mPays;
private SaledetailAdapter mSaledetailAdapter;
private DisAdapter mDisAdapter;
@Override
public int getLayoutId() {
return R.layout.fragment_settle;
......@@ -69,8 +78,52 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
* @param settleMode 收款模式
*/
public void setViewBySettleMode(int settleMode) {
switch (settleMode) {
case C.SETTLE_MODE.PAYMENT:
mViewBinding.llTicket.setVisibility(View.GONE);
break;
case C.SETTLE_MODE.STORE:
mViewBinding.llTicket.setVisibility(View.VISIBLE);
this.initStoreView();
break;
}
}
/**
* 初始化
*/
private void initStoreView() {
//init s
mSaledetailAdapter = new SaledetailAdapter();
mViewBinding.rlSaledetail.setAdapter(mSaledetailAdapter);
mViewBinding.rlSaledetail.setLayoutManager(new LinearLayoutManager(mContext));
mSaledetailAdapter.addHeaderView(getLayoutInflater().inflate(R.layout.view_saledetail_header, null));
//init d
mDisAdapter = new DisAdapter();
mViewBinding.rlDis.setAdapter(mDisAdapter);
mViewBinding.rlDis.setLayoutManager(new GridLayoutManager(mContext, 3));
//set other listener
mViewBinding.llSaledetailHint.setOnClickListener(view -> mViewBinding.cbSaledetail.setChecked(!mViewBinding.cbSaledetail.isChecked()));
mViewBinding.llDisHint.setOnClickListener(view -> mViewBinding.cbDis.setChecked(!mViewBinding.cbDis.isChecked()));
mViewBinding.cbSaledetail.setOnCheckedChangeListener((compoundButton, b) -> {
mViewBinding.cbSaledetail.setButtonDrawable(b ? R.mipmap.but_up : R.mipmap.but_unfurled);
mViewBinding.llSaledetail.setVisibility(b ? View.VISIBLE : View.GONE);
});
mViewBinding.cbDis.setOnCheckedChangeListener((compoundButton, b) -> {
mViewBinding.cbDis.setButtonDrawable(b ? R.mipmap.but_up : R.mipmap.but_unfurled);
mViewBinding.llDis.setVisibility(b ? View.VISIBLE : View.GONE);
});
//init
mPresenter.initStoreInfo();
}
/**
* 加载会员
*
......@@ -118,13 +171,29 @@ public class SettleFragment extends BaseFragment<SettlePresenter, FragmentSettle
* @param saleorder 订单信息
*/
public void loadSaleorder(Saleorder saleorder) {
mViewBinding.setOrderAuthAmt(saleorder.getOrderAuthAmt());
mViewBinding.setOrderAuthAmt(saleorder.getOrderVipOffAmt() - saleorder.getMsDisAmt());
mViewBinding.setOrderPayAmt(saleorder.getOrderPayAmt());
mViewBinding.setTicketAmt(saleorder.getTicketAmt());
mViewBinding.setAvlPoints(saleorder.getBoundNum());
mViewBinding.setPointDisAmt(ConvertUtil.fenToYuan(saleorder.getBoundAmt()));
if (mDisAdapter != null) {
mDisAdapter.setNewData(saleorder.getDisList());
mViewBinding.tvVipOffAmt.setText(ConvertUtil.fenToYuan(saleorder.getOrderVipOffAmt(), true));
mViewBinding.tvOrderCnt.setText(String.valueOf(saleorder.getOrderCnt()));
}
}
/**
* 加载购物车信息
*
* @param saledetails 购物车信息
*/
public void loadSaledetails(List<Saledetail> saledetails) {
if (mSaledetailAdapter != null) mSaledetailAdapter.setNewData(saledetails);
}
/**
......
package com.xingdata.zzdpos.ui.statistics;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.FragmentUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityStatisticsBinding;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.statistics.fragment.OrderMainFragment;
import com.xingdata.zzdpos.model.Sta;
import com.xingdata.zzdpos.ui.statistics.fragment.StatisticsFragment;
import com.xingdata.zzdpos.ui.statistics.fragment.StatisticsTitleFragment;
public class StatisticsActivity extends BaseActivity<StatisticsPresenter, ActivityStatisticsBinding> implements StatisticsContract.View {
private StatisticsFragment mStatisticsFragment = new StatisticsFragment();
private OrderMainFragment mOrderMainFragment = new OrderMainFragment();
private StatisticsTitleFragment mStatisticsTitleFragment = new StatisticsTitleFragment();
@Override
public int getLayoutId() {
......@@ -29,11 +35,29 @@ public class StatisticsActivity extends BaseActivity<StatisticsPresenter, Activi
}
@Override
public void setSatInfo(Sta sta) {
mStatisticsFragment.setSatInfo(sta);
}
@Override
public void showOrderListFragment() {
FragmentUtils.add(getSupportFragmentManager(), mOrderMainFragment, mViewBinding.fragmentContainer.getId(), false, true);
mStatisticsTitleFragment.setTitle(C.MENU.MENU_STATISTICS_ORDER);
FragmentUtils.add(getSupportFragmentManager(), mStatisticsTitleFragment, mViewBinding.fragmentContainer.getId(), false, true);
}
@Override
public void showMStFragment() {
mStatisticsTitleFragment.setTitle(C.MENU.MENU_STATISTICS_MS);
FragmentUtils.add(getSupportFragmentManager(), mStatisticsTitleFragment, mViewBinding.fragmentContainer.getId(), false, true);
}
@Override
public void searchSuc(Pager<Saleorder> saleorderPager, String wd) {
mStatisticsTitleFragment.searchSuc(saleorderPager, wd);
}
@Override
......
......@@ -4,7 +4,8 @@ import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.statistics.fragment.OrderListFragment;
import com.xingdata.zzdpos.model.Sta;
import com.xingdata.zzdpos.ui.statistics.fragment.order.OrderListFragment;
/**
* Created by Administrator on 2017/12/23.
......@@ -12,16 +13,39 @@ import com.xingdata.zzdpos.ui.statistics.fragment.OrderListFragment;
public interface StatisticsContract {
interface View extends BaseView {
/**
* 设置统计信息
*/
void setSatInfo(Sta sta);
/**
* 跳转订单列表页
*/
void showOrderListFragment();
/**
* 跳转营销页
*/
void showMStFragment();
/**
* 搜索成功
*/
void searchSuc(Pager<Saleorder> saleorderPager, String wd);
}
abstract class Presenter extends BasePresenter<View> {
/**
* 跳转营销页
*/
public abstract void clickMs();
/**
* 跳转订单列表页
*/
......@@ -33,6 +57,10 @@ public interface StatisticsContract {
*/
public abstract void getOrderList(int pageNumber, int pageSize, long startDate, long endDate, OrderListFragment orderListFragment);
/**
* 搜索订单列表
*/
public abstract void getSaleOrderList(String orderNo, int pageNumber, String wd);
/**
* 获取统计详情
......
package com.xingdata.zzdpos.ui.statistics;
import android.databinding.DataBindingUtil;
import android.util.TimeUtils;
import android.view.LayoutInflater;
import android.view.View;
import com.alibaba.fastjson.JSON;
import com.google.gson.Gson;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivityStatisticsDetailBinding;
import com.xingdata.zzdpos.databinding.ItemSettleSaledetailBinding;
import com.xingdata.zzdpos.databinding.ViewOrderDetailBinding;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.util.ConvertUtil;
public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPresenter, ActivityStatisticsDetailBinding> implements StatisticsDetailContract.View {
@Override
public int getLayoutId() {
return R.layout.activity_statistics_detail;
}
@Override
public void initView() {
initData();
}
private void initData() {
if (getIntent().getExtras() != null) {
Long data = getIntent().getLongExtra(Saleorder.class.getName(), -1);
if (data > 0) {
mPresenter.getOrderDetail(String.valueOf(data));
mViewBinding.icTitle.tvTitle.setText(R.string.statistics_order_detail_hint);
}
}
}
@Override
public void onBackPressedSupport() {
super.onBackPressedSupport();
}
@Override
public void getOrderDetailSuss(Saleorder mSaleorder) {
mViewBinding.viewOrderDetail.getViewStub().inflate();
ViewOrderDetailBinding viewOrderDetailBinding = DataBindingUtil.bind(mViewBinding.viewOrderDetail.getRoot());
viewOrderDetailBinding.tvAmt.setText(ConvertUtil.fenToYuan(mSaleorder.getOrderPayAmt(), true));
viewOrderDetailBinding.setDate(com.blankj.utilcode.util.TimeUtils.millis2String(mSaleorder.getCreateTime()));
viewOrderDetailBinding.setOrderNo(mSaleorder.getOrderNo());
viewOrderDetailBinding.setDisAmt(ConvertUtil.fenToYuan(mSaleorder.getOrderReduAmt(), false));
viewOrderDetailBinding.setPayType(mSaleorder.getSalepay() == null ? "未支付" : mSaleorder.getSalepay().getPayName());
viewOrderDetailBinding.setSumAmt(ConvertUtil.fenToYuan(mSaleorder.getOrderAuthAmt(), false));
viewOrderDetailBinding.setOperName(mSaleorder.getOperName());
viewOrderDetailBinding.setGoodsNum(mSaleorder.getOrderCnt() + "");
if (mSaleorder.getCutAmt() == null || mSaleorder.getCutAmt() == 0) {
viewOrderDetailBinding.setCutAmtShow(false);
} else {
viewOrderDetailBinding.setCutAmtShow(true);
viewOrderDetailBinding.setCutAmt(ConvertUtil.fenToYuan(mSaleorder.getCutAmt(), false));
}
if (mSaleorder.getSaledetailList() != null) {
for (Saledetail saledetail : mSaleorder.getSaledetailList()) {
View view = LayoutInflater.from(this).inflate(R.layout.item_settle_saledetail, null);
ItemSettleSaledetailBinding itemSettleSaledetailBinding = DataBindingUtil.bind(view);
itemSettleSaledetailBinding.tvAmt.setText("¥" + saledetail.getSubtotal());
itemSettleSaledetailBinding.tvCount.setText(saledetail.getCnt());
itemSettleSaledetailBinding.tvPrice.setText("¥" + saledetail.getPrice());
itemSettleSaledetailBinding.tvName.setText(saledetail.getName());
// itemSettleSaledetailBinding.tvInitialPrice.setText(saledetail.getpr);
viewOrderDetailBinding.llGoodsList.addView(view);
}
viewOrderDetailBinding.tvGoodslistTitle.setOnClickListener(view -> {
viewOrderDetailBinding.tvGoodslistTitle.setCompoundDrawables(null, null, null, null);
viewOrderDetailBinding.tvGoodslistTitle.setClickable(false);
viewOrderDetailBinding.llGoodsList.setVisibility(View.VISIBLE);
});
}
}
}
package com.xingdata.zzdpos.ui.statistics;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Sta;
import com.xingdata.zzdpos.ui.statistics.fragment.order.OrderListFragment;
/**
* Created by Administrator on 2017/12/23.
*/
public interface StatisticsDetailContract {
interface View extends BaseView {
void getOrderDetailSuss(Saleorder saleorder);
}
abstract class Presenter extends BasePresenter<View> {
/**
* 获取订单明细
*/
public abstract void getOrderDetail(String saleorderId);
}
}
package com.xingdata.zzdpos.ui.statistics;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.api.ApiFactory;
/**
* Created by Administrator on 2017/12/27.
*/
public class StatisticsDetailPresenter extends StatisticsDetailContract.Presenter {
@Override
public void onAttached() {
}
@Override
public void getOrderDetail(String mSaleorderId) {
ApiFactory.Test.getSaleOrderDetail(mSaleorderId).subscribe(saleorder -> {
mView.getOrderDetailSuss(saleorder);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
}
package com.xingdata.zzdpos.ui.statistics;
import android.view.KeyEvent;
import com.blankj.utilcode.util.FragmentUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.ui.statistics.fragment.OrderListFragment;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.statistics.fragment.order.OrderListFragment;
/**
* Created by Administrator on 2017/12/23.
......@@ -22,6 +20,11 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
}
@Override
public void clickMs() {
mView.showMStFragment();
}
@Override
public void clickOrderList() {
mView.showOrderListFragment();
......@@ -30,7 +33,7 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
@Override
public void getOrderList(int pageNumber, int pageSize, long startDate, long endDate, OrderListFragment fragment) {
ApiFactory.Test.getSaleOrderList(pageNumber, pageSize, startDate, endDate).doFinally(() -> {
ApiFactory.Test.getSaleOrderList("99",pageNumber, pageSize, startDate, endDate).doFinally(() -> {
})
.subscribe(orderlist -> {
......@@ -42,11 +45,11 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
@Override
public void getSat() {
ApiFactory.Sat.queryNotice().doFinally(() -> {
ApiFactory.Sta.querySta().doFinally(() -> {
})
.subscribe(sat -> {
.subscribe(sta -> {
mView.setSatInfo(sta);
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
......@@ -55,4 +58,31 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
public void getOrderList(int pageNumber, long startDate, long endDate, OrderListFragment fragment) {
getOrderList(pageNumber, pageSize, startDate, endDate, fragment);
}
/**
* 状态,0:已完成,1:退货,7赊账,99:全部订单
*
* @param orderNo 订单号
*/
@Override
public void getSaleOrderList(String orderNo, int pageNumber, String wd) {
ApiFactory.Test.getSaleOrderList(pageNumber, pageSize, "99", orderNo, wd)
.subscribe(saleorderPager -> {
//判断是否能加载更多
if (saleorderPager.getList() == null || saleorderPager.getList().size() == 0) {
ToastUtils.showShort("没有查询到相关订单");
} else {
mView.searchSuc(saleorderPager, wd);
}
}, throwable -> {
ToastUtils.showShort(throwable.getMessage());
});
}
}
......@@ -7,6 +7,7 @@ import android.view.View;
import android.view.ViewGroup;
import com.blankj.utilcode.util.TimeUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemStatisticsBinding;
......@@ -26,8 +27,33 @@ public class StatisticsAdapter extends BaseAdapter<Saleorder, ItemStatisticsBind
@Override
protected void convert(ItemStatisticsBinding mViewBinding, Saleorder item) {
mViewBinding.tvLeftTop.setText(item.getOrderNo());
if (item.getFirstName()!=null){
mViewBinding.tvLeftTop.setText(item.getFirstName());
}else {
mViewBinding.tvLeftTop.setText(item.getOrderNo());
}
mViewBinding.tvLeftBottom.setText(TimeUtils.millis2String(item.getCreateTime()));
switch (item.getPayType()){
case C.PAY_CHANNEL.CASH:
mViewBinding.imgLeft.setImageResource(R.mipmap.pay_cash);
break;
case C.PAY_CHANNEL.WECHAT:
mViewBinding.imgLeft.setImageResource(R.mipmap.pay_wechat);
break;
case C.PAY_CHANNEL.ALI:
mViewBinding.imgLeft.setImageResource(R.mipmap.pay_alipay);
break;
case C.PAY_CHANNEL.BANK:
mViewBinding.imgLeft.setImageResource(R.mipmap.pay_card);
break;
case C.PAY_CHANNEL.CARD:
mViewBinding.imgLeft.setImageResource(R.mipmap.pay_membershipcard);
break;
case C.PAY_CHANNEL.TALLY:
mViewBinding.imgLeft.setImageResource(R.mipmap.pay_credit);
break;
}
}
......
package com.xingdata.zzdpos.ui.statistics.adapter;
import android.support.v7.widget.RecyclerView;
import com.chad.library.adapter.base.BaseSectionQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xingdata.zzdpos.model.Saleorder;
import java.util.List;
/**
* Created by Administrator on 2017/12/26.
*/
public class StatisticsGroupAdapter extends BaseSectionQuickAdapter<Saleorder, BaseViewHolder> {
public StatisticsGroupAdapter(int layoutResId, int sectionHeadResId, List<Saleorder> data) {
super(layoutResId, sectionHeadResId, data);
}
@Override
protected void convertHead(com.chad.library.adapter.base.BaseViewHolder helper, Saleorder item) {
}
@Override
protected void convert(BaseViewHolder helper, Saleorder item) {
}
}
\ No newline at end of file
......@@ -10,9 +10,11 @@ import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentStatisticsBinding;
import com.xingdata.zzdpos.model.Sta;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.MenuRecyclerAdapter;
import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import com.xingdata.zzdpos.util.MyMenuItemDecoration;
import com.xingdata.zzdpos.util.OnClickListener;
......@@ -56,7 +58,7 @@ public class StatisticsFragment extends BaseFragment<StatisticsPresenter, Fragme
mPresenter.clickOrderList();
break;
case C.MENU.MENU_STATISTICS_MS://营销
mPresenter.clickMs();
break;
}
......@@ -65,4 +67,12 @@ public class StatisticsFragment extends BaseFragment<StatisticsPresenter, Fragme
}
public void setSatInfo(Sta sta) {
mViewBinding.setTodayAmt(ConvertUtil.fenToYuan(sta.getSaleAmt(), false));
mViewBinding.setTodayOrder(String.valueOf(sta.getSaleCount()));
mViewBinding.setTodayRecharge(ConvertUtil.fenToYuan(sta.getCardAmt(), false));
mViewBinding.setTodayVipAdd(String.valueOf(sta.getVipCount()));
}
}
package com.xingdata.zzdpos.ui.statistics.fragment;
import android.view.KeyEvent;
import android.view.View;
import com.blankj.utilcode.util.FragmentUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentStatisticsTitleBinding;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import com.xingdata.zzdpos.ui.statistics.fragment.order.OrderMainFragment;
import com.xingdata.zzdpos.ui.statistics.fragment.order.OrderSearchFragment;
import com.xingdata.zzdpos.util.OnClickListener;
public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, FragmentStatisticsTitleBinding> {
private int fragmentMenu;
private OrderMainFragment mOrderMainFragment = new OrderMainFragment();
private OrderSearchFragment mOrderSearchFragment = new OrderSearchFragment();
@Override
public int getLayoutId() {
return R.layout.fragment_statistics_title;
}
@Override
public void initView() {
switch (fragmentMenu) {
case C.MENU.MENU_STATISTICS_ORDER:
FragmentUtils.add(getChildFragmentManager(), mOrderMainFragment, mViewBinding.mainFrame.getId(), false, true);
mViewBinding.icTitle.edTitle.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View view, boolean b) {
if (b) {
if (mViewBinding.viewStub.isInflated()) {
mViewBinding.viewStub.getRoot().setVisibility(View.VISIBLE);
} else {
mViewBinding.viewStub.getViewStub().inflate();
}
} else {
mViewBinding.viewStub.getRoot().setVisibility(View.GONE);
}
}
});
mViewBinding.icTitle.edTitle.setOnKeyListener((v, keyCode, event) -> {
if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {
mPresenter.getSaleOrderList(null, 1, mViewBinding.icTitle.edTitle.getText().toString());
hideSoftInput();
}
return false;
});
break;
case C.MENU.MENU_STATISTICS_MS:
mViewBinding.icTitle.edTitle.setVisibility(View.GONE);
mViewBinding.icTitle.tvTitle.setText(R.string.menu_ms);
mViewBinding.icTitle.tvTitle.setVisibility(View.VISIBLE);
break;
}
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
if (mViewBinding.icTitle.edTitle.isFocused()) {
mViewBinding.icTitle.edTitle.clearFocus();
return;
}
if (mOrderSearchFragment.isAdded()) {
FragmentUtils.remove(mOrderSearchFragment);
return;
}
pop();
}
});
}
public void setTitle(int c) {
fragmentMenu = c;
}
public void searchSuc(Pager<Saleorder> saleorderPager, String wd) {
if (!mOrderSearchFragment.isAdded()) {
mOrderSearchFragment.setCreateDate(saleorderPager, wd);
FragmentUtils.add(getChildFragmentManager(), mOrderSearchFragment, mViewBinding.mainFrame.getId(), false, true);
} else {
mOrderSearchFragment.setData(saleorderPager, saleorderPager.isFirstPage());
}
}
@Override
public boolean onBackPressedSupport() {
if (mViewBinding.icTitle.edTitle.isFocused()) {
mViewBinding.icTitle.edTitle.clearFocus();
return true;
}
if (mOrderSearchFragment.isAdded()) {
FragmentUtils.remove(mOrderSearchFragment);
return true;
}
mViewBinding.icTitle.edTitle.setText("");
return false;
}
}
package com.xingdata.zzdpos.ui.statistics.fragment;
package com.xingdata.zzdpos.ui.statistics.fragment.order;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.ActivityUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
......@@ -16,6 +17,7 @@ import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity;
import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsAdapter;
import com.xingdata.zzdpos.util.OnClickListener;
......@@ -27,10 +29,9 @@ import java.util.List;
public class OrderListFragment extends BaseFragment<StatisticsPresenter, FragmentOrderListBinding> {
private StatisticsAdapter mStatisticsAdapter;
private List<Saleorder> saleorders = new ArrayList<>();
private Long monthDateStart;
private Long monthDateEnd;
private int pagerNum = 1;
private int pagerNum ;
public OrderListFragment setDate(Long end, Long start) {
monthDateStart = start;
......@@ -46,6 +47,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
@Override
public void initView() {
pagerNum=1;
Calendar calendar = Calendar.getInstance();
//获得当前时间的月份,月份从0开始所以结果要加1
int monthNow = calendar.get(Calendar.MONTH) + 1;
......@@ -66,7 +68,7 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
mViewBinding.tvEmpty.setText(R.string.statistics_search_empty);
if (mStatisticsAdapter == null) {
mStatisticsAdapter = new StatisticsAdapter(saleorders);
mStatisticsAdapter = new StatisticsAdapter(new ArrayList<>());
mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter);
......@@ -75,6 +77,14 @@ public class OrderListFragment extends BaseFragment<StatisticsPresenter, Fragmen
mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter);
}
mStatisticsAdapter.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);
mStatisticsAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.statisticsRecycler);
......
package com.xingdata.zzdpos.ui.statistics.fragment;
package com.xingdata.zzdpos.ui.statistics.fragment.order;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.view.View;
import com.blankj.utilcode.util.TimeUtils;
import com.blankj.utilcode.util.ToastUtils;
......@@ -13,10 +11,7 @@ import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentOrderMainBinding;
import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.main.adapter.FragmentViewAdapter;
import com.xingdata.zzdpos.ui.main.fragment.ServiceFragment;
import com.xingdata.zzdpos.ui.statistics.adapter.FragmentStateAdapter;
import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.StringUtil;
......@@ -24,16 +19,13 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.logging.Handler;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.Observer;
import io.reactivex.Scheduler;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
......@@ -54,13 +46,8 @@ public class OrderMainFragment extends BaseFragment<MainPresenter, FragmentOrder
public void initView() {
Calendar calendar = Calendar.getInstance();
//获得当前时间的月份,月份从0开始所以结果要加1
month= calendar.get(Calendar.MONTH) + 1;
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
pop();
}
});
month = calendar.get(Calendar.MONTH) + 1;
initViewPager();
......@@ -148,5 +135,4 @@ public class OrderMainFragment extends BaseFragment<MainPresenter, FragmentOrder
}
}
}
package com.xingdata.zzdpos.ui.statistics.fragment.order;
import android.support.v7.widget.LinearLayoutManager;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentOrderSearchBinding;
import com.xingdata.zzdpos.model.Pager;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.ui.statistics.StatisticsPresenter;
import com.xingdata.zzdpos.ui.statistics.adapter.StatisticsAdapter;
import java.util.ArrayList;
import java.util.List;
public class OrderSearchFragment extends BaseFragment<StatisticsPresenter, FragmentOrderSearchBinding> {
private StatisticsAdapter mStatisticsAdapter;
private Pager<Saleorder> saleorders;
private int pagerNum = 1;
private String wd = "";
@Override
public int getLayoutId() {
return R.layout.fragment_order_search;
}
@Override
public void initView() {
if (mStatisticsAdapter == null) {
mStatisticsAdapter = new StatisticsAdapter(new ArrayList<>());
mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter);
} else {
mViewBinding.statisticsRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
mViewBinding.statisticsRecycler.setAdapter(mStatisticsAdapter);
}
mViewBinding.srlProduct.setOnRefreshListener(this::onRefresh);
mStatisticsAdapter.setOnLoadMoreListener(this::onLoadMore, mViewBinding.statisticsRecycler);
if (saleorders != null) {
setData(saleorders, saleorders.isFirstPage());
}
}
private void onRefresh() {
pagerNum = 1;
mPresenter.getSaleOrderList(null, pagerNum, wd);
}
private void onLoadMore() {
pagerNum++;
mPresenter.getSaleOrderList(null, pagerNum, wd);
}
/**
* 设置数据
*
* @param pager 数据
* @param isRefresh 是否刷新
*/
public void setData(Pager<Saleorder> pager, boolean isRefresh) {
if (isRefresh) {
mStatisticsAdapter.setEnableLoadMore(true);
mViewBinding.srlProduct.setRefreshing(false);
}
if (isRefresh) mStatisticsAdapter.setNewData(pager.getList());
else if (pager.getList().size() > 0) mStatisticsAdapter.addData(pager.getList());
if (pager.isLastPage()) mStatisticsAdapter.loadMoreEnd(isRefresh);
else mStatisticsAdapter.loadMoreComplete();
}
public void setCreateDate(Pager<Saleorder> list, String wd) {
this.saleorders = list;
this.wd = wd;
}
}
package com.xingdata.zzdpos.ui.store;
import android.content.Intent;
import android.os.Bundle;
import android.view.inputmethod.EditorInfo;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.base.BaseSku;
......@@ -12,12 +17,14 @@ import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Sskugrp;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.settle.SettleActivity;
import com.xingdata.zzdpos.ui.store.dialog.CartDialog;
import com.xingdata.zzdpos.ui.store.dialog.MsDialog;
import com.xingdata.zzdpos.ui.store.fragment.ScanFragment;
import com.xingdata.zzdpos.ui.store.fragment.SearchFragment;
import com.xingdata.zzdpos.ui.store.fragment.StoreFragment;
import java.util.ArrayList;
import java.util.List;
......@@ -44,13 +51,17 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
mViewBinding.ivCart.setOnClickListener(view -> mPresenter.clickCartLogo());
mViewBinding.tvSettle.setOnClickListener(view -> mPresenter.clickSettle());
mViewBinding.btnBack.setOnClickListener(view -> getTopFragment().onBackPressedSupport());
mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> {
if (i == EditorInfo.IME_ACTION_SEARCH) {
if (i == EditorInfo.IME_ACTION_SEARCH && !StringUtils.isEmpty(textView.getText())) {
KeyboardUtils.hideSoftInput(textView);
mPresenter.searchSku(textView.getText().toString());
}
return false;
});
mViewBinding.etSearch.setOnFocusChangeListener((view, b) -> {
mPresenter.searchBarFocusChanged(b);
});
}
......@@ -71,12 +82,12 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
@Override
public void loadMss(List<Ms> mss) {
mStoreFragment.loadMss(mss);
}
@Override
public <Sku extends BaseSku> void loadSearchResult(List<Sku> skus, boolean isRefresh) {
mSearchFragment.loadSkus(skus, isRefresh);
}
@Override
......@@ -91,6 +102,7 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
@Override
public void loadSaledetails(List<Saledetail> saledetails, boolean isRefresh) {
mStoreFragment.loadSaledetails(saledetails, isRefresh);
mSearchFragment.loadSaledetails(saledetails, isRefresh);
}
......@@ -109,4 +121,31 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
mCartDialog.setSaleorder(saleorder).setSaledetails(saledetails).show(this);
}
@Override
public void showMsDialog(List<Ms> mss) {
mMsDialog.setMss(mss).show(this);
}
@Override
public void showSettle(List<Saledetail> saledetails) {
Intent intent = new Intent(StoreActivity.this, SettleActivity.class);
intent.putExtra(C.EXTRA_KEY.SETTLE_MODE, C.SETTLE_MODE.STORE);
Bundle bundle = new Bundle();
bundle.putSerializable(C.EXTRA_KEY.SETTLE_EXTRA, new ArrayList(saledetails));
intent.putExtras(bundle);
ActivityUtils.startActivity(intent);
}
@Override
public void showSearchFragment() {
if (!mSearchFragment.isAdded()) this.start(mSearchFragment);
}
@Override
public void resetSearchBar() {
mViewBinding.etSearch.setText("");
mViewBinding.clTitle.requestFocus();
mViewBinding.clTitle.requestFocusFromTouch();
}
}
......@@ -77,7 +77,6 @@ interface StoreContract {
*/
void dismissLoadingDialog();
/**
* 显示购物车
*
......@@ -85,6 +84,28 @@ interface StoreContract {
* @param saledetails 购物车信息
*/
void showCartDialog(Saleorder saleorder, List<Saledetail> saledetails);
/**
* 显示营销方案
*/
void showMsDialog(List<Ms> mss);
/**
* 显示结算页面
*
* @param saledetails 购物车详情列表
*/
void showSettle(List<Saledetail> saledetails);
/**
* 显示搜索页面
*/
void showSearchFragment();
/**
* 重置搜索栏
*/
void resetSearchBar();
}
abstract class Presenter extends BasePresenter<View> {
......@@ -131,6 +152,11 @@ interface StoreContract {
*/
public abstract void clickSkugrp(Sskugrp sskugrp);
/**
* 商店页面 - 点击营销方案
*/
public abstract void clickMs();
/**
* 商店页面 - 点击添加商品
*
......@@ -152,11 +178,28 @@ interface StoreContract {
*/
public abstract void cartChanged();
/**
* 购物车列表 - 关闭
* 购物车界面 - 关闭
*/
public abstract void onCartDialogCancel();
/**
* 搜索界面 - 关闭
*/
public abstract void onSearchFragmentCancel();
/**
* 购物车界面 - 清空购物车
*/
public abstract void clearCart();
/**
* 主页面 - 搜索框焦点改变
*
* @param b 获取焦点
*/
public abstract void searchBarFocusChanged(boolean b);
}
}
......@@ -31,6 +31,7 @@ public class StorePresenter extends StoreContract.Presenter {
* 当前营销计划
*/
private List<Ms> mMss;
private Ms.OnApplyListener mOnApplyListener;
private int mStorePageNum;
private Long mSkuGrpId;
......@@ -45,10 +46,30 @@ public class StorePresenter extends StoreContract.Presenter {
mVip = Vip.createDefault();
mSaledetails = new ArrayList<>();
mSaleorder = new Saleorder();
mOnApplyListener = new Ms.OnApplyListener() {
@Override
public void setDis(Ms ms) {
mSaleorder.addMsDis(ms);
}
@Override
public void addGift(Long msId, Long skuId, long addAmt) {
//这一版不做处理
}
@Override
public void removeGift(Long msId) {
//这一版不作处理
}
};
}
@Override
public void clickSettle() {
if (mSaledetails.size() == 0) return;
mView.showSettle(mSaledetails);
}
@Override
......@@ -59,6 +80,7 @@ public class StorePresenter extends StoreContract.Presenter {
@Override
public void initStore() {
this.getSkugrp();
this.getMs();
this.refreshSku();
}
......@@ -93,16 +115,19 @@ public class StorePresenter extends StoreContract.Presenter {
public void clickSkugrp(Sskugrp sskugrp) {
}
@Override
public void clickMs() {
mView.showMsDialog(mMss);
}
@Override
public <Sku extends BaseSku> void clickAddSku(Sku sku) {
//更新购物车信息
updateCart(sku, 1);
//发送购物车信息(不需要刷新页面)
mView.loadSaledetails(mSaledetails, false);
//设置订单信息
mSaleorder.setSaledetails(mSaledetails);
//统计订单信息
this.reprice();
//购物车发生变化
this.cartChanged();
}
@Override
......@@ -111,16 +136,16 @@ public class StorePresenter extends StoreContract.Presenter {
updateCart(sku, -1);
//发送购物车信息(不需要刷新页面)
mView.loadSaledetails(mSaledetails, false);
//设置订单信息
mSaleorder.setSaledetails(mSaledetails);
//统计订单信息
this.reprice();
//购物车发生变化
this.cartChanged();
}
@Override
public void cartChanged() {
//设置订单信息
mSaleorder.setSaledetails(mSaledetails);
//处理营销活动
this.processMs();
//统计订单信息
this.reprice();
}
......@@ -131,6 +156,29 @@ public class StorePresenter extends StoreContract.Presenter {
mView.loadSaledetails(mSaledetails, true);
}
@Override
public void onSearchFragmentCancel() {
//发送购物车信息并刷新页面
mView.loadSaledetails(mSaledetails, true);
//充值搜索栏
mView.resetSearchBar();
}
@Override
public void clearCart() {
//清空购物车
this.mSaledetails = new ArrayList<>();
//购物车发生变
this.cartChanged();
}
@Override
public void searchBarFocusChanged(boolean b) {
if (b) mView.showSearchFragment();
}
/**
* 获取商品分组
......@@ -156,6 +204,23 @@ public class StorePresenter extends StoreContract.Presenter {
);
}
/**
* 获取营销计划
*/
private void getMs() {
mCompositeDisposable.add(
DBFactory.Store.queryMss().subscribe(ms -> {
mMss = ms;
for (int i = 0; i < mMss.size(); i++) {
mMss.get(i).setOnApplyListener(mOnApplyListener);
}
mView.loadMss(mMss);
}, throwable -> {
})
);
}
/**
* 搜索商品
*/
......@@ -206,6 +271,28 @@ public class StorePresenter extends StoreContract.Presenter {
}
}
/**
* 处理营销活动
*/
private void processMs() {
//重置商品
for (int i = 0; i < mMss.size(); i++) {
mMss.get(i).setSaledetailList(new ArrayList<>());
}
//添加商品
for (int i = 0; i < mSaledetails.size(); i++) {
for (int j = 0; j < mMss.size(); j++) {
if (!mMss.get(j).isAvailable(mVip)) continue;
if (mMss.get(j).addSaledetail(mSaledetails.get(i))) break;
}
}
//判断
for (int i = 0; i < mMss.size(); i++) {
mMss.get(i).execute();
}
}
/**
* 统计订单信息
*/
......
......@@ -50,13 +50,18 @@ public class CartDialog extends BaseSheetDialog<StorePresenter, DialogStoreCartB
if (count > 0) {
mSaledetails.get(i).setCount(mSaledetails.get(i).getDetailCnt() + value);
} else {
mSaledetailAdapter.remove(i);
mSaledetailAdapter.getData().remove(i);
mSaledetailAdapter.notifyDataSetChanged();
}
mPresenter.cartChanged();
break;
}
}
});
// set Other listener
mViewBinding.tvSettle.setOnClickListener(view -> mPresenter.clickSettle());
mViewBinding.tvClear.setOnClickListener(view -> mPresenter.clearCart());
}
......
package com.xingdata.zzdpos.ui.store.dialog;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseSheetDialog;
import com.xingdata.zzdpos.databinding.DialogStoreMsBinding;
import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.ui.store.StorePresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.List;
public class MsDialog extends BaseSheetDialog<StorePresenter, DialogStoreMsBinding> {
private List<Ms> mMss;
@Override
public int getLayoutId() {
return R.layout.dialog_store_ms;
......@@ -15,6 +24,86 @@ public class MsDialog extends BaseSheetDialog<StorePresenter, DialogStoreMsBindi
@Override
public void initView() {
mViewBinding.setDisInfo("");
mViewBinding.setPromotionInfo("");
mViewBinding.setMoneyOffInfo("");
mViewBinding.setGiftInfo("");
mViewBinding.tvClose.setOnClickListener(view -> this.dismiss());
for (int i = 0; i < mMss.size(); i++) {
switch (mMss.get(i).getMsTools()) {
case C.MS_TYPE.DIS:
mViewBinding.setDisInfo(mViewBinding.getDisInfo() + getMsDescription(mMss.get(i)) + "\n");
break;
case C.MS_TYPE.PROMOTION:
mViewBinding.setPromotionInfo(mViewBinding.getPromotionInfo() + getMsDescription(mMss.get(i)) + "\n");
break;
case C.MS_TYPE.SECOND:
mViewBinding.setDisInfo(mViewBinding.getDisInfo() + getMsDescription(mMss.get(i)) + "\n");
break;
case C.MS_TYPE.MONEY_OFF:
mViewBinding.setMoneyOffInfo(mViewBinding.getMoneyOffInfo() + getMsDescription(mMss.get(i)) + "\n");
break;
case C.MS_TYPE.GIFT:
mViewBinding.setGiftInfo(mViewBinding.getGiftInfo() + getMsDescription(mMss.get(i)) + "\n");
break;
}
}
}
/**
* 设置营销方案
*
* @param mss 营销方案
*/
public MsDialog setMss(List<Ms> mss) {
this.mMss = mss;
return this;
}
/**
* 获取营销计划的文字描述
*
* @param ms 营销计划
* @return 文字描述
*/
private String getMsDescription(Ms ms) {
String strGroup = "", strType = "";
switch (ms.getMsTouchTag2()) {
case C.MS_GROUP.ALL:
strGroup = getString(R.string.ms_group_all_info);
break;
case C.MS_GROUP.BRAND:
strGroup = getString(R.string.ms_group_all_info);
break;
case C.MS_GROUP.CATE:
strGroup = getString(R.string.ms_group_cate_info, ms.getCateName());
break;
case C.MS_GROUP.SKU:
String spuName = DBFactory.Store.querySpuNameBySkuId(ms.getSkuId());
strGroup = getString(R.string.ms_group_sku_info, !StringUtils.isEmpty(spuName) ? spuName : ms.getSkuId());
break;
}
switch (ms.getMsTools()) {
case C.MS_TYPE.DIS:
strType = getString(R.string.ms_type_dis_info, String.valueOf(Double.valueOf(ms.getPriceDiscount()) / 10));
break;
case C.MS_TYPE.PROMOTION:
strType = getString(R.string.ms_type_promotion_info);
break;
case C.MS_TYPE.SECOND:
strType = getString(R.string.ms_type_second_info, String.valueOf(Double.valueOf(ms.getPriceDiscount()) / 10));
break;
case C.MS_TYPE.MONEY_OFF:
strType = getString(R.string.ms_type_money_off_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftOffAmt()));
break;
case C.MS_TYPE.GIFT:
strType = getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), ms.getGiftSkuName());
break;
}
return strGroup + strType;
}
}
package com.xingdata.zzdpos.ui.store.fragment;
import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.base.BaseSku;
import com.xingdata.zzdpos.databinding.FragmentStoreSearchBinding;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.ui.store.StorePresenter;
import com.xingdata.zzdpos.ui.store.adapter.SkuAdapter;
import java.util.List;
public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSearchBinding> {
private SkuAdapter mSkuAdapter;
private List<Saledetail> mSaledetails;
@Override
public int getLayoutId() {
return R.layout.fragment_store_search;
......@@ -14,5 +28,76 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
@Override
public void initView() {
// init sku
mSkuAdapter = new SkuAdapter<>();
mSkuAdapter.setSaledetails(mSaledetails);
mViewBinding.rlSku.setAdapter(mSkuAdapter);
mViewBinding.rlSku.setLayoutManager(new LinearLayoutManager(mContext));
// set sku listener
mSkuAdapter.setOnLoadMoreListener(this::loadMoreSku, mViewBinding.rlSku);
mSkuAdapter.setOnCountChangeListener((sku, value) -> {
if (value > 0) mPresenter.clickAddSku(sku);
else mPresenter.clickRemoveSku(sku);
});
// set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
mSkuAdapter.setEmptyView(view);
mSkuAdapter.isUseEmpty(false);
}
@Override
public boolean onBackPressedSupport() {
mPresenter.onSearchFragmentCancel();
return super.onBackPressedSupport();
}
/**
* 加载更多商品
*/
private void loadMoreSku() {
mPresenter.loadMoreSearchResult();
}
/**
* 加载商品
*
* @param skus 商品
* @param isRefresh 是否刷新
* @param <Sku> 商品类型
*/
public <Sku extends BaseSku> void loadSkus(List<Sku> skus, boolean isRefresh) {
if (isRefresh) {
mSkuAdapter.isUseEmpty(true);
mSkuAdapter.setEnableLoadMore(true);
mSkuAdapter.setNewData(skus);
} else if (skus.size() > 0) mSkuAdapter.addData(skus);
if (skus.size() < C.PRODUCT.PAGE_SIZE) mSkuAdapter.loadMoreEnd(isRefresh);
else mSkuAdapter.loadMoreComplete();
}
/**
* 加载购物车信息
*
* @param saledetails 购物车信息
*/
public void loadSaledetails(List<Saledetail> saledetails, boolean isRefresh) {
this.setSaledetails(saledetails);
if (!isAdded()) return;
mSkuAdapter.setSaledetails(saledetails);
if (isRefresh) mSkuAdapter.notifyDataSetChanged();
}
/**
* 设置购物车信息
*
* @param saledetails 购物车信息
*/
public void setSaledetails(List<Saledetail> saledetails) {
this.mSaledetails = saledetails;
}
}
......@@ -4,23 +4,27 @@ import android.annotation.SuppressLint;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.base.BaseSku;
import com.xingdata.zzdpos.databinding.FragmentStoreBinding;
import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Sskugrp;
import com.xingdata.zzdpos.ui.store.StorePresenter;
import com.xingdata.zzdpos.ui.store.adapter.SkuAdapter;
import com.xingdata.zzdpos.ui.store.adapter.SkugrpAdapter;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.List;
public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBinding> {
private SkuAdapter mSkuAdapter;
private SkugrpAdapter mSkugrpAdapter;
private SkuAdapter mSkuAdapter;
public interface OnCountChangeListener {
void onCountChange(BaseSku sku, int value);
......@@ -52,15 +56,18 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
else mPresenter.clickRemoveSku(sku);
});
// set grp listener
mSkugrpAdapter.setOnItemClickListener((adapter, view, position) -> mPresenter.clickSkugrp(mSkugrpAdapter.getData().get(position)));
// set other listener
mViewBinding.llMs.setOnClickListener(view -> mPresenter.clickMs());
// set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
mSkuAdapter.setEmptyView(view);
mSkuAdapter.isUseEmpty(false);
// init data
mPresenter.initStore();
}
......@@ -89,6 +96,84 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
mSkugrpAdapter.setNewData(sskugrps);
}
/**
* 加载营销方案
*
* @param mss 营销列表
*/
public void loadMss(List<Ms> mss) {
mViewBinding.setMsCount(mss.size());
if (mss.size() > 0) {
Ms showMs = mss.get(0);
switch (showMs.getMsTools()) {
case C.MS_TYPE.DIS:
mViewBinding.tvMsType.setText(R.string.ms_type_dis);
mViewBinding.tvMsType.setBackgroundResource(R.drawable.shape_red_r1);
break;
case C.MS_TYPE.PROMOTION:
mViewBinding.tvMsType.setText(R.string.ms_type_promotion);
mViewBinding.tvMsType.setBackgroundResource(R.drawable.shape_orange_r1);
break;
case C.MS_TYPE.SECOND:
mViewBinding.tvMsType.setText(R.string.ms_type_dis);
mViewBinding.tvMsType.setBackgroundResource(R.drawable.shape_red_r1);
break;
case C.MS_TYPE.MONEY_OFF:
mViewBinding.tvMsType.setText(R.string.ms_type_money_off);
mViewBinding.tvMsType.setBackgroundResource(R.drawable.shape_green_r1);
break;
case C.MS_TYPE.GIFT:
mViewBinding.tvMsType.setText(R.string.ms_type_gift);
mViewBinding.tvMsType.setBackgroundResource(R.drawable.shape_green_r1);
break;
}
mViewBinding.tvMsDis.setText(getMsDescription(showMs));
}
}
/**
* 获取营销计划的文字描述
*
* @param ms 营销计划
* @return 文字描述
*/
private String getMsDescription(Ms ms) {
String strGroup = "", strType = "";
switch (ms.getMsTouchTag2()) {
case C.MS_GROUP.ALL:
strGroup = getString(R.string.ms_group_all_info);
break;
case C.MS_GROUP.BRAND:
strGroup = getString(R.string.ms_group_all_info);
break;
case C.MS_GROUP.CATE:
strGroup = getString(R.string.ms_group_cate_info, ms.getCateName());
break;
case C.MS_GROUP.SKU:
String spuName = DBFactory.Store.querySpuNameBySkuId(ms.getSkuId());
strGroup = getString(R.string.ms_group_sku_info, !StringUtils.isEmpty(spuName) ? spuName : ms.getSkuId());
break;
}
switch (ms.getMsTools()) {
case C.MS_TYPE.DIS:
strType = getString(R.string.ms_type_dis_info, String.valueOf(Double.valueOf(ms.getPriceDiscount()) / 10));
break;
case C.MS_TYPE.PROMOTION:
strType = getString(R.string.ms_type_promotion_info);
break;
case C.MS_TYPE.SECOND:
strType = getString(R.string.ms_type_second_info, String.valueOf(Double.valueOf(ms.getPriceDiscount()) / 10));
break;
case C.MS_TYPE.MONEY_OFF:
strType = getString(R.string.ms_type_money_off_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftOffAmt()));
break;
case C.MS_TYPE.GIFT:
strType = getString(R.string.ms_type_gift_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftSkuPrice()), ms.getGiftSkuName());
break;
}
return strGroup + strType;
}
/**
* 加载商品
......
......@@ -55,7 +55,7 @@ public final class SystemUtil {
}
}
// return deviceSN;
return "92209325";
return "548496";
}
......
......@@ -3,6 +3,6 @@
<corners android:radius="@dimen/all_radius" />
<solid android:color="@color/blue_mawu" />
<solid android:color="@color/red_guanyu" />
</shape>
\ No newline at end of file
......@@ -2,8 +2,8 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/all_transparent" android:state_enabled="false" />
<item android:drawable="@drawable/shape_gray_round_rectangle_stroke" android:state_pressed="true" />
<item android:drawable="@drawable/shape_white_round_rectangle_blue" android:state_focused="true" />
<item android:drawable="@drawable/shape_white_round_rectangle_dark" />
<item android:drawable="@drawable/shape_gray_round_line_stroke" android:state_pressed="true" />
<item android:drawable="@drawable/shape_white_round_line_blue" android:state_focused="true" />
<item android:drawable="@drawable/singleline_white_gray" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/all_transparent" android:state_enabled="false" />
<item android:drawable="@drawable/shape_gray_round_rectangle_stroke" android:state_pressed="true" />
<item android:drawable="@drawable/shape_white_round_rectangle_blue" android:state_focused="true" />
<item android:drawable="@drawable/shape_white_round_rectangle_dark" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/blue_mawu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<solid android:color="@color/blue_mawu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/red_guanyu"/>
</shape>
</item>
<item android:bottom="1.5dp">
<shape>
<solid android:color="@color/white"/>
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/green_chengyaojin" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<solid android:color="@color/green_chengyaojin" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/orange_shixiu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<solid android:color="@color/orange_shixiu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/red_guanyu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" />
<solid android:color="@color/red_guanyu" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid android:color="@color/red_guanyu"/>
</shape>
</item>
<item android:bottom="1.5dp">
<shape>
<solid android:color="@color/white"/>
</shape>
</item>
</layer-list>
\ No newline at end of file
......@@ -7,7 +7,7 @@
</shape>
</item>
<item android:bottom="1dp">
<item android:bottom="1.5dp">
<shape>
<solid android:color="@color/white"/>
</shape>
......
......@@ -13,9 +13,9 @@
<ImageButton
android:id="@+id/btn_back"
android:layout_width="@dimen/title_height"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"
android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back"
android:gravity="center"
android:padding="@dimen/all_margin"
......
......@@ -22,9 +22,9 @@
<ImageButton
android:id="@+id/btn_back"
android:layout_width="@dimen/title_height"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"
android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back"
android:gravity="center"
android:padding="@dimen/all_margin"
......
......@@ -37,7 +37,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
app:SpinKit_Color="@color/white"/>
app:SpinKit_Color="@color/black_zhangfei"/>
<TextView
android:id="@+id/tv_progress"
......@@ -45,7 +45,7 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="0 %"
android:textColor="@color/white"/>
android:textColor="@color/black_zhangfei"/>
</RelativeLayout>
<TextView
......@@ -55,7 +55,7 @@
android:layout_marginTop="@dimen/all_padding"
android:gravity="center"
android:text="正在加载数据..."
android:textColor="@color/white"/>
android:textColor="@color/black_zhangfei"/>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<layout>
<android.support.constraint.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.xingdata.zzdpos.ui.statistics.StatisticsDetailActivity">
<include
android:id="@+id/ic_title"
layout="@layout/title"
app:layout_constraintTop_toTopOf="parent" />
<FrameLayout
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/ll_bottom"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title">
<ViewStub
android:id="@+id/view_order_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout="@layout/view_order_detail" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_padding"
android:background="@color/white_caocao"
android:elevation="@dimen/view_line_L2"
android:orientation="horizontal"
android:weightSum="2"
app:layout_constraintBottom_toBottomOf="parent">
<Button
android:id="@+id/btn_cancel"
style="@style/button_passive"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_padding"
android:layout_weight="1"
android:stateListAnimator="@null"
android:text="@string/settle_print_receipt"
android:textSize="@dimen/all_text_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/btn_confirm"
app:layout_constraintTop_toTopOf="parent"
tools:targetApi="lollipop" />
<Button
android:id="@+id/btn_confirm"
style="@style/button_positive"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_padding"
android:layout_weight="1"
android:stateListAnimator="@null"
android:text="@string/pay_return"
android:textSize="@dimen/all_text_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/btn_cancel"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:targetApi="lollipop" />
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -36,12 +36,14 @@
android:layout_height="?attr/actionBarSize"
android:animateLayoutChanges="true"
android:background="@color/white_caocao"
android:focusable="true"
android:focusableInTouchMode="true"
app:layout_constraintBottom_toTopOf="@id/f_store"
app:layout_constraintTop_toTopOf="parent">
<ImageButton
android:id="@+id/btn_back"
android:layout_width="@dimen/title_height"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back"
......
......@@ -26,10 +26,44 @@
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/fl_ms"
android:layout_width="0dp"
android:layout_height="@dimen/all_margin_big"
android:layout_marginBottom="@dimen/all_line_width"
android:alpha="0.87"
android:background="@color/cyan_sunquan"
android:gravity="center"
android:orientation="horizontal"
android:visibility="@{msDisAmt>0?View.VISIBLE:View.GONE}"
app:layout_constraintBottom_toTopOf="@id/ll_title"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/store_ms_dis"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{ConvertUtil.fenToYuan(msDisAmt)}"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/unit_rmb_yuan"
android:textColor="@color/black_zhangfei"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_title"
......@@ -52,8 +86,8 @@
android:paddingEnd="@dimen/all_margin_big"
android:paddingStart="@dimen/all_margin_big"
android:paddingTop="@dimen/all_spacing"
android:text="@string/store_btn_settle"
android:textColor="@color/white_caocao" />
android:text="@string/store_clear_all"
android:textColor="@color/black_baozheng" />
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<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="disInfo"
type="String" />
<variable
name="promotionInfo"
type="String" />
<variable
name="moneyOffInfo"
type="String" />
<variable
name="giftInfo"
type="String" />
</data>
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:gravity="center"
android:background="@color/white_caocao"
android:orientation="vertical">
<FrameLayout
android:id="@+id/fl_title"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/ms_dialog_title"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" />
<TextView
android:id="@+id/tv_close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|end"
android:foreground="?android:attr/selectableItemBackground"
android:paddingBottom="@dimen/all_spacing"
android:paddingEnd="@dimen/all_margin_big"
android:paddingStart="@dimen/all_margin_big"
android:paddingTop="@dimen/all_spacing"
android:text="@string/all_close"
android:textColor="@color/black_baozheng" />
</FrameLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai"
app:layout_constraintTop_toBottomOf="@id/fl_title" />
<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="AAAAAAAAAAAAAAAAAA" />
android:gravity="top|start"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_margin"
android:visibility="@{disInfo.length()>0?View.VISIBLE:View.GONE}">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_red_r1"
android:paddingBottom="@dimen/all_shape_radius"
android:paddingEnd="@dimen/all_spacing"
android:paddingStart="@dimen/all_spacing"
android:paddingTop="@dimen/all_shape_radius"
android:text="@string/ms_type_dis"
android:textColor="@color/white_caocao" />
<TextView
android:id="@+id/tv_dis"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:lineSpacingExtra="@dimen/all_spacing"
android:text="@{disInfo}"
android:textColor="@color/black_baozheng" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top|start"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_margin"
android:visibility="@{promotionInfo.length()>0?View.VISIBLE:View.GONE}">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_orange_r1"
android:paddingBottom="@dimen/all_shape_radius"
android:paddingEnd="@dimen/all_spacing"
android:paddingStart="@dimen/all_spacing"
android:paddingTop="@dimen/all_shape_radius"
android:text="@string/ms_type_promotion"
android:textColor="@color/white_caocao" />
<TextView
android:id="@+id/tv_promotion"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:lineSpacingExtra="@dimen/all_spacing"
android:text="@{promotionInfo}"
android:textColor="@color/black_baozheng" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top|start"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_margin"
android:visibility="@{moneyOffInfo.length()>0?View.VISIBLE:View.GONE}">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_green_r1"
android:paddingBottom="@dimen/all_shape_radius"
android:paddingEnd="@dimen/all_spacing"
android:paddingStart="@dimen/all_spacing"
android:paddingTop="@dimen/all_shape_radius"
android:text="@string/ms_type_money_off"
android:textColor="@color/white_caocao" />
<TextView
android:id="@+id/tv_money_off"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:lineSpacingExtra="@dimen/all_spacing"
android:text="@{moneyOffInfo}"
android:textColor="@color/black_baozheng" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top|start"
android:paddingBottom="@dimen/all_margin"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_margin"
android:visibility="@{giftInfo.length()>0?View.VISIBLE:View.GONE}">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_blue_r1"
android:paddingBottom="@dimen/all_shape_radius"
android:paddingEnd="@dimen/all_spacing"
android:paddingStart="@dimen/all_spacing"
android:paddingTop="@dimen/all_shape_radius"
android:text="@string/ms_type_gift"
android:textColor="@color/white_caocao" />
<TextView
android:id="@+id/tv_gift"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:lineSpacingExtra="@dimen/all_spacing"
android:text="@{giftInfo}"
android:textColor="@color/black_baozheng" />
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -11,12 +11,12 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack"
android:background="@color/white"
>
<include
android:id="@+id/ic_title"
layout="@layout/title_appback"/>
layout="@layout/title"/>
<LinearLayout
......@@ -41,7 +41,8 @@
<TextView
style="@style/textView_title"
android:text="@string/binding_counter_tv_nickname"/>
android:text="@string/binding_counter_tv_nickname"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_nickname"
......@@ -50,8 +51,8 @@
android:layout_marginLeft="@dimen/all_margin_left"
android:gravity="center|left"
android:text="北京浙星信息技术有限公司"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"
android:textStyle="bold"/>
</LinearLayout>
......@@ -64,7 +65,8 @@
<TextView
style="@style/textView_title"
android:text="@string/binding_counter_tv_in_store"/>
android:text="@string/binding_counter_tv_in_store"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_in_storename"
......@@ -73,8 +75,8 @@
android:layout_marginLeft="@dimen/all_margin_left"
android:gravity="center|left"
android:text="丰台万达店"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"
android:textStyle="bold"/>
</LinearLayout>
......@@ -87,17 +89,18 @@
<TextView
style="@style/textView_title"
android:text="@string/binding_counter_tv_store_address"/>
android:text="@string/binding_counter_tv_store_address"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_storetype"
android:id="@+id/tv_store_address"
android:layout_width="match_parent"
android:layout_height="@dimen/counter_input_height"
android:layout_marginLeft="@dimen/all_margin_left"
android:gravity="center_vertical"
android:text="北京市丰台区万达广场一区"
android:textColor="@color/white"
android:textSize="@dimen/et_textsize"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"
android:textStyle="bold"/>
</LinearLayout>
......@@ -108,8 +111,7 @@
android:layout_marginTop="@dimen/item_title_margin"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
>
android:visibility="visible">
<RelativeLayout
android:layout_width="match_parent"
......@@ -119,7 +121,8 @@
<TextView
style="@style/textView_title"
android:layout_marginLeft="0dp"
android:text="@string/binding_counter_tv_binding_counter"/>
android:text="@string/binding_counter_tv_binding_counter"
android:textSize="@dimen/et_textsize"/>
<LinearLayout
......@@ -154,14 +157,20 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/all_margin_left">
<org.angmarch.views.NiceSpinner
android:id="@+id/counter_spinner"
<TextView
android:id="@+id/tv_select_counter"
style="@style/editText_new"
android:layout_width="@dimen/et_width"
android:layout_height="@dimen/counter_input_height"
android:background="@drawable/transparent_border"
android:gravity="center_vertical"
android:text=""
android:textSize="@dimen/et_textsize"/>
android:layout_marginLeft="0dp"
android:layout_marginTop="@dimen/all_padding"
android:drawablePadding="@dimen/all_padding"
android:drawableRight="@mipmap/createstore_drop_down"
android:ems="10"
android:hint="选择款台"
android:maxLength="11"
android:onClick="@{onClickListener}"
android:textSize="@dimen/text_three_title"/>
</LinearLayout>
......@@ -193,7 +202,7 @@
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:text="10号款台(新增)"
android:textColor="@color/white"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"
android:textStyle="bold"/>
......
......@@ -12,11 +12,11 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack">
android:background="@color/white">
<include
android:id="@+id/ic_title"
layout="@layout/title_appback"/>
layout="@layout/title"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -48,7 +48,7 @@
android:layout_marginLeft="@dimen/all_margin_left"
android:gravity="center_vertical"
android:text="北京浙星信息技术有限公司"
android:textColor="@color/white"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/et_textsize"
android:textStyle="bold"/>
</LinearLayout>
......@@ -104,15 +104,19 @@
android:layout_marginLeft="@dimen/all_margin_left"
android:layout_marginTop="@dimen/all_padding">
<org.angmarch.views.NiceSpinner
android:id="@+id/store_spinner"
android:layout_width="@dimen/nicespinner_width"
android:layout_height="@dimen/counter_input_height"
android:background="@drawable/blue_border"
android:gravity="center_vertical"
android:paddingLeft="@dimen/et_padding"
android:text="123"
android:textSize="@dimen/et_textsize"/>
<TextView
android:id="@+id/tv_select_store"
style="@style/editText_new"
android:layout_width="@dimen/et_width"
android:layout_marginLeft="0dp"
android:layout_marginTop="@dimen/all_padding"
android:drawablePadding="@dimen/all_padding"
android:drawableRight="@mipmap/createstore_drop_down"
android:ems="10"
android:hint="请选择门店"
android:maxLength="11"
android:onClick="@{onClickListener}"/>
</LinearLayout>
......
......@@ -12,11 +12,11 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack">
android:background="@color/white">
<include
android:id="@+id/ic_title"
layout="@layout/title_appback"></include>
layout="@layout/title"></include>
<LinearLayout
android:layout_width="match_parent"
......@@ -36,7 +36,7 @@
android:layout_height="wrap_content"
android:padding="@dimen/et_padding"
android:text="@string/login_createstorefragment_tv_nickname"
android:textColor="@color/white"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"
android:textStyle="bold"/>
......@@ -52,14 +52,14 @@
android:maxLength="11"
android:padding="@dimen/et_padding"
android:singleLine="true"
android:textColor="@color/white"
android:textColor="@color/black_baozheng"
android:textColorHint="@color/hint"
android:textSize="@dimen/et_textsize"
android:visibility="gone"/>
<com.xingdata.zzdpos.view.ContainsEmojiEditText
android:id="@+id/et_nickname"
style="@style/editText"
style="@style/editText_new"
android:ems="10"
android:hint="@string/login_createstorefragment_et_nickname_hint"
android:lines="1"
......@@ -79,13 +79,13 @@
android:layout_height="wrap_content"
android:padding="@dimen/et_padding"
android:text="@string/login_createstorefragment_tv_storename"
android:textColor="@color/white"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"
android:textStyle="bold"/>
<com.xingdata.zzdpos.view.ContainsEmojiEditText
android:id="@+id/et_storename"
style="@style/editText"
style="@style/editText_new"
android:ems="10"
android:hint="@string/login_createstorefragment_et_storename_hint"
android:lines="1"
......@@ -136,13 +136,13 @@
android:layout_height="wrap_content"
android:padding="@dimen/et_padding"
android:text="@string/login_createstorefragment_tv_storeaddress"
android:textColor="@color/white"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"
android:textStyle="bold"/>
<TextView
android:id="@+id/tv_storeaddress"
style="@style/editText"
style="@style/editText_new"
android:drawablePadding="@dimen/all_padding"
android:drawableRight="@mipmap/createstore_drop_down"
android:ems="10"
......@@ -163,13 +163,13 @@
android:layout_height="wrap_content"
android:padding="@dimen/et_padding"
android:text="@string/login_createstorefragment_tv_storeaddressmessage"
android:textColor="@color/white"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_three_title"
android:textStyle="bold"/>
<com.xingdata.zzdpos.view.ContainsEmojiEditText
android:id="@+id/tv_storedetailedaddress"
style="@style/editText"
style="@style/editText_new"
android:ems="15"
android:hint="@string/login_createstorefragment_et_storedetailedaddress_hint"
android:lines="1"
......
......@@ -12,11 +12,13 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
<include android:id="@+id/ic_title" layout="@layout/title_appback"/>
<include
android:id="@+id/ic_title"
layout="@layout/title"/>
<LinearLayout
android:layout_width="match_parent"
......@@ -30,29 +32,25 @@
android:layout_height="wrap_content"
android:src="@mipmap/login_logo"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/et_margin_logo">
<EditText
android:id="@+id/et_one_password"
style="@style/editText"
android:background="@drawable/transparent_border"
android:digits="1234567890"
android:ems="10"
android:hint="@string/login_smscodefragment_et_one_input_password_hint"
android:inputType="textPassword"
android:maxLength="11"/>
</RelativeLayout>
<EditText
android:id="@+id/et_one_password"
style="@style/editText_new"
android:layout_marginTop="@dimen/et_margin_edittext"
android:digits="1234567890"
android:drawableLeft="@mipmap/login_pwd01"
android:ems="10"
android:hint="@string/login_smscodefragment_et_one_input_password_hint"
android:inputType="textPassword"
android:maxLength="8"
/>
<EditText
android:id="@+id/et_two_password"
style="@style/editText"
style="@style/editText_new"
android:layout_marginTop="@dimen/et_margin_edittext"
android:digits="1234567890"
android:drawableLeft="@mipmap/pwd_two01"
android:ems="10"
android:hint="@string/login_smscodefragment_et_two_input_password_hint"
android:inputType="textPassword"
......@@ -81,7 +79,7 @@
android:layout_marginRight="@dimen/all_margin_left"
android:onClick="@{onClickListener}"
android:text="已有账号 >"
android:textColor="@color/white"/>
android:textColor="@color/black_baozheng"/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
......
......@@ -17,19 +17,12 @@
app:layout_constraintGuide_percent="0.38" />
<include
android:id="@+id/ic_title"
layout="@layout/title_order"
android:elevation="@dimen/view_line_L1"
app:layout_constraintTop_toTopOf="parent" />
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="30dp"
android:elevation="@dimen/view_line_L1"
app:layout_constraintTop_toBottomOf="@id/ic_title"
app:layout_constraintTop_toTopOf="parent"
app:tabIndicatorHeight="0dp"
app:tabMinWidth="100dp"
app:tabMode="scrollable"
......
<layout>
<android.support.constraint.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_product"
android:layout_width="0dp"
android:layout_height="0dp"
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">
<android.support.v7.widget.RecyclerView
android:id="@+id/statistics_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -172,19 +172,180 @@
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginBottom="@dimen/all_spacing"
android:background="@color/gray_huanggai" />
<FrameLayout
android:id="@+id/f_saledetail"
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_huanggai" />
<LinearLayout
android:id="@+id/ll_store"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_saledetail_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:orientation="horizontal"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="?attr/actionBarSize"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/settle_saledetail_hint"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<CheckBox
android:id="@+id/cb_saledetail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@mipmap/but_unfurled"
android:checked="true"
android:foreground="?android:attr/actionBarItemBackground" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_saledetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_saledetail"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<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" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:gravity="start"
android:text="@string/cart_amt"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:id="@+id/tv_order_cnt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:id="@+id/tv_vip_off_amt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:gravity="end"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
</LinearLayout>
<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" />
<LinearLayout
android:id="@+id/ll_dis_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:orientation="horizontal"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="?attr/actionBarSize"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/settle_dis_hint"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<CheckBox
android:id="@+id/cb_dis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@mipmap/but_unfurled"
android:checked="true"
android:foreground="?android:attr/actionBarItemBackground" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_dis"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<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.support.v7.widget.RecyclerView
android:id="@+id/rl_dis"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_vip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/white_caocao"
android:orientation="vertical">
......@@ -223,7 +384,7 @@
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_huanggai" />
android:background="@color/gray_kongming" />
<LinearLayout
android:id="@+id/ll_ticket"
......@@ -271,7 +432,7 @@
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_huanggai" />
android:background="@color/gray_kongming" />
<LinearLayout
android:id="@+id/ll_point"
......@@ -296,7 +457,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing"
android:text="@{@string/settle_point_vip_text + avlPoints + @string/settle_point_amt_text + pointDisAmt}"
android:text="@{@string/settle_point_vip_text + avlPoints + @string/settle_point_amt_text + pointDisAmt +@string/unit_rmb_yuan}"
android:textColor="@color/black_likui" />
<CheckBox
......@@ -304,7 +465,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@mipmap/but_elect02"
android:contentDescription="@string/settle_balance" />
android:contentDescription="@string/settle_point" />
</LinearLayout>
......@@ -313,7 +474,7 @@
android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_huanggai" />
android:background="@color/gray_kongming" />
<LinearLayout
android:layout_width="match_parent"
......@@ -348,7 +509,6 @@
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
......
......@@ -7,12 +7,16 @@
name="onClickListener"
type="com.xingdata.zzdpos.util.OnClickListener"/>
<variable
name="OnFocusChangeListener"
type="android.view.View.OnFocusChangeListener"></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/appBack"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical">
......@@ -30,8 +34,9 @@
<EditText
android:id="@+id/et_phone"
style="@style/editText"
style="@style/editText_new"
android:digits="1234567890"
android:drawableLeft="@mipmap/login_username1"
android:ems="10"
android:hint="@string/login_et_phone_hint"
android:inputType="phone"
......@@ -62,9 +67,10 @@
<EditText
android:id="@+id/et_pwd"
style="@style/editText"
style="@style/editText_new"
android:layout_marginTop="@dimen/et_margin_edittext"
android:digits="1234567890"
android:drawableLeft="@mipmap/login_pwd01"
android:ems="10"
android:hint="@string/login_et_password_hint"
android:inputType="textPassword"
......@@ -98,7 +104,8 @@
android:layout_height="wrap_content"
android:onClick="@{onClickListener}"
android:text="注册 >"
android:textColor="@color/white"/>
android:textColor="@color/black_baozheng"
/>
<TextView
android:id="@+id/tv_forgotPassword"
......@@ -107,7 +114,7 @@
android:layout_alignParentRight="true"
android:onClick="@{onClickListener}"
android:text="忘记密码 ?"
android:textColor="@color/white"/>
android:textColor="@color/black_baozheng"/>
</RelativeLayout>
</LinearLayout>
......
......@@ -12,10 +12,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/appBack"
android:background="@color/white"
android:orientation="vertical">
<include android:id="@+id/ic_title" layout="@layout/title_appback"></include>
<include
android:id="@+id/ic_title"
layout="@layout/title"></include>
<LinearLayout
android:layout_width="match_parent"
......@@ -36,8 +38,9 @@
<EditText
android:id="@+id/et_phone"
style="@style/editText"
style="@style/editText_new"
android:digits="1234567890"
android:drawableLeft="@mipmap/login_pwd01"
android:ems="10"
android:gravity="center_vertical"
android:hint="@string/login_et_phone_hint"
......@@ -67,7 +70,7 @@
android:paddingBottom="@dimen/et_padding"
android:paddingTop="@dimen/et_padding"
android:text="@string/login_smscodefragment_tv_get_sms"
android:textColor="@color/blue"/>
android:textColor="@color/black_baozheng"/>
</LinearLayout>
......@@ -75,9 +78,10 @@
<EditText
android:id="@+id/et_sms_code"
style="@style/editText"
style="@style/editText_new"
android:layout_marginTop="@dimen/all_margin"
android:digits="1234567890"
android:drawableLeft="@mipmap/sms01"
android:ems="10"
android:hint="@string/login_smscodefragment_et_input_sms_hint"
android:inputType="phone|number"
......@@ -106,7 +110,7 @@
android:layout_marginRight="@dimen/all_margin_left"
android:onClick="@{onClickListener}"
android:text="已有账号 >"
android:textColor="@color/white"/>
android:textColor="@color/black_baozheng"/>
</RelativeLayout>
</LinearLayout>
......
<layout>
<data>
<variable
name="todayAmt"
type="String" />
<variable
name="todayOrder"
type="String" />
<variable
name="todayRecharge"
type="String" />
<variable
name="todayVipAdd"
type="String" />
</data>
<android.support.constraint.ConstraintLayout 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"
......@@ -43,7 +62,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="32000"
android:text="@{todayAmt}"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_text_size_big_big" />
......@@ -73,7 +92,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="256"
android:text="@{todayOrder}"
android:textColor="@color/white_caocao" />
<TextView
......@@ -95,7 +114,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="256"
android:text="@{todayRecharge}"
android:textColor="@color/white_caocao" />
<TextView
......@@ -116,7 +135,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="256"
android:text="@{todayVipAdd}"
android:textColor="@color/white_caocao" />
<TextView
......
<layout>
<android.support.constraint.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
tools:context="com.example.administrator.tangkupos.CasherFragment">
<!-- TODO: Update blank fragmfragment_integral_indexyout -->
<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.38" />
<include
android:id="@+id/ic_title"
layout="@layout/title_order"
app:layout_constraintTop_toTopOf="parent" />
<FrameLayout
android:id="@+id/main_frame"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title">
</FrameLayout>
<ViewStub
android:id="@+id/view_stub"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout="@layout/view_search_paytype"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ic_title" />
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -2,23 +2,77 @@
<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="msCount"
type="int" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<LinearLayout
<FrameLayout
android:id="@+id/ll_ms"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao">
android:background="@color/white_caocao"
android:orientation="vertical"
android:visibility="@{msCount>0 ?View.VISIBLE:View.GONE}">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@drawable/shape_gray_r1"
android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:padding="@dimen/all_spacing">
<TextView
android:id="@+id/tv_ms_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/all_shape_radius"
android:paddingEnd="@dimen/all_spacing"
android:paddingStart="@dimen/all_spacing"
android:paddingTop="@dimen/all_shape_radius"
android:textColor="@color/white_caocao" />
<TextView
android:id="@+id/tv_ms_dis"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing"
android:layout_weight="1"
android:textColor="@color/black_baozheng" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_marginStart="@dimen/all_spacing"
android:drawableEnd="@mipmap/but_unfurled"
android:drawablePadding="@dimen/all_spacing"
android:text="@{msCount +@string/store_ms_count}"
android:textColor="@color/black_baozheng" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai" />
</LinearLayout>
</FrameLayout>
<View
......@@ -42,7 +96,8 @@
android:id="@+id/srl_sku"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3">
android:layout_weight="3"
android:background="@color/white_caocao">
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_sku"
......
......@@ -22,9 +22,6 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_sku"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blue_mawu" />
android:layout_height="match_parent" />
</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">
<data>
<import type="com.xingdata.zzdpos.util.ConvertUtil" />
<variable
name="amt"
type="long" />
</data>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao">
<TextView
android:id="@+id/tv_type"
android:layout_width="@dimen/all_margin_big"
android:layout_height="@dimen/all_margin_big"
android:background="@drawable/shape_red_oval"
android:gravity="center"
android:textColor="@color/white_caocao"
android:textSize="@dimen/all_text_size"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="parent" />
<TextView
android:id="@+id/tv_dis_amt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing"
android:text="@{ConvertUtil.fenToYuan(amt,true)}"
android:textColor="@color/black_zhangfei"
app:layout_constraintBottom_toBottomOf="@id/tv_type"
app:layout_constraintLeft_toRightOf="@id/tv_type"
app:layout_constraintTop_toTopOf="@id/tv_type" />
</android.support.constraint.ConstraintLayout>
</layout>
<?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">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:maxLines="2"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="6"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_count"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_count"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@+id/tv_name"
app:layout_constraintRight_toLeftOf="@+id/tv_price"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_initial_price"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/gray"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/tv_price"
app:layout_constraintLeft_toRightOf="@+id/tv_count"
app:layout_constraintRight_toLeftOf="@+id/tv_amt"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/tv_price"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintLeft_toRightOf="@+id/tv_count"
app:layout_constraintRight_toLeftOf="@+id/tv_amt"
app:layout_constraintTop_toBottomOf="@id/tv_initial_price" />
<TextView
android:id="@+id/tv_amt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="@color/black_baozheng"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintLeft_toRightOf="@+id/tv_price"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
</layout>
......@@ -19,10 +19,11 @@
<ImageButton
android:id="@+id/iv_back"
android:layout_width="60dp"
android:layout_height="?attr/actionBarSize"
android:background="@mipmap/go_back"
android:onClick="@{onClickListener}"/>
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="@color/transparent"
android:src="@mipmap/go_back"
android:onClick="@{onClickListener}" />
<TextView
android:id="@+id/tv_title"
......@@ -31,7 +32,7 @@
android:layout_centerInParent="true"
android:text="标题"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/text_secondary_title"/>
android:textSize="@dimen/big_text_size"/>
</RelativeLayout>
......
......@@ -34,7 +34,7 @@
android:layout_centerInParent="true"
android:text="标题"
android:textColor="@color/white"
android:textSize="@dimen/text_secondary_title"
android:textSize="@dimen/big_text_size"
/>
......
......@@ -22,8 +22,7 @@
android:layout_height="match_parent"
android:background="@color/transparent"
android:onClick="@{onClickListener}"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_black"
android:src="@mipmap/go_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......@@ -43,10 +42,11 @@
<!--app:layout_constraintTop_toTopOf="parent" />-->
<EditText
android:id="@+id/tv_title"
android:id="@+id/ed_title"
style="@style/searchBarEditor"
android:layout_width="0dp"
android:layout_height="match_parent"
android:hint="@string/statistics_order_edit_hint"
android:inputType="number"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
......@@ -57,6 +57,21 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_goneMarginRight="@dimen/all_padding" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/big_text_size"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_right"
app:layout_constraintStart_toEndOf="@id/iv_back"
app:layout_constraintTop_toTopOf="parent"
app:layout_goneMarginRight="?attr/actionBarSize" />
<ImageButton
android:id="@+id/iv_right"
android:layout_width="?attr/actionBarSize"
......
<?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="date"
type="String" />
<variable
name="operName"
type="String" />
<variable
name="orderNo"
type="String" />
<variable
name="payType"
type="String" />
<variable
name="goodsNum"
type="String" />
<variable
name="sumAmt"
type="String" />
<variable
name="disAmt"
type="String" />
<variable
name="cutAmt"
type="String" />
<variable
name="cutAmtShow"
type="Boolean" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/all_margin"
android:padding="@dimen/dp_4">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/tv_amt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
android:text="¥9999"
android:textColor="@color/red900"
android:textSize="@dimen/all_text_size_big"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_amt_hint" />
<TextView
android:id="@+id/tv_amt_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_margin"
android:text="实收金额"
android:textColor="@color/black_baozheng"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L1"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_zhouyu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_amt" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/view1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingEnd="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
android:paddingTop="@dimen/dp_4"
android:weightSum="2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/oder_detail_date"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/oder_detail_no"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/oder_detail_oper"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/oder_detail_payType"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/oder_detail_goodsNum"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/oder_detail_SumAmt"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/oder_detail_discountAmt"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/oder_detail_cutAmt"
android:textSize="@dimen/small_text_size"
android:visibility="@{cutAmtShow? View.VISIBLE: View.GONE}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:orientation="vertical">
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{date}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{orderNo}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{operName}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{payType}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{goodsNum}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{sumAmt}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{disAmt}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{cutAmt}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size"
android:visibility="@{cutAmtShow? View.VISIBLE: View.GONE}" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L1"
android:background="@color/gray_zhouyu" />
<TextView
android:id="@+id/tv_goodslist_title"
style="@style/textView_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@mipmap/but_unfurled"
android:text="商品详情" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L1"
android:background="@color/gray_zhouyu" />
<LinearLayout
android:padding="@dimen/dp_4"
android:id="@+id/ll_goods_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_padding"
android:orientation="vertical"
android:visibility="gone">
</LinearLayout>
</LinearLayout>
</ScrollView>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
</FrameLayout>
</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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<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" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:gravity="center_vertical"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:gravity="start"
android:text="@string/cart_amt"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:text="12"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:gravity="end"
android:text="$40.0"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
</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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<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" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:gravity="center_vertical"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:gravity="start"
android:text="@string/cart_product_name"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:text="@string/cart_product_count"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="end"
android:text="@string/cart_product_price"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="end"
android:text="@string/cart_product_amt"
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_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" />
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:shrinkColumns="1,2,3">
<TextView
android:id="@+id/tv_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/all_padding"
android:text="按支付方式搜索" />
<TableRow>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_4"
android:layout_marginStart="@dimen/all_padding"
android:layout_weight="1"
android:background="@color/red_diaochan"
android:padding="@dimen/all_padding"
android:src="@mipmap/pay_cash" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_4"
android:layout_marginStart="@dimen/dp_4"
android:layout_weight="1"
android:background="@color/blue_yuefei"
android:padding="@dimen/all_padding"
android:src="@mipmap/pay_alipay" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding"
android:layout_marginStart="@dimen/dp_4"
android:layout_weight="1"
android:background="@color/green_kongrong"
android:padding="@dimen/all_padding"
android:src="@mipmap/pay_wechat" />
</TableRow>
<TableRow>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_4"
android:layout_marginStart="@dimen/all_padding"
android:layout_marginTop="@dimen/all_margin"
android:layout_weight="1"
android:background="@color/cyan_liubei"
android:padding="@dimen/all_padding"
android:src="@mipmap/pay_card" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_4"
android:layout_marginStart="@dimen/dp_4"
android:layout_marginTop="@dimen/all_margin"
android:layout_weight="1"
android:background="@color/yellow_huangxin"
android:padding="@dimen/all_padding"
android:src="@mipmap/pay_membershipcard" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_padding"
android:layout_marginStart="@dimen/dp_4"
android:layout_marginTop="@dimen/all_margin"
android:layout_weight="1"
android:background="@color/purple_yanqing"
android:padding="@dimen/all_padding"
android:src="@mipmap/pay_credit" />
</TableRow>
</TableLayout>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-hdpi/splash.png

36.6 KB | W: | H:

app/src/main/res/mipmap-hdpi/splash.png

36.4 KB | W: | H:

app/src/main/res/mipmap-hdpi/splash.png
app/src/main/res/mipmap-hdpi/splash.png
app/src/main/res/mipmap-hdpi/splash.png
app/src/main/res/mipmap-hdpi/splash.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -153,4 +153,5 @@
<color name="purple_yanqing">#6590e6</color>
</resources>
......@@ -17,7 +17,7 @@
<dimen name="all_text_size_big">22sp</dimen>
<dimen name="all_text_size_big_big">30sp</dimen>
<dimen name="all_text_size_super_big">25sp</dimen>
<dimen name="all_margin_left">15dp</dimen>
<dimen name="all_margin_left">17dp</dimen>
<dimen name="title_height">50dp</dimen>
<dimen name="small_text_size">13sp</dimen>
<dimen name="all_textview_width">120dp</dimen>
......@@ -96,7 +96,7 @@
<dimen name="et_height">44dp</dimen>
<dimen name="et_textsize">16sp</dimen>
<dimen name="et_padding">12dp</dimen>
<dimen name="et_margin_logo">40dp</dimen>
<dimen name="et_margin_logo">44dp</dimen>
<dimen name="et_margin_edittext">20dp</dimen>
<dimen name="drop_down_margin_right_et">20dp</dimen>
<dimen name="smscodefragment_drop_get_sms_width">84dp</dimen>
......
......@@ -6,6 +6,7 @@
<string name="all_dialog">对话框</string>
<string name="all_cancel">取消</string>
<string name="all_confirm">确认</string>
<string name="all_close">关闭</string>
<string name="all_add">添加</string>
<string name="all_no"></string>
<string name="all_yes"></string>
......@@ -520,6 +521,8 @@
<string name="settle_point_vip_text">可用积分</string>
<string name="settle_point_amt_text"> , 可抵用</string>
<string name="settle_balance">账户余额</string>
<string name="settle_saledetail_hint">商品详情</string>
<string name="settle_dis_hint">优惠项目</string>
<!--支付里的Vip-->
<string name="settle_vip_search_hint">请输入会员手机号</string>
......@@ -535,11 +538,39 @@
<string name="store_pay_amt">合计:</string>
<string name="store_cart">购物车</string>
<string name="store_btn_settle">选好了</string>
<string name="store_clear_all">全部清空</string>
<string name="store_ms_dis">已减</string>
<string name="store_scan">扫描</string>
<string name="store_search_hint">请输入商品名称/助记码/条码</string>
<string name="store_reduce">减少</string>
<string name="store_increase">添加</string>
<string name="store_ms_count">项优惠</string>
<!--优惠-->
<string name="ms_dialog_title">优惠活动</string>
<string name="ms_group_all">全场</string>
<string name="ms_group_all_info">全场</string>
<string name="ms_group_brand">品牌</string>
<string name="ms_group_brand_info">买%s</string>
<string name="ms_group_cate">品类</string>
<string name="ms_group_cate_info">买%s</string>
<string name="ms_group_sku">指定商品</string>
<string name="ms_group_sku_info">买%s</string>
<string name="ms_type_dis">打折</string>
<string name="ms_type_dis_info">享受%s折优惠</string>
<string name="ms_type_dis_abbr"></string>
<string name="ms_type_promotion">促销</string>
<string name="ms_type_promotion_info">享受促销价</string>
<string name="ms_type_promotion_abbr"></string>
<string name="ms_type_money_off">满减</string>
<string name="ms_type_money_off_info">满%s元减%s元</string>
<string name="ms_type_money_off_abbr"></string>
<string name="ms_type_second">打折</string>
<string name="ms_type_second_info">第二件享受%s折优惠</string>
<string name="ms_type_second_abbr"></string>
<string name="ms_type_gift">换购</string>
<string name="ms_type_gift_info">满%s元加%s元换购%s一件</string>
<string name="ms_type_gift_abbr"></string>
<!--帮助POS-->
<string name="help_hint">帮助</string>
......@@ -577,6 +608,17 @@
<string name="statistics_todayRecharge_hint">今日充值</string>
<string name="statistics_todayVipAdd_hint">今日新增会员</string>
<string name="statistics_search_empty">没有查询到订单~</string>
<string name="statistics_order_edit_hint">请输入单号</string>
<string name="statistics_order_detail_hint">订单详情</string>
<!--商品详情POS-->
<string name="oder_detail_date">交易时间:</string>
<string name="oder_detail_no">订单号:</string>
<string name="oder_detail_oper">收银员:</string>
<string name="oder_detail_payType">收款方式:</string>
<string name="oder_detail_goodsNum">商品总数:</string>
<string name="oder_detail_discountAmt">优惠金额:</string>
<string name="oder_detail_SumAmt">合计金额:</string>
<string name="oder_detail_cutAmt">抹零金额:</string>
</resources>
......@@ -17,9 +17,9 @@
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
<style name="vicescreen_textview_stlye">
......@@ -325,6 +325,15 @@
<item name="android:textColorHint">@color/hint</item>
</style>
<style name="editText_new" parent="view_base">
<item name=" android:background">@drawable/selector_white_background_stroke</item>
<item name="android:padding">@dimen/et_padding</item>
<item name=" android:saveEnabled">false</item>
<item name="android:gravity">center|left</item>
<item name="android:textSize">@dimen/et_textsize</item>
<item name="android:textColorHint">@color/hint</item>
</style>
<style name="Base.Widget.Design.TabLayout" parent="android:Widget">
<item name="tabBackground">@color/white_caocao</item>
<item name="tabIndicatorColor">#FFF</item>
......
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