|
@@ -2,28 +2,28 @@
|
|
|
* Created by CSL on 2017-03-23.
|
|
|
*/
|
|
|
var region = '重庆';
|
|
|
-var projectID = 5;
|
|
|
+var feeRateFileID = 5;
|
|
|
var spreadView;
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
$("#inlineFormCustomSelect").change(function () {
|
|
|
- var fileID = $("#inlineFormCustomSelect").val();
|
|
|
- loadLibFees(fileID);
|
|
|
+ var libID = $("#inlineFormCustomSelect").val();
|
|
|
+ loadLibFeeRates(libID);
|
|
|
});
|
|
|
|
|
|
$("#projectFeeFile").click(function () {
|
|
|
- loadProjectFees(projectID);
|
|
|
+ loadProjectFeeRates(feeRateFileID);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-function loadProjectFees(fileID) {
|
|
|
+function loadProjectFeeRates(fileID) {
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
- url: '/fees/getProjectFees',
|
|
|
+ url: '/fees/getProjectFeeRates',
|
|
|
data: {"fileID": fileID},
|
|
|
success: function (result) {
|
|
|
if (result.data) {
|
|
|
- createSpreadView(result.data[0].fees, true);
|
|
|
+ createSpreadView(result.data[0].rates, true);
|
|
|
}
|
|
|
},
|
|
|
error: function (result) {
|
|
@@ -32,18 +32,18 @@ function loadProjectFees(fileID) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function loadLibFiles(region) {
|
|
|
+function loadStdFeeRateLibNames(region) {
|
|
|
$('#inlineFormCustomSelect').empty();
|
|
|
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
- url: '/fees/getLibFiles',
|
|
|
+ url: '/fees/getLibNames',
|
|
|
data: {"region": region},
|
|
|
success: function (result) {
|
|
|
if (result.data) {
|
|
|
for (var i = 0; i < result.data.length; i++) {
|
|
|
- $("#inlineFormCustomSelect").append("<option value=" + result.data[i].fileID + '>' +
|
|
|
- result.data[i].fileName + "</option>");
|
|
|
+ $("#inlineFormCustomSelect").append("<option value=" + result.data[i].libID + '>' +
|
|
|
+ result.data[i].libName + "</option>");
|
|
|
}
|
|
|
$("#inlineFormCustomSelect").get(0).selectedIndex = 0;
|
|
|
}
|
|
@@ -54,14 +54,14 @@ function loadLibFiles(region) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function loadLibFees(fileID) {
|
|
|
+function loadLibFeeRates(libID) {
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
- url: '/fees/getLibFees',
|
|
|
- data: {"fileID": fileID},
|
|
|
+ url: '/fees/getLibFeeRates',
|
|
|
+ data: {"libID": libID},
|
|
|
success: function (result) {
|
|
|
if (result.data) {
|
|
|
- createSpreadView(result.data[0].fees, false);
|
|
|
+ createSpreadView(result.data[0].rates, false);
|
|
|
}
|
|
|
},
|
|
|
error: function (result) {
|
|
@@ -89,9 +89,9 @@ function createSpreadView(data, canEdit) {
|
|
|
width: 250
|
|
|
},
|
|
|
{
|
|
|
- id: 'fee',
|
|
|
+ id: 'rate',
|
|
|
caption: '费率',
|
|
|
- dataField: 'fee',
|
|
|
+ dataField: 'rate',
|
|
|
format: '0.000',
|
|
|
width: 80,
|
|
|
minWidth: 50
|