yangfeng
2023-11-03 7a645e2eb9ef66b6ebea321845c42fd23fb59259
补货页面位置接口联调
2个文件已修改
95 ■■■■■ 已修改文件
src/api/product/reorderRules.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/orderPoint/index.vue 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/product/reorderRules.js
@@ -39,11 +39,10 @@
    data
  })
}
// 获取位置列表
export function getLocationList(data) {
// 获取位置列表树
export function getLocationTreeList() {
  return request({
    url: "/api-wms/v1/location/getLocationList",
    method: "post",
    data
    url: "/api-wms/v1/location/getLocationTreeList",
    method: "get"
  })
}
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>
            <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",
@@ -90,8 +117,8 @@
      //     }]
      // }],
      defaultProps: {
        children: 'children',
        label: 'jointName'
        children: "children",
        label: "jointName"
      },
      addTitle: "新建",
      showDiscard: false,
@@ -356,13 +383,13 @@
    },
    //树点击
    handleNodeClick(data) {
      console.log(data,"sss");
      console.log(data, "sss")
      getReorderRuleList({
        locationId:data.id,
        page:1,
        pageSize:15,
        type:"",
        keyWord:data.jointName,
        keyWord: data.jointName
      }).then((res)=>{
        console.log(res,"res999")
        if (res.code === 200) {
@@ -395,13 +422,15 @@
      })
    },
    async getLocationList(){
      await getLocationList({
        categoryId:"",
        keyWord:"",
        // page:1,
        // pageSize:,
      }).then((res)=>{
        this.datas=res.data
      await getLocationTreeList().then((res) => {
        this.datas = [
          {
            id: 0,
            jointName: "全部",
            children: []
          },
          ...res.data
        ]
        console.log(res,"res666")
      })
    }
@@ -422,7 +451,10 @@
  display: flex;
  justify-content: space-between;
  .con_left {
    width: 200px;
      max-height: calc(100% - 40px);
      overflow: hidden;
      width: 190px;
      margin-right: 10px;
    .el-checkbox-group {
      width:100%;
      display: flex;
@@ -432,7 +464,7 @@
      display: flex;
      flex-direction: column;
      .el-tree{
        background-color: #E6ECF2;
          background-color: #e6ecf2;
      }
    }
  }
@@ -440,6 +472,12 @@
    flex: 1;
  }
}
  .span-ellipsis {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
  }
}
</style>