| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844 |
- <%@ page language="java" contentType="text/html;charset=GBK" 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>
- <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
- <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 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 type="text/javascript" src="${pageContext.request.contextPath}/liger/lib/json2.js"></script>
- <script type="text/javascript" src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"></script>
- <!-- 选择窗口需要加载的js文件 start-->
- <script type="text/javascript" src="/shares/js/yw/erp/inStock.js"></script>
- <script type="text/javascript" src="/shares/js/yw/erp/supplierLookup.js"></script>
- <script type="text/javascript" src="/shares/js/yw/erp/insStockLookup.js"></script>
- <script type="text/javascript">
- var inStockDetailData = ${requestScope.Rows};
- //var depotData = ${requestScope.depotRows};
- var selectlocationid = "";
- var locationobjs;
- //var locationData = [];
- //var locationData = ${requestScope.locationRows};
-
- $(function() {
- $("#ins_batch_num").focus();
- closeAndReloadList();
-
- loadTypeTree("selectbutton", {
- type : "detpusersingle",
- backId : "ins_operater",
- backName : "ins_operater_name",
- tab : 1
- });
-
- loadTypeTree("selectCheckUser", {
- type : "detpusersingle",
- backId : "check_user_id",
- backName : "check_user_name",
- tab : 1
- });
-
- var insid = "${requestScope.inStock.ins_id}";
- if(insid != null && insid != ''){
- if("${requestScope.inStock.ins_depot_id}" != "" && typeof ("${requestScope.inStock.ins_depot_id}") != "undefined"){
- $("#ins_depot_id_").val("${requestScope.inStock.ins_depot_id}");
- $("#ins_depot_id").attr("disabled",true);
- }
- if("${requestScope.inStock.ins_location_id}" != "" && typeof ("${requestScope.inStock.ins_location_id}") != "undefined"){
- $("#ins_location_id_").val("");
- $("#ins_location_id").attr("disabled",true);
- }
- // alert("a"+'${requestScope.inStock.ins_instock_date }');
- // $("#ins_instock_date").ligerDateEditor({
- // labelAlign : 'left',
- // format :"yyyy-MM-dd",
- // initValue : '${requestScope.inStock.ins_instock_date }'
- // });
- }
- // else{
- // alert("b"+'${requestScope.datestr }');
- // $("#ins_instock_date").ligerDateEditor({
- // labelAlign : 'left',
- // format :"yyyy-MM-dd",
- // initValue : ${requestScope.datestr }
- // });
- // }
-
- var selectDepotid = "${requestScope.inStock.ins_depot_id}";
- if (selectDepotid != null && selectDepotid != "") {
- $("#ins_depot_id").val(selectDepotid);
- }
- selectlocationid = "${requestScope.inStock.ins_location_id}";
- if (selectlocationid != null && selectlocationid != "") {
- getLocations();
- }
- var selectInstype = "${requestScope.inStock.ins_type}";
- if (selectInstype != null && selectInstype != "") {
- $("#ins_type").val(selectInstype);
- }
-
- if('${requestScope.flowOnOff}'!="" && typeof('${requestScope.flowOnOff}')!="undefined"){
- var obj = window.top;
- $("#instock_save").attr({"disabled":"disabled"});
- obj.$.ligerDialog.alert("对不起,入库单流程未配置,请通知流程管理员配置后,再提交!", function (action){
- closeWindow();
- });
- }
- billTypeChange("${requestScope.inStock.ins_bill_type}");
-
- });
- // wzf start 2015-1-23
- function billType(){
- var selectDepotid = "${requestScope.inStock.ins_depot_id}";
-
- if (selectDepotid != null && selectDepotid != "") {
- $("#ins_depot_id").val(selectDepotid);
- }
- var ins_batch_num="${requestScope.inStock.ins_batch_num }";
- if (ins_batch_num != null && ins_batch_num != "") {
- $("#ins_batch_num").val(ins_batch_num);
- }
-
- var ins_instock_date="${requestScope.inStock.ins_instock_date }";
- if (ins_instock_date != null && ins_instock_date != "") {
- $("#ins_instock_date").val(ins_instock_date);
- }
-
- var suppliers_name="${requestScope.inStock.suppliers_name }";
- if (suppliers_name != null && suppliers_name != "") {
- $("#suppliers_name").val(suppliers_name);
- }
-
- var suppliers_id="${requestScope.inStock.suppliers_id }";
- if (suppliers_id != null && suppliers_id != "") {
- $("#suppliers_id").val(suppliers_id);
- }
- var relevance_ins_id="${requestScope.inStock.relevance_ins_id }";
- if (relevance_ins_id != null && relevance_ins_id != "" && relevance_ins_id!='0') {
-
- $("#relevance_ins_id").val(relevance_ins_id);
-
- $("#relevance_ins_name").val(relevance_ins_id);
- }
-
- var ins_remark="${requestScope.inStock.ins_remark }";
- if (ins_remark != null && ins_remark != "") {
- $("#ins_remark").val(ins_remark);
- }
-
- selectlocationid = "${requestScope.inStock.ins_location_id}";
- if (selectlocationid != null && selectlocationid != "") {
- getLocations();
- }
-
- var selectInstype = "${requestScope.inStock.ins_type}";
- if (selectInstype != null && selectInstype != "") {
- $("#ins_type").val(selectInstype);
- }
- }
- // wzf start 2015-1-23
- //选择单据类型事件
- function billTypeChange(value){
-
- var bill_type="${requestScope.inStock.ins_bill_type}";
- if (bill_type != value ) {
- inStockDetailData = [];
- }else{
- inStockDetailData = ${requestScope.Rows};
-
- }
- if(value==1){
- selectOpShow();
- $("#relevance3").show();
- $("#relevance").hide();
- $("#relevance4").hide();
- $("#relevance5").show();
- f_initGrid();
- // wzf start 2015-1-23
- var initTime='${inStock.instock_date}';
- if (initTime != null && initTime != "") {
- $("#ins_instock_date").val(initTime);
- }
- if (bill_type == value ) {
- billType()
- }
- // wzf end 2015-1-23
- }else if(value==2){
-
- selectOpHide();
- $("#relevance3").hide();
- $("#relevance").show();
- $("#relevance4").show();
- $("#relevance5").hide();
- f_initRedGrid();
- // wzf start 2015-1-23
- var initTime='${inStock.instock_date}';
-
- if (initTime != null && initTime != "") {
- $("#ins_instock_date").val(initTime);
- }
- if (bill_type == value ) {
- billType();
- }
- // wzf end 2015-1-23
- }else if(value==3){
- selectOpBlueShow();
- $("#relevance5").hide();
- $("#relevance3").hide();
- $("#relevance").show();
- $("#relevance4").show();
- f_initGrid();
- // wzf start 2015-1-23
- var initTime='${inStock.instock_date}';
-
- if (initTime != null && initTime != "") {
- $("#ins_instock_date").val(initTime);
- }
- if (bill_type == value ) {
- billType();
- }
- // wzf end 2015-1-23
- }else{
- selectOpShow();
- $("#relevance3").show();
- $("#relevance5").show();
- $("#relevance").hide();
- $("#relevance4").hide();
- f_initGrid();
- // wzf start 2015-1-23
- var initTime='${inStock.instock_date}';
-
- if (initTime != null && initTime != "") {
- $("#ins_instock_date").val(initTime);
- }
- $("#ins_bill_type").val("1");
-
- billType();
- // wzf end 2015-1-23
-
- }
- }
-
- //刷新列表
- function closeAndReloadList(){
- var isAddSucc = "${requestScope.isAddSucc}";
- if(isAddSucc == "true"){
- var tabid = getCurrentTabId();
- var listTabid = 'inStockAction.do?task=toList';
- if(window.parent.tab.isTabItemExist(listTabid)){
- window.parent.f_selectTab(listTabid);
- window.parent.f_reloadTab(listTabid);
- }else{
- window.parent.f_addTab(listTabid, '入库列表', 'inStockAction.do?task=toList');
- }
- window.parent.f_closeTab(tabid);
- }
- }
-
- function getLocations(selectlocationid){
- $("#ins_location_id").empty();
- $('#ins_location_id').append("<option value=''>--请选择--</option> ");
- var ins_depot_id_val=$('#ins_depot_id').val();
- $.ajax({
- url:"takingStockAction.do?date="+new Date()+"&task=getLocations",
- type:"post",
- dataType:"json",
- data:"takings_depot_id="+ $("#ins_depot_id").val(),
- success:callback
- });
- }
- function callback(json){
- var locationobjs = json;
- if(locationobjs.length == 0){
- $("#selectloc").hide();
- }else{
- $("#selectloc").show();
- for(var i=0;i<locationobjs.length;i++){
- $('#ins_location_id').append("<option value='"+locationobjs[i].location_id+"'>"+locationobjs[i].location_name+"</option>");
- }
- $("#ins_location_id").val(selectlocationid);
- }
- }
-
- function checkForm() {
- var rs = $.validate({
- name : "ins_operater_name",
- model : [ {
- type : "require",
- msg : "仓管员不能为空!"
- } ]
- });
- rs = $.validate({
- name : "ins_bill_type",
- model : [ {
- type : "require",
- msg : "单据类型不能为空!"
- } ]
- }) && rs;
- rs = $.validate({
- name : "ins_instock_date",
- model : [ {
- type : "require",
- msg : "入库日期不能为空!",
- msgBox:"empty_ins_instock_date"
- } ]
- }) && rs;
- rs = $.validate({
- name : "ins_depot_id",
- model : [ {
- type : "require",
- msg : "仓库不能为空!"
- } ]
- }) && rs;
- if (document.getElementById("selectloc").style.display != "none") {
- rs = $.validate({
- name : "ins_location_id",
- model : [ {
- type : "require",
- msg : "库位不能为空!"
- } ]
- }) && rs;
- }
- rs = $.validate({
- name : "ins_type",
- model : [ {
- type : "require",
- msg : "入库类别不能为空!"
- } ]
- }) && rs;
- // wzf start 2015-1-23
- var ins_bill_type= $("#ins_bill_type").val();
- if(ins_bill_type!='1'){
- rs = $.validate({
- name : "relevance_ins_name",
- model : [ {
- type : "require",
- msg : "冲账改帐入库单号不能为空!",
- msgField : "btn_choseInstock"
- } ]
- }) && rs;
- }
- // wzf end 2015-1-23
- // rs = $.validate({
- // name : "suppliers_name",
- // model : [ {
- // type : "require",
- // msg : "供应商不能为空!"
- // } ]
- // }) && rs;
- if (rs) {
- getData();
- var flag = isSelected();
- if (flag) {
- var jsonarr = eval('(' + $("#jsonData").val() + ')');
- for ( var i = 0; i < jsonarr.length; i++) {
- if (jsonarr[i].insd_product_count <= 0) {
- $.ligerDialog.warn(jsonarr[i].product_name + "的入库数量必须大于0!");
- return false;
- }
- // if (jsonarr[i].insd_totalprice <= 0) {
- // $.ligerDialog.warn(jsonarr[i].product_name + "-"
- // + jsonarr[i].product_num + "的金额必须大于0!");
- // return false;
- // }
- if(jsonarr[i].arrived_number<jsonarr[i].insd_product_count){
- $.ligerDialog.warn(jsonarr[i].product_name + "的入库数量必须小于到货数量"+jsonarr[i].arrived_number);
- return false;
- }
- }
- return true;
- }
- return false;
- }
- return false;
- }
- //保存
- function btnSaveIn() {
- var obj = window.top;
- if (checkForm()) {
- var ins_id = $("#ins_id").val();
- var flowTheme = $("#flowTheme").val();
- if(ins_id != "" && typeof (ins_id) != "undefined"){
- // wzf start 2015-1-23
- $("#instock_save").attr('disabled', true);
- $("#inStockForm").submit();
- // obj.$.ligerDialog.prompt('流程标题',flowTheme, function (yes,value){
- // if(yes){
- // if(value != "" && typeof (value) != "undefined"){
- // $("#flowTheme").val("");
- // $("#flowTheme").val(value);
- // $("#instock_save").attr('disabled', true);
- // $("#inStockForm").submit();
- // }else{
- // obj.$.ligerDialog.warn("流程标题不能为空!");
- // return;
- // }
- // }
- // });
- // wzf end 2015-1-23
- }else{
- // wzf start 2015-1-23
- $("#instock_save").attr('disabled', true);
- $("#inStockForm").submit();
- // if(flowTheme != "" && typeof (flowTheme) != "undefined"){
- // obj.$.ligerDialog.prompt('流程标题',flowTheme, function (yes,value){
- // if(yes){
- // if(value != "" && typeof (value) != "undefined"){
- // $("#flowTheme").val("");
- // $("#flowTheme").val(value);
- // $("#instock_save").attr('disabled', true);
- // $("#inStockForm").submit();
- // }else{
- // obj.$.ligerDialog.warn("流程标题不能为空!");
- // return;
- // }
- // }
- // });
- // }else{
- // $("#instock_save").attr('disabled', true);
- // $("#inStockForm").submit();
- // }
- // wzf end 2015-1-23
- }
- }
- }
-
- function isSelDepot() {
- var ins_depot_id_val = $('#ins_depot_id').val();
- if (ins_depot_id_val == "") {
- $.ligerDialog.warn("请先选择仓库 !");
- } else {
- if (locationobjs != null && locationobjs != ""
- && locationobjs.length > 0) {
- var ins_location_id_val = $('#ins_location_id').val();
- if (ins_location_id_val == "") {
- $.ligerDialog.warn("请先选择库位 !");
- } else {
- f_import();
- }
- } else {
- f_import();
- }
- }
- }
- function hasDetails() {
- getData();
- var jsonDataVal = $("#jsonData").val();
- if (jsonDataVal.length > 2) {
- if ($("#ins_depot_id").val() != null && $("#ins_depot_id").val() != "") {
- $("#ins_depot_id_").val($("#ins_depot_id").val());
- $("#ins_depot_id").attr("disabled", true);
- }
- if ($("#ins_location_id").val() != null
- && $("#ins_location_id").val() != "") {
- $("#ins_location_id_").val($("#ins_location_id").val());
- $("#ins_location_id").attr("disabled", true);
- }
- } else {
- $("#ins_depot_id").attr("disabled", false);
- $("#ins_location_id").attr("disabled", false);
- }
- }
- /**
- * 选择到货单
- */
- function f_importArrived() {
- var obj = window.top;
- var ins_depot_id_val = $('#ins_depot_id').val();
- if (ins_depot_id_val == "") {
- $.ligerDialog.warn("请先选择仓库 !");
- } else {
- if (locationobjs != null && locationobjs != "" && locationobjs.length > 0) {
- var ins_location_id_val = $('#ins_location_id').val();
- if (ins_location_id_val == "") {
- $.ligerDialog.warn("请先选择库位 !");
- } else {
- if ($("#ins_depot_id").val() != null && $("#ins_depot_id").val() != "") {
- $("#ins_depot_id_").val($("#ins_depot_id").val());
- }
- if ($("#ins_location_id").val() != null && $("#ins_location_id").val() != "") {
- $("#ins_location_id_").val($("#ins_location_id").val());
- }
- var ins_depot_id_val = $("#ins_depot_id_").val();
- var ins_location_id_val = $("#ins_location_id_").val();
- if (obj != undefined && obj != null) {
- obj.$.ligerDialog.open({
- title : '选择到货',
- width : 1000,
- height : 400,
- url : 'erpPurchaseArrivedAction.do?task=toSelectArrived',
- buttons : [ {
- text : '确定',
- onclick : f_importArrivedOK
- }, {
- text : '取消',
- onclick : f_importArrivedCancel
- } ]
- });
- }
- }
- } else {
- if ($("#ins_depot_id").val() != null && $("#ins_depot_id").val() != "") {
- $("#ins_depot_id_").val($("#ins_depot_id").val());
- }
- if ($("#ins_location_id").val() != null && $("#ins_location_id").val() != "") {
- $("#ins_location_id_").val($("#ins_location_id").val());
- }
- var ins_depot_id_val = $("#ins_depot_id_").val();
- var ins_location_id_val = $("#ins_location_id_").val();
- if (obj != undefined && obj != null) {
- obj.$.ligerDialog.open({
- title : '选择到货',
- width : 1000,
- height : 400,
- url : 'erpPurchaseArrivedAction.do?task=toSelectArrived',
- buttons : [ {
- text : '确定',
- onclick : f_importArrivedOK
- }, {
- text : '取消',
- onclick : f_importArrivedCancel
- } ]
- });
- }
- }
- }
- }
- /**
- * 到货单数据导入
- */
- function f_importArrivedOK(item, dialog) {
- //获取采购id
- $("#purchase_order_request_id").val("");
- $("#purchase_order_request_id").val(dialog.frame.getPurcharseRequestId());
- var rows = dialog.frame.f_select();
- var newrows = new Array(); // 先声明一维
- for ( var i = 0; i < rows.length; i++) { // 一维长度
- newrows[i] = new Array(); // 在声明二维
- }
- if (rows.length == 0) {
- var obj = window.top;
- obj.$.ligerDialog.warn('请选择采购货物!');
- return;
- }
- for ( var i = 0; i < rows.length; i++) {
- var manager = $("#maingrid").ligerGetGridManager();
- var data = manager.getData();
- var flag = true;
- for ( var j = 0; j < data.length; j++) {
- if (data[j].purcharse_detail_id == rows[i].purchase_detail_id) {
- flag = false;
- }
- }
- if (flag) {
- newrows[i].purcharse_detail_id = rows[i].purchase_detail_id;
- newrows[i].purcharse_id = rows[i].purchase_id;
- newrows[i].insd_product_id = rows[i].product_id;
- newrows[i].request_detail_id = rows[i].request_detail_id;
- newrows[i].request_id = rows[i].request_id;
- newrows[i].product_num = rows[i].product_num;
- newrows[i].product_standard = rows[i].product_model_standard;
- newrows[i].product_name = rows[i].product_name;
- newrows[i].product_unit = rows[i].product_unit_name;
- //newrows[i].product_unit_name = rows[i].purchase_product_unit;
- newrows[i].insd_product_count = rows[i].arrived_number;
- newrows[i].insd_price = rows[i].purchase_product_sell_price;
- newrows[i].insd_totalprice = rows[i].arrived_number * rows[i].purchase_product_sell_price;
- newrows[i].insd_warranty = rows[i].purchase_product_guarantee;
- newrows[i].insd_purchase_date = rows[i].purchase_date;
- newrows[i].insd_rate = 0;
- newrows[i].insd_totallevied = rows[i].arrived_number * rows[i].purchase_product_sell_price;
- newrows[i].arrived_detail_id = rows[i].arrived_detail_id;
- newrows[i].arrived_number = rows[i].arrived_number;
- newrows[i].insd_purchase_date = rows[i].purchase_date;
- g.addRow(newrows[i]);
- }
- }
- hasDetails();
- buttonType("arrived");
- dialog.close();
- }
- /**
- * 取消到货单输入导入
- */
- function f_importArrivedCancel(item, dialog) {
- dialog.close();
- }
- function buttonType(type){
- if("arrived"==type){
- $("#btn_choseProduct").attr("disabled","disabled");
- $("#btn_Mark").attr("disabled","disabled");
- }else if("purchase"==type){
- $("#btn_choseProduct").attr("disabled","disabled");
- $("#btn_choseArrived").attr("disabled","disabled");
- $("#btn_Mark").attr("disabled","disabled");
- }else if("product"==type){
- $("#btn_choseArrived").attr("disabled","disabled");
- }else{
- $("#btn_choseProduct").attr("disabled","");
- $("#btn_choseArrived").attr("disabled","");
- $("#btn_Mark").attr("disabled","");
- }
- }
- $(document).ready(function(){
- $("input[type='text']:first").focus();
- var initTime='';
- var t='${requestScope.inStock.ins_instock_date }'
-
- if (t == null || t == "") {
- initTime='${inStock.instock_date}';
- }else{
- initTime='${requestScope.inStock.ins_instock_date }';
-
- }
- $("#ins_instock_date").ligerDateEditor({
- labelAlign : 'left',
- showTime : true,
- format :"yyyy-MM-dd",
- initValue: initTime
- });
-
-
- });
- </script>
- </head>
- <body>
- <%@ include file="/include/message.jsp"%>
- <form id="inStockForm" action="inStockAction.do" method="post">
- <div id="title" class="form-button">
- <!-- <input id="instock_save" name="instock_save" type="button" class="l-button" value="保存" onClick="btnSaveIn();"/> -->
- <c:choose>
- <c:when test="${flowOnOff=='off' }">
- <input id="btnSave" type="button" class="l-button" value="提交" disabled="disabled" />
- <span style="color:red;">请先配置审核流程</span>
- </c:when>
- <c:when test="${fmodel_state=='0' }">
- <input id="btnSave" type="button" class="l-button" value="提交" disabled="disabled" />
- <span style="color:red;">请先启用审核流程</span>
- </c:when>
- <c:otherwise>
- <input id="btnSave" type="button" class="l-button" value="提交" onclick="btnSaveIn()" />
- </c:otherwise>
- </c:choose>
- <input type="button" value="关闭" class="l-button" onClick="closeWindow();"/>
- </div>
- <div class="container-layout">
- <div class="forum-container">
- <center>
- <table class="l-table-edit line">
- <tr>
- <th colspan="4">入库单信息</th>
- </tr>
- <tr>
- <td class="l-table-edit-text">入库单号:
- </td>
- <td class="l-table-edit-td">
- <jsp:include page="/yw/erp/include/codeReadonly.jsp">
- <jsp:param name="name" value="ins_num"/>
- <jsp:param name="value" value="${requestScope.inStock.ins_num }"/>
- </jsp:include>
- </td>
- <td class="l-table-edit-text">批次号 :
- </td>
- <td class="l-table-edit-td">
- <input type="text" id="ins_batch_num" name="ins_batch_num" value="${requestScope.inStock.ins_batch_num }">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">单据类型<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td" id="relevance2">
-
- <select name="ins_bill_type" id="ins_bill_type" style="width:130px" onChange="billTypeChange(this.value);">
- <option value=''>--请选择--</option>
- <c:forEach items="${ins_bill_type}" var="ins_bill_type">
- <option value="${ins_bill_type.dvalue}" ${requestScope.inStock.ins_bill_type==ins_bill_type.dvalue ?"selected":"" } >${ins_bill_type.dname}</option>
- </c:forEach>
- </select>
- </td>
- <!-- <td class="l-table-edit-td" id="relevance5" colspan="2"> -->
- <!-- </td> -->
- <!-- <td class="l-table-edit-td" id="relevance3" colspan="3"> -->
-
- <!-- <select name="ins_bill_type" id="ins_bill_type" style="width:130px" onChange="billTypeChange(this.value);"> -->
- <!-- <option value=''>--请选择--</option> -->
- <%-- <c:forEach items="${ins_bill_type}" var="ins_bill_type"> --%>
- <%-- <option value="${ins_bill_type.dvalue}" ${1==ins_bill_type.dvalue ?"selected":"" }>${ins_bill_type.dname}</option> --%>
- <%-- </c:forEach> --%>
- <!-- </select> -->
- <!-- </td> -->
- <td class="l-table-edit-text">入库日期<FONT COLOR="red">*</FONT>:
- </td>
- <td class="l-table-edit-td">
- <input type="text" id="ins_instock_date" name="ins_instock_date" value="${inStock.instock_date}" readonly="readonly" >
- <label id="empty_ins_instock_date"></label>
- </td>
-
- </tr>
- <tr>
- <td class="l-table-edit-text">仓库<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <select id="ins_depot_id" name="ins_depot_id" class="short-text" onChange="getLocations()" style="width:130px;">
- <c:choose>
- <c:when test="${typefp eq 1 }">
- <c:forEach items="${depotlist}" var="depotlist">
- <option value="${depotlist.depot_id}" >${depotlist.depot_name}</option>
- </c:forEach>
- </c:when>
- <c:otherwise>
- <option value="">--请选择--</option>
- <c:forEach items="${depotlist}" var="depotlist">
- <option value="${depotlist.depot_id}" ${depotlist.depot_id==requestScope.inStock.ins_depot_id ?"selected":""} >${depotlist.depot_name}</option>
- </c:forEach>
- </c:otherwise>
- </c:choose>
- </select>
- <span id="selectloc" style="display:none;">
- <select id="ins_location_id" name="ins_location_id" class="short-text" >
- <option value=''>--请选择--</option>
- </select>
- </span>
- </td>
- <td class="l-table-edit-text">仓管员<FONT COLOR="red"></FONT>:
- </td>
- <td class="l-table-edit-td">
- ${requestScope.inStock.ins_operater_name}
- <input type="hidden" name="ins_operater" id="ins_operater2" value="${requestScope.inStock.ins_operater}" />
- <input type="hidden" id="ins_operater_name2" name="ins_operater_name" readonly="readonly" value="${requestScope.inStock.ins_operater_name}"/>
- <!-- <input type="button" class="l-button" id="selectbutton" value="选择人员" /> -->
- </td>
- </tr>
- <tr>
- <c:if test="${typefp==1}">
- <td class="l-table-edit-text">入库类别<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td" >
- <select name="ins_type" id="ins_type2" style="width:130px" onchange="selectInsType(this.value);">
- <option value=''>--请选择--</option>
- <c:forEach items="${instypelist}" var="instype">
- <option value="${instype.dvalue}" ${11 == instype.dvalue ? "selected" : ""} >${instype.dname}</option>
- </c:forEach>
- </select>
- <input type="hidden" name="ins_type_hide" id="ins_type_hide" value=""/>
- </td>
- </c:if>
- <c:if test="${typefp!=1}">
- <td class="l-table-edit-text">入库类别<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <select name="ins_type" id="ins_type2" style="width:130px" onchange="selectInsType(this.value);">
- <option value=''>--请选择--</option>
- <c:forEach items="${instypelist}" var="instype">
- <option value="${instype.dvalue}" ${11 == instype.dvalue ? "selected" : ""} >${instype.dname}</option>
- </c:forEach>
- </select>
- <input type="hidden" name="ins_type_hide" id="ins_type_hide" value=""/>
- </td>
- </c:if>
- <td class="l-table-edit-text">备注:</td>
- <td class="l-table-edit-td">
- <input type="text" id="ins_remark" name="ins_remark" value="${requestScope.inStock.ins_remark }" />
- </td>
- </tr>
- <c:if test="${typefp!=1}">
- <tr>
- <td class="l-table-edit-text">供应商<FONT COLOR="red"></FONT>:</td>
- <td class="l-table-edit-td">
- <input type="hidden" id="suppliers_id" name="suppliers_id" value="${requestScope.inStock.suppliers_id}"/>
- <input type="text" id="suppliers_name" name="suppliers_name" value="${requestScope.inStock.suppliers_name}" size="20" readonly="readonly"/>
- <input id="btn_suppliers" type="button" class="l-button" value="请选择" onclick="chooseSupplier({sid:'suppliers_id',sname:'suppliers_name'});" />
- </td>
- <td class="l-table-edit-td" id="relevance5" colspan="2">
- </td>
- <td class="l-table-edit-text" id="relevance">冲账改帐入库单号<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td" id="relevance4">
- <input type="hidden" id="relevance_ins_id" name="relevance_ins_id" value="${requestScope.inStock.relevance_ins_id}"/>
- <input type="text" id="relevance_ins_name" name="relevance_ins_name" value="${requestScope.inStock.relevance_ins_id}" size="20" readonly="readonly"/>
- <input id="btn_choseInstock" type="button" class="l-button" value="请选择" onclick="chooseInsStock({ins_id:'relevance_ins_id',ins_num:'relevance_ins_name',ins_batch_num:'ins_batch_num',ins_operater:'ins_operater',ins_operater_name:'ins_operater_name',suppliers_id:'suppliers_id',suppliers_name:'suppliers_name',ins_instock_date:'ins_instock_date',ins_remark:'ins_remark'});" />
- </td>
- </tr>
- </c:if>
- <c:if test="${typefp==1}">
- <tr>
- <td class="l-table-edit-text" id="relevance">冲账改帐入库单号<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td" id="relevance4" colspan="3">
- <input type="hidden" id="relevance_ins_id" name="relevance_ins_id" value="${requestScope.inStock.relevance_ins_id}"/>
- <input type="text" id="relevance_ins_name" name="relevance_ins_name" value="${requestScope.inStock.relevance_ins_id}" size="20" readonly="readonly"/>
- <input id="btn_choseInstock" type="button" class="l-button" value="请选择" onclick="chooseInsStock({ins_id:'relevance_ins_id',ins_num:'relevance_ins_name',ins_batch_num:'ins_batch_num',ins_operater:'ins_operater',ins_operater_name:'ins_operater_name',suppliers_id:'suppliers_id',suppliers_name:'suppliers_name',ins_instock_date:'ins_instock_date',ins_remark:'ins_remark'});" />
- </td>
- </tr>
- </c:if>
- <!-- <tr> -->
- <!-- <td class="l-table-edit-text">库存量:</td> -->
- <!-- <td class="l-table-edit-td" colspan="3"> -->
- <input type="hidden" id="instock_count" name="instock_count" style="border-style: none;" readonly="readonly" />
- <!-- </td> -->
- <!-- </tr> -->
- <tr>
- <th colspan="4">入库明细</th>
- </tr>
- <tr>
- <td colspan="4">
- <!-- 明细 start -->
- <div style="padding-top:5px;">
- <a id="btn_choseProduct" class="l-button" style="width:100px;float:left; margin-left:10px;" onClick="isSelDepot();">选择存货</a>
- <!-- <a id="btn_chosePurchase" class="l-button" style="width:100px;float:left; margin-left:10px;" onClick="f_importPurchase();">选择采购单</a> -->
- <c:if test="${typefp!=1}">
- <a id="btn_choseArrived" class="l-button" style="width:100px;float:left; margin-left:10px;" onClick="f_importArrived();">选择到货单</a>
- <a id="btn_Mark" class="l-button" style="width:100px;float:left; margin-left:10px;" onClick="searchProByMark();">条码扫描</a>
- </c:if>
- <a id="btn_delete" class="l-button" style="width:120px;float:left; margin-left:10px;" onClick="deleteRow();">删除选择的行</a>
- </div>
- <div class="l-clear"></div>
- <div id="maingrid" style="margin-top:5px"></div>
- <div style="display:none;">
- </div>
- <!-- 明细 end -->
- </td>
- </tr>
- </table>
- <input type="hidden" id="typefp" name="typefp" value="${typefp}">
- <input type="hidden" id="purchase_order_request_id" name="purchase_order_request_id" value="">
- <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="doEditInStock">
- <input type="hidden" id="ins_creater" name="ins_creater" value="${requestScope.inStock.ins_creater }">
- <input type="hidden" id="ins_id" name="ins_id" value="${requestScope.inStock.ins_id }">
- <input type="hidden" name="ins_status" id="ins_status" value="1">
- <input type="hidden" id="ins_depot_id_" name="ins_depot_id_" value="">
- <input type="hidden" id="ins_location_id_" name="ins_location_id_" value="">
- <input type="hidden" id="check_status" name="check_status" value="${requestScope.inStock.check_status}">
- <input type="hidden" id="check_user_id" name="check_user_id" value="${requestScope.inStock.check_user_id}">
- <input type="hidden" id="ins_deleted" name="ins_deleted" value="${requestScope.inStock.ins_deleted}">
- <input type="hidden" id="unit_id" name="unit_id" value="${requestScope.inStock.unit_id}">
- <input type="hidden" id="flow_id" name="flow_id" value="${requestScope.inStock.flow_id}">
- <!-- 流程ID -->
- <input type="hidden" name="tabid" id="tabid" />
- <input type="hidden" name="fmodel" value="${fmodel.modelId }">
- <input type="hidden" name="tmodel" value="${tmodel.tmodelId }">
- <input type="hidden" name="flow_ins_id" value="${inStock.flow_ins_id }">
- <input type="hidden" name="audit_status" value="${inStock.audit_status }"/>
- <!-- 判断使用哪个按钮 -->
- <input type="hidden" id="btn_type" name="btn_type" value="">
- </center>
- </div>
- </div>
- </form>
- </body>
- </html>
|