以下是一个简单的现货购销交收系统的部分代码示例:[ V:zzwx1212 QQ:20 TG:@zztg001 ]
python# 购销订单类 class PurchaseOrder: def __init__(self, order_id, buyer, seller, quantity, price): self.order_id = order_id self.buyer = buyer self.seller = seller self.quantity = quantity self.price = price def get_total_price(self): return self.quantity * self.price # 购销交收类 class PurchaseDelivery: def __init__(self, order_id, buyer, seller, quantity, price, delivery_date): self.order_id = order_id self.buyer = buyer self.seller = seller self.quantity = quantity self.price = price self.delivery_date = delivery_date def get_total_price(self): return self.quantity * self.price # 买家类 class Buyer: def __init__(self, buyer_id, name): self.buyer_id = buyer_id self.name = name def place_order(self, seller, quantity, price): order_id = generate_order_id() # 生成订单号的函数,具体实现略过
https://www.sn180.com/member/24325251.html
本信息网址:https://www.sn180.com/sell/offerView/118599956.html
|