Update modules/pricing/pricing_app.py
Browse files- modules/pricing/pricing_app.py +19 -25
modules/pricing/pricing_app.py
CHANGED
|
@@ -1,42 +1,36 @@
|
|
| 1 |
-
import streamlit as st
|
| 2 |
-
import pandas as pd
|
| 3 |
-
import numpy as np
|
| 4 |
-
import matplotlib.pyplot as plt
|
| 5 |
-
import plotly.express as px
|
| 6 |
-
import plotly.graph_objects as go
|
| 7 |
-
from datetime import datetime
|
| 8 |
-
import time
|
| 9 |
-
import io
|
| 10 |
-
import os
|
| 11 |
-
import json
|
| 12 |
-
import base64
|
| 13 |
from pathlib import Path
|
| 14 |
|
| 15 |
# استيراد الوحدات الجديدة من pricing_system
|
| 16 |
-
from pricing_system.modules.analysis import analysis_utils
|
| 17 |
from pricing_system.modules.catalogs import materials_catalog, equipment_catalog
|
| 18 |
from pricing_system.modules.indirect_support import overheads
|
| 19 |
-
from pricing_system.modules.pricing_strategies
|
| 20 |
|
| 21 |
class PricingApp:
|
| 22 |
"""وحدة التسعير"""
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
def __init__(self):
|
| 25 |
-
"""تهيئة وحدة التسعير"""
|
| 26 |
|
| 27 |
-
if 'bill_of_quantities' not in st.session_state:
|
| 28 |
-
st.session_state.bill_of_quantities = []
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
|
| 33 |
-
if 'price_scenarios' not in st.session_state:
|
| 34 |
-
st.session_state.price_scenarios = []
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
self.strategies = PricingStrategies()
|
| 40 |
|
| 41 |
def run(self):
|
| 42 |
self.render()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from pathlib import Path
|
| 2 |
|
| 3 |
# استيراد الوحدات الجديدة من pricing_system
|
| 4 |
+
from pricing_system.modules.analysis import smart_price_analysis as analysis_utils
|
| 5 |
from pricing_system.modules.catalogs import materials_catalog, equipment_catalog
|
| 6 |
from pricing_system.modules.indirect_support import overheads
|
| 7 |
+
from pricing_system.modules.pricing_strategies import balanced_pricing, profit_oriented
|
| 8 |
|
| 9 |
class PricingApp:
|
| 10 |
"""وحدة التسعير"""
|
| 11 |
+
if 'local_content_data' not in st.session_state:
|
| 12 |
+
st.session_state.local_content_data = {'target_percent': 30, 'actual_percent': 0, 'items': []}
|
| 13 |
|
|
|
|
|
|
|
| 14 |
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
def run(self):
|
| 17 |
+
self.render()
|
| 18 |
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
def _render_pricing_scenarios_tab(self):
|
| 21 |
+
st.markdown("### سيناريوهات التسعير")
|
| 22 |
+
balanced_pricing.render_balanced_strategy()
|
| 23 |
+
|
| 24 |
+
def _render_competitive_analysis_tab(self):
|
| 25 |
+
st.markdown("### المقارنة التنافسية")
|
| 26 |
+
|
| 27 |
+
def _render_unbalanced_pricing_tab(self):
|
| 28 |
+
st.markdown("### التسعير غير المتزن")
|
| 29 |
+
profit_oriented.render_profit_driven_strategy()
|
| 30 |
+
|
| 31 |
+
def _render_reports_tab(self):
|
| 32 |
+
st.markdown("### التقارير")
|
| 33 |
|
|
|
|
| 34 |
|
| 35 |
def run(self):
|
| 36 |
self.render()
|