buggfix
This commit is contained in:
parent
ca3953128b
commit
74abd2e31a
@ -1,6 +1,29 @@
|
||||
{
|
||||
"tblname":"agreement",
|
||||
"params":{
|
||||
"toolbar":{
|
||||
"tools":[
|
||||
{
|
||||
"name":"prodauth",
|
||||
"selected_row":true,
|
||||
"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"],
|
||||
"alters": {}
|
||||
|
@ -1,9 +1,32 @@
|
||||
{
|
||||
"treetype":"singlestruct",
|
||||
"tblname":"prodtype",
|
||||
"uitype":"tree",
|
||||
"alias":"choose_prodtype",
|
||||
"params":{
|
||||
"toolbar":{
|
||||
"bar_cwidth":2,
|
||||
"tools":[
|
||||
{
|
||||
"name":"test",
|
||||
"selected_data":true,
|
||||
"label":"TEST"
|
||||
}
|
||||
]
|
||||
},
|
||||
"binds":[
|
||||
{
|
||||
"wid":"self",
|
||||
"event":"prodauth",
|
||||
"actiontype":"urlwidget",
|
||||
"target":"PopupWindow",
|
||||
"options":{
|
||||
"url":"{{entire_url('platformbiz/ag.dspy')}}",
|
||||
"params":{
|
||||
"agreedetailid":"{{params_kw.agreedetailid}}"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"idField":"id",
|
||||
"textField":"name",
|
||||
"editable":true,
|
||||
@ -11,12 +34,7 @@
|
||||
"alters":{}
|
||||
},
|
||||
"edit_exclouded_fields":["del_flg", "create_at"],
|
||||
"checkField":"dd",
|
||||
"parentField":"parentid",
|
||||
"toolbar":{
|
||||
},
|
||||
"binds":[
|
||||
]
|
||||
"parentField":"parentid"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,39 +6,6 @@
|
||||
"textField":"name",
|
||||
"parentField":"parentid",
|
||||
"editable":true,
|
||||
"toolbar":{
|
||||
"tools":[
|
||||
{
|
||||
"target":"PopupWindow",
|
||||
"name":"spec",
|
||||
"selected_data":true,
|
||||
"label":"规格"
|
||||
}
|
||||
]
|
||||
},
|
||||
"binds":[
|
||||
{
|
||||
"wid":"self",
|
||||
"event":"spec",
|
||||
"actiontype":"urlwidget",
|
||||
"target":"PopupWindow",
|
||||
"popup_options":{
|
||||
"width":"80%",
|
||||
"height":"80%"
|
||||
},
|
||||
"params_mapping":{
|
||||
"mapping":{
|
||||
"id":"prodtypeid"
|
||||
},
|
||||
"need_others":false
|
||||
},
|
||||
"options":{
|
||||
"params":{
|
||||
},
|
||||
"url":"/platformbiz/prodtypespec"
|
||||
}
|
||||
}
|
||||
],
|
||||
"browserfields": {
|
||||
"exclouded": ["id", "parentid" ],
|
||||
"alters": {}
|
||||
|
@ -18,6 +18,7 @@ a.description,
|
||||
a.prod_state,
|
||||
a.product_code,
|
||||
a.spec_note,
|
||||
b.id as apid,
|
||||
d.id as agreeid,
|
||||
d.providerid,
|
||||
d.resellerid
|
||||
@ -35,8 +36,9 @@ where a.id = b.providerpid
|
||||
return
|
||||
|
||||
for rec in recs:
|
||||
pid = getID()
|
||||
d = {
|
||||
"id":getID(),
|
||||
"id":pid,
|
||||
"name":rec.name,
|
||||
"prodtypeid":rec.prodtypeid,
|
||||
"orgid":rec.resellerid,
|
||||
@ -49,6 +51,7 @@ where a.id = b.providerpid
|
||||
"spec_note":rec.spec_note
|
||||
}
|
||||
await sor.C('product', d)
|
||||
await sor.U('agreeproduct', {'id':rec.apid, 'resellerpid':pid})
|
||||
|
||||
async def open_agree_account(sor, providerid, sellerid):
|
||||
accounting_orgid = await get_accounting_orgid(sor)
|
||||
|
9
wwwroot/agree_prodclone.dspy
Normal file
9
wwwroot/agree_prodclone.dspy
Normal file
@ -0,0 +1,9 @@
|
||||
debug(f'params_kw=}')
|
||||
orgid = await get_userorgid()
|
||||
db = DBPools()
|
||||
dbname = await get_module_dbname('platformbiz')
|
||||
async with db.sqlorContext(dbname) as sor:
|
||||
await agree_products_clone(sor, orgid, params_kw.id)
|
||||
return UiMessage(title='product clone', message='product clone finished')
|
||||
debug('product clone error')
|
||||
return UiError(title='product clone', message='product clone error')
|
Loading…
Reference in New Issue
Block a user