Commit 6c2ac0c338a2cc8f77e8cad335917227c64c74e5

Authored by weixin_45529955
1 parent 14cbbf98

发放消费金输入框UI

... ... @@ -55,7 +55,7 @@ class _GrantPageState extends State<GrantPage> {
}
}
_createConsumeQrcode(String amounts) async {
_createConsumeQrcode(String amounts) async {
Map<String, String> pramas = {
'sellerid':
Provider.of<UserModel>(context, listen: false).user!.sellerid!,
... ... @@ -102,27 +102,35 @@ class _GrantPageState extends State<GrantPage> {
onTap: () {
//删除媒体
// 确认是否删除
if (data.amount != null) {
// 确认是否删除
//弹框确认是否删除
DialogUtil.cupertinoAlertDialog(context,
title: "",
content: "确定要将该发放金删除吗?",
rTitle: "确定", rCallback: () async {
Map<String, String?> pramas = {
'id': data.id,
};
//弹框确认是否删除
DialogUtil.cupertinoAlertDialog(context,
title: "",
content: "确定要将该发放金删除吗?",
rTitle: "确定", rCallback: () async {
//接口删除
Map<String, String?> pramas = {
'id': data.id,
};
bool success = await financeProvider!
.delConsumeQrcode(context, pramas);
if (success) {
//删除成功,刷新页面
bool success = await financeProvider!
.delConsumeQrcode(context, pramas);
if (success) {
//删除成功,刷新页面
setState(() {
ladderSelectFree.removeAt(index);
});
}
});
setState(() {
ladderSelectFree.removeAt(index);
});
}
});
} else {
//本地删除数据
setState(() {
ladderSelectFree.removeAt(index);
});
}
},
child: Padding(
padding: EdgeInsets.only(top: w(8), bottom: w(8)),
... ... @@ -162,10 +170,12 @@ class _GrantPageState extends State<GrantPage> {
style: TextStyle(color: MyColours.color_515151, fontSize: font(14)),
),
HEmptyView(10),
Container(
Expanded(
child: Container(
width: w(54),
height: w(26),
alignment: Alignment.center,
// padding: EdgeInsets.symmetric(vertical: w(10)), // 增加边缘的点击区域
decoration: BoxDecoration(
border: Border.all(color: MyColours.color_999999, width: w(1))),
child: TextField(
... ... @@ -186,6 +196,7 @@ class _GrantPageState extends State<GrantPage> {
),
focusNode: focusNodeGive,
decoration: InputDecoration(
contentPadding: EdgeInsets.zero,
isCollapsed: true,
border: OutlineInputBorder(borderSide: BorderSide.none),
hintText: '请输入数字',
... ... @@ -205,7 +216,7 @@ class _GrantPageState extends State<GrantPage> {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
},
keyboardType: TextInputType.numberWithOptions()),
),
)),
HEmptyView(10),
Text(
'元',
... ...
... ... @@ -242,7 +242,7 @@ class FinanceProvider extends ChangeNotifier {
context, Method.post, HttpUrl.create_consume_qrcode,
data: params, showLoading: showLoading);
if (baseResp.code == Constant.status_success) {
if (baseResp.data is String) {
if (baseResp.data is List) {
if (needToast) {
Utils.showToast('创建成功');
}
... ...