This commit is contained in:
BianLzhaoMin 2026-02-06 13:40:10 +08:00
parent e9890f7034
commit a086a978b4
4 changed files with 111 additions and 101 deletions

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -7,26 +8,27 @@
<script src="../part/jquery-2.0.3.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../part/style.css">
</head>
<body>
<div class="container">
<h1 class="title">安全用品需求计划管理</h1>
<div class="icon-grid">
<div class="icon-item" onclick="navigateTo('apply')">
<!-- <div class="icon-item" onclick="navigateTo('apply')">
<div class="icon">📋</div>
<div class="icon-text">需求计划申请</div>
</div>
<div class="icon-item" onclick="navigateTo('review')">
<div class="icon"></div>
<div class="icon-text">需求计划审核</div>
</div>
</div> -->
<div class="icon-item" onclick="navigateTo('shipment')">
<div class="icon">🚚</div>
<div class="icon-text">需求计划发货</div>
</div>
</div>
</div>
<script src="safetyPlanIndex.js"></script>
</body>
</html>
</html>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -7,6 +8,7 @@
<script src="../part/jquery-2.0.3.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="safetyPlanShipment.css">
</head>
<body>
<div class="shipment-container">
<!-- 头部 -->
@ -22,7 +24,8 @@
<div class="search-filter-container">
<div class="search-box">
<span class="search-icon">🔍</span>
<input type="text" class="search-input" id="searchInput" placeholder="搜索工程名称..." onkeyup="handleSearch()">
<input type="text" class="search-input" id="searchInput" placeholder="搜索工程名称..."
onkeyup="handleSearch()">
</div>
<div class="filter-box">
<select class="filter-select" id="statusFilter" onchange="handleStatusFilter()">
@ -57,7 +60,10 @@
</div>
</div>
<script src="safetyPlanShipment.js"></script>
</body>
</html>
</body>
<script type="text/javascript" src="../js/public.js"></script>
<script src="safetyPlanShipment.js"></script>
</html>

View File

@ -2,31 +2,31 @@ var orgId = localStorage.getItem("orgId");
var postName = localStorage.getItem("postName");
localStorage.setItem("flage", 0);
$(function() {
//alert(postName)
/* if(postName.indexOf("") != -1){
orgId = 6;
}*/
$(function () {
//alert(postName)
/* if(postName.indexOf("") != -1){
orgId = 6;
}*/
/* if(postName.indexOf("") != -1){
orgId = 2;
}*/
/* if(postName.indexOf("") != -1){
orgId = 2;
}*/
/* if(postName.indexOf("") != -1){
orgId = 5;
}*/
/* if(postName.indexOf("") != -1){
orgId = 5;
}*/
});
mui.back = function() {
mui.back = function () {
window.location.href = './login.html';
}
//跳转至登录页------二维码扫描
function qrCodeBinding() {
if(postName.indexOf("检验") != -1) {
window.location.href = 'qrCodeBinding/qrCodeBinding.html';
} else {
alert("当前账户不是检验员");
}
if (postName.indexOf("检验") != -1) {
window.location.href = 'qrCodeBinding/qrCodeBinding.html';
} else {
alert("当前账户不是检验员");
}
}
function rfidBinding() {
@ -50,26 +50,26 @@ function lease() {
} else {
window.location.href = 'lease/machinesOutStorageList.html';
}*/
if(postName.indexOf("客服") != -1){
if (postName.indexOf("客服") != -1) {
window.location.href = 'lease/machinesOutStorageList.html';
}else {
} else {
alert("当前账户不是客服代表员");
}
}
//跳转至入库页
function putInStorage() {
if(postName.indexOf("客服") != -1) {
localStorage.setItem("postName", postName);
window.location.href = 'newInput/newRepairInput.html';
if (postName.indexOf("客服") != -1) {
localStorage.setItem("postName", postName);
window.location.href = 'newInput/newRepairInput.html';
} else {
alert("当前账户不是客服代表员");
alert("当前账户不是客服代表员");
}
}
//跳转退料界面
function reBackLib(){
if(postName.indexOf("检验") != -1) {
window.location.href = 'rm/returnMaterialTask.html';
function reBackLib() {
if (postName.indexOf("检验") != -1) {
window.location.href = 'rm/returnMaterialTask.html';
} else {
alert("当前账户不是检验员");
@ -78,13 +78,13 @@ function reBackLib(){
function scan() {
window.location.href = 'rfid/rfidBinding.html';
window.location.href = 'rfid/rfidBinding.html';
}
function partApply() {
checkLogin();
checkLogin();
@ -92,53 +92,53 @@ function partApply() {
}
function checkLogin(){
var loginName = localStorage.getItem("loginName");
var name = localStorage.getItem("name");
var password = localStorage.getItem("password");
function checkLogin() {
var loginName = localStorage.getItem("loginName");
var name = localStorage.getItem("name");
var password = localStorage.getItem("password");
$.ajax({
type: "post",
url: "http://10.1.0.142:1999/login/userLogin",
data: {
username: loginName,
password: $.md5(password)
},
success: function(data) {
var apiUrl = "http://10.1.0.142:1999/";
localStorage.setItem("apiUrl", apiUrl);
if(data.code == "200") {
localStorage.setItem("token", data.token);
localStorage.setItem("name", name);
window.location.href = 'part/partIndex.html';
$.ajax({
type: "post",
url: "http://10.1.0.142:1999/login/userLogin",
data: {
username: loginName,
password: $.md5(password)
},
success: function (data) {
var apiUrl = "http://10.1.0.142:1999/";
localStorage.setItem("apiUrl", apiUrl);
if (data.code == "200") {
localStorage.setItem("token", data.token);
localStorage.setItem("name", name);
window.location.href = 'part/partIndex.html';
} else {
alert("没有权限!");
window.location.href = 'part/partIndex.html';
}
} else {
alert("没有权限!");
window.location.href = 'part/partIndex.html';
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert("未连接到服务器,请检查网络!"+XMLHttpRequest.status);
}
});
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("未连接到服务器,请检查网络!" + XMLHttpRequest.status);
}
});
}
//跳转维修任务列表
function machinesRepair(){
if(postName.indexOf("维修") != -1) {
function machinesRepair() {
if (postName.indexOf("维修") != -1) {
window.location.href = 'repair/repairItem.html';
//window.location.href = 'repair/repairTaskList.html';
} else {
alert("当前账户不是维修人员");
alert("当前账户不是维修人员");
}
}
//跳转报废任务列表
function machineScrap(){
if(postName.indexOf("检验") != -1) {
window.location.href = 'scrap/scrapTaskNewList.html';
function machineScrap() {
if (postName.indexOf("检验") != -1) {
window.location.href = 'scrap/scrapTaskNewList.html';
} else {
alert("当前账户不是检验员");
@ -146,54 +146,54 @@ function machineScrap(){
}
//跳转维修明细界面
function repairDetailList(){
window.location.href='repairDetailList.html';
function repairDetailList() {
window.location.href = 'repairDetailList.html';
}
//维修明细界面跳转至维修设备展示界面
function repairMachineList(){
window.location.href='repairMachineList.html';
function repairMachineList() {
window.location.href = 'repairMachineList.html';
}
//选择维修合格,添加维修配件等信息
function repairOperation(){
window.location.href='repairOperation.html';
function repairOperation() {
window.location.href = 'repairOperation.html';
}
//选择报废,添加报废信息
function scrapOperation(){
window.location.href='scrapOperation.html';
function scrapOperation() {
window.location.href = 'scrapOperation.html';
}
//计数机具选择维修合格,添加维修配件等信息
function repairNumsOperation(){
window.location.href='repairNumsOperation.html';
function repairNumsOperation() {
window.location.href = 'repairNumsOperation.html';
}
//计数机具选择报废,添加报废信息
function scrapNumsOperation(){
window.location.href='scrapNumsOperation.html';
function scrapNumsOperation() {
window.location.href = 'scrapNumsOperation.html';
}
//跳转至维修检验任务界面
function checkOutLib(){
if(postName.indexOf("检验") != -1) {
localStorage.setItem("flageInspect", 0);
window.location.href='repairInspect/newInspectTaskList.html';
function checkOutLib() {
if (postName.indexOf("检验") != -1) {
localStorage.setItem("flageInspect", 0);
window.location.href = 'repairInspect/newInspectTaskList.html';
} else {
alert("当前账户不是检验员");
alert("当前账户不是检验员");
}
}
//跳转至检验任务明细界面
function inspectDetailList(){
window.location.href='inspectDetailList.html';
function inspectDetailList() {
window.location.href = 'inspectDetailList.html';
}
//跳转至检验设备展示界面
function inspectMachineList(){
window.location.href='inspectMachineList.html';
function inspectMachineList() {
window.location.href = 'inspectMachineList.html';
}
////跳转至数量检验操作界面
@ -202,9 +202,9 @@ function inspectMachineList(){
//}
//跳转至数量检验操作界面
function inspectNumsOperation(){
function inspectNumsOperation() {
window.location.href='newInspectNumsOperation.html';
window.location.href = 'newInspectNumsOperation.html';
}
// 安全用品需求计划管理 - 需求申请
@ -219,7 +219,8 @@ function safetyPlanReview() {
// 安全用品需求计划管理 - 需求发货
function safetyPlanShipment() {
checkLoginAndNavigate('safetyPlan/safetyPlanIndex.html');
// checkLoginAndNavigate('safetyPlan/safetyPlanIndex.html');
checkLoginAndNavigate('safetyPlan/safetyPlanShipment.html');
}
// 检查登录并获取安全模块token然后导航
@ -252,10 +253,10 @@ function checkLoginAndNavigate(targetUrl) {
username: loginName,
password: $.md5(password)
},
success: function(data) {
success: function (data) {
console.log('✅ 安全模块登录API响应成功');
console.log('完整响应:', JSON.stringify(data, null, 2));
if(data.code == "200" || data.code == 200) {
if (data.code == "200" || data.code == 200) {
console.log('✅ 安全模块登录成功保存token');
localStorage.setItem("safetyToken", data.token);
console.log('安全模块Token已保存:', data.token);
@ -265,7 +266,7 @@ function checkLoginAndNavigate(targetUrl) {
alert("安全模块登录失败,请重新登录!");
}
},
error: function(xhr, textStatus, errorThrown) {
error: function (xhr, textStatus, errorThrown) {
console.error('❌ 安全模块登录API请求失败');
console.error('状态码:', xhr.status);
console.error('错误信息:', errorThrown);
@ -276,18 +277,18 @@ function checkLoginAndNavigate(targetUrl) {
}
$.ajaxSetup({
cache : false,
headers : {
"companyId" : localStorage.getItem("companyId")
cache: false,
headers: {
"companyId": localStorage.getItem("companyId")
}
});
mui.back = function() {
mui.back = function () {
layer.open({
content: '您确定要退出当前系统吗?',
style: 'font-size:1.1em',
btn: ['确定', '取消'],
yes: function(index) {
yes: function (index) {
plus.runtime.quit();
}
});

View File

@ -0,0 +1 @@
const commonUrl = 'http://192.168.0.133:8080/gz-car/';