From 7a645e2eb9ef66b6ebea321845c42fd23fb59259 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 03 十一月 2023 11:43:28 +0800
Subject: [PATCH] 补货页面位置接口联调

---
 src/views/operate/orderPoint/index.vue |  146 ++++++++++++++++++++++++++++++------------------
 1 files changed, 92 insertions(+), 54 deletions(-)

diff --git a/src/views/operate/orderPoint/index.vue b/src/views/operate/orderPoint/index.vue
index eb8596f..d53c274 100644
--- a/src/views/operate/orderPoint/index.vue
+++ b/src/views/operate/orderPoint/index.vue
@@ -1,29 +1,50 @@
 <template>
   <div class="rightContent">
     <div class="top">
-      <SearchCommonView :add-title="addTitle" :show-discard="showDiscard" :show-apply="false" :placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
-        :amount-view="false" @addCommonClick="addProductClick" @searchClick="getList"
-        @discardBtnClick="discardBtnClick" />
+      <SearchCommonView
+        :add-title="addTitle"
+        :show-discard="showDiscard"
+        :show-apply="false"
+        :placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
+        :amount-view="false"
+        @addCommonClick="addProductClick"
+        @searchClick="getList"
+        @discardBtnClick="discardBtnClick"
+      />
     </div>
     <div class="content_wrap">
       <div class="con_left">
-          <p>浣嶇疆</p>
-          <div class="stash">
-            <template>
-              <el-tree :data="datas" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
-            </template>
-          </div>
+        <p>浣嶇疆</p>
+        <div class="stash">
+          <template>
+            <el-tree :data="datas" :props="defaultProps" @node-click="handleNodeClick">
+              <span class="span-ellipsis" slot-scope="{ node }">
+                <span :title="node.label">{{ node.label }}</span>
+              </span>
+            </el-tree>
+          </template>
+        </div>
       </div>
       <div class="list-view">
         <div class="table">
-          <CommonFormTableView ref="tablelistRef" :isReorder="true" :product-table-list="tableList"
-            @inputContent="inputContent" @selLocationClick="selLocationClick" @selProductClick="selProductClick"
-            @tableRowClick="tableRowClick" @selRouteClick="selRouteClick">
+          <CommonFormTableView
+            ref="tablelistRef"
+            :isReorder="true"
+            :product-table-list="tableList"
+            @inputContent="inputContent"
+            @selLocationClick="selLocationClick"
+            @selProductClick="selProductClick"
+            @tableRowClick="tableRowClick"
+            @selRouteClick="selRouteClick"
+          >
             <template slot="tableButton">
               <el-table-column label="鎿嶄綔" width="180" align="center">
                 <template slot-scope="scope">
-                  <span v-if="scope.row.isEdit && scope.row.isView" @click.stop="handleOrderOnceClick(scope.row)"
-                    class="yes-cursor">
+                  <span
+                    v-if="scope.row.isEdit && scope.row.isView"
+                    @click.stop="handleOrderOnceClick(scope.row)"
+                    class="yes-cursor"
+                  >
                     <i class="el-icon-truck"></i>
                     <span>璁㈣喘涓�娆�</span>
                   </span>
@@ -43,7 +64,13 @@
 <script>
 import CommonFormTableView from "@/components/makepager/CommonFormTableView"
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import { getReorderRuleList, addReorderRule, updateReorderRule, orderAgain,getLocationList } from "@/api/product/reorderRules"
+import {
+  getReorderRuleList,
+  addReorderRule,
+  updateReorderRule,
+  orderAgain,
+  getLocationTreeList
+} from "@/api/product/reorderRules"
 import { currentTime } from "@/common/config/index"
 export default {
   name: "ReorderRules",
@@ -53,7 +80,7 @@
   computed: {},
   data() {
     return {
-      datas:[],
+      datas: [],
       // datas: [{
       //     label: '涓�绾� 1',
       //     children: [{
@@ -90,8 +117,8 @@
       //     }]
       // }],
       defaultProps: {
-        children: 'children',
-        label: 'jointName'
+        children: "children",
+        label: "jointName"
       },
       addTitle: "鏂板缓",
       showDiscard: false,
@@ -356,15 +383,15 @@
     },
     //鏍戠偣鍑�
     handleNodeClick(data) {
-      console.log(data,"sss");
+      console.log(data, "sss")
       getReorderRuleList({
-        locationId:data.id,
-        page:1,
-        pageSize:15,
-        type:"",
-        keyWord:data.jointName,
-      }).then((res)=>{
-        console.log(res,"res999")
+        locationId: data.id,
+        page: 1,
+        pageSize: 15,
+        type: "",
+        keyWord: data.jointName
+      }).then((res) => {
+        console.log(res, "res999")
         if (res.code === 200) {
           console.log(res)
           const list = res.data.map((item) => {
@@ -394,15 +421,17 @@
         }
       })
     },
-    async getLocationList(){
-      await getLocationList({
-        categoryId:"",
-        keyWord:"",
-        // page:1,
-        // pageSize:,
-      }).then((res)=>{
-        this.datas=res.data
-        console.log(res,"res666")
+    async getLocationList() {
+      await getLocationTreeList().then((res) => {
+        this.datas = [
+          {
+            id: 0,
+            jointName: "鍏ㄩ儴",
+            children: []
+          },
+          ...res.data
+        ]
+        console.log(res, "res666")
       })
     }
   }
@@ -418,28 +447,37 @@
     overflow: auto;
   }
   .content_wrap {
-  height: calc(100% - 0px);
-  display: flex;
-  justify-content: space-between;
-  .con_left {
-    width: 200px;
-    .el-checkbox-group {
-      width:100%;
-      display: flex;
-      flex-direction: column;
-    }
-    .stash {
-      display: flex;
-      flex-direction: column;
-      .el-tree{
-        background-color: #E6ECF2;
+    height: calc(100% - 0px);
+    display: flex;
+    justify-content: space-between;
+    .con_left {
+      max-height: calc(100% - 40px);
+      overflow: hidden;
+      width: 190px;
+      margin-right: 10px;
+      .el-checkbox-group {
+        width: 100%;
+        display: flex;
+        flex-direction: column;
+      }
+      .stash {
+        display: flex;
+        flex-direction: column;
+        .el-tree {
+          background-color: #e6ecf2;
+        }
       }
     }
+    .list-view {
+      flex: 1;
+    }
   }
-  .list-view {
-    flex: 1;
+  .span-ellipsis {
+    width: 100%;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    font-size: 13px;
   }
-}
-  
 }
 </style>

--
Gitblit v1.8.0