Commit 765429ee by lixiaomin

修改原料

parent 14294dff
......@@ -130,17 +130,23 @@ export default {
var regular=/(^[+]{0,1}([0-9]+)$)/;
let hang=0;
for(let i=0;i<this.experienceList.length;i++){
hang=i+1;
if(!regular.test(this.experienceList[i].milli_second)){
this.$message.error('第'+hang+'行,秒,请输入大于0的正数');
return;
}else{
// hang=i+1;
// if(!regular.test(this.experienceList[i].milli_second)){
// this.$message.error('第'+hang+'行,秒,请输入大于0的正数');
// return;
// }else{
// this.experienceList[i].milli_second=parseFloat(this.experienceList[i].milli_second);
// }
// if(!regular.test(this.experienceList[i].quantity)){
// this.$message.error('第'+hang+'行,克,请输入大于0的正数');
// return;
// }else{
// this.experienceList[i].quantity=parseFloat(this.experienceList[i].quantity);
// }
if(this.experienceList[i].milli_second){
this.experienceList[i].milli_second=parseFloat(this.experienceList[i].milli_second);
}
if(!regular.test(this.experienceList[i].quantity)){
this.$message.error('第'+hang+'行,克,请输入大于0的正数');
return;
}else{
if(this.experienceList[i].quantity){
this.experienceList[i].quantity=parseFloat(this.experienceList[i].quantity);
}
}
......
......@@ -51,7 +51,8 @@ export default {
materialList:[],
ros_code:"",
component_name:"",
materialId:""
materialId:"",
machineState:null
};
},
created() {
......@@ -65,6 +66,7 @@ export default {
this.comDiaLog=true;
this.machineId=row.id;
this.activeName="first";
this.machineState=row.state
this.getComponentList();
},
getComponentList(){
......@@ -100,6 +102,10 @@ export default {
},
//提交原料
submitMaterial(){
if(this.machineState!=3 && this.machineState!=7){
this.$message.error('只有状态为待运营测试或运维中才能修改!');
return;
}
let materialName="";
for(let i=0;i<this.materialList.length;i++){
if(this.materialId==this.materialList[i].id){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment