| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- <%@ page language="java" contentType="text/html;charset=GBK"
- pageEncoding="GBK"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!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>
- <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
- <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <link href="/shares/css/yw/master1/reset.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 type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/file.js"></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/ligerDateEditor.js" type="text/javascript"></script>
- <script src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js" type="text/javascript" ></script>
- <!-- 选择窗口需要加载的js文件 start-->
- <script src="${pageContext.request.contextPath}/liger/lib/json2.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
- <script type="text/javascript" src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"></script>
- <script type="text/javascript" src="/shares/js/yw/erp/stockRemove.js"></script>
- <link rel="stylesheet" type="text/css" href="/shares/css/yw/master1/win/jquery.jscrollpane.codrops1.css" />
- <script type="text/javascript" src="/shares/js/yw/master1/jquery.mousewheel.js"></script>
- <!-- the jScrollPane script -->
- <script type="text/javascript" src="/shares/js/yw/master1/jquery.jscrollpane.min.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/scroll-startstop.events.jquery.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/scroll.js"></script>
- <style type="text/css">
- body {
- background:#fff;
- }
- </style>
- <script type="text/javascript">
- var stockRemoveDetailData = ${requestScope.Rows};
- var task = "${requestScope.task}";
- var locationobjs;
- $(f_initGrid);
- $(function (){
- loadTypeTree("usertree",{type:"singleuser",tab:"1,2",backId:"stock_remove_user",backName:"stock_remove_user_name"});
- $("#stock_remove_date").ligerDateEditor({ showTime: true, labelAlign: 'left', showTime:false, width:150,height:21});
- var selectFromDepot = "${requestScope.stockRemove.stock_remove_from_depot}";
- if (selectFromDepot != null && selectFromDepot != "") {
- $("#stock_remove_from_depot").val(selectFromDepot);
- }
- var selectFromLocation = "${requestScope.stockRemove.stock_remove_from_location}";
- if (selectFromLocation != null && selectFromLocation != "") {
- getLocations("stock_remove_from_depot","stock_remove_from_location");
- };
- var selectToDepot = "${requestScope.stockRemove.stock_remove_to_depot}";
- if (selectToDepot != null && selectToDepot != "") {
- $("#stock_remove_to_depot").val(selectToDepot);
- }
- var selectToLocation = "${requestScope.stockRemove.stock_remove_to_location}";
- if (selectToLocation != null && selectToLocation != "") {
- getLocations("stock_remove_to_depot","stock_remove_to_location");
- };
- });
- function getLocations(depot,location){
- $("#"+location).empty();
- $('#'+location).append("<option value=''>--请选择--</option> ");
- var depot_val=$('#'+depot).val();
- $.ajax({
- url:"locationAction.do?date="+new Date()+"&task=getLocations",
- type:"post",
- dataType:"json",
- data:"depot_id="+ $("#"+depot).val(),
- success:function(data){
- locationobjs = data;
- if(locationobjs.length == 0){
- if(depot=="stock_remove_from_depot")
- $("#selectloc1").hide();
- else
- $("#selectloc2").hide();
- }else{
- if(depot=="stock_remove_from_depot")
- $("#selectloc1").show();
- else
- $("#selectloc2").show();
- for(var i=0;i<locationobjs.length;i++){
- $('#'+location).append("<option value='"+locationobjs[i].location_id+"'>"+locationobjs[i].location_name+"</option>");
- }
- if(depot=="stock_remove_from_depot")
- $("#"+location).val("${requestScope.stockRemove.stock_remove_from_location}");
- else
- $("#"+location).val("${requestScope.stockRemove.stock_remove_to_location}");
-
- };
- hasDetails();
- }
- });
- }
-
- function isSelDepot(){
- var stock_remove_depot_val=$('#stock_remove_from_depot').val();
- if(stock_remove_depot_val == ""){
- $.ligerDialog.warn("请先选择转出仓库 !");
- }else{
- if(locationobjs != null && locationobjs != "" && locationobjs.length > 0){
- var stock_remove_location_val = $('#stock_remove_from_location').val();
- if(stock_remove_location_val == ""){
- $.ligerDialog.warn("请先选择库位 !");
- }else{
- f_import();
- }
- }else{
- f_import();
- }
-
- }
- }
- function checkForm() {
- var rs = $.validate({
- name : "stock_remove_num",
- model : [ {
- type : "require",
- msg : "调拨单号不能为空!",
- }]
- });
- var rs = $.validate({
- name : "stock_remove_title",
- model : [ {
- type : "require",
- msg : "调拨主题不能为空!",
- }]
- });
- rs = $.validate({
- name : "stock_remove_user_name",
- model : [ {
- type : "require",
- msg : "调拨人不能为空!",
- }]
- }) && rs;
- rs = $.validate({
- name : "stock_remove_date",
- model : [ {
- type : "require",
- msg : "调拨日期不能为空!"
- }]
- }) && rs;
- rs = $.validate({
- name : "stock_remove_from_depot",
- model : [ {
- type : "require",
- msg : "转出仓库不能为空!"
- }]
- }) && rs;
- if(document.getElementById("selectloc1").style.display != "none"){
- rs = $.validate({
- name : "stock_remove_from_location",
- model : [ {
- type : "require",
- msg : "库位不能为空!"
- }]
- }) && rs;
- }
- rs = $.validate({
- name : "stock_remove_to_depot",
- model : [ {
- type : "require",
- msg : "转入仓库不能为空!"
- }]
- }) && rs;
- if(document.getElementById("selectloc2").style.display != "none"){
- rs = $.validate({
- name : "stock_remove_to_location",
- model : [ {
- type : "require",
- msg : "库位不能为空!"
- }]
- }) && rs;
- }
- if($("#stock_remove_from_depot").val() != "" && $("#stock_remove_to_depot").val() != ""){
- if(($("#stock_remove_from_depot").val() == $("#stock_remove_to_depot").val()) && ($("#stock_remove_from_location").val() == $("#stock_remove_to_location").val())){
- $.ligerDialog.warn("转出仓库和转入仓库不能相同 !");
- rs = false;
- }
- }
- if (rs) {
- return true;
- }
- return false;
- }
- function hasDetails(){
- getData();
- var jsonDataVal = $("#jsonData").val();
- if (jsonDataVal.length > 2) {
- if($("#stock_remove_from_depot").val()!= null && $("#stock_remove_from_depot").val()!= ""){
- $("#stock_remove_from_depot_").val($("#stock_remove_from_depot").val());
- $("#stock_remove_from_depot").attr("disabled",true);
- }
- if($("#stock_remove_from_location").val()!= null && $("#stock_remove_from_location").val()!= ""){
- $("#stock_remove_from_location_").val($("#stock_remove_from_location").val());
- $("#stock_remove_from_location").attr("disabled",true);
- };
- }else{
- $("#stock_remove_from_depot").attr("disabled",false);
- $("#stock_remove_from_location").attr("disabled",false);
- };
- }
-
- function savestock_remove(){
- getData();
- var myfrom = document.getElementById("myfrom");
- myfrom.action = "stockRemoveAction.do";
- $("#task").val("doEdit");
- }
- function createstock_removetock(){
- getData();
- var myfrom = document.getElementById("myfrom");
- myfrom.action = "stockRemovetockAction.do";
- $("#task").val("add");
- }
- </script>
- <style type="text/css">
- .file-style{
- width: 550px;
- }
- .file-style input[type='file'] {
- width:385px ;
- height:24px;
- line-height:22px;
- vertical-align: bottom;
- background-color: #fff;
- border: 1px solid #cccccc;
- margin-top: 2px;
- margin-bottom: 2px;
- }
- </style>
- </head>
- <body style="background: none; overflow: hidden;" ontouchmove="event.preventDefault();">
- <div class="s_title b10 f6">
- <img src="/shares/images/master1/gg_ico.png" width="27" height="26" />查看库存调拨单
- <div class="article_title">
- <input class="art_back" style="width: 50px;" title="返回" name="" onclick="history.back(-1);" type="button" />
- </div>
- </div>
- <div id="jp-container" class="jp-container liuyan">
- <div class="forum-container">
- <center>
- <table class="l-table-edit">
- <tr>
- <th colspan="4">基本信息</th>
- </tr>
-
- <tr>
- <td class="l-table-edit-text" width="15%">调拨单号:</td>
- <td class="l-table-edit-td" width="35%">
- ${requestScope.stockRemove.stock_remove_num}
- </td>
- <td class="l-table-edit-text" width="15%">主题:</td>
- <td class="l-table-edit-td" width="35%">
- ${requestScope.stockRemove.stock_remove_title}
- </td>
-
- </tr>
- <tr>
- <td class="l-table-edit-text" width="15%">调拨日期:</td>
- <td class="l-table-edit-td" width="35%">
- ${requestScope.stockRemove.stock_remove_date }
- </td>
- <td class="l-table-edit-text">调拨人:</td>
- <td class="l-table-edit-td">
- ${requestScope.stockRemove.stock_remove_user_name}
- </td>
-
- </tr>
- <tr>
- <td class="l-table-edit-text">转出仓库:</td>
- <td class="l-table-edit-td">
- ${requestScope.stockRemove.stock_remove_from_depot_name}
- ${requestScope.stockRemove.stock_remove_from_location_name}
- </td>
- <td class="l-table-edit-text">转入仓库:</td>
- <td class="l-table-edit-td">
- ${requestScope.stockRemove.stock_remove_to_depot_name}
- ${requestScope.stockRemove.stock_remove_to_location_name}
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" >备注 </td>
- <td class="l-table-edit-td" colspan="3">
- ${requestScope.stockRemove.stock_remove_remark }
- </td>
- </tr>
- <tr>
- <th colspan="4">调拨明细</th>
- </tr>
- </table>
- <input type="hidden" id="jsonData" name="jsonData" value="">
- <input type="hidden" id="tabid" name="tabid" value="${param.tabid }">
- <input type="hidden" id="task" name="task" value="doEdit">
- <input type="hidden" id="stock_remove_id" name="stock_remove_id" value="${requestScope.stockRemove.stock_remove_id}">
- <input type="hidden" id="stock_remove_from_depot_" name="stock_remove_from_depot_" value="${requestScope.stockRemove.stock_remove_from_depot}">
- <input type="hidden" id="stock_remove_from_location_" name="stock_remove_from_location_" value="${requestScope.stockRemove.stock_remove_from_location}">
- </center>
- </div>
- <div id="maingrid" style="margin: 0; padding: 0"></div>
- </div>
- <%@ include file="/include/message.jsp"%>
- </body>
- </html>
|