Exemple #1
0
    def single_pay(self):

        buy_id = table_utils.get_table_current_index_info(
            self.detail_table, 10)
        if not buy_id:
            QMessageBox.information(self.single_button, '提示', '请选择一条明细!')
            return
        buy_info = BuyInfo()

        buy_info.buy_id(int(buy_id))

        unpaid = Decimal(
            table_utils.get_table_current_index_info(self.detail_table, 9))
        paid = Decimal(
            table_utils.get_table_current_index_info(self.detail_table, 8))
        supplier_id = self._get_supplier_id()

        buy_info.paid(paid)
        buy_info.unpaid(unpaid)
        buy_info.note(self.supplier_name)
        buy_info.supplier_id(supplier_id)
        dialog = PayOffArrearsDialog(buy_info)
        dialog.exec()

        self._init_table()
    def __init__(self, buy: BuyInfo):
        super(PayOffArrearsDialog, self).__init__()
        self.setupUi(self)
        self.setWindowTitle('请填写支付金额')

        self._init_input_info(buy)
        self._init_signal_and_slot()

        self.buy_id = buy.buy_id()