Example #1
0
	def showPayed(self):
		"""显示已支付合同"""
		self.model.clear()
		c = CreditAbout()
		self.data = c.getFilter(key=1)
		if self.data:
			self.showTable()
Example #2
0
	def showNo(self):
		"""显示所有未支付合同"""
		self.model.clear()
		c = CreditAbout()
		self.data = c.getFilter()
		if self.data:
			self.showTable()
Example #3
0
	def showAll(self):
		"""显示所有合同"""
		self.model.clear()
		c = CreditAbout()
		self.data = c.getAllContract()
		if self.data:
			self.showTable()
Example #4
0
 def pay(self, data):
     c = ZhuanzhangNote()
     c.addNote(data)
     d = CreditAbout()
     d.setPayed(self.cid)
     self.showAll()
     mes = QErrorMessage(self)
     mes.setWindowTitle("提示")
     mes.showMessage("支付成功!")
     mes.show()
Example #5
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     self.setupUi(self)
     self.model = QStandardItemModel()
     self.title = ['合同id', '合同公司', '合同金额', '签定日期', '交货日期', '付款日期']
     self.data = list()
     self.comboBox.addItems(['合同id', '合同公司', '签定日期', '交货日期'])
     self.dic = ['cid', 'ccompany', 'signdate', 'givedate']
     c = CreditAbout()
     self.data = c.getAllContract()
     self.showTable()
Example #6
0
	def delContract(self, c):
		"""删除合同"""
		try:
			index = self.tableView.currentIndex().row()
			cid = self.data[index][0]
			c = CreditAbout()
			res = c.delcontract(cid)
			if res:
				self.data.pop(index)
				self.showTable()
		except Exception as ret:
			print(ret)
			mes = QErrorMessage(self)
			mes.setWindowTitle("提示")
			mes.showMessage("删除失败")
			mes.show()
Example #7
0
 def findContract(self):
     print("查找")
     ty = self.dic[self.comboBox.currentIndex()]
     d = self.lineEdit.text()
     if d:
         c = CreditAbout()
         self.data = c.getList(ty, d)
         self.showTable()
         mes = QErrorMessage(self)
         mes.setWindowTitle("提示")
         mes.showMessage("共找到{}条数据".format(len(self.data)))
         mes.show()
         return
     mes = QErrorMessage(self)
     mes.setWindowTitle("提示")
     mes.showMessage("查找失败!请输入正确格式!")
     mes.show()