|
@@ -94,7 +94,7 @@ $(document).ready(function () {
|
|
|
}
|
|
|
|
|
|
// 如果类型为混凝土、砂浆、配合比、机械,则市场单价不能修改
|
|
|
- if (columnInfo.field === 'unit_price.market_price' && canNotChangeTypeId.indexOf(data.unit_price.type + '') >= 0) {
|
|
|
+ if (columnInfo.field === 'unit_price.market_price' && canNotChangeTypeId.indexOf(data.unit_price.type) >= 0) {
|
|
|
// 锁定该单元格
|
|
|
sheet.getRange(rowCounter, columnCounter, 1, 1).locked(true);
|
|
|
}
|
|
@@ -194,7 +194,7 @@ $(document).ready(function () {
|
|
|
let type = sheet.getValue(row, typeColumn);
|
|
|
|
|
|
// 如果类型为混凝土、砂浆、配合比、机械,则提示
|
|
|
- if (field === 'unit_price.market_price' && canNotChangeTypeId.indexOf(type + '') >= 0) {
|
|
|
+ if (field === 'unit_price.market_price' && canNotChangeTypeId.indexOf(type) >= 0) {
|
|
|
alert('当前工料机的市场单价由组成物计算得出,不可直接修改');
|
|
|
}
|
|
|
});
|
|
@@ -298,8 +298,8 @@ function basePriceCalculate(type, info) {
|
|
|
let basePriceColumn = getFieldColumn(header, 'unit_price.base_price');
|
|
|
switch (type) {
|
|
|
// 主材、设备自动赋值基价单价=市场单价
|
|
|
- case 6:
|
|
|
- case 7:
|
|
|
+ case GLJTypeConst.MAIN_MATERIAL:
|
|
|
+ case GLJTypeConst.EQUIPMENT:
|
|
|
sheet.setValue(info.row, basePriceColumn, info.newValue);
|
|
|
break;
|
|
|
}
|
|
@@ -317,10 +317,9 @@ function adjustPriceCalculate(type, info) {
|
|
|
let adjustPriceColumn = getFieldColumn(header, 'adjust_price');
|
|
|
switch (type) {
|
|
|
// 材料、主材、设备 调整基价=基价单价
|
|
|
- case 5:
|
|
|
- case 6:
|
|
|
- case 7:
|
|
|
- let basePrice = sheet.getValue(row, basePriceColumn);
|
|
|
+ case GLJTypeConst.MAIN_MATERIAL:
|
|
|
+ case GLJTypeConst.EQUIPMENT:
|
|
|
+ let basePrice = sheet.getValue(info.row, basePriceColumn);
|
|
|
sheet.setValue(info.row, adjustPriceColumn, basePrice);
|
|
|
break;
|
|
|
|
|
@@ -337,8 +336,8 @@ function adjustPriceCalculate(type, info) {
|
|
|
function marketPriceCalculate(type, info) {
|
|
|
switch (type) {
|
|
|
// 人工、材料(普通材料)触发 需计算混凝土、砂浆、配合比、机械的市场单价 @todo 后续添加
|
|
|
- case 2:
|
|
|
- case 5:
|
|
|
+ case GLJTypeConst.LABOUR:
|
|
|
+ case GLJTypeConst.LABOUR:
|
|
|
// 计算
|
|
|
console.log('触发计算');
|
|
|
break;
|