瀏覽代碼

厂边库入库物资默认米数

xiaosonghong 4 天之前
父節點
當前提交
9cc3399a6d
共有 1 個文件被更改,包括 14 次插入6 次删除
  1. 14 6
      src/views/SIDEWMS/components/oYeRealTimeInventory.vue

+ 14 - 6
src/views/SIDEWMS/components/oYeRealTimeInventory.vue

@@ -135,11 +135,11 @@
           新增实时库存数据:
         </div>
         <el-form label-position="left">
-          
+
           <el-form-item>
             <el-button type="primary" @click="browse">浏览</el-button>
           </el-form-item>
-          
+
           <el-form-item prop="newInventoryId">
             <span style="color: #000000;font-size: 16px;font-weight: 500;"
               >库存ID:</span
@@ -435,7 +435,7 @@
 
     <!--新厂钢材入库-->
     <div class="updateInsertForm">
-      <el-dialog :visible.sync="newFactoryAddView" 
+      <el-dialog :visible.sync="newFactoryAddView"
       width="80%"
       fullscreen>
       <div style="display: grid; place-items: center; height: 100%;">
@@ -505,13 +505,13 @@
           <el-form-item prop="materialMeter" v-if="isDisabledMeter">
             <span style="color: #000000;font-size: 16px;font-weight: 500;"
               >米数:</span>
-            <el-input-number 
+            <el-input-number
               v-model="newFactoryPutForm.meter"
               style="width:250px"
               :min="0" :max="30"
             ></el-input-number>
           </el-form-item>
-          
+
           <el-form-item prop="materialNumberEdit">
             <span style="color: #000000;font-size: 16px;font-weight: 500;"
               >入库件数:</span>
@@ -1118,7 +1118,7 @@ export default {
       this.materialTable = true
     },
     //物资模态框查询
-    onclick() { 
+    onclick() {
       this.option2.requestUrl =
         '/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=' +
         this.materialNameText +
@@ -1157,6 +1157,14 @@ export default {
         this.isDisabledMeter = false;
         this.isDisabledsingleWeight = false;
       }
+      //计算米数
+      if(this.newFactoryPutForm.materialName.indexOf("9米") > 0){
+        this.newFactoryPutForm.meter = 9;
+      } else if (this.newFactoryPutForm.materialName.indexOf("12米") > 0) {
+        this.newFactoryPutForm.meter = 12;
+      } else {
+        this.newFactoryPutForm.meter = null;
+      }
     },
     putNewFactory(){
       this.$confirm('确定保存入库吗?', '提示', {