更新
This commit is contained in:
@@ -280,11 +280,11 @@ class PrescriptionsPage(QWidget):
|
||||
"已开处方",
|
||||
"管理处方审核、患者修正与履约订单;已通过且未作废的处方只允许查看。",
|
||||
)
|
||||
self.orders_button = QPushButton("业务订单")
|
||||
self.orders_button = QPushButton("业务订单", header)
|
||||
self.orders_button.setVisible(has_permission(permissions, "tcm.prescriptionOrder/lists"))
|
||||
self.orders_button.clicked.connect(lambda: self._open_orders())
|
||||
header.add_action(self.orders_button)
|
||||
self.add_button = QPushButton("+ 新增处方")
|
||||
self.add_button = QPushButton("+ 新增处方", header)
|
||||
self.add_button.setProperty("variant", "primary")
|
||||
self.add_button.setVisible(has_permission(permissions, "cf.prescription/add"))
|
||||
self.add_button.clicked.connect(self._add_prescription)
|
||||
@@ -436,7 +436,9 @@ class PrescriptionsPage(QWidget):
|
||||
*,
|
||||
danger: bool = False,
|
||||
) -> QPushButton:
|
||||
button = QPushButton(text)
|
||||
# Keep permission-driven initial visibility inside the page hierarchy;
|
||||
# otherwise Windows briefly exposes the button as its own window.
|
||||
button = QPushButton(text, self)
|
||||
if danger:
|
||||
button.setProperty("variant", "danger")
|
||||
button.setVisible(has_permission(self.permissions, permission))
|
||||
|
||||
Reference in New Issue
Block a user