优化单据中商品条码的搜索方式
This commit is contained in:
@@ -178,7 +178,7 @@
|
||||
var thisRows = res.data.page.rows;
|
||||
for (var i = 0; i < thisRows.length; i++) {
|
||||
if (thisRows[i].enabled) {
|
||||
mPropertyList += thisRows[i].nativename + ",";
|
||||
mPropertyList += thisRows[i].nativeName + ",";
|
||||
}
|
||||
}
|
||||
if (mPropertyList) {
|
||||
@@ -240,7 +240,8 @@
|
||||
type: "get",
|
||||
dataType: "json",
|
||||
data: {
|
||||
meId: meId
|
||||
meId: meId,
|
||||
mpList: mPropertyList
|
||||
},
|
||||
success: function (rec) {
|
||||
if(rec && rec.code === 200) {
|
||||
@@ -309,6 +310,27 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
getInfoByBarCode: function(barCode){
|
||||
var materialExtendId = "";
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: '/materialsExtend/getInfoByBarCode',
|
||||
data:{
|
||||
barCode: barCode
|
||||
},
|
||||
async:false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
materialExtendId = res.data.id;
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
}
|
||||
});
|
||||
return materialExtendId;
|
||||
},
|
||||
//优惠率、合计的统计方法
|
||||
statisticsFun: function (body,UnitPrice,OperNumber,footer,taxRate) {
|
||||
var TotalPrice = 0;
|
||||
@@ -1041,8 +1063,8 @@
|
||||
});
|
||||
body.find("[field='MaterialExtendId']").find(".textbox-text").focus().select(); //默认选择商品框
|
||||
//点击商品下拉框,自动加载数量、单价、金额
|
||||
body.find("[field='Stock']").find(input).prop("readonly","readonly");
|
||||
body.find("[field='Unit']").find(input).prop("readonly","readonly");
|
||||
body.find("[field='name'],[field='standard'],[field='model'],[field='materialOther'],[field='Stock'],[field='Unit']")
|
||||
.find(input).prop("readonly","readonly");
|
||||
//点击商品名称
|
||||
body.find("[field='MaterialExtendId']").find(input).next().off("mouseup").on("mouseup",function(){
|
||||
var that = $(this);
|
||||
@@ -1065,7 +1087,7 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
//单行删除按钮
|
||||
//单击删除按钮
|
||||
body.find("[field='op']").find("img").off("click").on("click",function() {
|
||||
$(this).closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
@@ -1218,7 +1240,7 @@
|
||||
}
|
||||
var totalRowNum = "";
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if (row[i].DepotId == "" || row[i].MaterialExtendId == "" || row[i].OperNumber == "" || row[i].UnitPrice === "" || row[i].AllPrice === "") {
|
||||
if (row[i].DepotId == "" || row[i].barCode == "" || row[i].OperNumber == "" || row[i].UnitPrice === "" || row[i].AllPrice === "") {
|
||||
totalRowNum += (i + 1) + "、";
|
||||
}
|
||||
}
|
||||
@@ -1229,6 +1251,112 @@
|
||||
}
|
||||
return true;
|
||||
},
|
||||
//商品选择列表
|
||||
initMaterialSelectData: function(){
|
||||
var self = this;
|
||||
$('#materialSelectData').datagrid({
|
||||
height: 390,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate: false,
|
||||
pagination: true,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
collapsible: false,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pageSize: 10,
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{field: 'id',width:35,align:"center",checkbox:true},
|
||||
{field: 'mBarCode', title: '条码', width: 120},
|
||||
{field: 'name', title: '名称', width: 140},
|
||||
{field: 'standard', title: '规格', width: 80},
|
||||
{field: 'model', title: '型号', width: 80},
|
||||
{field: 'unit', title: '单位', width: 60},
|
||||
{field: 'stock', title: '库存', width: 50},
|
||||
{field: 'expand', title: '扩展信息', width: 80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onDblClickRow: function (index, row) {
|
||||
var monthTime = getNowFormatMonth();
|
||||
$('#materialSelectDlg').dialog('close');
|
||||
self.materialSelect(row,monthTime);
|
||||
}
|
||||
});
|
||||
},
|
||||
//商品选择列表-分页
|
||||
initMaterialSelectPager: function(depotId){
|
||||
var self = this;
|
||||
try {
|
||||
var opts = $("#materialSelectData").datagrid('options');
|
||||
var pager = $("#materialSelectData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
self.showMaterialSelect(depotId, pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
},
|
||||
//商品选择列表-查询
|
||||
showMaterialSelect: function(depotId, pageNo, pageSize){
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/material/findBySelect",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
q: $("#searchBarCode").textbox("getValue"),
|
||||
mpList: mPropertyList,
|
||||
depotId: depotId,
|
||||
page: pageNo,
|
||||
rows: pageSize
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res) {
|
||||
$("#materialSelectData").datagrid('loadData', res);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
},
|
||||
//商品选择列表-事件
|
||||
materialSelectFun: function(depotId){
|
||||
var self = this;
|
||||
var monthTime = getNowFormatMonth();
|
||||
$("#searchBarCode").textbox("setValue","");
|
||||
$("#searchMaterialBtn").off("click").on("click",function(){
|
||||
self.showMaterialSelect(depotId,1,initPageSize);
|
||||
var opts = $("#materialSelectData").datagrid('options');
|
||||
var pager = $("#materialSelectData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
});
|
||||
$("#checkMaterial").off("click").on("click",function(){
|
||||
var rowData = $("#materialSelectData").datagrid('getChecked')[0];
|
||||
$('#materialSelectDlg').dialog('close');
|
||||
self.materialSelect(rowData,monthTime);
|
||||
});
|
||||
$("#searchMaterialBtn").click();
|
||||
},
|
||||
//选择商品
|
||||
materialSelect: function(rec,monthTime) {
|
||||
var self = this;
|
||||
@@ -1242,7 +1370,8 @@
|
||||
type: "get",
|
||||
dataType: "json",
|
||||
data: {
|
||||
meId: meId
|
||||
meId: meId,
|
||||
mpList: mPropertyList
|
||||
},
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
@@ -1256,6 +1385,11 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='barCode']").find(".datagrid-editable-input").textbox("setValue",info.mBarCode).prop("readonly","readonly");
|
||||
currentRowDom.find("[field='name']").find(input).val(info.name).prop("readonly","readonly");
|
||||
currentRowDom.find("[field='standard']").find(input).val(info.standard).prop("readonly","readonly");
|
||||
currentRowDom.find("[field='model']").find(input).val(info.model).prop("readonly","readonly");
|
||||
currentRowDom.find("[field='materialOther']").find(input).val(info.materialOther).prop("readonly","readonly");
|
||||
currentRowDom.find("[field='Unit']").find(input).prop("readonly","readonly"); //设置计量单位为只读
|
||||
currentRowDom.find("[field='Unit']").find(input).val(commodityUnit); //设置单位
|
||||
if(info.unit){ //如果存在计量单位信息
|
||||
|
||||
@@ -134,6 +134,26 @@
|
||||
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -475,8 +495,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -484,53 +505,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '调入仓库', field: 'AnotherDepotId',editor:'validatebox',width:90,
|
||||
formatter: function (value, row, index) {
|
||||
@@ -613,6 +616,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -643,7 +647,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '调入仓库',field: 'AnotherDepotName',width:90},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
|
||||
@@ -133,6 +133,26 @@
|
||||
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -455,7 +475,7 @@
|
||||
}
|
||||
},
|
||||
{ title: '商品类型',field: 'MType',editor:'validatebox',width:80},
|
||||
{ title: '仓库名称', field: 'DepotId', editor:'validatebox', width: 90,
|
||||
{ title: '仓库名称', field: 'DepotId', editor: 'validatebox', width: 90,
|
||||
formatter: function (value, row, index) {
|
||||
return row.DepotName;
|
||||
},
|
||||
@@ -473,8 +493,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -482,53 +503,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -597,6 +600,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -628,7 +632,11 @@
|
||||
columns:[[
|
||||
{ title: '商品类型',field: 'MType',width:80},
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -133,6 +133,26 @@
|
||||
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -474,8 +494,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -483,53 +504,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -598,6 +601,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -629,7 +633,11 @@
|
||||
columns:[[
|
||||
{ title: '商品类型',field: 'MType',width:80},
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -144,6 +144,26 @@
|
||||
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="supplier"></div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
@@ -485,8 +505,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -494,53 +515,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -609,6 +612,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -639,7 +643,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -138,6 +138,26 @@
|
||||
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -478,8 +498,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -487,53 +508,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -602,6 +605,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -632,7 +636,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -270,6 +270,26 @@
|
||||
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -616,8 +636,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -625,53 +646,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -744,6 +747,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -774,7 +778,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -295,6 +295,26 @@
|
||||
<a href="javascript:void(0)" id="cancelLinkBill" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#linkBillDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="supplier"></div>
|
||||
<div id="depot"></div>
|
||||
<div id="account"></div>
|
||||
@@ -741,8 +761,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -750,53 +771,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -869,6 +872,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -899,7 +903,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -197,6 +197,26 @@
|
||||
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="supplier"></div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
@@ -571,8 +591,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -580,53 +601,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData, monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -699,6 +702,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -729,7 +733,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -210,6 +210,26 @@
|
||||
<a href="javascript:void(0)" id="cancelDepotHeadShow" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#depotHeadDlgShow').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -635,8 +655,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -644,53 +665,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -759,6 +762,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -789,7 +793,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -247,6 +247,26 @@
|
||||
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="supplier"></div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
@@ -671,8 +691,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -680,53 +701,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -795,6 +798,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -825,7 +829,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -270,6 +270,26 @@
|
||||
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -657,8 +677,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -666,53 +687,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -785,6 +788,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -815,7 +819,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -199,6 +199,26 @@
|
||||
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="supplier"></div>
|
||||
<div id="depot"></div>
|
||||
<script>
|
||||
@@ -615,8 +635,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -624,53 +645,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -743,6 +746,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -773,7 +777,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
@@ -297,6 +297,26 @@
|
||||
<a href="javascript:void(0)" id="cancelLinkBill" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#linkBillDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="materialSelectDlg" class="easyui-dialog" style="width:880px;padding:10px 20px;"
|
||||
closed="true" modal="true" buttons="#materialSelectDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<div class="box-body form-inline">
|
||||
<div class="form-group">
|
||||
<label class="control-label">条码:</label>
|
||||
<div class="control-inline">
|
||||
<input type="text" id="searchBarCode" name="searchBarCode" value="" maxlength="100" class="easyui-textbox width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchMaterialBtn">查询</a>
|
||||
</div>
|
||||
</div>
|
||||
<table id="materialSelectData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
<div id="materialSelectDlgBtn">
|
||||
<a href="javascript:void(0)" id="checkMaterial" class="easyui-linkbutton" iconCls="icon-ok">选择</a>
|
||||
<a href="javascript:void(0)" id="cancelMaterial" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#materialSelectDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="supplier"></div>
|
||||
<div id="depot"></div>
|
||||
<div id="account"></div>
|
||||
@@ -810,8 +830,9 @@
|
||||
footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
var mId = currentRowDom.find("[field='MaterialExtendId']").find(".textbox-value").val();
|
||||
if(mId){
|
||||
var barCode = currentRowDom.find("[field='barCode']").find(".textbox-value").val();
|
||||
if(barCode){
|
||||
var mId = inOutService.getInfoByBarCode(barCode);
|
||||
var type = "select"; //type 类型:点击 click,选择 select
|
||||
inOutService.findStockNumById(depotId, mId, monthTime, currentRowDom, input, ratioDepot, type);
|
||||
}
|
||||
@@ -819,53 +840,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialExtendId',width:270,
|
||||
formatter:function(value,row,index){
|
||||
return row.MaterialName;
|
||||
},
|
||||
editor:{
|
||||
type:'combogrid',
|
||||
options:{
|
||||
url: "/material/findBySelect",
|
||||
idField:'Id',
|
||||
textField:'MaterialName',
|
||||
method:'get',
|
||||
pagination: true,
|
||||
mode: 'remote',
|
||||
hasDownArrow: false,
|
||||
panelWidth: 630, //下拉框的宽度
|
||||
panelHeight: 380,//下拉框的高度
|
||||
columns:[[
|
||||
{field:'mBarCode',title:'条码',width:120},
|
||||
{field:'name',title:'名称',width:140},
|
||||
{field:'standard',title:'规格',width:80},
|
||||
{field:'model',title:'型号',width:80},
|
||||
{field:'unit',title:'单位',width:60},
|
||||
{field:'stock',title:'库存',width:50},
|
||||
{field:'expand',title:'扩展信息',width:80}
|
||||
]],
|
||||
onBeforeLoad: function(param){
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120,
|
||||
editor: {
|
||||
type: 'textbox',
|
||||
options: {
|
||||
buttonText:'...',
|
||||
editable:false,
|
||||
onClickButton: function(){
|
||||
var rowDom = $(this).closest(".datagrid-row").find("[field='op']").find("img");
|
||||
rowDom.closest(".datagrid-cell").click(); //点击操作
|
||||
var row = $('#materialData').datagrid('getChecked');
|
||||
editIndex = $('#materialData').datagrid("getRowIndex", row[0]);
|
||||
var depotId;
|
||||
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
|
||||
if(edDepot) {
|
||||
param.depotId = $(edDepot.target).combobox('getValue');
|
||||
depotId = $(edDepot.target).combobox('getValue');
|
||||
}
|
||||
param.mpList = mPropertyList; //商品属性
|
||||
},
|
||||
onLoadSuccess: function (rec) {
|
||||
if(rec && rec.total==1) {
|
||||
$(".datagrid-body [field='mBarCode']").click(); //在只有单个商品的时候自动选中
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
input = "input[type=text]";
|
||||
var currentRowDom = body.find(".datagrid-row").eq(editIndex);
|
||||
currentRowDom.find("[field='OperNumber']").find(input).focus().select();
|
||||
}
|
||||
},
|
||||
onSelect:function(index, rowData){
|
||||
inOutService.materialSelect(rowData,monthTime);
|
||||
$('#materialSelectDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 选择商品');
|
||||
$("#materialSelectDlg").panel("move",{top:$(document).scrollTop() + ($(window).height()-500) * 0.5});
|
||||
inOutService.initMaterialSelectData();
|
||||
inOutService.initMaterialSelectPager(depotId);
|
||||
inOutService.materialSelectFun(depotId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',editor:'validatebox',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
@@ -938,6 +941,7 @@
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
} else if(type === "edit") {
|
||||
editIndex = 0;
|
||||
for(var i=0;i<data.rows.length;i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
inOutService.autoReckon();
|
||||
@@ -968,7 +972,11 @@
|
||||
showFooter: true,
|
||||
columns:[[
|
||||
{ title: '仓库名称',field: 'DepotName',editor:'validatebox',width:90},
|
||||
{ title: '条码_名称(规格)(型号)(扩展信息)(单位)',field: 'MaterialName',width:270},
|
||||
{ title: '条码',field: 'barCode', editor:'validatebox', width:120},
|
||||
{ title: '名称', field: 'name', editor: 'validatebox', width: 100},
|
||||
{ title: '规格', field: 'standard', editor: 'validatebox', width: 60},
|
||||
{ title: '型号', field: 'model', editor: 'validatebox', width: 60},
|
||||
{ title: '扩展信息', field: 'materialOther', editor: 'validatebox', width: 70},
|
||||
{ title: '库存',field: 'Stock',width:50},
|
||||
{ title: '单位',field: 'Unit',editor:'validatebox',width:60},
|
||||
{ title: '数量',field: 'OperNumber',editor:'validatebox',width:60},
|
||||
|
||||
Reference in New Issue
Block a user