buggfix
This commit is contained in:
parent
ca3953128b
commit
74abd2e31a
@ -1,6 +1,29 @@
|
|||||||
{
|
{
|
||||||
"tblname":"agreement",
|
"tblname":"agreement",
|
||||||
"params":{
|
"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": {
|
"browserfields": {
|
||||||
"exclouded": ["id"],
|
"exclouded": ["id"],
|
||||||
"alters": {}
|
"alters": {}
|
||||||
|
@ -1,9 +1,32 @@
|
|||||||
{
|
{
|
||||||
"treetype":"singlestruct",
|
|
||||||
"tblname":"prodtype",
|
"tblname":"prodtype",
|
||||||
"uitype":"tree",
|
"uitype":"tree",
|
||||||
"alias":"choose_prodtype",
|
"alias":"choose_prodtype",
|
||||||
"params":{
|
"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",
|
"idField":"id",
|
||||||
"textField":"name",
|
"textField":"name",
|
||||||
"editable":true,
|
"editable":true,
|
||||||
@ -11,12 +34,7 @@
|
|||||||
"alters":{}
|
"alters":{}
|
||||||
},
|
},
|
||||||
"edit_exclouded_fields":["del_flg", "create_at"],
|
"edit_exclouded_fields":["del_flg", "create_at"],
|
||||||
"checkField":"dd",
|
"parentField":"parentid"
|
||||||
"parentField":"parentid",
|
|
||||||
"toolbar":{
|
|
||||||
},
|
|
||||||
"binds":[
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,39 +6,6 @@
|
|||||||
"textField":"name",
|
"textField":"name",
|
||||||
"parentField":"parentid",
|
"parentField":"parentid",
|
||||||
"editable":true,
|
"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": {
|
"browserfields": {
|
||||||
"exclouded": ["id", "parentid" ],
|
"exclouded": ["id", "parentid" ],
|
||||||
"alters": {}
|
"alters": {}
|
||||||
|
@ -18,6 +18,7 @@ a.description,
|
|||||||
a.prod_state,
|
a.prod_state,
|
||||||
a.product_code,
|
a.product_code,
|
||||||
a.spec_note,
|
a.spec_note,
|
||||||
|
b.id as apid,
|
||||||
d.id as agreeid,
|
d.id as agreeid,
|
||||||
d.providerid,
|
d.providerid,
|
||||||
d.resellerid
|
d.resellerid
|
||||||
@ -35,8 +36,9 @@ where a.id = b.providerpid
|
|||||||
return
|
return
|
||||||
|
|
||||||
for rec in recs:
|
for rec in recs:
|
||||||
|
pid = getID()
|
||||||
d = {
|
d = {
|
||||||
"id":getID(),
|
"id":pid,
|
||||||
"name":rec.name,
|
"name":rec.name,
|
||||||
"prodtypeid":rec.prodtypeid,
|
"prodtypeid":rec.prodtypeid,
|
||||||
"orgid":rec.resellerid,
|
"orgid":rec.resellerid,
|
||||||
@ -49,6 +51,7 @@ where a.id = b.providerpid
|
|||||||
"spec_note":rec.spec_note
|
"spec_note":rec.spec_note
|
||||||
}
|
}
|
||||||
await sor.C('product', d)
|
await sor.C('product', d)
|
||||||
|
await sor.U('agreeproduct', {'id':rec.apid, 'resellerpid':pid})
|
||||||
|
|
||||||
async def open_agree_account(sor, providerid, sellerid):
|
async def open_agree_account(sor, providerid, sellerid):
|
||||||
accounting_orgid = await get_accounting_orgid(sor)
|
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