quwangxin 2 ani în urmă
părinte
comite
a8905b2d06
1 a modificat fișierele cu 40 adăugiri și 11 ștergeri
  1. 40 11
      src/views/produceOrder/components/report/Extrusion.vue

+ 40 - 11
src/views/produceOrder/components/report/Extrusion.vue

@@ -71,6 +71,21 @@
         <el-descriptions-item label="原料牌号">{{
           categoryMsg.brandNum
         }}</el-descriptions-item>
+        <el-descriptions-item label="库存地点">
+          <span slot="label" class="label-required after">库存地点</span>
+          <el-form-item
+            label=""
+            label-width="0"
+            class="w100"
+            prop="categoryMsg.position"
+          >
+            <DictSelection
+              v-model="categoryMsg.position"
+              dict-name="仓库"
+              @itemChange="warehuseChange"
+            ></DictSelection>
+          </el-form-item>
+        </el-descriptions-item>
         <el-descriptions-item label="批次号">
           <span class="label-required after" slot="label">批次号</span>
           <el-form-item
@@ -86,7 +101,7 @@
                 :key="index"
                 :label="item.batchNum"
                 :value="item.batchNum"
-                @click.native="categoryMsg.number = item.storageNum"
+                @click.native="categoryMsg.totalWeight = item.storageNum"
               ></el-option>
             </el-select>
           </el-form-item>
@@ -98,13 +113,13 @@
             required
             label-width="0"
             class="w100"
-            prop="categoryMsg.number"
+            prop="categoryMsg.totalWeight"
             ><el-input
-              v-model="categoryMsg.number"
+              v-model="categoryMsg.totalWeight"
               placeholder="请输入"
             ></el-input> </el-form-item
         ></el-descriptions-item>
-        <el-descriptions-item label="质检项" :span="2">
+        <el-descriptions-item label="质检项" :span="1">
           <el-input
             v-model="workReport.qualityItem"
             placeholder="请输入"
@@ -336,6 +351,7 @@
         categoryMsg: {
           batchNo: '',
           number: '',
+          position: '',
           totalWeight: '',
           brandNum: '',
           sourceCategoryId: '',
@@ -475,13 +491,26 @@
           this.categoryMsg.code = res.categoryCode;
           this.categoryMsg.sourceCategoryId = res.id;
           this.categoryMsg.brandNum = res.brandNum;
+          this.categoryMsg.factoryCode = res.factoryCode;
 
-          realTimeStorage({
-            categoryCode: res.categoryCode,
-            factoryCode: res.factoryCode || '14T1'
-          }).then((res) => {
-            this.batchList = res;
-          });
+          if (this.categoryMsg.position) {
+            this._realTimeStorage();
+          }
+        });
+      },
+      warehuseChange() {
+        if (this.categoryMsg.code) {
+          this._realTimeStorage();
+        }
+      },
+      _realTimeStorage() {
+        this.categoryMsg.batchNo = '';
+        realTimeStorage({
+          position: this.categoryMsg.position,
+          categoryCode: this.categoryMsg.code,
+          factoryCode: this.categoryMsg.factoryCode || '14T1'
+        }).then((res) => {
+          this.batchList = res;
         });
       },
       getEquip() {
@@ -527,7 +556,7 @@
                 workReportDeviceList.push(this.boatMsg);
               }
 
-              this.categoryMsg.totalWeight = this.categoryMsg.number;
+              // this.categoryMsg.totalWeight = this.categoryMsg.number;
               fun({
                 checkState: 1,
                 isSapReportState: 1,