给单据增加扫码功能
This commit is contained in:
@@ -1222,6 +1222,28 @@
|
||||
$('#depotFM').form('clear');
|
||||
bindDepotEvent();
|
||||
},
|
||||
//扫码
|
||||
switchToBarCode: function () {
|
||||
if($('#sweepBarCode').css('display') == "none") {
|
||||
$("#sweepBarCode").show().val("");
|
||||
$("#sweepBarCode").off("keyup").on("keyup",function(e){
|
||||
var evt = window.event || e;
|
||||
if (evt.keyCode == 13) {
|
||||
var meId = inOutService.getInfoByBarCode($("#sweepBarCode").val());
|
||||
var rec = {}; rec.Id = meId;
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
var rowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var materialName = rowDom.find("[field='name']").find("input[type=text]").val();
|
||||
if(materialName){
|
||||
inOutService.append(); //新增行
|
||||
}
|
||||
inOutService.materialSelect(rec, getNowFormatMonth());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$("#sweepBarCode").hide();
|
||||
}
|
||||
},
|
||||
//新增商品
|
||||
appendMaterial: function () {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
@@ -1350,6 +1372,9 @@
|
||||
pageSize: initPageSize
|
||||
});
|
||||
});
|
||||
$("#appendMaterial").off("click").on("click",function(){
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
});
|
||||
$("#checkMaterial").off("click").on("click",function(){
|
||||
var rowData = $("#materialSelectData").datagrid('getChecked')[0];
|
||||
$('#materialSelectDlg').dialog('close');
|
||||
@@ -1427,7 +1452,12 @@
|
||||
detailPrice = 0;
|
||||
}
|
||||
var operNumber = 1;
|
||||
currentRowDom.find("[field='OperNumber']").find(input).val(operNumber).focus().select(); //数量初始化
|
||||
currentRowDom.find("[field='OperNumber']").find(input).val(operNumber); //数量初始化
|
||||
if($('#sweepBarCode').css('display') == "none") {
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
} else {
|
||||
$("#sweepBarCode").val("").focus().select();
|
||||
}
|
||||
currentRowDom.find("[field='UnitPrice']").find(input).val(detailPrice);
|
||||
currentRowDom.find("[field='AllPrice']").find(input).val(detailPrice);
|
||||
var taxRate = currentRowDom.find("[field='TaxRate']").find(input).val()-0; //获取税率
|
||||
|
||||
@@ -146,6 +146,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -572,11 +575,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -585,6 +588,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -145,6 +145,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -556,11 +559,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -569,6 +572,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -145,6 +145,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -557,11 +560,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -570,6 +573,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -160,6 +160,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -573,11 +576,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -586,6 +589,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -154,6 +154,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -566,11 +569,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -579,6 +582,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -282,6 +282,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -703,11 +706,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -716,6 +719,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -307,6 +307,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -828,11 +831,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -841,6 +844,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -209,6 +209,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -658,11 +661,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -671,6 +674,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -222,6 +222,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -718,11 +721,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -731,6 +734,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -259,6 +259,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -754,11 +757,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -767,6 +770,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -282,6 +282,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -744,11 +747,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -757,6 +760,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -211,6 +211,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -702,11 +705,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -715,6 +718,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
@@ -309,6 +309,9 @@
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" id="appendMaterial">新增商品</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
@@ -897,11 +900,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
id:'appendMaterial',
|
||||
text:'新增商品',
|
||||
iconCls:'icon-add',
|
||||
id:'switchToBarCode',
|
||||
text:'扫码',
|
||||
iconCls:'icon-search',
|
||||
handler:function() {
|
||||
js.addTabPage(null, "商品信息", "/pages/materials/material.html");
|
||||
inOutService.switchToBarCode(); //扫码
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -910,6 +913,8 @@
|
||||
return;
|
||||
}
|
||||
});
|
||||
var sweepBarCodeHtml = '<td><input id="sweepBarCode" type="text" placeholder="输入条码并敲回车键" class="radius-ui" style="width:150px;display:none;"/></td>';
|
||||
$('#depotHeadFM .datagrid-toolbar tr').append(sweepBarCodeHtml);
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: '/depotItem/getDetailList',
|
||||
|
||||
Reference in New Issue
Block a user