1 Star 0 Fork 1

yihoc/WEBWMS

forked from gujiejing/WEBWMS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cust.php 9.43 KB
一键复制 编辑 原始数据 按行查看 历史
顾洁晶 提交于 2018-05-18 13:50 . aabbcc
<?php
$dbc = mysql_connect("localhost","root","root");
mysql_select_db("webwms",$dbc);
mysql_query("set names utf8");
$sql="SELECT * FROM cust order by id desc;";
$result = mysql_query($sql,$dbc);
$row_Rec = mysql_fetch_assoc($result);
//echo $row_Rec['id'];
?>
<html>
<head>
<meta charset="UTF-8">
<title>
客户管理页
</title>
<link rel="stylesheet" type="text/css" href="./themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="./themes/icon.css">
<link rel="stylesheet" type="text/css" href="./themes/base/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="./demo1.css">
<script type="text/javascript"
src="./jquery.min.js"></script>
<script type="text/javascript"
src="./jquery.easyui.min.js"></script>
<script type="text/javascript"
src="./ui/jquery-ui.js"></script>
<script src="utils.js" type="text/javascript"></script>
<script src="cust.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
#background-color: #00FFF1;
background:url(yh3.gif);
}
table {
border-collapse : collapse;
background-color: #FFFFFF;
}
.STYLE1 {color: #FFFF00;}
.STYLE2 {
background-color: #FFFFFF;
}
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>
<body>
<!--<br/><br/><br/><br/><br/>-->
<br/>
<p align="center">
<b>
客户信息管理(包含供应商)
<b>
</p>
</p>
<p>
<div align="center">&nbsp;&nbsp;
<!--
<button type="button" id="addNew" onclick="addNew2()">
新增
</button>&nbsp;&nbsp;
<input style="width:400px"
name="researcht"
type="text"
id="researcht"
value="请输入查找内容(可模糊查询)"/>
&nbsp;&nbsp;
<button type="button" id="researchb" onclick="research()">
查找
</button>&nbsp;&nbsp;
<br/>
<div id="addNewArea" class="STYLE2">
</div>
<br>
</p>
<br>
<div style="margin:20px 0;">
客户信息管理(包含供应商)
</div>
-->
<table id="dg"
class="easyui-datagrid"
title="客户信息表"
style="width: 100ps;height:640px"
data-options="singleSelect: true,
iconCls: 'icon-edit',
toolbar: '#tb',
onClickCell: onClickCell,
onClickRow: onClickRow,
url:'showcustdata.php',
method:'get'">
<thead>
<tr>
<th data-options="field:'id',width:40">id</th>
<th data-options="field:'custid',width:100,align:'right',editor:'textbox'">
custid(客户编号)
</th>
<th data-options="field:'custcn',width:120,align:'center',editor:'textbox'">
custcn(客户中文名)
</th>
<th data-options="field:'custen',width:240,editor:'textbox'">
custen(客户英文名)
</th>
<th data-options="field:'addr',width:320,align:'left',editor:'textbox'">
addr(客户地址)
</th>
<th data-options="field:'tel',width:60,align:'center',editor:'textbox'">
tel(电话)
</th>
<th data-options="field:'contact',width:100,editor:'textbox'">
contact(联系人)
</th>
<th data-options="field:'type',width:80,editor:'textbox'">
type(类型)
</th>
</td>
</thead>
</table>
<div id="tb" style="height:auto">
<a href="javascript:void(0)"
class="easyui-linkbutton"
data-options="iconCls:'icon-add',plain:true"
onclick="addNew2()" >
新增
</a>
<a href="javascript:void(0)"
class="easyui-linkbutton"
data-options="iconCls:'icon-remove',plain:true"
onclick="delete1()">
删除
</a>
<a href="javascript:void(0)"
class="easyui-linkbutton"
data-options="iconCls:'icon-ok',plain:true"
onclick="accept()">
保存
</a>
<a href="javascript:void(0)"
class="easyui-linkbutton"
data-options="iconCls:'icon-edit',plain:true"
onclick="edit1()">
编辑
</a>
<a href="javascript:void(0)"
class="easyui-linkbutton"
data-options="iconCls:'icon-search',plain:true"
onclick="openFindsDialog()">
查找
</a>
</div>
</div>
<div id="add_cust"></div>
<div id="dialog-form-del" title="删除信息">
<p class="validateTips">
删除信息确认-是否删除以下ID
</p>
<form action="delcust.php" method="POST" id="delcustform" name="delcustform" >
<input name="id" type="hidden" id="idd1" value="" />
<input name="delsure" type="hidden" id="delsure" value="true"/>
<p>
<div id="delID"></div>
<div id="Dcustid"></div>
<div id="Dcustcn"></div>
<div id="Dcusten"></div>
<div id="Daddr"></div>
<div id="Dtel"></div>
<div id="Dcontact"></div>
<div id="Dtype"></div>
</p>
<!--
<button type=button id="cancelDetele" onclick="cancelDetele()">
取消删除
</button>
<input type="submit"
name="submit"
value="确定删除" />
-->
</form>
</div>
<div id="dialog-form" title="添加编辑客户信息">
<p class="validateTips">
添加编辑客户信息
</p>
<form id="form1" name="form1" action="addcust.php" method="POST">
<input id="id" name="id" type="hidden" value=""/>
<fieldset>
<label for="custid">客户ID</label>
<input type="text"
name="custid"
id="custid"
value="custid"
class="text ui-widget-content ui-corner-all" />
<label for="custcn">客户中文名</label>
<input type="text"
name="custcn"
id="custcn"
value="custcn"
class="text ui-widget-content ui-corner-all" />
<label for="custen">
客户英文名
</label>
<input type="text"
name="custen"
id="custen"
value="custen"
class="text ui-widget-content ui-corner-all" />
<label for="addr">
客户地址(取货地址)
</label>
<input type="text"
name="addr"
id="addr"
value="addr"
class="text ui-widget-content ui-corner-all" />
<label for="tel">
客户电话
</label>
<input type="text"
name="tel"
id="tel"
value="tel"
class="text ui-widget-content ui-corner-all" />
<label for="contact">
客户联系人
</label>
<input type="text"
name="contact"
id="contact"
value="contact"
class="text ui-widget-content ui-corner-all" />
<label for="type">
客户类型
</label>
<input type="text"
name="type"
id="type"
value="type"
class="text ui-widget-content ui-corner-all" />
</fieldset>
<!--
<button type="button" id="addNew" onclick="">
新增
</button>&nbsp;&nbsp;
<button type="button" id="addNew" onclick="">
关闭
</button>&nbsp;&nbsp;
-->
</form>
</div>
<div id="search_form1" title="查找客户信息">
<p class="validateTips">
查找客户信息
</p>
<form>
<fieldset>
<label>客户ID(模糊查询)</label>
<input type="text"
name="custid"
id="custid1"
value="custid"
style="width:100%"/>
<label>客户中文名</label>
<select id="select_custcn"
name="select_custcn"
style="width:100%">
<option value="1">---</option>
</select>
<!--<input id="cc"
class="easyui-combobox"
name="dept"
data-options="valueField:'id',textField:'text'" />
<select id="cc" class="easyui-combobox" name="dept" style="width:200px;">
<option value="aa">aitem1</option>
<option>bitem2</option>
</select>-->
<label>客户英文名</label>
<select id="select_custen"
name="select_custen"
style="width:100%" >
<option value="2">---</option>
</select>
<label>客户电话</label>
<input id="select_tel" name="select_tel" type="text" style="width:100%">
<label>客户联系人</label>
<input id="select_contact" name="select_contact" type="text" style="width:100%">
<label>客户类型</label>
<input id="select_type" name="select_type" type="text" style="width:100%">
</fieldset>
</form>
</div>
</body>
<script type="text/javascript">
var editIndex = undefined;
function endEditing(){
/*if (editIndex == undefined){return true}
if ($('#dg').datagrid('validateRow', editIndex)){
$('#dg').datagrid('endEdit', editIndex);
editIndex = undefined;
//console.log("true")
return true;
} else {
//console.log("false")
return false;
}*/
}
function onClickCell(index, field){
console.log("index->"+index);
console.log("field->"+field);
/*if (editIndex != index){
if (endEditing()){
$('#dg').datagrid('selectRow', index)
.datagrid('beginEdit', index);
var ed = $('#dg').datagrid('getEditor', {index:index,field:field});
console.log("ed->"+ed);
if (ed){
console.log("ed->"+ed);
($(ed.target).data('textbox') ? $(ed.target).textbox('textbox') : $(ed.target)).focus();
}
editIndex = index;
} else {
setTimeout(function(){
$('#dg').datagrid('selectRow', editIndex);
},0);
}
}*/
}
function onEndEdit(index, row){
/* test
var ed = $(this).datagrid('getEditor', {
index: index,
field: 'productid'
});
row.productname = $(ed.target).combobox('getText');
*/
}
</script>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/yihoc/WEBWMS.git
git@gitee.com:yihoc/WEBWMS.git
yihoc
WEBWMS
WEBWMS
master

搜索帮助