This commit is contained in:
yumoqing 2025-02-26 11:52:06 +08:00
parent 06c2e0b925
commit 4fc6f8475c
6 changed files with 39 additions and 27 deletions

View File

@ -2,8 +2,30 @@
"tblname":"agreeproduct",
"params":{
"logined_userorgid":"orgid",
"toolbar":{
"tools":[
{
"name":"prodauth",
"label":"授权"
}
]
},
"binds":[
{
"wid":"self",
"event":"prodauth",
"actiontype":"urlwidget",
"target":"PopupWindow",
"options":{
"url":"{{entire_url('platformbiz/agreeproduct_auth.dspy')}}",
"params":{
"agreedetailid":"{{params_kw.agreedetailid}}"
}
}
}
],
"browserfields": {
"exclouded": ["id", "agreedetailid", "resellerpid"],
"exclouded": ["id", "agreedetailid"],
"alters": {}
},
"editexclouded": [

View File

@ -19,12 +19,7 @@
"subtables":[
{
"title":"协议明细",
"subtable":"agreedetail",
"field":"agreeid"
},
{
"title":"协议产品",
"subtable":"agreeproduct",
"subtable":"provide_agreedetail",
"field":"agreeid"
}
],

View File

@ -1,20 +0,0 @@
{
"tblname":"agreement",
"params":{
"browserfields": {
"exclouded": ["id"],
"alters": {
"resellerid":{
"uitype":"search",
"search_event":"row_selected",
"search_url":"{{entire_url('../select_org')}}",
"valueField":"id",
"textField":"orgname"
}
}
},
"editexclouded": [
"id"
]
}
}

View File

@ -2,6 +2,7 @@ from ahserver.serverenv import ServerEnv, get_serverenv
from platformbiz.recharge import Recharge
from platformbiz.pb_acc import PlatformBizAccRecharge, get_owner_orgid, get_balance
from platformbiz.biz_order import change_recharge_status
from platformbiz.pricing import calc_spec_price, get_sell_price
def load_platformbiz():
g = ServerEnv()

View File

@ -0,0 +1,7 @@
debug(f'{params_kw=}')
db = DBPools()
dbname = await get_module_dbname('platformbiz')
async with db.sqlorContext(dbname) as sor:
await agreedetail_products_clone(params_kw.agreedetailid)
return UiMessage(title='clone product', message='OK')
return UiError(title='Product clone', message='Product clone error')

View File

@ -0,0 +1,7 @@
debug(f'{params_kw=}')
db = DBPools()
dbname = await get_module_dbname('platformbiz')
async with db.sqlorContext(dbname) as sor:
await agreedetail_products_clone(params_kw.agreedetailid)
return UiMessage(title='clone product', message='OK')
return UiError(title='Product clone', message='Product clone error')