.
This commit is contained in:
@ -62,7 +62,6 @@
|
||||
<link href="<%=GetFileUrlWithVersion("../css/jquery.datetimepicker.css")%>" rel="stylesheet" />
|
||||
<script src="<%=GetFileUrlWithVersion("../Maintenance/js/inputdatactr.js")%>" type="text/javascript"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/jquery.datetimepicker.full.js")%>"></script>
|
||||
<script src="<%=GetFileUrlWithVersion("../js/editableselect.js")%>"></script>
|
||||
<script type="text/javascript">
|
||||
var IsDealer = <%=IsDealer ?"true":"false"%>;
|
||||
var IsAdmin =<%=IsAdmin ?"true":"false"%>;
|
||||
@ -70,10 +69,6 @@
|
||||
var MachineID = "<%=MachineID %>";
|
||||
|
||||
var machines;
|
||||
var editableSelectMachine;
|
||||
var listeditableSelectMachine;
|
||||
|
||||
|
||||
|
||||
function devicerequest(method, param, callback, error) {
|
||||
_network.request("MachineDeviceManagement/ManageRentals.aspx", -1, method, param, callback, error || function (e) {
|
||||
@ -106,8 +101,7 @@
|
||||
else
|
||||
$("#btnAdd").hide();
|
||||
|
||||
GetMachines();
|
||||
|
||||
OnRefresh();
|
||||
});
|
||||
}
|
||||
|
||||
@ -133,7 +127,7 @@
|
||||
}
|
||||
else
|
||||
$("#btnAdd").hide();
|
||||
GetMachines();
|
||||
OnRefresh();
|
||||
});
|
||||
}
|
||||
|
||||
@ -207,29 +201,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
function GetMachines() {
|
||||
contractorid = htmlencode($.trim($('#sel_contractor').val()));
|
||||
|
||||
devicerequest("GetSelectMachinesByCompany", contractorid, function (data) {
|
||||
if (data && data.length > 0) {
|
||||
machines = data;
|
||||
editableSelectMachine.datasource = machines;
|
||||
editableSelectMachine.valuepath = "MachineID"
|
||||
editableSelectMachine.displaypath = "DisplayName";
|
||||
|
||||
listeditableSelectMachine.datasource = machines;
|
||||
listeditableSelectMachine.valuepath = "MachineID"
|
||||
listeditableSelectMachine.displaypath = "DisplayName";
|
||||
//if (MachineID !== "")//暂时不过滤机器
|
||||
// listeditableSelectMachine.val(MachineID);
|
||||
}
|
||||
|
||||
OnRefresh();
|
||||
|
||||
}, function (err) {
|
||||
});
|
||||
}
|
||||
|
||||
function OnRefresh() {
|
||||
showloading(true);
|
||||
|
||||
@ -239,10 +210,6 @@
|
||||
var startdate = htmlencode($('#startdatetxt').val());
|
||||
var enddate = htmlencode($('#enddatetxt').val());
|
||||
|
||||
var machine = listeditableSelectMachine.selecteditem();
|
||||
if (machine != null)
|
||||
MachineID = machine.MachineID;
|
||||
|
||||
devicerequest("SearchRentals", contractorid + String.fromCharCode(170) + searchtxt
|
||||
+ String.fromCharCode(170) + startdate + String.fromCharCode(170) + enddate
|
||||
+ String.fromCharCode(170) + "", function (data) {
|
||||
@ -411,8 +378,7 @@
|
||||
var from = htmlencode($('#startdatetxt').val());
|
||||
var to = htmlencode($('#enddatetxt').val());
|
||||
|
||||
mid = listeditableSelectMachine.val();
|
||||
if (mid === undefined) mid = "";
|
||||
var mid = "";
|
||||
|
||||
var sortPath = $("#tbRentals").data("sortPath");
|
||||
if (sortPath === undefined) sortPath = "";
|
||||
@ -429,8 +395,7 @@
|
||||
var from = htmlencode($('#startdatetxt').val());
|
||||
var to = htmlencode($('#enddatetxt').val());
|
||||
|
||||
mid = listeditableSelectMachine.val();
|
||||
if (mid === undefined) mid = "";
|
||||
var mid = "";
|
||||
|
||||
var sortPath = $("#tbRentals").data("sortPath");
|
||||
if (sortPath === undefined) sortPath = "";
|
||||
@ -444,10 +409,6 @@
|
||||
setPageTitle(GetTextByKey("P_MANAGERENTALS", "Manage Rentals"), true);
|
||||
InitGridData();
|
||||
|
||||
editableSelectMachine = new $editableselect($("#dialog_machine"));
|
||||
editableSelectMachine.tabIndex(1);
|
||||
listeditableSelectMachine = new $editableselect($("#sel_machine"));
|
||||
|
||||
if (IsDealer == true) {
|
||||
$('#span_contractor').css('display', '');
|
||||
$('#span_contractor').parent().css('display', '');
|
||||
@ -458,13 +419,12 @@
|
||||
}
|
||||
}
|
||||
else
|
||||
GetMachines();
|
||||
OnRefresh();
|
||||
|
||||
$("#sel_contractor").change(function () {
|
||||
GetMachines();
|
||||
OnRefresh();
|
||||
});
|
||||
|
||||
|
||||
$('#searchinputtxt').keydown(searchEnter);
|
||||
|
||||
$('#startdatetxt').datetimepicker({
|
||||
@ -531,18 +491,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function OnViewHistory() {
|
||||
var cid = "";
|
||||
cid = htmlencode($.trim($('#sel_contractor').val()));
|
||||
var machineID = "";
|
||||
var machine = listeditableSelectMachine.selecteditem();
|
||||
if (machine != null)
|
||||
machineID = machine.MachineID;
|
||||
else
|
||||
machineID = "";
|
||||
window.open("RentalChangeHistory.aspx?cid=" + cid + "&mid=" + machineID + "");
|
||||
}
|
||||
|
||||
function OnViewChangeHistory(rental) {
|
||||
if (!rental) {
|
||||
return;
|
||||
@ -550,11 +498,6 @@
|
||||
var cid = "";
|
||||
cid = htmlencode($.trim($('#sel_contractor').val()));
|
||||
var machineID = "";
|
||||
var machine = listeditableSelectMachine.selecteditem();
|
||||
if (machine != null)
|
||||
machineID = machine.MachineID;
|
||||
else
|
||||
machineID = "";
|
||||
|
||||
window.open("RentalChangeHistory.aspx?cid=" + cid + "&mid=" + machineID + "&rid=" + rental.RentalID + "");
|
||||
}
|
||||
@ -597,7 +540,6 @@
|
||||
<span class="sbutton iconrefresh" onclick="OnRefresh();" data-lgid="P_MR_REFRESH">Refresh</span>
|
||||
<span class="sbutton iconprint" onclick="OnPrint();" style="display: none;" data-lgid="P_MR_PRINT">Print</span>
|
||||
<span id="spExport" class="sbutton iconexport" onclick="OnExport();" data-lgid="P_MR_EXPORTTOEXCEL">Export to Excel</span>
|
||||
<%--<input id="btnhistory" type="button" onclick="OnViewHistory();" value="View Change History" style="width: 150px;" />--%>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user