1 Star 1 Fork 1

gujiejing / WEBWMS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
transformanage.php 7.48 KB
一键复制 编辑 原始数据 按行查看 历史
wisdom 提交于 2017-11-03 23:31 . upupup new alll
<?php
header('Content-type: text/html; charset=utf-8');
require_once('connDB.php');
if(!isset($_SESSION)){
session_start();
}
$editFormAction = $_SERVER['PHP_SELF'];
$sql="SELECT * FROM `transmanage` ORDER BY `transmanage`.`id` DESC ";
$result=mysql_query($sql,$dbc);
//$row_Rec=mysql_fetch_assoc($result);
?>
<html>
<head>
<title>运单管理</title>
<script src="utils.js" type="text/javascript"></script>
<script src="transformanage.js" type="text/javascript"></script>
<link rel="stylesheet" href="./themes/base/jquery.ui.all.css">
<script src="jquery-1.9.1.js" type="text/javascript"></script>
<script src="./ui/jquery.ui.core.js"></script>
<script src="./ui/jquery.ui.widget.js"></script>
<script src="./ui/jquery.ui.datepicker.js"></script>
<script src="./ui/jquery.ui.mouse.js"></script>
<script src="./ui/jquery.ui.draggable.js"></script>
<script src="./ui/jquery.ui.position.js"></script>
<script src="./ui/jquery.ui.resizable.js"></script>
<script src="./ui/jquery.ui.button.js"></script>
<script src="./ui/jquery.ui.dialog.js"></script>
<script src="./ui/jquery.ui.effect.js"></script>
<script src="./ui/jquery.ui.effect-blind.js"></script>
<script src="./ui/jquery.ui.effect-explode.js"></script>
<script src="./ui/jquery.ui.menu.js"></script>
<script src="./ui/jquery.ui.autocomplete.js"></script>
<link rel="stylesheet" href="demos.css">
<style type="text/css">
<!--
body {
#background-color: #00FFF1;
background:url(yh3.gif);
font-size: 62.5%;
}
table {
border-collapse : collapse;
background-color: #FFFFFF;
}
.STYLE2 {
background-color: #FFFFFF;
}
.STYLE3 {
#background-color: #00FFF1;
background:url(yh3.gif);
}
label, input { display:block; }
input.text { margin-bottom:12px; width:95%; padding: .4em; }
fieldset {
padding:0; border:0; margin-top:25px;
}
h1 { font-size: 1.2em; margin: .6em 0; }
div#users-contain { width: 350px; margin: 20px 0; }
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
div#users-contain table td, div#users-contain table th {
border: 1px solid #eee; padding: .6em 10px; text-align: left;
}
.ui-dialog .ui-state-error { padding: .3em; }
.validateTips { border: 1px solid transparent; padding: 0.3em; }
-->
</style>
</head>
<script type="text/javascript">
$(function(){
var DRIVERNAME = $("#DRIVERNAME"),
DRIVERPHONE = $("#DRIVERPHONE"),
CHEPAI = $("#CHEPAI"),
REMARK1 = $("#REMARK1"),
allFields = $( [] ).add( DRIVERNAME ).add( DRIVERPHONE ).add( CHEPAI ).add( REMARK1 ),
tips = $(".validateTips");
$("#dialog-form").dialog({
autoOpen:false,
height: 400,
width: 640,
modal:true,
buttons: {
Ok: function(){
console.log("DRIVERNAME->"+DRIVERNAME.val());
console.log("DRIVERPHONE->"+DRIVERPHONE.val());
console.log("CHEPAI->"+CHEPAI.val());
console.log("REMARK1->"+REMARK1.val());
var DRIVERNAME1=DRIVERNAME.val(),
DRIVERPHONE1=DRIVERPHONE.val(),
CHEPAI1=CHEPAI.val(),
REMARK11=REMARK1.val();
sendNewTransfor(DRIVERNAME1,DRIVERPHONE1,CHEPAI1,REMARK11);
},
Cancel: function(){
$(this).dialog("close");
}
},
close: function(){}
});
$("#addNewTransOrder")
.button()
.click(function() {
$("#dialog-form").dialog("open");
});
});
</script>
<body align="center">
<div id="dialog-form" title="Create New Transfor">
<p class="validateTips">运单输入框</p>
<form>
<fieldset>
<label for="DRIVERNAME" align="left">司机名 DRIVERNAME</label>
<input type="text" name="DRIVERNAME" id="DRIVERNAME" class="text ui-widget-content ui-corner-all"/>
<label for="DRIVERPHONE" align="left">司机电话 DRIVERPHONE</label>
<input type="text" name="DRIVERPHONE" id="DRIVERPHONE" class="text ui-widget-content ui-corner-all"/>
<label for="CHEPAI" align="left">车牌号 CHEPAI</label>
<input type="text" name="CHEPAI" id="CHEPAI" class="text ui-widget-content ui-corner-all"/>
<label for="REMARK1" align="left">备注 REMARK1</label>
<input type="text" name="REMARK1" id="REMARK1" class="text ui-widget-content ui-corner-all"/>
</fieldset>
</form>
</div>
<button id="addNewTransOrder" style="width:175;height:40">添加新运单</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button id="shippedTransOrder" style="width:175;height:40">发运勾选运单</button>
<br/><p><p><p>
<hr>
<!--id TRSID 云单号 TRASTATE 运单状态 CREATEDATE 创建日期 DRIVERNAME 司机名 DRIVERPHONE 司机手机号 CHEPAI 车牌号 REMARK1 REMARK2 REMARK3 REMARK4 REMARK5-->
<div id="showData">
<p align="left">
<button id="btn1">全选</button>&nbsp;&nbsp;&nbsp;
<!--<button id="btn2">反选</button>&nbsp;&nbsp;&nbsp;-->
<button id="btn3">取消选择</button>
</p>
<table border = "0" cellpadding="2" cellspacing="1" width="100%">
<tr><td>复选
<!--<input type="checkbox" name="checkbox" value="checkbox1">-->
</td><td>id</td><td>TRSID</td><td>TRASTATE</td><td>CREATEDATE</td><td>DRIVERNAME</td><td>DRIVERPHONE</td><td>CHEPAI</td><td>REMARK1</td><td>REMARK2</td><td align="center">&nbsp;&nbsp;&nbsp;操作&nbsp;&nbsp;&nbsp;</td></tr>
<?php $i1=1;
while($row_Rec=mysql_fetch_assoc($result)){?>
<tr><td><input type="checkbox" name="checkbox" value="<?php echo $row_Rec['TRSID']?>">
</td><td>
<a href="transform.php?id=<?php echo $row_Rec['id']?>">
<?php echo $row_Rec['id']?>
</a>
</td><td><?php echo $row_Rec['TRSID']?>
</td><td><?php echo $row_Rec['TRASTATE']?>
</td><td><?php echo $row_Rec['CREATEDATE']?>
</td><td><?php echo $row_Rec['DRIVERNAME']?>
</td><td><?php echo $row_Rec['DRIVERPHONE']?>
</td><td><?php echo $row_Rec['CHEPAI']?>
</td><td><?php echo $row_Rec['REMARK1']?>
</td><td><?php echo $row_Rec['REMARK2']?>
</td><td align="center">
<a href="transform.php?id=<?php echo $row_Rec['id']?>">
modify
</a>&nbsp;&nbsp;&nbsp;
|
&nbsp;&nbsp;&nbsp;
<a href="#" id="<?php echo $row_Rec['id']?>">delete</a>
</td></tr>
<?php } ?>
</table>
</div>
</body>
<script type="text/javascript">
$(function(){
$("#btn1").bind("click", function () {
//$("[name = checkbox]:checkbox").attr("checked", true);
console.log("checked all");
//$("[name='checkbox']").attr("checked",'true');
//$("input:checkbox").each(function(){
// $(this).attr("checked",true);
//});
for(i=0;i<document.getElementsByName("checkbox").length;i++)
{
document.getElementsByName("checkbox")[i].checked = "checked";
}
});
$("#btn3").bind("click", function () {
$("[name = checkbox]:checkbox").attr("checked", false);
});
/*$("#btn2").click(function(){
$("[name='checkbox']:checkbox").each(function(){ //反选
//if($(this).attr("checked")){
if ($(this).is(":checked")) {
console.log("checked");
//$("[name = checkbox]:checkbox").attr("checked", false);
$(this).removeAttr("checked");
}else{
console.log("unchecked");
//$("[name = checkbox]:checkbox").attr("checked", true);
$(this).attr("checked",'true');
}
})
});*/
});
$(document).ready(function(){
$("#shippedTransOrder").click(function(){
console.log("shippedTransOrder click");
var str="",str1="";
$("[name = checkbox]:checkbox").each(function(){
if ($(this).is(":checked")) {
console.log($(this).val());
str+=$(this).val()+"\r"+"\n";
str1+=$(this).val()+"|"
}
});
alert("以下运单号,将被发运\n"+str);
sendTransportState(str1);
});
});
</script>
</html>
PHP
1
https://gitee.com/laotou99_admin/WEBWMS.git
git@gitee.com:laotou99_admin/WEBWMS.git
laotou99_admin
WEBWMS
WEBWMS
master

搜索帮助