|
@@ -48,7 +48,7 @@ var projectObj = {
|
|
|
},
|
|
|
refreshBaseActn: function (tree) {
|
|
|
let setButtonValid = function (valid, btn) {
|
|
|
- if (valid) {
|
|
|
+ if (!projectReadOnly && valid) {
|
|
|
btn.removeClass('disabled');
|
|
|
} else {
|
|
|
btn.addClass('disabled');
|
|
@@ -234,7 +234,7 @@ var projectObj = {
|
|
|
let fieldCol = colSettingObj.getColByField(field);
|
|
|
if(fieldCol){
|
|
|
if(moveScroll){
|
|
|
- mainSheet.showColumn(fieldCol, GC.Spread.Sheets.HorizontalPosition.left);
|
|
|
+ mainSheet.showColumn(fieldCol, GC.Spread.Sheets.HorizontalPosition.center);
|
|
|
}
|
|
|
mainSheet.setActiveCell(projectObj.project.mainTree.selected.serialNo(), fieldCol);
|
|
|
}
|
|
@@ -1761,7 +1761,7 @@ var projectObj = {
|
|
|
sheetArea: context.sheetArea
|
|
|
};
|
|
|
};
|
|
|
- CommonTotalFeeCellType.prototype.processMouseDown = function (hitinfo) {
|
|
|
+ /*CommonTotalFeeCellType.prototype.processMouseDown = function (hitinfo) {
|
|
|
let me=calcBaseView;
|
|
|
me.pmLeave = false;
|
|
|
if(me.editingCell==null){
|
|
@@ -1800,6 +1800,58 @@ var projectObj = {
|
|
|
hitinfo.sheet.repaint();
|
|
|
calcBaseView.pmLeave = true;
|
|
|
}
|
|
|
+ };*/
|
|
|
+ CommonTotalFeeCellType.prototype.processMouseDown = function (hitinfo) {
|
|
|
+ let me = calcBaseView;
|
|
|
+ if(me.editingCell && hitinfo.row==me.editingCell.row){
|
|
|
+ var offset=hitinfo.cellRect.x+hitinfo.cellRect.width-6;
|
|
|
+ var imageMagin=3;
|
|
|
+ var imageHeight = hitinfo.cellRect.height-2*imageMagin;
|
|
|
+ var imageWidth = hitinfo.cellRect.width*2/7;
|
|
|
+ if(hitinfo.x<offset&&hitinfo.x>offset-imageWidth){
|
|
|
+ if(!projectReadOnly && me.ifEdit(type, hitinfo.row)){
|
|
|
+ if(hitinfo.sheet.getParent() === projectObj.mainSpread){
|
|
|
+ projectObj.project.mainTree.selected = projectObj.project.mainTree.items[hitinfo.row] ? projectObj.project.mainTree.items[hitinfo.row] : null;
|
|
|
+ }
|
|
|
+ hitinfo.sheet.setActiveCell(hitinfo.row, hitinfo.col);
|
|
|
+ calcBaseView.confirmBtn.attr('toggle', 'commonTotalFee');
|
|
|
+ changeCalcBaseFeeRate('commonTotalFee');
|
|
|
+ $('#tabCalcBase').tab('show');
|
|
|
+ calcBaseView.initCalctor(type);
|
|
|
+ feeRateObject.showSelectModal(hitinfo);
|
|
|
+ }
|
|
|
+ }else {//鼠标点击其它地方,消失
|
|
|
+ hideButton(hitinfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ CommonTotalFeeCellType.prototype.processMouseEnter = function (hitinfo){
|
|
|
+ let me = calcBaseView;
|
|
|
+ me.pmLeave = false;
|
|
|
+ if(me.editingCell==null){
|
|
|
+ var showSelectBtn = true;
|
|
|
+ showSelectBtn=me.ifEdit(type, hitinfo.row);
|
|
|
+ if(showSelectBtn){
|
|
|
+ me.editingCell={
|
|
|
+ row:hitinfo.row,
|
|
|
+ col:hitinfo.col
|
|
|
+ };
|
|
|
+ hitinfo.sheet.invalidateLayout();
|
|
|
+ hitinfo.sheet.repaint();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ CommonTotalFeeCellType.prototype.processMouseLeave = function (hitinfo) {
|
|
|
+ hideButton(hitinfo);
|
|
|
+ };
|
|
|
+
|
|
|
+ function hideButton(hitinfo) {
|
|
|
+ if(!calcBaseView.pmLeave){
|
|
|
+ calcBaseView.editingCell=null;
|
|
|
+ hitinfo.sheet.invalidateLayout();
|
|
|
+ hitinfo.sheet.repaint();
|
|
|
+ calcBaseView.pmLeave = true;
|
|
|
+ }
|
|
|
}
|
|
|
return new CommonTotalFeeCellType();
|
|
|
},
|
|
@@ -2682,16 +2734,17 @@ $(function () {
|
|
|
//项目只读,处理不可操作的工具栏
|
|
|
function disableTools(){
|
|
|
//造价书按钮
|
|
|
- $('#insertRation').remove();
|
|
|
- $('#delete').remove();
|
|
|
- $('#upLevel').remove();
|
|
|
- $('#downLevel').remove();
|
|
|
- $('#upMove').remove();
|
|
|
- $('#downMove').remove();
|
|
|
- $('#ZLFB_btn').remove();
|
|
|
- $('#switchTznr').remove();
|
|
|
- $('#importSpan').remove();
|
|
|
- $('a[name="lockBills"]').remove();
|
|
|
+ $('#insertRation').addClass('disabled');
|
|
|
+ $('#delete').addClass('disabled');
|
|
|
+ $('#upLevel').addClass('disabled');
|
|
|
+ $('#downLevel').addClass('disabled');
|
|
|
+ $('#upMove').addClass('disabled');
|
|
|
+ $('#downMove').addClass('disabled');
|
|
|
+ $('#ZLFB_btn').addClass('disabled');
|
|
|
+ $('#switchTznr').addClass('disabled');
|
|
|
+ $('#uploadLj').addClass('disabled');
|
|
|
+ $('#uploadGld').addClass('disabled');
|
|
|
+ $('a[name="lockBills"]').addClass('disabled');
|
|
|
//关于计算
|
|
|
$('#poj-settings-4').find('input').prop('disabled', 'disabled');
|
|
|
//小数位数
|
|
@@ -2808,7 +2861,7 @@ $('#calcBaseFeeRateConf').click(function () {
|
|
|
if(!projectObj.project.calcBase.success){
|
|
|
return;
|
|
|
}
|
|
|
- else if(!validateFeeRate && needToSave) {
|
|
|
+ else if((!validateFeeRate || selected.data.feeRateID === parseInt(feeRateObject.feeRateSelection.ID)) && needToSave) {
|
|
|
projectObj.project.calcProgram.calcAndSave(selected);
|
|
|
}
|
|
|
});
|