Commit c508fc7f authored by 陈前's avatar 陈前

Merge remote-tracking branch 'origin/master'

parents d0d421ad 459a64d2
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<w>huanggai</w> <w>huanggai</w>
<w>huangxin</w> <w>huangxin</w>
<w>inputer</w> <w>inputer</w>
<w>jsonpay</w>
<w>kongming</w> <w>kongming</w>
<w>kongrong</w> <w>kongrong</w>
<w>kongrun</w> <w>kongrun</w>
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/TangKuPos.iml" filepath="$PROJECT_DIR$/TangKuPos.iml" /> <module fileurl="file://$PROJECT_DIR$/TangKuPos.iml" filepath="$PROJECT_DIR$/TangKuPos.iml" />
<module fileurl="file://D:\Work\Android\AndroidProject\XingData\TangKuPos\.idea\TangKuPos.iml" filepath="D:\Work\Android\AndroidProject\XingData\TangKuPos\.idea\TangKuPos.iml" />
<module fileurl="file://C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos\TangKuPos.iml" filepath="C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos\TangKuPos.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules> </modules>
</component> </component>
......
...@@ -11,6 +11,9 @@ android { ...@@ -11,6 +11,9 @@ android {
versionName "1.0" versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true
ndk{
abiFilters("armeabi", "armeabi-v7a")
}
} }
//解决问题的代码 //解决问题的代码
dexOptions { dexOptions {
...@@ -41,7 +44,12 @@ android { ...@@ -41,7 +44,12 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } } sourceSets {
main {
assets.srcDirs = ['src/main/assets', 'src/main/assets/']
jniLibs.srcDirs = ['libs']
}
}
} }
repositories { repositories {
flatDir { flatDir {
......
...@@ -58,8 +58,9 @@ public class C { ...@@ -58,8 +58,9 @@ public class C {
} }
public static final class URL { public static final class URL {
// public static final String BASE_URL = "http://192.168.254.96:8080/";
public static final String BASE_URL = "http://demo.51zzd.cn:8080/"; public static final String BASE_URL = "http://demo.51zzd.cn:8080/";
public static final String TEMP_PAY_URL = "http://demo.51zzd.cn/";
private static final String PKG = "/tk/"; private static final String PKG = "/tk/";
public final class SYNCHRONOUS { public final class SYNCHRONOUS {
...@@ -407,6 +408,9 @@ public class C { ...@@ -407,6 +408,9 @@ public class C {
public static final String query = ROOT_URL + "query"; public static final String query = ROOT_URL + "query";
} }
public final class TEMP_PAY {
public static final String pay = "pay/payc/pay";
}
} }
...@@ -564,7 +568,6 @@ public class C { ...@@ -564,7 +568,6 @@ public class C {
public static final int PKG = 5; public static final int PKG = 5;
public static final int SKU_DETAIL = 6; public static final int SKU_DETAIL = 6;
public static final int ADD_SKU = 7; public static final int ADD_SKU = 7;
public static final int SKU_EDITOR = 8;
} }
} }
...@@ -2,6 +2,7 @@ package com.xingdata.zzdpos.api; ...@@ -2,6 +2,7 @@ package com.xingdata.zzdpos.api;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import com.xingdata.zzdpos.C;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
...@@ -16,7 +17,6 @@ import okhttp3.OkHttpClient; ...@@ -16,7 +17,6 @@ import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit; import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import com.xingdata.zzdpos.C;
/** /**
...@@ -87,6 +87,4 @@ class Api { ...@@ -87,6 +87,4 @@ class Api {
service = retrofit.create(ApiService.class); service = retrofit.create(ApiService.class);
} }
} }
...@@ -21,7 +21,7 @@ import retrofit2.Retrofit; ...@@ -21,7 +21,7 @@ import retrofit2.Retrofit;
public class ConverterFactory extends Converter.Factory { public class ConverterFactory extends Converter.Factory {
static ConverterFactory create() { public static ConverterFactory create() {
return new ConverterFactory(); return new ConverterFactory();
} }
......
package com.xingdata.zzdpos.api;
import android.support.annotation.NonNull;
import com.xingdata.zzdpos.C;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.TimeUnit;
import okhttp3.Cookie;
import okhttp3.CookieJar;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
public class Jni {
JniService service;
private static class JniHolder {
private static final Jni INSTANCE = new Jni();
}
static Jni getInstance() {
return Jni.JniHolder.INSTANCE;
}
private Jni() {
//LOG
HttpLoggingInterceptor logInterceptor = new HttpLoggingInterceptor();
logInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
//HEAD
Interceptor headInterceptor = (chain) -> chain.proceed(
chain.request().newBuilder()
.addHeader("User-Agent", C.HEAD.USER_AGENT)
.addHeader("Connection", C.HEAD.CONNECTION)
.addHeader("Content-Type", C.HEAD.CONTENT_TYPE)
.addHeader("Content-Language", C.HEAD.CONTENT_LANGUAGE)
.addHeader("Cache-Control", C.HEAD.CACHE_CONTROL)
.build());
//COOKIE
CookieJar cookieJar = new CookieJar() {
private HashMap<String, Cookie> cookieMap = new HashMap<>();
@Override
public void saveFromResponse(@NonNull HttpUrl url, @NonNull List<Cookie> cookies) {
for (int i = 0; i < cookies.size(); i++) {
cookieMap.put(cookies.get(i).name(), cookies.get(i));
}
}
@Override
public List<Cookie> loadForRequest(@NonNull HttpUrl url) {
return new ArrayList<>(cookieMap.values());
}
};
//Client
OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(C.API_BUILDER.READ_TIMEOUT, TimeUnit.MILLISECONDS)
.connectTimeout(C.API_BUILDER.CONNECT_TIMEOUT, TimeUnit.MILLISECONDS)
.addInterceptor(headInterceptor)
.addInterceptor(logInterceptor)
.cookieJar(cookieJar)
.build();
Retrofit retrofit = new Retrofit.Builder()
.client(okHttpClient)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(ConverterFactory.create())
.baseUrl(C.URL.TEMP_PAY_URL)
.build();
service = retrofit.create(JniService.class);
}
}
package com.xingdata.zzdpos.api;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
public class JniFactory {
public static class Settle {
public static Observable<Pay.Response> pay(String str) {
return Jni.getInstance().service.pay(str)
.onErrorReturn(new ErrorFilter<>())
.map(new ResultFilter<>())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
}
}
package com.xingdata.zzdpos.api;
import com.xingdata.zzdpos.C;
import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.Query;
interface JniService {
@GET(C.URL.TEMP_PAY.pay)
Observable<HttpMessage<Pay.Response>> pay(@Query("para") String str);
}
package com.xingdata.zzdpos.api;
import com.alibaba.fastjson.annotation.JSONField;
public class Pay {
public static class Request {
private String OrderType;
private String PayChannelType;
private String DeviceType;
private String Agent_id;
private String Mch_id;
private String Ter_id;
private String OrderNo;
private String PosTrace;
private String OrderDateTime;
private String CurrencyType;
private String OrderAmt;
private String OrderName;
private String ChannelAuthCode;
private String Key;
private String NotifyUrl;
@JSONField(name = "OrderType")
public String getOrderType() {
return OrderType;
}
@JSONField(name = "OrderType")
public void setOrderType(String orderType) {
OrderType = orderType;
}
@JSONField(name = "PayChannelType")
public String getPayChannelType() {
return PayChannelType;
}
@JSONField(name = "PayChannelType")
public void setPayChannelType(String payChannelType) {
PayChannelType = payChannelType;
}
@JSONField(name = "DeviceType")
public String getDeviceType() {
return DeviceType;
}
@JSONField(name = "DeviceType")
public void setDeviceType(String deviceType) {
DeviceType = deviceType;
}
@JSONField(name = "Agent_id")
public String getAgent_id() {
return Agent_id;
}
@JSONField(name = "Agent_id")
public void setAgent_id(String agent_id) {
Agent_id = agent_id;
}
@JSONField(name = "Mch_id")
public String getMch_id() {
return Mch_id;
}
@JSONField(name = "Mch_id")
public void setMch_id(String mch_id) {
Mch_id = mch_id;
}
@JSONField(name = "Ter_id")
public String getTer_id() {
return Ter_id;
}
@JSONField(name = "Ter_id")
public void setTer_id(String ter_id) {
Ter_id = ter_id;
}
@JSONField(name = "OrderNo")
public String getOrderNo() {
return OrderNo;
}
@JSONField(name = "OrderNo")
public void setOrderNo(String orderNo) {
OrderNo = orderNo;
}
@JSONField(name = "PosTrace")
public String getPosTrace() {
return PosTrace;
}
@JSONField(name = "PosTrace")
public void setPosTrace(String posTrace) {
PosTrace = posTrace;
}
@JSONField(name = "OrderDateTime")
public String getOrderDateTime() {
return OrderDateTime;
}
@JSONField(name = "OrderDateTime")
public void setOrderDateTime(String orderDateTime) {
OrderDateTime = orderDateTime;
}
@JSONField(name = "CurrencyType")
public String getCurrencyType() {
return CurrencyType;
}
@JSONField(name = "CurrencyType")
public void setCurrencyType(String currencyType) {
CurrencyType = currencyType;
}
@JSONField(name = "OrderAmt")
public String getOrderAmt() {
return OrderAmt;
}
@JSONField(name = "OrderAmt")
public void setOrderAmt(String orderAmt) {
OrderAmt = orderAmt;
}
@JSONField(name = "OrderName")
public String getOrderName() {
return OrderName;
}
@JSONField(name = "OrderName")
public void setOrderName(String orderName) {
OrderName = orderName;
}
@JSONField(name = "ChannelAuthCode")
public String getChannelAuthCode() {
return ChannelAuthCode;
}
@JSONField(name = "ChannelAuthCode")
public void setChannelAuthCode(String channelAuthCode) {
ChannelAuthCode = channelAuthCode;
}
@JSONField(name = "Key")
public String getKey() {
return Key;
}
@JSONField(name = "Key")
public void setKey(String key) {
Key = key;
}
@JSONField(name = "NotifyUrl")
public String getNotifyUrl() {
return NotifyUrl;
}
@JSONField(name = "NotifyUrl")
public void setNotifyUrl(String notifyUrl) {
NotifyUrl = notifyUrl;
}
}
public class Response {
private int OrderType;
private String ResponseCode;
private String ResponseMsg;
private String TradeStatus;
private String Mch_id;
private String Ter_id;
private String OrderNo;
private String tn;
private String paySign;
public int getOrderType() {
return OrderType;
}
public void setOrderType(int orderType) {
OrderType = orderType;
}
public String getResponseCode() {
return ResponseCode;
}
public void setResponseCode(String responseCode) {
ResponseCode = responseCode;
}
public String getResponseMsg() {
return ResponseMsg;
}
public void setResponseMsg(String responseMsg) {
ResponseMsg = responseMsg;
}
public String getTradeStatus() {
return TradeStatus;
}
public void setTradeStatus(String tradeStatus) {
TradeStatus = tradeStatus;
}
public String getMch_id() {
return Mch_id;
}
public void setMch_id(String mch_id) {
Mch_id = mch_id;
}
public String getTer_id() {
return Ter_id;
}
public void setTer_id(String ter_id) {
Ter_id = ter_id;
}
public String getOrderNo() {
return OrderNo;
}
public void setOrderNo(String orderNo) {
OrderNo = orderNo;
}
public String getTn() {
return tn;
}
public void setTn(String tn) {
this.tn = tn;
}
public String getPaySign() {
return paySign;
}
public void setPaySign(String paySign) {
this.paySign = paySign;
}
}
}
...@@ -14,6 +14,7 @@ import com.xingdata.zzdpos.model.Sskugrp; ...@@ -14,6 +14,7 @@ import com.xingdata.zzdpos.model.Sskugrp;
import com.xingdata.zzdpos.model.Sssku; import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.model.Ussku; import com.xingdata.zzdpos.model.Ussku;
import com.xingdata.zzdpos.ui.main.MainPresenter; import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.ui.marketing.ms.MsPresenter;
import com.xingdata.zzdpos.ui.settle.SettlePresenter; import com.xingdata.zzdpos.ui.settle.SettlePresenter;
import com.xingdata.zzdpos.ui.store.StorePresenter; import com.xingdata.zzdpos.ui.store.StorePresenter;
import com.xingdata.zzdpos.ui.vip.VipPresenter; import com.xingdata.zzdpos.ui.vip.VipPresenter;
...@@ -241,10 +242,23 @@ public class DBFactory { ...@@ -241,10 +242,23 @@ public class DBFactory {
public static class Marketing { public static class Marketing {
public static class Ms { public static class Ms {
public static Observable<List<Level>> queryLevel() { public static Observable<List<Level>> queryLevel() {
return Observable.just(DB.getInstance().get(MainPresenter.class).where(Level return Observable.just(DB.getInstance().get(MsPresenter.class).where(Level
.class).findAll()) .class).findAll())
.flatMap(levels -> Observable.just(getList(levels))); .flatMap(levels -> Observable.just(getList(levels)));
} }
/**
* 查询商品名称
*
* @param skuId 商品Id
* @return 商品名称
*/
public static String querySpuNameBySkuId(Long skuId) {
List<Sssku> ssskus = getList(DB.getInstance().get(MsPresenter.class).where(Sssku
.class).equalTo("skuId", skuId).findAll());
if (ssskus.size() > 0) return ssskus.get(0).getSpuName();
else return null;
}
} }
} }
......
...@@ -20,7 +20,7 @@ public class Sskugrp extends RealmObject implements BaseModel, BaseBean { ...@@ -20,7 +20,7 @@ public class Sskugrp extends RealmObject implements BaseModel, BaseBean {
Sskugrp sskugrp = new Sskugrp(); Sskugrp sskugrp = new Sskugrp();
sskugrp.setSelected(true); sskugrp.setSelected(true);
sskugrp.setSkuGrpId(0l); sskugrp.setSkuGrpId(0l);
sskugrp.setSkuGrpName("全部分组"); sskugrp.setSkuGrpName("全部商品");
return sskugrp; return sskugrp;
} }
......
...@@ -157,7 +157,7 @@ public class MainPresenter extends MainContract.Presenter { ...@@ -157,7 +157,7 @@ public class MainPresenter extends MainContract.Presenter {
// //
// sskugrp = new Sskugrp(); // sskugrp = new Sskugrp();
// sskugrp.setSkuGrpId(0L); // sskugrp.setSkuGrpId(0L);
// sskugrp.setSkuGrpName("全部分组"); // sskugrp.setSkuGrpName("全部商品");
// sskugrp.setSelected(true); // sskugrp.setSelected(true);
// sskugrps.add(0, sskugrp); // sskugrps.add(0, sskugrp);
// //
......
...@@ -48,7 +48,7 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin ...@@ -48,7 +48,7 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
@Override @Override
public void initView() { public void initView() {
this.showTitleBarByTitleMode(C.TITLE_MODE.SKU); this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
this.loadRootFragment(R.id.f_sssku, mManagerFragment); this.loadRootFragment(R.id.f_sssku, mManagerFragment);
mViewBinding.btnBack.setOnClickListener(view -> getTopFragment().onBackPressedSupport()); mViewBinding.btnBack.setOnClickListener(view -> getTopFragment().onBackPressedSupport());
...@@ -59,7 +59,6 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin ...@@ -59,7 +59,6 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
} }
return false; return false;
}); });
mViewBinding.etSearch.setOnFocusChangeListener((view, b) -> mPresenter.searchBarFocusChanged(b, C.TITLE_MODE.SKU));
mViewBinding.btnMenu.setOnClickListener(view -> mPresenter.clickSkuMenu()); mViewBinding.btnMenu.setOnClickListener(view -> mPresenter.clickSkuMenu());
} }
...@@ -138,17 +137,25 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin ...@@ -138,17 +137,25 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
@Override @Override
public void showEditorFragment(Sssku sku, int editMode) { public void showEditorFragment(Sssku sku, int editMode) {
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
switch (editMode) { switch (editMode) {
case C.SKU_EDITOR_MODE.ADD: case C.SKU_EDITOR_MODE.ADD:
this.showTitleBarByTitleMode(C.TITLE_MODE.SKU_EDITOR);
mViewBinding.tvEditorHint.setText("已有");
mViewBinding.tvEditorHint.setBackgroundResource(R.drawable.shape_orange_r1);
mViewBinding.tvTitle.setText(R.string.sssku_add); mViewBinding.tvTitle.setText(R.string.sssku_add);
this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.ADD)); this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.ADD));
break; break;
case C.SKU_EDITOR_MODE.UNKNOWN: case C.SKU_EDITOR_MODE.UNKNOWN:
this.showTitleBarByTitleMode(C.TITLE_MODE.SKU_EDITOR);
mViewBinding.tvEditorHint.setText("新增");
mViewBinding.tvEditorHint.setBackgroundResource(R.drawable.shape_red_r1);
mViewBinding.tvTitle.setText(R.string.sssku_add); mViewBinding.tvTitle.setText(R.string.sssku_add);
this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.UNKNOWN)); this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.UNKNOWN));
break; break;
case C.SKU_EDITOR_MODE.UPDATE: case C.SKU_EDITOR_MODE.UPDATE:
this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.sku_update); mViewBinding.tvTitle.setText(R.string.sku_update);
this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.UPDATE)); this.start(mEditorFragment.setSssku(sku).setEditMode(C.SKU_EDITOR_MODE.UPDATE));
break; break;
...@@ -198,7 +205,8 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin ...@@ -198,7 +205,8 @@ public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBin
@Override @Override
public void backToManagerFragment() { public void backToManagerFragment() {
this.showTitleBarByTitleMode(C.TITLE_MODE.SKU); this.showTitleBarByTitleMode(C.TITLE_MODE.TEXT);
mViewBinding.tvTitle.setText(R.string.sssku_title);
this.resetSearchBar(); this.resetSearchBar();
this.pop(); this.pop();
} }
......
...@@ -213,6 +213,11 @@ public interface SsskuContract { ...@@ -213,6 +213,11 @@ public interface SsskuContract {
*/ */
public abstract void clickSku(Sssku sssku); public abstract void clickSku(Sssku sssku);
/**
* 管理页面 - 刷新商品分组
*/
public abstract void refreshSkugrp();
/** /**
* 管理页面 - 切换分组 * 管理页面 - 切换分组
* *
......
...@@ -46,6 +46,11 @@ public class SsskuPresenter extends SsskuContract.Presenter { ...@@ -46,6 +46,11 @@ public class SsskuPresenter extends SsskuContract.Presenter {
clickSku(sssku, C.TITLE_MODE.SKU); clickSku(sssku, C.TITLE_MODE.SKU);
} }
@Override
public void refreshSkugrp() {
this.getSkugrp();
}
@Override @Override
public void clickSkugrp(Sskugrp sskugrp) { public void clickSkugrp(Sskugrp sskugrp) {
//点击商品管理里的分组 //点击商品管理里的分组
...@@ -164,6 +169,12 @@ public class SsskuPresenter extends SsskuContract.Presenter { ...@@ -164,6 +169,12 @@ public class SsskuPresenter extends SsskuContract.Presenter {
@Override @Override
public void clickDeleteSkugrp(Sskugrp sskugrp) { public void clickDeleteSkugrp(Sskugrp sskugrp) {
mView.showLoadingDialog(); mView.showLoadingDialog();
if (mSkuGrpId.longValue() == sskugrp.getSkuGrpId()) {
this.mPageNum = 0;
this.mSkuGrpId = 0L;
mView.loadSkugrpState(0L);
this.getSku();
}
mCompositeDisposable.add( mCompositeDisposable.add(
ApiFactory.Sskugrp.delete(sskugrp.getSkuGrpId()) ApiFactory.Sskugrp.delete(sskugrp.getSkuGrpId())
.doOnSubscribe(subscription -> mView.dismissLoadingDialog()) .doOnSubscribe(subscription -> mView.dismissLoadingDialog())
......
...@@ -29,6 +29,7 @@ public class SkugrpDeleteDialog extends BaseDialog<SsskuPresenter, DialogSkugrpD ...@@ -29,6 +29,7 @@ public class SkugrpDeleteDialog extends BaseDialog<SsskuPresenter, DialogSkugrpD
@Override @Override
public void initView() { public void initView() {
mViewBinding.tvSkugrpName.setText(mSskugrp.getSkuGrpName());
} }
@Override @Override
......
...@@ -242,6 +242,7 @@ public class EditorFragment extends BaseFragment<SsskuPresenter, FragmentSsskuEd ...@@ -242,6 +242,7 @@ public class EditorFragment extends BaseFragment<SsskuPresenter, FragmentSsskuEd
private void setInfoViewByEditMode() { private void setInfoViewByEditMode() {
switch (mEditorMode) { switch (mEditorMode) {
case C.SKU_EDITOR_MODE.UNKNOWN: case C.SKU_EDITOR_MODE.UNKNOWN:
mViewBinding.etName.setEnabled(true);
mViewBinding.nsType1.setVisibility(View.VISIBLE); mViewBinding.nsType1.setVisibility(View.VISIBLE);
mViewBinding.nsType2.setVisibility(View.VISIBLE); mViewBinding.nsType2.setVisibility(View.VISIBLE);
mViewBinding.nsType3.setVisibility(View.VISIBLE); mViewBinding.nsType3.setVisibility(View.VISIBLE);
...@@ -251,6 +252,7 @@ public class EditorFragment extends BaseFragment<SsskuPresenter, FragmentSsskuEd ...@@ -251,6 +252,7 @@ public class EditorFragment extends BaseFragment<SsskuPresenter, FragmentSsskuEd
this.loadCla(); this.loadCla();
break; break;
default: default:
mViewBinding.etName.setEnabled(false);
mViewBinding.nsType1.setVisibility(View.INVISIBLE); mViewBinding.nsType1.setVisibility(View.INVISIBLE);
mViewBinding.nsType2.setVisibility(View.INVISIBLE); mViewBinding.nsType2.setVisibility(View.INVISIBLE);
mViewBinding.nsType3.setVisibility(View.GONE); mViewBinding.nsType3.setVisibility(View.GONE);
...@@ -520,6 +522,7 @@ public class EditorFragment extends BaseFragment<SsskuPresenter, FragmentSsskuEd ...@@ -520,6 +522,7 @@ public class EditorFragment extends BaseFragment<SsskuPresenter, FragmentSsskuEd
mSssku.setCreateTime(null); mSssku.setCreateTime(null);
mSssku.setUpdateTime(null); mSssku.setUpdateTime(null);
mSssku.setSkuId(null);
} }
@Override @Override
......
...@@ -32,6 +32,8 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -32,6 +32,8 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
@Override @Override
public void initView() { public void initView() {
mViewBinding.setTotalCount(0);
// init sku // init sku
mSkuAdapter = new SkuAdapter(); mSkuAdapter = new SkuAdapter();
mViewBinding.rlSku.setAdapter(mSkuAdapter); mViewBinding.rlSku.setAdapter(mSkuAdapter);
...@@ -54,6 +56,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -54,6 +56,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
mViewBinding.llSsskuAdd.setOnClickListener(view -> mPresenter.clickAddSku()); mViewBinding.llSsskuAdd.setOnClickListener(view -> mPresenter.clickAddSku());
mViewBinding.tvReplenish.setOnClickListener(view -> mPresenter.clickReplenish()); mViewBinding.tvReplenish.setOnClickListener(view -> mPresenter.clickReplenish());
mViewBinding.llSkugrpAdd.setOnClickListener(view -> mPresenter.clickAddSkugrp()); mViewBinding.llSkugrpAdd.setOnClickListener(view -> mPresenter.clickAddSkugrp());
mViewBinding.tvSearch.setOnClickListener(view -> mPresenter.searchBarFocusChanged(true, C.TITLE_MODE.SKU));
// set empty // set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null); @SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
...@@ -89,7 +92,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -89,7 +92,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
public void loadSkugrps(List<Sskugrp> sskugrps) { public void loadSkugrps(List<Sskugrp> sskugrps) {
Sskugrp sskugrp = new Sskugrp(); Sskugrp sskugrp = new Sskugrp();
sskugrp.setSkuGrpId(0L); sskugrp.setSkuGrpId(0L);
sskugrp.setSkuGrpName("全部分组"); sskugrp.setSkuGrpName("全部商品");
sskugrp.setSelected(true); sskugrp.setSelected(true);
List<Sskugrp> _sskugrps = new ArrayList<>(); List<Sskugrp> _sskugrps = new ArrayList<>();
_sskugrps.addAll(sskugrps); _sskugrps.addAll(sskugrps);
...@@ -126,7 +129,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -126,7 +129,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
* @param count 商品总数 * @param count 商品总数
*/ */
public void loadSsskuCount(int count) { public void loadSsskuCount(int count) {
mViewBinding.tvTotalCount.setText(String.valueOf(count)); mViewBinding.setTotalCount(count);
} }
/** /**
...@@ -137,6 +140,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM ...@@ -137,6 +140,7 @@ public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuM
public void addSku(Sssku sssku) { public void addSku(Sssku sssku) {
mSkuAdapter.setEnableLoadMore(false); mSkuAdapter.setEnableLoadMore(false);
mViewBinding.rlSku.scrollToPosition(0); mViewBinding.rlSku.scrollToPosition(0);
mViewBinding.setTotalCount(mViewBinding.getTotalCount() + 1);
mSkuAdapter.addData(0, sssku); mSkuAdapter.addData(0, sssku);
} }
......
...@@ -37,6 +37,8 @@ public class SkugrpFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSk ...@@ -37,6 +37,8 @@ public class SkugrpFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSk
mViewBinding.rlSkugrp.setAdapter(mSkugrpAdapter); mViewBinding.rlSkugrp.setAdapter(mSkugrpAdapter);
mViewBinding.rlSkugrp.setLayoutManager(new LinearLayoutManager(mContext)); mViewBinding.rlSkugrp.setLayoutManager(new LinearLayoutManager(mContext));
mViewBinding.srlSkugrp.setOnRefreshListener(this::refreshSkugrp);
mViewBinding.llSkugrpAdd.setOnClickListener(view -> { mViewBinding.llSkugrpAdd.setOnClickListener(view -> {
new SkugrpEditorDialog().show(((SsskuActivity) getActivity())); new SkugrpEditorDialog().show(((SsskuActivity) getActivity()));
}); });
...@@ -46,6 +48,14 @@ public class SkugrpFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSk ...@@ -46,6 +48,14 @@ public class SkugrpFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSk
}); });
} }
/**
* 刷新商品分组
*/
private void refreshSkugrp() {
mSkugrpAdapter.setEnableLoadMore(false);
mPresenter.refreshSkugrp();
}
/** /**
* 加载商品分组 * 加载商品分组
* *
...@@ -54,7 +64,10 @@ public class SkugrpFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSk ...@@ -54,7 +64,10 @@ public class SkugrpFragment extends BaseFragment<SsskuPresenter, FragmentSsskuSk
public void loadSkugrps(List<Sskugrp> sskugrps) { public void loadSkugrps(List<Sskugrp> sskugrps) {
mSskugrps = sskugrps; mSskugrps = sskugrps;
if (mSkugrpAdapter == null) return; if (mSkugrpAdapter == null) return;
mSkugrpAdapter.setEnableLoadMore(true);
mViewBinding.srlSkugrp.setRefreshing(false);
mSkugrpAdapter.setNewData(mSskugrps); mSkugrpAdapter.setNewData(mSskugrps);
mSkugrpAdapter.loadMoreEnd(true);
mViewBinding.setVisibility(sskugrps.size() > 0 ? View.VISIBLE : View.INVISIBLE); mViewBinding.setVisibility(sskugrps.size() > 0 ? View.VISIBLE : View.INVISIBLE);
} }
......
...@@ -27,6 +27,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku> ...@@ -27,6 +27,7 @@ public class MsPresenter<Sku extends BaseSku> extends MsContract.Presenter<Sku>
@Override @Override
public void onAttached() { public void onAttached() {
this.initRealm();
} }
@Override @Override
......
...@@ -2,11 +2,14 @@ package com.xingdata.zzdpos.ui.marketing.ms.adapter; ...@@ -2,11 +2,14 @@ package com.xingdata.zzdpos.ui.marketing.ms.adapter;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import com.blankj.utilcode.util.StringUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter; import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemMsBinding; import com.xingdata.zzdpos.databinding.ItemMsBinding;
import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.Ms; import com.xingdata.zzdpos.model.Ms;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -40,6 +43,8 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> { ...@@ -40,6 +43,8 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> {
} }
mViewBinding.tvInfo.setText(getMsDescription(item));
StringBuilder sbDateBegin = new StringBuilder(item.getMsDateBegin().toString()); StringBuilder sbDateBegin = new StringBuilder(item.getMsDateBegin().toString());
StringBuilder sbDateEnd = new StringBuilder(item.getMsDateEnd().toString()); StringBuilder sbDateEnd = new StringBuilder(item.getMsDateEnd().toString());
sbDateBegin.insert(6, "-"); sbDateBegin.insert(6, "-");
...@@ -48,4 +53,49 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> { ...@@ -48,4 +53,49 @@ public class MsAdapter extends BaseAdapter<Ms, ItemMsBinding> {
sbDateEnd.insert(4, "-"); sbDateEnd.insert(4, "-");
mViewBinding.tvDate.setText(sbDateBegin.toString() + "~" + sbDateEnd.toString()); mViewBinding.tvDate.setText(sbDateBegin.toString() + "~" + sbDateEnd.toString());
} }
/**
* 获取营销计划的文字描述
*
* @param ms 营销计划
* @return 文字描述
*/
private String getMsDescription(Ms ms) {
String strGroup = "", strType = "";
switch (ms.getMsTouchTag2()) {
case C.MS_GROUP.ALL:
strGroup = mContext.getResources().getString(R.string.ms_group_all_info);
break;
case C.MS_GROUP.BRAND:
strGroup = mContext.getResources().getString(R.string.ms_group_all_info);
break;
case C.MS_GROUP.CATE:
strGroup = mContext.getResources().getString(R.string.ms_group_cate_info, ms.getCateName());
break;
case C.MS_GROUP.SKU:
String spuName = DBFactory.Marketing.Ms.querySpuNameBySkuId(ms.getSkuId());
strGroup = mContext.getResources().getString(R.string.ms_group_sku_info, !StringUtils.isEmpty(spuName) ? spuName : ms.getSkuId());
break;
}
switch (ms.getMsTools()) {
case C.MS_TYPE.DIS:
strType = mContext.getResources().getString(R.string.ms_type_dis_info, String.valueOf(Double.valueOf(ms.getPriceDiscount()) / 10));
break;
case C.MS_TYPE.PROMOTION:
strType = mContext.getResources().getString(R.string.ms_type_promotion_info);
break;
case C.MS_TYPE.SECOND:
strType = mContext.getResources().getString(R.string.ms_type_second_info, String.valueOf(Double.valueOf(ms.getPriceDiscount()) / 10));
break;
case C.MS_TYPE.MONEY_OFF:
strType = mContext.getResources().getString(R.string.ms_type_money_off_info, ConvertUtil.fenToYuan(ms.getPayAmt()), ConvertUtil.fenToYuan(ms.getGiftOffAmt()));
break;
case C.MS_TYPE.GIFT:
strType = mContext.getResources().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; package com.xingdata.zzdpos.ui.scan;
import android.content.Context; import android.content.Context;
import android.os.Handler; import android.os.Handler;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.databinding.FragmentStoreScanBinding; import com.xingdata.zzdpos.databinding.FragmentStoreScanBinding;
import com.xingdata.zzdpos.ui.store.StorePresenter;
import me.dm7.barcodescanner.core.IViewFinder; import me.dm7.barcodescanner.core.IViewFinder;
import me.dm7.barcodescanner.core.ViewFinderView; import me.dm7.barcodescanner.core.ViewFinderView;
import me.dm7.barcodescanner.zxing.ZXingScannerView; import me.dm7.barcodescanner.zxing.ZXingScannerView;
public class ScanFragment extends BaseFragment<StorePresenter, FragmentStoreScanBinding> { public class ScanFragment<P extends BasePresenter> extends BaseFragment<P, FragmentStoreScanBinding> {
private ZXingScannerView mScannerView; private ZXingScannerView mScannerView;
private ZXingScannerView.ResultHandler mResultHandler; private ZXingScannerView.ResultHandler mResultHandler;
...@@ -23,17 +22,33 @@ public class ScanFragment extends BaseFragment<StorePresenter, FragmentStoreScan ...@@ -23,17 +22,33 @@ public class ScanFragment extends BaseFragment<StorePresenter, FragmentStoreScan
return R.layout.fragment_store_scan; return R.layout.fragment_store_scan;
} }
private OnScanCompletedListener mOnScanCompletedListener;
public OnScanCompletedListener getOnScanCompletedListener() {
return mOnScanCompletedListener;
}
public void setOnScanCompletedListener(OnScanCompletedListener onScanCompletedListener) {
this.mOnScanCompletedListener = onScanCompletedListener;
}
public interface OnScanCompletedListener {
void OnScanCompleted(String barcode);
}
@Override @Override
public void initView() { public void initView() {
mScannerView = new ZXingScannerView(mContext) { mScannerView = new ZXingScannerView(mContext) {
@Override @Override
protected IViewFinder createViewFinderView(Context context) { protected IViewFinder createViewFinderView(Context context) {
return new CustomViewFinderView(context); return new ScanFragment.CustomViewFinderView(context);
} }
}; };
mResultHandler = result -> { mResultHandler = result -> {
mPresenter.scanComplete(result.getText()); if (mOnScanCompletedListener != null) {
mOnScanCompletedListener.OnScanCompleted(result.getText());
}
resetScanner(); resetScanner();
}; };
...@@ -57,7 +72,7 @@ public class ScanFragment extends BaseFragment<StorePresenter, FragmentStoreScan ...@@ -57,7 +72,7 @@ public class ScanFragment extends BaseFragment<StorePresenter, FragmentStoreScan
* 重置扫描器 * 重置扫描器
*/ */
public void resetScanner() { public void resetScanner() {
new Handler().postDelayed(() -> mScannerView.resumeCameraPreview(mResultHandler), 500); new Handler().postDelayed(() -> mScannerView.resumeCameraPreview(mResultHandler), 1000);
} }
private static class CustomViewFinderView extends ViewFinderView { private static class CustomViewFinderView extends ViewFinderView {
...@@ -67,7 +82,7 @@ public class ScanFragment extends BaseFragment<StorePresenter, FragmentStoreScan ...@@ -67,7 +82,7 @@ public class ScanFragment extends BaseFragment<StorePresenter, FragmentStoreScan
int themeColor = getResources().getColor(R.color.blue_mawu); int themeColor = getResources().getColor(R.color.blue_mawu);
this.setBorderColor(themeColor); this.setBorderColor(themeColor);
this.setBorderStrokeWidth(getResources().getDimensionPixelOffset(R.dimen.all_spacing)); this.setBorderStrokeWidth(getResources().getDimensionPixelOffset(R.dimen.all_shape_radius));
this.setLaserColor(themeColor); this.setLaserColor(themeColor);
this.setLaserEnabled(true); this.setLaserEnabled(true);
......
...@@ -16,6 +16,7 @@ import com.xingdata.zzdpos.model.Ticket; ...@@ -16,6 +16,7 @@ import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Vip; import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.main.MainActivity; import com.xingdata.zzdpos.ui.main.MainActivity;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.ui.settle.fragment.CashPayFragment; import com.xingdata.zzdpos.ui.settle.fragment.CashPayFragment;
import com.xingdata.zzdpos.ui.settle.dialog.PasswordDialog; import com.xingdata.zzdpos.ui.settle.dialog.PasswordDialog;
import com.xingdata.zzdpos.ui.settle.fragment.PayResultFragment; import com.xingdata.zzdpos.ui.settle.fragment.PayResultFragment;
...@@ -131,6 +132,12 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle ...@@ -131,6 +132,12 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
case C.PAY_CHANNEL.CARD: case C.PAY_CHANNEL.CARD:
mPasswordDialog.setSaleorder(saleorder).show(this); mPasswordDialog.setSaleorder(saleorder).show(this);
break; break;
case C.PAY_CHANNEL.ALI:
case C.PAY_CHANNEL.WECHAT:
ScanFragment mScanFragment = new ScanFragment();
mScanFragment.setOnScanCompletedListener(barcode -> mPresenter.payInAli(barcode));
this.start(mScanFragment);
break;
} }
} }
......
package com.xingdata.zzdpos.ui.settle; package com.xingdata.zzdpos.ui.settle;
import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.StringUtils; import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.TimeUtils;
import com.xingdata.api.print.ZX_PrintPOS; import com.xingdata.api.print.ZX_PrintPOS;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.api.ApiFactory; import com.xingdata.zzdpos.api.ApiFactory;
import com.xingdata.zzdpos.api.JniFactory;
import com.xingdata.zzdpos.api.Pay;
import com.xingdata.zzdpos.db.DBFactory; import com.xingdata.zzdpos.db.DBFactory;
import com.xingdata.zzdpos.model.HandoverInfo; import com.xingdata.zzdpos.model.HandoverInfo;
import com.xingdata.zzdpos.model.Ms; import com.xingdata.zzdpos.model.Ms;
...@@ -14,9 +18,12 @@ import com.xingdata.zzdpos.model.Ticket; ...@@ -14,9 +18,12 @@ import com.xingdata.zzdpos.model.Ticket;
import com.xingdata.zzdpos.model.Vip; import com.xingdata.zzdpos.model.Vip;
import com.xingdata.zzdpos.ui.main.MainActivity; import com.xingdata.zzdpos.ui.main.MainActivity;
import com.xingdata.zzdpos.ui.main.MainPresenter; import com.xingdata.zzdpos.ui.main.MainPresenter;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale;
import io.reactivex.Observable; import io.reactivex.Observable;
...@@ -222,6 +229,26 @@ public class SettlePresenter extends SettleContract.Presenter { ...@@ -222,6 +229,26 @@ public class SettlePresenter extends SettleContract.Presenter {
@Override @Override
public void payInAli(String payCode) { public void payInAli(String payCode) {
Pay.Request q = new Pay.Request();
q.setOrderType("1");
q.setPayChannelType("3");
q.setDeviceType("2");
q.setMch_id("11");
q.setTer_id("11");
q.setOrderDateTime(TimeUtils.getNowString(new SimpleDateFormat("yyyymmddHHMMSS", Locale.getDefault())));
q.setCurrencyType("156");
q.setOrderAmt(ConvertUtil.longToString(mSaleorder.getOrderPayAmt()));
q.setOrderName("测试");
q.setChannelAuthCode(payCode);
q.setKey("Key");
q.setNotifyUrl("setNotifyUrl");
subscribePay(commitOrder().flatMap(s -> {
q.setOrderNo(s);
return JniFactory.Settle.pay(JSON.toJSONString(q));
}).flatMap(response -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(q.getOrderNo(), C.PAY_CHANNEL.CASH))));
} }
@Override @Override
...@@ -375,6 +402,7 @@ public class SettlePresenter extends SettleContract.Presenter { ...@@ -375,6 +402,7 @@ public class SettlePresenter extends SettleContract.Presenter {
* 统计订单信息 * 统计订单信息
*/ */
private void reprice() { private void reprice() {
mSaleorder.settle(); mSaleorder.settle();
mView.loadSaleorder(mSaleorder); mView.loadSaleorder(mSaleorder);
} }
......
...@@ -48,11 +48,12 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip ...@@ -48,11 +48,12 @@ public class VipFragment extends BaseFragment<SettlePresenter, FragmentSettleVip
* @param vips 会员列表 * @param vips 会员列表
*/ */
public void loadVips(List<Vip> vips) { public void loadVips(List<Vip> vips) {
mViewBinding.setEmpty(vips.size() == 0);
mVipAdapter.setNewData(vips);
if (vips.size() == 1) { if (vips.size() == 1) {
mPresenter.selectVip(vips.get(0)); mPresenter.selectVip(vips.get(0));
this.pop(); this.pop();
} else {
mViewBinding.setEmpty(vips.size() == 0);
mVipAdapter.setNewData(vips);
} }
} }
......
...@@ -23,10 +23,10 @@ import com.xingdata.zzdpos.model.Saledetail; ...@@ -23,10 +23,10 @@ import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Saleorder; import com.xingdata.zzdpos.model.Saleorder;
import com.xingdata.zzdpos.model.Sskugrp; import com.xingdata.zzdpos.model.Sskugrp;
import com.xingdata.zzdpos.ui.dialog.LoadingDialog; import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.scan.ScanFragment;
import com.xingdata.zzdpos.ui.settle.SettleActivity; import com.xingdata.zzdpos.ui.settle.SettleActivity;
import com.xingdata.zzdpos.ui.store.dialog.CartDialog; import com.xingdata.zzdpos.ui.store.dialog.CartDialog;
import com.xingdata.zzdpos.ui.store.dialog.MsDialog; 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.SearchFragment;
import com.xingdata.zzdpos.ui.store.fragment.StoreFragment; import com.xingdata.zzdpos.ui.store.fragment.StoreFragment;
...@@ -53,13 +53,10 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -53,13 +53,10 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
@Override @Override
public void initView() { public void initView() {
loadRootFragment(R.id.f_store, mStoreFragment); loadRootFragment(R.id.f_store, mStoreFragment);
mViewBinding.ivCart.setOnClickListener(view -> mPresenter.clickCartLogo()); mViewBinding.ivCart.setOnClickListener(view -> mPresenter.clickCartLogo());
mViewBinding.tvSettle.setOnClickListener(view -> mPresenter.clickSettle()); mViewBinding.tvSettle.setOnClickListener(view -> mPresenter.clickSettle());
mViewBinding.btnBack.setOnClickListener(view -> onBackPressedSupport());
mViewBinding.btnBack.setOnClickListener(view -> {
onBackPressedSupport();
});
mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> { mViewBinding.etSearch.setOnEditorActionListener((textView, i, keyEvent) -> {
if (i == EditorInfo.IME_ACTION_SEARCH && !StringUtils.isEmpty(textView.getText())) { if (i == EditorInfo.IME_ACTION_SEARCH && !StringUtils.isEmpty(textView.getText())) {
KeyboardUtils.hideSoftInput(textView); KeyboardUtils.hideSoftInput(textView);
...@@ -67,28 +64,21 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -67,28 +64,21 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
} }
return false; return false;
}); });
mViewBinding.etSearch.setOnFocusChangeListener((view, b) -> {
mPresenter.searchBarFocusChanged(b); mViewBinding.btnScan.setOnClickListener(view -> PermissionUtils.permission(PermissionConstants.CAMERA)
}); .callback(new PermissionUtils.FullCallback() {
mViewBinding.btnScan.setOnClickListener(view -> { @Override
PermissionUtils.permission(PermissionConstants.CAMERA) public void onGranted(List<String> permissionsGranted) {
.rationale(new PermissionUtils.OnRationaleListener() { mPresenter.clickScan();
@Override }
public void rationale(final ShouldRequest shouldRequest) {
} @Override
}) public void onDenied(List<String> permissionsDeniedForever, List<String> permissionsDenied) {
.callback(new PermissionUtils.FullCallback() { }
@Override })
public void onGranted(List<String> permissionsGranted) { .request());
showScanFragment();
} mScanFragment.setOnScanCompletedListener(barcode -> mPresenter.scanComplete(barcode));
@Override
public void onDenied(List<String> permissionsDeniedForever, List<String> permissionsDenied) {
}
})
.request();
});
} }
@Override @Override
...@@ -123,49 +113,9 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -123,49 +113,9 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
mViewBinding.setOrderPayAmt(saleorder.getOrderPayAmt()); mViewBinding.setOrderPayAmt(saleorder.getOrderPayAmt());
mViewBinding.setMsDisAmt(saleorder.getMsDisAmt()); mViewBinding.setMsDisAmt(saleorder.getMsDisAmt());
if (mCartDialog.isShowing) mCartDialog.loadSaleorder(saleorder); if (mCartDialog.isShowing) mCartDialog.loadSaleorder(saleorder);
this.startShakeByPropertyAnim(mViewBinding.ivCart, 0.75f, 1f, 0.30f, 500L); this.startShakeByPropertyAnim(mViewBinding.ivCart, 0.75f, 1f, 300L);
} }
private void startShakeByPropertyAnim(View view, float scaleSmall, float scaleLarge, float shakeDegrees, long duration) {
if (view == null) {
return;
}
//先变小后变大
PropertyValuesHolder scaleXValuesHolder = PropertyValuesHolder.ofKeyframe(View.SCALE_X,
Keyframe.ofFloat(0f, 1.0f),
Keyframe.ofFloat(0.25f, scaleSmall),
Keyframe.ofFloat(0.5f, scaleLarge),
Keyframe.ofFloat(0.75f, scaleLarge),
Keyframe.ofFloat(1.0f, 1.0f)
);
PropertyValuesHolder scaleYValuesHolder = PropertyValuesHolder.ofKeyframe(View.SCALE_Y,
Keyframe.ofFloat(0f, 1.0f),
Keyframe.ofFloat(0.25f, scaleSmall),
Keyframe.ofFloat(0.5f, scaleLarge),
Keyframe.ofFloat(0.75f, scaleLarge),
Keyframe.ofFloat(1.0f, 1.0f)
);
//先往左再往右
PropertyValuesHolder rotateValuesHolder = PropertyValuesHolder.ofKeyframe(View.ROTATION,
Keyframe.ofFloat(0f, 0f),
Keyframe.ofFloat(0.1f, -shakeDegrees),
Keyframe.ofFloat(0.2f, shakeDegrees),
Keyframe.ofFloat(0.3f, -shakeDegrees),
Keyframe.ofFloat(0.4f, shakeDegrees),
Keyframe.ofFloat(0.5f, -shakeDegrees),
Keyframe.ofFloat(0.6f, shakeDegrees),
Keyframe.ofFloat(0.7f, -shakeDegrees),
Keyframe.ofFloat(0.8f, shakeDegrees),
Keyframe.ofFloat(0.9f, -shakeDegrees),
Keyframe.ofFloat(1.0f, 0f)
);
ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(view, scaleXValuesHolder, scaleYValuesHolder, rotateValuesHolder);
objectAnimator.setDuration(duration);
objectAnimator.start();
}
@Override @Override
public void loadSaledetails(List<Saledetail> saledetails, boolean isRefresh) { public void loadSaledetails(List<Saledetail> saledetails, boolean isRefresh) {
...@@ -206,18 +156,23 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -206,18 +156,23 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
@Override @Override
public void showSearchFragment() { public void showSearchFragment() {
if (!mSearchFragment.isAdded()) this.start(mSearchFragment); if (!mSearchFragment.isAdded()) {
mViewBinding.setTitleMode(C.TITLE_MODE.SKU);
mViewBinding.etSearch.setText("");
mViewBinding.etSearch.requestFocus();
this.start(mSearchFragment);
}
} }
@Override @Override
public void showScanFragment() { public void showScanFragment() {
this.start(mScanFragment); if (!mScanFragment.isAdded()) this.start(mScanFragment);
} }
@Override @Override
public void resetSearchBar() { public void resetSearchBar() {
mViewBinding.etSearch.setText("");
mViewBinding.clTitle.requestFocus(); mViewBinding.clTitle.requestFocus();
mViewBinding.setTitleMode(C.TITLE_MODE.TEXT);
} }
@Override @Override
...@@ -225,4 +180,36 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin ...@@ -225,4 +180,36 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
mScanFragment.resetScanner(); mScanFragment.resetScanner();
} }
/**
* 执行抖动动画
*
* @param view 要执行的view
* @param scaleSmall 缩小比例
* @param scaleLarge 放大比例
* @param duration 时间
*/
private void startShakeByPropertyAnim(View view, float scaleSmall, float scaleLarge, long duration) {
if (view == null) {
return;
}
//先变小后变大
PropertyValuesHolder scaleXValuesHolder = PropertyValuesHolder.ofKeyframe(View.SCALE_X,
Keyframe.ofFloat(0f, 1.0f),
Keyframe.ofFloat(0.25f, scaleSmall),
Keyframe.ofFloat(0.5f, scaleLarge),
Keyframe.ofFloat(0.75f, scaleLarge),
Keyframe.ofFloat(1.0f, 1.0f)
);
PropertyValuesHolder scaleYValuesHolder = PropertyValuesHolder.ofKeyframe(View.SCALE_Y,
Keyframe.ofFloat(0f, 1.0f),
Keyframe.ofFloat(0.25f, scaleSmall),
Keyframe.ofFloat(0.5f, scaleLarge),
Keyframe.ofFloat(0.75f, scaleLarge),
Keyframe.ofFloat(1.0f, 1.0f)
);
ObjectAnimator objectAnimator = ObjectAnimator.ofPropertyValuesHolder(view, scaleXValuesHolder, scaleYValuesHolder);
objectAnimator.setDuration(duration);
objectAnimator.start();
}
} }
...@@ -152,6 +152,11 @@ interface StoreContract { ...@@ -152,6 +152,11 @@ interface StoreContract {
*/ */
public abstract void searchSku(String keyword); public abstract void searchSku(String keyword);
/**
* 商店页面 - 点击扫描按钮
*/
public abstract void clickScan();
/** /**
* 扫描页面 - 扫描完成 * 扫描页面 - 扫描完成
* *
......
...@@ -110,6 +110,11 @@ public class StorePresenter extends StoreContract.Presenter { ...@@ -110,6 +110,11 @@ public class StorePresenter extends StoreContract.Presenter {
this.getSearchSku(); this.getSearchSku();
} }
@Override
public void clickScan() {
mView.showScanFragment();
}
@Override @Override
public void scanComplete(String keyword) { public void scanComplete(String keyword) {
this.getProductByBarcode(keyword); this.getProductByBarcode(keyword);
...@@ -211,7 +216,7 @@ public class StorePresenter extends StoreContract.Presenter { ...@@ -211,7 +216,7 @@ public class StorePresenter extends StoreContract.Presenter {
sskugrp = new Sskugrp(); sskugrp = new Sskugrp();
sskugrp.setSkuGrpId(0L); sskugrp.setSkuGrpId(0L);
sskugrp.setSkuGrpName("全部分组"); sskugrp.setSkuGrpName("全部商品");
sskugrp.setSelected(true); sskugrp.setSelected(true);
sskugrps.add(0, sskugrp); sskugrps.add(0, sskugrp);
......
package com.xingdata.zzdpos.ui.store.fragment; package com.xingdata.zzdpos.ui.store.fragment;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.support.constraint.ConstraintLayout;
import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.LinearLayoutManager;
import android.view.View; import android.view.View;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import com.blankj.utilcode.util.ScreenUtils;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment; import com.xingdata.zzdpos.base.BaseFragment;
...@@ -36,7 +44,7 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe ...@@ -36,7 +44,7 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
// set sku listener // set sku listener
mSkuAdapter.setOnLoadMoreListener(this::loadMoreSku, mViewBinding.rlSku); mSkuAdapter.setOnLoadMoreListener(this::loadMoreSku, mViewBinding.rlSku);
mSkuAdapter.setOnCountChangeListener((view, sku, value) -> { mSkuAdapter.setOnCountChangeListener((view, sku, value) -> {
if (value > 0) mPresenter.clickAddSku(sku, value); if (value > 0) this.clickAdd(view, sku, value);
else mPresenter.clickRemoveSku(sku, value); else mPresenter.clickRemoveSku(sku, value);
}); });
...@@ -98,4 +106,98 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe ...@@ -98,4 +106,98 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
public void setSaledetails(List<Saledetail> saledetails) { public void setSaledetails(List<Saledetail> saledetails) {
this.mSaledetails = saledetails; this.mSaledetails = saledetails;
} }
/**
* 点击添加按钮
*
* @param view 按钮
* @param sku 商品信息
* @param value 数量
*/
private void clickAdd(View view, BaseSku sku, int value) {
// 路径测量
PathMeasure mPathMeasure;
// 贝塞尔曲线中间过程点坐标
float[] mCurrentPosition = new float[2];
final ImageView icon = new ImageView(mContext);
icon.setImageDrawable(((ImageView) view).getDrawable());
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(view.getWidth(), view.getHeight());
mViewBinding.clStore.addView(icon, params);
int[] parentLocation = new int[2];
mViewBinding.clStore.getLocationInWindow(parentLocation);
int startLoc[] = new int[2];
view.getLocationInWindow(startLoc);
// 得到购物车图片的坐标(用于计算动画结束后的坐标)
int endLoc[] = new int[]{0, ScreenUtils.getScreenHeight()};
float startX = startLoc[0] - parentLocation[0];
float startY = startLoc[1] - parentLocation[1];
// 商品掉落后的终点坐标:购物车起始点-父布局起始点+购物车图片的1/5
float toX = endLoc[0] - parentLocation[0];
float toY = endLoc[1] - parentLocation[1];
// 开始绘制贝塞尔曲线
Path path = new Path();
// 移动到起始点(贝塞尔曲线的起点)
path.moveTo(startX, startY);
// 使用二阶贝塞尔曲线:注意第一个起始坐标越大,贝塞尔曲线的横向距离就会越大,一般按照下面的式子取即可
path.quadTo((startX + toX) / 2, startY, toX, toY);
// mPathMeasure用来计算贝塞尔曲线的曲线长度和贝塞尔曲线中间插值的坐标,如果是true,path会形成一个闭环
mPathMeasure = new PathMeasure(path, false);
// 属性动画实现(从0到贝塞尔曲线的长度之间进行插值计算,获取中间过程的距离值)
ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, mPathMeasure.getLength());
valueAnimator.setDuration(300);
// 匀速线性插值器
valueAnimator.setInterpolator(new LinearInterpolator());
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
// 当插值计算进行时,获取中间的每个值,
// 这里这个值是中间过程中的曲线长度(下面根据这个值来得出中间点的坐标值)
float value = (Float) animation.getAnimatedValue();
// 获取当前点坐标封装到mCurrentPosition
// boolean getPosTan(float distance, float[] pos, float[] tan) :
// 传入一个距离distance(0<=distance<=getLength()),然后会计算当前距离的坐标点和切线,pos会自动填充上坐标,这个方法很重要。
// mCurrentPosition此时就是中间距离点的坐标值
mPathMeasure.getPosTan(value, mCurrentPosition, null);
// 移动的商品图片(动画图片)的坐标设置为该中间点的坐标
icon.setTranslationX(mCurrentPosition[0]);
icon.setTranslationY(mCurrentPosition[1]);
}
});
// 开始执行动画
valueAnimator.start();
// 动画结束后的处理
valueAnimator.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
// 执行添加方法
mPresenter.clickAddSku(sku, value);
// 把执行动画的商品图片从父布局中移除
mViewBinding.clStore.removeView(icon);
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
}
} }
...@@ -70,6 +70,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -70,6 +70,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
// set other listener // set other listener
mViewBinding.llMs.setOnClickListener(view -> mPresenter.clickMs()); mViewBinding.llMs.setOnClickListener(view -> mPresenter.clickMs());
mViewBinding.tvSearch.setOnClickListener(view -> mPresenter.searchBarFocusChanged(true));
// set empty // set empty
@SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null); @SuppressLint("InflateParams") View view = getLayoutInflater().inflate(R.layout.view_empty, null);
...@@ -263,7 +264,6 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -263,7 +264,6 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
float toX = endLoc[0] - parentLocation[0]; float toX = endLoc[0] - parentLocation[0];
float toY = endLoc[1] - parentLocation[1]; float toY = endLoc[1] - parentLocation[1];
// 开始绘制贝塞尔曲线 // 开始绘制贝塞尔曲线
Path path = new Path(); Path path = new Path();
// 移动到起始点(贝塞尔曲线的起点) // 移动到起始点(贝塞尔曲线的起点)
...@@ -275,7 +275,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin ...@@ -275,7 +275,7 @@ public class StoreFragment extends BaseFragment<StorePresenter, FragmentStoreBin
// 属性动画实现(从0到贝塞尔曲线的长度之间进行插值计算,获取中间过程的距离值) // 属性动画实现(从0到贝塞尔曲线的长度之间进行插值计算,获取中间过程的距离值)
ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, mPathMeasure.getLength()); ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, mPathMeasure.getLength());
valueAnimator.setDuration(500); valueAnimator.setDuration(300);
// 匀速线性插值器 // 匀速线性插值器
valueAnimator.setInterpolator(new LinearInterpolator()); valueAnimator.setInterpolator(new LinearInterpolator());
......
...@@ -6,17 +6,6 @@ import java.math.BigDecimal; ...@@ -6,17 +6,6 @@ import java.math.BigDecimal;
public class ConvertUtil { public class ConvertUtil {
// /**
// * 分转元
// *
// * @param fen 分
// * @return 元
// */
// public static String fenToYuan(Long fen) {
// BigDecimal decimal = new BigDecimal(fen);
// return decimal.divide(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_DOWN).toString();
// }
/** /**
* 分转元 * 分转元
* *
...@@ -25,10 +14,22 @@ public class ConvertUtil { ...@@ -25,10 +14,22 @@ public class ConvertUtil {
*/ */
public static String fenToYuan(Long fen) { public static String fenToYuan(Long fen) {
if (fen == null || fen == 0) return "0.00"; if (fen == null || fen == 0) return "0.00";
java.text.DecimalFormat df = new java.text.DecimalFormat("#.00"); BigDecimal decimal = new BigDecimal(fen);
return String.valueOf(df.format((double) fen / 100)); return decimal.divide(new BigDecimal(100), 2, BigDecimal.ROUND_DOWN).toString();
} }
// /**
// * 分转元
// *
// * @param fen 分
// * @return 元
// */
// public static String fenToYuan(Long fen) {
// if (fen == null || fen == 0) return "0.00";
// java.text.DecimalFormat df = new java.text.DecimalFormat("#.00");
// return String.valueOf(df.format((double) fen / 100));
// }
/** /**
* 分转元 * 分转元
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/all_shape_radius" /> <corners android:radius="@dimen/all_shape_radius" />
<solid android:color="@color/gray_kongming" /> <solid android:color="@color/gray_zhouyu" />
</shape> </shape>
\ No newline at end of file
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin" android:layout_marginEnd="@dimen/all_margin"
android:visibility="@{titleMode==1||titleMode==6?8:0}" android:visibility="@{titleMode==1||titleMode==6||titleMode==8?8:0}"
app:layout_constraintBottom_toTopOf="parent" app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/btn_back" app:layout_constraintLeft_toRightOf="@id/btn_back"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
...@@ -66,10 +66,24 @@ ...@@ -66,10 +66,24 @@
android:text="@string/sssku_title" android:text="@string/sssku_title"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" android:textSize="@dimen/all_sub_title_size"
android:visibility="@{titleMode==1||titleMode==6?0:8}" android:visibility="@{titleMode==1||titleMode==6||titleMode==8?0:8}"
app:layout_constraintLeft_toRightOf="parent" app:layout_constraintLeft_toRightOf="parent"
app:layout_constraintRight_toLeftOf="parent" /> app:layout_constraintRight_toLeftOf="parent" />
<TextView
android:id="@+id/tv_editor_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing"
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"
android:visibility="@{titleMode==8?0:8}"
app:layout_constraintBottom_toTopOf="@id/tv_title"
app:layout_constraintLeft_toRightOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
<ImageButton <ImageButton
android:id="@+id/btn_menu" android:id="@+id/btn_menu"
...@@ -83,7 +97,6 @@ ...@@ -83,7 +97,6 @@
android:visibility="@{titleMode==6?0:8}" android:visibility="@{titleMode==6?0:8}"
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
......
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
name="msDisAmt" name="msDisAmt"
type="long" /> type="long" />
<variable
name="titleMode"
type="int" />
</data> </data>
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
...@@ -73,7 +75,8 @@ ...@@ -73,7 +75,8 @@
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search"
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai" android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_text_size"
android:visibility="@{titleMode>1?View.VISIBLE:View.INVISIBLE}" />
<ImageButton <ImageButton
android:id="@+id/btn_scan" android:id="@+id/btn_scan"
...@@ -83,9 +86,20 @@ ...@@ -83,9 +86,20 @@
android:contentDescription="@string/store_scan" android:contentDescription="@string/store_scan"
android:foreground="?android:attr/actionBarItemBackground" android:foreground="?android:attr/actionBarItemBackground"
android:src="@mipmap/but_sweep_yard" /> android:src="@mipmap/but_sweep_yard" />
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/store_title"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
android:visibility="@{titleMode>1?View.GONE:View.VISIBLE}"
app:layout_constraintLeft_toRightOf="parent"
app:layout_constraintRight_toLeftOf="parent" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
......
...@@ -3,28 +3,36 @@ ...@@ -3,28 +3,36 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white_caocao" android:background="@color/white_caocao"
android:orientation="vertical"> android:gravity="center"
android:orientation="horizontal">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin" android:layout_marginBottom="@dimen/all_margin_big"
android:gravity="center" android:layout_marginTop="@dimen/all_margin_big"
android:text="提示" android:text="确定删除"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" android:textSize="@dimen/all_text_size" />
android:textStyle="bold" />
<TextView
android:id="@+id/tv_skugrp_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin_big"
android:layout_marginTop="@dimen/all_margin_big"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin" android:layout_marginBottom="@dimen/all_margin_big"
android:layout_marginStart="@dimen/all_margin" android:layout_marginTop="@dimen/all_margin_big"
android:layout_marginTop="@dimen/all_margin" android:text="吗?"
android:text="确定删除吗?"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_text_size" />
......
...@@ -233,7 +233,6 @@ ...@@ -233,7 +233,6 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" /> android:background="@color/gray_kongming" />
...@@ -280,7 +279,6 @@ ...@@ -280,7 +279,6 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" /> android:background="@color/gray_kongming" />
...@@ -323,7 +321,6 @@ ...@@ -323,7 +321,6 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" /> android:background="@color/gray_kongming" />
...@@ -340,7 +337,6 @@ ...@@ -340,7 +337,6 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" /> android:background="@color/gray_kongming" />
...@@ -436,7 +432,6 @@ ...@@ -436,7 +432,6 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" /> android:background="@color/gray_kongming" />
...@@ -478,7 +473,6 @@ ...@@ -478,7 +473,6 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:background="@color/gray_kongming" /> android:background="@color/gray_kongming" />
......
...@@ -74,12 +74,13 @@ ...@@ -74,12 +74,13 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:background="@color/transparent" android:background="@color/transparent"
android:enabled="false"
android:gravity="center_vertical" android:gravity="center_vertical"
android:inputType="number" android:inputType="number"
android:labelFor="@+id/et_barcode" android:labelFor="@+id/et_barcode"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_body_size"
app:layout_constraintHorizontal_weight="3" app:layout_constraintHorizontal_weight="3"
app:layout_constraintLeft_toRightOf="@id/tv_barcode_hint" app:layout_constraintLeft_toRightOf="@id/tv_barcode_hint"
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent" />
...@@ -117,7 +118,7 @@ ...@@ -117,7 +118,7 @@
android:labelFor="@+id/et_name" android:labelFor="@+id/et_name"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_body_size"
app:layout_constraintLeft_toLeftOf="@id/et_barcode" app:layout_constraintLeft_toLeftOf="@id/et_barcode"
app:layout_constraintRight_toRightOf="@id/et_barcode" app:layout_constraintRight_toRightOf="@id/et_barcode"
app:layout_constraintTop_toBottomOf="@id/et_barcode" /> app:layout_constraintTop_toBottomOf="@id/et_barcode" />
...@@ -187,7 +188,7 @@ ...@@ -187,7 +188,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_body_size"
app:layout_constraintHorizontal_weight="1.5" app:layout_constraintHorizontal_weight="1.5"
app:layout_constraintLeft_toRightOf="@id/tv_type_hint" app:layout_constraintLeft_toRightOf="@id/tv_type_hint"
app:layout_constraintRight_toLeftOf="@id/ns_type_2" /> app:layout_constraintRight_toLeftOf="@id/ns_type_2" />
...@@ -199,7 +200,7 @@ ...@@ -199,7 +200,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_body_size"
app:layout_constraintHorizontal_weight="1.5" app:layout_constraintHorizontal_weight="1.5"
app:layout_constraintLeft_toRightOf="@id/ns_type_1" app:layout_constraintLeft_toRightOf="@id/ns_type_1"
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent" />
...@@ -211,7 +212,7 @@ ...@@ -211,7 +212,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" android:textSize="@dimen/all_body_size"
app:layout_constraintLeft_toLeftOf="@id/ns_type_1" app:layout_constraintLeft_toLeftOf="@id/ns_type_1"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/ns_type_1" /> app:layout_constraintTop_toBottomOf="@id/ns_type_1" />
...@@ -247,7 +248,7 @@ ...@@ -247,7 +248,7 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
<TextView <TextView
android:id="@+id/tv_unit" android:id="@+id/tv_unit"
...@@ -289,7 +290,7 @@ ...@@ -289,7 +290,7 @@
android:layout_weight="3" android:layout_weight="3"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -339,7 +340,7 @@ ...@@ -339,7 +340,7 @@
android:labelFor="@+id/et_price1" android:labelFor="@+id/et_price1"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -375,7 +376,7 @@ ...@@ -375,7 +376,7 @@
android:labelFor="@+id/et_price2" android:labelFor="@+id/et_price2"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -491,7 +492,7 @@ ...@@ -491,7 +492,7 @@
android:labelFor="@+id/et_point" android:labelFor="@+id/et_point"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -594,7 +595,7 @@ ...@@ -594,7 +595,7 @@
android:id="@+id/et_search" android:id="@+id/et_search"
style="@style/searchBarEditor" style="@style/searchBarEditor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="30dp"
android:layout_marginEnd="@dimen/all_margin" android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin" android:layout_marginStart="@dimen/all_margin"
android:layout_marginTop="@dimen/all_spacing" android:layout_marginTop="@dimen/all_spacing"
...@@ -748,7 +749,7 @@ ...@@ -748,7 +749,7 @@
android:layout_weight="3" android:layout_weight="3"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -838,7 +839,7 @@ ...@@ -838,7 +839,7 @@
android:labelFor="@+id/et_cost" android:labelFor="@+id/et_cost"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -874,7 +875,7 @@ ...@@ -874,7 +875,7 @@
android:labelFor="@+id/et_stock_low_limit" android:labelFor="@+id/et_stock_low_limit"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -910,7 +911,7 @@ ...@@ -910,7 +911,7 @@
android:labelFor="@+id/et_stock_upper_limit" android:labelFor="@+id/et_stock_upper_limit"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -946,7 +947,7 @@ ...@@ -946,7 +947,7 @@
android:labelFor="@+id/et_min_oder" android:labelFor="@+id/et_min_oder"
android:saveEnabled="false" android:saveEnabled="false"
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" /> android:textSize="@dimen/all_body_size" />
</LinearLayout> </LinearLayout>
<View <View
......
<?xml version="1.0" encoding="utf-8"?> <?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">
<data>
<variable
name="totalCount"
type="Integer" />
</data>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:gravity="center"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:id="@+id/tv_search"
style="@style/searchBarEditor"
android:layout_width="match_parent"
android:layout_height="30dp"
android:gravity="center_vertical"
android:text="@string/store_search_hint"
android:textColor="@color/gray_huanggai"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="top"
android:background="@color/gray_kongming" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -35,6 +68,7 @@ ...@@ -35,6 +68,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing" android:layout_marginEnd="@dimen/all_spacing"
android:layout_marginStart="@dimen/all_spacing" android:layout_marginStart="@dimen/all_spacing"
android:text='@{totalCount+""}'
android:textColor="@color/black_baozheng" android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_title_size" /> android:textSize="@dimen/all_title_size" />
...@@ -69,7 +103,6 @@ ...@@ -69,7 +103,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing" android:layout_marginStart="@dimen/all_spacing"
android:text="6"
android:textColor="@color/red_guanyu" android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_title_size" /> android:textSize="@dimen/all_title_size" />
</LinearLayout> </LinearLayout>
......
...@@ -52,10 +52,17 @@ ...@@ -52,10 +52,17 @@
android:background="@color/gray_huanggai" android:background="@color/gray_huanggai"
android:visibility="@{visibility}" /> android:visibility="@{visibility}" />
<android.support.v7.widget.RecyclerView <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/rl_skugrp" android:id="@+id/srl_skugrp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_skugrp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout> </LinearLayout>
</layout> </layout>
\ No newline at end of file
...@@ -18,6 +18,26 @@ ...@@ -18,6 +18,26 @@
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:gravity="center"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin">
<TextView
android:id="@+id/tv_search"
style="@style/searchBarEditor"
android:layout_width="match_parent"
android:layout_height="30dp"
android:gravity="center_vertical"
android:text="@string/store_search_hint"
android:textColor="@color/gray_huanggai"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<FrameLayout <FrameLayout
android:id="@+id/ll_ms" android:id="@+id/ll_ms"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -26,6 +46,12 @@ ...@@ -26,6 +46,12 @@
android:orientation="vertical" android:orientation="vertical"
android:visibility="@{msCount>0 ?View.VISIBLE:View.GONE}"> android:visibility="@{msCount>0 ?View.VISIBLE:View.GONE}">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="top"
android:background="@color/gray_kongming" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -68,13 +94,13 @@ ...@@ -68,13 +94,13 @@
</LinearLayout> </LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai" />
</FrameLayout> </FrameLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_huanggai" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<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"> xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout <android.support.constraint.ConstraintLayout
android:id="@+id/cl_store"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/gray_zhouyu" android:background="@color/gray_zhouyu">
android:orientation="vertical">
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/rl_sku" android:id="@+id/rl_sku"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</LinearLayout> </android.support.constraint.ConstraintLayout>
</layout> </layout>
\ No newline at end of file
...@@ -2,57 +2,66 @@ ...@@ -2,57 +2,66 @@
<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"> xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.constraint.ConstraintLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="130dp" android:layout_height="wrap_content"
android:background="@drawable/shape_orange_b1" android:background="@mipmap/bg_marketing"
android:foreground="?android:attr/selectableItemBackground"> android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_type" <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_marginStart="@dimen/all_spacing" android:layout_weight="1"
android:layout_marginTop="@dimen/all_spacing" android:orientation="horizontal">
android:contentDescription="@null"
android:src="@mipmap/icon_buy01" <TextView
app:layout_constraintLeft_toLeftOf="parent" android:id="@+id/tv_name"
app:layout_constraintTop_toTopOf="parent" /> android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
<TextView android:layout_marginTop="@dimen/all_margin_big"
android:id="@+id/tv_name" android:layout_weight="1"
android:layout_width="wrap_content" android:textColor="@color/black_baozheng"
android:layout_height="wrap_content" android:textSize="@dimen/all_sub_title_size" />
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size" <ImageView
android:textStyle="bold" android:id="@+id/iv_type"
app:layout_constraintBottom_toTopOf="@id/tv_date" android:layout_width="wrap_content"
app:layout_constraintLeft_toLeftOf="parent" android:layout_height="wrap_content"
app:layout_constraintRight_toRightOf="parent" android:layout_marginEnd="@dimen/all_margin"
app:layout_constraintTop_toTopOf="parent" /> android:layout_marginTop="@dimen/all_margin_big"
android:contentDescription="@null"
<TextView android:src="@mipmap/icon_buy01" />
android:id="@+id/tv_date"
android:layout_width="0dp" </LinearLayout>
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin" <LinearLayout
android:layout_marginEnd="@dimen/all_margin" android:layout_width="match_parent"
android:layout_marginStart="@dimen/all_margin" android:layout_height="0dp"
android:background="@drawable/shape_orange_r2" android:layout_weight="1"
android:drawableStart="@mipmap/icon_time" android:orientation="vertical">
android:gravity="center"
android:paddingBottom="@dimen/view_line_L2" <TextView
android:paddingEnd="@dimen/all_spacing" android:id="@+id/tv_info"
android:paddingStart="@dimen/all_spacing" android:layout_width="match_parent"
android:paddingTop="@dimen/view_line_L2" android:layout_height="wrap_content"
android:textColor="@color/white_caocao" android:layout_marginStart="@dimen/all_margin"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginTop="@dimen/all_margin"
app:layout_constraintLeft_toLeftOf="parent" android:textColor="@color/black_baozheng"
app:layout_constraintRight_toRightOf="parent" /> android:textSize="@dimen/all_text_size" />
<TextView
</android.support.constraint.ConstraintLayout> android:id="@+id/tv_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:layout_marginTop="@dimen/all_spacing"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_caption_size" />
</LinearLayout>
</LinearLayout>
</layout> </layout>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
android:foreground="?android:attr/selectableItemBackground"> android:foreground="?android:attr/selectableItemBackground">
<View <View
android:layout_width="@dimen/all_spacing" android:layout_width="@dimen/all_shape_radius"
android:layout_height="@dimen/all_sub_title_size" android:layout_height="@dimen/all_sub_title_size"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:background="@color/red_guanyu" android:background="@color/red_guanyu"
......
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
<string name="settle_pay_change_text">¥%s</string> <string name="settle_pay_change_text">¥%s</string>
<!--商品页面 <WHERE>_<DESCRIPTION>--> <!--商品页面 <WHERE>_<DESCRIPTION>-->
<string name="store_title">商品页面</string> <string name="store_title">开单</string>
<string name="store_price_unit"></string> <string name="store_price_unit"></string>
<string name="store_group">商品分组 </string> <string name="store_group">商品分组 </string>
<string name="store_sssku">标准商品 </string> <string name="store_sssku">标准商品 </string>
...@@ -325,8 +325,8 @@ ...@@ -325,8 +325,8 @@
<!--营销计划--> <!--营销计划-->
<string name="ms_title">营销计划</string> <string name="ms_title">营销计划</string>
<string name="ms_add">添加营销计划</string> <string name="ms_add">添加营销计划</string>
<string name="ms_user_title">旗舰</string> <string name="ms_user_title">高级</string>
<string name="ms_user_hint">营销计划功能限时免费使用 3 个月</string> <string name="ms_user_hint">营销计划功能限时免费使用 1 个月</string>
<string name="ms_count">共%s个营销计划</string> <string name="ms_count">共%s个营销计划</string>
<string name="ms_search_hint">请输入活动名称</string> <string name="ms_search_hint">请输入活动名称</string>
<string name="ms_empty_hint">没有搜到此计划\n请重新搜索,或点击添加按钮进行添加~</string> <string name="ms_empty_hint">没有搜到此计划\n请重新搜索,或点击添加按钮进行添加~</string>
...@@ -691,34 +691,34 @@ ...@@ -691,34 +691,34 @@
<string name="manage_inventory_add_end">盘库结束</string> <string name="manage_inventory_add_end">盘库结束</string>
<!--商品维护--> <!--商品维护-->
<string name="sku_check"></string> <string name="sku_check"></string>
<string name="sku_size">规格/</string> <string name="sku_size">规格/</string>
<string name="skugrp_add_hint">请输入分组名称</string> <string name="skugrp_add_hint">请输入分组名称</string>
<string name="sku_subtitle_info">基本信息</string> <string name="sku_subtitle_info">基本信息</string>
<string name="sku_barcode">条码</string> <string name="sku_barcode">条码:</string>
<string name="sku_name">名称</string> <string name="sku_name">名称:</string>
<string name="sku_skugrp">分组</string> <string name="sku_skugrp">分组:</string>
<string name="sku_type">类别</string> <string name="sku_type">类别:</string>
<string name="sku_unit">单位</string> <string name="sku_unit">单位:</string>
<string name="sku_subtitle_price">调整价格</string> <string name="sku_subtitle_price">调整价格</string>
<string name="sku_price1">售价</string> <string name="sku_price1">售价:</string>
<string name="sku_price2">促销价</string> <string name="sku_price2">促销价:</string>
<string name="sku_subtitle_vip">会员信息</string> <string name="sku_subtitle_vip">会员信息</string>
<string name="sku_vip_dis">会员折扣</string> <string name="sku_vip_dis">会员折扣</string>
<string name="sku_point1">消费每满</string> <string name="sku_point1">消费每满</string>
<string name="sku_point2">元等于1积分</string> <string name="sku_point2">元等于1积分</string>
<string name="sku_subtitle_pack">包装关系</string> <string name="sku_subtitle_pack">包装关系</string>
<string name="sku_pack">能否拆解</string> <string name="sku_pack">能否拆解:</string>
<string name="sku_subtitle_supplier">供货方</string> <string name="sku_subtitle_supplier">供货方</string>
<string name="sku_supplier">供货商方</string> <string name="sku_supplier">供货商方:</string>
<string name="sku_cost_on">按此包装进货</string> <string name="sku_cost_on">按此包装进货:</string>
<string name="sku_cost">进价</string> <string name="sku_cost">进价:</string>
<string name="sku_stock_low_limit">库存下限</string> <string name="sku_stock_low_limit">库存下限:</string>
<string name="sku_stock_upper_limit">库存上限</string> <string name="sku_stock_upper_limit">库存上限:</string>
<string name="sku_min_oder">最小订货</string> <string name="sku_min_oder">最小订货:</string>
<string name="sku_update">编辑商品</string> <string name="sku_update">编辑商品</string>
<string name="sku_update_price">调整价格</string> <string name="sku_update_price">调整价格</string>
......
...@@ -427,7 +427,7 @@ ...@@ -427,7 +427,7 @@
<item name="android:maxLines">1</item> <item name="android:maxLines">1</item>
<item name="android:layout_height">30dp</item> <item name="android:layout_height">30dp</item>
<item name="android:maxLength">20</item> <item name="android:maxLength">20</item>
<item name="android:background">@drawable/shape_gray_r2</item> <item name="android:background">@drawable/shape_gray_r1</item>
<item name="android:imeOptions">actionSearch</item> <item name="android:imeOptions">actionSearch</item>
</style> </style>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m org.gradle.jvmargs=-Xmx1536m
android.useDeprecatedNdk = true
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit
......
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