You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.7 KiB

# -*- coding: utf-8 -*-
"""
models.InStockModel
~~~~~~~~~~~~~~
进库实体.
:copyright: 云南新八达科技有限公司.
:author: 李进才.
"""
import json
from utils.List2Json import *
class InStockModel(object):
Name = '',
Specification = '',
day = 0,
Maker = '',
CertificationCode = '',
UnitPrice = 0,
SellingPrice = 0,
MaxValue = 0,
MinValue = 0,
ProductionBatch = '',
TypeName = '',
Position = '',
Number = 0,
SupplierName = ''
hasChildren = False
def __init__(self, Name, Specification, day, Maker, CertificationCode, UnitPrice, SellingPrice, MaxValue, MinValue,
ProductionBatch, TypeName, Position, Number, SupplierName, hasChildren):
self.Name = Name
self.Specification = Specification
self.day = day
self.Maker = Maker
self.CertificationCode = CertificationCode
self.UnitPrice = UnitPrice
self.Specification = Specification
self.SellingPrice = SellingPrice
self.MaxValue = MaxValue
self.MinValue = MinValue
self.ProductionBatch = ProductionBatch
self.TypeName = TypeName
self.Position = Position
self.Number = Number
self.SupplierName = SupplierName
self.hasChildren = hasChildren
@property
def value(self):
"""
StockListModel json data
:return: json data
"""
return {"Name": self.Name, "Specification": self.Specification, "day": self.day, "Maker":
self.Maker, "CertificationCode": self.CertificationCode, "UnitPrice": self.UnitPrice, "Specification":
self.Specification, "SellingPrice": self.SellingPrice, "MaxValue": self.MaxValue, "MinValue":
self.MinValue, "ProductionBatch": self.ProductionBatch, "TypeName": self.TypeName, "Position":
self.Position, "Number": self.Number, "SupplierName": self.SupplierName, "hasChildren":
self.hasChildren}
# return '{"Name":"' + self.Name + '", "Specification":"' + self.Specification + '", "day":"' + self.day + '", "Maker":"' + \
# self.Maker + '","CertificationCode":"' + self.CertificationCode + '", "UnitPrice":"' + self.UnitPrice + '", "Specification":"' + \
# self.Specification + '","SellingPrice":"' + self.SellingPrice + '", "MaxValue":"' + self.MaxValue + '", "MinValue":"' + \
# self.MinValue + '", "ProductionBatch":"' + self.ProductionBatch + '", "TypeName":"' + self.TypeName + '", "Position":"' + \
# self.Position + '","Number":"' + self.Number + '", "SupplierName":"' + self.SupplierName + '"}'