用python编写仓库管理系统_花了一天做的一个简单的仓库管理系统

from tkinter import *

import pickle

from tkinter import messagebox

app=Tk()

app.title('仓库系统')

app.geometry('600x400')

var_print=StringVar()

dict1={}

def find_things():

try:

name = l.get(l.curselection())

with open('仓库.pkl', 'rb') as ck:

dict2 = pickle.load(ck)

var_print.set(name + '的数量为 ' + str(dict2[name]) + ' 台')

except:

var_print.set('请点击需要查询的商品')

def out_things():

try:

name=l.get(l.curselection())

def yes_re():

number_1=e.get()

with open('仓库.pkl', 'rb') as ck:

dict2 = pickle.load(ck)

dict2[name] = int(dict2[name]) - int(number_1)

with open('仓库.pkl', 'wb') as ck:

pickle.dump(dict2, ck)

messagebox.showinfo(message='恭喜卖出!生意兴隆

你可能感兴趣的:(用python编写仓库管理系统)