Commit ff818c08e77ee2f9ee407eaeee43fee1739235d8

Authored by wdn127929
1 parent d761d778

新建宴会 OK 缺添加桌位

... ... @@ -1666,6 +1666,699 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
));
}
///费用详情
Widget costWidget() {
return Container(
margin: EdgeInsets.only(bottom: h(26)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(6)),
border: Border.all(width: w(1), color: MyColours.color_438E93)),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Container(
width: double.infinity,
// height: h(31),
padding: EdgeInsets.symmetric(horizontal: w(12), vertical: h(6)),
decoration: BoxDecoration(
color: MyColours.color_438E93,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(r(5)),
topRight: Radius.circular(r(5)))),
child: Text(
'费用详情',
style:
TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)),
),
),
VEmptyView(34),
ListView.builder(
itemCount: 2,
shrinkWrap: true,
controller: _scrollController,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.only(
left: w(12), right: w(12), bottom: w(27)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'第一场费用:',
style: TextStyle(
color: MyColours.color_999999,
fontSize: font(12)),
),
VEmptyView(8),
costItem('名称', '单价', '数量', '金额', isTitle: true),
ListView.builder(
itemCount: 4,
shrinkWrap: true,
controller: _scrollController,
itemBuilder: (BuildContext context, int index) {
return costItem(
'1299套餐',
'1299',
'30',
'38970',
);
}),
//服务费
Container(
height: h(32),
margin: EdgeInsets.only(bottom: h(8)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB))),
child: Row(
children: [
Container(
width: w(80),
child: Text(
'服务费:',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(12)),
),
),
Image.asset(
Utils.getImgPath('f_radio_sel'),
width: w(20),
),
HEmptyView(8),
Text(
'固定金额',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(12)),
),
HEmptyView(16),
Image.asset(
Utils.getImgPath('f_radio_un'),
width: w(20),
),
HEmptyView(8),
Container(
width: w(40),
child: Text(
'百分比',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(12)),
)),
HEmptyView(12),
Expanded(
child: Container(
height: h(17),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color:
MyColours.color_DBDBDB))),
child: TextField(
maxLines: 1,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_515151),
// controller: controller,
// focusNode: node,
// textAlignVertical: TextAlignVertical.top,
decoration: InputDecoration(
hintText: '请输入',
hintStyle: TextStyle(
color: true
? MyColours.color_999999
: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24),
),
// contentPadding:
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
// border: InputBorder.none,
contentPadding: EdgeInsets.zero,
border: OutlineInputBorder(
borderSide: BorderSide.none),
),
onChanged: (value) {
print('ggg');
// nameStr = value;
},
onEditingComplete: () {
// print('fff');
// node.unfocus();
// _homeEnterModel.nameController.text =
// nameStr + _nameSuffix();
// _addNameSuffix(nameStr, sexStr);
},
keyboardType: TextInputType
.numberWithOptions())),
),
HEmptyView(4),
Text(
'%',
style: TextStyle(
color: MyColours.color_000000,
fontSize: font(12)),
),
],
)),
//优惠金额
Container(
height: h(32),
margin: EdgeInsets.only(bottom: h(8)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB))),
child: Row(
children: [
Container(
width: w(80),
child: Text(
'优惠金额:',
style: TextStyle(
color: MyColours.color_E34D59,
fontSize: font(12)),
),
),
Image.asset(
Utils.getImgPath('f_radio_sel'),
width: w(20),
),
HEmptyView(8),
Text(
'固定金额',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(12)),
),
HEmptyView(16),
Image.asset(
Utils.getImgPath('f_radio_un'),
width: w(20),
),
HEmptyView(8),
Container(
width: w(40),
child: Text(
'折扣',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(12)),
)),
HEmptyView(12),
Expanded(
child: Container(
height: h(17),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color:
MyColours.color_DBDBDB))),
child: TextField(
maxLines: 1,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_515151),
// controller: controller,
// focusNode: node,
// textAlignVertical: TextAlignVertical.top,
decoration: InputDecoration(
hintText: '请输入',
hintStyle: TextStyle(
color: true
? MyColours.color_999999
: MyColours.color_E34D59,
fontSize: ScreenUtil().setSp(24),
),
// contentPadding:
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
// border: InputBorder.none,
contentPadding: EdgeInsets.zero,
border: OutlineInputBorder(
borderSide: BorderSide.none),
),
onChanged: (value) {
print('ggg');
// nameStr = value;
},
onEditingComplete: () {
// print('fff');
// node.unfocus();
// _homeEnterModel.nameController.text =
// nameStr + _nameSuffix();
// _addNameSuffix(nameStr, sexStr);
},
keyboardType: TextInputType
.numberWithOptions())),
),
HEmptyView(4),
Text(
'元',
style: TextStyle(
color: MyColours.color_000000,
fontSize: font(12)),
),
],
)),
//合计
Container(
height: h(24),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1),
color: MyColours.color_DBDBDB))),
child: Row(children: [
Text(
'合计',
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: font(14)),
),
Spacer(),
Text(
'7000000 元',
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: font(14)),
),
HEmptyView(48)
]))
],
));
}),
]));
}
///费用item
Widget costItem(
String name,
String unitprice,
String amount,
String money, {
bool isTitle = false,
}) {
Color color = isTitle ? MyColours.color_438E93 : MyColours.color_515151;
return Container(
height: h(25),
margin: EdgeInsets.only(bottom: isTitle ? 0 : h(8)),
decoration: !isTitle
? BoxDecoration(
border: Border(
bottom:
BorderSide(width: w(1), color: MyColours.color_DBDBDB)))
: BoxDecoration(),
child: Row(
children: [
Expanded(
child: Text(
name,
style: TextStyle(color: color, fontSize: font(12)),
),
),
Container(
width: w(62),
child: Text(
unitprice,
style: TextStyle(color: color, fontSize: font(12)),
),
),
Container(
width: w(62),
child: Text(
amount,
style: TextStyle(color: color, fontSize: font(12)),
),
),
Container(
width: w(62),
child: Text(
money,
style: TextStyle(color: color, fontSize: font(12)),
),
)
],
));
}
/// 合同
Widget contractWidget() {
return Container(
margin: EdgeInsets.only(bottom: h(26)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(6)),
border: Border.all(width: w(1), color: MyColours.color_438E93)),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Container(
width: double.infinity,
// height: h(31),
padding: EdgeInsets.symmetric(horizontal: w(12), vertical: h(6)),
decoration: BoxDecoration(
color: MyColours.color_438E93,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(r(5)),
topRight: Radius.circular(r(5)))),
child: Text(
'合同',
style:
TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)),
),
),
VEmptyView(22),
Padding(
padding: EdgeInsets.only(
left: w(12), right: w(12), top: w(11), bottom: w(29)),
child: Column(
children: [
Row(
children: [
Text(
'总原价:',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28)),
),
HEmptyView(12),
Text(
'159000 元',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28)),
),
],
),
VEmptyView(32),
Row(
children: [
RichText(
textScaleFactor: 1,
overflow: TextOverflow.ellipsis,
// textDirection: TextDirection.ltr,
text: TextSpan(
children: [
TextSpan(
text: '最终议价',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28)),
//点击事件
recognizer: TapGestureRecognizer()
..onTap = () {}),
TextSpan(
text: '*',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_E34D59,
fontSize: ScreenUtil().setSp(28)),
recognizer: TapGestureRecognizer()
..onTap = () {}),
TextSpan(
text: ':',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28)),
//点击事件
recognizer: TapGestureRecognizer()
..onTap = () {}),
],
)),
HEmptyView(12),
_textfield('1299', null, null, width: w(110)),
HEmptyView(24),
Text(
'元',
style: TextStyle(
color: MyColours.color_438E93,
fontWeight: FontWeight.bold,
fontSize: font(14),
),
),
],
),
VEmptyView(48),
_titleAndtextfield('客户签约人:', null, null),
VEmptyView(48),
_titleAndtextfield('店方签约人:', null, null),
VEmptyView(48),
_titleAndtextfield('合同编号:', null, null),
VEmptyView(48),
Consumer<UploadImageProvider>(builder: (context, model, _) {
return ImgPickerFWidget(
model: model,
scrollController: _scrollController,
uploadType: UploadType.FeastRemarkContractType,
bgColor: MyColours.color_DBDBDB,
size: 64,
crossAxisCount: 4,
maxImageNumber: 8,
mainAxisSpacing: 72,
crossAxisSpacing: 56,
);
}),
],
),
)
]));
}
///合同 title+输入框
Widget _titleAndtextfield(String title,
TextEditingController editingController, FocusNode focusNode,
{TextInputType inputType = TextInputType.text}) {
return Row(
children: [
Container(
width: w(86),
child: Text(
title,
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(14),
),
),
),
HEmptyView(48),
Expanded(
child: Container(
height: h(20),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: w(6)),
decoration: BoxDecoration(
border: Border(
bottom:
BorderSide(width: h(1), color: MyColours.color_DBDBDB))),
child: TextField(
controller: editingController,
// textAlign: TextAlign.right,
// textAlignVertical: TextAlignVertical.bottom,
maxLines: 1,
inputFormatters: [],
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_515151),
focusNode: focusNode,
// textAlign: TextAlign.center,
decoration: InputDecoration(
border: OutlineInputBorder(borderSide: BorderSide.none),
// hintText: hintText,
// hintStyle: TextStyle(
// color: hintText == ''
// ? MyColours.color_999999
// : MyColours.color_438E93,
// fontSize: ScreenUtil().setSp(28),
// fontWeight: FontWeight.bold,
// ),
contentPadding: EdgeInsets.zero,
),
onChanged: (value) {},
onEditingComplete: () {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
},
keyboardType: inputType,
),
))
],
);
}
///输入框
Widget _textfield(String hintText, TextEditingController editingController,
FocusNode focusNode,
{TextInputType inputType = TextInputType.text, double width}) {
return Container(
width: width,
height: h(28),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: w(6)),
decoration: BoxDecoration(
border: Border.all(width: h(1), color: MyColours.color_438E93)),
child: TextField(
controller: editingController,
// textAlign: TextAlign.right,
// textAlignVertical: TextAlignVertical.bottom,
maxLines: 1,
inputFormatters: [],
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
fontWeight: FontWeight.bold,
),
focusNode: focusNode,
textAlign: TextAlign.center,
decoration: InputDecoration(
border: OutlineInputBorder(borderSide: BorderSide.none),
hintText: hintText,
hintStyle: TextStyle(
color: hintText == ''
? MyColours.color_999999
: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(28),
fontWeight: FontWeight.bold,
),
contentPadding: EdgeInsets.zero,
),
onChanged: (value) {},
onEditingComplete: () {
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
},
keyboardType: inputType,
),
);
}
/// 发票
Widget invoiceWidget() {
return Container(
margin: EdgeInsets.only(bottom: h(26)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(6)),
border: Border.all(width: w(1), color: MyColours.color_438E93)),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Container(
width: double.infinity,
// height: h(31),
padding: EdgeInsets.symmetric(horizontal: w(12), vertical: h(6)),
decoration: BoxDecoration(
color: MyColours.color_438E93,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(r(5)),
topRight: Radius.circular(r(5)))),
child: Text(
'发票',
style:
TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)),
),
),
VEmptyView(22),
Padding(
padding: EdgeInsets.only(
left: w(12), right: w(12), top: w(11), bottom: w(29)),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'添加发票:',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28)),
),
InkWell(
onTap: () {
NavigatorUtil.goFeastInvoicePage(context);
},
child: Text(
'编辑',
style: TextStyle(
decoration: TextDecoration.underline,
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(28)),
)),
],
),
VEmptyView(42),
Container(
padding: EdgeInsets.symmetric(vertical: w(8)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: w(1), color: MyColours.color_DBDBDB))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'纳极(北京)科技有限公司',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(32)),
),
VEmptyView(16),
Text(
'增值税普通发票',
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(24)),
),
],
),
InkWell(
onTap: () {},
child: Image.asset(Utils.getImgPath('f_delete_red'),
width: w(20))),
],
),
),
VEmptyView(48),
Consumer<UploadImageProvider>(builder: (context, model, _) {
return ImgPickerFWidget(
model: model,
scrollController: _scrollController,
uploadType: UploadType.FeastRemarkInvoiceType,
bgColor: MyColours.color_DBDBDB,
size: 64,
crossAxisCount: 4,
maxImageNumber: 8,
mainAxisSpacing: 72,
crossAxisSpacing: 56,
);
}),
],
),
)
]));
}
///三组 左---中----右
Widget sessionsItem(String title) {
return Padding(
... ... @@ -1803,8 +2496,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
Padding(
padding: EdgeInsets.symmetric(horizontal: w(12)),
child: Column(children: [
baseInfoWidget(),
baseInfoWidget(), //基本信息
VEmptyView(52),
//场次
ListView.builder(
itemCount: 3,
shrinkWrap: true,
... ... @@ -1812,7 +2506,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> {
itemBuilder: (BuildContext context, int index) {
return sessionsWidget('第${index + 1}场');
}),
VEmptyView(52),
//费用详情
costWidget(),
//合同
contractWidget(),
invoiceWidget()
]))
]))),
Row(
... ...
... ... @@ -11,7 +11,9 @@ import '../../utils/screen_util.dart';
import '../../utils/utils.dart';
import '../../widgets/h_empty_view.dart';
import '../../widgets/system_app_bar.dart';
/**
* 定金
*/
class FeastDepositPage extends StatefulWidget {
FeastDepositPage({Key key}) : super(key: key);
... ...
import 'package:common_utils/common_utils.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_picker/Picker.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import '../../res/colors.dart';
import '../../utils/dialog_util.dart';
import '../../utils/screen_util.dart';
import '../../utils/utils.dart';
import '../../widgets/h_empty_view.dart';
import '../../widgets/system_app_bar.dart';
/**
* 编辑发票
*/
class FeastInvoicePage extends StatefulWidget {
FeastInvoicePage({Key key}) : super(key: key);
@override
_FeastInvoicePageState createState() => _FeastInvoicePageState();
}
class _FeastInvoicePageState extends State<FeastInvoicePage> {
@override
void initState() {
// TODO: implement initState
super.initState();
Utils.changeStatusColor(color: MyColours.color_438E93);
WidgetsBinding.instance.addPostFrameCallback((_) {});
}
///请输入
///输入框
Widget _textfield(
String title,
// TextEditingController editingController,
// FocusNode focusNode,
String subTitle,
{TextInputType inputType = TextInputType.text,
bool need = false}) {
return Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: w(92),
child: RichText(
textScaleFactor: 1,
overflow: TextOverflow.ellipsis,
// textDirection: TextDirection.ltr,
text: TextSpan(
children: [
TextSpan(
text: title,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28)),
recognizer: TapGestureRecognizer()..onTap = () {}),
TextSpan(
text: need ? '*' : '',
style: TextStyle(
color: MyColours.color_E34D59,
fontSize: ScreenUtil().setSp(28)),
//点击事件
recognizer: TapGestureRecognizer()..onTap = () {}),
],
))),
HEmptyView(48),
Expanded(
child: Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: h(1), color: MyColours.color_DBDBDB))),
child: Row(
children: [
Expanded(
child: Container(
// height: ScreenUtil().setHeight(120),
height: ScreenUtil().setWidth(64),
child: TextField(
// controller: editingController,
// textAlign: TextAlign.right,
// textAlignVertical: TextAlignVertical.bottom,
maxLines: 1,
inputFormatters: [],
// //光标颜色
// cursorColor:
// widget.isSelect ? Colors.white : MyColours.color_199095,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
),
// focusNode: focusNode,
decoration: InputDecoration(
border:
OutlineInputBorder(borderSide: BorderSide.none),
hintText: '请输入',
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(28),
),
contentPadding: EdgeInsets.zero,
),
onChanged: (value) {},
onEditingComplete: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //点击空白处隐藏键盘
},
keyboardType: inputType,
)),
),
Container(
child: Text(
subTitle,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28)),
),
),
],
),
))
],
),
);
}
///请选择
Widget _selectWidget(String title, String labelShow,
{GestureTapCallback onTap, bool need = true}) {
return InkWell(
onTap: onTap,
// () {
// FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
// DialogUtil.showSelectCusmanDialog(
// context,
// customerProvider.labelList.map((item) {
// return item.label;
// }).toList(), (value) {
// if (value != null) {
// setState(() {
// customerProvider.labelSelIndex =
// value.first;
// labelShow = customerProvider
// .labelList[
// customerProvider.labelSelIndex]
// .label;
// });
// }
// },
// selecteds:
// customerProvider.labelSelIndex == null
// ? []
// : [
// customerProvider.labelSelIndex
// ])
// .then((value) {});
// },
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width: ScreenUtil().setWidth(160),
height: ScreenUtil().setWidth(35),
child: Text(
title,
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_515151),
),
),
HEmptyView(60),
Expanded(
child: Container(
height: ScreenUtil().setWidth(64),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: Color.fromRGBO(220, 220, 220, 1)))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
labelShow,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: labelShow == '请选择'
? MyColours.color_999999
: MyColours.color_515151,
fontSize: ScreenUtil().setSp(28),
),
)),
HEmptyView(10),
Image.asset(
Utils.getImgPath('f_arrow_down'),
width: ScreenUtil().setWidth(64),
// height: ScreenUtil().setWidth(10),
),
HEmptyView(16),
],
))),
],
),
);
}
Widget _callButton(
{GestureTapCallback onPress,
content,
hasLeftBorder = true,
isSelect = false}) {
return InkWell(
onTap: onPress,
child: Container(
height: h(48),
decoration: BoxDecoration(
color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff,
border: Border(
bottom: BorderSide(
color: MyColours.color_438E93,
width: ScreenUtil().setWidth(2)),
top: BorderSide(
color: MyColours.color_438E93,
width: ScreenUtil().setWidth(2)),
left: hasLeftBorder
? BorderSide(
color: MyColours.color_438E93,
width: ScreenUtil().setWidth(2))
: BorderSide.none,
right: BorderSide(
color: MyColours.color_438E93,
width: ScreenUtil().setWidth(2)))),
child: Align(
alignment: Alignment.center,
child: Text(
content,
style: TextStyle(
color:
isSelect ? MyColours.color_F6F6F6 : MyColours.color_438E93,
fontSize: ScreenUtil().setSp(36)),
),
),
),
);
}
///单选按钮
Widget radioBtn(String title, bool select) {
return InkWell(
onTap: () {},
child: Row(
children: [
Image.asset(
Utils.getImgPath(select ? 'select' : 'unselect'),
width: w(24),
),
HEmptyView(16),
Text(
title,
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(32)),
),
],
));
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar(
'添加发票',
needWhite: true,
bgColor: MyColours.color_438E93,
titleColor: MyColours.color_F6F6F6,
onTap: () {
Navigator.pop(context);
},
),
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.only(left: w(30), right: w(13)),
child: Column(
children: [
VEmptyView(68),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
radioBtn('增值税普通发票', true),
radioBtn('增值税专用发票', false),
],
),
VEmptyView(80),
_textfield('开票金额', '元', need: true),
VEmptyView(40),
_textfield('单位全称', '', need: true),
VEmptyView(40),
_textfield('纳税人识别号', '', need: true),
VEmptyView(40),
_textfield('注册地址', ''),
VEmptyView(40),
_textfield('注册电话', ''),
VEmptyView(40),
_textfield('开户银行', ''),
VEmptyView(40),
_textfield('银行账号', ''),
VEmptyView(40),
_textfield('电子邮箱', ''),
VEmptyView(40),
_textfield('收件人', ''),
VEmptyView(40),
_textfield('收件人电话', ''),
VEmptyView(40),
_textfield('收件地址', ''),
VEmptyView(40),
_textfield('邮编', ''),
VEmptyView(40),
],
)),
)),
Row(
children: [
Expanded(
child: _callButton(
onPress: () {
Navigator.pop(context);
},
content: '返回',
hasLeftBorder: true,
isSelect: false)),
Expanded(
child: _callButton(
onPress: () {},
content: '保存并返回',
hasLeftBorder: true,
isSelect: true))
],
)
],
));
}
}
... ...
... ... @@ -124,6 +124,10 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> {
widget.model.feastRemarkXtImageList.add(imgModel);
} else if (widget.uploadType == UploadType.FeastRemarkDjType) {
widget.model.feastRemarkDjImageList.add(imgModel);
} else if (widget.uploadType == UploadType.FeastRemarkContractType) {
widget.model.feastRemarkContractImageList.add(imgModel);
} else if (widget.uploadType == UploadType.FeastRemarkInvoiceType) {
widget.model.feastRemarkInvoiceImageList.add(imgModel);
}
} else {
print('No image selected.');
... ... @@ -146,6 +150,10 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> {
temp = widget.model.feastRemarkXtImageList;
} else if (widget.uploadType == UploadType.FeastRemarkDjType) {
temp = widget.model.feastRemarkDjImageList;
} else if (widget.uploadType == UploadType.FeastRemarkContractType) {
temp = widget.model.feastRemarkContractImageList;
} else if (widget.uploadType == UploadType.FeastRemarkInvoiceType) {
temp = widget.model.feastRemarkInvoiceImageList;
}
UploadImageUtil().startUpload(context, File(pickedFile.path),
temp.length - 1, true, widget.model, widget.uploadType,
... ... @@ -170,6 +178,10 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> {
temp = widget.model.feastRemarkXtImageList;
} else if (widget.uploadType == UploadType.FeastRemarkDjType) {
temp = widget.model.feastRemarkDjImageList;
} else if (widget.uploadType == UploadType.FeastRemarkContractType) {
temp = widget.model.feastRemarkContractImageList;
} else if (widget.uploadType == UploadType.FeastRemarkInvoiceType) {
temp = widget.model.feastRemarkInvoiceImageList;
}
List<AssetEntity> imgList = await AssetPicker.pickAssets(context,
maxAssets: widget.maxImageNumber - temp.length,
... ... @@ -477,6 +489,10 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> {
temp = widget.model.feastRemarkXtImageList;
} else if (widget.uploadType == UploadType.FeastRemarkDjType) {
temp = widget.model.feastRemarkDjImageList;
} else if (widget.uploadType == UploadType.FeastRemarkContractType) {
temp = widget.model.feastRemarkContractImageList;
} else if (widget.uploadType == UploadType.FeastRemarkInvoiceType) {
temp = widget.model.feastRemarkInvoiceImageList;
}
return _getGridImg(
temp.length < widget.maxImageNumber ? temp.length + 1 : temp.length,
... ... @@ -531,9 +547,9 @@ class _ImgPickerFWidgetState extends DisposableState<ImgPickerFWidget> {
children: [
// VEmptyView(46),
Image.asset(
Utils.getImgPath('add_store'),
width: ScreenUtil().setWidth(28),
height: ScreenUtil().setWidth(28),
Utils.getImgPath('f_add_image'),
width: ScreenUtil().setWidth(64),
height: ScreenUtil().setWidth(64),
),
// VEmptyView(10),
// Text(
... ...
... ... @@ -28,6 +28,9 @@ class UploadImageProvider extends ChangeNotifier {
List<UploadImgModel> feastRemarkImageList = []; //宴会备注图片信息列表
List<UploadImgModel> feastRemarkXtImageList = []; //宴会备注图片信息列表----选台
List<UploadImgModel> feastRemarkDjImageList = []; //宴会备注图片信息列表----定金
List<UploadImgModel> feastRemarkContractImageList = []; //宴会备注图片信息列表----合同
List<UploadImgModel> feastRemarkInvoiceImageList = []; //宴会备注图片信息列表----发票
int countUpload = 0;
UploadImageProvider() {
touxiang.process = 0.01;
... ...
... ... @@ -881,9 +881,16 @@ class NavigatorUtil {
return _navigateTo(context, "${Routes.feast_wine_page}", replace: replace);
}
///宴会----添加配置
///宴会----添加配置
static Future<dynamic> goFeastSetPage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_set_page}", replace: replace);
}
///宴会----添加发票
static Future<dynamic> goFeastInvoicePage(BuildContext context,
{replace = false, bool onlyShow = false}) {
return _navigateTo(context, "${Routes.feast_invoice_page}",
replace: replace);
}
}
... ...
... ... @@ -144,6 +144,7 @@ import 'package:provider/provider.dart';
import '../pages/feast/feast_board.dart';
import '../pages/feast/feast_create_page.dart';
import '../pages/feast/feast_deposit_page.dart';
import '../pages/feast/feast_invoice_page.dart';
import '../pages/feast/feast_menu_page.dart';
import '../pages/feast/feast_set_page.dart';
import '../pages/feast/feast_setmeal_page.dart';
... ... @@ -1386,7 +1387,6 @@ var feastWinePageHandle = new Handler(
create: (_) => FeastModel(), child: FeastWinePage());
});
///宴会----添加配置
var feastSetPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
... ... @@ -1397,4 +1397,12 @@ var feastSetPageHandle = new Handler(
create: (_) => FeastModel(), child: FeastSetPage());
});
///宴会----添加发票
var feastInvoicePageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String uids = params["uids"].first;
// bool onlyShow = FluroConvertUtils.string2bool(params["onlyShow"].first);
return ChangeNotifierProvider<FeastModel>(
create: (_) => FeastModel(), child: FeastInvoicePage());
});
... ...
... ... @@ -122,6 +122,7 @@ class Routes {
static String feast_setmeal_page = "/feast_setmeal_page"; //宴会----添加套餐
static String feast_wine_page = "/feast_wine_page"; //宴会----添加酒水
static String feast_set_page = "/feast_set_page"; //宴会----添加配置
static String feast_invoice_page = "/feast_invoice_page"; //宴会----添加发票
static void configureRoutes(FluroRouter router) {
router.notFoundHandler = new Handler(
... ... @@ -247,5 +248,6 @@ class Routes {
router.define(feast_setmeal_page, handler: feastSetmealPageHandle);
router.define(feast_wine_page, handler: feastWinePageHandle);
router.define(feast_set_page, handler: feastSetPageHandle);
router.define(feast_invoice_page, handler: feastInvoicePageHandle);
}
}
... ...
... ... @@ -17,7 +17,9 @@ enum UploadType {
TableManagerType, //桌面照片管理
FeastRemarkType, //宴会备注--意向
FeastRemarkXtType, //宴会备注--选台
FeastRemarkDjType //宴会备注--定金
FeastRemarkDjType, //宴会备注--定金
FeastRemarkContractType, //宴会备注--合同
FeastRemarkInvoiceType //宴会备注--发票
}
... ... @@ -77,6 +79,14 @@ class UploadImageUtil {
} else if (uploadType == UploadType.FeastRemarkDjType) {
//宴会备注 ---定金
uploadImageProvider.feastRemarkDjImageList[index].process = percent;
} else if (uploadType == UploadType.FeastRemarkContractType) {
//宴会备注 ---合同
uploadImageProvider.feastRemarkContractImageList[index].process =
percent;
} else if (uploadType == UploadType.FeastRemarkInvoiceType) {
//宴会备注 ---发票
uploadImageProvider.feastRemarkInvoiceImageList[index].process =
percent;
}
uploadImageProvider.notifyListeners();
... ... @@ -145,6 +155,16 @@ class UploadImageUtil {
//宴会备注---定金
uploadImageProvider.feastRemarkDjImageList[index].process = 1;
uploadImageProvider.feastRemarkDjImageList[index].qiniuUrl = imgUrl;
} else if (uploadType == UploadType.FeastRemarkContractType) {
//宴会备注 ---合同
uploadImageProvider.feastRemarkContractImageList[index].process = 1;
uploadImageProvider.feastRemarkContractImageList[index].qiniuUrl =
imgUrl;
} else if (uploadType == UploadType.FeastRemarkInvoiceType) {
//宴会备注 ---发票
uploadImageProvider.feastRemarkInvoiceImageList[index].process = 1;
uploadImageProvider.feastRemarkInvoiceImageList[index].qiniuUrl =
imgUrl;
}
// 取消当前任务
... ...