提交 b2ebeaa3 authored 作者: 李思鑫's avatar 李思鑫

add 经销商出入口查询表 显示营销区域

上级 580d7dc9
...@@ -7741,7 +7741,8 @@ def agent_stk_query(request): ...@@ -7741,7 +7741,8 @@ def agent_stk_query(request):
x, x,
h, h,
P, P,
b.remark b.remark,
b.company_id
FROM FROM
( (
SELECT SELECT
...@@ -7785,6 +7786,7 @@ def agent_stk_query(request): ...@@ -7785,6 +7786,7 @@ def agent_stk_query(request):
cur.execute(s) cur.execute(s)
data=[] data=[]
for r in cur.fetchall(): for r in cur.fetchall():
#南海球杆
if cid==194378: if cid==194378:
data.append([ data.append([
"<a href='inventory/agent/details/" + str(r[0]) + "/'>" + r[1] + "</a>", # 日期 "<a href='inventory/agent/details/" + str(r[0]) + "/'>" + r[1] + "</a>", # 日期
...@@ -7798,11 +7800,21 @@ def agent_stk_query(request): ...@@ -7798,11 +7800,21 @@ def agent_stk_query(request):
r[11], # 备注 r[11], # 备注
]) ])
else: else:
company_id = r[12]
cur.execute(f"""
select
coalesce((select name from company_salesdivision where id = c.division_id and is_delete=false),''),
coalesce((select name from company_subsaldivision where id = c.sub_division_id and is_delete=false),'')
from logistics.company_company c where id= {company_id}
""")
row=cur.fetchone()
data.append([ data.append([
"<a href='inventory/agent/details/" + str(r[0]) + "/'>" + r[1] + "</a>", # 日期 "<a href='inventory/agent/details/" + str(r[0]) + "/'>" + r[1] + "</a>", # 日期
r[2], # 单据类别 r[2], # 单据类别
r[3], # 单据编号 r[3], # 单据编号
r[4], # 产品名称 r[4], # 产品名称
row[0],# 战区
row[1],#分区
r[5], # 操作方 r[5], # 操作方
r[6], # 客户名称 r[6], # 客户名称
r[7], # 操作人 r[7], # 操作人
......
...@@ -125,7 +125,9 @@ ...@@ -125,7 +125,9 @@
<th style='width:10%'>{% trans "日期时间" %}</th> <th style='width:10%'>{% trans "日期时间" %}</th>
<th style='width:10%'>{% trans "单据类别" %}</th> <th style='width:10%'>{% trans "单据类别" %}</th>
<th style='width:6%'>{% trans "单据编号" %}</th> <th style='width:6%'>{% trans "单据编号" %}</th>
<th style='width:20%'>{% trans "产品名称" %}</th> <th style='width:10%'>{% trans "产品名称" %}</th>
<th>{% trans "所属战区" %}</th>
<th>{% trans "所属分区" %}</th>
<th>{% trans "操作商" %}</th> <th>{% trans "操作商" %}</th>
<th>{% trans "客户名称" %}</th> <th>{% trans "客户名称" %}</th>
<th style='width:6%'>{% trans "操作人" %}</th> <th style='width:6%'>{% trans "操作人" %}</th>
...@@ -141,6 +143,8 @@ ...@@ -141,6 +143,8 @@
<th><input type="text" placeholder="{% trans "单据类别" %}"></th> <th><input type="text" placeholder="{% trans "单据类别" %}"></th>
<th><input type="text" placeholder="{% trans "单据编号" %}"></th> <th><input type="text" placeholder="{% trans "单据编号" %}"></th>
<th><input type="text" placeholder="{% trans "产品名称" %}"></th> <th><input type="text" placeholder="{% trans "产品名称" %}"></th>
<th><input type="text" placeholder="{% trans "所属战区" %}"></th>
<th><input type="text" placeholder="{% trans "所属分区" %}"></th>
<th><input type="text" placeholder="{% trans "操作商" %}"></th> <th><input type="text" placeholder="{% trans "操作商" %}"></th>
<th><input type="text" placeholder="{% trans "客户名称" %}"></th> <th><input type="text" placeholder="{% trans "客户名称" %}"></th>
<th><input type="text" placeholder="{% trans "操作人" %}"></th> <th><input type="text" placeholder="{% trans "操作人" %}"></th>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论