Przeglądaj źródła

fix_rcjhz_tiaojia

Xiaopeng Zhang 5 miesięcy temu
rodzic
commit
1c07119f95
2 zmienionych plików z 15 dodań i 4 usunięć
  1. 6 1
      src/Qingdan3.js
  2. 9 3
      src/Rcjhz.js

+ 6 - 1
src/Qingdan3.js

@@ -256,6 +256,10 @@ export default function Qingdan3({name, bh, bt, rgde, jxde, clde, beizhu/*后台
           if (cell._cell.row.getData()['人材机编码'] == '410000F') {
                return false;
           }
+          if (cell._cell.row.getData()['人材机编码'].includes('000FE')) {
+               return false;
+          }
+
           return true;
       }
 
@@ -1168,7 +1172,8 @@ export default function Qingdan3({name, bh, bt, rgde, jxde, clde, beizhu/*后台
                               //e - the click event object
                               //cell - cell component
                               let determine = cell._cell.row.getData()['人材机编码'] != '410000F';
-                              if(cell._cell.column.getPosition() == 2  && !isQdrcj.current && determine) {
+                              let determine2 = !cell._cell.row.getData()['人材机编码'].includes('000FE'); 
+                              if(cell._cell.column.getPosition() == 2  && !isQdrcj.current && determine && determine2) {
                                   tihuanCallback(cell._cell.row.position, cell._cell.column.getPosition());
                               }
                           });

+ 9 - 3
src/Rcjhz.js

@@ -11,12 +11,18 @@ export default function Rcjhz({id, bh, tiaojiaCallback}) {
   const myTable = React.useRef(null);
   const myRef = React.useRef(null);
   const [detail, setDetail] = React.useState([]);
-  var editCheck = function(cell){
+ 
+  var editCheckRcj = function(cell){
     //cell - the cell component for the editable cell
 
     //get row data
     //console.log(cell);
-    if(cell._cell.row.data['序号']) return false;
+    
+    
+    if (cell._cell.row.getData()['编码'].includes('000FE')) {//安装费用
+         return false;
+    }
+
     return true;
   }
 
@@ -50,7 +56,7 @@ export default function Rcjhz({id, bh, tiaojiaCallback}) {
                     {title:"数量", field:"数量", width:100, headerSort:true, sorter:"number", formatter:"money", formatterParams:{
                       precision:4,
                   } },
-                    {title:"单价", field:"单价", width:100, headerSort:true, sorter:"number", formatter:"money", editor: "input"},
+                    {title:"单价", field:"单价", width:100, headerSort:true, sorter:"number", formatter:"money", editor: "input", editable: editCheckRcj },
                     {title:"合价", field:"合价", width:100, headerSort:true, sorter:"number", formatter:"money"},
                     {title:"产地", field:"产地", width:50, headerSort:false, },
                     {title:"供应厂商", field:"供应厂商", width:80, headerSort:false, },