sync
This commit is contained in:
@@ -18,8 +18,11 @@
|
||||
var __proto = $assetselector.prototype;
|
||||
|
||||
function initMachinesGrid(parent) {
|
||||
var grid = new GridView(parent);
|
||||
grid.lang = {
|
||||
var gv = GridView;
|
||||
if (typeof GridView1 !== 'undefined')//兼容FIC的旧的GridView
|
||||
gv = GridView1
|
||||
var grid = new gv(parent);
|
||||
grid.langs = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
@@ -224,12 +227,12 @@
|
||||
var filterdiv = $('<div style="margin: 4px 0 0 10px; float: left; line-height: 25px"></div>').appendTo(content);
|
||||
$('<label style="margin-left:5px;margin-right:5px;"></label>').text(GetTextByKey("P_JS_ASSETGROUP", 'Asset Group')).appendTo(filterdiv);
|
||||
this.selgroup = $('<select style="width:120px;height:22px;"></select>').change(onSearch.bind(this)).appendTo(filterdiv);
|
||||
getAssetGroups(this.selgroup);
|
||||
$('<label style="margin-left:5px;margin-right:5px;"></label>').text(GetTextByKey("P_XXXXXX", 'Jobsite')).appendTo(filterdiv);
|
||||
getAssetGroups(this.selgroup, this.companyId || "");
|
||||
$('<label style="margin-left:5px;margin-right:5px;"></label>').text(GetTextByKey("P_SELECTASSETS_JOBSITE", 'Jobsite')).appendTo(filterdiv);
|
||||
this.seljs = $('<select style="width:120px;height:22px;"></select>').change(onSearch.bind(this)).appendTo(filterdiv);
|
||||
$('<label style="margin-left:5px;margin-right:5px;"></label>').text(GetTextByKey("P_XXXXXX", 'Jobsite Code')).appendTo(filterdiv);
|
||||
$('<label style="margin-left:5px;margin-right:5px;"></label>').text(GetTextByKey("P_SELECTASSETS_JOBSITECODE", 'Jobsite Code')).appendTo(filterdiv);
|
||||
this.seljscode = $('<select style="width:120px;height:22px;"></select>').change(onSearch.bind(this)).appendTo(filterdiv);
|
||||
getJobSites(this.seljs, this.seljscode);
|
||||
getJobSites(this.seljs, this.seljscode, this.companyId || "");
|
||||
}
|
||||
|
||||
$('<div style="clear: both"></div>').appendTo(content);
|
||||
@@ -241,7 +244,7 @@
|
||||
$('<input type="button" value="' + GetTextByKey("P_SELECTASSETS_OK", "OK") + '" />').click(onOKClick.bind(this)).appendTo(dialogFunction);
|
||||
$('<div class="clear"></div>').appendTo(dialogFunction);
|
||||
|
||||
$('<div class="maskbg" style="display: none"><div class="loading_icon c-spin"></div></div>').appendTo(dialog);
|
||||
$('<div class="maskbg" style="display: none"><div class="loading c-spin"></div></div>').appendTo(dialog);
|
||||
|
||||
// init
|
||||
initMachinesGrid.call(this, this.machineList);
|
||||
@@ -357,7 +360,7 @@
|
||||
if (exceptShareAsset && it.ShareStatus == 2)
|
||||
continue;
|
||||
if (excepts == null || !hasMachine(it.Id, excepts)) {
|
||||
items.push({ Values: it });
|
||||
items.push(it);
|
||||
}
|
||||
}
|
||||
gridAssets.setData(items);
|
||||
@@ -379,8 +382,8 @@
|
||||
this.dialog.hideDialog();
|
||||
}
|
||||
|
||||
function getAssetGroups(ctrl) {
|
||||
devicerequest('GetMachineGroups', '' + String.fromCharCode(170) + '', function (data) {
|
||||
function getAssetGroups(ctrl, companyId) {
|
||||
devicerequest('GetMachineGroups', companyId + String.fromCharCode(170) + '', function (data) {
|
||||
if (typeof data === 'string') {
|
||||
return;
|
||||
}
|
||||
@@ -394,8 +397,8 @@
|
||||
});
|
||||
}
|
||||
|
||||
function getJobSites(ctrl, ctrl1) {
|
||||
jobsiterequest('GetJobSiteDataSource', '', function (data) {
|
||||
function getJobSites(ctrl, ctrl1, companyId) {
|
||||
jobsiterequest('GetJobSiteDataSource', companyId, function (data) {
|
||||
if (typeof data === 'string') {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user