|
|
@@ -249,10 +249,9 @@ async function insertNewRation(newData,defaultLibID,std,calQuantity) {//插入
|
|
|
}
|
|
|
newData.prefix = '';
|
|
|
newData.from = std.type === 'complementary' ? 'cpt' : 'std';
|
|
|
- if(defaultLibID !== std.rationRepId){//借
|
|
|
+ if(newData.from === 'std' && defaultLibID !== std.rationRepId){//借
|
|
|
newData.prefix = '借';
|
|
|
- }
|
|
|
- else if(std.rationRepId === defaultLibID && newData.from === 'cpt') {
|
|
|
+ } else if(newData.from === 'cpt') {
|
|
|
newData.prefix = '补';
|
|
|
}
|
|
|
if(std.feeType == undefined || std.feeType == null || std.feeType ==''){//定额取费专业为空的情况下,取项目属性中的定额取费专业ID
|
|
|
@@ -1112,11 +1111,10 @@ async function updateRation(std,defaultLibID,rationID,billsItemID,projectID,cal
|
|
|
//定额前缀 none:0, complementary:1, borrow: 2
|
|
|
ration.prefix = '';
|
|
|
//借用优先级比补充高
|
|
|
- if(std.rationRepId !== parseInt(defaultLibID)){//借用
|
|
|
+ if(ration.from === ' std' && std.rationRepId !== parseInt(defaultLibID)){//借用
|
|
|
ration.prefix = '借';
|
|
|
- }
|
|
|
- else if(std.rationRepId === defaultLibID && ration.from === 'cpt') {
|
|
|
- ration.prefix = '补';
|
|
|
+ } else if(ration.from === 'cpt') {
|
|
|
+ ration.prefix = '补';s
|
|
|
}
|
|
|
ration.rationAssList =await createRationAss(std);//生成辅助定额
|
|
|
if(cleanzmh==false){//如果是清空子目换算,即cleanzmh==true 保留定额工程量、工程量表达式、含量(分解系数)、取费专业(取费类别)
|