提交 4ad91a46 authored 作者: 苏星豪's avatar 苏星豪

合并分支 'test' 到 'master'

Test 查看合并请求 tj_django/datacenter!11
# 天鉴云平台代码仓库 # 天鉴云平台代码仓库
## 开发时,先提交到dev,再合并到test分支,测试无误后合并至master。
默认忽略根目录下所有文件,故文件夹名称建议不要包含‘.’ 默认忽略根目录下所有文件,故文件夹名称建议不要包含‘.’
项目根目录下static和media两个文件夹不会上传到代码仓库,**如果有修改需要通知其他成员同步。** 项目根目录下static和media两个文件夹不会上传到代码仓库,**如果有修改需要通知其他成员同步。**
......
...@@ -40,6 +40,9 @@ from taskman import tasks ...@@ -40,6 +40,9 @@ from taskman import tasks
from inventory.models import Batch as StkBatch from inventory.models import Batch as StkBatch
# 2022-11-21 可变列表、字典要深拷贝
import copy
#2020-10-27 11位解密 #2020-10-27 11位解密
...@@ -2493,7 +2496,7 @@ def query_label(request,company_id,vendor): ...@@ -2493,7 +2496,7 @@ def query_label(request,company_id,vendor):
'kingdee': 'nc$tYal1C%)T0@)d1Wn' #金蝶 'kingdee': 'nc$tYal1C%)T0@)d1Wn' #金蝶
}, },
'1': { #酒鬼 '1': { #酒鬼
'hand': 'hand$tYal1i%)20@)c1W', #汉得 'hand': 'hand$tYal1i%)20@)c1W', #汉得
'sfa': 'sfa$3rHl1K%(2t@1117' #SAF项目组 'sfa': 'sfa$3rHl1K%(2t@1117' #SAF项目组
}, },
} }
...@@ -2590,10 +2593,7 @@ def query_label(request,company_id,vendor): ...@@ -2590,10 +2593,7 @@ def query_label(request,company_id,vendor):
else: else:
if company_id=='1' and vendor=='sfa': if company_id=='1' and vendor=='sfa':
# 2022-11-17 酒鬼酒中粮SFA项目组 # 2022-11-17 酒鬼酒中粮SFA项目组
data['result']['logistics_code'] = q.infor['wl']
data['result']['carton_code'] = q.infor['label_pk_code']
data['result']['product'] = {'external_code':p['external_code'], 'name':p['name']}
# 取经销商信息 # 取经销商信息
s="select external_code,name from "+\ s="select external_code,name from "+\
"(select company_to_id from stkdetails.c1 where label_pk_id="+pk+" and vtype_id=2 and is_delete=false order by id desc limit 1) s "+\ "(select company_to_id from stkdetails.c1 where label_pk_id="+pk+" and vtype_id=2 and is_delete=false order by id desc limit 1) s "+\
...@@ -2608,7 +2608,38 @@ def query_label(request,company_id,vendor): ...@@ -2608,7 +2608,38 @@ def query_label(request,company_id,vendor):
else: else:
code='' code=''
name='' name=''
data['result']['customer']={'external_code':code,'name':name} rls=q.get_relations()
# 主箱标
ck=q.infor['label_pk_code']
# 副箱标
atts=[]
for c in rls['cartons']:
if c['label']!=ck:
atts.append(c['label'])
if atts:
att=atts[0]
else:
att=''
d={
"prodCode": p['external_code'],
"prodName": p['name'],
"acctCode": code,
"acctName": name,
"cartonCode":ck ,
"cartonOtherCode": att,
}
if q.package['id']==1:
# 瓶标
d["logisticsCode"]=q.infor['wl']
data["result"]=d
else:
# 箱标
ds=[]
for c in rls['children']:
dd=copy.deepcopy(d)
dd["logisticsCode"]=c['label']
ds.append(dd)
data["result"]=ds
else: else:
#给第三方数据,删除产品ID,vendor,inboud_lot,inbound_aging,inbound_date #给第三方数据,删除产品ID,vendor,inboud_lot,inbound_aging,inbound_date
product_lot='' product_lot=''
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论