Commit 3929fb48 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程五脚本提交

parent 346e90ba
......@@ -623,7 +623,7 @@ def main():
check_mcms_purchase(66) # 检查试剂采购订单数据
commonFuc().check_text_exist_result_text('succees', 'succees')
except Exception as e:
print('出现错误,请检查脚本或者数据')
# print('出现错误,请检查脚本或者数据')
print(f"发生错误: {e}")
print("发生异常:", str(e))
......
......@@ -311,8 +311,6 @@ def main_text():
button.pack()
root.mainloop()
def button_clicked(branch_id):
result = confirm()
if result == True:
......@@ -320,15 +318,61 @@ def main_text():
if result1 == True:
print(branch_id)
delData().Delete_goods_change_info()
delData().Delete_probeInfo_other(3,branch_id)
delData().Delete_probeInfo_other(3, branch_id)
# delData().Del_supply_relation()
delData().Delete_business_Data(2,branch_id)
delData().Del_reporter_data(2,branch_id)
delData().Delete_business_Data(2, branch_id)
delData().Del_reporter_data(2, branch_id)
delData().Delete_business_Data_All()
delData().Delete_business_Data_All2()
delData().Delete_branch_by_id(3, branch_id)
print(branch_id,'删除完毕')
print(branch_id, '删除完毕')
def del_current_brachdata():
import tkinter as tk
from tkinter import ttk
def dropdown_changed(event):
value = combo.get()
print(value)
root = tk.Tk()
root.title("删除当前院区数据")
# 设置窗口大小
root.geometry('200x200')
# 计算窗口居中时左上角的坐标
x = (window_width - root.winfo_width()) // 2
y = (window_height - root.winfo_height()) // 2
# 设置窗口左上角的坐标
root.geometry("+{}+{}".format(x, y))
root.resizable(False, False)
combo = ttk.Combobox(root)
branch_id = FileUtils().r_info8('b2_herp3_bs', "院区新增", 'message')['branch_id']
combo["values"] = (branch_id)
combo.current(0) # 设置默认选项
combo.bind("<<ComboboxSelected>>", dropdown_changed)
combo.pack()
button = tk.Button(root, text="删除此院区数据", command=lambda: button_clicked_del_current_branch(branch_id))
button.pack()
root.mainloop()
def button_clicked_del_current_branch(branch_id):
result = confirm()
if result == True:
result1 = confirm1()
if result1 == True:
print(branch_id)
delData().Delete_goods_change_info()
# delData().Delete_probeInfo_other(3, branch_id)
# delData().Del_supply_relation()
delData().Delete_business_Data_current_branch(2, branch_id)
delData().Del_reporter_data(2, branch_id)
# delData().Delete_business_Data_All()
# delData().Delete_business_Data_All2()
#只删除业务数据,不删除当前院区和库房数据
print(branch_id, '业务数据删除完毕')
def get_input():
import tkinter as tk
from tkinter import simpledialog
......@@ -362,12 +406,14 @@ def main_text():
Button(root, text='流程十八\n中心库业务_拆包功能', anchor='center', width=16, height=8, command=flow18).grid(row=4, column=10)
Button(root, text='一键执行', anchor='center', width=8, height=2, command=flow0).grid(row=5, column=0)
Button(root, text='删除指定\n院区数据', anchor='center', width=8, height=2, command=del_brachdata_from_brachid).grid(row=5,
column=0)
Button(root, text='删除当前\n院区业务\n数据', anchor='center', width=8, height=2, command=del_current_brachdata).grid(row=5,
column=2)
Button(root, text='流程五开始\n一键执行', anchor='center', width=8, height=2, command=flow5_flow18).grid(row=5, column=4)
Button(root, text='删除垃圾\n数据', anchor='center', width=8, height=2, command=del_data).grid(row=5, column=6)
Button(root, text='流程十一开始\n一键执行', anchor='center', width=8, height=2, command=flow11_flow18).grid(row=5, column=8)
Button(root, text='从jenkins\n下载data\n数据', anchor='center', width=8, height=2, command=download_data).grid(row=5,
column=10)
# Button(root, text='从jenkins\n下载data\n数据', anchor='center', width=8, height=2, command=download_data).grid(row=5,
# column=10)
Button(root, text='退 出', anchor='center', width=8, height=2, command=exit).grid(row=5, column=10)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment