hedera-web/forms/admin/shelves/shelves.js

43 lines
1.1 KiB
JavaScript
Raw Normal View History

2015-09-22 07:20:47 +00:00
Vn.Shelves = new Class
({
Extends: Vn.Form
2015-11-05 07:30:19 +00:00
2015-09-22 07:20:47 +00:00
,activate: function ()
{
this.$('date').value = new Date ();
2015-10-23 23:23:19 +00:00
}
2015-11-05 07:30:19 +00:00
,onConfigChange: function ()
2015-10-23 23:23:19 +00:00
{
2015-11-05 07:30:19 +00:00
var c = this.$('config');
this.$('warehouse').value = c.get ('warehouse_id');
this.$('shelf').value = c.get ('shelf_id');
this.$('reign').value = c.get ('reino_id');
this.$('family').value = c.get ('family_id');
this.$('filter').value = c.get ('name_prefix');
this.$('max-amount').value = c.get ('max_amount');
this.$('show-packing').value = c.get ('show_packing');
this.$('stack').value = c.get ('stack');
this.$('report-title').value = c.get ('name');
2015-09-22 07:20:47 +00:00
}
,onPreviewClick: function ()
{
2015-10-23 23:23:19 +00:00
var batch = new Sql.Batch ();
2015-11-19 13:57:23 +00:00
batch.addValues ({
'shelf': this.$('shelf').value,
'wh': this.$('warehouse').value,
'date': this.$('date').value,
'family': this.$('family').value,
'filter': this.$('filter').value,
'title': this.$('report-title').value,
'max-amount': this.$('max-amount').value,
'show-packing': this.$('show-packing').value,
'stack': this.$('stack').value,
2015-11-05 07:30:19 +00:00
});
2015-11-19 13:57:23 +00:00
this.gui.openReport ('shelves-report', batch);
2015-10-21 23:42:52 +00:00
}
});