|
|
@ -8,6 +8,7 @@ import 'package:aku_community_manager/tools/screen_tool.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/inner/aku_title_box.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/inner/aku_title_box.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/inner/pick_image.dart';
|
|
|
|
import 'package:aku_community_manager/ui/widgets/inner/pick_image.dart';
|
|
|
|
import 'package:aku_ui/common_widgets/aku_material_button.dart';
|
|
|
|
import 'package:aku_ui/common_widgets/aku_material_button.dart';
|
|
|
|
|
|
|
|
import 'package:common_utils/common_utils.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
@ -24,6 +25,18 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
|
|
|
|
List<File> _imgs = [];
|
|
|
|
List<File> _imgs = [];
|
|
|
|
TextEditingController _descriptionController = TextEditingController();
|
|
|
|
TextEditingController _descriptionController = TextEditingController();
|
|
|
|
TextEditingController _materialController = TextEditingController();
|
|
|
|
TextEditingController _materialController = TextEditingController();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TextEditingController _humanController = TextEditingController();
|
|
|
|
|
|
|
|
TextEditingController _materialPriceController = TextEditingController();
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void dispose() {
|
|
|
|
|
|
|
|
_descriptionController?.dispose();
|
|
|
|
|
|
|
|
_materialController?.dispose();
|
|
|
|
|
|
|
|
_materialPriceController?.dispose();
|
|
|
|
|
|
|
|
_materialPriceController?.dispose();
|
|
|
|
|
|
|
|
super.dispose();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return AkuScaffold(
|
|
|
|
return AkuScaffold(
|
|
|
@ -243,10 +256,85 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
// widget.model.detail.type == FIX_PAYMENT_TYPE.FREE
|
|
|
|
|
|
|
|
// ? SizedBox()
|
|
|
|
|
|
|
|
// :
|
|
|
|
AkuTitleBox(
|
|
|
|
AkuTitleBox(
|
|
|
|
title: '费用明细',
|
|
|
|
title: '费用明细',
|
|
|
|
|
|
|
|
spacing: 16,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
AkuBox.h(96),
|
|
|
|
|
|
|
|
Text('人工费'),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: TextField(
|
|
|
|
|
|
|
|
controller: _humanController,
|
|
|
|
|
|
|
|
onChanged: (_) => setState(() {}),
|
|
|
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
|
|
|
border: InputBorder.none,
|
|
|
|
|
|
|
|
hintText: '请输入',
|
|
|
|
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 28.sp,
|
|
|
|
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Divider(height: 1.w),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
AkuBox.h(96),
|
|
|
|
|
|
|
|
Text('材料费'),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: TextField(
|
|
|
|
|
|
|
|
onChanged: (_) => setState(() {}),
|
|
|
|
|
|
|
|
controller: _materialPriceController,
|
|
|
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
|
|
|
|
border: InputBorder.none,
|
|
|
|
|
|
|
|
hintText: '请输入',
|
|
|
|
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 28.sp,
|
|
|
|
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Divider(height: 1.w),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
AkuBox.h(96),
|
|
|
|
|
|
|
|
Text('总计费用'),
|
|
|
|
|
|
|
|
Spacer(),
|
|
|
|
|
|
|
|
Builder(
|
|
|
|
|
|
|
|
builder: (context) {
|
|
|
|
|
|
|
|
double humanPrice =
|
|
|
|
|
|
|
|
double.tryParse(_humanController.text);
|
|
|
|
|
|
|
|
double materialPrice =
|
|
|
|
|
|
|
|
double.tryParse(_materialPriceController.text);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (TextUtil.isEmpty(_humanController.text) ||
|
|
|
|
|
|
|
|
TextUtil.isEmpty(_materialPriceController.text)) {
|
|
|
|
|
|
|
|
return Text('人工费或材料费不能为空');
|
|
|
|
|
|
|
|
} else if (humanPrice == null || materialPrice == null)
|
|
|
|
|
|
|
|
return Text('输入有误');
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return Text(
|
|
|
|
|
|
|
|
'¥${(humanPrice + materialPrice).toStringAsFixed(2)}');
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -269,6 +357,11 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
|
|
|
|
imgs: _imgs,
|
|
|
|
imgs: _imgs,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
widget.model.type = FIX_ENUM.DONE;
|
|
|
|
widget.model.type = FIX_ENUM.DONE;
|
|
|
|
|
|
|
|
if (widget.model.detail.type == FIX_PAYMENT_TYPE.PAY)
|
|
|
|
|
|
|
|
widget.model.detail.priceDetail = FixPriceDetail(
|
|
|
|
|
|
|
|
humanPrice: double.parse(_humanController.text),
|
|
|
|
|
|
|
|
materialPrice: double.parse(_materialController.text),
|
|
|
|
|
|
|
|
);
|
|
|
|
Get.back();
|
|
|
|
Get.back();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|