Browse Source

change: cargo-consolidation-request.总离岸价改为自动计算.

peter 1 month ago
parent
commit
3a52a1e546
1 changed files with 8 additions and 3 deletions
  1. 8 3
      src/pages/cargo-consolidation-request/index.vue

+ 8 - 3
src/pages/cargo-consolidation-request/index.vue

@@ -331,7 +331,7 @@
             <el-input
               v-model="scope.row.Quantity"
               size="small"
-              @change="scope.row.editFlag = true"
+              @change="changeTotal(scope.row)"
             ></el-input>
           </template>
         </el-table-column>
@@ -343,7 +343,7 @@
             <el-input
               v-model="scope.row.Unit_Price"
               size="small"
-              @change="scope.row.editFlag = true"
+              @change="changeTotal(scope.row)"
             ></el-input>
           </template>
         </el-table-column>
@@ -461,7 +461,7 @@
             <el-input
               v-model="scope.row.Total_FOB"
               size="small"
-              @change="scope.row.editFlag = true"
+              disabled
             ></el-input>
           </template>
         </el-table-column>
@@ -698,6 +698,11 @@ const generateSubList = () => {
       })),
   )
 }
+const changeTotal = (row: any) => {
+  row.editFlag = true
+  row.Total_FOB = (Number(row.Unit_Price) * Number(row.Quantity)).toFixed(2)
+}
+
 /**
  *  用来增加新行的数据模版
  */