|
@@ -10,6 +10,7 @@ import 'package:vitalapp/pages/patient/create/widgets/area.dart';
|
|
|
import 'package:vitalapp/pages/patient/create/widgets/crowd_label.dart';
|
|
|
import 'package:vitalapp/pages/patient/create/widgets/patient_info.dart';
|
|
|
import 'package:vitalapp/store/store.dart';
|
|
|
+import 'package:fis_common/helpers/color.dart';
|
|
|
|
|
|
class QuickCreatePatientPage extends GetView<CreatePatientController> {
|
|
|
const QuickCreatePatientPage({super.key});
|
|
@@ -20,42 +21,46 @@ class QuickCreatePatientPage extends GetView<CreatePatientController> {
|
|
|
children: [
|
|
|
Row(
|
|
|
children: [
|
|
|
- Expanded(
|
|
|
- flex: 1,
|
|
|
- child: Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- border: Border(
|
|
|
- right: BorderSide(
|
|
|
- color: Colors.grey.shade300,
|
|
|
+ if (Store.user.hasFeature(FeatureKeys.IdCardPhotoOCR) ||
|
|
|
+ Store.user.hasFeature(FeatureKeys.IDCardReader))
|
|
|
+ Expanded(
|
|
|
+ flex: 1,
|
|
|
+ child: Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ border: Border(
|
|
|
+ right: BorderSide(
|
|
|
+ color: Colors.grey.shade300,
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
- child: Column(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- children: [
|
|
|
- _buildClickCard(
|
|
|
- Icons.perm_contact_cal_rounded,
|
|
|
- '拍照识别',
|
|
|
- () {
|
|
|
- if (!kIsOnline) {
|
|
|
- PromptBox.toast("当前为离线模式,不支持此功能");
|
|
|
- return;
|
|
|
- }
|
|
|
- controller.onIdCardScanClicked();
|
|
|
- },
|
|
|
- ),
|
|
|
- const SizedBox(
|
|
|
- height: 80,
|
|
|
- ),
|
|
|
- _buildClickCard(
|
|
|
- Icons.chrome_reader_mode,
|
|
|
- '读卡识别',
|
|
|
- () => controller.onReadCardClicked(),
|
|
|
- ),
|
|
|
- ],
|
|
|
+ child: Column(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ if (Store.user.hasFeature(FeatureKeys.IdCardPhotoOCR))
|
|
|
+ _buildClickCard(
|
|
|
+ Icons.perm_contact_cal_rounded,
|
|
|
+ '拍照识别',
|
|
|
+ () {
|
|
|
+ if (!kIsOnline) {
|
|
|
+ PromptBox.toast("当前为离线模式,不支持此功能");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ controller.onIdCardScanClicked();
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ const SizedBox(
|
|
|
+ height: 80,
|
|
|
+ ),
|
|
|
+ if (Store.user.hasFeature(FeatureKeys.IDCardReader))
|
|
|
+ _buildClickCard(
|
|
|
+ Icons.chrome_reader_mode,
|
|
|
+ '读卡识别',
|
|
|
+ () => controller.onReadCardClicked(),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
Expanded(
|
|
|
flex: 2,
|
|
|
child: PatientInfo(),
|
|
@@ -92,7 +97,8 @@ class QuickCreatePatientPage extends GetView<CreatePatientController> {
|
|
|
VoidCallback voidCallback,
|
|
|
) {
|
|
|
return Material(
|
|
|
- color: Colors.blueAccent,
|
|
|
+ // color: Colors.blueAccent,
|
|
|
+
|
|
|
borderRadius: const BorderRadius.all(
|
|
|
Radius.circular(8),
|
|
|
),
|
|
@@ -109,10 +115,20 @@ class QuickCreatePatientPage extends GetView<CreatePatientController> {
|
|
|
horizontal: 80,
|
|
|
),
|
|
|
// margin: const EdgeInsets.symmetric(horizontal: 50),
|
|
|
- decoration: const BoxDecoration(
|
|
|
- borderRadius: BorderRadius.all(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ borderRadius: const BorderRadius.all(
|
|
|
Radius.circular(8),
|
|
|
),
|
|
|
+ gradient: LinearGradient(
|
|
|
+ colors: [
|
|
|
+ // Color.fromRGBO(59, 188, 255, 1),
|
|
|
+ // Color.fromRGBO(44, 120, 229, 1),
|
|
|
+ Colors.blue,
|
|
|
+ FColorHelper.mixColor(Colors.white, Colors.blue, 50),
|
|
|
+ ],
|
|
|
+ begin: Alignment.topLeft,
|
|
|
+ end: Alignment.bottomRight,
|
|
|
+ ),
|
|
|
),
|
|
|
child: Text(
|
|
|
textString,
|