Ver código fonte

대시보드 완료, 마이페이지 작업중

DESKTOP-T61HUSC\user 4 meses atrás
pai
commit
86b411d069

+ 293 - 40
assets/scss/mode-w-m.scss

@@ -744,13 +744,18 @@
       justify-content: center;
       .pro--img{
         width: 96px;
+        font-size: 3rem;
         height: 96px;
-        background-image: url(../img/pf_sample.svg);
         border-radius: 50%;
         background-position: center;
         background-repeat: no-repeat;
         background-size: 100%;
         margin-bottom: 20px;
+        display: flex;
+        overflow: hidden;
+        align-items: center;
+        justify-content: center;
+        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
       }
       .pro--id{
         cursor: pointer;
@@ -7628,7 +7633,9 @@ z
     }
     
     .profile-info {
-      flex: 1;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
       
       .user-name {
         font-size: 2rem;
@@ -7640,7 +7647,6 @@ z
       .user-type {
         font-size: 1.2rem;
         opacity: 0.9;
-        margin-bottom: 20px;
       }
       
       .user-stats {
@@ -7672,7 +7678,7 @@ z
     .dashboard-cards {
       display: grid;
       grid-template-columns: 1fr 1fr 1fr;
-      gap: 30px;
+      gap: 1rem;
     }
     
     .dashboard-card {
@@ -7688,7 +7694,7 @@ z
       }
       
       .card-header {
-        padding: 25px 30px 20px;
+        padding: 1.2rem 1.5rem;
         border-bottom: 1px solid #f0f0f0;
         display: flex;
         justify-content: space-between;
@@ -7707,7 +7713,7 @@ z
       }
       
       .card-content {
-        padding: 25px 30px 30px;
+        padding: 1.2rem 1.5rem;
       }
     }
     
@@ -7905,6 +7911,11 @@ z
     text-align: center;
     padding: 40px 20px;
     color: #a0aec0;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    height: 300px;
+    max-height: 300px;
   }
 
   .no-orders i, .no-items i, .no-stats i, .no-inquiries i {
@@ -7987,6 +7998,7 @@ z
   max-width: 1050px;
   height: 80%;
   min-width: 900px;
+  justify-content: end;
   gap: 20px;
 }
 
@@ -8081,7 +8093,8 @@ z
 }
 
 /* 주문 리스트 스타일 */
-.order-list, .item-list, .influencer-list {
+.order-list, .item-list {
+  height: 300px;
   max-height: 300px;
   overflow-y: auto;
 }
@@ -8096,6 +8109,9 @@ z
   border-radius: 8px;
   cursor: pointer;
   transition: background-color 0.2s ease;
+  &:last-child{
+    margin-bottom: 0;
+  }
 }
 
 .order-item:hover, .inquiry-item:hover {
@@ -8110,7 +8126,6 @@ z
 }
 
 .buyer-name, .order-date, .inquiry-info p {
-  margin: 2px 0;
   font-size: 14px;
   color: #718096;
 }
@@ -8161,15 +8176,22 @@ z
   border-radius: 8px;
   cursor: pointer;
   transition: background-color 0.2s ease;
+  &:last-child{
+    margin-bottom: 0;
+  }
 }
 
 .item-card:hover {
   background: #edf2f7;
 }
 
+.item-info{
+  width: 100%;
+}
+
 .item-info h4 {
-  margin: 0 0 8px 0;
-  font-size: 16px;
+  margin-bottom: 15px;
+  font-size: 0.9rem;
   font-weight: 600;
   color: #2d3748;
 }
@@ -8177,13 +8199,14 @@ z
 .company-name {
   font-size: 14px;
   color: #718096;
-  margin-bottom: 8px;
 }
 
 .item-dates {
   display: flex;
+  width: 100%;
   gap: 12px;
-  align-items: center;
+  justify-content: space-between;
+  align-items: end;
 }
 
 .end-date {
@@ -8205,51 +8228,150 @@ z
   text-align: right;
 }
 
-.order-count {
-  font-size: 14px;
-  font-weight: 600;
-  color: #3182ce;
+.influencer-cards {
+  display: flex;
+  gap: 15px;
+  flex-wrap: wrap;
+  height: 300px;
 }
 
-/* 인플루언서 통계 스타일 */
-.influencer-item {
+.influencer-card {
+  position: relative;
+  background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
+  border: 2px solid #e3f2fd;
+  border-radius: 16px;
+  padding: 15px;
+  height: calc(50% - 7.5px);
   display: flex;
   align-items: center;
-  gap: 16px;
-  padding: 16px;
-  margin-bottom: 12px;
-  background: #f7fafc;
-  border-radius: 8px;
+  justify-content: center;
+  flex-direction: column;
+  width: calc((100% - 30px) / 3);
+  text-align: center;
+  transition: all 0.3s ease;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
 }
 
-.rank {
-  width: 30px;
-  height: 30px;
-  background: #4299e1;
+.influencer-card:hover {
+  transform: translateY(-4px);
+  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.15);
+  border-color: #764ba2;
+}
+
+.rank-badge {
+  position: absolute;
+  top: -8px;
+  left: -8px;
+  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: white;
+  width: 32px;
+  height: 32px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
-  font-weight: 700;
-  font-size: 14px;
+  font-weight: bold;
+  font-size: 0.9rem;
+  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
 }
 
-.influencer-info {
-  flex: 1;
+.user-avatar {
+  font-size: 1.8rem;
+  margin-bottom: 15px;
+  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
 }
-
-.influencer-info h4 {
-  margin: 0 0 4px 0;
-  font-size: 16px;
+.order-count {
+  display: flex;
+  font-size: 0.8rem;
   font-weight: 600;
-  color: #2d3748;
+  justify-content: center;
+  align-items: end;
+  color: #764ba2;
+  gap: 4px;
+  .count{
+    font-size: 1rem;
+    font-weight: bold;
+    color: #764ba2;
+  }
+  .label{
+    font-size: 0.7rem;
+    color: #666;
+  }
+}
+.no-stats {
+  text-align: center;
+  padding: 40px 20px;
+  color: #999;
 }
 
-.influencer-info p {
-  margin: 0;
-  font-size: 14px;
-  color: #718096;
+.no-stats i {
+  font-size: 3rem;
+  margin-bottom: 16px;
+  display: block;
+}
+
+.limit-badge {
+  color: #1976d2;
+  font-size: 0.65rem;
+  font-weight: 500;
+  padding: 2px 8px;
+  border-radius: 12px;
+  margin-left: 8px;
+}
+
+/* 인플루언서 통계 스타일 */
+.influencer-stats{
+  display: flex;
+  flex-direction: column;
+  .card-content{
+    height: 100%;
+  }
+  .influencer-list{
+    height: 100%;
+  }
+  .influencer-item {
+    display: flex;
+    align-items: center;
+    gap: 16px;
+    padding: 16px;
+    margin-bottom: 12px;
+    background: #f7fafc;
+    border-radius: 8px;
+  }
+
+  .rank {
+    width: 30px;
+    height: 30px;
+    background: #4299e1;
+    color: white;
+    border-radius: 50%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-weight: 700;
+    font-size: 14px;
+  }
+
+  .influencer-info{
+    width: 100%;
+  }
+
+  .influencer-info h4 {
+    margin: 0 0 4px 0;
+    font-size: 0.9rem;
+    font-weight: 600;
+    width: 100%;
+    color: #2d3748;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+
+  .influencer-info p {
+    margin: 0;
+    font-size: 14px;
+    color: #718096;
+  }
 }
 
 .order-count-badge {
@@ -8259,4 +8381,135 @@ z
   border-radius: 20px;
   font-weight: 700;
   font-size: 16px;
+}
+
+// 신규 주문
+.recent-orders{
+  .recent-order {
+    display: flex;
+    align-items: center;
+    padding: 16px;
+    border: 1px solid #e3f2fd;
+    border-radius: 12px;
+    margin-bottom: 12px;
+    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
+    transition: all 0.3s ease;
+    cursor: pointer;
+    &:last-child{
+      margin-bottom: 0;
+    }
+  }
+
+  .recent-order:hover {
+    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
+    border-color: #1976d2;
+  }
+
+  .order-icon {
+    font-size: 1.8rem;
+    margin-right: 16px;
+  }
+
+  .order-meta {
+    align-items: end;
+    display: flex;
+    gap: 12px;
+  }
+
+  .order-number {
+    background: #1976d2;
+    color: white;
+    padding: 2px 8px;
+    border-radius: 12px;
+    font-size: 0.75rem;
+    font-weight: 500;
+  }
+
+  .influencer-name {
+    color: #666;
+    font-size: 0.9rem;
+  }
+
+  .order-date {
+    font-size: 0.8rem;
+    margin-left: auto;
+    color: #999;
+  }
+}
+
+// 진행중인 공동구매
+.active-items{
+  .active-item {
+    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 100%);
+    border: 1px solid #c8e6c9;
+    border-radius: 16px;
+    padding: 20px;
+    margin-bottom: 12px;
+    display: flex;
+    align-items: center;
+    transition: all 0.3s ease;
+    cursor: pointer;
+    &:last-child{
+      margin: 0;
+    }
+  }
+
+  .active-item:hover {
+    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.2);
+    border-color: #4caf50;
+  }
+
+  .item-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  }
+
+  .item-icon {
+    font-size: 1.8rem;
+  }
+
+  .status-badge {
+    padding: 4px 12px;
+    border-radius: 20px;
+    font-size: 0.75rem;
+    font-weight: 500;
+  }
+
+  .status-badge.active {
+    background: #4caf50;
+    color: white;
+  }
+
+  .item-period {
+    margin: 12px 0;
+    padding: 8px 0;
+    border-top: 1px solid #e0e0e0;
+  }
+
+  .period-label {
+    font-size: 0.8rem;
+    color: #666;
+    display: block;
+    margin-bottom: 4px;
+  }
+
+  .period-dates {
+    font-size: 0.9rem;
+    color: #333;
+    font-weight: 500;
+  }
+
+  .item-stats {
+    margin-top: 8px;
+  }
+
+  .order-count {
+    background: rgba(76, 175, 80, 0.1);
+    color: #2e7d32;
+    padding: 4px 8px;
+    border-radius: 8px;
+    font-size: 0.8rem;
+    font-weight: 500;
+  }
 }

+ 3 - 0
backend/app/Config/Routes.php

@@ -68,6 +68,9 @@ $routes->post('deli/search', 'Deli::deliSearch');
 $routes->post('deli/itemlist', 'Deli::itemlist');
 $routes->post('deli/list', 'Deli::delilist');
 
+// 마이페이지 라우트
+$routes->post('mypage/detail', 'Mypage::myDetail/$1');
+
 // 고객센터 라우트
 $routes->post('cs/list', 'Cs::csList');
 $routes->post('cs/search', 'Cs::csSearch');

+ 2 - 0
backend/app/Controllers/Cs.php

@@ -36,6 +36,7 @@ class Cs extends ResourceController
     {
         $db = \Config\Database::connect();
         $request = \Config\Services::request();
+        date_default_timezone_set('Asia/Seoul');
         $regdate = date('Y-m-d H:i:s');
 
         // 기본 유효성 검사
@@ -136,6 +137,7 @@ class Cs extends ResourceController
     {
         $db = \Config\Database::connect();
         $request = $this->request->getJSON(true);
+        date_default_timezone_set('Asia/Seoul');
         $answerDate = date('Y-m-d H:i:s');
 
         // 기본 유효성 검사

+ 100 - 62
backend/app/Controllers/Dashboard.php

@@ -11,35 +11,48 @@ class Dashboard extends ResourceController
     {
         // 한국 시간으로 설정
         date_default_timezone_set('Asia/Seoul');
-        
+
         $db = \Config\Database::connect();
         $request = $this->request->getJSON(true);
-        
+
         $companyNumber = isset($request['COMPANY_NUMBER']) ? $request['COMPANY_NUMBER'] : null;
         $memberType = isset($request['MEMBER_TYPE']) ? $request['MEMBER_TYPE'] : null;
         $memberSeq = isset($request['MEMBER_SEQ']) ? $request['MEMBER_SEQ'] : null;
-        $limit = isset($request['LIMIT']) ? $request['LIMIT'] : 10;
 
         try {
-            $builder = $db->table('DELI_LIST D')
-                ->select('D.*, I.NAME as ITEM_NAME, I.COMPANY_NUMBER')
+            $limit = isset($request['LIMIT']) ? $request['LIMIT'] : null;
+
+            $builder = $db->table('ITEM_ORDER_LIST D')
+                ->select('D.*, I.NAME as ITEM_NAME, I.COMPANY_NUMBER, I.CONTACT_INF, U.NICK_NAME as INF_NICK_NAME, U.NAME as INF_NAME')
                 ->join('ITEM_LIST I', 'D.ITEM_SEQ = I.SEQ', 'left')
-                ->where('D.DEL_YN', 'N')
-                ->orderBy('D.REGDATE', 'DESC')
-                ->limit($limit);
+                ->join('USER_LIST U', 'I.CONTACT_INF = U.SEQ', 'left')
+                ->where('I.DEL_YN', 'N')
+                ->orderBy('D.REG_DATE', 'DESC');
 
             // 사용자 타입별 필터링
             if ($memberType === 'VENDOR' && !empty($companyNumber)) {
                 $builder->where('I.COMPANY_NUMBER', $companyNumber);
             } elseif ($memberType === 'BRAND' && !empty($memberSeq)) {
                 $builder->where('I.CONTACT_BRD', $memberSeq);
-            } elseif ($memberType === 'INFLUENCER' && !empty($memberSeq)) {
-                $builder->where('I.CONTACT_INF', $memberSeq);
+            }
+//            elseif ($memberType === 'INFLUENCER' && !empty($memberSeq)) {
+//                $builder->where('I.CONTACT_INF', $memberSeq);
+//            }
+
+            // 총 개수 먼저 구하기 (LIMIT 적용 전)
+            $totalCount = $builder->countAllResults(false);
+
+            // LIMIT이 있으면 적용
+            if ($limit) {
+                $builder->limit($limit);
             }
 
             $orders = $builder->get()->getResultArray();
 
-            return $this->respond($orders, 200);
+            return $this->respond([
+                'data' => $orders,
+                'total' => $totalCount
+            ], 200);
         } catch (\Exception $e) {
             return $this->respond([
                 'status' => 'fail',
@@ -51,51 +64,67 @@ class Dashboard extends ResourceController
     // 진행중인 공동구매 리스트 조회
     public function activeItems()
     {
-        // 한국 시간으로 설정
-        date_default_timezone_set('Asia/Seoul');
-        
         $db = \Config\Database::connect();
+
+        // POST JSON 파라미터 받기
         $request = $this->request->getJSON(true);
-        
-        $companyNumber = isset($request['COMPANY_NUMBER']) ? $request['COMPANY_NUMBER'] : null;
+
+        $itemType = isset($request['TYPE']) ? $request['TYPE'] : null;
+        $showYn = isset($request['SHOW_YN']) ? $request['SHOW_YN'] : null;
+        $status = isset($request['STATUS']) ? $request['STATUS'] : null;
         $memberType = isset($request['MEMBER_TYPE']) ? $request['MEMBER_TYPE'] : null;
+        $companyNumber = isset($request['COMPANY_NUMBER']) ? $request['COMPANY_NUMBER'] : null;
         $memberSeq = isset($request['MEMBER_SEQ']) ? $request['MEMBER_SEQ'] : null;
-        $limit = isset($request['LIMIT']) ? $request['LIMIT'] : 10;
+        $count = isset($request['LIMIT']) ? (int)$request['LIMIT'] : null;
 
-        try {
-            $today = date('Y-m-d');
-            
-            $builder = $db->table('ITEM_LIST I')
-                ->select('I.*, COALESCE(V.COMPANY_NAME, B.COMPANY_NAME) as COMPANY_NAME, 
-                         (SELECT COUNT(*) FROM DELI_LIST D WHERE D.ITEM_SEQ = I.SEQ AND D.DEL_YN = "N") as ORDER_COUNT')
-                ->join('VENDOR_LIST V', 'I.COMPANY_NUMBER = V.COMPANY_NUMBER', 'left')
-                ->join('BRAND_LIST B', 'I.COMPANY_NUMBER = B.COMPANY_NUMBER', 'left')
-                ->where('I.DEL_YN', 'N')
-                ->where('I.STATUS', 0) // 진행중
-                ->where('I.SHOW_YN', 'Y')
-                ->where('I.TYPE', 'GROUP_BUY') // 공동구매만
-                ->where('I.ORDER_END_DATE >=', $today) // 마감일이 지나지 않은 것만
-                ->orderBy('I.ORDER_END_DATE', 'ASC')
-                ->limit($limit);
+        // 쿼리 빌더 (VENDOR_LIST, BRAND_LIST 조인 추가)
+        $builder = $db->table('ITEM_LIST I')
+            ->select('I.*, COALESCE(V.COMPANY_NAME, B.COMPANY_NAME) as COMPANY_NAME')
+            ->join('VENDOR_LIST V', 'I.COMPANY_NUMBER = V.COMPANY_NUMBER', 'left')
+            ->join('BRAND_LIST B', 'I.COMPANY_NUMBER = B.COMPANY_NUMBER', 'left')
+            ->where('I.DEL_YN', 'N');
 
-            // 사용자 타입별 필터링
-            if ($memberType === 'VENDOR' && !empty($companyNumber)) {
+        // 노출중, 비노출 여부 확인
+        $builder->where('I.SHOW_YN', $showYn);
+        $builder->where('I.TYPE', $itemType);
+
+        // 사용자 타입별 필터링
+        if ($memberType === 'INFLUENCER' && !empty($memberSeq)) {
+            // 인플루언서의 경우: 공동구매 담당 제품만
+            $builder->where('I.CONTACT_INF', $memberSeq);
+        } else {
+            if($memberType === 'VENDOR'){
+                // 벤더사의 경우: 자사 제품만 조회
                 $builder->where('I.COMPANY_NUMBER', $companyNumber);
-            } elseif ($memberType === 'BRAND' && !empty($memberSeq)) {
-                $builder->where('I.CONTACT_BRD', $memberSeq);
-            } elseif ($memberType === 'INFLUENCER' && !empty($memberSeq)) {
-                $builder->where('I.CONTACT_INF', $memberSeq);
+            } else {
+                $builder->groupStart()
+                    ->where('I.COMPANY_NUMBER', $companyNumber)
+                    ->orWhere('I.CONTACT_BRD', $memberSeq)
+                    ->groupEnd();
             }
+        }
 
-            $items = $builder->get()->getResultArray();
+        if($status !== null) {
+            $builder->where('I.STATUS', $status);
+        }
 
-            return $this->respond($items, 200);
-        } catch (\Exception $e) {
-            return $this->respond([
-                'status' => 'fail',
-                'message' => 'DB 오류: ' . $e->getMessage()
-            ], 500);
+        // 업데이트 날짜 기준으로 정렬
+        $builder->orderBy('I.REGDATE', 'DESC');
+
+        // 총 개수 먼저 구하기 (LIMIT 적용 전)
+        $totalCount = $builder->countAllResults(false);
+
+        // 대시보드 - 진행중인 공동구매의 경우 limit 설정
+        if ($count !== null && $count > 0) {
+            $builder->limit($count);
         }
+
+        $lists = $builder->get()->getResultArray();
+
+        return $this->respond([
+            'data' => $lists,
+            'total' => $totalCount
+        ], 200);
     }
 
     // 인플루언서별 판매된 주문 건수 통계
@@ -103,26 +132,24 @@ class Dashboard extends ResourceController
     {
         // 한국 시간으로 설정
         date_default_timezone_set('Asia/Seoul');
-        
+
         $db = \Config\Database::connect();
         $request = $this->request->getJSON(true);
-        
+
         $companyNumber = isset($request['COMPANY_NUMBER']) ? $request['COMPANY_NUMBER'] : null;
         $memberType = isset($request['MEMBER_TYPE']) ? $request['MEMBER_TYPE'] : null;
         $memberSeq = isset($request['MEMBER_SEQ']) ? $request['MEMBER_SEQ'] : null;
         $limit = isset($request['LIMIT']) ? $request['LIMIT'] : 10;
 
         try {
-            $builder = $db->table('DELI_LIST D')
+            $builder = $db->table('ITEM_ORDER_LIST D')
                 ->select('I.CONTACT_INF as INF_SEQ, INF.NICK_NAME as INF_NAME, COUNT(D.SEQ) as ORDER_COUNT')
                 ->join('ITEM_LIST I', 'D.ITEM_SEQ = I.SEQ', 'inner')
-                ->join('INFLUENCER_LIST INF', 'I.CONTACT_INF = INF.SEQ', 'left')
-                ->where('D.DEL_YN', 'N')
+                ->join('USER_LIST INF', 'I.CONTACT_INF = INF.SEQ', 'left')
                 ->where('I.DEL_YN', 'N')
                 ->where('I.CONTACT_INF >', 0) // 인플루언서가 배정된 항목만
                 ->groupBy('I.CONTACT_INF, INF.NICK_NAME')
-                ->orderBy('ORDER_COUNT', 'DESC')
-                ->limit($limit);
+                ->orderBy('ORDER_COUNT', 'DESC');
 
             // 사용자 타입별 필터링
             if ($memberType === 'VENDOR' && !empty($companyNumber)) {
@@ -131,9 +158,20 @@ class Dashboard extends ResourceController
                 $builder->where('I.CONTACT_BRD', $memberSeq);
             }
 
+            // 총 개수 먼저 구하기 (LIMIT 적용 전)
+            $totalCount = $builder->countAllResults(false);
+
+            // LIMIT이 있으면 적용
+            if ($limit) {
+                $builder->limit($limit);
+            }
+
             $stats = $builder->get()->getResultArray();
 
-            return $this->respond($stats, 200);
+            return $this->respond([
+                'data' => $stats,
+                'total' => $totalCount
+            ], 200);
         } catch (\Exception $e) {
             return $this->respond([
                 'status' => 'fail',
@@ -147,10 +185,10 @@ class Dashboard extends ResourceController
     {
         // 한국 시간으로 설정
         date_default_timezone_set('Asia/Seoul');
-        
+
         $db = \Config\Database::connect();
         $request = $this->request->getJSON(true);
-        
+
         $companyNumber = isset($request['COMPANY_NUMBER']) ? $request['COMPANY_NUMBER'] : null;
         $memberType = isset($request['MEMBER_TYPE']) ? $request['MEMBER_TYPE'] : null;
         $memberSeq = isset($request['MEMBER_SEQ']) ? $request['MEMBER_SEQ'] : null;
@@ -161,7 +199,7 @@ class Dashboard extends ResourceController
 
             // 기본 조건 설정
             $whereConditions = ['I.DEL_YN' => 'N'];
-            
+
             if ($memberType === 'VENDOR' && !empty($companyNumber)) {
                 $whereConditions['I.COMPANY_NUMBER'] = $companyNumber;
             } elseif ($memberType === 'BRAND' && !empty($memberSeq)) {
@@ -171,9 +209,9 @@ class Dashboard extends ResourceController
             }
 
             // 최근 7일 주문 수
-            $recentOrdersCount = $db->table('DELI_LIST D')
+            $recentOrdersCount = $db->table('ITEM_ORDER_LIST D')
                 ->join('ITEM_LIST I', 'D.ITEM_SEQ = I.SEQ', 'inner')
-                ->where('D.DEL_YN', 'N')
+                ->where('I.DEL_YN', 'N')
                 ->where('D.REGDATE >=', $weekAgo . ' 00:00:00')
                 ->where($whereConditions)
                 ->countAllResults();
@@ -188,17 +226,17 @@ class Dashboard extends ResourceController
                 ->countAllResults();
 
             // 총 주문 건수
-            $totalSalesCount = $db->table('DELI_LIST D')
+            $totalSalesCount = $db->table('ITEM_ORDER_LIST D')
                 ->join('ITEM_LIST I', 'D.ITEM_SEQ = I.SEQ', 'inner')
-                ->where('D.DEL_YN', 'N')
+                ->where('I.DEL_YN', 'N')
                 ->where($whereConditions)
                 ->countAllResults();
 
             // 활성 인플루언서 수 (주문이 있는 인플루언서)
-            $activeInfluencersCount = $db->table('DELI_LIST D')
+            $activeInfluencersCount = $db->table('ITEM_ORDER_LIST D')
                 ->select('I.CONTACT_INF')
                 ->join('ITEM_LIST I', 'D.ITEM_SEQ = I.SEQ', 'inner')
-                ->where('D.DEL_YN', 'N')
+                ->where('I.DEL_YN', 'N')
                 ->where('I.CONTACT_INF >', 0)
                 ->where($whereConditions)
                 ->distinct()

+ 18 - 16
backend/app/Controllers/Deli.php

@@ -54,11 +54,12 @@ class Deli extends ResourceController
     {
         // 한국 시간으로 설정
         date_default_timezone_set('Asia/Seoul');
-        
+
         $db = \Config\Database::connect();
         $request = $this->request->getJSON(true);
 
         $itemSeq = isset($request['item_seq']) ? $request['item_seq'] : null;
+        $infSeq = isset($request['inf_seq']) ? $request['inf_seq'] : null;
         $orderList = $request['orderList'] ?? [];
 
         if (!$itemSeq) {
@@ -73,7 +74,7 @@ class Deli extends ResourceController
                 $deletedCount = $db->table('ITEM_ORDER_LIST')
                     ->where('ITEM_SEQ', $itemSeq)
                     ->delete();
-                
+
                 $db->transCommit();
                 return $this->respond([
                     'message' => '주문 내역이 성공적으로 처리되었습니다.',
@@ -96,13 +97,13 @@ class Deli extends ResourceController
                 break;
             }
         }
-        
+
         // 유효한 데이터가 없으면 기존 데이터와 비교해서 변경사항 확인
         if (!$hasValidData) {
             $existingCount = $db->table('ITEM_ORDER_LIST')
                 ->where('ITEM_SEQ', $itemSeq)
                 ->countAllResults();
-            
+
             // 기존 데이터도 없고 새로운 유효 데이터도 없으면 변경사항 없음
             if ($existingCount == 0) {
                 return $this->respond([
@@ -121,7 +122,7 @@ class Deli extends ResourceController
             if (empty($order['ORDER_NUMB']) && empty($order['BUYER_NAME'])) {
                 continue;
             }
-            
+
             $requiredFields = ['ORDER_NUMB', 'BUYER_NAME'];
             foreach ($requiredFields as $field) {
                 if (!isset($order[$field]) || $order[$field] === '') {
@@ -141,7 +142,7 @@ class Deli extends ResourceController
             $existingOrders = $db->table('ITEM_ORDER_LIST')
                 ->where('ITEM_SEQ', $itemSeq)
                 ->get()->getResultArray();
-            
+
             // 2. 현재 전송된 데이터 목록에서 ORDER_NUMB + BUYER_NAME 조합 추출
             $currentOrderKeys = [];
             foreach ($orderList as $order) {
@@ -149,7 +150,7 @@ class Deli extends ResourceController
                     $currentOrderKeys[] = $order['ORDER_NUMB'] . '_' . $order['BUYER_NAME'];
                 }
             }
-            
+
             // 3. 기존 데이터 중 현재 목록에 없는 항목들 삭제
             foreach ($existingOrders as $existingOrder) {
                 $existingKey = $existingOrder['ORDER_NUMB'] . '_' . $existingOrder['BUYER_NAME'];
@@ -157,13 +158,13 @@ class Deli extends ResourceController
                     $deleteResult = $db->table('ITEM_ORDER_LIST')
                         ->where('SEQ', $existingOrder['SEQ'])
                         ->delete();
-                    
+
                     if ($deleteResult) {
                         $deletedCount++;
                     }
                 }
             }
-            
+
             // 4. 업데이트 또는 신규 추가 처리
             foreach ($orderList as $order) {
                 $metadata = $order['_metadata'] ?? [];
@@ -177,7 +178,7 @@ class Deli extends ResourceController
                         ->where('ORDER_NUMB', $order['ORDER_NUMB'])
                         ->where('BUYER_NAME', $order['BUYER_NAME'])
                         ->get()->getRowArray();
-                    
+
                     if ($existingRecord) {
                         $isUpdated = true;
                     } else {
@@ -193,11 +194,11 @@ class Deli extends ResourceController
                         ->where('ORDER_NUMB', $order['ORDER_NUMB'])
                         ->where('BUYER_NAME', $order['BUYER_NAME'])
                         ->get()->getRowArray();
-                    
+
                     if ($existingRecord) {
                         $updateData = [];
                         $hasChanges = false;
-                        
+
                         // 각 필드별로 변경사항 확인
                         if (($existingRecord['PHONE'] ?? '') !== ($order['PHONE'] ?? '')) {
                             $updateData['PHONE'] = $order['PHONE'] ?? '';
@@ -215,11 +216,11 @@ class Deli extends ResourceController
                             $updateData['DELI_NUMB'] = $order['DELI_NUMB'] ?? '';
                             $hasChanges = true;
                         }
-                        
+
                         // 실제 변경사항이 있을 때만 UPDATE_DATE 갱신
                         if ($hasChanges) {
                             $updateData['UPDATE_DATE'] = date('Y-m-d H:i:s');
-                            
+
                             $result = $db->table('ITEM_ORDER_LIST')
                                 ->where('ITEM_SEQ', $itemSeq)
                                 ->where('ORDER_NUMB', $order['ORDER_NUMB'])
@@ -239,7 +240,7 @@ class Deli extends ResourceController
                     }
 
                 }
-                
+
                 if ($isNew) {
                     // 신규 데이터 추가
                     $insertData = [
@@ -248,6 +249,7 @@ class Deli extends ResourceController
                         'BUYER_NAME' => $order['BUYER_NAME'],
                         'PHONE' => $order['PHONE'] ?? '',
                         'QTY' => $order['QTY'] ?? 0,
+                        'INF_SEQ' => $infSeq,
                         'DELI_COMP' => $order['DELI_COMP'] ?? '',
                         'DELI_NUMB' => $order['DELI_NUMB'] ?? '',
                         'REG_DATE' => $metadata['originalCreatedAt'] ?? date('Y-m-d H:i:s'),
@@ -269,7 +271,7 @@ class Deli extends ResourceController
                 $db->transRollback();
                 return $this->fail(implode(' | ', $errors), 400);
             }
-            
+
             if ($updatedCount > 0 || $newCount > 0 || $deletedCount > 0) {
                 $db->transCommit();
                 return $this->respond([

+ 7 - 1
backend/app/Controllers/Item.php

@@ -56,6 +56,9 @@ class Item extends ResourceController
         // 업데이트 날짜 기준으로 정렬
         $builder->orderBy('I.REGDATE', 'DESC');
 
+        // 총 개수 먼저 구하기 (LIMIT 적용 전)
+        $totalCount = $builder->countAllResults(false);
+        
         // 대시보드 - 진행중인 공동구매의 경우 limit 설정
         if ($count !== null && $count > 0) {
             $builder->limit($count);
@@ -63,7 +66,10 @@ class Item extends ResourceController
         
         $lists = $builder->get()->getResultArray();
 
-        return $this->respond($lists, 200);
+        return $this->respond([
+            'data' => $lists,
+            'total' => $totalCount
+        ], 200);
     }
 
     //아이템 검색

+ 87 - 0
backend/app/Controllers/Mypage.php

@@ -0,0 +1,87 @@
+<?php
+
+namespace App\Controllers;
+
+use CodeIgniter\RESTful\ResourceController;
+use App\Libraries\JwtLib\JWT;
+use App\Libraries\JwtLib\Key;
+use App\Models\LoginModel;
+
+class Mypage extends ResourceController
+{
+    // 사용자 상세 정보 조회
+    public function myDetail()
+    {
+        // 한국 시간으로 설정
+        date_default_timezone_set('Asia/Seoul');
+
+        $db = \Config\Database::connect();
+        $memberType = isset($request['MEMBER_TYPE']) ? $request['MEMBER_TYPE'] : null;
+        $memberSeq = isset($request['MEMBER_SEQ']) ? $request['MEMBER_SEQ'] : null;
+
+        try {
+            // 멤버 타입에 따라 다른 테이블에서 조회
+            switch ($memberType) {
+                case 'INFLUENCER':
+                case 'I':
+                    $userInfo = $db->table('USER_LIST')
+                        ->where('SEQ', $memberSeq)
+                        ->get()
+                        ->getRowArray();
+                    break;
+
+                case 'VENDOR':
+                case 'V':
+                    $userInfo = $db->table('VENDOR_LIST')
+                        ->where('SEQ', $memberSeq)
+                        ->get()
+                        ->getRowArray();
+                    break;
+
+                case 'BRAND':
+                case 'B':
+                    $userInfo = $db->table('BRAND_LIST')
+                        ->where('SEQ', $memberSeq)
+                        ->get()
+                        ->getRowArray();
+                    break;
+
+                default:
+                    return $this->respond([
+                        'status' => 'fail',
+                        'message' => '알 수 없는 회원 타입입니다.'
+                    ], 400);
+            }
+
+            if (!$userInfo) {
+                return $this->respond([
+                    'status' => 'fail',
+                    'message' => '사용자 정보를 찾을 수 없습니다.'
+                ], 404);
+            }
+
+            // MEMBER_TYPE 정규화 (I -> INFLUENCER 등)
+            if (isset($userInfo['MEMBER_TYPE'])) {
+                switch ($userInfo['MEMBER_TYPE']) {
+                    case 'I':
+                        $userInfo['MEMBER_TYPE'] = 'INFLUENCER';
+                        break;
+                    case 'V':
+                        $userInfo['MEMBER_TYPE'] = 'VENDOR';
+                        break;
+                    case 'B':
+                        $userInfo['MEMBER_TYPE'] = 'BRAND';
+                        break;
+                }
+            }
+
+            return $this->respond($userInfo, 200);
+
+        } catch (\Exception $e) {
+            return $this->respond([
+                'status' => 'fail',
+                'message' => 'DB 오류: ' . $e->getMessage()
+            ], 500);
+        }
+    }
+}

+ 15 - 24
components/common/header.vue

@@ -1,7 +1,9 @@
 <template>
   <header class="new--header">
     <div class="pro--wrap">
-      <div class="pro--img"></div>
+      <div class="pro--img">
+        {{ memberTypeText === '인플루언서' ? '❤️' : '💜' }}
+      </div>
       <div class="pro--id" @click="proOn ? (proOn = false) : (proOn = true)">
         {{ userName }}
         <i class="ico" :class="[proOn ? 'on' : '']">></i>
@@ -88,9 +90,16 @@
     const snsUser = useStoreAuth.getSnsTempData?.user;
     const authUser = JSON.parse(localStorage.getItem("authStore"))?.auth;
     const currentUser = snsUser || authUser;
-    let memberType = currentUser?.memberType || currentUser?.MEMBER_TYPE;
-    if (memberType === 'I'){
-      userName.value = currentUser?.NICK_NAME || currentUser?.name
+    
+    let memberType = authUser?.memberType || currentUser?.memberType || currentUser?.MEMBER_TYPE;
+    
+    // MEMBER_TYPE이 'I'인 경우 'INFLUENCER'로 변환
+    if (memberType === 'I') {
+      memberType = 'INFLUENCER';
+    }
+    //console.error(currentUser)
+    if (memberType === 'INFLUENCER'){
+      userName.value = currentUser?.NICK_NAME || currentUser?.NAME;
     } else {
       userName.value =  currentUser?.companyName;
     }
@@ -118,7 +127,7 @@
     console.log("현재 경로:", route.path);
     console.log("COMPANY_NUMBER:", currentUser?.COMPANY_NUMBER);
 
-    if (memberType === "I") {
+    if (memberType === "INFLUENCER") {
       // 인플루언서 메뉴
       memberTypeText.value = "인플루언서";
       info.push(
@@ -182,7 +191,7 @@
         {
           menuId: "menu00",
           parentMenuId: "menu00",
-          menuName: "주문 관리",
+          menuName: "대시보드",
           linkType: "/view/common/dashboard",
         },
         {
@@ -392,24 +401,6 @@
     border-bottom: 1px solid rgba(255, 255, 255, 0.2);
   }
 
-  .pro--img {
-    width: 40px;
-    height: 40px;
-    border-radius: 50%;
-    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    margin-right: 12px;
-    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
-  }
-
-  /* .pro--img::before {
-    content: "👤";
-    color: white;
-    font-size: 18px;
-  } */
-
   .pro--id {
     position: relative;
     color: #374151;

+ 62 - 377
pages/view/common/dashboard/index.vue

@@ -22,8 +22,8 @@
             <i class="mdi mdi-cart"></i>
           </div>
           <div class="stat-info">
-            <h3>{{ recentOrdersCount }}</h3>
-            <p>최근 주문 (7일)</p>
+            <h3>{{ recentOrdersTotal }}</h3>
+            <p>신규 주문</p>
           </div>
         </div>
         <div class="stat-card">
@@ -35,7 +35,7 @@
             <p>진행중인 공동구매</p>
           </div>
         </div>
-        <div class="stat-card">
+        <!-- <div class="stat-card">
           <div class="stat-icon sales">
             <i class="mdi mdi-trending-up"></i>
           </div>
@@ -43,7 +43,7 @@
             <h3>{{ totalSalesCount }}</h3>
             <p>총 주문 건수</p>
           </div>
-        </div>
+        </div> -->
         <div class="stat-card">
           <div class="stat-icon influencers">
             <i class="mdi mdi-account-group"></i>
@@ -62,7 +62,7 @@
         <!-- 최근 주문 현황 카드 -->
         <div class="dashboard-card recent-orders">
           <div class="card-header">
-            <h3>최근 들어온 주문</h3>
+            <h3>신규 주문 <span class="limit-badge">*최근 10건까지</span></h3>
             <i class="mdi mdi-cart-outline"></i>
           </div>
           <div class="card-content">
@@ -71,23 +71,25 @@
                 <div 
                   v-for="order in recentOrders" 
                   :key="order.SEQ" 
-                  class="order-item"
+                  class="order-item recent-order"
                   @click="goToOrderDetail(order.ITEM_SEQ)"
                 >
-                  <div class="order-info">
-                    <h4>{{ order.ORDER_NUMB }}</h4>
-                    <p class="buyer-name">{{ order.BUYER_NAME }}</p>
-                    <p class="order-date">{{ formatDateTime(order.REGDATE) }}</p>
+                  <div class="order-icon">
+                    🛒
                   </div>
-                  <div class="order-details">
-                    <span class="quantity">{{ order.QTY }}개</span>
-                    <span class="status-badge active">신규</span>
+                  <div class="item-info">
+                    <h4>{{ order.ITEM_NAME }}</h4>
+                    <div class="order-meta">
+                      <span class="order-number">#{{ order.ORDER_NUMB }}</span>
+                      <span class="influencer-name">{{ order.INF_NICK_NAME || order.INF_NAME }}</span>
+                      <div class="order-date">{{ formatDateTime(order.UPDATE_DATE) }}</div>
+                    </div>
                   </div>
                 </div>
               </div>
               <div v-else class="no-orders">
                 <i class="mdi mdi-cart-off"></i>
-                <p>최근 주문이 없습니다</p>
+                <p>신규 주문이 없습니다</p>
               </div>
             </div>
             <div class="view-all">
@@ -99,7 +101,7 @@
         <!-- 진행중인 공동구매 카드 -->
         <div class="dashboard-card active-items">
           <div class="card-header">
-            <h3>진행중인 공동구매</h3>
+            <h3>진행중인 공동구매<span class="limit-badge">*최근 5건까지</span></h3>
             <i class="mdi mdi-package-variant-closed"></i>
           </div>
           <div class="card-content">
@@ -108,19 +110,18 @@
                 <div 
                   v-for="item in activeItems" 
                   :key="item.SEQ" 
-                  class="item-card"
+                  class="item-card active-item"
                   @click="goToItemDetail(item.SEQ)"
                 >
+                  <div class="item-header">
+                    <div class="item-icon">📦</div>
+                  </div>
                   <div class="item-info">
                     <h4>{{ item.NAME }}</h4>
-                    <p class="company-name">{{ item.COMPANY_NAME }}</p>
-                    <div class="item-dates">
-                      <span class="end-date">기간: {{ formatDate(item.ORDER_START_DATE) }} ~ {{ formatDate(item.ORDER_END_DATE) }}</span>
+                    <div class="item-stats">
+                      <span class="order-count">{{ formatDate(item.ORDER_START_DATE) }} ~ {{ formatDate(item.ORDER_END_DATE) }}</span>
                     </div>
                   </div>
-                  <div class="item-stats">
-                    <div class="order-count">주문: {{ item.ORDER_COUNT || 0 }}건</div>
-                  </div>
                 </div>
               </div>
               <div v-else class="no-items">
@@ -137,115 +138,46 @@
         <!-- 인플루언서별 판매 통계 카드 -->
         <div class="dashboard-card influencer-stats">
           <div class="card-header">
-            <h3>인플루언서별 주문 건수</h3>
+            <h3>인플루언서별 주문 건수<span class="limit-badge">*상위 6명까지</span></h3>
             <i class="mdi mdi-account-star"></i>
           </div>
           <div class="card-content">
             <div class="influencer-list">
-              <div v-if="influencerStats.length > 0">
+              <div v-if="influencerStats.length > 0" class="influencer-cards">
                 <div 
                   v-for="(stat, index) in influencerStats" 
                   :key="stat.INF_SEQ" 
-                  class="influencer-item"
+                  class="influencer-card"
                 >
-                  <div class="rank">{{ index + 1 }}</div>
+                  <div class="rank-badge">{{ index + 1 }}</div>
+                  <div class="user-avatar">
+                    🤝
+                  </div>
                   <div class="influencer-info">
                     <h4>{{ stat.INF_NAME || '인플루언서' + stat.INF_SEQ }}</h4>
-                    <p>{{ stat.ORDER_COUNT }}건의 주문</p>
-                  </div>
-                  <div class="order-count-badge">
-                    {{ stat.ORDER_COUNT }}
+                    <div class="order-count white">
+                      <span class="count">{{ stat.ORDER_COUNT }}</span>
+                      <span class="label">건</span>
+                    </div>
                   </div>
                 </div>
               </div>
               <div v-else class="no-stats">
                 <i class="mdi mdi-chart-line"></i>
-                <p>통계 데이터가 없습니다</p>
+                <p>인플루언서 정보가 없습니다.</p>
+              </div>
+              <div class="view-all">
+                <v-btn variant="text" class="custom-btn btn-white" @click="showComingSoon()">전체 보기</v-btn>
               </div>
             </div>
           </div>
         </div>
       </div>
     </div>
-
-    <!-- 문의 등록 팝업 -->
-    <v-dialog v-model="showInquiryModal" max-width="600px" persistent>
-      <v-card class="inquiry-modal">
-        <v-card-title class="modal-header">
-          <h3>문의 등록</h3>
-          <v-btn icon @click="closeModal" class="close-btn">
-            <v-icon>mdi-close</v-icon>
-          </v-btn>
-        </v-card-title>
-
-        <v-card-text class="modal-body">
-          <form @submit.prevent="submitInquiry">
-            <div class="form-group">
-              <label>문의 유형 <span class="required">*</span></label>
-              <v-select
-                v-model="inquiryForm.category"
-                :items="categoryOptions"
-                variant="outlined"
-                placeholder="문의 유형을 선택하세요"
-                class="custom-select"
-                :rules="[v => !!v || '문의 유형을 선택해주세요']"
-              ></v-select>
-            </div>
-
-            <div class="form-group">
-              <label>제목 <span class="required">*</span></label>
-              <v-text-field
-                v-model="inquiryForm.title"
-                variant="outlined"
-                placeholder="문의 제목을 입력하세요"
-                class="custom-input"
-                :rules="[v => !!v || '제목을 입력해주세요']"
-              ></v-text-field>
-            </div>
-
-            <div class="form-group">
-              <label>내용 <span class="required">*</span></label>
-              <v-textarea
-                v-model="inquiryForm.content"
-                variant="outlined"
-                placeholder="문의 내용을 상세히 입력해주세요"
-                rows="6"
-                class="custom-textarea"
-                :rules="[v => !!v || '내용을 입력해주세요']"
-              ></v-textarea>
-            </div>
-
-            <div class="form-group">
-              <label>첨부파일</label>
-              <v-file-input
-                v-model="inquiryForm.attachments"
-                variant="outlined"
-                placeholder="파일을 선택하세요"
-                hide-details=""
-                prepend-icon=""
-                append-inner-icon="mdi-paperclip"
-                class="custom-file-input mb--30"
-                accept="image/*,.pdf,.doc,.docx,.hwp"
-                multiple
-                show-size
-              ></v-file-input>
-              <p class="file-info">* 이미지, PDF, 문서 파일만 업로드 가능 (최대 10MB)</p>
-            </div>
-          </form>
-        </v-card-text>
-
-        <v-card-actions class="modal-footer">
-          <v-btn @click="closeModal" class="cancel-btn">취소</v-btn>
-          <v-btn @click="submitInquiry" class="submit-btn" :loading="isSubmitting">등록하기</v-btn>
-        </v-card-actions>
-      </v-card>
-    </v-dialog>
   </div>
 </template>
 
 <script setup>
-import "@vuepic/vue-datepicker/dist/main.css";
-import dayjs from 'dayjs';
   /************************************************************************
 |    레이아웃
 ************************************************************************/
@@ -270,32 +202,12 @@ import dayjs from 'dayjs';
 |    전역
  ************************************************************************/
   const memberType = useAtStore.auth.memberType;
-  const searchModel = ref("");
-  const selectedRange = ref('all');
-  const searchStartDate = ref("");
-  const searchEndDate = ref("");
-  const dateOptions = [
-    { label: '오늘', value: 'today' },
-    { label: '7일', value: '7d' },
-    { label: '1개월', value: '1m' },
-    { label: '3개월', value: '3m' },
-    { label: '전체', value: 'all' },
-  ]
-  const datePickerFormat = "yyyy-MM-dd";
-  const filter = ref("");
-  const filderArr = ref([
-    { title: "전체", value: "" },
-    { title: "제목", value: "title" },
-    { title: "내용", value: "content" },
-    { title: "작성자", value: "writer" }
-  ]);
   const { $toast, $log, $dayjs, $eventBus } = useNuxtApp();
   const router = useRouter();
-  const pageId = computed(() => {
-    return '대시보드';
-  });
-  const csList = ref([]);
+  const activeItemsCount = ref(0);
+  const activeInfluencersCount = ref(0);
   const recentOrders = ref([]);
+  const recentOrdersTotal = ref(0);
   const activeItems = ref([]);
   const influencerStats = ref([]);
   
@@ -303,32 +215,12 @@ import dayjs from 'dayjs';
   const completedInquiries = computed(() => {
     return csList.value.filter(item => item.STATUS === '1').length;
   });
-  
-  const recentInquiries = computed(() => {
-    return csList.value.slice(0, 3);
-  });
-
-  // 새로운 대시보드 통계
-  const recentOrdersCount = computed(() => {
-    const weekAgo = new Date();
-    weekAgo.setDate(weekAgo.getDate() - 7);
-    return recentOrders.value.filter(order => 
-      new Date(order.REGDATE) >= weekAgo
-    ).length;
-  });
-
-  const activeItemsCount = computed(() => {
-    return activeItems.value.length;
-  });
 
+  
   const totalSalesCount = computed(() => {
     return recentOrders.value.length;
   });
 
-  const activeInfluencersCount = computed(() => {
-    return influencerStats.value.filter(stat => stat.ORDER_COUNT > 0).length;
-  });
-
   // 문의 등록 팝업 관련
   const showInquiryModal = ref(false);
   const isSubmitting = ref(false);
@@ -357,11 +249,12 @@ import dayjs from 'dayjs';
         COMPANY_NUMBER: useAtStore.auth.companyNumber,
         MEMBER_TYPE: useAtStore.auth.memberType,
         MEMBER_SEQ: useAtStore.auth.seq,
-        LIMIT: 5
+        LIMIT: 10,
       };
       
       const response = await useAxios().post('/dashboard/recentOrders', _req);
-      recentOrders.value = response.data;
+      recentOrders.value = response.data.data || response.data; // 하위호환성
+      recentOrdersTotal.value = response.data.total || 0;
     } catch (error) {
       console.error('최근 주문 로드 실패:', error);
     }
@@ -377,12 +270,11 @@ import dayjs from 'dayjs';
         MEMBER_SEQ: useAtStore.auth.seq,
         STATUS: 0,
         COMPANY_NUMBER: useAtStore.auth.companyNumber,
-        COUNT: 5,
+        LIMIT: 5,
       };
-      console.warn(_req)
-      const response = await useAxios().post('/item/list', _req);
-      console.error(response)
-      activeItems.value = response.data;
+      const response = await useAxios().post('/dashboard/activeItems', _req);
+      activeItems.value = response.data.data || response.data; // 하위호환성
+      activeItemsCount.value = response.data.total || activeItems.value.length;
     } catch (error) {
       console.error('진행중인 공동구매 로드 실패:', error);
     }
@@ -394,13 +286,14 @@ import dayjs from 'dayjs';
         COMPANY_NUMBER: useAtStore.auth.companyNumber,
         MEMBER_TYPE: useAtStore.auth.memberType,
         MEMBER_SEQ: useAtStore.auth.seq,
-        LIMIT: 5
+        LIMIT: 6,
       };
       
       const response = await useAxios().post('/dashboard/influencerStats', _req);
-      influencerStats.value = response.data;
+      influencerStats.value = response.data.data || response.data; // 하위호환성
+      activeInfluencersCount.value = response.data.total || 0;
     } catch (error) {
-      console.error('인플루언서 통계 로드 실패:', error);
+      //console.error('인플루언서 통계 로드 실패:', error);
     }
   };
 
@@ -409,62 +302,8 @@ import dayjs from 'dayjs';
       loadRecentOrders(),
       loadActiveItems(),
       loadInfluencerStats(),
-      csListGet()
     ]);
   };
-
-  const isRecentUpdate = (dateStr) => {
-    const today = new Date();
-    const updateDate = new Date(dateStr);
-    const diffDays = (today - updateDate) / (1000 * 60 * 60 * 24);
-    // 업데이트 날짜가 오늘 날짜 기준 최근 7일인지 확인
-    return diffDays <= 7;
-  }
-
-  const paginatedItems = computed(() => {
-    const start = (currentPage.value - 1) * itemsPerPage;
-    return csList.value.slice(start, start + itemsPerPage);
-  });
-
-  const setDateRange = (range) => {
-    const today = dayjs();
-
-    switch(range) {
-      case 'today' :
-        searchStartDate.value = today.format('YYYY-MM-DD');
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = 'today';
-        break;
-      case '7d':
-        searchStartDate.value = today.subtract(7, 'day').format('YYYY-MM-DD');
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = '7d';
-        break;
-      case '1m':
-        searchStartDate.value = today.subtract(1, 'month').format('YYYY-MM-DD');
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = '1m';
-        break;
-      case '3m':
-        searchStartDate.value = today.subtract(3, 'month').format('YYYY-MM-DD');
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = '3m';
-        break;
-      case 'all':
-        searchStartDate.value = "";
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = 'all';
-        break
-    }
-  }
-
-  const addLocated = () => {
-    showInquiryModal.value = true;
-  };
-  
-  const goToCS = () => {
-    router.push('/view/common/cs');
-  };
   
   const goToItems = () => {
     router.push('/view/common/item');
@@ -490,90 +329,6 @@ import dayjs from 'dayjs';
       query: { itemId: itemSeq }
     });
   };
-  
-  const goToProfile = () => {
-    $toast.info('프로필 수정 기능은 준비중입니다.');
-  };
-
-  const toItemDetail = (__EVENT) => {
-    router.push({
-      path: "/view/common/cs/detail",
-    });
-    useDtStore.boardInfo.seq = __EVENT;
-  };
-
-  const csListGet = async () => {
-    let _req = {
-      USER_SEQ : useAtStore.auth.seq,
-      keyword: '',
-      filter: '',
-      startDate: '',
-      endDate: ''
-    };
-    if(useAtStore.auth.seq == 2){
-      _req.USER_SEQ = 0;
-    }
-
-    await useAxios()
-      .post("/cs/list", _req)
-      .then((res) => {
-        csList.value = res.data;
-      });
-  };
-
-  const fnSearch = (__KEYWORD, __FILTER) => {
-    let _req = {
-      USER_SEQ: useAtStore.auth.seq,
-      filter: __FILTER,
-      keyword: __KEYWORD,
-      startDate: searchStartDate.value ? dayjs(searchStartDate.value).format('YYYY-MM-DD') : '',
-      endDate: searchEndDate.value ? dayjs(searchEndDate.value).format('YYYY-MM-DD') : ''
-    };
-
-    // 관리자인 경우 모든 문의 조회
-    if(useAtStore.auth.seq == 2){
-      _req.USER_SEQ = 0;
-    }
-
-    useAxios()
-      .post("/cs/search", _req)
-      .then((res) => {
-        csList.value = res.data;
-        currentPage.value = 1; // 검색 후 첫 페이지로 이동
-      })
-      .catch((error) => {
-        console.error('검색 실패:', error);
-        $toast.error('검색에 실패했습니다.');
-      });
-  };
-
-
-  const goToDeliveryDetail = (item) => {
-    // 제품 정보를 스토어에 저장
-    useDtStore.boardInfo.seq = item.SEQ;
-    useDtStore.boardInfo.pageType = "D";
-    
-    // 배송 관리 페이지로 이동
-    router.push({
-      path: "/view/common/deli/detail",
-      query: {
-        itemId: item.SEQ,
-        itemName: item.NAME,
-        price1: item.PRICE1,
-        price2: item.PRICE2 || item.PRICE1,
-        thumbFile: item.THUMB_FILE || ''
-      }
-    });
-  };
-
-  const getStatusClass = (status) => {
-    switch(status) {
-      case '0':
-        return 'status-waiting';
-      case '1':
-        return 'status-completed';
-    }
-  };
 
   const formatDate = (dateStr) => {
     if (!dateStr) return '';
@@ -594,82 +349,16 @@ import dayjs from 'dayjs';
     return `${month}.${day} ${hours}:${minutes}`;
   };
 
-  const getDaysRemaining = (endDate) => {
-    if (!endDate) return 0;
-    const end = new Date(endDate);
-    const now = new Date();
-    const diffTime = end - now;
-    const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
-    return Math.max(0, diffDays);
-  };
-
-  // 팝업 관련 함수들
-  const closeModal = () => {
-    showInquiryModal.value = false;
-    resetForm();
-  };
-
-  const resetForm = () => {
-    inquiryForm.value = {
-      category: '',
-      title: '',
-      content: '',
-      attachments: []
-    };
-  };
-
-  const submitInquiry = async () => {
-    // 폼 유효성 검사
-    if (!inquiryForm.value.category) {
-      $toast.error('문의 유형을 선택해주세요.');
-      return;
-    }
-    if (!inquiryForm.value.title) {
-      $toast.error('제목을 입력해주세요.');
-      return;
-    }
-    if (!inquiryForm.value.content) {
-      $toast.error('내용을 입력해주세요.');
-      return;
-    }
-
-    isSubmitting.value = true;
-    
-    try {
-      const formData = new FormData();
-      formData.append('USER_SEQ', useAtStore.auth.seq);
-      formData.append('CATEGORY', inquiryForm.value.category);
-      formData.append('TITLE', inquiryForm.value.title);
-      formData.append('CONTENT', inquiryForm.value.content);
-      
-      // 첨부파일 처리
-      if (inquiryForm.value.attachments && inquiryForm.value.attachments.length > 0) {
-        inquiryForm.value.attachments.forEach((file, index) => {
-          formData.append(`files[${index}]`, file);
-        });
+  const showComingSoon = () => {
+    $eventBus.emit('OPEN_CONFIRM_POP_UP', {
+      id: 'coming-soon',
+      title: '안내',
+      content: '준비중입니다.',
+      yes: {
+        text: '확인',
+        isProc: false
       }
-
-      await useAxios()
-        .post("/cs/reg", formData, {
-          headers: {
-            'Content-Type': 'multipart/form-data'
-          }
-        })
-        .then((res) => {
-          if (res.data.success) {
-            $toast.success('문의가 성공적으로 등록되었습니다.');
-            closeModal();
-            csListGet(); // 목록 새로고침
-          } else {
-            $toast.error('문의 등록에 실패했습니다.');
-          }
-        });
-    } catch (error) {
-      $toast.error('문의 등록 중 오류가 발생했습니다.');
-      console.error('Error submitting inquiry:', error);
-    } finally {
-      isSubmitting.value = false;
-    }
+    });
   };
 
   /************************************************************************
@@ -677,9 +366,5 @@ import dayjs from 'dayjs';
 ************************************************************************/
   onMounted(() => {
     loadDashboardData();
-
-    // 날짜 초기화
-    const today = dayjs();
-    searchEndDate.value = today.format('YYYY-MM-DD');
   });
 </script>

+ 12 - 2
pages/view/common/item/add.vue

@@ -904,11 +904,16 @@ const fnInsert = async () => {
   formData.append('order_end_date', dayjs(form.value.order_end_date).format('YYYY-MM-DD'));
   formData.append('item_type', itemType);
   formData.append('contact_inf', form.value.contact_inf);
-  formData.append('contact_brd', form.value.contact_brd);
   // 벤더사의 COMPANY_NUMBER 사용
   const memberCompanyNumber = useAtStore.auth.companyNumber || "1";
   formData.append('company_number', memberCompanyNumber);
 
+  if(memberType === "BRAND"){
+    formData.append('contact_brd', useAtStore.auth.seq);
+  } else {
+    formData.append('contact_brd', form.value.contact_brd);
+  }
+
   useAxios()
     .post('/item/reg', formData, {
       headers: {'Content-Type': 'multipart/form-data'},
@@ -947,11 +952,16 @@ const fnUpdate = async () => {
   formData.append('order_start_date', dayjs(form.value.order_start_date).format('YYYY-MM-DD'));
   formData.append('order_end_date', dayjs(form.value.order_end_date).format('YYYY-MM-DD'));
   formData.append('contact_inf', form.value.contact_inf);
-  formData.append('contact_brd', form.value.contact_brd);
   // 벤더사의 COMPANY_NUMBER 사용
   const memberCompanyNumber = useAtStore.auth.companyNumber || "1";
   formData.append('company_number', memberCompanyNumber);
 
+  if(memberType === "BRAND"){
+    formData.append('contact_brd', useAtStore.auth.seq);
+  } else {
+    formData.append('contact_brd', form.value.contact_brd);
+  }
+
   try {
     const res = await useAxios().post(`/item/update/${req.seq}`, formData, {
       headers: { 'Content-Type': 'multipart/form-data' },

+ 5 - 22
pages/view/common/item/detail.vue

@@ -922,31 +922,15 @@ const fnInsert = async () => {
   try {
     const req = {
       item_seq: useDtStore.boardInfo.seq,
+      inf_seq: form.value.contact_inf,
       orderList: tblItems.value || []
     };
 
     const response = await useAxios().post('/deli/reg', req);
     
-    console.log('응답 상태:', response.status);
-    console.log('전체 응답:', response);
-    
-    // 응답 상태가 400대 에러면 에러로 처리
-    if (response.status >= 400) {
-      throw new Error(response.data?.message || '서버 에러가 발생했습니다.');
-    }
-    
     if (response.data) {
       const { message, updated_count, new_count, deleted_count, errors } = response.data;
       
-      console.log('백엔드 응답:', response.data);
-      
-      // 백엔드에서 "저장할 데이터가 없습니다" 메시지가 온 경우
-      if (message === '저장할 데이터가 없습니다.') {
-        console.log('저장할 데이터 없음 감지');
-        $toast.warning("저장할 데이터가 없습니다.");
-        return; // 새로고침하지 않음
-      }
-      
       // 결과 메시지 표시
       const totalProcessed = updated_count + new_count + deleted_count;
       
@@ -960,7 +944,7 @@ const fnInsert = async () => {
 
       // 에러가 있으면 콘솔에 출력하고 토스트로 표시
       if (errors && errors.length > 0) {
-        console.warn('저장 중 일부 오류 발생:', errors);
+        //console.warn('저장 중 일부 오류 발생:', errors);
         errors.forEach(error => {
           $toast.error(error);
         });
@@ -970,16 +954,15 @@ const fnInsert = async () => {
       window.location.reload();
     }
   } catch (error) {
-    console.error('주문 내역 저장 중 오류:', error);
+    //console.error('주문 내역 저장 중 오류:', error);
     
     // 백엔드 에러 응답 확인
     if (error.response?.data) {
       const errorData = error.response.data;
-      console.log('에러 응답:', errorData);
       
-      // "처리할 수 있는 데이터가 없습니다" 에러를 저장할 데이터 없음으로 처리
+      // 아무 작업 없이 저장 버튼 클릭 시
       if (errorData.messages?.error === "처리할 수 있는 데이터가 없습니다." || 
-          errorData.message === "처리할 수 있는 데이터가 없습니다.") {
+        errorData.message === "처리할 수 있는 데이터가 없습니다.") {
         $toast.warning("저장할 데이터가 없습니다.");
         return; // 새로고침하지 않음
       }

+ 443 - 405
pages/view/common/mypage/index.vue

@@ -1,197 +1,129 @@
 <template>
   <div class="mypage-container">
-    <!-- 헤더 섹션 -->
-    <div class="mypage-header">
-      <div class="header-content">
-        <div class="profile-section">
+    <!-- 프로필 섹션 -->
+    <div class="profile-section">
+      <div class="profile-card">
+        <div class="profile-header">
           <div class="profile-avatar">
-            <div class="avatar-placeholder">
-              <i class="mdi mdi-account"></i>
-            </div>
+            {{ getMemberTypeName(userInfo.memberType) === "인플루언서" ? '❤️' : '💜' }}
           </div>
           <div class="profile-info">
-            <h1 class="user-name">{{ useAtStore.auth.nickName || useAtStore.auth.companyName || '사용자' }}</h1>
-            <p class="user-type">{{ memberType === 'INFLUENCER' ? '인플루언서' : memberType === 'VENDOR' ? '벤더사' : '관리자' }}</p>
-            <div class="user-stats">
-              <div class="stat-item">
-                <span class="stat-number">{{ csList.length }}</span>
-                <span class="stat-label">문의 내역</span>
-              </div>
-              <div class="stat-item">
-                <span class="stat-number">{{ completedInquiries }}</span>
-                <span class="stat-label">답변 완료</span>
-              </div>
-            </div>
+            <h2>{{ userInfo.name }}</h2>
+            <span class="member-type-badge">{{ getMemberTypeName(userInfo.memberType) }}</span>
           </div>
+          <button 
+            class="edit-btn" 
+            @click="toggleEditMode"
+            :class="{ active: isEditMode }"
+          >
+            {{ isEditMode ? '취소' : '수정' }}
+          </button>
         </div>
-      </div>
-    </div>
 
-    <!-- 대시보드 섹션 -->
-    <div class="dashboard-section">
-      <div class="dashboard-cards">
-        <!-- 빠른 액션 카드 -->
-        <div class="dashboard-card quick-actions">
-          <div class="card-header">
-            <h3>빠른 작업</h3>
-            <i class="mdi mdi-lightning-bolt"></i>
-          </div>
-          <div class="card-content">
-            <div class="action-buttons">
-              <v-btn class="action-btn" @click="addLocated()">
-                <i class="mdi mdi-plus-circle"></i>
-                <span>문의 등록</span>
-              </v-btn>
-              <v-btn class="action-btn" @click="goToCS()">
-                <i class="mdi mdi-headset"></i>
-                <span>고객센터</span>
-              </v-btn>
-              <v-btn class="action-btn" @click="goToProfile()">
-                <i class="mdi mdi-account-edit"></i>
-                <span>프로필 수정</span>
-              </v-btn>
+        <!-- 정보 표시/수정 폼 -->
+        <div class="profile-content">
+          <div v-if="!isEditMode" class="info-display">
+            <div class="info-row">
+              <label>이름</label>
+              <span>{{ userInfo.name }}</span>
             </div>
-          </div>
-        </div>
-
-        <!-- 최근 문의 카드 -->
-        <div class="dashboard-card recent-inquiries">
-          <div class="card-header">
-            <h3>최근 문의 내역</h3>
-            <i class="mdi mdi-message-text"></i>
-          </div>
-          <div class="card-content">
-            <div class="inquiry-list">
-              <div v-if="recentInquiries.length > 0">
-                <div 
-                  v-for="item in recentInquiries" 
-                  :key="item.SEQ" 
-                  class="inquiry-item"
-                  @click="toItemDetail(item.SEQ)"
-                >
-                  <div class="inquiry-info">
-                    <h4>{{ item.TITLE }}</h4>
-                    <p>{{ formatDate(item.REGDATE) }}</p>
-                  </div>
-                  <div class="inquiry-status">
-                    <span :class="getStatusClass(item.STATUS)">
-                      {{ item.STATUS == '0' ? '답변대기' : '답변완료' }}
-                    </span>
-                  </div>
-                </div>
-              </div>
-              <div v-else class="no-inquiries">
-                <i class="mdi mdi-message-outline"></i>
-                <p>등록된 문의가 없습니다</p>
-              </div>
+            <div class="info-row">
+              <label>이메일</label>
+              <span>{{ userInfo.email }}</span>
             </div>
-            <div class="view-all">
-              <v-btn variant="text" @click="goToCS()">전체 보기</v-btn>
+            <div class="info-row" v-if="userInfo.memberType !== 'INFLUENCER'">
+              <label>회사명</label>
+              <span>{{ userInfo.companyName }}</span>
             </div>
-          </div>
-        </div>
-
-        <!-- 알림 카드 -->
-        <div class="dashboard-card notifications">
-          <div class="card-header">
-            <h3>알림</h3>
-            <i class="mdi mdi-bell"></i>
-          </div>
-          <div class="card-content">
-            <div class="notification-list">
-              <div class="notification-item">
-                <div class="notification-icon">
-                  <i class="mdi mdi-information"></i>
-                </div>
-                <div class="notification-content">
-                  <h4>서비스 업데이트</h4>
-                  <p>새로운 기능이 추가되었습니다!</p>
-                </div>
-              </div>
+            <div class="info-row">
+              <label>전화번호</label>
+              <span>{{ userInfo.phone || '미등록' }}</span>
             </div>
           </div>
-        </div>
-      </div>
-    </div>
 
-    <!-- 문의 등록 팝업 -->
-    <v-dialog v-model="showInquiryModal" max-width="600px" persistent>
-      <v-card class="inquiry-modal">
-        <v-card-title class="modal-header">
-          <h3>문의 등록</h3>
-          <v-btn icon @click="closeModal" class="close-btn">
-            <v-icon>mdi-close</v-icon>
-          </v-btn>
-        </v-card-title>
-
-        <v-card-text class="modal-body">
-          <form @submit.prevent="submitInquiry">
+          <div v-else class="info-edit">
             <div class="form-group">
-              <label>문의 유형 <span class="required">*</span></label>
-              <v-select
-                v-model="inquiryForm.category"
-                :items="categoryOptions"
-                variant="outlined"
-                placeholder="문의 유형을 선택하세요"
-                class="custom-select"
-                :rules="[v => !!v || '문의 유형을 선택해주세요']"
-              ></v-select>
+              <label>이름 *</label>
+              <input 
+                type="text" 
+                v-model="editForm.name"
+                placeholder="이름을 입력하세요"
+                class="form-input"
+              />
             </div>
-
             <div class="form-group">
-              <label>제목 <span class="required">*</span></label>
-              <v-text-field
-                v-model="inquiryForm.title"
-                variant="outlined"
-                placeholder="문의 제목을 입력하세요"
-                class="custom-input"
-                :rules="[v => !!v || '제목을 입력해주세요']"
-              ></v-text-field>
+              <label>이메일 *</label>
+              <input 
+                type="email" 
+                v-model="editForm.email"
+                placeholder="이메일을 입력하세요"
+                class="form-input"
+              />
             </div>
-
-            <div class="form-group">
-              <label>내용 <span class="required">*</span></label>
-              <v-textarea
-                v-model="inquiryForm.content"
-                variant="outlined"
-                placeholder="문의 내용을 상세히 입력해주세요"
-                rows="6"
-                class="custom-textarea"
-                :rules="[v => !!v || '내용을 입력해주세요']"
-              ></v-textarea>
+            <div class="form-group" v-if="userInfo.memberType !== 'INFLUENCER'">
+              <label>회사명</label>
+              <input 
+                type="text" 
+                v-model="editForm.companyName"
+                placeholder="회사명을 입력하세요"
+                class="form-input"
+              />
             </div>
-
             <div class="form-group">
-              <label>첨부파일</label>
-              <v-file-input
-                v-model="inquiryForm.attachments"
-                variant="outlined"
-                placeholder="파일을 선택하세요"
-                hide-details=""
-                prepend-icon=""
-                append-inner-icon="mdi-paperclip"
-                class="custom-file-input mb--30"
-                accept="image/*,.pdf,.doc,.docx,.hwp"
-                multiple
-                show-size
-              ></v-file-input>
-              <p class="file-info">* 이미지, PDF, 문서 파일만 업로드 가능 (최대 10MB)</p>
+              <label>전화번호</label>
+              <input 
+                type="tel" 
+                v-model="editForm.phone"
+                placeholder="전화번호를 입력하세요"
+                class="form-input"
+              />
             </div>
-          </form>
-        </v-card-text>
-
-        <v-card-actions class="modal-footer">
-          <v-btn @click="closeModal" class="cancel-btn">취소</v-btn>
-          <v-btn @click="submitInquiry" class="submit-btn" :loading="isSubmitting">등록하기</v-btn>
-        </v-card-actions>
-      </v-card>
-    </v-dialog>
+            
+            <div class="form-actions">
+              <button 
+                class="btn-save" 
+                @click="saveProfile"
+                :disabled="isSaving"
+              >
+                {{ isSaving ? '저장중...' : '저장' }}
+              </button>
+              <button 
+                class="btn-cancel" 
+                @click="cancelEdit"
+              >
+                취소
+              </button>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- 추가 정보 섹션 -->
+    <div class="additional-info">
+      <div class="info-card">
+        <h3>계정 정보</h3>
+        <div class="info-grid">
+          <div class="info-item">
+            <span class="info-label">회원 타입</span>
+            <span class="info-value">{{ getMemberTypeName(userInfo.memberType) }}</span>
+          </div>
+          <div class="info-item">
+            <span class="info-label">계정 ID</span>
+            <span class="info-value">{{ userInfo.id }}</span>
+          </div>
+          <div class="info-item">
+            <span class="info-label">가입일</span>
+            <span class="info-value">{{ formatDate(userInfo.regDate) || '정보 없음' }}</span>
+          </div>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
 <script setup>
 import "@vuepic/vue-datepicker/dist/main.css";
-import dayjs from 'dayjs';
   /************************************************************************
 |    레이아웃
 ************************************************************************/
@@ -215,55 +147,30 @@ import dayjs from 'dayjs';
   /************************************************************************
 |    전역
  ************************************************************************/
-  const memberType = useAtStore.auth.memberType;
-  const searchModel = ref("");
-  const selectedRange = ref('all');
-  const searchStartDate = ref("");
-  const searchEndDate = ref("");
-  const dateOptions = [
-    { label: '오늘', value: 'today' },
-    { label: '7일', value: '7d' },
-    { label: '1개월', value: '1m' },
-    { label: '3개월', value: '3m' },
-    { label: '전체', value: 'all' },
-  ]
-  const datePickerFormat = "yyyy-MM-dd";
-  const filter = ref("");
-  const filderArr = ref([
-    { title: "전체", value: "" },
-    { title: "제목", value: "title" },
-    { title: "내용", value: "content" },
-    { title: "작성자", value: "writer" }
-  ]);
   const { $toast, $log, $dayjs, $eventBus } = useNuxtApp();
   const router = useRouter();
-  const pageId = computed(() => {
-    return '마이페이지';
-  });
-  const csList = ref([]);
   
-  // 대시보드 관련 computed
-  const completedInquiries = computed(() => {
-    return csList.value.filter(item => item.STATUS === '1').length;
-  });
-  
-  const recentInquiries = computed(() => {
-    return csList.value.slice(0, 3); // 최근 3개만 표시
+  // 사용자 정보
+  const userInfo = ref({
+    id: useAtStore.auth.id,
+    name: useAtStore.auth.name,
+    email: useAtStore.auth.email,
+    companyName: useAtStore.auth.companyName,
+    companyNumber: useAtStore.auth.companyNumber,
+    phone: useAtStore.auth.phone,
+    memberType: useAtStore.auth.memberType,
+    regDate: null
   });
 
-  // 문의 등록 팝업 관련
-  const showInquiryModal = ref(false);
-  const isSubmitting = ref(false);
-  const inquiryForm = ref({
-    category: '',
-    title: '',
-    content: '',
-    attachments: []
+  // 편집 모드
+  const isEditMode = ref(false);
+  const isSaving = ref(false);
+  const editForm = ref({
+    name: '',
+    email: '',
+    companyName: '',
+    phone: ''
   });
-  const categoryOptions = ref([
-    { title: '기능문의', value: 'D' },
-    { title: '기타문의', value: 'E' }
-  ]);
 
   /* eslint-disable */
   /* prettier-ignore */
@@ -272,140 +179,92 @@ import dayjs from 'dayjs';
 |    함수(METHODS)
 ************************************************************************/
 
-  const isRecentUpdate = (dateStr) => {
-    const today = new Date();
-    const updateDate = new Date(dateStr);
-    const diffDays = (today - updateDate) / (1000 * 60 * 60 * 24);
-    // 업데이트 날짜가 오늘 날짜 기준 최근 7일인지 확인
-    return diffDays <= 7;
-  }
-
-  const paginatedItems = computed(() => {
-    const start = (currentPage.value - 1) * itemsPerPage;
-    return csList.value.slice(start, start + itemsPerPage);
-  });
-
-  const setDateRange = (range) => {
-    const today = dayjs();
-
-    switch(range) {
-      case 'today' :
-        searchStartDate.value = today.format('YYYY-MM-DD');
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = 'today';
-        break;
-      case '7d':
-        searchStartDate.value = today.subtract(7, 'day').format('YYYY-MM-DD');
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = '7d';
-        break;
-      case '1m':
-        searchStartDate.value = today.subtract(1, 'month').format('YYYY-MM-DD');
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = '1m';
-        break;
-      case '3m':
-        searchStartDate.value = today.subtract(3, 'month').format('YYYY-MM-DD');
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = '3m';
-        break;
-      case 'all':
-        searchStartDate.value = "";
-        searchEndDate.value = today.format('YYYY-MM-DD');
-        selectedRange.value = 'all';
-        break
+  // 회원 타입 이름 반환
+  const getMemberTypeName = (type) => {
+    switch(type) {
+      case 'INFLUENCER': return '인플루언서';
+      case 'VENDOR': return '벤더사';
+      case 'BRAND': return '브랜드사';
+      default: return '사용자';
     }
-  }
-
-  const addLocated = () => {
-    showInquiryModal.value = true;
-  };
-  
-  const goToCS = () => {
-    router.push('/view/common/cs');
-  };
-  
-  const goToProfile = () => {
-    $toast.info('프로필 수정 기능은 준비중입니다.');
-  };
-
-  const toItemDetail = (__EVENT) => {
-    router.push({
-      path: "/view/common/cs/detail",
-    });
-    useDtStore.boardInfo.seq = __EVENT;
   };
 
-  const csListGet = async () => {
-    let _req = {
-      USER_SEQ : useAtStore.auth.seq,
-      keyword: '',
-      filter: '',
-      startDate: '',
-      endDate: ''
-    };
-    if(useAtStore.auth.seq == 2){
-      _req.USER_SEQ = 0;
+  // 편집 모드 토글
+  const toggleEditMode = () => {
+    if (isEditMode.value) {
+      // 편집 취소
+      isEditMode.value = false;
+    } else {
+      // 편집 시작 - 현재 값으로 폼 초기화
+      editForm.value = {
+        name: userInfo.value.name,
+        email: userInfo.value.email,
+        companyName: userInfo.value.companyName,
+        phone: userInfo.value.phone
+      };
+      isEditMode.value = true;
     }
+  };
 
-    await useAxios()
-      .post("/cs/list", _req)
-      .then((res) => {
-        csList.value = res.data;
-      });
+  // 편집 취소
+  const cancelEdit = () => {
+    isEditMode.value = false;
   };
 
-  const fnSearch = (__KEYWORD, __FILTER) => {
-    let _req = {
-      USER_SEQ: useAtStore.auth.seq,
-      filter: __FILTER,
-      keyword: __KEYWORD,
-      startDate: searchStartDate.value ? dayjs(searchStartDate.value).format('YYYY-MM-DD') : '',
-      endDate: searchEndDate.value ? dayjs(searchEndDate.value).format('YYYY-MM-DD') : ''
-    };
-
-    // 관리자인 경우 모든 문의 조회
-    if(useAtStore.auth.seq == 2){
-      _req.USER_SEQ = 0;
+  // 프로필 저장
+  const saveProfile = async () => {
+    // 유효성 검사
+    if (!editForm.value.name.trim()) {
+      $toast.error('이름을 입력해주세요.');
+      return;
+    }
+    if (!editForm.value.email.trim()) {
+      $toast.error('이메일을 입력해주세요.');
+      return;
     }
 
-    useAxios()
-      .post("/cs/search", _req)
-      .then((res) => {
-        csList.value = res.data;
-        currentPage.value = 1; // 검색 후 첫 페이지로 이동
-      })
-      .catch((error) => {
-        console.error('검색 실패:', error);
-        $toast.error('검색에 실패했습니다.');
-      });
-  };
+    isSaving.value = true;
+    
+    try {
+      const updateData = {
+        USER_SEQ: useAtStore.auth.seq,
+        NAME: editForm.value.name,
+        EMAIL: editForm.value.email,
+        PHONE: editForm.value.phone
+      };
+
+      // 회사 정보는 벤더사, 브랜드사만
+      if (userInfo.value.memberType !== 'INFLUENCER') {
+        updateData.COMPANY_NAME = editForm.value.companyName;
+      }
 
+      // TODO: 실제 API 호출 (현재는 임시로 로컬 업데이트)
+      // const response = await useAxios().post('/user/update', updateData);
+      
+      // 임시로 로컬 데이터 업데이트
+      userInfo.value.name = editForm.value.name;
+      userInfo.value.email = editForm.value.email;
+      userInfo.value.phone = editForm.value.phone;
+      if (userInfo.value.memberType !== 'INFLUENCER') {
+        userInfo.value.companyName = editForm.value.companyName;
+      }
 
-  const goToDeliveryDetail = (item) => {
-    // 제품 정보를 스토어에 저장
-    useDtStore.boardInfo.seq = item.SEQ;
-    useDtStore.boardInfo.pageType = "D";
-    
-    // 배송 관리 페이지로 이동
-    router.push({
-      path: "/view/common/deli/detail",
-      query: {
-        itemId: item.SEQ,
-        itemName: item.NAME,
-        price1: item.PRICE1,
-        price2: item.PRICE2 || item.PRICE1,
-        thumbFile: item.THUMB_FILE || ''
+      // 스토어도 업데이트
+      useAtStore.auth.name = editForm.value.name;
+      useAtStore.auth.email = editForm.value.email;
+      useAtStore.auth.phone = editForm.value.phone;
+      if (userInfo.value.memberType !== 'INFLUENCER') {
+        useAtStore.auth.companyName = editForm.value.companyName;
       }
-    });
-  };
 
-  const getStatusClass = (status) => {
-    switch(status) {
-      case '0':
-        return 'status-waiting';
-      case '1':
-        return 'status-completed';
+      $toast.success('프로필이 성공적으로 수정되었습니다.');
+      isEditMode.value = false;
+      
+    } catch (error) {
+      console.error('프로필 수정 실패:', error);
+      $toast.error('프로필 수정에 실패했습니다.');
+    } finally {
+      isSaving.value = false;
     }
   };
 
@@ -418,83 +277,262 @@ import dayjs from 'dayjs';
     return `${year}.${month}.${day}`;
   };
 
-  // 팝업 관련 함수들
-  const closeModal = () => {
-    showInquiryModal.value = false;
-    resetForm();
-  };
-
-  const resetForm = () => {
-    inquiryForm.value = {
-      category: '',
-      title: '',
-      content: '',
-      attachments: []
-    };
-  };
-
-  const submitInquiry = async () => {
-    // 폼 유효성 검사
-    if (!inquiryForm.value.category) {
-      $toast.error('문의 유형을 선택해주세요.');
-      return;
-    }
-    if (!inquiryForm.value.title) {
-      $toast.error('제목을 입력해주세요.');
-      return;
-    }
-    if (!inquiryForm.value.content) {
-      $toast.error('내용을 입력해주세요.');
-      return;
+  /************************************************************************
+|    WATCH
+************************************************************************/
+  // 사용자 상세 정보 로드
+  const fnDetail = () => {
+    let req = {
+      MEMBER_TYPE: useAtStore.auth.memberType, 
+      MEMBER_SEQ: useAtStore.auth.seq
     }
 
-    isSubmitting.value = true;
-    
-    try {
-      const formData = new FormData();
-      formData.append('USER_SEQ', useAtStore.auth.seq);
-      formData.append('CATEGORY', inquiryForm.value.category);
-      formData.append('TITLE', inquiryForm.value.title);
-      formData.append('CONTENT', inquiryForm.value.content);
-      
-      // 첨부파일 처리
-      if (inquiryForm.value.attachments && inquiryForm.value.attachments.length > 0) {
-        inquiryForm.value.attachments.forEach((file, index) => {
-          formData.append(`files[${index}]`, file);
-        });
-      }
+    console.warn(req)
 
-      await useAxios()
-        .post("/cs/reg", formData, {
-          headers: {
-            'Content-Type': 'multipart/form-data'
-          }
-        })
-        .then((res) => {
-          if (res.data.success) {
-            $toast.success('문의가 성공적으로 등록되었습니다.');
-            closeModal();
-            csListGet(); // 목록 새로고침
-          } else {
-            $toast.error('문의 등록에 실패했습니다.');
-          }
-        });
-    } catch (error) {
-      $toast.error('문의 등록 중 오류가 발생했습니다.');
-      console.error('Error submitting inquiry:', error);
-    } finally {
-      isSubmitting.value = false;
-    }
+    useAxios()
+      .post(`/mypage/detail`, req)
+      .then((res) => {
+        console.error(res)
+        userInfo.value = {
+          id: userData.ID,
+          name: userData.NAME,
+          email: userData.EMAIL,
+          companyName: userData.COMPANY_NAME,
+          companyNumber: userData.COMPANY_NUMBER,
+          phone: userData.PHONE,
+          memberType: userData.MEMBER_TYPE,
+          nickName: userData.NICK_NAME,
+          introduction: userData.INTRODUCTION,
+          regDate: userData.REGDATE
+        };
+    })
   };
 
-  /************************************************************************
-|    WATCH
-************************************************************************/
   onMounted(() => {
-    csListGet();
-
-    // 날짜 초기화
-    const today = dayjs();
-    searchEndDate.value = today.format('YYYY-MM-DD');
+    fnDetail();
   });
-</script>
+</script>
+
+<style scoped>
+.mypage-container {
+  margin: 0 auto;
+  padding: 20px;
+}
+
+.page-header {
+  margin-bottom: 32px;
+  text-align: center;
+}
+
+.page-header h1 {
+  font-size: 2.5rem;
+  color: #1a237e;
+  margin-bottom: 8px;
+}
+
+.page-header p {
+  color: #666;
+  font-size: 1.1rem;
+}
+
+.profile-section {
+  margin-bottom: 32px;
+}
+
+.profile-card {
+  background: white;
+  border-radius: 20px;
+  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
+  overflow: hidden;
+}
+
+.profile-header {
+  display: flex;
+  align-items: center;
+  padding: 32px;
+  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+  color: white;
+}
+
+.profile-avatar {
+  font-size: 3rem;
+  margin-right: 24px;
+  background: rgba(255, 255, 255, 0.2);
+  width: 96px;
+  height: 96px;
+  overflow: hidden;
+  border-radius: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.profile-info {
+  flex: 1;
+}
+
+.profile-info h2 {
+  margin-bottom: 15px;
+  font-size: 1.8rem;
+}
+
+.member-type-badge {
+  background: rgba(255, 255, 255, 0.2);
+  padding: 4px 12px;
+  border-radius: 20px;
+  font-size: 0.9rem;
+}
+
+.edit-btn {
+  background: rgba(255, 255, 255, 0.2);
+  border: 2px solid rgba(255, 255, 255, 0.3);
+  color: white;
+  padding: 12px 24px;
+  border-radius: 25px;
+  cursor: pointer;
+  transition: all 0.3s ease;
+  font-weight: 500;
+}
+
+.edit-btn:hover, .edit-btn.active {
+  background: white;
+  color: #667eea;
+}
+
+.profile-content {
+  padding: 32px;
+}
+
+/* 정보 표시 스타일 */
+.info-display .info-row {
+  display: flex;
+  padding: 16px 0;
+  border-bottom: 1px solid #f0f0f0;
+}
+
+.info-display .info-row:last-child {
+  border-bottom: none;
+}
+
+.info-display label {
+  width: 120px;
+  font-weight: 600;
+  color: #333;
+}
+
+.info-display span {
+  flex: 1;
+  color: #666;
+}
+
+/* 편집 폼 스타일 */
+.form-group {
+  margin-bottom: 24px;
+}
+
+.form-group label {
+  display: block;
+  margin-bottom: 8px;
+  font-weight: 600;
+  color: #333;
+}
+
+.form-input {
+  width: 100%;
+  padding: 12px 16px;
+  border: 2px solid #e0e0e0;
+  border-radius: 8px;
+  font-size: 1rem;
+  transition: border-color 0.3s ease;
+}
+
+.form-input:focus {
+  outline: none;
+  border-color: #667eea;
+}
+
+.form-actions {
+  display: flex;
+  gap: 12px;
+  margin-top: 32px;
+}
+
+.btn-save {
+  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+  color: white;
+  border: none;
+  padding: 12px 24px;
+  border-radius: 8px;
+  cursor: pointer;
+  font-weight: 500;
+  transition: all 0.3s ease;
+}
+
+.btn-save:hover:not(:disabled) {
+  transform: translateY(-2px);
+  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
+}
+
+.btn-save:disabled {
+  opacity: 0.6;
+  cursor: not-allowed;
+}
+
+.btn-cancel {
+  background: #f5f5f5;
+  color: #666;
+  border: none;
+  padding: 12px 24px;
+  border-radius: 8px;
+  cursor: pointer;
+  font-weight: 500;
+  transition: all 0.3s ease;
+}
+
+.btn-cancel:hover {
+  background: #e0e0e0;
+}
+
+/* 추가 정보 섹션 */
+.additional-info {
+  margin-top: 32px;
+}
+
+.info-card {
+  background: white;
+  border-radius: 16px;
+  padding: 32px;
+  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
+}
+
+.info-card h3 {
+  margin: 0 0 24px 0;
+  color: #1a237e;
+  font-size: 1.3rem;
+}
+
+.info-grid {
+  display: grid;
+  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+  gap: 24px;
+}
+
+.info-item {
+  padding: 16px;
+  background: #f8f9fa;
+  border-radius: 12px;
+}
+
+.info-label {
+  display: block;
+  font-size: 0.9rem;
+  color: #666;
+  margin-bottom: 15px;
+}
+
+.info-value {
+  font-weight: 600;
+  color: #333;
+  font-size: 1rem;
+}
+</style>