Beispiel #1
0
 def slotSelectArticle(self):
     dlg = DlgArticle(self, True)
     dlg.setModal(True)
     if QDialog.Accepted!=dlg.exec_():
         return
     self.__article = dlg.getSelectedArticle()
     self.ui.lineEdit_articlename.setText(self.__article.model)
Beispiel #2
0
 def slotArticleMs(self):
     dlg = DlgArticle(self, True)
     dlg.setModal(True)
     '''未选中任何物品'''
     if QDialog.Accepted != dlg.exec_():
         #print 'not accepted'
         return
     self.__article = dlg.getSelectedArticle()
     if self.__article == None: return
     #如果返回了正确的物品信息
     self.ui.lineEdit_articlename.setText(self.__article.model)
     self.ui.label_unit.setText(self.__article.unit)
     remainList = dbArticle().getSpecArticleRemainList(self.__article.id)
     if len(remainList) > 0:
         remainInfo = remainList[0]
         self.ui.lineEdit_remain.setText('%f'%remainInfo.remainCount)
     else:
         self.ui.lineEdit_remain.setText(u'0')
     #更新价格列表
     priceList = dbInOutRecord().getSpecArticlePriceList(self.__article.id)
     self.ui.comboBox_price.clear()
     for price in priceList: self.ui.comboBox_price.addItem(u'%.2f'%price)
     self.ui.comboBox_price.setCurrentIndex(0)
Beispiel #3
0
 def slotArticle(self):
     dlg = DlgArticle(self)
     dlg.setModal(True)
     dlg.exec_()
     self.__udpateArticleTreeView()