Ejemplo n.º 1
0
class EditRegStuffModule(QDialog, Ui_Dialog):
    def __init__(self,
                 spid=None,
                 paperno=None,
                 papertype=0,
                 autoid=None,
                 parent=None):
        super(EditRegStuffModule, self).__init__(parent)
        self.setupUi(self)
        if '28' not in user.powers:
            self.close()
        if user.powers['28'] == 0:
            self.close()
        self.power = '{:03b}'.format(user.powers['28'])
        if self.power[1] == '0':
            self.pushButton_accept.setVisible(False)
            self.pushButton_cancel.setVisible(False)
        self.ori_detail = dict()
        self.new_detail = dict()
        self.SC = SupplyerController()
        self.WC = WarehouseController()
        self.SFC = StuffController()

        self.spid = spid
        self.autoid = autoid
        self.paperno = paperno
        self.papertype = papertype

        self.get_detail()
        self.set_amount_validator()
        self.get_producer_list()
        self.get_location_list()

    def get_detail(self):
        if not self.autoid:
            self.toolButton_more.setEnabled(True)
            return
        self.toolButton_more.setEnabled(False)
        key_dict = {'autoid': self.autoid}
        res = self.WC.get_stuffcheckinlist(False, *VALUES_TUPLE_CHECK_IN_LIST,
                                           **key_dict)
        if len(res) != 1:
            return
        self.ori_detail = res[0]
        self.lineEdit_stuff.setText(self.ori_detail['stuffid'] + ' ' +
                                    self.ori_detail['stuffname'])
        self.label_spec.setText(self.ori_detail['spec'])
        self.label_package.setText(self.ori_detail['package'])
        self.lineEdit_amount.setText(str(self.ori_detail['amount']))
        self.label_unit.setText(self.ori_detail['unit'])
        self.lineEdit_batchno.setText(self.ori_detail['batchno'])
        self.lineEdit_mbatchno.setText(self.ori_detail['mbatchno'])
        self.dateEdit_makedate.setDate(self.ori_detail['makedate'])
        self.dateEdit_invaliddate.setDate(self.ori_detail['expireddate'])

    def set_amount_validator(self):
        doubleValitor = QDoubleValidator()
        doubleValitor.setBottom(0)
        doubleValitor.setDecimals(3)
        doubleValitor.setNotation(QDoubleValidator.StandardNotation)
        self.lineEdit_amount.setValidator(doubleValitor)

    def get_location_list(self):
        location_list = self.WC.get_stuffcheckinlist(
            True, *VALUES_TUPLE_LOCATION).distinct()
        if len(location_list):
            self.comboBox_location.addItems(location_list)
        if len(self.ori_detail):
            self.comboBox_location.setCurrentText(self.ori_detail['position'])
        else:
            self.comboBox_location.setCurrentText("")

    def get_producer_list(self, sdid=None):
        if not (self.autoid or sdid):
            return
        if sdid is None:
            stuffid = self.ori_detail['stuffid']
            key_dict_stuff = {'stuffid': stuffid}
            stufffid_list = self.SFC.get_stuffdict(True, *VALUES_TUPLE_SDID,
                                                   **key_dict_stuff)
            if len(stufffid_list):
                sdid = stufffid_list[0]

        if sdid and self.spid:
            key_dict_producer = {'sdid': sdid, 'spid': self.spid}
            producer_list = self.SC.get_stuffsupplyer(True,
                                                      *VALUES_TUPLE_PRODUCER,
                                                      **key_dict_producer)
            if len(producer_list):
                self.comboBox_producer.addItems(producer_list)
            if len(self.ori_detail):
                self.comboBox_producer.setCurrentText(
                    self.ori_detail['producer'])

    @pyqtSlot(str)
    def on_lineEdit_amount_textChanged(self, p_str):
        try:
            if p_str != self.ori_detail['amount']:
                self.new_detail['amount'] = p_str
                self.new_detail['piamount'] = p_str
            else:
                try:
                    del self.new_detail['amount']
                    del self.new_detail['piamount']
                except KeyError:
                    pass
        except KeyError:
            self.new_detail['amount'] = p_str
            self.new_detail['piamount'] = p_str

    @pyqtSlot(str)
    def on_comboBox_producer_currentTextChanged(self, p_str):
        try:
            if p_str != self.ori_detail['producer']:
                self.new_detail['producer'] = p_str
            else:
                try:
                    del self.new_detail['producer']
                except KeyError:
                    pass
        except KeyError:
            self.new_detail['producer'] = p_str

    @pyqtSlot(str)
    def on_comboBox_location_currentTextChanged(self, p_str):
        try:
            if p_str != self.ori_detail['position']:
                self.new_detail['position'] = p_str
            else:
                try:
                    del self.new_detail['position']
                except KeyError:
                    pass
        except KeyError:
            self.new_detail['position'] = p_str

    @pyqtSlot(str)
    def on_lineEdit_batchno_textChanged(self, p_str):
        try:
            if p_str != self.ori_detail['batchno']:
                self.new_detail['batchno'] = p_str
            else:
                try:
                    del self.new_detail['batchno']
                except KeyError:
                    pass
        except KeyError:
            self.new_detail['batchno'] = p_str

    @pyqtSlot(str)
    def on_lineEdit_mbatchno_textChanged(self, p_str):
        try:
            if p_str != self.ori_detail['mbatchno']:
                self.new_detail['mbatchno'] = p_str
            else:
                try:
                    del self.new_detail['mbatchno']
                except KeyError:
                    pass
        except KeyError:
            self.new_detail['mbatchno'] = p_str

    @pyqtSlot(QDate)
    def on_dateEdit_makedate_dateChanged(self, q_date):
        try:
            if type(self.ori_detail['makedate']) is str:
                self.new_detail['makedate'] = q_date.toPyDate()
                return
            if q_date != QDate(self.ori_detail['makedate']):
                self.new_detail['makedate'] = q_date.toPyDate()
            else:
                try:
                    del self.new_detail['makedate']
                except KeyError:
                    pass
        except KeyError:
            self.new_detail['makedate'] = q_date.toPyDate()

    @pyqtSlot(QDate)
    def on_dateEdit_invaliddate_dateChanged(self, q_date):
        try:
            if type(self.ori_detail['expireddate']) is str:
                self.new_detail['expireddate'] = q_date.toPyDate()
                return
            if q_date != QDate(self.ori_detail['expireddate']):
                self.new_detail['expireddate'] = q_date.toPyDate()
            else:
                try:
                    del self.new_detail['expireddate']
                except KeyError:
                    pass
        except KeyError:
            self.new_detail['expireddate'] = q_date.toPyDate()

    @pyqtSlot()
    def on_toolButton_more_clicked(self):
        detail = SelectstuffModule(self.spid, self)
        detail.selected.connect(self.set_stuff)
        detail.show()

    def set_stuff(self, p_int):

        key_dict = {'autoid': p_int}
        res = self.SFC.get_stuffdict(False, *VALUES_TUPLE_STUFF, **key_dict)

        if not len(res):
            return
        stuff = res[0]
        self.lineEdit_stuff.setText(stuff['stuffid'] + stuff['stuffname'])
        self.label_spec.setText(stuff['spec'])
        self.label_package.setText(stuff['package'])
        self.label_unit.setText(stuff['spunit'])
        self.dateEdit_makedate.setDate(user.now_date)
        self.dateEdit_invaliddate.setDate(user.now_date + datetime.timedelta(
            days=stuff['expireddays']))

        self.new_detail['stuffid'] = stuff['stuffid']
        self.new_detail['stuffname'] = stuff['stuffname']
        self.new_detail['spec'] = stuff['spec']
        self.new_detail['package'] = stuff['package']
        self.new_detail['unit'] = stuff['spunit']
        self.new_detail['stufftype'] = stuff['stufftype']

        self.lineEdit_batchno.setFocus()
        self.get_producer_list(p_int)

    @pyqtSlot()
    def on_pushButton_accept_clicked(self):
        text = ''
        if self.lineEdit_stuff.text() == '':
            text = "物料不能为空!\n"
        if self.lineEdit_amount.text() in ('', '0'):
            text += "到货数量不能为空!\n"
        if self.lineEdit_batchno.text() == '':
            text += "进厂批号不能为空!\n"
        if len(text) > 0:
            message = MessageBox(self, text="以下信息填写错误", informative=text)
            message.show()
            return
        if len(self.new_detail):
            if self.spid:
                key_dict_supplyer = {'autoid': self.spid}
                supplyer_list = self.SC.get_supply(False,
                                                   *VALUES_TUPLE_SUPPLYER,
                                                   **key_dict_supplyer)
                if len(supplyer_list):
                    supplyer = supplyer_list[0]
                    self.new_detail['supid'] = supplyer['supid']
                    self.new_detail['supname'] = supplyer['supname']
                self.new_detail['paperno'] = self.paperno
                self.new_detail['papertype'] = self.papertype
                self.new_detail['checkindate'] = user.now_date
            res = self.WC.update_stuffcheckinlist(self.autoid,
                                                  **self.new_detail)

            self.accept()

    @pyqtSlot()
    def on_pushButton_cancel_clicked(self):
        self.close()
class PurchaseRegistrationModule(QWidget, Ui_Form):
    def __init__(self, parent=None):
        super(PurchaseRegistrationModule, self).__init__(parent)
        self.setupUi(self)
        if '28' not in user.powers:
            self.close()
        if user.powers['28'] == 0:
            self.close()
        self.power = '{:03b}'.format(user.powers['28'])

        self.WC = WarehouseController()
        self.LC = LabrecordsController()
        self.SC = SupplyerController()
        self.SFC = StuffController()
        self.CI = CheckItem()
        self.groupBox.setVisible(False)
        self.spid = 0
        self.paperno = ''
        self.supid = ''
        self.supname = ''

        self.get_order_list()

    def get_order_list(self):
        self.treeWidget_orderlist.clear()
        self.treeWidget_orderlist.hideColumn(0)
        index = self.tabWidget.currentIndex()
        key_dict = {'status': index, 'papertype': 0}
        order_list = self.WC.get_stuffcheckin(False, *VALUES_TUPLE_ORDER,
                                              **key_dict)
        if not len(order_list):
            return
        for item in order_list:
            qtreeitem = QTreeWidgetItem(self.treeWidget_orderlist)
            qtreeitem.setText(0, str(item['autoid']))
            qtreeitem.setText(1, item['paperno'])
            qtreeitem.setText(2, item['supid'] + ' ' + item['supname'])
            qtreeitem.setText(3, item['creatorid'] + ' ' + item['creatorname'])
            qtreeitem.setText(4, str(item['buydate']))
            qtreeitem.setText(5, item['buyerid'] + ' ' + item['buyername'])
            qtreeitem.setText(6, item['pppaperno'])
            qtreeitem.setText(7, item['remark'])
        for i in range(1, 8):
            self.treeWidget_orderlist.resizeColumnToContents(i)

    def get_stuff_list(self):

        self.treeWidget_stufflist.clear()
        self.treeWidget_stufflist.hideColumn(0)
        index = self.tabWidget.currentIndex()
        key_dict = {'paperno': self.paperno, 'papertype': 0}
        stuff_list = self.WC.get_stuffcheckinlist(False, *VALUES_TUPLE_STUFF,
                                                  **key_dict)
        if not len(stuff_list):
            return
        for item in stuff_list:
            qtreeitem = QTreeWidgetItem(self.treeWidget_stufflist)
            qtreeitem.setText(0, str(item['autoid']))
            qtreeitem.setText(1, STATUS[item['status']])
            qtreeitem.setText(2, item['stuffid'] + ' ' + item['stuffname'])
            qtreeitem.setText(3, item['batchno'])
            qtreeitem.setText(4, item['mbatchno'])
            qtreeitem.setText(5, STUFF_KIND[item['stufftype']])
            qtreeitem.setText(6, item['spec'])
            qtreeitem.setText(7, item['package'])
            qtreeitem.setText(8, item['position'])
            qtreeitem.setText(9, str(item['amount']))
            qtreeitem.setText(10, str(item['piamount']))
            qtreeitem.setText(11, item['unit'])
            qtreeitem.setText(12, item['producer'])
        for i in range(1, 13):
            self.treeWidget_stufflist.resizeColumnToContents(i)

    @pyqtSlot(int)
    def on_tabWidget_currentChanged(self, p_int):
        tab = getattr(self, 'tab_' + str(p_int))
        tab.setLayout(self.gridLayout_2)
        self.groupBox.setVisible(False)
        self.get_order_list()

    @pyqtSlot(QTreeWidgetItem, int)
    def on_treeWidget_orderlist_itemClicked(self, qtreeitem, p_int):
        self.groupBox.setVisible(True)

        self.paperno = qtreeitem.text(1)
        self.supid = qtreeitem.text(2).split(' ')[0]
        self.supname = qtreeitem.text(2).split(' ')[1]
        key_dict = {'supid': self.supid, 'supname': self.supname}
        res = self.SC.get_supply(True, *VALUES_TUPLE_SUPPLYER, **key_dict)
        if len(res):
            self.spid = res[0]
        self.get_stuff_list()

    @pyqtSlot(QPoint)
    def on_treeWidget_orderlist_customContextMenuRequested(self, pos):
        if self.power[1] == '0':
            return
        id = 0
        index = self.tabWidget.currentIndex()
        if index != 0:
            return
            # 返回调用者的对象
        sender_widget = self.sender()
        current_item = sender_widget.currentItem()
        if current_item is not None:
            id = int(current_item.text(0))

        menu = QMenu()
        button1 = menu.addAction("新增登记单")
        button2 = menu.addAction("设置为完成状态")
        button3 = menu.addAction("设置为其他状态")

        global_pos = sender_widget.mapToGlobal(pos)
        action = menu.exec(global_pos)

        if action == button1:
            detail = NewPurchRegModule(self)
            detail.accepted.connect(self.get_order_list)
            detail.show()

        elif action == button2:
            if id is None:
                return
            key_dict = {'status': 1}
            self.WC.update_stuffcheckin(id, **key_dict)
            self.get_order_list()
        elif action == button3:
            if id is None:
                return
            key_dict = {'status': 2}
            self.WC.update_stuffcheckin(id, **key_dict)
            self.get_order_list()

    @pyqtSlot(QPoint)
    def on_treeWidget_stufflist_customContextMenuRequested(self, pos):
        if self.power[1] == '0':
            return
        id = 0
        index = self.tabWidget.currentIndex()
        if index != 0:
            return
            # 返回调用者的对象
        sender_widget = self.sender()
        current_item = sender_widget.currentItem()
        if current_item is not None:
            id = int(current_item.text(0))

        menu = QMenu()
        button1 = menu.addAction("增加")
        button2 = menu.addAction("修改")
        button3 = menu.addAction("删除")
        button4 = menu.addAction("请验单")
        button5 = menu.addAction("不合格品处理申请")
        button6 = menu.addAction("不合格品处理意见")

        global_pos = sender_widget.mapToGlobal(pos)
        action = menu.exec(global_pos)

        if action == button1:
            detail = EditRegStuffModule(spid=self.spid,
                                        paperno=self.paperno,
                                        parent=self)
            detail.accepted.connect(self.get_stuff_list)
            detail.show()

        elif action == button2:
            if not id:
                return
            detail = EditRegStuffModule(autoid=id, parent=self)
            detail.accepted.connect(self.get_stuff_list)
            detail.show()
        elif action == button3:
            if not id:
                return
            if current_item.text(1) not in ("登记", "请验中"):
                return
            key_dict_lab = {'autoid': id}
            lab_list = self.WC.get_stuffcheckinlist(True, *VALUES_TUPLE_LAB,
                                                    **key_dict_lab)
            self.LC.delete_labrecord(list(lab_list))
            self.LC.delete_labitem(list(lab_list))
            self.WC.delete_stuffcheckinlist(id)
            self.get_stuff_list()
        elif action == button4:
            if not id:
                return
            status = current_item.text(1)
            if status not in ("登记", "请验中"):
                return
            stuffid = current_item.text(2).split(' ')[0]
            stuffname = current_item.text(2).split(' ')[1]
            key_dict = {'stuffid': stuffid, 'stuffname': stuffname}
            checkunit = ''
            res = self.SFC.get_stuffdict(True, *VALUES_TUPLE_SD, **key_dict)
            if len(res):
                checkunit = res[0]
            key_dict_lab = {'ciid': id, 'labtype': 0}
            labrecord_list = self.LC.get_labrecord(False, **key_dict_lab)
            if not len(labrecord_list):
                kwargs = {
                    'labtype': 0,
                    'chkid': stuffid,
                    'chkname': stuffname,
                    'batchno': current_item.text(3),
                    'mbatchno': current_item.text(4),
                    'spec': current_item.text(6),
                    'package': current_item.text(7),
                    'producer': current_item.text(12),
                    'supplyer': self.supname,
                    'ciid': int(current_item.text(0)),
                    'createdate': user.now_date,
                    'checkamount': decimal.Decimal(current_item.text(9)),
                    'caunit': current_item.text(11),
                    'sampleunit': checkunit,
                    'samplesource': self.supname
                }
                labrecord = self.LC.update_labrecord(**kwargs)
                key_dict_checkitem = {'stuffid': stuffid, 'itemtype': 0}
                checkitems = self.CI.get_checkitems(False,
                                                    *VALUES_TUPLE_CHECKITEM,
                                                    **key_dict_checkitem)
                for item in checkitems:
                    kwargs_checkitem = {
                        'lrid': labrecord.autoid,
                        'seqid': item['seqid'],
                        'itemname': item['itemname'],
                        'kind': item['kind'],
                        'referencevalue': item['referencevalue'],
                        'labvalue': item['referencevalue'],
                        'putintype': item['putintype'],
                        'startdate': user.now_date,
                        'enddate': user.now_date,
                        'checked': 2
                    }
                    self.LC.update_labitem(**kwargs_checkitem)
            else:
                labrecord = labrecord_list[0]
            self.WC.update_stuffcheckinlist(id, lrid=labrecord.autoid)
            detail = ApplycheckModule(autoid=labrecord.autoid, parent=self)
            detail.applyed.connect(self.get_stuff_list)
            detail.show()

    @pyqtSlot(QTreeWidgetItem, int)
    def on_treeWidget_stufflist_itemDoubleClicked(self, qtreeitem, p_int):
        if self.power[1] == '0':
            return
        status = qtreeitem.text(1)
        if status != "登记":
            return
        id = int(qtreeitem.text(0))
        detail = EditRegStuffModule(autoid=id, parent=self)
        detail.accepted.connect(self.get_stuff_list)
        detail.show()
Ejemplo n.º 3
0
class EditStuffCheckInModule(QDialog, Ui_Dialog):
    def __init__(self, autoid, lrid=0, parent=None):
        super(EditStuffCheckInModule, self).__init__(parent)
        self.ori_detail = dict()
        self.detail = {
            'content': decimal.Decimal('-1'),
            'cunit': '%',
            'water': decimal.Decimal('-1'),
            'rdensity': decimal.Decimal('-1'),
            'impurity': decimal.Decimal('-1'),
            'position': ''
        }
        self.new_detail = dict()
        self.LC = LabrecordsController()
        self.WC = WarehouseController()
        self.SFC = StuffController()
        self.setupUi(self)

        self.autoid = autoid
        self.lrid = lrid

        self.get_detail()
        if lrid != 0:
            self.set_putin_parameter()
        self.set_validator()
        self.get_location_list()
        if len(self.ori_detail):
            self.set_content_unit()

    def get_detail(self):
        if not self.autoid:
            self.pushButton_accept.setEnabled(False)
            return
        key_dict = {'autoid': self.autoid}
        res = self.WC.get_stuffcheckinlist(False, *VALUES_TUPLE_CHECK_IN_LIST,
                                           **key_dict)
        if len(res) != 1:
            return
        self.ori_detail = res[0]

    def set_putin_parameter(self):
        key_dict = {'lrid': self.lrid}
        res = self.LC.get_labitem(False, *VALUES_TUPLE_LAB, **key_dict)
        for item in res:
            if item['putintype'] == 1:
                try:
                    content = re.findall('\d+\.?\d?', item['labvalue'])[0]
                    self.lineEdit_content.setText(content)
                except IndexError:
                    pass
            elif item['putintype'] == 2:
                try:
                    water = re.findall('\d+\.?\d?', item['labvalue'])[0]
                    self.lineEdit_water.setText(water)
                except IndexError:
                    pass
            elif item['putintype'] == 3:
                try:
                    rdensity = re.findall('\d+\.?\d?', item['labvalue'])[0]
                    self.lineEdit_rdensity.setText(rdensity)
                except IndexError:
                    pass
            elif item['putintype'] == 4:
                try:
                    impuriity = re.findall('\d+\.?\d?', item['labvalue'])[0]
                    self.lineEdit_impurity.setText(impuriity)
                except IndexError:
                    pass

    def set_validator(self):
        doubleValitor = QDoubleValidator()
        doubleValitor.setBottom(-1)
        doubleValitor.setDecimals(3)
        doubleValitor.setNotation(QDoubleValidator.StandardNotation)
        self.lineEdit_content.setValidator(doubleValitor)
        self.lineEdit_water.setValidator(doubleValitor)
        self.lineEdit_rdensity.setValidator(doubleValitor)
        self.lineEdit_impurity.setValidator(doubleValitor)

    def get_location_list(self):
        location_list = self.WC.get_stuffcheckinlist(
            True, *VALUES_TUPLE_LOCATION).distinct()
        if len(location_list):
            self.comboBox_location.addItems(location_list)
        if len(self.ori_detail):
            self.comboBox_location.setCurrentText(self.ori_detail['position'])
        else:
            self.comboBox_location.setCurrentText("")

    def set_content_unit(self):
        cunit = '%'
        stuffid = self.ori_detail['stuffid']
        key_dict = {'stuffid': stuffid}
        stuff_list = self.SFC.get_stuffdict(False, *VALUES_TUPLE_STUFF,
                                            **key_dict)
        if len(stuff_list):
            stuff = stuff_list[0]
            cunit = stuff['cunit']
            self.label_contentunit.setText(cunit)
            self.detail['cunit'] = cunit
            self.detail['stuffkind'] = stuff['kind']
            self.detail['stufftype'] = stuff['stufftype']
            self.detail['allowno'] = stuff['allowno']
            self.detail['nextcheckdate'] = user.now_date + datetime.timedelta(
                days=stuff['countercheckdays'])
            self.detail['spamount'] = stuff['spamount']
            self.detail['spunit'] = stuff['spunit']
            self.detail['basicamount'] = stuff['basicamount']

    @pyqtSlot(str)
    def on_lineEdit_content_textChanged(self, p_str):
        self.detail['content'] = decimal.Decimal(p_str)

    @pyqtSlot(str)
    def on_lineEdit_water_textChanged(self, p_str):
        self.detail['water'] = decimal.Decimal(p_str)

    @pyqtSlot(str)
    def on_lineEdit_rdensity_textChanged(self, p_str):
        self.detail['rdensity'] = decimal.Decimal(p_str)

    @pyqtSlot(str)
    def on_lineEdit_impurity_textChanged(self, p_str):
        self.detail['impurity'] = decimal.Decimal(p_str)

    @pyqtSlot(str)
    def on_comboBox_location_currentTextChanged(self, p_str):
        self.detail['position'] = p_str

    @pyqtSlot()
    def on_pushButton_accept_clicked(self):

        self.detail['ciid'] = self.ori_detail['autoid']
        self.detail['pltype'] = 0
        self.detail['stuffid'] = self.ori_detail['stuffid']
        self.detail['stuffname'] = self.ori_detail['stuffname']
        self.detail['spec'] = self.ori_detail['spec']
        self.detail['package'] = self.ori_detail['package']
        self.detail['supid'] = self.ori_detail['supid']
        self.detail['supname'] = self.ori_detail['supname']
        self.detail['producer'] = self.ori_detail['producer']
        self.detail['makedate'] = self.ori_detail['makedate']
        self.detail['batchno'] = self.ori_detail['batchno']
        self.detail['mbatchno'] = self.ori_detail['mbatchno']
        self.detail['expireddate'] = self.ori_detail['expireddate']
        self.detail['amount'] = self.ori_detail['amount']
        self.detail['piamount'] = self.ori_detail['amount']
        self.detail['basicunit'] = self.ori_detail['unit']
        self.detail['checkindate'] = self.ori_detail['checkindate']
        self.detail['putindate'] = user.now_date
        self.detail['lrid'] = self.ori_detail['lrid']
        self.detail['warehousemanid'] = user.user_id
        self.detail['warehousemanname'] = user.user_name
        res = self.WC.update_stuffrepository(**self.detail)
        srid_id = res.autoid
        cil_detail = {
            'status': 5,
            'srid': srid_id,
            'pidate': user.now_date,
            'content': self.detail['content'],
            'cunit': self.detail['cunit'],
            'water': self.detail['water'],
            'rdensity': self.detail['rdensity'],
            'impurity': self.detail['impurity']
        }
        self.WC.update_stuffcheckinlist(self.autoid, **cil_detail)
        self.accept()

    @pyqtSlot()
    def on_pushButton_cancel_clicked(self):
        self.close()