예제 #1
0
    def __init__(self, autoid, parent=None):
        # 根据人员权限确定是否能打开模块;是否能修改人员信息
        super(ClerkDtailModule, self).__init__(parent)
        self.setupUi(self)

        # 当前人员的clerkid,主键
        self.autoid = autoid
        self.trainingstatus = 0
        self.healthstatus = 0
        self.CC = ClerksController()
        self.IC = ImageController()
        self.ori_detail = {}
        self.new_detail = {}
        self.treeWidget_deptlist.hideColumn(0)
        self.treeWidget_experience.hideColumn(0)
        self.treeWidget_train.hideColumn(0)
        self.treeWidget_health.hideColumn(0)
        self.get_detail()
        self.get_clerkdept()
        self.get_experience()
        self.get_training()
        self.get_health()
        # 初始化填写格式
        self.init_lineedit_content()
        # 初始化权限列表
        self.init_authority()
        # 初始化下拉菜单的内容
        self.init_combo_content()
        return_row = ('autoid', 'deptid', 'deptname')
        condition_key = {'deptid', 'deptname', 'inputcode'}
        treeheader_name = ["id", "编号", "部门名"]
        self.lineEdit_deptment.setup('Department', return_row, condition_key,
                                     treeheader_name, None, 300, 200)
예제 #2
0
 def delete_productlabel(autoid, *args):
     try:
         with transaction.atomic():
             image_model = ImageController()
             image_list = Productlabel.objects.filter(
                 autoid__in=autoid).values_list("imgid", flat=True)
             image_model.delete_image(autoid=image_list)
             return Productlabel.objects.filter(autoid__in=autoid).delete()
     except Exception as e:
         SaveExcept(e, "删除产品标签图时出错", autoid=autoid, args=args)
예제 #3
0
 def __init__(self, autoid, parent=None):
     super(HomePageModule, self).__init__(parent)
     self.setupUi(self)
     self.autoid=autoid
     self.current_img = object
     self.current_page = object
     self.PC = ProductController()
     self.WC = WorkshopController()
     self.IC = ImageController()
     # 自动缩放
     self.label_image.setScaledContents(True)
     self.get_detail()
     self.get_images()
     self.scrollArea.setVisible(False)
     self.groupBox.setVisible(False)
예제 #4
0
 def __init__(self, parent=None):
     super(ClientListModule, self).__init__(parent)
     self.setupUi(self)
     if '54' not in user.powers:
         self.close()
     if user.powers['54'] == 0:
         self.close()
     self.power = '{:03b}'.format(user.powers['54'])
     self.SC = SaleController()
     self.IC = ImageController()
     self.kind_list = []
     self.curremt_kind = 0
     self.treeWidget_kind.hideColumn(1)
     self.treeWidget_detail.hideColumn(0)
     self.get_kind_list()
     self.get_client_list()
예제 #5
0
 def __init__(self, autoid=None, parent=None):
     super(EditClientDetailModule, self).__init__(parent)
     self.setupUi(self)
     if '54' not in user.powers:
         self.close()
     if user.powers['54'] == 0:
         self.close()
     self.power = '{:03b}'.format(user.powers['54'])
     if self.power[1] == '0':
         self.pushButton_accept.setVisible(False)
         self.pushButton_cancel.setVisible(False)
     self.autoid = autoid
     self.ori_detail = dict()
     self.new_detail = dict()
     self.current_img = object
     self.current_page = object
     self.province_list = []
     self.city_list = []
     self.county_list = []
     self.province_id = ''
     self.city_id = ''
     self.county_id = ''
     self.qyname = ''
     self.SC = SaleController()
     self.IC = ImageController()
     self.treeWidget_imagenamelist.hideColumn(0)
     self.treeWidget_imagenamelist.hideColumn(1)
     # 自动缩放
     self.label_image.setScaledContents(True)
     return_row = ('parentid', 'autoid', 'kindname')
     condition_key = {'autoid', 'kindname', 'inputcode'}
     treeheader_name = ['parentid', '编号', '名称']
     condition = {'kind': 4}
     self.lineEdit_tstkind.setup('Treestructure',
                                 return_row,
                                 condition_key,
                                 treeheader_name,
                                 condition,
                                 treewidth=300)
     self.get_detail()
     self.get_province()
     if len(self.ori_detail):
         self.get_city(self.ori_detail['province'])
         self.get_county(self.ori_detail['city'])
예제 #6
0
 def __init__(self, autoid=None, parent=None):
     super(EditSupplyerDetailModule, self).__init__(parent)
     self.setupUi(self)
     if '3' not in user.powers:
         self.close()
     if user.powers['3'] == 0:
         self.close()
     self.power = '{:03b}'.format(user.powers['3'])
     if self.power[1] == '0':
         self.pushButton_accept.setVisible(False)
         self.pushButton_cancel.setVisible(False)
     self.autoid = autoid
     self.docid = 0
     self.current_content = QWidget()
     self.ori_detail = dict()
     self.new_detail = dict()
     self.current_img = object
     self.current_page = object
     self.SC = SupplyerController()
     self.SDC = SelfdefinedformatController()
     self.IC = ImageController()
     self.treeWidget_stuff.hideColumn(0)
     self.treeWidget_revalution.hideColumn(0)
     self.treeWidget_imagenamelist.hideColumn(0)
     self.treeWidget_imagenamelist.hideColumn(1)
     # 自动缩放
     self.label_image.setScaledContents(True)
     return_row = ('parentid', 'autoid', 'kindname')
     condition_key = {'autoid', 'kindname', 'inputcode'}
     treeheader_name = ['parentid', '编号', '名称']
     condition = {'kind': 0}
     self.lineEdit_kind.setup('Treestructure',
                              return_row,
                              condition_key,
                              treeheader_name,
                              condition,
                              treewidth=300)
     self.get_detail()
    def __init__(self, autoid=None, parent=None):
        super(EditProductDetailModule, self).__init__(parent)
        self.setupUi(self)
        if '2s' not in user.powers:
            self.close()
        if user.powers['2'] == 0:
            self.cloe()
        self.power = '{:03b}'.format(user.powers['2'])
        self.autoid = autoid
        self.img_status = 0
        self.images_list = []
        self.current_img = object
        self.current_page = object
        self.PC = ProductController()
        self.PLC = ProductLineConroller()
        self.LC = LabrecordsController()
        self.IC = ImageController()

        self.ori_detail = {}
        self.new_detail = {}
        self.get_detail()
        # 获取种类的下拉列表
        self.get_medkind_list()
        self.get_qrtype()
        self.get_workshop()
        self.get_bworkshop()
        self.get_vworkshop()
        self.get_formula()
        self.get_images()
        self.get_checkitem(3, self.treeWidget_precheckitem)
        self.get_checkitem(4, self.treeWidget_prodcheckitem)
        self.get_checkitem(6, self.treeWidget_samplecheckitem)
        self.treeWidget_formula.hideColumn(0)
        self.treeWidget_precheckitem.hideColumn(0)
        self.treeWidget_prodcheckitem.hideColumn(0)
        self.treeWidget_samplecheckitem.hideColumn(0)
        self.treeWidget_imagenamelist.hideColumn(0)
        self.treeWidget_imagenamelist.hideColumn(1)