|
@@ -108,13 +108,13 @@ var Ration = {
|
|
});
|
|
});
|
|
controller.sheet.getCell(selected[0].row,col).value(data[fieldName]);
|
|
controller.sheet.getCell(selected[0].row,col).value(data[fieldName]);
|
|
};
|
|
};
|
|
- ration.prototype.getTempRationData = function (id, billsID, serialNo, rType) {
|
|
|
|
|
|
+ ration.prototype.getTempRationData = function (id, billsID, serialNo, rType,priceType) {
|
|
let newData = {'ID': id, 'serialNo': serialNo, projectID: this.project.ID()};
|
|
let newData = {'ID': id, 'serialNo': serialNo, projectID: this.project.ID()};
|
|
let pEngineer = projectInfoObj.projectInfo.property.projectEngineering;//量价默认使用后台设置的单位工程取费专业
|
|
let pEngineer = projectInfoObj.projectInfo.property.projectEngineering;//量价默认使用后台设置的单位工程取费专业
|
|
newData[project.masterField.ration] = billsID;
|
|
newData[project.masterField.ration] = billsID;
|
|
newData['type'] = rType;
|
|
newData['type'] = rType;
|
|
if (rType == rationType.volumePrice){
|
|
if (rType == rationType.volumePrice){
|
|
- newData['subType'] = gljType.GENERAL_MATERIAL; // 默认的量价类型为材料
|
|
|
|
|
|
+ newData['subType'] = priceType?priceType:gljType.GENERAL_MATERIAL; // 如果priceType 没传,默认的量价类型为材料
|
|
};
|
|
};
|
|
if(rType == rationType.ration){//空定额暂时不输入取费专业
|
|
if(rType == rationType.ration){//空定额暂时不输入取费专业
|
|
// newData['programID'] = projectInfoObj.projectInfo.property.engineering;
|
|
// newData['programID'] = projectInfoObj.projectInfo.property.engineering;
|
|
@@ -548,7 +548,14 @@ var Ration = {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- ration.prototype.addNewRation = function (itemQuery,rationType,callback=null,isEmpty=false) {
|
|
|
|
|
|
+ ration.prototype.insertVolumePrice = function(type){
|
|
|
|
+ this.addNewRation(null,rationType.volumePrice,function (newNode) {//插入人工不需要自动定位到编号列
|
|
|
|
+ projectObj.selectColAndFocus(newNode,null);
|
|
|
|
+ },true,type);
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ ration.prototype.addNewRation = function (itemQuery,rationType,callback=null,isEmpty=false,priceType) {//priceType 是量价类型
|
|
let me = this;
|
|
let me = this;
|
|
let project = projectObj.project, sheetController = projectObj.mainController;
|
|
let project = projectObj.project, sheetController = projectObj.mainController;
|
|
let engineering = projectInfoObj.projectInfo.property.engineering;
|
|
let engineering = projectInfoObj.projectInfo.property.engineering;
|
|
@@ -579,7 +586,7 @@ var Ration = {
|
|
};
|
|
};
|
|
if(billItemID){
|
|
if(billItemID){
|
|
let newID = me.getNewRationID();
|
|
let newID = me.getNewRationID();
|
|
- let newData = me.getTempRationData(newID, billItemID, serialNo, rationType);
|
|
|
|
|
|
+ let newData = me.getTempRationData(newID, billItemID, serialNo, rationType,priceType);
|
|
let calQuantity = isEmpty===true?false:optionsOprObj.getOption(optionsOprObj.optionsTypes.GENERALOPTS, 'rationQuanACToBillsQuan');
|
|
let calQuantity = isEmpty===true?false:optionsOprObj.getOption(optionsOprObj.optionsTypes.GENERALOPTS, 'rationQuanACToBillsQuan');
|
|
let brUpdate = [];
|
|
let brUpdate = [];
|
|
//更新兄弟节点的序列号
|
|
//更新兄弟节点的序列号
|