Commit 4a2432f4 by dong

fix20220519

parent 9bb85e17
...@@ -529,12 +529,19 @@ def company_detail(): ...@@ -529,12 +529,19 @@ def company_detail():
# 供应链地图 # 供应链地图
supplier = CompanySupplier.query.filter_by(company_id=id).all() supplier = CompanySupplier.query.filter_by(company_id=id).all()
if company: if company:
province = company.province if company.province else ""
city = company.city if company.city else ""
if city == province:
city = ''
district = company.district if company.district else ""
data = {"select1_info": {"id": company.id, data = {"select1_info": {"id": company.id,
"name": company.company_name, # 企业名 "name": company.company_name, # 企业名
"telephone": company.telephone if company.telephone else "", # 电话 "telephone": company.telephone if company.telephone else "", # 电话
"web_site": company.web_site if company.web_site else "", # 网址 "web_site": company.web_site if company.web_site else "", # 网址
"email": company.email if company.email else "", # 邮箱 "email": company.email if company.email else "", # 邮箱
"address": company.address if company.address else "", # 地址 "address": company.address if company.address else "", # 地址
"location": province + city + district,
"jwd": {"lng": company.lng if company.lng else "", # 经度 "jwd": {"lng": company.lng if company.lng else "", # 经度
"lat": company.lat if company.lat else ""}, # 维度 "lat": company.lat if company.lat else ""}, # 维度
"info": company.company_info if company.company_info else "", # 企业信息 "info": company.company_info if company.company_info else "", # 企业信息
...@@ -721,13 +728,15 @@ def enterprise_detail(): ...@@ -721,13 +728,15 @@ def enterprise_detail():
if enterprise: if enterprise:
province = enterprise.province if enterprise.province else "" province = enterprise.province if enterprise.province else ""
city = enterprise.city if enterprise.city else "" city = enterprise.city if enterprise.city else ""
if city == province:
city = ''
district = enterprise.district if enterprise.district else "" district = enterprise.district if enterprise.district else ""
data = {"select1_info": {"id": enterprise.id, data = {"select1_info": {"id": enterprise.id,
"name": enterprise.company_name, # 企业名 "name": enterprise.company_name, # 企业名
"telephone": enterprise.telephone if enterprise.telephone else "", # 电话 "telephone": enterprise.telephone if enterprise.telephone else "", # 电话
"web_site": enterprise.web_site if enterprise.web_site else "", # 网址 "web_site": enterprise.web_site if enterprise.web_site else "", # 网址
"email": enterprise.email if enterprise.email else "", # 邮箱 "email": enterprise.email if enterprise.email else "", # 邮箱
# "address": enterprise.address if enterprise.address else "", # 地址 "address": enterprise.address if enterprise.address else "", # 地址
"location": province + city + district, "location": province + city + district,
"jwd": {"lng": enterprise.lng if enterprise.lng else "", # 经度 "jwd": {"lng": enterprise.lng if enterprise.lng else "", # 经度
......
...@@ -236,6 +236,11 @@ def company_detail(): ...@@ -236,6 +236,11 @@ def company_detail():
else: else:
company_ids = [] company_ids = []
if company: if company:
province = company.province if company.province else ""
city = company.city if company.city else ""
if city == province:
city = ''
district = company.district if company.district else ""
data = {"id": company.id, data = {"id": company.id,
"company_name": company.company_name, "company_name": company.company_name,
"legal": company.legal if company.legal else "", # 法人 "legal": company.legal if company.legal else "", # 法人
...@@ -244,6 +249,8 @@ def company_detail(): ...@@ -244,6 +249,8 @@ def company_detail():
"capital": company.capital if company.capital else "", # 注册资本 "capital": company.capital if company.capital else "", # 注册资本
"telephone": company.telephone if company.telephone else "", # 电话 "telephone": company.telephone if company.telephone else "", # 电话
"address": company.address if company.address else "", # 地址 "address": company.address if company.address else "", # 地址
"location": province + city + district,
"email": company.email if company.email else "-", # 邮箱 "email": company.email if company.email else "-", # 邮箱
# "web_site": company.web_site if company.web_site else "-", # 网址 # "web_site": company.web_site if company.web_site else "-", # 网址
"company_info": company.company_info if company.company_info else "", # 简介 "company_info": company.company_info if company.company_info else "", # 简介
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment