|
@@ -90,7 +90,7 @@
|
|
<el-dialog title="修改加权成本价格" :visible.sync="editvisible">
|
|
<el-dialog title="修改加权成本价格" :visible.sync="editvisible">
|
|
<el-form >
|
|
<el-form >
|
|
<el-form-item label="价格(元/吨)" >
|
|
<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-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -218,6 +218,23 @@ export default {
|
|
this.id=item.id
|
|
this.id=item.id
|
|
},
|
|
},
|
|
editprice(){
|
|
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(`加权成本价格修改后不可恢复,确认提交`, {
|
|
this.$confirm(`加权成本价格修改后不可恢复,确认提交`, {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|