18 lines
533 B
Plaintext
18 lines
533 B
Plaintext
# Save/update customer-sale assignment (called on blur from customer assign pages)
|
|
from discount.init import save_customer_sale
|
|
|
|
ret = await save_customer_sale(request, params_kw)
|
|
if ret.get('status') == 'success':
|
|
return {
|
|
'widgettype': 'Message',
|
|
'options': {
|
|
'title': '成功', 'message': '已更新', 'type': 'success', 'timeout': 2
|
|
}
|
|
}
|
|
return {
|
|
'widgettype': 'Error',
|
|
'options': {
|
|
'title': '失败', 'message': ret.get('message', '未知错误'), 'timeout': 3
|
|
}
|
|
}
|