From 8c761b12e99887b091de774783b561e2734f6c21 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 26 二月 2024 09:59:54 +0800
Subject: [PATCH] 追溯搜索修改2

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

diff --git a/src/views/product/producttraceability/index.vue b/src/views/product/producttraceability/index.vue
index a86a177..7c3f3d5 100644
--- a/src/views/product/producttraceability/index.vue
+++ b/src/views/product/producttraceability/index.vue
@@ -2,16 +2,26 @@
   <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;">
         <el-radio v-model="traceType" label="posite" @change="changeTraceType"
@@ -94,7 +104,7 @@
                       </div>
                     </el-col>
                   </el-row>
-                </el-col>changePart
+                </el-col>
                 <el-col
                   :span="10"
                   :offset="1"
@@ -305,7 +315,7 @@
               </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 +340,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">
@@ -975,7 +985,8 @@
 import {
   queryByNo,
   queryDiagram,
-  queryOperationTask
+  queryOperationTask,
+  queryByCustomerOrderId
 } from '@/api/product/producttraceability'
 import {
   getTemplateRecord,
@@ -1000,6 +1011,8 @@
       },
       selectLoading: false,
       systemNo: null,
+      selBatchNo: null,
+      selBatchNoList: [],
       selectedProductSystemNo: null,
       valueColumn: 'customerOrderId',
       partColumn: [
@@ -1010,11 +1023,11 @@
         {
           prop: 'entityName',
           label: '椤圭洰鍚嶇О'
-        }, 
+        },
         {
           prop: 'partNo',
           label: '浜у搧缂栧彿'
-        }, 
+        },
         {
           prop: 'productName',
           label: '浜у搧鍚嶇О'
@@ -1022,7 +1035,7 @@
         {
           prop: 'specs',
           label: '浜у搧鍨嬪彿'
-        }, 
+        },
         {
           prop: 'productType',
           label: '浜у搧绫诲瀷'
@@ -1124,6 +1137,15 @@
     this.resize()
   },
   methods: {
+    queryBatchNoData(){
+        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', () => {
@@ -1228,8 +1250,8 @@
       }
     },
     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

--
Gitblit v1.9.3