Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
skills
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
allen.wang
skills
Commits
89ec371c
Commit
89ec371c
authored
Apr 12, 2026
by
allen.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:init
parent
62507a1d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1041 additions
and
480 deletions
+1041
-480
vip-report-top-products-sync.ps1
vip-report/bin/vip-report-top-products-sync.ps1
+13
-4
vip-report-warehouse-100060-sync.ps1
vip-report/bin/vip-report-warehouse-100060-sync.ps1
+13
-0
sync_inventory_monthly_assets.py
vip-report/scripts/sync_inventory_monthly_assets.py
+229
-43
sync_monthly_sales_assets.py
vip-report/scripts/sync_monthly_sales_assets.py
+35
-8
sync_top_products_assets.py
vip-report/scripts/sync_top_products_assets.py
+397
-275
sync_warehouse_100060_assets.py
vip-report/scripts/sync_warehouse_100060_assets.py
+354
-150
No files found.
vip-report/bin/vip-report-top-products-sync.ps1
View file @
89ec371c
param
(
[
string
]
$ConfigPath
=
"C:\Users\niuniu\.codex\vip-report\config.yaml"
,
[
string
]
$Slides
=
"S
09,S
10"
,
[
string
]
$Slides
=
"S10"
,
[
string
]
$ReportMonth
=
""
,
[
int
]
$ReportYear
=
0,
[
int
]
$CompareYear
=
0,
[
switch
]
$Render
,
[
string
]
$TemplatePath
=
""
,
[
string
]
$OutputPath
=
"C:\workspace\cursor\output\vip-report\generated-top-products.pptx"
,
[
string
]
$CompareOutputPath
=
"C:\workspace\cursor\output\vip-report\generated-top-products.compare.json"
)
...
...
@@ -13,7 +14,15 @@ $ErrorActionPreference = "Stop"
$root
=
Split-Path
-Parent
$PSScriptRoot
$workdir
=
"C:\workspace\cursor"
$opsPath
=
"C:\workspace\cursor\output\vip-report\render-ops.top-products.live.json"
$templatePath
=
"C:\Users\niuniu\Desktop\Report.pptx"
$fallbackTemplatePath
=
Join-Path
$root
"output\Report.clean.pptx"
if
(
-not
$TemplatePath
)
{
$TemplatePath
=
$fallbackTemplatePath
}
if
(
-not
(
Test-Path
-LiteralPath
$TemplatePath
))
{
throw
"TemplatePath not found:
$TemplatePath
"
}
$pythonArgs
=
@
(
"
$root
\scripts\sync_top_products_assets.py"
,
...
...
@@ -33,8 +42,8 @@ if ($CompareYear -gt 0) {
python @pythonArgs
if
(
$Render
)
{
powershell -ExecutionPolicy Bypass -File
"
$root
\bin\vip-report-render.ps1"
-TemplatePath
"
$
t
emplatePath
"
-OutputPath
"
$OutputPath
"
-OperationsPath
"
$opsPath
"
| Out-Null
python
"
$root
\scripts\compare_pptx.py"
"
$
t
emplatePath
"
"
$OutputPath
"
--output
"
$CompareOutputPath
"
powershell -ExecutionPolicy Bypass -File
"
$root
\bin\vip-report-render.ps1"
-TemplatePath
"
$
T
emplatePath
"
-OutputPath
"
$OutputPath
"
-OperationsPath
"
$opsPath
"
| Out-Null
python
"
$root
\scripts\compare_pptx.py"
"
$
T
emplatePath
"
"
$OutputPath
"
--output
"
$CompareOutputPath
"
Write-Output
$OutputPath
Write-Output
$CompareOutputPath
}
else
{
...
...
vip-report/bin/vip-report-warehouse-100060-sync.ps1
View file @
89ec371c
...
...
@@ -13,7 +13,20 @@ $ErrorActionPreference = "Stop"
$root
=
Split-Path
-Parent
$PSScriptRoot
$workdir
=
"C:\workspace\cursor"
$opsPath
=
"C:\workspace\cursor\output\vip-report\render-ops.warehouse-100060.live.json"
$localConfigPath
=
Join-Path
$root
"config.yaml"
if
(
-not
(
Test-Path
-LiteralPath
$ConfigPath
)
-and
(
Test-Path
-LiteralPath
$localConfigPath
))
{
$ConfigPath
=
$localConfigPath
}
$templatePath
=
"C:\Users\niuniu\Desktop\Report.pptx"
$downloadTemplatePath
=
"C:\Users\allen.wang\Downloads\Report.pptx"
$fallbackTemplatePath
=
Join-Path
$root
"output\Report.clean.pptx"
if
(
-not
(
Test-Path
-LiteralPath
$templatePath
)
-and
(
Test-Path
-LiteralPath
$downloadTemplatePath
))
{
$templatePath
=
$downloadTemplatePath
}
if
(
-not
(
Test-Path
-LiteralPath
$templatePath
)
-and
(
Test-Path
-LiteralPath
$fallbackTemplatePath
))
{
$templatePath
=
$fallbackTemplatePath
}
$pythonArgs
=
@
(
"
$root
\scripts\sync_warehouse_100060_assets.py"
,
...
...
vip-report/scripts/sync_inventory_monthly_assets.py
View file @
89ec371c
This diff is collapsed.
Click to expand it.
vip-report/scripts/sync_monthly_sales_assets.py
View file @
89ec371c
...
...
@@ -106,6 +106,24 @@ def build_specs(report_month: str, report_year: int, compare_year: int) -> dict[
"raw_screenshot_name"
:
"monthly-sales-overview.png"
,
"note"
:
"Overview 页面,负责 S02 主表与优先级最高的总览图块。"
,
},
{
"capture_id"
:
"overview_s03"
,
"session"
:
SESSION_NAME
,
"hash_url"
:
"#/views/ECMonthlySalesReport_17250004228820/Overview?:iid=1"
,
"inner_frame_fragment"
:
"/views/ECMonthlySalesReport_17250004228820/Overview?"
,
"activate_sheet"
:
"Overview"
,
"filters"
:
[
{
"field"
:
"Brand"
,
"values"
:
[
"CK"
]},
{
"field"
:
"Sales Type"
,
"values"
:
[
"GMV"
]},
{
"field"
:
"Storename (group)"
,
"values"
:
[
"CKC-VIP"
]},
{
"field"
:
"Storename"
,
"values"
:
[
"CKC-VIP"
]},
{
"field"
:
"Month"
,
"values"
:
s02_month_values
},
{
"field"
:
"月(daily)"
,
"values"
:
s02_month_values
},
],
"params"
:
{
"year1"
:
report_year
,
"year2"
:
compare_year
},
"raw_screenshot_name"
:
"monthly-sales-overview-s03.png"
,
"note"
:
"Overview 页面,负责 S03 四宫格的真实来源。"
,
},
{
"capture_id"
:
"store_sales_detail"
,
"session"
:
SESSION_NAME
,
...
...
@@ -189,30 +207,30 @@ def build_specs(report_month: str, report_year: int, compare_year: int) -> dict[
"shape_name"
:
"图片 1"
,
"shape_id"
:
2
,
"asset_name"
:
"s03_kpi_lfl_quad"
,
"capture_id"
:
"
store_kpi_lfl
"
,
"source_view"
:
"
Store KPI LFL
"
,
"note"
:
"S03
改为从 Store KPI LFL
抽取 GP/Con/ATV/Returnqty 四块后重组,贴齐模板四宫格顺序。"
,
"capture_id"
:
"
overview_s03
"
,
"source_view"
:
"
Overview
"
,
"note"
:
"S03
从 Overview
抽取 GP/Con/ATV/Returnqty 四块后重组,贴齐模板四宫格顺序。"
,
"composite"
:
{
"canvas"
:
{
"width"
:
1224
,
"height"
:
685
,
"background"
:
"#FFFFFF"
},
"panels"
:
[
{
"panel_code"
:
"gp"
,
"crop"
:
{
"left"
:
50
,
"top"
:
2360
,
"width"
:
1300
,
"height"
:
52
0
},
"crop"
:
{
"left"
:
0
,
"top"
:
1540
,
"width"
:
620
,
"height"
:
37
0
},
"dest"
:
{
"left"
:
0
,
"top"
:
0
,
"width"
:
598
,
"height"
:
328
},
},
{
"panel_code"
:
"con"
,
"crop"
:
{
"left"
:
50
,
"top"
:
1230
,
"width"
:
1300
,
"height"
:
52
0
},
"crop"
:
{
"left"
:
620
,
"top"
:
1540
,
"width"
:
620
,
"height"
:
37
0
},
"dest"
:
{
"left"
:
626
,
"top"
:
0
,
"width"
:
598
,
"height"
:
328
},
},
{
"panel_code"
:
"atv"
,
"crop"
:
{
"left"
:
50
,
"top"
:
1800
,
"width"
:
1300
,
"height"
:
52
0
},
"crop"
:
{
"left"
:
0
,
"top"
:
1930
,
"width"
:
620
,
"height"
:
33
0
},
"dest"
:
{
"left"
:
0
,
"top"
:
357
,
"width"
:
598
,
"height"
:
328
},
},
{
"panel_code"
:
"returnqty"
,
"crop"
:
{
"left"
:
50
,
"top"
:
2860
,
"width"
:
1300
,
"height"
:
50
0
},
"crop"
:
{
"left"
:
620
,
"top"
:
1930
,
"width"
:
620
,
"height"
:
33
0
},
"dest"
:
{
"left"
:
626
,
"top"
:
357
,
"width"
:
598
,
"height"
:
328
},
},
],
...
...
@@ -309,7 +327,16 @@ def build_configure_view_js(spec: dict[str, Any]) -> str:
if (activeSheet && typeof activeSheet.getWorksheets === 'function') {{
worksheets = activeSheet.getWorksheets();
}}
const targets = worksheets.length ? worksheets : [activeSheet];
// 同时覆盖 dashboard 本体与内部 worksheets,避免部分字段只在其一上生效。
const targets = [];
if (activeSheet) {{
targets.push(activeSheet);
}}
for (const worksheet of worksheets) {{
if (!targets.includes(worksheet)) {{
targets.push(worksheet);
}}
}}
const updateType = window.tableau.FilterUpdateType.REPLACE;
const filterApply = [];
...
...
vip-report/scripts/sync_top_products_assets.py
View file @
89ec371c
This diff is collapsed.
Click to expand it.
vip-report/scripts/sync_warehouse_100060_assets.py
View file @
89ec371c
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment