点击添加加载中

hmxc
小赖 4 years ago
parent 2bdbd99efb
commit a80684ad77

@ -439,6 +439,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
child: '确认提交'.text.color(ktextPrimary).bold.make(), child: '确认提交'.text.color(ktextPrimary).bold.make(),
onPressed: _canSubmit(_selectWeight, _selectApproach, _date, _itemName) onPressed: _canSubmit(_selectWeight, _selectApproach, _date, _itemName)
? () async { ? () async {
VoidCallback cancel = BotToast.showLoading();
List<String> urls = await NetUtil() List<String> urls = await NetUtil()
.uploadFiles(_files, API.upload.uploadRepair); .uploadFiles(_files, API.upload.uploadRepair);
BaseModel baseModel = await ManagerFunc.articleOutSubmit( BaseModel baseModel = await ManagerFunc.articleOutSubmit(
@ -455,6 +456,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
Get.back(); Get.back();
} else } else
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message);
cancel();
} }
: () { : () {
BotToast.showText(text: '请填写完整物品出户信息!'); BotToast.showText(text: '请填写完整物品出户信息!');

@ -14,13 +14,13 @@ class PropertyCard extends StatelessWidget {
PropertyCard({Key key}) : super(key: key); PropertyCard({Key key}) : super(key: key);
final List<Map<String, dynamic>> _listCard = [ final List<Map<String, dynamic>> _listCard = [
{ // {
'title': '语音管家', // 'title': '语音管家',
'subtitle': '随时随地帮你下单', // 'subtitle': '随时随地帮你下单',
'image': AssetsImage.PROPERTY, // 'image': AssetsImage.PROPERTY,
'coloList': [Color(0xff33dfe4), Color(0xff00ccf3)], // 'coloList': [Color(0xff33dfe4), Color(0xff00ccf3)],
'shapeColoList': [Color(0xff04ddf2), Color(0xff339a8f)] // 'shapeColoList': [Color(0xff04ddf2), Color(0xff339a8f)]
}, // },
{ {
'title': '电话物业', 'title': '电话物业',
'subtitle': '24小时在线', 'subtitle': '24小时在线',
@ -182,9 +182,9 @@ class PropertyCard extends StatelessWidget {
); );
}, },
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, crossAxisCount: 1,
crossAxisSpacing: 40.w, crossAxisSpacing: 40.w,
childAspectRatio: 323.w / 160.w), childAspectRatio: 600.w / 160.w),
), ),
); );
} }

@ -235,6 +235,7 @@ class _AddFixedSubmitPageState extends State<AddFixedSubmitPage> {
bottomNavi: BottomButton( bottomNavi: BottomButton(
onPressed: _canSubmit(_selectType, _textEditingController.text) onPressed: _canSubmit(_selectType, _textEditingController.text)
? () async { ? () async {
VoidCallback cancel = BotToast.showLoading();
List<String> urls = await NetUtil() List<String> urls = await NetUtil()
.uploadFiles(_files, API.upload.uploadRepair); .uploadFiles(_files, API.upload.uploadRepair);
BaseModel baseModel = await ManagerFunc.reportRepairInsert( BaseModel baseModel = await ManagerFunc.reportRepairInsert(
@ -247,6 +248,7 @@ class _AddFixedSubmitPageState extends State<AddFixedSubmitPage> {
FinishFixedSubmitPage().to(); FinishFixedSubmitPage().to();
} else } else
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message);
cancel();
} }
: () { : () {
BotToast.showText(text: '请填写完整报修信息!'); BotToast.showText(text: '请填写完整报修信息!');

@ -1,4 +1,5 @@
// Flutter imports: // Flutter imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -268,9 +269,11 @@ class _VisitorAccessPageState extends State<VisitorAccessPage> {
String tel, String tel,
) { ) {
return InkWell( return InkWell(
onTap: () { onTap: () async {
ManagerFunc.insertVisitorInfo(id, type, _userName.text, _selectSex, tel, VoidCallback cancel = BotToast.showLoading();
_userCarNum.text, dateTime); await ManagerFunc.insertVisitorInfo(id, type, _userName.text,
_selectSex, tel, _userCarNum.text, dateTime);
cancel();
Get.back(); Get.back();
}, },
child: Container( child: Container(

@ -1,4 +1,5 @@
// Flutter imports: // Flutter imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -189,6 +189,7 @@ class _NewAdvicePageState extends State<NewAdvicePage> {
), ),
bottomNavi: BottomButton( bottomNavi: BottomButton(
onPressed: () { onPressed: () {
VoidCallback cancel = BotToast.showLoading();
if (_formKey.currentState.validate()) { if (_formKey.currentState.validate()) {
int type = 1; int type = 1;
switch (widget.type) { switch (widget.type) {
@ -201,6 +202,7 @@ class _NewAdvicePageState extends State<NewAdvicePage> {
} }
addAdvice(type, _files, _editingController.text); addAdvice(type, _files, _editingController.text);
} }
cancel();
}, },
child: '确认提交'.text.make(), child: '确认提交'.text.make(),
), ),

Loading…
Cancel
Save