|
@@ -94,47 +94,47 @@
|
|
|
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.material')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.materialType}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.materialType}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.color')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.color}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.color}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.size')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.size}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.size}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.tonnage')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.machineTonnage}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.machineTonnage}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.product')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.allWeight}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.allWeight}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.mathead')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.headWeight}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.headWeight}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.minshot')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.minShotWeight}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.minShotWeight}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.maxshot')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.maxShotWeight}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.maxShotWeight}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.stand')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.cycle}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.cycle}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.dynamic')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.commonModelTemperature}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.commonModelTemperature}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="6" class="detail">
|
|
|
{{$t('mold.fiexd')}}:
|
|
|
- <span class="info">{{moldDetail.injectionMolding.motherModelTemperature}}</span>
|
|
|
+ <span class="info">{{moldDetail.injectionMolding==null?'':moldDetail.injectionMolding.motherModelTemperature}}</span>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
|
|
@@ -647,7 +647,12 @@
|
|
|
<el-input v-model="addForm.color" autocomplete="off" :placeholder="$t('mold.inputcolor')" style="width:470px"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('mold.size')" prop="size" v-if="!addState">
|
|
|
- <el-input v-model="addForm.size" autocomplete="off" :placeholder="$t('mold.inputsize')" style="width:470px"></el-input>
|
|
|
+ <!-- <el-input v-model="addForm.size" autocomplete="off" :placeholder="$t('mold.inputsize')" style="width:470px"></el-input> -->
|
|
|
+ <el-input v-model="addForm.size1" autocomplete="off" :placeholder="$t('mold.long')" style="width:149px"></el-input>
|
|
|
+ *
|
|
|
+ <el-input v-model="addForm.size2" autocomplete="off" :placeholder="$t('mold.width')" style="width:149px"></el-input>
|
|
|
+ *
|
|
|
+ <el-input v-model="addForm.size3" autocomplete="off" :placeholder="$t('mold.high')" style="width:149px"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('mold.tonnage')" prop="machineTonnage" v-if="!addState">
|
|
|
<el-input v-model="addForm.machineTonnage" autocomplete="off" :placeholder="$t('mold.inputtonnage')" style="width:470px"></el-input>
|
|
@@ -703,7 +708,7 @@
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
- const msg = (rule, value, callback) => {
|
|
|
+ const msg = (rule, value, callback) => {
|
|
|
if (!value) {
|
|
|
switch(rule.field) {
|
|
|
case "modelName":
|
|
@@ -771,6 +776,17 @@
|
|
|
callback();
|
|
|
}
|
|
|
};
|
|
|
+ const checkSize = (rule, value, callback) => {
|
|
|
+ if(this.addForm.size1 == ""){
|
|
|
+ return callback(new Error(this.$t('mold.long')));
|
|
|
+ } else if(this.addForm.size2 == ""){
|
|
|
+ return callback(new Error(this.$t('mold.width')));
|
|
|
+ } else if(this.addForm.size3 == ""){
|
|
|
+ return callback(new Error(this.$t('mold.high')));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
return {
|
|
|
detailId: this.$route.params.id,
|
|
|
user: JSON.parse(sessionStorage.getItem("user")),
|
|
@@ -821,7 +837,6 @@
|
|
|
life: [
|
|
|
{ required: true, validator: checkLife, trigger: 'blur'}
|
|
|
],
|
|
|
-
|
|
|
materialType: [
|
|
|
{ required: true, validator: msg, trigger: "blur" }
|
|
|
],
|
|
@@ -829,7 +844,7 @@
|
|
|
{ required: true, validator: msg, trigger: "blur" }
|
|
|
],
|
|
|
size: [
|
|
|
- { required: true, validator: msg, trigger: "blur" }
|
|
|
+ { required: true, validator: checkSize, trigger: "blur" }
|
|
|
],
|
|
|
machineTonnage: [
|
|
|
{ required: true, validator: msg, trigger: "blur" }
|
|
@@ -922,10 +937,12 @@
|
|
|
maintainCount: [],
|
|
|
rfid: "",
|
|
|
holes: "",
|
|
|
-
|
|
|
materialType: "",
|
|
|
color: "",
|
|
|
size: "",
|
|
|
+ size1: "",
|
|
|
+ size2: "",
|
|
|
+ size3: "",
|
|
|
machineTonnage: "",
|
|
|
allWeight: "",
|
|
|
headWeight: "",
|
|
@@ -1825,10 +1842,12 @@
|
|
|
maintainCount: [],
|
|
|
rfid: "",
|
|
|
holes: "",
|
|
|
-
|
|
|
materialType: "",
|
|
|
color: "",
|
|
|
size: "",
|
|
|
+ size1: "",
|
|
|
+ size2: "",
|
|
|
+ size3: "",
|
|
|
machineTonnage: "",
|
|
|
allWeight: "",
|
|
|
headWeight: "",
|
|
@@ -1855,6 +1874,7 @@
|
|
|
}
|
|
|
this.addForm.maintainCount = str;
|
|
|
this.addForm.preUpdateId = this.detailId;
|
|
|
+ this.addForm.size = this.addForm.size1 + "*" + this.addForm.size2 + "*" + this.addForm.size3;
|
|
|
this.http.post( this.port.mold.addMold, this.addForm,
|
|
|
res => {
|
|
|
this.addLoading = false;
|