本文整理汇总了Python中base.utils.MethodUtil.exportXls方法的典型用法代码示例。如果您正苦于以下问题:Python MethodUtil.exportXls方法的具体用法?Python MethodUtil.exportXls怎么用?Python MethodUtil.exportXls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base.utils.MethodUtil
的用法示例。
在下文中一共展示了MethodUtil.exportXls方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: exportDetail
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import exportXls [as 别名]
def exportDetail(rslist, sum1, sum2, sum3):
sname = "门店销售列表"
titles = [
("大类编码", "1000", "shopid"),
("大类名称", "1000", "shopid"),
("日期", "1000", "shopid"),
("销售数量", "1000", "promflag"),
("实际销售", "1000", "startdate"),
("销售成本", "1000", "enddate"),
("占比", "500", "enddate"),
("累计占比", "1000", "enddate"),
]
fmtlist = [None, None, "%Y-%m-%d", "0.00", "0.000", "0.000", "0.00", "0.0"]
sumList = ["合计", None, None, sum1, sum2, sum3, "100.00", "100.00"]
book = mtu.exportXls(sname, titles, rslist, sumList, None, fmtlist)
outtype = "application/vnd.ms-excel"
fname = "sale_counter_detail.xls"
response = mtu.getResponse(HttpResponse(), outtype, fname)
book.save(response)
return response
示例2: export
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import exportXls [as 别名]
def export(rslist, sum1, sum2, sum3):
sname = "门店-大类销售汇总"
titles = [
("门店名称", "1000", "shopid"),
("销售数量", "1000", "promflag"),
("实际销售", "1000", "startdate"),
("销售成本", "1000", "enddate"),
]
fmtlist = [None, "0.00", "0.000", "0.000"]
shopDict = findShop()
dictlist = [shopDict, None, None, None]
sumList = ["合计", sum1, sum2, sum3]
book = mtu.exportXls(sname, titles, rslist, sumList, dictlist, fmtlist)
outtype = "application/vnd.ms-excel"
fname = "sale_counter.xls"
response = mtu.getResponse(HttpResponse(), outtype, fname)
book.save(response)
return response
示例3: export
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import exportXls [as 别名]
def export(outlist,sum1,sum2,sum3):
sname = "日销售汇总列表"
titles = [("日期","1000"),("门店明细","1000"),("单品明细","1000"),("大类明细","1000"),("销售数量","1000"),("实际销售","1000"),
("销售成本","1000"),("销售成本占比(%)","2000"),("销售成本累计占比(%)","3000")]
sumlist = ["合计","门店合计","单品合计","大类合计",sum1,sum2,sum3,"100.00","100.00"]
fmtlist = [None,None,None,None,"0.00","0.00","0.00","0.00","0.0"]
book = mtu.exportXls(sname,titles,outlist,sumlist,None,fmtlist)
outtype = 'application/vnd.ms-excel'
fname = "day_sale_analysis.xls"
response = mtu.getResponse(HttpResponse(),outtype,fname)
book.save(response)
return response
示例4: exportDetail
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import exportXls [as 别名]
def exportDetail(rslist,sum1,sum2,sum3,pname):
sname = "单品"+pname+"销售汇总"
titles = [("门店","2000"),("销售数量","1000"),("实际销售","1000"),("销售成本","1000"),
("销售成本占比","2000"),("销售成本累计占比","2000")]
sumlist = ["合计",sum1,sum2,sum3,"100.00","100.00"]
fmtlist = [None,"0.00","0.00","0.000","0.000","0.00"]
book = mtu.exportXls(sname,titles,rslist,sumlist,None,fmtlist)
outtype = 'application/vnd.ms-excel'
fname = "sale_sellinfo_pro.xls"
response = mtu.getResponse(HttpResponse(),outtype,fname)
book.save(response)
return response
示例5: exportDetail3
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import exportXls [as 别名]
def exportDetail3(rslist,sum1,sum2,sum3,type):
sname = "销售汇总―大类"+type+"销售汇总"
titles = [("大类编号","1000"),("大类名称","1000"),("销售数量","1000"),
("实际销售","1000"),("销售成本","1000")]
sumlist = ["合计","",sum1,sum2,sum3]
fmtlist = [None,None,"0.00","0.000","0.000"]
book = mtu.exportXls(sname,titles,rslist,sumlist,None,fmtlist)
outtype = 'application/vnd.ms-excel'
fname = "day_sale_analysis_gz.xls"
response = mtu.getResponse(HttpResponse(),outtype,fname)
book.save(response)
return response
示例6: exportDetail
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import exportXls [as 别名]
def exportDetail(rslist,sum1,sum2,sum3):
sname = "类别日销售列表"
titles = [("日期","1000"),("小类编码","1000"),("小类名称","1000"),("销售数量","1000"),("实际销售","1000"),
("销售成本","1000"),("占比(%)","500"),("累计占比(%)","1000")]
sumlist = ["合计","","",sum1,sum2,sum3,"100.00","100.0"]
fmtlist = ["%Y-%m-%d",None,None,"0.00","0.000","0.000","0.00","0.0"]
book = mtu.exportXls(sname,titles,rslist,sumlist,None,fmtlist)
outtype = 'application/vnd.ms-excel'
fname = "day_sale_category.xls"
response = mtu.getResponse(HttpResponse(),outtype,fname)
book.save(response)
return response
示例7: export
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import exportXls [as 别名]
def export(rslist,sum1,sum2,sum3):
sname = "单品销售汇总"
titles = [("日期","1000"),("商品编号","1000"),("商品条码","1000"),("商品名称","3000"),("规格","500"),
("税率","500"),("销售数量","1000"),("实际销售","1000"),("销售成本","1000")]
sumlist = ["合计","","","","","",sum1,sum2,sum3]
fmtlist = [None,None,None,None,None,None,"0.00","0.000","0.000"]
book = mtu.exportXls(sname,titles,rslist,sumlist,None,fmtlist)
outtype = 'application/vnd.ms-excel'
fname = "sale_product.xls"
response = mtu.getResponse(HttpResponse(),outtype,fname)
book.save(response)
return response
示例8: exportDetail2
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import exportXls [as 别名]
def exportDetail2(rslist,sum1,sum2,sum3,type):
sname = " 销售汇总―单品"+type+"销售汇总"
titles = [("商品编号","1000"),("商品条码","1000"),("商品名称","3000"),("规格","500"),("单位","500"),
("销售数量","1000"),("实际销售","1000"),("销售成本","1000"),("税率","500")]
sumlist = ["合计","","","","",sum1,sum2,sum3,""]
fmtlist = [None,None,None,None,None,"0.00","0.000","0.000",None]
book = mtu.exportXls(sname,titles,rslist,sumlist,None,fmtlist)
outtype = 'application/vnd.ms-excel'
fname = "day_sale_analysis_pro.xls"
response = mtu.getResponse(HttpResponse(),outtype,fname)
book.save(response)
return response
示例9: exportXls
# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import exportXls [as 别名]
def exportXls(rslist):
sname = "商品资料一览表"
titles = [("门店编码","1000","shopid"),("门店名称","1000","shopid"),("商品条码","1000","barcodeid"),("商品名称","5000","name"),("规格","500","spec"),
("进价","500","cost"),("执行售价","1000","price"),("销售状态","1000","flag"),("供应商","1000","venderid"),("税率","500","costtaxrate"),
("单位","500","unitname"),("小类","1000","deptid"),("商品编码","1000","goodsid"),("促销标志","1000","promflag"),("开始日期","1000","startdate"),
("结束日期","1000","enddate")]
fmtlist = [None,None,None,None,None,None,None,None,None,None,
None,None,None,None,"%Y-%m-%d","%Y-%m-%d"]
shopDict = findShop()
dictlist = [None,shopDict,None,None,None,None,None,Constants.SALE_STATUS,None,
None,None,None,None,Constants.PROM_FLAG,None,None]
book = mtu.exportXls(sname,titles,rslist,None,dictlist,fmtlist)
outtype = 'application/vnd.ms-excel'
fname = "goods.xls"
response = mtu.getResponse(HttpResponse(),outtype,fname)
book.save(response)
return response