Browse Source

Merge branch 'master' of http://git.echepei.com/zhujiawei/Warehouse_management_ui

翁玉文 4 năm trước cách đây
mục cha
commit
17aca2a225
1 tập tin đã thay đổi với 7 bổ sung9 xóa
  1. 7 9
      src/views/finance/charge/index.vue

+ 7 - 9
src/views/finance/charge/index.vue

@@ -404,7 +404,7 @@
                 clearable
                 size="small"
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
-                @input="imgChange1(scope.row.fAmtdr,scope.row.fAmt)"
+                @change="imgChange1(scope.row)"
               />
             </template>
           </el-table-column>
@@ -588,14 +588,11 @@ export default {
       });
       return sums;
     },
-    imgChange1(fAmtdr,fAmt){
-      if (fAmt <= fAmtdr){
-        console.log("小了!")
+    imgChange1(row){
+
+      if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)){
+        this.$set(row, 'fAmt', row.fAmtdr)
         this.state_s = true
-      }else if(fAmt > fAmtdr){
-        console.log("大了!")
-        this.$message.error('本次金额不能大于原定金额');
-        this.state_s = false
       }
     },
     //确认导入
@@ -604,6 +601,7 @@ export default {
       if(this.state_s == true){
         if (this.selection.length == '0') {
           console.log('未选择')//写入提示
+          this.$message.error('未选择导入行');
         }else {
           console.log(this.selection[0].fMblno)
           for (let item in this.selection){
@@ -611,7 +609,7 @@ export default {
             console.log(this.selection[item].fMblno)
 
             console.log(this.selection[item].fName)
-            if(item > 1){
+            if(item >= 1){
               this.pass.fMblno = this.selection[item].fMblno + "..."
               this.pass.fName = this.selection[item].fName + "..."