Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TangKuPos
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王海
TangKuPos
Commits
64c78f04
Commit
64c78f04
authored
Dec 23, 2017
by
王海
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分规则修改
parent
4fe88f23
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1519 additions
and
1240 deletions
+1519
-1240
app/src/main/java/com/xingdata/zzdpos/model/Category.java
app/src/main/java/com/xingdata/zzdpos/model/Category.java
+10
-9
app/src/main/java/com/xingdata/zzdpos/ui/login/LoginActivity.java
...main/java/com/xingdata/zzdpos/ui/login/LoginActivity.java
+2
-1
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/IntegralActivity.java
...ngdata/zzdpos/ui/marketing/integral/IntegralActivity.java
+2
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/IntegralPresenter.java
...gdata/zzdpos/ui/marketing/integral/IntegralPresenter.java
+2
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/dialog/IntegralExchangeDialog.java
.../ui/marketing/integral/dialog/IntegralExchangeDialog.java
+152
-152
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/dialog/IntegralGetDialog.java
...zdpos/ui/marketing/integral/dialog/IntegralGetDialog.java
+472
-472
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralExchangeFragment.java
...marketing/integral/fragment/IntegralExchangeFragment.java
+143
-0
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralGetFragment.java
...s/ui/marketing/integral/fragment/IntegralGetFragment.java
+11
-3
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralIndexFragment.java
...ui/marketing/integral/fragment/IntegralIndexFragment.java
+8
-4
app/src/main/res/layout/dialog_integral_exchange_setting.xml
app/src/main/res/layout/dialog_integral_exchange_setting.xml
+221
-183
app/src/main/res/layout/dialog_integral_get_setting.xml
app/src/main/res/layout/dialog_integral_get_setting.xml
+496
-416
No files found.
app/src/main/java/com/xingdata/zzdpos/model/Category.java
View file @
64c78f04
...
@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.model;
...
@@ -3,6 +3,7 @@ package com.xingdata.zzdpos.model;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.bigkoo.pickerview.model.IPickerViewData
;
import
com.bigkoo.pickerview.model.IPickerViewData
;
import
com.xingdata.zzdpos.base.BaseBean
;
import
com.xingdata.zzdpos.base.BaseBean
;
import
com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment
;
/**
/**
* Created by Administrator on 2017/11/27.
* Created by Administrator on 2017/11/27.
...
@@ -132,15 +133,15 @@ public class Category implements BaseBean, IPickerViewData {
...
@@ -132,15 +133,15 @@ public class Category implements BaseBean, IPickerViewData {
@Override
@Override
public
String
getPickerViewText
()
{
public
String
getPickerViewText
()
{
switch
(
nowCategory
)
{
switch
(
nowCategory
)
{
// case IntegralGetDialog
.ONE_CATEGORY: {
case
IntegralGetFragment
.
ONE_CATEGORY
:
{
//
return getSpuClaName() + "";
return
getSpuClaName
()
+
""
;
//
}
}
// case IntegralGetDialog
.TWO_CATEGORY: {
case
IntegralGetFragment
.
TWO_CATEGORY
:
{
//
return getSpuGrpName() + "";
return
getSpuGrpName
()
+
""
;
//
}
}
// case IntegralGetDialog
.THREE_CATEGORY: {
case
IntegralGetFragment
.
THREE_CATEGORY
:
{
//
return getSpuCateName() + "";
return
getSpuCateName
()
+
""
;
//
}
}
}
}
return
""
;
return
""
;
...
...
app/src/main/java/com/xingdata/zzdpos/ui/login/LoginActivity.java
View file @
64c78f04
...
@@ -23,6 +23,7 @@ import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean;
...
@@ -23,6 +23,7 @@ import com.xingdata.zzdpos.ui.login.fragment.bean.LoginReturnBean;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean
;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean
;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean
;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity
;
import
com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketActivity
;
import
com.xingdata.zzdpos.ui.payment.PaymentActivity
;
import
com.xingdata.zzdpos.ui.payment.PaymentActivity
;
import
com.xingdata.zzdpos.ui.splash.SplashActivity
;
import
com.xingdata.zzdpos.ui.splash.SplashActivity
;
import
com.xingdata.zzdpos.view.PopupWindowDownList
;
import
com.xingdata.zzdpos.view.PopupWindowDownList
;
...
@@ -138,7 +139,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
...
@@ -138,7 +139,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
promptDialog
.
dismiss
();
promptDialog
.
dismiss
();
//如果sn已经绑定款台,则直接跳转主页
//如果sn已经绑定款台,则直接跳转主页
if
(
loginReturnBean
.
getBindSN
())
{
if
(
loginReturnBean
.
getBindSN
())
{
startActivity
(
new
Intent
(
LoginActivity
.
this
,
Integral
Activity
.
class
));
startActivity
(
new
Intent
(
LoginActivity
.
this
,
ReturnTicket
Activity
.
class
));
LoginActivity
.
this
.
finish
();
LoginActivity
.
this
.
finish
();
return
;
return
;
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/IntegralActivity.java
View file @
64c78f04
...
@@ -66,6 +66,7 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
...
@@ -66,6 +66,7 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
@Override
@Override
public
void
addSucc
(
LoadingDialog
loadingDialog
)
{
public
void
addSucc
(
LoadingDialog
loadingDialog
)
{
pop
();
mPresenter
.
query
(
1
,
mPresenter
.
integralIndexFragment
.
NORMAL_TYPE
,
loadingDialog
);
mPresenter
.
query
(
1
,
mPresenter
.
integralIndexFragment
.
NORMAL_TYPE
,
loadingDialog
);
}
}
...
@@ -82,6 +83,7 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
...
@@ -82,6 +83,7 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
@Override
@Override
public
void
exchangeUpdateSucc
(
Ubound
ubound
,
LoadingDialog
loadingDialog
)
{
public
void
exchangeUpdateSucc
(
Ubound
ubound
,
LoadingDialog
loadingDialog
)
{
pop
();
mPresenter
.
exchangeQuery
(
loadingDialog
);
mPresenter
.
exchangeQuery
(
loadingDialog
);
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/IntegralPresenter.java
View file @
64c78f04
...
@@ -8,6 +8,7 @@ import com.xingdata.zzdpos.model.Category;
...
@@ -8,6 +8,7 @@ import com.xingdata.zzdpos.model.Category;
import
com.xingdata.zzdpos.model.Gbound
;
import
com.xingdata.zzdpos.model.Gbound
;
import
com.xingdata.zzdpos.model.Ubound
;
import
com.xingdata.zzdpos.model.Ubound
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralExchangeFragment
;
import
com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment
;
import
com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment
;
import
com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralIndexFragment
;
import
com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralIndexFragment
;
...
@@ -23,6 +24,7 @@ public class IntegralPresenter extends IntegralContract.Presenter {
...
@@ -23,6 +24,7 @@ public class IntegralPresenter extends IntegralContract.Presenter {
private
int
number
=
1
;
private
int
number
=
1
;
public
IntegralIndexFragment
integralIndexFragment
=
new
IntegralIndexFragment
();
public
IntegralIndexFragment
integralIndexFragment
=
new
IntegralIndexFragment
();
public
IntegralGetFragment
integralGetFragment
=
new
IntegralGetFragment
();
public
IntegralGetFragment
integralGetFragment
=
new
IntegralGetFragment
();
public
IntegralExchangeFragment
integralExchangeFragment
=
new
IntegralExchangeFragment
();
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/dialog/IntegralExchangeDialog.java
View file @
64c78f04
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
integral
.
dialog
;
//
package com.xingdata.zzdpos.ui.marketing.integral.dialog;
//
import
android.annotation.SuppressLint
;
//
import android.annotation.SuppressLint;
import
android.content.Context
;
//
import android.content.Context;
import
android.text.TextUtils
;
//
import android.text.TextUtils;
import
android.view.View
;
//
import android.view.View;
import
android.view.inputmethod.InputMethodManager
;
//
import android.view.inputmethod.InputMethodManager;
import
android.widget.TextView
;
//
import android.widget.TextView;
//
import
com.blankj.utilcode.util.ToastUtils
;
//
import com.blankj.utilcode.util.ToastUtils;
import
com.xingdata.zzdpos.R
;
//
import com.xingdata.zzdpos.R;
import
com.xingdata.zzdpos.base.BaseActivity
;
//
import com.xingdata.zzdpos.base.BaseActivity;
import
com.xingdata.zzdpos.base.BaseDialog
;
//
import com.xingdata.zzdpos.base.BaseDialog;
import
com.xingdata.zzdpos.databinding.DialogIntegralExchangeSettingBinding
;
//
import com.xingdata.zzdpos.databinding.DialogIntegralExchangeSettingBinding;
import
com.xingdata.zzdpos.model.Ubound
;
//
import com.xingdata.zzdpos.model.Ubound;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
//
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter
;
//
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import
com.xingdata.zzdpos.util.ConvertUtil
;
//
import com.xingdata.zzdpos.util.ConvertUtil;
//
/**
/
//
**
* 积分兑换设置界面
//
* 积分兑换设置界面
*/
//
*/
public
class
IntegralExchangeDialog
extends
BaseDialog
<
IntegralPresenter
,
//
public class IntegralExchangeDialog extends BaseDialog<IntegralPresenter,
DialogIntegralExchangeSettingBinding
>
{
//
DialogIntegralExchangeSettingBinding> {
Ubound
ubound
;
//
Ubound ubound;
//
@Override
//
@Override
public
int
getLayoutId
()
{
//
public int getLayoutId() {
return
R
.
layout
.
dialog_integral_exchange_setting
;
//
return R.layout.dialog_integral_exchange_setting;
}
//
}
//
@Override
//
@Override
protected
boolean
isShowTitle
()
{
//
protected boolean isShowTitle() {
return
true
;
//
return true;
}
//
}
//
@Override
//
@Override
public
int
getTitle
()
{
//
public int getTitle() {
return
R
.
string
.
integral_exchange_title
;
//
return R.string.integral_exchange_title;
}
//
}
//
@SuppressLint
(
"SetTextI18n"
)
//
@SuppressLint("SetTextI18n")
@Override
//
@Override
public
void
initView
()
{
//
public void initView() {
setCancelable
(
false
);
//
setCancelable(false);
mViewBinding
.
setOnClickListener
(
view
->
{
//
mViewBinding.setOnClickListener(view -> {
hintKbTwo
();
//
hintKbTwo();
switch
(
view
.
getId
())
{
//
switch (view.getId()) {
case
R
.
id
.
rd_suspendeds
:
{
//
case R.id.rd_suspendeds: {
//暂停
//
//暂停
ubound
.
setBoundUseStatus
((
byte
)
1
);
//
ubound.setBoundUseStatus((byte) 1);
}
//
}
break
;
//
break;
case
R
.
id
.
rd_starts
:
{
//
case R.id.rd_starts: {
//启用
//
//启用
ubound
.
setBoundUseStatus
((
byte
)
0
);
//
ubound.setBoundUseStatus((byte) 0);
}
//
}
break
;
//
break;
}
//
}
});
//
});
initUiData
();
//
initUiData();
}
//
}
//
private
void
initUiData
()
{
//
private void initUiData() {
if
(
ubound
!=
null
)
{
//
if (ubound != null) {
if
(
ubound
.
getBoundUseStatus
()
!=
null
&&
ubound
.
getBoundUseStatus
()
==
0
)
{
//
if (ubound.getBoundUseStatus() != null && ubound.getBoundUseStatus() == 0) {
mViewBinding
.
rdStarts
.
setChecked
(
true
);
//
mViewBinding.rdStarts.setChecked(true);
}
else
if
(
ubound
.
getBoundUseStatus
()
!=
null
&&
ubound
.
getBoundUseStatus
()
==
1
)
{
//
} else if (ubound.getBoundUseStatus() != null && ubound.getBoundUseStatus() == 1) {
mViewBinding
.
rdSuspendeds
.
setChecked
(
true
);
//
mViewBinding.rdSuspendeds.setChecked(true);
}
//
}
if
(
ubound
.
getBoundValAmt
()
!=
null
)
{
//
if (ubound.getBoundValAmt() != null) {
mViewBinding
.
etIntegralExchangeRuleCountMoney
.
setText
(
ubound
.
getBoundValAmt
()
+
""
);
//
mViewBinding.etIntegralExchangeRuleCountMoney.setText(ubound.getBoundValAmt() + "");
}
//
}
if
(
ubound
.
getBoundOrderAmt
()
!=
null
)
{
//
if (ubound.getBoundOrderAmt() != null) {
mViewBinding
.
etIntegralExchangeMoney
.
setText
(
ConvertUtil
.
fenToYuanNoPoint
(
ubound
//
mViewBinding.etIntegralExchangeMoney.setText(ConvertUtil.fenToYuanNoPoint(ubound
.
getBoundOrderAmt
()));
//
.getBoundOrderAmt()));
}
//
}
if
(
ubound
.
getBoundUseNum
()
!=
null
)
{
//
if (ubound.getBoundUseNum() != null) {
mViewBinding
.
etIntegralExchangeCount
.
setText
(
ubound
.
getBoundUseNum
()
+
""
);
//
mViewBinding.etIntegralExchangeCount.setText(ubound.getBoundUseNum() + "");
}
//
}
}
//
}
}
//
}
//
public
void
setData
(
Ubound
ubound
)
{
//
public void setData(Ubound ubound) {
this
.
ubound
=
ubound
;
//
this.ubound = ubound;
}
//
}
//
@Override
//
@Override
public
void
onConfirmClick
(
View
view
)
{
//
public void onConfirmClick(View view) {
super
.
onConfirmClick
(
view
);
//
super.onConfirmClick(view);
if
(
isNullAndSet
())
{
//
if (isNullAndSet()) {
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
//
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
//
loadingDialog.show((BaseActivity) getActivity());
ubound
.
setUpdateTime
(
null
);
//
ubound.setUpdateTime(null);
ubound
.
setCreateTime
(
null
);
//
ubound.setCreateTime(null);
mPresenter
.
exchangeUpdate
(
ubound
,
loadingDialog
);
//
mPresenter.exchangeUpdate(ubound, loadingDialog);
this
.
dismiss
();
//
this.dismiss();
}
else
{
//
} else {
ToastUtils
.
showLong
(
"输入数据不能null"
);
//
ToastUtils.showLong("输入数据不能null");
}
//
}
//
}
//
}
//
//
/**
//
/**
* 判断用户输入数据是否为null
//
* 判断用户输入数据是否为null
*
//
*
* @return 输入为null返回false 反之返回true
//
* @return 输入为null返回false 反之返回true
*/
//
*/
private
boolean
isNullAndSet
()
{
//
private boolean isNullAndSet() {
if
(
ubound
==
null
||
ubound
.
getBoundUseStatus
()
==
null
)
{
//
if (ubound == null || ubound.getBoundUseStatus() == null) {
return
false
;
//
return false;
}
//
}
if
(
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralExchangeRuleCountMoney
.
getText
().
toString
())
//
if (TextUtils.isEmpty(mViewBinding.etIntegralExchangeRuleCountMoney.getText().toString())
||
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralExchangeMoney
.
getText
().
toString
())
//
|| TextUtils.isEmpty(mViewBinding.etIntegralExchangeMoney.getText().toString())
||
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralExchangeCount
.
getText
().
toString
//
|| TextUtils.isEmpty(mViewBinding.etIntegralExchangeCount.getText().toString
()))
{
//
())) {
return
false
;
//
return false;
}
//
}
ubound
.
setBoundValAmt
(
Long
.
parseLong
(
mViewBinding
.
etIntegralExchangeRuleCountMoney
//
ubound.setBoundValAmt(Long.parseLong(mViewBinding.etIntegralExchangeRuleCountMoney
.
getText
().
toString
()));
//
.getText().toString()));
ubound
.
setBoundOrderAmt
(
ConvertUtil
.
yuanToFen
(
mViewBinding
.
etIntegralExchangeMoney
//
ubound.setBoundOrderAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralExchangeMoney
.
getText
().
toString
()));
//
.getText().toString()));
ubound
.
setBoundUseNum
(
Long
.
parseLong
(
mViewBinding
.
etIntegralExchangeCount
.
getText
()
//
ubound.setBoundUseNum(Long.parseLong(mViewBinding.etIntegralExchangeCount.getText()
.
toString
()));
//
.toString()));
return
true
;
//
return true;
}
//
}
//
//
/**
//
/**
* 显示软键盘,Dialog使用
//
* 显示软键盘,Dialog使用
*/
//
*/
public
void
hintKbTwo
()
{
//
public void hintKbTwo() {
View
view
=
getDialog
().
getCurrentFocus
();
//
View view = getDialog().getCurrentFocus();
if
(
view
==
null
)
{
//
if (view == null) {
return
;
//
return;
}
//
}
if
(
view
instanceof
TextView
)
{
//
if (view instanceof TextView) {
InputMethodManager
mInputMethodManager
=
(
InputMethodManager
)
getContext
()
//
InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
.
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
//
.getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
InputMethodManager
//
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
.
RESULT_UNCHANGED_SHOWN
);
//
.RESULT_UNCHANGED_SHOWN);
}
//
}
}
//
}
//
@Override
//
@Override
public
void
dismiss
()
{
//
public void dismiss() {
hintKbTwo
();
//
hintKbTwo();
super
.
dismiss
();
//
super.dismiss();
}
//
}
//
}
//
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/dialog/IntegralGetDialog.java
View file @
64c78f04
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
integral
.
dialog
;
//
package com.xingdata.zzdpos.ui.marketing.integral.dialog;
//
import
android.annotation.SuppressLint
;
//
import android.annotation.SuppressLint;
import
android.content.Context
;
//
import android.content.Context;
import
android.text.TextUtils
;
//
import android.text.TextUtils;
import
android.view.View
;
//
import android.view.View;
import
android.view.inputmethod.InputMethodManager
;
//
import android.view.inputmethod.InputMethodManager;
import
android.widget.ImageView
;
//
import android.widget.ImageView;
import
android.widget.TextView
;
//
import android.widget.TextView;
//
import
com.bigkoo.pickerview.OptionsPickerView
;
//
import com.bigkoo.pickerview.OptionsPickerView;
import
com.bigkoo.pickerview.listener.CustomListener
;
//
import com.bigkoo.pickerview.listener.CustomListener;
import
com.blankj.utilcode.util.LogUtils
;
//
import com.blankj.utilcode.util.LogUtils;
import
com.blankj.utilcode.util.ToastUtils
;
//
import com.blankj.utilcode.util.ToastUtils;
import
com.xingdata.zzdpos.App
;
//
import com.xingdata.zzdpos.App;
import
com.xingdata.zzdpos.R
;
//
import com.xingdata.zzdpos.R;
import
com.xingdata.zzdpos.base.BaseActivity
;
//
import com.xingdata.zzdpos.base.BaseActivity;
import
com.xingdata.zzdpos.base.BaseDialog
;
//
import com.xingdata.zzdpos.base.BaseDialog;
import
com.xingdata.zzdpos.databinding.DialogIntegralGetSettingBinding
;
//
import com.xingdata.zzdpos.databinding.DialogIntegralGetSettingBinding;
import
com.xingdata.zzdpos.model.Category
;
//
import com.xingdata.zzdpos.model.Category;
import
com.xingdata.zzdpos.model.Gbound
;
//
import com.xingdata.zzdpos.model.Gbound;
import
com.xingdata.zzdpos.model.Level
;
//
import com.xingdata.zzdpos.model.Level;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
//
import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter
;
//
import com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter;
import
com.xingdata.zzdpos.util.ConvertUtil
;
//
import com.xingdata.zzdpos.util.ConvertUtil;
import
com.xingdata.zzdpos.util.OnClickListener
;
//
import com.xingdata.zzdpos.util.OnClickListener;
//
import
java.util.ArrayList
;
//
import java.util.ArrayList;
import
java.util.List
;
//
import java.util.List;
//
import
io.realm.Realm
;
//
import io.realm.Realm;
import
io.realm.RealmResults
;
//
import io.realm.RealmResults;
//
/**
/
//
**
* 积分获取设置界面
//
* 积分获取设置界面
*/
//
*/
public
class
IntegralGetDialog
extends
BaseDialog
<
IntegralPresenter
,
//
public class IntegralGetDialog extends BaseDialog<IntegralPresenter,
DialogIntegralGetSettingBinding
>
{
//
DialogIntegralGetSettingBinding> {
//区分请求类型 正常 加载更多,下拉刷新
//
//区分请求类型 正常 加载更多,下拉刷新
public
static
final
int
ONE_CATEGORY
=
1
;
//
public static final int ONE_CATEGORY = 1;
public
static
final
int
TWO_CATEGORY
=
2
;
//
public static final int TWO_CATEGORY = 2;
public
static
final
int
THREE_CATEGORY
=
3
;
//
public static final int THREE_CATEGORY = 3;
//请求商品类别使用的id
//
//请求商品类别使用的id
private
long
spuCateIdTwo
=
-
1
;
//
private long spuCateIdTwo = -1;
private
long
spuCateIdThree
=
-
1
;
//
private long spuCateIdThree = -1;
private
OptionsPickerView
pvCustomOptions
;
//
private OptionsPickerView pvCustomOptions;
private
List
<
Category
>
listCategory
=
new
ArrayList
<>();
//
private List<Category> listCategory = new ArrayList<>();
//积分获取提交给服务器对象
//
//积分获取提交给服务器对象
private
Gbound
gbound
=
new
Gbound
();
//
private Gbound gbound = new Gbound();
//ui显示用
//
//ui显示用
private
Gbound
ShowGbound
=
new
Gbound
();
//
private Gbound ShowGbound = new Gbound();
//商品品类提交服务器对象
//
//商品品类提交服务器对象
private
Category
category
=
new
Category
();
//
private Category category = new Category();
//当前为修改还是新增 0为修改1为新增
//
//当前为修改还是新增 0为修改1为新增
private
int
nowType
=
-
1
;
//
private int nowType = -1;
//进度对话框
//
//进度对话框
LoadingDialog
loadingDialog
;
//
LoadingDialog loadingDialog;
//当前点击商品类型空间id,防止直接点击商品第二三种类型
//
//当前点击商品类型空间id,防止直接点击商品第二三种类型
private
int
nowShopTypeId
=
1
;
//
private int nowShopTypeId = 1;
//
@Override
//
@Override
public
int
getLayoutId
()
{
//
public int getLayoutId() {
return
R
.
layout
.
dialog_integral_get_setting
;
//
return R.layout.dialog_integral_get_setting;
}
//
}
//
@Override
//
@Override
protected
boolean
isShowTitle
()
{
//
protected boolean isShowTitle() {
return
true
;
//
return true;
}
//
}
//
@Override
//
@Override
public
int
getTitle
()
{
//
public int getTitle() {
return
R
.
string
.
integral_get_title
;
//
return R.string.integral_get_title;
}
//
}
//
@SuppressLint
(
"SetTextI18n"
)
//
@SuppressLint("SetTextI18n")
@Override
//
@Override
public
void
initView
()
{
//
public void initView() {
//
setCancelable
(
false
);
//
setCancelable(false);
//
//
//
}
//
}
//
//
private
void
setShopTypeClick
(
Boolean
b
)
{
//
private void setShopTypeClick(Boolean b) {
mViewBinding
.
rdGettypeAll
.
setEnabled
(
b
);
//
mViewBinding.rdGettypeAll.setEnabled(b);
mViewBinding
.
rdGettypeShop
.
setEnabled
(
b
);
//
mViewBinding.rdGettypeShop.setEnabled(b);
mViewBinding
.
rdGettypeCategory
.
setEnabled
(
b
);
//
mViewBinding.rdGettypeCategory.setEnabled(b);
if
(
b
)
{
//
if (b) {
mViewBinding
.
tvCategorySelectShowNoEdit
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.GONE);
mViewBinding
.
tvVipLevelSelectShowNoEdit
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.GONE);
mViewBinding
.
tvCategorySelectOne
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.tvCategorySelectOne.setVisibility(View.VISIBLE);
mViewBinding
.
tvCategorySelectTwo
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.tvCategorySelectTwo.setVisibility(View.VISIBLE);
mViewBinding
.
tvCategorySelectThree
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.tvCategorySelectThree.setVisibility(View.VISIBLE);
mViewBinding
.
tvVipLevelSelect
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.tvVipLevelSelect.setVisibility(View.VISIBLE);
}
else
{
//
} else {
mViewBinding
.
tvCategorySelectShowNoEdit
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.VISIBLE);
mViewBinding
.
tvVipLevelSelectShowNoEdit
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.VISIBLE);
mViewBinding
.
tvCategorySelectOne
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.tvCategorySelectOne.setVisibility(View.GONE);
mViewBinding
.
tvCategorySelectTwo
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.tvCategorySelectTwo.setVisibility(View.GONE);
mViewBinding
.
tvCategorySelectThree
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.tvCategorySelectThree.setVisibility(View.GONE);
mViewBinding
.
tvVipLevelSelect
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.tvVipLevelSelect.setVisibility(View.GONE);
}
//
}
}
//
}
//
private
void
updateUi
()
{
//
private void updateUi() {
if
(
ShowGbound
!=
null
&&
ShowGbound
.
getTruleName
()
!=
null
&&
!(
ShowGbound
.
getTruleName
//
if (ShowGbound != null && ShowGbound.getTruleName() != null && !(ShowGbound.getTruleName
().
equals
(
""
)
//
().equals("")
))
{
//
)) {
mViewBinding
.
tvRulesName
.
setText
(
ShowGbound
.
getTruleName
());
//
mViewBinding.tvRulesName.setText(ShowGbound.getTruleName());
//开通启用状态 0:正常 1 暂停 默认 0
//
//开通启用状态 0:正常 1 暂停 默认 0
if
(
ShowGbound
.
getBoundGetStatus
()
==
0
)
{
//
if (ShowGbound.getBoundGetStatus() == 0) {
mViewBinding
.
rdStarts
//
mViewBinding.rdStarts
.
setChecked
(
true
);
//
.setChecked(true);
}
else
if
(
ShowGbound
.
getBoundGetStatus
()
==
1
)
{
//
} else if (ShowGbound.getBoundGetStatus() == 1) {
mViewBinding
.
rdSuspendeds
.
setChecked
(
true
);
//
mViewBinding.rdSuspendeds.setChecked(true);
}
//
}
mViewBinding
.
tvVipLevelSelectShowNoEdit
.
setText
(
ShowGbound
.
getVipLevelName
());
//
mViewBinding.tvVipLevelSelectShowNoEdit.setText(ShowGbound.getVipLevelName());
//积分获取类型 0:通用 1:品类定义积分 2:商品定义积分
//
//积分获取类型 0:通用 1:品类定义积分 2:商品定义积分
switch
(
ShowGbound
.
getVipGboundType
())
{
//
switch (ShowGbound.getVipGboundType()) {
case
0
:
{
//
case 0: {
showView
(
R
.
id
.
rd_gettype_all
);
//
showView(R.id.rd_gettype_all);
mViewBinding
.
rdGettypeAll
.
setChecked
(
true
);
//
mViewBinding.rdGettypeAll.setChecked(true);
if
(
ShowGbound
.
getTransAmt
()
!=
null
)
{
//
if (ShowGbound.getTransAmt() != null) {
mViewBinding
.
etIntegralWeight
.
setText
(
ConvertUtil
.
fenToYuanNoPoint
//
mViewBinding.etIntegralWeight.setText(ConvertUtil.fenToYuanNoPoint
(
ShowGbound
.
getTransAmt
()));
//
(ShowGbound.getTransAmt()));
}
//
}
if
(
ShowGbound
.
getBoundExp
()
!=
null
)
{
//
if (ShowGbound.getBoundExp() != null) {
mViewBinding
.
etIntegralTimeLimit
.
setText
(
ShowGbound
.
getBoundExp
()
+
""
);
//
mViewBinding.etIntegralTimeLimit.setText(ShowGbound.getBoundExp() + "");
}
//
}
//
//
}
//
}
break
;
//
break;
case
1
:
{
//
case 1: {
showView
(
R
.
id
.
rd_gettype_category
);
//
showView(R.id.rd_gettype_category);
mViewBinding
.
rdGettypeCategory
.
setChecked
(
true
);
//
mViewBinding.rdGettypeCategory.setChecked(true);
if
(
ShowGbound
.
getSpuClaName
()
!=
null
)
{
//
if (ShowGbound.getSpuClaName() != null) {
mViewBinding
.
tvCategorySelectOne
.
setText
((
ShowGbound
.
getSpuClaName
()));
//
mViewBinding.tvCategorySelectOne.setText((ShowGbound.getSpuClaName()));
mViewBinding
.
tvCategorySelectShowNoEdit
.
setText
(
ShowGbound
.
getSpuClaName
//
mViewBinding.tvCategorySelectShowNoEdit.setText(ShowGbound.getSpuClaName
()
+
"/"
);
//
() + "/");
}
//
}
if
(
ShowGbound
.
getSpuGrpName
()
!=
null
)
{
//
if (ShowGbound.getSpuGrpName() != null) {
mViewBinding
.
tvCategorySelectTwo
.
setText
((
ShowGbound
.
getSpuGrpName
()));
//
mViewBinding.tvCategorySelectTwo.setText((ShowGbound.getSpuGrpName()));
mViewBinding
.
tvCategorySelectShowNoEdit
.
setText
(
mViewBinding
//
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
.
tvCategorySelectShowNoEdit
.
getText
().
toString
()
+
ShowGbound
//
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
.
getSpuGrpName
()
+
"/"
);
//
.getSpuGrpName() + "/");
}
//
}
if
(
ShowGbound
.
getSpuCateName
()
!=
null
)
{
//
if (ShowGbound.getSpuCateName() != null) {
mViewBinding
.
tvCategorySelectThree
.
setText
((
ShowGbound
.
getSpuCateName
()));
//
mViewBinding.tvCategorySelectThree.setText((ShowGbound.getSpuCateName()));
mViewBinding
.
tvCategorySelectShowNoEdit
.
setText
(
mViewBinding
//
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
.
tvCategorySelectShowNoEdit
.
getText
().
toString
()
+
ShowGbound
//
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
.
getSpuCateName
());
//
.getSpuCateName());
}
//
}
//
if
(
ShowGbound
.
getTransAmt
()
!=
null
)
{
//
if (ShowGbound.getTransAmt() != null) {
mViewBinding
.
etIntegralCategoryWeight
.
setText
(
ConvertUtil
//
mViewBinding.etIntegralCategoryWeight.setText(ConvertUtil
.
fenToYuanNoPoint
(
ShowGbound
//
.fenToYuanNoPoint(ShowGbound
.
getTransAmt
()));
//
.getTransAmt()));
}
//
}
if
(
ShowGbound
.
getBoundExp
()
!=
null
)
{
//
if (ShowGbound.getBoundExp() != null) {
mViewBinding
.
etIntegralCategoryTimeLimit
.
setText
(
ShowGbound
.
getBoundExp
()
//
mViewBinding.etIntegralCategoryTimeLimit.setText(ShowGbound.getBoundExp()
+
""
);
//
+ "");
}
//
}
}
//
}
break
;
//
break;
case
2
:
{
//
case 2: {
showView
(
R
.
id
.
rd_gettype_shop
);
//
showView(R.id.rd_gettype_shop);
mViewBinding
.
rdGettypeShop
.
setChecked
(
true
);
//
mViewBinding.rdGettypeShop.setChecked(true);
if
(
ShowGbound
.
getBoundExp
()
!=
null
)
{
//
if (ShowGbound.getBoundExp() != null) {
mViewBinding
.
etShopTimeLimit
.
setText
(
ShowGbound
.
getBoundExp
()
+
""
);
//
mViewBinding.etShopTimeLimit.setText(ShowGbound.getBoundExp() + "");
}
//
}
}
//
}
break
;
//
break;
}
//
}
//
}
//
}
}
//
}
//
/**
//
/**
* 通过用户点击品类等级 构建提交给服务器Category对象
//
* 通过用户点击品类等级 构建提交给服务器Category对象
*
//
*
* @param id 按钮id
//
* @param id 按钮id
* @return 构建好的Category对象
//
* @return 构建好的Category对象
*/
//
*/
private
Category
getCategory
(
int
id
)
{
//
private Category getCategory(int id) {
switch
(
id
)
{
//
switch (id) {
case
R
.
id
.
tv_category_select_one
:
{
//
case R.id.tv_category_select_one: {
category
=
new
Category
();
//
category = new Category();
}
//
}
break
;
//
break;
case
R
.
id
.
tv_category_select_two
:
{
//
case R.id.tv_category_select_two: {
category
.
setSpuCateId
(
spuCateIdTwo
);
//
category.setSpuCateId(spuCateIdTwo);
}
//
}
break
;
//
break;
case
R
.
id
.
tv_category_select_three
:
{
//
case R.id.tv_category_select_three: {
category
.
setSpuCateId
(
spuCateIdThree
);
//
category.setSpuCateId(spuCateIdThree);
}
//
}
break
;
//
break;
}
//
}
return
category
;
//
return category;
//
}
//
}
//
/**
//
/**
* 初始化会员等级选择对话框
//
* 初始化会员等级选择对话框
*/
//
*/
private
void
initVipLevelOptionPicker
(
RealmResults
<
Level
>
realmResult
)
{
//条件选择器初始化,自定义布局
//
private void initVipLevelOptionPicker(RealmResults<Level> realmResult) {//条件选择器初始化,自定义布局
pvCustomOptions
=
new
OptionsPickerView
.
Builder
(
getActivity
(),
new
OptionsPickerView
//
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
.
OnOptionsSelectListener
()
{
//
.OnOptionsSelectListener() {
@Override
//
@Override
public
void
onOptionsSelect
(
int
options1
,
int
option2
,
int
options3
,
View
v
)
{
//
public void onOptionsSelect(int options1, int option2, int options3, View v) {
gbound
.
setVipLevel
(
realmResult
.
get
(
options1
).
getVipLevel
());
//
gbound.setVipLevel(realmResult.get(options1).getVipLevel());
mViewBinding
.
tvVipLevelSelect
.
setText
(
realmResult
.
get
(
options1
).
getVipLevelName
());
//
mViewBinding.tvVipLevelSelect.setText(realmResult.get(options1).getVipLevelName());
}
//
}
}).
setLayoutRes
(
R
.
layout
.
pickerview_custom_options
,
new
CustomListener
()
{
//
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
@Override
//
@Override
public
void
customLayout
(
View
v
)
{
//
public void customLayout(View v) {
final
TextView
tvSubmit
=
v
.
findViewById
(
R
.
id
.
tv_finish
);
//
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
ImageView
ivCancel
=
v
.
findViewById
(
R
.
id
.
iv_cancel
);
//
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
tvSubmit
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
tvSubmit.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
v
)
{
//
public void onClick(View v) {
pvCustomOptions
.
returnData
();
//
pvCustomOptions.returnData();
pvCustomOptions
.
dismiss
();
//
pvCustomOptions.dismiss();
}
//
}
});
//
});
ivCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
ivCancel.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
v
)
{
//
public void onClick(View v) {
pvCustomOptions
.
dismiss
();
//
pvCustomOptions.dismiss();
}
//
}
});
//
});
}
//
}
})
//
})
.
isDialog
(
true
)
//
.isDialog(true)
.
build
();
//
.build();
//
//
pvCustomOptions
.
setPicker
(
realmResult
);
//添加数据
//
pvCustomOptions.setPicker(realmResult);//添加数据
pvCustomOptions
.
show
();
//
pvCustomOptions.show();
}
//
}
//
//
/**
//
/**
* 初始化商品品类选择对话框
//
* 初始化商品品类选择对话框
*
//
*
* @param list 选择对话框数据
//
* @param list 选择对话框数据
* @param nowList 当前选中的品类索引
//
* @param nowList 当前选中的品类索引
*/
//
*/
private
void
initCustomOptionPicker
(
List
<
Category
>
list
,
int
nowList
)
{
//条件选择器初始化,自定义布局
//
private void initCustomOptionPicker(List<Category> list, int nowList) {//条件选择器初始化,自定义布局
pvCustomOptions
=
new
OptionsPickerView
.
Builder
(
getActivity
(),
new
OptionsPickerView
//
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
.
OnOptionsSelectListener
()
{
//
.OnOptionsSelectListener() {
@Override
//
@Override
public
void
onOptionsSelect
(
int
options1
,
int
option2
,
int
options3
,
View
v
)
{
//
public void onOptionsSelect(int options1, int option2, int options3, View v) {
gbound
.
setSpuCateId
((
int
)
Long
.
parseLong
(
list
.
get
(
options1
).
getSpuCateId
()
+
""
));
//
gbound.setSpuCateId((int) Long.parseLong(list.get(options1).getSpuCateId() + ""));
//返回的分别是三个级别的选中位置
//
//返回的分别是三个级别的选中位置
switch
(
nowList
)
{
//
switch (nowList) {
case
ONE_CATEGORY:
{
//
case ONE_CATEGORY: {
mViewBinding
.
tvCategorySelectOne
.
setText
(
listCategory
.
get
(
options1
)
//
mViewBinding.tvCategorySelectOne.setText(listCategory.get(options1)
.
getSpuClaName
());
//
.getSpuClaName());
spuCateIdTwo
=
listCategory
.
get
(
options1
).
getSpuCateId
();
//
spuCateIdTwo = listCategory.get(options1).getSpuCateId();
}
//
}
break
;
//
break;
case
TWO_CATEGORY:
{
//
case TWO_CATEGORY: {
mViewBinding
.
tvCategorySelectTwo
.
setText
(
listCategory
.
get
(
options1
)
//
mViewBinding.tvCategorySelectTwo.setText(listCategory.get(options1)
.
getSpuGrpName
());
//
.getSpuGrpName());
spuCateIdThree
=
listCategory
.
get
(
options1
).
getSpuCateId
();
//
spuCateIdThree = listCategory.get(options1).getSpuCateId();
}
//
}
break
;
//
break;
case
THREE_CATEGORY:
{
//
case THREE_CATEGORY: {
mViewBinding
.
tvCategorySelectThree
.
setText
(
listCategory
.
get
(
options1
)
//
mViewBinding.tvCategorySelectThree.setText(listCategory.get(options1)
.
getSpuCateName
());
//
.getSpuCateName());
//
}
//
}
break
;
//
break;
}
//
}
}
//
}
}).
setLayoutRes
(
R
.
layout
.
pickerview_custom_options
,
new
CustomListener
()
{
//
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
@Override
//
@Override
public
void
customLayout
(
View
v
)
{
//
public void customLayout(View v) {
final
TextView
tvSubmit
=
v
.
findViewById
(
R
.
id
.
tv_finish
);
//
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
ImageView
ivCancel
=
v
.
findViewById
(
R
.
id
.
iv_cancel
);
//
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
tvSubmit
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
tvSubmit.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
v
)
{
//
public void onClick(View v) {
pvCustomOptions
.
returnData
();
//
pvCustomOptions.returnData();
pvCustomOptions
.
dismiss
();
//
pvCustomOptions.dismiss();
}
//
}
});
//
});
//
ivCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
ivCancel.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
v
)
{
//
public void onClick(View v) {
pvCustomOptions
.
dismiss
();
//
pvCustomOptions.dismiss();
}
//
}
});
//
});
}
//
}
})
//
})
.
isDialog
(
true
)
//
.isDialog(true)
.
build
();
//
.build();
//
//
pvCustomOptions
.
setPicker
(
list
);
//添加数据
//
pvCustomOptions.setPicker(list);//添加数据
pvCustomOptions
.
show
();
//
pvCustomOptions.show();
}
//
}
//
/**
//
/**
* 根据用户点击控制UI控件的隐藏显示
//
* 根据用户点击控制UI控件的隐藏显示
*
//
*
* @param id 用户点击的id
//
* @param id 用户点击的id
*/
//
*/
//
private
void
showView
(
int
id
)
{
//
private void showView(int id) {
switch
(
id
)
{
//
switch (id) {
case
R
.
id
.
rd_gettype_all
:
{
//
case R.id.rd_gettype_all: {
mViewBinding
.
llAll
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.llAll.setVisibility(View.VISIBLE);
mViewBinding
.
llCategory
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.llCategory.setVisibility(View.GONE);
mViewBinding
.
llShop
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.llShop.setVisibility(View.GONE);
}
//
}
break
;
//
break;
case
R
.
id
.
rd_gettype_category
:
{
//
case R.id.rd_gettype_category: {
//品类定义
//
//品类定义
mViewBinding
.
llAll
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.llAll.setVisibility(View.GONE);
mViewBinding
.
llCategory
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.llCategory.setVisibility(View.VISIBLE);
mViewBinding
.
llShop
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.llShop.setVisibility(View.GONE);
}
//
}
break
;
//
break;
case
R
.
id
.
rd_gettype_shop
:
{
//
case R.id.rd_gettype_shop: {
//商品定义
//
//商品定义
mViewBinding
.
llAll
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.llAll.setVisibility(View.GONE);
mViewBinding
.
llCategory
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.llCategory.setVisibility(View.GONE);
mViewBinding
.
llShop
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.llShop.setVisibility(View.VISIBLE);
}
//
}
break
;
//
break;
}
//
}
//
}
//
}
//
@Override
//
@Override
public
void
onConfirmClick
(
View
view
)
{
//
public void onConfirmClick(View view) {
super
.
onConfirmClick
(
view
);
//
super.onConfirmClick(view);
if
(
isNullAndSetDate
())
{
//
if (isNullAndSetDate()) {
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
//
LoadingDialog loadingDialog = new LoadingDialog();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
//
loadingDialog.show((BaseActivity) getActivity());
if
(
nowType
==
0
)
{
//
if (nowType == 0) {
//修改
//
//修改
mPresenter
.
update
(
gbound
,
loadingDialog
);
//
mPresenter.update(gbound, loadingDialog);
LogUtils
.
e
(
"修改"
);
//
LogUtils.e("修改");
}
else
if
(
nowType
==
1
)
{
//
} else if (nowType == 1) {
//新增
//
//新增
mPresenter
.
add
(
gbound
,
loadingDialog
);
//
mPresenter.add(gbound, loadingDialog);
LogUtils
.
e
(
"新增"
);
//
LogUtils.e("新增");
}
//
}
//
this
.
dismiss
();
//
this.dismiss();
}
else
{
//
} else {
ToastUtils
.
showLong
(
"输入数据不能null"
);
//
ToastUtils.showLong("输入数据不能null");
}
//
}
//
}
//
}
//
/**
//
/**
* 请求成功设置数据
//
* 请求成功设置数据
*
//
*
* @param list
//
* @param list
* @param nowList
//
* @param nowList
*/
//
*/
//
public
void
setCategoryDate
(
List
<
Category
>
list
,
int
nowList
)
{
//
public void setCategoryDate(List<Category> list, int nowList) {
listCategory
=
list
;
//
listCategory = list;
initCustomOptionPicker
(
list
,
nowList
);
//
initCustomOptionPicker(list, nowList);
}
//
}
//
//
/**
//
/**
* 判断用户输入数据是否为null
//
* 判断用户输入数据是否为null
*
//
*
* @return 输入为null返回false 反之返回true
//
* @return 输入为null返回false 反之返回true
*/
//
*/
private
boolean
isNullAndSetDate
()
{
//
private boolean isNullAndSetDate() {
if
(
gbound
.
getVipGboundType
()
==
null
||
gbound
.
getVipLevel
()
==
null
)
{
//
if (gbound.getVipGboundType() == null || gbound.getVipLevel() == null) {
return
false
;
//
return false;
}
//
}
switch
(
gbound
.
getVipGboundType
())
{
//
switch (gbound.getVipGboundType()) {
case
0
:
{
//
case 0: {
if
(
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralWeight
.
getText
().
toString
())
//
if (TextUtils.isEmpty(mViewBinding.etIntegralWeight.getText().toString())
||
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralTimeLimit
.
getText
().
toString
//
|| TextUtils.isEmpty(mViewBinding.etIntegralTimeLimit.getText().toString
()))
{
//
())) {
return
false
;
//
return false;
}
else
{
//
} else {
mViewBinding
.
tvRulesName
.
setText
(
mViewBinding
.
etIntegralWeight
.
getText
()
//
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralWeight.getText()
.
toString
()
+
//
.toString() +
"元送一个积分"
);
//
"元送一个积分");
gbound
.
setTransAmt
(
ConvertUtil
.
yuanToFen
(
mViewBinding
.
etIntegralWeight
//
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralWeight
.
getText
().
toString
()));
//
.getText().toString()));
gbound
.
setBoundExp
(
Byte
.
parseByte
(
mViewBinding
.
etIntegralTimeLimit
.
getText
()
//
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralTimeLimit.getText()
.
toString
()));
//
.toString()));
}
//
}
}
//
}
break
;
//
break;
case
1
:
{
//
case 1: {
if
(
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralCategoryWeight
.
getText
().
toString
())
//
if (TextUtils.isEmpty(mViewBinding.etIntegralCategoryWeight.getText().toString())
||
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralCategoryTimeLimit
.
getText
()
//
|| TextUtils.isEmpty(mViewBinding.etIntegralCategoryTimeLimit.getText()
.
toString
())
||
gbound
.
getSpuCateId
()
==
-
1
)
{
//
.toString()) || gbound.getSpuCateId() == -1) {
return
false
;
//
return false;
}
else
{
//
} else {
mViewBinding
.
tvRulesName
.
setText
(
mViewBinding
.
etIntegralCategoryWeight
//
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralCategoryWeight
.
getText
().
toString
()
+
//
.getText().toString() +
"元送一个积分"
);
//
"元送一个积分");
gbound
.
setTransAmt
(
ConvertUtil
.
yuanToFen
(
mViewBinding
//
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding
.
etIntegralCategoryWeight
.
getText
().
toString
()));
//
.etIntegralCategoryWeight.getText().toString()));
gbound
.
setBoundExp
(
Byte
.
parseByte
(
mViewBinding
.
etIntegralCategoryTimeLimit
//
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralCategoryTimeLimit
.
getText
().
toString
()));
//
.getText().toString()));
}
//
}
}
//
}
break
;
//
break;
case
2
:
{
//
case 2: {
if
(
TextUtils
.
isEmpty
(
mViewBinding
.
etShopTimeLimit
.
getText
().
toString
()))
{
//
if (TextUtils.isEmpty(mViewBinding.etShopTimeLimit.getText().toString())) {
return
false
;
//
return false;
}
else
{
//
} else {
mViewBinding
.
tvRulesName
.
setText
(
"商品定义规则"
);
//
mViewBinding.tvRulesName.setText("商品定义规则");
gbound
.
setBoundExp
(
Byte
.
parseByte
(
mViewBinding
.
etShopTimeLimit
.
getText
()
//
gbound.setBoundExp(Byte.parseByte(mViewBinding.etShopTimeLimit.getText()
.
toString
()));
//
.toString()));
}
//
}
}
//
}
break
;
//
break;
}
//
}
gbound
.
setTruleName
(
mViewBinding
.
tvRulesName
.
getText
().
toString
());
//
gbound.setTruleName(mViewBinding.tvRulesName.getText().toString());
return
true
;
//
return true;
}
//
}
//
/**
//
/**
* @param gbound
//
* @param gbound
*/
//
*/
public
void
setData
(
Gbound
gbound
,
LoadingDialog
loadingDialog
)
{
//
public void setData(Gbound gbound, LoadingDialog loadingDialog) {
this
.
gbound
=
gbound
.
clone
();
//
this.gbound = gbound.clone();
this
.
ShowGbound
=
gbound
;
//
this.ShowGbound = gbound;
this
.
loadingDialog
=
loadingDialog
;
//
this.loadingDialog = loadingDialog;
//置状态为修改状态
//
//置状态为修改状态
setNowType
(
0
);
//
setNowType(0);
}
//
}
//
public
void
setNowType
(
int
nowType
)
{
//
public void setNowType(int nowType) {
this
.
nowType
=
nowType
;
//
this.nowType = nowType;
}
//
}
//
/**
//
/**
* 显示软键盘,Dialog使用
//
* 显示软键盘,Dialog使用
*/
//
*/
public
void
hintKbTwo
()
{
//
public void hintKbTwo() {
View
view
=
getDialog
().
getCurrentFocus
();
//
View view = getDialog().getCurrentFocus();
if
(
view
==
null
)
{
//
if (view == null) {
return
;
//
return;
}
//
}
if
(
view
instanceof
TextView
)
{
//
if (view instanceof TextView) {
InputMethodManager
mInputMethodManager
=
(
InputMethodManager
)
getContext
()
//
InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
.
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
//
.getSystemService(Context.INPUT_METHOD_SERVICE);
mInputMethodManager
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
InputMethodManager
//
mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
.
RESULT_UNCHANGED_SHOWN
);
//
.RESULT_UNCHANGED_SHOWN);
}
//
}
}
//
}
//
@Override
//
@Override
public
void
dismiss
()
{
//
public void dismiss() {
hintKbTwo
();
//
hintKbTwo();
super
.
dismiss
();
//
super.dismiss();
}
//
}
//
}
//
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralExchangeFragment.java
0 → 100644
View file @
64c78f04
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
integral
.
fragment
;
import
android.text.TextUtils
;
import
android.view.View
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.DialogIntegralExchangeSettingBinding
;
import
com.xingdata.zzdpos.model.Ubound
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter
;
import
com.xingdata.zzdpos.util.ConvertUtil
;
import
com.xingdata.zzdpos.util.OnClickListener
;
/**
* 绑定款台界面
* <p>
* 设备没有绑定款台的进行绑定操作
*/
public
class
IntegralExchangeFragment
extends
BaseFragment
<
IntegralPresenter
,
DialogIntegralExchangeSettingBinding
>
{
Ubound
ubound
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
dialog_integral_exchange_setting
;
}
@Override
public
void
initView
()
{
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"积分规则"
);
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
pop
();
}
});
mViewBinding
.
setOnClickListener
(
view
->
{
// hintKbTwo();
switch
(
view
.
getId
())
{
case
R
.
id
.
rd_suspendeds
:
{
//暂停
ubound
.
setBoundUseStatus
((
byte
)
1
);
}
break
;
case
R
.
id
.
rd_starts
:
{
//启用
ubound
.
setBoundUseStatus
((
byte
)
0
);
}
break
;
case
R
.
id
.
btn_ok
:
{
if
(
isNullAndSet
())
{
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
ubound
.
setUpdateTime
(
null
);
ubound
.
setCreateTime
(
null
);
mPresenter
.
exchangeUpdate
(
ubound
,
loadingDialog
);
}
else
{
ToastUtils
.
showLong
(
"输入数据不能null"
);
}
}
break
;
}
});
initUiData
();
}
private
void
initUiData
()
{
if
(
ubound
!=
null
)
{
if
(
ubound
.
getBoundUseStatus
()
!=
null
&&
ubound
.
getBoundUseStatus
()
==
0
)
{
mViewBinding
.
rdStarts
.
setChecked
(
true
);
}
else
if
(
ubound
.
getBoundUseStatus
()
!=
null
&&
ubound
.
getBoundUseStatus
()
==
1
)
{
mViewBinding
.
rdSuspendeds
.
setChecked
(
true
);
}
if
(
ubound
.
getBoundValAmt
()
!=
null
)
{
mViewBinding
.
etIntegralExchangeRuleCountMoney
.
setText
(
ubound
.
getBoundValAmt
()
+
""
);
}
if
(
ubound
.
getBoundOrderAmt
()
!=
null
)
{
mViewBinding
.
etIntegralExchangeMoney
.
setText
(
ConvertUtil
.
fenToYuanNoPoint
(
ubound
.
getBoundOrderAmt
()));
}
if
(
ubound
.
getBoundUseNum
()
!=
null
)
{
mViewBinding
.
etIntegralExchangeCount
.
setText
(
ubound
.
getBoundUseNum
()
+
""
);
}
}
}
public
void
setData
(
Ubound
ubound
)
{
this
.
ubound
=
ubound
;
}
/**
* 判断用户输入数据是否为null
*
* @return 输入为null返回false 反之返回true
*/
private
boolean
isNullAndSet
()
{
if
(
ubound
==
null
||
ubound
.
getBoundUseStatus
()
==
null
)
{
return
false
;
}
if
(
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralExchangeRuleCountMoney
.
getText
().
toString
())
||
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralExchangeMoney
.
getText
().
toString
())
||
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralExchangeCount
.
getText
().
toString
()))
{
return
false
;
}
ubound
.
setBoundValAmt
(
Long
.
parseLong
(
mViewBinding
.
etIntegralExchangeRuleCountMoney
.
getText
().
toString
()));
ubound
.
setBoundOrderAmt
(
ConvertUtil
.
yuanToFen
(
mViewBinding
.
etIntegralExchangeMoney
.
getText
().
toString
()));
ubound
.
setBoundUseNum
(
Long
.
parseLong
(
mViewBinding
.
etIntegralExchangeCount
.
getText
()
.
toString
()));
return
true
;
}
// /**
// * 显示软键盘,Dialog使用
// */
// public void hintKbTwo() {
// View view = getDialog().getCurrentFocus();
// if (view == null) {
// return;
// }
// if (view instanceof TextView) {
// InputMethodManager mInputMethodManager = (InputMethodManager) getContext()
// .getSystemService(Context.INPUT_METHOD_SERVICE);
// mInputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager
// .RESULT_UNCHANGED_SHOWN);
// }
// }
// @Override
// public void dismiss() {
// hintKbTwo();
// super.dismiss();
// }
}
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralGetFragment.java
View file @
64c78f04
...
@@ -55,7 +55,7 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
...
@@ -55,7 +55,7 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
//进度对话框
//进度对话框
LoadingDialog
loadingDialog
;
LoadingDialog
loadingDialog
;
//当前点击商品类型空间id,防止直接点击商品第二三种类型
//当前点击商品类型空间id,防止直接点击商品第二三种类型
private
int
nowShopTypeId
=
1
;
private
int
nowShopTypeId
=
0
;
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
...
@@ -64,6 +64,13 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
...
@@ -64,6 +64,13 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"积分规则"
);
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
pop
();
}
});
mViewBinding
.
setOnClickListener
(
mViewBinding
.
setOnClickListener
(
new
OnClickListener
()
{
new
OnClickListener
()
{
@Override
@Override
...
@@ -118,7 +125,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
...
@@ -118,7 +125,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
if
(
nowShopTypeId
>=
1
)
{
if
(
nowShopTypeId
>=
1
)
{
mPresenter
.
initData
(
getCategory
(
v
.
getId
()),
TWO_CATEGORY
);
mPresenter
.
initData
(
getCategory
(
v
.
getId
()),
TWO_CATEGORY
);
mViewBinding
.
tvCategorySelectThree
.
setText
(
""
);
mViewBinding
.
tvCategorySelectThree
.
setText
(
""
);
nowShopTypeId
=
2
;
}
else
{
}
else
{
ToastUtils
.
showLong
(
"请先选择第一类品类"
);
ToastUtils
.
showLong
(
"请先选择第一类品类"
);
}
}
...
@@ -127,7 +133,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
...
@@ -127,7 +133,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
case
R
.
id
.
tv_category_select_three
:
{
case
R
.
id
.
tv_category_select_three
:
{
if
(
nowShopTypeId
>=
2
)
{
if
(
nowShopTypeId
>=
2
)
{
mPresenter
.
initData
(
getCategory
(
v
.
getId
()),
THREE_CATEGORY
);
mPresenter
.
initData
(
getCategory
(
v
.
getId
()),
THREE_CATEGORY
);
nowShopTypeId
=
3
;
}
else
{
}
else
{
ToastUtils
.
showLong
(
"请先选择第一二类品类"
);
ToastUtils
.
showLong
(
"请先选择第一二类品类"
);
}
}
...
@@ -349,18 +354,21 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
...
@@ -349,18 +354,21 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
//返回的分别是三个级别的选中位置
//返回的分别是三个级别的选中位置
switch
(
nowList
)
{
switch
(
nowList
)
{
case
ONE_CATEGORY:
{
case
ONE_CATEGORY:
{
nowShopTypeId
=
1
;
mViewBinding
.
tvCategorySelectOne
.
setText
(
listCategory
.
get
(
options1
)
mViewBinding
.
tvCategorySelectOne
.
setText
(
listCategory
.
get
(
options1
)
.
getSpuClaName
());
.
getSpuClaName
());
spuCateIdTwo
=
listCategory
.
get
(
options1
).
getSpuCateId
();
spuCateIdTwo
=
listCategory
.
get
(
options1
).
getSpuCateId
();
}
}
break
;
break
;
case
TWO_CATEGORY:
{
case
TWO_CATEGORY:
{
nowShopTypeId
=
2
;
mViewBinding
.
tvCategorySelectTwo
.
setText
(
listCategory
.
get
(
options1
)
mViewBinding
.
tvCategorySelectTwo
.
setText
(
listCategory
.
get
(
options1
)
.
getSpuGrpName
());
.
getSpuGrpName
());
spuCateIdThree
=
listCategory
.
get
(
options1
).
getSpuCateId
();
spuCateIdThree
=
listCategory
.
get
(
options1
).
getSpuCateId
();
}
}
break
;
break
;
case
THREE_CATEGORY:
{
case
THREE_CATEGORY:
{
nowShopTypeId
=
3
;
mViewBinding
.
tvCategorySelectThree
.
setText
(
listCategory
.
get
(
options1
)
mViewBinding
.
tvCategorySelectThree
.
setText
(
listCategory
.
get
(
options1
)
.
getSpuCateName
());
.
getSpuCateName
());
...
...
app/src/main/java/com/xingdata/zzdpos/ui/marketing/integral/fragment/IntegralIndexFragment.java
View file @
64c78f04
...
@@ -20,7 +20,6 @@ import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity;
...
@@ -20,7 +20,6 @@ import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter
;
import
com.xingdata.zzdpos.ui.marketing.integral.IntegralPresenter
;
import
com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralAdapter
;
import
com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralAdapter
;
import
com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralExchangeAdapter
;
import
com.xingdata.zzdpos.ui.marketing.integral.adapter.IntegralExchangeAdapter
;
import
com.xingdata.zzdpos.ui.marketing.integral.dialog.IntegralExchangeDialog
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -80,6 +79,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
...
@@ -80,6 +79,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
mViewBinding
.
setOnClickListener
(
v
->
{
mViewBinding
.
setOnClickListener
(
v
->
{
switch
(
v
.
getId
())
{
switch
(
v
.
getId
())
{
case
R
.
id
.
btn_add
:
{
case
R
.
id
.
btn_add
:
{
mPresenter
.
integralGetFragment
=
new
IntegralGetFragment
();
mPresenter
.
integralGetFragment
.
setNowType
(
1
);
mPresenter
.
integralGetFragment
.
setNowType
(
1
);
start
(
mPresenter
.
integralGetFragment
);
start
(
mPresenter
.
integralGetFragment
);
// integralGetDialog = new IntegralGetDialog();
// integralGetDialog = new IntegralGetDialog();
...
@@ -197,6 +197,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
...
@@ -197,6 +197,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
if
((
System
.
currentTimeMillis
()
-
mExitTime
)
>
1000
)
{
if
((
System
.
currentTimeMillis
()
-
mExitTime
)
>
1000
)
{
// integralGetDialog = new IntegralGetDialog();
// integralGetDialog = new IntegralGetDialog();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
mPresenter
.
integralGetFragment
=
new
IntegralGetFragment
();
mPresenter
.
integralGetFragment
.
setData
(
gbound
,
loadingDialog
);
mPresenter
.
integralGetFragment
.
setData
(
gbound
,
loadingDialog
);
start
(
mPresenter
.
integralGetFragment
);
start
(
mPresenter
.
integralGetFragment
);
// integralGetDialog.show((BaseActivity) getActivity());
// integralGetDialog.show((BaseActivity) getActivity());
...
@@ -213,9 +214,12 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
...
@@ -213,9 +214,12 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
*/
*/
private
void
exchangeClickProduct
(
Ubound
gbound
)
{
private
void
exchangeClickProduct
(
Ubound
gbound
)
{
if
((
System
.
currentTimeMillis
()
-
mExitTime
)
>
1000
)
{
if
((
System
.
currentTimeMillis
()
-
mExitTime
)
>
1000
)
{
IntegralExchangeDialog
integralExchangeDialog
=
new
IntegralExchangeDialog
();
mPresenter
.
integralExchangeFragment
=
new
IntegralExchangeFragment
();
integralExchangeDialog
.
setData
(
gbound
);
mPresenter
.
integralExchangeFragment
.
setData
(
gbound
);
integralExchangeDialog
.
show
((
BaseActivity
)
getActivity
());
start
(
mPresenter
.
integralExchangeFragment
);
// IntegralExchangeDialog integralExchangeDialog = new IntegralExchangeDialog();
// integralExchangeDialog.setData(gbound);
// integralExchangeDialog.show((BaseActivity) getActivity());
mExitTime
=
System
.
currentTimeMillis
();
mExitTime
=
System
.
currentTimeMillis
();
}
else
{
}
else
{
ToastUtils
.
showLong
(
"您操作太快了"
);
ToastUtils
.
showLong
(
"您操作太快了"
);
...
...
app/src/main/res/layout/dialog_integral_exchange_setting.xml
View file @
64c78f04
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
</data>
</data>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -16,6 +20,19 @@
...
@@ -16,6 +20,19 @@
android:focusable=
"true"
android:focusable=
"true"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<include
android:id=
"@+id/ic_title"
layout=
"@layout/title"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/gray_zhouyu"
android:gravity=
"left|center_vertical"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"基本信息"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/text_secondary_title"
/>
<View
<View
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -29,22 +46,23 @@
...
@@ -29,22 +46,23 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
<TextView
android:id=
"@+id/tv_status"
android:id=
"@+id/tv_status"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1
"
android:layout_weight=
"2
"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"启用状态:"
android:text=
"启用状态:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<RadioGroup
<RadioGroup
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1
"
android:layout_weight=
"5
"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<RadioButton
<RadioButton
...
@@ -55,7 +73,6 @@
...
@@ -55,7 +73,6 @@
android:layout_marginRight=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:onClick=
"@{OnClickListener}"
android:text=
"暂停 "
android:text=
"暂停 "
...
@@ -77,12 +94,13 @@
...
@@ -77,12 +94,13 @@
</RadioGroup>
</RadioGroup>
</LinearLayout>
</LinearLayout>
<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:background=
"@color/gary1
"
android:layout_marginLeft=
"@dimen/all_padding
"
android:paddingLeft=
"@dimen/all_margin
"
android:layout_marginRight=
"@dimen/all_padding
"
android:paddingRight=
"@dimen/all_margin
"
></View>
android:background=
"@color/gary1
"
></View>
<LinearLayout
<LinearLayout
...
@@ -98,16 +116,17 @@
...
@@ -98,16 +116,17 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"积分面值:"
android:text=
"积分面值:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<EditText
<EditText
android:id=
"@+id/et_integral_exchange_rule_count_money"
android:id=
"@+id/et_integral_exchange_rule_count_money"
...
@@ -115,7 +134,7 @@
...
@@ -115,7 +134,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2
"
android:layout_weight=
"3
"
android:digits=
"1234567890"
android:digits=
"1234567890"
android:ems=
"5"
android:ems=
"5"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
...
@@ -126,34 +145,38 @@
...
@@ -126,34 +145,38 @@
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"3
"
android:layout_weight=
"2
"
android:text=
" 个积分等于1元"
android:text=
" 个积分等于1元"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/gray_zhouyu"
android:gravity=
"left|center_vertical"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"兑换条件"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/text_secondary_title"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin"
android:text=
"兑换条件:"
android:textColor=
"@color/black"
android:textSize=
"@dimen/text_secondary_title"
/>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:gravity=
"right"
android:gravity=
"left"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"订单实收满 "
android:text=
"订单实收满 "
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
<EditText
<EditText
...
@@ -162,7 +185,7 @@
...
@@ -162,7 +185,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2
"
android:layout_weight=
"4
"
android:digits=
"1234567890"
android:digits=
"1234567890"
android:ems=
"5"
android:ems=
"5"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
...
@@ -173,36 +196,35 @@
...
@@ -173,36 +196,35 @@
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"3
"
android:layout_weight=
"1
"
android:text=
"元"
android:text=
"元"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:background=
"@color/gary1"
></View>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_margin"
android:paddingTop=
"@dimen/all_padding"
>
android:paddingTop=
"@dimen/all_margin"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin"
android:text=
""
android:textColor=
"@color/black"
android:textSize=
"@dimen/text_secondary_title"
/>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:gravity=
"right"
android:gravity=
"left"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"可以使用 "
android:text=
"可以使用 "
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
<EditText
<EditText
...
@@ -211,7 +233,7 @@
...
@@ -211,7 +233,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2
"
android:layout_weight=
"4
"
android:digits=
"1234567890"
android:digits=
"1234567890"
android:ems=
"5"
android:ems=
"5"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
...
@@ -222,13 +244,29 @@
...
@@ -222,13 +244,29 @@
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"3
"
android:layout_weight=
"1
"
android:text=
"个积分"
android:text=
"个积分"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gary1"
></View>
</LinearLayout>
</LinearLayout>
<Button
android:id=
"@+id/btn_ok"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_margin=
"@dimen/all_margin"
android:background=
"@color/red_guanyu"
android:onClick=
"@{OnClickListener}"
android:text=
"确定"
android:textColor=
"@color/white"
android:textSize=
"@dimen/et_textsize"
/>
</RelativeLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/dialog_integral_get_setting.xml
View file @
64c78f04
...
@@ -24,6 +24,10 @@
...
@@ -24,6 +24,10 @@
type=
"String"
/>
type=
"String"
/>
</data>
</data>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -31,64 +35,82 @@
...
@@ -31,64 +35,82 @@
android:focusable=
"true"
android:focusable=
"true"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<include
android:id=
"@+id/ic_title"
layout=
"@layout/title"
/>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/gray_zhouyu"
android:gravity=
"left|center_vertical"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"基本信息"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/text_secondary_title"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
<TextView
android:id=
"@+id/tv_rules_name"
android:id=
"@+id/tv_rules_name"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1
"
android:layout_weight=
"2
"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"规则名称:"
android:text=
"规则名称:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<TextView
<TextView
android:id=
"@+id/et_integral_role_name"
android:id=
"@+id/et_integral_role_name"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1
"
android:layout_weight=
"5
"
android:focusable=
"true"
android:focusable=
"true"
android:maxLines=
"1"
android:maxLines=
"1"
android:singleLine=
"true"
android:singleLine=
"true"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
</LinearLayout>
</LinearLayout>
<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:background=
"@color/gary1"
android:layout_marginLeft=
"@dimen/all_padding"
android:paddingLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_padding"
android:paddingRight=
"@dimen/all_margin"
></View>
android:background=
"@color/gary1"
></View>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
<TextView
android:id=
"@+id/tv_status"
android:id=
"@+id/tv_status"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1
"
android:layout_weight=
"2
"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"启用状态:"
android:text=
"启用状态:"
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<RadioGroup
<RadioGroup
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1
"
android:layout_weight=
"5
"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<RadioButton
<RadioButton
...
@@ -123,30 +145,37 @@
...
@@ -123,30 +145,37 @@
<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:background=
"@color/gary1"
android:layout_marginLeft=
"@dimen/all_padding"
android:paddingLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_padding"
android:paddingRight=
"@dimen/all_margin"
></View>
android:background=
"@color/gary1"
></View>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"@color/gray_zhouyu"
android:gravity=
"left|center_vertical"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"规则设置"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/text_secondary_title"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_margin"
android:paddingTop=
"@dimen/all_padding"
>
android:paddingLeft=
"@dimen/all_margin"
android:paddingRight=
"@dimen/all_margin"
android:paddingTop=
"@dimen/all_margin_big"
>
<TextView
<TextView
android:id=
"@+id/tv_vip_level"
android:id=
"@+id/tv_vip_level"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"会员等级:"
android:text=
"会员等级:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<TextView
<TextView
android:id=
"@+id/tv_vip_level_select"
android:id=
"@+id/tv_vip_level_select"
...
@@ -154,7 +183,7 @@
...
@@ -154,7 +183,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"5
"
android:layout_weight=
"4
"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ems=
"10"
android:ems=
"10"
android:gravity=
"center"
android:gravity=
"center"
...
@@ -169,7 +198,7 @@
...
@@ -169,7 +198,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"5
"
android:layout_weight=
"4
"
android:ems=
"10"
android:ems=
"10"
android:gravity=
"center"
android:gravity=
"center"
android:maxLength=
"5"
android:maxLength=
"5"
...
@@ -182,30 +211,38 @@
...
@@ -182,30 +211,38 @@
android:id=
"@+id/ns_vip_level"
android:id=
"@+id/ns_vip_level"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2
"
android:layout_weight=
"1
"
/>
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:background=
"@color/gary1"
></View>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"获取方式:"
android:text=
"获取方式:"
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<RadioGroup
<RadioGroup
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"7
"
android:layout_weight=
"5
"
android:checkedButton=
"@id/rd_gettype_all"
android:checkedButton=
"@id/rd_gettype_all"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -213,14 +250,12 @@
...
@@ -213,14 +250,12 @@
android:id=
"@+id/rd_gettype_all"
android:id=
"@+id/rd_gettype_all"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:onClick=
"@{OnClickListener}"
android:text=
"通用 "
android:text=
"通用 "
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
<RadioButton
...
@@ -228,13 +263,12 @@
...
@@ -228,13 +263,12 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:onClick=
"@{OnClickListener}"
android:text=
"品类定义 "
android:text=
"品类定义 "
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
<RadioButton
...
@@ -242,17 +276,23 @@
...
@@ -242,17 +276,23 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:onClick=
"@{OnClickListener}"
android:text=
"商品定义 "
android:text=
"商品定义 "
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</RadioGroup>
</RadioGroup>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:background=
"@color/gary1"
></View>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_all"
android:id=
"@+id/ll_all"
...
@@ -260,22 +300,24 @@
...
@@ -260,22 +300,24 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:visibility=
"visible"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"积分比例:"
android:text=
"积分比例:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<EditText
<EditText
android:id=
"@+id/et_integral_weight"
android:id=
"@+id/et_integral_weight"
...
@@ -283,7 +325,7 @@
...
@@ -283,7 +325,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2
"
android:layout_weight=
"3
"
android:digits=
"1234567890"
android:digits=
"1234567890"
android:ems=
"5"
android:ems=
"5"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
...
@@ -294,28 +336,36 @@
...
@@ -294,28 +336,36 @@
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"5
"
android:layout_weight=
"2
"
android:text=
"元一个积分"
android:text=
"元一个积分"
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:background=
"@color/gary1"
></View>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding
=
"@dimen/all_padding"
android:paddingBottom
=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_margin
"
android:paddingTop=
"@dimen/all_padding
"
android:paddingTop=
"@dimen/all_margin"
>
>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"有效期限:"
android:text=
"有效期限:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<EditText
<EditText
android:id=
"@+id/et_integral_time_limit"
android:id=
"@+id/et_integral_time_limit"
...
@@ -323,24 +373,32 @@
...
@@ -323,24 +373,32 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2
"
android:layout_weight=
"3
"
android:digits=
"1234567890"
android:digits=
"1234567890"
android:ems=
"5
"
android:ems=
"2
"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:inputType=
"phone|number"
android:maxLength=
"5
"
android:maxLength=
"2
"
android:saveEnabled=
"false"
/>
android:saveEnabled=
"false"
/>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"5
"
android:layout_weight=
"2
"
android:text=
"个月"
android:text=
"个月"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:background=
"@color/gary1"
></View>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_category"
android:id=
"@+id/ll_category"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -355,18 +413,17 @@
...
@@ -355,18 +413,17 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_margin"
android:paddingTop=
"@dimen/all_padding"
>
android:paddingTop=
"@dimen/all_margin"
>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"商品品类:"
android:text=
"商品品类:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<TextView
<TextView
android:id=
"@+id/tv_category_select_one"
android:id=
"@+id/tv_category_select_one"
...
@@ -374,7 +431,7 @@
...
@@ -374,7 +431,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2
"
android:layout_weight=
"1.5
"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ellipsize=
"end"
android:ellipsize=
"end"
android:gravity=
"center"
android:gravity=
"center"
...
@@ -392,7 +449,7 @@
...
@@ -392,7 +449,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"2
"
android:layout_weight=
"1.5
"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ellipsize=
"end"
android:ellipsize=
"end"
android:gravity=
"center"
android:gravity=
"center"
...
@@ -410,7 +467,7 @@
...
@@ -410,7 +467,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"2
"
android:layout_weight=
"1.5
"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ellipsize=
"end"
android:ellipsize=
"end"
android:ems=
"10"
android:ems=
"10"
...
@@ -428,7 +485,7 @@
...
@@ -428,7 +485,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"6
"
android:layout_weight=
"4.5
"
android:ellipsize=
"end"
android:ellipsize=
"end"
android:ems=
"20"
android:ems=
"20"
android:gravity=
"center"
android:gravity=
"center"
...
@@ -442,27 +499,33 @@
...
@@ -442,27 +499,33 @@
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_weight=
"0.5"
/>
android:text=
""
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:background=
"@color/gary1"
></View>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"积分比例:"
android:text=
"积分比例:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<EditText
<EditText
android:id=
"@+id/et_integral_category_weight"
android:id=
"@+id/et_integral_category_weight"
...
@@ -470,7 +533,7 @@
...
@@ -470,7 +533,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2
"
android:layout_weight=
"3
"
android:digits=
"1234567890"
android:digits=
"1234567890"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:inputType=
"phone|number"
...
@@ -480,28 +543,36 @@
...
@@ -480,28 +543,36 @@
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"5
"
android:layout_weight=
"2
"
android:text=
"元一个积分"
android:text=
"元一个积分"
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_marginRight=
"@dimen/all_padding"
android:background=
"@color/gary1"
></View>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"有效期限:"
android:text=
"有效期限:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<EditText
<EditText
android:id=
"@+id/et_integral_category_time_limit"
android:id=
"@+id/et_integral_category_time_limit"
...
@@ -509,21 +580,21 @@
...
@@ -509,21 +580,21 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2
"
android:layout_weight=
"3
"
android:digits=
"1234567890"
android:digits=
"1234567890"
android:ems=
"5
"
android:ems=
"2
"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:inputType=
"phone|number"
android:maxLength=
"5
"
android:maxLength=
"2
"
android:saveEnabled=
"false"
android:saveEnabled=
"false"
android:textColor=
"@color/black
"
/>
android:textColor=
"@color/black_baozheng
"
/>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"5
"
android:layout_weight=
"2
"
android:text=
"个月"
android:text=
"个月"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
...
@@ -534,7 +605,7 @@
...
@@ -534,7 +605,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:background=
"@color/white"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding
=
"@dimen/all_padding"
android:paddingBottom
=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
android:visibility=
"gone"
>
android:visibility=
"gone"
>
...
@@ -542,10 +613,10 @@
...
@@ -542,10 +613,10 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:layout_weight=
"2"
android:paddingStart=
"@dimen/all_margin
"
android:paddingLeft=
"@dimen/all_padding
"
android:text=
"有效期限:"
android:text=
"有效期限:"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/text_secondary_titl
e"
/>
android:textSize=
"@dimen/et_textsiz
e"
/>
<EditText
<EditText
android:id=
"@+id/et_shop_time_limit"
android:id=
"@+id/et_shop_time_limit"
...
@@ -553,33 +624,42 @@
...
@@ -553,33 +624,42 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2
"
android:layout_weight=
"3
"
android:digits=
"1234567890"
android:digits=
"1234567890"
android:ems=
"5
"
android:ems=
"2
"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:inputType=
"phone|number"
android:maxEms=
"5
"
android:maxEms=
"2
"
android:maxLength=
"5
"
android:maxLength=
"2
"
android:saveEnabled=
"false"
android:saveEnabled=
"false"
android:textColor=
"@color/black"
/>
android:textColor=
"@color/black"
/>
<TextView
<TextView
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"5
"
android:layout_weight=
"2
"
android:text=
"个月"
android:text=
"个月"
android:textColor=
"@color/black
"
android:textColor=
"@color/black_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gary1"
></View>
</LinearLayout>
<Button
<Button
android:id=
"@+id/btn_add"
android:id=
"@+id/btn_add"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_margin=
"@dimen/all_margin"
android:background=
"@color/red_guanyu"
android:background=
"@color/red_guanyu"
android:text=
"添加"
android:textColor=
"@color/white"
android:onClick=
"@{OnClickListener}"
android:onClick=
"@{OnClickListener}"
android:text=
"确定"
android:textColor=
"@color/white"
android:textSize=
"@dimen/et_textsize"
/>
android:textSize=
"@dimen/et_textsize"
/>
</
Linear
Layout>
</
Relative
Layout>
</layout>
</layout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment