# -*- coding: utf-8 -*-
 
from PyQt5 import QtCore, QtGui, QtWidgets
from DataFrameModel import PandasModel
import pandas as pd
 
 
class Ui_DailySummary(object):
    def initUI(self, Ui_DailySummary):

        #初始化报告参数
        self.rptDate = ''
        self.rptAcct = ''

        vLayout = QtWidgets.QVBoxLayout(self)
        hLayout = QtWidgets.QHBoxLayout()
        hLayout2 = QtWidgets.QHBoxLayout()

        lblDate = QtWidgets.QLabel(self)
        lblDate.setText('Date')
        hLayout.addWidget(lblDate)

        cal = QtWidgets.QCalendarWidget(self)
        dtEdit = QtWidgets.QDateEdit(QtCore.QDate.currentDate(), self)
        dtEdit.setCalendarPopup(True)
        dtEdit.setCalendarWidget(cal)
        dtEdit.setMaximumDate(QtCore.QDate.currentDate())
        dtEdit.setDate(cal.selectedDate())
        dtEdit.dateChanged.connect(self.saveDate)
        #dtEdit.setFixedWidth(120)
        hLayout.addWidget(dtEdit)

        lblAcct = QtWidgets.QLabel(self)
        lblAcct.setText('Account')
        hLayout.addWidget(lblAcct)

        comboAcct = QtWidgets.QComboBox()
        comboAcct.setEditable(True)
        comboAcct.lineEdit().setAlignment(QtCore.Qt.AlignLeft)
        comboAcct.addItems(['Citic', 'CMB', 'ALL'])
        comboAcct.currentTextChanged.connect(self.saveAcct)
        comboAcct.setStyleSheet("background-color:white;")
        hLayout.addWidget(comboAcct)

        hLayout.addStretch(10)

        btnReport = QtWidgets.QPushButton("RUN REPORT", self)
        btnReport.clicked.connect(self.loadReport)
        hLayout.addWidget(btnReport)

        hLayout.addStretch(1)

        widget = QtWidgets.QWidget()
        widget.setLayout(hLayout)
        #widget.setFixedHeight(50)

        vLayout.addWidget(widget)

        hLayout.setContentsMargins(0, 0, 0, 0)
        hLayout2.setContentsMargins(0, 0, 0, 0)
        vLayout.setContentsMargins(0, 0, 0, 0)
        vLayout.setSpacing(0)

        self.tblHold = QtWidgets.QTableView(self)
        hLayout2.addWidget(self.tblHold)

        vLayout.addLayout(hLayout2)

        self.rptDate = dtEdit.date().toString('yyyyMMdd')
        self.rptAcct = comboAcct.currentText()

    def loadReport(self):
        df = pd.read_excel('A_Shares.xlsx',sheet_name='Trans')
        model = PandasModel(df)
        self.tblHold.setModel(model)
        self.tblHold.setSortingEnabled(True)
        self.tblHold.horizontalHeader().setStyleSheet("QHeaderView::section {background-color:lightblue;color: black;padding-left: 4px;border: 1px solid #6c6c6c;font: bold;}")

    def saveAcct(self, str):
        self.rptAcct = str

    def saveDate(self, date):
        self.rptDate = date.toString('yyyyMMdd')
b1571f4108a0218ae7d7196026e7e13161bc6cf0
<mask token>


class Ui_DailySummary(object):

    def initUI(self, Ui_DailySummary):
        self.rptDate = ''
        self.rptAcct = ''
        vLayout = QtWidgets.QVBoxLayout(self)
        hLayout = QtWidgets.QHBoxLayout()
        hLayout2 = QtWidgets.QHBoxLayout()
        lblDate = QtWidgets.QLabel(self)
        lblDate.setText('Date')
        hLayout.addWidget(lblDate)
        cal = QtWidgets.QCalendarWidget(self)
        dtEdit = QtWidgets.QDateEdit(QtCore.QDate.currentDate(), self)
        dtEdit.setCalendarPopup(True)
        dtEdit.setCalendarWidget(cal)
        dtEdit.setMaximumDate(QtCore.QDate.currentDate())
        dtEdit.setDate(cal.selectedDate())
        dtEdit.dateChanged.connect(self.saveDate)
        hLayout.addWidget(dtEdit)
        lblAcct = QtWidgets.QLabel(self)
        lblAcct.setText('Account')
        hLayout.addWidget(lblAcct)
        comboAcct = QtWidgets.QComboBox()
        comboAcct.setEditable(True)
        comboAcct.lineEdit().setAlignment(QtCore.Qt.AlignLeft)
        comboAcct.addItems(['Citic', 'CMB', 'ALL'])
        comboAcct.currentTextChanged.connect(self.saveAcct)
        comboAcct.setStyleSheet('background-color:white;')
        hLayout.addWidget(comboAcct)
        hLayout.addStretch(10)
        btnReport = QtWidgets.QPushButton('RUN REPORT', self)
        btnReport.clicked.connect(self.loadReport)
        hLayout.addWidget(btnReport)
        hLayout.addStretch(1)
        widget = QtWidgets.QWidget()
        widget.setLayout(hLayout)
        vLayout.addWidget(widget)
        hLayout.setContentsMargins(0, 0, 0, 0)
        hLayout2.setContentsMargins(0, 0, 0, 0)
        vLayout.setContentsMargins(0, 0, 0, 0)
        vLayout.setSpacing(0)
        self.tblHold = QtWidgets.QTableView(self)
        hLayout2.addWidget(self.tblHold)
        vLayout.addLayout(hLayout2)
        self.rptDate = dtEdit.date().toString('yyyyMMdd')
        self.rptAcct = comboAcct.currentText()

    def loadReport(self):
        df = pd.read_excel('A_Shares.xlsx', sheet_name='Trans')
        model = PandasModel(df)
        self.tblHold.setModel(model)
        self.tblHold.setSortingEnabled(True)
        self.tblHold.horizontalHeader().setStyleSheet(
            'QHeaderView::section {background-color:lightblue;color: black;padding-left: 4px;border: 1px solid #6c6c6c;font: bold;}'
            )
    <mask token>
    <mask token>

<mask token>


class Ui_DailySummary(object):

    def initUI(self, Ui_DailySummary):
        self.rptDate = ''
        self.rptAcct = ''
        vLayout = QtWidgets.QVBoxLayout(self)
        hLayout = QtWidgets.QHBoxLayout()
        hLayout2 = QtWidgets.QHBoxLayout()
        lblDate = QtWidgets.QLabel(self)
        lblDate.setText('Date')
        hLayout.addWidget(lblDate)
        cal = QtWidgets.QCalendarWidget(self)
        dtEdit = QtWidgets.QDateEdit(QtCore.QDate.currentDate(), self)
        dtEdit.setCalendarPopup(True)
        dtEdit.setCalendarWidget(cal)
        dtEdit.setMaximumDate(QtCore.QDate.currentDate())
        dtEdit.setDate(cal.selectedDate())
        dtEdit.dateChanged.connect(self.saveDate)
        hLayout.addWidget(dtEdit)
        lblAcct = QtWidgets.QLabel(self)
        lblAcct.setText('Account')
        hLayout.addWidget(lblAcct)
        comboAcct = QtWidgets.QComboBox()
        comboAcct.setEditable(True)
        comboAcct.lineEdit().setAlignment(QtCore.Qt.AlignLeft)
        comboAcct.addItems(['Citic', 'CMB', 'ALL'])
        comboAcct.currentTextChanged.connect(self.saveAcct)
        comboAcct.setStyleSheet('background-color:white;')
        hLayout.addWidget(comboAcct)
        hLayout.addStretch(10)
        btnReport = QtWidgets.QPushButton('RUN REPORT', self)
        btnReport.clicked.connect(self.loadReport)
        hLayout.addWidget(btnReport)
        hLayout.addStretch(1)
        widget = QtWidgets.QWidget()
        widget.setLayout(hLayout)
        vLayout.addWidget(widget)
        hLayout.setContentsMargins(0, 0, 0, 0)
        hLayout2.setContentsMargins(0, 0, 0, 0)
        vLayout.setContentsMargins(0, 0, 0, 0)
        vLayout.setSpacing(0)
        self.tblHold = QtWidgets.QTableView(self)
        hLayout2.addWidget(self.tblHold)
        vLayout.addLayout(hLayout2)
        self.rptDate = dtEdit.date().toString('yyyyMMdd')
        self.rptAcct = comboAcct.currentText()

    def loadReport(self):
        df = pd.read_excel('A_Shares.xlsx', sheet_name='Trans')
        model = PandasModel(df)
        self.tblHold.setModel(model)
        self.tblHold.setSortingEnabled(True)
        self.tblHold.horizontalHeader().setStyleSheet(
            'QHeaderView::section {background-color:lightblue;color: black;padding-left: 4px;border: 1px solid #6c6c6c;font: bold;}'
            )
    <mask token>

    def saveDate(self, date):
        self.rptDate = date.toString('yyyyMMdd')

<mask token>


class Ui_DailySummary(object):

    def initUI(self, Ui_DailySummary):
        self.rptDate = ''
        self.rptAcct = ''
        vLayout = QtWidgets.QVBoxLayout(self)
        hLayout = QtWidgets.QHBoxLayout()
        hLayout2 = QtWidgets.QHBoxLayout()
        lblDate = QtWidgets.QLabel(self)
        lblDate.setText('Date')
        hLayout.addWidget(lblDate)
        cal = QtWidgets.QCalendarWidget(self)
        dtEdit = QtWidgets.QDateEdit(QtCore.QDate.currentDate(), self)
        dtEdit.setCalendarPopup(True)
        dtEdit.setCalendarWidget(cal)
        dtEdit.setMaximumDate(QtCore.QDate.currentDate())
        dtEdit.setDate(cal.selectedDate())
        dtEdit.dateChanged.connect(self.saveDate)
        hLayout.addWidget(dtEdit)
        lblAcct = QtWidgets.QLabel(self)
        lblAcct.setText('Account')
        hLayout.addWidget(lblAcct)
        comboAcct = QtWidgets.QComboBox()
        comboAcct.setEditable(True)
        comboAcct.lineEdit().setAlignment(QtCore.Qt.AlignLeft)
        comboAcct.addItems(['Citic', 'CMB', 'ALL'])
        comboAcct.currentTextChanged.connect(self.saveAcct)
        comboAcct.setStyleSheet('background-color:white;')
        hLayout.addWidget(comboAcct)
        hLayout.addStretch(10)
        btnReport = QtWidgets.QPushButton('RUN REPORT', self)
        btnReport.clicked.connect(self.loadReport)
        hLayout.addWidget(btnReport)
        hLayout.addStretch(1)
        widget = QtWidgets.QWidget()
        widget.setLayout(hLayout)
        vLayout.addWidget(widget)
        hLayout.setContentsMargins(0, 0, 0, 0)
        hLayout2.setContentsMargins(0, 0, 0, 0)
        vLayout.setContentsMargins(0, 0, 0, 0)
        vLayout.setSpacing(0)
        self.tblHold = QtWidgets.QTableView(self)
        hLayout2.addWidget(self.tblHold)
        vLayout.addLayout(hLayout2)
        self.rptDate = dtEdit.date().toString('yyyyMMdd')
        self.rptAcct = comboAcct.currentText()

    def loadReport(self):
        df = pd.read_excel('A_Shares.xlsx', sheet_name='Trans')
        model = PandasModel(df)
        self.tblHold.setModel(model)
        self.tblHold.setSortingEnabled(True)
        self.tblHold.horizontalHeader().setStyleSheet(
            'QHeaderView::section {background-color:lightblue;color: black;padding-left: 4px;border: 1px solid #6c6c6c;font: bold;}'
            )

    def saveAcct(self, str):
        self.rptAcct = str

    def saveDate(self, date):
        self.rptDate = date.toString('yyyyMMdd')

from PyQt5 import QtCore, QtGui, QtWidgets
from DataFrameModel import PandasModel
import pandas as pd


class Ui_DailySummary(object):

    def initUI(self, Ui_DailySummary):
        self.rptDate = ''
        self.rptAcct = ''
        vLayout = QtWidgets.QVBoxLayout(self)
        hLayout = QtWidgets.QHBoxLayout()
        hLayout2 = QtWidgets.QHBoxLayout()
        lblDate = QtWidgets.QLabel(self)
        lblDate.setText('Date')
        hLayout.addWidget(lblDate)
        cal = QtWidgets.QCalendarWidget(self)
        dtEdit = QtWidgets.QDateEdit(QtCore.QDate.currentDate(), self)
        dtEdit.setCalendarPopup(True)
        dtEdit.setCalendarWidget(cal)
        dtEdit.setMaximumDate(QtCore.QDate.currentDate())
        dtEdit.setDate(cal.selectedDate())
        dtEdit.dateChanged.connect(self.saveDate)
        hLayout.addWidget(dtEdit)
        lblAcct = QtWidgets.QLabel(self)
        lblAcct.setText('Account')
        hLayout.addWidget(lblAcct)
        comboAcct = QtWidgets.QComboBox()
        comboAcct.setEditable(True)
        comboAcct.lineEdit().setAlignment(QtCore.Qt.AlignLeft)
        comboAcct.addItems(['Citic', 'CMB', 'ALL'])
        comboAcct.currentTextChanged.connect(self.saveAcct)
        comboAcct.setStyleSheet('background-color:white;')
        hLayout.addWidget(comboAcct)
        hLayout.addStretch(10)
        btnReport = QtWidgets.QPushButton('RUN REPORT', self)
        btnReport.clicked.connect(self.loadReport)
        hLayout.addWidget(btnReport)
        hLayout.addStretch(1)
        widget = QtWidgets.QWidget()
        widget.setLayout(hLayout)
        vLayout.addWidget(widget)
        hLayout.setContentsMargins(0, 0, 0, 0)
        hLayout2.setContentsMargins(0, 0, 0, 0)
        vLayout.setContentsMargins(0, 0, 0, 0)
        vLayout.setSpacing(0)
        self.tblHold = QtWidgets.QTableView(self)
        hLayout2.addWidget(self.tblHold)
        vLayout.addLayout(hLayout2)
        self.rptDate = dtEdit.date().toString('yyyyMMdd')
        self.rptAcct = comboAcct.currentText()

    def loadReport(self):
        df = pd.read_excel('A_Shares.xlsx', sheet_name='Trans')
        model = PandasModel(df)
        self.tblHold.setModel(model)
        self.tblHold.setSortingEnabled(True)
        self.tblHold.horizontalHeader().setStyleSheet(
            'QHeaderView::section {background-color:lightblue;color: black;padding-left: 4px;border: 1px solid #6c6c6c;font: bold;}'
            )

    def saveAcct(self, str):
        self.rptAcct = str

    def saveDate(self, date):
        self.rptDate = date.toString('yyyyMMdd')

# -*- coding: utf-8 -*-
 
from PyQt5 import QtCore, QtGui, QtWidgets
from DataFrameModel import PandasModel
import pandas as pd
 
 
class Ui_DailySummary(object):
    def initUI(self, Ui_DailySummary):

        #初始化报告参数
        self.rptDate = ''
        self.rptAcct = ''

        vLayout = QtWidgets.QVBoxLayout(self)
        hLayout = QtWidgets.QHBoxLayout()
        hLayout2 = QtWidgets.QHBoxLayout()

        lblDate = QtWidgets.QLabel(self)
        lblDate.setText('Date')
        hLayout.addWidget(lblDate)

        cal = QtWidgets.QCalendarWidget(self)
        dtEdit = QtWidgets.QDateEdit(QtCore.QDate.currentDate(), self)
        dtEdit.setCalendarPopup(True)
        dtEdit.setCalendarWidget(cal)
        dtEdit.setMaximumDate(QtCore.QDate.currentDate())
        dtEdit.setDate(cal.selectedDate())
        dtEdit.dateChanged.connect(self.saveDate)
        #dtEdit.setFixedWidth(120)
        hLayout.addWidget(dtEdit)

        lblAcct = QtWidgets.QLabel(self)
        lblAcct.setText('Account')
        hLayout.addWidget(lblAcct)

        comboAcct = QtWidgets.QComboBox()
        comboAcct.setEditable(True)
        comboAcct.lineEdit().setAlignment(QtCore.Qt.AlignLeft)
        comboAcct.addItems(['Citic', 'CMB', 'ALL'])
        comboAcct.currentTextChanged.connect(self.saveAcct)
        comboAcct.setStyleSheet("background-color:white;")
        hLayout.addWidget(comboAcct)

        hLayout.addStretch(10)

        btnReport = QtWidgets.QPushButton("RUN REPORT", self)
        btnReport.clicked.connect(self.loadReport)
        hLayout.addWidget(btnReport)

        hLayout.addStretch(1)

        widget = QtWidgets.QWidget()
        widget.setLayout(hLayout)
        #widget.setFixedHeight(50)

        vLayout.addWidget(widget)

        hLayout.setContentsMargins(0, 0, 0, 0)
        hLayout2.setContentsMargins(0, 0, 0, 0)
        vLayout.setContentsMargins(0, 0, 0, 0)
        vLayout.setSpacing(0)

        self.tblHold = QtWidgets.QTableView(self)
        hLayout2.addWidget(self.tblHold)

        vLayout.addLayout(hLayout2)

        self.rptDate = dtEdit.date().toString('yyyyMMdd')
        self.rptAcct = comboAcct.currentText()

    def loadReport(self):
        df = pd.read_excel('A_Shares.xlsx',sheet_name='Trans')
        model = PandasModel(df)
        self.tblHold.setModel(model)
        self.tblHold.setSortingEnabled(True)
        self.tblHold.horizontalHeader().setStyleSheet("QHeaderView::section {background-color:lightblue;color: black;padding-left: 4px;border: 1px solid #6c6c6c;font: bold;}")

    def saveAcct(self, str):
        self.rptAcct = str

    def saveDate(self, date):
        self.rptDate = date.toString('yyyyMMdd')