소스 검색

计量台账,表达式只读相关

MaiXinRong 5 년 전
부모
커밋
c95ee60414
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      app/public/js/stage.js

+ 6 - 2
app/public/js/stage.js

@@ -498,8 +498,12 @@ $(document).ready(() => {
                 if (nodePos && nodePos.length > 0) {
                     $('#bills-expr').val('').attr('readOnly', true);
                 } else {
-                    $('#bills-expr').val(data[col.field]).attr('field', col.field).attr('org', data[col.field])
-                        .attr('readOnly', readOnly || cell.locked());
+                    $('#bills-expr').val(data[col.field]).attr('field', col.field).attr('org', data[col.field]);
+                    if (col.field.indexOf('tp') >= 0) {
+                        $('#bills-expr').attr('readOnly', readOnly || cell.locked() || data.is_tp !== 1);
+                    } else {
+                        $('#bills-expr').attr('readOnly', readOnly || cell.locked() || data.is_tp === 1)
+                    }
                 }
             } else {
                 $('#bills-expr').val('').attr('readOnly', true);