批量添加序列号
This commit is contained in:
@@ -1,99 +1,102 @@
|
||||
.icon-blank{
|
||||
background:url('icons/blank.gif') no-repeat center center;
|
||||
}
|
||||
.icon-add{
|
||||
background:url('icons/edit_add.png') no-repeat center center;
|
||||
}
|
||||
.icon-edit{
|
||||
background:url('icons/pencil.png') no-repeat center center;
|
||||
}
|
||||
.icon-remove{
|
||||
background:url('icons/edit_remove.png') no-repeat center center;
|
||||
}
|
||||
.icon-save{
|
||||
background:url('icons/filesave.png') no-repeat center center;
|
||||
}
|
||||
.icon-cut{
|
||||
background:url('icons/cut.png') no-repeat center center;
|
||||
}
|
||||
.icon-ok{
|
||||
background:url('icons/ok.png') no-repeat center center;
|
||||
}
|
||||
.icon-no{
|
||||
background:url('icons/no.png') no-repeat center center;
|
||||
}
|
||||
.icon-cancel{
|
||||
background:url('icons/cancel.png') no-repeat center center;
|
||||
}
|
||||
.icon-reload{
|
||||
background:url('icons/reload.png') no-repeat center center;
|
||||
}
|
||||
.icon-search{
|
||||
background:url('icons/049.png') no-repeat center center;
|
||||
}
|
||||
.icon-print{
|
||||
background:url('icons/print.png') no-repeat center center;
|
||||
}
|
||||
.icon-help{
|
||||
background:url('icons/help.png') no-repeat center center;
|
||||
}
|
||||
.icon-undo{
|
||||
background:url('icons/undo.png') no-repeat center center;
|
||||
}
|
||||
.icon-redo{
|
||||
background:url('icons/redo.png') no-repeat center center;
|
||||
}
|
||||
.icon-back{
|
||||
background:url('icons/back.png') no-repeat center center;
|
||||
}
|
||||
.icon-sum{
|
||||
background:url('icons/sum.png') no-repeat center center;
|
||||
}
|
||||
.icon-tip{
|
||||
background:url('icons/tip.png') no-repeat center center;
|
||||
}
|
||||
.icon-filter{
|
||||
background:url('icons/filter.png') no-repeat center center;
|
||||
}
|
||||
.icon-mini-add{
|
||||
background:url('icons/mini_add.png') no-repeat center center;
|
||||
}
|
||||
.icon-mini-edit{
|
||||
background:url('icons/mini_edit.png') no-repeat center center;
|
||||
}
|
||||
.icon-mini-refresh{
|
||||
background:url('icons/mini_refresh.png') no-repeat center center;
|
||||
}
|
||||
.icon-list{
|
||||
background:url('icons/list.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-column{
|
||||
background:url('icons/chart_bar.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-zonghe{
|
||||
background:url('icons/zonghe.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-pie{
|
||||
background:url('icons/pie.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-statistics{
|
||||
background:url('icons/statistics.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-polygram{
|
||||
background:url('icons/polygram.png') no-repeat center center;
|
||||
}
|
||||
.icon-unlock{
|
||||
background:url('icons/lock_unlock.png') no-repeat center center;
|
||||
}
|
||||
.icon-comment{
|
||||
background:url('icons/comment.png') no-repeat center center;
|
||||
}
|
||||
.icon-excel{
|
||||
background:url('icons/receipt-excel.png') no-repeat center center;
|
||||
}
|
||||
.icon-excel-new{
|
||||
background:url('icons/excel1.png') no-repeat center center;
|
||||
}
|
||||
.icon-page-excel{
|
||||
background:url('icons/page_excel.png') no-repeat center center;
|
||||
.icon-blank{
|
||||
background:url('icons/blank.gif') no-repeat center center;
|
||||
}
|
||||
.icon-add{
|
||||
background:url('icons/edit_add.png') no-repeat center center;
|
||||
}
|
||||
.icon-edit{
|
||||
background:url('icons/pencil.png') no-repeat center center;
|
||||
}
|
||||
.icon-remove{
|
||||
background:url('icons/edit_remove.png') no-repeat center center;
|
||||
}
|
||||
.icon-save{
|
||||
background:url('icons/filesave.png') no-repeat center center;
|
||||
}
|
||||
.icon-cut{
|
||||
background:url('icons/cut.png') no-repeat center center;
|
||||
}
|
||||
.icon-ok{
|
||||
background:url('icons/ok.png') no-repeat center center;
|
||||
}
|
||||
.icon-no{
|
||||
background:url('icons/no.png') no-repeat center center;
|
||||
}
|
||||
.icon-cancel{
|
||||
background:url('icons/cancel.png') no-repeat center center;
|
||||
}
|
||||
.icon-reload{
|
||||
background:url('icons/reload.png') no-repeat center center;
|
||||
}
|
||||
.icon-search{
|
||||
background:url('icons/049.png') no-repeat center center;
|
||||
}
|
||||
.icon-print{
|
||||
background:url('icons/print.png') no-repeat center center;
|
||||
}
|
||||
.icon-help{
|
||||
background:url('icons/help.png') no-repeat center center;
|
||||
}
|
||||
.icon-undo{
|
||||
background:url('icons/undo.png') no-repeat center center;
|
||||
}
|
||||
.icon-redo{
|
||||
background:url('icons/redo.png') no-repeat center center;
|
||||
}
|
||||
.icon-back{
|
||||
background:url('icons/back.png') no-repeat center center;
|
||||
}
|
||||
.icon-sum{
|
||||
background:url('icons/sum.png') no-repeat center center;
|
||||
}
|
||||
.icon-tip{
|
||||
background:url('icons/tip.png') no-repeat center center;
|
||||
}
|
||||
.icon-filter{
|
||||
background:url('icons/filter.png') no-repeat center center;
|
||||
}
|
||||
.icon-mini-add{
|
||||
background:url('icons/mini_add.png') no-repeat center center;
|
||||
}
|
||||
.icon-mini-edit{
|
||||
background:url('icons/mini_edit.png') no-repeat center center;
|
||||
}
|
||||
.icon-mini-refresh{
|
||||
background:url('icons/mini_refresh.png') no-repeat center center;
|
||||
}
|
||||
.icon-list{
|
||||
background:url('icons/list.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-column{
|
||||
background:url('icons/chart_bar.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-zonghe{
|
||||
background:url('icons/zonghe.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-pie{
|
||||
background:url('icons/pie.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-statistics{
|
||||
background:url('icons/statistics.png') no-repeat center center;
|
||||
}
|
||||
.icon-chart-polygram{
|
||||
background:url('icons/polygram.png') no-repeat center center;
|
||||
}
|
||||
.icon-unlock{
|
||||
background:url('icons/lock_unlock.png') no-repeat center center;
|
||||
}
|
||||
.icon-comment{
|
||||
background:url('icons/comment.png') no-repeat center center;
|
||||
}
|
||||
.icon-excel{
|
||||
background:url('icons/receipt-excel.png') no-repeat center center;
|
||||
}
|
||||
.icon-excel-new{
|
||||
background:url('icons/excel1.png') no-repeat center center;
|
||||
}
|
||||
.icon-page-excel{
|
||||
background:url('icons/page_excel.png') no-repeat center center;
|
||||
}
|
||||
.icon-basket_add{
|
||||
background:url('icons/basket_add.png') no-repeat center center;
|
||||
}
|
||||
BIN
erp_web/js/easyui-1.3.5/themes/icons/basket_add.png
Normal file
BIN
erp_web/js/easyui-1.3.5/themes/icons/basket_add.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 752 B |
@@ -87,12 +87,59 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveSerialNumber" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelSerialNumber" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#serialNumberDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="batAddSerialNumberDlg" class="easyui-dialog" style="width:860px;height:420px;padding:10px 20px"
|
||||
closed="true" buttons="#bat-dlg-buttons" modal="true" collapsible="false" closable="true">
|
||||
<form id="batAddserialNumberFM" method="post" novalidate>
|
||||
<div id="batAddtt" class="easyui-tabs" style="width:800px;height:320px;">
|
||||
<div title="批量自定义序列号" style="padding:20px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:60px; height:30px;">商品名称</td>
|
||||
<td style="padding:5px;width:180px;">
|
||||
<input name="materialName" id="batAddMaterialName" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'"
|
||||
style="width: 180px;height: 20px"/>
|
||||
</td>
|
||||
<td style="width:80px;">序列号前缀</td>
|
||||
<td style="padding:5px;width:180px;">
|
||||
<input name="serialNumber" id="batAddSerialNumberInput" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[1,30]'"
|
||||
style="width: 180px;height: 20px"/>
|
||||
</td>
|
||||
<td style="width:200px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:80px;">序列号数量</td>
|
||||
<td style="padding:5px;width:180px;">
|
||||
<input name="batAddTotal" id="batAddTotal" class="easyui-numberbox"
|
||||
data-options="min:0,max:10000"
|
||||
style="width: 180px;height: 20px"/>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height:30px;">备注</td>
|
||||
<td style="padding:5px" colspan="3">
|
||||
<textarea name="remark" id="batAddremark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 468px; height:40px;"></textarea>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="bat-dlg-buttons">
|
||||
<a href="javascript:void(0)" id="batAddSerialNumberBtn" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="batCancelSerialNumberBtn" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#batAddSerialNumberDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -153,8 +200,8 @@
|
||||
}
|
||||
},
|
||||
{title: '商品名称', field: 'materialName', width: 100},
|
||||
{title: '序列号', field: 'serialNumber', width: 80},
|
||||
{title: '已卖出', field: 'isSell', width: 150 , formatter: function (value) {
|
||||
{title: '序列号', field: 'serialNumber', width: 200},
|
||||
{title: '已卖出', field: 'isSell', width: 60 , formatter: function (value) {
|
||||
return value=='1' ? "是" : "否";
|
||||
}
|
||||
},
|
||||
@@ -184,6 +231,15 @@
|
||||
batDeleteSerialNumber();
|
||||
}
|
||||
},
|
||||
'-',
|
||||
{
|
||||
id: 'batAddSerialNumber',
|
||||
text: '批量添加',
|
||||
iconCls: 'icon-basket_add',
|
||||
handler: function () {
|
||||
batAddSerialNumber();
|
||||
}
|
||||
},
|
||||
],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
@@ -489,6 +545,70 @@
|
||||
|
||||
return dt.format("yyyy-MM-dd hh:mm:ss"); //扩展的Date的format方法(上述插件实现)
|
||||
}
|
||||
/**
|
||||
* 批量添加序列号
|
||||
* */
|
||||
function batAddSerialNumber(){
|
||||
$('#batAddSerialNumberDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 批量添加序列号信息');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
$('#batAddMaterialName').val('');
|
||||
$('#batAddSerialNumberInput').val('');
|
||||
$('#batAddTotal').val('100');
|
||||
$('#batAddremark').val('');
|
||||
url = '/serialNumber/batAddSerialNumber';
|
||||
}
|
||||
//保存信息
|
||||
$("#batAddSerialNumberBtn").off("click").on("click", function () {
|
||||
if (!$('#batAddMaterialName').val()) {
|
||||
$.messager.alert('提示', '商品名称不能为空!', 'warning');
|
||||
return;
|
||||
}
|
||||
if (!$('#batAddSerialNumberInput').val()) {
|
||||
$.messager.alert('提示', '序列号前缀不能为空!', 'warning');
|
||||
return;
|
||||
}
|
||||
if (!$('#batAddTotal').val()) {
|
||||
$.messager.alert('提示', '序列号数量不能为空!', 'warning');
|
||||
return;
|
||||
}
|
||||
var materialName=$('#batAddMaterialName').val();
|
||||
var serialNumberPrefix=$('#batAddSerialNumberInput').val();
|
||||
var batAddTotal= $('#batAddTotal').val();
|
||||
var remark=$('#batAddremark').val();
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: ({
|
||||
materialName:materialName,
|
||||
serialNumberPrefix:serialNumberPrefix,
|
||||
batAddTotal:batAddTotal,
|
||||
remark:remark
|
||||
}),
|
||||
success: function(res) {
|
||||
if(res){
|
||||
if(res.code!=200){
|
||||
$.messager.alert('提示', res.msg, 'error');
|
||||
return;
|
||||
}
|
||||
if(res.code === 200) {
|
||||
$('#batAddSerialNumberDlg').dialog('close');
|
||||
//加载完以后重新初始化
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
showSerialNumberDetails(opts.pageNumber, opts.pageSize);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('提示', '保存序列化信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user