| | |
| | | <input type="text" name="HSupName" id="HSupName" lay-verify="HSupName" autocomplete="off" class="layui-input"> |
| | | <input type="hidden" name="HSupID" id="HSupID" lay-verify="HSupID" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" style="width:60px;padding-left:0px;">é¨é¨</label> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> |
| | | <script src="../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../layuiadmin/Scripts/json2.js" type="text/javascript"></script> |
| | | <script src="../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> |
| | | <script src="../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script> |
| | | 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 = get_UrlVars(); |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | var OperationType = 1;//æä½ç±»å |
| | | } else { |
| | | var HInterID = params[params[0]];//忮ID |
| | | var HMaterID = params[params[1]];//ç©æID |
| | | var HAuxPropID = params[params[2]];//è¾
å©å±æ§ |
| | | var HMTONo = params[params[3]];//计åè·è¸ªå· |
| | | var HWhID = params[params[4]];//ä»åºID |
| | | var HSPID = params[params[5]];//ä»ä½ID |
| | | var HSCWHID = params[params[6]];//è°åºä»åºID |
| | | var HSCSPID = params[params[7]];//è°åºä»ä½ID |
| | | var HBatchNo = params[params[8]];//æ¹æ¬¡ |
| | | var HSourceInterID = params[params[9]];//æºå主ID |
| | | var HSourceEntryID = params[params[10]];//æºååID |
| | | var HBillType = params[params[11]];//åæ®ç±»å |
| | | var HBarCode = params[params[12]];//æ¡ç |
| | | } |
| | | |
| | | |
| | | //layui.config({ |
| | | // base: '../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | //}).extend({ |
| | | // index: 'lib/index' //主å
¥å£æ¨¡å |
| | | //}).use(['index', 'form', 'table'], function () { |
| | | // var $ = layui.$ |
| | | // , admin = layui.admin |
| | | // , layer = layui.layer |
| | | // , table = layui.table |
| | | // , form = layui.form; |
| | | |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | base: '../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'table'], function () { |
| | | }).use(['index', 'form', 'laydate', 'table', 'element'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form; |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | |
| | | |
| | | table.render({ |
| | | elem: '#mx-table' |
| | | //, url: 'http://localhost:8083/Web/GetHBarCodeShowBillSub' |
| | | ,url: GetWEBURL() + "/Web/GetHBarCodeShowBillSub" |
| | | , where: { |
| | | "HInterID": HInterID, "HMaterID": HMaterID, "HAuxPropID": HAuxPropID, "HMTONo": HMTONo, "HWhID": HWhID, "HSPID": HSPID, "HSCWHID": HSCWHID |
| | | , "HSCSPID": HSCSPID, "HBatchNo": HBatchNo, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HBillType": HBillType |
| | | }, |
| | | cols: [[ |
| | | { type: 'radio' } |
| | | , { field: 'HSonNo', title: 'åºå·', width: 100 } |
| | | , { field: 'HBarCode', title: 'æ¡å½¢ç ', width: 200 } |
| | | , { field: 'HQty', title: 'æ°é', width: 100 } |
| | | , { field: 'HBatchNo', title: 'æ¹æ¬¡', width: 150 } |
| | | , { field: 'HMTONo', title: '计åè·è¸ªåå·', width: 150 } |
| | | ]] |
| | | // , data: [linterid] |
| | | }); |
| | | |
| | | //è·å页é¢è·³è½¬åæ° |
| | | var HMTONo = '' |
| | | var HSourceInterID = 0 |
| | | var HSourceEntryID = 0 |
| | | var HQty = 0 |
| | | var HAuxPropID = 0 |
| | | var HBatchNo = '' |
| | | |
| | | var params = getUrlVars(); |
| | | if (typeof (params[params[0]]) == "undefined") { |
| | | var OperationType = 1;//æä½ç±»å |
| | | } else { |
| | | var HInterID = params[params[0]];//忮ID |
| | | var HMaterID = params[params[1]];//ç©æID |
| | | //var HAuxPropID = params[params[2]];//è¾
å©å±æ§ |
| | | //var HMTONo = params[params[3]];//计åè·è¸ªå· |
| | | //var HWhID = params[params[4]];//ä»åºID |
| | | //var HSPID = params[params[5]];//ä»ä½ID |
| | | //var HSCWHID = params[params[6]];//è°åºä»åºID |
| | | //var HSCSPID = params[params[7]];//è°åºä»ä½ID |
| | | //var HBatchNo = params[params[8]];//æ¹æ¬¡ |
| | | //var HSourceInterID = params[params[2]];//æºå主ID |
| | | //var HSourceEntryID = params[params[3]];//æºååID |
| | | //var HBillType = params[params[6]];//åæ®ç±»å |
| | | //var HQty = params[params[6]];//æ¡ç |
| | | var sBillType = params[params[2]];//åæ®ç±»å |
| | | |
| | | |
| | | //var HBillType = '' |
| | | |
| | | //var sBillType = '';//åæ®ç±»å |
| | | |
| | | var sWhere = " and HInterID=" + HInterID + " and HMaterID=" + HMaterID + ""; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Kf_BarCodeEditDlg/Kf_BarCodeEditDlg_Json", |
| | | type: "GET", |
| | | data: { "sWhere": sWhere }, |
| | | success: function (d) { |
| | | HMTONo = d.data[0].HMTONo |
| | | HSourceInterID = d.data[0].HSourceInterID |
| | | HSourceEntryID = d.data[0].HSourceEntryID |
| | | HBatchNo = d.data[0].HBatchNo |
| | | //HSourceInterID = 11 |
| | | //HSourceEntryID = 11 |
| | | HQty = d.data[0].HQty |
| | | HAuxPropID = d.data[0].HAuxPropID |
| | | //sBillType = d.data[0].HBillType |
| | | tableRender(); |
| | | } |
| | | }) |
| | | |
| | | |
| | | } |
| | | function tableRender() { |
| | | table.render({ |
| | | elem: '#mx-table' |
| | | //, url: 'http://localhost:8083/Web/GetHBarCodeShowBillSub' |
| | | , url: GetWEBURL() + "/Web/GetHBarCodeShowBillSub" |
| | | , where: { |
| | | "HInterID": HInterID, "HMaterID": HMaterID, "HAuxPropID": HAuxPropID, "HMTONo": HMTONo, "HWhID": 0, "HSPID": 0, "HSCWhID": 0 |
| | | , "HSCSPID": 0, "HBatchNo": HBatchNo, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "sBillType": sBillType, sWhere: '' |
| | | }, |
| | | cols: [[ |
| | | { type: 'radio' } |
| | | , { field: 'HSonNo', title: 'åºå·', width: 100 } |
| | | , { field: 'HBarCode', title: 'æ¡å½¢ç ', width: 200 } |
| | | , { field: 'HQty', title: 'æ°é', width: 100 } |
| | | , { field: 'HBatchNo', title: 'æ¹æ¬¡', width: 150 } |
| | | , { field: 'HMTONo', title: '计åè·è¸ªåå·', width: 150 } |
| | | ]] |
| | | // , data: [linterid] |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | form.on('submit(cmdCancel)', function () { |
| | | var index = parent.layer.getFrameIndex(window.name); |
| | | parent.layer.close(index); |
| | | }) |
| | | //function Pub_Close(closeType) { |
| | | // if (closeType == 1) { |
| | | // //å
³éå¼¹çª |
| | | // var index = parent.layer.getFrameIndex(window.name); |
| | | // parent.layer.close(index); |
| | | // } else if (closeType == 2) { |
| | | // //å
³éé¡µç¾ |
| | | // parent.layui.admin.events.closeThisTabs(); |
| | | // } |
| | | //} |
| | | |
| | | |
| | | //#region å é¤ |
| | | function set_DeleteBill() { |
| | | form.on('submit(cmdDel)', function () { |
| | | var checkStatus = table.checkStatus('mx-table') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Kf_BarCodeEditDlg/DeltetBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": HInterID, "HBarCode": HBarCode, "HBillType": HBillType }, |
| | | url: GetWEBURL() + "/Kf_BarCodeEditDlg/DeltetBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": HInterID, "HBarCode": HBarCode, "HBillType": sBillType }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | //ç¼è¾ |
| | | //è°æ´ |
| | | form.on('submit(cmdChange)', function () {//ç¼è¾ |
| | | var checkStatus = table.checkStatus('mx-table') |
| | | , data = checkStatus.data; |
| | | var sQty = data[0].HQty.toString(); |
| | | var iQty = $('#HQty').val() |
| | | var iQty = $('#HQty').val(); |
| | | var HBarCode = data[0].HBarCode.toString(); |
| | | var sWhID = data[0].HWHID; |
| | | var sSPID = data[0].HStockPlaceID; |
| | | var sBatchNo = data[0].HBatchNo; |
| | | var HMTONo = data[0].HMTONo; |
| | | //if (iQty > sQty) |
| | | //{ |
| | | var EndQty = iQty - sQty; |
| | | //} |
| | | |
| | | $.ajax( |
| | | { |
| | | type: "Get", |
| | |
| | | url: GetWEBURL() + "/Kf_BarCodeEditDlg/GetCheckQtyByBarCodeBill", |
| | | async: true, |
| | | data: { |
| | | "HInterID": HInterID, "HBillType": HBillType, "sBatchNo": HBatchNo, "sBarCode": HBarCode, "sSCWhID": HSCWHID |
| | | , "sSCSPID": HSCSPID, "sAuxPropID": HAuxPropID, "sMTONo": HMTONo, "iQty": iQty |
| | | , "HMaterID": HMaterID, "sWhID": HWhID, "sSPID": HSPID, "HSourceInterID": HSourceInterID |
| | | "HInterID": HInterID, "HBillType": sBillType, "sBatchNo": sBatchNo, "sBarCode": HBarCode, "sSCWhID": 0 |
| | | , "sSCSPID": 0, "sAuxPropID": HAuxPropID, "sMTONo": HMTONo, "iQty": iQty |
| | | , "HMaterID": HMaterID, "sWhID": sWhID, "sSPID": sSPID, "HSourceInterID": HSourceInterID |
| | | , "HSourceEntryID": HSourceEntryID, "EndQty": EndQty, "sQty": sQty |
| | | }, |
| | | dataType: "json", |
| | |
| | | //, url: 'http://localhost:8083/Web/GetHBarCodeShowBillSub' |
| | | , url: GetWEBURL() + "/Web/GetHBarCodeShowBillSub" |
| | | , where: { |
| | | "HInterID": HInterID, "HMaterID": HMaterID, "HAuxPropID": HAuxPropID, "HMTONo": HMTONo, "HWhID": HWhID, "HSPID": HSPID, "HSCWHID": HSCWHID |
| | | , "HSCSPID": HSCSPID, "HBatchNo": HBatchNo, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HBillType": HBillType |
| | | "HInterID": HInterID, "HMaterID": HMaterID, "HAuxPropID": HAuxPropID, "HMTONo": HMTONo, "HWhID": sWhID, "HSPID": sSPID, "HSCWHID": 0 |
| | | , "HSCSPID": 0, "HBatchNo": sBatchNo, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "sBillType": sBillType, sWhere: '' |
| | | |
| | | }, |
| | | cols: [[ |
| | | { type: 'radio' } |
| | |
| | | layer.msg('é误' + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['100%', '100%'] |
| | | , title: 'æç»å表' |
| | | , shade: 0.6 //é®ç½©éæåº¦ |
| | | , maxmin: true //å
许å
¨å±æå°å |
| | | , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | , content: ['../../../views/å
Œ
±é¡µé¢/Kf_BarCodeEditDlg.html?HInterID=' + HInterID + '&HMaterID = ' + HMaterID + '&HAuxPropID = ' + HAuxPropID + '& HMTONo = ' + HMTONo + '&HWhID = ' + HWhID + '&HSPID = ' + HSPID + '&HSCWHID = ' + HSCWHID + '&HSCSPID= ' + HSCSPID + '&HBatchNo= ' + HBatchNo + '&HSourceInterID= ' + HSourceInterID + '&HSourceEntryID= ' + HSourceEntryID + '&HBillType= ' + HBillType + '&HBarCode= ' + HBarCode + '' |
| | | , 'yes'] |
| | | , resize: false |
| | | , cancel: function () { |
| | | //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | } |
| | | }) |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | | // layer.open({ |
| | | // type: 2 |
| | | // , area: ['100%', '100%'] |
| | | // , title: 'æç»å表' |
| | | // , shade: 0.6 //é®ç½©éæåº¦ |
| | | // , maxmin: true //å
许å
¨å±æå°å |
| | | // , anim: 0 //0-6çå¨ç»å½¢å¼ï¼-1ä¸å¼å¯ |
| | | // , content: ['../../../views/å
Œ
±é¡µé¢/Kf_BarCodeEditDlg.html?HInterID=' + HInterID + '&HMaterID = ' + HMaterID + '&HAuxPropID = ' + HAuxPropID + '& HMTONo = ' + HMTONo + '&HWhID = ' + HWhID + '&HSPID = ' + HSPID + '&HSCWHID = ' + HSCWHID + '&HSCSPID= ' + HSCSPID + '&HBatchNo= ' + HBatchNo + '&HSourceInterID= ' + HSourceInterID + '&HSourceEntryID= ' + HSourceEntryID + '&HBillType= ' + HBillType + '&HBarCode= ' + HBarCode + '' |
| | | // , 'yes'] |
| | | // , resize: false |
| | | // , cancel: function () { |
| | | // //$(".layui-btn").removeClass("layui-btn-disabled"); |
| | | // } |
| | | // }) |
| | | //} else { |
| | | // layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | //} |
| | | }) |
| | | function getUrlVars() { |
| | | var vars = [], hash; |
| | | //var hashes = decodeURIComponent(window.location.href.slice(window.location.href.indexOf('?') + 1).split('&')); |
| | | //var hashes1 = decodeURIComponent(window.location.href); |
| | | //var hashes = hashes1.indexOf('?') + 1.split('&'); |
| | | |
| | | var hashes = window.location.href.slice(decodeURIComponent(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; |
| | | } |
| | | }) |
| | | |
| | | |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |