Forráskód Böngészése

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

mxx 3 éve
szülő
commit
2e7fb0409b

+ 18 - 1
src/views/warehouse/costmanagement.vue

@@ -90,7 +90,7 @@
       <el-dialog title="修改加权成本价格" :visible.sync="editvisible">
         <el-form >
           <el-form-item label="价格(元/吨)" >
-            <el-input v-model="price" autocomplete="off"></el-input>
+            <el-input placeholder="输入加权成本价格" v-model="price" autocomplete="off"></el-input>
           </el-form-item>
         </el-form>
         <div slot="footer" class="dialog-footer">
@@ -218,6 +218,23 @@ export default {
       this.id=item.id
     },
     editprice(){
+      if(!this.price){
+            this.$message({
+              message: '价格不能为空!',
+              type: 'warning'
+            })
+            return
+        }
+      if(this.price<0||this.price>20000||(String(this.price).indexOf('.') != -1 &&
+						String(this.price).length -
+						(String(this.price).indexOf('.') +1) >
+						2)){
+            this.$message({
+              message: '价格输入错误!',
+              type: 'warning'
+            })
+            return
+        }
       this.$confirm(`加权成本价格修改后不可恢复,确认提交`, {
         confirmButtonText: '确定',
         cancelButtonText: '取消',

+ 10 - 1
src/views/warehouse/warehouselocation.vue

@@ -343,7 +343,10 @@ export default {
             })
             return
         }
-        if(this.amount<0||this.amount>100000000){
+        if(this.amount<0||this.amount>100000000||(String(this.amount).indexOf('.') != -1 &&
+						String(this.amount).length -
+						(String(this.amount).indexOf('.') +1) >
+						2)){
             this.$message({
               message: '金额输入错误!',
               type: 'warning'
@@ -357,6 +360,9 @@ export default {
                 message: '添加成功',
               })
            this.addvisible=false
+           this.expenseName=''
+           this.amount=''
+           this.applUrl=''
            this.getList()
         })
     },
@@ -396,6 +402,9 @@ export default {
                 message: '编辑成功',
               })
            this.addvisible=false
+           this.expenseName=''
+           this.amount=''
+           this.applUrl=''
            this.getList()
         })
     },