From 2d2d672e5bdc7e6ea4e7658030229cb3b67ec89a Mon Sep 17 00:00:00 2001
From: 杨乐 <yang.le.192@qq.com>
Date: 星期一, 14 二月 2022 17:18:06 +0800
Subject: [PATCH] 无数据的情况下去掉提示,直接显示无数据的列表,且带出操作工具栏
---
WebTM/views/验收入库/产品入库/Kf_ProductInBill_Fast.html | 667 ++++++++++++++++++++++++++++++++++++------------------
1 files changed, 441 insertions(+), 226 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
index ebf0a18..c7a365b 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
@@ -44,11 +44,14 @@
<label class="layui-form-label" style="width:60px;padding-left:0px;">鍗曟嵁绫诲瀷</label>
</div>
<div class="layui-col-xs8">
- <input type="text" value="鐢熶骇姹囨姤鍗�" name="HBillTypeCHN" id="HBillTypeCHN" lay-verify="HBillTypeCHN" autocomplete="off" class="layui-input" readonly>
- <input type="hidden" value="3711" name="HBillType" id="HBillType" lay-verify="HBillType" autocomplete="off" class="layui-input">
+ <input type="text" value="鐢熶骇璁㈠崟" name="HBillTypeCHN" id="HBillTypeCHN" lay-verify="HBillTypeCHN" autocomplete="off" class="layui-input" readonly>
+ <input type="hidden" value="3710" name="HBillType" id="HBillType" lay-verify="HBillType" autocomplete="off" class="layui-input">
+ <!--<input type="text" value="鐢熶骇姹囨姤鍗�" name="HBillTypeCHN" id="HBillTypeCHN" lay-verify="HBillTypeCHN" autocomplete="off" class="layui-input" readonly>
+ <input type=-->
+ <!--"hidden" value="3711" name="HBillType" id="HBillType" lay-verify="HBillType" autocomplete="off" class="layui-input">-->
<!--<select name="HBillType" id="HBillType">
- <option value="3711">鐢熶骇姹囨姤鍗�</option>
- </select>-->
+ <option value="3711">鐢熶骇姹囨姤鍗�</option>
+ </select>-->
</div>
</div>
</div>
@@ -210,8 +213,18 @@
<div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px">
<button type="button" lay-submit="" class="layui-btn" lay-filter="Saver">鎻愪氦</button>
<button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">缂栬緫</button>
- <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">鍒犻櫎</button>
+ <!-- <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">鍒犻櫎</button>-->
<button type="button" lay-submit="" class="layui-btn" lay-filter="Cancel">閫�鍑�</button>
+ </div>
+ <div id="" style="display:none;">
+ <audio id="cs" hidden controls>
+ <source src="../../video/jingbao.wav" type="audio/ogg">
+ </audio>
+ </div>
+ <div id="" style="display:none;">
+ <audio id="cs2" hidden controls>
+ <source src="../../video/success.wav" type="audio/ogg">
+ </audio>
</div>
</form>
</div>
@@ -233,6 +246,11 @@
, table = layui.table
, form = layui.form
, element = layui.element;
+
+
+ var option = [];
+
+
//娓呯┖鐣岄潰 new
//琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
@@ -257,6 +275,45 @@
//榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
$("#HBarCode").focus();
+
+
+
+ //鍒濆鍖栨槑缁嗚〃鏍�
+ function set_InitGrid() {
+ columns = [
+ { type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
+ , { 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 }
+ ];
+ option = {
+ id: 'wl-table'
+ , elem: '#wl-table'
+ , toolbar: '#toolbarDemo'
+ , page: false
+ , cellMinWidth: 120
+ , height: 500
+ , cols: [columns]
+ , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+ , done: function (res, curr, count) {
+ }
+ };
+ }
//鑾峰彇鍙傛暟
function getUrlVars() {
@@ -291,14 +348,13 @@
// console.log(d.data);
$("#HInterID").val(d.data[0].HInterID);
$("#HBillNo").val(d.data[0].HBillNo);
- //$("#HBillType").val(d.data[0].HSourceBillType);
+ $("#HBillType").val(d.data[0].HSourceBillType);
$("#HSourceBillNo").val(d.data[0].HSourceBillNo);
//$("#HWHID").val(d.data[0].HWhID);
+ //$("#HStockPlaceID").val(d.data[0].HSPID);
//$("#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);
+ HSourceFlag = true;
}
})
}
@@ -306,29 +362,35 @@
function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
{
+ $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+ //缂栬緫鍔犺浇鏁版嵁
+ var sInterID = $("#HInterID").val();
table.render({
elem: '#wl-table'
+ //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
, url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
- , cellMinWidth: 80
, toolbar: '#toolbarDemo'
- , where: { HBillID: linterid, HBillType: '1202', sWhere: '' }
+ , defaultToolbar: []
+ , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
, cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 80 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
- , { field: 'HBatchNo', title: '鎵规', width: 100 }
- , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
- , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
- , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
+ { 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.closeAll("loading");
+ }
+ });
}
//鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
@@ -352,6 +414,7 @@
//console.log(d.data);
$("#HInterID").val(d.data[0].HInterID);
$("#HBillNo").val(d.data[0].HBillNo);
+ set_InitGrid();
}
});
}
@@ -414,39 +477,85 @@
});
//閫夋嫨淇濈
- form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '淇濈鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
+ //form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
+ // layer.open({
+ // type: 2
+ // , area: ['100%', '100%']
+ // , title: '淇濈鍒楄〃'
+ // , shade: 0.6 //閬僵閫忔槑搴�
+ // , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ // , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ // , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HKeeper', 'yes']
+ // , resize: false
+ // , cancel: function () {
+ // //$(".layui-btn").removeClass("layui-btn-disabled");
+ // }
+ // })
+ //});
+ form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鑱屽憳鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../PublicPage/UserInformation.html', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HKeeper").val(checkStatus.data[0].HName);
+ $("#HKeeperID").val(checkStatus.data[0].HItemID);
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ });
+
//閫夋嫨楠屾敹
- form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
- var sMainStr = JSON.stringify(data.field);
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '楠屾敹鍒楄〃'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
- , resize: false
- , cancel: function () {
- //$(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
- });
+ //form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
+ // var sMainStr = JSON.stringify(data.field);
+ // layer.open({
+ // type: 2
+ // , area: ['100%', '100%']
+ // , title: '楠屾敹鍒楄〃'
+ // , shade: 0.6 //閬僵閫忔槑搴�
+ // , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ // , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ // , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HSecManager', 'yes']
+ // , resize: false
+ // , cancel: function () {
+ // //$(".layui-btn").removeClass("layui-btn-disabled");
+ // }
+ // })
+ //});
+
+ form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鑱屽憳鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../PublicPage/UserInformation.html', 'yes']
+ , btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ $("#HSecManager").val(checkStatus.data[0].HName);
+ $("#HSecManagerID").val(checkStatus.data[0].HItemID);
+ layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) { }
+ })
+ });
//閫夋嫨閮ㄩ棬
form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
@@ -503,39 +612,68 @@
var sMTONo = ''
var sSourceInterID = data[0].HSourceInterID
var sSourceEntryID = data[0].HSourceEntryID
+ var HBillNo = $("#HBillNo").val()
+ var sMouldManagerCtl = 'N'
+ var sFIFOCtl = 'N'
$.ajax(
{
type: "Get",
//url: "http://61.130.49.162:9090/WMSAPI///ProductIn/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- url: GetWEBURL() + "/ProductIn/Delete_Json",
+ url: GetWEBURL() + "/ProductIn/Delete_Json_AN",
async: true,
data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
dataType: "json",
success: function (data) {
if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+ // table.render({
+ // elem: '#wl-table'
+ // //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Mate_Webs_Json'
+ // , url: GetWEBURL() + '/ProductIn/DisPlayBarCodeList_Json'
+ //, cellMinWidth: 80
+ //, toolbar: '#toolbarDemo'
+ // , where: { HBillID: sInterID, HBillNo: HBillNo, HBillType: '1202', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl}
+ //, cols: [[
+ // { type: 'radio' }
+ // , { field: 'HQty', title: '鏁伴噺', width: 80 }
+ // , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+ // , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+ // , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+ // , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+ // , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
+ // , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
+ // , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+ // , { field: 'HBatchNo', title: '鎵规', width: 100 }
+ // , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
+ // , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
+ // , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
+ //]]
+ //, height: 500
+ // })
table.render({
elem: '#wl-table'
- //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Mate_Webs_Json'
- , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
- , cellMinWidth: 80
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 80 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
- , { field: 'HBatchNo', title: '鎵规', width: 100 }
- , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 100 }
- , { field: 'HMTONo', title: '璁″垝璺熻釜鍙�', width: 100 }
- , { field: 'HMaterID', title: '鐗╂枡ID', width: 100 }
- ]]
- , height: 500
+ //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , defaultToolbar: []
+ , where: { HBillID: sInterID, HBillType: '1202', 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.closeAll("loading");
+ }
})
}
else {
@@ -614,161 +752,237 @@
});
//鎵潯鐮�
- $('#HBarCode').on('keydown', function (event) { //鎵潯鐮�
- var sSubStr = table.cache['wl-table'];
- var sBarCode = $('#HBarCode').val()
- var sInterID = $("#HInterID").val()
- var sBillNo = $("#HBillNo").val()
- var sQty = $("#HQty").val()
- var sHBillType = $("#HBillType").val() //婧愬崟绫诲瀷
- var sBillType = '1202'
- var sHWHID = $("#HWHID").val()
- var sHSPID = $("#HStockPlaceID").val()
- var sSourceBillNo = $("#HSourceBillNo").val()
- //var Flag = sessionStorage["SourceFlag"];
- if (sQty == "") {
- sQty = 0;
- }
- if (event.keyCode == 13) {
- //鍒ゆ柇鏉$爜鏄惁涓虹┖ new
- if (sBarCode == '') {
- layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
- }
- if (sBarCode != "") {
- $('#HBarCode').val("");
- }
- if (sQty != "") {
- $('#HQty').val("");
- }
- if (sHWHID == "184154")
+ $('#HBarCode').on('keydown', function (event) { //鎵潯鐮�
+ var sOldBarCode = $('#HBarCode').val()
+ var HDeleteFlag = sOldBarCode.substring(0, 1);
+ var sBarCode = sOldBarCode.slice(1);
+ var sSubStr = table.cache['wl-table'];
+ var sInterID = $("#HInterID").val()
+ var sBillNo = $("#HBillNo").val()
+ var sQty = $("#HQty").val()
+ var sHBillType = $("#HBillType").val() //婧愬崟绫诲瀷
+ var sBillType = '1202'
+ var sHWHID = $("#HWHID").val()
+ var sHSPID = $("#HStockPlaceID").val()
+ var sSourceBillNo = $("#HSourceBillNo").val()
+ if (event.keyCode == 13) {
+ if (HDeleteFlag == "*")
{
- if (sHSPID == "0")
- {
- layer.msg("浠撲綅涓虹┖锛岃閫夋嫨浠撲綅锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
}
- }
- //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_Json",
- url: GetWEBURL() + "/ProductIn/get_CheckTypeByBarCode_Json",
- type: "GET",
- data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
- success: function (result) {
- //debugger;
- 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-ProductlnBill', '2'); //璺宠浆椤电
- }
- 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-ProductlnBill', '2');//璺宠浆椤电
- }
- else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
- $("#HDeptName").val(result.data.HDeptName);
- $("#HDeptID").val(result.data.HDeptID);
- $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
- element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
- }
- 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 == "3711") {
- // $("#HBillType").val("3711");
- //}
- //else {
- // $("#HBillType").val("-1");
- //}
- $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
- element.tabChange('tab-ProductlnBill', '3');
- }
- else {
- if (HSourceFlag == "true") {
- element.tabChange('tab-ProductlnBill', '3');
+ var sBarCode = sOldBarCode.slice(1);
+ $.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///ProductIn/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , defaultToolbar: []
+ , where: { HBillID: sInterID, HBillType: '1202', 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.closeAll("loading");
+ }
+ })
}
else {
- $("#HSupName").val(result.data.HSupName);
- $("#HSupID").val(result.data.HSupID);
- //$("#HDeptName").val(result.data.HDept);
- //$("#HDeptID").val(result.data.HDeptID);
- $("#HSourceBillNo").val(result.data.HSourceBillNo);
- HSourceFlag = true;
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- //if (result.data.HSourceBillType == "3711") {
- // $("#HBillType").val("3711");
-
- //}
-
- //else {
- // $("#HBillType").val("-1");
- //}
- $("#HNote").val(";鐗╂枡鏉$爜");
- element.tabChange('tab-ProductlnBill', '3');
+ 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: "娓╅Θ鎻愮ず" });
}
- //$("#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///ProductIn/DisBillEntryList_Webs_Json'
- , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1202', 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.closeAll("loading");
- }
- });
- }
- else {
- layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- }
- layer.closeAll("loading");
- },
- error: function (err) {
- layer.msg("鎺ュ彛璇锋眰寮傚父:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- console.log(err);
+ });
+ }
+ else {
+ var sBarCode = $('#HBarCode').val()
+ //var Flag = sessionStorage["SourceFlag"];
+ if (sQty == "") {
+ sQty = 0;
}
- });
+ //鍒ゆ柇鏉$爜鏄惁涓虹┖ new
+ if (sBarCode == '') {
+ playSound();
+ layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return false;
+ }
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
+ }
+ if (sQty != "") {
+ $('#HQty').val("");
+ }
+ if (sHWHID == "184154") {
+ if (sHSPID == "0") {
+ layer.msg("浠撲綅涓虹┖锛岃閫夋嫨浠撲綅锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return false;
+ }
+ }
+ //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
+ $.ajax({
+ //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_Json",
+ url: GetWEBURL() + "/ProductIn/get_CheckTypeByBarCode_Json",
+ type: "GET",
+ data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },
+ success: function (result) {
+ //debugger;
+ 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-ProductlnBill', '2'); //璺宠浆椤电
+ }
+ 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-ProductlnBill', '2');//璺宠浆椤电
+ }
+ else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+ $("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
+ $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+ element.tabChange('tab-ProductlnBill', '2');//璺宠浆椤电
+ }
+ 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 == "3711") {
+ // $("#HBillType").val("3711");
+ //}
+ //else {
+ // $("#HBillType").val("-1");
+ //}
+ $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
+ element.tabChange('tab-ProductlnBill', '3');
+ }
+ else {
+ if (HSourceFlag == "true") {
+ element.tabChange('tab-ProductlnBill', '3');
+ }
+ else {
+ $("#HSupName").val(result.data.HSupName);
+ $("#HSupID").val(result.data.HSupID);
+ //$("#HDeptName").val(result.data.HDept);
+ //$("#HDeptID").val(result.data.HDeptID);
+ $("#HSourceBillNo").val(result.data.HSourceBillNo);
+ HSourceFlag = true;
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ //if (result.data.HSourceBillType == "3711") {
+ // $("#HBillType").val("3711");
+
+ //}
+
+ //else {
+ // $("#HBillType").val("-1");
+ //}
+ $("#HNote").val(";鐗╂枡鏉$爜");
+ element.tabChange('tab-ProductlnBill', '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///ProductIn/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , defaultToolbar: []
+ , where: { HBillID: sInterID, HBillType: '1202', 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.closeAll("loading");
+ }
+ });
+ }
+ else {
+ playSound();
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+ playSound();
+ layer.msg("鎺ュ彛璇锋眰寮傚父:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ console.log(err);
+ }
+ });
+ }
+ }
+ });
+
+
+ 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();
}
- //else
- //{
- // layer.msg(result.Message, { icon: 5 });
- //}
- //layer.closeAll("loading");
- //}
- });
+
+ 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();
+ }
//鎵簮鍗�
$('#HSourceBillNo').on('keydown', function (event) { //鎵簮鍗�
@@ -797,7 +1011,8 @@
elem: '#wl-table'
//, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
, url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
+ , toolbar: '#toolbarDemo'
+ , defaultToolbar: []
, where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
, cols: [[
{ type: 'radio' }
--
Gitblit v1.9.1