|
@@ -692,23 +692,23 @@ $(document).ready(() => {
|
|
|
for (let iRow = sel.row; iRow < sel.row + sel.rowCount; iRow++) {
|
|
|
let bDel = false;
|
|
|
const node = sheet.zh_tree.nodes[iRow];
|
|
|
- if (sheet.zh_tree.checkNodeUsed(node, pos)) {
|
|
|
- toastr.warning('"' + node.code + node.b_code + ' ' + node.name +'"已计量,请勿修改');
|
|
|
- return;
|
|
|
- }
|
|
|
const data = sheet.zh_tree.getNodeKeyData(node);
|
|
|
for (let iCol = sel.col; iCol < sel.col + sel.colCount; iCol++) {
|
|
|
const col = sheet.zh_setting.cols[iCol];
|
|
|
-
|
|
|
const style = sheet.getStyle(iRow, iCol);
|
|
|
- if (!style.locked) {
|
|
|
- data[col.field] = null;
|
|
|
- const exprInfo = getExprInfo(col.field);
|
|
|
- if (exprInfo) {
|
|
|
- data[exprInfo.expr] = '';
|
|
|
- }
|
|
|
- bDel = true;
|
|
|
+ if (style.locked || (['dgn_qty1', 'dgn_qty2'].indexOf(col.field) >= 0 && node.b_code)) continue;
|
|
|
+
|
|
|
+ if (['dgn_qty1', 'dgn_qty2'].indexOf(col.field) < 0 && sheet.zh_tree.checkNodeUsed(node, pos)) {
|
|
|
+ toastr.warning('"' + (node.code || '') + (node.b_code || '') + ' ' + node.name +'"已计量,请勿修改');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ data[col.field] = null;
|
|
|
+ const exprInfo = getExprInfo(col.field);
|
|
|
+ if (exprInfo) {
|
|
|
+ data[exprInfo.expr] = '';
|
|
|
}
|
|
|
+ bDel = true;
|
|
|
}
|
|
|
if (bDel) datas.push(data);
|
|
|
}
|