123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- from rest_framework_csv.renderers import CSVStreamingRenderer
- def file_headers_list():
- return [
- 'document_date',
- 'document_number',
- 'document_type',
- 'business_type',
- 'iout_type',
- 'department',
-
- 'warehouse_name',
- 'goods_code',
- 'goods_desc',
- 'goods_std',
- 'goods_batch',
- 'in_batch',
- 'out_batch',
- 'goods_in',
- 'goods_out',
- 'goods_notes',
- 'creator'
- ]
- def cn_data_header_list():
- return dict([
- ('document_date', '单据日期'),
- ('document_number', '单据编号'),
- ('document_type', '单据类型'),
- ('business_type', '业务类型'),
- ('iout_type', '出入库类型'),
- ('department', '部门'),
- ('warehouse_code', '仓库编码'),
- ('warehouse_name', '仓库名称'),
- ('goods_code', '商品编码'),
- ('goods_desc', '商品描述'),
- ('goods_std', '商品标准'),
- ('goods_batch', '商品批次'),
- ('in_batch', '入库批次'),
- ('out_batch', '出库批次'),
- ('goods_in', '入库数量'),
- ('goods_out', '出库数量'),
- ('goods_notes', '备注'),
- ('creator', '创建人')
- ])
- class FileFlowListRenderCN(CSVStreamingRenderer):
- header = file_headers_list()
- labels = cn_data_header_list()
|