|
@@ -125,8 +125,8 @@ var projectObj = {
|
|
|
else if (colSetting.data.field === 'programID') {
|
|
|
return this.project.calcProgram.compiledTemplateMaps[editingText];
|
|
|
}
|
|
|
- else if (colSetting.data.field === 'type') {
|
|
|
- if (editingText.indexOf('量') == 0)
|
|
|
+ else if (colSetting.data.field === 'subType') {
|
|
|
+ if (typeof(editingText) !== "number")
|
|
|
return volumePriceMaps[editingText]
|
|
|
else
|
|
|
return editingText;
|
|
@@ -273,7 +273,7 @@ var projectObj = {
|
|
|
else if(fieldName ==='feeRate'){
|
|
|
project.FeeRate.updateFeeRateFromBills(value,node,fieldName);
|
|
|
}
|
|
|
- else if (fieldName === 'quantity' || fieldName === 'marketUnitFee' || fieldName === 'programID' || fieldName === 'type' || fieldName === 'calcBase'){
|
|
|
+ else if (fieldName === 'quantity' || fieldName === 'marketUnitFee' || fieldName === 'programID' || fieldName === 'subType' || fieldName === 'calcBase'){
|
|
|
if (fieldName === 'quantity') {
|
|
|
if (value) {value = value.toDecimal(project.quantity_detail.getDecimal(node))};
|
|
|
if(project.quantity_detail.quantityEditChecking(value,node,fieldName)){
|
|
@@ -297,11 +297,11 @@ var projectObj = {
|
|
|
else {
|
|
|
if (node.sourceType === project.Bills.getSourceType()) {
|
|
|
project.Bills.updateField(node.source, fieldName, value, true);
|
|
|
- } else if (node.sourceType === project.Ration.getSourceType()) {
|
|
|
- project.Ration.updateField(node.source, fieldName, value, true);
|
|
|
- } else if (node.sourceType === project.VolumePrice.getSourceType()) {
|
|
|
- project.VolumePrice.updateField(node.source, fieldName, value, true);
|
|
|
}
|
|
|
+ else if (node.sourceType === project.Ration.getSourceType()) {
|
|
|
+ project.Ration.updateField(node.source, fieldName, value, true);
|
|
|
+ };
|
|
|
+
|
|
|
if (colSetting.data.wordWrap) {
|
|
|
info.sheet.autoFitRow(node.serialNo());
|
|
|
}
|
|
@@ -431,14 +431,13 @@ var projectObj = {
|
|
|
if (selected) {
|
|
|
if ( // CSL, 2017-11-28
|
|
|
selected.sourceType === project.Ration.getSourceType() ||
|
|
|
- selected.sourceType === project.VolumePrice.getSourceType() ||
|
|
|
(selected.sourceType === project.Bills.getSourceType() && selected.source.children.length === 0)
|
|
|
) return false
|
|
|
else return true
|
|
|
} else return true
|
|
|
},
|
|
|
callback: function (key, opt) {
|
|
|
- ProjectController.addRation(project, controller);
|
|
|
+ ProjectController.addRation(project, controller, rationType.ration);
|
|
|
}
|
|
|
},
|
|
|
"insertLJ": {
|
|
@@ -449,14 +448,13 @@ var projectObj = {
|
|
|
if (selected) {
|
|
|
if ( // CSL, 2017-11-28
|
|
|
selected.sourceType === project.Ration.getSourceType() ||
|
|
|
- selected.sourceType === project.VolumePrice.getSourceType() ||
|
|
|
(selected.sourceType === project.Bills.getSourceType() && selected.source.children.length === 0)
|
|
|
) return false
|
|
|
else return true
|
|
|
} else return true
|
|
|
},
|
|
|
callback: function (key, opt) {
|
|
|
- ProjectController.addVolumePrice(project, controller);
|
|
|
+ ProjectController.addRation(project, controller, rationType.volumePrice);
|
|
|
}
|
|
|
},
|
|
|
"spr1": '--------',
|
|
@@ -476,9 +474,6 @@ var projectObj = {
|
|
|
} else if (selected.sourceType === project.Ration.getSourceType()) {
|
|
|
project.Ration.delete(selected.source);
|
|
|
controller.delete();
|
|
|
- } else if (selected.sourceType === project.VolumePrice.getSourceType()) {
|
|
|
- project.VolumePrice.delete(selected.source);
|
|
|
- controller.delete();
|
|
|
};
|
|
|
projectObj.converseCalculateBills(parent);
|
|
|
}
|
|
@@ -529,9 +524,7 @@ $('#insert').click(function () {
|
|
|
if (!selected || selected.sourceType === project.Bills.getSourceType()) {
|
|
|
ProjectController.addBills(project, controller);
|
|
|
} else if (selected.sourceType === project.Ration.getSourceType()) {
|
|
|
- ProjectController.addRation(project, controller);
|
|
|
- } else if (selected.sourceType === project.VolumePrice.getSourceType()) {
|
|
|
- ProjectController.addVolumePrice(project, controller);
|
|
|
+ ProjectController.addRation(project, controller, selected.data.type);
|
|
|
}
|
|
|
});
|
|
|
$('#delete').click(function () {
|
|
@@ -545,9 +538,6 @@ $('#delete').click(function () {
|
|
|
} else if (selected.sourceType === project.Ration.getSourceType()) {
|
|
|
project.Ration.delete(selected.source);
|
|
|
controller.delete();
|
|
|
- } else if (selected.sourceType === project.VolumePrice.getSourceType()) {
|
|
|
- project.VolumePrice.delete(selected.source);
|
|
|
- controller.delete();
|
|
|
};
|
|
|
projectObj.converseCalculateBills(parent);
|
|
|
}
|
|
@@ -581,10 +571,7 @@ $('#upMove').click(function () {
|
|
|
} else if (selected.sourceType === project.Ration.getSourceType()) {
|
|
|
project.Ration.changePos(selected.source, selected.preSibling.source);
|
|
|
controller.upMove();
|
|
|
- } else if (selected.sourceType === project.VolumePrice.getSourceType()) {
|
|
|
- project.VolumePrice.changePos(selected.source, selected.preSibling.source);
|
|
|
- controller.upMove();
|
|
|
- }
|
|
|
+ };
|
|
|
});
|
|
|
$('#downMove').click(function () {
|
|
|
var controller = projectObj.mainController, project = projectObj.project;
|
|
@@ -597,10 +584,7 @@ $('#downMove').click(function () {
|
|
|
} else if (selected.sourceType === project.Ration.getSourceType()) {
|
|
|
project.Ration.changePos(selected.source, selected.nextSibling.source);
|
|
|
controller.downMove();
|
|
|
- } else if (selected.sourceType === project.VolumePrice.getSourceType()) {
|
|
|
- project.VolumePrice.changePos(selected.source, selected.nextSibling.source);
|
|
|
- controller.downMove();
|
|
|
- }
|
|
|
+ };
|
|
|
}
|
|
|
});
|
|
|
|