From 7e807f771796a68e799826ae4a5598ddb2eec0d8 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 11 三月 2024 15:55:11 +0800
Subject: [PATCH] 质检:附件上传

---
 src/views/product/producttraceability/index.vue |   94 ++++++++++++++++++++++++++++++-----------------
 1 files changed, 60 insertions(+), 34 deletions(-)

diff --git a/src/views/product/producttraceability/index.vue b/src/views/product/producttraceability/index.vue
index a86a177..9ba6bc5 100644
--- a/src/views/product/producttraceability/index.vue
+++ b/src/views/product/producttraceability/index.vue
@@ -2,25 +2,35 @@
   <div class="product-traceability-div">
     <div class="product-traceability-hearder-div">
       <div style="width: 600px;margin-left:3px;">
-        <tRemoteSelect
-          v-model="systemNo"
-          :columns="partColumn"
-          :data="partList"
-          :formatter="labelFormatter"
-          :selectLoading="selectLoading"
-          :valueColumn="valueColumn"
-          @selectChange="changePart()"
-          @remoteSearch="queryPart"
-        ></tRemoteSelect>
+        <el-row :gutter="10">
+            <el-col :span="16">
+                <tRemoteSelect
+                v-model="systemNo"
+                :columns="partColumn"
+                :data="partList"
+                :formatter="labelFormatter"
+                :selectLoading="selectLoading"
+                :valueColumn="valueColumn"
+                @selectChange="queryBatchNoData"
+                @remoteSearch="queryPart"
+                ></tRemoteSelect>
+            </el-col>
+            <el-col :span="8">
+                <el-select @change="changePart" v-model="selBatchNo" class="lmes-select" placeholder="璇烽�夋嫨鎵规鍙�">
+                    <el-option :label="item" :value="item" :key="index" v-for="(item,index) in selBatchNoList"></el-option>
+                </el-select>
+            </el-col>
+        </el-row>
+
       </div>
-      <div style="margin-left:20px;">
+      <!-- <div style="margin-left:20px;">
         <el-radio v-model="traceType" label="posite" @change="changeTraceType"
           >鍙嶅悜杩芥函</el-radio
         >
         <el-radio v-model="traceType" label="negate" @change="changeTraceType"
           >姝e悜杩芥函</el-radio
         >
-      </div>
+      </div> -->
     </div>
     <div class="product-traceability-body-div">
       <div class="product-traceability-relationship-div">
@@ -94,7 +104,7 @@
                       </div>
                     </el-col>
                   </el-row>
-                </el-col>changePart
+                </el-col>
                 <el-col
                   :span="10"
                   :offset="1"
@@ -262,10 +272,10 @@
                   <div>宸ヤ綔绔欙細</div>
                   <div>鎶ュ伐鍗曞彿锛�</div>
                   <div>鎶ュ伐浜哄憳锛�</div>
-                  <div>浜у搧缂栧彿锛�</div>
+                  <div>鎵规鍙凤細</div>
                   <div>闆朵欢鍙凤細</div>
                   <div>鍗曚綅锛�</div>
-                  <div>浜у嚭鏁伴噺锛�</div>
+
                 </div>
                 <div class="product-traceability-producttracking-val-div">
                   <div :title="currProductTracking.workstationName">
@@ -280,7 +290,6 @@
                     {{ currProductTracking.partNo }}
                   </div>
                   <div>{{ currProductTracking.unit }}</div>
-                  <div>{{ currProductTracking.productQty }}</div>
                 </div>
               </div>
               <div class="product-traceability-producttracking-item-div">
@@ -288,24 +297,26 @@
                   <div>鐝粍锛�</div>
                   <div>姹囨姤宸ュ簭锛�</div>
                   <div>姹囨姤鏃堕棿锛�</div>
-                  <div>鎵瑰彿锛�</div>
+                  <!-- <div>鎵瑰彿锛�</div> -->
                   <div>闆朵欢鎻忚堪锛�</div>
                   <div>鐢熶骇鏃ユ湡锛�</div>
+                  <div>浜у嚭鏁伴噺锛�</div>
                 </div>
                 <div class="product-traceability-producttracking-val-div">
                   <div>{{ currProductTracking.crewName }}</div>
                   <div>{{ currProductTracking.operationName }}</div>
                   <div>{{ currProductTracking.trackingTime }}</div>
-                  <div>{{ currProductTracking.systemNo }}</div>
+                  <!-- <div>{{ currProductTracking.systemNo }}</div> -->
                   <div :title="currProductTracking.partName">
                     {{ currProductTracking.partName }}
                   </div>
                   <div>{{ currProductTracking.productDate }}</div>
+                  <div>{{ currProductTracking.productQty }}</div>
                 </div>
               </div>
             </div>
           </el-tab-pane>
-          <el-tab-pane label="宸ユ淇℃伅" name="宸ユ淇℃伅">
+          <!-- <el-tab-pane label="宸ユ淇℃伅" name="宸ユ淇℃伅">
             <div style="margin-top:10px;">
               <el-table
                 ref="stepRecordTable"
@@ -330,7 +341,7 @@
                 </el-table-column>
               </el-table>
             </div>
-          </el-tab-pane>
+          </el-tab-pane> -->
           <el-tab-pane label="妫�娴嬩俊鎭�" name="妫�娴嬩俊鎭�">
             <div style="margin-top:10px;">
               <el-tabs type="card">
@@ -535,7 +546,7 @@
                             </el-table-column>
                           </el-table>
                         </el-tab-pane>
-                        <el-tab-pane label="闄勪欢">
+                        <!-- <el-tab-pane label="闄勪欢">
                           <el-upload
                             ref="upload"
                             action="/mes/operationTask/upload"
@@ -545,7 +556,7 @@
                             :auto-upload="false"
                             list-type="picture"
                           ></el-upload
-                        ></el-tab-pane>
+                        ></el-tab-pane> -->
                       </el-tabs>
                     </div>
                   </div>
@@ -657,7 +668,7 @@
               </el-tabs>
             </div>
           </el-tab-pane>
-          <el-tab-pane label="妯″叿淇℃伅" name="妯″叿淇℃伅">
+          <!-- <el-tab-pane label="妯″叿淇℃伅" name="妯″叿淇℃伅">
             <div style="margin-top:10px;">
               <el-table
                 ref="mouldRecordTable"
@@ -762,7 +773,7 @@
                 </el-table-column>
               </el-table>
             </div>
-          </el-tab-pane>
+          </el-tab-pane> -->
         </el-tabs>
       </div>
     </div>
@@ -975,7 +986,8 @@
 import {
   queryByNo,
   queryDiagram,
-  queryOperationTask
+  queryOperationTask,
+  queryByCustomerOrderId
 } from '@/api/product/producttraceability'
 import {
   getTemplateRecord,
@@ -1000,6 +1012,8 @@
       },
       selectLoading: false,
       systemNo: null,
+      selBatchNo: null,
+      selBatchNoList: [],
       selectedProductSystemNo: null,
       valueColumn: 'customerOrderId',
       partColumn: [
@@ -1010,11 +1024,11 @@
         {
           prop: 'entityName',
           label: '椤圭洰鍚嶇О'
-        }, 
+        },
         {
           prop: 'partNo',
           label: '浜у搧缂栧彿'
-        }, 
+        },
         {
           prop: 'productName',
           label: '浜у搧鍚嶇О'
@@ -1022,7 +1036,7 @@
         {
           prop: 'specs',
           label: '浜у搧鍨嬪彿'
-        }, 
+        },
         {
           prop: 'productType',
           label: '浜у搧绫诲瀷'
@@ -1124,6 +1138,16 @@
     this.resize()
   },
   methods: {
+    queryBatchNoData(){
+        this.selBatchNo = null
+        queryByCustomerOrderId({customerOrderId : this.systemNo}).then(res=>{
+            if(res.status===200){
+                this.selBatchNoList = res.data.data
+            }
+        }).catch(error=>{
+            console.error(error)
+        })
+    },
     // 鍔犺浇娴忚鍣ㄧ獥鍙e彉鍖栬嚜閫傚簲
     resize() {
       window.addEventListener('resize', () => {
@@ -1226,10 +1250,12 @@
       } else {
         this.partList = []
       }
+      this.selBatchNo = null
+      this.selBatchNoList = []
     },
     changePart() {
-      if (this.systemNo != null && this.systemNo !== '') {
-        const query = { systemNo: this.systemNo, traceType: this.traceType }
+      if (this.selBatchNo != null && this.selBatchNo !== '') {
+        const query = { systemNo: this.selBatchNo, traceType: this.traceType }
         queryDiagram(query)
           .then((response) => {
             var data = response.data
@@ -1239,15 +1265,15 @@
                 const hasOutNode = data.data.linkDataArray.find((ele) => {
                   return ele.from === item.key
                 })
-                item.batchNo = 'SN鍙�:' + item.batchNo
+                item.batchNo = '鎵规鍙�:' + item.batchNo
                 item.quantity =
                   '鎶曞叆鏁伴噺:' +
                   (hasOutNode ? item.quantity : 0) +
                   ' ' +
                   item.unit
-                item.ifsBatchNo =
-                  'IFS鎵规鍙�:' +
-                  (item.ifsBatchNo == null ? '' : item.ifsBatchNo)
+                // item.ifsBatchNo =
+                //   'IFS鎵规鍙�:' +
+                //   (item.ifsBatchNo == null ? '' : item.ifsBatchNo)
               })
               this.modelData = {
                 nodeDataArray: data.data.nodeDataArray,

--
Gitblit v1.9.3