Parcourir la source

数量改为三位小数限制

lichao il y a 3 ans
Parent
commit
13b6c4a11d

+ 2 - 2
src/views/Warehousing/cargoClearance/AddOrUpdate.vue

@@ -1278,7 +1278,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                 v-model="scope.row.fQty"
                 placeholder="数量"
                 :disabled="browseStatus || scope.row.fBillstatus === 6"
@@ -1670,7 +1670,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                 v-model="scope.row.fQty"
                 :disabled="browseStatus || scope.row.fBillstatus === 6"
                 @change="changeContractAmt(scope.row)"

+ 1 - 1
src/views/Warehousing/components/incomeMoney.vue

@@ -168,7 +168,7 @@
       >
         <template slot-scope="scope">
           <el-input
-              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+              oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
               v-model="scope.row.fQty"
               placeholder="数量"
               :disabled="browseStatus || scope.row.fBillstatus == 6"

+ 1 - 1
src/views/Warehousing/components/payMoney.vue

@@ -171,7 +171,7 @@
       >
         <template slot-scope="scope">
           <el-input
-            oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
+            oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
             v-model="scope.row.fQty"
             :disabled="browseStatus || scope.row.fBillstatus == 6"
             @change="changeContractAmt(scope.row)"

+ 3 - 3
src/views/Warehousing/components/upLoad.vue

@@ -100,9 +100,6 @@
                 >点击上传</el-button
               >
             </el-upload>
-            <el-button size="small" type="text" @click="checkFile(scope)"
-              >查看</el-button
-            >
           </div>
         </template>
       </el-table-column>
@@ -114,6 +111,9 @@
         fixed="right"
       >
         <template slot-scope="scope">
+          <el-button size="small" type="text" @click="checkFile(scope)"
+          >查看</el-button
+          >
           <el-button
             @click.native.prevent="deleteRow(scope.$index, relevantAttachments)"
             :disabled="browseStatus"

+ 2 - 2
src/views/Warehousing/goodsTransfer/AddOrUpdate.vue

@@ -797,7 +797,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                 v-model="scope.row.fQty"
                 placeholder="数量"
                 :disabled="browseStatus || scope.row.fBillstatus == 6"
@@ -1204,7 +1204,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                 v-model="scope.row.fQty"
                 :disabled="browseStatus || scope.row.fBillstatus == 6"
                 @change="changeContractAmt(scope.row)"

+ 2 - 2
src/views/Warehousing/inAndOutStock/AddOrUpdate.vue

@@ -2218,7 +2218,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                  oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                   v-model="scope.row.fQty"
                   placeholder="数量"
                   :disabled="browseStatus || scope.row.fBillstatus == 6 || form.warehouseStatus > 3"
@@ -2767,7 +2767,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                  oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                   v-model="scope.row.fQty"
                   :disabled="browseStatus || scope.row.fBillstatus == 6 || form.warehouseStatus > 3"
                   @change="changeContractAmt(scope.row)"

+ 2 - 2
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -1389,7 +1389,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                  oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                  oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                   v-model="scope.row.fQty"
                   placeholder="数量"
                   :disabled="browseStatus || scope.row.fBillstatus == 6"
@@ -1953,7 +1953,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                  oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                   v-model="scope.row.fQty"
                   :disabled="browseStatus || scope.row.fBillstatus === 6"
                   @change="changeContractAmt(scope.row)"

+ 2 - 2
src/views/Warehousing/stockTransfer/AddOrUpdate.vue

@@ -1617,7 +1617,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                 v-model="scope.row.fQty"
                 placeholder="数量"
                 :disabled="browseStatus || scope.row.fBillstatus == 6"
@@ -2024,7 +2024,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
                 v-model="scope.row.fQty"
                 :disabled="browseStatus || scope.row.fBillstatus == 6"
                 @change="changeContractAmt(scope.row)"