diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html index 6734e0e..5630030 100644 --- a/Frontend/_historyData.html +++ b/Frontend/_historyData.html @@ -354,7 +354,7 @@ ytAjax = new YourTeam.Ajax(url, objSendData, function (rel) { if (rel.code == "0000") - location.href = baseApiUrl + "/api/df?fileName=" + rel.data + "&token=" + localStorage.getItem("JWT-Authorization"); + location.href = baseApiUrl + "/api/df?path=" + rel.data.split('/')[0] + "&fileName=" + rel.data.split('/')[1] + "&token=" + localStorage.getItem("JWT-Authorization"); }, null, "POST").send(); } \ No newline at end of file diff --git a/Frontend/_operation.html b/Frontend/_operation.html index 4100c62..21fc8fc 100644 --- a/Frontend/_operation.html +++ b/Frontend/_operation.html @@ -141,7 +141,7 @@ @@ -217,6 +217,25 @@ + + \ No newline at end of file diff --git a/Frontend/index.html b/Frontend/index.html index 8a2f3f1..08ab0e2 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -2586,6 +2586,9 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li "n4js/historybaja", "lib/statistics/flot/flot.bundle", "lib/statistics/peity/peity.bundle", + "lib/jquery-validation/dist/jquery.validate", + "lib/jquery-validation/dist/additional-methods.min", + "lib/jquery-validation/dist/localization/messages_zh_TW", ], loadedMasterPack); } /** diff --git a/Frontend/login.html b/Frontend/login.html index 5c98287..ab729ed 100644 --- a/Frontend/login.html +++ b/Frontend/login.html @@ -104,9 +104,6 @@ [ "lib/app.bundle", "lib/app.menu", - "lib/jquery-validation/dist/jquery.validate", - "lib/jquery-validation/dist/additional-methods.min", - "lib/jquery-validation/dist/localization/messages_zh_TW", /*"lib/notifications/sweetalert2/sweetalert2.bundle",*/ ], loadedMasterPack); } diff --git a/FrontendWebApi/ApiControllers/HistoryController.cs b/FrontendWebApi/ApiControllers/HistoryController.cs index 48d7b87..b085655 100644 --- a/FrontendWebApi/ApiControllers/HistoryController.cs +++ b/FrontendWebApi/ApiControllers/HistoryController.cs @@ -160,7 +160,7 @@ namespace FrontendWebApi.ApiControllers } apiResult.Code = "0000"; - apiResult.Data = fileName; + apiResult.Data = "history/" + fileName; } catch (Exception exception) { diff --git a/FrontendWebApi/ApiControllers/LoginController.cs b/FrontendWebApi/ApiControllers/LoginController.cs index 7891d66..5a449e5 100644 --- a/FrontendWebApi/ApiControllers/LoginController.cs +++ b/FrontendWebApi/ApiControllers/LoginController.cs @@ -139,7 +139,7 @@ namespace FrontendWebApi.ApiControllers [HttpGet] [Route("api/df")] - public ActionResult DownloadFile(string fileName, string token) + public ActionResult DownloadFile(string path, string fileName, string token) { var jwt = new JwtSecurityTokenHandler().ReadJwtToken(token); if (jwt == null) @@ -147,7 +147,7 @@ namespace FrontendWebApi.ApiControllers else if (fileName == null) return NotFound("找不到文件"); - var filePath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "excel", "history"); + var filePath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "excel", path); return File(System.IO.File.ReadAllBytes(Path.Combine(filePath, fileName)), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", fileName); } } diff --git a/FrontendWebApi/ApiControllers/OperationController.cs b/FrontendWebApi/ApiControllers/OperationController.cs index 38732c7..fe64260 100644 --- a/FrontendWebApi/ApiControllers/OperationController.cs +++ b/FrontendWebApi/ApiControllers/OperationController.cs @@ -733,7 +733,7 @@ namespace FrontendWebApi.ApiControllers } apiResult.Code = "0000"; - apiResult.Data = fileName; + apiResult.Data = "operation/" + fileName; } catch(Exception ex) { diff --git a/FrontendWebApi/wwwroot/excel/operation/廠商資料.xlsx b/FrontendWebApi/wwwroot/excel/operation/廠商資料.xlsx new file mode 100644 index 0000000..d78cca2 Binary files /dev/null and b/FrontendWebApi/wwwroot/excel/operation/廠商資料.xlsx differ