Compare commits

..

No commits in common. "main" and "feat/modern-ui-platformbiz" have entirely different histories.

19 changed files with 127 additions and 972 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
__pycache__/

View File

@ -1,145 +0,0 @@
产品管理: Product Management
产品名称: Product Name
产品编码: Product Code
产品类型: Product Type
产品价格: Product Price
产品状态: Product Status
产品描述: Product Description
新增产品: Add Product
编辑产品: Edit Product
删除产品: Delete Product
上架: List
下架: Delist
已上架: Listed
已下架: Delisted
订单管理: Order Management
订单编号: Order Number
订单金额: Order Amount
订单状态: Order Status
订单时间: Order Time
订单详情: Order Details
新增订单: Add Order
删除订单: Delete Order
待支付: Pending Payment
已支付: Paid
已取消: Cancelled
已退款: Refunded
已完成: Completed
支付: Pay
退款: Refund
取消订单: Cancel Order
优惠券管理: Coupon Management
优惠券名称: Coupon Name
优惠券类型: Coupon Type
优惠券金额: Coupon Amount
优惠券折扣: Coupon Discount
使用条件: Usage Conditions
使用次数: Usage Count
有效期: Validity Period
新增优惠券: Add Coupon
编辑优惠券: Edit Coupon
删除优惠券: Delete Coupon
发放: Distribute
停用: Disable
已领取: Claimed
已使用: Used
已过期: Expired
充值管理: Recharge Management
充值金额: Recharge Amount
充值时间: Recharge Time
充值方式: Recharge Method
充值记录: Recharge Records
余额: Balance
充值: Recharge
协议管理: Agreement Management
协议名称: Agreement Name
协议内容: Agreement Content
协议状态: Agreement Status
签署状态: Signing Status
新增协议: Add Agreement
编辑协议: Edit Agreement
删除协议: Delete Agreement
签署: Sign
已签署: Signed
未签署: Unsigned
资源管理: Resource Management
资源名称: Resource Name
资源类型: Resource Type
资源大小: Resource Size
资源路径: Resource Path
上传资源: Upload Resource
删除资源: Delete Resource
下载: Download
推广链接: Promotion Link
链接名称: Link Name
链接地址: Link URL
链接状态: Link Status
新增链接: Add Link
编辑链接: Edit Link
删除链接: Delete Link
点击量: Clicks
转化量: Conversions
业务订单: Business Order
客户名称: Customer Name
供应商名称: Supplier Name
备注: Remarks
创建时间: Created Time
更新时间: Updated Time
搜索: Search
名称或编码: Name or Code
操作: Actions
描述: Description
类型: Type
状态: Status
名称: Name
编码: Code
金额: Amount
数量: Quantity
新增: Add
保存: Save
取消: Cancel
确认: Confirm
删除: Delete
编辑: Edit
查看: View
导出: Export
打印: Print
刷新: Refresh
返回: Back
提交: Submit
重置: Reset
Conform: Conform
Discard: Discard
Submit: Submit
Reset: Reset
Cancel: Cancel
全部: All
日期: Date
用户: User
手机号: Phone Number
邮箱: Email
地址: Address
规格: Specification
折扣: Discount
原价: Original Price
实付金额: Actual Amount Paid
支付方式: Payment Method
支付时间: Payment Time
物流信息: Logistics Information
快递公司: Express Company
快递单号: Tracking Number
发货时间: Shipping Time
收货时间: Delivery Time
评价: Review
评分: Rating
评价内容: Review Content
商品图片: Product Image
商品详情: Product Details
库存: Stock
销量: Sales Volume
分类: Category
标签: Tag
推荐: Recommended
热门: Popular
新品: New Arrival
促销: Promotion

View File

@ -1,145 +0,0 @@
产品管理: 製品管理
产品名称: 製品名
产品编码: 製品コード
产品类型: 製品タイプ
产品价格: 製品価格
产品状态: 製品ステータス
产品描述: 製品説明
新增产品: 製品を追加
编辑产品: 製品を編集
删除产品: 製品を削除
上架: 出品
下架: 出品取下
已上架: 出品済み
已下架: 取下済み
订单管理: 注文管理
订单编号: 注文番号
订单金额: 注文金額
订单状态: 注文ステータス
订单时间: 注文日時
订单详情: 注文詳細
新增订单: 注文を追加
删除订单: 注文を削除
待支付: 支払い待ち
已支付: 支払い済み
已取消: キャンセル済み
已退款: 返金済み
已完成: 完了
支付: 支払い
退款: 返金
取消订单: 注文をキャンセル
优惠券管理: クーポン管理
优惠券名称: クーポン名
优惠券类型: クーポンタイプ
优惠券金额: クーポン金額
优惠券折扣: クーポン割引
使用条件: 使用条件
使用次数: 使用回数
有效期: 有効期間
新增优惠券: クーポンを追加
编辑优惠券: クーポンを編集
删除优惠券: クーポンを削除
发放: 配布
停用: 無効化
已领取: 受取済み
已使用: 使用済み
已过期: 期限切れ
充值管理: チャージ管理
充值金额: チャージ金額
充值时间: チャージ日時
充值方式: チャージ方法
充值记录: チャージ記録
余额: 残高
充值: チャージ
协议管理: 契約管理
协议名称: 契約名
协议内容: 契約内容
协议状态: 契約ステータス
签署状态: 署名ステータス
新增协议: 契約を追加
编辑协议: 契約を編集
删除协议: 契約を削除
签署: 署名
已签署: 署名済み
未签署: 未署名
资源管理: リソース管理
资源名称: リソース名
资源类型: リソースタイプ
资源大小: リソースサイズ
资源路径: リソースパス
上传资源: リソースをアップロード
删除资源: リソースを削除
下载: ダウンロード
推广链接: プロモーションリンク
链接名称: リンク名
链接地址: リンクURL
链接状态: リンクステータス
新增链接: リンクを追加
编辑链接: リンクを編集
删除链接: リンクを削除
点击量: クリック数
转化量: コンバージョン数
业务订单: 業務注文
客户名称: 顧客名
供应商名称: サプライヤー名
备注: 備考
创建时间: 作成日時
更新时间: 更新日時
搜索: 検索
名称或编码: 名前またはコード
操作: 操作
描述: 説明
类型: タイプ
状态: ステータス
名称: 名前
编码: コード
金额: 金額
数量: 数量
新增: 追加
保存: 保存
取消: キャンセル
确认: 確認
删除: 削除
编辑: 編集
查看: 表示
导出: エクスポート
打印: 印刷
刷新: 更新
返回: 戻る
提交: 送信
重置: リセット
Conform: 確認
Discard: 破棄
Submit: 送信
Reset: リセット
Cancel: キャンセル
全部: すべて
日期: 日付
用户: ユーザー
手机号: 電話番号
邮箱: メール
地址: 住所
规格: 仕様
折扣: 割引
原价: 元の価格
实付金额: 実支払金額
支付方式: 支払い方法
支付时间: 支払い日時
物流信息: 物流情報
快递公司: 配送業者
快递单号: 追跡番号
发货时间: 発送日時
收货时间: 配達日時
评价: レビュー
评分: 評価
评价内容: レビュー内容
商品图片: 商品画像
商品详情: 商品詳細
库存: 在庫
销量: 販売数
分类: カテゴリ
标签: タグ
推荐: おすすめ
热门: 人気
新品: 新着
促销: セール

View File

@ -1,145 +0,0 @@
产品管理: 제품 관리
产品名称: 제품명
产品编码: 제품 코드
产品类型: 제품 유형
产品价格: 제품 가격
产品状态: 제품 상태
产品描述: 제품 설명
新增产品: 제품 추가
编辑产品: 제품 편집
删除产品: 제품 삭제
上架: 등록
下架: 등록 해제
已上架: 등록됨
已下架: 등록 해제됨
订单管理: 주문 관리
订单编号: 주문 번호
订单金额: 주문 금액
订单状态: 주문 상태
订单时间: 주문 시간
订单详情: 주문 상세
新增订单: 주문 추가
删除订单: 주문 삭제
待支付: 결제 대기
已支付: 결제 완료
已取消: 취소됨
已退款: 환불 완료
已完成: 완료
支付: 결제
退款: 환불
取消订单: 주문 취소
优惠券管理: 쿠폰 관리
优惠券名称: 쿠폰명
优惠券类型: 쿠폰 유형
优惠券金额: 쿠폰 금액
优惠券折扣: 쿠폰 할인
使用条件: 사용 조건
使用次数: 사용 횟수
有效期: 유효 기간
新增优惠券: 쿠폰 추가
编辑优惠券: 쿠폰 편집
删除优惠券: 쿠폰 삭제
发放: 배포
停用: 비활성화
已领取: 수령 완료
已使用: 사용 완료
已过期: 만료됨
充值管理: 충전 관리
充值金额: 충전 금액
充值时间: 충전 시간
充值方式: 충전 방법
充值记录: 충전 기록
余额: 잔액
充值: 충전
协议管理: 약관 관리
协议名称: 약관명
协议内容: 약관 내용
协议状态: 약관 상태
签署状态: 서명 상태
新增协议: 약관 추가
编辑协议: 약관 편집
删除协议: 약관 삭제
签署: 서명
已签署: 서명 완료
未签署: 미서명
资源管理: 리소스 관리
资源名称: 리소스명
资源类型: 리소스 유형
资源大小: 리소스 크기
资源路径: 리소스 경로
上传资源: 리소스 업로드
删除资源: 리소스 삭제
下载: 다운로드
推广链接: 프로모션 링크
链接名称: 링크명
链接地址: 링크 주소
链接状态: 링크 상태
新增链接: 링크 추가
编辑链接: 링크 편집
删除链接: 링크 삭제
点击量: 클릭 수
转化量: 전환 수
业务订单: 비즈니스 주문
客户名称: 고객명
供应商名称: 공급업체명
备注: 비고
创建时间: 생성 시간
更新时间: 업데이트 시간
搜索: 검색
名称或编码: 이름 또는 코드
操作: 작업
描述: 설명
类型: 유형
状态: 상태
名称: 이름
编码: 코드
金额: 금액
数量: 수량
新增: 추가
保存: 저장
取消: 취소
确认: 확인
删除: 삭제
编辑: 편집
查看: 보기
导出: 내보내기
打印: 인쇄
刷新: 새로고침
返回: 뒤로
提交: 제출
重置: 초기화
Conform: 확인
Discard: 폐기
Submit: 제출
Reset: 초기화
Cancel: 취소
全部: 전체
日期: 날짜
用户: 사용자
手机号: 전화번호
邮箱: 이메일
地址: 주소
规格: 규격
折扣: 할인
原价: 원가
实付金额: 실결제 금액
支付方式: 결제 방법
支付时间: 결제 시간
物流信息: 물류 정보
快递公司: 택배 회사
快递单号: 운송장 번호
发货时间: 배송 시간
收货时间: 수령 시간
评价: 리뷰
评分: 평점
评价内容: 리뷰 내용
商品图片: 상품 이미지
商品详情: 상품 상세
库存: 재고
销量: 판매량
分类: 카테고리
标签: 태그
推荐: 추천
热门: 인기
新品: 신상품
促销: 프로모션

View File

@ -1,144 +0,0 @@
Cancel: Cancel
Conform: Conform
Discard: Discard
Reset: Reset
Submit: Submit
id: id
不可用产品id集: 不可用产品id集
业务操作: 业务操作
交易费率: 交易费率
交易金额: 交易金额
产品: 产品
产品id: 产品id
产品名称: 产品名称
产品数量: 产品数量
产品机构: 产品机构
产品管理: 产品管理
产品类型: 产品类型
产品类型id: 产品类型id
产品类型名称: 产品类型名称
产品类型规格: 产品类型规格
产品类型规格id: 产品类型规格id
产品编码: 产品编码
产品计价id: 产品计价id
产品计价模式: 产品计价模式
产品计费: 产品计费
产品计费表: 产品计费表
产品配置: 产品配置
代金券: 代金券
代金券发放: 代金券发放
代金券管理: 代金券管理
代金券设置: 代金券设置
价格值: 价格值
优惠券: 优惠券
优惠券id: 优惠券id
优惠券使用日志: 优惠券使用日志
优惠券名: 优惠券名
优惠券类型: 优惠券类型
优惠券类型id: 优惠券类型id
你无权使用此功能: 你无权使用此功能
使用日期: 使用日期
使用时间戳: 使用时间戳
供应商ID: 供应商ID
供应商名: 供应商名
供应商机构id: 供应商机构id
供应商管理: 供应商管理
供应商编号: 供应商编号
供应商资源id: 供应商资源id
供应方id: 供应方id
供应方uid: 供应方uid
供应方产品id: 供应方产品id
供销金额: 供销金额
供销链: 供销链
停用日期: 停用日期
充值: 充值
充值日志: 充值日志
充值日期: 充值日期
充值状态: 充值状态
充值费率: 充值费率
充值费用: 充值费用
充值金额: 充值金额
充值错账处理: 充值错账处理
关联产品id: 关联产品id
分销协议: 分销协议
分销协议id: 分销协议id
分销商ID: 分销商ID
分销商id: 分销商id
分销方id: 分销方id
动作: 动作
协议id: 协议id
协议名称: 协议名称
协议授权产品: 协议授权产品
协议文件: 协议文件
协议文本: 协议文本
协议明细: 协议明细
协议明细id: 协议明细id
协议明细名: 协议明细名
协议状态: 协议状态
协议阶梯折扣: 协议阶梯折扣
单位值: 单位值
原价: 原价
原订单: 原订单
发放客户动作: 发放客户动作
发放机构: 发放机构
发放条件: 发放条件
可用产品id集: 可用产品id集
名字: 名字
启用日期: 启用日期
商户: 商户
商户id: 商户id
商户产品id: 商户产品id
外部计费apiid: 外部计费apiid
失效日期: 失效日期
客户id: 客户id
客户资源: 客户资源
平台业务: 平台业务
开始日期: 开始日期
折扣: 折扣
折扣值: 折扣值
报价: 报价
描述: 描述
操作用户id: 操作用户id
支付时间: 支付时间
支付渠道: 支付渠道
支付渠道id: 支付渠道id
时间戳: 时间戳
是否与其他优惠券同用: 是否与其他优惠券同用
是否可用多张: 是否可用多张
是否多规格: 是否多规格
是否必须: 是否必须
最低交易金额: 最低交易金额
最低金额: 最低金额
最大金额: 最大金额
有效日期: 有效日期
机构id: 机构id
渠道交易id: 渠道交易id
父类型: 父类型
状态: 状态
用户id: 用户id
申请日期: 申请日期
登录信息: 登录信息
签订日期: 签订日期
结算方式: 结算方式
结算日期模版: 结算日期模版
自动续期: 自动续期
行为: 行为
规格值: 规格值
规格数据: 规格数据
规格说明: 规格说明
计价方式: 计价方式
订单: 订单
订单id: 订单id
订单号: 订单号
订单日期: 订单日期
订单明细: 订单明细
订单明细id: 订单明细id
订单状态: 订单状态
订单类型: 订单类型
费率: 费率
起效日期: 起效日期
选择充值方式: 选择充值方式
部件名: 部件名
部件标题: 部件标题
金额: 金额
阶梯类型: 阶梯类型

View File

@ -39,8 +39,7 @@
"name": "discount", "name": "discount",
"title": "折扣", "title": "折扣",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "step_type", "name": "step_type",

View File

@ -26,22 +26,19 @@
"name": "minamt", "name": "minamt",
"title": "最低金额", "title": "最低金额",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "maxamt", "name": "maxamt",
"title": "最大金额", "title": "最大金额",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "discount", "name": "discount",
"title": "折扣值", "title": "折扣值",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
} }
] ]
} }

View File

@ -48,8 +48,7 @@
"name": "amount", "name": "amount",
"title": "金额", "title": "金额",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "userid", "name": "userid",

View File

@ -41,15 +41,13 @@
"name": "list_amount", "name": "list_amount",
"title": "原价", "title": "原价",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "trans_amount", "name": "trans_amount",
"title": "交易金额", "title": "交易金额",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
} }
], ],
"codes": [ "codes": [

View File

@ -37,8 +37,7 @@
"name": "amount", "name": "amount",
"title": "金额", "title": "金额",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "enable_date", "name": "enable_date",

View File

@ -37,8 +37,7 @@
"name": "amount", "name": "amount",
"title": "金额", "title": "金额",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "act_date", "name": "act_date",

View File

@ -43,8 +43,7 @@
"name": "mintransamt", "name": "mintransamt",
"title": "最低交易金额", "title": "最低交易金额",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "use_multiple", "name": "use_multiple",

View File

@ -25,8 +25,7 @@
"name": "fee_rate", "name": "fee_rate",
"title": "费率", "title": "费率",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "enable_date", "name": "enable_date",

View File

@ -38,15 +38,13 @@
"name": "pr_amount", "name": "pr_amount",
"title": "供销金额", "title": "供销金额",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "list_amount", "name": "list_amount",
"title": "报价", "title": "报价",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
} }
], ],
"codes": [ "codes": [

View File

@ -45,8 +45,7 @@
"name": "unit_amt", "name": "unit_amt",
"title": "价格值", "title": "价格值",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
} }
], ],
"codes": [ "codes": [

View File

@ -37,15 +37,13 @@
"name": "recharge_amt", "name": "recharge_amt",
"title": "充值金额", "title": "充值金额",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "fee_rate", "name": "fee_rate",
"title": "充值费率", "title": "充值费率",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "fee_amt", "name": "fee_amt",

View File

@ -26,8 +26,7 @@
"name": "transrate", "name": "transrate",
"title": "交易费率", "title": "交易费率",
"type": "float", "type": "float",
"length": 18, "length": 18
"dec": 2
}, },
{ {
"name": "enable_date", "name": "enable_date",

View File

@ -1,247 +0,0 @@
#!/usr/bin/env python3
"""
platformbiz 模块 RBAC 权限管理脚本
使用方法:
cd ~/repos/sage
./py3/bin/python ~/repos/platformbiz/scripts/load_path.py
"""
import subprocess
import os
import sys
def find_sage_root():
candidates = [
os.path.expanduser("~/repos/sage"),
os.path.expanduser("~/sage"),
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
]
for c in candidates:
if os.path.isdir(os.path.join(c, "py3")) and os.path.isdir(os.path.join(c, "wwwroot")):
return c
return None
SAGE_ROOT = find_sage_root()
if not SAGE_ROOT:
print("ERROR: Cannot find Sage root directory")
sys.exit(1)
PYTHON = os.path.join(SAGE_ROOT, "py3", "bin", "python")
SET_PERM_SCRIPT = os.path.join(SAGE_ROOT, "set_role_perm.py")
MOD = "platformbiz"
# ============================================================
# 权限路径定义
# ============================================================
# any — 无需登录
PATHS_ANY = [
f"/{MOD}/menu.ui",
f"/{MOD}/owner.operator.menu.ui",
f"/{MOD}/reseller.operator.menu.ui",
]
# logined — 所有已登录用户
PATHS_LOGINED = [
# 模块入口
f"/{MOD}",
f"/{MOD}/index.ui",
# 顶层 .ui 页面
f"/{MOD}/add_provider.ui",
f"/{MOD}/recharge.ui",
# 顶层 .dspy
f"/{MOD}/add_provider.dspy",
f"/{MOD}/agree_prodclone.dspy",
f"/{MOD}/agree_productauth.dspy",
f"/{MOD}/agreeproduct_auth.dspy",
f"/{MOD}/open_customer_accounts.dspy",
f"/{MOD}/open_owner_accounts.dspy",
f"/{MOD}/product_query_price.dspy",
f"/{MOD}/query_orders.dspy",
f"/{MOD}/recharge.dspy",
# CRUD 子目录 — agreedetail (alias: agreedetail)
f"/{MOD}/agreedetail/index.ui",
f"/{MOD}/agreedetail/get_agreedetail.dspy",
f"/{MOD}/agreedetail/add_agreedetail.dspy",
f"/{MOD}/agreedetail/update_agreedetail.dspy",
f"/{MOD}/agreedetail/delete_agreedetail.dspy",
# CRUD 子目录 — agreedetailstep (alias: agreedetailstep)
f"/{MOD}/agreedetailstep/index.ui",
f"/{MOD}/agreedetailstep/get_agreedetailstep.dspy",
f"/{MOD}/agreedetailstep/add_agreedetailstep.dspy",
f"/{MOD}/agreedetailstep/update_agreedetailstep.dspy",
f"/{MOD}/agreedetailstep/delete_agreedetailstep.dspy",
# CRUD 子目录 — agreement (alias: agreement)
f"/{MOD}/agreement/index.ui",
f"/{MOD}/agreement/get_agreement.dspy",
f"/{MOD}/agreement/add_agreement.dspy",
f"/{MOD}/agreement/update_agreement.dspy",
f"/{MOD}/agreement/delete_agreement.dspy",
# CRUD 子目录 — agreeproduct (alias: agreeproduct)
f"/{MOD}/agreeproduct/index.ui",
f"/{MOD}/agreeproduct/get_agreeproduct.dspy",
f"/{MOD}/agreeproduct/add_agreeproduct.dspy",
f"/{MOD}/agreeproduct/update_agreeproduct.dspy",
f"/{MOD}/agreeproduct/delete_agreeproduct.dspy",
# CRUD 子目录 — biz_order (alias: biz_order)
f"/{MOD}/biz_order/index.ui",
f"/{MOD}/biz_order/get_biz_order.dspy",
f"/{MOD}/biz_order/add_biz_order.dspy",
f"/{MOD}/biz_order/update_biz_order.dspy",
f"/{MOD}/biz_order/delete_biz_order.dspy",
# CRUD 子目录 — choose_prodtype (alias: choose_prodtype)
f"/{MOD}/choose_prodtype/index.ui",
f"/{MOD}/choose_prodtype/get_choose_prodtype.dspy",
f"/{MOD}/choose_prodtype/add_choose_prodtype.dspy",
f"/{MOD}/choose_prodtype/update_choose_prodtype.dspy",
f"/{MOD}/choose_prodtype/delete_choose_prodtype.dspy",
# CRUD 子目录 — coupon (alias: coupon)
f"/{MOD}/coupon/index.ui",
f"/{MOD}/coupon/get_coupon.dspy",
f"/{MOD}/coupon/add_coupon.dspy",
f"/{MOD}/coupon/update_coupon.dspy",
f"/{MOD}/coupon/delete_coupon.dspy",
# CRUD 子目录 — coupon_log (alias: coupon_log)
f"/{MOD}/coupon_log/index.ui",
f"/{MOD}/coupon_log/get_coupon_log.dspy",
f"/{MOD}/coupon_log/add_coupon_log.dspy",
f"/{MOD}/coupon_log/update_coupon_log.dspy",
f"/{MOD}/coupon_log/delete_coupon_log.dspy",
# CRUD 子目录 — coupontype (alias: coupontype)
f"/{MOD}/coupontype/index.ui",
f"/{MOD}/coupontype/get_coupontype.dspy",
f"/{MOD}/coupontype/add_coupontype.dspy",
f"/{MOD}/coupontype/update_coupontype.dspy",
f"/{MOD}/coupontype/delete_coupontype.dspy",
# CRUD 子目录 — paychannel (alias: paychannel)
f"/{MOD}/paychannel/index.ui",
f"/{MOD}/paychannel/get_paychannel.dspy",
f"/{MOD}/paychannel/add_paychannel.dspy",
f"/{MOD}/paychannel/update_paychannel.dspy",
f"/{MOD}/paychannel/delete_paychannel.dspy",
# CRUD 子目录 — prodpricing (alias: prodpricing)
f"/{MOD}/prodpricing/index.ui",
f"/{MOD}/prodpricing/get_prodpricing.dspy",
f"/{MOD}/prodpricing/add_prodpricing.dspy",
f"/{MOD}/prodpricing/update_prodpricing.dspy",
f"/{MOD}/prodpricing/delete_prodpricing.dspy",
# CRUD 子目录 — prodpricingtab (alias: prodpricingtab)
f"/{MOD}/prodpricingtab/index.ui",
f"/{MOD}/prodpricingtab/get_prodpricingtab.dspy",
f"/{MOD}/prodpricingtab/add_prodpricingtab.dspy",
f"/{MOD}/prodpricingtab/update_prodpricingtab.dspy",
f"/{MOD}/prodpricingtab/delete_prodpricingtab.dspy",
# CRUD 子目录 — prodtype (alias: prodtype)
f"/{MOD}/prodtype/index.ui",
f"/{MOD}/prodtype/get_prodtype.dspy",
f"/{MOD}/prodtype/add_prodtype.dspy",
f"/{MOD}/prodtype/update_prodtype.dspy",
f"/{MOD}/prodtype/delete_prodtype.dspy",
# CRUD 子目录 — prodtypespec (alias: prodtypespec)
f"/{MOD}/prodtypespec/index.ui",
f"/{MOD}/prodtypespec/get_prodtypespec.dspy",
f"/{MOD}/prodtypespec/add_prodtypespec.dspy",
f"/{MOD}/prodtypespec/update_prodtypespec.dspy",
f"/{MOD}/prodtypespec/delete_prodtypespec.dspy",
# CRUD 子目录 — product (alias: product)
f"/{MOD}/product/index.ui",
f"/{MOD}/product/get_product.dspy",
f"/{MOD}/product/add_product.dspy",
f"/{MOD}/product/update_product.dspy",
f"/{MOD}/product/delete_product.dspy",
# CRUD 子目录 — provide_agree (alias: provide_agree)
f"/{MOD}/provide_agree/index.ui",
f"/{MOD}/provide_agree/get_provide_agree.dspy",
f"/{MOD}/provide_agree/add_provide_agree.dspy",
f"/{MOD}/provide_agree/update_provide_agree.dspy",
f"/{MOD}/provide_agree/delete_provide_agree.dspy",
# CRUD 子目录 — provide_agreedetail (alias: provide_agreedetail)
f"/{MOD}/provide_agreedetail/index.ui",
f"/{MOD}/provide_agreedetail/get_provide_agreedetail.dspy",
f"/{MOD}/provide_agreedetail/add_provide_agreedetail.dspy",
f"/{MOD}/provide_agreedetail/update_provide_agreedetail.dspy",
f"/{MOD}/provide_agreedetail/delete_provide_agreedetail.dspy",
# CRUD 子目录 — provide_agreeproduct (alias: provide_agreeproduct)
f"/{MOD}/provide_agreeproduct/index.ui",
f"/{MOD}/provide_agreeproduct/get_provide_agreeproduct.dspy",
f"/{MOD}/provide_agreeproduct/add_provide_agreeproduct.dspy",
f"/{MOD}/provide_agreeproduct/update_provide_agreeproduct.dspy",
f"/{MOD}/provide_agreeproduct/delete_provide_agreeproduct.dspy",
# CRUD 子目录 — recgarge_log (alias: recgarge_log, json file: recgarge_log.json)
f"/{MOD}/recgarge_log/index.ui",
f"/{MOD}/recgarge_log/get_recgarge_log.dspy",
f"/{MOD}/recgarge_log/add_recgarge_log.dspy",
f"/{MOD}/recgarge_log/update_recgarge_log.dspy",
f"/{MOD}/recgarge_log/delete_recgarge_log.dspy",
# CRUD 子目录 — resource (alias: resource)
f"/{MOD}/resource/index.ui",
f"/{MOD}/resource/get_resource.dspy",
f"/{MOD}/resource/add_resource.dspy",
f"/{MOD}/resource/update_resource.dspy",
f"/{MOD}/resource/delete_resource.dspy",
# CRUD 子目录 — retail_agree (alias: retail_agree)
f"/{MOD}/retail_agree/index.ui",
f"/{MOD}/retail_agree/get_retail_agree.dspy",
f"/{MOD}/retail_agree/add_retail_agree.dspy",
f"/{MOD}/retail_agree/update_retail_agree.dspy",
f"/{MOD}/retail_agree/delete_retail_agree.dspy",
]
# ============================================================
# 执行注册
# ============================================================
def run_set_perm(role, path):
cmd = [PYTHON, SET_PERM_SCRIPT, role, path]
result = subprocess.run(cmd, capture_output=True, text=True)
return result.returncode == 0
def register_role_paths(role, paths):
count = 0
for p in paths:
if run_set_perm(role, p):
count += 1
print(f" {role}: {count}/{len(paths)} paths registered")
return count
def main():
print(f"Sage root: {SAGE_ROOT}")
total = 0
total += register_role_paths("any", PATHS_ANY)
total += register_role_paths("logined", PATHS_LOGINED)
print(f"\nDone. Total {total} permission entries registered.")
print("NOTE: Restart Sage after permission changes to reload RBAC cache.")
if __name__ == "__main__":
main()

View File

@ -4,7 +4,8 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "100%", "height": "100%",
"padding": "0" "padding": "0",
"bgcolor": "#0B1120"
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -18,7 +19,9 @@
{ {
"widgettype": "Title2", "widgettype": "Title2",
"options": { "options": {
"text": "平台业务" "text": "平台业务",
"color": "#F1F5F9",
"fontWeight": "700"
} }
}, },
{ {
@ -28,137 +31,133 @@
"widgettype": "Text", "widgettype": "Text",
"options": { "options": {
"text": "供应商与分销商管理", "text": "供应商与分销商管理",
"cfontsize": 1.2 "fontSize": "14px",
"color": "#64748B"
} }
} }
] ]
}, },
{ {
"widgettype": "VScrollPanel", "widgettype": "ResponsableBox",
"options": { "options": {
"css": "filler" "gap": "16px",
"minWidth": "250px"
}, },
"subwidgets": [ "subwidgets": [
{% if 'reseller.operator' in roles %}
{ {
"widgettype": "VBox", "widgettype": "VBox",
"options": { "options": {
"spacing": 24 "bgcolor": "#1E293B",
"padding": "24px",
"borderRadius": "12px",
"border": "1px solid #334155",
"cursor": "pointer"
}, },
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.platformbiz_content",
"options": {
"url": "{{entire_url('/platformbiz/provider')}}"
},
"mode": "replace"
}
],
"subwidgets": [ "subwidgets": [
{ {
"widgettype": "ResponsableBox", "widgettype": "Svg",
"options": { "options": {
"gap": "16px", "svg": "<svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#3B82F6\" stroke-width=\"1.5\"><path d=\"M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21\"/></svg>",
"minWidth": "250px" "width": "36px",
}, "height": "36px",
"subwidgets": [ "marginBottom": "16px"
{% if 'reseller.operator' in roles %} }
{ },
"widgettype": "VBox", {
"options": { "widgettype": "Title4",
"css": "card", "options": {
"padding": "16px", "text": "供应商管理",
"cursor": "pointer", "color": "#F1F5F9",
"fontWeight": "600",
"cwidth": 23 "marginBottom": "8px"
}, }
"binds": [ },
{ {
"wid": "self", "widgettype": "Text",
"event": "click", "options": {
"actiontype": "urlwidget", "text": "管理AI模型供应商信息与API配置",
"target": "app.platformbiz_content", "fontSize": "14px",
"options": { "color": "#94A3B8"
"url": "{{entire_url('/platformbiz/provider')}}" }
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "Svg",
"options": {
"svg": "<svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#3B82F6\" stroke-width=\"1.5\"><path d=\"M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21\"/></svg>",
"width": "36px",
"height": "36px",
"marginBottom": "16px"
}
},
{
"widgettype": "Title4",
"options": {
"text": "供应商管理",
"marginBottom": "8px"
}
},
{
"widgettype": "Text",
"options": {
"text": "管理AI模型供应商信息与API配置",
"cfontsize": 1.2
}
}
]
},
{% endif %}
{% if 'reseller.sale' in roles %}
{
"widgettype": "VBox",
"options": {
"css": "card",
"padding": "16px",
"cursor": "pointer",
"cwidth": 23
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.platformbiz_content",
"options": {
"url": "{{entire_url('/platformbiz/reseller')}}"
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "Svg",
"options": {
"svg": "<svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#22C55E\" stroke-width=\"1.5\"><path d=\"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z\"/></svg>",
"width": "36px",
"height": "36px",
"marginBottom": "16px"
}
},
{
"widgettype": "Title4",
"options": {
"text": "分销商管理",
"marginBottom": "8px"
}
},
{
"widgettype": "Text",
"options": {
"text": "管理分销商账户与渠道关系",
"cfontsize": 1.2
}
}
]
}
{% endif %}
]
} }
] ]
}, },
{% endif %}
{% if 'reseller.sale' in roles %}
{ {
"widgettype": "VBox", "widgettype": "VBox",
"id": "platformbiz_content" "options": {
"bgcolor": "#1E293B",
"padding": "24px",
"borderRadius": "12px",
"border": "1px solid #334155",
"cursor": "pointer"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.platformbiz_content",
"options": {
"url": "{{entire_url('/platformbiz/reseller')}}"
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "Svg",
"options": {
"svg": "<svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#22C55E\" stroke-width=\"1.5\"><path d=\"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z\"/></svg>",
"width": "36px",
"height": "36px",
"marginBottom": "16px"
}
},
{
"widgettype": "Title4",
"options": {
"text": "分销商管理",
"color": "#F1F5F9",
"fontWeight": "600",
"marginBottom": "8px"
}
},
{
"widgettype": "Text",
"options": {
"text": "管理分销商账户与渠道关系",
"fontSize": "14px",
"color": "#94A3B8"
}
}
]
} }
{% endif %}
] ]
},
{
"widgettype": "VBox",
"id": "platformbiz_content",
"css": "filler",
"options": {
"width": "100%",
"overflowY": "auto"
}
} }
] ]
} }