| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- <%@ page language="java" contentType="text/html;charset=GBK" import="java.util.*,java.net.*" pageEncoding="GBK"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>列表</title>
- <script type="text/javascript">
- var pictype = "0";
- </script>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <script src="/shares/js/yw/sales/ligerui.all.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script src="/shares/js/yw/sales/publicutils.js" type="text/javascript"></script>
- <style type="text/css">
- body {padding: 5px; margin: 0;}
- #layout1 {width:99%; margin:0; padding:0;}
- .l-button {margin-left: 1px;}
- .l-layout-left {overflow-y: auto;}
- </style>
- <script type="text/javascript">
- /**
- * 新增,修改
- */
- function onSubmitForm(){
- if(!functionisvaldate("areaid","区域",1,20)){
- return;
- }
- if(!functionisvaldate("storeid","门店编码",1,10)){
- return;
- }
- if(!functionisvaldate("storename","门店名称",1,20)){
- return;
- }
- var supervisor = $("#supervisor").val();
- if(supervisor == "" || supervisor == null || supervisor == undefined || "null" == supervisor){
- alert("主管不能为空");
- $("#supervisor").focus();
- return;
- }
- var checkText=$("#supervisor").find("option:selected").text();
- $("#supervisorname").attr("value",checkText);
-
-
- var locationx = $("#locationx").val();
- var locationy = $("#locationy").val();
-
-
- if(locationx == ""){
- alert("经度不能为空");
- $("#locationx").focus();
- return;
- }
-
- if(locationy == ""){
- alert("纬度不能为空");
- $("#locationy").focus();
- return;
- }
-
- if("" != locationx.replace(/^(-?\d*)\.?\d{1,10}$/,"")) {
- alert("经度只能输入数字,并且小数点后最多保留10位");
- $("#locationx").focus();
- return;
- }
- if(locationx < 0 || locationx > 180){
- alert("经度的取值范围在0-180 之间");
- $("#locationx").focus();
- return;
- }
-
- if("" != locationy.replace(/^(-?\d*)\.?\d{1,10}$/,"")) {
- alert("纬度只能输入数字,并且小数点后最多保留10位");
- $("#locationy").focus();
- return;
- }
-
- if(locationy < 0 || locationy > 90){
- alert("纬度的取值范围在0-90 之间");
- $("#locationy").focus();
- return;
- }
-
-
- var selectText = $("#supervisor").find('option:selected').text();
- $("#supervisorname").val(selectText);
-
- if(!functionisvaldate("address","地址",0,80)){
- return;
- }
- if(!functionisvaldate("areaid","区域",1,20)){
- return;
- }
-
- $("#form1").submit();
- }
- function getautogeneration(v){
- $.ajax({
- type: "post",
- url: "${pageContext.request.contextPath }/yw/sales/basicInformation/ajax.jsp",
- data: "",
- success: function (vv){
- $("#" + v +"").attr("value", vv);
- }
- });
- }
- function onOpenBDMap(){
- var params = "?locationx=" + $("#locationx").val() + "&locationy=" + $("#locationy").val();
- window.top.$.ligerDialog.open({title: "选择经纬度", height: 450,width:900, url: PROJECT_NAME +'/yw/sales/basicInformation/selectmap.jsp' + params, isResize: true,
- buttons: [
- { text: '确定', onclick: function (item, dialog) {
- var txtPointX = dialog.frame.$("#txtPointX").html();
- var txtPointY = dialog.frame.$("#txtPointY").html();
- if(txtPointX == ""){
- alert("请在地图上选择坐标");
- return;
- }
- $("#locationx").attr("value",txtPointX);
- $("#locationy").attr("value",txtPointY);
- dialog.close();
- }
- },
- { text: '取消', onclick: function (item, dialog) {dialog.close(); }}]
- });
- }
- </script>
- </head>
- <body>
- <form id="form1" name="form1" action="BasicInformationAction.do" method="post">
- <div id="title" class="form-button">
- <input type="button" value="关闭" class="l-button" onclick="closeWindow();"/>
- <input id="btnSave" type="button" class="l-button" value="保存" onclick="onSubmitForm()"/>
- </div>
- <div class="container-layout">
- <div class="forum-container">
- <table class="l-table-edit line">
- <tr><th colspan="2"><%="create".equals(request.getParameter("task")) ? "新增微信门店":"修改微信门店" %></th></tr>
- <tr>
- <td class="l-table-edit-text" width="10%">区域<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <input type="text" id="areaname" name="areaname" style="width: 310px;" />
- <input type="hidden" id="areaid" name="areaid" style="width: 200px;" />
- <script type="text/javascript">
- $("#areaname").ligerComboBox({
- selectBoxWidth: 320,
- selectBoxHeight: 280,
- valueField: "id", // 选中值的id
- valueFieldID : "areaid", // 把选中的值放到隐藏框里面
- treeLeafOnly: true, <%--是否只选择叶子 tree 是 false 不是 --%>
- tree: {
- url: "${pageContext.request.contextPath}/UtilsAction.do?task=tree&treetype=areatree&select=ALL&time=" + new Date().getTime(),
- checkbox: false,
- textFieldName:"text",
- idFieldName:"id",
- parentIDFieldName:"pid"
- }
- });
- </script>
- <style>
- .l-box-select-inner{
- background-color:#eeeeee;
- border :1px solid Silver;
- }
- .l-text {
- position:relative;
- height:28px;
- line-height:28px;
- width:320px;
- text-shadow: 0 1px 1px rgba(255,255,255,0.75);
- </style>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="10%">门店编码<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <input type="text" id="storeid" name="storeid" value="${result.storeid }" style="width: 200px"/>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="10%">门店名称<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <input type="text" id="storename" name="storename" value="${result.storename }" style="width: 200px"/>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="10%">主管<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <select name="supervisor" id="supervisor" style="width: 208px"></select>
- <script type="text/javascript">
- getselect("user", "supervisor", "<%=request.getParameter("menu_code") %>","${result.supervisor }");
- </script>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="10%">地址<font color="red"></font>:</td>
- <td class="l-table-edit-td">
- <input type="text" id="address" name="address" value="${result.address }" style="width: 200px"/>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="10%">经度<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <input type="text" id="locationx" name="locationx" value="${result.locationx }" style="width: 200px"/>
- <input id="btnSave" type="button" class="l-button" value="地图选择" onclick="onOpenBDMap()"/>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="10%">纬度<font color="red">*</font>:</td>
- <td class="l-table-edit-td">
- <input type="text" id="locationy" name="locationy" value="${result.locationy }" style="width: 200px"/>
- </td>
- </tr>
- </table>
- </div>
- <input type="hidden" id="columnname" name="columnname" value="storeid,storename,supervisor,supervisorname,locationx,locationy,address,areaid,areaname">
- <input type="hidden" id="supervisorname" name="supervisorname" value="">
- <input type="hidden" id="columisvaldate" name="columisvaldate" value="storeid,storename,supervisor,areaid"> <%-- 验证次字段不能为空 只能验证一个 --%>
- <input type="hidden" id="columnvalue" name="columnvalue" value="已有相同的门店"><%-- 验证此字段不能为空,弹出框的值 --%>
- <input type="hidden" id="title" name="title" value="微信门店信息">
- <input type="hidden" id="tabid" name="tabid" value="<%=request.getParameter("tabid").replace("amp;","&") %>">
- <input type="hidden" id="task" name="task" value="<%="create".equals(request.getParameter("task")) ? request.getParameter("task"):"edit" %>">
- <input type="hidden" id="select_type_id" name="select_type_id" value="${result.id }">
- <input type="hidden" id="menu_code" name="menu_code" value="<%=request.getParameter("menu_code") %>">
- <input type="hidden" id="supervisorname" name="supervisorname" value="">
- </div>
- </form>
- </body>
- <script type="text/javascript">
- var tt = setTimeout("setareaid()",200);
- function setareaid(){
- $("#areaid").attr("value","${result.areaid }");
- $("#areaname").attr("value","${result.areaname }");
- clearTimeout(tt);
- }
- $("#supervisor").attr("value","${result.supervisor }");
- </script>
- </html>
|