瀏覽代碼

被行引用清单不可删除

zhongzewei 7 年之前
父節點
當前提交
5428c78c94
共有 3 個文件被更改,包括 9 次插入3 次删除
  1. 2 1
      package.json
  2. 5 0
      web/building_saas/main/js/models/bills.js
  3. 2 2
      web/building_saas/pm/html/project-management.html

+ 2 - 1
package.json

@@ -51,7 +51,8 @@
     "wiredep": "^2.2.2",
     "gulp-uglify-es":"^0.1.3",
     "multiparty": "^4.1.3",
-    "node-xlsx": "^0.11.2"
+    "node-xlsx": "^0.11.2",
+    "node-schedule": "^1.3.0"
   },
   "scripts": {
     "start": "C:\\Users\\mai\\AppData\\Roaming\\npm\\babel-node.cmd server.js"

+ 5 - 0
web/building_saas/main/js/models/bills.js

@@ -642,6 +642,11 @@ var Bills = {
             let selection = projectObj.mainSpread.getActiveSheet().getSelections()[0];
             for(let i =0;i<selection.rowCount;i++){
                 let tem_node = controller.tree.items[selection.row+i];
+                //被行引用的清单(大项费用)不可删除
+                if (cbTools.isUsedByFormula(tem_node)){
+                    alert('该清单行被其它公式结点引用,不允许删除!');
+                    return;
+                }
                 if(i==0){//第一个直接添加;
                     mainTreeMap[tem_node.getID()] = tem_node;
                     mainNodes.push(tem_node);

+ 2 - 2
web/building_saas/pm/html/project-management.html

@@ -322,10 +322,10 @@
                                 <input name="valuation_type" id="radioBill" value="bill" type="radio" class="custom-control-input">
                                 <label class="custom-control-label" for="radioBill">清单计价</label>
                             </label>
-                            <label class="custom-control custom-radio" style="margin-left: 5px;">
+                          <!--  <label class="custom-control custom-radio" style="margin-left: 5px;">
                                 <input name="valuation_type" id="radioRation" value="ration" type="radio" class="custom-control-input">
                                 <label class="custom-control-label" for="radioRation">定额计价</label>
-                            </label>
+                            </label>-->
                         </div>
                     </div>
                     <div>