New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title>å°è´§ç¹æ°</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | </head> |
| | | |
| | | <body> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card" style="padding: 1px"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="component-form-group"> |
| | | <div class="layui-tab" lay-filter="tab-SellOutBackBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1">åæ®ä¿¡æ¯</li> |
| | | <li lay-id="2">æç»ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">æºåå·</label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input"> |
| | | <input type="hidden" name="hmainid" id="hmainid" lay-verify="hmainid" autocomplete="off" class="layui-input"> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">ä¾åºå</label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HSupplierName" id="HSupplierName" lay-verify="HSupplierName" readonly autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">é¨é¨</label> |
| | | </div> |
| | | <div class="layui-col-xs8"> |
| | | <input type="text" name="HDepartmentNmae" id="HDepartmentNmae" lay-verify="HDepartmentNmae" readonly autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="margin-bottom: 20px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="Saver">确认</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | |
| | | //表头åå§åèµå¼ï¼æ ¹æ®ç»å½ç¨æ·è·å é»è®¤ä»åºãé¨é¨ãéªæ¶ãä¿ç®¡ãéè¶ç¨æ·ï¼ new |
| | | $("#HWHID").val(sessionStorage["HWHID"]); |
| | | $("#HWHNAME").val(sessionStorage["HWHName"]); |
| | | $("#HStockPlaceID").val(sessionStorage["HSPID"]); |
| | | $("#HStockPlaceName").val(sessionStorage["HSPName"]); |
| | | //$("#HSupID").val(sessionStorage["HSupID"]); |
| | | //$("#HSupName").val(sessionStorage["HSupName"]); |
| | | $("#HDeptID").val(sessionStorage["HDeptID"]); |
| | | $("#HDeptName").val(sessionStorage["HDept"]); |
| | | $("#HSecManagerID").val(sessionStorage["HSecManagerID"]); |
| | | $("#HSecManager").val(sessionStorage["HSecManager"]); |
| | | $("#HKeeperID").val(sessionStorage["HKeeperID"]); |
| | | $("#HKeeper").val(sessionStorage["HKeeper"]); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMaker").hide(); |
| | | $("#HMakerID").hide(); |
| | | $("#HBillerID").val(sessionStorage["HBillerID"]); |
| | | $("#HBillerID").hide(); |
| | | |
| | | //è·ååæ° |
| | | function getUrlVars() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | | for (var i = 0; i < hashes.length; i++) { |
| | | hash = hashes[i].split('='); |
| | | vars.push(hash[0]); |
| | | vars[hash[0]] = hash[1]; |
| | | } |
| | | return vars; |
| | | } |
| | | var params = getUrlVars(); |
| | | var linterid = params[params[0]]; //ä»åæ°ä¸è·å åæ®å
ç |
| | | var lSourceBillType = params[params[2]]; //ä»åæ®è·å æºåç±»å |
| | | //function RoadBillMain(linterid)//å 载表头 |
| | | //{ |
| | | // $.ajax({ |
| | | // url: GetWEBURL() + "/Web/GetPonderationBill", |
| | | // type: "GET", |
| | | // data: { "HInterID": linterid }, |
| | | // success: function (d) { |
| | | // // console.log(d.data); |
| | | // $("#HInterID").val(d.data[0].HInterID); |
| | | // $("#HBillNo").val(d.data[0].HBillNo); |
| | | // $("#HBillType").val(d.data[0].HSourceBillType); |
| | | // $("#HSourceBillNo").val(d.data[0].HSourceBillNo); |
| | | // //$("#HWHID").val(d.data[0].HWhID); |
| | | // //$("#HKeeperID").val(d.data[0].HKeeperID); |
| | | // //$("#HSecManagerID").val(d.data[0].HSecManagerID); |
| | | // //$("#HDeptID").val(d.data[0].HDeptID); |
| | | // //$("#HBarCode").val(d.data[0].HBarCode); |
| | | // //$("#HQty").val(d.data[0].HQty); |
| | | // RoadSup(); |
| | | // } |
| | | // }) |
| | | //} |
| | | //function RoadSup()//æ ¹æ®æºåç±»ååæºåå· å è½½å®¢æ· |
| | | //{ |
| | | // //var sInterID = $("#HInterID").val() |
| | | // var HSourceBillNo = $('#HSourceBillNo').val() |
| | | // var sInterID = $("#HInterID").val() |
| | | // var sBillNo = $("#HBillNo").val() |
| | | // var HSourceBillType = $("#HBillType").val() |
| | | // //å¤æææ¬æ¡æ¯å¦ææ°æ® new |
| | | // if (HSourceBillNo == "" || sInterID <= 0) { |
| | | // layer.msg($('#HSourceBillNo').val(), { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | // return; |
| | | // } |
| | | // else { |
| | | // $.ajax({ |
| | | // url: GetWEBURL() + "/SellOutBack/get_GetXs_SeOutStockBackBillList", |
| | | // type: "GET", |
| | | // data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo }, |
| | | // success: function (result) { |
| | | // if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | // $("#HSupID").val(result.data[0].HSupID); |
| | | // $("#HSupName").val(result.data[0].HSupName); |
| | | // $("#HDeptID").val(result.data[0].HDeptID); |
| | | // $("#HDeptName").val(result.data[0].HDeptName); |
| | | // sessionStorage["SourceFlag"] = true; |
| | | // element.tabChange('tab-SellOutBackBill', '2'); |
| | | // layer.load(3); |
| | | // } |
| | | // else { |
| | | // layer.msg(result.Message, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | // } |
| | | // layer.closeAll("loading"); |
| | | // } |
| | | // }); |
| | | // } |
| | | //} |
| | | function RoadBillSub(HBillno)//å è½½æ°æ® |
| | | { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/POStockInBillList/get_InfoByBillNo", |
| | | type: "GET", |
| | | data: { "HBillno": HBillno }, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HSupplierName": data.ä¾åºå |
| | | , "HDepartmentNmae": data.é¨é¨ |
| | | , "hmainid": data.hmainid |
| | | }); |
| | | } |
| | | else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | |
| | | table.render({ |
| | | elem: '#wl-table' |
| | | , url: GetWEBURL() + '/POStockInBillList/get_InfoByBillNo' |
| | | , toolbar: '#toolbarDemo' |
| | | , where: { "HBillno": HBillno } |
| | | , cols: [[ |
| | | { type: 'radio' } |
| | | , { field: 'æ°é', title: 'æ°é', width: 150 } |
| | | , { field: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 150 } |
| | | , { field: 'æºå主å
ç ', title: 'æºå主å
ç ', width: 150 } |
| | | , { field: 'æºååå
ç ', title: 'æºååå
ç ', width: 150 } |
| | | , { field: 'æºååå·', title: 'æºååå·', width: 150 } |
| | | , { field: 'æºåç±»å', title: 'æºåç±»å', width: 150 } |
| | | ]] |
| | | , height: 500 |
| | | , done: function () { |
| | | layer.closeAll("loading"); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | var a = 1; |
| | | |
| | | } |
| | | //夿æ¯å¦æ°å¢ |
| | | /*RoadBillSub("");*/ |
| | | //åå·å车 |
| | | $('#HSourceBillNo').on('keydown', function (event) { |
| | | //æ«æ¡ç |
| | | if (event.keyCode == 13) { |
| | | if ($("#HSourceBillNo").val() == '') { |
| | | layer.msg("åæ®å·ä¸ºç©ºï¼ä¸è½æ«æï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | RoadBillSub($("#HSourceBillNo").val()); |
| | | } |
| | | } |
| | | ) |
| | | |
| | | //æäº¤ |
| | | form.on('submit(Saver)', function (data) {//æäº¤ |
| | | var hmainid = $("#hmainid").val(); |
| | | if ($("#hmainid").val() == '') { |
| | | layer.msg("å
æ«æåæ®ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return false; |
| | | } |
| | | $.ajax( |
| | | { |
| | | type: "POST", |
| | | url: GetWEBURL() + "/POStockInBill/confirm", |
| | | async: true, |
| | | data: { "hmainid": hmainid }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäº |
| | | sessionStorage["SourceFlag"] = false; |
| | | layer.confirm("æ¶æ" + data.Message + $("#HBillNo").val(), { |
| | | icon: 1, |
| | | skin: 'layui-layer-lan', |
| | | closeBtn: 0, |
| | | btn: ['确认'], |
| | | btn2: function () { |
| | | //parent.layui.admin.events.closeThisTabs();å
³éé¡µç¾ |
| | | //window.close();//å
³é页é¢ï¼æµè§å¨ææï¼PDAæ æ |
| | | //window.location.reload();//æ°å¢ |
| | | parent.location.href = "../../../views/index.html" |
| | | }//å
³é |
| | | } |
| | | , function () { parent.location.href = "../../../views/index.html"; }//æ°å¢ |
| | | ); |
| | | } |
| | | else { |
| | | //layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | layui.form.render(); |
| | | }, |
| | | error: function (err) { |
| | | //layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't' }); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | return false; |
| | | |
| | | }); |
| | | }); |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |