commit 9ebe02171dc3ece699f74fde45360f20a7d5f23c Author: DK Date: Tue Oct 29 09:21:10 2024 +0000 Add sales.py diff --git a/sales.py b/sales.py new file mode 100644 index 0000000..d5ba22d --- /dev/null +++ b/sales.py @@ -0,0 +1,102 @@ +import test_20231011 as new_rfq +import RFQ_summary_20230927 as rfq_summary +from lib import packing_api as packing +#import packing_information_extract_20230913 as packing +from lib import price_api as price +import email_local_service as email_local +import email_freight_service as email_freight +import email_finance as email_finance +import email_invoice as email_invoice +import email_travel_agency as email_travel_agency +import email_shipping_documents as email_shipping_documents +import email_ISF as email_ISF +import email_shipping_documents_send as email_shipping_documents_send +import PO_Package_Check_List as PO_Package_List +from lib import application_api as app +from util_lib import select_path as sel +import PO_Package as zipfile +import PO_Document_Rename as Rename + +import sys + +def exit(): + window.destroy() + sys.exit() + +import tkinter as tk +from tkinter import simpledialog + +# Tkinter 윈도우 생성 +window = tk.Tk() +window.title("모드를 선택하세요") + +# 결과를 표시할 레이블 +result_label = tk.Label(window, text="모드를 선택하세요") +result_label.pack(pady=10) + +# 버튼 +button1 = tk.Button(window, text="1. 신규 RFQ 생성모드", command=lambda: new_rfq.package()) +button1.pack(pady=10) + +button2 = tk.Button(window, text="2. RFQ 사양 검토모드", command=lambda: rfq_summary.RFQ_summary()) +button2.pack(pady=10) + +button3 = tk.Button(window, text="3. 포장사양 검토모드", command=lambda: packing.packing(directory_path=sel.select_folder(subject="폴더를 선택하세요"))) +button3.pack(pady=10) + +button4_1 = tk.Button(window, text="4-1. 부대역무 견적의뢰", command=lambda: email_local.send_email()) +button4_1.pack(pady=10) + +button4_2 = tk.Button(window, text="4-2. 항공운송 견적의뢰", command=lambda: email_freight.send_email()) +button4_2.pack(pady=10) + +button5_1 = tk.Button(window, text="5-1. 입찰공사 가격분석표 정리모드", command=lambda: price.Price_Breakdown_Bid()) +button5_1.pack(pady=10) + +button5_2 = tk.Button(window, text="5-2. 수주공사 가격분석표 정리모드", command=lambda: price.Price_Breakdown_Order()) +button5_2.pack(pady=10) + +button11_1 = tk.Button(window, text="11-1. PO Package Check List", command=lambda: PO_Package_List.PO_Package()) +button11_1.pack(pady=10) + +button11_2 = tk.Button(window, text="11-2. PO Package Rename", command=lambda: Rename.rename()) +button11_2.pack(pady=10) + +button11_3 = tk.Button(window, text="11-3. 발송용 압축파일 생성", command=lambda: zipfile.attachment_zip()) +button11_3.pack(pady=10) + +# button12_1 = tk.Button(window, text="12-1. 선수금 신고 의뢰", command=lambda: email_finance.send_email()) +# button12_1.pack(pady=10) + +# button12_2 = tk.Button(window, text="12-2. Invoice 발행 의뢰", command=lambda: email_invoice.send_email()) +# button12_2.pack(pady=10) + +button12_3 = tk.Button(window, text="12-3. 선적서류/현지역무 서류 의뢰", command=lambda: email_shipping_documents.send_email()) +button12_3.pack(pady=10) + +button12_4 = tk.Button(window, text="12-4. ISF 신고 의뢰", command=lambda: email_ISF.send_email()) +button12_4.pack(pady=10) + +button13_1 = tk.Button(window, text="13-1. 선적서류/현지역무 서류 체크리스트", command=lambda: app.notepad(sel.select_file(initialdir=r"E:\sales_code\Template", title="파일을 선택하세요", filetypes=(("text files", "*.txt"), ("All files", "*.*"))))) +button13_1.pack(pady=10) + +button13_2 = tk.Button(window, text="13-2. 선적서류/현지역무 서류 발송", command=lambda: email_shipping_documents_send.send_email()) +button13_2.pack(pady=10) + +button21_1 = tk.Button(window, text="21-1. 배차 신청", command=lambda: email_travel_agency.send_email()) +button21_1.pack(pady=10) + +# button81 = tk.Button(window, text="81. Excel 실행", command=lambda: app.excel(sel.select_excel_file())) +button81 = tk.Button(window, text="81. Excel 실행", command=lambda: app.excel(sel.select_file(title="Select Excel File", filetypes=(("Excel Files", "*.xlsx"),("Old Excel files", "*.xls"))))) +button81.pack(pady=10) + +# button91 = tk.Button(window, text="91. 표준양식 수정", command=lambda: app.excel(sel.select_std_format_file("Select Excel File"))) +button91 = tk.Button(window, text="91. 표준양식 수정", command=lambda: app.excel(sel.select_file(initialdir=r"E:\sales_code\Template",title="표준 양식 파일을 선택하세요.", filetypes=(("Excel Files", "*.xlsx"),("Old Excel files", "*.xls"))))) +button91.pack(pady=10) + +button = tk.Button(window, text="프로그램 종료", command=lambda: exit()) +button.pack(pady=10) + +# 윈도우 실행 +window.mainloop() +