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
Hide 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;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.bigkoo.pickerview.model.IPickerViewData
;
import
com.xingdata.zzdpos.base.BaseBean
;
import
com.xingdata.zzdpos.ui.marketing.integral.fragment.IntegralGetFragment
;
/**
* Created by Administrator on 2017/11/27.
...
...
@@ -132,15 +133,15 @@ public class Category implements BaseBean, IPickerViewData {
@Override
public
String
getPickerViewText
()
{
switch
(
nowCategory
)
{
// case IntegralGetDialog
.ONE_CATEGORY: {
//
return getSpuClaName() + "";
//
}
// case IntegralGetDialog
.TWO_CATEGORY: {
//
return getSpuGrpName() + "";
//
}
// case IntegralGetDialog
.THREE_CATEGORY: {
//
return getSpuCateName() + "";
//
}
case
IntegralGetFragment
.
ONE_CATEGORY
:
{
return
getSpuClaName
()
+
""
;
}
case
IntegralGetFragment
.
TWO_CATEGORY
:
{
return
getSpuGrpName
()
+
""
;
}
case
IntegralGetFragment
.
THREE_CATEGORY
:
{
return
getSpuCateName
()
+
""
;
}
}
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;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreAddressJsonBean
;
import
com.xingdata.zzdpos.ui.login.fragment.bean.StoreTypeJsonBean
;
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.splash.SplashActivity
;
import
com.xingdata.zzdpos.view.PopupWindowDownList
;
...
...
@@ -138,7 +139,7 @@ public class LoginActivity extends BaseActivity<LoginPresenter, ActivityLoginBin
promptDialog
.
dismiss
();
//如果sn已经绑定款台,则直接跳转主页
if
(
loginReturnBean
.
getBindSN
())
{
startActivity
(
new
Intent
(
LoginActivity
.
this
,
Integral
Activity
.
class
));
startActivity
(
new
Intent
(
LoginActivity
.
this
,
ReturnTicket
Activity
.
class
));
LoginActivity
.
this
.
finish
();
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
@Override
public
void
addSucc
(
LoadingDialog
loadingDialog
)
{
pop
();
mPresenter
.
query
(
1
,
mPresenter
.
integralIndexFragment
.
NORMAL_TYPE
,
loadingDialog
);
}
...
...
@@ -82,6 +83,7 @@ public class IntegralActivity extends BaseActivity<IntegralPresenter, ActivityIn
@Override
public
void
exchangeUpdateSucc
(
Ubound
ubound
,
LoadingDialog
loadingDialog
)
{
pop
();
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;
import
com.xingdata.zzdpos.model.Gbound
;
import
com.xingdata.zzdpos.model.Ubound
;
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.IntegralIndexFragment
;
...
...
@@ -23,6 +24,7 @@ public class IntegralPresenter extends IntegralContract.Presenter {
private
int
number
=
1
;
public
IntegralIndexFragment
integralIndexFragment
=
new
IntegralIndexFragment
();
public
IntegralGetFragment
integralGetFragment
=
new
IntegralGetFragment
();
public
IntegralExchangeFragment
integralExchangeFragment
=
new
IntegralExchangeFragment
();
@Override
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
;
import
android.annotation.SuppressLint
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.inputmethod.InputMethodManager
;
import
android.widget.TextView
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseDialog
;
import
com.xingdata.zzdpos.databinding.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
;
/**
* 积分兑换设置界面
*/
public
class
IntegralExchangeDialog
extends
BaseDialog
<
IntegralPresenter
,
DialogIntegralExchangeSettingBinding
>
{
Ubound
ubound
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
dialog_integral_exchange_setting
;
}
@Override
protected
boolean
isShowTitle
()
{
return
true
;
}
@Override
public
int
getTitle
()
{
return
R
.
string
.
integral_exchange_title
;
}
@SuppressLint
(
"SetTextI18n"
)
@Override
public
void
initView
()
{
setCancelable
(
false
);
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
;
}
});
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
;
}
@Override
public
void
onConfirmClick
(
View
view
)
{
super
.
onConfirmClick
(
view
);
if
(
isNullAndSet
())
{
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
ubound
.
setUpdateTime
(
null
);
ubound
.
setCreateTime
(
null
);
mPresenter
.
exchangeUpdate
(
ubound
,
loadingDialog
);
this
.
dismiss
();
}
else
{
ToastUtils
.
showLong
(
"输入数据不能null"
);
}
}
/**
* 判断用户输入数据是否为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
();
}
}
//
package com.xingdata.zzdpos.ui.marketing.integral.dialog;
//
//
import android.annotation.SuppressLint;
//
import android.content.Context;
//
import android.text.TextUtils;
//
import android.view.View;
//
import android.view.inputmethod.InputMethodManager;
//
import android.widget.TextView;
//
//
import com.blankj.utilcode.util.ToastUtils;
//
import com.xingdata.zzdpos.R;
//
import com.xingdata.zzdpos.base.BaseActivity;
//
import com.xingdata.zzdpos.base.BaseDialog;
//
import com.xingdata.zzdpos.databinding.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;
//
/
//
**
//
* 积分兑换设置界面
//
*/
//
public class IntegralExchangeDialog extends BaseDialog<IntegralPresenter,
//
DialogIntegralExchangeSettingBinding> {
//
Ubound ubound;
//
//
@Override
//
public int getLayoutId() {
//
return R.layout.dialog_integral_exchange_setting;
//
}
//
//
@Override
//
protected boolean isShowTitle() {
//
return true;
//
}
//
//
@Override
//
public int getTitle() {
//
return R.string.integral_exchange_title;
//
}
//
//
@SuppressLint("SetTextI18n")
//
@Override
//
public void initView() {
//
setCancelable(false);
//
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;
//
}
//
});
//
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;
//
}
//
//
@Override
//
public void onConfirmClick(View view) {
//
super.onConfirmClick(view);
//
if (isNullAndSet()) {
//
LoadingDialog loadingDialog = new LoadingDialog();
//
loadingDialog.show((BaseActivity) getActivity());
//
ubound.setUpdateTime(null);
//
ubound.setCreateTime(null);
//
mPresenter.exchangeUpdate(ubound, loadingDialog);
//
this.dismiss();
//
} else {
//
ToastUtils.showLong("输入数据不能null");
//
}
//
//
}
//
//
//
/**
//
* 判断用户输入数据是否为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/dialog/IntegralGetDialog.java
View file @
64c78f04
package
com
.
xingdata
.
zzdpos
.
ui
.
marketing
.
integral
.
dialog
;
import
android.annotation.SuppressLint
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.inputmethod.InputMethodManager
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.bigkoo.pickerview.OptionsPickerView
;
import
com.bigkoo.pickerview.listener.CustomListener
;
import
com.blankj.utilcode.util.LogUtils
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.App
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseDialog
;
import
com.xingdata.zzdpos.databinding.DialogIntegralGetSettingBinding
;
import
com.xingdata.zzdpos.model.Category
;
import
com.xingdata.zzdpos.model.Gbound
;
import
com.xingdata.zzdpos.model.Level
;
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
;
import
java.util.ArrayList
;
import
java.util.List
;
import
io.realm.Realm
;
import
io.realm.RealmResults
;
/**
* 积分获取设置界面
*/
public
class
IntegralGetDialog
extends
BaseDialog
<
IntegralPresenter
,
DialogIntegralGetSettingBinding
>
{
//区分请求类型 正常 加载更多,下拉刷新
public
static
final
int
ONE_CATEGORY
=
1
;
public
static
final
int
TWO_CATEGORY
=
2
;
public
static
final
int
THREE_CATEGORY
=
3
;
//请求商品类别使用的id
private
long
spuCateIdTwo
=
-
1
;
private
long
spuCateIdThree
=
-
1
;
private
OptionsPickerView
pvCustomOptions
;
private
List
<
Category
>
listCategory
=
new
ArrayList
<>();
//积分获取提交给服务器对象
private
Gbound
gbound
=
new
Gbound
();
//ui显示用
private
Gbound
ShowGbound
=
new
Gbound
();
//商品品类提交服务器对象
private
Category
category
=
new
Category
();
//当前为修改还是新增 0为修改1为新增
private
int
nowType
=
-
1
;
//进度对话框
LoadingDialog
loadingDialog
;
//当前点击商品类型空间id,防止直接点击商品第二三种类型
private
int
nowShopTypeId
=
1
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
dialog_integral_get_setting
;
}
@Override
protected
boolean
isShowTitle
()
{
return
true
;
}
@Override
public
int
getTitle
()
{
return
R
.
string
.
integral_get_title
;
}
@SuppressLint
(
"SetTextI18n"
)
@Override
public
void
initView
()
{
setCancelable
(
false
);
}
private
void
setShopTypeClick
(
Boolean
b
)
{
mViewBinding
.
rdGettypeAll
.
setEnabled
(
b
);
mViewBinding
.
rdGettypeShop
.
setEnabled
(
b
);
mViewBinding
.
rdGettypeCategory
.
setEnabled
(
b
);
if
(
b
)
{
mViewBinding
.
tvCategorySelectShowNoEdit
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
tvVipLevelSelectShowNoEdit
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
tvCategorySelectOne
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
tvCategorySelectTwo
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
tvCategorySelectThree
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
tvVipLevelSelect
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
mViewBinding
.
tvCategorySelectShowNoEdit
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
tvVipLevelSelectShowNoEdit
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
tvCategorySelectOne
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
tvCategorySelectTwo
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
tvCategorySelectThree
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
tvVipLevelSelect
.
setVisibility
(
View
.
GONE
);
}
}
private
void
updateUi
()
{
if
(
ShowGbound
!=
null
&&
ShowGbound
.
getTruleName
()
!=
null
&&
!(
ShowGbound
.
getTruleName
().
equals
(
""
)
))
{
mViewBinding
.
tvRulesName
.
setText
(
ShowGbound
.
getTruleName
());
//开通启用状态 0:正常 1 暂停 默认 0
if
(
ShowGbound
.
getBoundGetStatus
()
==
0
)
{
mViewBinding
.
rdStarts
.
setChecked
(
true
);
}
else
if
(
ShowGbound
.
getBoundGetStatus
()
==
1
)
{
mViewBinding
.
rdSuspendeds
.
setChecked
(
true
);
}
mViewBinding
.
tvVipLevelSelectShowNoEdit
.
setText
(
ShowGbound
.
getVipLevelName
());
//积分获取类型 0:通用 1:品类定义积分 2:商品定义积分
switch
(
ShowGbound
.
getVipGboundType
())
{
case
0
:
{
showView
(
R
.
id
.
rd_gettype_all
);
mViewBinding
.
rdGettypeAll
.
setChecked
(
true
);
if
(
ShowGbound
.
getTransAmt
()
!=
null
)
{
mViewBinding
.
etIntegralWeight
.
setText
(
ConvertUtil
.
fenToYuanNoPoint
(
ShowGbound
.
getTransAmt
()));
}
if
(
ShowGbound
.
getBoundExp
()
!=
null
)
{
mViewBinding
.
etIntegralTimeLimit
.
setText
(
ShowGbound
.
getBoundExp
()
+
""
);
}
}
break
;
case
1
:
{
showView
(
R
.
id
.
rd_gettype_category
);
mViewBinding
.
rdGettypeCategory
.
setChecked
(
true
);
if
(
ShowGbound
.
getSpuClaName
()
!=
null
)
{
mViewBinding
.
tvCategorySelectOne
.
setText
((
ShowGbound
.
getSpuClaName
()));
mViewBinding
.
tvCategorySelectShowNoEdit
.
setText
(
ShowGbound
.
getSpuClaName
()
+
"/"
);
}
if
(
ShowGbound
.
getSpuGrpName
()
!=
null
)
{
mViewBinding
.
tvCategorySelectTwo
.
setText
((
ShowGbound
.
getSpuGrpName
()));
mViewBinding
.
tvCategorySelectShowNoEdit
.
setText
(
mViewBinding
.
tvCategorySelectShowNoEdit
.
getText
().
toString
()
+
ShowGbound
.
getSpuGrpName
()
+
"/"
);
}
if
(
ShowGbound
.
getSpuCateName
()
!=
null
)
{
mViewBinding
.
tvCategorySelectThree
.
setText
((
ShowGbound
.
getSpuCateName
()));
mViewBinding
.
tvCategorySelectShowNoEdit
.
setText
(
mViewBinding
.
tvCategorySelectShowNoEdit
.
getText
().
toString
()
+
ShowGbound
.
getSpuCateName
());
}
if
(
ShowGbound
.
getTransAmt
()
!=
null
)
{
mViewBinding
.
etIntegralCategoryWeight
.
setText
(
ConvertUtil
.
fenToYuanNoPoint
(
ShowGbound
.
getTransAmt
()));
}
if
(
ShowGbound
.
getBoundExp
()
!=
null
)
{
mViewBinding
.
etIntegralCategoryTimeLimit
.
setText
(
ShowGbound
.
getBoundExp
()
+
""
);
}
}
break
;
case
2
:
{
showView
(
R
.
id
.
rd_gettype_shop
);
mViewBinding
.
rdGettypeShop
.
setChecked
(
true
);
if
(
ShowGbound
.
getBoundExp
()
!=
null
)
{
mViewBinding
.
etShopTimeLimit
.
setText
(
ShowGbound
.
getBoundExp
()
+
""
);
}
}
break
;
}
}
}
/**
* 通过用户点击品类等级 构建提交给服务器Category对象
*
* @param id 按钮id
* @return 构建好的Category对象
*/
private
Category
getCategory
(
int
id
)
{
switch
(
id
)
{
case
R
.
id
.
tv_category_select_one
:
{
category
=
new
Category
();
}
break
;
case
R
.
id
.
tv_category_select_two
:
{
category
.
setSpuCateId
(
spuCateIdTwo
);
}
break
;
case
R
.
id
.
tv_category_select_three
:
{
category
.
setSpuCateId
(
spuCateIdThree
);
}
break
;
}
return
category
;
}
/**
* 初始化会员等级选择对话框
*/
private
void
initVipLevelOptionPicker
(
RealmResults
<
Level
>
realmResult
)
{
//条件选择器初始化,自定义布局
pvCustomOptions
=
new
OptionsPickerView
.
Builder
(
getActivity
(),
new
OptionsPickerView
.
OnOptionsSelectListener
()
{
@Override
public
void
onOptionsSelect
(
int
options1
,
int
option2
,
int
options3
,
View
v
)
{
gbound
.
setVipLevel
(
realmResult
.
get
(
options1
).
getVipLevel
());
mViewBinding
.
tvVipLevelSelect
.
setText
(
realmResult
.
get
(
options1
).
getVipLevelName
());
}
}).
setLayoutRes
(
R
.
layout
.
pickerview_custom_options
,
new
CustomListener
()
{
@Override
public
void
customLayout
(
View
v
)
{
final
TextView
tvSubmit
=
v
.
findViewById
(
R
.
id
.
tv_finish
);
ImageView
ivCancel
=
v
.
findViewById
(
R
.
id
.
iv_cancel
);
tvSubmit
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
pvCustomOptions
.
returnData
();
pvCustomOptions
.
dismiss
();
}
});
ivCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
pvCustomOptions
.
dismiss
();
}
});
}
})
.
isDialog
(
true
)
.
build
();
pvCustomOptions
.
setPicker
(
realmResult
);
//添加数据
pvCustomOptions
.
show
();
}
/**
* 初始化商品品类选择对话框
*
* @param list 选择对话框数据
* @param nowList 当前选中的品类索引
*/
private
void
initCustomOptionPicker
(
List
<
Category
>
list
,
int
nowList
)
{
//条件选择器初始化,自定义布局
pvCustomOptions
=
new
OptionsPickerView
.
Builder
(
getActivity
(),
new
OptionsPickerView
.
OnOptionsSelectListener
()
{
@Override
public
void
onOptionsSelect
(
int
options1
,
int
option2
,
int
options3
,
View
v
)
{
gbound
.
setSpuCateId
((
int
)
Long
.
parseLong
(
list
.
get
(
options1
).
getSpuCateId
()
+
""
));
//返回的分别是三个级别的选中位置
switch
(
nowList
)
{
case
ONE_CATEGORY:
{
mViewBinding
.
tvCategorySelectOne
.
setText
(
listCategory
.
get
(
options1
)
.
getSpuClaName
());
spuCateIdTwo
=
listCategory
.
get
(
options1
).
getSpuCateId
();
}
break
;
case
TWO_CATEGORY:
{
mViewBinding
.
tvCategorySelectTwo
.
setText
(
listCategory
.
get
(
options1
)
.
getSpuGrpName
());
spuCateIdThree
=
listCategory
.
get
(
options1
).
getSpuCateId
();
}
break
;
case
THREE_CATEGORY:
{
mViewBinding
.
tvCategorySelectThree
.
setText
(
listCategory
.
get
(
options1
)
.
getSpuCateName
());
}
break
;
}
}
}).
setLayoutRes
(
R
.
layout
.
pickerview_custom_options
,
new
CustomListener
()
{
@Override
public
void
customLayout
(
View
v
)
{
final
TextView
tvSubmit
=
v
.
findViewById
(
R
.
id
.
tv_finish
);
ImageView
ivCancel
=
v
.
findViewById
(
R
.
id
.
iv_cancel
);
tvSubmit
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
pvCustomOptions
.
returnData
();
pvCustomOptions
.
dismiss
();
}
});
ivCancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
pvCustomOptions
.
dismiss
();
}
});
}
})
.
isDialog
(
true
)
.
build
();
pvCustomOptions
.
setPicker
(
list
);
//添加数据
pvCustomOptions
.
show
();
}
/**
* 根据用户点击控制UI控件的隐藏显示
*
* @param id 用户点击的id
*/
private
void
showView
(
int
id
)
{
switch
(
id
)
{
case
R
.
id
.
rd_gettype_all
:
{
mViewBinding
.
llAll
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
llCategory
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
llShop
.
setVisibility
(
View
.
GONE
);
}
break
;
case
R
.
id
.
rd_gettype_category
:
{
//品类定义
mViewBinding
.
llAll
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
llCategory
.
setVisibility
(
View
.
VISIBLE
);
mViewBinding
.
llShop
.
setVisibility
(
View
.
GONE
);
}
break
;
case
R
.
id
.
rd_gettype_shop
:
{
//商品定义
mViewBinding
.
llAll
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
llCategory
.
setVisibility
(
View
.
GONE
);
mViewBinding
.
llShop
.
setVisibility
(
View
.
VISIBLE
);
}
break
;
}
}
@Override
public
void
onConfirmClick
(
View
view
)
{
super
.
onConfirmClick
(
view
);
if
(
isNullAndSetDate
())
{
LoadingDialog
loadingDialog
=
new
LoadingDialog
();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
if
(
nowType
==
0
)
{
//修改
mPresenter
.
update
(
gbound
,
loadingDialog
);
LogUtils
.
e
(
"修改"
);
}
else
if
(
nowType
==
1
)
{
//新增
mPresenter
.
add
(
gbound
,
loadingDialog
);
LogUtils
.
e
(
"新增"
);
}
this
.
dismiss
();
}
else
{
ToastUtils
.
showLong
(
"输入数据不能null"
);
}
}
/**
* 请求成功设置数据
*
* @param list
* @param nowList
*/
public
void
setCategoryDate
(
List
<
Category
>
list
,
int
nowList
)
{
listCategory
=
list
;
initCustomOptionPicker
(
list
,
nowList
);
}
/**
* 判断用户输入数据是否为null
*
* @return 输入为null返回false 反之返回true
*/
private
boolean
isNullAndSetDate
()
{
if
(
gbound
.
getVipGboundType
()
==
null
||
gbound
.
getVipLevel
()
==
null
)
{
return
false
;
}
switch
(
gbound
.
getVipGboundType
())
{
case
0
:
{
if
(
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralWeight
.
getText
().
toString
())
||
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralTimeLimit
.
getText
().
toString
()))
{
return
false
;
}
else
{
mViewBinding
.
tvRulesName
.
setText
(
mViewBinding
.
etIntegralWeight
.
getText
()
.
toString
()
+
"元送一个积分"
);
gbound
.
setTransAmt
(
ConvertUtil
.
yuanToFen
(
mViewBinding
.
etIntegralWeight
.
getText
().
toString
()));
gbound
.
setBoundExp
(
Byte
.
parseByte
(
mViewBinding
.
etIntegralTimeLimit
.
getText
()
.
toString
()));
}
}
break
;
case
1
:
{
if
(
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralCategoryWeight
.
getText
().
toString
())
||
TextUtils
.
isEmpty
(
mViewBinding
.
etIntegralCategoryTimeLimit
.
getText
()
.
toString
())
||
gbound
.
getSpuCateId
()
==
-
1
)
{
return
false
;
}
else
{
mViewBinding
.
tvRulesName
.
setText
(
mViewBinding
.
etIntegralCategoryWeight
.
getText
().
toString
()
+
"元送一个积分"
);
gbound
.
setTransAmt
(
ConvertUtil
.
yuanToFen
(
mViewBinding
.
etIntegralCategoryWeight
.
getText
().
toString
()));
gbound
.
setBoundExp
(
Byte
.
parseByte
(
mViewBinding
.
etIntegralCategoryTimeLimit
.
getText
().
toString
()));
}
}
break
;
case
2
:
{
if
(
TextUtils
.
isEmpty
(
mViewBinding
.
etShopTimeLimit
.
getText
().
toString
()))
{
return
false
;
}
else
{
mViewBinding
.
tvRulesName
.
setText
(
"商品定义规则"
);
gbound
.
setBoundExp
(
Byte
.
parseByte
(
mViewBinding
.
etShopTimeLimit
.
getText
()
.
toString
()));
}
}
break
;
}
gbound
.
setTruleName
(
mViewBinding
.
tvRulesName
.
getText
().
toString
());
return
true
;
}
/**
* @param gbound
*/
public
void
setData
(
Gbound
gbound
,
LoadingDialog
loadingDialog
)
{
this
.
gbound
=
gbound
.
clone
();
this
.
ShowGbound
=
gbound
;
this
.
loadingDialog
=
loadingDialog
;
//置状态为修改状态
setNowType
(
0
);
}
public
void
setNowType
(
int
nowType
)
{
this
.
nowType
=
nowType
;
}
/**
* 显示软键盘,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
();
}
}
//
package com.xingdata.zzdpos.ui.marketing.integral.dialog;
//
//
import android.annotation.SuppressLint;
//
import android.content.Context;
//
import android.text.TextUtils;
//
import android.view.View;
//
import android.view.inputmethod.InputMethodManager;
//
import android.widget.ImageView;
//
import android.widget.TextView;
//
//
import com.bigkoo.pickerview.OptionsPickerView;
//
import com.bigkoo.pickerview.listener.CustomListener;
//
import com.blankj.utilcode.util.LogUtils;
//
import com.blankj.utilcode.util.ToastUtils;
//
import com.xingdata.zzdpos.App;
//
import com.xingdata.zzdpos.R;
//
import com.xingdata.zzdpos.base.BaseActivity;
//
import com.xingdata.zzdpos.base.BaseDialog;
//
import com.xingdata.zzdpos.databinding.DialogIntegralGetSettingBinding;
//
import com.xingdata.zzdpos.model.Category;
//
import com.xingdata.zzdpos.model.Gbound;
//
import com.xingdata.zzdpos.model.Level;
//
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;
//
//
import java.util.ArrayList;
//
import java.util.List;
//
//
import io.realm.Realm;
//
import io.realm.RealmResults;
//
/
//
**
//
* 积分获取设置界面
//
*/
//
public class IntegralGetDialog extends BaseDialog<IntegralPresenter,
//
DialogIntegralGetSettingBinding> {
//
//区分请求类型 正常 加载更多,下拉刷新
//
public static final int ONE_CATEGORY = 1;
//
public static final int TWO_CATEGORY = 2;
//
public static final int THREE_CATEGORY = 3;
//
//请求商品类别使用的id
//
private long spuCateIdTwo = -1;
//
private long spuCateIdThree = -1;
//
private OptionsPickerView pvCustomOptions;
//
private List<Category> listCategory = new ArrayList<>();
//
//积分获取提交给服务器对象
//
private Gbound gbound = new Gbound();
//
//ui显示用
//
private Gbound ShowGbound = new Gbound();
//
//商品品类提交服务器对象
//
private Category category = new Category();
//
//当前为修改还是新增 0为修改1为新增
//
private int nowType = -1;
//
//进度对话框
//
LoadingDialog loadingDialog;
//
//当前点击商品类型空间id,防止直接点击商品第二三种类型
//
private int nowShopTypeId = 1;
//
//
@Override
//
public int getLayoutId() {
//
return R.layout.dialog_integral_get_setting;
//
}
//
//
@Override
//
protected boolean isShowTitle() {
//
return true;
//
}
//
//
@Override
//
public int getTitle() {
//
return R.string.integral_get_title;
//
}
//
//
@SuppressLint("SetTextI18n")
//
@Override
//
public void initView() {
//
//
setCancelable(false);
//
//
//
//
}
//
//
//
private void setShopTypeClick(Boolean b) {
//
mViewBinding.rdGettypeAll.setEnabled(b);
//
mViewBinding.rdGettypeShop.setEnabled(b);
//
mViewBinding.rdGettypeCategory.setEnabled(b);
//
if (b) {
//
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.GONE);
//
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.GONE);
//
mViewBinding.tvCategorySelectOne.setVisibility(View.VISIBLE);
//
mViewBinding.tvCategorySelectTwo.setVisibility(View.VISIBLE);
//
mViewBinding.tvCategorySelectThree.setVisibility(View.VISIBLE);
//
mViewBinding.tvVipLevelSelect.setVisibility(View.VISIBLE);
//
} else {
//
mViewBinding.tvCategorySelectShowNoEdit.setVisibility(View.VISIBLE);
//
mViewBinding.tvVipLevelSelectShowNoEdit.setVisibility(View.VISIBLE);
//
mViewBinding.tvCategorySelectOne.setVisibility(View.GONE);
//
mViewBinding.tvCategorySelectTwo.setVisibility(View.GONE);
//
mViewBinding.tvCategorySelectThree.setVisibility(View.GONE);
//
mViewBinding.tvVipLevelSelect.setVisibility(View.GONE);
//
}
//
}
//
//
private void updateUi() {
//
if (ShowGbound != null && ShowGbound.getTruleName() != null && !(ShowGbound.getTruleName
//
().equals("")
//
)) {
//
mViewBinding.tvRulesName.setText(ShowGbound.getTruleName());
//
//开通启用状态 0:正常 1 暂停 默认 0
//
if (ShowGbound.getBoundGetStatus() == 0) {
//
mViewBinding.rdStarts
//
.setChecked(true);
//
} else if (ShowGbound.getBoundGetStatus() == 1) {
//
mViewBinding.rdSuspendeds.setChecked(true);
//
}
//
mViewBinding.tvVipLevelSelectShowNoEdit.setText(ShowGbound.getVipLevelName());
//
//积分获取类型 0:通用 1:品类定义积分 2:商品定义积分
//
switch (ShowGbound.getVipGboundType()) {
//
case 0: {
//
showView(R.id.rd_gettype_all);
//
mViewBinding.rdGettypeAll.setChecked(true);
//
if (ShowGbound.getTransAmt() != null) {
//
mViewBinding.etIntegralWeight.setText(ConvertUtil.fenToYuanNoPoint
//
(ShowGbound.getTransAmt()));
//
}
//
if (ShowGbound.getBoundExp() != null) {
//
mViewBinding.etIntegralTimeLimit.setText(ShowGbound.getBoundExp() + "");
//
}
//
//
//
}
//
break;
//
case 1: {
//
showView(R.id.rd_gettype_category);
//
mViewBinding.rdGettypeCategory.setChecked(true);
//
if (ShowGbound.getSpuClaName() != null) {
//
mViewBinding.tvCategorySelectOne.setText((ShowGbound.getSpuClaName()));
//
mViewBinding.tvCategorySelectShowNoEdit.setText(ShowGbound.getSpuClaName
//
() + "/");
//
}
//
if (ShowGbound.getSpuGrpName() != null) {
//
mViewBinding.tvCategorySelectTwo.setText((ShowGbound.getSpuGrpName()));
//
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
//
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
//
.getSpuGrpName() + "/");
//
}
//
if (ShowGbound.getSpuCateName() != null) {
//
mViewBinding.tvCategorySelectThree.setText((ShowGbound.getSpuCateName()));
//
mViewBinding.tvCategorySelectShowNoEdit.setText(mViewBinding
//
.tvCategorySelectShowNoEdit.getText().toString() + ShowGbound
//
.getSpuCateName());
//
}
//
//
if (ShowGbound.getTransAmt() != null) {
//
mViewBinding.etIntegralCategoryWeight.setText(ConvertUtil
//
.fenToYuanNoPoint(ShowGbound
//
.getTransAmt()));
//
}
//
if (ShowGbound.getBoundExp() != null) {
//
mViewBinding.etIntegralCategoryTimeLimit.setText(ShowGbound.getBoundExp()
//
+ "");
//
}
//
}
//
break;
//
case 2: {
//
showView(R.id.rd_gettype_shop);
//
mViewBinding.rdGettypeShop.setChecked(true);
//
if (ShowGbound.getBoundExp() != null) {
//
mViewBinding.etShopTimeLimit.setText(ShowGbound.getBoundExp() + "");
//
}
//
}
//
break;
//
}
//
//
}
//
}
//
//
/**
//
* 通过用户点击品类等级 构建提交给服务器Category对象
//
*
//
* @param id 按钮id
//
* @return 构建好的Category对象
//
*/
//
private Category getCategory(int id) {
//
switch (id) {
//
case R.id.tv_category_select_one: {
//
category = new Category();
//
}
//
break;
//
case R.id.tv_category_select_two: {
//
category.setSpuCateId(spuCateIdTwo);
//
}
//
break;
//
case R.id.tv_category_select_three: {
//
category.setSpuCateId(spuCateIdThree);
//
}
//
break;
//
}
//
return category;
//
//
}
//
//
/**
//
* 初始化会员等级选择对话框
//
*/
//
private void initVipLevelOptionPicker(RealmResults<Level> realmResult) {//条件选择器初始化,自定义布局
//
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
//
.OnOptionsSelectListener() {
//
@Override
//
public void onOptionsSelect(int options1, int option2, int options3, View v) {
//
gbound.setVipLevel(realmResult.get(options1).getVipLevel());
//
mViewBinding.tvVipLevelSelect.setText(realmResult.get(options1).getVipLevelName());
//
}
//
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
//
@Override
//
public void customLayout(View v) {
//
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
//
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
//
tvSubmit.setOnClickListener(new View.OnClickListener() {
//
@Override
//
public void onClick(View v) {
//
pvCustomOptions.returnData();
//
pvCustomOptions.dismiss();
//
}
//
});
//
ivCancel.setOnClickListener(new View.OnClickListener() {
//
@Override
//
public void onClick(View v) {
//
pvCustomOptions.dismiss();
//
}
//
});
//
}
//
})
//
.isDialog(true)
//
.build();
//
//
//
pvCustomOptions.setPicker(realmResult);//添加数据
//
pvCustomOptions.show();
//
}
//
//
//
/**
//
* 初始化商品品类选择对话框
//
*
//
* @param list 选择对话框数据
//
* @param nowList 当前选中的品类索引
//
*/
//
private void initCustomOptionPicker(List<Category> list, int nowList) {//条件选择器初始化,自定义布局
//
pvCustomOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView
//
.OnOptionsSelectListener() {
//
@Override
//
public void onOptionsSelect(int options1, int option2, int options3, View v) {
//
gbound.setSpuCateId((int) Long.parseLong(list.get(options1).getSpuCateId() + ""));
//
//返回的分别是三个级别的选中位置
//
switch (nowList) {
//
case ONE_CATEGORY: {
//
mViewBinding.tvCategorySelectOne.setText(listCategory.get(options1)
//
.getSpuClaName());
//
spuCateIdTwo = listCategory.get(options1).getSpuCateId();
//
}
//
break;
//
case TWO_CATEGORY: {
//
mViewBinding.tvCategorySelectTwo.setText(listCategory.get(options1)
//
.getSpuGrpName());
//
spuCateIdThree = listCategory.get(options1).getSpuCateId();
//
}
//
break;
//
case THREE_CATEGORY: {
//
mViewBinding.tvCategorySelectThree.setText(listCategory.get(options1)
//
.getSpuCateName());
//
//
}
//
break;
//
}
//
}
//
}).setLayoutRes(R.layout.pickerview_custom_options, new CustomListener() {
//
@Override
//
public void customLayout(View v) {
//
final TextView tvSubmit = v.findViewById(R.id.tv_finish);
//
ImageView ivCancel = v.findViewById(R.id.iv_cancel);
//
tvSubmit.setOnClickListener(new View.OnClickListener() {
//
@Override
//
public void onClick(View v) {
//
pvCustomOptions.returnData();
//
pvCustomOptions.dismiss();
//
}
//
});
//
//
ivCancel.setOnClickListener(new View.OnClickListener() {
//
@Override
//
public void onClick(View v) {
//
pvCustomOptions.dismiss();
//
}
//
});
//
}
//
})
//
.isDialog(true)
//
.build();
//
//
//
pvCustomOptions.setPicker(list);//添加数据
//
pvCustomOptions.show();
//
}
//
//
/**
//
* 根据用户点击控制UI控件的隐藏显示
//
*
//
* @param id 用户点击的id
//
*/
//
//
private void showView(int id) {
//
switch (id) {
//
case R.id.rd_gettype_all: {
//
mViewBinding.llAll.setVisibility(View.VISIBLE);
//
mViewBinding.llCategory.setVisibility(View.GONE);
//
mViewBinding.llShop.setVisibility(View.GONE);
//
}
//
break;
//
case R.id.rd_gettype_category: {
//
//品类定义
//
mViewBinding.llAll.setVisibility(View.GONE);
//
mViewBinding.llCategory.setVisibility(View.VISIBLE);
//
mViewBinding.llShop.setVisibility(View.GONE);
//
}
//
break;
//
case R.id.rd_gettype_shop: {
//
//商品定义
//
mViewBinding.llAll.setVisibility(View.GONE);
//
mViewBinding.llCategory.setVisibility(View.GONE);
//
mViewBinding.llShop.setVisibility(View.VISIBLE);
//
}
//
break;
//
}
//
//
}
//
//
@Override
//
public void onConfirmClick(View view) {
//
super.onConfirmClick(view);
//
if (isNullAndSetDate()) {
//
LoadingDialog loadingDialog = new LoadingDialog();
//
loadingDialog.show((BaseActivity) getActivity());
//
if (nowType == 0) {
//
//修改
//
mPresenter.update(gbound, loadingDialog);
//
LogUtils.e("修改");
//
} else if (nowType == 1) {
//
//新增
//
mPresenter.add(gbound, loadingDialog);
//
LogUtils.e("新增");
//
}
//
//
this.dismiss();
//
} else {
//
ToastUtils.showLong("输入数据不能null");
//
}
//
//
}
//
//
/**
//
* 请求成功设置数据
//
*
//
* @param list
//
* @param nowList
//
*/
//
//
public void setCategoryDate(List<Category> list, int nowList) {
//
listCategory = list;
//
initCustomOptionPicker(list, nowList);
//
}
//
//
//
/**
//
* 判断用户输入数据是否为null
//
*
//
* @return 输入为null返回false 反之返回true
//
*/
//
private boolean isNullAndSetDate() {
//
if (gbound.getVipGboundType() == null || gbound.getVipLevel() == null) {
//
return false;
//
}
//
switch (gbound.getVipGboundType()) {
//
case 0: {
//
if (TextUtils.isEmpty(mViewBinding.etIntegralWeight.getText().toString())
//
|| TextUtils.isEmpty(mViewBinding.etIntegralTimeLimit.getText().toString
//
())) {
//
return false;
//
} else {
//
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralWeight.getText()
//
.toString() +
//
"元送一个积分");
//
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding.etIntegralWeight
//
.getText().toString()));
//
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralTimeLimit.getText()
//
.toString()));
//
}
//
}
//
break;
//
case 1: {
//
if (TextUtils.isEmpty(mViewBinding.etIntegralCategoryWeight.getText().toString())
//
|| TextUtils.isEmpty(mViewBinding.etIntegralCategoryTimeLimit.getText()
//
.toString()) || gbound.getSpuCateId() == -1) {
//
return false;
//
} else {
//
mViewBinding.tvRulesName.setText(mViewBinding.etIntegralCategoryWeight
//
.getText().toString() +
//
"元送一个积分");
//
gbound.setTransAmt(ConvertUtil.yuanToFen(mViewBinding
//
.etIntegralCategoryWeight.getText().toString()));
//
gbound.setBoundExp(Byte.parseByte(mViewBinding.etIntegralCategoryTimeLimit
//
.getText().toString()));
//
}
//
}
//
break;
//
case 2: {
//
if (TextUtils.isEmpty(mViewBinding.etShopTimeLimit.getText().toString())) {
//
return false;
//
} else {
//
mViewBinding.tvRulesName.setText("商品定义规则");
//
gbound.setBoundExp(Byte.parseByte(mViewBinding.etShopTimeLimit.getText()
//
.toString()));
//
}
//
}
//
break;
//
}
//
gbound.setTruleName(mViewBinding.tvRulesName.getText().toString());
//
return true;
//
}
//
//
/**
//
* @param gbound
//
*/
//
public void setData(Gbound gbound, LoadingDialog loadingDialog) {
//
this.gbound = gbound.clone();
//
this.ShowGbound = gbound;
//
this.loadingDialog = loadingDialog;
//
//置状态为修改状态
//
setNowType(0);
//
}
//
//
public void setNowType(int nowType) {
//
this.nowType = nowType;
//
}
//
//
/**
//
* 显示软键盘,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/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,
//进度对话框
LoadingDialog
loadingDialog
;
//当前点击商品类型空间id,防止直接点击商品第二三种类型
private
int
nowShopTypeId
=
1
;
private
int
nowShopTypeId
=
0
;
@Override
public
int
getLayoutId
()
{
...
...
@@ -64,6 +64,13 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
@Override
public
void
initView
()
{
mViewBinding
.
icTitle
.
tvTitle
.
setText
(
"积分规则"
);
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
protected
void
myOnClickListener
(
View
v
)
{
pop
();
}
});
mViewBinding
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
...
...
@@ -118,7 +125,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
if
(
nowShopTypeId
>=
1
)
{
mPresenter
.
initData
(
getCategory
(
v
.
getId
()),
TWO_CATEGORY
);
mViewBinding
.
tvCategorySelectThree
.
setText
(
""
);
nowShopTypeId
=
2
;
}
else
{
ToastUtils
.
showLong
(
"请先选择第一类品类"
);
}
...
...
@@ -127,7 +133,6 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
case
R
.
id
.
tv_category_select_three
:
{
if
(
nowShopTypeId
>=
2
)
{
mPresenter
.
initData
(
getCategory
(
v
.
getId
()),
THREE_CATEGORY
);
nowShopTypeId
=
3
;
}
else
{
ToastUtils
.
showLong
(
"请先选择第一二类品类"
);
}
...
...
@@ -349,18 +354,21 @@ public class IntegralGetFragment extends BaseFragment<IntegralPresenter,
//返回的分别是三个级别的选中位置
switch
(
nowList
)
{
case
ONE_CATEGORY:
{
nowShopTypeId
=
1
;
mViewBinding
.
tvCategorySelectOne
.
setText
(
listCategory
.
get
(
options1
)
.
getSpuClaName
());
spuCateIdTwo
=
listCategory
.
get
(
options1
).
getSpuCateId
();
}
break
;
case
TWO_CATEGORY:
{
nowShopTypeId
=
2
;
mViewBinding
.
tvCategorySelectTwo
.
setText
(
listCategory
.
get
(
options1
)
.
getSpuGrpName
());
spuCateIdThree
=
listCategory
.
get
(
options1
).
getSpuCateId
();
}
break
;
case
THREE_CATEGORY:
{
nowShopTypeId
=
3
;
mViewBinding
.
tvCategorySelectThree
.
setText
(
listCategory
.
get
(
options1
)
.
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;
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.IntegralExchangeAdapter
;
import
com.xingdata.zzdpos.ui.marketing.integral.dialog.IntegralExchangeDialog
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
java.util.ArrayList
;
...
...
@@ -80,6 +79,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
mViewBinding
.
setOnClickListener
(
v
->
{
switch
(
v
.
getId
())
{
case
R
.
id
.
btn_add
:
{
mPresenter
.
integralGetFragment
=
new
IntegralGetFragment
();
mPresenter
.
integralGetFragment
.
setNowType
(
1
);
start
(
mPresenter
.
integralGetFragment
);
// integralGetDialog = new IntegralGetDialog();
...
...
@@ -197,6 +197,7 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
if
((
System
.
currentTimeMillis
()
-
mExitTime
)
>
1000
)
{
// integralGetDialog = new IntegralGetDialog();
loadingDialog
.
show
((
BaseActivity
)
getActivity
());
mPresenter
.
integralGetFragment
=
new
IntegralGetFragment
();
mPresenter
.
integralGetFragment
.
setData
(
gbound
,
loadingDialog
);
start
(
mPresenter
.
integralGetFragment
);
// integralGetDialog.show((BaseActivity) getActivity());
...
...
@@ -213,9 +214,12 @@ public class IntegralIndexFragment extends BaseFragment<IntegralPresenter,
*/
private
void
exchangeClickProduct
(
Ubound
gbound
)
{
if
((
System
.
currentTimeMillis
()
-
mExitTime
)
>
1000
)
{
IntegralExchangeDialog
integralExchangeDialog
=
new
IntegralExchangeDialog
();
integralExchangeDialog
.
setData
(
gbound
);
integralExchangeDialog
.
show
((
BaseActivity
)
getActivity
());
mPresenter
.
integralExchangeFragment
=
new
IntegralExchangeFragment
();
mPresenter
.
integralExchangeFragment
.
setData
(
gbound
);
start
(
mPresenter
.
integralExchangeFragment
);
// IntegralExchangeDialog integralExchangeDialog = new IntegralExchangeDialog();
// integralExchangeDialog.setData(gbound);
// integralExchangeDialog.show((BaseActivity) getActivity());
mExitTime
=
System
.
currentTimeMillis
();
}
else
{
ToastUtils
.
showLong
(
"您操作太快了"
);
...
...
app/src/main/res/layout/dialog_integral_exchange_setting.xml
View file @
64c78f04
...
...
@@ -9,226 +9,264 @@
</data>
<
Linear
Layout
<
Relative
Layout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/store_back"
android:focusable=
"true"
android:orientation=
"vertical"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gary1"
android:paddingLeft=
"@dimen/all_margin"
android:paddingRight=
"@dimen/all_margin"
></View>
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
>
android:background=
"@color/store_back"
android:focusable=
"true"
android:orientation=
"vertical"
>
<include
android:id=
"@+id/ic_title"
layout=
"@layout/title"
/>
<TextView
android:
id=
"@+id/tv_status
"
android:layout_
width=
"0dp
"
android:
layout_height=
"wrap_content
"
android:
layout_weight=
"1
"
android:padding
Start=
"@dimen/all_margin
"
android:text=
"
启用状态:
"
android:textColor=
"@color/black"
android:
layout_width=
"match_parent
"
android:layout_
height=
"?attr/actionBarSize
"
android:
background=
"@color/gray_zhouyu
"
android:
gravity=
"left|center_vertical
"
android:padding
Left=
"@dimen/all_padding
"
android:text=
"
基本信息
"
android:textColor=
"@color/black
_baozheng
"
android:textSize=
"@dimen/text_secondary_title"
/>
<RadioGroup
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/rd_suspendeds"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"暂停 "
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rd_starts"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"启用 "
android:textSize=
"@dimen/et_textsize"
/>
</RadioGroup>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gary1"
android:paddingLeft=
"@dimen/all_margin"
android:paddingRight=
"@dimen/all_margin"
></View>
<LinearLayout
android:id=
"@+id/ll_all"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"vertical"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gary1"
android:paddingLeft=
"@dimen/all_margin"
android:paddingRight=
"@dimen/all_margin"
></View>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
>
android:background=
"@color/white"
android:gravity=
"center"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
android:id=
"@+id/tv_status"
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"
/>
<EditText
android:id=
"@+id/et_integral_exchange_rule_count_money"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:text=
" 个积分等于1元"
android:textColor=
"@color/black"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"启用状态:"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
>
<
TextView
<
RadioGroup
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"
/>
android:layout_weight=
"5"
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/rd_suspendeds"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"暂停 "
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rd_starts"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"启用 "
android:textSize=
"@dimen/et_textsize"
/>
</RadioGroup>
</LinearLayout>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:gravity=
"right"
android:text=
"订单实收满 "
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
<EditText
android:id=
"@+id/et_integral_exchange_money"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
<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>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:text=
"元"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_all"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:
orientation=
"horizontal
"
android:
padding=
"@dimen/all_padding
"
android:
paddingBottom=
"@dimen/all_margin
"
android:paddingTop=
"@dimen/all_margin"
>
android:
background=
"@color/white
"
android:
gravity=
"center
"
android:
orientation=
"vertical
"
>
<
TextView
android:layout_width=
"
0dp
"
<
LinearLayout
android:layout_width=
"
match_parent
"
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"
/>
android:orientation=
"horizontal"
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:paddingLeft=
"@dimen/all_padding"
android:text=
"积分面值:"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<EditText
android:id=
"@+id/et_integral_exchange_rule_count_money"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"3"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:text=
" 个积分等于1元"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:gravity=
"right"
android:text=
"可以使用 "
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
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"
/>
<EditText
android:id=
"@+id/et_integral_exchange_count"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
<TextView
android:layout_width=
"0dp"
android:orientation=
"horizontal"
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:gravity=
"left"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"订单实收满 "
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<EditText
android:id=
"@+id/et_integral_exchange_money"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"4"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"元"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</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
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"3"
android:text=
"个积分"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
android:orientation=
"horizontal"
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:gravity=
"left"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"可以使用 "
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<EditText
android:id=
"@+id/et_integral_exchange_count"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"4"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
"个积分"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</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>
\ No newline at end of file
app/src/main/res/layout/dialog_integral_get_setting.xml
View file @
64c78f04
...
...
@@ -24,562 +24,642 @@
type=
"String"
/>
</data>
<
Linear
Layout
<
Relative
Layout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/store_back"
android:focusable=
"true"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
>
<TextView
android:id=
"@+id/tv_rules_name"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:paddingStart=
"@dimen/all_margin"
android:text=
"规则名称:"
android:textColor=
"@color/black"
android:textSize=
"@dimen/text_secondary_title"
/>
<TextView
android:id=
"@+id/et_integral_role_name"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:focusable=
"true"
android:maxLines=
"1"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textSize=
"@dimen/text_secondary_title"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gary1"
android:paddingLeft=
"@dimen/all_margin"
android:paddingRight=
"@dimen/all_margin"
></View>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
>
<TextView
android:id=
"@+id/tv_status"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:paddingStart=
"@dimen/all_margin"
android:text=
"启用状态:"
android:textColor=
"@color/black"
android:textSize=
"@dimen/text_secondary_title"
/>
<RadioGroup
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/rd_suspendeds"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"暂停 "
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rd_starts"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"启用 "
android:textSize=
"@dimen/et_textsize"
/>
</RadioGroup>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gary1"
android:paddingLeft=
"@dimen/all_margin"
android:paddingRight=
"@dimen/all_margin"
></View>
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_margin"
android:paddingLeft=
"@dimen/all_margin"
android:paddingRight=
"@dimen/all_margin"
android:paddingTop=
"@dimen/all_margin_big"
>
<TextView
android:id=
"@+id/tv_vip_level"
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
android:id=
"@+id/tv_vip_level_select"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"5"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ems=
"10"
android:gravity=
"center"
android:maxLength=
"5"
android:onClick=
"@{OnClickListener}"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_vip_level_select_show_no_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"5"
android:ems=
"10"
android:gravity=
"center"
android:maxLength=
"5"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:textSize=
"@dimen/et_textsize"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/ns_vip_level"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
/>
</LinearLayout>
android:background=
"@color/store_back"
android:focusable=
"true"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:padding=
"@dimen/all_padding"
>
<include
android:id=
"@+id/ic_title"
layout=
"@layout/title"
/>
<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: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"
/>
<RadioGroup
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"7"
android:checkedButton=
"@id/rd_gettype_all"
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/rd_gettype_all"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"通用 "
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rd_gettype_category"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"品类定义 "
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rd_gettype_shop"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"商品定义 "
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_all"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
>
android:background=
"@color/white"
android:gravity=
"center"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
android:id=
"@+id/tv_rules_name"
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"
/>
<EditText
android:id=
"@+id/et_integral_weight"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
android:paddingLeft=
"@dimen/all_padding"
android:text=
"规则名称:"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/et_integral_role_name"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"5"
android:text=
"元一个积分"
android:textColor=
"@color/black"
android:focusable=
"true"
android:maxLines=
"1"
android:singleLine=
"true"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</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
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_margin"
android:paddingTop=
"@dimen/all_margin"
>
android:background=
"@color/white"
android:gravity=
"center"
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
android:id=
"@+id/tv_status"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:padding
Start=
"@dimen/all_margin
"
android:text=
"
有效期限
:"
android:padding
Left=
"@dimen/all_padding
"
android:text=
"
启用状态
:"
android:textColor=
"@color/black"
android:textSize=
"@dimen/text_secondary_title"
/>
<EditText
android:id=
"@+id/et_integral_time_limit"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
android:textSize=
"@dimen/et_textsize"
/>
<
TextView
<
RadioGroup
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"5"
android:text=
"个月"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/rd_suspendeds"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"暂停 "
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rd_starts"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_marginRight=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"启用 "
android:textSize=
"@dimen/et_textsize"
/>
</RadioGroup>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_category"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<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>
<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
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_margin"
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"
/>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
>
<TextView
android:id=
"@+id/tv_category_select_one"
style=
"@style/dialog_edit"
android:id=
"@+id/tv_vip_level"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ellipsize=
"end"
android:gravity=
"center"
android:maxLength=
"5"
android:onClick=
"@{OnClickListener}"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:paddingLeft=
"@dimen/all_padding"
android:text=
"会员等级:"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_
category_select_two
"
android:id=
"@+id/tv_
vip_level_select
"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"2"
android:layout_weight=
"4"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:e
llipsize=
"end
"
android:e
ms=
"10
"
android:gravity=
"center"
android:maxLength=
"5"
android:onClick=
"@{OnClickListener}"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_category_select_three"
style=
"@style/dialog_edit"
android:id=
"@+id/tv_vip_level_select_show_no_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"2"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ellipsize=
"end"
android:layout_weight=
"4"
android:ems=
"10"
android:gravity=
"center"
android:maxLength=
"5"
android:onClick=
"@{OnClickListener}"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_category_select_show_no_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"6"
android:ellipsize=
"end"
android:ems=
"20"
android:gravity=
"center"
android:maxLength=
"20"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:textSize=
"@dimen/et_textsize"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/ns_vip_level"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:text=
""
android:textSize=
"@dimen/et_textsize"
/>
/>
</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
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:
orientation=
"horizontal
"
android:padding=
"@dimen/all_padding"
>
android:
paddingBottom=
"@dimen/all_padding
"
android:padding
Top
=
"@dimen/all_padding"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:padding
Start=
"@dimen/all_margin
"
android:text=
"
积分比例
:"
android:padding
Left=
"@dimen/all_padding
"
android:text=
"
获取方式
:"
android:textColor=
"@color/black"
android:textSize=
"@dimen/
text_secondary_titl
e"
/>
android:textSize=
"@dimen/
et_textsiz
e"
/>
<EditText
android:id=
"@+id/et_integral_category_weight"
style=
"@style/dialog_edit"
<RadioGroup
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2"
android:digits=
"1234567890"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
android:layout_weight=
"5"
android:checkedButton=
"@id/rd_gettype_all"
android:orientation=
"horizontal"
>
<RadioButton
android:id=
"@+id/rd_gettype_all"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"通用 "
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rd_gettype_category"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"品类定义 "
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<RadioButton
android:id=
"@+id/rd_gettype_shop"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/all_margin"
android:layout_weight=
"1"
android:background=
"@drawable/selector_checkbox_bg"
android:button=
"@null"
android:onClick=
"@{OnClickListener}"
android:text=
"商品定义 "
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</RadioGroup>
</LinearLayout>
<TextView
android:layout_width=
"0dp"
<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
android:id=
"@+id/ll_all"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"visible"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"5"
android:text=
"元一个积分"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
android:orientation=
"horizontal"
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:paddingLeft=
"@dimen/all_padding"
android:text=
"积分比例:"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<EditText
android:id=
"@+id/et_integral_weight"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"3"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:text=
"元一个积分"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
</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
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
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:paddingLeft=
"@dimen/all_padding"
android:text=
"有效期限:"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<EditText
android:id=
"@+id/et_integral_time_limit"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"3"
android:digits=
"1234567890"
android:ems=
"2"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"2"
android:saveEnabled=
"false"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:text=
"个月"
android:textColor=
"@color/black_baozheng"
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
android:id=
"@+id/ll_category"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:gravity=
"center"
android:orientation=
"vertical"
android:visibility=
"gone"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"horizontal"
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:paddingLeft=
"@dimen/all_padding"
android:text=
"商品品类:"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_category_select_one"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"1.5"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ellipsize=
"end"
android:gravity=
"center"
android:maxLength=
"5"
android:onClick=
"@{OnClickListener}"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_category_select_two"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"1.5"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ellipsize=
"end"
android:gravity=
"center"
android:maxLength=
"5"
android:onClick=
"@{OnClickListener}"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_category_select_three"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"1.5"
android:drawableRight=
"@mipmap/createstore_drop_down"
android:ellipsize=
"end"
android:ems=
"10"
android:gravity=
"center"
android:maxLength=
"5"
android:onClick=
"@{OnClickListener}"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:textSize=
"@dimen/et_textsize"
/>
<TextView
android:id=
"@+id/tv_category_select_show_no_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/all_padding"
android:layout_weight=
"4.5"
android:ellipsize=
"end"
android:ems=
"20"
android:gravity=
"center"
android:maxLength=
"20"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textColorHint=
"@color/hint"
android:textSize=
"@dimen/et_textsize"
android:visibility=
"gone"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"0.5"
/>
</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
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"horizontal"
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:paddingLeft=
"@dimen/all_padding"
android:text=
"积分比例:"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<EditText
android:id=
"@+id/et_integral_category_weight"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"3"
android:digits=
"1234567890"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:saveEnabled=
"false"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:text=
"元一个积分"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
</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
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"horizontal"
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:paddingLeft=
"@dimen/all_padding"
android:text=
"有效期限:"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
<EditText
android:id=
"@+id/et_integral_category_time_limit"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"3"
android:digits=
"1234567890"
android:ems=
"2"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"2"
android:saveEnabled=
"false"
android:textColor=
"@color/black_baozheng"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:text=
"个月"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_shop"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
>
android:paddingBottom=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
android:visibility=
"gone"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"2"
android:padding
Start=
"@dimen/all_margin
"
android:padding
Left=
"@dimen/all_padding
"
android:text=
"有效期限:"
android:textColor=
"@color/black"
android:textSize=
"@dimen/
text_secondary_titl
e"
/>
android:textColor=
"@color/black
_baozheng
"
android:textSize=
"@dimen/
et_textsiz
e"
/>
<EditText
android:id=
"@+id/et_
integral_category
_time_limit"
android:id=
"@+id/et_
shop
_time_limit"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"
2
"
android:layout_weight=
"
3
"
android:digits=
"1234567890"
android:ems=
"
5
"
android:ems=
"
2
"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxLength=
"5"
android:maxEms=
"2"
android:maxLength=
"2"
android:saveEnabled=
"false"
android:textColor=
"@color/black"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"
5
"
android:layout_weight=
"
2
"
android:text=
"个月"
android:textColor=
"@color/black"
android:textColor=
"@color/black
_baozheng
"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_shop"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
android:orientation=
"horizontal"
android:padding=
"@dimen/all_padding"
android:paddingTop=
"@dimen/all_padding"
android:visibility=
"gone"
>
<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"
/>
<EditText
android:id=
"@+id/et_shop_time_limit"
style=
"@style/dialog_edit"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_weight=
"2"
android:digits=
"1234567890"
android:ems=
"5"
android:gravity=
"center_vertical"
android:inputType=
"phone|number"
android:maxEms=
"5"
android:maxLength=
"5"
android:saveEnabled=
"false"
android:textColor=
"@color/black"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gary1"
></View>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"5"
android:text=
"个月"
android:textColor=
"@color/black"
android:textSize=
"@dimen/et_textsize"
/>
</LinearLayout>
<Button
android:id=
"@+id/btn_add"
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:text=
"添加"
android:textColor=
"@color/white"
android:onClick=
"@{OnClickListener}"
android:text=
"确定"
android:textColor=
"@color/white"
android:textSize=
"@dimen/et_textsize"
/>
</
Linear
Layout>
</
Relative
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