This commit is contained in:
2024-03-26 15:56:31 +08:00
parent 634e8b71ab
commit 0855ae42cd
547 changed files with 94818 additions and 60463 deletions

View File

@ -15,29 +15,6 @@
white-space: nowrap;
}
.dialog-content table {
border-collapse: collapse;
width: 100%;
line-height: 32px;
}
.dialog-content table td.label {
width: 130px;
text-align: right;
padding-right: 10px;
line-height: 24px;
height: 24px;
vertical-align: top;
}
.dialog-content table td input,
.dialog-content table td textarea {
border: 1px solid #a9a9a9;
width: 250px;
height: 18px;
padding: 1px;
}
#dialog_machines .dialog-content table td input {
width: auto;
}
@ -173,7 +150,7 @@
if (index < 0) {
showAlert(GetTextByKey("P_WOS_PLEASESELECTSURVEYTEMPLATE", "Please select survey template."), GetTextByKey("P_WORKORDERSURVEYTEMPLATES", "Work Order Survey Templates")); return;
}
var survey = grid_dt.source[index].Values;
var survey = grid_dt.source[index];
if (!survey) {
surveyid = undefined;
return;
@ -221,31 +198,17 @@
}
function showSurveyList(data) {
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
for (var j in r) {
}
var fr = { Values: r };
rows.push(fr);
}
grid_dt.setData(rows);
grid_dt.setData(data);
}
var grid_dt;
function InitGridData() {
grid_dt = new GridView('#surveylist');
grid_dt.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dt = createGridView('#surveylist');
var list_columns = [
{ name: 'Name', caption: GetTextByKey("P_WOS_NAME", "Name"), valueIndex: 'Name', css: { 'width': 300, 'text-align': 'left' } },
{ name: 'Name', caption: GetTextByKey("P_WOS_NAME", "Name"), valueIndex: 'Name', allowFilter: true, css: { 'width': 300, 'text-align': 'left' } },
{ name: 'Notes', caption: GetTextByKey("P_WOS_NOTES", "Notes"), valueIndex: 'Notes', css: { 'width': 320, 'text-align': 'left' } },
{ name: 'Active', caption: GetTextByKey("P_UM_ACTIVE", "Active"), valueIndex: 'Active', css: { 'width': 100, 'text-align': 'center' } },
{ name: 'Active', caption: GetTextByKey("P_UM_ACTIVE", "Active"), valueIndex: 'Active', allowFilter: true, css: { 'width': 100, 'text-align': 'center' } },
{ name: 'Edit', caption: "", css: { 'width': 30, 'text-align': 'center' } },
{ name: 'Copy', caption: "", css: { 'width': 30, 'text-align': 'center' } },
{ name: 'Preview', caption: "", css: { 'width': 30, 'text-align': 'center' } },
@ -263,14 +226,17 @@
col.align = list_columns[hd].css["text-align"]
col.key = list_columns[hd].valueIndex;
col.allowFilter = list_columns[hd].allowFilter;
if (col.name === 'Active') {
col.type = 3;
col.enabled = false;
col.filterSource = [{ Value: true, DisplayValue: GetTextByKey('P_UTILITY_YES', 'Yes') }, { Value: false, DisplayValue: GetTextByKey('P_UTILITY_NO', 'No') }];
}
else if (col.name === "Edit") {
col.isurl = true;
col.text = "\uf044";
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = "edit";
col.events = {
onclick: function () {
OnEdit();
@ -282,9 +248,10 @@
col.attrs = { 'title': GetTextByKey("P_WOS_EDIT", 'Edit') };
}
else if (col.name === 'Copy') {
col.isurl = true;
col.text = '\uf0c5';
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = 'copy';
col.classFilter = function () { return 'icon-col' };
col.attrs = { 'title': GetTextByKey('P_IPT_COPY', 'Copy') };
col.events = {
@ -294,9 +261,10 @@
};
}
else if (col.name === 'Preview') {
col.isurl = true;
col.text = '\uf06e';
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = 'eye';
col.classFilter = function () { return 'icon-col' };
col.attrs = { 'title': GetTextByKey('P_MA_PREVIEW', 'Preview') };
col.events = {
@ -317,9 +285,10 @@
};
}
else if (col.name === "Delete") {
col.isurl = true;
col.text = "\uf00d";
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = "times";
col.events = {
onclick: function () {
OnDelete(this);
@ -337,16 +306,10 @@
}
columns.push(col);
}
grid_dt.canMultiSelect = false;
grid_dt.multiSelect = false;
grid_dt.columns = columns;
grid_dt.init();
grid_dt.rowdblclick = OnEdit;
grid_dt.selectedrowchanged = function (rowindex) {
var rowdata = grid_dt.source[rowindex];
if (rowdata) {
}
}
grid_dt.onRowDblClicked = OnEdit;
}