/*
 * @Author: XianKaiQun
 * @Date: 2020-09-16 10:58:08
 * @LastEditors: ChenYaJin
 * @LastEditTime: 2023-03-29 17:33:23
 * @Description: 
 */
part of '../index.dart';

///搜索底下的面板
class _PanelComponent extends StatelessWidget {
  const _PanelComponent({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    final style = WTheme.of(context);
    final colorScheme = style.colorScheme;
    final store = Provider.of<PrivateIndexStore>(context);
    return Wisdom.column(
      // color: Colors.white,
      border: Border.symmetric(
        vertical: Divider.createBorderSide(context),
      ),
      margin: EdgeInsets.only(bottom: 10.pt),
      children: [
GradientCard(
          margin: EdgeInsets.fromLTRB(15.pt, 15.pt, 15.pt, 2.pt),
          gradient: LinearGradient(
            colors: [
              Color.fromRGBO(77, 128, 255, 1),
              Color.fromRGBO(15, 103, 248, 1)
            ],
            begin: Alignment.centerLeft,
            end: Alignment.centerRight,
          ),
          child: Wisdom.row(
            padding: EdgeInsets.symmetric(vertical: 12.pt),
            children: [
              Wisdom.row(
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                children: [
                  Wisdom.column(
                    padding: EdgeInsets.all(15.pt),
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text(
                        store.currentYearMonth ?? '--',
                        style: TextStyle(
                          fontSize: 19.pt,
                          color: Colors.white,
                          fontWeight: FontWeight.bold,
                        ),
                      ),
                      Wisdom(
                        margin: EdgeInsets.only(top: 5.pt),
                        child: Text(
                          '本期账期',
                          style: TextStyle(
                            color: Colors.white,
                            fontSize: 13.pt,
                          ),
                        ),
                      ),
                    ],
                  ),
                  Wisdom.column(
                    padding: EdgeInsets.all(15.pt),
                    crossAxisAlignment: CrossAxisAlignment.end,
                    children: [
                      Text(
                        '${store.transcribed ?? '--'}',
                        style: TextStyle(
                          fontSize: 19.pt,
                          color: Colors.white,
                          fontWeight: FontWeight.bold,
                        ),
                      ),
                      Wisdom.row(
                        margin: EdgeInsets.only(top: 5.pt),
                        children: [
                          Wisdom(
                            margin: EdgeInsets.only(right: 4.pt),
                            child: Icon(
                              Icons.panorama_fish_eye,
                              color: colorScheme.green,
                              size: 14.pt,
                            ),
                          ),
                          Text(
                            '本期已抄',
                            style: TextStyle(
                              color: Colors.white,
                              fontSize: 13.pt,
                            ),
                          ),
                        ],
                      ),
                    ],
                  ),
                  Wisdom.column(
                    padding: EdgeInsets.all(15.pt),
                    crossAxisAlignment: CrossAxisAlignment.end,
                    children: [
                      Text(
                        '${store.untranscribe ?? '--'}',
                        style: TextStyle(
                          fontSize: 19.pt,
                          color: Colors.white,
                          fontWeight: FontWeight.bold,
                        ),
                      ),
                      Wisdom.row(
                        margin: EdgeInsets.only(top: 5.pt),
                        children: [
                          Wisdom(
                            margin: EdgeInsets.only(right: 4.pt),
                            child: Icon(
                              Icons.panorama_fish_eye,
                              color: colorScheme.warning,
                              size: 14.pt,
                            ),
                          ),
                          Text(
                            '本期未抄',
                            style: TextStyle(
                              fontSize: 13.pt,
                              color: Colors.white,
                            ),
                          ),
                        ],
                      ),
                    ],
                  ),
                ],
              ).asExpanded(),
            ],
          ),
        ),
        SizedBox(height: 5.pt),
        Wisdom(
          color: Colors.white,
          child: TabBar(
            controller: store.tabController,
            dividerHeight: 0,
            labelColor: colorScheme.text,
            indicatorColor: colorScheme.primary,
            unselectedLabelColor: colorScheme.minor,
            indicatorSize: TabBarIndicatorSize.label,
            indicatorPadding: EdgeInsets.zero,
            indicatorWeight: 2.0,
            labelPadding: EdgeInsets.symmetric(vertical: 10.pt),
            indicator: RoundUnderlineTabIndicator(
              width: 25.pt,
            ),
            labelStyle: TextStyle(
              fontWeight: FontWeight.w600,
              fontSize: 18.pt,
            ),
            unselectedLabelStyle: TextStyle(
              fontWeight: FontWeight.normal,
              fontSize: 16.pt,
            ),
            tabs: [
              Wisdom(
                padding: EdgeInsets.symmetric(horizontal: 10.pt),
                child: WisText('住户表'),
              ),
              Wisdom(
                padding: EdgeInsets.symmetric(horizontal: 10.pt),
                child: WisText('公共表'),
              ),
            ],
          ),
        ),
      ],
    );
  }
}
