|
@@ -244,6 +244,7 @@ ProjectGLJSpread.prototype.specialColumn = function (sourceData) {
|
|
|
let connectCodeColumn = this.sheetObj.getFieldColumn('connect_code');
|
|
|
let consumptionColumn = this.sheetObj.getFieldColumn('consumption');
|
|
|
let supplyColumn = this.sheetObj.getFieldColumn('supply');
|
|
|
+ let supplyQuantity = this.sheetObj.getFieldColumn('supply_quantity');
|
|
|
let activeSheet = this.sheetObj.getSheet();
|
|
|
|
|
|
for (let data of sourceData) {
|
|
@@ -256,16 +257,20 @@ ProjectGLJSpread.prototype.specialColumn = function (sourceData) {
|
|
|
activeSheet.getCell(rowCounter, isEvaluateColumn, GC.Spread.Sheets.SheetArea.viewport).locked(true);
|
|
|
activeSheet.setValue(rowCounter, isEvaluateColumn, '');
|
|
|
}
|
|
|
-
|
|
|
+ // 设置供货方式列是否可选
|
|
|
+ if (this.supplyReadonlyType.indexOf(data.unit_price.type) >= 0) {
|
|
|
+ // 锁定该单元格
|
|
|
+ activeSheet.getCell(rowCounter, supplyColumn, GC.Spread.Sheets.SheetArea.viewport).locked(true);
|
|
|
+ }
|
|
|
+ // 如果为部分甲供或者为全部甲供则甲供数量需要可编辑
|
|
|
+ if (data.supply === 1 || data.supply === 2) {
|
|
|
+ activeSheet.getCell(rowCounter, supplyQuantity, GC.Spread.Sheets.SheetArea.viewport).locked(false);
|
|
|
+ }
|
|
|
// 供货方式数据
|
|
|
let supplyIndex = parseInt(data.supply);
|
|
|
supplyIndex = isNaN(supplyIndex) ? 0 : supplyIndex;
|
|
|
let supplyText = this.supplyType[supplyIndex] !== undefined ? this.supplyType[supplyIndex] : '自行采购';
|
|
|
activeSheet.setValue(rowCounter, supplyColumn, supplyText);
|
|
|
- if (this.supplyReadonlyType.indexOf(data.unit_price.type) >= 0) {
|
|
|
- // 锁定该单元格
|
|
|
- activeSheet.getCell(rowCounter, supplyColumn, GC.Spread.Sheets.SheetArea.viewport).locked(true);
|
|
|
- }
|
|
|
|
|
|
// 如果类型为混凝土、砂浆、配合比、机械,则市场单价和供货方式不能修改
|
|
|
if (canNotChangeTypeId.indexOf(data.unit_price.type) >= 0) {
|