Browse Source

Merge remote-tracking branch 'origin/dev' into dev

caojunjie 2 years ago
parent
commit
9812aa015a

+ 7 - 3
src/views/workManagement/main-items/configuration/detailsPage.json

@@ -85,21 +85,24 @@
       "prop": "serviceCharge",
       "overHidden": true,
       "index": 8,
-      "width": 100
+      "width": 100,
+      "value": 0
     },
     {
       "label": "成本",
       "prop": "matMoney",
       "overHidden": true,
       "index": 9,
-      "width": 100
+      "width": 100,
+      "value": 0
     },
     {
       "label": "未知明细收入",
       "prop": "otheramt",
       "overHidden": true,
       "index": 10,
-      "width": 100
+      "width": 100,
+      "value": 0
     },
     {
       "label": "合计金额",
@@ -107,6 +110,7 @@
       "overHidden": true,
       "index": 11,
       "width": 100,
+      "value": 0,
       "rules": [
         {
           "required": true,

+ 23 - 0
src/views/workManagement/main-items/detailsPage.vue

@@ -1305,6 +1305,26 @@ export default {
     },
     //点击修改或保存时触发
     rowCellTwo(row, index) {
+      if (row.$cellEdit) {
+
+        if (this.activeName == "first") {
+
+        } else if (this.activeName == "second") {
+        } else if (this.activeName == "three") {
+
+          if (row.serviceCharge != 0) {
+            row.serviceCharge = -Math.abs(row.serviceCharge);
+          }
+          if (row.matMoney != 0) {
+            row.matMoney = -Math.abs(row.matMoney);
+          }
+          if (row.amount != 0) {
+            row.amount = -Math.abs(row.amount);
+          }
+
+        }
+
+      }
       this.$refs.crud.rowCell(row, index);
     },
     //选择时
@@ -1434,6 +1454,9 @@ export default {
             frequency: item.rate,
             projectType: this.secondDisable,
             commission: item.commission,
+            serviceCharge: 0,
+            matMoney: 0,
+            amount: 0
           }
           this.$refs.crud.rowCellAdd(params);
           this.$refs.crud.rowCell(item, this.optionFrom.length - 1)