| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- from rest_framework_csv.renderers import CSVStreamingRenderer
- def list_file_headers():
- return [
- ]
- def list_cn_data_header():
- return dict([
- ('asn_code', u'ASN单号'),
- ('asn_status', u'ASN状态'),
- ('total_weight', u'总重量'),
- ('total_volume', u'总体积'),
- ('total_cost', u'总成本'),
- ('supplier', u'供应商'),
- ('creater', u'创建人'),
- ('create_time', u'创建时间'),
- ('update_time', u'更新时间')
- ])
- def detail_file_headers():
- return [
- 'asn_code',
- 'asn_status',
- 'supplier',
- 'goods_code',
- 'goods_desc',
- 'goods_qty',
- 'goods_actual_qty',
- 'sorted_qty',
- 'goods_shortage_qty',
- 'goods_more_qty',
- 'goods_damage_qty',
- 'goods_weight',
- 'goods_volume',
- 'goods_cost',
- 'creater',
- 'create_time',
- 'update_time'
- ]
- def detail_cn_data_header():
- return dict([
- ('asn_code', u'ASN单号'),
- ('asn_status', u'ASN状态'),
- ('supplier', u'供应商'),
- ('goods_code', u'商品编码'),
- ('goods_desc', u'商品描述'),
- ('goods_qty', u'订单数量'),
- ('goods_actual_qty', u'实际到货数量'),
- ('sorted_qty', u'已分拣数量'),
- ('goods_shortage_qty', u'少到货数量'),
- ('goods_more_qty', u'多到货数量'),
- ('goods_damage_qty', u'破损数量'),
- ('goods_weight', u'商品重量'),
- ('goods_volume', u'商品体积'),
- ('goods_cost', u'商品成本'),
- ('creater', u'创建人'),
- ('create_time', u'创建时间'),
- ('update_time', u'更新时间')
- ])
- class FileListRenderCN(CSVStreamingRenderer):
- header = list_file_headers()
- labels = list_cn_data_header()
- class FileDetailRenderCN(CSVStreamingRenderer):
- header = detail_file_headers()
- labels = detail_cn_data_header()
- def BatchFile_headers_list():
- return [
- 'id',
- 'bound_number',
- 'bound_batch_order',
- 'warehouse_name',
- 'goods_code',
- 'goods_desc',
- 'goods_std',
- 'goods_unit',
- 'goods_qty',
- 'goods_in_qty',
- 'goods_in_location_qty',
- 'goods_out_qty',
- 'check_status',
- 'creater',
- 'create_time',
- 'update_time'
- ]
- def BatchFile_cn_data_header_list():
- return dict([
- ('id', '序号'),
- ('bound_number', '管理批次'),
- ('bound_batch_order', '批号'),
- ('warehouse_name', '仓库名称'),
- ('goods_code', '存货编码'),
- ('goods_desc', '存货名称'),
- ('goods_std', '规格型号'),
- ('goods_unit', '单位'),
- ('goods_qty', '计划数目'),
- ('goods_in_qty', '已入库/组盘数目'),
- ('goods_in_location_qty', '在库'),
- ('goods_out_qty', '已出库数目'),
- ('check_status', '质检状态'),
- ('creater', '创建人'),
- ('create_time', '创建时间'),
- ('update_time', '更新时间')
- ])
- class BatchFileRenderCN(CSVStreamingRenderer):
- header = BatchFile_headers_list()
- labels = BatchFile_cn_data_header_list()
|