|
...
|
...
|
@@ -83,6 +83,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
List<DsoltXt> dsoltList = [];
|
|
|
|
UserModel userModel;
|
|
|
|
Map<String, List<CookByIdSetmeal>> dataMenu = {};
|
|
|
|
Map<String, String> invoice; //发票
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
...
|
...
|
@@ -104,12 +105,17 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
bus.on("feast_deposit_list", (arg) {
|
|
|
|
_getBanquetDeposit();
|
|
|
|
});
|
|
|
|
bus.on("feast_qy_list", (arg) {
|
|
|
|
_getBanquetById();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
super.dispose();
|
|
|
|
bus.off('feast_deposit_list');
|
|
|
|
bus.off('feast_qy_list');
|
|
|
|
|
|
|
|
feastModel.rid = null;
|
|
|
|
feastModel.type = null;
|
|
|
|
feastModel.reserve = null;
|
|
...
|
...
|
@@ -179,8 +185,18 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
|
|
|
|
///获取宴会详情
|
|
|
|
_getBanquetById() async {
|
|
|
|
Map<String, String> pramas = {'rid': '64'}; //feastModel.rid
|
|
|
|
await feastModel.getBanquetById(context, pramas);
|
|
|
|
Map<String, String> pramas = {'rid': feastModel.rid}; //
|
|
|
|
bool success = await feastModel.getBanquetById(context, pramas);
|
|
|
|
if (success) {
|
|
|
|
_uploadImageProvider.feastRemarkContractImageList = [];
|
|
|
|
feastModel.banquetDetail.contractInfo.contractImages.forEach((element) {
|
|
|
|
UploadImgModel uploadImgModel = UploadImgModel();
|
|
|
|
uploadImgModel.process = 1;
|
|
|
|
uploadImgModel.qiniuUrl = element.url;
|
|
|
|
_uploadImageProvider.feastRemarkContractImageList.add(uploadImgModel);
|
|
|
|
});
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///获取宴会分类
|
|
...
|
...
|
@@ -297,16 +313,16 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
Widget menuBtn(String title, {GestureTapCallback onTap}) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
// if (menuSet.contains(title)) {
|
|
|
|
setState(() {
|
|
|
|
selectMenu = title;
|
|
|
|
});
|
|
|
|
if (title == '签约') {
|
|
|
|
feastModel.pageStateBanquet = PageState.Loading;
|
|
|
|
feastModel.notifyListeners();
|
|
|
|
_getBanquetById();
|
|
|
|
if (menuSet.contains(title)) {
|
|
|
|
setState(() {
|
|
|
|
selectMenu = title;
|
|
|
|
});
|
|
|
|
if (title == '签约') {
|
|
|
|
feastModel.pageStateBanquet = PageState.Loading;
|
|
|
|
feastModel.notifyListeners();
|
|
|
|
_getBanquetById();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: w(40),
|
|
...
|
...
|
@@ -1086,7 +1102,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
height: h(33),
|
|
|
|
child: ListView.builder(
|
|
|
|
padding: EdgeInsets.only(left: w(21), right: w(9)),
|
|
|
|
itemCount: xuantaiData.length + 1,
|
|
|
|
itemCount: xuantaiData.length == 5
|
|
|
|
? xuantaiData.length
|
|
|
|
: xuantaiData.length + 1,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemBuilder: (BuildContext contxt, int index) {
|
|
...
|
...
|
@@ -1208,11 +1226,46 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
gradientStart: MyColours.color_E34D59,
|
|
|
|
gradientEnd: MyColours.color_E34D59,
|
|
|
|
onPressed: () async {
|
|
|
|
xuantaiData.removeAt(xuantaiSelIndex);
|
|
|
|
if (feastModel.sessionsSunModelList !=
|
|
|
|
null &&
|
|
|
|
feastModel.sessionsSunModelList
|
|
|
|
.map((element) {
|
|
|
|
return element.id;
|
|
|
|
})
|
|
|
|
.toList()
|
|
|
|
.contains(
|
|
|
|
xuantaiData[xuantaiSelIndex]
|
|
|
|
.reserveId)) {
|
|
|
|
//该场次已经提交到接口,删除场次的同时,删除本地数据
|
|
|
|
feastModel.sessionsSunModelList
|
|
|
|
.removeWhere((element) {
|
|
|
|
element.id ==
|
|
|
|
xuantaiData[xuantaiSelIndex]
|
|
|
|
.reserveId;
|
|
|
|
});
|
|
|
|
// 调用接口删除
|
|
|
|
Map<String, String> pramas = {
|
|
|
|
'rid': feastModel.rid,
|
|
|
|
'id': xuantaiData[xuantaiSelIndex]
|
|
|
|
.reserveId
|
|
|
|
};
|
|
|
|
bool success = await feastModel
|
|
|
|
.delBanquetInfo(context, pramas);
|
|
|
|
if (success) {
|
|
|
|
//删除成功
|
|
|
|
xuantaiData.removeAt(xuantaiSelIndex);
|
|
|
|
|
|
|
|
xuantaiSelIndex--; //删除后,选中前一个
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
xuantaiData.removeAt(xuantaiSelIndex);
|
|
|
|
|
|
|
|
xuantaiSelIndex--; //删除后,选中前一个
|
|
|
|
xuantaiSelIndex--; //删除后,选中前一个
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}))
|
|
|
|
: SizedBox(),
|
|
|
|
VEmptyView(36),
|
|
...
|
...
|
@@ -1434,6 +1487,10 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
// _homeEnterModel.nameController.text =
|
|
|
|
// nameStr + _nameSuffix();
|
|
|
|
// _addNameSuffix(nameStr, sexStr);
|
|
|
|
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(
|
|
|
|
FocusNode());
|
|
|
|
},
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.number)),
|
|
...
|
...
|
@@ -1789,12 +1846,12 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
dateData += ymd;
|
|
|
|
}
|
|
|
|
if (dateData.length > 0) {
|
|
|
|
dateData += ' ${feastModel.reserve}';
|
|
|
|
dateData += ' ${feastModel.reserve ?? ''}';
|
|
|
|
} else {
|
|
|
|
dateData += '${feastModel.reserve}';
|
|
|
|
dateData += '${feastModel.reserve ?? ''}';
|
|
|
|
}
|
|
|
|
|
|
|
|
dateData += ' ${feastModel.type}';
|
|
|
|
dateData += ' ${feastModel.type ?? ''}';
|
|
|
|
|
|
|
|
Map temp = {};
|
|
|
|
if (xuantaiData[xuantaiSelIndex]
|
|
...
|
...
|
@@ -2526,14 +2583,14 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
|
|
|
|
///第一场 。第二场。。。。
|
|
|
|
Widget sessionsWidget(String title, SessionsInfo sessionsInfo) {
|
|
|
|
int tableNum = 0;
|
|
|
|
List<String> temp = sessionsInfo.tableInfo.split('、');
|
|
|
|
temp.forEach((element) {
|
|
|
|
int start = element.indexOf('(');
|
|
|
|
int end = element.length - 2;
|
|
|
|
String numstr = element.substring(start + 1, end);
|
|
|
|
tableNum += int.parse(numstr);
|
|
|
|
});
|
|
|
|
// int tableNum = 0;
|
|
|
|
// List<String> temp = sessionsInfo.tableInfo.split('、');
|
|
|
|
// temp.forEach((element) {
|
|
|
|
// int start = element.indexOf('(');
|
|
|
|
// int end = element.length - 2;
|
|
|
|
// String numstr = element.substring(start + 1, end);
|
|
|
|
// tableNum += int.parse(numstr);
|
|
|
|
// });
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(bottom: h(26)),
|
|
|
|
decoration: BoxDecoration(
|
|
...
|
...
|
@@ -2562,7 +2619,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
baseInfoItem('场次时间:', sessionsInfo.rdate),
|
|
|
|
baseInfoItem('桌位数量:', '共 ${tableNum} 桌'),
|
|
|
|
baseInfoItem('桌位数量:', '共 ${sessionsInfo.tableNum ?? 0} 桌'),
|
|
|
|
baseInfoItem('桌位信息:', sessionsInfo.tableInfo),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
...
|
...
|
@@ -2618,7 +2675,61 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
gradientEnd:
|
|
|
|
MyColours.color_438E93,
|
|
|
|
onPressed: () {
|
|
|
|
// NavigatorUtil.goFeastSetmealPage(context);
|
|
|
|
// String tableData = '';
|
|
|
|
// if (data.pnumC.text
|
|
|
|
// .trim()
|
|
|
|
// .length >
|
|
|
|
// 0) {
|
|
|
|
// tableData +=
|
|
|
|
// '${data.pnumC.text}人/桌';
|
|
|
|
// }
|
|
|
|
// if (data.minC.text
|
|
|
|
// .trim()
|
|
|
|
// .length >
|
|
|
|
// 0) {
|
|
|
|
// tableData +=
|
|
|
|
// ' 保证 ${data.minC.text} 桌';
|
|
|
|
// }
|
|
|
|
// if (data.spareC.text
|
|
|
|
// .trim()
|
|
|
|
// .length >
|
|
|
|
// 0) {
|
|
|
|
// tableData +=
|
|
|
|
// ' 备用 ${data.spareC.text} 桌';
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (data.dataMenu != null &&
|
|
|
|
// data.dataMenu.length >
|
|
|
|
// 0) {
|
|
|
|
// await NavigatorUtil
|
|
|
|
// .goFeastMenuShowPage(
|
|
|
|
// context,
|
|
|
|
// data.setmealId,
|
|
|
|
// data.name,
|
|
|
|
// widget.dateData,
|
|
|
|
// tableData,
|
|
|
|
// justSelData: {
|
|
|
|
// 'object':
|
|
|
|
// data.dataMenu
|
|
|
|
// });
|
|
|
|
// } else {
|
|
|
|
// await NavigatorUtil
|
|
|
|
// .goFeastMenuShowPage(
|
|
|
|
// context,
|
|
|
|
// data.setmealId,
|
|
|
|
// data.name,
|
|
|
|
// widget.dateData,
|
|
|
|
// tableData);
|
|
|
|
// }
|
|
|
|
|
|
|
|
NavigatorUtil
|
|
|
|
.goFeastMenuQYShowPage(
|
|
|
|
context,
|
|
|
|
object: {
|
|
|
|
'object':
|
|
|
|
setmealDetail
|
|
|
|
.cooklist
|
|
|
|
});
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
...
|
...
|
@@ -2726,6 +2837,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
// if (!Utils.isNumeric(costInfoModel.discountC.text)) {
|
|
|
|
// costInfoModel.totalPrice = costInfoModel.sumPrice;
|
|
|
|
// }
|
|
|
|
total = sum;
|
|
|
|
}
|
|
|
|
if (Utils.isNumeric(costInfoModel.discountC.text)) {
|
|
|
|
//输入的是数字,计算金额
|
|
...
|
...
|
@@ -3298,7 +3410,7 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
),
|
|
|
|
HEmptyView(12),
|
|
|
|
Text(
|
|
|
|
'${feastModel.banquetDetail.contractInfo.contractTotalPrice} 元',
|
|
|
|
'${feastModel.banquetDetail.contractInfo.contractTotalPrice ?? '0'} 元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151,
|
|
...
|
...
|
@@ -3364,11 +3476,14 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(48),
|
|
|
|
_titleAndtextfield('客户签约人:', null, null),
|
|
|
|
_titleAndtextfield('客户签约人:',
|
|
|
|
feastModel.banquetDetail.contractInfo.customerC, null),
|
|
|
|
VEmptyView(48),
|
|
|
|
_titleAndtextfield('店方签约人:', null, null),
|
|
|
|
_titleAndtextfield('店方签约人:',
|
|
|
|
feastModel.banquetDetail.contractInfo.storeC, null),
|
|
|
|
VEmptyView(48),
|
|
|
|
_titleAndtextfield('合同编号:', null, null),
|
|
|
|
_titleAndtextfield(
|
|
|
|
'合同编号:', feastModel.banquetDetail.contractInfo.numC, null),
|
|
|
|
VEmptyView(48),
|
|
|
|
Consumer<UploadImageProvider>(builder: (context, model, _) {
|
|
|
|
return ImgPickerFWidget(
|
|
...
|
...
|
@@ -3543,8 +3658,27 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goFeastInvoicePage(context);
|
|
|
|
onTap: () async {
|
|
|
|
Map temp = {};
|
|
|
|
if (feastModel.banquetDetail.invoice == null ||
|
|
|
|
feastModel.banquetDetail.invoice.unitName ==
|
|
|
|
null) {
|
|
|
|
temp = await NavigatorUtil.goFeastInvoicePage(
|
|
|
|
context,
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
temp = await NavigatorUtil.goFeastInvoicePage(
|
|
|
|
context,
|
|
|
|
invoice: feastModel.banquetDetail.invoice);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (temp == null) {
|
|
|
|
} else if (temp['object'].length == 0) {
|
|
|
|
} else {
|
|
|
|
feastModel.banquetDetail.invoice =
|
|
|
|
Invoice.fromJson(temp['object']);
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
'编辑',
|
|
...
|
...
|
@@ -3555,42 +3689,65 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
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)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
feastModel.banquetDetail.invoice == null ||
|
|
|
|
feastModel.banquetDetail.invoice.unitName == null
|
|
|
|
? SizedBox()
|
|
|
|
: Container(
|
|
|
|
margin: EdgeInsets.only(top: w(31)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: w(8),
|
|
|
|
bottom: 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(
|
|
|
|
feastModel.banquetDetail.invoice.unitName,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
VEmptyView(16),
|
|
|
|
Text(
|
|
|
|
feastModel.banquetDetail.invoice
|
|
|
|
.invoiceType ==
|
|
|
|
'1'
|
|
|
|
? '增值税普通发票'
|
|
|
|
: '增值税专用发票',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
//弹框确认是否删除
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "",
|
|
|
|
content: "是否确定删除?",
|
|
|
|
isBoldContent: true,
|
|
|
|
contentColor: MyColours.color_E6000000,
|
|
|
|
rTitle: "删除", rCallback: () {
|
|
|
|
feastModel.banquetDetail.invoice = null;
|
|
|
|
setState(() {});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('f_delete_red'),
|
|
|
|
width: w(20))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {},
|
|
|
|
child: Image.asset(Utils.getImgPath('f_delete_red'),
|
|
|
|
width: w(20))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(48),
|
|
|
|
Consumer<UploadImageProvider>(builder: (context, model, _) {
|
|
|
|
return ImgPickerFWidget(
|
|
...
|
...
|
@@ -3808,12 +3965,26 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
isSelect: false)),
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {
|
|
|
|
selectMenu = '签约';
|
|
|
|
|
|
|
|
menuSet.add('定金');
|
|
|
|
menuSet.add('签约');
|
|
|
|
setState(() {});
|
|
|
|
onPress: () async {
|
|
|
|
// selectMenu = '签约';
|
|
|
|
// menuSet.add('定金');
|
|
|
|
// menuSet.add('签约');
|
|
|
|
// setState(() {});
|
|
|
|
for (UploadImgModel item in _uploadImageProvider
|
|
|
|
.feastRemarkContractImageList) {
|
|
|
|
if (item.process < 1) {
|
|
|
|
Utils.showToast('正在上传图片,请稍等');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (UploadImgModel item in _uploadImageProvider
|
|
|
|
.feastRemarkInvoiceImageList) {
|
|
|
|
if (item.process < 1) {
|
|
|
|
Utils.showToast('正在上传图片,请稍等');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_setData();
|
|
|
|
},
|
|
|
|
content: '保存',
|
|
|
|
hasLeftBorder: true,
|
|
...
|
...
|
@@ -3827,6 +3998,90 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
///设置合同信息
|
|
|
|
Future<bool> _setBanquetContract() async {
|
|
|
|
List imageQiniuUrlList = []; //接口图片数据list
|
|
|
|
for (int i = 0;
|
|
|
|
i < _uploadImageProvider.feastRemarkContractImageList.length;
|
|
|
|
i++) {
|
|
|
|
imageQiniuUrlList.add({
|
|
|
|
"url": _uploadImageProvider.feastRemarkContractImageList[i].qiniuUrl
|
|
|
|
});
|
|
|
|
}
|
|
|
|
Map<String, String> params = {
|
|
|
|
'rid': feastModel.rid, //'64'
|
|
|
|
'contract_total_price':
|
|
|
|
feastModel.banquetDetail.contractInfo.contractTotalPrice,
|
|
|
|
'contract_final_price':
|
|
|
|
feastModel.banquetDetail.contractInfo.contractFinalPriceC.text,
|
|
|
|
'contract_rname': feastModel.banquetDetail.contractInfo.customerC.text,
|
|
|
|
'contract_seller_name': feastModel.banquetDetail.contractInfo.storeC.text,
|
|
|
|
'contract_no': feastModel.banquetDetail.contractInfo.numC.text,
|
|
|
|
'contract_images': json.encode(imageQiniuUrlList)
|
|
|
|
};
|
|
|
|
bool success = await feastModel.setBanquetContract(context, params);
|
|
|
|
|
|
|
|
if (success) {
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///
|
|
|
|
Future<bool> _setInvoice() async {
|
|
|
|
if (feastModel.banquetDetail.invoice == null) {
|
|
|
|
feastModel.banquetDetail.invoice = Invoice();
|
|
|
|
}
|
|
|
|
|
|
|
|
List imageQiniuUrlListInvoice = []; //接口图片数据list
|
|
|
|
for (int i = 0;
|
|
|
|
i < _uploadImageProvider.feastRemarkInvoiceImageList.length;
|
|
|
|
i++) {
|
|
|
|
imageQiniuUrlListInvoice.add({
|
|
|
|
"url": _uploadImageProvider.feastRemarkInvoiceImageList[i].qiniuUrl
|
|
|
|
});
|
|
|
|
}
|
|
|
|
if (imageQiniuUrlListInvoice.length > 0) {
|
|
|
|
feastModel.banquetDetail.invoice.images = [];
|
|
|
|
|
|
|
|
imageQiniuUrlListInvoice.forEach((v) {
|
|
|
|
feastModel.banquetDetail.invoice.images.add(new ImagesById.fromJson(v));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, String> pramas = {
|
|
|
|
'rid': feastModel.rid,
|
|
|
|
'data': json.encode(feastModel.banquetDetail.invoice.toJson())
|
|
|
|
};
|
|
|
|
bool success = await feastModel.setInvoice(context, pramas);
|
|
|
|
|
|
|
|
if (success) {
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_setData() async {
|
|
|
|
await Future.wait<bool>([_setBanquetContract(), _setInvoice()])
|
|
|
|
.then((results) {
|
|
|
|
print(results[0]);
|
|
|
|
if (results[0] && results[1]) {
|
|
|
|
//成功
|
|
|
|
Utils.showToast('保存成功');
|
|
|
|
} else {
|
|
|
|
if (!results[0]) {
|
|
|
|
// Utils.showToast('');
|
|
|
|
} else {
|
|
|
|
// Utils.showToast('');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catchError((e) {
|
|
|
|
print(e);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget taocanTextType(String per1, String title, String per) {
|
|
|
|
return RichText(
|
|
|
|
textScaleFactor: 1,
|
...
|
...
|
|