Przeglądaj źródła

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

wutt 5 lat temu
rodzic
commit
b2d1988cd2

+ 7 - 4
ys_int/src/i18n/lang/en.js

@@ -244,18 +244,18 @@ const lang = {
         dropped: "Dropped",
         material: "Material Grade",
         color: "Color Specification",
-        size: "Mold Size",
+        size: "Mold Size(mm)",
         tonnage: "Machine Tonnage(T)",
         product: "Finished Product Weight(g)",
         mathead: "Head Weight(g)",
-        minshot: "Min Shot Amount",
-        maxshot: "Max Shot Amount",
+        minshot: "Min Shot Amount(g)",
+        maxshot: "Max Shot Amount(g)",
         stand: "StandardMolding Cycle(s)",
         dynamic: "MaleMold Temperature(℃)",
         fiexd: "MasterMold Temperature(℃)",
         inputmaterial: "Please enter Material Grade",
         inputcolor: "Please enter Color Specification",
-        inputsize: "Please enter Mold Size",
+        inputsize: "Please enter Mold Size(long*width*high)",
         inputtonnage: "Please enter Machine Tonnage",
         inputproduct: "Please enter Finished Product Weight",
         inputmathead: "Please enter Head Weight",
@@ -266,6 +266,9 @@ const lang = {
         inputfiexd: "Please enter MasterMold(Fixed Mold) Temperature",
         proinfo: "Process information",
         proinfodetail: "Mold Injection Molding Process Information",
+        long: "Please enter Mold long",
+        width: "Please enter Mold width",
+        high: "Please enter Mold high",
 		// 模具详情
 		beScrapped: "To be scrapped",
 		scraped: "Scrap",

+ 7 - 4
ys_int/src/i18n/lang/zh.js

@@ -245,18 +245,18 @@ const lang = {
         dropped: "掉线",
         material: "材料牌号",
         color: "颜色规格",
-        size: "模具尺寸",
+        size: "模具尺寸(mm)",
         tonnage: "机台吨位(T)",
         product: "成品重量(g)",
         mathead: "料头重量(g)",
-        minshot: "最小射胶量",
-        maxshot: "最大射胶量",
+        minshot: "最小射胶量(g)",
+        maxshot: "最大射胶量(g)",
         stand: "标准成型周期(s)",
         dynamic: "公模(动模)模温(℃)",
         fiexd: "母模(定模)模温(℃)",
         inputmaterial: "请输入材料牌号",
         inputcolor: "请输入颜色规格",
-        inputsize: "请输入模具尺寸",
+        inputsize: "请输入模具尺寸(长*宽*高)",
         inputtonnage: "请输入机台吨位",
         inputproduct: "请输入成品重量",
         inputmathead: "请输入料头重量",
@@ -267,6 +267,9 @@ const lang = {
         inputfiexd: "请输入母模(定模)模温",
         proinfo: "工艺信息",
         proinfodetail: "模具注塑工艺信息",
+        long: "请输入模具长度",
+        width: "请输入模具宽度",
+        high: "请输入模具高度",
 		// 模具详情
 		beScrapped: "待报废",
 		scraped: "已报废",

+ 37 - 17
ys_int/src/views/mold/moldDetail.vue

@@ -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;

+ 37 - 4
ys_int/src/views/mold/moldList.vue

@@ -139,7 +139,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>
@@ -275,6 +280,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 {
                 user: JSON.parse(sessionStorage.getItem("user")),
                 molds: [],
@@ -321,7 +337,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" }
@@ -373,10 +389,12 @@
                     rfid: "",
                     holes: "",
                     produceCompanyId: "",
-
                     materialType: "",
                     color: "",
                     size: "",
+                    size1: "",
+                    size2: "",
+                    size3: "",
                     machineTonnage: "",
                     allWeight: "",
                     headWeight: "",
@@ -561,7 +579,21 @@
                     maintainCount: [],
                     rfid: "",
                     holes: "",
-                    produceCompanyId: ""
+                    produceCompanyId: "",
+                    materialType: "",
+                    color: "",
+                    size: "",
+                    size1: "",
+                    size2: "",
+                    size3: "",
+                    machineTonnage: "",
+                    allWeight: "",
+                    headWeight: "",
+                    maxShotWeight: "",
+                    minShotWeight: "",
+                    cycle: "",
+                    commonModelTemperature: "",
+                    motherModelTemperature: "",
                 };
             },
 
@@ -592,6 +624,7 @@
                             }
                         }
                         this.addForm.maintainCount = str;
+                        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;