From f32316e7fa4b882b5964e49fc40606dca41ff22d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 15 May 2023 10:31:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=BC=E5=87=BA=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0companyname=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_server/crm/exports.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_server/crm/exports.py b/test_server/crm/exports.py index 63668a0..a9c44b1 100644 --- a/test_server/crm/exports.py +++ b/test_server/crm/exports.py @@ -14,11 +14,11 @@ def export_consumer(users): wb = Workbook() ws1 = wb.active ws1.title = '用户表' - ws1.append(['姓名','手机号', '单位', '身份证号', '微信昵称', '工作类别', '用户角色', '创建日期', '所属账户']) + ws1.append(['姓名','手机号', '单位', '单位自填', '身份证号', '微信昵称', '工作类别', '用户角色', '创建日期', '所属账户']) row = ws1.row_dimensions[1] row.font = Font(bold=True) for i in users: - ws1.append([i['name'], i['username'], i['company_name'], i['ID_number1'], i['nickname'], i['workscope_name'], i['role_name'], i['create_time'], i['create_admin_name']]) + ws1.append([i['name'], i['username'], i['company_name'], i['companyname'], i['ID_number1'], i['nickname'], i['workscope_name'], i['role_name'], i['create_time'], i['create_admin_name']]) filename = 'users' + datetime.now().strftime("%Y%m%d%H%M%S") +'.xlsx' path = '/media/export/' + filename wb.save((BASE_DIR + path).replace('\\', '/'))