This commit is contained in:
ChiKyun Kim
2025-11-11 08:39:59 +09:00
parent a966b4a6ab
commit e6a39d52e9
15 changed files with 60 additions and 128 deletions

View File

@@ -67,7 +67,7 @@ namespace Project.Dialog
await this.webView21.EnsureCoreWebView2Async(); await this.webView21.EnsureCoreWebView2Async();
} }
// OWIN 서버의 DashBoard 페이지로 연결 // OWIN 서버의 DashBoard 페이지로 연결
webView21.Source = new Uri($"{Pub.setting.WebServiceURL}/Common"); webView21.Source = new Uri($"{Pub.WebServiceURL}/Common");
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@@ -72,7 +72,7 @@ namespace Project.Dialog
await this.webView21.EnsureCoreWebView2Async(); await this.webView21.EnsureCoreWebView2Async();
} }
// OWIN 서버의 DashBoard 페이지로 연결 // OWIN 서버의 DashBoard 페이지로 연결
webView21.Source = new Uri($"{Pub.setting.WebServiceURL}/DashBoard"); webView21.Source = new Uri($"{Pub.WebServiceURL}/DashBoard");
label1.Visible = false; label1.Visible = false;
loadok = true; loadok = true;
} }

View File

@@ -66,7 +66,7 @@ namespace Project.Dialog
await this.webView21.EnsureCoreWebView2Async(); await this.webView21.EnsureCoreWebView2Async();
} }
// OWIN 서버의 DashBoard 페이지로 연결 // OWIN 서버의 DashBoard 페이지로 연결
webView21.Source = new Uri($"{Pub.setting.WebServiceURL}/kuntae"); webView21.Source = new Uri($"{Pub.WebServiceURL}/kuntae");
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@@ -66,7 +66,7 @@ namespace Project.Dialog
await this.webView21.EnsureCoreWebView2Async(); await this.webView21.EnsureCoreWebView2Async();
} }
// OWIN 서버의 DashBoard 페이지로 연결 // OWIN 서버의 DashBoard 페이지로 연결
webView21.Source = new Uri($"{Pub.setting.WebServiceURL}/Jobreport"); webView21.Source = new Uri($"{Pub.WebServiceURL}/Jobreport");
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@@ -80,7 +80,7 @@ namespace Project.Dialog
webView21.CoreWebView2.WebMessageReceived += WebView2_WebMessageReceived; webView21.CoreWebView2.WebMessageReceived += WebView2_WebMessageReceived;
// OWIN 서버의 Login 페이지로 연결 // OWIN 서버의 Login 페이지로 연결
webView21.Source = new Uri($"{Pub.setting.WebServiceURL}/home/login"); webView21.Source = new Uri($"{Pub.WebServiceURL}/home/login");
label1.Visible = false; label1.Visible = false;
} }
catch (Exception ex) catch (Exception ex)

View File

@@ -58,7 +58,7 @@ namespace Project
"동시에 여러 개의 프로그램을 실행할 수 없습니다.\n\n" + "동시에 여러 개의 프로그램을 실행할 수 없습니다.\n\n" +
"해결방법을 선택하세요:"; "해결방법을 선택하세요:";
var result = MessageBox.Show(message + "\n\n예(Y): 기존 프로그램을 종료하고 새로 시작\n아니오(N): 현재 실행을 취소", var result = MessageBox.Show(message + "\n\n예(Y): 기존 프로그램을 종료하고 새로 시작\n아니오(N): 무시하고 실행",
"중복실행 감지", "중복실행 감지",
MessageBoxButtons.YesNo, MessageBoxButtons.YesNo,
MessageBoxIcon.Warning); MessageBoxIcon.Warning);
@@ -93,7 +93,7 @@ namespace Project
else else
{ {
// 현재 실행을 취소 // 현재 실행을 취소
return false; return true;
} }
} }

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
// 지정되도록 할 수 있습니다. // 지정되도록 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("25.10.17.1600")] [assembly: AssemblyVersion("25.11.03.1350")]
[assembly: AssemblyFileVersion("25.10.17.1600")] [assembly: AssemblyFileVersion("25.11.03.1350")]

View File

@@ -29,6 +29,7 @@ namespace Project
public static DateTime LastInputTime = DateTime.Now; public static DateTime LastInputTime = DateTime.Now;
public static CResult Result = new CResult(); public static CResult Result = new CResult();
public static DatabaseConnectionString.DatabaseInfo dbinfo = null; public static DatabaseConnectionString.DatabaseInfo dbinfo = null;
public static string WebServiceURL { get; set; }
@@ -192,6 +193,8 @@ namespace Project
//language //language
Lang.Loading(Pub.setting.Language + ".ini"); Lang.Loading(Pub.setting.Language + ".ini");
if (WebServiceURL.isEmpty())
WebServiceURL = "http://127.0.0.1:7979";
} }
private static WebView2 webView21; private static WebView2 webView21;

View File

@@ -70,7 +70,7 @@ namespace Project
[Category("Barcode"), DisplayName("Port Name")] [Category("Barcode"), DisplayName("Port Name")]
public string Barcode { get; set; } public string Barcode { get; set; }
public string WebServiceURL { get; set; }
[Browsable(false)] [Browsable(false)]
public string lastid { get; set; } public string lastid { get; set; }
@@ -104,14 +104,9 @@ namespace Project
public override void AfterLoad() public override void AfterLoad()
{ {
//if (wondoller < 1) wondoller = 1200;
if (WebServiceURL.isEmpty())
WebServiceURL = "http://127.0.0.1:7979";
if (Language.isEmpty()) Language = "Kor"; if (Language.isEmpty()) Language = "Kor";
if (Password_Setup.isEmpty()) Password_Setup = "0000"; if (Password_Setup.isEmpty()) Password_Setup = "0000";
if (Password_User.isEmpty()) Password_User = "9999"; if (Password_User.isEmpty()) Password_User = "9999";
//if (lastdept == "") lastdept = "제조본부 장비기술팀 K4장비기술1파트";
var str_toolbar = Xml.get_Data("enum", "HideToolbar", "0"); var str_toolbar = Xml.get_Data("enum", "HideToolbar", "0");
this.HideToolbar = (eToolPosition)int.Parse(str_toolbar); this.HideToolbar = (eToolPosition)int.Parse(str_toolbar);

View File

@@ -298,11 +298,12 @@
</div> </div>
</div> </div>
<!-- 공통 네비게이션 JS -->
<script src="/js/common-navigation.js"></script>
<script> <script>
// 공용코드 전용 스크립 // 공통 네비게이션 컴포넌
class CommonNavigation {
constructor(currentPage = '') {
this.currentPage = currentPage;
this.menuItems = [];
this.init(); this.init();
} }

View File

@@ -130,50 +130,7 @@
<!-- 통계 카드 --> <!-- 통계 카드 -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6 mb-8"> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6 mb-8">
<!-- 출근 카드 -->
<div class="glass-effect rounded-2xl p-6 card-hover animate-slide-up cursor-pointer" onclick="showPresentUserModal()">
<div class="flex items-center justify-between">
<div>
<p class="text-white/70 text-sm font-medium">출근(대상)</p>
<p class="text-3xl font-bold text-white" id="presentCount">0</p>
</div>
<div class="w-12 h-12 bg-success-500/20 rounded-full flex items-center justify-center">
<svg class="w-6 h-6 text-success-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</div>
</div>
</div>
<!-- 휴가 카드 -->
<div class="glass-effect rounded-2xl p-6 card-hover animate-slide-up">
<div class="flex items-center justify-between">
<div>
<p class="text-white/70 text-sm font-medium">휴가</p>
<p class="text-3xl font-bold text-white" id="leaveCount">0</p>
</div>
<div class="w-12 h-12 bg-warning-500/20 rounded-full flex items-center justify-center">
<svg class="w-6 h-6 text-warning-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
</svg>
</div>
</div>
</div>
<!-- 휴가요청 카드 -->
<div class="glass-effect rounded-2xl p-6 card-hover animate-slide-up cursor-pointer" onclick="showHolidayRequestModal()">
<div class="flex items-center justify-between">
<div>
<p class="text-white/70 text-sm font-medium">휴가요청</p>
<p class="text-3xl font-bold text-white" id="leaveRequestCount">0</p>
</div>
<div class="w-12 h-12 bg-primary-500/20 rounded-full flex items-center justify-center">
<svg class="w-6 h-6 text-primary-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
</svg>
</div>
</div>
</div>
<!-- 구매요청 카드(NR) --> <!-- 구매요청 카드(NR) -->
<div class="glass-effect rounded-2xl p-6 card-hover animate-slide-up cursor-pointer" onclick="showPurchaseNRModal()"> <div class="glass-effect rounded-2xl p-6 card-hover animate-slide-up cursor-pointer" onclick="showPurchaseNRModal()">
@@ -213,34 +170,8 @@
</div> </div>
<!-- 2칸 레이아웃: 좌측 휴가현황, 우측 할일 --> <!-- 2칸 레이아웃: 좌측 휴가현황, 우측 할일 -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 animate-slide-up"> <div class="grid grid-cols-1 lg:grid-cols-1 gap-8 animate-slide-up">
<!-- 좌측: 휴가/기타 현황 -->
<div class="glass-effect rounded-2xl overflow-hidden">
<div class="px-6 py-4 border-b border-white/10">
<h2 class="text-xl font-semibold text-white flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
</svg>
휴가/기타 현황
</h2>
</div>
<div class="overflow-x-auto max-h-[460px] custom-scrollbar">
<table class="w-full">
<thead class="bg-white/10 sticky top-0">
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-white/70 uppercase tracking-wider">이름</th>
<th class="px-4 py-3 text-left text-xs font-medium text-white/70 uppercase tracking-wider">형태</th>
<th class="px-4 py-3 text-left text-xs font-medium text-white/70 uppercase tracking-wider">종류</th>
<th class="px-4 py-3 text-left text-xs font-medium text-white/70 uppercase tracking-wider">기간</th>
<th class="px-4 py-3 text-left text-xs font-medium text-white/70 uppercase tracking-wider">사유</th>
</tr>
</thead>
<tbody id="holidayTable" class="divide-y divide-white/10">
<!-- 데이터가 여기에 표시됩니다 -->
</tbody>
</table>
</div>
</div>
<!-- 우측: 할일 --> <!-- 우측: 할일 -->
<div class="glass-effect rounded-2xl overflow-hidden"> <div class="glass-effect rounded-2xl overflow-hidden">

View File

@@ -31,7 +31,7 @@ function CommonCode() {
const loadGroups = async () => { const loadGroups = async () => {
setIsLoading(true); setIsLoading(true);
try { try {
const response = await fetch('http://127.0.0.1:7979/Common/GetGroups'); const response = await fetch('/Common/GetGroups');
const data = await response.json(); const data = await response.json();
setGroupData(data || []); setGroupData(data || []);
} catch (error) { } catch (error) {
@@ -53,7 +53,7 @@ function CommonCode() {
const loadDataByGroup = async (grp) => { const loadDataByGroup = async (grp) => {
setIsLoading(true); setIsLoading(true);
try { try {
let url = 'http://127.0.0.1:7979/Common/GetList'; let url = '/Common/GetList';
if (grp) { if (grp) {
url += '?grp=' + encodeURIComponent(grp); url += '?grp=' + encodeURIComponent(grp);
} }
@@ -130,7 +130,7 @@ function CommonCode() {
setIsLoading(true); setIsLoading(true);
try { try {
const response = await fetch('http://127.0.0.1:7979/Common/Save', { const response = await fetch('/Common/Save', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@@ -162,7 +162,7 @@ function CommonCode() {
setIsLoading(true); setIsLoading(true);
try { try {
const response = await fetch('http://127.0.0.1:7979/Common/Delete', { const response = await fetch('/Common/Delete', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',

View File

@@ -227,7 +227,7 @@ namespace Project
void Func_Login() void Func_Login()
{ {
//Pub.InitWebView = 2; //Pub.InitWebView = 2;
this.sbWeb.Text = $"Host:{(webok ? "O" : "X")},WebView:{Pub.InitWebView}"; this.sbWeb.Text = $"Host:{(webok ? "O" : "X")},WebView:{Pub.InitWebView},Server:{Pub.WebServiceURL}";
if (webok && Pub.InitWebView == 1) if (webok && Pub.InitWebView == 1)
{ {
using (var f = new Dialog.fLogin_WB()) using (var f = new Dialog.fLogin_WB())
@@ -1044,11 +1044,10 @@ namespace Project
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
var url = $"{Pub.setting.WebServiceURL}/item/find"; var url = $"{Pub.WebServiceURL}/item/find";
Util.RunExplorer(url); Util.RunExplorer(url);
} }
private void layoutToolStripMenuItem_Click(object sender, EventArgs e) private void layoutToolStripMenuItem_Click(object sender, EventArgs e)
{ {
string formkey = "PLYOU"; string formkey = "PLYOU";
@@ -1073,7 +1072,7 @@ namespace Project
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
Util.RunExplorer($"{Pub.setting.WebServiceURL}/Manual"); Util.RunExplorer($"{Pub.WebServiceURL}/Manual");
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ToolStripMenuItem_Click(object sender, EventArgs e)

View File

@@ -147,13 +147,13 @@ namespace Project.Dialog
CheckDatabaseConnection(); CheckDatabaseConnection();
await Task.Delay(300); await Task.Delay(300);
// 4. 포트 7979 사용 여부 체크 //// 4. 포트 7979 사용 여부 체크
SafeInvoke(() => { //SafeInvoke(() => {
label1.Text = "🔌 포트 7979 상태 확인 중..."; // label1.Text = "🔌 포트 7979 상태 확인 중...";
}); //});
CheckPort7979InUse(); //CheckPort7979InUse();
await Task.Delay(300); //await Task.Delay(300);
// 5. 바코드 설정 // 5. 바코드 설정
SafeInvoke(() => { SafeInvoke(() => {

View File

@@ -95,6 +95,9 @@ namespace FPJ0000
cmbUser.Text = namestr; cmbUser.Text = namestr;
} }
if (curLevel < 5)
cmbUser.Enabled = false;
//var userList = FCOMMON.DBM.getGroupList("name + '(' + id + ')'", "Users", "[level] > 0 and [level] < 10", false, false); //var userList = FCOMMON.DBM.getGroupList("name + '(' + id + ')'", "Users", "[level] > 0 and [level] < 10", false, false);
//foreach (var user in userList) //foreach (var user in userList)