First create solution

This commit is contained in:
2017-03-08 11:21:27 +01:00
commit a2fb86bacf
5508 changed files with 1082238 additions and 0 deletions
@@ -0,0 +1,26 @@
<div data-options="dxView : { name: 'StorageLocationFoldEdit', title: 'Szétrakás polcra' } " >
<div data-bind="dxCommand: { title: 'x', id: 'delete', icon:'remove',onExecute:removerows }"></div>
<div data-options="dxContent : { targetPlaceholder: 'content' } " class="dx-content-background">
<div class="dx-fieldset">
<div class="dx-field">
<div class="dx-field-label">Termék vonalkód:</div>
<div class="dx-field-value">
<div id="BarcodeTextProducts" data-bind="dxTextBox: { onEnterKey: onEnterKeyBarcodeProducts, placeholder: 'EAN13, EAN8', value: BarcodeProducts }"></div>
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Lokáció vonalkód:</div>
<div class="dx-field-value">
<div id="BarcodeTextLocations" data-bind="dxTextBox: { onEnterKey: onEnterKeyBarcodeLocations, placeholder: 'EAN13', value: BarcodeLocations }"></div>
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Mennyiség:</div>
<div class="dx-field-value">
<div data-bind="dxNumberBox: { onEnterKey: onEnterKeyBarcodeProducts, value: QTT }"></div>
</div>
</div>
<div id="gridContainer"></div>
</div>
</div>
</div>
@@ -0,0 +1,113 @@
Nuvolar_Scanner_Android.StorageLocationFoldEdit = function (params) {
"use strict";
var viewModel = {
viewShown: function (e) {
$("#gridContainer").dxDataGrid({
dataSource: dataSourcePDARows,
allowColumnReordering: true,
allowColumnResizing: true,
showColumnLines: true,
showRowLines: true,
rowAlternationEnabled: true,
columnAutoWidth: true,
height:450,
columnChooser: {
enabled: false
},
//paging: {
// pageSize: 10
//},
scrolling: {
mode: 'infinite'
},
//pager: {
// showPageSizeSelector: true,
// allowedPageSizes: [5, 10, 20]
//},
columnFixing: {
enabled: true
},
selection: {
mode: 'multiple',
allowSelectAll: false
},
//editing: {
// //editEnabled: true,
// editMode: 'row',
// //insertEnabled: true,
// removeEnabled: true
//},
store: {key: "Oid"},
onRowRemoving: function(e) {
var dataGrid = $('#gridContainer').dxDataGrid('instance');
alert(dataGrid.getSelectedRowsData());
e.cancel = true;
//e.data.RecordStatus = 'Deleted';
//var rowIndex = e.component.getRowIndexByKey(e.key);
//var $commandEditCell = e.component.getCellElement(rowIndex, "command:edit");
//$commandEditCell.empty();
//$commandEditCell.parent().addClass("deleted");
},
columns: [{ dataField: "Oid",
visible: false,
key:true},
{ dataField: "QTT",caption:'M.',dataType:'number' },
{ dataField: "ShortName", caption:'Megnevezés'},
{ dataField: "Barcode", caption: 'Vonalkód' },
{
dataField: "RowIndex", caption: 'S.',
allowSorting: true,
sortIndex: 1,
sortOrder: 'desc',
dataType: 'number'
}
]
});
SimpleQuery.UserName = username();
SimpleQuery.Password = password();
SimpleQuery.Database = database();
dataSourcePDARows = null;
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
SimpleQuery.Query = 'DX_GetStoragePDACollectionRows_dxDataGrid;' + params.id;
JSON_Text = JSON.stringify(SimpleQuery, null);
$.getJSON(URL(), 'id='+JSON_Text, function (results) {
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
$("#gridContainer").dxDataGrid({dataSource: dataSourcePDARows})
}
).done(function () {
//alert("second success");
}).fail(function (jqXHR, textStatus, errorThrown) {
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
});
},
onEnterKeyBarcodeProducts: function (e) {
SimpleQuery.UserName = username();
SimpleQuery.Password = password();
SimpleQuery.Database = database();
SimpleQuery.Query = 'DX_InsertStorageLocationFold_dxDataGrid;' + BarcodeProducts() + ';' + params.id + ';' + QTT() + ';' + BarcodeLocations();
JSON_Text = JSON.stringify(SimpleQuery, null);
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
Barcode("");
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
$("#BarcodeTextProducts").dxTextBox("instance").focus();
}
).done(function () {
}).fail(function (jqXHR, textStatus, errorThrown) {
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
});
},
onEnterKeyBarcodeLocations: function (e) {
$("#BarcodeTextProducts").dxTextBox("instance").focus();
},
removerows: function (e) {
}
};
return viewModel;
};
@@ -0,0 +1,9 @@
<div data-options="dxView : { name: 'StorageLocationFoldSelect', title: 'Szétrakás polcra' } " >
<div data-options="dxContent : { targetPlaceholder: 'content' } " class="dx-content-background">
<div id="dxlist" data-bind="dxList: { dataSource: dxListDataSource, noDataText: 'Nincs semmi!', onItemClick: dxListItemClickAction}">
<div data-options="dxTemplate:{name:'item'}">
<span style="text-align: center; vertical-align: middle" data-bind="text: $data.title"></span>
</div>
</div>
</div>
</div>
@@ -0,0 +1,36 @@
Nuvolar_Scanner_Android.StorageLocationFoldSelect = function (params) {
"use strict";
var viewModel = {
viewShown: function (e) {
dxListDataSource = null;
currentnavigate("StorageLocationFoldSelect");
if (IsLoggedOn == false) {
Nuvolar_Scanner_Android.app.navigate("Login", { root: false });
}
else {
SimpleQuery.UserName = username();
SimpleQuery.Password = password();
SimpleQuery.Database = database();
SimpleQuery.Query = 'DX_GetStorageLocationFoldSelect_dxList';
JSON_Text = JSON.stringify(SimpleQuery, null);
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
dxListDataSource = JSON.parse(JSON.parse(results).Result);
$("#dxlist").dxList({ dataSource: dxListDataSource });
}).done(function () {
//alert("second success");
}).fail(function (jqXHR, textStatus, errorThrown) {
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
});
};
},
dxListItemClickAction: function (e) {
if (e.itemData.key != '') {
//alert(e.itemData.key);
Nuvolar_Scanner_Android.app.navigate({ view: "StorageLocationFoldEdit", id: e.itemData.key });
};
}
};
return viewModel;
};