示例#1
0
    def setup_iftAdapter(self):
        if not os.path.isfile(
                r'C:\Infotech\Common\iftWinExAdapter.dll'):  # 인포텍모듈 없으면
            title = "공인인증서 모듈설치"
            msg = "지금 공인인증서 모듈을 설치하시겠습니까 ??<br>나중에 설치가능 합니다!!"
            inst = Util.MsgBoxTF(title, msg)
            TF = inst.initUI()
            if TF == True:
                driverutil.setup_iftCertAdapter()
            else:
                pass
        elif os.path.isfile(
                r'C:\Infotech\Common\iftWinExAdapter.dll'):  # 인포텍모듈 있으면
            # 공인인증서 모듈 실행
            cert_nm, cert_pw = iftutil.cert_nm_pw()
            self.cert_nm = cert_nm
            self.cert_pw = cert_pw
            nts_dict['secret']['공인인증서명칭'] = cert_nm
            nts_dict['secret']['공인인증서비번'] = cert_pw

            # 2. 수정된 딕셔너리를 json 파일로 만들어 저장
            jsconverter.dict_to_json(nts_dict, FULLPATH_NTS_JSON)
示例#2
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.cta_id = nts_dict['secret']['세무사관리번호']
        self.bs_id = nts_dict['secret']['부서아이디']
        self.super_id = nts_dict['secret']['수퍼아이디']
        self.cert_nm = nts_dict['secret']['공인인증서명칭']
        self.cta_pw = nts_dict['secret']['세무사비번']
        self.bs_pw = nts_dict['secret']['부서비번']
        self.delay_time = str(nts_dict['secret']['딜레이타임'])
        self.cert_pw = nts_dict['secret']['공인인증서비번']

        # mapping text : idpw_list_of_dic
        self.text_map_WebLstDic = {
            "Naver": web_dict['idpw']['Naver'],
            "Hanbiro": web_dict['idpw']['Hanbiro'],
            "nate": web_dict['idpw']['nate'],
            "daum": web_dict['idpw']['daum'],
            "gmail": web_dict['idpw']['gmail'],
            "bizforms": web_dict['idpw']['bizforms'],
            "etaxkorea": web_dict['idpw']['etaxkorea'],
            "TheBill": web_dict['idpw']['TheBill']
        }
        # web Item list
        self.web_gubun_lst = web_dict['gubun']
        self.email_lst = web_dict['email']
        self.website_lst = web_dict['websites']
        # web combobox additems
        self.web_gubun_cb.addItems(self.web_gubun_lst)
        if self.web_gubun_cb.currentText() == "email":
            self.web_cb.addItems(self.email_lst)
            # Qwidget에 전달할 값 확보
            text = self.web_cb.currentText()
            self.setup_web_widgets(text)

        elif self.web_gubun_cb.currentText() == "websites":
            self.web_cb.addItems(self.website_lst)
            # Qwidget에 전달할 값 확보
            text = self.web_cb.currentText()
            self.setup_web_widgets(text)

        # id / pw 추가 입력을 위한 리스트(2)
        self.add_idpw = [None, None]  # [None for i in range(2)]

        if (self.cert_nm == "" or self.cert_pw == ""):

            title = "공인인증서 등록"
            msg = f"홈택스 로그인 시 공인인증서 정보가 필요합니다 !!!<br>지금 등록 하시겠습니까??"
            inst = Util.MsgBoxTF(title, msg)
            TF = inst.initUI()

            if TF == True:
                self.setup_iftAdapter()
            else:
                pass

        if (self.cta_id == "" or self.cta_pw == ""):
            # require_list = []
            # for key, val in nts_dict['secret'].items():
            #     if val=="":
            #         require_list.append(key)
            # require_str = " / ".join(require_list)

            title = "필수사항 초기입력"
            # msg = f"필수사항({require_str})입력이 필요합니다!!<br>지금 필수사항을 입력하시겠습니까??"
            msg = f"세무법인은 <b>세무사관리번호, 세무사관리번호 비밀번호</b>는 반드시 입력해야 합니다 !!<br>지금 필수사항을 입력하시겠습니까??"
            inst = Util.MsgBoxTF(title, msg)
            TF = inst.initUI()

            if TF == True:
                setting = SettingMenu()
                setting.exec_()
            else:
                pass

        self.set_placeholder()

        # Nts login Signal connect Slot
        self.le_cta_id.editingFinished.connect(self.cta_id_changed)
        self.le_bs_id.editingFinished.connect(self.bs_id_changed)
        self.le_delay_time.editingFinished.connect(self.delay_time_changed)
        self.btn_nts_login.clicked.connect(self.nts_login_clicked)
        self.btn_nts_set.clicked.connect(self.nts_set_clicked)

        # Web login Signal connect Slot
        self.web_gubun_cb.activated[str].connect(self.on_webgubun_activated)
        self.web_cb.activated[str].connect(self.on_web_activated)
        self.web_id_cb.activated[str].connect(self.on_webid_activated)
        self.web_id.editingFinished.connect(self.web_id_changed)
        self.web_pw.editingFinished.connect(self.web_pw_changed)
        self.btn_web_login.clicked.connect(self.web_login_clicked)
        self.btn_web_set.clicked.connect(self.web_set_clicked)