|
|
@@ -0,0 +1,171 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html >
|
|
|
+<head>
|
|
|
+<meta http-equiv = 'refresh' charset="UTF-8" name="viewport"
|
|
|
+ content="width=device-width,initial-scale=1.0,user-scalable=0,
|
|
|
+ maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, width=device-width"/>
|
|
|
+<link rel="stylesheet" href="weui.min.css"/>
|
|
|
+<script src="jquery-1.8.2.min.js"></script>
|
|
|
+<title>submit</title>
|
|
|
+<!--
|
|
|
+表单标签: 表单标签的作用是用于提交数据给服务器的。
|
|
|
+
|
|
|
+ 表单标签的根标签是<form>标签
|
|
|
+
|
|
|
+常用的属性:
|
|
|
+ action: 该属性是用于指定提交数据的地址。
|
|
|
+ method: 指定表单的提交方式。
|
|
|
+ get : 默认使用的提交方式。 提交的数据会显示在地址栏上。
|
|
|
+ post : 提交的数据不会显示在地址栏上。
|
|
|
+
|
|
|
+注意: 表单项的数据如果需要提交到服务器上面,那么表单项必须要有name的属性值。
|
|
|
+-->
|
|
|
+
|
|
|
+
|
|
|
+ <!--JS交互本地测试html文件 可在submit SaveValue()方法中调用本地原生方法,成功后让后端人员调用该方法即可以了-->
|
|
|
+<link href="submit.css" rel="stylesheet">
|
|
|
+</head>
|
|
|
+<body padding-bottom="20px">
|
|
|
+<span style="font-size:18px">
|
|
|
+ <form id="form" action="http://218.17.158.219:8090/ERP/common/saveCommon.action?caller=SubsApply&formStore"
|
|
|
+ method="post" enctype="application/json">
|
|
|
+
|
|
|
+ <table border="0px" align="center" cellpadding="5px" cellspacing="0px">
|
|
|
+ <tr>
|
|
|
+ <td class="td1cls" valign="top">采购单分析</td>
|
|
|
+ <td>
|
|
|
+ <textarea class="textareacls" name="analysis" id="subinfo" rows="3" onmousedown="s(event,this)"></textarea>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="td1cls">单据日期</td>
|
|
|
+
|
|
|
+ <td >
|
|
|
+ <input class="inputcls"name="logOutTime" id="logOutTime" onclick="hitest"/>
|
|
|
+ <span id=""></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td class="td1cls">单据状态</td>
|
|
|
+ <td>
|
|
|
+ <input class="inputcls" name="Apply_State" id="Apply_State" value = "在录入" readonly="readonly"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="td1cls" >申请人</td>
|
|
|
+ <td>
|
|
|
+ <input class="inputcls" name="Applicant" id="Applicant" value=""/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="td1cls" >申请人岗位</td>
|
|
|
+ <td>
|
|
|
+ <input class="inputcls" name="Apply_Job" id = "Apply_Job"/>
|
|
|
+
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="td1cls" >申请部门</td>
|
|
|
+ <td>
|
|
|
+ <input class="inputcls" name="Apply_Department" id="Apply_Department"/>
|
|
|
+
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="td1cls" valign="top" onfocus="textfocus(this)" onblur="textblur(this)" id="Apply_Reason">申请原因</td>
|
|
|
+ <td>
|
|
|
+ <textarea placeholder="请输入,限150字..." class="textareacls" rows="7" maxlength="150" id="Apply_Reason" required></textarea>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td colspan="2" rowspan="2" align="center">
|
|
|
+ <input id="sub" type="submit" name="提交申请" value="提交申请" onclick="SaveValue()"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </form>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <!--申请单显示-->
|
|
|
+ <span style="font-size:18px;">
|
|
|
+ <script type="text/javascript">
|
|
|
+ <span style="white-space:pre"> </span> $.getJSON(URL,param,function(data){
|
|
|
+ <span style="white-space:pre"> </span> alert(data.type);
|
|
|
+ <span style="white-space:pre"> </span> $("form").setForm(data);
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+ </span>
|
|
|
+</body>
|
|
|
+
|
|
|
+
|
|
|
+ <!--单据基本信息显示-->
|
|
|
+ <script type="text/javascript">
|
|
|
+ var t=document.getElementById("logOutTime");
|
|
|
+ d=new Date();
|
|
|
+ t.value=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <!--申请单保存至本地-->
|
|
|
+ <script type="text/javascript">
|
|
|
+ function SaveValue(){
|
|
|
+
|
|
|
+ <!--var fs = new ActiveXObject("Scripting.FileSystemObject");//创建ActiveXObject对象得到文件对象-->
|
|
|
+ <!--var file = fs.CreateTextFile("E://sub.txt",true); //ActiveXObject对象得到文件对象-->
|
|
|
+ <!---->
|
|
|
+ <!--var date_ = document.getElementById("logOutTime").value;-->
|
|
|
+ <!--var status_ = document.getElementById("Apply_State").value;-->
|
|
|
+ <!--var empname_ = document.getElementById("Applicant").value;-->
|
|
|
+ <!--var empdep_ = document.getElementById("Apply_Department").value;-->
|
|
|
+ <!--var reason_ = document.getElementById("Apply_Reason").value;-->
|
|
|
+ <!---->
|
|
|
+ <!--file.WriteLine("单据日期\r\n"+date_+"单据状态\r\n"+status_-->
|
|
|
+ <!--+"申请人\r\n"+empname_+"申请人岗位\r\n"+empdep_-->
|
|
|
+ <!--+"申请原因\r\n"+reason_);-->
|
|
|
+ <!--file.close();-->
|
|
|
+ alert("you click 单据日期");
|
|
|
+ window.JSWebView.closeWebWindow();
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+
|
|
|
+<script type="text/javascript">
|
|
|
+ function hitest(){
|
|
|
+ alert("you click 单据日期");
|
|
|
+ window.JSWebView.closeWebWindow();
|
|
|
+}
|
|
|
+</script>
|
|
|
+<!--解决大部分浏览器输入法遮挡住输入框问题,但少数浏览器还是存在问题
|
|
|
+ 1.当textarea接收到focus事件时,自动将文本框滚动到屏幕顶端
|
|
|
+ 2.设计的输入框不要超过半个屏幕,如果一定要超过,textarea有change事件,计算输入了多少个字,相应的再把输入框向上滚动-->
|
|
|
+<script type='text/javascript'>
|
|
|
+ function textfocus(o){ o.style.position = 'fixed'; o.style.top = '50px'; o.style.zIndex = '999'; }
|
|
|
+ function textblur(o){ o.style.position = 'static'; o.style.top = 'auto'; }
|
|
|
+</script>
|
|
|
+
|
|
|
+<!--html5中新标签placeholder(显示提示字符)的浏览器兼容性问题-->
|
|
|
+<script type="text/javascript">
|
|
|
+ function placeholder(nodes,pcolor) {
|
|
|
+ if(nodes.length && !("placeholder" in document_createElement_x("input"))){
|
|
|
+ for(i=0;i
|
|
|
+ var self = nodes[i],
|
|
|
+ placeholder = self.getAttribute('placeholder') || '';
|
|
|
+ self.onfocus = function(){
|
|
|
+ if(self.value == placeholder){
|
|
|
+ self.value = '';
|
|
|
+ self.style.color = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.onblur = function(){
|
|
|
+ if(self.value == ''){
|
|
|
+ self.value = placeholder;
|
|
|
+ self.style.color = pcolor;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.value = placeholder;
|
|
|
+ self.style.color = pcolor;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</html>
|