上传文件至 /
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
function tokenEncoder(password, date){
|
||||
keyword = "213jhkjhg*&^";
|
||||
token = password + keyword + date;
|
||||
return token;
|
||||
}
|
||||
|
||||
function getDate(){
|
||||
let now = new Date();
|
||||
let year = now.getFullYear();
|
||||
let month = now.getMonth() + 1;
|
||||
let date = year + "-" + month;
|
||||
return date;
|
||||
}
|
||||
|
||||
|
||||
let localToken = localStorage.getItem("token");
|
||||
if(localToken === "" || localToken === null){
|
||||
var password=""
|
||||
password=prompt('请输入密码(本网站需输入密码才可以进入):','');
|
||||
function custom_close()
|
||||
{
|
||||
window.opener=null;
|
||||
window.open('','_self');
|
||||
window.close();
|
||||
}
|
||||
if (password !='yys')
|
||||
{alert("密码不正确,无法进入本站!!!")
|
||||
|
||||
custom_close();
|
||||
alert("即将打开百度")//加这一段是为了避免有些浏览器不支持关闭浏览器的js ,所以请求跳转到一个新页面!
|
||||
window.location.href='http://www.baidu.com';
|
||||
}else{
|
||||
let token = tokenEncoder(password, getDate());
|
||||
localStorage.setItem("token", token);
|
||||
}
|
||||
}else{
|
||||
let token = tokenEncoder('yys', getDate());
|
||||
if(token != localToken){
|
||||
var password=""
|
||||
password=prompt('请输入密码(本网站需输入密码才可以进入):','');
|
||||
function custom_close(){
|
||||
window.opener=null;
|
||||
window.open('','_self');
|
||||
window.close();
|
||||
}
|
||||
if (password !='yys'){
|
||||
alert("密码不正确,无法进入本站!!!")
|
||||
|
||||
custom_close();
|
||||
alert("即将打开百度")//加这一段是为了避免有些浏览器不支持关闭浏览器的js ,所以请求跳转到一个新页面!
|
||||
window.location.href='http://www.baidu.com';
|
||||
}else{
|
||||
let token = tokenEncoder(password, getDate());
|
||||
localStorage.setItem("token", token);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="index.js"></script>
|
||||
<style>
|
||||
.container{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tb{
|
||||
border-collapse: collapse;
|
||||
border: 2px solid rgb(140, 140, 140);
|
||||
letter-spacing: 1px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
th,
|
||||
td{
|
||||
border: 1px solid rgb(160 160 160);
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
thead,
|
||||
tfoot {
|
||||
background-color: rgb(228 240 245);
|
||||
}
|
||||
.select-box{
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<form action="" method="post" name="selectForm">
|
||||
<div class="select-box">
|
||||
|
||||
<input type="text" name="ckdm" value="" placeholder="仓库代码"/>
|
||||
<input type="text" name="spdm" value="" placeholder="商品代码"/>
|
||||
|
||||
<input type="submit" name="selectSub" value="查询"/>
|
||||
</div>
|
||||
<?php
|
||||
$dbConnect = mysqli_connect('162.14.110.130', 'yysjxc', '7XyMdMExNKNMwMRb', 'yysjxc');
|
||||
$dbConnect->query("set names 'utf8'"); //utf8防止乱码
|
||||
if(!$dbConnect){
|
||||
exit('数据库连接失败!');
|
||||
}
|
||||
if(!empty($_POST["selectSub"])){
|
||||
$keyword1 = $_POST["ckdm"];
|
||||
$keyword2 = $_POST["spdm"];
|
||||
if($keyword1 == "" || $keyword2 == "" ){
|
||||
echo "<script>alert('筛选条件不能为空!');</script>";
|
||||
}else{
|
||||
$data = mysqli_query($dbConnect, "select
|
||||
distinct lxmc,djmc,djbh,qrrq,dm1,spdm,ckj,GG1DM,
|
||||
sum(case when GG2DM='X210' or GG2DM='T195' then -SL else null end) as wz1,
|
||||
sum(case when GG2DM='215' or GG2DM='T200' then -SL else null end) as wz2,
|
||||
sum(case when GG2DM='220' or GG2DM='205' then -SL else null end) as wz3,
|
||||
sum(case when GG2DM='225' or GG2DM='210' then -SL else null end) as wz4,
|
||||
sum(case when GG2DM='230' or GG2DM='T215' then -SL else null end) as wz5,
|
||||
sum(case when GG2DM='235' or GG2DM='T220' then -SL else null end) as wz6,
|
||||
sum(case when GG2DM='240' or GG2DM='T225' then -SL else null end) as wz7,
|
||||
sum(case when GG2DM='245' or gg2dm='T230' then -SL else null end) as wz8,
|
||||
sum(case when GG2DM='250' or gg2dm='T235' then -SL else null end) as wz9,
|
||||
sum(case when GG2DM='255' then -SL else null end) as wz10,
|
||||
sum(case when GG2DM='260' then -SL else null end) as wz11,
|
||||
sum(case when GG2DM='265' then -SL else null end) as wz12,
|
||||
sum(case when GG2DM='270' then -SL else null end) as wz13,
|
||||
sum(case when GG2DM='275' then -SL else null end) as wz14,
|
||||
sum(case when GG2DM='280' then -SL else null end) as wz15,
|
||||
sum(case when GG2DM='000' then -SL else null end) as wz16
|
||||
from v_jxc
|
||||
where
|
||||
spdm like '%".$keyword2."%' and
|
||||
dm1 like '%".$keyword1."%'
|
||||
GROUP BY lxmc,djmc,djbh,qrrq,dm1,spdm,ckj,GG1DM
|
||||
order by qrrq desc
|
||||
limit 300
|
||||
");
|
||||
|
||||
|
||||
if($data){
|
||||
echo "
|
||||
<table class='tb'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>类型名称</th>
|
||||
<th>单据名称</th>
|
||||
<th>单据编号</th>
|
||||
<th>确认日期</th>
|
||||
<th>客户代码</th>
|
||||
<th>商品代码</th>
|
||||
<th>出库价格</th>
|
||||
<th>颜色代码</th>
|
||||
<th>X210<br />T195</th>
|
||||
<th>215<br />T200</th>
|
||||
<th>220<br />205</th>
|
||||
<th>225<br />210</th>
|
||||
<th>230<br />T215</th>
|
||||
<th>235<br />T220</th>
|
||||
<th>240<br />T225</th>
|
||||
<th>245<br />T230</th>
|
||||
<th>250<br />T235</th>
|
||||
<th>255<br /></th>
|
||||
<th>260<br /></th>
|
||||
<th>265<br /></th>
|
||||
<th>270<br /></th>
|
||||
<th>275<br /></th>
|
||||
<th>280<br /></th>
|
||||
<th>均码<br /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
";
|
||||
while ($row = mysqli_fetch_array($data)){
|
||||
echo '<tr>';
|
||||
echo "
|
||||
<td>$row[0]</td>
|
||||
<td>$row[1]</td>
|
||||
<td>$row[2]</td>
|
||||
<td>$row[3]</td>
|
||||
<td>$row[4]</td>
|
||||
<td>$row[5]</td>
|
||||
<td>$row[6]</td>
|
||||
<td>$row[7]</td>
|
||||
<td>$row[8]</td>
|
||||
<td>$row[9]</td>
|
||||
<td>$row[10]</td>
|
||||
<td>$row[11]</td>
|
||||
<td>$row[12]</td>
|
||||
<td>$row[13]</td>
|
||||
<td>$row[14]</td>
|
||||
<td>$row[15]</td>
|
||||
<td>$row[16]</td>
|
||||
<td>$row[17]</td>
|
||||
<td>$row[18]</td>
|
||||
<td>$row[19]</td>
|
||||
<td>$row[20]</td>
|
||||
<td>$row[21]</td>
|
||||
<td>$row[22]</td>
|
||||
<td>$row[23]</td>
|
||||
";
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
}
|
||||
}
|
||||
}
|
||||
mysqli_close($dbConnect);
|
||||
?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user