From a34f918035b2386ef98b84a8e85b8e007cdce86b Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期二, 07 六月 2022 10:09:40 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
---
WebTM/views/领料发货/销售出库/Kf_SellOutBill_Fast.html | 750 +++++++++++++++++++++++++++++++--------------------------
1 files changed, 411 insertions(+), 339 deletions(-)
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html"
index cd59f7b..6b3bba9 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html"
@@ -8,7 +8,12 @@
<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">
-
+ <style>
+
+ .layui-col-xs8 {
+ width: 55.666667%;
+ }
+ </style>
</head>
<body>
@@ -26,6 +31,19 @@
</div>
<div class="layui-col-xs8">
<input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input">
+ </div>
+ <div class="layui-col-xs2">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin">纭畾</button>
+ </div>
+ </div>
+ <div class="layui-form-item" style="padding:0px;margin:0px">
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:40px;padding-left:0px;">鏁伴噺</label>
+ </div>
+ <div class="layui-col-xs8">
+ <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
+ </div>
</div>
</div>
</div>
@@ -61,6 +79,9 @@
</div>
<div class="layui-col-xs8">
<input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input">
+ </div>
+ <div class="layui-col-xs2">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin2">纭畾</button>
</div>
</div>
</div>
@@ -177,6 +198,7 @@
</div>
</div>
</div>
+
<!--鐗╂枡娓呭崟-->
<div class="layui-tab-item">
<!--<div class="layui-form-item" style="padding:0px;margin:0px">
@@ -189,16 +211,7 @@
</div>
</div>
</div>-->
- <div class="layui-form-item" style="padding:0px;margin:0px">
- <div class="layui-row">
- <div class="layui-col-xs3">
- <label class="layui-form-label" style="width:40px;padding-left:0px;">鏁伴噺</label>
- </div>
- <div class="layui-col-xs8">
- <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
- </div>
- </div>
- </div>
+
<table class="layui-hide" id="wl-table" lay-filter="wl-table"></table>
</div>
<!--鏄庣粏娓呭崟-->
@@ -211,7 +224,30 @@
</div>
<!--鏃ュ織-->
<div class="layui-tab-item">
- <table class="layui-hide" id="fj-table-qd" lay-filter="fj-table-qd"></table>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">鏉$爜鏁伴噺</label>
+ </div>
+ <div class="layui-col-xs8 layui-input-inline mobile">
+ <input type="text" name="HBarcodeQtys" id="HBarcodeQtys" lay-verify="HBarcodeQtys" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">鎬绘暟閲�</label>
+ </div>
+ <div class="layui-col-xs8 layui-input-inline mobile">
+ <input type="text" name="HSumQtys" id="HSumQtys" lay-verify="HSumQtys" value="0" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">鏃ュ織</label>
+ </div>
+ <div class="layui-col-xs8 layui-input-inline mobile">
+ <input type="text" name="HNote" id="HNote" lay-verify="HNote" autocomplete="off" class="layui-input">
+ </div>
+ </div>
</div>
</div>
<!--<div class="layui-form-item" style="margin-bottom: 20px;">
@@ -391,7 +427,7 @@
$("#HBillNo").val(d.data[0].HBillNo);
$("#HBillType").val(d.data[0].HSourceBillType);
$("#HSourceBillNo").val(d.data[0].HSourceBillNo);
-
+ $("#HSourceBillNo").attr("disabled", "true");
HSourceFlag = true;
//$("#HWHID").val(d.data[0].HWhID);
//$("#HStockPlaceID").val(d.data[0].HSPID);
@@ -650,23 +686,47 @@
})
//缂栬緫
+ //form.on('submit(cmdModify)', function () {//缂栬緫
+ // var checkStatus = table.checkStatus('wl-table')
+ // , data = checkStatus.data;
+ // if (checkStatus.data.length === 1) {
+ // var HInterID = data[0].HInterID.toString();
+ // var HMaterID = data[0].HMaterID.toString();
+ // var HAuxPropID = data[0].HAuxPropID.toString();
+ // var HMTONo = data[0].HMTONo.toString();
+ // var HWhID = data[0].HWhID.toString();
+ // var HSPID = data[0].HSPID.toString();
+ // var HSCWHID = data[0].HSCWHID.toString();
+ // var HSCSPID = data[0].HSCSPID.toString();
+ // var HBatchNo = data[0].HBatchNo.toString();
+ // var HSourceInterID = data[0].HSourceInterID.toString();
+ // var HSourceEntryID = data[0].HSourceEntryID.toString();
+ // var HBillType = '1205';
+ // var HBarCode = data[0].HBarCode.toString();
+ // 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('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ // }
+ //})
+
form.on('submit(cmdModify)', function () {//缂栬緫
+ //var sSubStr = table.cache['wl-table'];
var checkStatus = table.checkStatus('wl-table')
, data = checkStatus.data;
- if (checkStatus.data.length === 1) {
- var HInterID = data[0].HInterID.toString();
- var HMaterID = data[0].HMaterID.toString();
- var HAuxPropID = data[0].HAuxPropID.toString();
- var HMTONo = data[0].HMTONo.toString();
- var HWhID = data[0].HWhID.toString();
- var HSPID = data[0].HSPID.toString();
- var HSCWHID = data[0].HSCWHID.toString();
- var HSCSPID = data[0].HSCSPID.toString();
- var HBatchNo = data[0].HBatchNo.toString();
- var HSourceInterID = data[0].HSourceInterID.toString();
- var HSourceEntryID = data[0].HSourceEntryID.toString();
- var HBillType = '1205';
- var HBarCode = data[0].HBarCode.toString();
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
layer.open({
type: 2
, area: ['100%', '100%']
@@ -674,17 +734,46 @@
, 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']
+ , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?HInterID=' + data[0].HInterID + '&HMaterID =' + data[0].HMaterID + '&HBillType =' + data[0].HBillType, 'yes']
, resize: false
, cancel: function () {
//$(".layui-btn").removeClass("layui-btn-disabled");
}
+ , end: function () {
+ //鍒锋柊椤甸潰,
+ //location.reload();
+ var sInterID = $("#HInterID").val()
+ table.render({
+ elem: '#wl-table'
+ //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , defaultToolbar: []
+ , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HSNO', title: '搴忓彿', width: 60 }
+ , { field: 'HQty', title: '鏁伴噺', width: 80 }
+ , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 80 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 90 }
+ , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
+ , { field: 'HBatchNo', title: '鎵规', width: 90 }
+ ]]
+ // , data: [linterid]
+ // , page: true
+ , height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
+ })
+ }
})
- } else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
- }
- })
+ // }
+ });
//鍒犻櫎
form.on('submit(cmdDelete)', function () {//鍒犻櫎
@@ -821,254 +910,15 @@
//鎵潯鐮�-鐩存帴璋僿ebservice
$('#HBarCode').on('keydown', function (event) {
- var sOldBarCode = $('#HBarCode').val()
- var HDeleteFlag = sOldBarCode.substring(0, 1);
- var sBarCode = sOldBarCode.slice(1);
-
-
- //var sBarCode = $('#HBarCode').val()//鏉$爜
- var sInterID = $("#HInterID").val()//鍗曟嵁鍙稩D
- var sBillType = '1205'
- var sBillNo = $("#HBillNo").val()//鍗曟嵁鍙�
- var sMaker = sessionStorage["HUserName"];
- var sHWHID = $("#HWHID").val();//浠撳簱ID
- var sHSPID = $("#HStockPlaceID").val();//浠撲綅ID
- var sQty = $("#HQty").val()//鏁伴噺
- //var SourceFlag = sessionStorage["SourceFlag"];
- var sSourceBillNo = $("#HSourceBillNo").val();//婧愬崟鍙�
- var sHBillType = $("#HBillType").val() //婧愬崟绫诲瀷-鍙戣揣閫氱煡鍗曪細1402锛岄攢鍞鍗�1401
- var sBillType = '1205'
- if (sQty == "") {
- sQty = 0;
- }
if (event.keyCode == 13) {
- if (HDeleteFlag == "*") {
- if (sBarCode != "") {
- $('#HBarCode').val("");
- }
- $.ajax(
- {
- type: "Get",
- url: GetWEBURL() + "/ProductIn/Delete_Json",
- async: true,
- data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HBarCode": sBarCode },
- dataType: "json",
- success: function (data) {
- if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
- table.render({
- elem: '#wl-table'
- // , url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
- , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
- , defaultToolbar: []
- , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
- , { field: 'HBatchNo', title: '鎵规', width: 150 }
- , { field: 'HInterID', title: '鍗曟嵁ID', width: 150, hide: true }
- , { field: 'HBilltype', title: '鍗曟嵁绫诲瀷', width: 150, hide: true }
- , { field: 'Hbarcode', title: '鏉$爜缂栧彿', width: 150, hide: true }
- , { field: 'HSCWHID', title: '璋冨嚭浠撳簱ID', width: 150, hide: true }
- , { field: 'HSCSPID', title: '璋冨嚭浠撲綅ID', width: 150, hide: true }
- , { field: 'HAuxPropID', title: '杈呭姪灞炴�D', width: 150, hide: true }
- , { field: 'HMTONo', title: 'MTO鍙�', width: 150, hide: true }
- , { field: 'HMaterID', title: '鐗╂枡ID', width: 150, hide: true }
- ]]
- // , data: [linterid]
- // , page: true
- //, height: 500
- , done: function () {
- layer.closeAll("loading");
- }
- })
- }
- else {
- layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-
- }
- },
- error: function (err) {
- layer.msg('閿欒' + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-
- }
- });
- }
- else {
- var sBarCode = $('#HBarCode').val()
- if (sBarCode == '') {
- //
- playSound();
- layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
- //11
- return false;
- }
- if (sBarCode != "") {
- $('#HBarCode').val("");
- }
- $.ajax({
- url: GetWEBURL() + "/SellOut/get_CheckTypeByBarCode_Json",
- type: "GET",
- data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sMaker, "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },
- success: function (result) {
- playSound1();
- if (result.count == 1) {
- if (result.data.HBarType == '浠撳簱鏉$爜') {
- $("#HWHNAME").val(result.data.HWhName);
- $("#HWHID").val(result.data.HWhID);
- $("#HStockPlaceName").val("");
- $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
- element.tabChange('tab-Kf_SellOutBill', '3'); //璺宠浆椤电
- }
- else if (result.data.HBarType == '浠撲綅鏉$爜') {
- $("#HStockPlaceName").val(result.data.HSPName);
- $("#HStockPlaceID").val(result.data.HSPID);
- $("#HWHNAME").val(result.data.HWhName);
- $("#HWHID").val(result.data.HWhID);
- $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
- element.tabChange('tab-Kf_SellOutBill', '3');//璺宠浆椤电
- }
- else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
- $("#HDeptName").val(result.data.HDeptName);
- $("#HDeptID").val(result.data.HDeptID);
- $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
- element.tabChange('tab-Kf_SellOutBill', '3');//璺宠浆椤电
- }
- else if (result.data.HBarType == '婧愬崟鏉$爜') {
- //$("#HSupName").val(result.data.HSupName);
- $("#HSupID").val(result.data.HSupID);
- //$("#HDeptName").val(result.data.HDeptName);
- $("#HDeptID").val(result.data.HDeptID);
- $("#HSourceBillNo").val(result.data.HSourceBillNo);
- HSourceFlag = true;
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- if (result.data.HSourceBillType == "1402") {
- $("#HBillType").val("1402");
-
- }
- else if (result.data.HSourceBillType == "1401") {
- $("#HBillType").val("1401");
- }
- else {
- $("#HBillType").val("鎵嬪伐褰曞叆");
- }
- $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
- element.tabChange('tab-Kf_SellOutBill', '3');
- }
- else {
- if (HSourceFlag == "true") {
- element.tabChange('tab-Kf_SellOutBill', '3');
- }
- else {
- //$("#HSupName").val(result.data.HSupName);
- $("#HSupID").val(result.data.HSupID);
- //$("#HDeptName").val(result.data.HDeptName);
- $("#HDeptID").val(result.data.HDeptID);
- $("#HSourceBillNo").val(result.data.HSourceBillNo);
- HSourceFlag = true;
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- if (result.data.HSourceBillType == "1402") {
- $("#HBillType").val("1402");
-
- }
- else if (result.data.HSourceBillType == "1401") {
- $("#HBillType").val("1401");
- }
- //else if (result.data.HSourceBillType == "1601") {
- // $("#HBillType").val("1601");
- //}
- $("#HNote").val(";鐗╂枡鏉$爜");
- element.tabChange('tab-Kf_SellOutBill', '3');
- }
- }
- //$("#HSupID").val(result.data.HSupID);
- //$("#HSupName").val(result.data.HSupName);
- //$("#HDeptID").val(result.data.HDeptID);
- //$("#HDeptName").val(result.data.HDeptName);
- layer.load(3)
- table.render({
- elem: '#wl-table'
- // , url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
- , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
- , defaultToolbar: []
- , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
- , { field: 'HBatchNo', title: '鎵规', width: 150 }
- , { field: 'HInterID', title: '鍗曟嵁ID', width: 150, hide: true }
- , { field: 'HBilltype', title: '鍗曟嵁绫诲瀷', width: 150, hide: true }
- , { field: 'Hbarcode', title: '鏉$爜缂栧彿', width: 150, hide: true }
- , { field: 'HSCWHID', title: '璋冨嚭浠撳簱ID', width: 150, hide: true }
- , { field: 'HSCSPID', title: '璋冨嚭浠撲綅ID', width: 150, hide: true }
- , { field: 'HAuxPropID', title: '杈呭姪灞炴�D', width: 150, hide: true }
- , { field: 'HMTONo', title: 'MTO鍙�', width: 150, hide: true }
- , { field: 'HMaterID', title: '鐗╂枡ID', width: 150, hide: true }
- ]]
- // , data: [linterid]
- // , page: true
- //, height: 500
- , done: function () {
- layer.closeAll("loading");
- }
- });
- }
- else {
- // $("#verifycode").click();
- //layer.msg(result.Message, { icon: 5 });
- //
- playSound();
- layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- //11
- }
- layer.closeAll("loading");
- },
- error: function (err) {
- playSound();
- layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- //11
- }
- });
- }
+ GetMeesageByBarCode();
}
});
-
- function playSound() {
- console.log("playSound");
- //var audio = document.getElementById("cs");
- //$("appendAut").html("");
- //if (audio == null)
- //$("appendAut").append('<audio id="cs" hidden controls> <source src = "../../video/jingbao.wav" type = "audio/ogg"> </audio >');
- //$("appendAut").attr("src","../../video/jingbao.wav")
- var audio = document.getElementById("cs");
- audio.play();
- }
-
- function playSound1() {
- console.log("playSound1");
- //var audio = document.getElementById("cs");
- //$("appendAut").html("");
- //if (audio == null)
- //$("appendAut").append('<audio id="cs" hidden controls> <source src = "../../video/success.wav" type = "audio/ogg"> </audio >');
- //$("appendAut").attr("src", "../../video/success.wav")
- var audio = document.getElementById("cs2");
- audio.play();
- }
+ //纭畾
+ form.on('submit(QueDin)', function (data) {
+ GetMeesageByBarCode();
+ });
+
$('#HStockPlaceName').on('keydown', function (event) { //鎵粨浣�
var HBarCode = $('#HStockPlaceName').val()
@@ -1171,68 +1021,16 @@
//});
//鎵簮鍗�
- $('#HSourceBillNo').on('keydown', function (event) { //鎵簮鍗�
- var HSourceBillNo = $('#HSourceBillNo').val()
- var sInterID = $("#HInterID").val()
- var sBillNo = $("#HBillNo").val()
- var HSourceBillType = $("#HBillType").val()
+ $('#HSourceBillNo').on('keydown', function (event) {
if (event.keyCode == 13) {
- var index = layer.load(0);
- //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁 new
- if (HSourceBillNo == "" || sInterID <= 0) {
- layer.close(index);
- layer.msg("婧愬崟鍙蜂负绌猴紝鎴栬�呭唴鐮佷笉瀛樺湪锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return;
- }
- $.ajax({
- url: GetWEBURL() + "/SellOut/set_SavePonderationBillMain_Temp_Source_Fast_Json",
- type: "GET",
- data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
- success: function (result) {
- if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- GetSellOutFindSP();
- $("#HSupID").val(result.data[0].HSupID);
- $("#HSupName").val(result.data[0].HSupName);
- //$("#HDeptID").val(result.data[0].HDeptID);
- //$("#HDeptName").val(result.data[0].HDeptName);
- HSourceFlag = true;
- element.tabChange('tab-SellOutBill', '3');
- table.render({
- elem: '#wl-table'
- , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
- , defaultToolbar: []
- , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
- , { field: 'HBatchNo', title: '鎵规', width: 150 }
- ]]
- // , data: [linterid]
- // , page: true
- //, height: 500
- , done: function () {
- layer.close(index);
- }
- });
- layer.close(index);
- }
- else {
- layer.close(index);
- layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- }
- layer.close(index);
- }
- });
+ GetMeesageBySourceBillNo();
}
});
+ //纭畾
+ form.on('submit(QueDin2)', function (data) {
+ GetMeesageBySourceBillNo();
+ });
+
//鍒锋柊鏄庣粏椤电
table.render({
elem: '#mx-table'
@@ -1288,7 +1086,6 @@
if (result.count == 1) {
ZHOption.data = result.data;
table.render(ZHOption);
- // layer.close(index);
element.tabChange('tab-SellOutBill', '5');
}
else {
@@ -1299,9 +1096,284 @@
}
});
}
+
+ //鎵潯鐮�
+ function GetMeesageByBarCode(obj) { //杩斿洖宸ヤ綔涓績
+ var sOldBarCode = $('#HBarCode').val()
+ var HDeleteFlag = sOldBarCode.substring(0, 1);
+ var sBarCode = sOldBarCode.slice(1);
+ var sInterID = $("#HInterID").val()//鍗曟嵁鍙稩D
+ var sBillType = '1205'
+ var sBillNo = $("#HBillNo").val()//鍗曟嵁鍙�
+ var sMaker = sessionStorage["HUserName"];
+ var sHWHID = $("#HWHID").val();//浠撳簱ID
+ var sHSPID = $("#HStockPlaceID").val();//浠撲綅ID
+ var sQty = $("#HQty").val()//鏁伴噺
+ if (sQty == "") {
+ sQty = 0;
+ }
+ //var SourceFlag = sessionStorage["SourceFlag"];
+ var sSourceBillNo = $("#HSourceBillNo").val();//婧愬崟鍙�
+ var sHBillType = $("#HBillType").val() //婧愬崟绫诲瀷-鍙戣揣閫氱煡鍗曪細1402锛岄攢鍞鍗�1401
+ var sBillType = '1205'
+
+ if (HDeleteFlag == "*") {
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
+ }
+ $.ajax(
+ {
+ type: "Get",
+ url: GetWEBURL() + "/ProductIn/Delete_Json",
+ async: true,
+ data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HBarCode": sBarCode },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+ playSound1();
+ table.reload('wl-table', {
+ where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+ });
+ }
+ else {
+ playSound();
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+
+ }
+ },
+ error: function (err) {
+ playSound();
+ layer.msg('閿欒' + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+
+ }
+ });
+ }
+ else {
+ var sBarCode = $('#HBarCode').val()
+ if (sBarCode == '') {
+ //
+ playSound();
+ layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+ //11
+ return false;
+ }
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
+ }
+ $.ajax({
+ url: GetWEBURL() + "/SellOut/get_CheckTypeByBarCode_Json",
+ type: "GET",
+ data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sMaker, "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },
+ success: function (result) {
+ playSound1();
+ if (result.count == 1) {
+ if (result.data.HBarType == '浠撳簱鏉$爜') {
+ $("#HWHNAME").val(result.data.HWhName);
+ $("#HWHID").val(result.data.HWhID);
+ $("#HStockPlaceName").val("");
+ $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+ element.tabChange('tab-Kf_SellOutBill', '3'); //璺宠浆椤电
+ }
+ else if (result.data.HBarType == '浠撲綅鏉$爜') {
+ $("#HStockPlaceName").val(result.data.HSPName);
+ $("#HStockPlaceID").val(result.data.HSPID);
+ $("#HWHNAME").val(result.data.HWhName);
+ $("#HWHID").val(result.data.HWhID);
+ $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+ element.tabChange('tab-Kf_SellOutBill', '3');//璺宠浆椤电
+ }
+ else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+ $("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
+ $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+ element.tabChange('tab-Kf_SellOutBill', '3');//璺宠浆椤电
+ }
+ else if (result.data.HBarType == '婧愬崟鏉$爜') {
+ //$("#HSupName").val(result.data.HSupName);
+ $("#HSupID").val(result.data.HSupID);
+ //$("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
+ $("#HSourceBillNo").val(result.data.HSourceBillNo);
+ HSourceFlag = true;
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (result.data.HSourceBillType == "1402") {
+ $("#HBillType").val("1402");
+
+ }
+ else if (result.data.HSourceBillType == "1401") {
+ $("#HBillType").val("1401");
+ }
+ else {
+ $("#HBillType").val("鎵嬪伐褰曞叆");
+ }
+ $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
+ element.tabChange('tab-Kf_SellOutBill', '3');
+ }
+ else {
+ if (HSourceFlag == "true") {
+ element.tabChange('tab-Kf_SellOutBill', '3');
+ }
+ else {
+ //$("#HSupName").val(result.data.HSupName);
+ $("#HSupID").val(result.data.HSupID);
+ //$("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
+ $("#HSourceBillNo").val(result.data.HSourceBillNo);
+ HSourceFlag = true;
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (result.data.HSourceBillType == "1402") {
+ $("#HBillType").val("1402");
+
+ }
+ else if (result.data.HSourceBillType == "1401") {
+ $("#HBillType").val("1401");
+ }
+ //else if (result.data.HSourceBillType == "1601") {
+ // $("#HBillType").val("1601");
+ //}
+ $("#HNote").val(";鐗╂枡鏉$爜");
+ element.tabChange('tab-Kf_SellOutBill', '3');
+ }
+ }
+ //$("#HSupID").val(result.data.HSupID);
+ //$("#HSupName").val(result.data.HSupName);
+ //$("#HDeptID").val(result.data.HDeptID);
+ //$("#HDeptName").val(result.data.HDeptName);
+ table.render({
+ elem: '#wl-table'
+ , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HSNO', title: '搴忓彿', width: 60 }
+ , { field: 'HQty', title: '鏁伴噺', width: 80 }
+ , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 80 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 90 }
+ , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
+ , { field: 'HBatchNo', title: '鎵规', width: 90 }
+ ]]
+ , height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
+ });
+
+ var count = 0;
+ var count1 = 0;
+ for (var i = 0; i < result.data.length; i++) {
+ count += result.data.HQty;
+ count1 += result.data.HPieceQty;
+ }
+ $("#HSumQtys").val(count);
+ $("#HBarCodeQtys").val(count1);
+ playSound1();
+ }
+ else {
+ // $("#verifycode").click();
+ //layer.msg(result.Message, { icon: 5 });
+ //
+ playSound();
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ //11
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+ playSound();
+ layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ //11
+ }
+ });
+ }
+ }
+ function playSound() {
+ console.log("playSound");
+ //var audio = document.getElementById("cs");
+ //$("appendAut").html("");
+ //if (audio == null)
+ //$("appendAut").append('<audio id="cs" hidden controls> <source src = "../../video/jingbao.wav" type = "audio/ogg"> </audio >');
+ //$("appendAut").attr("src","../../video/jingbao.wav")
+ var audio = document.getElementById("cs");
+ audio.play();
+ }
+ function playSound1() {
+ console.log("playSound1");
+ //var audio = document.getElementById("cs");
+ //$("appendAut").html("");
+ //if (audio == null)
+ //$("appendAut").append('<audio id="cs" hidden controls> <source src = "../../video/success.wav" type = "audio/ogg"> </audio >');
+ //$("appendAut").attr("src", "../../video/success.wav")
+ var audio = document.getElementById("cs2");
+ audio.play();
+ }
+ //鎵簮鍗�
+ function GetMeesageBySourceBillNo(obj) {
+ var HSourceBillNo = $('#HSourceBillNo').val()
+ var sInterID = $("#HInterID").val()
+ var sBillNo = $("#HBillNo").val()
+ var HSourceBillType = $("#HBillType").val()
+ if (HSourceBillNo == "" || sInterID <= 0) {
+ layer.msg("婧愬崟鍙蜂负绌猴紝鎴栬�呭唴鐮佷笉瀛樺湪锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return;
+ }
+ $.ajax({
+ url: GetWEBURL() + "/SellOut/set_SavePonderationBillMain_Temp_Source_Fast_Json",
+ type: "GET",
+ data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ GetSellOutFindSP();
+ $("#HSupID").val(result.data[0].HSupID);
+ $("#HSupName").val(result.data[0].HSupName);
+ //$("#HDeptID").val(result.data[0].HDeptID);
+ //$("#HDeptName").val(result.data[0].HDeptName);
+ HSourceFlag = true;
+ element.tabChange('tab-SellOutBill', '3');
+ //table.reload('wl-table', {
+ // where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+ //});
+
+ table.render({
+ elem: '#wl-table'
+ , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HSNO', title: '搴忓彿', width: 60 }
+ , { field: 'HQty', title: '鏁伴噺', width: 80 }
+ , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 80 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 90 }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 90 }
+ , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 90 }
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 90 }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 90 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 90 }
+ , { field: 'HBatchNo', title: '鎵规', width: 90 }
+ ]]
+ , height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
+ });
+ $("#HSourceBillNo").attr("disabled", "true");
+ }
+ else {
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ }
+ });
+ }
+
+ });
//浠ヤ笂涓簂ayui妯″潡
- });
+
function GetHWHValue(obj) //杩斿洖浠撳簱
{
$("#HWHNAME").val(obj[0].HName);
--
Gitblit v1.9.1