update
This commit is contained in:
parent
b61ef3ec54
commit
cc6fcf03e9
@ -64,6 +64,7 @@ async def publish_product_add(ns={}):
|
||||
"net_card": ns.get("net_card"),
|
||||
"price": ns.get("price"),
|
||||
"unit": ns.get("unit"),
|
||||
"discount": ns.get("discount"),
|
||||
"short_term": ns.get("short_term"),
|
||||
"priority": ns.get("priority") if ns.get("priority") else 1,
|
||||
"status": ns.get("status") if ns.get("status") else '0',
|
||||
@ -75,6 +76,14 @@ async def publish_product_add(ns={}):
|
||||
"application_scenario": ns.get("application_scenario"),
|
||||
"audit_status": ns.get('audit_status', 'pending'),
|
||||
}
|
||||
if ns.get('discount') == '0':
|
||||
ns['discount'] = None
|
||||
ns_dic['discount'] = None
|
||||
|
||||
if ns.get('price') and ns.get('discount'):
|
||||
ns_dic['discount_price'] = float(ns.get('price')) * float(ns['discount']) / 10
|
||||
else:
|
||||
ns_dic['discount_price'] = ns['price']
|
||||
user_role = await get_user_role({'userid': userid, 'sor': sor})
|
||||
# 非客户角色不需要审批
|
||||
if user_role != '客户':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user